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


PHP HTML::renderOut方法代码示例

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


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

示例1: isset

/** prepare vars **/
$myuser = MySiteUser::getCurrentUser();
$uid = isset($vars[1]) ? $vars[1] : null;
$user_to_edit = MySiteUser::findById($uid);
if (!$user_to_edit) {
    dispatch('site/404');
    exit;
}
/** handle submission **/
if (isset($_POST['submit'])) {
    // we uncomment the following fields coz we don't want user to change
    $no_change = array('company_id');
    foreach ($no_change as $field) {
        if (isset($_POST[$field])) {
            unset($_POST[$field]);
        }
    }
    // then we call the general process
    $uid = $uid;
    require_once MODULESROOT . '/siteuser/controllers/backend/user/add_edit_submission.php';
}
/** presentation **/
$html = new HTML();
$html->renderOut('site/components/html_header', array('title' => '编辑用户信息', 'body_class' => 'siteuser_edit'));
$html->renderOut('site/components/mainnav', array('user' => $myuser));
$html->output('<div id="page-wrapper" class="gray-bg">');
$html->renderOut('site/components/topnav', array('user' => $myuser));
$html->renderOut('site/components/page_header', array('title' => '编辑用户信息', 'breadcrumb' => array('首页' => uri(''), '用户管理' => '#', '公司职员列表' => uri('siteuser/list'), '编辑用户信息' => '#')));
$html->renderOut('site/siteuser_edit', array('user' => $user_to_edit));
$html->output('</div>');
$html->renderOut('site/components/html_footer');
开发者ID:jeffreycai,项目名称:chaoliu,代码行数:31,代码来源:siteuser_edit.php

示例2: foreach

<?php

/** handle submission **/
if (isset($_POST['submit'])) {
    $content = "<table>";
    foreach ($_POST as $key => $val) {
        $tokens = explode("_", $key);
        $key = "";
        foreach ($tokens as $token) {
            $key .= ucfirst($token) . " ";
        }
        $content .= "<tr><th>{$key}</th><td>{$val}</td></tr>";
    }
    $content .= "</table>";
    sendemailAdmin($settings['sitename'] . " - Apply for course", $content);
    Message::register(new Message(Message::SUCCESS, 'Thank you for your application. We will contact you soon!'));
}
$html = new HTML();
$html->renderOut('site/components/html_header', array('title' => 'Apply for a course', 'body_class' => 'page page-template page-template-templates page-template-full-width page-template-templatesfull-width-php has-toolbar'));
$html->output('<div id="page-container">');
//$html->renderOut('site/components/toptoolbar');
$html->renderOut('site/components/header');
$html->renderOut('site/apply', array('full_page_sidebar_right' => $html->render('site/components/full_page_sidebar_right', array('blocks' => array(Block::findByName('Get in Touch'))))));
$html->renderOut('site/components/footer');
$html->output('</div>');
$html->renderOut('site/components/page_footer');
$html->renderOut('site/components/html_footer');
开发者ID:jeffreycai,项目名称:ct21,代码行数:27,代码来源:apply.php

示例3: isset

<?php

$page = isset($_GET['page']) ? $_GET['page'] : 1;
if (!preg_match('/^\\d+$/', $page)) {
    dispatch('core/backend/404');
    exit;
}
$objects = Company::findAll();
$html = new HTML();
$html->renderOut('core/backend/html_header', array('title' => i18n(array('en' => 'Company', 'zh' => '公司'))), true);
$html->output('<div id="wrapper">');
$html->renderOut('core/backend/header');
$perpage = 50;
$total = Company::countAll();
$total_page = ceil($total / $perpage);
$html->renderOut('company/backend/company_list', array('objects' => Company::findAllWithPage($page, $perpage), 'current_page' => $page, 'total_page' => $total_page, 'total' => $total, 'pager' => $html->render('core/components/pagination', array('total' => $total_page, 'page' => $page)), 'start_entry' => ($page - 1) * $perpage + 1, 'end_entry' => min(array($total, $page * $perpage))), true);
$html->output('</div>');
$html->renderOut('core/backend/html_footer');
exit;
开发者ID:jeffreycai,项目名称:chaoliu,代码行数:19,代码来源:company_list.php

示例4: isset

<?php

$page = isset($_GET['page']) ? $_GET['page'] : 1;
if (!preg_match('/^\\d+$/', $page)) {
    dispatch('core/backend/404');
    exit;
}
$objects = WechatAccount::findAll();
$html = new HTML();
$html->renderOut('core/backend/html_header', array('title' => i18n(array('en' => 'Wechat Account', 'zh' => '微信公共账号'))), true);
$html->output('<div id="wrapper">');
$html->renderOut('core/backend/header');
$perpage = 50;
$total = WechatAccount::countAll();
$total_page = ceil($total / $perpage);
$html->renderOut('wechat_account/backend/wechat_account_list', array('objects' => WechatAccount::findAllWithPage($page, $perpage), 'current_page' => $page, 'total_page' => $total_page, 'total' => $total, 'pager' => $html->render('core/components/pagination', array('total' => $total_page, 'page' => $page)), 'start_entry' => ($page - 1) * $perpage + 1, 'end_entry' => min(array($total, $page * $perpage))), true);
$html->output('</div>');
$html->renderOut('core/backend/html_footer');
exit;
开发者ID:jeffreycai,项目名称:reader,代码行数:19,代码来源:wechat_account_list.php

示例5: empty

<?php

// override this call if "site" module has the override controller
$override_controller = MODULESROOT . '/site/controllers/confirm.php';
if (is_file($override_controller)) {
    require $override_controller;
    exit;
}
// default view
$html = new HTML();
$html->renderOut('core/backend/single_form_header', array('title' => i18n(array('en' => 'Hello', 'zh' => '你好'))));
$messages = Message::renderMessages();
echo empty($messages) ? i18n(array('en' => '<i>No messages</i>', 'zh' => '<i>暂时没有信息</i>')) : $messages;
$html->renderOut('core/backend/single_form_footer', array('extra' => '<div  style="text-align: center;"><small><a href="' . uri('') . '">' . i18n(array('en' => 'go back to homepage', 'zh' => '返回首页')) . '</a></small></div>'));
开发者ID:jeffreycai,项目名称:chaoliu,代码行数:14,代码来源:confirm.php

示例6: foreach

    foreach ($files as $file) {
        $file = trim($file);
        // for cache file, we move it to its proper location
        if (strpos($file, str_replace(WEBROOT . DS, "", CACHE_DIR)) === 0) {
            $oldname = WEBROOT . DS . $file;
            $newname = WEBROOT . DS . "files/application" . str_replace(CACHE_DIR, "", WEBROOT . DS . $file);
            rename($oldname, $newname);
            $file = str_replace(WEBROOT . DS, "", $newname);
        }
        $rtn[] = $file;
    }
    $object->setIeltsTranscripts(implode("\n", $rtn));
    $object->setCreatedAt(time());
    if ($error_flag == false) {
        if ($object->save()) {
            Message::register(new Message(Message::SUCCESS, i18n(array("en" => "Thanks for your application. We will come back to you as soon as possible.", "zh" => "记录保存成功"))));
            sendemailAdmin('Apply for course', '<p>A new application for course has just been submitted: <br /><a href="http://en.ct21.com.au/admin/application/edit/' . $object->getId() . '">http://en.ct21.com.au/admin/application/edit/' . $object->getId() . '</a></p>');
            HTML::forwardBackToReferer();
        } else {
            Message::register(new Message(Message::DANGER, i18n(array("en" => "Record failed to save", "zh" => "记录保存失败"))));
        }
    }
}
$html = new HTML();
$html->renderOut('core/backend/html_header', array('title' => i18n(array('en' => 'Create Application', 'zh' => 'Create 申请'))));
$html->output('<div id="wrapper">');
$html->renderOut('core/backend/header');
$html->renderOut('application/backend/application_create', array('object' => $object));
$html->output('</div>');
$html->renderOut('core/backend/html_footer');
exit;
开发者ID:jeffreycai,项目名称:ct21,代码行数:31,代码来源:application_create.php

示例7: Message

    // proceed for $openid
    $object->setOpenid($openid);
    // proceed for $introduction
    $object->setIntroduction($introduction);
    // proceed for $cirtification
    $object->setCirtification($cirtification);
    // proceed for $qr_code
    $object->setQrCode($qr_code);
    // proceed for $logo
    $object->setLogo($logo);
    // proceed for $active
    $object->setActive($active);
    // proceed for $last_updated
    $object->setLastUpdated($last_updated);
    if ($error_flag == false) {
        if ($object->save()) {
            Message::register(new Message(Message::SUCCESS, i18n(array("en" => "Record saved", "zh" => "记录保存成功"))));
            HTML::forwardBackToReferer();
        } else {
            Message::register(new Message(Message::DANGER, i18n(array("en" => "Record failed to save", "zh" => "记录保存失败"))));
        }
    }
}
$html = new HTML();
$html->renderOut('core/backend/html_header', array('title' => i18n(array('en' => 'Create Wechat Account', 'zh' => 'Create 微信公共账号'))));
$html->output('<div id="wrapper">');
$html->renderOut('core/backend/header');
$html->renderOut('wechat_account/backend/wechat_account_create', array('object' => $object));
$html->output('</div>');
$html->renderOut('core/backend/html_footer');
exit;
开发者ID:jeffreycai,项目名称:reader,代码行数:31,代码来源:wechat_account_create.php

示例8: isset

}
// handle form submission
if (isset($_POST['submit'])) {
    $error_flag = false;
    /// validation
    // validation for $content
    $content = isset($_POST["content"]) ? $_POST["content"] : null;
    if (empty($content)) {
        Message::register(new Message(Message::DANGER, i18n(array("en" => "content is required.", "zh" => "请填写content"))));
        $error_flag = true;
    }
    /// proceed submission
    // proceed for $content
    $object->setContent($content);
    if ($error_flag == false) {
        if ($object->save()) {
            Message::register(new Message(Message::SUCCESS, i18n(array("en" => "Record saved", "zh" => "记录保存成功"))));
            HTML::forwardBackToReferer();
        } else {
            Message::register(new Message(Message::DANGER, i18n(array("en" => "Record failed to save", "zh" => "记录保存失败"))));
        }
    }
}
$html = new HTML();
$html->renderOut('core/backend/html_header', array('title' => i18n(array('en' => 'Edit Block', 'zh' => 'Edit Content Block'))));
$html->output('<div id="wrapper">');
$html->renderOut('core/backend/header');
$html->renderOut('block/backend/block_edit', array('object' => $object));
$html->output('</div>');
$html->renderOut('core/backend/html_footer');
exit;
开发者ID:jeffreycai,项目名称:ct21,代码行数:31,代码来源:block_edit.php

示例9: HTML

<?php

$html = new HTML();
$html->renderOut('site/components/single_form_header', array('title' => '重置您的密码'));
$html->renderOut('site/siteuser/forget_password_reset');
$html->renderOut('site/components/single_form_footer');
exit;
开发者ID:jeffreycai,项目名称:chaoliu,代码行数:7,代码来源:forget_password_reset.php

示例10: isset

    $content = isset($_POST["content"]) ? $_POST["content"] : null;
    if (empty($content)) {
        Message::register(new Message(Message::DANGER, i18n(array("en" => "content is required.", "zh" => "请填写content"))));
        $error_flag = true;
    }
    /// proceed submission
    // proceed for $name
    $object->setName($name);
    // proceed for $image
    $object->setImage($image);
    // proceed for $banner_image
    $object->setBannerImage($banner_image);
    // proceed for $content
    $object->setContent($content);
    if ($error_flag == false) {
        if ($object->save()) {
            Message::register(new Message(Message::SUCCESS, i18n(array("en" => "Record saved", "zh" => "记录保存成功"))));
            HTML::forwardBackToReferer();
        } else {
            Message::register(new Message(Message::DANGER, i18n(array("en" => "Record failed to save", "zh" => "记录保存失败"))));
        }
    }
}
$html = new HTML();
$html->renderOut('core/backend/html_header', array('title' => i18n(array('en' => 'Edit Country', 'zh' => 'Edit 留学国家'))));
$html->output('<div id="wrapper">');
$html->renderOut('core/backend/header');
$html->renderOut('destination/backend/country_edit', array('object' => $object));
$html->output('</div>');
$html->renderOut('core/backend/html_footer');
exit;
开发者ID:jeffreycai,项目名称:ct21,代码行数:31,代码来源:country_edit.php

示例11: isset

<?php

$page = isset($_GET['page']) ? $_GET['page'] : 1;
$html = new HTML();
$html->renderOut('site/components/html_header', array('title' => 'News', 'body_class' => 'blog has-toolbar'));
$html->output('<div id="page-container">');
//$html->renderOut('site/components/toptoolbar');
$html->renderOut('site/components/header');
$perpage = $settings['news_per_page'];
$total = News::countAll();
$total_page = ceil($total / $perpage);
$html->renderOut('site/news', array('news' => News::findAllWithPage($page, $settings['news_per_page']), 'sidebar_right' => $html->render('site/components/sidebar_right', array('blocks' => array($html->render('site/components/sidebar_block_countries'), $html->render('site/components/sidebar_block_apply')))), 'current_page' => $page, 'total_page' => $total_page, 'total' => $total, 'pager' => $html->render('site/components/pagination', array('total' => $total_page, 'page' => $page)), 'start_entry' => ($page - 1) * $perpage + 1, 'end_entry' => min(array($total, $page * $perpage))));
$html->renderOut('site/components/footer');
$html->output('</div>');
$html->renderOut('site/components/page_footer');
$html->renderOut('site/components/html_footer');
开发者ID:jeffreycai,项目名称:ct21,代码行数:16,代码来源:news.php

示例12: foreach

<?php

// handle submission
if (isset($_POST['submit'])) {
    SitePermissionRole::truncate();
    foreach ($_POST as $key => $val) {
        if (strstr($key, 'role_')) {
            $tokens = explode('_', $key);
            $role_id = (int) $tokens[1];
            foreach ($val as $permission_id => $v) {
                $spr = new SitePermissionRole();
                $spr->setRoleId($role_id);
                $spr->setPermissionId($permission_id);
                $spr->save();
            }
        }
    }
    Message::register(new Message(Message::SUCCESS, 'Permissions updated successfully!'));
    HTML::forwardBackToReferer();
}
$html = new HTML();
$html->renderOut('core/backend/html_header', array('title' => i18n(array('en' => 'Manage permission', 'zh' => '管理权限'))), true);
$html->output('<div id="wrapper">');
$html->renderOut('core/backend/header');
$html->renderOut('siteuser/backend/permission/manage', array('permissions' => SitePermission::findAll(), 'roles' => SiteRole::findAll()), true);
$html->output('</div>');
$html->renderOut('core/backend/html_footer');
exit;
开发者ID:jeffreycai,项目名称:reader,代码行数:28,代码来源:manage.php

示例13: isset

<?php

$page = isset($_GET['page']) ? $_GET['page'] : 1;
if (!preg_match('/^\\d+$/', $page)) {
    dispatch('core/backend/404');
    exit;
}
$html = new HTML();
$html->renderOut('core/backend/html_header', array('title' => i18n(array('en' => 'Manage user', 'zh' => '管理用户'))), true);
$html->output('<div id="wrapper">');
$html->renderOut('core/backend/header');
$total = SiteUser::countAll();
$per_page = 50;
$total_page = ceil($total / $per_page);
$html->renderOut('siteuser/backend/user/list', array('users' => SiteUser::findAllWithPage($page, $per_page), 'current_page' => $page, 'total_page' => $total_page, 'total' => $total, 'pager' => $html->render('core/components/pagination', array('total' => $total_page, 'page' => $page)), 'per_page' => $per_page), true);
$html->output('</div>');
$html->renderOut('core/backend/html_footer');
exit;
开发者ID:jeffreycai,项目名称:reader,代码行数:18,代码来源:list.php

示例14: Message

        Message::register(new Message(Message::DANGER, i18n(array("en" => "content is required.", "zh" => "请填写content"))));
        $error_flag = true;
    }
    // validation for $published
    $published = isset($_POST["published"]) ? 1 : 0;
    /// proceed submission
    // proceed for $uri
    $object->setUri($uri);
    // proceed for $title
    $object->setTitle($title);
    // proceed for $content
    $object->setContent($content);
    // proceed for $published
    $object->setPublished($published);
    if ($error_flag == false) {
        if ($object->save()) {
            Message::register(new Message(Message::SUCCESS, i18n(array("en" => "Record saved", "zh" => "记录保存成功"))));
            HTML::forwardBackToReferer();
        } else {
            Message::register(new Message(Message::DANGER, i18n(array("en" => "Record failed to save", "zh" => "记录保存失败"))));
        }
    }
}
$html = new HTML();
$html->renderOut('core/backend/html_header', array('title' => i18n(array('en' => 'Create Page', 'zh' => 'Create 基本页面'))));
$html->output('<div id="wrapper">');
$html->renderOut('core/backend/header');
$html->renderOut('page/backend/page_create', array('object' => $object));
$html->output('</div>');
$html->renderOut('core/backend/html_footer');
exit;
开发者ID:jeffreycai,项目名称:ct21,代码行数:31,代码来源:page_create.php

示例15: dispatch

<?php

/** $page has already been assigned by Page module **/
// forward 404 if not published
if (!$page->getPublished()) {
    dispatch('site/404');
    exit;
}
$html = new HTML();
$html->renderOut('site/components/html_header', array('title' => $page->getTitle(), 'body_class' => 'page page-template page-template-templates page-template-full-width page-template-templatesfull-width-php has-toolbar'));
$html->output('<div id="page-container">');
//$html->renderOut('site/components/toptoolbar');
$html->renderOut('site/components/header');
$html->renderOut('site/page/default', array('breadcrumb' => $html->render('site/components/breadcrumb', array('items' => array('Home' => uri(''), $page->getTitle() => false))), 'page' => $page, 'full_page_sidebar_right' => $html->render('site/components/full_page_sidebar_right', array('blocks' => array(Block::findByName('Get in Touch'), Block::findByName('Apply Now'))))));
$html->renderOut('site/components/footer');
$html->output('</div>');
$html->renderOut('site/components/page_footer');
$html->renderOut('site/components/html_footer');
开发者ID:jeffreycai,项目名称:ct21,代码行数:18,代码来源:default.php


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