Example #1
0
 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');
 }
Example #2
0
 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');
 }
Example #3
0
 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');
 }
Example #4
0
 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');
 }
Example #5
0
 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');
 }
Example #6
0
 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');
 }
Example #7
0
 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');
 }
Example #8
0
 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');
 }
Example #9
0
 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 . "&parameter=" . $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');
 }
Example #10
0
 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');
 }
 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');
 }
Example #12
0
 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');
 }
Example #13
0
    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'] . '&nbsp;';
            $rs->MoveNext();
        }
        $t->set_var('defuser', $defuser);
        $t->parse('out', 'f');
        $t->p('out');
        echo '|' . $this->getValue('loginErrorTimeOut') . '|';
    }
Example #14
0
 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');
 }
Example #15
0
 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');
 }
Example #16
0
 function disp()
 {
     $t = new Template('../template/stock');
     $t->set_file('f', 'initstock.html');
     $t->unknowns = "move";
     $t->left_delimiter = "[#";
     //修改左边界符为[#
     $t->right_delimiter = "#]";
     //修改右边界符#]
     $t->set_var('producecategorylist', $this->selectlist('procatalog', 'category_id', 'category_name', 0));
     $t->set_var('warehouselist', $this->selectlist('warehouse', 'warehouse_id', 'warehouse_name', 0));
     $t->set_var('path', WEB_ADMIN_HTTPPATH . '/common/');
     $t->parse('out', 'f');
     $t->p('out');
 }
Example #17
0
 function disp()
 {
     //定义模板
     $t = new Template('../template/pos');
     $t->set_file('f', 'customerlogin.html');
     $t->unknowns = "keep";
     $t->left_delimiter = "[#";
     //修改左边界符为[#
     $t->right_delimiter = "#]";
     //修改右边界符#]
     $t->set_block('f', 'mainlist', 'ml');
     $t->set_var('path', WEB_ADMIN_HTTPPATH . '/common/');
     $t->parse('out', 'f');
     $t->p('out');
 }
Example #18
0
 function disp()
 {
     //定义模板
     $t = new Template('../template/basic');
     $t->set_file('f', 'import.html');
     $t->unknowns = "move";
     $t->left_delimiter = "[#";
     //修改左边界符为[#
     $t->right_delimiter = "#]";
     //修改右边界符#]
     $fname = $_FILES['MyFile']['name'];
     $do = copy($_FILES['MyFile']['tmp_name'], $fname);
     if ($_FILES['MyFile']['name']) {
         if ($do) {
             $error = '导入成功,请返回查看';
         } else {
             $error = "导入失败";
         }
     }
     error_reporting(0);
     $fname = $_FILES['MyFile']['name'];
     $handle = fopen($fname, "r");
     while ($data = fgetcsv($handle, 10000, ",")) {
         $this->dbObj->Execute("SET NAMES  'utf8'");
         $data[2] = $this->dbObj->getone("SELECT category_id FROM `" . WEB_ADMIN_TABPOX . "procatalog` WHERE category_name='" . $data[2] . "' and agencyid=" . $_SESSION["currentorgan"]);
         $data[3] = $this->dbObj->getone("SELECT brand_id FROM `" . WEB_ADMIN_TABPOX . "brand` WHERE brand_name='" . $data[3] . "' and agencyid=" . $_SESSION["currentorgan"]);
         $data[4] = $this->dbObj->getone("SELECT unit_id FROM `" . WEB_ADMIN_TABPOX . "unit` WHERE unit_name='" . $data[4] . "' and agencyid=" . $_SESSION["currentorgan"]);
         $data[5] = $this->dbObj->getone("SELECT unit_id FROM `" . WEB_ADMIN_TABPOX . "unit` WHERE unit_name='" . $data[5] . "' and agencyid=" . $_SESSION["currentorgan"]);
         $data[3] = $data[3] == '' ? 0 : $data[3];
         $data[4] = $data[4] == '' ? 0 : $data[4];
         $data[5] = $data[5] == '' ? 0 : $data[5];
         $data[6] = $data[6] == '' ? 0 : $data[6];
         $q = "insert into s_produce  (`produce_no`,produce_name,`categoryid`,  `brandid`, `standardunit`,`viceunit`,`viceunitnumber`, `price`, `upperlimit`, `lowerlimit`, `code`, `shortcode`, `address`, `efficacy`, `useway`, `basis`, memo,agencyid) values ('{$data['0']}','{$data['1']}','{$data['2']}','{$data['3']}','{$data['4']}','{$data['5']}','{$data['6']}','{$data['7']}','{$data['8']}','{$data['9']}','{$data['10']}','{$data['11']}','{$data['12']}','{$data['13']}','{$data['14']}','{$data['15']}','{$data['16']}'," . $_SESSION["currentorgan"] . ")";
         $this->dbObj->Execute($q);
         if (mysql_error()) {
             $error = '导入失败' . mysql_error();
             break;
         }
     }
     fclose($handle);
     $t->set_var('error', $error);
     $t->set_var('backpath', 'produce.php');
     $t->set_var('format', '编码,名称,类别,品牌,主单位,副单位,容量,牌价,库存上限,下限,代码,简码,产地,功效,用法,成分,备注');
     $t->set_var('PHP_SELF', $_SERVER["PHP_SELF"]);
     $t->set_var('path', WEB_ADMIN_HTTPPATH . '/common/');
     $t->parse('out', 'f');
     $t->p('out');
 }
Example #19
0
 function disp()
 {
     //定义模板
     $t = new Template('../getdata');
     $template = $_GET["template"];
     $t->set_file('f', $template . '.html');
     $t->unknowns = "keep";
     $t->left_delimiter = "[#";
     //修改左边界符为[#
     $t->right_delimiter = "#]";
     //修改右边界符#]
     $t->set_var('id', $_GET['id']);
     $t->set_var('path', WEB_ADMIN_HTTPPATH . '/common/');
     $t->parse('out', 'f');
     $t->p('out');
 }
Example #20
0
 function disp()
 {
     //定义模板
     $t = new Template('../template/basic');
     $t->set_file('f', 'import.html');
     $t->unknowns = "move";
     $t->left_delimiter = "[#";
     //修改左边界符为[#
     $t->right_delimiter = "#]";
     //修改右边界符#]
     $fname = $_FILES['MyFile']['name'];
     $do = copy($_FILES['MyFile']['tmp_name'], $fname);
     if ($_FILES['MyFile']['name']) {
         if ($do) {
             $error = '导入成功,请返回查看';
         } else {
             $error = "导入失败";
         }
     }
     error_reporting(0);
     $fname = $_FILES['MyFile']['name'];
     $handle = fopen($fname, "r");
     $i = 1;
     while ($data = fgetcsv($handle, 10000, ",")) {
         if ($i > 1) {
             $data[0] = $this->dbObj->getone("SELECT employee_id FROM `" . WEB_ADMIN_TABPOX . "employee` WHERE attendancecode='{$data['0']}' and agencyid=" . $_SESSION["currentorgan"]);
             $q = "update s_attendance   set `planattendance`='{$data['1']}',`actualattendance`='{$data['2']}' , `leavehours`='{$data['3']}',`timeoff`='{$data['4']}',`othours`='{$data['5']}'  where `employee_id`='{$data['0']}'";
             echo $q;
             $this->dbObj->Execute($q);
             if (mysql_error()) {
                 $error = '导入失败' . mysql_error();
                 break;
             }
         }
         $i++;
     }
     fclose($handle);
     $t->set_var('error', $error);
     $t->set_var('backpath', 'attendance.php');
     $t->set_var('format', '考勤编号 计划出勤 实际出勤  请假(h) 补钟(h) 加班(h)');
     $t->set_var('PHP_SELF', $_SERVER["PHP_SELF"]);
     $t->set_var('path', WEB_ADMIN_HTTPPATH . '/common/');
     $t->parse('out', 'f');
     $t->p('out');
 }
Example #21
0
 function disp()
 {
     //定义模板
     $t = new Template('../template/basic');
     $t->set_file('f', 'import.html');
     $t->unknowns = "move";
     $t->left_delimiter = "[#";
     //修改左边界符为[#
     $t->right_delimiter = "#]";
     //修改右边界符#]
     $fname = $_FILES['MyFile']['name'];
     $do = copy($_FILES['MyFile']['tmp_name'], $fname);
     if ($_FILES['MyFile']['name']) {
         if ($do) {
             $error = '导入成功,请返回查看';
         } else {
             $error = "导入失败";
         }
     }
     error_reporting(0);
     $fname = $_FILES['MyFile']['name'];
     $handle = fopen($fname, "r");
     while ($data = fgetcsv($handle, 10000, ",")) {
         $this->dbObj->Execute("SET NAMES  'utf8'");
         $data[2] = $data[2] == '女' ? 2 : 1;
         $data[3] = $data[3] == '' ? 0 : $data[3];
         $data[4] = $data[4] == '' ? 0 : $data[4];
         $data[5] = $data[5] == '' ? 0 : $data[5];
         $data[6] = $data[6] == '' ? 0 : $data[6];
         $q = "insert into s_customer  (`customer_no`,customer_name,`genderid`,  `handphone`, `qq`,`idnumber`,`email`, `address`, `birthday`,`province`, `city`, memo,agencyid) values ('{$data['0']}','{$data['1']}','{$data['2']}','{$data['3']}','{$data['4']}','{$data['5']}','{$data['6']}','{$data['7']}','{$data['8']}', '{$data['9']}','{$data['10']}','{$data['11']}'," . $_SESSION["currentorgan"] . ")";
         $this->dbObj->Execute($q);
         if (mysql_error()) {
             $error = '导入失败' . mysql_error();
             break;
         }
     }
     fclose($handle);
     $t->set_var('error', $error);
     $t->set_var('backpath', 'customer.php');
     $t->set_var('format', '顾客编号 姓名 性别 手机 qq  身份证 email 地址 出生日期 省份 城市 备注');
     $t->set_var('PHP_SELF', $_SERVER["PHP_SELF"]);
     $t->set_var('path', WEB_ADMIN_HTTPPATH . '/common/');
     $t->parse('out', 'f');
     $t->p('out');
 }
Example #22
0
 function disp()
 {
     //定义模板
     $t = new Template('../template/basic');
     $t->set_file('f', 'import.html');
     $t->unknowns = "move";
     $t->left_delimiter = "[#";
     //修改左边界符为[#
     $t->right_delimiter = "#]";
     //修改右边界符#]
     $fname = $_FILES['MyFile']['name'];
     $do = copy($_FILES['MyFile']['tmp_name'], $fname);
     if ($_FILES['MyFile']['name']) {
         if ($do) {
             $error = '导入成功,请返回查看';
         } else {
             $error = "导入失败";
         }
     }
     error_reporting(0);
     $fname = $_FILES['MyFile']['name'];
     $handle = fopen($fname, "r");
     while ($data = fgetcsv($handle, 10000, ",")) {
         $this->dbObj->Execute("SET NAMES  'utf8'");
         //$data[2]=$this -> dbObj -> getone("SELECT category_id FROM `".WEB_ADMIN_TABPOX."servicecategory` WHERE category_name ='".$data[2]."' and agencyid=".$_SESSION["currentorgan"]) ;
         $data[2] = $this->dbObj->getone("SELECT servicespart_id FROM `" . WEB_ADMIN_TABPOX . "servicespart` WHERE servicespart_name ='" . $data[2] . "' and agencyid=" . $_SESSION["currentorgan"]);
         $data[2] = $data[2] == '' ? 0 : $data[2];
         $q = "insert into  " . WEB_ADMIN_TABPOX . "services (services_no ,services_name,servicespartid ,price , memo,agencyid) values ('{$data['0']}','{$data['1']}','{$data['2']}','{$data['3']}','{$data['4']}'," . $_SESSION["currentorgan"] . ")";
         $this->dbObj->Execute($q);
         if (mysql_error()) {
             $error = '导入失败' . mysql_error();
             break;
         }
     }
     fclose($handle);
     $t->set_var('error', $error);
     $t->set_var('backpath', 'services.php');
     $t->set_var('format', 'services_no ,services_name,categoryid ,price , memo,agencyid');
     $t->set_var('PHP_SELF', $_SERVER["PHP_SELF"]);
     $t->set_var('path', WEB_ADMIN_HTTPPATH . '/common/');
     $t->parse('out', 'f');
     $t->p('out');
 }
Example #23
0
 function goDispAppend()
 {
     $t = new Template('../template/system');
     $t->unknowns = "keep";
     $t->left_delimiter = "[#";
     //修改左边界符为[##
     $t->right_delimiter = "#]";
     //修改右边界符##]
     $t->set_file('f', 'agencydetail.html');
     $t->set_var('error', "");
     $t->set_var('showeditdiv', "");
     if ($this->isAppend) {
         $t->set_var('agency_id', "");
         $t->set_var('agency_no', "");
         $t->set_var('agency_easyname', "");
         $t->set_var('agency_name', "");
         $t->set_var('tel1', "");
         $t->set_var('opendate', date("Y-m-d"));
         $t->set_var('agencytype_id', "");
         $t->set_var('tel1', "");
         $t->set_var('principal', "");
         $t->set_var('mobile', "");
         $t->set_var('memo', "");
         $t->set_var('action', 'add');
         $t->set_var('actionName', '增加');
     } else {
         $updid = $_GET[MODIFY . 'id'] + 0;
         //echo 'SELECT * FROM '.WEB_ADMIN_TABPOX.'agency WHERE agency_id = '.$updid;
         $data = $this->dbObj->GetRow('SELECT * FROM ' . WEB_ADMIN_TABPOX . 'agency WHERE agency_id = ' . $updid);
         $t->set_var($data);
         $t->set_var('updid', $updid);
         $t->set_var('action', 'upd');
         $t->set_var('actionName', '修改');
     }
     $t->set_var('xjaccounttitle_idlist', $this->selectlist('accounttitle', 'accounttitle_id', 'accounttitle_name', $data['xjaccounttitle_id'], ' and accounttitle_name like "现金%"'));
     $t->set_var('ykaccounttitle_idlist', $this->selectlist('accounttitle', 'accounttitle_id', 'accounttitle_name', $data['ykaccounttitle_id'], ' and accounttitle_name like "银行存款%"'));
     $t->set_var('agencynamelist', $this->selectlist('agencytype', 'agencytype_id', 'agencytype_name', $data['agencytype_id']));
     $t->set_var('path', WEB_ADMIN_HTTPPATH . '/common/');
     $t->parse('out', 'f');
     $t->p('out');
 }
Example #24
0
 function disp()
 {
     //定义模板
     $t = new Template('../template/basic');
     $t->set_file('f', 'import.html');
     $t->unknowns = "move";
     $t->left_delimiter = "[#";
     //修改左边界符为[#
     $t->right_delimiter = "#]";
     //修改右边界符#]
     $fname = $_FILES['MyFile']['name'];
     $do = copy($_FILES['MyFile']['tmp_name'], $fname);
     if ($_FILES['MyFile']['name']) {
         if ($do) {
             $error = '导入成功,请返回查看';
         } else {
             $error = "导入失败";
         }
     }
     error_reporting(0);
     $fname = $_FILES['MyFile']['name'];
     $handle = fopen($fname, "r");
     while ($data = fgetcsv($handle, 10000, ",")) {
         $q = "insert into  " . WEB_ADMIN_TABPOX . "apparatus (apparatus_name,memo,agencyid) values ('{$data['0']}','{$data['1']}'," . $_SESSION["currentorgan"] . ")";
         $this->dbObj->Execute("SET NAMES  'gbk'");
         $this->dbObj->Execute($q);
         if (mysql_error()) {
             $error = '导入失败' . mysql_error();
             break;
         }
     }
     fclose($handle);
     $t->set_var('error', $error);
     $t->set_var('backpath', 'apparatus.php');
     $t->set_var('format', '名称,备注');
     $t->set_var('PHP_SELF', $_SERVER["PHP_SELF"]);
     $t->set_var('path', WEB_ADMIN_HTTPPATH . '/common/');
     $t->parse('out', 'f');
     $t->p('out');
 }
Example #25
0
 function disp()
 {
     //定义模板
     $t = new Template('../template/pos');
     $t->set_file('f', 'repayment.html');
     $t->unknowns = "keep";
     $t->left_delimiter = "[#";
     //修改左边界符为[#
     $t->right_delimiter = "#]";
     //修改右边界符#]
     $t->set_var('action', 'add');
     $t->set_var('actionName', '增加');
     $currentcustomerid = $_SESSION["currentcustomerid"];
     $membercardno = $_SESSION["membercardno"];
     //echo 'SELECT * FROM `'.WEB_ADMIN_TABPOX.'customer`  A INNER JOIN '.WEB_ADMIN_TABPOX.'membercard B ON A.customer_id= B.customer_id where A.customer_id ='.$currentcustomerid;
     $memberdata = $this->dbObj->GetRow('SELECT * FROM `' . WEB_ADMIN_TABPOX . 'customer`  A INNER JOIN ' . WEB_ADMIN_TABPOX . 'membercard B ON A.customer_id= B.customer_id where B.membercard_no ="' . $membercardno . '"');
     $t->set_var('membercard_id', $memberdata['membercard_id']);
     $t->set_var('membercard_no', $memberdata['membercard_no']);
     $t->set_var('customer_id', $memberdata['customer_id']);
     $t->set_var('customer_name', $memberdata['customer_name']);
     $t->set_var('code', $memberdata['code']);
     //$t -> set_var('salesowe',$memberdata['salesowe']);
     $t->set_var('salesowe', '');
     $t->set_var('repaymentmemo', '');
     $t->set_var('repayment', 0);
     $t->set_var('sell_no', '');
     $t->set_var('sell_id', '');
     $t->set_var('memcardlevellist', $this->selectlist('memcardlevel', 'cardlevel_id', 'cardlevel_name', $memberdata['cardlevel_id']));
     //echo  'select unit_name from '.WEB_ADMIN_TABPOX.'unit  where unit_id ='.$standardunit;
     $t->set_var('dingjin', '0.00');
     $t->set_var('employee_id', '');
     $t->set_var('employee_name', '');
     $t->set_var('beauty_id', '');
     $t->set_var('beauty_name', '');
     $t->set_var('path', WEB_ADMIN_HTTPPATH . '/common/');
     $t->parse('out', 'f');
     $t->p('out');
 }
Example #26
0
 function goDispAppend()
 {
     $t = new Template('../template/pos');
     $t->set_file('f', 'sell_detail.html');
     $t->unknowns = "move";
     $t->left_delimiter = "[#";
     //修改左边界符为[#
     $t->right_delimiter = "#]";
     //修改右边界符#]
     $t->set_block('f', 'mainlist', 'ml');
     //$t -> set_block('f','consumables','cs');
     if ($this->isAppend) {
         $t->set_var('action', 'add');
         $t->set_var('actionName', '增加');
         $Prefix = 'XS';
         $agency_no = $_SESSION["agency_no"];
         $table = WEB_ADMIN_TABPOX . 'sell';
         $column = 'sell_no';
         $number = 5;
         $id = 'sell_id';
         $sellno = $sellno ? $sellno : $this->makeno($Prefix, $agency_no, $table, $column, $number, $id);
         $t->set_var('sell_no', $sellno);
         $t->set_var('membercard_no', "");
         $t->set_var('error', "");
         $t->set_var('updid', "");
         $t->set_var('timelimit', "");
         $t->set_var('pricepertime', "");
         $t->set_var('totaltimes', "");
         $t->set_var('commission', "");
         $t->set_var('ucommission', "");
         $t->set_var('price', "");
         $t->set_var('error', "");
         $t->set_var('showeditdiv', "");
         $t->set_var('comdisplay', "none");
         $t->set_var('memo', "");
         $t->set_var('recordcount', "");
         $t->set_var('cservices_no', "");
         $t->set_var('cservices_name', "");
         $t->set_var('cpricepertime', "");
         $t->set_var('cservices_id', "");
         $t->set_var('cservices_times', "");
         $t->set_var('cprice', "");
         $t->set_var('cmemo', "");
         $t->set_var('ccategory_name', '');
         $t->set_var('ccategory_id', '');
         $t->set_var('ml');
         $t->set_var('userid', $this->getUid());
     } else {
         $updid = $_GET[MODIFY . 'id'] + 0;
         $date = $this->dbObj->GetRow('SELECT * FROM ' . WEB_ADMIN_TABPOX . 'sell WHERE sell_id = ' . $updid);
         if ($date['assignservice'] == 1) {
             $t->set_var('assignservice1', 'checked="checked"');
             $t->set_var('assignservice0', '');
         } else {
             $t->set_var('assignservice0', 'checked="checked"');
             $t->set_var('assignservice1', '');
         }
         $t->set_var('updid', $updid);
         $t->set_var('action', 'upd');
         $t->set_var($date);
         $t->set_var('error', "");
         $t->set_var('showeditdiv', "");
         $t->set_var('updid', $updid);
         $t->set_var('action', 'upd');
         $t->set_var('actionName', '修改');
         $t->set_var('comdisplay', "");
         $t->set_var('cservices_no', "");
         $t->set_var('cservices_name', "");
         $t->set_var('ccode', "");
         $t->set_var('cservices_id', "");
         $t->set_var('cstandardunit', "");
         $t->set_var('lowerlimit', "");
         $t->set_var('cprice', "");
         $t->set_var('cmemo', "");
         $t->set_var('cpricepertime', "");
         $t->set_var('cservices_times', "");
         $t->set_var('cviceunit', "");
         $t->set_var('conupdid', "");
         //添加消耗品
         $t->set_var('caction', 'add');
         $t->set_var('cupdid', '');
         //设置消耗品列表
         $t->set_var('ml');
         $inrs =& $this->dbObj->Execute('select * from ' . WEB_ADMIN_TABPOX . 'selldetail  where sell_id  =' . $updid);
         while ($inrrs =& $inrs->FetchRow()) {
             $t->set_var($inrrs);
             $data1 = $this->dbObj->getrow('select * from ' . WEB_ADMIN_TABPOX . 'services   where services_id =' . $inrrs["services_id"] . ' and agencyid =' . $_SESSION["currentorgan"]);
             $data2 = $this->dbObj->getrow('select * from ' . WEB_ADMIN_TABPOX . 'servicecategory    where category_id  =' . $data1["categoryid"]);
             $t->set_var($data2);
             $t->set_var($data1);
             $t->parse('ml', 'mainlist', true);
         }
         $inrs->Close();
         $acount =& $this->dbObj->GetOne('select count(*) as acount from ' . WEB_ADMIN_TABPOX . 'selldetail  where sell_id  =' . $updid);
         $t->set_var('recordcount', $acount);
         // 修改消耗品
         if ($_GET['consumables_id'] != '') {
             //$t -> set_var('cs');
             $t->set_var('caction', 'upd');
             $inrs2 =& $this->dbObj->GetRow('select * from ' . WEB_ADMIN_TABPOX . 'selldetail  where selldetail_id =' . $_GET['consumables_id']);
             //$t -> set_var($inrs);
             $t->set_var('cupdid', $inrs2['services_id']);
             $t->set_var('conupdid', $_GET['consumables_id']);
             $t->set_var('cservices_times', $inrs2['services_times']);
             $t->set_var('cpricepertime', $inrs2['pricepertime']);
             $inrs3 =& $this->dbObj->GetRow('select * from ' . WEB_ADMIN_TABPOX . 'services   where services_id =' . $inrs2['services_id']);
             $t->set_var('cservices_no', $inrs3['services_no']);
             $t->set_var('cservices_name', $inrs3['services_name']);
             $t->set_var('cservices_id', $inrs3['services_id']);
             $t->set_var('ccode', $inrs3['code']);
             $t->set_var('cprice', $inrs3['price']);
             $t->set_var('cstandardunit', $inrs3['standardunit']);
             $t->set_var('cviceunit', $inrs3['viceunit']);
             $t->set_var('cviceunitnumber', $inrs3['viceunitnumber']);
             //$t -> parse('cs','consumables',true);
             //$inrs2 -> Close();
         }
         $t->set_var('procataloglist', $this->selectlist('procatalog', 'category_id', 'category_name', $date['categoryid']));
         $t->set_var('unitlist', $this->selectlist('unit', 'unit_id', 'unit_name', $date['standardunit']));
         $t->set_var('viceunitlist', $this->selectlist('unit', 'unit_id', 'unit_name', $date['viceunit']));
     }
     $t->set_var('categorynamelist', $this->selectlist('servicecategory', 'category_id', 'category_name', $date['categoryid']));
     //$t -> set_var('ml',"");
     $t->set_var('path', WEB_ADMIN_HTTPPATH . '/common/');
     $t->parse('out', 'f');
     $t->p('out');
 }
Example #27
0
 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');
 }
Example #28
0
 function goDispAppend()
 {
     $t = new Template('../template/basic');
     $t->set_file('f', 'room_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('roomgroup', $this->roomgroup());
         $t->set_var('error', "");
         $t->set_var('showeditdiv', "");
         $t->set_var('room_no', "");
         $t->set_var('room_name', "");
         $t->set_var('principal', "");
         $t->set_var('memo', "");
         $t->set_var('beds', "");
         $t->set_var('tel', "");
         $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 . 'transfervoucherdetail WHERE transfervoucherdetail_id = ' . $updid));
         $t->set_var('error', "");
         //$t -> set_var('roomgroup',$this->roomtype());
         $t->set_var('updid', $updid);
         $t->set_var('action', 'upd');
         $t->set_var('actionName', '修改');
         $inrs =& $this->dbObj->Execute('SELECT * FROM ' . WEB_ADMIN_TABPOX . 'transfervoucherdetail WHERE transfervoucherdetail_id = ' . $updid);
         while ($inrrs =& $inrs->FetchRow()) {
             $t->set_var($inrrs);
             $t->set_var('roomgroup', $this->roomgroup($inrrs['roomgroup_id']));
         }
         $inrs->Close();
     }
     $t->set_var('showeditdiv', "");
     $t->set_var('path', WEB_ADMIN_HTTPPATH . '/common/');
     $t->parse('out', 'f');
     $t->p('out');
 }
Example #29
0
	function goDispAppend(){

		$t = new Template('../template/customer');
		$t -> set_file('f','messagerecord_detail.html');
		$t->unknowns = "keep";
		$t->left_delimiter = "[#"; //修改左边界符为[#
        $t->right_delimiter = "#]"; //修改右边界符#]	


		if($this -> isAppend){
			$t -> set_var('action','add');
			$t -> set_var('actionName','增加');
		$t -> set_var('customer_id',"");	
		$t -> set_var('customer_name',"");	
		$t -> set_var('employee_id',"");	
		$t -> set_var('man',"");	
		$t -> set_var('title',"");	
		$t -> set_var('content',"");	
		$t -> set_var('senddate',date("Y-m-d"));	
		$t -> set_var('address',"");	
		$t -> set_var('showeditdiv',"");		
		$t -> set_var('handphone',"");
		$t -> set_var('userid',$this->getUid());	
		$t -> set_var('messagetemplate_name',"");
		}else{

			$updid = $_GET[MODIFY.'id'] + 0 ;	
			$data=$this->dbObj->GetRow('SELECT * FROM '.WEB_ADMIN_TABPOX.'messagerecord WHERE messagerecord_id = '.$updid);
			$t -> set_var($data);
			
			$t -> set_var('ismarrycheck1',$data['ismarry']==1?'checked':'');	
			$t -> set_var('ismarrycheck2',$data['ismarry']==2?'checked':'');	
			$t -> set_var('error',"");
			$t -> set_var('showeditdiv',"");
			$t -> set_var('updid',$updid);
			$t -> set_var('action','upd');
			$t -> set_var('actionName','修改');

		}
if ($date['state']==1){

		$t -> set_var('state','<input id="state" type="radio" checked="checked" value="1" name="state" /><label for="state">可用</label><input id="state" type="radio" value="0" name="state" /><label for="state">停用</label>');
}else
{
		$t -> set_var('state','<input id="state" type="radio"  value="1" name="state" /><label for="state_0">可用</label><input id="state" type="radio" value="0" checked="checked" name="state" /><label for="state">停用</label>');
}
		//$t -> set_var('brandlist',$this ->selectlist('brand','brand_id','brand_name',$data['brandid']));
		//$t -> set_var('genderlist',"111");	
		//echo $data['genderid'];
		$t -> set_var('genderlist',$this -> gender($data['genderid']));	
		//$t -> set_var('procataloglist',$this ->selectlist('procatalog','category_id','category_name',$data['categoryid']));	
		//$t -> set_var('unitlist',$this ->selectlist('unit','unit_id','unit_name',$data['standardunit']));	
		//$t -> set_var('viceunitlist',$this ->selectlist('unit','unit_id','unit_name',$data['viceunit']));						

		$t -> set_var('path',WEB_ADMIN_HTTPPATH.'/common/');
		$t -> parse('out','f');
		$t -> p('out');
		
	}
Example #30
0
 function goDispAppend()
 {
     $t = new Template('../template/staff');
     $t->set_file('f', 'staff_detail.html');
     $t->unknowns = "move";
     $t->left_delimiter = "[#";
     //修改左边界符为[#
     $t->right_delimiter = "#]";
     //修改右边界符#]
     if ($this->isAppend) {
         $t->set_var('action', 'add');
         $t->set_var('actionName', '增加');
         $Prefix = '';
         $agency_no = $_SESSION["agency_no"];
         $table = WEB_ADMIN_TABPOX . 'stock';
         $column = 'stock_no';
         $number = 2;
         $id = 'stock_id';
         $t->set_var('stock_no', "");
         $t->set_var('stock_name', "");
         $t->set_var('idnumber', "");
         $t->set_var('email', "");
         $t->set_var('handphone', "");
         $t->set_var('zipcode', "");
         $t->set_var('tel', "");
         $t->set_var('address', "");
         $t->set_var('birthday', "");
         $t->set_var('price', "");
         $t->set_var('efficacy', "");
         $t->set_var('useway', "");
         $t->set_var('basis', "");
         $t->set_var('error', "");
         $t->set_var('showeditdiv', "");
         $t->set_var('memo', "");
         $t->set_var('attendancecode', "");
         $t->set_var('stock_no', $this->makeno($Prefix, $agency_no, $table, $column, $number, $id));
         $t->set_var('userid', $this->getUid());
         $t->set_var('picurl', "暂时没有照片");
         $t->set_var('picpath', "");
         $t->set_var('birthday', date("Y-m-d"));
     } else {
         $updid = $_GET[MODIFY . 'id'] + 0;
         $data = $this->dbObj->GetRow('SELECT * FROM ' . WEB_ADMIN_TABPOX . 'stock WHERE stock_id = ' . $updid);
         $t->set_var($data);
         if ($data['picpath'] == '') {
             $t->set_var('picurl', "暂时没有照片");
         } else {
             $t->set_var('picpath', $data['picpath']);
             $t->set_var('picurl', "<img src=" . $data['picpath'] . " width=120 height=150 />");
         }
         $t->set_var('ismarrycheck1', $data['ismarry'] == 1 ? 'checked' : '');
         $t->set_var('ismarrycheck2', $data['ismarry'] == 2 ? 'checked' : '');
         $t->set_var('error', "");
         $t->set_var('showeditdiv', "");
         $t->set_var('updid', $updid);
         $t->set_var('action', 'upd');
         $t->set_var('actionName', '修改');
     }
     //$t -> set_var('brandlist',$this ->selectlist('brand','brand_id','brand_name',$data['brandid']));
     //$t -> set_var('genderlist',"111");
     //echo $data['genderid'];
     $t->set_var('genderlist', $this->gender($data['genderid']));
     //$t -> set_var('stocklevellist',$this ->selectlist('stocklevel','stocklevel_id','stocklevel_name',$data['stocklevelid']));
     //$t -> set_var('emploeelevellist',$this ->selectlist('emploeelevel','emploeelevel_id','emploeelevel_name',$data['emploeelevelid']));
     //$t -> set_var('unitlist',$this ->selectlist('unit','unit_id','unit_name',$data['standardunit']));
     //$t -> set_var('viceunitlist',$this ->selectlist('unit','unit_id','unit_name',$data['viceunit']));
     $t->set_var('path', WEB_ADMIN_HTTPPATH . '/common/');
     $t->parse('out', 'f');
     $t->p('out');
 }