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


PHP Template::set_var方法代码示例

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


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

示例1: MG_editRSS

function MG_editRSS()
{
    global $_CONF, $_MG_CONF, $_TABLES, $_USER, $LANG_MG00, $LANG_MG01;
    $retval = '';
    $T = new Template($_MG_CONF['template_path'] . '/admin');
    $T->set_file('admin', 'rssedit.thtml');
    $T->set_var('site_url', $_CONF['site_url']);
    $T->set_var('site_admin_url', $_CONF['site_admin_url']);
    $rss_full_select = '<input type="checkbox" name="rss_full_enabled" value="1" ' . ($_MG_CONF['rss_full_enabled'] ? ' checked="checked"' : '') . '/>';
    $rss_type_select = "<select name='rss_feed_type'>";
    $rss_type_select .= "<option value='RSS-2.0'" . ($_MG_CONF['rss_feed_type'] == "RSS-2.0" ? ' selected="selected"' : "") . ">RSS2.0</option>";
    $rss_type_select .= "<option value='RSS-1.0'" . ($_MG_CONF['rss_feed_type'] == "RSS-1.0" ? ' selected="selected"' : "") . ">RSS1.0</option>";
    $rss_type_select .= "<option value='RSS-0.91'" . ($_MG_CONF['rss_feed_type'] == "RSS-0.91" ? ' selected="selected"' : "") . ">RSS0.91</option>";
    $rss_type_select .= "<option value='PIE-0.1'" . ($_MG_CONF['rss_feed_type'] == "PIE-0.1" ? ' selected="selected"' : "") . ">PIE0.1</option>";
    $rss_type_select .= "<option value='ATOM-1.0'" . ($_MG_CONF['rss_feed_type'] == "ATOM-1.0" ? ' selected="selected"' : "") . ">ATOM</option>";
    $rss_type_select .= "<option value='ATOM-0.3'" . ($_MG_CONF['rss_feed_type'] == "ATOM-0.3" ? ' selected="selected"' : "") . ">ATOM0.3</option>";
    $rss_type_select .= "</select>";
    $hide_email_select = '<input type="checkbox" name="hide_email" value="1" ' . ($_MG_CONF['hide_author_email'] ? ' checked="checked"' : '') . '/>';
    $rss_ignore_empty_select = '<input type="checkbox" name="rss_ignore_empty" value="1" ' . ($_MG_CONF['rss_ignore_empty'] ? ' checked="checked"' : '') . '/>';
    $rss_anonymous_only_select = '<input type="checkbox" name="rss_anonymous_only" value="1" ' . ($_MG_CONF['rss_anonymous_only'] ? ' checked="checked"' : '') . '/>';
    $T->set_var(array('lang_rss_options' => $LANG_MG01['rss_options'], 'lang_rss_full' => $LANG_MG01['rss_full'], 'lang_rss_type' => $LANG_MG01['rss_type'], 'lang_rss_ignore_empty' => $LANG_MG01['rss_ignore_empty'], 'lang_rss_anonymous_only' => $LANG_MG01['rss_anonymous_only'], 'lang_rss_feed_name' => $LANG_MG01['rss_feed_name'], 'lang_save' => $LANG_MG01['save'], 'lang_cancel' => $LANG_MG01['cancel'], 'lang_reset' => $LANG_MG01['reset'], 'rss_full_select' => $rss_full_select, 'rss_type_select' => $rss_type_select, 'hide_email_select' => $hide_email_select, 'lang_hide_email' => $LANG_MG01['hide_email'], 'rss_ignore_empty_select' => $rss_ignore_empty_select, 'rss_anonymous_only_select' => $rss_anonymous_only_select, 'rss_feed_name' => $_MG_CONF['rss_feed_name'], 's_form_action' => $_MG_CONF['admin_url'] . 'rss.php'));
    $T->parse('output', 'admin');
    $retval .= $T->finish($T->get_var('output'));
    return $retval;
}
开发者ID:spacequad,项目名称:glfusion,代码行数:25,代码来源:rss.php

示例2: MG_selectUsers

function MG_selectUsers($page)
{
    global $glversion, $_CONF, $_MG_CONF, $_TABLES, $_USER, $LANG_MG00, $LANG_MG01;
    $retval = '';
    $T = new Template($_MG_CONF['template_path']);
    $T->set_file('admin', 'createmembers.thtml');
    $T->set_var(array('site_admin_url' => $_CONF['site_admin_url'], 'site_url' => $_CONF['site_url'], 'xhtml' => XHTML));
    $T->set_block('admin', 'UserRow', 'uRow');
    $start = $page * 50;
    $end = 50;
    $sql = "SELECT COUNT(gl.uid) AS count " . "FROM {$_TABLES['users']} AS gl " . "LEFT JOIN {$_TABLES['mg_userprefs']} AS mg ON gl.uid=mg.uid " . "WHERE gl.status = 3 AND gl.uid > 2 AND (mg.member_gallery IS NULL OR mg.member_gallery < 1)";
    $result = DB_query($sql);
    list($total_records) = DB_fetchArray($result);
    $sql = "SELECT gl.uid, gl.status, gl.username, gl.fullname, mg.member_gallery " . "FROM {$_TABLES['users']} AS gl " . "LEFT JOIN {$_TABLES['mg_userprefs']} AS mg ON gl.uid=mg.uid " . "WHERE gl.status = 3 AND gl.uid > 2 AND (mg.member_gallery IS NULL OR mg.member_gallery < 1) " . "ORDER BY gl.username ASC LIMIT {$start},{$end}";
    $result = DB_query($sql);
    while ($row = DB_fetchArray($result)) {
        if ($glversion[1] < 4) {
            $row['status'] = 3;
        }
        $uid = $row['uid'];
        $remote = SEC_inGroup("Remote Users", $uid) ? '(r)' : '';
        $username = $row['username'];
        $member_gallery = $row['member_gallery'];
        $T->set_var(array('uid' => $uid, 'username' => $username . ' ' . $remote . ' - ' . $row['fullname'], 'select' => '<input type="checkbox" name="user[]" value="' . $uid . '"' . XHTML . '>'));
        $T->parse('uRow', 'UserRow', true);
    }
    $T->set_var(array('lang_userid' => $LANG_MG01['userid'], 'lang_username' => $LANG_MG01['username'], 'lang_select' => $LANG_MG01['select'], 'lang_checkall' => $LANG_MG01['check_all'], 'lang_uncheckall' => $LANG_MG01['uncheck_all'], 'lang_save' => $LANG_MG01['save'], 'lang_cancel' => $LANG_MG01['cancel'], 'lang_reset' => $LANG_MG01['reset'], 's_form_action' => $_MG_CONF['admin_url'] . 'createmembers.php', 'pagenav' => COM_printPageNavigation($_MG_CONF['admin_url'] . 'createmembers.php', $page + 1, ceil($total_records / 50))));
    $retval .= $T->finish($T->parse('output', 'admin'));
    return $retval;
}
开发者ID:mistgrass,项目名称:geeklog-ivywe,代码行数:30,代码来源:createmembers.php

示例3: disp

 function disp()
 {
     $t = new Template('../template/system');
     $t->set_file('f', 'loginfo.html');
     $t->set_block('f', 'row', 'r');
     $rs = $this->dbObj->GetArray('select lt.logtypename,l.* from ' . WEB_ADMIN_TABPOX . 'log l,' . WEB_ADMIN_TABPOX . 'logtype lt where l.logtypeid=lt.logtypeid and l.srcuserid=' . $this->getUid());
     foreach ($rs as $v) {
         $t->set_var($v);
         $ok = $this->loginObj->_superid ? false : true;
         $t->set_var('del', $this->getDelStr($this->getUid(), $v['logid'], 'a', 'loginfo.php?deltype=log', $ok));
         $t->parse('r', 'row', true);
     }
     $t->set_block('f', 'row2', 'r2');
     $rs = $this->dbObj->GetArray("select u.username,m.* from " . WEB_ADMIN_TABPOX . "message m," . WEB_ADMIN_TABPOX . "user u where m.userid = u.userid and  msgtitle='组长登录' and sendtoids like '" . $this->getUid() . "'");
     foreach ($rs as $v) {
         if (!$v['hadratify']) {
             if (!$this->loginObj->_superid) {
                 $v['accept'] = '<a href="loginfo.php?action=accept&id=' . $v['msgid'] . '">认可</a>';
             } else {
                 $v['accept'] = '认可';
             }
         } else {
             $v['accept'] = '已认可';
         }
         $t->set_var($v);
         $ok = $this->loginObj->_superid ? false : true;
         $t->set_var('del', $this->getDelStr($this->getUid(), $v['msgid'], 'a', 'loginfo.php?deltype=msg', $ok));
         $t->parse('r2', 'row2', true);
     }
     $t->parse('out', 'f');
     $t->p('out');
 }
开发者ID:TonyWoo,项目名称:cmlerp,代码行数:32,代码来源:loginfo.php

示例4: MG_editUser

function MG_editUser($uid)
{
    global $_CONF, $_MG_CONF, $_TABLES, $_USER, $LANG_MG00, $LANG_MG01;
    $retval = '';
    $active = 0;
    $quota = 0;
    $username = DB_getItem($_TABLES['users'], 'username', "uid=" . $uid);
    $result = DB_query("SELECT active,quota FROM {$_TABLES['mg_userprefs']} WHERE uid=" . $uid);
    $nRows = DB_numRows($result);
    if ($nRows > 0) {
        $row = DB_fetchArray($result);
        $active = $row['active'];
        $quota = $row['quota'] / 1048576;
    } else {
        $active = 1;
        $quota = $_MG_CONF['member_quota'] / 1048576;
    }
    $T = new Template($_MG_CONF['template_path'] . '/admin');
    $T->set_file('admin', 'useredit.thtml');
    $T->set_var('site_url', $_CONF['site_url']);
    $T->set_var('site_admin_url', $_CONF['site_admin_url']);
    $active_select = '<input type="checkbox" name="active" value="1" ' . ($active ? ' CHECKED' : '') . '/>';
    $T->set_var(array('s_form_action' => $_MG_CONF['admin_url'] . 'edituser.php', 'lang_user_edit' => $LANG_MG01['edit_user'], 'lang_username' => $LANG_MG01['username'], 'lang_active' => $LANG_MG01['active'], 'lang_quota' => $LANG_MG01['quota'], 'lang_save' => $LANG_MG01['save'], 'lang_cancel' => $LANG_MG01['cancel'], 'lang_reset' => $LANG_MG01['reset'], 'lang_unlimited' => $LANG_MG01['zero_unlimited'], 'uid' => $uid, 'active' => $active_select, 'quota' => $quota, 'username' => $username));
    $T->parse('output', 'admin');
    $retval .= $T->finish($T->get_var('output'));
    return $retval;
}
开发者ID:spacequad,项目名称:glfusion,代码行数:27,代码来源:edituser.php

示例5: MG_adminEXIF

function MG_adminEXIF()
{
    global $_TABLES, $_MG_CONF, $_CONF, $LANG_MG01, $LANG_MG04;
    $retval = '';
    $T = new Template($_MG_CONF['template_path'] . '/admin/');
    $T->set_file('admin', 'exif_tags.thtml');
    $T->set_var('site_url', $_CONF['site_url']);
    $T->set_var('site_admin_url', $_CONF['site_admin_url']);
    $T->set_block('admin', 'exifRow', 'eRow');
    $sql = "SELECT * FROM {$_TABLES['mg_exif_tags']}";
    $result = DB_query($sql);
    $nRows = DB_numRows($result);
    for ($i = 0; $i < $nRows; $i++) {
        $row = DB_fetchArray($result);
        $properties[] = $row['name'];
        $tag[$row['name']][] = $row['selected'];
    }
    $exifKeys = getExifKeys();
    $x = 0;
    foreach ($properties as $property) {
        $title = $exifKeys[$property][0];
        $T->set_var(array('exif_tag' => $title, 'selected' => $tag[$property][0] ? ' checked="checked"' : '', 'tag' => $property, 'rowcounter' => $x % 2));
        $T->parse('eRow', 'exifRow', true);
        $x++;
    }
    $T->set_var(array('lang_select' => $LANG_MG01['select'], 'lang_exiftag' => $LANG_MG01['exiftag'], 'lang_exif_admin_help' => $LANG_MG01['exif_admin_help'], 'lang_check_all' => $LANG_MG01['check_all'], 'lang_uncheck_all' => $LANG_MG01['uncheck_all'], 'lang_save' => $LANG_MG01['save'], 'lang_cancel' => $LANG_MG01['cancel'], 's_form_action' => $_MG_CONF['admin_url'] . 'exif_admin.php'));
    $T->parse('output', 'admin');
    $retval .= $T->finish($T->get_var('output'));
    return $retval;
}
开发者ID:spacequad,项目名称:glfusion,代码行数:30,代码来源:exif_admin.php

示例6: disp

 function disp()
 {
     //定义模板
     $t = new Template('../template/basic');
     $t->set_file('f', 'upmorefile.html');
     $t->unknowns = "remove";
     $t->left_delimiter = "[#";
     //修改左边界符为[#
     $t->right_delimiter = "#]";
     //修改右边界符#]
     $t->set_block('f', 'mainlist', 'ml');
     //设置分类
     $t->set_var('ml');
     $inrs =& $this->dbObj->Execute('select * from ' . WEB_ADMIN_TABPOX . 'apparatus  where agencyid =' . $_SESSION["currentorgan"]);
     //echo 'select * from '.WEB_ADMIN_TABPOX.'roomgroup  where agencyid ='.$_SESSION["currentorgan"];
     while ($inrrs =& $inrs->FetchRow()) {
         $t->set_var($inrrs);
         $t->parse('ml', 'mainlist', true);
     }
     $inrs->Close();
     $t->set_var('add', $this->getAddStr('img'));
     $t->set_var('path', WEB_ADMIN_HTTPPATH . '/common/');
     $t->parse('out', 'f');
     $t->p('out');
 }
开发者ID:TonyWoo,项目名称:cmlerp,代码行数:25,代码来源:upmorefile_equip=.php

示例7: disp

 function disp()
 {
     //定义模板
     $t = new Template('../template/finace');
     $t->set_file('f', 'nianjie.html');
     $t->unknowns = "remove";
     $t->left_delimiter = "[#";
     //修改左边界符为[#
     $t->right_delimiter = "#]";
     //修改右边界符#]
     $annualbatch_name = date('Y', time()) . "年";
     $t->set_var('annualbatch_name', $annualbatch_name);
     //上次年结
     $bgdate = $this->dbObj->getone('select enddate  from ' . WEB_ADMIN_TABPOX . 'annualbatch  where agencyid =' . $_SESSION["currentorgan"] . '  order by annualbatch_id desc');
     if (!$bgdate) {
         //如果没有月结过 查找最早的单时间。
         $bgdate = $this->dbObj->getone('select creattime  from ' . WEB_ADMIN_TABPOX . 'sell  where agencyid =' . $_SESSION["currentorgan"] . ' order by sell_id asc');
         $bgdate = date('Y-m-d', strtotime($bgdate));
     } else {
         $bgdate = date("Y-m-d", strtotime("{$m}+1 days", strtotime($bgdate)));
         //设置开始时间为上次月结的下一天
     }
     $t->set_var('bgdate', $bgdate);
     $t->set_var('enddate', date('Y-m-d'));
     $t->set_var('path', WEB_ADMIN_HTTPPATH . '/common/');
     $t->parse('out', 'f');
     $t->p('out');
 }
开发者ID:TonyWoo,项目名称:cmlerp,代码行数:28,代码来源:nianjie.php

示例8: goDispAppend

 function goDispAppend()
 {
     $t = new Template('../template/system');
     $t->set_file('f', 'contactdetail.html');
     $t->set_block('f', 'gender', 'g');
     if ($this->isAppend) {
         $t->set_var('action', 'add');
         $t->set_var('actionName', '增加');
     } else {
         $updid = $_GET[MODIFY . 'id'] + 0;
         $t->set_var($this->dbObj->GetRow('SELECT * FROM ' . WEB_ADMIN_TABPOX . 'contact WHERE contactid = ' . $updid));
         $t->set_var('updid', $updid);
         $t->set_var('action', 'upd');
         $t->set_var('actionName', '修改');
         $inrs2 =& $this->dbObj->Execute("select * from " . WEB_ADMIN_TABPOX . "contact where contactid =" . $updid);
         while ($inrrs2 =& $inrs2->FetchRow()) {
             $sex = $inrrs2['gender'];
         }
         $inrs2->Close();
     }
     $t->set_var('agentid', $_GET['agentid']);
     $t->set_var('shopid', $_GET['shopid']);
     $t->set_var('gender', $this->gender($sex));
     $t->parse('g', 'gender', true);
     $t->set_var('path', WEB_ADMIN_HTTPPATH . '/common/');
     $t->parse('out', 'f');
     $t->p('out');
 }
开发者ID:TonyWoo,项目名称:cmlerp,代码行数:28,代码来源:contact.php

示例9: disp

 function disp()
 {
     $t = new Template(WEB_ADMIN_TMPPATH);
     $dispObj = new DispAttachRule(&$this->dbObj, $this->getUid());
     $t->set_file('f', 'pageconfig.html');
     $t->set_block('f', 'row', 'r');
     $p = $_GET['pageid'] + 0;
     $sql = "\r\n\t\t\tSELECT c.configvalue AS userdefalut,o.* FROM " . WEB_ADMIN_TABPOX . "otherrule o \r\n\t\t\t\tLEFT OUTER JOIN " . WEB_ADMIN_TABPOX . "config c ON ( (o.otherruleid = c.otherruleid) AND (c.userid = " . $this->getUid() . ") ) \r\n\t\t\tWHERE (o.isrule = 0) AND (o.issystemvar = 0) AND (o.ruleid = {$p})\r\n\t\t";
     $rs = $this->dbObj->GetArray($sql);
     foreach ($rs as $v) {
         $t->set_var($dispObj->disp($v, $v['userdefalut']));
         $t->parse('r', 'row', true);
     }
     $r = '';
     $m = new Menu(&$this->dbObj);
     $s = $m->getRelating($p);
     for ($i = 0; $i < count($s); $i++) {
         if ($i == 0) {
             $r = $s[$i]['rulename'];
         } else {
             $r .= ' > ' . $s[$i]['rulename'];
         }
     }
     $t->set_var('updid', $p);
     $t->set_var('address', $r);
     $t->set_var('path', WEB_ADMIN_HTTPPATH . '/common/');
     $t->parse('out', 'f');
     $t->p('out');
 }
开发者ID:TonyWoo,项目名称:cmlerp,代码行数:29,代码来源:pageconfig.php

示例10: polllist

/**
* Shows all polls in system
*
* List all the polls on the system if no $pid is provided
*
* @return   string          HTML for poll listing
*
*/
function polllist()
{
    global $_CONF, $_TABLES, $_USER, $_PO_CONF, $LANG25, $LANG_LOGIN, $LANG_POLLS;
    $retval = '';
    if (empty($_USER['username']) && ($_CONF['loginrequired'] == 1 || $_PO_CONF['pollsloginrequired'] == 1)) {
        $retval = COM_startBlock($LANG_LOGIN[1], '', COM_getBlockTemplate('_msg_block', 'header'));
        $login = new Template($_CONF['path_layout'] . 'submit');
        $login->set_file(array('login' => 'submitloginrequired.thtml'));
        $login->set_var('xhtml', XHTML);
        $login->set_var('login_message', $LANG_LOGIN[2]);
        $login->set_var('site_url', $_CONF['site_url']);
        $login->set_var('lang_login', $LANG_LOGIN[3]);
        $login->set_var('lang_newuser', $LANG_LOGIN[4]);
        $login->parse('output', 'login');
        $retval .= $login->finish($login->get_var('output'));
        $retval .= COM_endBlock(COM_getBlockTemplate('_msg_block', 'footer'));
    } else {
        require_once $_CONF['path_system'] . 'lib-admin.php';
        $header_arr = array(array('text' => $LANG25[9], 'field' => 'topic', 'sort' => true), array('text' => $LANG25[20], 'field' => 'voters', 'sort' => true), array('text' => $LANG25[3], 'field' => 'unixdate', 'sort' => true), array('text' => $LANG_POLLS['open_poll'], 'field' => 'is_open', 'sort' => true));
        $defsort_arr = array('field' => 'unixdate', 'direction' => 'desc');
        $text_arr = array('has_menu' => false, 'title' => $LANG_POLLS['pollstitle'], 'instructions' => "", 'icon' => '', 'form_url' => '');
        $query_arr = array('table' => 'polltopics', 'sql' => $sql = "SELECT *,UNIX_TIMESTAMP(date) AS unixdate, display " . "FROM {$_TABLES['polltopics']} WHERE 1=1", 'query_fields' => array('topic'), 'default_filter' => COM_getPermSQL(), 'query' => '', 'query_limit' => 0);
        $retval .= ADMIN_list('polls', 'plugin_getListField_polls', $header_arr, $text_arr, $query_arr, $defsort_arr);
    }
    return $retval;
}
开发者ID:hostellerie,项目名称:nexpro,代码行数:34,代码来源:index.php

示例11: MG_displaySessions

function MG_displaySessions()
{
    global $_CONF, $_MG_CONF, $_TABLES, $LANG_MG01;
    $retval = '';
    $T = new Template($_MG_CONF['template_path']);
    $T->set_file('sessions', 'sessions.thtml');
    $T->set_var(array('site_url' => $_CONF['site_url'], 'xhtml' => XHTML, 's_form_action' => $_MG_CONF['admin_url'] . 'sessions.php', 'lang_save' => $LANG_MG01['save'], 'lang_cancel' => $LANG_MG01['cancel'], 'lang_delete' => $LANG_MG01['delete'], 'lang_select' => $LANG_MG01['select'], 'lang_checkall' => $LANG_MG01['check_all'], 'lang_uncheckall' => $LANG_MG01['uncheck_all'], 'lang_session_description' => $LANG_MG01['description'], 'lang_session_owner' => $LANG_MG01['owner'], 'lang_session_count' => $LANG_MG01['count'], 'lang_action' => $LANG_MG01['action']));
    $T->set_block('sessions', 'sessItems', 'sItems');
    $sql = "SELECT * FROM {$_TABLES['mg_sessions']} WHERE session_status=1";
    $result = DB_query($sql);
    $numRows = DB_numRows($result);
    $rowclass = 0;
    if ($numRows == 0) {
        // we have no active sessions
        $T->set_var('lang_no_sessions', $LANG_MG01['no_sessions']);
        $T->set_var('noitems', true);
        $T->set_var('sItems', '');
    } else {
        $totalSess = $numRows;
        $T->set_block('sessions', 'sessRow', 'sRow');
        for ($x = 0; $x < $numRows; $x++) {
            $row = DB_fetchArray($result);
            $res2 = DB_query("SELECT COUNT(id) FROM {$_TABLES['mg_session_items']} " . "WHERE session_id='" . $row['session_id'] . "' AND status=0");
            list($count) = DB_fetchArray($res2);
            $T->set_var(array('row_class' => $rowclass % 2 ? '2' : '1', 'session_id' => $row['session_id'], 'session_owner' => DB_getItem($_TABLES['users'], 'username', "uid={$row['session_uid']}"), 'session_description' => $row['session_description'], 'session_continue' => $_MG_CONF['site_url'] . '/batch.php?mode=continue&amp;sid=' . $row['session_id'] . '&amp;limit=0', 'count' => $count));
            $T->parse('sRow', 'sessRow', true);
            $rowclass++;
        }
        $T->parse('sItems', 'sessItems');
    }
    $retval .= $T->finish($T->parse('output', 'sessions'));
    return $retval;
}
开发者ID:mistgrass,项目名称:geeklog-ivywe,代码行数:33,代码来源:sessions.php

示例12: goDispAppend

 function goDispAppend()
 {
     $t = new Template('../template/basic');
     $t->set_file('f', 'tb_produre_b_detail.html');
     $t->set_block('f', 'gender', 'g');
     if ($this->isAppend) {
         $t->set_var('action', 'add');
         $t->set_var('actionName', '增加');
         $t->set_var('createtime', date("Y-m-d H:i:s"));
         $t->set_var('userid', $this->getUid());
     } else {
         $updid = $_GET[MODIFY . 'id'] + 0;
         $t->set_var($this->dbObj->GetRow('SELECT * FROM ' . WEB_ADMIN_TABPOX . 'produre WHERE produre_id = ' . $updid));
         $t->set_var('updid', $updid);
         $t->set_var('action', 'upd');
         $t->set_var('actionName', '修改');
         echo 'SELECT * FROM ' . WEB_ADMIN_TABPOX . 'produre WHERE produre_id = ' . $updid;
         $inrs =& $this->dbObj->Execute('SELECT * FROM ' . WEB_ADMIN_TABPOX . 'produre WHERE produre_id = ' . $updid);
         while ($inrrs =& $inrs->FetchRow()) {
             $t->set_var($inrrs);
         }
         $inrs->Close();
     }
     $t->set_var('path', WEB_ADMIN_HTTPPATH . '/common/');
     $t->parse('out', 'f');
     $t->p('out');
 }
开发者ID:TonyWoo,项目名称:cmlerp,代码行数:27,代码来源:produre.php

示例13: goDispAppend

 function goDispAppend()
 {
     $t = new Template('../template/basic');
     $t->set_file('f', 'servicecategory_detail.html');
     $t->unknowns = "move";
     $t->left_delimiter = "[#";
     //修改左边界符为[#
     $t->right_delimiter = "#]";
     //修改右边界符#]
     if ($this->isAppend) {
         $t->set_var('action', 'add');
         $t->set_var('actionName', '增加');
         $t->set_var('category_name', "");
         $t->set_var('error', "");
         $t->set_var('showeditdiv', "");
         $t->set_var('memo', "");
         $t->set_var('userid', $this->getUid());
     } else {
         $updid = $_GET[MODIFY . 'id'] + 0;
         $t->set_var($this->dbObj->GetRow('SELECT * FROM ' . WEB_ADMIN_TABPOX . 'servicecategory WHERE category_id = ' . $updid));
         $t->set_var('error', "");
         $t->set_var('showeditdiv', "");
         $t->set_var('updid', $updid);
         $t->set_var('action', 'upd');
         $t->set_var('actionName', '修改');
         $inrs =& $this->dbObj->Execute('SELECT * FROM ' . WEB_ADMIN_TABPOX . 'servicecategory WHERE category_id = ' . $updid);
         while ($inrrs =& $inrs->FetchRow()) {
             $t->set_var($inrrs);
         }
         $inrs->Close();
     }
     $t->set_var('path', WEB_ADMIN_HTTPPATH . '/common/');
     $t->parse('out', 'f');
     $t->p('out');
 }
开发者ID:TonyWoo,项目名称:cmlerp,代码行数:35,代码来源:servicecategory.php

示例14: fncview

function fncview($uid, $template)
{
    $pi_name = "userbox";
    global $_CONF;
    global $LANG_USERBOX_ADMIN;
    //template フォルダ
    $tmplfld = DATABOX_templatePath('admin', 'default', $pi_name);
    $tmpl = new Template($tmplfld);
    $tmpl->set_file(array('view' => 'view.thtml'));
    //--
    $tmpl->set_var('site_admin_url', $_CONF['site_admin_url']);
    if ($template === "") {
        $tmpl->set_var('about_thispage', $LANG_USERBOX_ADMIN['about_admin_view']);
    } else {
        $tmpl->set_var('about_thispage', "");
    }
    $tmpl->parse('output', 'view');
    $view = $tmpl->finish($tmpl->get_var('output'));
    $information = array();
    $retval = userbox_profile($uid, $template, "", "view");
    $layout = $retval['layout'];
    $information['headercode'] = $retval['headercode'];
    $information['pagetitle'] = $retval['title'];
    $display = $view;
    $display .= $retval['display'];
    $display = DATABOX_displaypage($pi_name, $layout, $display, $information);
    COM_output($display);
}
开发者ID:mistgrass,项目名称:geeklog-ivywe,代码行数:28,代码来源:view.php

示例15: disp

 function disp()
 {
     //定义模板
     $t = new Template('../template/getdata');
     $t->set_file('f', 'getcard.html');
     $t->unknowns = "keep";
     $t->left_delimiter = "[#";
     //修改左边界符为[#
     $t->right_delimiter = "#]";
     //修改右边界符#]
     $t->set_block('f', 'mainlist', 'ml');
     $category = $_GET["category"];
     $keywords = $_GET["keywords"];
     $ftable = $_GET["ftable"];
     $condition = '';
     if ($category != '' && $keywords != '') {
         if ($ftable == '') {
             $condition = $category . ' like "%' . $keywords . '%"';
         } else {
             $condition = $category . ' like " %' . $keywords . '%"';
         }
     }
     $pageid = $_GET[pageid];
     $pageid = $pageid ? $pageid : 1;
     $pageid = intval($pageid);
     $psize = $this->getValue('pagesize');
     $psize = $psize ? $psize : 20;
     $offset = $pageid > 0 ? ($pageid - 1) * $psize : 0;
     //设置分类
     $t->set_var('ml');
     if ($condition != '' && $ftable == '') {
         $sql = 'select * from ' . WEB_ADMIN_TABPOX . 'marketingcard  where   marketingcardtype_id in(1,2,3,4,5,6,7) and  agencyid =' . $_SESSION["currentorgan"] . ' and ' . $condition;
     } else {
         if ($ftable != '') {
             $sql = 'select * from ' . WEB_ADMIN_TABPOX . 'marketingcard p INNER JOIN ' . WEB_ADMIN_TABPOX . "{$ftable} f on p.categoryid =f.category_id  where f.category_name like '%" . $keywords . "%' and  p.agencyid =" . $_SESSION["currentorgan"];
         } else {
             $sql = 'select * from ' . WEB_ADMIN_TABPOX . 'marketingcard  where marketingcardtype_id in(1,2,3,4,5,6,7) and  agencyid =' . $_SESSION["currentorgan"];
         }
     }
     $inrs =& $this->dbObj->Execute($sql . " ORDER BY  marketingcard_id DESC  LIMIT " . $offset . " , " . $psize);
     $result =& $this->dbObj->Execute($sql);
     $count = $result->RecordCount();
     $t->set_var('pagelist', $this->page("?category=" . $category . "&keywords=" . urlencode($keywords) . "&ftable=" . $ftable, $count, $psize, $pageid));
     $t->set_var('recordcount', $count);
     $t->set_var('cardtypelist', $this->selectlist('marketingcardtype', 'marketingcardtype_id', 'marketingcardtype_name', $_GET['marketingcardtype_id']));
     while ($inrrs =& $inrs->FetchRow()) {
         $t->set_var($inrrs);
         $t->set_var('gender', $inrrs["genderid"] == 1 ? '男' : '女');
         $t->set_var('brand_name', $this->dbObj->getone('select brand_name from ' . WEB_ADMIN_TABPOX . 'brand  where brand_id =' . $inrrs["brandid"]));
         $t->set_var('standardunit', $this->dbObj->getone('select unit_name from ' . WEB_ADMIN_TABPOX . 'unit  where unit_id =' . $inrrs["standardunit"]));
         //$t -> set_var('category_name',$this -> dbObj -> getone('select category_name from '.WEB_ADMIN_TABPOX.'procatalog where category_id ='.$inrrs["categoryid"]));
         $t->set_var('marketingcardtype_name', $this->dbObj->getone('select marketingcardtype_name from ' . WEB_ADMIN_TABPOX . 'marketingcardtype  where marketingcardtype_id =' . $inrrs["marketingcardtype_id"]));
         $t->parse('ml', 'mainlist', true);
     }
     $inrs->Close();
     $t->set_var('path', WEB_ADMIN_HTTPPATH . '/common/');
     $t->parse('out', 'f');
     $t->p('out');
 }
开发者ID:TonyWoo,项目名称:cmlerp,代码行数:59,代码来源:getoldcard.php


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