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


PHP view::output方法代码示例

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


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

示例1: editComment

 public function editComment()
 {
     $manageCommentsModel = new ManageCommentsModel();
     if (!isset($_GET['id']) && !isset($_GET['meme_id'])) {
         $id = intval($_POST['id']);
         $meme_id = intval($_POST['meme_id']);
         $model['id'] = $id;
         $model['content'] = isset($_POST['content']) ? $_POST['content'] : '';
         $manageCommentsModel->UpdateItem($model);
         header('location: ManageComments.php?action=listComments&meme_id=' . $meme_id);
     }
     $id = intval($_GET['id']);
     $meme_id = intval($_GET['meme_id']);
     $model = $manageCommentsModel->GetItemById($id);
     $view = new view('manage_comments/editComment');
     $view->assign('model', $model);
     $template = new View('common/administration');
     $include = str_replace('<!--[[content]]-->', $view->output(), $template->output());
     echo $include;
 }
开发者ID:nikolaybyivanov,项目名称:PHP,代码行数:20,代码来源:ManageComments.php

示例2: editUser

 public function editUser()
 {
     $manageUsersModel = new ManageUsersModel();
     $id = intval($_GET['id']);
     if ($id > 0) {
         $user = $manageUsersModel->GetItemById($id);
         $model['id'] = $id;
         $model['username'] = $user['username'];
         $model['password'] = $user['password'];
         $model['firstname'] = $user['firstname'];
         $model['lastname'] = $user['lastname'];
         $model['email'] = $user['email'];
     } else {
         $model = array('id' => $id, 'username' => '', 'firstname' => '', 'lastname' => '', 'email' => '');
     }
     $view = new view('manage_users/edit_user');
     $view->assign('model', $model);
     $template = new View('common/site');
     $include = str_replace('<!--[[content]]-->', $view->output(), $template->output());
     echo $include;
 }
开发者ID:nikolaybyivanov,项目名称:PHP,代码行数:21,代码来源:ManageUsers.php

示例3: die

if (file_exists(BASEDIR . $uri) and strpos(array_pop($uri_array), ".") !== FALSE) {
    include BASEDIR . $uri;
    exit;
}
//open link to database server and select right database
$link_identifier = mysql_connect(SERVER, USER, PASS) or die("Keine Verbindung zur Datenbank!!!!");
mysql_select_db(DATABASE, $link_identifier);
//check, what's the request for...
switch ($uri_array[0]) {
    case "suche":
        require_once "search/search.php";
        if (isset($_GET)) {
            $module = new search($link_identifier);
            $module->perform_search();
        }
        break;
    default:
        require_once "articles/view.php";
        $module = new view($uri_array, $link_identifier);
        $module->generate();
        break;
}
//parse the navigational contents
include_once "parser/templ_parser.php";
$parser = new templ_parser("nav.html");
$nav = $parser->parse();
//main parse, include of content
$parser = new templ_parser("main.html");
$output = $parser->parse(array("navigation" => $nav, "content" => $module->output()));
//print to page
print $output;
开发者ID:BackupTheBerlios,项目名称:mr-magister-svn,代码行数:31,代码来源:index.php

示例4: showMeme

 public function showMeme()
 {
     $manageMemesModel = new ManageMemesModel();
     $id = intval($_GET['id']);
     $model['meme'] = $manageMemesModel->GetMeme($id);
     $model['comments'] = $manageMemesModel->GetMemeComments($id);
     $model['likes'] = $manageMemesModel->GetMemeLikes($id);
     $view = new view('manage_memes/show_meme');
     $view->assign('model', $model);
     $template = new View('common/site');
     $include = str_replace('<!--[[content]]-->', $view->output(), $template->output());
     echo $include;
 }
开发者ID:nikolaybyivanov,项目名称:PHP,代码行数:13,代码来源:ManageMemes.php

示例5: login

 public function login()
 {
     $manageUsersModel = new ManageUsersModel();
     $model['username'] = isset($_POST['username']) ? $_POST['username'] : '';
     $model['password'] = isset($_POST['password']) ? $_POST['password'] : '';
     if ($manageUsersModel->AuthenticateUser($model['username'], $model['password'])) {
         $_SESSION['logged_user'] = $model['username'];
         $_SESSION['author_id'] = $manageUsersModel->getUserId($model['username'], $model['password']);
         if (isset($_POST['isadmin'])) {
             $_SESSION['isadmin'] = true;
         }
         header('location: home.php?action=index');
     }
     if (!isset($_POST['username']) && !isset($_POST['password'])) {
         $view = new view('manage_users/singin');
         $template = new View('common/site');
         $include = str_replace('<!--[[content]]-->', $view->output(), $template->output());
         echo $include;
     } else {
         $model_errors['authentication_failed'] = 'Unknown username and password!';
         $view = new view('manage_users/singin');
         $view->assign('model_errors', $model_errors);
         $template = new View('common/site');
         $include = str_replace('<!--[[content]]-->', $view->output(), $template->output());
         echo $include;
     }
 }
开发者ID:nikolaybyivanov,项目名称:PHP,代码行数:27,代码来源:Home.php


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