echo $table_def_function($table_prefix . $table_name, "\n") . "\n";
				}

				if($backup_type != 'structure')
				{
					$table_content_function($table_prefix . $table_name, "output_table_content");
				}
			}
			
			if($do_gzip_compress)
			{
				$Size = ob_get_length();
				$Crc = crc32(ob_get_contents());
				$contents = gzcompress(ob_get_contents());
				ob_end_clean();
				echo "\x1f\x8b\x08\x00\x00\x00\x00\x00".substr($contents, 0, strlen($contents) - 4).gzip_PrintFourChars($Crc).gzip_PrintFourChars($Size);
			}
			exit;

			break;

		case 'restore':
			if(!isset($restore_start))
			{
				//
				// Define Template files...
				//
				include('./page_header_admin.php');

				$template->set_filenames(array(
					"body" => "admin/db_utils_restore_body.tpl")
Esempio n. 2
0
                 break;
         }
         if ($backup_type != 'data') {
             echo "#\n# TABLE: " . $table_prefix . $table_name . "\n#\n";
             echo $table_def_function($table_prefix . $table_name, "\n") . "\n";
         }
         if ($backup_type != 'structure') {
             $table_content_function($table_prefix . $table_name, "output_table_content");
         }
     }
     if ($do_gzip_compress) {
         $Size = ob_get_length();
         $Crc = crc32(ob_get_contents());
         $contents = gzcompress(ob_get_contents());
         ob_end_clean();
         echo "‹" . substr($contents, 0, strlen($contents) - 4) . gzip_PrintFourChars($Crc) . gzip_PrintFourChars($Size);
     }
     exit;
     break;
 case 'restore':
     if (!isset($HTTP_POST_VARS['restore_start'])) {
         //
         // Define Template files...
         //
         include './page_header_admin.' . $phpEx;
         $template->set_filenames(array("body" => "admin/db_utils_restore_body.tpl"));
         $s_hidden_fields = "<input type=\"hidden\" name=\"perform\" value=\"restore\" /><input type=\"hidden\" name=\"perform\" value=\"{$perform}\" />";
         $template->assign_vars(array("L_DATABASE_RESTORE" => $lang['Database_Utilities'] . " : " . $lang['Restore'], "L_RESTORE_EXPLAIN" => $lang['Restore_explain'], "L_SELECT_FILE" => $lang['Select_file'], "L_START_RESTORE" => $lang['Start_Restore'], "S_DBUTILS_ACTION" => append_sid("admin_db_utilities.{$phpEx}"), "S_HIDDEN_FIELDS" => $s_hidden_fields));
         $template->pparse("body");
         break;
     } else {
                     break;
             }
             if ($backup_type != 'data') {
                 echo "#\n# TABLE: " . $table_name . "\n#\n";
                 echo $table_def_function($table_name, "\n") . "\n";
             }
             if ($backup_type != 'structure') {
                 $table_content_function($table_name, 'output_table_content');
             }
         }
         if ($do_gzip_compress) {
             $Size = ob_get_length();
             $Crc = crc32(ob_get_contents());
             $contents = gzcompress(ob_get_contents());
             ob_end_clean();
             echo '\\x1f\\x8b\\x08\\x00\\x00\\x00\\x00\\x00' . substr($contents, 0, strlen($contents) - 4) . gzip_PrintFourChars($Crc) . gzip_PrintFourChars($Size);
         }
         exit;
     }
     break;
 case 'restore':
     if (!isset($HTTP_POST_VARS['restore_start'])) {
         //
         // Define Template files...
         //
         include './page_header_admin.' . $phpEx;
         $template->set_filenames(array('body' => 'db_utils_restore_body.tpl'));
         $s_hidden_fields = '<input type="hidden" name="perform" value="restore" /><input type="hidden" name="perform" value="' . $perform . '" />';
         $template->assign_vars(array('L_DATABASE_RESTORE' => $lang['Database_Utilities'] . " : " . $lang['Restore'], 'L_RESTORE_EXPLAIN' => $lang['Restore_explain'], 'L_SELECT_FILE' => $lang['Select_file'], 'L_START_RESTORE' => $lang['Start_Restore'], 'S_DBUTILS_ACTION' => append_sid("admin_db_utilities.{$phpEx}"), 'S_HIDDEN_FIELDS' => $s_hidden_fields));
         $template->pparse('body');
         break;