Exemplo n.º 1
0
 function __construct()
 {
     $this->member = load_class('member', 'member');
     $this->setting = get_cache('setting', 'member');
     parent::__construct();
     $this->payments_res = $this->db->get_list('payment', "id>1 AND status=1");
     $this->payments = key_value($this->payments_res, 'id', 'name');
     $this->status_arr = array(0 => '回收站', 1 => '交易成功', 2 => '交易失败', 3 => '交易错误', 4 => '交易超时', 5 => '交易取消', 6 => '等待用户付款', 7 => '待商家发货', 8 => '待用户确认收货');
 }
Exemplo n.º 2
0
 /**
  * 添加自定义内容
  */
 public function add_content()
 {
     $blockid = $GLOBALS['blockid'];
     if (isset($GLOBALS['submit'])) {
         $formdata = $GLOBALS['form'];
         $formdata['keyid'] = '';
         $formdata['blockid'] = $blockid;
         $formdata['addtime'] = SYS_TIME;
         $formdata['siteid'] = get_cookie('siteid');
         $formdata['isdiy'] = 1;
         $formdata = array_map('remove_xss', $formdata);
         if (isset($GLOBALS['attform'])) {
             $attform = $GLOBALS['attform'];
             $attform = array_map('remove_xss', $attform);
             $formdata['attach'] = serialize($attform);
         }
         $this->db->insert('block_data', $formdata);
         $forward = '?m=content&f=block&v=item_listing&blockid=' . $blockid . $this->su();
         MSG(L('add success'), $forward);
     } else {
         $show_formjs = 1;
         $form = load_class('form');
         $rs = $this->db->get_one('block', array('blockid' => $blockid));
         $attach = '';
         $result = $this->db->get_list('kind', array('keyid' => 'interest'), '*', 0, 50, 0, 'kid ASC');
         $interest = key_value($result, 'maxid', 'name');
         include $this->template('block_add_content');
     }
 }
Exemplo n.º 3
0
<body class="body pxgridsbody">
<section class="wrapper">
<div class="row">
<div class="col-lg-12">
<section class="panel">
    <?php 
echo $this->menu($GLOBALS['_menuid']);
?>

    <div class="panel-body">
        <form class="form-horizontal tasi-form" method="post" action="">
            <div class="form-group">
                <label class="col-sm-2 control-label">所属角色</label>
                <div class="col-sm-4 input-group">
                    <?php 
echo $form->select(key_value($roles, 'role', 'name'), $r['role'], 'name="form[role]" class="form-control"');
?>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-2 control-label">管理员账号</label>
                <div class="col-sm-4 input-group">
                    <input type="text" class="form-control" name="form[username]" color="#000000" value="<?php 
echo $username;
?>
" readonly>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-2 control-label">密码</label>
                <div class="col-sm-4 input-group">
Exemplo n.º 4
0
 /**
  * 后台充值
  */
 public function add()
 {
     $config = $this->db->get_one('payment', array('id' => 2));
     if ($config['status'] != 1) {
         MSG('不支持后台充值,开启方式:充值配置中开启后台充值功能');
     }
     if (isset($GLOBALS['submit'])) {
         load_function('common', 'pay');
         $formdata = array();
         $formdata['username'] = remove_xss($GLOBALS['username']);
         $mr = $this->db->get_one('member', array('username' => $formdata['username']));
         if (!$mr) {
             MSG('用户不存在');
         }
         $formdata['uid'] = $mr['uid'];
         $plus_minus = intval($GLOBALS['plus_minus']);
         $money = $formdata['money'] = sprintf("%.2f", substr(sprintf("%.3f", $GLOBALS['money']), 0, -2));
         $formdata['order_no'] = create_order_no();
         $formdata['note'] = remove_xss($GLOBALS['note']);
         $formdata['plus_minus'] = $plus_minus;
         $formdata['adminuid'] = $_SESSION['uid'];
         $formdata['addtime'] = SYS_TIME;
         $formdata['paytime'] = SYS_TIME;
         $formdata['endtime'] = SYS_TIME;
         $formdata['quantity'] = 1;
         $formdata['status'] = 1;
         $formdata['payment'] = 1;
         $username = get_cookie('username');
         if ($plus_minus == 1) {
             $plus_minus_type = '充值';
             $formdata['payname'] = $username . '为用户' . $plus_minus_type;
             $linkageid = $this->db->insert('pay', $formdata);
             $this->db->update('member', "`money`=(`money`+{$money})", array('uid' => $mr['uid']));
         } else {
             $plus_minus_type = '扣款';
             $formdata['payname'] = $username . '为用户' . $plus_minus_type;
             $linkageid = $this->db->insert('pay', $formdata);
             $this->db->update('member', "`money`=(`money`-{$money})", array('uid' => $mr['uid']));
         }
         MSG(L('operation success'));
     } else {
         $show_formjs = 1;
         $form = load_class('form');
         $options = $this->db->get_list('kind', array('keyid' => 'link'));
         $options = key_value($options, 'kid', 'name');
         include $this->template('add');
     }
 }
Exemplo n.º 5
0
$user = $_SESSION['user'];
$level = $_SESSION[$user];
$db = new \sql\MysqlPDO($level);
?>
<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>装配报表</title>
</head>
<link rel="stylesheet" type="text/css" href="../res/css/custom/list.css">
<body>
<h2>江苏神通阀门股份有限公司</h2>

<h3>装配加工路线单</h3>
<table width="100%" align="center">
    <?php 
$head = array('产品型号', '生产批号', '工艺编号', '产品名称', '产品编号', '页码');
$table = key_value($head);
key_value_table($table, 3);
?>
</table>
<table width="100%">
    <?php 
$head = array('工序', '工序名称', '工序要求', '自检记录', '装配人员', '检验记录', '检验结论', '检验员', '见证', '工艺设备');
simple_table($head);
?>
</table>
</body>
</html>
Exemplo n.º 6
0
 private function copyfrom($config, $value)
 {
     extract($config, EXTR_SKIP);
     $copyfrom_array = $this->db->get_list('copyfrom', '', '*', 0, 20);
     $copyfrom_array = key_value($copyfrom_array, 'fromid', 'name');
     $holder = '演示站点|www.wuzhicms.com';
     return "<div class='col-sm-4 input-group pull-left'><input type='text' id='{$field}' name='form[{$field}]' placeholder='{$holder}' value='{$value}' class='form-control input-text'></div><div class='col-sm-4'>" . $this->form->select($copyfrom_array, $value, "name='{$field}_data' class='form-control' onchange='change_value(\"{$field}\",this.value)'", "选择已有来源") . "</div>";
 }
Exemplo n.º 7
0
 private function quyu($config, $value)
 {
     extract($config, EXTR_SKIP);
     $quyulist = $this->db->get_list('quyu', array('pid' => $this->cid), '*', 0, 100, 0, 'sort ASC');
     $option = key_value($quyulist, 'areaid', 'name');
     $string = $this->form->select($option, $value, "name='form[{$field}]' class='form-control' style='width:auto;' id='{$field}' ");
     return $string;
 }
Exemplo n.º 8
0
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 col-xs-4 control-label">名称</label>
                            <div class="col-lg-3 col-sm-4 col-xs-4 input-group">
                                <input type="text" class="form-control" name="form[name]" color="#000000" datatype="*"  errormsg="请输入标题" value="<?php 
echo $r['name'];
?>
">
                            </div>
                        </div>
                        <div class="form-group hide" id="models">
                            <label class="col-sm-2 col-xs-4 control-label">绑定模型</label>
                            <div class="col-lg-3 col-sm-4 col-xs-4 input-group">
                                <?php 
echo WUZHI_form::select(key_value($models, 'modelid', 'name'), $r['modelid'], 'name="modelid" class="form-control "', '--不限模型--');
?>
                            </div>
                        </div>
                        <div class="form-group hide" id="rssid">
                            <label class="col-sm-2 col-xs-4 control-label">RSS源</label>
                            <div class="col-lg-3 col-sm-4 col-xs-4 input-group">
                                <input type="text" class="form-control" name="form[rssurl]" color="#000000" datatype="url|*0-100"  errormsg="请输入正确的网址!" value="<?php 
echo $r['url'];
?>
">
                            </div>
                        </div>
                        <div class="form-group hide" id="jsonid">
                            <label class="col-sm-2 col-xs-4 control-label">JSON源</label>
                            <div class="col-lg-3 col-sm-4 col-xs-4 input-group">
Exemplo n.º 9
0
                        <div class="form-group">
                            <label class="col-sm-2 control-label">栏目图片</label>
                            <div class="col-sm-4 input-group">
                                <div class="input-group"><?php 
echo $form->attachment('', '1', 'form[thumb]', $r['thumb']);
?>
</div>
                            </div>
                        </div>

                        <div class="form-group">
                            <label class="col-sm-2 control-label">工作流</label>
                            <div class="col-sm-4 input-group">
                                <?php 
echo $form->select(key_value($workflow, 'workflowid', 'name'), $r['workflowid'], 'name="form[workflowid]" class="form-control"', '≡ 无需审核 ≡');
?>
                            </div>
                        </div>
                        <div class="form-group <?php 
if ($r['pid']) {
    echo 'hide';
}
?>
" id="domain-div">
                            <label class="col-sm-2 control-label">绑定域名</label>
                            <div class="col-sm-4 input-group">
                                <input type="text" class="form-control" id="domain" name="form[domain]" value="<?php 
echo $r['domain'];
?>
">
Exemplo n.º 10
0
 /**
  * 修改友情链接
  */
 public function edit()
 {
     $linkid = intval($GLOBALS['linkid']);
     if (isset($GLOBALS['submit'])) {
         $formdata = array();
         $formdata['sitename'] = remove_xss($GLOBALS['form']['sitename']);
         $formdata['url'] = remove_xss($GLOBALS['form']['url']);
         $formdata['logo'] = remove_xss($GLOBALS['form']['logo']);
         $formdata['remark'] = remove_xss($GLOBALS['form']['remark']);
         $formdata['username'] = get_cookie('username');
         $formdata['addtime'] = SYS_TIME;
         $formdata['kid'] = intval($GLOBALS['form']['kid']);
         $this->db->update('link', $formdata, array('linkid' => $linkid));
         $forward = $GLOBALS['forward'];
         MSG(L('operation success'), $forward);
     } else {
         $show_formjs = 1;
         $form = load_class('form');
         $r = $this->db->get_one('link', array('linkid' => $linkid));
         $options = $this->db->get_list('kind', array('keyid' => 'link'));
         $options = key_value($options, 'kid', 'name');
         include $this->template('edit');
     }
 }
Exemplo n.º 11
0
<div><a href="../list_product.php">主页</a></div>

<h2>产品信息</h2>

<div>
    <table width="100%">
        <?php 
$head = array('物料名称', '工艺路线名称', '规格型号', '物料编码', '材质', '单位');
$table_column = array('material_name', 'craft_line', 'standard', 'material_num', 'material');
$list = $db->get_choice_select(PRODUCT, $table_column, "id={$product_id}");
$list['unit'] = null;
if ($list == null) {
    echo "<script>\n                    alert('没有相关数据!');\n                    window.history.back();\n                  </script>";
} else {
    $content = key_value_change_one($list);
    $table = key_value($head, $content);
    key_value_table($table, 3);
}
?>
    </table>
</div>
<h2>机加工工艺</h2>

<div><a href='../add/add_metallurgy.php?id=<?php 
echo $product_id;
?>
'>添加</a></div>
<div>
    <table width="100%">
        <?php 
$material_num = $list['material_num'];
Exemplo n.º 12
0
 /**
  * 积分入帐
  */
 public function add()
 {
     $config = get_cache('point_config');
     if ($config['status'] != 1) {
         MSG('未开启后台积分入帐,如需开启请在积分配置中开启');
     }
     if (isset($GLOBALS['submit'])) {
         load_function('common', 'pay');
         $formdata = array();
         $formdata['username'] = remove_xss($GLOBALS['username']);
         $mr = $this->db->get_one('member', array('username' => $formdata['username']));
         if (!$mr) {
             MSG('用户不存在');
         }
         $formdata['uid'] = $mr['uid'];
         $plus_minus = intval($GLOBALS['plus_minus']);
         $username = get_cookie('username');
         $point = intval($GLOBALS['point']);
         if ($plus_minus == 1) {
             $plus_minus_type = '增加';
             $plus_minus = '+';
             $left_point = $mr['points'] + $point;
         } else {
             $plus_minus_type = '减少';
             $plus_minus = '-';
             $left_point = $mr['points'] - $point;
             if ($left_point <= 0) {
                 MSG('用户积分为:' . $mr['points'] . ',不足扣除' . $point);
             }
         }
         $payname = $username . '后台管理:' . $plus_minus_type . '积分,用户剩余积分:' . $left_point . '<br>' . $GLOBALS['note'];
         $credit_api = load_class('credit_api', 'credit');
         $credit_api->handle($mr['uid'], $plus_minus, $point, $payname);
         MSG(L('operation success'), HTTP_REFERER);
     } else {
         $show_formjs = 1;
         $form = load_class('form');
         $options = $this->db->get_list('kind', array('keyid' => 'link'));
         $options = key_value($options, 'kid', 'name');
         include $this->template('add');
     }
 }
Exemplo n.º 13
0
function hotcity($type = 1)
{
    $db = load_class('db');
    $result = $db->get_list('category', array('modelid' => 3, 'ishot' => 1), '*', 0, 100, 0, 'sort ASC');
    if ($type == 1) {
        $result = key_value($result, 'cid', 'name');
        return WUZHI_form::select($result, 0, 'name="cityid" class="form-control input-sm"', '请选择城市');
    } else {
        return $result;
    }
}
Exemplo n.º 14
0
                            <th class="tablehead center">目标栏目(<?php 
echo $modelname;
?>
)</th>

                        </tr>
                        </thead>
                        <tr>
                        <td><div class="col-lg-12 col-sm-12"><textarea name="ids" class="form-control" rows="14"><?php 
echo $ids;
?>
</textarea></div></td>

                        <td><div class="col-lg-12 col-sm-12"><?php 
$sitelist = get_cache('sitelist');
$site_arr = key_value($sitelist, 'siteid', 'name');
echo $form->select($site_arr, 0, 'name="cid" style="height:260px;" class="form-control" size=2 onchange="load_sitecate(this.value)"');
?>
</div></td>
                            <td><div class="col-lg-12 col-sm-12" id="categorys"><?php 
echo $form->tree_select($categorys, 0, 'name="cid" style="height:260px;width:260px;" class="form-control" size=2', '≡ 请选择栏目 ≡');
?>
</div></td>
                        </tr>
                        <tr><td colspan="3" class="text-center">
                                <input name="forward" type="hidden" value="<?php 
echo HTTP_REFERER;
?>
">
                                <button type="submit" class="btn btn-primary"><i class=" icon-angle-double-right btn-icon"></i>批量推送</button></td></tr>
                        </table>
Exemplo n.º 15
0
<div class="row">
<div class="col-lg-12">
<section class="panel">
    <header class="panel-heading">
        <span>添加菜单</span>
    </header>
    <div class="panel-body">
        <form class="form-horizontal tasi-form" method="post" action="">
            <div class="form-group">
                <label class="col-sm-2 col-xs-4 control-label">上级菜单</label>
                <div class="col-lg-3 col-sm-4 col-xs-4 input-group">
                    <?php 
if ($pid) {
    echo '<input type="hidden" name="form[pid]" value="' . $pid . '"><input class="form-control" id="disabledInput" type="text" placeholder="' . $parentname . '" disabled>';
} else {
    echo $form->select(key_value($menus, 'menuid', 'name'), 0, 'name="form[pid]" class="form-control m-bot15"', '≡ 请选择上级菜单 ≡');
}
?>

                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-2 col-xs-4 control-label">菜单中文名</label>
                <div class="col-lg-3 col-sm-4 col-xs-4 input-group">
                    <input type="text" class="form-control" name="form[name]" color="#000000">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-2 col-xs-4 control-label">模块名</label>
                <div class="col-lg-3 col-sm-4 col-xs-4 input-group">
                    <input type="text" class="form-control" name="form[m]" value="<?php