3 if($_SESSION["admin"] == "admin"){
5 #if($_SESSION["username"] !== "admin"){ echo "Under Construction"; exit;}
9 $xmlfile = file_get_contents('http://' . $updserver . '/update_routines.php?ver='.$ver);
10 file_put_contents("file.xml", $xmlfile);
11 $doc = new DOMDocument();
12 $doc->load("file.xml");
14 $files = $doc->getElementsByTagName( "file" );
15 foreach( $files as $file )
17 $names = $file->getElementsByTagName( "name" );
18 $name = $names->item(0)->nodeValue
;
20 $workingpaths = $file->getElementsByTagName( "workingpath" );
21 $workingpath = $workingpaths->item(0)->nodeValue
;
23 $usedbys = $file->getElementsByTagName( "usedby" );
24 $usedby = $usedbys->item(0)->nodeValue
;
25 $filepath = $syspath . $workingpath . $name;
26 $file = file_get_contents('http://' . $updserver . '/' . $ver . '/updates/' . $name);
27 file_put_contents($fspath . $filepath, $file);
28 echo "$name - $workingpath - $usedby<br>";
32 File Listed Above were successfully updated