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


PHP template::inc方法代码示例

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


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

示例1: home

 function home()
 {
     $manager = new manager();
     $url = "?mod=index&page=_page_";
     if ($key = get($_GET, 'key')) {
         $where = util::convert($_GET['field']) . ' like "%' . util::convert($key) . '%"';
         $manager->db->where($where);
         $url = sprintf('%s&fields=%s&key=%s', $url, $_GET['field'], $key);
     }
     if ($cnt = $manager->db->count()) {
         $o = array('size' => 20);
         //每页显示的记录数
         $pages = new pages($cnt, $o);
         $sql = sprintf("select * from %s %s order by id desc", $manager->db->table, $manager->db->condition());
         $rows = $manager->db->rows($sql, $pages->start, $o['size']);
         $nav = $pages->show();
     }
     include template::inc("manager/index.php");
 }
开发者ID:robinhunan,项目名称:coolphp,代码行数:19,代码来源:manager.php

示例2:

?>
    </div>

    <div style="float:left; border: 1px solid black; padding: 3px; background-color: #F8F8F8">
    <textarea id="code" cols="120" rows="30">

<?php 
$test = "test";
echo $test;
?>

    </textarea>
    </div>

    <script type="text/javascript">
      var editor = CodeMirror.fromTextArea('code', {
        height: "350px",
        parserfile: ["parsexml.js", "parsecss.js", "tokenizejavascript.js", "parsejavascript.js",
                     "../contrib/php/js/tokenizephp.js", "../contrib/php/js/parsephp.js",
                     "../contrib/php/js/parsephphtmlmixed.js"],
        stylesheet: ["/lib/CodeMirror-0.93/css/xmlcolors.css", "/lib/CodeMirror-0.93/css/jscolors.css", "/lib/CodeMirror-0.93/css/csscolors.css", "/lib/CodeMirror-0.93/contrib/php/css/phpcolors.css"],
        path: "/lib/CodeMirror-0.93/js/",
        continuousScanning: 500,
        lineNumbers: true
      });
    </script>


<?php 
template::inc('global', 'bottom');
开发者ID:hshoghi,项目名称:cms,代码行数:30,代码来源:cb.php

示例3: array

<?php

$title = "Blog Listing";
template::inc('intranet', 'top');
?>
<div class = "has-floats">
	<div class = "float-right blog_listing">
		<div class = "content_listing">
			<input type = "button" onclick = "window.location = '/admin/blog/blogs/add-new'" value = "Add new blog"/>
<?php 
$cols = "\t\n\t\t\tname\t\t{label:\tName\t\t;}\n\t\t\tdescription\t{label:\tDescription\t;}\n                        slug            {label: Slug \t\t;}\n                        status\t\t{label: Status\t\t;}\n\t\t";
if (auth('blog_author:editor')) {
    $cols .= 'edit {}';
}
$clause = array('blog_website' => array('where' => 'blog_website.website_id=' . $website_id));
$param = array('enable_sort' => true);
$params = array("aql" => 'blog', 'clause' => $clause, "cols" => $cols, "param" => $param);
aql::grid($params);
?>
		</div>
	</div>
		<div class = "left_nav">
<?php 
include 'pages/admin/blog/left-nav/left-nav.php';
?>
	</div>
</div>
<?php 
template::inc('intranet', 'bottom');
开发者ID:hshoghi,项目名称:cms,代码行数:29,代码来源:blogs-listing.php

示例4: get_codebases

<?php

$title = 'Codebase Editor';
template::inc('skybox', 'top');
$selected_codebase = $_GET['codebase'];
$table = $_GET['table'];
$codebase_list = get_codebases();
$codebase_arr = array();
$aql = "dev_codebase\t{\n\t\t\t\t\t\t\tname\n\t\t\t\t\t\t}";
$codebase_arr = array();
$rs = aql::select($aql);
foreach ($rs as $r) {
    $codebase_arr[$r['name']] = $r['name'];
}
foreach ($codebase_list as $codebase) {
    $codebase_arr[$codebase['codebase']] = $codebase['codebase'];
}
$param = array('id' => 'codebase_name', 'name' => 'name', 'selected_value' => $selected_codebase);
snippet::dropdown($codebase_arr, $param);
?>
<br><br>
<div>
	<input type="hidden" id = "table_name" value = "<?php 
echo $table;
?>
" />
	<input type="submit" value="Save" onclick = "save_codebase()" />
</div>
<?php 
template::inc('skybox', 'bottom');
开发者ID:hshoghi,项目名称:cms,代码行数:30,代码来源:codebase-editor.php

示例5: info

 /**
  ** 掷出信息
  ** @ info : 信息内容
  ** @ url  : 重定向url
  **/
 public static function info($url = 'none', $info = '', $type = 'ok', $second = 2, $title = "提示信息")
 {
     $info = empty($info) ? '操作成功!' : (is_string($info) ? $info : json_encode($info));
     include_once template::inc('msg.html');
     exit;
 }
开发者ID:robinhunan,项目名称:coolphp,代码行数:11,代码来源:msg.php

示例6:

<?php

$blog_article_ide = IDE;
$r = aql::profile('blog_article', $blog_article_ide);
$title = $r['title'];
template::inc('website', 'top');
include 'components/blog_article/id/article.php';
template::inc('website', 'bottom');
开发者ID:hshoghi,项目名称:cms,代码行数:8,代码来源:preview.php

示例7: foreach

                //添加页
                $tr = $tr == 'tr' ? 'tr2' : 'tr';
                foreach ($_POST[$v] as $key => $val) {
                    $fields .= "<tr class='{$tr} h30'>\n<td  class='ltit'>{$_POST['field'][$key]}</td>\n<td><input name='{$key}' type='text'></td>\n</tr>\n";
                }
                $str = str_replace(array('__table__', '__ds_table__', '__fields__'), array($table, $ds_table, $fields), $str);
            } else {
                if ('edit' == $v) {
                    //编辑页
                    $tr = $tr == 'tr' ? 'tr2' : 'tr';
                    foreach ($_POST[$v] as $key => $val) {
                        $fields .= "<tr class='{$tr} h30'>\n<td  class='ltit'>{$_POST['field'][$key]}</td>\n<td><input name='{$key}' value=\"{\$row['{$key}']}\" type='text'></td>\n</tr>\n";
                    }
                    $str = str_replace(array('__table__', '__ds_table__', '__fields__'), array($table, $ds_table, $fields), $str);
                }
            }
        }
        file::save($mod, $str);
    }
}
/** 显示所有的数据表 **/
foreach ($db->query('show tables') as $row) {
    $tables[] = $row[0];
}
$table = in_array($table, $tables) ? $table : $tables[0];
/** 显示一个表中的所有字段 */
foreach ($db->query('show full COLUMNS from ' . $table) as $row) {
    $rows[] = $row;
}
include template::inc('tools/index.php');
开发者ID:robinhunan,项目名称:coolphp,代码行数:30,代码来源:index.php


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