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


PHP XTemplate::out方法代码示例

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


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

示例1: display_error_import

function display_error_import()
{
    $message = $_SESSION['import_error'];
    global $import_mod_strings;
    global $theme;
    global $mod_strings;
    global $app_strings;
    $theme_path = "themes/" . $theme . "/";
    $image_path = $theme_path . "images/";
    require_once $theme_path . 'layout_utils.php';
    $GLOBALS['log']->info("Upload Error");
    $xtpl = new XTemplate('modules/Import/error.html');
    $xtpl->assign("MOD", $mod_strings);
    $xtpl->assign("APP", $app_strings);
    echo "\n<p>\n";
    echo get_module_title($mod_strings['LBL_MODULE_NAME'], $mod_strings['LBL_MODULE_NAME'], true);
    echo "\n</p>\n";
    if (isset($_REQUEST['return_module'])) {
        $xtpl->assign("RETURN_MODULE", $_REQUEST['return_module']);
    }
    if (isset($_REQUEST['return_action'])) {
        $xtpl->assign("RETURN_ACTION", $_REQUEST['return_action']);
    }
    $xtpl->assign("THEME", $theme);
    $xtpl->assign("IMAGE_PATH", $image_path);
    $xtpl->assign("PRINT_URL", "index.php?" . $GLOBALS['request_string']);
    $xtpl->assign("MODULE", $_REQUEST['module']);
    $xtpl->assign("MESSAGE", $message);
    $xtpl->parse("main");
    $xtpl->out("main");
}
开发者ID:BackupTheBerlios,项目名称:livealphaprint,代码行数:31,代码来源:error.php

示例2: printShow

function printShow(XTemplate &$tpl)
{
    $rows = SingleDB::getInstance()->getAllOrders();
    if (count($rows) == 0) {
        echo EMPTY_TABLE;
        $tpl->parse("page.showPage.backForm");
        $tpl->parse("page.showPage");
        $tpl->parse("page");
        $tpl->out("page");
    } else {
        $tpl->parse("page.showPage.backForm");
        foreach ($rows as $row) {
            $showArray = array("ind" => $row[0], "order" => $row[1], "cost" => $row[2], "rubSel" => $row[3] == 1 ? "selected" : "", "usdSel" => $row[3] == 2 ? "selected" : "", "card_num" => $row[4], "card_holder" => $row[5], "card_expMonth" => $row[6], "card_expYear" => $row[7], "card_cvv" => $row[8]);
            $tpl->assign("showArray", $showArray);
            $tpl->parse("page.showPage.showForm.payRow");
        }
        $tpl->parse("page.showPage.showForm");
        $tpl->parse("page.showPage");
        $tpl->parse("page");
        $tpl->out("page");
    }
}
开发者ID:tomHolm,项目名称:testPayment,代码行数:22,代码来源:common.functions.php

示例3: Display

 public function Display($cur_pg = null)
 {
     $xtemp = new XTemplate("header.html", __PATH_HTML__);
     if (is_array($cur_pg)) {
         $xtemp->assign('MENU_' . $cur_pg[0], 'current');
         $xtemp->assign('SUBMENU_' . $cur_pg[1], 'current');
     } else {
         $xtemp->assign('MENU_' . $cur_pg, 'current');
     }
     $xtemp->assign("SITE_ROOT", __SITE__);
     $xtemp->assign("IMAGE_PATH", __PATH_IMAGES__);
     $xtemp->parse("MAIN");
     $xtemp->out("MAIN");
 }
开发者ID:samyhajal,项目名称:jamhour.us,代码行数:14,代码来源:Header.class.php

示例4: Display

 public function Display($scripts, $css)
 {
     $xtemp = new XTemplate("meta.html", __PATH_HTML__);
     $xtemp->assign("SCRIPT_ROOT", __PATH_JAVASCRIPT__);
     $xtemp->assign("STYLE_ROOT", __PATH_CSS__);
     foreach ($scripts as $script) {
         $xtemp->assign("FILE", $script);
         $xtemp->parse("MAIN.JAVASCRIPT");
     }
     foreach ($css as $stylesheet) {
         $xtemp->assign("FILE", $stylesheet);
         $xtemp->parse("MAIN.STYLESHEET");
     }
     $xtemp->parse("MAIN");
     $xtemp->out("MAIN");
 }
开发者ID:samyhajal,项目名称:jamhour.us,代码行数:16,代码来源:Meta.class.php

示例5: mostrar_pagina

function mostrar_pagina($archivo, $contenido)
{
    global $_lang;
    global $_languages;
    global $_roles;
    global $_titles;
    $page = array();
    $page['CONTENT'] = $contenido->text('content');
    // Creamos la template de la pagina, y le asignamos el titulo y contenido
    $pagina = new XTemplate(ROOT_FOLDER . "/templates/{$_lang}/layout.html");
    $pagina->assign('PAGE', arrayUpper($page));
    $pagina->assign('TITULOLINK', arrayUpper($_titles['links']));
    $pagina->assign('TITULONOMBRE', arrayUpper($_titles['nombres']));
    // Le asignamos el codigo javascript si lo tiene
    if (file_exists("scripts/{$archivo}.js")) {
        $pagina->assign('JAVASCRIPT', $archivo);
        $pagina->parse('page.javascript');
    }
    /// Incluimos los idiomas restantes
    unset($_languages[$_lang]);
    $i = 0;
    foreach ($_languages as $key => $value) {
        // Only for the first language
        if ($i++) {
            $pagina->parse('page.idioma.siguiente');
        }
        $pagina->assign('LANG', array('VALUE' => $value, 'URL' => url(null, array('lang' => $key))));
        $pagina->parse('page.idioma');
    }
    // Rellena los datos de la sesiones si está logueado
    if (isset($_SESSION['id_miembro'])) {
        // Obtiene el rol del usuario
        $pagina->assign('ROL', array('NAME' => $_SESSION['privilegios'] === INVITADO ? $_roles[MIEMBRO] : $_roles[INVITADO], 'URL' => url(null, array('rol' => 1))));
        $pagina->assign('MIEMBRO', array('ID' => $_SESSION['id_miembro'], 'NOMBRE' => $_SESSION['nombre'], 'URL' => url('miembro_ver_ficha.php', array('id_miembro', $_SESSION['id_miembro']))));
        $pagina->parse('page.miembro');
        if ($_SESSION['privilegios'] === ADMIN) {
            $pagina->parse('page.administracion');
        }
    } else {
        // Si no esta logueado muestra el acceso
        $pagina->parse('page.acceder');
    }
    // Parsea la pagina e imprime la pagina
    $pagina->parse('page');
    $pagina->out('page');
    die;
}
开发者ID:jfcalcerrada,项目名称:intrageca,代码行数:47,代码来源:func_aux.php

示例6: Display

 public function Display($footer_images = array())
 {
     $xtemp = new XTemplate("footer.html", __PATH_HTML__);
     $xtemp->assign("IMAGE_PATH", __PATH_IMAGES__);
     if (!empty($footer_images)) {
         $this->footer_images = $footer_images;
         $images = array();
         for ($i = 0; $i <= 4; $i++) {
             $images[$i] = $this->getFooterImage($images);
         }
         $xtemp->assign('IMAGE_LIST', json_encode($this->footer_images));
         $xtemp->assign('FOOTER_IMG', $images);
         $xtemp->parse('MAIN.PHOTOS');
     }
     $xtemp->assign('YEAR', date('Y'));
     $xtemp->parse("MAIN");
     $xtemp->out("MAIN");
 }
开发者ID:samyhajal,项目名称:jamhour.us,代码行数:18,代码来源:Footer.class.php

示例7: nv_site_theme

/**
 * nv_site_theme()
 *
 * @param mixed $step
 * @param mixed $titletheme
 * @param mixed $contenttheme
 * @return
 */
function nv_site_theme($step, $titletheme, $contenttheme)
{
    global $lang_module, $languageslist, $language_array, $global_config;
    $xtpl = new XTemplate('theme.tpl', NV_ROOTDIR . '/install/tpl/');
    $xtpl->assign('BASE_SITEURL', NV_BASE_SITEURL);
    $xtpl->assign('NV_FILES_DIR', NV_FILES_DIR);
    $xtpl->assign('LANG_VARIABLE', NV_LANG_VARIABLE);
    $xtpl->assign('LANG_DATA', NV_LANG_DATA);
    $xtpl->assign('MAIN_TITLE', $titletheme);
    $xtpl->assign('MAIN_STEP', $step);
    $xtpl->assign('LANG', $lang_module);
    $xtpl->assign('VERSION', 'v' . $global_config['version']);
    $step_bar = array($lang_module['select_language'], $lang_module['check_chmod'], $lang_module['license'], $lang_module['check_server'], $lang_module['config_database'], $lang_module['website_info'], $lang_module['done']);
    foreach ($step_bar as $i => $step_bar_i) {
        $n = $i + 1;
        $class = '';
        if ($step >= $n) {
            $class = " class=\"";
            $class .= $step > $n ? 'passed_step' : '';
            $class .= $step == $n ? 'current_step' : '';
            $class .= "\"";
        }
        $xtpl->assign('CLASS_STEP', $class);
        $xtpl->assign('STEP_BAR', $step_bar_i);
        $xtpl->assign('NUM', $n);
        $xtpl->parse('main.step_bar.loop');
    }
    $xtpl->assign('LANGTYPESL', NV_LANG_DATA);
    $langname = $language_array[NV_LANG_DATA]['name'];
    $xtpl->assign('LANGNAMESL', $langname);
    foreach ($languageslist as $languageslist_i) {
        if (!empty($languageslist_i) and NV_LANG_DATA != $languageslist_i) {
            $xtpl->assign('LANGTYPE', $languageslist_i);
            $langname = $language_array[$languageslist_i]['name'];
            $xtpl->assign('LANGNAME', $langname);
            $xtpl->parse('main.looplang');
        }
    }
    $xtpl->parse('main.step_bar');
    $xtpl->assign('MAIN_CONTENT', $contenttheme);
    $xtpl->parse('main');
    $xtpl->out('main');
}
开发者ID:nukeviet,项目名称:nukeviet,代码行数:51,代码来源:template.php

示例8: defined

    include $pl;
}
/* ===== */
$out['head'] .= $R['code_noindex'];
$out['subtitle'] = $title;
require_once $cfg['system_dir'] . '/header.php';
$tpl_type = defined('COT_ADMIN') ? 'core' : 'module';
$t = new XTemplate(cot_tplfile('message', $tpl_type));
if (COT_AJAX) {
    $t->assign('AJAX_MODE', true);
}
$errmsg = $title;
$title .= $usr['isadmin'] ? ' (#' . $msg . ')' : '';
$t->assign('MESSAGE_TITLE', $title);
$t->assign('MESSAGE_BODY', $body);
if ($msg == '920') {
    $confirm_no_url = preg_match("/^.+" . preg_quote($sys['domain'] . "/"), $_SERVER['HTTP_REFERER']) ? str_replace('&', '&amp;', $_SERVER['HTTP_REFERER']) : cot_url('index');
    if (preg_match('#[ "\':]#', base64_decode($redirect))) {
        $redirect = '';
    }
    $t->assign(array('MESSAGE_CONFIRM_YES' => base64_decode($redirect), 'MESSAGE_CONFIRM_NO' => $confirm_no_url));
    $t->parse('MAIN.MESSAGE_CONFIRM');
}
/* === Hook === */
foreach (cot_getextplugins('message.tags') as $pl) {
    include $pl;
}
/* ===== */
$t->parse('MAIN');
$t->out('MAIN');
require_once $cfg['system_dir'] . '/footer.php';
开发者ID:Andreyjktl,项目名称:Cotonti,代码行数:31,代码来源:message.php

示例9: sprintf

    $xtpl->assign('PTITLE', sprintf($lang_module['users_in_group_caption'], $groupsList[$id]['title'], $users));
    $xtpl->assign('GID', $id);
    if (!empty($groupsList[$id]['users'])) {
        $sql = "SELECT `userid`, `username`, `full_name`, `email` FROM `" . NV_USERS_GLOBALTABLE . "` WHERE `userid` IN (" . $groupsList[$id]['users'] . ")";
        $sql = $db->sql_query($sql);
        $a = 0;
        while ($row = $db->sql_fetchrow($sql, 2)) {
            $xtpl->assign('LOOP', $row);
            $xtpl->assign('CLASS', $a % 2 ? " class=\"second\"" : "");
            $xtpl->parse('listUsers.ifExists.loop');
            ++$a;
        }
        $xtpl->parse('listUsers.ifExists');
    }
    $xtpl->parse('listUsers');
    $xtpl->out('listUsers');
    exit;
}
//Danh sach thanh vien
if ($nv_Request->isset_request('userlist', 'get')) {
    $id = $nv_Request->get_int('userlist', 'get', 0);
    if (!isset($groupsList[$id])) {
        Header("Location: " . NV_BASE_ADMINURL . "index.php?" . NV_NAME_VARIABLE . "=" . $module_name . "&" . NV_OP_VARIABLE . "=" . $op);
        die;
    }
    $xtpl->assign('GID', $id);
    $xtpl->parse('userlist');
    $contents = $xtpl->text('userlist');
    include NV_ROOTDIR . "/includes/header.php";
    echo nv_admin_theme($contents);
    include NV_ROOTDIR . "/includes/footer.php";
开发者ID:atarubi,项目名称:nuke-viet,代码行数:31,代码来源:groups.php

示例10: VALUES

                $email = $_POST['email'];
                $phone = $_POST['phone'];
                $cmt = $_POST['cmtnd'];
                $address = $_POST['address'];
                $p = $a->xl();
                $date = $a->ngay();
                $query = "INSERT INTO hoadon VALUES ('','{$name}','{$email}','{$phone}','{$cmt}','{$address}','','{$p}','','{$date}')";
                mysql_query($query) or die(mysql_error());
                $ht = new XTemplate("ht.php");
                $ht->parse("main");
                $content = $ht->text("main");
            }
            break;
        case 'xoa':
            $query = "SELECT * FROM sanpham";
            $result = mysql_query($query) or die(mysql_error());
            while ($row = mysql_fetch_array($result)) {
                if (isset($_SESSION[".{$row['id']}."]) == true) {
                    unset($_SESSION[".{$row['id']}."]);
                }
            }
            break;
    }
}
$index = new XTemplate("home21.php");
$index->assign("content", $content);
//$index->parse("main");
$index->assign("page", $phantrang);
$index->parse("main");
$index->out("main");
开发者ID:LPCH1994,项目名称:project,代码行数:30,代码来源:sanpham.php

示例11: nv_info_die

/**
 * nv_info_die()
 * 
 * @param string $page_title
 * @param mixed $info_title
 * @param mixed $info_content
 * @return
 */
function nv_info_die($page_title = "", $info_title, $info_content, $adminlink = 0)
{
    global $lang_global, $global_config;
    if (empty($page_title)) {
        $page_title = $global_config['site_description'];
    }
    if (defined('NV_ADMIN') and isset($global_config['admin_theme']) and file_exists(NV_ROOTDIR . "/themes/" . $global_config['admin_theme'] . "/system/info_die.tpl")) {
        $tpl_path = NV_ROOTDIR . "/themes/" . $global_config['admin_theme'] . "/system";
    } elseif (defined('NV_ADMIN') and file_exists(NV_ROOTDIR . "/themes/admin_default/system/info_die.tpl")) {
        $tpl_path = NV_ROOTDIR . "/themes/admin_default/system";
    } elseif (isset($global_config['module_theme']) and file_exists(NV_ROOTDIR . "/themes/" . $global_config['module_theme'] . "/system/info_die.tpl")) {
        $tpl_path = NV_ROOTDIR . "/themes/" . $global_config['module_theme'] . "/system";
    } elseif (isset($global_config['site_theme']) and file_exists(NV_ROOTDIR . "/themes/" . $global_config['site_theme'] . "/system/info_die.tpl")) {
        $tpl_path = NV_ROOTDIR . "/themes/" . $global_config['site_theme'] . "/system";
    } else {
        $tpl_path = NV_ROOTDIR . "/themes/default/system";
    }
    $size = @getimagesize(NV_ROOTDIR . '/images/' . $global_config['site_logo']);
    $xtpl = new XTemplate("info_die.tpl", $tpl_path);
    $xtpl->assign('SITE_CHERSET', $global_config['site_charset']);
    $xtpl->assign('PAGE_TITLE', $page_title);
    $xtpl->assign('HOME_LINK', $global_config['site_url']);
    $xtpl->assign('LOGO', NV_BASE_SITEURL . "images/" . $global_config['site_logo']);
    $xtpl->assign('WIDTH', $size[0]);
    $xtpl->assign('HEIGHT', $size[1]);
    $xtpl->assign('INFO_TITLE', $info_title);
    $xtpl->assign('INFO_CONTENT', $info_content);
    $xtpl->assign('GO_HOMEPAGE', $lang_global['go_homepage']);
    if (defined('NV_IS_ADMIN')) {
        $xtpl->assign('ADMIN_LINK', NV_BASE_SITEURL . NV_ADMINDIR . "/index.php");
        $xtpl->assign('GO_ADMINPAGE', $lang_global['admin_page']);
        $xtpl->parse('main.adminlink');
    }
    $xtpl->parse('main');
    include NV_ROOTDIR . "/includes/header.php";
    $xtpl->out('main');
    include NV_ROOTDIR . "/includes/footer.php";
    die;
}
开发者ID:syphuonglam,项目名称:creative-portal,代码行数:47,代码来源:theme_functions.php

示例12: ContactFormBase

}
if (isset($_POST['handle']) && $_POST['handle'] == 'Save') {
    require_once 'modules/Contacts/ContactFormBase.php';
    $contactForm = new ContactFormBase();
    require_once 'modules/Accounts/AccountFormBase.php';
    $accountForm = new AccountFormBase();
    require_once 'modules/Opportunities/OpportunityFormBase.php';
    $oppForm = new OpportunityFormBase();
    if (!isset($_POST['selectedContact']) && !isset($_POST['ContinueContact'])) {
        $duplicateContacts = $contactForm->checkForDuplicates('Contacts');
        if (isset($duplicateContacts)) {
            $formBody = $contactForm->buildTableForm($duplicateContacts);
            $xtpl->assign('FORMBODY', $formBody);
            $xtpl->parse('main.formnoborder');
            $xtpl->parse('main');
            $xtpl->out('main');
            return;
        }
    }
    if (empty($_POST['selectedAccount']) && empty($_POST['ContinueAccount'])) {
        $duplicateAccounts = $accountForm->checkForDuplicates('Accounts');
        if (isset($duplicateAccounts)) {
            $xtpl->assign('FORMBODY', $accountForm->buildTableForm($duplicateAccounts));
            $xtpl->parse('main.formnoborder');
            $xtpl->parse('main');
            $xtpl->out('main');
            return;
        }
    }
    if (isset($_POST['newopportunity']) && $_POST['newopportunity'] == 'on' && !isset($_POST['selectedOpportunity']) && !isset($_POST['ContinueOpportunity'])) {
        $duplicateOpps = $oppForm->checkForDuplicates('Opportunities');
开发者ID:jglaine,项目名称:sugar761-ent,代码行数:31,代码来源:BusinessCard.php

示例13: header

                header("Location: http://" . $_SERVER['HTTP_HOST'] . "/zayavki/auto/");
                $template->parse("main.menu.newHelp");
                break;
            case "panorama":
                panorama();
                $template->parse("main.menu.oldHelp");
                break;
            case "test":
                panorama();
                break;
            default:
                allRequestsRequests();
                $template->parse("main.menu.newHelp");
                break;
        }
    } else {
        header("Location: http://" . $_SERVER['HTTP_HOST'] . "/zayavki/");
    }
} else {
    if ($client->isRegistered()) {
        allRequestsList();
        $template->parse("main.menu.newHelp");
    } else {
        header("Location: http://" . $_SERVER['HTTP_HOST'] . "/zayavki/");
    }
}
//print_r($client);
$template->parse("main.menu");
$template->parse("main");
$template->out("main");
开发者ID:bdf2ch,项目名称:auto,代码行数:30,代码来源:index.php

示例14:

            $activity_fields['SET_ACCEPT_LINKS'] = $app_list_strings['dom_meeting_accept_status'][$activity['accept_status']];
        }
    }
    $activity_fields['TITLE'] = '';
    if (!empty($activity['contact_name'])) {
        $activity_fields['TITLE'] .= $current_module_strings['LBL_LIST_CONTACT'] . ": " . $activity['contact_name'];
    }
    if (!empty($activity['parent_name'])) {
        $activity_fields['TITLE'] .= "\n" . $app_list_strings['record_type_display'][$activity['parent_type']] . ": " . $activity['parent_name'];
    }
    $xtpl->assign("ACTIVITY_MODULE_PNG", SugarThemeRegistry::current()->getImage($activity_fields['MODULE'] . '', 'border="0" alt="' . $activity_fields['NAME'] . '"'));
    $xtpl->assign("ACTIVITY", $activity_fields);
    $xtpl->assign("BG_HILITE", $hilite_bg);
    $xtpl->assign("BG_CLICK", $click_bg);
    if ($oddRow) {
        $xtpl->assign("ROW_COLOR", 'oddListRow');
        $xtpl->assign("BG_COLOR", $odd_bg);
    } else {
        $xtpl->assign("ROW_COLOR", 'evenListRow');
        $xtpl->assign("BG_COLOR", $even_bg);
    }
    $oddRow = !$oddRow;
    $xtpl->parse("open_activity.row");
}
// END FOREACH()
$xtpl->parse("open_activity");
if (count($open_activity_list) > 0) {
    $xtpl->out("open_activity");
} else {
    echo "<i>" . $current_module_strings['NTC_NONE_SCHEDULED'] . "</i>";
}
开发者ID:klr2003,项目名称:sourceread,代码行数:31,代码来源:OpenListView.php

示例15: XTemplate

    echo "\n<p>\n";
    echo ReportContainer::get_root_line_links($_REQUEST['record']);
    echo "<a href='index.php?module=ZuckerReportContainer&action=EditView&record=" . $_REQUEST['record'] . "'> (" . $app_strings['LBL_EDIT_BUTTON_LABEL'] . ")</a>";
    echo "\n</p>\n";
}
$xtpl = new XTemplate('modules/ZuckerReportContainer/DetailView.html');
$xtpl->assign("MOD", $mod_strings);
$xtpl->assign("APP", $app_strings);
$xtpl->assign("THEME", $theme);
$xtpl->assign("GRIDLINE", $gridline);
$xtpl->assign("IMAGE_PATH", $image_path);
if (!empty($container->description)) {
    $xtpl->assign("NAME", $container->name);
    $xtpl->assign("DESCRIPTION", nl2br($container->description));
    $xtpl->parse("detail");
    $xtpl->out("detail");
    echo "<p/>\n";
}
/*
if(!empty($_REQUEST['createcontainername'])) {
	$newone = new ReportContainer();
	$newone->name = $_REQUEST['createcontainername'];
	$newone->parent_id = $container->id;
	$newone->assigned_user_id = $current_user->id;
	$newone->team_id = $container->team_id;
	$newone->save();
}
*/
$button = "";
$button .= "<form action='index.php' method='post'>\n";
$button .= "<input type='hidden' name='module' value='ZuckerReportContainer'>\n";
开发者ID:omusico,项目名称:sugar_work,代码行数:31,代码来源:DetailView.php


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