예제 #1
0
 public function sendFeedBack()
 {
     $data = array('type' => intval($this->param['type']), 'appid' => intval($this->param['appid']), 'mid' => intval($this->param['mid']), 'uuid' => $this->param['uuid'], 'dateline' => time(), 'contact' => $this->param['contact'], 'content' => $this->param['content']);
     if ($this->db->insert($data, 'feedback')) {
         \FeedBack\Inc\View::output(true, 'Data Save Succeed');
     } else {
         \FeedBack\Inc\Error::showError('Data Save Error', 1002);
     }
 }
예제 #2
0
 public static function load($classname)
 {
     $file = ROOT . '/' . str_replace("\\", "/", substr($classname, 8)) . '.Inc.php';
     if (!is_file($file)) {
         \FeedBack\Inc\Error::showException("{$file} not exists");
     } else {
         require $file;
     }
 }
예제 #3
0
 public function execute($sql)
 {
     $result = mysql_query($sql, $this->dblink);
     if ($result == false) {
         \FeedBack\Inc\Error::showError("Mysql Execute Error:" . mysql_error($this->dblink), 2004);
     } else {
         $numrows = mysql_affected_rows($this->dblink);
         $last_insid = mysql_insert_id($this->dblink);
         return $last_insid ? $last_insid : $numrows;
     }
 }