Example #1
0
 public function actionResetpassword()
 {
     $id = $_GET['id'];
     $detail = VcosMember::model()->findByPk($id);
     $detail->member_id = $id;
     $detail->member_password = md5('888888');
     if ($detail->save() > 0) {
         Helper::show_message(yii::t('vcos', '重设成功(密码为:12345678)'), Yii::app()->createUrl("User/user_list"));
     } else {
         Helper::show_message(yii::t('vcos', '重设失败'));
     }
 }
 public function actionGoods_order_edit()
 {
     $this->setauth();
     //检查有无权限
     $id = $_GET['id'];
     $detail = VcosGoodsOrder::model()->findByPk($id);
     if ($_POST) {
         $detail->order_id = $id;
         $detail->order_remark = $_POST['remark'];
         $detail->order_state = $_POST['state'];
         $detail->is_read = '1';
         if ($detail->save() > 0) {
             Helper::show_message(yii::t('vcos', '修改成功。'), Yii::app()->createUrl("Dutyfreegoods/goods_order_list"));
         } else {
             Helper::show_message(yii::t('vcos', '修改失败。'));
         }
     }
     $sql = "SELECT a.*, c.goods_name, b.goods_img_url \r\n                FROM vcos_goods_order_detail a, vcos_dutyfree_goods b, vcos_dutyfree_goods_language c\r\n                WHERE a.goods_id=b.goods_id AND a.order_serial_num = {$detail->order_serial_num} AND b.goods_id = c.goods_id AND c.iso = '" . Yii::app()->language . "'";
     $sub_detail = Yii::app()->m_db->createCommand($sql)->queryAll();
     $user = VcosMember::model()->findByPk($detail->membership_id);
     $this->render('goods_order_edit', array('detail' => $detail, 'sub_detail' => $sub_detail, 'user' => $user));
 }