function Ref($filename)
 {
     $this->filepath = $filename;
     if ($this->xml =& openXML($filename)) {
         $this->parse($this->xml);
     }
     $this->xmlFile = basename($filename);
 }
    $sql = "SELECT * FROM system";
    $result = mysql_query($sql) or die("Parse Error");
    $row = mysql_fetch_array($result, MYSQL_ASSOC);
}
include "../secure/session.php";
session_start();
//sessionInit();
$_SESSION['attempt'] = 0;
include "XMLGen.php";
$file = 'default.xml';
$subhandle = fopen($file, "w");
fwrite($subhandle, '');
fclose($subhandle);
$sql = "SELECT * FROM photo";
$result = mysql_query($sql);
openXML($file);
openSlideshow($file);
openOption($file);
openInteraction($file);
addValue($file, "<speed>10</speed>");
closeInteraction($file);
closeOption($file);
while ($row = mysql_fetch_array($result, MYSQL_ASSOC)) {
    addImage($file, "../match_photo/" . basename($row['path']), $row['title']);
}
closeSlideshow($file);
$sql = "SELECT * FROM system";
$result = mysql_query($sql) or die("Parse Error");
$row = mysql_fetch_array($result, MYSQL_ASSOC);
if ($row['safe_mode'] == 1) {
    header("Location: ../login.php");
Example #3
0
function get_examples_list($exstr)
{
    $xml = openXML($exstr);
    $my_cats = array();
    foreach ($xml->childNodes as $c) {
        $name = htmlspecialchars($c->getAttribute('label'));
        if ($c->childCount > 0) {
            foreach ($c->childNodes as $s) {
                if ($s->nodeType == 1) {
                    $my_cats[$name][$s->getAttribute('file')] = trim($s->firstChild->nodeValue);
                }
            }
        }
    }
    return $my_cats;
}
Example #4
0
function curated_xml($num)
{
    // open and parse curated.xml
    $xml = openXML('curated.xml');
    // get software nodes
    $softwares = $xml->getElementsByTagName('software');
    $softwares = $softwares->toArray();
    // create curated objects
    $i = 1;
    foreach ($softwares as $software) {
        $curated[] = new Curated($software);
        if ($i >= $num && $num != 'all') {
            break;
        }
        $i++;
    }
    return $curated;
}