예제 #1
0
             //Update the directions
             $bartDirection = new BartDirection($agencyObj, $bartXmlObjBuilder->getDirections());
             $bartDirection->updateDirections();
             //print "Directions updated | ";
             //Update the stops
             $bartStop = new BartStop($agencyObj, $bartXmlObjBuilder->getStops());
             $bartStop->updateStops();
             //print "Stops updated | ";
             //Update the stop-direction map
             $bartStopDirMap = new BartStopDirMap($agencyObj);
             $bartStopDirMap->updateStopDirMap();
             //print "Stop-Dir map updated";
         }
     }
     /******************** GENERATE THE XML FILE ******************/
     generateXMLFile($agencyObj);
     //Add filename to zip file contents array
     $zipFileContents[] = Util::getBaseDirectoryPath(Util::XML_FILE) . $agencyObj->getShortTitle() . ".xml";
 }
 //Create the zip file
 $zipFileContents[] = Util::getBaseDirectoryPath(Util::XML_FILE) . "bart-platforms.xml";
 $destination = Util::getBaseDirectoryPath(Util::XML_FILE) . "data.zip";
 Util::createZip($zipFileContents, $destination, true);
 //Delete old versions
 Version::deleteOldVersions();
 $mailMessage = "Version: " . TableUpdate::getVersion();
 $mailMessage .= "\n\nThe job was executed successfully without any errors.";
 if (Version::changesPresentInCurrentVersion()) {
     $mailMessage .= "\nChanges were detected when compared with the live version.\n            Please login to the admin console for the changelog.";
 } else {
     $mailMessage .= "\nNo changes were detected when compared with the live version.";
예제 #2
0
if (!defined('IS_VALID_PHPMYFAQ_ADMIN')) {
    header('Location: http://' . $_SERVER['SERVER_NAME'] . dirname($_SERVER['SCRIPT_NAME']));
    exit;
}
?>
	<h2><?php 
print $PMF_LANG["ad_menu_export"];
?>
</h2>
<?php 
if (isset($_REQUEST["submit"])) {
    $submit = $_REQUEST["submit"];
}
if (isset($submit[0])) {
    $tree = new Category();
    generateXMLFile();
    print "<p><a href=\"../xml/phpmyfaq.xml\" target=\"_blank\">XML File okay!</a></p>";
}
if (isset($submit[1])) {
    $tree = new Category();
    generateXHTMLFile();
    print "<p><a href=\"../xml/phpmyfaq.html\" target=\"_blank\">XHTML File okay!</a></p>";
}
if (isset($submit[2])) {
    // Full PDF Export
    require PMF_ROOT_DIR . "/inc/pdf.php";
    $tree = new Category();
    $arrRubrik = array();
    $arrThema = array();
    $arrContent = array();
    $result = $db->query('SELECT ' . SQLPREFIX . 'faqdata.id AS id, ' . SQLPREFIX . 'faqdata.lang AS lang, ' . SQLPREFIX . 'faqdata.solution_id AS solution_id, ' . SQLPREFIX . 'faqcategoryrelations.category_id AS category_id, ' . SQLPREFIX . 'faqdata.thema AS thema, ' . SQLPREFIX . 'faqdata.content AS content, ' . SQLPREFIX . 'faqdata.author AS author, ' . SQLPREFIX . 'faqdata.datum AS datum FROM ' . SQLPREFIX . 'faqdata LEFT JOIN ' . SQLPREFIX . 'faqcategoryrelations ON ' . SQLPREFIX . 'faqdata.id = ' . SQLPREFIX . 'faqcategoryrelations.record_id AND ' . SQLPREFIX . 'faqdata.lang = ' . SQLPREFIX . 'faqcategoryrelations.record_lang WHERE ' . SQLPREFIX . 'faqdata.active = \'yes\' ORDER BY ' . SQLPREFIX . 'faqcategoryrelations.category_id, ' . SQLPREFIX . 'faqdata.id');