if ($users) {
//Begin Users tag
fwrite ($bf,start_tag("USERS",2,true));
+ $counter = 0;
//With every user
foreach ($users as $user) {
//Get user data from table
}
//End User tag
fwrite ($bf,end_tag("USER",3,true));
+ //Do some output
+ $counter++;
+ if ($counter % 10 == 0) {
+ echo ".";
+ if ($counter % 200 == 0) {
+ echo "<br>";
+ }
+ backup_flush(300);
+ }
}
//End Users tag
fwrite ($bf,end_tag("USERS",2,true));
if ($logs) {
//Pring logs header
fwrite ($bf,start_tag("LOGS",2,true));
+ $counter = 0;
//Iterate
foreach ($logs as $log) {
//See if it is a valid module to backup
//End log tag
fwrite ($bf,end_tag("LOG",3,true));
}
+ //Do some output
+ $counter++;
+ if ($counter % 10 == 0) {
+ echo ".";
+ if ($counter % 200 == 0) {
+ echo "<br>";
+ }
+ backup_flush(300);
+ }
}
//End logs tag
$status = fwrite ($bf,end_tag("LOGS",2,true));
if ($questions) {
//Write start tag
$status =fwrite ($bf,start_tag("QUESTIONS",4,true));
+ $counter = 0;
//Iterate over each question
foreach ($questions as $question) {
//Start question
}
//End question
$status =fwrite ($bf,end_tag("QUESTION",5,true));
+ //Do some output
+ $counter++;
+ if ($counter % 10 == 0) {
+ echo ".";
+ if ($counter % 200 == 0) {
+ echo "<br>";
+ }
+ backup_flush(300);
+ }
}
//Write end tag
$status =fwrite ($bf,end_tag("QUESTIONS",4,true));