-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathcategoryManagement.php
executable file
·86 lines (64 loc) · 2.3 KB
/
categoryManagement.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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
<?php
require_once('class/config.inc.php');
require_once('class/class.tasks.php');
$page = new basic_page();
/*******Checking Authentication****************/
$page->auth->Checklogin();
$task = new Tasks();
$notify = new Notification();
/**********************************************/
$page -> setPageKeywords('');
$page -> setPageDescription('');
$page -> setPageTitle("CATEGORY MANAGEMENT");
$page -> setActiveButton('3');
$page -> setInnerNav('0');
//$page -> setImportCss1('main_style.css');
//$page -> setImportCss2('form.css'); // each page should have it's own .css sheet. Link mulitple sheets here and below
$page -> SetDynamicCSS_1('main_style.php');
$page -> SetDynamicCSS_2('form.php');
$page -> setImportCss4('');
$page -> setImportCss5('');
$page -> setExtJavaScripts2(''); // might not need
$page -> setExtJavaScripts3(''); // might not need
$page -> setExtJavaScripts4(''); // might not need
$page -> setExtJavaScripts1('<script src="js/301a.js" type="text/javascript"></script>'); // might not need
//*********************Page Style *******************************//
// used to set page styles. This should be used sparingly. External css should be used instead.
$page_style = '';
$page -> setPageStyle($page_style);
$page -> displayPageTop();
// **********************Start html for content column ****************************//
extract($_REQUEST);
$notify->Notify();
switch($index)
{
case 'Add' :
echo "<h2>Add Category</h2>";
if($go=="Go")
$task->AddTaskCategory("server");
else
$task->AddTaskCategory("local");
break;
case 'Edit' :
echo "<h2>Edit Category</h2>";
if($go=="Save")
$task->EditTask_Category("server",$cat_id);
else
$task->EditTask_Category("local",$cat_id);
break;
case 'Delete' :
$task->DeleteCategory($cat_id);
break;
default :
?>
<div id='content_column_header'>
<div class="form_main">
<h2>Manage Category</h2><div style="text-align:right"><a href="<?php echo $_SERVER['PHP_SELF']?>?index=Add">Add New </a></div>
</div>
</div>
<?php
$task->ShowAllCategory();
}
// **********************Start code for Info Column ****************************//
$page -> displayPageBottom();
?>