当前位置: 首页>>代码示例>>PHP>>正文


PHP template::output方法代码示例

本文整理汇总了PHP中template::output方法的典型用法代码示例。如果您正苦于以下问题:PHP template::output方法的具体用法?PHP template::output怎么用?PHP template::output使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在template的用法示例。


在下文中一共展示了template::output方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: page

 function page()
 {
     $user = $this->f3->get("user");
     $catID = $this->f3->get("PARAMS['catID']");
     $category = models\categories::getInstance()->get($catID);
     $categories = $this->f3->get("categories");
     $c = array();
     foreach ($categories as $item) {
         $c["ID-" . $item['ID']] = $item;
     }
     $this->catparents($category, $c);
     $this->breadcrumb = array_reverse($this->breadcrumb);
     $parentIDs = array();
     foreach ($this->breadcrumb as $item) {
         $parentIDs[] = $item['ID'];
     }
     $category['parentIDs'] = $parentIDs;
     //	test_array($c);
     $items = array("suggested" => models\items::format(models\items::getInstance()->getAll("catID='{$category['ID']}' AND recommended='1'", "name ASC")), "other" => models\items::format(models\items::getInstance()->getAll("catID='{$category['ID']}' AND recommended='0'", "name ASC")));
     $relationships = array();
     if ($category['relationship']) {
         $relationships = models\categories::getInstance()->getAll("dir_categories.ID in ({$category['relationship']}) OR parentID='{$category['ID']}'");
     }
     //	test_array($relationships);
     //	test_array($category);
     //	test_array(array("breadcrumbs"=>$this->breadcrumb,"categories"=>$c));
     $tmpl = new \template("template.twig");
     $tmpl->page = array("section" => "categories", "sub_section" => $category['ID'], "template" => "list_category", "meta" => array("title" => "Directory | {$category['category']}"), "css" => "", "js" => "");
     $tmpl->breadcrumb = $this->breadcrumb;
     $tmpl->category = $category;
     $tmpl->related = $relationships;
     $tmpl->items = $items;
     $tmpl->output();
 }
开发者ID:WilliamStam,项目名称:Directory,代码行数:34,代码来源:list_category.php

示例2: show

 function show($view, $loc = null, $title = '')
 {
     $template = new template('searchmodule', $view, $loc);
     $template->assign('loc', $loc);
     $template->register_permissions(array('administrate', 'configure'), $loc);
     $template->output();
 }
开发者ID:BackupTheBerlios,项目名称:exponentva-svn,代码行数:7,代码来源:class.php

示例3: show

 function show($view, $loc = null, $title = '')
 {
     if (exponent_permissions_check('administrate', $loc) || exponent_permissions_check('create', $loc) || exponent_permissions_check('edit', $loc) || exponent_permissions_check('delete', $loc)) {
         $template = new template('HTMLTemplateModule', $view, $loc);
         $template->assign('noupload', 0);
         $template->assign('uploadError', '');
         if (!defined('SYS_FILES')) {
             include_once BASE . 'subsystems/files.php';
         }
         $directory = 'files/HTMLTemplateModule/' . $loc->src;
         if (!file_exists(BASE . $directory)) {
             $err = exponent_files_makeDirectory($directory);
             if ($err != SYS_FILES_SUCCESS) {
                 $template->assign('noupload', 1);
                 $template->assign('uploadError', $err);
             }
         }
         global $db;
         $templates = $db->selectObjects('htmltemplate');
         for ($i = 0; $i < count($templates); $i++) {
             $assocs = $db->selectObjects('htmltemplateassociation', 'template_id=' . $templates[$i]->id);
             if (count($assocs) == 1 && $assocs[0]->global == 1) {
                 $templates[$i]->global_assoc = 1;
             } else {
                 $templates[$i]->global_assoc = 0;
                 $templates[$i]->associations = $assocs;
             }
         }
         $template->assign('moduletitle', $title);
         $template->assign('templates', $templates);
         $template->register_permissions(array('administrate', 'create', 'edit', 'delete'), exponent_core_makeLocation('HTMLTemplateModule'));
         $template->output();
     }
 }
开发者ID:BackupTheBerlios,项目名称:exponentva-svn,代码行数:34,代码来源:HTMLTemplateModule.php

示例4: page

    function page()
    {
        $user = $this->f3->get("user");
        //$categories = $this->f3->get("categories");
        //$categories = models\categories::format($categories,true);
        //test_array($categories);
        $items = models\items::format(models\items::getInstance()->getAll("gps_long!='' AND gps_lat!=''"));
        $item_json = array();
        foreach ($items as $item) {
            $photo = "";
            if ($item['photo']) {
                $photo = "<img alt='' src='/thumbnail/110/90?crop=false&file=/files/{$item['photo']}' class='img-thumbnail' />";
            }
            $str = "";
            if ($item['phone']) {
                $str = $str . "<em class='dg'>Phone:</em> " . $item['phone'] . "<br>";
            }
            if ($item['website']) {
                $str = $str . "<em class='dg'>Website:</em> " . $item['website'] . "<br>";
            }
            $item_json[] = array("ID" => $item['ID'], "placeTitle" => $item['name'], "tooltip" => '<div class="scrollFix"><strong>' . $item["name"] . '</strong><br><div>
<div class="c" style="margin:10px;">' . $photo . '</div><div>' . $str . '</div></div>', "url" => "/item/{$item['ID']}/{$item['url']}", "lat" => $item['gps_lat'], "lng" => $item['gps_long']);
        }
        //	test_array($item_json);
        $tmpl = new \template("template.twig");
        $tmpl->page = array("section" => "map", "sub_section" => "map", "template" => "map", "meta" => array("title" => "Directory | Map"), "css" => "", "js" => "http://maps.google.com/maps/api/js");
        $tmpl->item_json = json_encode($item_json);
        $tmpl->output();
    }
开发者ID:WilliamStam,项目名称:Directory,代码行数:29,代码来源:map.php

示例5: show

 function show($view, $loc = null, $title = '')
 {
     $template = new template('LoginModule', $view, $loc);
     $template->assign('title', $title);
     if (exponent_sessions_loggedIn()) {
         global $user, $db;
         $template->assign('loggedin', 1);
         $template->assign('user', $user);
         // Generate display name as username if the first and last name fields are blank.
         $display_name = $user->firstname . ' ' . $user->lastname;
         if (trim($display_name) == '') {
             $display_name = $user->username;
         }
         $template->assign('displayname', $display_name);
         // Need to check for groups and whatnot
         if ($db->countObjects('groupmembership', 'member_id=' . $user->id . ' AND is_admin=1')) {
             $template->assign('is_group_admin', 1);
         } else {
             $template->assign('is_group_admin', 0);
         }
     } else {
         $template->assign('loggedin', 0);
     }
     $template->output($view);
 }
开发者ID:BackupTheBerlios,项目名称:exponentva-svn,代码行数:25,代码来源:LoginModule.php

示例6: page

 function page()
 {
     $user = $this->f3->get("user");
     $tmpl = new \template("template.twig");
     $tmpl->page = array("section" => "about", "sub_section" => "about", "template" => "about", "meta" => array("title" => "Directory | About Us"), "css" => "", "js" => "");
     $tmpl->output();
 }
开发者ID:WilliamStam,项目名称:Directory,代码行数:7,代码来源:about.php

示例7: page

 function page()
 {
     $user = $this->f3->get("user");
     $tmpl = new \template("template.twig", "app/admin/");
     $tmpl->page = array("section" => "home", "sub_section" => "home", "template" => "home", "meta" => array("title" => "Directory | Admin | Home"), "css" => "", "js" => "");
     $tmpl->output();
 }
开发者ID:WilliamStam,项目名称:Directory,代码行数:7,代码来源:home.php

示例8: page

 function page()
 {
     $user = $this->f3->get("user");
     $tmpl = new \template("template.twig", "app/admin/");
     $tmpl->page = array("section" => "items", "sub_section" => "items", "template" => "items", "meta" => array("title" => "Directory | Admin | Items"), "css" => "", "js" => "http://maps.google.com/maps/api/js");
     $tmpl->output();
 }
开发者ID:WilliamStam,项目名称:Directory,代码行数:7,代码来源:items.php

示例9: page

 function page()
 {
     $user = $this->f3->get("user");
     $tmpl = new \template("template.twig");
     $tmpl->page = array("section" => "items", "sub_section" => "items", "template" => "_items", "meta" => array("title" => "Directory | Items"), "css" => "", "js" => "");
     $tmpl->items = models\items::format(models\items::getInstance()->getAll());
     $tmpl->output();
 }
开发者ID:WilliamStam,项目名称:Directory,代码行数:8,代码来源:_items.php

示例10: page

 function page()
 {
     $user = $this->f3->get("user");
     $categories = models\categories::getInstance()->getAll("", "category ASC");
     $tmpl = new \template("template.twig", "app/admin/");
     $tmpl->page = array("section" => "categories", "sub_section" => "categories", "template" => "categories", "meta" => array("title" => "Directory | Admin | Categories"), "css" => "", "js" => "");
     $tmpl->categories = $categories;
     $tmpl->output();
 }
开发者ID:WilliamStam,项目名称:Directory,代码行数:9,代码来源:categories.php

示例11: show

 function show($view, $loc = null, $title = "")
 {
     $loc = exponent_core_makeLocation('FileManagerModule');
     global $db;
     $collections = $db->selectObjects('file_collection');
     $template = new template('FileManagerModule', $view, $loc);
     $template->assign('collections', $collections);
     $template->output();
 }
开发者ID:BackupTheBerlios,项目名称:exponentva-svn,代码行数:9,代码来源:FileManagerModule.php

示例12: page

 function page()
 {
     $user = $this->f3->get("user");
     $cfg = $this->cfg;
     $page = isset($_GET['page']) ? $_GET['page'] : '1';
     //test_array($articles);
     $tmpl = new \template("template.twig");
     $tmpl->page = array("section" => "home", "sub_section" => "home", "template" => "home", "meta" => array("title" => "Home Page"), "css" => "", "js" => "");
     $tmpl->output();
 }
开发者ID:WilliamStam,项目名称:File-Dump,代码行数:10,代码来源:home.php

示例13: template

 function send_template_mail($to, $subject, $template, $headers = null)
 {
     $this->using('template');
     $param =& $this->using('param');
     $tpl = new template();
     $template = explode('/', $template);
     $tpl->load(TM_TEMPLATES_DIR . C_TEMPLATE . '/layout/views/' . $template[0] . '/' . $template[1]);
     $tpl->set($param->get_params(), true);
     $message = $tpl->output();
     $this->send_mail($to, $subject, $message, null, $headers);
 }
开发者ID:laiello,项目名称:xiv,代码行数:11,代码来源:services.php

示例14: show

 function show($view, $loc = null, $title = '')
 {
     $ui_levels = exponent_sessions_get('uilevels');
     if (count($ui_levels)) {
         $template = new template('UISwitchermodule', $view, $loc);
         $template->assign('levels', $ui_levels);
         $default = exponent_sessions_isset('uilevel') ? exponent_sessions_get('uilevel') : max(array_keys($ui_levels));
         $template->assign('default_level', $default);
         $template->output();
     }
 }
开发者ID:BackupTheBerlios,项目名称:exponentva-svn,代码行数:11,代码来源:UISwitcherModule.php

示例15: page

 function page()
 {
     $user = $this->f3->get("user");
     $pageID = $this->f3->get("PARAMS['pageID']");
     $data = models\pages::getInstance()->get($pageID);
     //test_array($pageID);
     $tmpl = new \template("template.twig", "app/admin/");
     $tmpl->page = array("section" => "pages", "sub_section" => "page{$pageID}", "template" => "pages", "meta" => array("title" => "Directory | Admin | Pages"), "css" => "", "js" => "");
     $tmpl->data = $data;
     $tmpl->pageID = $pageID;
     $tmpl->output();
 }
开发者ID:WilliamStam,项目名称:Directory,代码行数:12,代码来源:pages.php


注:本文中的template::output方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。