"/> <input type="text" class="input-xlarge" name="<?php echo 'category_name_' . $num; ?> " onblur="keypd(this)" style="width:150px; height:30px; font-size:12px; line-height:30px; margin:0; padding:0 6px;" value="<?php echo $value['name']; ?> " placeholder="请填写分类名"> </div> <div class="fl w560"><?php echo $value['addtime']; ?> </div> <div class="fr w280"> <?php if (Beu_Power::selectAction('/erp/deletecategory')) { ?> <a href="#/" class="button button-primary button-rounded button-small" onclick="deletecategory(<?php echo $value['id']; ?> ,this)" style="padding:0 10px;">删除</a> <?php } ?> </div> </div> <?php $num++; } } ?>
?> " c_o_id="<?php echo $id_to_str_arr[$value->clothes_order_id]; ?> "> <div class="cpic_t1"> <input type="checkbox" name="checkbox" id="checkbox" style="margin:0; width:15px;"/> <?php if (Beu_Power::selectAction('/erp/delClothesimg')) { ?> <a onclick="delClothesimg(this)" class="button button-primary button-rounded button-small" style=" width:50px; padding:0 5px;margin-top:15px">删除</a> <?php } ?> <?php if (Beu_Power::selectAction('/erp/setClothesimgstatus')) { ?> <?php if ($value->status == 2 || $value->status == 0) { ?> <a onclick="clickStatus(this,1)" class="button button-primary button-rounded button-small img_status_btn_1" style=" width:50px; padding:0 5px;margin-top:15px">合格</a> <?php } ?> <?php if ($value->status == 1 || $value->status == 0) { ?> <a onclick="clickStatus(this,2)" class="button button-primary button-rounded button-small img_status_btn_2" style=" width:50px; padding:0 5px;margin-top:15px">不合格</a> <?php } ?>
/** * 初始化函数 */ public function init() { //$_SESSION['brandid']=192; //Yii::app()->cache->flush(); $this->login_type = Yii::app()->request->getParam('login_type'); //C# 软件登录 //此Cookie在每个Controller 里必须加载 用于域名的绑定 $cookie = new CHttpCookie('img_server_host', Yii::app()->params['img_server_host']); $cookie->expire = time() + 3600 * 24; //有限期1天 Yii::app()->request->cookies['img_server_host'] = $cookie; $cookie = new CHttpCookie('web_server_host', Yii::app()->params['web_server_host']); $cookie->expire = time() + 3600 * 24; //有限期1天 Yii::app()->request->cookies['web_server_host'] = $cookie; /**************************获取 设置 网站模版类型 start *************************************/ $http_cookie = Yii::app()->request->getCookies(); if (!empty($http_cookie['Website_template']->value)) { $this->Website_template = $http_cookie['Website_template']->value; } $http_cookie = new CHttpCookie('Website_template', $this->Website_template); //定义cookie的有效期 $http_cookie->expire = time() + 60 * 60; //有限期1小时 //把cookie写入cookies使其生效 Yii::app()->request->cookies['Website_template'] = $http_cookie; /**************************获取 设置 网站模版类型 end *************************************/ $status = 0; //0表示登录错误,1 表示 权限错误 $REDIRECT_URL = isset($_SERVER['REDIRECT_URL']) ? $_SERVER['REDIRECT_URL'] : $_SERVER['REQUEST_URI']; //当前URL规范 if (!empty($REDIRECT_URL)) { $REDIRECT_URL = str_replace('?', '/', $REDIRECT_URL); $REDIRECT_URL = explode('/', $REDIRECT_URL); if (!isset($REDIRECT_URL[2]) || empty($REDIRECT_URL[2])) { $this->renderPartial('/erp/login'); exit; } if (count($REDIRECT_URL) > 1) { $REDIRECT_URL = '/' . $REDIRECT_URL[1] . '/' . $REDIRECT_URL[2]; } } try { if (!isset($_SESSION)) { session_start(); } //验证账号登录状态,不需要修改账户登录时间 也不需要记录日志 if ($REDIRECT_URL == '/erp/GetUserType' && isset($_SESSION['user_id'])) { throw new Exception('验证账号登录状态,不需要修改账户登录时间'); } usercookie::userCheckCookie(); //获取登录状态 //echo session_id();//exit(); $_SESSION['touchid_new'] = isset($_SESSION['touchid_new']) ? $_SESSION['touchid_new'] : 0; $_SESSION['Disable'] = false; //是否禁用权限管理 //判断用户是否登陆 if (!isset($_SESSION['user_id']) || empty($_SESSION['user_id'])) { $user = Yii::app()->request->getParam('upwo'); if (!$user) { throw new Exception('对不起,您尚未登录系统!'); } else { throw new Exception('自动登录失败!'); } } //获取用户访问权限 $user = WebUser::getusersById($_SESSION['user_id']); if ($user['status'] == 0) { throw new Exception($user['msg']); } if (empty($user['data']->touchid)) { throw new Exception('帐号未绑定搭配屏'); } $touch_arr = json_decode($user['data']->touchid, true); //用户绑定的搭配屏 $touch_ret = Touch::touchSelectById($touch_arr[0]); //根据搭配屏获取品牌 if ($touch_ret['status'] == 0) { throw new Exception($touch_ret['msg']); } $_SESSION['brandid'] = $touch_ret['data']['brandid']; if (empty($_SESSION['brandid'])) { throw new Exception('帐号未绑定品牌'); } $_SESSION['type'] = $user['data']->type; //判断用户的访问权限是否可以访问系统 $user_type = isset($_SESSION['type']) ? $_SESSION['type'] : 0; $user_type = permission::userTypeChange($user_type, $user['data']->ERP3_status); //权限转换 if (empty($user_type) || $user_type > 70 || $user_type <= 50) { //只有ERP3.0账户可访问 throw new Exception('对不起,您的权限不能访问系统!'); } Yii::app()->params['user_type'] = $user_type; $cookie = new CHttpCookie('user_type', $user_type); $cookie->expire = time() + 60 * 60 * 2; //有限期2分钟 Yii::app()->request->cookies['user_type'] = $cookie; if ($user_type > 1) { //将获取到的品牌存入cookie,以供前台js读取 $cookie = new CHttpCookie('brand', $_SESSION['brandid']); $cookie->expire = time() + 60 * 2; //有限期2分钟 Yii::app()->request->cookies['brand'] = $cookie; $arr = explode(':', $_SERVER['HTTP_HOST']); if (isset($_SESSION['Disable']) && $_SESSION['Disable']) { $status = 1; throw new Exception('权限被禁用或域名不正确'); } //echo "wb1";exit(); $ret = Beu_Power::getPowerAll(); //获取用户可访问的页面 if ($ret['status'] == 0) { throw new Exception($ret['msg']); } Yii::app()->params['power_action'] = isset($ret['data']) ? $ret['data'] : array(); //将权限列表存入全局 //print_r(Yii::app()->params['power_action']); if (!Beu_Power::selectAction($REDIRECT_URL)) { //查询当前路径是否可访问 $status = 1; throw new Exception('对不起,本账号无此权限'); } } $this->setHistory(); //设置日志 } catch (Exception $e) { if ($REDIRECT_URL != '/erp/GetUserType') { $arr = explode(':', $_SERVER['HTTP_HOST']); $this->ret_msg = $e->getMessage(); $ret_a = Beu_Power::getActionInfoByPower(2, 1, 2); //获取不登陆可访问的链接 $gc_ret = Beu_Power::getActionInfoByPower(2, 45, 2); //工厂软件使用 工厂软件不验证登陆 $action_path = array(); if ($ret_a['status'] == 1) { foreach ($ret_a['data'] as $value) { $action_path[] = $value['path']; } foreach ($gc_ret['data'] as $value) { $action_path[] = $value['path']; } foreach ($this->interface_arr as $value) { $action_path[] = $value; } } else { $this->ret_msg = $ret_a['msg']; } if ((!isset($_SESSION['Disable']) || !$_SESSION['Disable']) && $REDIRECT_URL != '' && !in_array($REDIRECT_URL, $action_path)) { //判断当前用户是有有权限访问 当前链接 Yii::app()->params['power_action'] = array(); $this->__errorview($status, $this->ret_msg); } } } }
$o_name_arr[] = substr($o_value, 0, 10); } echo implode('<br/>', $o_name_arr); } else { echo substr($value['o_addtime'], 0, 10); } ?> </div></div></div> <div class="fl w115" style="height: 100%;"> <div class="div_table"><div class="div_table_cell"><a target="_blank" href="/erp/manageinfo/id/<?php echo Comm::strencrypt($value['id']); ?> " class="button button-primary button-rounded button-small" style=" width:50px; padding:0 5px;">审图</a> <?php if (Beu_Power::selectAction('/erp/delClothesByclothesid')) { ?> <br/> <a onclick="delClothesByclothesidpop(this)" class="button button-primary button-rounded button-small" style=" width:50px; padding:0 5px;margin-top:15px">删除</a> <?php } ?> </div></div> </div> </div> <?php } ?> <?php } else { echo '<div class="tab_head text-center border3a" >查询无果</div>';
<a href="javascript:void(0)" onclick="updateorder(<?php echo $value['id']; ?> ,'<?php echo $value['ordername']; ?> ','<?php echo $value['description']; ?> ')" class="button button-primary button-rounded button-small" style="padding:0 10px;">修改订单</a> <?php } } ?> <?php if (Beu_Power::selectAction('/erp/getorderlogdate')) { if ($value['haveimage'] == 1) { ?> <a href="javascript:void(0)" onclick="getorderlogdate(<?php echo $value['id']; ?> )" class="button button-primary button-rounded button-small" style="padding:0 10px;">查看日志</a> <?php } } ?> <a href="/erp/downfile?url=<?php echo 'http://erp.beubeu.com/uploads/saveexcel/' . $brandid . '_' . $value['ordername'] . '.xls'; ?> " class="button button-primary button-rounded button-small" style="padding:0 10px;">下载EXCEL表格</a>
</script> <div class="container-fluid head"> <div class="top"> <div class="logo w244 fl"><img src="/images/logo_1.jpg" alt="140x140"></div> <div class="nav_m w620 fl"> <ul> <li class="sel" <?php if (!Beu_Power::selectAction('/erp/manage')) { echo 'style="display:none"'; } ?> >图片管理</li> <li <?php if (!Beu_Power::selectAction('/erp/orderlist')) { echo 'style="display:none"'; } ?> >订单管理</li> <li <?php if (!Beu_Power::selectAction('/erp/dplist')) { echo 'style="display:none"'; } ?> >搭配管理</li> </ul> </div> <div class="login_rt w244 fr text-right"> 登录名:<span></span> <a href="/erp/loginout">退出</a></div> </div> </div>