100); foreach ($Len as $tag => $maxlen) { ${$tag}=(!array_key_exists($tag, $_POST) || empty($_POST[$tag])) ? '' : chk_str($_POST[$tag], $maxlen); } ?>

Restore Backup Files

Processing File -

'."\n"; } echo 'Created on: '.$Avail.' by '.$User.'

'."\n"; $TarOutput=explode("\n", shell_exec('tar --extract --verbose --dir '.$BaseDir.' --file '.$BaseDir.'/'.$BACKSET.' --gunzip --overwrite --wildcards *.unl')); $ChgLog=array_search('changelog.unl', $TarOutput); if ($ChgLog !== FALSE) { $TarOutput[$ChgLog]=''; array_unshift($TarOutput, 'changelog.unl'); } foreach ($TarOutput as $UnlFile) { if (strlen($UnlFile) == 0) { continue; } echo 'Processing table '.substr($UnlFile, 0, -4).'
'."\n"; $Table=substr($UnlFile, 0, -4); $query='delete from '.$Table.' where 1=1'; mysqli_query($db, $query); $query='load data infile "'.$BaseDir.'/'.$UnlFile.'" into table '.$Table; mysqli_query($db, $query); $query='insert into changelog values(null, null, "'.$Key.'", "'.$Table.'", "L", "", "", "", "")'; mysqli_query($db, $query); @unlink($BaseDir.'/'.$UnlFile); } $query='insert into changelog values(null, null, "'.$Key.'", "restore", "L", "", "", "'.$BACKSET.'", "")'; mysqli_query($db, $query); $query='select * from accts where acct_type="A" and name="'.$AdminName.'"'; $name_res=mysqli_query($db, $query); if (mysqli_num_rows($name_res) == 1) { $name_row=mysqli_fetch_assoc($name_res); $Key=$name_row['keyval']; $Page='amenu.php?k='.$Key; } else { $Page='welcome.php'; } ?>