Passed
Branch master (1c14b0)
by Saepul
02:59
created
email/test_send_email.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-$to  = 'Hendra <[email protected]>' . ', '; 
2
+$to  = 'Hendra <[email protected]>'.', '; 
3 3
 $to .= '';
4 4
 $subject = 'Ticket No. 30/SR/Aug/2013 needs your resolution!';
5 5
 $message = 
@@ -21,7 +21,7 @@  discard block
 block discarded – undo
21 21
 $ok = mail($to, $subject, $message, implode("\r\n", $headers));
22 22
 if ($ok) {
23 23
 echo "Email sent successfully!!";
24
-} else {
24
+}else {
25 25
 echo "Failed: Email cannot be sent!!";
26 26
 }
27 27
 ?>
Please login to merge, or discard this patch.
email/notify_new_ticket.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -1,7 +1,7 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 require '../core/init.php';
3 3
 //$general->logged_out_protect();
4
-$emailstatus="New";
4
+$emailstatus = "New";
5 5
 $new_emails = $emails->get_email_by_status($emailstatus);
6 6
 foreach ($new_emails as $new_email)
7 7
 {	$idemail = $new_email['idemail'];	
@@ -20,9 +20,9 @@  discard block
 block discarded – undo
20 20
 	$headers[] = "X-Mailer: PHP/".phpversion();
21 21
 	$ok = mail($to, $subject, $message, implode("\r\n", $headers));
22 22
 	if ($ok)
23
-	{	$emails->update_status_email($idemail,"Sent");
24
-	} else {
25
-		$emails->update_status_email($idemail,"Cannot Send");
23
+	{	$emails->update_status_email($idemail, "Sent");
24
+	}else {
25
+		$emails->update_status_email($idemail, "Cannot Send");
26 26
 	}
27 27
 }
28 28
 ?>
Please login to merge, or discard this patch.
slaedit.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -2,16 +2,16 @@  discard block
 block discarded – undo
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
-$slaid		= $_GET['id'];
8
-$sla		= $slas->sla_data($slaid);
7
+$slaid = $_GET['id'];
8
+$sla = $slas->sla_data($slaid);
9 9
 if (isset($_POST['submit']))
10
-{	$namasla 		= $_POST['namasla'];
11
-	$responsetime 	= $_POST['responsetime'];
10
+{	$namasla = $_POST['namasla'];
11
+	$responsetime = $_POST['responsetime'];
12 12
 	$resolutiontime = $_POST['resolutiontime'];
13
-	$slawarning		= $_POST['slawarning'];
14
-	$slas->update_sla($slaid,$namasla,$responsetime,$resolutiontime,$slawarning);
13
+	$slawarning = $_POST['slawarning'];
14
+	$slas->update_sla($slaid, $namasla, $responsetime, $resolutiontime, $slawarning);
15 15
 	header('location:slalist.php');
16 16
 }
17 17
 ?>
@@ -91,8 +91,8 @@  discard block
 block discarded – undo
91 91
 	</fieldset>
92 92
 	</form>
93 93
 	<?php 
94
-	if(empty($errors) === false){
95
-		echo '<p class=errormsg>' . implode('</p><p class=errormsg>', $errors) . '</p>';
94
+	if (empty($errors) === false) {
95
+		echo '<p class=errormsg>'.implode('</p><p class=errormsg>', $errors).'</p>';
96 96
 	}
97 97
 	?>
98 98
 </body>
Please login to merge, or discard this patch.
logout.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,7 +1,7 @@
 block discarded – undo
1 1
 <?php 
2 2
 require 'core/init.php';
3 3
 $general->logged_out_protect();
4
-$users->log_users($_SESSION['loginid'],"Logout Helpdesk System");
4
+$users->log_users($_SESSION['loginid'], "Logout Helpdesk System");
5 5
 session_start();
6 6
 session_destroy();
7 7
 header('Location:index.php');
Please login to merge, or discard this patch.
ticketdel.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,7 +1,7 @@
 block discarded – undo
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
 $tickets->delete($id);
6 6
 header('Location: ticketlist.php');
7 7
 ?>
8 8
\ No newline at end of file
Please login to merge, or discard this patch.
emailqueue.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -3,7 +3,7 @@  discard block
 block discarded – undo
3 3
 require 'core/init.php';
4 4
 $general->logged_out_protect();
5 5
 $user = $users->userdata($_SESSION['loginid']);
6
-if($user['level'] != "Admin")
6
+if ($user['level'] != "Admin")
7 7
 { 	exit("You don't have permission to access this page!"); }
8 8
 
9 9
 if (isset($_POST['submit']))
@@ -14,7 +14,7 @@  discard block
 block discarded – undo
14 14
 	//sleep(5);
15 15
 	header('Location: emailqueue.php?success');	
16 16
 }
17
-$logs 			  = $emails->get_email_queue();
17
+$logs = $emails->get_email_queue();
18 18
 $emailqueue_count = count($logs);
19 19
 ?>
20 20
 <!DOCTYPE HTML>
@@ -60,9 +60,9 @@  discard block
 block discarded – undo
60 60
 	<span class="textmsg">
61 61
 	<?php 
62 62
 		if (isset($_GET['process']) && empty($_GET['process']))
63
-		{echo 'Sending email queue... Please wait!';}
63
+		{echo 'Sending email queue... Please wait!'; }
64 64
 		if (isset($_GET['success']) && empty($_GET['success']))
65
-		{echo 'Sending email queue is done!';}
65
+		{echo 'Sending email queue is done!'; }
66 66
 	?></span>
67 67
 	</p>
68 68
 	<table id="datatables" class="display">
Please login to merge, or discard this patch.
searchticket.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -2,19 +2,19 @@  discard block
 block discarded – undo
2 2
 require 'core/init.php';
3 3
 $general->logged_out_protect();
4 4
 $user = $users->userdata($_SESSION['loginid']);
5
-$closetickets =  $tickets->get_tickets_by_status("Closed");
6
-$tickets_count 	= count($closetickets);
7
-$period1		= date('d-M-Y',strtotime("-1 month",time()));
8
-$period2 		= date('d-M-Y',time());
5
+$closetickets = $tickets->get_tickets_by_status("Closed");
6
+$tickets_count = count($closetickets);
7
+$period1 = date('d-M-Y', strtotime("-1 month", time()));
8
+$period2 = date('d-M-Y', time());
9 9
 $p1 = strtotime($period1);
10 10
 $p2 = strtotime($period2);
11 11
 $listtickets = $tickets->search_closed_ticket($p1, $p2);
12 12
 if (isset($_POST['submit']))
13
-{	$period1 	= strtotime($_POST['period1']);
13
+{	$period1 = strtotime($_POST['period1']);
14 14
 	$period2 	= strtotime($_POST['period2']);
15 15
 	$listtickets = $tickets->search_closed_ticket($period1, $period2);
16
-	$period1	= date('d-M-Y',$period1);
17
-	$period2 	= date('d-M-Y',$period2);
16
+	$period1 = date('d-M-Y', $period1);
17
+	$period2 	= date('d-M-Y', $period2);
18 18
 }
19 19
 ?>
20 20
 <!doctype html>
@@ -83,10 +83,10 @@  discard block
 block discarded – undo
83 83
 			$sla = $slas->sla_data($ticket['sla']);
84 84
 			$customer = $customers->customer_data($ticket['idcustomer']);
85 85
 			$user = $users->userdata($ticket['assignee']);
86
-			echo '<tr><td><a href=ticketread.php?id='.$ticket['id']. '>'.$ticket['ticketnumber'].'</a></td>'.
86
+			echo '<tr><td><a href=ticketread.php?id='.$ticket['id'].'>'.$ticket['ticketnumber'].'</a></td>'.
87 87
 				 '<td>'.$sla['namasla'].'</td>'.
88 88
 				 '<td>'.$customer['namacustomer'].'</td>'.
89
-				 '<td>'.date('d-M-Y',$ticket['reporteddate']).'</td>'.
89
+				 '<td>'.date('d-M-Y', $ticket['reporteddate']).'</td>'.
90 90
 				 '<td>'.$ticket['reportedby'].'</td>'.
91 91
 				 '<td>'.$ticket['problemsummary'].'</td>'.
92 92
 				 '<td>'.$ticket['ticketstatus'].'</td>'.
Please login to merge, or discard this patch.
slalist.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -2,9 +2,9 @@  discard block
 block discarded – undo
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
-$sla 		= $slas->get_sla();
7
+$sla = $slas->get_sla();
8 8
 ?>
9 9
 <!DOCTYPE HTML>
10 10
 <html>
@@ -59,11 +59,11 @@  discard block
 block discarded – undo
59 59
 		<?php 
60 60
 		foreach ($sla as $slaval) {
61 61
 			echo '<tr><td>'.$slaval['slaid'].'</td>'.
62
-				 '<td><a href=slaedit.php?id='.$slaval['slaid']. '>'.$slaval['namasla'].'</a></td>'.
62
+				 '<td><a href=slaedit.php?id='.$slaval['slaid'].'>'.$slaval['namasla'].'</a></td>'.
63 63
 				 '<td>'.$slaval['responsetime'].' Hours</td>'.
64 64
 				 '<td>'.$slaval['resolutiontime'].' Hours</td>'.
65 65
 				 '<td>'.$slaval['slawarning'].' Hours</td>'.
66
-				 '<td><a href=sladel.php?id='.$slaval['slaid']. ' onclick="return delete_confirm();">del</a></td></tr>';
66
+				 '<td><a href=sladel.php?id='.$slaval['slaid'].' onclick="return delete_confirm();">del</a></td></tr>';
67 67
 		}
68 68
 		?>
69 69
     </tbody>
Please login to merge, or discard this patch.
navigator.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,7 +1,7 @@
 block discarded – undo
1 1
 <?php 
2 2
 require 'core/init.php';
3 3
 $general->logged_out_protect();
4
-$user 		= $users->userdata($_SESSION['loginid']);
4
+$user = $users->userdata($_SESSION['loginid']);
5 5
 ?> 
6 6
 <!DOCTYPE HTML>
7 7
 <html>
Please login to merge, or discard this patch.