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


PHP TemplateEngine::output方法代码示例

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


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

示例1: date

        if (isset($_POST['assign']) && (int) $_POST['assign'] >= 0) {
            $assign = (int) $_POST['assign'];
        } else {
            $assign = 1;
        }
        if (isset($_POST['status']) && (int) $_POST['status'] == 'closed') {
            $status = 'closed';
        } else {
            $status = 'open';
        }
        if (isset($_POST['due'])) {
            $due = $_POST['due'];
        } else {
            $due = date("Y-m-d");
        }
        $added = date("Y-m-d");
        if (DBIssues::editIssue($id, $type, $name, $details, $target, $assign, $due, $added, $added, $status, $author)) {
            Session::addMessage('Issue Edited Successfully');
            header("Location: " . $cfg['domain'] . $cfg['site_path'] . 'issues_detail.php?id=' . $id);
        } else {
            Session::addMessage("An Error Occurred");
            header("Location: " . $cfg['domain'] . $cfg['site_path'] . 'issues_add.php');
        }
        exit;
    } else {
        header('Location: ' . $cfg['domain'] . $cfg['site_path'] . 'issues.php');
        exit;
    }
}
TemplateEngine::output($tpl, new IssuesEditData($id));
开发者ID:c13arm,项目名称:MUN-School-Work,代码行数:30,代码来源:issues_edit.php

示例2: IssuesListData

<?php

/*------------------------------------------------------------------------------
    File: www/issues.php
 Project: cs2760 - Assignment #8
 Version: 0.1.0
      By: Lauren Stratton, Simon McIlhargey, Tim Oram
------------------------------------------------------------------------------*/
require 'init.php';
$tpl = TemplateEngine::templateFromFile('content/issues');
$data = new IssuesListData();
TemplateEngine::output($tpl, $data);
开发者ID:c13arm,项目名称:MUN-School-Work,代码行数:12,代码来源:issues.php

示例3:

<?php

/*------------------------------------------------------------------------------
    File: www/index.php
 Project: cs2760 - Assignment #8
 Version: 0.1.0
      By: Lauren Stratton, Simon McIlhargey, Tim Oram
------------------------------------------------------------------------------*/
require 'init.php';
$tpl = TemplateEngine::templateFromFile('content/projects');
TemplateEngine::output($tpl);
开发者ID:c13arm,项目名称:MUN-School-Work,代码行数:11,代码来源:index.php

示例4: date

    } else {
        $target = 1;
    }
    if (isset($_POST['assign']) && (int) $_POST['assign'] >= 0) {
        $assign = (int) $_POST['assign'];
    } else {
        $assign = 1;
    }
    if (isset($_POST['status']) && (int) $_POST['status'] == 'closed') {
        $status = 'closed';
    } else {
        $status = 'open';
    }
    if (isset($_POST['due'])) {
        $due = $_POST['due'];
    } else {
        $due = date("Y-m-d");
    }
    $added = date("Y-m-d");
    if (DBIssues::addIssue($type, $name, $details, $target, $assign, $due, $added, $added, $status, $author)) {
        Session::addMessage('Issue Added Successfully');
        header("Location: " . $cfg['domain'] . $cfg['site_path'] . 'issues_detail.php?id=' . DB::lastInsertedId());
    } else {
        Session::addMessage("An Error Occurred");
        header("Location: " . $cfg['domain'] . $cfg['site_path'] . 'issues_add.php');
    }
    exit;
}
$tpl = TemplateEngine::templateFromFile('content/issues_add');
TemplateEngine::output($tpl, new IssuesData());
开发者ID:c13arm,项目名称:MUN-School-Work,代码行数:30,代码来源:issues_add.php


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