コード例 #1
0
ファイル: MImages.php プロジェクト: elijahGraff/stoma-dental
 private function renderImagesList()
 {
     G::addToRender("forms/admin_copy_image_form.php", BLOCK_PRE_CONTENT, CODE);
     G::addToRender("admin/mimages_images_table.php", BLOCK_PRE_CONTENT, CODE);
     //G::addToRender("forms/admin_product_edit_form.php", BLOCK_CONTENT, CODE);
     G::addToRender("forms/admin_upload_image_form.php", BLOCK_CONTENT, CODE);
 }
コード例 #2
0
 public function init()
 {
     // prerender visual (overtop) block
     G::addToRender("blocks/overtop.php", BLOCK_OVERTOP, CODE);
     // required CSS
     $this->requiredCSSFiles = array();
     $this->requiredCSSFiles[] = CSS_ADMIN_FILE;
     $this->requiredCSSFiles[] = "cropper.css";
     // init MODULE
     $this->initModule();
     // required JS
     $this->requiredJSFiles = array();
     if ($this->getCurrent()) {
         $filenames = $this->getCurrent()->getRequiredJSFilenames();
         foreach ($filenames as $filename) {
             if (file_exists($_SERVER["DOCUMENT_ROOT"] . PATH_SCRIPTS . $filename)) {
                 $this->requiredJSFiles[] = $filename;
             }
         }
     }
 }
コード例 #3
0
ファイル: MCatalog.php プロジェクト: elijahGraff/stoma-dental
 private function renderProductsList()
 {
     G::addToRender("admin/mcatalog_products_table.php", BLOCK_PRE_CONTENT, CODE);
     G::addToRender("forms/admin_product_edit_form.php", BLOCK_CONTENT, CODE);
     G::addToRender("admin/admin_product_preview.php", BLOCK_SIDEBAR_LEFT, CODE);
 }
コード例 #4
0
ファイル: PageData.php プロジェクト: elijahGraff/stoma-dental
 public function load()
 {
     $result = $this->loadPageData();
     // page not found
     if (!$result) {
         # if ajax return error
         if (G::$dataType == G::DATATYPE_AJAX) {
             G::fatalError("Page '" . $this->getAddress() . "' not found!");
         }
         # index not found
         if ($_SESSION["current_page"] == PAGE_INDEX) {
             G::fatalError("INDEX NOT FOUND :: " . DATABASE_ERROR_MESSAGE);
         }
         # 404 not found
         if ($_SESSION["current_page"] == PAGE_PAGE404) {
             $this->redirect(PAGE_INDEX);
             exit;
         }
         # regular page not found
         $this->redirect(PAGE_PAGE404);
         exit;
     }
     // USER have access?
     if (!G::$user->isOrHigher($this->data["access"])) {
         if (G::$dataType == G::DATATYPE_AJAX) {
             G::fatalError("Access denied!");
         } else {
             // MAy NOT REDIRECT BUY RELOAD A_D!!!!!!!!!!!!!!!!!!!!!!!!!!
             $this->redirect(PAGE_ACCESS_DENIED);
             exit;
         }
     }
     // SPEC access
     if (G::$user->isOrHigher(U_MODERATOR)) {
         $this->modulesManager->init();
     }
     /* FINALIZE load ---------------------- */
     # content
     if ($this->getAddress("type") != P_TYPE_CATALOGUE && !empty($this->data["content"])) {
         $class = "content-white-back";
         if ($this->getAddress("type") == P_TYPE_ARTICLE) {
             $class = "content-white-back-article";
         }
         G::addToRender("<div class='{$class}'>", BLOCK_CONTENT);
         G::addToRender($this->data["content"], BLOCK_CONTENT);
         G::addToRender("<p style='clear:both;'></p>", BLOCK_CONTENT);
         G::addToRender("</div>", BLOCK_CONTENT);
     }
     G::addToRender(META_FILE, HEAD, CODE);
     $this->renderMeta();
     # css
     $this->renderCSS();
     # js
     $this->renderJS();
 }
コード例 #5
0
ファイル: Main.php プロジェクト: elijahGraff/stoma-dental
// User data (auth) ---------------------------------------------------------------
G::$user = new UserData();
G::$user->loadFromCookies();
// localization -------------------------------------------------------------------
G::$language = new Language();
G::$language->setLanguage(G::$user->languageId ? G::$user->languageId : G::$pageData->getSetting("default_language_id"));
// plug in ADMIN MODULES ----------------------------------------------------------
if (G::$user->isOrHigher(U_MODERATOR)) {
    include_once ROOT . PATH_MODULES . "config.php";
}
// init page render ---------------------------------------------------------------
G::initPageRender();
G::addToRender("<div class=\"overtop-block\">", BLOCK_OVERTOP);
// load page data -----------------------------------------------------------------
G::$pageData->load();
// ------- HEAD --------------------
//
// ------ OVERTOP ------------------
G::addToRender("</div>", BLOCK_OVERTOP);
//
// ------ HEADER ------------------
G::addToRender("blocks/header_top_menu.php", BLOCK_TOP_MENU, CODE);
G::addToRender("blocks/header_search_block.php", BLOCK_SEARCH, CODE);
G::addToRender("blocks/header_middle_menu.php", BLOCK_MIDDLE_MENU, CODE);
#G::addToRender("blocks/header_auth_and_cart.php", BLOCK_AUTH, CODE);
G::addToRender("blocks/header_s_cart.php", BLOCK_SCART, CODE);
G::addToRender("blocks/carousel.php", BLOCK_CAROUSEL, CODE);
// ------ FOOTER -----------------
G::addToRender("blocks/footer.php", BLOCK_FOOTER, CODE);
#addToRender("external/pluso.php", BLOCK_FOOTER, CODE);
//
コード例 #6
0
ファイル: MPages.php プロジェクト: elijahGraff/stoma-dental
 private function renderLocalMenu()
 {
     G::addToRender("admin/mpages_tabs.php", BLOCK_CONTENT, CODE);
 }