summary refs log tree commit diff stats
path: root/pages/post.php
diff options
context:
space:
mode:
Diffstat (limited to 'pages/post.php')
-rwxr-xr-xpages/post.php42
1 files changed, 21 insertions, 21 deletions
diff --git a/pages/post.php b/pages/post.php index f7990bd..1b89fa4 100755 --- a/pages/post.php +++ b/pages/post.php
@@ -31,13 +31,13 @@ $privatekey = "6LfgvgEAAAAAAD0_UVLp57MU7tqcypsbZPS9qTnr";
31$template = new FITemplate('msg'); 31$template = new FITemplate('msg');
32$template->add('BACK','the previous page'); 32$template->add('BACK','the previous page');
33 33
34if (!isset($_GET['id'])) 34if (!isset($_GET['id']))
35{ 35{
36 $template->add('MSG','I\'m sorry, but there\'s no page-id set here, so sadly you can\'t comment yet. Why not contact the administratior (link on the HatBar) and tell him that you saw this error?'); 36 $template->add('MSG','I\'m sorry, but there\'s no page-id set here, so sadly you can\'t comment yet. Why not contact the administratior (link on the HatBar) and tell her that you saw this error?');
37} else { 37} else {
38 if ($_POST['comment'] == "") 38 if ($_POST['comment'] == "")
39 { 39 {
40 $template->add('MSG','I\'m sorry, but you didn\'t enter a comment!'); 40 $template->add('MSG','I\'m sorry, but you didn\'t enter a comment!');
41 } else { 41 } else {
42 if (!isLoggedIn()) 42 if (!isLoggedIn())
43 { 43 {
@@ -56,23 +56,23 @@ if (!isset($_GET['id']))
56 { 56 {
57 if ($getanon3['email'] == $_POST['email']) 57 if ($getanon3['email'] == $_POST['email'])
58 { 58 {
59 $setcomment = "INSERT INTO comments SET page_id = \"" . $_GET['id'] . "\", username = \"" . $_POST['username'] . "\", comment = \"" . $_POST['comment'] . "\""; 59 $setcomment = "INSERT INTO comments SET page_id = \"" . $_GET['id'] . "\", username = \"" . $_POST['username'] . "\", comment = \"" . $_POST['comment'] . "\"";
60 $setcomment2 = mysql_query($setcomment); 60 $setcomment2 = mysql_query($setcomment);
61 61
62 $page_id = $_GET['id']; 62 $page_id = $_GET['id'];
63 $comType = substr($page_id,0,strpos($page_id,'-')); 63 $comType = substr($page_id,0,strpos($page_id,'-'));
64 $comID = substr($page_id,strpos($page_id,'-')+1); 64 $comID = substr($page_id,strpos($page_id,'-')+1);
65 if ($comType == 'updates') 65 if ($comType == 'updates')
66 { 66 {
67 recalcPop($comID); 67 recalcPop($comID);
68 } 68 }
69 69
70 $template->add('MSG',"Thank you, " . $getanon3['username'] . ", for posting your valuable comment!"); 70 $template->add('MSG',"Thank you, " . $getanon3['username'] . ", for posting your valuable comment!");
71 } else { 71 } else {
72 $template->add('MSG',"I'm sorry, but this anonymous username is already in use. If this is in fact you, please verify that you have entered the same email address that you entered the first time you commented here."); 72 $template->add('MSG',"I'm sorry, but this anonymous username is already in use. If this is in fact you, please verify that you have entered the same email address that you entered the first time you commented here.");
73 } 73 }
74 } else { 74 } else {
75 $setcomment = "INSERT INTO moderation SET page_id = \"" . $_GET['id'] . "\", author = \"" . $_POST['username'] . "\", email = \"" . $_POST['email'] . "\", comment = \"" . $_POST['comment'] . "\", website = \"" . $_POST['website'] . "\""; 75 $setcomment = "INSERT INTO moderation SET page_id = \"" . $_GET['id'] . "\", author = \"" . $_POST['username'] . "\", email = \"" . $_POST['email'] . "\", comment = \"" . $_POST['comment'] . "\", website = \"" . $_POST['website'] . "\"";
76 $setcomment2 = mysql_query($setcomment); 76 $setcomment2 = mysql_query($setcomment);
77 77
78 mail('hatkirby@fourisland.com', 'New comment to moderate on Four Island', 'Some one has anonymously left a comment on Four Island and it will require moderation.'); 78 mail('hatkirby@fourisland.com', 'New comment to moderate on Four Island', 'Some one has anonymously left a comment on Four Island and it will require moderation.');
@@ -83,23 +83,23 @@ if (!isset($_GET['id']))
83 $template->add('MSG',"I'm sorry, but you've entered an invalid email address."); 83 $template->add('MSG',"I'm sorry, but you've entered an invalid email address.");
84 } 84 }
85 } 85 }
86 } else { 86 } else {
87 $setcomment = "INSERT INTO comments SET page_id = \"" . $_GET['id'] . "\", username = \"" . sess_get('uname') . "\", comment = \"" . $_POST['comment'] . "\""; 87 $setcomment = "INSERT INTO comments SET page_id = \"" . $_GET['id'] . "\", username = \"" . sess_get('uname') . "\", comment = \"" . $_POST['comment'] . "\"";
88 $setcomment2 = mysql_query($setcomment); 88 $setcomment2 = mysql_query($setcomment);
89 89
90 mail('hatkirby@fourisland.com', 'New comment on Four Island!', sess_get('uname') . ' has posted a comment on Four Island under the "page id" ' . $_GET['id']); 90 mail('hatkirby@fourisland.com', 'New comment on Four Island!', sess_get('uname') . ' has posted a comment on Four Island under the "page id" ' . $_GET['id']);
91 91
92 $page_id = $_GET['id']; 92 $page_id = $_GET['id'];
93 $comType = substr($page_id,0,strpos($page_id,'-')); 93 $comType = substr($page_id,0,strpos($page_id,'-'));
94 $comID = substr($page_id,strpos($page_id,'-')+1); 94 $comID = substr($page_id,strpos($page_id,'-')+1);
95 if ($comType == 'updates') 95 if ($comType == 'updates')
96 { 96 {
97 recalcPop($comID); 97 recalcPop($comID);
98 } 98 }
99 99
100 $template->add('MSG',"Thank you, " . sess_get('uname') . ", for posting your valuable comment!"); 100 $template->add('MSG',"Thank you, " . sess_get('uname') . ", for posting your valuable comment!");
101 } 101 }
102 } 102 }
103} 103}
104 104
105$template->display(); 105$template->display();