<?php

session_start();
include_once 'ressources/class.templates.inc';
include_once 'ressources/class.users.menus.inc';
include_once 'ressources/class.fetchmail.inc';
$user = new usersMenus();
if (!$user->AllowFetchMails) {
    header('location:user.index.php');
}
if (isset($_GET["LoadRules"])) {
    RULES();
    exit;
}
if (isset($_GET["ViewScript"])) {
    ViewScript();
    exit;
}
if (isset($_GET["ViewRule"])) {
    ViewRule();
    exit;
}
PAGE();
function PAGE()
{
    $page = CurrentPageName();
    $artica = new artica_general();
    if ($artica->EnableFetchmail == 0) {
        $warning = Paragraphe('warning64.png', '{service_disabled}', '{service_fetchmail_disabled_admin}', "", null, 300, 100);
    }
    $html = "\n\t<input type='hidden' value='{$_SESSION["uid"]}' id='uid'>\n\t<input type='hidden' value='{confirm_delete}' id='confirm'>\n\t<table style='width:100%'>\n\t<tr>\n\t\t<td valign='top' width=1%><img src='img/bg_fetchmail2.png'></td>\n\t\t<td valign='top' style='padding-left:20px'>{$warning}" . Paragraphe('64-plus.png', '{add_new_fetchmail_rule}', '{add_new_fetchmail_rule_text}', "javascript:add_fetchmail_rules();", null, 300, 100) . "\n\t</tr>\n\t<tr>\n\t<td colspan=2>\n\t\t<div id='fetchmail_users_datas'></div>\n\t</td>\n\t</tr>\n\t</table>\n\t\t<script>LoadAjax('fetchmail_users_datas','{$page}?LoadRules=yes');</script>\n\t\n\t";
Example #2
0
 /**
  * @return array
  * rbac
  */
 protected function getaccessRules()
 {
     $this->accessRules['Module'] = $this->router['method_modules'];
     $this->accessRules['Controller'] = $this->router['method_controller'];
     $this->accessRules['Action'] = $this->router['method_action'];
     $this->accessRules['rules'] = RULES();
     $this->accessRules['behaviors'] = $this->behaviors();
     return $this->accessRules;
 }