本文整理汇总了PHP中render_template函数的典型用法代码示例。如果您正苦于以下问题:PHP render_template函数的具体用法?PHP render_template怎么用?PHP render_template使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了render_template函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: list_action
function list_action()
{
$postsModel = new PostsModel();
$posts = $postsModel->get_all_posts();
$html = render_template('view/template/list.php', array('posts' => $posts));
return $html;
//require "view/template/list.php";
}
示例2: photo_del
public static function photo_del()
{
$photoId = empty($_GET['photoId']) ? "" : $_GET['photoId'];
mod_index::delPhoto($photoId);
$rs = mod_index::getPhoto();
render_template("photo.php", array("photo_list" => $rs));
}
示例3: update_action
function update_action()
{
update_row();
$rows = get_all_rows();
$html = render_template("view/admin.php", array('rows' => $rows));
return $html;
}
示例4: edit_action
function edit_action($id)
{
edit_post($id);
$posts = get_all_posts();
$html = render_template('View/Templates/admin.php', array('posts' => $posts));
return $html;
}
示例5: add_page
public static function add_page()
{
$courseId = $_GET['snavId'];
$navId = $_GET['navId'];
$type = $_GET['type'];
render_template("student_add.php", array("navId" => $navId, "snavId" => $courseId, "type" => $type));
}
示例6: update_action
function update_action($id)
{
update_post($id);
$posts = get_all_posts();
$html = render_template("view/templates/admin.php", array('posts' => $posts));
return new Response($html);
}
示例7: template_article
function template_article($article, $single = false)
{
global $context;
if (isset($context['tportal']['article_expired'])) {
template_notpublished();
}
render_template(article_renders(!empty($article['category_opts']['catlayout']) ? $article['category_opts']['catlayout'] : 1, true, true));
}
示例8: delJoinus
public static function delJoinus()
{
$navId = $_GET['navId'];
$snavId = $_GET['snavId'];
$id = $_GET['joinusId'];
mod_joinus::delJoinus($id);
render_template("joinus.php", array("navId" => $navId, "snavId" => $snavId));
}
示例9: delAdvice
public static function delAdvice()
{
$navId = $_GET['navId'];
$snavId = $_GET['snavId'];
$id = $_GET['adviceId'];
mod_advice::delAdvice($id);
render_template("buy.php", array("navId" => $navId, "snavId" => $snavId));
}
示例10: index
public static function index()
{
$courseId = $_GET['snavId'];
$navId = $_GET['navId'];
$courseId = $_GET['snavId'];
$content = mod_course::getOne($courseId);
render_template("course.php", array("navId" => $navId, "snavId" => $courseId, "content" => $content));
}
示例11: delBuy
public static function delBuy()
{
$navId = $_GET['navId'];
$snavId = $_GET['snavId'];
$id = $_GET['buyId'];
mod_buy::delBuy($id);
render_template("buy.php", array("navId" => $navId, "snavId" => $snavId));
}
示例12: render_view
function render_view($name, $layout = 'default')
{
ob_start();
global $current_view;
$current_view = $name;
render_template("layouts/{$layout}");
ob_flush();
}
示例13: delete_action
function delete_action($id)
{
$postsModel = new PostsModel();
$postsModel->delete_post($id);
$posts = $postsModel->get_all_posts();
$html = render_template('view/template/admin.php', array('posts' => $posts));
return $html;
}
示例14: show_action
function show_action($id)
{
//$id=$_REQUEST['id'];
//$sql="SELECT * FROM `pages` WHERE `id`=$id";
//$row=get_all_rows($sql);
$rows = get_row($id);
$html = render_template("View/show.php", array('rows' => $rows));
return $html;
}
示例15: admin_action
function admin_action()
{
if (isset($_POST['submit'])) {
add_post();
}
$posts = get_all_posts();
$html = render_template('view/templates/admin.php', array('posts' => $posts));
return $html;
//require "view/templates/admin.php";
}