Ejemplo n.º 1
0
function content()
{
    global $pagenum, $selected, $message, $menu, $set, $langmessage, $LNEversion, $out, $prefix;
    if ($message != "") {
        $out .= "<div class=\"LNE_message\">" . $message . "</div>\n";
    }
    if ($_SESSION['adminlevel'] > 3) {
        $out .= adminmenu();
    }
    switch ($_GET['do']) {
        case "search":
            $out .= "<h2 class=\"LNE_title\">{$langmessage['66']}</h2>\n";
            $out .= search();
            break;
        case "register":
            if ($set['gzip']) {
                $out .= register();
            }
            break;
        case "addons":
            $out .= addons();
            break;
        case "create":
            $out .= create_page();
            break;
        case "database":
            $out .= query();
            break;
        case "delete":
            delete_page();
            break;
        case "edit":
            print $out;
            $out = "";
            editpage();
            break;
        case "editextra":
            print $out;
            $out = "";
            extras();
            break;
        case "editmenu":
            $out .= editmenu();
            break;
        case "login":
            $out .= loginform();
            break;
        case "plugins":
            $out .= plugins();
            break;
        case "profile":
            if ($_SESSION[$set['password']] == "1") {
                $out .= profile();
            }
            break;
        case "query":
            $out .= query();
            break;
        case "settings":
            $out .= settings();
            break;
        case "setup":
            $out .= setup();
            break;
        case "sitemap":
            $out .= showsitemap($langmessage, 0);
            break;
        case "users":
            $out .= users();
            break;
        default:
            $addons = fetch_all(dbquery("SELECT * FROM " . $prefix . "addons WHERE active=1"));
            $found = false;
            foreach ($addons as $addon) {
                if ($_GET['do'] == $addon['name'] && $_SESSION['adminlevel'] >= $addon['adminlevel']) {
                    require_once "addons/" . $addon['name'] . "/admin.php";
                    $out .= $addon['aname']();
                    $found = true;
                    break;
                }
            }
            if (!$found) {
                $result = dbquery("SELECT * FROM " . $prefix . "paginas WHERE page=\"" . $pagenum . "\"");
                if ($row = fetch_array($result)) {
                    if ($row['restricted'] != 0 && $row['restricted'] > $_SESSION['adminlevel']) {
                        $out .= restrictedpage($row['restricted']);
                    } else {
                        $contnt = html_entity_decode(stripslashes($row['content']));
                        showcontent($contnt);
                    }
                } else {
                    $result = dbquery("SELECT * FROM " . $prefix . "paginas WHERE page=\"index\"");
                    if ($row = fetch_array($result)) {
                        $contnt = html_entity_decode(stripslashes($row['content']));
                        showcontent($contnt);
                    } else {
                        $out .= "<h2>{$langmessage['116']}</h2>\n";
                    }
                }
                foreach ($addons as $addon) {
                    if (strpos($contnt, "%!\$" . $addon['name']) && $addon['header'] == 1) {
                        require_once "addons/" . $addon['name'] . "/header.php";
                    }
                }
            }
    }
}
Ejemplo n.º 2
0
<?php

if (isset($_POST['verif']) && $_POST['verif'] == 1) {
    //verif si il y a une image.
    if (tp('photoid') != '') {
        $img = tp('photoid');
    } else {
        $img = '';
    }
    model::load('page', 'editpage');
    if (!editpage(tp('titrfr'), tp('titren'), tp('titrar'), tp('contfr'), tp('conten'), tp('contar'), tp('parent'), $img, tp('id'), tp('titrimgfr'), tp('titrimgar'), tp('ximg'), tp('yimg'))) {
        exit("0");
    } else {
        exit("1");
    }
} else {
    view::load('page', 'editpage');
}
Ejemplo n.º 3
0
			if (isset($_GET['rtn'])) {
				redirect_header(ICMS_URL . base64_decode($_GET['rtn']));
			} else {
				redirect_header(ICMS_URL . $rtn);
			}
			break;

		case "clone" :
			icms_cp_header ();
			editpage($clean_page_id, TRUE);
			break;

		case "mod" :
		case "changedField" :
			icms_cp_header ();
			editpage($clean_page_id);
			break;

		case "addpage" :
			$controller = new icms_ipf_Controller($icms_page_handler);
			$controller->storeFromDefaultForm(_AM_SYSTEM_PAGES_CREATED, _AM_SYSTEM_PAGES_MODIFIED);
			break;

		case "del" :
			$controller = new icms_ipf_Controller ($icms_page_handler);
			$controller->handleObjectDeletion();
			break;

		default :
			icms_cp_header();
			$objectTable = new icms_ipf_view_Table($icms_page_handler);