[ Index ]
 

Code source de vtiger CRM 5.0.2

Accédez au Source d'autres logiciels libresSoutenez Angelica Josefina !

title

Body

[fermer]

/modules/Settings/ -> BackupServerConfig.php (source)

   1  <?php
   2  /*********************************************************************************
   3  ** The contents of this file are subject to the vtiger CRM Public License Version 1.0
   4   * ("License"); You may not use this file except in compliance with the License
   5   * The Original Code is:  vtiger CRM Open Source
   6   * The Initial Developer of the Original Code is vtiger.
   7   * Portions created by vtiger are Copyright (C) vtiger.
   8   * All Rights Reserved.
   9  *
  10   ********************************************************************************/
  11  
  12  require_once ('user_privileges/enable_backup.php');
  13  require_once ('Smarty_setup.php');
  14  
  15  global $mod_strings;
  16  global $app_strings, $enable_backup;
  17  global $app_list_strings;
  18  global $adb;
  19  global $theme;
  20  $theme_path="themes/".$theme."/";
  21  $image_path=$theme_path."images/";
  22  require_once ($theme_path.'layout_utils.php');
  23  
  24  if(isset($_REQUEST['opmode']) && $_REQUEST['opmode'] != '')
  25  {
  26      $sql_del = "delete from vtiger_systems where server_type='backup'";
  27      $adb->query($sql_del);
  28  }
  29  
  30  $smarty = new vtigerCRM_Smarty;
  31  if($_REQUEST['error'] != '')
  32  {
  33          $smarty->assign("ERROR_MSG",'<b><font color="red">'.$_REQUEST["error"].'</font></b>');
  34  }
  35  $sql="select * from vtiger_systems where server_type = 'backup'";
  36  $result = $adb->query($sql);
  37  $server = $adb->query_result($result,0,'server');
  38  $server_username = $adb->query_result($result,0,'server_username');
  39  $server_password = $adb->query_result($result,0,'server_password');
  40  
  41  if(isset($_REQUEST['bkp_server_mode']) && $_REQUEST['bkp_server_mode'] != '')
  42      $smarty->assign("BKP_SERVER_MODE",$_REQUEST['bkp_server_mode']);
  43  else
  44      $smarty->assign("BKP_SERVER_MODE",'view');
  45  
  46  if (isset($server))
  47      $smarty->assign("FTPSERVER",$server);
  48  if (isset($server_username))
  49      $smarty->assign("FTPUSER",$server_username);
  50  if (isset($server_password))
  51      $smarty->assign("FTPPASSWORD",$server_password);
  52  
  53  
  54  $smarty->assign("MOD", return_module_language($current_language,'Settings'));
  55  $smarty->assign("IMAGE_PATH",$image_path);
  56  $smarty->assign("APP", $app_strings);
  57  $smarty->assign("CMOD", $mod_strings);
  58  
  59  if($enable_backup == 'true')    
  60      $backup_status = 'enabled';
  61  else
  62      $backup_status = 'disabled';
  63  
  64  $smarty->assign("BACKUP_STATUS", $backup_status);
  65  
  66  if($_REQUEST['ajax'] == 'true')
  67      $smarty->display("Settings/BackupServerContents.tpl");
  68  else
  69      $smarty->display("Settings/BackupServer.tpl");
  70  ?>


Généré le : Sun Feb 25 10:22:19 2007 par Balluche grâce à PHPXref 0.7