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


PHP SmartyDisplay函数代码示例

本文整理汇总了PHP中SmartyDisplay函数的典型用法代码示例。如果您正苦于以下问题:PHP SmartyDisplay函数的具体用法?PHP SmartyDisplay怎么用?PHP SmartyDisplay使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


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

示例1: ShowPage

 function ShowPage($sPage)
 {
     global $g_oSec, $dcl_info;
     commonHeader();
     if (($productid = DCL_Sanitize::ToInt($_REQUEST['id'])) === null) {
         trigger_error('Data sanitize failed.');
         return;
     }
     if (!$g_oSec->HasPerm(DCL_ENTITY_PRODUCT, DCL_PERM_VIEW, $productid)) {
         return PrintPermissionDenied();
     }
     $this->oProduct =& CreateObject('dcl.dbProducts');
     if ($this->oProduct->Load($productid) == -1) {
         trigger_error('Could not find a product with an id of ' . $productid, E_USER_ERROR);
         return;
     }
     $this->oSmarty->assign('VAL_ID', $this->oProduct->id);
     $this->oSmarty->assign('VAL_NAME', $this->oProduct->name);
     $this->oSmarty->assign('PERM_VIEWWO', $g_oSec->HasPerm(DCL_ENTITY_WORKORDER, DCL_PERM_VIEW));
     $this->oSmarty->assign('PERM_VIEWTCK', $g_oSec->HasPerm(DCL_ENTITY_TICKET, DCL_PERM_VIEW));
     $this->oSmarty->assign('PERM_WIKI', $dcl_info['DCL_WIKI_ENABLED'] == 'Y' && $g_oSec->HasPerm(DCL_ENTITY_PRODUCT, DCL_PERM_VIEWWIKI));
     $this->oSmarty->assign('PERM_EDIT', $g_oSec->HasPerm(DCL_ENTITY_PRODUCT, DCL_PERM_MODIFY));
     $this->oSmarty->assign('PERM_DELETE', $g_oSec->HasPerm(DCL_ENTITY_PRODUCT, DCL_PERM_DELETE));
     $this->oSmarty->assign('PERM_VERSIONS', $dcl_info['DCL_BUILD_MANAGER_ENABLED'] == 'Y' && $this->oProduct->is_versioned == 'Y');
     SmartyDisplay($this->oSmarty, $sPage);
 }
开发者ID:ljvblfz,项目名称:mysoftwarebrasil,代码行数:26,代码来源:class.htmlProductDashboard.inc.php

示例2: renderDCLMenu

function renderDCLMenu()
{
    global $dcl_info, $g_oSec, $g_oSession;
    $sTemplateSet = GetDefaultTemplateSet();
    include DCL_ROOT . 'templates/' . $sTemplateSet . '/navbar.php';
    $t =& CreateSmarty();
    $t->assign('DIR_IMAGES', 'templates/' . $sTemplateSet . '/img');
    $t->assign('DIR_CSS', 'templates/' . $sTemplateSet . '/css');
    $t->assign('DIR_JS', 'js');
    $t->assign('LNK_LOGOFF', menuLink('logout.php'));
    if ($g_oSec->IsPublicUser()) {
        $t->assign('LNK_HOME', menuLink('', 'menuAction=htmlPublicMyDCL.show'));
    } else {
        $t->assign('LNK_HOME', menuLink('', 'menuAction=htmlMyDCL.show'));
    }
    $t->assign('LNK_PREFERENCES', menuLink('', 'menuAction=htmlPreferences.modify'));
    $t->assign('TXT_WORKORDERS', DCL_MENU_WORKORDERS);
    $t->assign('TXT_TICKETS', DCL_MENU_TICKETS);
    $t->assign('TXT_PROJECTS', DCL_MENU_PROJECTS);
    $t->assign('TXT_HOME', DCL_MENU_HOME);
    $t->assign('TXT_PREFERENCES', DCL_MENU_PREFERENCES);
    $t->assign('TXT_LOGOFF', DCL_MENU_LOGOFF);
    $t->assign('PERM_WORKORDERSEARCH', $g_oSec->HasPerm(DCL_ENTITY_WORKORDER, DCL_PERM_SEARCH) || $g_oSec->HasPerm(DCL_ENTITY_WORKORDER, DCL_PERM_VIEW));
    $t->assign('PERM_TICKETSEARCH', $g_oSec->HasPerm(DCL_ENTITY_TICKET, DCL_PERM_SEARCH) || $g_oSec->HasPerm(DCL_ENTITY_TICKET, DCL_PERM_VIEW));
    $t->assign('PERM_PROJECTSEARCH', $g_oSec->HasPerm(DCL_ENTITY_PROJECT, DCL_PERM_SEARCH) || $g_oSec->HasPerm(DCL_ENTITY_PROJECT, DCL_PERM_VIEW));
    $t->assign('PERM_PREFS', $g_oSec->HasPerm(DCL_ENTITY_PREFS, DCL_PERM_MODIFY));
    $t->assign('PERM_WORKSPACE', $g_oSec->HasPerm(DCL_ENTITY_WORKSPACE, DCL_PERM_VIEW));
    $t->assign('VAL_WORKSPACE', $g_oSession->Value('workspace'));
    $t->assign('VAL_DCL_MENU', $GLOBALS['DCL_MENU']);
    $oNav = new DCLNavBar();
    $t->assign('NAV_BOXEN', $oNav->getHtml());
    SmartyDisplay($t, 'menu.tpl');
}
开发者ID:ljvblfz,项目名称:mysoftwarebrasil,代码行数:33,代码来源:menu.php

示例3: modify

 function modify()
 {
     global $dcl_info, $g_oSession, $g_oSec;
     commonHeader();
     if (!$g_oSec->HasPerm(DCL_ENTITY_PREFS, DCL_PERM_MODIFY)) {
         return PrintPermissionDenied();
     }
     $t =& CreateSmarty();
     $t->assign('PERM_MODIFYCONTACT', $g_oSec->HasPerm(DCL_ENTITY_CONTACT, DCL_PERM_MODIFY) || $g_oSec->HasPerm(DCL_ENTITY_GLOBAL, DCL_PERM_ADMIN));
     $t->assign('VAL_CONTACTID', $g_oSession->Value('contact_id'));
     // Reuse methods from here for lang and template
     $o =& CreateObject('dcl.htmlConfig');
     $t->assign('CMB_DEFAULTTEMPLATESET', $o->GetTemplatesCombo('DCL_PREF_TEMPLATE_SET', GetDefaultTemplateSet()));
     $lang = $dcl_info['DCL_DEFAULT_LANGUAGE'];
     $oPrefs =& CreateObject('dcl.dbPreferences');
     $oPrefs->preferences_data = $g_oSession->Value('dcl_preferences');
     if (isset($oPrefs->preferences_data) && is_array($oPrefs->preferences_data)) {
         if ($oPrefs->Value('DCL_PREF_LANGUAGE') != '') {
             $lang = $oPrefs->Value('DCL_PREF_LANGUAGE');
         }
         $t->assign('VAL_NOTIFYDEFAULT', $oPrefs->Value('DCL_PREF_NOTIFY_DEFAULT'));
         $iOption = $oPrefs->Value('DCL_PREF_CREATED_WATCH_OPTION');
         if ($iOption == '') {
             $iOption = 4;
         }
         $t->assign('VAL_CREATEDWATCHOPTION', $iOption);
     }
     $t->assign('CMB_DEFAULTLANGUAGE', $o->GetLangCombo('DCL_PREF_LANGUAGE', $lang));
     SmartyDisplay($t, 'htmlPreferences.tpl');
 }
开发者ID:ljvblfz,项目名称:mysoftwarebrasil,代码行数:30,代码来源:class.htmlPreferences.inc.php

示例4: show

 function show()
 {
     global $dcl_info, $g_oSec;
     if (!$g_oSec->HasPerm(DCL_ENTITY_ADMIN, DCL_PERM_MODIFY)) {
         return PrintPermissionDenied();
     }
     $objPersonnel = CreateObject('dcl.htmlPersonnel');
     $oDBPersonnel = CreateObject('dcl.dbPersonnel');
     if ($oDBPersonnel->Load($GLOBALS['DCLID']) == -1) {
         return;
     }
     $t =& CreateSmarty();
     $oSelect = CreateObject('dcl.htmlSelect');
     $t->assign('CMB_USERS', $objPersonnel->GetCombo(0, 'responsible', 'lastfirst', 0, false));
     $begindate = @DCL_Sanitize::ToDate($_REQUEST['begindate']);
     if ($begindate !== null) {
         $t->assign('VAL_BEGINDATE', $begindate);
     } else {
         $t->assign('VAL_BEGINDATE', '');
     }
     $enddate = @DCL_Sanitize::ToDate($_REQUEST['enddate']);
     if ($enddate !== null) {
         $t->assign('VAL_ENDDATE', $enddate);
     } else {
         $t->assign('VAL_ENDDATE', '');
     }
     SmartyDisplay($t, 'htmlSecAuditBrowse.tpl');
 }
开发者ID:ljvblfz,项目名称:mysoftwarebrasil,代码行数:28,代码来源:class.htmlSecAudit.inc.php

示例5: ShowAggNav

 function ShowAggNav()
 {
     global $dcl_info;
     $t =& CreateSmarty();
     $t->assign('TXT_AGGREGATE', 'Aggregate');
     $t->assign('TXT_BY', STR_CMMN_BY);
     $t->assign('TXT_FORDATES', 'For Dates');
     $aGroups = array();
     foreach ($this->_aTypeInfo as $key => $val) {
         array_push($aGroups, array('key' => $key, 'desc' => $val['__title__']));
     }
     $t->assign('groups', $aGroups);
     $t->assign('group', isset($_REQUEST['group']) ? $_REQUEST['group'] : '');
     $aSubGroups = array();
     foreach ($this->_aTypeInfo['workorders'] as $key => $val) {
         if ($key == '__title__') {
             continue;
         }
         array_push($aSubGroups, array('key' => $key, 'desc' => $val[1]));
     }
     $t->assign('subgroups', $aSubGroups);
     $t->assign('subgroup', isset($_REQUEST['sub']) ? $_REQUEST['sub'] : '');
     if (isset($_REQUEST['chkLimitByDate']) && $_REQUEST['chkLimitByDate'] == 1) {
         $t->assign('VAL_DATEFROM', DCL_Sanitize::ToDate($_REQUEST['dateFrom']));
         $t->assign('VAL_DATETO', DCL_Sanitize::ToDate($_REQUEST['dateTo']));
         $t->assign('VAL_CHKLIMIT', ' checked');
     } else {
         $aFewDaysAgo = mktime(0, 0, 0, date('m'), date('d') - 1, date('Y'));
         $t->assign('VAL_DATEFROM', date($dcl_info['DCL_DATE_FORMAT'], $aFewDaysAgo));
         $t->assign('VAL_DATETO', date($dcl_info['DCL_DATE_FORMAT']));
         $t->assign('VAL_CHKLIMIT', '');
     }
     SmartyDisplay($t, 'htmlAggNav.tpl');
 }
开发者ID:ljvblfz,项目名称:mysoftwarebrasil,代码行数:34,代码来源:class.htmlAgg.inc.php

示例6: ShowEntryForm

 function ShowEntryForm($obj = '')
 {
     global $dcl_info, $g_oSec;
     $isEdit = is_object($obj);
     if (!$g_oSec->HasPerm(DCL_ENTITY_PERSONNEL, $isEdit ? DCL_PERM_MODIFY : DCL_PERM_ADD)) {
         return PrintPermissionDenied();
     }
     $Template =& CreateSmarty();
     $Template->assign('IS_EDIT', $isEdit);
     $oUserRole = CreateObject('dcl.dbUserRole');
     $oDept = CreateObject('dcl.htmlDepartments');
     if ($isEdit) {
         $Template->assign('VAL_PERSONNELID', $obj->id);
         $Template->assign('VAL_ACTIVE', $obj->active);
         $Template->assign('VAL_SHORT', $obj->short);
         $Template->assign('VAL_REPORTTO', $obj->reportto);
         $Template->assign('VAL_DEPARTMENT', $obj->department);
         $Template->assign('Roles', $oUserRole->GetGlobalRoles($obj->id));
         $oMeta =& CreateObject('dcl.DCL_MetadataDisplay');
         $aContact =& $oMeta->GetContact($obj->contact_id);
         $Template->assign('VAL_CONTACTID', $obj->contact_id);
         $Template->assign('VAL_CONTACTNAME', $aContact['name']);
     } else {
         $Template->assign('VAL_ACTIVE', 'Y');
         $Template->assign('VAL_REPORTTO', $GLOBALS['DCLID']);
         $Template->assign('VAL_DEPARTMENT', 0);
         $Template->assign('VAL_SHORT', '');
         $Template->assign('Roles', $oUserRole->GetGlobalRoles());
     }
     SmartyDisplay($Template, 'htmlPersonnelForm.tpl');
 }
开发者ID:ljvblfz,项目名称:mysoftwarebrasil,代码行数:31,代码来源:class.htmlPersonnelForm.inc.php

示例7: EndPage

 function EndPage()
 {
     if (isset($_REQUEST['bNoHeader'])) {
         return;
     }
     $t =& CreateSmarty();
     SmartyDisplay($t, 'footer.tpl');
 }
开发者ID:ljvblfz,项目名称:mysoftwarebrasil,代码行数:8,代码来源:class.Page.inc.php

示例8: Show

 function Show()
 {
     $this->sUUID = md5(uniqid(rand(), true));
     $this->t->assign_by_ref('MESSAGE', $this);
     if (!defined('__DCL_MESSAGE__')) {
         define('__DCL_MESSAGE__', 1);
     }
     SmartyDisplay($this->t, $this->sTemplate);
 }
开发者ID:ljvblfz,项目名称:mysoftwarebrasil,代码行数:9,代码来源:class.htmlMessage.inc.php

示例9: DisplayGraphForm

 function DisplayGraphForm()
 {
     global $dcl_info;
     $t =& CreateSmarty();
     $t->assign('CMB_DAYS', '<select id="days" name="days"><option value="7">7 ' . STR_WO_DAYS . '</option><option value="14">14 ' . STR_WO_DAYS . '</option></select>');
     $t->assign('VAL_TODAY', date($dcl_info['DCL_DATE_FORMAT']));
     $o = CreateObject('dcl.htmlProducts');
     $t->assign('CMB_PRODUCTS', $o->GetCombo(0, 'product', 'name', 0, 0, false));
     SmartyDisplay($t, 'htmlTicketGraph.tpl');
 }
开发者ID:ljvblfz,项目名称:mysoftwarebrasil,代码行数:10,代码来源:class.htmlTickets.inc.php

示例10: Refresh

function Refresh($toHere = 'index.php', $session_id = '', $domain = 'default')
{
    $oSmarty =& CreateSmarty();
    if (isset($_REQUEST['refer_to']) && $_REQUEST['refer_to'] != '') {
        $toHere .= sprintf('%srefer_to=%s', strpos($toHere, '?') > 0 ? '&' : '?', urlencode(urldecode($_REQUEST['refer_to'])));
    }
    $oSmarty->assign('URL', $toHere);
    SmartyDisplay($oSmarty, 'logout.tpl');
    exit;
}
开发者ID:ljvblfz,项目名称:mysoftwarebrasil,代码行数:10,代码来源:logout.php

示例11: show

 function show()
 {
     global $g_oSec;
     commonHeader();
     $t =& CreateSmarty();
     $t->assign('PERM_TICKETS', $g_oSec->HasAnyPerm(array(DCL_ENTITY_TICKET => array($g_oSec->PermArray(DCL_PERM_VIEW), $g_oSec->PermArray(DCL_PERM_VIEWACCOUNT), $g_oSec->PermArray(DCL_PERM_VIEWSUBMITTED)))));
     $t->assign('PERM_WORKORDERS', $g_oSec->HasAnyPerm(array(DCL_ENTITY_WORKORDER => array($g_oSec->PermArray(DCL_PERM_VIEW), $g_oSec->PermArray(DCL_PERM_VIEWACCOUNT), $g_oSec->PermArray(DCL_PERM_VIEWSUBMITTED)))));
     $t->assign('PERM_FAQ', $g_oSec->HasPerm(DCL_ENTITY_FAQ, DCL_PERM_VIEW));
     SmartyDisplay($t, 'htmlPublicMyDCL.tpl');
 }
开发者ID:ljvblfz,项目名称:mysoftwarebrasil,代码行数:10,代码来源:class.htmlPublicMyDCL.inc.php

示例12: ShowUserVsProductStatusForm

 function ShowUserVsProductStatusForm()
 {
     global $dcl_info;
     commonHeader();
     $objPersonnel = CreateObject('dcl.htmlPersonnel');
     $objProducts = CreateObject('dcl.htmlProducts');
     $t = CreateSmarty();
     $t->assign('CMB_PEOPLE', $objPersonnel->GetCombo(0, 'people', 'lastfirst', 8, false));
     $t->assign('CMB_PRODUCTS', $objProducts->GetCombo(0, 'products', 'name', 0, 8, false));
     SmartyDisplay($t, 'htmlTicketStatisticsForm.tpl');
 }
开发者ID:ljvblfz,项目名称:mysoftwarebrasil,代码行数:11,代码来源:class.htmlTicketStatistics.inc.php

示例13: Show

 function Show()
 {
     global $dcl_info, $g_oSec;
     if (!$g_oSec->HasPerm(DCL_ENTITY_ADMIN, DCL_PERM_VIEW)) {
         return PrintPermissionDenied();
     }
     $oSmarty =& CreateSmarty();
     $oSmarty->assign('TXT_SETUPDESC', STR_ADMIN_SETUPDESC);
     $oSmarty->assign('TXT_SETUPTITLE', STR_ADMIN_SETUPTITLE);
     $oSmarty->assign('VAL_OPTIONS', $this->GetOptions());
     SmartyDisplay($oSmarty, 'htmlAdminMain.tpl');
 }
开发者ID:ljvblfz,项目名称:mysoftwarebrasil,代码行数:12,代码来源:class.htmlAdminMain.inc.php

示例14: displayPasswdForm

 function displayPasswdForm()
 {
     global $dcl_info, $g_oSec;
     if (!$g_oSec->HasPerm(DCL_ENTITY_PREFS, DCL_PERM_PASSWORD)) {
         return PrintPermissionDenied();
     }
     $oSmarty =& CreateSmarty();
     $oSmarty->assign('PERM_ADMIN', $g_oSec->HasPerm(DCL_ENTITY_GLOBAL, DCL_PERM_ADMIN));
     $oSmarty->assign('VAL_USERID', $GLOBALS['DCLID']);
     $oSmarty->assign('VAL_USERNAME', $GLOBALS['DCLNAME']);
     SmartyDisplay($oSmarty, 'htmlPersonnelPasswdForm.tpl');
 }
开发者ID:ljvblfz,项目名称:mysoftwarebrasil,代码行数:12,代码来源:class.htmlPersonnel.inc.php

示例15: ShowUserVsProductStatusForm

 function ShowUserVsProductStatusForm()
 {
     global $dcl_info, $g_oSec;
     commonHeader();
     if (!$g_oSec->HasPerm(DCL_ENTITY_WORKORDER, DCL_PERM_VIEW)) {
         return PrintPermissionDenied();
     }
     $objPersonnel = CreateObject('dcl.htmlPersonnel');
     $objProducts = CreateObject('dcl.htmlProducts');
     $t =& CreateSmarty();
     $t->assign('CMB_PEOPLE', $objPersonnel->GetCombo(0, 'people', 'lastfirst', 8, false));
     $t->assign('CMB_PRODUCTS', $objProducts->GetCombo(0, 'products', 'name', 0, 8, false));
     SmartyDisplay($t, 'htmlWOStatisticsForm.tpl');
 }
开发者ID:ljvblfz,项目名称:mysoftwarebrasil,代码行数:14,代码来源:class.htmlWOStatistics.inc.php


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