-
Notifications
You must be signed in to change notification settings - Fork 0
/
master_status_set.php
executable file
·64 lines (43 loc) · 1.68 KB
/
master_status_set.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
<?php
/********************************************************
*
* phpAbstracts
* http://www.phpabstracts.com
*
* For copyright and license information, see readme.txt
*
*********************************************************/
//Include header template
include('header.php');
//Only ADMINs can view this page
if ($admin) {
//Grab variables from form
$abstract_id = $_POST['abstract_id'];
$master_status = $_POST['master_status'];
$scholarship = $_POST['scholarship'];
//Database Connection Variables
include('db.php');
//Connect to database
mysql_connect($host,$username,$password);
@mysql_select_db($database) or die( "Unable to select database");
//Update details for this abstract
$query = "UPDATE abstracts SET master_status='$master_status', scholarship='$scholarship' WHERE abstract_id = '$abstract_id'";
mysql_query($query) or die(mysql_error());
//Close database
mysql_close();
//Print confirmation
$goback_abstract = "<form method='post' action='detail.php' name='goback_abstract_form' id='goback_abstract_form'>" .
"<input type='hidden' id='abstract_id' name='abstract_id' value='" . $abstract_id . "' />" .
"<a href='list.php'>Return " . $home_title . "</a> | " .
"<a href='#' onclick='javascript:document.goback_abstract_form.submit();'>Return to abstract</a>" .
"</form>";
echo "<br /><br /><br />" .
"<div class='statusbox'>" .
"<p>The status for Abstract " . $abstract_id . " has been set to " . $master_status . ".</p>" .
$goback_abstract .
"</div>".
"<br /><br /><br />";
} //if admin
//Include footer template
include('footer.php');
?>