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


PHP CreateTemplate函数代码示例

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


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

示例1: Show

 function Show($obj = '')
 {
     global $dcl_info, $g_oSec;
     if (!$g_oSec->HasPerm(DCL_ENTITY_LOOKUP, $this->mode == DCL_MODE_EDIT ? DCL_PERM_MODIFY : DCL_PERM_ADD)) {
         return PrintPermissionDenied();
     }
     $Template = CreateTemplate(array('hForm' => 'htmlLookup.tpl'));
     $Template->set_var('VAL_FORMACTION', menuLink());
     $Template->set_var('BTN_SAVE', STR_CMMN_SAVE);
     $Template->set_var('BTN_RESET', STR_CMMN_RESET);
     $Template->set_var('CMB_ACTIVE', GetYesNoCombo($this->active, 'dcl_lookup_active', 0, false));
     $Template->set_var('VAL_NAME', htmlspecialchars($this->name));
     $Template->set_var('TXT_NAME', STR_LKP_NAME);
     $Template->set_var('TXT_ACTIVE', STR_LKP_ACTIVE);
     $Template->set_var('TXT_HIGHLIGHTEDNOTE', STR_CMMN_HIGHLIGHTEDNOTE);
     if ($this->mode == DCL_MODE_EDIT) {
         $Template->set_var('TXT_TITLE', STR_LKP_EDITTITLE);
         $hiddenvars = GetHiddenVar('menuAction', 'boLookup.dbmodify');
         $hiddenvars .= GetHiddenVar('dcl_lookup_id', $this->id);
     } else {
         $Template->set_var('TXT_TITLE', STR_LKP_ADDTITLE);
         $hiddenvars = GetHiddenVar('menuAction', 'boLookup.dbadd');
     }
     $Template->set_var('HIDDEN_VARS', $hiddenvars);
     $Template->pparse('out', 'hForm');
 }
开发者ID:ljvblfz,项目名称:mysoftwarebrasil,代码行数:26,代码来源:class.htmlLookup.inc.php

示例2: displayversioninfo

 function displayversioninfo()
 {
     global $dcl_info;
     if (!empty($_SERVER)) {
         extract($_SERVER);
     }
     commonHeader();
     $Template = CreateTemplate(array('hForm' => 'htmlVersion.tpl'));
     $Template->set_var('TXT_TITLE', STR_VER_TITLE);
     $Template->set_var('TXT_YOURVER', STR_VER_YOURVER);
     $Template->set_var('TXT_DCL', STR_VER_DCL);
     $Template->set_var('TXT_SERVEROS', STR_VER_SERVEROS);
     $Template->set_var('TXT_SERVERNAME', STR_VER_SERVERNAME);
     $Template->set_var('TXT_WEBSERVER', STR_VER_WEBSERVER);
     $Template->set_var('TXT_PHPVER', STR_VER_PHPVER);
     $Template->set_var('TXT_YOURIP', STR_VER_YOURIP);
     $Template->set_var('TXT_YOURBROWSER', STR_VER_YOURBROWSER);
     $Template->set_var('VAL_DCLVERSION', $dcl_info['DCL_VERSION']);
     $Template->set_var('VAL_SERVERNAME', $SERVER_NAME . '(' . $HTTP_HOST . ')');
     $Template->set_var('VAL_SERVERSOFTWARE', $SERVER_SOFTWARE);
     $Template->set_var('VAL_PHPVERSION', phpversion());
     $Template->set_var('VAL_REMOTEADDR', $REMOTE_ADDR);
     $Template->set_var('VAL_HTTPUSERAGENT', $HTTP_USER_AGENT);
     if (isset($OSTYPE) && isset($HOSTTYPE)) {
         $Template->set_var('VAL_SERVEROS', $OSTYPE . '-' . $HOSTTYPE);
     } elseif (isset($OSTYPE)) {
         $Template->set_var('VAL_SERVEROS', $OSTYPE);
     } elseif (isset($HOSTTYPE)) {
         $Template->set_var('VAL_SERVEROS', $HOSTTYPE);
     } else {
         $Template->set_var('VAL_SERVEROS', '');
     }
     $Template->pparse('out', 'hForm');
 }
开发者ID:ljvblfz,项目名称:mysoftwarebrasil,代码行数:34,代码来源:class.htmlVersion.inc.php

示例3: htmlWiki

 function htmlWiki()
 {
     $this->t = CreateTemplate(array('hForm' => 'htmlWiki.tpl'));
     $this->t->set_block('hForm', 'display', 'hDisplay');
     $this->t->set_block('hForm', 'edit', 'hEdit');
     $this->t->set_block('hForm', 'editlink', 'hEditlink');
     $this->t->set_block('hForm', 'noedit', 'hNoedit');
     $this->t->set_block('hForm', 'wiki', 'hWiki');
     $this->t->set_var('hDisplay', '');
     $this->t->set_var('hEdit', '');
     $this->t->set_var('hEditlink', '');
     $this->t->set_var('hNoedit', '');
     $this->t->set_var('hWiki', '');
     $this->aLockedPages = array('RecentChanges');
 }
开发者ID:ljvblfz,项目名称:mysoftwarebrasil,代码行数:15,代码来源:class.htmlWiki.inc.php

示例4: GetHTML

 function GetHTML()
 {
     global $dcl_info;
     $this->t = CreateTemplate(array('hForm' => 'htmlSelector.tpl'));
     $this->t->set_block('hForm', 'avail', 'hAvail');
     $this->t->set_block('hForm', 'sel', 'hSel');
     $this->t->set_var('hAvail', '');
     $this->t->set_var('hSel', '');
     $this->t->set_var('TXT_TITLE', 'Select Organizations');
     $this->t->set_var('TXT_AVAILABLE', 'Available');
     $this->t->set_var('TXT_SELECTED', 'Selected');
     $this->t->set_var('TXT_SAVE', STR_CMMN_SAVE);
     $this->t->set_var('TXT_CANCEL', STR_CMMN_CANCEL);
     switch ($_REQUEST['what']) {
         case 'accounts':
         case 'dcl_org':
             $this->SetOptionsFromDb('dcl_org', 'org_id', 'name', "active='Y'", 'name');
             break;
         default:
             PrintPermissionDenied();
             return "";
     }
     return $this->t->parse('out', 'hForm');
 }
开发者ID:ljvblfz,项目名称:mysoftwarebrasil,代码行数:24,代码来源:class.htmlSelector.inc.php

示例5: GetDB

    {
        if (!$this->validate()) {
            return FALSE;
        }
        $vDB = GetDB();
        $vValues = $this->getSubmitValues(TRUE);
        //            $vId = $vValues['id'];
        $vRecord = array();
        if (!empty($vValues['id'])) {
            $vRecord['id'] = $vValues['id'];
        }
        CopyRecordStrValue($vRecord, $vValues, 'name');
        $vResult = $vDB->InsertOrUpdateById('rb_directions', $vRecord);
        //       var_dump($vRecord);
        //       var_dump($vDB);
        return $vResult;
    }
}
$vId = array_key_exists('id', $_GET) ? $_GET['id'] : '';
$vForm = new TEditor($vId);
if (!$vForm->Save()) {
    $vTemplate =& CreateTemplate();
    $vRenderer =& CreateRenderer($vTemplate);
    $vForm->accept($vRenderer);
    $vView =& new TBaseView();
    $vView->form = $vRenderer->toObject();
    $vTemplate->compile('refs/direction_edit.html');
    $vTemplate->outputObject($vView);
} else {
    RedirectToList('directions.html');
}
开发者ID:uisluu,项目名称:emst,代码行数:31,代码来源:direction_edit.php

示例6: SubmitSelectedWO

 function SubmitSelectedWO($selected)
 {
     commonHeader();
     global $dcl_info;
     $Template = CreateTemplate(array('hForm' => 'htmlBuildManagerEntry.tpl'));
     $Template->set_var('COLOR_LIGHT', $dcl_info['DCL_COLOR_LIGHT']);
     $Template->set_var('VAL_FORMACTION', menuLink());
     $Template->set_var('TXT_BM_ADD_RELEASE', STR_BM_ADDBUILD_TITLE);
     $Template->set_var('TXT_BM_VERSIONNAME', STR_BM_VERSIONNAME);
     $Template->set_var('TXT_BM_BUILDNAME', STR_BM_BUILDNAME);
     $Template->set_var('CMB_PRODUCT', $this->GetCombo($_REQUEST['DCLID'], 'project', 'name'));
     $Template->set_var('BTN_SUBMIT', STR_BM_SUBMIT);
     $Template->pparse('out', 'hForm');
     $objWO = CreateObject('dcl.dbWorkorders');
     $objWO->Connect();
     while (list($key, $jcnseq) = each($selected)) {
         list($jcn, $seq) = explode('.', $jcnseq);
         $sql = "SELECT jcn,seq,status,summary FROM workorders where jcn={$jcn} and seq={$seq}";
         $objWO->Query($sql);
         while ($objWO->next_record()) {
             echo $objWO->f(3);
             echo "<BR>";
         }
     }
 }
开发者ID:ljvblfz,项目名称:mysoftwarebrasil,代码行数:25,代码来源:class.htmlBuildManager.inc.php

示例7: IncludeCalendar

function IncludeCalendar()
{
    if (defined('DCL_CALENDAR_INCLUDED')) {
        return;
    }
    define('DCL_CALENDAR_INCLUDED', 1);
    $t = CreateTemplate(array('hForm' => 'htmlCalendar.tpl'));
    $calDateFormat = str_replace('mm', '%m', GetJSDateFormat());
    $calDateFormat = str_replace('dd', '%d', $calDateFormat);
    $calDateFormat = str_replace('y', '%Y', $calDateFormat);
    $t->set_var('VAL_JSDATEFORMAT', $calDateFormat);
    $t->pparse('out', 'hForm');
}
开发者ID:ljvblfz,项目名称:mysoftwarebrasil,代码行数:13,代码来源:functions.inc.php

示例8: InitTemplate

 function InitTemplate()
 {
     $this->Template = CreateTemplate(array('hForm' => 'htmlView.tpl'));
     $this->_CreateBlocks();
     $this->_ResetBlocks();
 }
开发者ID:ljvblfz,项目名称:mysoftwarebrasil,代码行数:6,代码来源:class.htmlView.inc.php

示例9: Main

 function Main()
 {
     $this->t = CreateTemplate(array('hForm' => 'htmlWindowListMain.tpl'));
     $this->GetHTML('main');
     $this->t->pparse('out', 'hForm');
     exit;
 }
开发者ID:ljvblfz,项目名称:mysoftwarebrasil,代码行数:7,代码来源:class.htmlWindowList.inc.php

示例10: ShowEntryForm

 function ShowEntryForm()
 {
     global $dcl_info, $g_oSec;
     if (!$g_oSec->HasPerm(DCL_ENTITY_SAVEDSEARCH, DCL_PERM_ADD)) {
         return PrintPermissionDenied();
     }
     $Template = CreateTemplate(array('hForm' => 'htmlViewForm.tpl'));
     $Template->set_var('TXT_TITLE', STR_VW_ADDVIEW);
     $Template->set_var('TXT_PUBLIC', STR_VW_PUBLIC);
     $Template->set_var('TXT_NAME', STR_VW_NAME);
     $Template->set_var('BTN_SAVE', STR_CMMN_SAVE);
     $Template->set_var('BTN_RESET', STR_CMMN_RESET);
     $Template->set_var('TXT_HIGHLIGHTEDNOTE', STR_CMMN_HIGHLIGHTEDNOTE);
     $Template->set_var('VAL_FORMACTION', menuLink());
     $Template->set_var('BTN_CANCEL', STR_CMMN_CANCEL);
     $Template->set_var('VAL_DCLID', $GLOBALS['DCLID']);
     $Template->set_var('VAL_TABLENAME', $_REQUEST['vt']);
     // Add the URL pieces
     $viewUrl = '';
     $objView = CreateObject("dcl.boView");
     $o = CreateObject('dcl.dbPersonnel');
     while (list($key, $val) = each($objView->urlpieces)) {
         if (isset($_REQUEST[$val])) {
             $viewUrl .= sprintf('<input type="hidden" name="%s" value="%s">', $val, htmlspecialchars($o->GPCStripSlashes($_REQUEST[$val])));
         }
     }
     $Template->set_var('VAL_VIEWURL', $viewUrl);
     $Template->set_var('CMB_ISPUBLIC', GetYesNoCombo("N", "ispublic", 0, false));
     $Template->pparse('out', 'hForm');
 }
开发者ID:ljvblfz,项目名称:mysoftwarebrasil,代码行数:30,代码来源:class.htmlViews.inc.php

示例11: ShowDeleteAttachmentYesNo

 function ShowDeleteAttachmentYesNo($jcn, $seq, $filename)
 {
     global $dcl_info, $g_oSec;
     if (!$g_oSec->HasPerm(DCL_ENTITY_WORKORDER, DCL_PERM_REMOVEFILE, $jcn, $seq)) {
         return PrintPermissionDenied();
     }
     $Template = CreateTemplate(array('hForm' => 'htmlWorkOrderDelAttachment.tpl'));
     $Template->set_var('TXT_TITLE', STR_WO_DELETEATTACHMENTTITLE);
     $Template->set_var('VAL_JCN', $jcn);
     $Template->set_var('VAL_SEQ', $seq);
     $Template->set_var('VAL_FILENAME', htmlspecialchars($filename));
     $Template->set_var('VAL_FORMACTION', menuLink());
     $Template->set_var('TXT_DELATTCONFIRM', sprintf(STR_WO_DELATTCONFIRM, htmlspecialchars($filename)));
     $Template->set_var('BTN_YES', STR_CMMN_YES);
     $Template->set_var('BTN_NO', STR_CMMN_NO);
     $Template->pparse('out', 'hForm');
 }
开发者ID:ljvblfz,项目名称:mysoftwarebrasil,代码行数:17,代码来源:class.htmlWorkorders.inc.php

示例12: _renderForm

 function _renderForm(&$page)
 {
     global $gTemplateName;
     $vContainer =& $page->controller->container();
     $vTemplate =& CreateTemplate();
     $vRenderer =& CreateRenderer($vTemplate);
     $page->accept($vRenderer);
     $vView = new TPageView();
     $vView->page =& $page;
     $vView->form =& $vRenderer->toObject();
     $vDefaults =& $vContainer['defaults'];
     $vValues =& $vContainer['values'];
     $vBaseInfoDefaults =& $vDefaults['BaseInfo'];
     $vBaseInfoValues =& $vValues['BaseInfo'];
     $vFirstPageDefaults =& $vDefaults[DatePageName(0)];
     $vFirstPageValues =& $vValues[DatePageName(0)];
     $vView->case_id = @$vBaseInfoDefaults['id'];
     $vView->create_time = @Date2ReadableLong($vBaseInfoDefaults['create_time']);
     $vBaseInfo =& $vBaseInfoDefaults;
     if (DataAvailable($vBaseInfoValues)) {
         $vBaseInfo =& $vBaseInfoValues;
     }
     $vView->name = FormatNameEx($vBaseInfo);
     if (DocsEmpty($vBaseInfo)) {
         $vView->docs_is_empty = true;
     }
     $vView->category = @FormatCategory($vBaseInfo['employment_category_id']);
     $vView->age = 'полных лет ' . CalcAge(DateValueToStr($vBaseInfo['born_date']));
     $vView->paytype = @GetPaytypeName($vBaseInfo['paytype']);
     if (DataAvailable($vFirstPageValues)) {
         $vView->disability_from_date = empty($vFirstPageValues['ill_doc']) ? '' : Date2ReadableLong(DateValueToStr($vFirstPageValues['disability_from_date']));
     } else {
         $vView->disability_from_date = empty($vFirstPageDefaults['ill_doc']) ? '' : Date2ReadableLong($vBaseInfoDefaults['disability_from_date']);
     }
     if (!empty($vContainer['_PopupURL'])) {
         $vView->popup_url = $vContainer['_PopupURL'];
         unset($vContainer['_PopupURL']);
     }
     $vTemplate->compile($gTemplateName);
     $vTemplate->outputObject($vView);
 }
开发者ID:uisluu,项目名称:emst,代码行数:41,代码来源:case_edit_common.php


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