@@ -2,17 +2,17 @@ discard block |
||
| 2 | 2 | require 'core/init.php'; |
| 3 | 3 | $general->logged_out_protect(); |
| 4 | 4 | if (isset($_POST['submit'])) { |
| 5 | - $namacustomer = $_POST['namacustomer']; |
|
| 6 | - $password = $_POST['password']; |
|
| 7 | - $alamat = $_POST['alamat']; |
|
| 8 | - $Telp = $_POST['telp']; |
|
| 9 | - $email = $_POST['email']; |
|
| 10 | - $PIC = $_POST['PIC']; |
|
| 11 | - $selesperson = $_POST['selesperson']; |
|
| 12 | - $customerproduct = $_POST['customerproduct']; |
|
| 13 | - $customers->add_customer($namacustomer, $alamat, $Telp, $email, $PIC, $selesperson, $customerproduct); |
|
| 14 | - header('Location: customerlist.php'); |
|
| 15 | - exit(); |
|
| 5 | + $namacustomer = $_POST['namacustomer']; |
|
| 6 | + $password = $_POST['password']; |
|
| 7 | + $alamat = $_POST['alamat']; |
|
| 8 | + $Telp = $_POST['telp']; |
|
| 9 | + $email = $_POST['email']; |
|
| 10 | + $PIC = $_POST['PIC']; |
|
| 11 | + $selesperson = $_POST['selesperson']; |
|
| 12 | + $customerproduct = $_POST['customerproduct']; |
|
| 13 | + $customers->add_customer($namacustomer, $alamat, $Telp, $email, $PIC, $selesperson, $customerproduct); |
|
| 14 | + header('Location: customerlist.php'); |
|
| 15 | + exit(); |
|
| 16 | 16 | } |
| 17 | 17 | ?> |
| 18 | 18 | <!DOCTYPE HTML> |
@@ -120,9 +120,9 @@ discard block |
||
| 120 | 120 | </form> |
| 121 | 121 | |
| 122 | 122 | <?php |
| 123 | - if (empty($errors) === false) { |
|
| 124 | - echo '<p class=errormsg>'.implode('</p><p class=errormsg>', $errors).'</p>'; |
|
| 125 | - } |
|
| 126 | - ?> |
|
| 123 | + if (empty($errors) === false) { |
|
| 124 | + echo '<p class=errormsg>'.implode('</p><p class=errormsg>', $errors).'</p>'; |
|
| 125 | + } |
|
| 126 | + ?> |
|
| 127 | 127 | </body> |
| 128 | 128 | </html> |
| 129 | 129 | \ No newline at end of file |
@@ -1,3 +1,3 @@ |
||
| 1 | 1 | <?php
require 'core/init.php';
$general->logged_out_protect();
$user = $users->userdata($_SESSION['loginid']);
$fullname = ucwords(strtolower($user['fullname']));
?>
<!DOCTYPE HTML>
<html>
<head>
<title>Helpdesk System</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link rel="stylesheet" type="text/css" href="css/style.css" />
<script type="text/javascript" src="js/time.js"></script>
</head>
<body bgcolor="#bb2a26" onload="startTime();">
<table class="header">
<tr>
<td width="120px"><img src="images/company-logo.png" alt="Company-Logo" width="120px" height="30px" align="middle"></td>
<td width="200px"><strong>HELPDESK SYSTEM</strong></td>
<td align="right"><span id="clocktime"></span><span id="welcome"><?php echo " :: Welcome $fullname "; ?> </span></td>
</tr>
<tr><td colspan="3">
<div id='topmenu'>
<ul>
<li class='active'><a href='home.php' target="_parent"><span>Home</span></a></li>
<li><a href='ticketnew.php' target="contentFrame"><span>New Ticket</span></a></li>
<?php
if ($user['level'] == 'Admin') { |
| 2 | - echo "<li><a href='adminmenu.php' target='leftFrame'><span>Admin</span></a></li>"; |
|
| 2 | + echo "<li><a href='adminmenu.php' target='leftFrame'><span>Admin</span></a></li>"; |
|
| 3 | 3 | } ?> <li><a href='changepwd.php' target="contentFrame"><span>Change Password</span></a></li> <li class='last'><a href='logout.php' target="_parent"><span>Logout</span></a></li> </ul> </div> </td></tr> </table> <div style="clear:both; margin: 0 0 0px 0;"> </div> </body> </html> |
| 4 | 4 | \ No newline at end of file |
@@ -29,9 +29,9 @@ discard block |
||
| 29 | 29 | <td width="120"> Customer </td><td> : </td> |
| 30 | 30 | <td> |
| 31 | 31 | // <?php |
| 32 | - // $customer=$customers->customer_data($ticket['idcustomer']); |
|
| 33 | - // echo $customer['namacustomer']; |
|
| 34 | - //?> </td> |
|
| 32 | + // $customer=$customers->customer_data($ticket['idcustomer']); |
|
| 33 | + // echo $customer['namacustomer']; |
|
| 34 | + //?> </td> |
|
| 35 | 35 | // </tr> |
| 36 | 36 | // <tr> |
| 37 | 37 | // <td> Customer Product</td><td> : </td> |
@@ -41,16 +41,16 @@ discard block |
||
| 41 | 41 | // <td> Warranty Period</td><td> : </td> |
| 42 | 42 | // <td> |
| 43 | 43 | // <?php |
| 44 | - // $project=$projects->get_project_customer($customer['idcustomer']); |
|
| 45 | - // echo $project['warrantyperiod'].' Year'; |
|
| 46 | - //?> </td> |
|
| 44 | + // $project=$projects->get_project_customer($customer['idcustomer']); |
|
| 45 | + // echo $project['warrantyperiod'].' Year'; |
|
| 46 | + //?> </td> |
|
| 47 | 47 | // </tr> |
| 48 | 48 | // <tr> |
| 49 | 49 | // <td> Contract Period</td><td> : </td> |
| 50 | 50 | // <td> |
| 51 | 51 | // <?php |
| 52 | - // echo $project['contractperiod'].' Month'; |
|
| 53 | - //?> |
|
| 52 | + // echo $project['contractperiod'].' Month'; |
|
| 53 | + //?> |
|
| 54 | 54 | </td> |
| 55 | 55 | </tr> |
| 56 | 56 | </table> |
@@ -74,9 +74,9 @@ discard block |
||
| 74 | 74 | <td> Urgency (SLA)</td><td> : </td> |
| 75 | 75 | <td> |
| 76 | 76 | <?php |
| 77 | - $sladata = $slas->sla_data($ticket['sla']); |
|
| 78 | - echo $sladata['namasla']; |
|
| 79 | - ?> |
|
| 77 | + $sladata = $slas->sla_data($ticket['sla']); |
|
| 78 | + echo $sladata['namasla']; |
|
| 79 | + ?> |
|
| 80 | 80 | </td> |
| 81 | 81 | </tr> |
| 82 | 82 | <tr> |
@@ -102,9 +102,9 @@ discard block |
||
| 102 | 102 | <td width="120"> Assign to </td><td> : </td> |
| 103 | 103 | <td> |
| 104 | 104 | <?php |
| 105 | - $userassignee = $users->userdata($ticket['assignee']); |
|
| 106 | - echo $userassignee['fullname']; |
|
| 107 | - ?> |
|
| 105 | + $userassignee = $users->userdata($ticket['assignee']); |
|
| 106 | + echo $userassignee['fullname']; |
|
| 107 | + ?> |
|
| 108 | 108 | </td> |
| 109 | 109 | </tr> |
| 110 | 110 | <tr> |
@@ -124,14 +124,14 @@ discard block |
||
| 124 | 124 | <table class="formtable"> |
| 125 | 125 | <tr bgcolor="#e0e0e0" ><td width="150">Updated On</td><td width="150">Updated By</td><td>Description</td></tr> |
| 126 | 126 | <?php |
| 127 | - $list_log_tickets = $tickets->get_audit_trail($id); |
|
| 128 | - foreach ($list_log_tickets as $log_ticket) { |
|
| 129 | - $changed_by = $users->userdata($log_ticket['changeby']); |
|
| 130 | - echo '<tr><td>'.date('d-M-Y H:i:s', $log_ticket['changedate']).'</td>'. |
|
| 131 | - '<td>'.$changed_by['fullname'].'</td>'. |
|
| 132 | - '<td>'.$log_ticket['changes'].'</td></tr>'; |
|
| 133 | - } |
|
| 134 | - ?> |
|
| 127 | + $list_log_tickets = $tickets->get_audit_trail($id); |
|
| 128 | + foreach ($list_log_tickets as $log_ticket) { |
|
| 129 | + $changed_by = $users->userdata($log_ticket['changeby']); |
|
| 130 | + echo '<tr><td>'.date('d-M-Y H:i:s', $log_ticket['changedate']).'</td>'. |
|
| 131 | + '<td>'.$changed_by['fullname'].'</td>'. |
|
| 132 | + '<td>'.$log_ticket['changes'].'</td></tr>'; |
|
| 133 | + } |
|
| 134 | + ?> |
|
| 135 | 135 | </table> |
| 136 | 136 | </fieldset> |
| 137 | 137 | <br/><br/> |
@@ -3,26 +3,26 @@ discard block |
||
| 3 | 3 | require 'core/init.php'; |
| 4 | 4 | $general->logged_in_protect(); |
| 5 | 5 | if (empty($_POST) === false) { |
| 6 | - $username = strip_tags(addslashes(trim($_POST['username']))); |
|
| 7 | - $password = strip_tags(addslashes(trim($_POST['password']))); |
|
| 8 | - if (empty($username) === true || empty($password) === true) { |
|
| 9 | - $errors[] = 'Sorry, but we need your username and password.'; |
|
| 10 | - } elseif ($users->user_exists($username) === false) { |
|
| 11 | - $errors[] = 'Sorry, that username doesn\'t exists. Please try again.'; |
|
| 12 | - } else { |
|
| 13 | - $login = $users->login($username, $password); |
|
| 14 | - if ($login === false) { |
|
| 15 | - $errors[] = 'Sorry, that username/password is invalid. Please try again.'; |
|
| 16 | - } elseif (!$users->email_confirmed($username)) { |
|
| 17 | - $errors[] = 'Sorry, your account is locked. Please contact Administrator.'; |
|
| 18 | - } else { |
|
| 19 | - $_SESSION['loginid'] = $login; |
|
| 20 | - $users->log_users($login, 'Login to Helpdesk System'); |
|
| 21 | - echo $login; |
|
| 22 | - header('location: home.php'); |
|
| 23 | - exit(); |
|
| 24 | - } |
|
| 25 | - } |
|
| 6 | + $username = strip_tags(addslashes(trim($_POST['username']))); |
|
| 7 | + $password = strip_tags(addslashes(trim($_POST['password']))); |
|
| 8 | + if (empty($username) === true || empty($password) === true) { |
|
| 9 | + $errors[] = 'Sorry, but we need your username and password.'; |
|
| 10 | + } elseif ($users->user_exists($username) === false) { |
|
| 11 | + $errors[] = 'Sorry, that username doesn\'t exists. Please try again.'; |
|
| 12 | + } else { |
|
| 13 | + $login = $users->login($username, $password); |
|
| 14 | + if ($login === false) { |
|
| 15 | + $errors[] = 'Sorry, that username/password is invalid. Please try again.'; |
|
| 16 | + } elseif (!$users->email_confirmed($username)) { |
|
| 17 | + $errors[] = 'Sorry, your account is locked. Please contact Administrator.'; |
|
| 18 | + } else { |
|
| 19 | + $_SESSION['loginid'] = $login; |
|
| 20 | + $users->log_users($login, 'Login to Helpdesk System'); |
|
| 21 | + echo $login; |
|
| 22 | + header('location: home.php'); |
|
| 23 | + exit(); |
|
| 24 | + } |
|
| 25 | + } |
|
| 26 | 26 | } |
| 27 | 27 | ?> |
| 28 | 28 | <!DOCTYPE html> |
@@ -56,9 +56,9 @@ discard block |
||
| 56 | 56 | </table> |
| 57 | 57 | </div> |
| 58 | 58 | <?php |
| 59 | - if (empty($errors) === false) { |
|
| 60 | - echo '<p class="errormsg">'.implode('</p><p class="errormsg">', $errors).'</p>'; |
|
| 61 | - } |
|
| 59 | + if (empty($errors) === false) { |
|
| 60 | + echo '<p class="errormsg">'.implode('</p><p class="errormsg">', $errors).'</p>'; |
|
| 61 | + } |
|
| 62 | 62 | ?> |
| 63 | 63 | <div class="footer"> |
| 64 | 64 | </div> |
@@ -8,11 +8,11 @@ |
||
| 8 | 8 | $tickets = $tickets->get_tickets(); |
| 9 | 9 | $json = '['; |
| 10 | 10 | foreach ($tickets as $ticket) { |
| 11 | - $customer = $customers->customer_data($ticket['idcustomer']); |
|
| 12 | - $userassignee = $users->userdata($ticket['assignee']); |
|
| 13 | - $json .= '{"Product": "'.$customer['customerproduct'].'",'. |
|
| 14 | - '"Company": "'.$customer['namacustomer'].'",'. |
|
| 15 | - '"Assignee": "'.$userassignee['fullname'].'",'. |
|
| 16 | - '"Status": "'.$ticket['ticketstatus'].'"},'; |
|
| 11 | + $customer = $customers->customer_data($ticket['idcustomer']); |
|
| 12 | + $userassignee = $users->userdata($ticket['assignee']); |
|
| 13 | + $json .= '{"Product": "'.$customer['customerproduct'].'",'. |
|
| 14 | + '"Company": "'.$customer['namacustomer'].'",'. |
|
| 15 | + '"Assignee": "'.$userassignee['fullname'].'",'. |
|
| 16 | + '"Status": "'.$ticket['ticketstatus'].'"},'; |
|
| 17 | 17 | } |
| 18 | 18 | echo substr($json, 0, -1).']'; |
@@ -22,11 +22,11 @@ |
||
| 22 | 22 | <p style="font-family:arial;color:red;font-size:16px;">Helpdesk Breaking News</p> |
| 23 | 23 | <table class="formtable"> |
| 24 | 24 | <?php |
| 25 | - echo '<tr><td> From :'.$news['createdby'].'</td></tr>'. |
|
| 26 | - '<tr><td>'.date('d-M-Y', $news['createdon']).'</td></tr>'. |
|
| 27 | - '<tr><td><p style="font-family:arial;color:black;font-size:20px;">'.$news['title'].'</p></td></tr>'. |
|
| 28 | - '<tr><td><p style="font-family:arial;color:black;font-size:14px;">'.nl2br($news['detail']).'</p></td></tr>'; |
|
| 29 | - ?> |
|
| 25 | + echo '<tr><td> From :'.$news['createdby'].'</td></tr>'. |
|
| 26 | + '<tr><td>'.date('d-M-Y', $news['createdon']).'</td></tr>'. |
|
| 27 | + '<tr><td><p style="font-family:arial;color:black;font-size:20px;">'.$news['title'].'</p></td></tr>'. |
|
| 28 | + '<tr><td><p style="font-family:arial;color:black;font-size:14px;">'.nl2br($news['detail']).'</p></td></tr>'; |
|
| 29 | + ?> |
|
| 30 | 30 | </table> |
| 31 | 31 | </body> |
| 32 | 32 | </html> |
| 33 | 33 | \ No newline at end of file |
@@ -3,7 +3,7 @@ discard block |
||
| 3 | 3 | $general->logged_out_protect(); |
| 4 | 4 | $user = $users->userdata($_SESSION['loginid']); |
| 5 | 5 | if ($user['level'] != 'Admin') { |
| 6 | - exit("You don't have permission to access this page!"); |
|
| 6 | + exit("You don't have permission to access this page!"); |
|
| 7 | 7 | } |
| 8 | 8 | $logs = $users->get_users_log(); |
| 9 | 9 | ?> |
@@ -55,15 +55,15 @@ discard block |
||
| 55 | 55 | </thead> |
| 56 | 56 | <tbody> |
| 57 | 57 | <?php |
| 58 | - foreach ($logs as $log) { |
|
| 59 | - $username = $users->get_user_by_id($log['iduser']); |
|
| 60 | - echo '<tr><td>'.date('d-M-Y H:i', $log['time']).'</td>'. |
|
| 61 | - '<td>'.$username['username'].'</td>'. |
|
| 62 | - '<td>'.$log['ip'].'</td>'. |
|
| 63 | - '<td>'.$log['browser'].'</td>'. |
|
| 64 | - '<td>'.$log['log'].'</td></tr>'; |
|
| 65 | - } |
|
| 66 | - ?> |
|
| 58 | + foreach ($logs as $log) { |
|
| 59 | + $username = $users->get_user_by_id($log['iduser']); |
|
| 60 | + echo '<tr><td>'.date('d-M-Y H:i', $log['time']).'</td>'. |
|
| 61 | + '<td>'.$username['username'].'</td>'. |
|
| 62 | + '<td>'.$log['ip'].'</td>'. |
|
| 63 | + '<td>'.$log['browser'].'</td>'. |
|
| 64 | + '<td>'.$log['log'].'</td></tr>'; |
|
| 65 | + } |
|
| 66 | + ?> |
|
| 67 | 67 | </tbody> |
| 68 | 68 | </table> |
| 69 | 69 | </body> |
@@ -3,16 +3,16 @@ discard block |
||
| 3 | 3 | $general->logged_out_protect(); |
| 4 | 4 | |
| 5 | 5 | if (isset($_POST['submit'])) { |
| 6 | - $newsdate = strtotime($_POST['newsdate']); |
|
| 7 | - $title = $_POST['title']; |
|
| 8 | - $detail = $_POST['detail']; |
|
| 9 | - $user = $users->userdata($_SESSION['loginid']); |
|
| 10 | - $createdby = ucwords(strtolower($user['fullname'])); |
|
| 11 | - $createdon = strtotime(now); |
|
| 12 | - $expired = strtotime($_POST['expireddate']); |
|
| 6 | + $newsdate = strtotime($_POST['newsdate']); |
|
| 7 | + $title = $_POST['title']; |
|
| 8 | + $detail = $_POST['detail']; |
|
| 9 | + $user = $users->userdata($_SESSION['loginid']); |
|
| 10 | + $createdby = ucwords(strtolower($user['fullname'])); |
|
| 11 | + $createdon = strtotime(now); |
|
| 12 | + $expired = strtotime($_POST['expireddate']); |
|
| 13 | 13 | |
| 14 | - $hdnews->add_news($newsdate, $title, $detail, $createdby, $createdon, $expired); |
|
| 15 | - header('Location: hdnews.php'); |
|
| 14 | + $hdnews->add_news($newsdate, $title, $detail, $createdby, $createdon, $expired); |
|
| 15 | + header('Location: hdnews.php'); |
|
| 16 | 16 | } |
| 17 | 17 | ?> |
| 18 | 18 | <!DOCTYPE HTML> |
@@ -90,9 +90,9 @@ discard block |
||
| 90 | 90 | </form> |
| 91 | 91 | |
| 92 | 92 | <?php |
| 93 | - if (empty($errors) === false) { |
|
| 94 | - echo '<p class=errormsg>'.implode('</p><p class=errormsg>', $errors).'</p>'; |
|
| 95 | - } |
|
| 96 | - ?> |
|
| 93 | + if (empty($errors) === false) { |
|
| 94 | + echo '<p class=errormsg>'.implode('</p><p class=errormsg>', $errors).'</p>'; |
|
| 95 | + } |
|
| 96 | + ?> |
|
| 97 | 97 | </body> |
| 98 | 98 | </html> |
| 99 | 99 | \ No newline at end of file |
@@ -51,20 +51,20 @@ |
||
| 51 | 51 | </thead> |
| 52 | 52 | <tbody> |
| 53 | 53 | <?php |
| 54 | - foreach ($tickets as $ticket) { |
|
| 55 | - $sla = $slas->sla_data($ticket['sla']); |
|
| 56 | - $customer = $customers->customer_data($ticket['idcustomer']); |
|
| 57 | - $user = $users->userdata($ticket['assignee']); |
|
| 58 | - echo '<tr><td><a href="ticketedit.php?id='.$ticket['id'].'">'.$ticket['ticketnumber'].'</a></td>'. |
|
| 59 | - '<td>'.$sla['namasla'].'</td>'. |
|
| 60 | - '<td>'.$customer['namacustomer'].'</td>'. |
|
| 61 | - '<td>'.date('d-M-Y', $ticket['reporteddate']).'</td>'. |
|
| 62 | - '<td>'.$ticket['reportedby'].'</td>'. |
|
| 63 | - '<td>'.$ticket['problemsummary'].'</td>'. |
|
| 64 | - '<td>'.$ticket['ticketstatus'].'</td>'. |
|
| 65 | - '<td>'.$user['fullname'].'</td></tr>'; |
|
| 66 | - } |
|
| 67 | - ?> |
|
| 54 | + foreach ($tickets as $ticket) { |
|
| 55 | + $sla = $slas->sla_data($ticket['sla']); |
|
| 56 | + $customer = $customers->customer_data($ticket['idcustomer']); |
|
| 57 | + $user = $users->userdata($ticket['assignee']); |
|
| 58 | + echo '<tr><td><a href="ticketedit.php?id='.$ticket['id'].'">'.$ticket['ticketnumber'].'</a></td>'. |
|
| 59 | + '<td>'.$sla['namasla'].'</td>'. |
|
| 60 | + '<td>'.$customer['namacustomer'].'</td>'. |
|
| 61 | + '<td>'.date('d-M-Y', $ticket['reporteddate']).'</td>'. |
|
| 62 | + '<td>'.$ticket['reportedby'].'</td>'. |
|
| 63 | + '<td>'.$ticket['problemsummary'].'</td>'. |
|
| 64 | + '<td>'.$ticket['ticketstatus'].'</td>'. |
|
| 65 | + '<td>'.$user['fullname'].'</td></tr>'; |
|
| 66 | + } |
|
| 67 | + ?> |
|
| 68 | 68 | </tbody> |
| 69 | 69 | </table> |
| 70 | 70 | <p> </p> |