$value)
//{
// $mod = $pathtoroot . $value . "admin/include/backup.php";
// require_once($mod);
//}
$section = "in-portal:backup_toolbar";
$envar = "env=" . BuildEnv();
$sec = $objSections->GetSection($section);
$title = admin_language("la_performing_backup")." - ".admin_language("la_Step")." 2";
int_header(NULL,NULL,$title);
/*******************************BEGINNING*********************************/
$conn = &GetADODBConnection();
$tables = $conn->MetaTables(); // array_keys($tables);
//echo "
"; print_r($tables); echo "
";
$prefix = GetTablePrefix();
//if(strlen($prefix))
//{
for($x=0;$xGetVariable("backup_filename");
$filepath=$objConfig->Get("Backup_Path");
$filename = $filepath."/".$filename;
$PageTitle = admin_language("la_text_Backup_in_progress");
$CancelURL = $rootURL ."admin/backup/backup1.php?".$envar ;
if ($success==1)
{
finish();
}
$CurrentTable = $TableNames[$TableIndex];
$NumItems = TableCount($CurrentTable,"",0);
$caption = admin_language("la_Text_backing_up")." ".$CurrentTable." (".$NumItems." ".admin_language("la_Text_Rows").") ";
stats($caption,$SqlStart,$NumItems);
$out = array();
$caption = admin_language("la_Text_Table")." ".$TableIndex." ".admin_language("lu_of")." ".$num_tables." ";
stats($caption,$TableIndex,$num_tables);
if($SqlStart==0 && $TableIndex==0)
{
for($x=0;$xExecute($sql);
while ($r && !$r->EOF) {
$version = $r->fields['Version'];
fwrite($fp, "# ".$r->fields['Name']." Version: $version;\n");
$r->MoveNext();
}
fwrite($fp, "#------------------------------------------\n\n");
}
if($fp)
{
fwrite($fp,implode("\n",$out));
fwrite($fp,"\n");
fclose($fp);
}
else
{
echo "Error opening $filename
\n";
exit();
}
$SqlStart += $RowCount;
if($SqlStart>=$NumItems)
{
$SqlStart = 0;
$TableIndex++;
}
if($TableIndex < $num_tables)
{
$url = $adminURL."/backup/backup2.php?".$envar."&TableIndex=$TableIndex&Start=$SqlStart";
}
else
{
$url = $adminURL."/backup/backup3.php?".$envar;
}
reload($url);
echo "