-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathadd_event1.php
More file actions
127 lines (114 loc) · 4.42 KB
/
add_event1.php
File metadata and controls
127 lines (114 loc) · 4.42 KB
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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
<?php
require_once("time_check.php");
require_once("db_connect.php");
$page_title="Add Event";
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><!-- InstanceBegin template="/Templates/template.dwt.php" codeOutsideHTMLIsLocked="false" -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- InstanceBeginEditable name="doctitle" -->
<title><?php echo $page_title; ?> :: C.A Tracker</title>
<!-- InstanceEndEditable -->
<script language="javascript" src="scripts/jquery-1.4.2.min.js"></script>
<script language="javascript" src="functions.js"></script>
<link href="mystyles.css" rel="stylesheet" type="text/css" />
<!-- InstanceBeginEditable name="head" -->
<!-- InstanceEndEditable -->
</head>
<body>
<div id="heading">
C.A Tracker
</div>
<div id="content">
<?php
if(isset($_SESSION['current_user_full_name'],$_SESSION['current_session'],$_SESSION['current_term']) && ( $page_title!="You're almost done" || $page_title!="Congratulations" || $page_title!="Sign In" || $page_title!="Admin/User Sign In"))
{
?>
<p id="information_display" align="right" style="font-size:12px"><b>Signed In:</b><?php echo $_SESSION['current_user_full_name'] ?> (<a href="sign_out.php">Sign Out</a>)<br />
<?php echo $_SESSION['current_term']; ?>,<?php echo $_SESSION['current_session']; ?> <br />
<?php if(isset($_SESSION['current_user_category']) && ($_SESSION['current_user_category'])=="Student")
{
?>
<b>Target:</b> <?php echo $_SESSION['current_user_target']; ?>
<?php
}
?>
</p>
<?php
}
?>
<h1>
<?php echo $page_title; ?>
</h1>
<?php
if(isset($_SESSION['message']))
{
?>
<p class="<?php echo $_SESSION['messagetype']; ?>"><?php echo $_SESSION['message']; ?></p>
<?php
unset($_SESSION['message'], $_SESSION['messagetype']);
}
?>
<!-- InstanceBeginEditable name="mycontents" -->
<p align="right">
<a href="deleted_passed_events.php"><input type="button" value="Back To Deleted/Passed Events" /></a> <a href="home.php"><input type="button" value="Back To Home" /></a>
</p>
<script language="javascript">
$(document).ready(
function()
{
shade_input_table("data_table");
}
);
</script>
<br />
<br />
<form action="add_event_process1.php" method="post" id="myform">
<table align="center" cellpadding="10px" cellspacing="1px" style="color:#007DFB" id="data_table">
<tr>
<td>Title:</td>
<td><input name="title" type="text" id="title" autocomplete="off" value="<?php echo $_SESSION['title']; ?>" readonly="readonly" /></td>
</tr>
<tr>
<td>Description:</td>
<td><textarea name="description" cols="23px" rows="6px" readonly="readonly" id="description"><?php echo $_SESSION['description']; ?></textarea></td>
</tr>
<tr>
<td>Date Of Event:</td>
<td><input name="date_of_event" type="text" id="date_of_event" autocomplete="off" value="<?php echo $_SESSION['supposed_date_of_event']; ?>" placeholder=" YYYY-MM-DD" /></td>
</tr>
<tr>
<td align="center" colspan="2"><input type="button" value="Add Event" onclick="add_event()" /></td>
</tr>
</table>
<script language="javascript">
function add_event()
{
if(document.getElementById("title").value=="")
{
alert("Please make sure that the title field is not empty!");
document.getElementById("title").focus();
return null;
}
if(document.getElementById("description").value=="")
{
alert("Please make sure that the description field is not empty!");
document.getElementById("description").focus();
return null;
}
if(val_date_click(document.getElementById("date_of_event").value)==false)
{
document.getElementById("date_of_event").focus();
return null;
}
document.getElementById("myform").submit();
}
</script>
</form>
<!-- InstanceEndEditable --></div>
<div id="footer">
© <?php echo date("Y"); ?> I-corporation LTD
</div>
</body>
<!-- InstanceEnd --></html>