Exemplo n.º 1
0
 function main()
 {
     // Тулбар
     $this->VAR['toolbar'] = sxd_php2json(array(array('backup', $this->LNG['tbar_backup'], 1, 3), array('restore', $this->LNG['tbar_restore'], 2, 3), array('|'), array('files', $this->LNG['tbar_files'], 3, 1), array('services', $this->LNG['tbar_services'], 5, 1), array('|'), array('createdb', $this->LNG['tbar_createdb'], 7, 0), array('connects', $this->LNG['tbar_connects'], 6, 0), array('|'), array('options', $this->LNG['tbar_options'], 4, 1), array('|'), array('exit', $this->LNG['tbar_exit'], 8, 1)));
     $this->db = 'temp';
     $zip = array($this->LNG['zip_none']);
     if (function_exists("gzopen")) {
         for ($i = 1; $i < 10; $i++) {
             $zip[] = "GZip: {$i}";
         }
         $zip[1] .= " ({$this->LNG['zip_min']})";
         $zip[7] .= " ({$this->LNG['default']})";
     }
     if (function_exists("bzopen")) {
         $zip[10] = "BZip";
     }
     end($zip);
     $zip[key($zip)] .= " ({$this->LNG['zip_max']})";
     $this->VAR['combos'] = $this->addCombo('backup_db', $this->db, 11, 'db', $this->getDBList()) . $this->addCombo('backup_charset', 0, 9, 'charset', $this->getCharsetList()) . $this->addCombo('backup_zip', 7, 10, 'zip', $zip) . $this->addCombo('restore_db', $this->db, 11, 'db') . $this->addCombo('restore_charset', 0, 9, 'charset') . $this->addCombo('restore_file', 0, 12, 'files', $this->getFileList()) . $this->addCombo('restore_type', 0, 13, 'types', array("CREATE + INSERT ({$this->LNG['default']})", 'TRUNCATE + INSERT', 'REPLACE', 'INSERT IGNORE')) . $this->addCombo('services_db', $this->db, 11, 'db') . $this->addCombo('services_check', 0, 5, 'check', array("- {$this->LNG['default']} -", 'QUICK', 'FAST', 'CHANGED', 'MEDIUM', 'EXTENDED')) . $this->addCombo('services_repair', 0, 5, 'repair', array("- {$this->LNG['default']} -", 'QUICK', 'EXTENDED')) . $this->addCombo('services_charset', 0, 9, 'collation', $this->getCollationList()) . $this->addCombo('services_charset_col', 0, 15, 'collation:services_charset') . $this->addCombo('db_charset', 0, 9, 'collation') . $this->addCombo('db_charset_col', 0, 15, 'collation:db_charset');
     if (!V_MYSQL) {
         $this->VAR['combos'] .= $this->error;
     }
     $this->VAR['combos'] .= $this->getSavedJobs() . "sxd.confirms = {$this->CFG['confirm']};";
     $this->LNG['del_date'] = sprintf($this->LNG['del_date'], '<input type="text" id="del_time" class=txt style="width:24px;" maxlength="3">');
     $this->LNG['del_count'] = sprintf($this->LNG['del_count'], '<input id="del_count" type="text" class=txt style="width:18px;" maxlength="2">');
     echo sxd_tpl_page();
 }
Exemplo n.º 2
0
 function main()
 {
     $this->VAR["toolbar"] = sxd_php2json(array(array("backup", $this->LNG["tbar_backup"], 1, 3), array("restore", $this->LNG["tbar_restore"], 2, 3), array("|"), array("files", $this->LNG["tbar_files"], 3, 1), array("services", $this->LNG["tbar_services"], 5, 1), array("|"), array("createdb", $this->LNG["tbar_createdb"], 7, 0), array("connects", $this->LNG["tbar_connects"], 6, 0), array("|"), array("options", $this->LNG["tbar_options"], 4, 1), array("|"), array("exit", $this->LNG["tbar_exit"], 8, 1)));
     $this->db = "temp";
     $zip = array($this->LNG["zip_none"]);
     if (function_exists("gzopen")) {
         for ($i = 1; $i < 10; $i++) {
             $zip[] = "GZip: {$i}";
         }
         $zip[1] .= " ({$this->LNG['zip_min']})";
         $zip[7] .= " ({$this->LNG['default']})";
     }
     if (function_exists("bzopen")) {
         $zip[10] = "BZip";
     }
     end($zip);
     $zip[key($zip)] .= " ({$this->LNG['zip_max']})";
     $this->VAR["combos"] = $this->addCombo("backup_db", $this->db, 11, "db", array()) . $this->addCombo("backup_charset", 0, 9, "charset", $this->getCharsetList()) . $this->addCombo("backup_zip", 7, 10, "zip", $zip) . $this->addCombo("restore_db", $this->db, 11, "db") . $this->addCombo("restore_charset", 0, 9, "charset") . $this->addCombo("restore_file", 0, 12, "files", $this->getFileList()) . $this->addCombo("restore_type", 0, 13, "types", array("CREATE + INSERT ({$this->LNG['default']})", "TRUNCATE + INSERT", "REPLACE", "INSERT IGNORE")) . $this->addCombo("services_db", $this->db, 11, "db") . $this->addCombo("services_check", 0, 5, "check", array("- {$this->LNG['default']} -", "QUICK", "FAST", "CHANGED", "MEDIUM", "EXTENDED")) . $this->addCombo("services_repair", 0, 5, "repair", array("- {$this->LNG['default']} -", "QUICK", "EXTENDED")) . $this->addCombo("services_charset", 0, 9, "collation", $this->getCollationList()) . $this->addCombo("services_charset_col", 0, 15, "collation:services_charset") . $this->addCombo("db_charset", 0, 9, "collation") . $this->addCombo("db_charset_col", 0, 15, "collation:db_charset");
     if (!V_MYSQL) {
         $this->VAR["combos"] .= $this->error;
     }
     $this->VAR["combos"] .= $this->getSavedJobs() . "sxd.confirms = {$this->CFG['confirm']};sxd.actions.dblist();";
     $this->LNG["del_date"] = sprintf($this->LNG["del_date"], "<input type=\"text\" id=\"del_time\" class=txt style=\"width:24px;\" maxlength=\"3\">");
     $this->LNG["del_count"] = sprintf($this->LNG["del_count"], "<input id=\"del_count\" type=\"text\" class=txt style=\"width:18px;\" maxlength=\"2\">");
     $this->LNG["prefix"] = sprintf($this->LNG["prefix"], "<input type=\"text\" id=\"prefix_from\" class=txt style=\"width:30px;\">", "<input type=\"text\" id=\"prefix_to\" class=txt style=\"width:30px;\">");
     include "tmpl.php";
     echo sxd_tpl_page();
 }