Esempio n. 1
0
 protected function executePrepend(PHPTAL $TAL)
 {
     //DbControl::$debug = true;
     try {
         // XT admin
         if (LBoxXT::isLoggedAdmin() && count($_POST[$this->getFormGroupName()]["xt"]) > 0) {
             switch ($_POST[$this->getFormGroupName()]["xt"]["action"]) {
                 case "edit":
                     $pageEditArticlesId = LBoxConfigManagerProperties::getInstance()->getPropertyByName("ref_page_xt_admin_articles")->getContent();
                     $pageEditArticles = LBoxConfigManagerStructure::getPageById($pageEditArticlesId);
                     $this->reload($pageEditArticles->url . ":" . $_POST[$this->getFormGroupName()]["xt"]["id"]);
                     break;
                 case "delete":
                     $this->deleteArticle($_POST[$this->getFormGroupName()]["xt"]["id"]);
                     $this->reload();
                     break;
             }
         }
         $TAL->xtAdmin = LBoxXT::isLoggedAdmin();
         $pageMoreId = LBoxConfigManagerProperties::getInstance()->getPropertyByName("ref_page_articles_news")->getContent();
         $pageMore = LBoxConfigManagerStructure::getPageById($pageMoreId);
         $limit = $this->getListPaging();
         $news = new ArticlesNewsRecords(false, array("time_published" => 0), array(1, $limit));
         $news->setOutputFilterItemsClass("OutputFilterArticleNews");
         $TAL->news = $news->count() > 0 ? $news : false;
         $TAL->urlMore = $pageMore->url;
     } catch (Exception $e) {
         throw $e;
     }
 }
Esempio n. 2
0
 protected function executePrepend(PHPTAL $TAL)
 {
     try {
         $TAL->adminLogged = LBoxXT::isLoggedAdmin();
     } catch (Exception $e) {
         throw $e;
     }
 }
Esempio n. 3
0
 protected function executePrepend(PHPTAL $TAL)
 {
     //DbControl::$debug = true;
     try {
         parent::executePrepend($TAL);
         if (LBoxXT::isLoggedAdmin()) {
             $this->reloadAdminHome();
         }
     } catch (Exception $e) {
         throw $e;
     }
 }
Esempio n. 4
0
<?php

session_start();
require "../../../../../../../lBox/lib/loader.php";
try {
    if (!LBoxXT::isLoggedAdmin()) {
        throw new LBoxExceptionXT(LBoxExceptionXT::MSG_NOT_LOGGED . " acces.id=" . AccesRecord::getInstance()->id, LBoxExceptionXT::CODE_NOT_LOGGED);
    }
} catch (Exception $e) {
    echo "<hr />";
    echo "Exception code:  <font style='color:blue'>" . $e->getCode() . "</font>";
    echo "<br />";
    echo "Exception message: <font style='color:blue'>" . nl2br($e->getMessage()) . "</font>";
    /*echo "<br />";
    echo "Thrown by: '". $e->getFile() ."'";
    echo "<br />";
    echo "on line: '". $e->getLine() ."'.";
    echo "<br />";
    echo "<br />";
    echo "Stack trace:";
    echo "<br />";
    echo nl2br($e->getTraceAsString());*/
    echo "<hr />";
    die;
}
$sfd_root_path = LBOX_PATH_PROJECT;
$sfd_dir = LBoxConfigSystem::getInstance()->getParamByPath("wsw/img/path") . "/";
$sfd_dir_rel = str_replace("\\", "/", LBOX_PATH_PROJECT . $sfd_dir);