fix a few things that i forgot to implement
This commit is contained in:
parent
bd7cd81b61
commit
73eedf46c1
|
@ -21,7 +21,8 @@ if (array_key_exists('give', $_GET)) {
|
|||
$prevkudos = $db->query("select count(*) from kudos where workid={$work} and ipaddr={$ip};");
|
||||
if ($exists > 0 && $prevkudos == 0) {
|
||||
$db->query("insert into kudos (workid, ipaddr) values ({$work}, {$ip});");
|
||||
|
||||
$content = "Thanks for leaving kudos! You can now close this window."
|
||||
require("./template.php");
|
||||
}
|
||||
} else if (array_key_exists('show', $_GET)) {
|
||||
// We're showing the number of kudos
|
||||
|
@ -46,7 +47,6 @@ if (array_key_exists('give', $_GET)) {
|
|||
|
||||
$content = file_get_contents("./form.php");
|
||||
require("./template.php");
|
||||
die(1);
|
||||
} else if (array_key_exists('newwork', $_POST)) {
|
||||
$work = filter_var($_POST['newwork'], FILTER_SANITIZE_STRING);
|
||||
// check if the work exists already since we can't do duplicates
|
||||
|
@ -71,5 +71,7 @@ if (array_key_exists('give', $_GET)) {
|
|||
}
|
||||
|
||||
require("./template.php");
|
||||
die(1);
|
||||
}
|
||||
|
||||
// if we haven't closed connection yet, we're done now.
|
||||
die(1);
|
||||
|
|
Loading…
Reference in New Issue