Exemple #1
0
 function save_page()
 {
     $usr = user_id();
     if ($usr == 0) {
         exit('Error: not logged in.');
     }
     $usr = is_admin();
     if ($usr == false) {
         exit('Error: not logged in as admin.');
     }
     if ($_POST) {
         if ($_POST['page_id']) {
             $_POST['id'] = $_POST['page_id'];
         }
         $save = page_save($_POST);
         $save = json_encode($save);
         print $save;
         exit;
     }
 }
Exemple #2
0
 */
if (!defined('txpinterface')) {
    die('txpinterface is undefined.');
}
if ($event == 'page') {
    require_privs('page');
    bouncer($step, array('page_edit' => false, 'page_save' => true, 'page_delete' => true));
    switch (strtolower($step)) {
        case '':
            page_edit();
            break;
        case 'page_edit':
            page_edit();
            break;
        case 'page_save':
            page_save();
            break;
        case 'page_delete':
            page_delete();
            break;
        case 'page_new':
            page_new();
            break;
    }
}
/**
 * The main Page editor panel.
 *
 * @param string|array $message The activity message
 */
function page_edit($message = '')
<?php
include_once('ressources/class.users.menus.inc');
include_once ("ressources/class.templates.inc");
include_once ("ressources/class.user.inc");
include_once ("ressources/class.fetchmail.inc");
session_start();

if(isset($_GET["script"])){start_js();exit;}
if(isset($_GET["page-index"])){page_index();exit;}
if(isset($_GET["page-display"])){page_list();exit;}
if(isset($_GET["page-right-button"])){page_list_buttons();exit;}
if(isset($_GET["page-modify"])){page_modify_rule();exit;}
if(isset($_GET["fetchmail_rule_id"])){page_save();exit;}
if(isset($_GET["DeleteFetchAccount"])){page_del();exit;}
if(isset($_GET["page-fetchmail-aliases"])){page_fetchmail_aliases_index();exit;}
if(isset($_GET["page-fetchmail-aliases-list"])){echo page_fetchmail_aliases_list($_GET["page-fetchmail-aliases-list"]);exit;}
if(isset($_GET["FetchmailAddAliase"])){page_fetchmail_aliases_add();exit;}
if(isset($_GET["FetchmailDeleteAliase"])){page_fetchmail_aliases_del();exit;}


if(isset($_GET["enable-js-rule"])){page_list_js_enable();exit;}
if(isset($_GET["enable-fetch-rule"])){page_list_js_save();exit;}

if(isset($_GET["find-isp-popup"])){find_isp_popup();exit;}
if(isset($_GET["isp-choose-proto"])){find_isp_proto();exit;}
if(isset($_GET["isp-end"])){find_isp_end();exit;}


function start_js(){
	$page=CurrentPageName();
	if($_GET["uid"]){$uid=$_GET["uid"];}else{$uid=$_SESSION["uid"];}