當前位置: 首頁>>代碼示例>>PHP>>正文


PHP system::show_tpl方法代碼示例

本文整理匯總了PHP中system::show_tpl方法的典型用法代碼示例。如果您正苦於以下問題:PHP system::show_tpl方法的具體用法?PHP system::show_tpl怎麽用?PHP system::show_tpl使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在system的用法示例。


在下文中一共展示了system::show_tpl方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: indexAction

 function indexAction()
 {
     // товары
     $this->catalog_status = mysql::query_findpole('select status from menu where id=59', 'status');
     $this->catalog_inctive = dbh::get_count_status_off('catalog');
     // заказы
     $this->order_inctive = dbh::get_count_status_off('order_number');
     // отзывы
     $this->gb_status = mysql::query_findpole('select status from menu where id=8', 'status');
     $this->gb_inctive = dbh::get_count_status_off('guestbook');
     // новости
     $this->news_status = mysql::query_findpole('select status from menu where id=1', 'status');
     $this->news_inctive = dbh::get_count_status_off('news');
     // комментарии к новостям
     $this->news_gb_status = mysql::query_findpole('select status from menu where id=232', 'status');
     $this->news_gb_inctive = dbh::get_count_status_off('news_gb');
     // пользователи
     $this->users_status = mysql::query_findpole('select status from menu where id=26', 'status');
     $this->users_inctive = dbh::get_count_status_off('users');
     // контентовые разделы
     $this->content_status = mysql::query_findpole('select status from menu where id=89', 'status');
     // галерея
     $this->gallery_status = mysql::query_findpole('select status from menu where id=3', 'status');
     // голосование
     $this->voting_status = mysql::query_findpole('select status from menu where id=102', 'status');
     // настройки
     $this->config_status = mysql::query_findpole('select status from menu where id=80', 'status');
     // CEO
     $this->ceo_status = mysql::query_findpole('select status from menu where id=11', 'status');
     return system::show_tpl((array) $this, 'mainmenu/mainpage.php');
 }
開發者ID:AngelWayfarer,項目名稱:prizvanie,代碼行數:31,代碼來源:indexController.php

示例2: get_slider

 function get_slider($limit, $name_file)
 {
     $sql = 'select * from splash where status=1 order by sort limit ' . $limit;
     $result = mysql::query($sql, 0);
     // выполняем tpl
     return system::show_tpl(array('splash' => $result), $name_file);
 }
開發者ID:AngelWayfarer,項目名稱:prizvanie,代碼行數:7,代碼來源:splash.class.php

示例3: indexAction

 function indexAction()
 {
     if (isset($_POST['check'])) {
         if ($_POST['FORM']['ua'] == 'on') {
             $_POST['FORM']['ua'] = 1;
         } else {
             $_POST['FORM']['ua'] = 0;
         }
         if ($_POST['FORM']['en'] == 'on') {
             $_POST['FORM']['en'] = 1;
         } else {
             $_POST['FORM']['en'] = 0;
         }
         if ($_POST['FORM']['fr'] == 'on') {
             $_POST['FORM']['fr'] = 1;
         } else {
             $_POST['FORM']['fr'] = 0;
         }
         if ($_POST['FORM']['esp'] == 'on') {
             $_POST['FORM']['esp'] = 1;
         } else {
             $_POST['FORM']['esp'] = 0;
         }
         if ($_POST['FORM']['ger'] == 'on') {
             $_POST['FORM']['ger'] = 1;
         } else {
             $_POST['FORM']['ger'] = 0;
         }
         forms::multy_update_form($this->tablename, 1, 0);
         $this->msg = general::messages(1, v::getI18n('backend_after_save'));
     }
     $sql = "SELECT * FROM languages";
     $res = mysql::query_one($sql, 0);
     return system::show_tpl(array('obj' => $res, 'msg' => $this->msg, '_status' => isset($_POST['status']) ? $_POST['status'] : 2, 'tpl_folder' => $this->tpl_folder), $this->tpl_folder . '/index.php');
 }
開發者ID:AngelWayfarer,項目名稱:prizvanie,代碼行數:35,代碼來源:languagesController.php

示例4: get_otvet

 static function get_otvet($name_file, $id_parent)
 {
     // выбираем вопрос
     $_sql = "SELECT\n\t\t\tvoting.id,\n\t\t\tvoting.id_parent,\n\t\t\tvoting.`text`,\n\t\t\tvoting.kolvo,\n\t\t\tROUND(voting.kolvo*100/voting.summa) as summa\n\t\t\tFROM\n\t\t\t\tvoting\n\t\t\tjoin (select SUM(voting.kolvo) as summa from voting WHERE voting.status = 1 and voting.id_parent = " . intval($id_parent) . ") as voting\n\t\t\tWHERE\n\t\t\t\tvoting.status = 1 and\n\t\t\t\tvoting.id_parent = " . intval($id_parent) . "\n\t\t\torder by voting.sort\n\t\t\t";
     // выполняем запрос + при необходимости выводим сам запрос
     $result = mysql::query($_sql, 0);
     // выполняем tpl
     return system::show_tpl(array('otvet' => $result), $name_file);
 }
開發者ID:AngelWayfarer,項目名稱:prizvanie,代碼行數:9,代碼來源:voting.class.php

示例5: GetMessage

 static function GetMessage($type, $message)
 {
     /*		if ($type==1) {
     			$image='info';
     		} else {
     			$image='important';
     		}*/
     $_SESSION['GLOBAL_MESSAGE'] = system::show_tpl(array('image' => $image, 'message' => $message), '/frontend/message/GetMessage.php');
     //echo "<meta http-equiv='refresh' content='0;URL=".$_SERVER['HTTP_REFERER']."'>";
 }
開發者ID:AngelWayfarer,項目名稱:prizvanie,代碼行數:10,代碼來源:message.class.php

示例6: addAction

 /**
  * добавляем новый материал
  */
 function addAction()
 {
     $this->table_name = $_GET['tablename'];
     if ($_POST) {
         // проверяем на checkbox
         forms::check_box(array('status'));
         // записываем в базу
         forms::multy_insert_form($this->table_name, 0);
         $this->msg = general::messages(1, v::getI18n('backend_after_save'));
     }
     return system::show_tpl(array('msg' => $this->msg, 'tpl_folder' => $this->tpl_folder), $this->tpl_folder . '/add.php');
 }
開發者ID:AngelWayfarer,項目名稱:prizvanie,代碼行數:15,代碼來源:onelevelController.php

示例7: editAction

 /**
  * редактирование настроек
  */
 function editAction()
 {
     if ($_POST) {
         // записываем в базу
         forms::multy_update_form_all_records($this->tablename, 'zna', 0);
         $this->msg = general::messages(1, v::getI18n('backend_after_save'));
     }
     // строим запрос
     $_sql = 'SELECT * FROM ' . $this->tablename . ' where status=1 order by sort';
     // выполняем запрос + при необходимости выводим сам запрос
     $result = mysql::query($_sql, 0);
     return system::show_tpl(array('result' => $result, 'msg' => $this->msg, 'tpl_folder' => $this->tpl_folder), $this->tpl_folder . '/edit.php');
 }
開發者ID:AngelWayfarer,項目名稱:prizvanie,代碼行數:16,代碼來源:configController.php

示例8: _post

 function _post($response)
 {
     include_once "../main.php";
     // ищем группы меню и проверяем на СуперАдмина
     if (general::sadmin()) {
         $_sql = "select * from menu where id_parent=0 and status=1 order by zindex";
     } else {
         $_sql = "select * from menu where id_parent=0 and status=1 and adm!=1 order by zindex";
     }
     $result = mysql::query($_sql, 0);
     $this->menu = system::show_tpl(array('result' => $result), 'mainmenu/menu.php');
     $this->center_block = $response;
     echo system::show_tpl((array) $this, $this->layout);
 }
開發者ID:AngelWayfarer,項目名稱:prizvanie,代碼行數:14,代碼來源:Controller.class.php

示例9: editAction

 /**
  * редактируем материал
  */
 function editAction()
 {
     if ($_POST) {
         // записываем в базу
         forms::multy_update_form($this->tablename, $_POST['id'], 0);
         $this->msg = general::messages(1, v::getI18n('backend_after_save'));
         $_sql = 'SELECT * FROM ' . $this->tablename . ' where id=' . $_POST['id'];
     } else {
         $_sql = 'SELECT * FROM ' . $this->tablename . ' where id=' . $_GET['id'];
     }
     // выполняем запрос + при необходимости выводим сам запрос
     $result = mysql::query_one($_sql, 0);
     return system::show_tpl(array('obj' => $result, 'msg' => $this->msg, 'tpl_folder' => $this->tpl_folder), $this->tpl_folder . '/edit.php');
 }
開發者ID:AngelWayfarer,項目名稱:prizvanie,代碼行數:17,代碼來源:seoController.php

示例10: add_answerAction

 /**
  * add new podrazdel
  */
 function add_answerAction()
 {
     if ($_POST) {
         // проверяем на checkbox
         forms::check_box(array('status'));
         // записываем в базу
         forms::multy_insert_form($this->tablename, 0);
         $this->msg = general::messages(1, v::getI18n('backend_after_save'));
         $_GET['id_parent'] = $_POST['FORM']['id_parent'];
     }
     // выбираем разделы у которых могут быть подразделы
     $_sql = 'SELECT * FROM ' . $this->tablename . ' where id=' . $_GET['id_parent'];
     $select = mysql::query($_sql, 0);
     return system::show_tpl(array('select' => $select, 'msg' => $this->msg, 'tpl_folder' => $this->tpl_folder), $this->tpl_folder . '/add_answer.php');
 }
開發者ID:AngelWayfarer,項目名稱:prizvanie,代碼行數:18,代碼來源:votingController.php

示例11: addAction

 /**
  * добавляем новый материал
  */
 function addAction()
 {
     global $_sklad;
     if ($_POST) {
         // проверяем на checkbox
         forms::check_box(array('status'));
         //for($i=0; $i<50; $i++) {
         // записываем в базу
         forms::multy_insert_form($this->tablename, 0);
         $this->msg = general::messages(1, v::getI18n('backend_after_save'));
         //}
     }
     // строим запрос
     $_sql = 'SELECT * FROM ' . $this->tablename . ' where id>0 order by sort desc';
     // выполняем запрос + при необходимости выводим сам запрос
     $select = mysql::query($_sql, 0);
     return system::show_tpl(array('city' => dbh::get_city(), 'msg' => $this->msg, 'tpl_folder' => $this->tpl_folder), $this->tpl_folder . '/add.php');
 }
開發者ID:AngelWayfarer,項目名稱:prizvanie,代碼行數:21,代碼來源:deliverController.php

示例12: get_guestbook_first_page

    /**
     * 	get guestbook first page
     *	@param  int		$limit 		- count of news for return
     * 			text	$name_file 	- name of tamplate (plus path '/tpl/....') 
     */
    static function get_guestbook_first_page($name_file, $limit = false)
    {
        $__limit = '';
        if ($limit) {
            $__limit = 'limit ' . $limit;
        }
        $_sql = 'SELECT *
					FROM guestbook
					WHERE status=1 
					order by rand() ' . $__limit;
        // выполняем запрос + при необходимости выводим сам запрос
        $result = mysql::query($_sql, 0);
        if ($result) {
            return system::show_tpl(array('gallery' => $result), $name_file);
        } else {
            return '';
        }
    }
開發者ID:AngelWayfarer,項目名稱:prizvanie,代碼行數:23,代碼來源:guestbook.class.php

示例13: get_gallery_first_page

    /**
     * 	get gallery first page
     *	@param  int		$limit 		- count of news for return
     * 			text	$name_file 	- name of tamplate (plus path '/tpl/....') 
     */
    static function get_gallery_first_page($name_file, $limit = false)
    {
        $__limit = '';
        if ($limit) {
            $__limit = 'limit ' . $limit;
        }
        $_sql = 'SELECT gallery.*, gallery_grupa.url 
					FROM gallery, gallery_grupa
					WHERE gallery.id_parent=gallery_grupa.id and gallery.status=1 and gallery.firstpage=1 
					order by rand() ' . $__limit;
        // выполняем запрос + при необходимости выводим сам запрос
        $result = mysql::query($_sql, 0);
        if ($result) {
            return system::show_tpl(array('gallery' => $result), $name_file);
        } else {
            return '';
        }
    }
開發者ID:AngelWayfarer,項目名稱:prizvanie,代碼行數:23,代碼來源:gallery.class.php

示例14: get_content

function get_content($action)
{
    $lang = '_' . $_GET['lang'];
    // выбираем родителя
    // запрос
    $_sql = 'SELECT * FROM content where status=1 and action="' . $action . '"';
    // выполняем запрос + при необходимости выводим сам запрос
    $parent = mysql::query_one($_sql, 0);
    // выбираем детей
    $_sql = "select name_" . $_GET['lang'] . ", action from content where id_parent=" . $parent->id . " order by sort";
    // выполняем запрос + при необходимости выводим сам запрос
    $child = mysql::query($_sql, 0);
    // выбираем файлы загруженные к этому разделу
    $_sql_files = 'SELECT * FROM files where id_content=' . $parent->id . ' order by id';
    $_files = mysql::query($_sql_files, 0);
    // выполняем tpl
    return system::show_tpl(array('parent' => $parent, 'child' => $child, 'gallery_grupa' => $gallery_grupa, '_files' => $_files), '/frontend/content/index.php');
}
開發者ID:AngelWayfarer,項目名稱:prizvanie,代碼行數:18,代碼來源:content.class.php

示例15: addAction

 /**
  * редактируем выбранный материал
  */
 function addAction()
 {
     if ($_POST) {
         //  Код загрузки песни
         if (is_uploaded_file($_FILES["file"]["tmp_name"])) {
             $mp3 = end(explode('.', $_FILES['file']['name']));
             if ($mp3 == 'mp3' or $mp3 == 'ogg') {
                 forms::check_box(array('status'));
                 forms::multy_insert_form($this->tablename, 0);
                 copy($_FILES['file']['tmp_name'], HOST . AUDIO_PATH . '/' . mysql_insert_id() . '.mp3');
                 $this->msg = general::messages(1, v::getI18n('backend_after_save'));
             } else {
                 $this->msg = general::messages(1, v::getI18n('backend_after_save_file'));
             }
         }
     }
     return system::show_tpl(array('obj' => $result, 'msg' => $this->msg, 'tpl_folder' => $this->tpl_folder), $this->tpl_folder . '/add.php');
 }
開發者ID:AngelWayfarer,項目名稱:prizvanie,代碼行數:21,代碼來源:audioplayerController.php


注:本文中的system::show_tpl方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。