Index: branches/RC/admin/backup/backup2.php =================================================================== diff -u -r8929 -r9398 --- branches/RC/admin/backup/backup2.php (.../backup2.php) (revision 8929) +++ branches/RC/admin/backup/backup2.php (.../backup2.php) (revision 9398) @@ -9,19 +9,19 @@ checkViewPermission('in-portal:backup'); $pathtolocal = $pathtoroot."kernel/"; -require_once ($pathtoroot."admin/include/elements.php"); +require_once ($pathtoroot.$admin."/include/elements.php"); require_once ($pathtoroot."kernel/admin/include/navmenu.php"); require_once ($pathtolocal."admin/include/navmenu.php"); -require_once ($pathtoroot."admin/toolbar.php"); +require_once ($pathtoroot.$admin."/toolbar.php"); global $tables; unset($tables); //$m = GetModuleArray(); //foreach($m as $key => $value) -//{ -// $mod = $pathtoroot . $value . "admin/include/backup.php"; +//{ +// $mod = $pathtoroot . $value . "admin/include/backup.php"; // require_once($mod); //} @@ -44,7 +44,7 @@ //if(strlen($prefix)) //{ for($x=0;$x\n"; exit(); @@ -140,27 +140,27 @@ echo "\n"; -//extracts the rows of data from tables using limits +//extracts the rows of data from tables using limits function insert_data($table, $start, $limit, $mywhere) { global $out; - + $conn = &GetADODBConnection(); if ($mywhere !="") { $whereclause= " WHERE ".$mywhere." "; } - else + else { $whereclause = ""; } - + $rs = $conn->Execute("SELECT * from $table $whereclause LIMIT $start, $limit"); $prefix = GetTablePrefix(); $rowcount = 0; while($rs && !$rs->EOF) - { + { $temp=$conn->GetInsertSQL($rs,$rs->fields); $temp=ereg_replace("\n","\\n", $temp); $temp=ereg_replace("\r","\\r", $temp); @@ -172,7 +172,7 @@ $rs->MoveNext(); $rowcount++; } - + return $rowcount; } @@ -182,7 +182,7 @@ $schema_create .="# --------------------------------------------------------".$crlf; $conn->Execute("SET SQL_QUOTE_SHOW_CREATE = 0"); $result = $conn->Execute("SHOW CREATE TABLE $table"); - if($result && !$result->EOF) + if($result && !$result->EOF) { $tmpres = $result->fields; // mysql_fetch_array($result); $pos = strpos($tmpres["Create Table"], ' ('); @@ -221,11 +221,11 @@ if(strlen($schema_create)) { $schema_create = str_replace("DROP TABLE IF EXISTS ".GetTablePrefix(),"DROP TABLE ",$schema_create); - $schema_create = str_replace("CREATE TABLE ".GetTablePrefix(),"CREATE TABLE ",$schema_create); + $schema_create = str_replace("CREATE TABLE ".GetTablePrefix(),"CREATE TABLE ",$schema_create); while(strlen($schema_create && substr($schema_create,-1)!=")")) { $schema_create = substr($schema_create,0,-1); - } + } } $schema_create .= "\n# --------------------------------------------------------\n"; return $schema_create; @@ -234,20 +234,20 @@ function stats($caption,$myprogress,$totalnum) { global $rootURL, $CancelURL,$PageTitle; - + if($totalnum>0) { $pct=round(($myprogress/ $totalnum)*100); } else $pct = 100; $o .=""; - - echo "\n"; + + echo "\n"; $o .= int_subsection_title_ret($caption."-".$pct."%"); - $o .= "

"; + $o .= "

"; $o .= " "; - $o .=" "; + $o .=" "; $comp_pct = 100-$pct; $o .= " "; $o .= "
 
 
";