Commit 4620b704 authored by Adarsh's avatar Adarsh

minor

parent 13bf44f2
# See http://help.github.com/ignore-files/ for more about ignoring files. # See http://help.github.com/ignore-files/ for more about ignoring files.
/users /users
/user_execs
.vscode .vscode
# compiled output # compiled output
/dist /dist
......
...@@ -4,15 +4,11 @@ ...@@ -4,15 +4,11 @@
* This script registers a user using a username, password, name, and email (provided through POST). This script communicates with the MySQL server to save user data. * This script registers a user using a username, password, name, and email (provided through POST). This script communicates with the MySQL server to save user data.
*/ */
<<<<<<< HEAD
header("Access-Control-Allow-Origin: *"); header("Access-Control-Allow-Origin: *");
header('Access-Control-Allow-Credentials: true'); header('Access-Control-Allow-Credentials: true');
header("Access-Control-Allow-Methods: PUT, GET, POST, DELETE"); header("Access-Control-Allow-Methods: PUT, GET, POST, DELETE");
header("Access-Control-Allow-Headers: Origin, X-Requested-With, Content-Type, Accept"); header("Access-Control-Allow-Headers: Origin, X-Requested-With, Content-Type, Accept");
header("Content-Type: application/json; charset=UTF-8"); header("Content-Type: application/json; charset=UTF-8");
=======
>>>>>>> 8601987f1aa6573181cb9427847fcf57dc1afcf6
include_once("database.php"); include_once("database.php");
...@@ -27,7 +23,7 @@ $postData = file_get_contents("php://input"); ...@@ -27,7 +23,7 @@ $postData = file_get_contents("php://input");
if (isset($postData) && !empty($postData)) { if (isset($postData) && !empty($postData)) {
$request = json_decode($postData); /** \brief POST data decoded. */ $request = json_decode($postData); /** \brief POST data decoded. */
$name = trim($request->name); $name = trim($request->name);
......
...@@ -100,10 +100,17 @@ export class HomeComponent implements OnInit { ...@@ -100,10 +100,17 @@ export class HomeComponent implements OnInit {
this.questiontoPost = null; this.questiontoPost = null;
(document.getElementById('quesform') as HTMLInputElement).value = ''; (document.getElementById('quesform') as HTMLInputElement).value = '';
} }
let s = new Date(this.questiontoPost.stime);
let d = new Date();
console.log(d);
let e = new Date(this.questiontoPost.etime);
if(s < d && d < e) {
this.ques_final.push(this.questiontoPost);
}
this.resetForm(); this.resetForm();
this.closeForm(); this.closeForm();
} }
); );
} }
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment