<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                合規國際互聯網加速 OSASE為企業客戶提供高速穩定SD-WAN國際加速解決方案。 廣告
                ~~~ <?php namespace app\admin\controller; use app\common\controller\AdminBase; use think\Db; use think\Session; class Imgfiletag extends AdminBase { protected function _initialize() { parent::_initialize(); } public function index() { return $this->fetch(); } //添加1-1 public function add() { return $this->fetch(); } //添加1-2 public function save() { if ($this->request->isPost()) { $status=0; $message="添加失敗"; $data=$this->request->param(); $map = ['title'=> $data['title']]; $admin = model('ImgfileTag')::get($map); if($admin){ $message='添加失敗,分組名已存在'; }else { $data['create_time']=time(); if (model('ImgfileTag')->allowField(true)->save($data)) { $status = 1; $message = '添加成功'; } } } return ['status'=>$status,'message'=>$message]; } //編輯1-1 public function edit($id) { $apage=Db::table('yp_imgfile_tag')->where('id',$id)->find(); $this->assign('apage',$apage); return $this->fetch(); } //編輯1-2 public function update($id) { $status=0; $message="更新失敗"; $data=$this->request->param(); $map = ['title'=> $data['title']]; $admin = model('ImgfileTag')::get($map); if($admin){ $message='更新失敗,分組名已存在'; }else { $data['create_time']=time(); if (model('ImgfileTag')->allowField(true)->save($data,['id'=>$data['id']])){ $status = 1; $message = '更新成功'; } } return ['status'=>$status,'message'=>$message]; } //刪除 public function delete($id) { $message="刪除失敗"; if($id==1){ $message="默認分組不允許刪除"; }else{ $ta=Db::name('imgfile')->where('tag_id',$id)->field('id')->select(); if (empty($ta)) { model('ImgfileTag')->destroy($id); $message="已刪除"; }else{ //halt($ta); $tag[]=''; foreach ($ta as $key => $val) { if(is_array($val)){ foreach ($val as $k => $v) { $tag[$key]=$v; } } } if(Db::name('imgfile')->where('id','in',$tag)->setField('tag_id',1)){ model('ImgfileTag')->destroy($id); $message="已刪除"; } } } return $message; } } ~~~
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看