summaryrefslogtreecommitdiff
path: root/comment.php
diff options
context:
space:
mode:
authorJayaram Pai2014-06-19 23:14:03 +0530
committerJayaram Pai2014-06-19 23:14:03 +0530
commit8b2c99bd560cbea010ad051d5614e8e2d11c1729 (patch)
tree289b247bfeeadcd4c191861428ecc65301c87c04 /comment.php
parent1b54f67fb2bc065c9e9dbb66d1e00e407d30456d (diff)
downloadscilab_cloud_interface-8b2c99bd560cbea010ad051d5614e8e2d11c1729.tar.gz
scilab_cloud_interface-8b2c99bd560cbea010ad051d5614e8e2d11c1729.tar.bz2
scilab_cloud_interface-8b2c99bd560cbea010ad051d5614e8e2d11c1729.zip
fixed basic bugs
Diffstat (limited to 'comment.php')
-rwxr-xr-xcomment.php23
1 files changed, 10 insertions, 13 deletions
diff --git a/comment.php b/comment.php
index 3c4845f..f4197d6 100755
--- a/comment.php
+++ b/comment.php
@@ -1,15 +1,13 @@
- <html>
- <head>
- <title>Home | Scilab cloud</title>
- <script src="jquery.js" type="text/javascript"></script>
-
-
- </head>
- <body>
<?php
require_once('db-connect.php');
- //var_dump($_POST);
- //die;
+ $types = array(
+ 1 => "Blank Code / Incorrect code",
+ 2 => "Output error",
+ 3 => "Execution error",
+ 4 => "Missing example(s)",
+ 6 => "Blank output",
+ 7 => "Any other"
+ );
if(isset($_POST['type']) && isset($_POST['comment'])){
$query = "insert into scilab_cloud_comment (type, comment, email,category,books,chapter,example) values(".$_POST['type'].", '".$_POST['comment']."', '".$_POST['email']."', '".$_POST['category']."', '".$_POST['books']."', '".$_POST['chapter']."', '".$_POST['example']."')";
if(mysql_query($query)){
@@ -17,10 +15,11 @@
echo "<p>Thank you for your valuable feedback.</p>";
$to = "rush2jrp@gmail.com, mukulrkulkarni@gmail.com, lavitha89@gmail.com, kannan@iitb.ac.in, kiran@fossee.in, manasdas17@gmail.com";
+ // $to = "rush2jrp@gmail.com, jayaram@iitb.ac.in";
$subject = "New Cloud Comment";
$message = "
A new comment has been posted. <br>
- Type: {$_POST['type']} <br>
+ Type: {$types[$_POST['type']]} <br>
Comment: {$_POST['comment']} <br>
Link: http://scilab.in/cloud_comments
";
@@ -36,6 +35,4 @@
echo "<p>Sorry for the inconvience, please try again</p>";
}
}else{ ?>
- </body>
-</html>
<?php } ?>