Beispiel #1
0
 public static function createNoteComment($pack)
 {
     $pack->auth->permission = "read_write";
     if (!users::authenticateUser($pack->auth)) {
         return new return_package(6, NULL, "Failed Authentication");
     }
     $pack->note_comment_id = dbconnection::queryInsert("INSERT INTO note_comments (" . "game_id," . "note_id," . "user_id," . (isset($pack->name) ? "name," : "") . (isset($pack->description) ? "description," : "") . "created" . ") VALUES (" . "'" . $pack->game_id . "'," . "'" . $pack->note_id . "'," . "'" . $pack->auth->user_id . "'," . (isset($pack->name) ? "'" . addslashes($pack->name) . "'," : "") . (isset($pack->description) ? "'" . addslashes($pack->description) . "'," : "") . "CURRENT_TIMESTAMP" . ")");
     client::logPlayerCreatedComment($pack);
     games::bumpGameVersion($pack);
     return note_comments::getNoteComment($pack);
 }