Passed
Branch master (1c14b0)
by Saepul
02:59
created
hdnewsdel.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -2,7 +2,7 @@
 block discarded – undo
2 2
 require 'core/init.php';
3 3
 $general->logged_out_protect();
4 4
 
5
-$id=$_GET['id'];
5
+$id = $_GET['id'];
6 6
 $hdnews->delete($id);
7 7
 header('Location: hdnews.php');
8 8
 ?>
9 9
\ No newline at end of file
Please login to merge, or discard this patch.
ticketedituser.php 1 patch
Spacing   +37 added lines, -37 removed lines patch added patch discarded remove patch
@@ -2,53 +2,53 @@  discard block
 block discarded – undo
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);
8
-if ($ticket['ticketstatus']=="Closed")
5
+$user = $users->userdata($_SESSION['loginid']);
6
+$id = $_GET['id'];
7
+$ticket = $tickets->ticket_data($id);
8
+if ($ticket['ticketstatus'] == "Closed")
9 9
 {	header("Location: ticketread.php?id=$id");
10 10
 	exit();
11 11
 }
12 12
 if (isset($_POST['submit']))
13
-{	$sla 			= $_POST['sla'];
13
+{	$sla = $_POST['sla'];
14 14
 	$reporteddate 	= $_POST['reporteddate'];
15
-	$reportedmonth 	= $_POST['reportedmonth'];
15
+	$reportedmonth = $_POST['reportedmonth'];
16 16
 	$reportedyear 	= $_POST['reportedyear'];
17
-	$datetimeStr 	= $reportedyear.'-'.$reportedmonth.'-'.$reporteddate;
17
+	$datetimeStr = $reportedyear.'-'.$reportedmonth.'-'.$reporteddate;
18 18
 	$reporteddate 	= strtotime($datetimeStr);
19 19
 	
20
-	$reportedby		= $_POST['reportedby'];
21
-	$telp 			= $_POST['telp'];
22
-	$email 			= $_POST['email'];
23
-	$problemsummary	= $_POST['problemsummary'];
24
-	$problemdetail	= $_POST['problemdetail'];
25
-	$assignee		= $_POST['idassignee'];
20
+	$reportedby = $_POST['reportedby'];
21
+	$telp = $_POST['telp'];
22
+	$email = $_POST['email'];
23
+	$problemsummary = $_POST['problemsummary'];
24
+	$problemdetail = $_POST['problemdetail'];
25
+	$assignee = $_POST['idassignee'];
26 26
 	$ticketstatus	= $_POST['ticketstatus'];
27 27
 	$resolution		= $_POST['resolution'];
28
-	$pendingby		= $_POST['pendingby'];
28
+	$pendingby = $_POST['pendingby'];
29 29
 	$pendingdate 	= $_POST['pendingdate'];
30 30
 	$resolvedby		= $_POST['resolvedby'];
31
-	$resolveddate 	= $_POST['resolveddate'];
32
-	$closedby		= $_POST['closedby'];
31
+	$resolveddate = $_POST['resolveddate'];
32
+	$closedby = $_POST['closedby'];
33 33
 	$closeddate		= $_POST['closeddate'];
34
-	$changes		= "Re-assigned the ticket.";
35
-	if ($ticketstatus=="Pending")
36
-	{	$pendingby		= $user['username'];
37
-		$pendingdate 	= strtotime(now);
38
-		$changes		= "Change Status to Pending.";
34
+	$changes = "Re-assigned the ticket.";
35
+	if ($ticketstatus == "Pending")
36
+	{	$pendingby = $user['username'];
37
+		$pendingdate = strtotime(now);
38
+		$changes = "Change Status to Pending.";
39 39
 	}
40
-	if ($ticketstatus=="Resolved")
41
-	{	$resolvedby		= $user['username'];
42
-		$resolveddate 	= strtotime(now);
43
-		$changes		= "Change Status to Resolved.";
40
+	if ($ticketstatus == "Resolved")
41
+	{	$resolvedby = $user['username'];
42
+		$resolveddate = strtotime(now);
43
+		$changes = "Change Status to Resolved.";
44 44
 	}
45
-	if ($ticketstatus=="Closed")
46
-	{	$closedby		= $user['username'];
47
-		$closeddate		= strtotime(now);
48
-		$changes		= "Change Status to Closed.";
45
+	if ($ticketstatus == "Closed")
46
+	{	$closedby = $user['username'];
47
+		$closeddate = strtotime(now);
48
+		$changes = "Change Status to Closed.";
49 49
 	}
50
-	$tickets->update_ticket($id,$sla,$reporteddate,$reportedby,$telp,$email,$problemsummary,$problemdetail,$ticketstatus,$assignee,$assigneddate,$pendingby, $pendingdate, $resolution,$resolvedby,$resolveddate,$closedby,$closeddate);
51
-	$tickets->log_tickets($id,$sla,$reporteddate,$reportedby,$telp,$email,$problemsummary,$problemdetail,$ticketstatus,$assignee,$assigneddate,$pendingby, $pendingdate, $resolution,$resolvedby,$resolveddate,$closedby,$closeddate,$changes,$changeby);
50
+	$tickets->update_ticket($id, $sla, $reporteddate, $reportedby, $telp, $email, $problemsummary, $problemdetail, $ticketstatus, $assignee, $assigneddate, $pendingby, $pendingdate, $resolution, $resolvedby, $resolveddate, $closedby, $closeddate);
51
+	$tickets->log_tickets($id, $sla, $reporteddate, $reportedby, $telp, $email, $problemsummary, $problemdetail, $ticketstatus, $assignee, $assigneddate, $pendingby, $pendingdate, $resolution, $resolvedby, $resolveddate, $closedby, $closeddate, $changes, $changeby);
52 52
 	header('Location: ticketlistuser.php');
53 53
 }
54 54
 ?>
@@ -95,7 +95,7 @@  discard block
 block discarded – undo
95 95
 			<td width="120"> Customer </td><td> : </td>
96 96
 			<td> 
97 97
 			<?php 
98
-				$customer=$customers->customer_data($ticket['idcustomer']);
98
+				$customer = $customers->customer_data($ticket['idcustomer']);
99 99
 				echo $customer['namacustomer'];
100 100
 			?> </td>
101 101
 		</tr>
@@ -107,7 +107,7 @@  discard block
 block discarded – undo
107 107
 			<td> Warranty Period</td><td> : </td>
108 108
 			<td> 
109 109
 			<?php 
110
-				$project=$projects->get_project_customer($customer['idcustomer']);
110
+				$project = $projects->get_project_customer($customer['idcustomer']);
111 111
 				echo $project['warrantyperiod'].' Year';
112 112
 			?> </td>
113 113
 		</tr>
@@ -130,7 +130,7 @@  discard block
 block discarded – undo
130 130
 		</tr>
131 131
 		<tr>
132 132
 			<td> Reported Date</td><td> : </td>
133
-			<td><?php echo date('d-M-Y H:i',$ticket['reporteddate']); ?>
133
+			<td><?php echo date('d-M-Y H:i', $ticket['reporteddate']); ?>
134 134
 			<input type="hidden" name="reporteddate" value="<?php echo $ticket['reporteddate']; ?>"></td>
135 135
 		</tr>
136 136
 		<tr>
@@ -140,7 +140,7 @@  discard block
 block discarded – undo
140 140
 		</tr>
141 141
 		<tr>
142 142
 			<td> Urgency (SLA)</td><td> : </td>
143
-			<td><?php $sladata = $slas->sla_data($ticket['sla']); echo $sladata['namasla'];?>
143
+			<td><?php $sladata = $slas->sla_data($ticket['sla']); echo $sladata['namasla']; ?>
144 144
 				<input type='hidden' name='sla' value="<?php echo $ticket['sla']; ?>"> </td>
145 145
 				
146 146
 		</tr>
@@ -176,7 +176,7 @@  discard block
 block discarded – undo
176 176
 			<td> <input type="hidden" name="oldticketstatus" value="<?php echo $ticket['ticketstatus']; ?>"> 
177 177
 			<select name="ticketstatus">
178 178
 				<?php
179
-					echo '<option value=' . $ticket['ticketstatus']. ' selected="selected">'.  $ticket['ticketstatus'] . '</option>';
179
+					echo '<option value='.$ticket['ticketstatus'].' selected="selected">'.$ticket['ticketstatus'].'</option>';
180 180
 				?>
181 181
 				<option value="Assigned"> Assigned </option>
182 182
 				<option value="Resolved"> Resolved </option>
@@ -218,7 +218,7 @@  discard block
 block discarded – undo
218 218
 		$list_log_tickets = $tickets->get_audit_trail($id);
219 219
 		foreach ($list_log_tickets as $log_ticket)
220 220
 		{	$changed_by = $users->userdata($log_ticket['changeby']);
221
-			echo '<tr><td>'.date('d-M-Y H:i:s',$log_ticket['changedate']).'</td>'.
221
+			echo '<tr><td>'.date('d-M-Y H:i:s', $log_ticket['changedate']).'</td>'.
222 222
 				 '<td>'.$changed_by['fullname'].'</td>'.
223 223
 				 '<td>'.$log_ticket['changes'].'</td></tr>';
224 224
 		}
Please login to merge, or discard this patch.
ticketnew.php 1 patch
Spacing   +31 added lines, -31 removed lines patch added patch discarded remove patch
@@ -5,40 +5,40 @@  discard block
 block discarded – undo
5 5
 $changeby = $_SESSION['loginid'];
6 6
 $documentedby = $_SESSION['loginid'];
7 7
 if (isset($_POST['submit']))
8
-{	$lastticket 	= $tickets->get_last_ticket();
9
-	$id				= $lastticket['id'] + 1;
10
-	$ticketnumber 	= $id . '/SR/'.date("M").'/'.date("Y"); //format nomor tiket
11
-	$sla 			= $_POST['sla'];
8
+{	$lastticket = $tickets->get_last_ticket();
9
+	$id = $lastticket['id'] + 1;
10
+	$ticketnumber 	= $id.'/SR/'.date("M").'/'.date("Y"); //format nomor tiket
11
+	$sla = $_POST['sla'];
12 12
 	//$idcustomer		= $_POST['idcustomer'];
13 13
 	$reporteddate 	= strtotime($_POST['reporteddate']);
14
-	$reportedby		= $_POST['reportedby'];
15
-	$telp 			= $_POST['telp'];
16
-	$email 			= $_POST['email'];
17
-	$problemsummary	= $_POST['problemsummary'];
18
-	$problemdetail	= $_POST['problemdetail'];
19
-	$ticketstatus	= 'Assigned'; //ketika pertama kali dibuat, status="Assigned" ke salah satu teknisi
20
-	$assignee		= $_POST['idassignee'];
21
-	$pro 			= $_POST['pro'];
22
-	$user_assignee	= $users->userdata($assignee);
14
+	$reportedby = $_POST['reportedby'];
15
+	$telp = $_POST['telp'];
16
+	$email = $_POST['email'];
17
+	$problemsummary = $_POST['problemsummary'];
18
+	$problemdetail = $_POST['problemdetail'];
19
+	$ticketstatus = 'Assigned'; //ketika pertama kali dibuat, status="Assigned" ke salah satu teknisi
20
+	$assignee = $_POST['idassignee'];
21
+	$pro = $_POST['pro'];
22
+	$user_assignee = $users->userdata($assignee);
23 23
 	$email_assignee = $user_assignee['email'];
24 24
 	$changes		= 'Create New Ticket';
25 25
 	$emailcc		= '';
26
-	$emailbcc		= '';
26
+	$emailbcc = '';
27 27
 	$fullname_assignee = $user_assignee['fullname'];
28
-	if($sla == '1')
28
+	if ($sla == '1')
29 29
 	{	$managers = $users->get_user_by_level("Manager");
30
-		$i=0;
30
+		$i = 0;
31 31
 		foreach ($managers as $manager)
32 32
 		{	$manageremail[$i] = $manager['email'];
33
-			$emailcc .= $manageremail[$i] . ', ';		
33
+			$emailcc .= $manageremail[$i].', ';		
34 34
 			$i++;
35 35
 		}
36 36
 	}
37
-	$emailstatus='New';
37
+	$emailstatus = 'New';
38 38
 	$senddate = time();
39
-	$datasla=$slas->sla_data($sla);
40
-	$resolutiontime=$datasla['resolutiontime'];
41
-	$slasenddate=strtotime("+$resolutiontime hours",$senddate);
39
+	$datasla = $slas->sla_data($sla);
40
+	$resolutiontime = $datasla['resolutiontime'];
41
+	$slasenddate = strtotime("+$resolutiontime hours", $senddate);
42 42
 	$emailsubject = "Ticket No: $ticketnumber has assigned to you";
43 43
 	$message = 
44 44
 "Dear $fullname_assignee, \r\n
@@ -47,12 +47,12 @@  discard block
 block discarded – undo
47 47
 Thank you. \r\n
48 48
 Regards, \r\n
49 49
 Helpdesk";
50
-	$tickets->add_ticket($ticketnumber,$sla,$reporteddate,$reportedby,$telp,$email,$problemsummary,$problemdetail,$ticketstatus,$assignee,$documentedby,$pro);
51
-	$assigneddate='';$pendingby='';$pendingdate='';$resolution='';$resolvedby='';$resolveddate='';$closedby='';$closeddate='';
52
-	$tickets->log_tickets($id,$sla,$reporteddate,$reportedby,$telp,$email,$problemsummary,$problemdetail,$ticketstatus,$assignee,$assigneddate,$pendingby, $pendingdate, $resolution,$resolvedby,$resolveddate,$closedby,$closeddate,$changes,$changeby);
53
-	$emails->add_email($id,$senddate,$email_assignee,$emailcc,$emailbcc,$emailsubject,$message,$emailstatus);
54
-	$emails->add_sla_remainder($id,$ticketnumber,$slasenddate,$email_assignee,$emailcc,$emailbcc,$emailsubject,$message);
55
-	$result=$emails->send_new_ticket();
50
+	$tickets->add_ticket($ticketnumber, $sla, $reporteddate, $reportedby, $telp, $email, $problemsummary, $problemdetail, $ticketstatus, $assignee, $documentedby, $pro);
51
+	$assigneddate = ''; $pendingby = ''; $pendingdate = ''; $resolution = ''; $resolvedby = ''; $resolveddate = ''; $closedby = ''; $closeddate = '';
52
+	$tickets->log_tickets($id, $sla, $reporteddate, $reportedby, $telp, $email, $problemsummary, $problemdetail, $ticketstatus, $assignee, $assigneddate, $pendingby, $pendingdate, $resolution, $resolvedby, $resolveddate, $closedby, $closeddate, $changes, $changeby);
53
+	$emails->add_email($id, $senddate, $email_assignee, $emailcc, $emailbcc, $emailsubject, $message, $emailstatus);
54
+	$emails->add_sla_remainder($id, $ticketnumber, $slasenddate, $email_assignee, $emailcc, $emailbcc, $emailsubject, $message);
55
+	$result = $emails->send_new_ticket();
56 56
 	//echo $result;
57 57
 	header("Location: ticketread.php?id=$id");
58 58
 	//echo $senddate."<br>".$resolutiontime."<br>".$slasenddate;
@@ -203,7 +203,7 @@  discard block
 block discarded – undo
203 203
 		</tr>
204 204
 		<tr>
205 205
 			<td> Reported Date*</td><td> : </td>
206
-			<td><input type="text" id="reporteddate" name="reporteddate" readonly="readonly" value="<?php echo date('d-M-Y',time()); ?>"> </td>
206
+			<td><input type="text" id="reporteddate" name="reporteddate" readonly="readonly" value="<?php echo date('d-M-Y', time()); ?>"> </td>
207 207
 		</tr>
208 208
 		<tr>
209 209
 			<td> Reported By* </td><td> : </td>
@@ -251,7 +251,7 @@  discard block
 block discarded – undo
251 251
 				foreach ($Asignees as $user)
252 252
 				{	
253 253
 					//echo '<option value=' . $user['id'] . '>' .  $user['fullname'] . '</option>';
254
-					echo '<option selected value=' . $user['id'] . '>' .  $user['fullname'] . '</option>';
254
+					echo '<option selected value='.$user['id'].'>'.$user['fullname'].'</option>';
255 255
 				}
256 256
 			?>
257 257
 			</select> </td>
@@ -277,8 +277,8 @@  discard block
 block discarded – undo
277 277
 	</form>
278 278
 
279 279
 	<?php 
280
-	if(empty($errors) === false){
281
-		echo '<p class=errormsg>' . implode('</p><p class=errormsg>', $errors) . '</p>';
280
+	if (empty($errors) === false) {
281
+		echo '<p class=errormsg>'.implode('</p><p class=errormsg>', $errors).'</p>';
282 282
 	}
283 283
 	?>
284 284
 </body>
Please login to merge, or discard this patch.
emailsend.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -1,15 +1,15 @@  discard block
 block discarded – undo
1 1
 <?php 
2 2
 require 'core/init.php';
3 3
 $general->logged_out_protect();
4
-@$idemail=$_GET['id'];
5
-$email 	= $emails->get_email_queue_by_id($idemail);
4
+@$idemail = $_GET['id'];
5
+$email = $emails->get_email_queue_by_id($idemail);
6 6
 if (isset($_POST['submit']))
7 7
 {	$emailstatus = $_POST['emailstatus'];
8
-	if($emailstatus=="Sent")
8
+	if ($emailstatus == "Sent")
9 9
 	{	$errors[] = 'You have sent this email!';
10 10
 	}else
11
-	{	$to 	 = $_POST['emailto'];
12
-		$cc 	 = substr($_POST['emailcc'], 0, -2);
11
+	{	$to = $_POST['emailto'];
12
+		$cc = substr($_POST['emailcc'], 0, -2);
13 13
 		$subject = $_POST['emailsubject'];
14 14
 		$message = $_POST['message'];
15 15
 		
@@ -26,10 +26,10 @@  discard block
 block discarded – undo
26 26
 		
27 27
 		$ok = mail($to, $subject, $message, implode("\r\n", $headers));
28 28
 		if ($ok)
29
-		{	$emails->update_status_email($idemail,"Sent");
29
+		{	$emails->update_status_email($idemail, "Sent");
30 30
 			header('Location: emailsend.php?success');
31
-		} else {
32
-			$emails->update_status_email($idemail,"Cannot Send");
31
+		}else {
32
+			$emails->update_status_email($idemail, "Cannot Send");
33 33
 			$errors[] = 'Sorry, email cannot send now! Please try again.';
34 34
 		}
35 35
 	}
@@ -83,8 +83,8 @@  discard block
 block discarded – undo
83 83
 	</fieldset>
84 84
 	</form>
85 85
 	<?php 
86
-	if(empty($errors) === false){
87
-		echo '<p class=errormsg>' . implode('</p><p class=errormsg>', $errors) . '</p>';
86
+	if (empty($errors) === false) {
87
+		echo '<p class=errormsg>'.implode('</p><p class=errormsg>', $errors).'</p>';
88 88
 	}
89 89
 	if (isset($_GET['success']) && empty($_GET['success'])) {
90 90
 		echo 'Email has been sent!';
Please login to merge, or discard this patch.
projectedit.php 1 patch
Spacing   +26 added lines, -26 removed lines patch added patch discarded remove patch
@@ -1,29 +1,29 @@  discard block
 block discarded – undo
1 1
 <?php 
2 2
 require 'core/init.php';
3 3
 $general->logged_out_protect();
4
-$projectid	= $_GET['id'];
5
-$project	= $projects->project_data($projectid);
6
-$idcustomer	= $project['idcustomer'];
7
-$cust=$customers->customer_data($idcustomer);
4
+$projectid = $_GET['id'];
5
+$project = $projects->project_data($projectid);
6
+$idcustomer = $project['idcustomer'];
7
+$cust = $customers->customer_data($idcustomer);
8 8
 if (isset($_POST['submit']))
9
-{	$deliverybegin 	= strtotime($_POST['deliverybegin']);
10
-	$deliveryend 	= strtotime($_POST['deliveryend']);
9
+{	$deliverybegin = strtotime($_POST['deliverybegin']);
10
+	$deliveryend = strtotime($_POST['deliveryend']);
11 11
 	
12
-	$installbegin 	= strtotime($_POST['installbegin']);
13
-	$installend 	= strtotime($_POST['installend']);
12
+	$installbegin = strtotime($_POST['installbegin']);
13
+	$installend = strtotime($_POST['installend']);
14 14
 	
15
-	$uatbegin 	= strtotime($_POST['uatbegin']);
16
-	$uatend 	= strtotime($_POST['uatend']);
15
+	$uatbegin = strtotime($_POST['uatbegin']);
16
+	$uatend = strtotime($_POST['uatend']);
17 17
 	
18 18
 	$billstartdate 	= strtotime($_POST['billstartdate']);
19
-	$billduedate 	= strtotime($_POST['billduedate']);
19
+	$billduedate = strtotime($_POST['billduedate']);
20 20
 	
21 21
 	$warrantyperiod = $_POST['warrantyperiod'];
22 22
 
23
-	$contractstartdate 	= strtotime($_POST['contractstartdate']);
23
+	$contractstartdate = strtotime($_POST['contractstartdate']);
24 24
 	$contractperiod = $_POST['contractperiod'];
25 25
 	
26
-	$projects->update_project($projectid,$projectname,$idcustomer,$deliverybegin,$deliveryend,$installbegin,$installend,$uatbegin,$uatend,$billstartdate,$billduedate,$warrantyperiod,$contractstartdate,$contractperiod);
26
+	$projects->update_project($projectid, $projectname, $idcustomer, $deliverybegin, $deliveryend, $installbegin, $installend, $uatbegin, $uatend, $billstartdate, $billduedate, $warrantyperiod, $contractstartdate, $contractperiod);
27 27
 	header('location: projectlist.php?');
28 28
 }
29 29
 ?>
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
 	<table class="formtable">
69 69
 		<tr>
70 70
 			<td width="100"> Project ID : </td>
71
-			<?php $disp_id_project=sprintf("%04s", $project['projectid']); ?>
71
+			<?php $disp_id_project = sprintf("%04s", $project['projectid']); ?>
72 72
 			<td> <input type='text' size='10' name='projectid' value='<?php echo $disp_id_project; ?>' disabled /> </td>
73 73
 		</tr>
74 74
 		<tr class="border-bottom">
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
 					$customers = $customers->get_customers();
84 84
 					foreach ($customers as $customerval)
85 85
 					{	
86
-						echo '<option value=' . $customerval['idcustomer'] . '>' .  $customerval['namacustomer'] . '</option>';
86
+						echo '<option value='.$customerval['idcustomer'].'>'.$customerval['namacustomer'].'</option>';
87 87
 					}
88 88
 				?>
89 89
 				</select></td>
@@ -92,36 +92,36 @@  discard block
 block discarded – undo
92 92
 	<table class="formtable"> 	
93 93
 		<tr>
94 94
 			<td width="100"> Delivery Date : </td>
95
-			<td><input type="text" id="deliverybegin" name="deliverybegin" value="<?php echo date('j-M-Y', $project['deliverybegin']);?>" readonly="readonly"> 
95
+			<td><input type="text" id="deliverybegin" name="deliverybegin" value="<?php echo date('j-M-Y', $project['deliverybegin']); ?>" readonly="readonly"> 
96 96
 				&nbsp;&nbsp; Until :&nbsp;&nbsp;
97
-				<input type="text" id="deliveryend" name="deliveryend" value="<?php echo date('j-M-Y', $project['deliveryend']);?>" readonly="readonly"> 
97
+				<input type="text" id="deliveryend" name="deliveryend" value="<?php echo date('j-M-Y', $project['deliveryend']); ?>" readonly="readonly"> 
98 98
 			</td>
99 99
 		</tr>
100 100
 	</table><br/>
101 101
 	<table class="formtable">
102 102
 		<tr align="left">
103 103
 			<td width="100"> Install Date : </td>
104
-			<td><input type="text" id="installbegin" name="installbegin" value="<?php echo date('j-M-Y', $project['installbegin']);?>" readonly="readonly"> 
104
+			<td><input type="text" id="installbegin" name="installbegin" value="<?php echo date('j-M-Y', $project['installbegin']); ?>" readonly="readonly"> 
105 105
 				&nbsp;&nbsp; Until :&nbsp;&nbsp;
106
-				<input type="text" id="installend" name="installend" value="<?php echo date('j-M-Y', $project['installend']);?>" readonly="readonly"> 
106
+				<input type="text" id="installend" name="installend" value="<?php echo date('j-M-Y', $project['installend']); ?>" readonly="readonly"> 
107 107
 			</td>
108 108
 		</tr>
109 109
 	</table><br/>
110 110
 	<table class="formtable">
111 111
 		<tr align="left">
112 112
 			<td width="100"> UAT Date : </td>
113
-			<td><input type="text" id="uatbegin" name="uatbegin" value="<?php echo date('j-M-Y', $project['uatbegin']);?>" readonly="readonly"> 
113
+			<td><input type="text" id="uatbegin" name="uatbegin" value="<?php echo date('j-M-Y', $project['uatbegin']); ?>" readonly="readonly"> 
114 114
 				&nbsp;&nbsp; Until :&nbsp;&nbsp;
115
-				<input type="text" id="uatend" name="uatend" value="<?php echo date('j-M-Y', $project['uatend']);?>" readonly="readonly">
115
+				<input type="text" id="uatend" name="uatend" value="<?php echo date('j-M-Y', $project['uatend']); ?>" readonly="readonly">
116 116
 			</td>
117 117
 		</tr>
118 118
 	</table><br/>
119 119
 	<table class="formtable">
120 120
 		<tr align="left">
121 121
 			<td width="100"> Bill Date : </td>
122
-			<td><input type="text" id="billstartdate" name="billstartdate" value="<?php echo date('j-M-Y', $project['billstartdate']);?>" readonly="readonly"> 
122
+			<td><input type="text" id="billstartdate" name="billstartdate" value="<?php echo date('j-M-Y', $project['billstartdate']); ?>" readonly="readonly"> 
123 123
 				&nbsp;&nbsp; Until :&nbsp;&nbsp;
124
-				<input type="text" id="billduedate" name="billduedate" value="<?php echo date('j-M-Y', $project['billduedate']);?>" readonly="readonly">
124
+				<input type="text" id="billduedate" name="billduedate" value="<?php echo date('j-M-Y', $project['billduedate']); ?>" readonly="readonly">
125 125
 			</td>
126 126
 		</tr>
127 127
 	</table><br/>
@@ -141,7 +141,7 @@  discard block
 block discarded – undo
141 141
 	<table class="formtable">
142 142
 		<tr>
143 143
 			<td width="100">Contract Start Date : </td>
144
-			<td><input type="text" id="contractstartdate" name="contractstartdate" value="<?php echo date('j-M-Y', $project['contractstartdate']);?>" readonly="readonly"> 
144
+			<td><input type="text" id="contractstartdate" name="contractstartdate" value="<?php echo date('j-M-Y', $project['contractstartdate']); ?>" readonly="readonly"> 
145 145
 				&nbsp;&nbsp; Contract Period : &nbsp;&nbsp; 
146 146
 				<select name="contractperiod">
147 147
 				<option value='<?php echo $project['contractperiod']; ?>' selected="selected"> <?php echo $project['contractperiod']; ?> </option>
@@ -164,8 +164,8 @@  discard block
 block discarded – undo
164 164
 	</form>
165 165
 
166 166
 	<?php 
167
-	if(empty($errors) === false){
168
-		echo '<p class=errormsg>' . implode('</p><p class=errormsg>', $errors) . '</p>';
167
+	if (empty($errors) === false) {
168
+		echo '<p class=errormsg>'.implode('</p><p class=errormsg>', $errors).'</p>';
169 169
 	}
170 170
 	?>
171 171
 </body>
Please login to merge, or discard this patch.
projectadd.php 1 patch
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -4,27 +4,27 @@  discard block
 block discarded – undo
4 4
 require 'core/init.php';
5 5
 $general->logged_out_protect();
6 6
 if (isset($_POST['submit']))
7
-{	$projectname 	= $_POST['projectname'];
8
-	$idcustomer 	= $_POST['idcustomer'];
7
+{	$projectname = $_POST['projectname'];
8
+	$idcustomer = $_POST['idcustomer'];
9 9
 	
10
-	$deliverybegin 	= strtotime($_POST['deliverybegin']);
11
-	$deliveryend 	= strtotime($_POST['deliveryend']);
10
+	$deliverybegin = strtotime($_POST['deliverybegin']);
11
+	$deliveryend = strtotime($_POST['deliveryend']);
12 12
 	
13
-	$installbegin 	= strtotime($_POST['installbegin']);
14
-	$installend 	= strtotime($_POST['installend']);
13
+	$installbegin = strtotime($_POST['installbegin']);
14
+	$installend = strtotime($_POST['installend']);
15 15
 
16
-	$uatbegin 	= strtotime($_POST['uatbegin']);
17
-	$uatend 	= strtotime($_POST['uatend']);
16
+	$uatbegin = strtotime($_POST['uatbegin']);
17
+	$uatend = strtotime($_POST['uatend']);
18 18
 	
19 19
 	$billstartdate 	= strtotime($_POST['billstartdate']);
20
-	$billduedate 	= strtotime($_POST['billduedate']);
20
+	$billduedate = strtotime($_POST['billduedate']);
21 21
 	
22 22
 	$warrantyperiod = $_POST['warrantyperiod'];
23 23
 
24
-	$contractstartdate 	= strtotime($_POST['contractstartdate']);
24
+	$contractstartdate = strtotime($_POST['contractstartdate']);
25 25
 	$contractperiod = $_POST['contractperiod'];
26 26
 	
27
-	$projects->add_project($projectname,$idcustomer,$deliverybegin,$deliveryend,$installbegin,$installend,$uatbegin,$uatend,$billstartdate,$billduedate,$warrantyperiod,$contractstartdate,$contractperiod);
27
+	$projects->add_project($projectname, $idcustomer, $deliverybegin, $deliveryend, $installbegin, $installend, $uatbegin, $uatend, $billstartdate, $billduedate, $warrantyperiod, $contractstartdate, $contractperiod);
28 28
 	header('location: projectlist.php');
29 29
 }
30 30
 ?>
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
 				$customers = $customers->get_customers();
79 79
 				echo '<select name="idcustomer">';
80 80
 				foreach ($customers as $customerval)
81
-				{	echo '<option value=' . $customerval['idcustomer'] . '>' .  $customerval['namacustomer'] . '</option>';
81
+				{	echo '<option value='.$customerval['idcustomer'].'>'.$customerval['namacustomer'].'</option>';
82 82
 				}
83 83
 				echo '</select>';
84 84
 			?>
@@ -163,8 +163,8 @@  discard block
 block discarded – undo
163 163
 	</form>
164 164
 
165 165
 	<?php 
166
-	if(empty($errors) === false){
167
-		echo '<p class=errormsg>' . implode('</p><p class=errormsg>', $errors) . '</p>';
166
+	if (empty($errors) === false) {
167
+		echo '<p class=errormsg>'.implode('</p><p class=errormsg>', $errors).'</p>';
168 168
 	}
169 169
 	?>
170 170
 </body>
Please login to merge, or discard this patch.
hdnewsedit.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -1,18 +1,18 @@  discard block
 block discarded – undo
1 1
 <?php 
2 2
 require 'core/init.php';
3 3
 $general->logged_out_protect();
4
-$id=$_GET['id'];
5
-$thenews=$hdnews->news_data($id);
4
+$id = $_GET['id'];
5
+$thenews = $hdnews->news_data($id);
6 6
 if (isset($_POST['submit']))
7
-{	$newsdate 	= strtotime($_POST['newsdate']);
7
+{	$newsdate = strtotime($_POST['newsdate']);
8 8
 	$title 		= $_POST['title'];
9 9
 	$detail 	= $_POST['detail'];
10
-	$user 		= $users->userdata($_SESSION['loginid']);
10
+	$user = $users->userdata($_SESSION['loginid']);
11 11
 	$createdby 	= ucwords(strtolower($user['fullname']));
12 12
 	$createdon 	= strtotime(now);
13
-	$expired 	= strtotime($_POST['expireddate']);
13
+	$expired = strtotime($_POST['expireddate']);
14 14
 	
15
-	$hdnews->update_news($id,$newsdate,$title,$detail,$createdby,$createdon,$expired);
15
+	$hdnews->update_news($id, $newsdate, $title, $detail, $createdby, $createdon, $expired);
16 16
 	header('Location: hdnews.php');
17 17
 }
18 18
 ?>
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
 	<table class="formtable">
63 63
 		<tr align="left">
64 64
 			<td> News Date </td><td> : </td>
65
-			<td><input type="text" id="newsdate" name="newsdate" readonly="readonly" value="<?php echo date('d-M-Y',$thenews['newsdate']); ?>">
65
+			<td><input type="text" id="newsdate" name="newsdate" readonly="readonly" value="<?php echo date('d-M-Y', $thenews['newsdate']); ?>">
66 66
 			</td>
67 67
 		</tr>
68 68
 		<tr align="left">
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
 		</tr>
76 76
 		<tr align="left">
77 77
 			<td> News Expired Date</td><td> : </td>
78
-			<td><input type="text" id="expireddate" name="expireddate" readonly="readonly" value="<?php echo date('d-M-Y',$thenews['expired']); ?>">
78
+			<td><input type="text" id="expireddate" name="expireddate" readonly="readonly" value="<?php echo date('d-M-Y', $thenews['expired']); ?>">
79 79
 			</td>
80 80
 		</tr>
81 81
 		<tr align="left">
@@ -91,8 +91,8 @@  discard block
 block discarded – undo
91 91
 	</form>
92 92
 
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.
emaillog.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -2,9 +2,9 @@
 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
-$logs 	= $emails->get_email();
7
+$logs = $emails->get_email();
8 8
 ?>
9 9
 <!DOCTYPE HTML>
10 10
 <html>
Please login to merge, or discard this patch.
hdnewsadd.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -3,15 +3,15 @@  discard block
 block discarded – undo
3 3
 $general->logged_out_protect();
4 4
 
5 5
 if (isset($_POST['submit']))
6
-{	$newsdate 	= strtotime($_POST['newsdate']);
6
+{	$newsdate = strtotime($_POST['newsdate']);
7 7
 	$title 		= $_POST['title'];
8 8
 	$detail 	= $_POST['detail'];
9
-	$user 		= $users->userdata($_SESSION['loginid']);
9
+	$user = $users->userdata($_SESSION['loginid']);
10 10
 	$createdby 	= ucwords(strtolower($user['fullname']));
11 11
 	$createdon 	= strtotime(now);
12
-	$expired 	= strtotime($_POST['expireddate']);
12
+	$expired = strtotime($_POST['expireddate']);
13 13
 	
14
-	$hdnews->add_news($newsdate,$title,$detail,$createdby,$createdon,$expired);
14
+	$hdnews->add_news($newsdate, $title, $detail, $createdby, $createdon, $expired);
15 15
 	header('Location: hdnews.php');
16 16
 }
17 17
 ?>
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
 	<table class="formtable">
62 62
 		<tr align="left">
63 63
 			<td> News Date </td><td> : </td>
64
-			<td><input type="text" id="newsdate" name="newsdate" readonly="readonly" value="<?php echo date('d-M-Y',time()); ?>">
64
+			<td><input type="text" id="newsdate" name="newsdate" readonly="readonly" value="<?php echo date('d-M-Y', time()); ?>">
65 65
 			</td>
66 66
 		</tr>
67 67
 		<tr align="left">
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
 		</tr>
75 75
 		<tr align="left">
76 76
 			<td> News Expired Date</td><td> : </td>
77
-			<td><input type="text" id="expireddate" name="expireddate" readonly="readonly" value="<?php echo date('d-M-Y',time()); ?>">
77
+			<td><input type="text" id="expireddate" name="expireddate" readonly="readonly" value="<?php echo date('d-M-Y', time()); ?>">
78 78
 			</td>
79 79
 		</tr>
80 80
 		<tr align="left">
@@ -90,8 +90,8 @@  discard block
 block discarded – undo
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>';
93
+	if (empty($errors) === false) {
94
+		echo '<p class=errormsg>'.implode('</p><p class=errormsg>', $errors).'</p>';
95 95
 	}
96 96
 	?>
97 97
 </body>
Please login to merge, or discard this patch.