Exemple #1
0
 ##############################ATTENTION!!!
 $xmlClass->setOverwrite(true);
 # add comment
 $xmlClass->add_comment(XML_CLASS_COMMENT);
 # open XML element
 $xmlClass->open_xml_element("main");
 # add XML element (Name)
 $xmlClass->add_xml_element("name", $name);
 # add XML element (MOTD)
 $xmlClass->add_xml_element("motd", $intro);
 # add XML element (Description)
 $xmlClass->add_xml_element("description", $main);
 # add XML element (Main block)
 $xmlClass->add_xml_element("MainBlock", "This is only a test text to view results of webpages parsing. Modify me!");
 # add XML element (ChangeLog)
 $xmlClass->add_xml_element("ChangeLog", "Change Log for " . $name . "\n\nLast Update " . date("D, d M Y H:i:s", $stringClass->get_current_date()) . " " . $_COOKIE['myforum'] . "\n");
 # add XML element (ToDo list)
 $xmlClass->add_xml_element("ToDo", "Modify me! (ToDo list)");
 # close XML element
 $xmlClass->close_xml_element("main", "Created on " . date("D, d M Y H:i:s", $stringClass->get_current_date()) . " by " . $_COOKIE['myforum']);
 # close XML creation process
 $xmlClass->closeXMLFile();
 #########################
 # start XML creation process (CONFIG FILE)
 $xmlClass->createXMLFile(" ", true);
 # set the Path of the file
 $xmlClass->setPath("misc/groupware/writeable/projects/shared/" . $_GET['id'] . "/config.php");
 # add comment
 $xmlClass->add_comment(XML_CLASS_COMMENT);
 # open main element
 $xmlClass->open_xml_element("config");
 function create_project($name, $category, $intro, $description, $by)
 {
     $stringClass = new string();
     $date = $stringClass->get_current_date();
 }
Exemple #3
0
        if (substr($key, 0, 5) == "__ob_") {
            if ($value == "" or $value == "scegli...") {
                echo "- Non hai compilato il campo obbligatorio <strong>{$key}</strong>, l'azione non può essere processata.<br>";
                $flag = false;
            }
        }
    }
    if ($_SESSION['add_project_confirm_ID'] != $_POST['__ob_code']) {
        echo "- Il codicem di conferma non è valido!.<br>";
        $flag = false;
    }
    if (!$flag) {
        # die if there are some errors
        die("<br>Siamo spiacenti, ma a causa di qualche errore, la tua richiesta non può essere inoltrata correttamente al server. Verifica di aver compilato tutti i campi.<br><br><a href=\"javascript:history.back()\" title=\"indietro\">Indietro</a>");
    }
    # create STRING object
    $stringClass = new string();
    # create XML object
    $xmlClass = new xml();
    # set overwrite to true
    $xmlClass->setOverWrite(false);
    # check if XML folder exists
    if (file_exists("misc/groupware/xml/" . $stringClass->get_current_date() . "/")) {
        die("E' già presente un progetto con lo stesso nome, Prova ad aggiornare la pagina...");
    } else {
        mkdir("misc/groupware/writeable/projects/shared/" . $stringClass->get_current_date() . "/");
        mkdir("misc/groupware/writeable/projects/shared/" . $stringClass->get_current_date() . "/news/");
    }
    # starting autopilot
    $xmlClass->autopilot("misc/groupware/writeable/projects/adoption/" . $stringClass->get_current_date() . ".xml", $_POST, $usersClass->get_user(), "project");
}