本文整理汇总了PHP中Template::p方法的典型用法代码示例。如果您正苦于以下问题:PHP Template::p方法的具体用法?PHP Template::p怎么用?PHP Template::p使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Template
的用法示例。
在下文中一共展示了Template::p方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: 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');
}
示例2: 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');
}
示例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');
}
示例4: 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');
}
示例5: 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');
}
示例6: 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');
}
示例7: disp
function disp()
{
//定义模板
$t = new Template('../template/system');
$t->unknowns = "keep";
$t->left_delimiter = "[#";
//修改左边界符为[##
$t->right_delimiter = "#]";
//修改右边界符##]
$t->set_file('f', 'changloginorgan.html');
$t->set_block('f', 'agencylist', 'al');
$t->set_var('add', $this->getAddStr('img'));
//设置机构
$t->set_var('al');
$inrs =& $this->dbObj->Execute("select * from " . WEB_ADMIN_TABPOX . "agency where agencytype_id=4 order by agency_id desc");
while ($inrrs =& $inrs->FetchRow()) {
$t->set_var($inrrs);
$t->set_var('agency_id', $inrrs['agency_id']);
$t->set_var('agency_easyname', $inrrs['agency_easyname']);
$t->parse('al', 'agencylist', true);
}
$inrs->Close();
$t->set_var('pagelist', $this->page("agent.php?qgtype=" . $_GET[qgtype] . "&Sale_ID=" . $_GET[Sale_ID], $count, $psize, $pageid));
$t->set_var('path', WEB_ADMIN_HTTPPATH . '/common/');
$t->parse('out', 'f');
$t->p('out');
}
示例8: disp
function disp()
{
//定义模板
$t = new Template('../template/getdata');
$t->set_file('f', 'getstockproduce.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 . 'stock where agencyid =' . $_SESSION["currentorgan"] . ' and ' . $condition;
} else {
if ($ftable != '') {
$sql = 'select * from ' . WEB_ADMIN_TABPOX . 'stock p INNER JOIN ' . WEB_ADMIN_TABPOX . $ftable . " f on p." . $ftable . "_id =f." . $ftable . "_id where f." . $category . " like '%" . $keywords . "%' and p.agencyid =" . $_SESSION["currentorgan"];
} else {
$sql = 'select * from ' . WEB_ADMIN_TABPOX . 'stock where agencyid =' . $_SESSION["currentorgan"];
}
}
$inrs =& $this->dbObj->Execute($sql . " ORDER BY stock_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);
while ($inrrs =& $inrs->FetchRow()) {
$t->set_var($inrrs);
$produce = $this->dbObj->Getrow('select * from ' . WEB_ADMIN_TABPOX . 'produce where produce_id =' . $inrrs["produce_id"]);
$t->set_var($produce);
$t->set_var('warehouse_name', $this->dbObj->getone('select warehouse_name from ' . WEB_ADMIN_TABPOX . 'warehouse where warehouse_id =' . $inrrs["warehouse_id"]));
$t->set_var('brand_name', $this->dbObj->getone('select brand_name from ' . WEB_ADMIN_TABPOX . 'brand where brand_id =' . $produce["brandid"]));
$t->set_var('standardunit', $this->dbObj->getone('select unit_name from ' . WEB_ADMIN_TABPOX . 'unit where unit_id =' . $produce["standardunit"]));
$t->set_var('category_name', $this->dbObj->getone('select category_name from ' . WEB_ADMIN_TABPOX . 'procatalog where category_id =' . $produce["categoryid"]));
$t->parse('ml', 'mainlist', true);
}
$inrs->Close();
$t->set_var('warehouselist', $this->selectlist('warehouse', 'warehouse_id', 'warehouse_name', $_GET['keywords']));
$t->set_var('path', WEB_ADMIN_HTTPPATH . '/common/');
$t->parse('out', 'f');
$t->p('out');
}
示例9: disp
function disp()
{
//定义模板
$template = $_GET["template"] == '' ? "getstaff" : $_GET["template"];
$t = new Template('../template/getdata');
$t->set_file('f', $template . '.html');
$t->unknowns = "keep";
$t->left_delimiter = "[#";
//修改左边界符为[#
$t->right_delimiter = "#]";
//修改右边界符#]
$t->set_block('f', 'mainlist', 'ml');
$keywords = $_GET["keywords"];
$parameter = $_GET["parameter"];
$parameter = explode("@@@", $parameter);
$keywords = explode("@@@", $keywords);
$condition = '';
for ($i = 0; $i < count($parameter); $i++) {
if ($parameter[$i] != '') {
$condition = $condition == '' ? 'A.' . $parameter[$i] . ' in (' . $keywords[$i] . ')' : $condition . " and A." . $parameter[$i] . ' in (' . $keywords[$i] . ')';
$condition1 = $condition == '' ? $parameter[$i] . ' in (' . $keywords[$i] . ')' : $condition . " and " . $parameter[$i] . 'in (' . $keywords[$i] . ')';
}
}
$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 A INNER JOIN ' . WEB_ADMIN_TABPOX . 'marketingcardtype B ON A.marketingcardtype_id=B.marketingcardtype_id where A.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 A INNER JOIN ' . WEB_ADMIN_TABPOX . 'marketingcardtype B ON A.marketingcardtype_id=B.marketingcardtype_id where A.agencyid =' . $_SESSION["currentorgan"];
}
}
$inrs =& $this->dbObj->Execute($sql . " ORDER BY price DESC LIMIT " . $offset . " , " . $psize);
$result =& $this->dbObj->Execute($sql);
$count = $result->RecordCount();
$t->set_var('pagelist', $this->page("?template=" . $template . "¶meter=" . $parameter . "&keywords=" . urlencode($keywords), $count, $psize, $pageid));
$t->set_var('recordcount', $count);
while ($inrrs =& $inrs->FetchRow()) {
$t->set_var($inrrs);
$t->set_var('employee_id', $inrrs['employee_id']);
$t->set_var('employee_name', $inrrs['employee_name']);
$t->set_var('gender', $inrrs["genderid"] == 1 ? '男' : '女');
$t->set_var('category_name', $this->dbObj->getone('select category_name from ' . WEB_ADMIN_TABPOX . 'procatalog where category_id =' . $inrrs["categoryid"]));
$t->parse('ml', 'mainlist', true);
}
$inrs->Close();
$t->set_var('path', WEB_ADMIN_HTTPPATH . '/common/');
$t->parse('out', 'f');
$t->p('out');
}
示例10: disp
function disp()
{
$t = new Template('../template/system');
$t->set_file('f', 'sysconfig.html');
$t->set_block('f', 'row', 'r');
if ($this->getModify()) {
$t->set_var('form', '<form name="form1" method="post" action="sysconfig.php">');
$t->set_var('endform', '</form>');
} else {
$t->set_var('disabled', ' disabled');
}
$rs = $this->dbObj->GetArray('select * from ' . WEB_ADMIN_TABPOX . 'otherrule where issystemvar = 1');
foreach ($rs as $v) {
$t->set_var('configname', $v['configname']);
//如果有的话,显示配置值
$sval = $this->dbObj->GetOne('select configvalue from ' . WEB_ADMIN_TABPOX . 'config where userid=0 and otherruleid=' . $v['otherruleid']);
if ($sval === false) {
$sval = $v['configdefault'];
}
$configvalue = '';
switch ($v['configtype']) {
case 'text':
$configvalue = '<input name="' . $v['otherruleid'] . '" id="' . $v['otherruleid'] . '" type="text" value="' . $sval . '" maxlength="' . $v['maxlength'] . '">';
break;
case 'radio':
$content = split('#', $v['configvalue']);
foreach ($content as $inv) {
$val = split('=', $inv);
$configvalue .= "<input type='radio' name='{$v['otherruleid']}' id='{$v['otherruleid']}' value='{$val[1]}'" . ($val[1] == $sval ? ' checked' : '') . ">{$val[0]}";
}
break;
case 'checkbox':
$content = split('#', $v['configvalue']);
$dfvs = split('#', $sval);
//默认值
foreach ($content as $inv) {
$val = split('=', $inv);
$configvalue .= "<input type='checkbox' name='{$v['otherruleid']}[]' id='{$v['otherruleid']}' value='{$val[1]}'" . (in_array($val[1], $dfvs) ? ' checked' : '') . ">{$val[0]}";
}
break;
case 'select':
$configvalue = "<select name='{$v['otherruleid']}' id='{$v['otherruleid']}'>";
$content = split('#', $v['configvalue']);
foreach ($content as $inv) {
$val = split('=', $inv);
$configvalue .= "<option value='{$val[1]}'" . ($val[1] == $sval ? ' selected' : '') . ">{$val[0]}</option>";
}
break;
}
$t->set_var('configvalue', $configvalue);
$t->parse('r', 'row', true);
}
$t->set_var('configName', '系统');
$t->set_var('path', WEB_ADMIN_HTTPPATH . '/common/');
$t->parse('out', 'f');
$t->p('out');
}
示例11: disp
function disp()
{
//定义模板
$t = new Template('../template/getdata');
$t->set_file('f', 'getvisiterecordtemplate.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 . '="' . $keywords . '"';
} else {
$condition = $category . '="' . $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 . 'visiterecordtemplate where agencyid =' . $_SESSION["currentorgan"] . ' and ' . $condition;
} else {
if ($ftable != '') {
$sql = 'select * from ' . WEB_ADMIN_TABPOX . 'visiterecordtemplate 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 . 'visiterecordtemplate where agencyid =' . $_SESSION["currentorgan"];
}
}
$inrs =& $this->dbObj->Execute($sql . " ORDER BY visiterecordtemplate_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);
while ($inrrs =& $inrs->FetchRow()) {
$t->set_var($inrrs);
$t->set_var('gender', $inrrs["genderid"] == 1 ? '男' : '女');
$t->set_var('category_name', $this->dbObj->getone('select category_name from ' . WEB_ADMIN_TABPOX . 'procatalog where category_id =' . $inrrs["categoryid"]));
//$t -> set_var('content',str_replace($inrrs["content"],"\r\n", "<br>" );
$t->set_var('content1', str_replace("\r\n", "<br>", $inrrs["content"]));
$t->parse('ml', 'mainlist', true);
}
$inrs->Close();
$t->set_var('path', WEB_ADMIN_HTTPPATH . '/common/');
$t->parse('out', 'f');
$t->p('out');
}
示例12: disp
function disp()
{
//定义模板
$t = new Template('../template/getdata');
$t->set_file('f', 'getsell.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 . 'sell where status in(1,4,5,6) and ownstatus in (1,2) and agencyid =' . $_SESSION["currentorgan"] . ' and ' . $condition;
} else {
if ($ftable != '') {
$sql = 'select * from ' . WEB_ADMIN_TABPOX . 'sell p INNER JOIN ' . WEB_ADMIN_TABPOX . $ftable . " f on p." . $ftable . "_id =f." . $ftable . "_id where f." . $category . " like '%" . $keywords . "%' and p.status in(1,4,5,6) and p.ownstatus in (1,2) and p.agencyid =" . $_SESSION["currentorgan"];
} else {
$sql = 'select * from ' . WEB_ADMIN_TABPOX . 'sell where status in(1,4,5,6) and ownstatus in (1,2) and agencyid =' . $_SESSION["currentorgan"];
}
}
$inrs =& $this->dbObj->Execute($sql . " ORDER BY sell_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);
while ($inrrs =& $inrs->FetchRow()) {
$t->set_var($inrrs);
$t->set_var('customer_name', $this->dbObj->getone('select customer_name from ' . WEB_ADMIN_TABPOX . 'customer where customer_id =' . $inrrs["customer_id"]));
$t->set_var('employee_name', $this->dbObj->getone('select employee_name from ' . WEB_ADMIN_TABPOX . 'employee where employee_id =' . $inrrs["employee_id"]));
//$t -> set_var('category_name',$this -> dbObj -> getone('select category_name from '.WEB_ADMIN_TABPOX.'procatalog where category_id ='.$inrrs["categoryid"]));
$t->parse('ml', 'mainlist', true);
}
$inrs->Close();
$t->set_var('path', WEB_ADMIN_HTTPPATH . '/common/');
$t->parse('out', 'f');
$t->p('out');
}
示例13: disp
function disp()
{
$this->forAjax();
$t = new Template('../template/system');
$t->set_file('f', 'message.html');
$t->set_var('ajaxstr', $this->xo->getJavascript(WEB_ADMIN_HTTPCOMMON . '/js/'));
$t->set_var('path', WEB_ADMIN_HTTPPATH . '/common/');
$t->set_var('curuser', $this->getUid());
$t->set_var('disabled', $this->getAppend() ? '' : ' disabled');
$t->set_block('f', 'row', 'r');
$rs =& $this->dbObj->Execute("select u.username,m.* from " . WEB_ADMIN_TABPOX . "message m," . WEB_ADMIN_TABPOX . "user u where m.userid=u.userid AND sendtoids like '%," . $this->getUid() . ",%'");
while (!$rs->EOF) {
//其它接收者
$otherUserId = substr($rs->fields['sendtoids'], 1, strlen($rs->fields['sendtoids']) - 2);
$inRs = $this->dbObj->Execute('select distinct username from ' . WEB_ADMIN_TABPOX . 'user where userid <> ' . $this->getUid() . ' and userid in(' . $otherUserId . ')');
if (!$inRs->EOF) {
$t->set_var('dispOther', '');
$oname = '';
while (!$inRs->EOF) {
$oname .= ' ' . $inRs->fields['username'];
$inRs->MoveNext();
}
$t->set_var('otherName', $oname);
} else {
$t->set_var('otherName', '');
$t->set_var('dispOther', 'none');
}
$t->set_var($rs->fields);
$t->set_var('del', $this->getDelStr($this->getUid(), $rs->fields['msgid'], 'a', 'message.php?srcids=' . $rs->fields['sendtoids']));
$rs->MoveNext();
$t->parse('r', 'row', true);
}
//查询初始用户
$defuser = '';
if (true) {
$userSql = 'select userid,username from ' . WEB_ADMIN_TABPOX . 'user';
} else {
$userSql = 'SELECT DISTINCT u2.userid,u2.username FROM ' . WEB_ADMIN_TABPOX . 'user u
INNER JOIN ' . WEB_ADMIN_TABPOX . 'usergroup ug ON (u.userid = ug.userid) AND (u.userid = ' . $this->getUid() . ')
INNER JOIN ' . WEB_ADMIN_TABPOX . 'usergroup ug2 ON (ug.groupid = ug.groupid)
INNER JOIN ' . WEB_ADMIN_TABPOX . 'user u2 ON (u2.userid = ug2.userid)
';
}
$rs = $this->dbObj->Execute($userSql);
while (!$rs->EOF) {
$defuser .= '<input name="sendtoids[]" type="checkbox" value="' . $rs->fields['userid'] . '" checked>' . $rs->fields['username'] . ' ';
$rs->MoveNext();
}
$t->set_var('defuser', $defuser);
$t->parse('out', 'f');
$t->p('out');
echo '|' . $this->getValue('loginErrorTimeOut') . '|';
}
示例14: disp
function disp()
{
//定义模板
$t = new Template('../template/pos');
$t->set_file('f', 'opennew.html');
$t->unknowns = "remove";
$t->left_delimiter = "[#";
//修改左边界符为[#
$t->right_delimiter = "#]";
//修改右边界符#]
$t->parse('out', 'f');
$t->p('out');
}
示例15: goDispAppend
function goDispAppend()
{
$t = new Template('../template/system');
$t->set_file('f', 'userdetail.html');
$t->set_block('f', 'group', 'g');
$groupArr = array();
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 . 'user WHERE userid = ' . $updid));
$t->set_var('updid', $updid);
$t->set_var('action', 'upd');
$t->set_var('actionName', '修改');
$gs = $this->dbObj->GetArray('SELECT groupid FROM ' . WEB_ADMIN_TABPOX . 'usergroup WHERE userid = ' . $updid);
foreach ($gs as $v) {
$groupArr[] = $v['groupid'];
}
}
//当前用户所管理的组
$umgs = '0';
//echo 'select agency_type id from '.WEB_ADMIN_TABPOX.'agency a inner join '.WEB_ADMIN_TABPOX.'user u on a.agency_id=u.agencyid where u.userid='.$this->getUid();
$agency_type_id =& $this->dbObj->GetOne('select agencytype id from ' . WEB_ADMIN_TABPOX . 'agency a inner join ' . WEB_ADMIN_TABPOX . 'user u on a.agency_id=u.agencyid where u.userid=' . $this->getUid());
//echo $agency_type_id;
//'select g.groupid from '.WEB_ADMIN_TABPOX.'groupmanager g inner join '.WEB_ADMIN_TABPOX.'user u on g.userid=u.userid where u.agencyid='.$_SESSION["currentorgan"]
if ($agency_type_id == 1) {
$mgs =& $this->dbObj->Execute('select groupid from ' . WEB_ADMIN_TABPOX . 'group where agencyid=' . $_SESSION["currentorgan"]);
} else {
$mgs =& $this->dbObj->Execute('select groupid from ' . WEB_ADMIN_TABPOX . 'groupmanager where userid=' . $this->getUid());
}
while (!$mgs->EOF) {
$umgs .= ',' . $mgs->fields['groupid'];
$mgs->MoveNext();
}
//设置组列表
$rs =& $this->dbObj->Execute("select * from " . WEB_ADMIN_TABPOX . 'group where groupid in(' . $umgs . ')');
while ($rrs =& $rs->FetchRow()) {
$t->set_var($rrs);
if (in_array($rrs['groupid'], $groupArr)) {
$t->set_var('gchecked', ' checked');
} else {
$t->set_var('gchecked', '');
}
$t->parse('g', 'group', true);
}
$t->set_var('path', WEB_ADMIN_HTTPPATH . '/common/');
$t->parse('out', 'f');
$t->p('out');
}