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


PHP view::show方法代码示例

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


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

示例1: index

 public function index($args)
 {
     $db = $this->database();
     $s = new model_section($db);
     $p = new model_page($db);
     $md = new markdown_parser();
     $rt = explode("/", $args["_url"]);
     $s->load_from_name(strlen($rt[0]) > 0 ? $rt[0] : "home");
     array_shift($rt);
     $rt = implode("/", $rt);
     $cur_url = strlen($rt) > 0 ? $args["_url"] : $s->default_page();
     $p->load_from_url($cur_url);
     $navs = MODEL_SECTION::get_sections($db);
     $subnavs = $s->get_pages();
     $tpl = new view($this->registry);
     $tpl->set("cur_url", $cur_url);
     $tpl->set("title", $p->title);
     $tpl->set("navs", $navs);
     $tpl->set("subnavs", $subnavs);
     $tpl->set("page", $s->name);
     $tpl->set("content", $p->is_markdown ? array("markdown" => $md->transform($p->content)) : array("html" => $p->content));
     $tpl->set("s_intro", $md->transform($s->introduction));
     $tpl->set("s_img", $s->image);
     $tpl->show("default");
 }
开发者ID:radiosilence,项目名称:kt-equal,代码行数:25,代码来源:index.php

示例2: upload

 /**
  * 图片上传
  */
 public function upload()
 {
     view::show(false);
     $json = array();
     $json['error'] = 0;
     $json['url'] = 'https://image.gatherup.cc/2016051515083636542_10277411847325777_1265886255.jpeg';
     echo json_encode($json);
 }
开发者ID:luozhanhong,项目名称:share,代码行数:11,代码来源:image.php

示例3: edit

 public function edit()
 {
     $controller = lib::getitem('controller');
     if (empty($controller->params[0])) {
         lib::sendto();
     } else {
         $user = new user((int) $controller->params[0]);
         echo view::show('users/edit', array('user' => $user));
     }
 }
开发者ID:jabouzi,项目名称:contacts,代码行数:10,代码来源:users.php

示例4: defaultaction

 public function defaultaction()
 {
     if (!auth::isloggedin()) {
         lib::sendto('/login');
     } else {
         $contacts = new contactscollection(lib::getitem('user'));
         $contacts->getwithdata();
         echo view::show('contacts/browse', array('contacts' => $contacts));
     }
 }
开发者ID:jabouzi,项目名称:contacts,代码行数:10,代码来源:index.php

示例5: render

 public function render($filename, $parameters, $uri = null)
 {
     if ($uri === null) {
         $uri = $this->_uri;
     }
     $view = new view();
     $view->setFilename(dirname($this->_filename) . '/' . $filename);
     $view->setUri($uri);
     $view->show($parameters);
 }
开发者ID:alexqwert,项目名称:kanon,代码行数:10,代码来源:view.php

示例6: _view

 protected function _view($filename, $parameters = array(), $uri = null)
 {
     if ($uri === null) {
         $uri = $this->rel();
     }
     $view = new view();
     //echo $filename;
     $view->setFilename($filename);
     $view->setUri($uri);
     $view->show($parameters);
     //include($filename);
 }
开发者ID:alexqwert,项目名称:kanon,代码行数:12,代码来源:controllerPrototype.php

示例7: index

 public function index($args)
 {
     $view = new view();
     $db = $this->database();
     $this->load_locale("lang");
     $g = new model_game($db);
     //		$g->assign_targets();
     $g->kill_agent("Edward");
     $view->set("games", MODEL_KILL::killboard_list());
     $view->set("page_title", L_PAGE_TITLE);
     $view->set("site_name", L_SITE_NAME);
     $view->show("home");
 }
开发者ID:kulebri,项目名称:trouble,代码行数:13,代码来源:index.php

示例8: __construct

 public function __construct($request = '')
 {
     $this->content_type = 'text/html';
     $this->error_type = 0;
     $this->succeed = TRUE;
     $request = ltrim($request, '/');
     $ext = 'cache';
     //检测环境
     if (!RUN_ENV) {
         $this->error_type = 'no_run_env';
         $this->succeed = FALSE;
     } elseif ($request === '' && WELCOME_DOC) {
         //显示欢迎页面
         view::show('welcome');
         return;
     } else {
         //检查防盗链
         $referer = isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : '';
         @($referer = parse_url($referer));
         $referer = isset($referer['host']) ? $referer['host'] : '';
         if (ALLOW_REGX && !preg_match('/' . ALLOW_REGX . '/i', $referer)) {
             $this->error_type = 'not_allowed_domain';
             $this->succeed = FALSE;
         } else {
             //匹配文件后缀
             $mime_types = array('3gp' => 'video/3gpp', 'ai' => 'application/postscript', 'aif' => 'audio/x-aiff', 'aifc' => 'audio/x-aiff', 'aiff' => 'audio/x-aiff', 'asc' => 'text/plain', 'atom' => 'application/atom+xml', 'au' => 'audio/basic', 'avi' => 'video/x-msvideo', 'bcpio' => 'application/x-bcpio', 'bin' => 'application/octet-stream', 'bmp' => 'image/bmp', 'cdf' => 'application/x-netcdf', 'cgm' => 'image/cgm', 'class' => 'application/octet-stream', 'cpio' => 'application/x-cpio', 'cpt' => 'application/mac-compactpro', 'csh' => 'application/x-csh', 'css' => 'text/css', 'dcr' => 'application/x-director', 'dif' => 'video/x-dv', 'dir' => 'application/x-director', 'djv' => 'image/vnd.djvu', 'djvu' => 'image/vnd.djvu', 'dll' => 'application/octet-stream', 'dmg' => 'application/octet-stream', 'dms' => 'application/octet-stream', 'doc' => 'application/msword', 'dtd' => 'application/xml-dtd', 'dv' => 'video/x-dv', 'dvi' => 'application/x-dvi', 'dxr' => 'application/x-director', 'eps' => 'application/postscript', 'etx' => 'text/x-setext', 'exe' => 'application/octet-stream', 'ez' => 'application/andrew-inset', 'flv' => 'video/x-flv', 'gif' => 'image/gif', 'gram' => 'application/srgs', 'grxml' => 'application/srgs+xml', 'gtar' => 'application/x-gtar', 'gz' => 'application/x-gzip', 'hdf' => 'application/x-hdf', 'hqx' => 'application/mac-binhex40', 'htm' => 'text/html', 'html' => 'text/html', 'ice' => 'x-conference/x-cooltalk', 'ico' => 'image/x-icon', 'ics' => 'text/calendar', 'ief' => 'image/ief', 'ifb' => 'text/calendar', 'iges' => 'model/iges', 'igs' => 'model/iges', 'jnlp' => 'application/x-java-jnlp-file', 'jp2' => 'image/jp2', 'jpe' => 'image/jpeg', 'jpeg' => 'image/jpeg', 'jpg' => 'image/jpeg', 'js' => 'application/x-javascript', 'kar' => 'audio/midi', 'latex' => 'application/x-latex', 'lha' => 'application/octet-stream', 'lzh' => 'application/octet-stream', 'm3u' => 'audio/x-mpegurl', 'm4a' => 'audio/mp4a-latm', 'm4p' => 'audio/mp4a-latm', 'm4u' => 'video/vnd.mpegurl', 'm4v' => 'video/x-m4v', 'mac' => 'image/x-macpaint', 'man' => 'application/x-troff-man', 'mathml' => 'application/mathml+xml', 'me' => 'application/x-troff-me', 'mesh' => 'model/mesh', 'mid' => 'audio/midi', 'midi' => 'audio/midi', 'mif' => 'application/vnd.mif', 'mov' => 'video/quicktime', 'movie' => 'video/x-sgi-movie', 'mp2' => 'audio/mpeg', 'mp3' => 'audio/mpeg', 'mp4' => 'video/mp4', 'mpe' => 'video/mpeg', 'mpeg' => 'video/mpeg', 'mpg' => 'video/mpeg', 'mpga' => 'audio/mpeg', 'ms' => 'application/x-troff-ms', 'msh' => 'model/mesh', 'mxu' => 'video/vnd.mpegurl', 'nc' => 'application/x-netcdf', 'oda' => 'application/oda', 'ogg' => 'application/ogg', 'ogv' => 'video/ogv', 'pbm' => 'image/x-portable-bitmap', 'pct' => 'image/pict', 'pdb' => 'chemical/x-pdb', 'pdf' => 'application/pdf', 'pgm' => 'image/x-portable-graymap', 'pgn' => 'application/x-chess-pgn', 'pic' => 'image/pict', 'pict' => 'image/pict', 'png' => 'image/png', 'pnm' => 'image/x-portable-anymap', 'pnt' => 'image/x-macpaint', 'pntg' => 'image/x-macpaint', 'ppm' => 'image/x-portable-pixmap', 'ppt' => 'application/vnd.ms-powerpoint', 'ps' => 'application/postscript', 'qt' => 'video/quicktime', 'qti' => 'image/x-quicktime', 'qtif' => 'image/x-quicktime', 'ra' => 'audio/x-pn-realaudio', 'ram' => 'audio/x-pn-realaudio', 'ras' => 'image/x-cmu-raster', 'rdf' => 'application/rdf+xml', 'rgb' => 'image/x-rgb', 'rm' => 'application/vnd.rn-realmedia', 'roff' => 'application/x-troff', 'rtf' => 'text/rtf', 'rtx' => 'text/richtext', 'sgm' => 'text/sgml', 'sgml' => 'text/sgml', 'sh' => 'application/x-sh', 'shar' => 'application/x-shar', 'silo' => 'model/mesh', 'sit' => 'application/x-stuffit', 'skd' => 'application/x-koan', 'skm' => 'application/x-koan', 'skp' => 'application/x-koan', 'skt' => 'application/x-koan', 'smi' => 'application/smil', 'smil' => 'application/smil', 'snd' => 'audio/basic', 'so' => 'application/octet-stream', 'spl' => 'application/x-futuresplash', 'src' => 'application/x-wais-source', 'sv4cpio' => 'application/x-sv4cpio', 'sv4crc' => 'application/x-sv4crc', 'svg' => 'image/svg+xml', 'swf' => 'application/x-shockwave-flash', 't' => 'application/x-troff', 'tar' => 'application/x-tar', 'tcl' => 'application/x-tcl', 'tex' => 'application/x-tex', 'texi' => 'application/x-texinfo', 'texinfo' => 'application/x-texinfo', 'tif' => 'image/tiff', 'tiff' => 'image/tiff', 'tr' => 'application/x-troff', 'tsv' => 'text/tab-separated-values', 'txt' => 'text/plain', 'ustar' => 'application/x-ustar', 'vcd' => 'application/x-cdlink', 'vrml' => 'model/vrml', 'vxml' => 'application/voicexml+xml', 'wav' => 'audio/x-wav', 'wbmp' => 'image/vnd.wap.wbmp', 'wbxml' => 'application/vnd.wap.wbxml', 'webm' => 'video/webm', 'wml' => 'text/vnd.wap.wml', 'wmlc' => 'application/vnd.wap.wmlc', 'wmls' => 'text/vnd.wap.wmlscript', 'wmlsc' => 'application/vnd.wap.wmlscriptc', 'wmv' => 'video/x-ms-wmv', 'wrl' => 'model/vrml', 'xbm' => 'image/x-xbitmap', 'xht' => 'application/xhtml+xml', 'xhtml' => 'application/xhtml+xml', 'xls' => 'application/vnd.ms-excel', 'xml' => 'application/xml', 'xpm' => 'image/x-xpixmap', 'xsl' => 'application/xml', 'xslt' => 'application/xslt+xml', 'xul' => 'application/vnd.mozilla.xul+xml', 'xwd' => 'image/x-xwindowdump', 'xyz' => 'chemical/x-xyz', 'zip' => 'application/zip');
             $basename = basename($request);
             $ext = strtolower(substr($basename, strrpos($basename, '.') + 1));
             if (isset($mime_types[$ext])) {
                 $this->content_type = $mime_types[$ext];
             }
             $direct = false;
             if (in_array($ext, explode('|', strtolower(DIRECT_EXT)))) {
                 $direct = true;
             }
         }
     }
     //开始处理
     $delete = false;
     if (count($purge = explode(PURGE_KEY . '/', $request, 2)) > 1) {
         $delete = true;
         $request = $purge[1];
     }
     $key = NO_KEY ? $request : md5($request) . '_' . strlen($request) . '.' . $ext;
     $this->hit = false;
     $this->handle($request, $key, $delete, $direct);
 }
开发者ID:coffiner,项目名称:Layer,代码行数:47,代码来源:controller.php

示例9: index

 public function index($args)
 {
     $db = $this->database();
     $articles = array();
     $sth = $db->prepare("\n\t\t\tSELECT\t\tid, title, body, date_added, author, publisher, date\n\t\t\tFROM\t\tarticles\n\t\t\tORDER BY\tdate_added DESC\n\t\t\tLIMIT\t\t5\n\t\t");
     $sth->execute();
     while ($article = $sth->fetch()) {
         $seo_url = new seo_url($article);
         $s = new markdown_smartypantstypographer();
         $articles[] = array("id" => $article["id"], "title" => $article["title"], "excerpt" => $s->transform(utf8_encode(substr($article["body"], 0, 200))) . "…", "seo_url" => $seo_url->url, "date_added" => date("dS M", strtotime($article["date_added"])), "author" => $article["author"], "publisher" => $article["publisher"], "date" => $article["date"]);
     }
     $tpl = new view($this->registry);
     $tpl->set("articles", $articles);
     $tpl->set("page_title", "Look At That F***ing Title");
     $tpl->set("subview", "home_body");
     $tpl->show("home");
 }
开发者ID:Huggie,项目名称:hci1,代码行数:17,代码来源:index.php

示例10: index

 public function index($args)
 {
     $db = $this->database();
     $s = new model_section($db);
     $p = new model_page($db);
     $md = new markdown_parser();
     $rt = explode("/", $args["_url"]);
     $s->load_from_name(strlen($rt[0]) > 0 ? $rt[0] : "home");
     array_shift($rt);
     $rt = implode("/", $rt);
     $cur_url = strlen($rt) > 0 ? $args["_url"] : $s->default_page();
     $p->load_from_url($cur_url);
     $navs = MODEL_SECTION::get_sections($db);
     $subnavs = $s->get_pages();
     $tpl = new view($this->registry);
     if ($args["article"]) {
         # Loading and displaying an article.
         $a = new model_article($db, $args["article"]);
         $tpl->set("content", array("markdown" => $md->transform($a->body)));
         $tpl->set("title", $a->title);
     } else {
         # Listing articles.
         switch ($args["_url"]) {
             case "projects/other.html":
                 $listed = array(8, 9, 14);
                 $subtitle = "Other";
                 break;
             default:
                 $listed = array(13, 12, 11, 10, 15, 16, 17);
                 $subtitle = "KT-EQUAL";
                 break;
         }
         $projects = array();
         $projects = MODEL_ARTICLE::get_articles($db, $listed);
         $tpl->set("include", "subviews/project_list.php");
         $tpl->set("projects", $projects);
         $tpl->set("title", $subtitle . " Projects");
     }
     $tpl->set("cur_url", $cur_url);
     $tpl->set("navs", $navs);
     $tpl->set("subnavs", $subnavs);
     $tpl->set("page", $s->name);
     $tpl->set("s_intro", $md->transform($s->introduction));
     $tpl->set("s_img", $s->image);
     $tpl->show("default");
 }
开发者ID:radiosilence,项目名称:kt-equal,代码行数:46,代码来源:projects.php

示例11: view

 public function view($args)
 {
     $template = new view($this->registry);
     $db = $this->database();
     $sth = $db->prepare("\n\t\t\tSELECT \tid, title, body, author, date, publisher\n\t\t\tFROM \tarticles\n\t\t\tWHERE\tid = :id\n\t\t\tLIMIT \t1\n\t\t");
     $sth->execute(array(":id" => $args["id"]));
     $article = $sth->fetch();
     $template->set("page_title", "Look At That F***ing Title");
     $template->set("title", utf8_encode($article["title"]));
     $p = new markdown_parser();
     $s = new markdown_smartypantstypographer();
     include SITE_PATH . DIRSEP . "definitions" . DIRSEP . "article.php";
     $body_text = $p->transform($s->transform($article["body"]));
     $article_info = sprintf(HTML_ARTICLE_INFO, $article["author"], $article["date"], $article["publisher"]);
     $template->set("info", $article_info);
     $template->set("body", utf8_encode(sprintf(HTML_ARTICLE_BODY, $body_text)));
     $template->show("home");
 }
开发者ID:radiosilence,项目名称:kt-equal,代码行数:18,代码来源:article.php

示例12: contactmethodscollection

        <div class="row"><label>Grouping:</label>
        <input name="type[<?php 
echo $view['counter'];
?>
][label]" 
            value="<?php 
echo $view['group']->label;
?>
" /></div>
        <div>
            <?php 
if ($view['group'] instanceof contactgroup) {
    $methods = new contactmethodscollection($view['group']);
    $methods->getwithdata();
    foreach ($methods as $method) {
        echo view::show('contacts/method', array('method' => $method, 'counter' => $view['counter']));
    }
}
echo view::show('contacts/method', array('method' => null, 'counter' => $view['counter']));
?>
        </div>
         
        <?php 
if ($view['type'] == 'edit') {
    echo '<a href="#" class="deletecontactgrouping">Delete this group</a>';
} else {
    echo '<a href="#" class="addcontactgrouping">Add Another Grouping</a>';
}
?>
    </div>
开发者ID:jabouzi,项目名称:contacts,代码行数:30,代码来源:group.php

示例13: show

 public static function show()
 {
     self::sendHeaders();
     view::show(self::$view);
 }
开发者ID:asafonov,项目名称:firefly,代码行数:5,代码来源:error.php

示例14: view

 public function view()
 {
     $controller = lib::getitem('controller');
     if (empty($controller->params[0])) {
         lib::sendto();
     } else {
         $params = new facadecontactinformation((int) $controller->params[0]);
         echo view::show('contacts/view', array('contact' => $params->contact, 'groups' => $params->groups, 'methods' => $params->methods));
     }
 }
开发者ID:jabouzi,项目名称:contacts,代码行数:10,代码来源:contacts.php

示例15:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> 
<html xmlns="http://www.w3.org/1999/xhtml"> 
<head> 
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<link rel="stylesheet" type="text/css" href="/assets/main.css" />
	<title>Acme Company Contact Manager</title>
    <script type="text/javascript" src="/assets/jquery-1.3.2.min.js"></script>
</head>
<body>
    <div id="header"><?php 
echo view::show('standard/header');
?>
</div>
    <div id="body">
	   <?php 
echo $view['body'];
?>
    </div>
    <div id="footer"><?php 
echo view::show('standard/footer');
?>
</div>
</body>
</html>
开发者ID:jabouzi,项目名称:contacts,代码行数:24,代码来源:shell.php


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