Esempio n. 1
0
 public function ajax_delete()
 {
     if (!$this->RequestHandler->isPost()) {
         $this->error(ECode::$SYS_REQUESTERROR);
     }
     foreach ($this->params['form'] as $k => $v) {
         if (!preg_match("/f_/", $k)) {
             continue;
         }
         $id = split("_", $k);
         try {
             Friend::delete($id[1]);
         } catch (Exception $e) {
             continue;
         }
     }
     $ret['ajax_code'] = ECode::$FRIEND_DELETEOK;
     $ret['default'] = "/friend";
     $ret['list'][] = array("text" => '好友列表', "url" => "/friend");
     $this->set('no_html_data', $ret);
 }