Esempio n. 1
0
 private static function form($m_id = false)
 {
     if (!empty($m_id)) {
         CRUD::dataFetch('member', array('id' => $m_id));
         list($row) = CRUD::$data;
         foreach ($row as $field => $var) {
             switch ($field) {
                 case "gender":
                     $field = $field . '_CK' . $var;
                     $var = 'selected';
                     break;
             }
             $output['VALUE_' . strtoupper($field)] = $var;
         }
     }
     $output['VALUE_SUBJECT_OPTION'] = self::subjectOption($row['subject']);
     VIEW::assignGlobal($output);
     CRUD::args_output(true, true);
     SEO::load('contact');
     if (empty(SEO::$data["h1"])) {
         SEO::$data["h1"] = CORE::$lang["contact"];
     }
     SEO::output();
     CRUMBS::fetch('contact');
 }
Esempio n. 2
0
 function __construct()
 {
     list($args) = CORE::$args;
     self::$m_id = SESS::get('m_id');
     self::$temp = CORE::$temp_main;
     CRUMBS::fetch('feedback');
     SEO::load('feedback');
     if (empty(SEO::$data["h1"])) {
         SEO::$data["h1"] = CORE::$lang['feedback'];
     }
     SEO::output();
     switch ($args) {
         case "thankyou":
             new RESPONSE('feedback', CORE::$lang['feedbackThanks']);
             break;
         case "list":
             # 顯示反饋
             self::$temp["MAIN"] = 'ogs-feedback-list-tpl.html';
             self::row();
             break;
         case "add":
             # 執行增加反饋
             self::$temp["MAIN"] = CORE::$temp_option["MSG"];
             self::add();
             break;
         default:
             self::$temp["MAIN"] = 'ogs-feedback-tpl.html';
             break;
     }
     CORE::common_resource();
     new VIEW(CORE::$temp_option["HULL"], self::$temp, false, false);
 }
Esempio n. 3
0
 public static function notFound()
 {
     CORE::common_resource();
     SEO::load('nofound');
     SEO::output();
     VIEW::assignGlobal('SEO_H1', empty(SEO::$data['h1']) ? '404 not found' : SEO::$data['h1']);
     $temp = CORE::$temp_main;
     $temp["MAIN"] = 'ogs-fn-404-tpl.html';
     new VIEW(CORE::$temp_option["HULL"], $temp, false, false);
 }
Esempio n. 4
0
 private static function row()
 {
     if (!empty(self::$id)) {
         $rsnum = CRUD::dataFetch('intro', array('id' => self::$id, 'status' => '1', 'langtag' => CORE::$langtag));
     } else {
         $rsnum = CRUD::dataFetch('intro', array('status' => '1', 'langtag' => CORE::$langtag), false, array('sort' => CORE::$cfg["sort"]), '0,1');
     }
     if (!empty($rsnum)) {
         list($row) = CRUD::$data;
         foreach ($row as $field => $var) {
             VIEW::assignGlobal("VALUE_" . strtoupper($field), $var);
         }
         SEO::load($row["seo_id"]);
         if (empty(SEO::$data["h1"])) {
             SEO::$data["h1"] = $row["subject"];
         }
         SEO::output();
         CRUMBS::fetch('intro', $row);
         SCHEMA::make('intro', $row);
     } else {
         VIEW::newBlock("TAG_NONE");
     }
 }
Esempio n. 5
0
 private static function row()
 {
     if (!empty(self::$id)) {
         $rsnum = CRUD::dataFetch('faq', array('parent' => self::$id, 'status' => '1', 'langtag' => CORE::$langtag), false, array('sort' => CORE::$cfg["sort"]));
     } else {
         $rsnum = CRUD::dataFetch('faq', array('status' => '1', 'langtag' => CORE::$langtag), false, array('sort' => CORE::$cfg["sort"]));
     }
     if (!empty($rsnum)) {
         VIEW::newBlock("TAG_FAQ_BLOCK");
         $dataRow = CRUD::$data;
         foreach ($dataRow as $key => $row) {
             VIEW::newBlock("TAG_FAQ_LIST");
             foreach ($row as $field => $var) {
                 VIEW::assign("VALUE_" . strtoupper($field), $var);
             }
         }
     } else {
         VIEW::newBlock("TAG_NONE");
     }
     # SEO
     $parent_rsnum = CRUD::dataFetch('faq_cate', array('id' => self::$id));
     if (!empty($parent_rsnum)) {
         list($parent_row) = CRUD::$data;
         SEO::load($parent_row["seo_id"]);
         if (empty(SEO::$data["h1"])) {
             SEO::$data["h1"] = $parent_row["subject"];
         }
     } else {
         SEO::load('faq');
         if (empty(SEO::$data["h1"])) {
             SEO::$data["h1"] = CORE::$lang["faq"];
         }
     }
     SEO::output();
     CRUMBS::fetch('faq', $parent_row);
 }
Esempio n. 6
0
 private static function detail($id)
 {
     $rsnum = CRUD::dataFetch('ad', array('id' => $id));
     if (!empty($rsnum)) {
         list($row) = CRUD::$data;
         foreach ($row as $field => $var) {
             switch ($field) {
                 case "cateID":
                     VIEW::assignGlobal("VALUE_" . strtoupper($field) . "_OPTION", AD::cateSelect($var));
                     break;
                 case "status":
                     VIEW::assignGlobal("VALUE_" . strtoupper($field) . "_CK" . $var, 'selected');
                     break;
                 default:
                     VIEW::assignGlobal("VALUE_" . strtoupper($field), $var);
                     break;
             }
         }
         IMAGES::output('ad', $row["id"]);
         SEO::load($row["seo_id"]);
         SEO::output();
         $last_page = SESS::get("PAGE");
         if (!empty($last_page)) {
             VIEW::assignGlobal("VALUE_BACK_LINK", CORE::$manage . "ad/page-{$last_page}/");
         } else {
             VIEW::assignGlobal("VALUE_BACK_LINK", CORE::$manage . "ad/");
         }
     } else {
         self::$temp["MAIN"] = self::$temp_option["MSG"];
         CORE::msg(self::$lang["no_args"], CORE::$manage . 'ad/');
     }
 }
Esempio n. 7
0
 private static function detail($id)
 {
     $rsnum = CRUD::dataFetch('gallery', array('id' => $id));
     if (!empty($rsnum)) {
         list($row) = CRUD::$data;
         foreach ($row as $field => $var) {
             switch ($field) {
                 case "related":
                     GALLERY::related($var);
                     break;
                 case "parent":
                     $field = $field . '_OPTION';
                     $var = self::cate_select($var);
                     break;
                 case "status":
                     $field = $field . '_ck' . $var;
                     $var = 'selected';
                     break;
             }
             $output["VALUE_" . strtoupper($field)] = $var;
         }
         VIEW::assignGlobal($output);
         IMAGES::output('gallery', $row["id"]);
         foreach (IMAGES::$data as $images) {
             VIEW::newBlock('TAG_IMAGES_LIST');
             foreach ($images as $field => $var) {
                 $images['IMAGES_' . strtoupper($field)] = $var;
             }
             VIEW::assign($images);
         }
         SEO::load($row["seo_id"]);
         SEO::output();
         $last_page = SESS::get("PAGE");
         if (!empty($last_page)) {
             VIEW::assignGlobal("VALUE_BACK_LINK", CORE::$manage . "gallery/page-{$last_page}/");
         } else {
             VIEW::assignGlobal("VALUE_BACK_LINK", CORE::$manage . "gallery/");
         }
         parent::$langID = $row['lang_id'];
     } else {
         self::$temp["MAIN"] = self::$temp_option["MSG"];
         CORE::msg(self::$lang["no_args"], CORE::$manage . 'gallery/');
     }
 }
Esempio n. 8
0
 private static function detail($id)
 {
     $rsnum = CRUD::dataFetch('products', array('id' => $id));
     if (!empty($rsnum)) {
         list($row) = CRUD::$data;
         foreach ($row as $field => $var) {
             switch ($field) {
                 case "related":
                     PRODUCTS::related($var);
                     break;
                 case "parent":
                     VIEW::assignGlobal("VALUE_" . strtoupper($field) . "_OPTION", self::cate_select($var));
                     break;
                 case "status":
                     VIEW::assignGlobal("VALUE_" . strtoupper($field) . "_CK" . $var, 'selected');
                     break;
                 default:
                     VIEW::assignGlobal("VALUE_" . strtoupper($field), $var);
                     break;
             }
         }
         IMAGES::output('products', $row["id"]);
         SEO::load($row["seo_id"]);
         SEO::output();
         $page_args = SESS::get("PAGE");
         $sk_args = SESS::get('SK');
         if (!empty($page_args)) {
             $page = "page-{$page_args}/";
         }
         if (!empty($sk_args)) {
             $sk = "{$sk_args}/";
         }
         VIEW::assignGlobal("VALUE_BACK_LINK", CORE::$manage . "products/{$sk}{$page}");
         parent::$langID = $row['lang_id'];
     } else {
         self::$temp["MAIN"] = self::$temp_option["MSG"];
         CORE::msg(self::$lang["no_args"], CORE::$manage . 'products/');
     }
 }
Esempio n. 9
0
 private static function cate_detail($id)
 {
     $rsnum = CRUD::dataFetch('faq_cate', array('id' => $id));
     if (!empty($rsnum)) {
         list($row) = CRUD::$data;
         foreach ($row as $field => $var) {
             switch ($field) {
                 case "status":
                     VIEW::assignGlobal("VALUE_" . strtoupper($field) . "_CK" . $var, 'selected');
                     break;
                 default:
                     VIEW::assignGlobal("VALUE_" . strtoupper($field), $var);
                     break;
             }
         }
         $last_page = SESS::get("PAGE");
         if (!empty($last_page)) {
             VIEW::assignGlobal("VALUE_BACK_LINK", CORE::$manage . "faq/cate/page-{$last_page}/");
         } else {
             VIEW::assignGlobal("VALUE_BACK_LINK", CORE::$manage . "faq/cate/");
         }
         SEO::load($row["seo_id"]);
         SEO::output();
         parent::$langID = $row['lang_id'];
     } else {
         self::$temp["MAIN"] = self::$temp_option["MSG"];
         CORE::msg(self::$lang["no_args"], CORE::$manage . 'faq/cate/');
     }
 }
Esempio n. 10
0
 private static function detail()
 {
     $rsnum = CRUD::dataFetch('products', array('id' => self::$id));
     if (!empty($rsnum)) {
         list($row) = CRUD::$data;
         foreach ($row as $field => $var) {
             VIEW::assignGlobal("VALUE_" . strtoupper($field), $var);
         }
         SCHEMA::make('products_detail', $row);
         VIEW::assignGlobal("VALUE_BACK_LINK", self::dataLink(self::$cate));
         IMAGES::load('products', $row["id"]);
         foreach (IMAGES::$data as $key => $images) {
             switch ($key) {
                 case 0:
                     break;
                 case 1:
                     foreach ($images as $field => $var) {
                         VIEW::assignGlobal("IMAGE_" . strtoupper($field), $var);
                     }
                 default:
                     VIEW::newBlock("TAG_IMAGES");
                     foreach ($images as $field => $var) {
                         VIEW::assign("IMAGES_" . strtoupper($field), $var);
                     }
                     break;
             }
         }
         if (empty($row["discount"])) {
             VIEW::assignGlobal("DISCOUNT_NONE", 'style="display: none;"');
         }
         SEO::load($row["seo_id"]);
         if (empty(SEO::$data["h1"])) {
             SEO::$data["h1"] = $row["subject"];
         }
         SEO::output();
         CRUMBS::fetch('products', $row);
         while (++$i <= 99) {
             VIEW::newBlock("TAG_AMOUNT_LIST");
             VIEW::assign("VALUE_AMOUNT", $i);
         }
         PRODUCTS::related($row['related']);
     }
 }
Esempio n. 11
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);
     }
 }
Esempio n. 12
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/');
     }
 }
Esempio n. 13
0
 private static function detail()
 {
     $rsnum = CRUD::dataFetch('news', 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", self::dataLink(self::$cate));
         SCHEMA::make('news_detail', $row);
         SEO::load($row["seo_id"]);
         if (empty(SEO::$data["h1"])) {
             SEO::$data["h1"] = $row["subject"];
         }
         SEO::output();
         CRUMBS::fetch('news', $row);
     }
 }