[Vtigercrm-commits] [vtiger-commits] r9115 - /vtigercrm/trunk/modules/Settings/BackupServerConfig.php

vtigercrm-commits at vtiger.fosslabs.com vtigercrm-commits at vtiger.fosslabs.com
Thu Aug 24 01:53:01 EDT 2006


Author: richie
Date: Wed Aug 23 23:52:51 2006
New Revision: 9115

Log:
Updated BackupServerConfig.php for adding a feature to clear existing data -- ahmed

Modified:
    vtigercrm/trunk/modules/Settings/BackupServerConfig.php

Modified: vtigercrm/trunk/modules/Settings/BackupServerConfig.php
==============================================================================
--- vtigercrm/trunk/modules/Settings/BackupServerConfig.php (original)
+++ vtigercrm/trunk/modules/Settings/BackupServerConfig.php Wed Aug 23 23:52:51 2006
@@ -1,53 +1,62 @@
-<?php
-/*********************************************************************************
-** The contents of this file are subject to the vtiger CRM Public License Version 1.0
- * ("License"); You may not use this file except in compliance with the License
- * The Original Code is:  vtiger CRM Open Source
- * The Initial Developer of the Original Code is vtiger.
- * Portions created by vtiger are Copyright (C) vtiger.
- * All Rights Reserved.
-*
- ********************************************************************************/
-
-require_once('Smarty_setup.php');
-
-global $mod_strings;
-global $app_strings;
-global $app_list_strings;
-global $adb;
-global $theme;
-$theme_path="themes/".$theme."/";
-$image_path=$theme_path."images/";
-require_once($theme_path.'layout_utils.php');
-
-
-$smarty = new vtigerCRM_Smarty;
-if($_REQUEST['error'] != '')
-{
-		$smarty->assign("ERROR_MSG",'<b><font color="purple">'.$_REQUEST["error"].'</font></b>');
-}
-$sql="select * from vtiger_systems where server_type = 'backup'";
-$result = $adb->query($sql);
-$server = $adb->query_result($result,0,'server');
-$server_username = $adb->query_result($result,0,'server_username');
-$server_password = $adb->query_result($result,0,'server_password');
-
-if(isset($_REQUEST['bkp_server_mode']) && $_REQUEST['bkp_server_mode'] != '')
-	$smarty->assign("BKP_SERVER_MODE",$_REQUEST['bkp_server_mode']);
-else
-	$smarty->assign("BKP_SERVER_MODE",'view');
-
-if (isset($server))
-	$smarty->assign("FTPSERVER",$server);
-if (isset($server_username))
-	$smarty->assign("FTPUSER",$server_username);
-if (isset($server_password))
-	$smarty->assign("FTPPASSWORD",$server_password);
-
-
-$smarty->assign("MOD", return_module_language($current_language,'Settings'));
-$smarty->assign("IMAGE_PATH",$image_path);
-$smarty->assign("APP", $app_strings);
-$smarty->assign("CMOD", $mod_strings);
-$smarty->display("Settings/BackupServer.tpl");
-?>
+<?php
+/*********************************************************************************
+** The contents of this file are subject to the vtiger CRM Public License Version 1.0
+ * ("License"); You may not use this file except in compliance with the License
+ * The Original Code is:  vtiger CRM Open Source
+ * The Initial Developer of the Original Code is vtiger.
+ * Portions created by vtiger are Copyright (C) vtiger.
+ * All Rights Reserved.
+*
+ ********************************************************************************/
+
+require_once('Smarty_setup.php');
+
+global $mod_strings;
+global $app_strings;
+global $app_list_strings;
+global $adb;
+global $theme;
+$theme_path="themes/".$theme."/";
+$image_path=$theme_path."images/";
+require_once($theme_path.'layout_utils.php');
+
+if(isset($_REQUEST['opmode']) && $_REQUEST['opmode'] != '')
+{
+	$sql_del = "delete from vtiger_systems where server_type='backup'";
+	$adb->query($sql_del);
+}
+
+$smarty = new vtigerCRM_Smarty;
+if($_REQUEST['error'] != '')
+{
+		$smarty->assign("ERROR_MSG",'<b><font color="purple">'.$_REQUEST["error"].'</font></b>');
+}
+$sql="select * from vtiger_systems where server_type = 'backup'";
+$result = $adb->query($sql);
+$server = $adb->query_result($result,0,'server');
+$server_username = $adb->query_result($result,0,'server_username');
+$server_password = $adb->query_result($result,0,'server_password');
+
+if(isset($_REQUEST['bkp_server_mode']) && $_REQUEST['bkp_server_mode'] != '')
+	$smarty->assign("BKP_SERVER_MODE",$_REQUEST['bkp_server_mode']);
+else
+	$smarty->assign("BKP_SERVER_MODE",'view');
+
+if (isset($server))
+	$smarty->assign("FTPSERVER",$server);
+if (isset($server_username))
+	$smarty->assign("FTPUSER",$server_username);
+if (isset($server_password))
+	$smarty->assign("FTPPASSWORD",$server_password);
+
+
+$smarty->assign("MOD", return_module_language($current_language,'Settings'));
+$smarty->assign("IMAGE_PATH",$image_path);
+$smarty->assign("APP", $app_strings);
+$smarty->assign("CMOD", $mod_strings);
+
+if($_REQUEST['ajax'] == 'true')
+	$smarty->display("Settings/BackupServerContents.tpl");
+else
+	$smarty->display("Settings/BackupServer.tpl");
+?>





More information about the vtigercrm-commits mailing list