Пример #1
0
 function __construct($end_switch = false)
 {
     CORE::summon(__FILE__);
     if ($end_switch) {
         self::$endClass = __CLASS__ . "_BACKEND";
     } else {
         self::$endClass = __CLASS__ . "_FRONTEND";
     }
     new self::$endClass();
 }
Пример #2
0
 private static function detail()
 {
     $rsnum = CRUD::dataFetch('blog', array('id' => self::$id));
     if (!empty($rsnum)) {
         list($row) = CRUD::$data;
         foreach ($row as $field => $var) {
             VIEW::assignGlobal("VALUE_" . strtoupper($field), $var);
         }
         VIEW::assignGlobal("VALUE_BACK_LINK", CORE::$root . 'blog/');
         SEO::load($row["seo_id"]);
         if (empty(SEO::$data["h1"])) {
             SEO::$data["h1"] = $row["subject"];
         }
         SEO::output();
         CRUMBS::fetch('blog', $row);
         MESSAGE::$dataID = $row['id'];
         MESSAGE::$func = 'blog';
         new MESSAGE();
         VIEW::assignGlobal('TAG_MESSAGE_BLOCK', MESSAGE::$output);
         SCHEMA::make('blog_detail', $row);
     }
 }
Пример #3
0
 private static function detail()
 {
     $rsnum = CRUD::dataFetch('gallery', array('id' => self::$id));
     if (!empty($rsnum)) {
         list($row) = CRUD::$data;
         foreach ($row as $field => $var) {
             switch ($field) {
                 case "dirpath":
                     #$images = self::dirLoad($var);
                     #continue;
                     break;
             }
             $output["VALUE_" . strtoupper($field)] = $var;
         }
         IMAGES::load('gallery', $row['id']);
         if (is_array(IMAGES::$data)) {
             foreach (IMAGES::$data as $images) {
                 VIEW::newBlock('TAG_GALLERY_LIST');
                 foreach ($images as $field => $var) {
                     $imgOutput['IMAGE_' . strtoupper($field)] = $var;
                 }
                 VIEW::assign($imgOutput);
             }
         }
         $output['VALUE_BACK_LINK'] = self::dataLink(self::$cate);
         VIEW::assignGlobal($output);
         SEO::load($row["seo_id"]);
         if (empty(SEO::$data["h1"])) {
             SEO::$data["h1"] = $row["subject"];
         }
         SEO::output();
         CRUMBS::fetch('gallery', $row);
         self::other($row['id']);
         MESSAGE::$func = 'gallery';
         MESSAGE::$dataID = $row['id'];
         new MESSAGE();
         VIEW::assignGlobal("TAG_MESSAGE_BLOCK", MESSAGE::$output);
         GALLERY::related($row['related']);
     } else {
         header('location: ' . CORE::$root . 'gallery/');
     }
 }