예제 #1
0
 protected function _save($data)
 {
     $db = new MsgsModel();
     if ($db->add($data)) {
         echo "<div class='center'><br><br><img src='Public/success.jpg' /><br><br>发送成功!</div>";
     } else {
         echo "<div class='center'><br><br><img src='Public/error.jpg' /><br><br>呃,服务器开小差了~~~稍后再试··</div>";
     }
 }
예제 #2
0
 public function save()
 {
     $db = new MsgsModel();
     import("ORG.Util.Input");
     $data['text'] = Input::deleteHtmlTags($_POST['text']);
     $data['time'] = date("Y-m-d H:i:s");
     $data['ip'] = $this->getIp();
     //
     if ($db->add($data)) {
         echo "<div id='sendmsg' class='center'>发送成功!</div>";
         //dump($data);
     } else {
         echo "<div id='sendmsg' class='center red'>呃,服务器开小差了~~~稍后再试··</div>";
     }
 }
예제 #3
0
 public function sendMsg()
 {
     $db = new MsgsModel();
     $db->create();
     if (!$db->add()) {
         $this->gError('发送短信时出现错误  ' . $db->getError(), 'index');
     } else {
         $this->gSuccess('发送成功!', 'index');
     }
 }