@@ -2,9 +2,9 @@ discard block |
||
2 | 2 | require 'core/init.php'; |
3 | 3 | $general->logged_out_protect(); |
4 | 4 | $user = $users->userdata($_SESSION['loginid']); |
5 | -if($user['level'] != "Admin") |
|
5 | +if ($user['level'] != "Admin") |
|
6 | 6 | { exit("You don't have permission to access this page!"); } |
7 | -$projects = $projects->get_projects(); |
|
7 | +$projects = $projects->get_projects(); |
|
8 | 8 | $projects_count = count($projects); |
9 | 9 | ?> |
10 | 10 | <!DOCTYPE HTML> |
@@ -67,22 +67,22 @@ discard block |
||
67 | 67 | <tbody> |
68 | 68 | <?php |
69 | 69 | foreach ($projects as $project) { |
70 | - $customer=$customers->customer_data($project['idcustomer']); |
|
71 | - $disp_id_project=sprintf("%04s", $project['projectid']); |
|
72 | - echo '<tr><td><a href=projectedit.php?id='.$project['projectid']. '>'.$disp_id_project.'</a></td>'. |
|
70 | + $customer = $customers->customer_data($project['idcustomer']); |
|
71 | + $disp_id_project = sprintf("%04s", $project['projectid']); |
|
72 | + echo '<tr><td><a href=projectedit.php?id='.$project['projectid'].'>'.$disp_id_project.'</a></td>'. |
|
73 | 73 | '<td>'.$customer['namacustomer'].'</td>'. |
74 | - '<td>'.date('d-M-Y',$project['deliverybegin']).'</td>'. |
|
75 | - '<td>'.date('d-M-Y',$project['deliveryend']).'</td>'. |
|
76 | - '<td>'.date('d-M-Y',$project['installbegin']).'</td>'. |
|
77 | - '<td>'.date('d-M-Y',$project['installend']).'</td>'. |
|
78 | - '<td>'.date('d-M-Y',$project['uatbegin']).'</td>'. |
|
79 | - '<td>'.date('d-M-Y',$project['uatend']).'</td>'. |
|
80 | - '<td>'.date('d-M-Y',$project['billstartdate']).'</td>'. |
|
81 | - '<td>'.date('d-M-Y',$project['billduedate']).'</td>'. |
|
74 | + '<td>'.date('d-M-Y', $project['deliverybegin']).'</td>'. |
|
75 | + '<td>'.date('d-M-Y', $project['deliveryend']).'</td>'. |
|
76 | + '<td>'.date('d-M-Y', $project['installbegin']).'</td>'. |
|
77 | + '<td>'.date('d-M-Y', $project['installend']).'</td>'. |
|
78 | + '<td>'.date('d-M-Y', $project['uatbegin']).'</td>'. |
|
79 | + '<td>'.date('d-M-Y', $project['uatend']).'</td>'. |
|
80 | + '<td>'.date('d-M-Y', $project['billstartdate']).'</td>'. |
|
81 | + '<td>'.date('d-M-Y', $project['billduedate']).'</td>'. |
|
82 | 82 | '<td>'.$project['warrantyperiod'].' Year</td>'. |
83 | - '<td>'.date('d-M-Y',$project['contractstartdate']).'</td>'. |
|
83 | + '<td>'.date('d-M-Y', $project['contractstartdate']).'</td>'. |
|
84 | 84 | '<td>'.$project['contractperiod'].' Month</td>'. |
85 | - '<td><a href=projectdel.php?id='.$project['projectid']. ' onclick="return delete_confirm();">del</a></td></tr>'; |
|
85 | + '<td><a href=projectdel.php?id='.$project['projectid'].' onclick="return delete_confirm();">del</a></td></tr>'; |
|
86 | 86 | } |
87 | 87 | ?> |
88 | 88 | </tbody> |
@@ -1,1 +1,1 @@ |
||
1 | -<?php require 'core/init.php'; $general->logged_out_protect(); ?> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd"> <html> <head> <title>Helpdesk System</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <link href="css/style.css" rel="stylesheet" type="text/css" /> <link rel="shortcut icon" href="images/favicon.ico" type="image/x-icon"> <link rel="icon" href="images/favicon.ico" type="image/x-icon"> </head> <frameset name="mainfs" rows="85,*" frameborder="0" border="0" framespacing="0"> <frame src="header.php" name="topFrame" scrolling="NO" noresize /> <frameset name="contentfs" cols="200,*" frameborder="0" border="0" framespacing="0"> <frame src="navigator.php" name="leftFrame" scrolling="NO" noresize /> <frame src="content.php" name="contentFrame" /> </frameset> </frameset><noframes></noframes> <body> </body> </html> |
|
2 | 1 | \ No newline at end of file |
2 | +<?php require 'core/init.php'; $general->logged_out_protect(); ?> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd"> <html> <head> <title>Helpdesk System</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <link href="css/style.css" rel="stylesheet" type="text/css" /> <link rel="shortcut icon" href="images/favicon.ico" type="image/x-icon"> <link rel="icon" href="images/favicon.ico" type="image/x-icon"> </head> <frameset name="mainfs" rows="85,*" frameborder="0" border="0" framespacing="0"> <frame src="header.php" name="topFrame" scrolling="NO" noresize /> <frameset name="contentfs" cols="200,*" frameborder="0" border="0" framespacing="0"> <frame src="navigator.php" name="leftFrame" scrolling="NO" noresize /> <frame src="content.php" name="contentFrame" /> </frameset> </frameset><noframes></noframes> <body> </body> </html> |
|
3 | 3 | \ No newline at end of file |
@@ -2,8 +2,8 @@ discard block |
||
2 | 2 | require 'core/init.php'; |
3 | 3 | $general->logged_out_protect(); |
4 | 4 | $user = $users->userdata($_SESSION['loginid']); |
5 | -$tickets = $tickets->get_tickets_by_assignee($_SESSION['loginid']); |
|
6 | -$tickets_count = count($tickets); |
|
5 | +$tickets = $tickets->get_tickets_by_assignee($_SESSION['loginid']); |
|
6 | +$tickets_count = count($tickets); |
|
7 | 7 | ?> |
8 | 8 | <!DOCTYPE HTML> |
9 | 9 | <html> |
@@ -55,10 +55,10 @@ discard block |
||
55 | 55 | $sla = $slas->sla_data($ticket['sla']); |
56 | 56 | $customer = $customers->customer_data($ticket['idcustomer']); |
57 | 57 | $user = $users->userdata($ticket['assignee']); |
58 | - echo '<tr><td><a href="ticketedit.php?id='.$ticket['id']. '">'.$ticket['ticketnumber'].'</a></td>'. |
|
58 | + echo '<tr><td><a href="ticketedit.php?id='.$ticket['id'].'">'.$ticket['ticketnumber'].'</a></td>'. |
|
59 | 59 | '<td>'.$sla['namasla'].'</td>'. |
60 | 60 | '<td>'.$customer['namacustomer'].'</td>'. |
61 | - '<td>'.date('d-M-Y',$ticket['reporteddate']).'</td>'. |
|
61 | + '<td>'.date('d-M-Y', $ticket['reporteddate']).'</td>'. |
|
62 | 62 | '<td>'.$ticket['reportedby'].'</td>'. |
63 | 63 | '<td>'.$ticket['problemsummary'].'</td>'. |
64 | 64 | '<td>'.$ticket['ticketstatus'].'</td>'. |
@@ -3,7 +3,7 @@ discard block |
||
3 | 3 | $general->logged_out_protect(); |
4 | 4 | $user = $users->userdata($_SESSION['loginid']); |
5 | 5 | $ticket1 = $tickets->get_tickets_by_requester($_SESSION['loginid']); |
6 | -$tickets_requested = count($ticket1); |
|
6 | +$tickets_requested = count($ticket1); |
|
7 | 7 | $ticket2 = $tickets->get_tickets_by_assignee($_SESSION['loginid']); |
8 | 8 | $tickets_assigned = count($ticket2); |
9 | 9 | $ticket3 = $tickets->get_tickets_by_resolver($user['username']); |
@@ -45,8 +45,8 @@ discard block |
||
45 | 45 | <?php |
46 | 46 | $news = $hdnews->get_headline_news(); |
47 | 47 | foreach ($news as $thenews) |
48 | - { echo '<tr><td>'.date('d-M-Y',$thenews['newsdate']).'</td>'. |
|
49 | - '<td><a href=hdnewsread.php?id='.$thenews['id']. '>'.$thenews['title'].'</a></td></tr>'; |
|
48 | + { echo '<tr><td>'.date('d-M-Y', $thenews['newsdate']).'</td>'. |
|
49 | + '<td><a href=hdnewsread.php?id='.$thenews['id'].'>'.$thenews['title'].'</a></td></tr>'; |
|
50 | 50 | } |
51 | 51 | ?> |
52 | 52 | </tbody> |
@@ -1,7 +1,7 @@ |
||
1 | 1 | <?php |
2 | 2 | require 'core/init.php'; |
3 | 3 | $general->logged_out_protect(); |
4 | -$id=$_GET['id']; |
|
4 | +$id = $_GET['id']; |
|
5 | 5 | $customers->delete($id); |
6 | 6 | header('Location: customerlist.php'); |
7 | 7 | ?> |
8 | 8 | \ No newline at end of file |
@@ -2,8 +2,8 @@ discard block |
||
2 | 2 | require 'core/init.php'; |
3 | 3 | $general->logged_out_protect(); |
4 | 4 | $user = $users->userdata($_SESSION['loginid']); |
5 | -$tickets = $tickets->get_tickets_by_resolver($user['username']); |
|
6 | -$tickets_count = count($tickets); |
|
5 | +$tickets = $tickets->get_tickets_by_resolver($user['username']); |
|
6 | +$tickets_count = count($tickets); |
|
7 | 7 | ?> |
8 | 8 | <!DOCTYPE HTML> |
9 | 9 | <html> |
@@ -55,10 +55,10 @@ discard block |
||
55 | 55 | $sla = $slas->sla_data($ticket['sla']); |
56 | 56 | $customer = $customers->customer_data($ticket['idcustomer']); |
57 | 57 | $user = $users->userdata($ticket['assignee']); |
58 | - echo '<tr><td><a href=ticketedit.php?id='.$ticket['id']. '>'.$ticket['ticketnumber'].'</a></td>'. |
|
58 | + echo '<tr><td><a href=ticketedit.php?id='.$ticket['id'].'>'.$ticket['ticketnumber'].'</a></td>'. |
|
59 | 59 | '<td>'.$sla['namasla'].'</td>'. |
60 | 60 | '<td>'.$customer['namacustomer'].'</td>'. |
61 | - '<td>'.date('d-M-Y',$ticket['reporteddate']).'</td>'. |
|
61 | + '<td>'.date('d-M-Y', $ticket['reporteddate']).'</td>'. |
|
62 | 62 | '<td>'.$ticket['reportedby'].'</td>'. |
63 | 63 | '<td>'.$ticket['problemsummary'].'</td>'. |
64 | 64 | '<td>'.$ticket['ticketstatus'].'</td>'. |
@@ -2,9 +2,9 @@ discard block |
||
2 | 2 | require 'core/init.php'; |
3 | 3 | $general->logged_out_protect(); |
4 | 4 | $changeby = $_SESSION['loginid']; |
5 | -$user = $users->userdata($_SESSION['loginid']); |
|
6 | -$id = $_GET['id']; |
|
7 | -$ticket = $tickets->ticket_data($id); |
|
5 | +$user = $users->userdata($_SESSION['loginid']); |
|
6 | +$id = $_GET['id']; |
|
7 | +$ticket = $tickets->ticket_data($id); |
|
8 | 8 | ?> |
9 | 9 | <!DOCTYPE HTML> |
10 | 10 | <html> |
@@ -64,7 +64,7 @@ discard block |
||
64 | 64 | </tr> |
65 | 65 | <tr> |
66 | 66 | <td> Reported Date</td><td> : </td> |
67 | - <td> <?php echo date('d-M-Y',$ticket['reporteddate']); ?> </td> |
|
67 | + <td> <?php echo date('d-M-Y', $ticket['reporteddate']); ?> </td> |
|
68 | 68 | </tr> |
69 | 69 | <tr> |
70 | 70 | <td> Reported By </td><td> : </td> |
@@ -127,7 +127,7 @@ discard block |
||
127 | 127 | $list_log_tickets = $tickets->get_audit_trail($id); |
128 | 128 | foreach ($list_log_tickets as $log_ticket) |
129 | 129 | { $changed_by = $users->userdata($log_ticket['changeby']); |
130 | - echo '<tr><td>'.date('d-M-Y H:i:s',$log_ticket['changedate']).'</td>'. |
|
130 | + echo '<tr><td>'.date('d-M-Y H:i:s', $log_ticket['changedate']).'</td>'. |
|
131 | 131 | '<td>'.$changed_by['fullname'].'</td>'. |
132 | 132 | '<td>'.$log_ticket['changes'].'</td></tr>'; |
133 | 133 | } |
@@ -12,8 +12,8 @@ |
||
12 | 12 | $resolutiontime = $_POST['resolutiontime']; |
13 | 13 | $slawarning = $_POST['slawarning']; |
14 | 14 | if ($slas->sla_exists($slaid) === true) { |
15 | - $errors[] = 'SLA ID is already exists!'; |
|
16 | - } else { |
|
15 | + $errors[] = 'SLA ID is already exists!'; |
|
16 | + } else { |
|
17 | 17 | $slas->add_sla($slaid,$namasla,$responsetime,$resolutiontime,$slawarning); |
18 | 18 | header('location:slalist.php'); |
19 | 19 | } |
@@ -2,19 +2,19 @@ discard block |
||
2 | 2 | require 'core/init.php'; |
3 | 3 | $general->logged_out_protect(); |
4 | 4 | $user = $users->userdata($_SESSION['loginid']); |
5 | -if($user['level'] != "Admin") |
|
5 | +if ($user['level'] != "Admin") |
|
6 | 6 | { exit("You don't have permission to access this page!"); } |
7 | 7 | |
8 | 8 | if (isset($_POST['submit'])) |
9 | 9 | { $slaid = $_POST['slaid']; |
10 | 10 | $namasla = $_POST['namasla']; |
11 | - $responsetime = $_POST['responsetime']; |
|
11 | + $responsetime = $_POST['responsetime']; |
|
12 | 12 | $resolutiontime = $_POST['resolutiontime']; |
13 | - $slawarning = $_POST['slawarning']; |
|
13 | + $slawarning = $_POST['slawarning']; |
|
14 | 14 | if ($slas->sla_exists($slaid) === true) { |
15 | 15 | $errors[] = 'SLA ID is already exists!'; |
16 | - } else { |
|
17 | - $slas->add_sla($slaid,$namasla,$responsetime,$resolutiontime,$slawarning); |
|
16 | + }else { |
|
17 | + $slas->add_sla($slaid, $namasla, $responsetime, $resolutiontime, $slawarning); |
|
18 | 18 | header('location:slalist.php'); |
19 | 19 | } |
20 | 20 | } |
@@ -99,8 +99,8 @@ discard block |
||
99 | 99 | </fieldset> |
100 | 100 | </form> |
101 | 101 | <?php |
102 | - if(empty($errors) === false){ |
|
103 | - echo '<p class=errormsg>' . implode('</p><p class=errormsg>', $errors) . '</p>'; |
|
102 | + if (empty($errors) === false) { |
|
103 | + echo '<p class=errormsg>'.implode('</p><p class=errormsg>', $errors).'</p>'; |
|
104 | 104 | } |
105 | 105 | ?> |
106 | 106 | </body> |
@@ -2,7 +2,7 @@ discard block |
||
2 | 2 | require '../core/init.php'; |
3 | 3 | $general->logged_out_protect(); |
4 | 4 | |
5 | -$reportname='RPT001'; |
|
5 | +$reportname = 'RPT001'; |
|
6 | 6 | $content = " |
7 | 7 | <html> |
8 | 8 | <body> |
@@ -17,24 +17,24 @@ discard block |
||
17 | 17 | </body> |
18 | 18 | </html> |
19 | 19 | "; |
20 | - if($_POST['format']=='1') |
|
20 | + if ($_POST['format'] == '1') |
|
21 | 21 | { header('Content-type: application/vnd.ms-word'); |
22 | 22 | header('Content-Disposition: attachment; Filename="'.$reportname.'.doc"'); |
23 | 23 | echo $content; |
24 | 24 | } |
25 | - elseif($_POST['format']=='2') |
|
25 | + elseif ($_POST['format'] == '2') |
|
26 | 26 | { header('Content-type: application/ms-excel'); |
27 | 27 | header('Content-Disposition: attachment; filename="'.$reportname.'.xls"'); |
28 | 28 | echo $content; |
29 | 29 | } |
30 | - elseif($_POST['format']=='3') |
|
31 | - { $filename=$reportname.'.pdf'; |
|
32 | - define('FPDF_FONTPATH','pdftable/font/'); |
|
30 | + elseif ($_POST['format'] == '3') |
|
31 | + { $filename = $reportname.'.pdf'; |
|
32 | + define('FPDF_FONTPATH', 'pdftable/font/'); |
|
33 | 33 | require('pdftable/lib/pdftable.inc.php'); |
34 | 34 | $p = new PDFTable(); |
35 | 35 | $p->AddPage(); |
36 | - $p->setfont('times','',12); |
|
36 | + $p->setfont('times', '', 12); |
|
37 | 37 | $p->htmltable($content); |
38 | - $p->output($filename,'I'); |
|
38 | + $p->output($filename, 'I'); |
|
39 | 39 | } |
40 | 40 | ?> |
@@ -21,13 +21,11 @@ |
||
21 | 21 | { header('Content-type: application/vnd.ms-word'); |
22 | 22 | header('Content-Disposition: attachment; Filename="'.$reportname.'.doc"'); |
23 | 23 | echo $content; |
24 | - } |
|
25 | - elseif($_POST['format']=='2') |
|
24 | + } elseif($_POST['format']=='2') |
|
26 | 25 | { header('Content-type: application/ms-excel'); |
27 | 26 | header('Content-Disposition: attachment; filename="'.$reportname.'.xls"'); |
28 | 27 | echo $content; |
29 | - } |
|
30 | - elseif($_POST['format']=='3') |
|
28 | + } elseif($_POST['format']=='3') |
|
31 | 29 | { $filename=$reportname.'.pdf'; |
32 | 30 | define('FPDF_FONTPATH','pdftable/font/'); |
33 | 31 | require('pdftable/lib/pdftable.inc.php'); |