Example #1
0
<?php

require_once "../../config.inc.php";
require "sitemap.php";
$auth = new auth("GOOGLESITEMAP");
$page = new page("Google Sitemaps");
$variations = createDBCArray("variations", "VARIATION_ID", "1");
if (!isset($go)) {
    $go = "start";
}
$form = new CommitForm($lang->get("udgoogles", 'Update Google Sitemaps'));
$updateHandler = new ActionHandler("updategs");
$updateHandler->addFNCAction("updateSitemap");
$form->addCheck("updategs", $lang->get("startgoogles", 'Update the Google Sitemap XML to: ') . $c["host"] . $c["livedocroot"] . 'sitemap.xml', $updateHandler);
$page->add($form);
$page->draw();
$db->close();
/**
 *  Creates the new sitemap.xml
 */
function updateSitemap()
{
    global $c;
    // Create sitemap
    $map = new GoogleSiteMap();
    // Get the startnode of the live website;
    $startNode = translateState(0, 10);
    // Is there a live-website?
    if (strlen($startNode) > 0) {
        addWebsite($startNode, $map);
        $map->CloseMap();
Example #2
0
if ($auth->checkAccessToFunction("CHANNEL_LAUNCH")) {
    $form->buttonbar->add("action", $lang->get("launch"));
    $form->add(new Hidden("action", ""));
    if (value("action") == $lang->get("launch")) {
        launchChannel($oid);
        if ($errors == "") {
            $form->addToTopText($lang->get("chnlaunched", "The channel was launched successfully."));
            $form->topicon = "ii_success.gif";
        } else {
            $form->addToTopText($lang->get("chnlaunchederr", "An error occured while launching the channel."));
            $form->topicon = "ii_error.gif";
        }
        $page_action = "UPDATE";
        $go = "update";
        $processing = "no";
        $page_state = "start";
    }
}
$form->add(new TextInput($lang->get("name"), "channels", "NAME", $cond, "type:text,width:200,size:64", "MANDATORY&UNIQUE"));
if ($page_action != "INSERT") {
    $updateHandler = new ActionHandler("UPDATE");
    $updateHandler->addFNCAction("syncSPMVariations");
    $form->registerActionHandler($updateHandler);
    $members = createNameValueArrayEx("cluster_templates", "NAME", "CLT_ID", "CLT_TYPE_ID=1 AND DELETED=0 AND VERSION=0");
    $form->add(new SelectMultiple2Input($lang->get("spm_variations"), "sitepage_variations", "VARIATION_ID", "SPM_ID=" . $oid, "variations", "NAME", "VARIATION_ID", "DELETED=0"));
    $form->add(new SelectMultipleInputPos($lang->get("clt_select", "Select cluster templates"), $members, "channel_cluster_templates", "CLT_ID", "CHID", $cond, "cluster_templates", "CLT_ID", "NAME", "standardlight", 2));
}
$page->addMenu($filtermenu);
$page->add($form);
$page->drawAndForward("modules/channels/channels.php?sid={$sid}&oid=<oid>&go=update");
echo $errors;
Example #3
0
	$folderHandler->addDBAction("DELETE FROM categories WHERE DELETED=1");
	$form->addCheck("folders", $lang->get("purge_folder"), $folderHandler);

	$variationHandler = new ActionHandler("variations");
	$variationHandler->addFNCAction("purgeVariations");
	$form->addCheck("variations", $lang->get("purge_var"), $variationHandler);

	$contentHandler = new ActionHandler("content");
	$contentHandler->addFNCAction("purgeContent");
	$form->addCheck("content", $lang->get("purge_content"), $contentHandler);

	$clusterHandler = new ActionHandler("cluster");
	$clusterHandler->addFNCAction("purgeCluster");
	$form->addCheck("cluster", $lang->get("purge_cluster"), $clusterHandler);

	$metaHandler = new ActionHandler("meta");
	$metaHandler->addFNCAction("purgeMeta");
	$form->addCheck("meta", $lang->get("purge_meta"), $metaHandler);

	$cltHandler = new ActionHandler("clt");
	$cltHandler->addFNCAction("purgeClusterTemplates");
	$form->addCheck("clt", $lang->get("purge_clt"), $cltHandler);

	$spmHandler = new ActionHandler("spm");
	$spmHandler->addFNCAction("purgeSitepages");
	$form->addCheck("spm", $lang->get("purge_pages"), $spmHandler);
	
	$page->add($form);
	$page->draw();
	$db->close();
?>
	//// ACL Check ////
	

	$go = value("go");

	if ($go == "0")
		$go = "start";

	$form = new CommitForm("Destroy Tree");

	$pageHandler = new ActionHandler("destroypages");
	$pageHandler->addFNCAction("destroyTree");
	$form->addCheck("destroypages", $lang->get("destroy_tree", "Destroy Tree"), $pageHandler);

	$clusterHandler = new ActionHandler("destroycluster");
	$clusterHandler->addFNCAction("destroyTree");
	$form->addCheck("destroycluster", $lang->get("destroy_exclusive_content", "Destroy exclusive content"), $clusterHandler);
	$form->backpage="modules/sitepages/sitepagebrowser.php?sid=".$sid;
	$form->add(new Hidden("del", value("del")));
	$form->add(new Hidden("sid", $sid));
	$form->add(new LinkLabel("lbl", $lang->get("back_sp", "Back to Website").">>", "modules/sitepages/sitepagebrowser.php?sid=".$sid, "_self", "informationheader", 2)); 
	$destroyexecuted = false;

	$page->add($form);
	$page->draw();
	echo $errors;

	function destroyTree() {
		global $destroyexecuted, $form, $db;

		$variations = createDBCArray("variations", "VARIATION_ID", "1");