@@ -9,14 +9,13 @@ |
||
| 9 | 9 | $errors[] = 'Sorry, but we need your username and password.'; |
| 10 | 10 | } else if ($users->user_exists($username) === false) { |
| 11 | 11 | $errors[] = 'Sorry, that username doesn\'t exists. Please try again.'; |
| 12 | - } |
|
| 13 | - else |
|
| 12 | + } else |
|
| 14 | 13 | { $login = $users->login($username, $password); |
| 15 | 14 | if ($login === false) { |
| 16 | 15 | $errors[] = 'Sorry, that username/password is invalid. Please try again.'; |
| 17 | - }else if (!$users->email_confirmed($username)){ |
|
| 16 | + } else if (!$users->email_confirmed($username)){ |
|
| 18 | 17 | $errors[] = 'Sorry, your account is locked. Please contact Administrator.'; |
| 19 | - }else { |
|
| 18 | + } else { |
|
| 20 | 19 | $_SESSION['loginid'] = $login; |
| 21 | 20 | $users->log_users($login,'Login to Helpdesk System'); |
| 22 | 21 | echo $login; |
@@ -46,8 +46,7 @@ |
||
| 46 | 46 | $tickets->update_ticket($id,$sla,$reporteddate,$reportedby,$telp,$email,$problemsummary,$problemdetail,$ticketstatus,$assignee,$assigneddate,$pendingby, $pendingdate, $resolution,$resolvedby,$resolveddate,$closedby,$closeddate); |
| 47 | 47 | $tickets->log_tickets($id,$sla,$reporteddate,$reportedby,$telp,$email,$problemsummary,$problemdetail,$ticketstatus,$assignee,$assigneddate,$pendingby, $pendingdate, $resolution,$resolvedby,$resolveddate,$closedby,$closeddate,$changes,$changeby); |
| 48 | 48 | if ($user['level'] == "Admin") |
| 49 | - { header('Location: ticketlist.php');}
|
|
| 50 | - else |
|
| 49 | + { header('Location: ticketlist.php');} else
|
|
| 51 | 50 | { header('Location: myticketbyassignee.php');}
|
| 52 | 51 | } |
| 53 | 52 | ?> |
@@ -13,7 +13,7 @@ discard block |
||
| 13 | 13 | $query->bindValue(6, $expired); |
| 14 | 14 | try{
|
| 15 | 15 | $query->execute(); |
| 16 | - }catch(PDOException $e){
|
|
| 16 | + } catch(PDOException $e){
|
|
| 17 | 17 | die($e->getMessage()); |
| 18 | 18 | } |
| 19 | 19 | } |
@@ -28,8 +28,7 @@ discard block |
||
| 28 | 28 | $query->bindValue(7, $id); |
| 29 | 29 | try{
|
| 30 | 30 | $query->execute(); |
| 31 | - } |
|
| 32 | - catch(PDOException $e){
|
|
| 31 | + } catch(PDOException $e){
|
|
| 33 | 32 | die($e->getMessage()); |
| 34 | 33 | } |
| 35 | 34 | } |
@@ -39,8 +38,7 @@ discard block |
||
| 39 | 38 | $query->bindValue(1, $id); |
| 40 | 39 | try{
|
| 41 | 40 | $query->execute(); |
| 42 | - } |
|
| 43 | - catch(PDOException $e){
|
|
| 41 | + } catch(PDOException $e){
|
|
| 44 | 42 | die($e->getMessage()); |
| 45 | 43 | } |
| 46 | 44 | } |
@@ -59,7 +57,7 @@ discard block |
||
| 59 | 57 | { $query = $this->db->prepare("SELECT * FROM `news` ORDER BY `newsdate` ASC");
|
| 60 | 58 | try{
|
| 61 | 59 | $query->execute(); |
| 62 | - }catch(PDOException $e){
|
|
| 60 | + } catch(PDOException $e){
|
|
| 63 | 61 | die($e->getMessage()); |
| 64 | 62 | } |
| 65 | 63 | return $query->fetchAll(); |
@@ -68,7 +66,7 @@ discard block |
||
| 68 | 66 | { $query = $this->db->prepare("SELECT * FROM `news` WHERE UNIX_TIMESTAMP( curdate( ) ) < `expired` ORDER BY `newsdate` ASC");
|
| 69 | 67 | try{
|
| 70 | 68 | $query->execute(); |
| 71 | - }catch(PDOException $e){
|
|
| 69 | + } catch(PDOException $e){
|
|
| 72 | 70 | die($e->getMessage()); |
| 73 | 71 | } |
| 74 | 72 | return $query->fetchAll(); |
@@ -17,7 +17,7 @@ discard block |
||
| 17 | 17 | $query->bindValue(8, $emailstatus); |
| 18 | 18 | try{
|
| 19 | 19 | $query->execute(); |
| 20 | - }catch(PDOException $e){
|
|
| 20 | + } catch(PDOException $e){
|
|
| 21 | 21 | die($e->getMessage()); |
| 22 | 22 | } |
| 23 | 23 | } |
@@ -42,7 +42,7 @@ discard block |
||
| 42 | 42 | $query->bindValue(8, 'SLA Remainder'); |
| 43 | 43 | try{
|
| 44 | 44 | $query->execute(); |
| 45 | - }catch(PDOException $e){
|
|
| 45 | + } catch(PDOException $e){
|
|
| 46 | 46 | die($e->getMessage()); |
| 47 | 47 | } |
| 48 | 48 | } |
@@ -53,8 +53,7 @@ discard block |
||
| 53 | 53 | $query->bindValue(2, $idemail); |
| 54 | 54 | try{
|
| 55 | 55 | $query->execute(); |
| 56 | - } |
|
| 57 | - catch(PDOException $e){
|
|
| 56 | + } catch(PDOException $e){
|
|
| 58 | 57 | die($e->getMessage()); |
| 59 | 58 | } |
| 60 | 59 | |
@@ -65,8 +64,7 @@ discard block |
||
| 65 | 64 | $query->bindValue(1, $idemail); |
| 66 | 65 | try{
|
| 67 | 66 | $query->execute(); |
| 68 | - } |
|
| 69 | - catch(PDOException $e){
|
|
| 67 | + } catch(PDOException $e){
|
|
| 70 | 68 | die($e->getMessage()); |
| 71 | 69 | } |
| 72 | 70 | } |
@@ -95,7 +93,7 @@ discard block |
||
| 95 | 93 | $query->bindValue(1, $emailstatus); |
| 96 | 94 | try{
|
| 97 | 95 | $query->execute(); |
| 98 | - }catch(PDOException $e){
|
|
| 96 | + } catch(PDOException $e){
|
|
| 99 | 97 | die($e->getMessage()); |
| 100 | 98 | } |
| 101 | 99 | return $query->fetchAll(); |
@@ -105,7 +103,7 @@ discard block |
||
| 105 | 103 | $query->bindValue(1,'SLA Remainder'); |
| 106 | 104 | try{
|
| 107 | 105 | $query->execute(); |
| 108 | - }catch(PDOException $e){
|
|
| 106 | + } catch(PDOException $e){
|
|
| 109 | 107 | die($e->getMessage()); |
| 110 | 108 | } |
| 111 | 109 | return $query->fetchAll(); |
@@ -114,7 +112,7 @@ discard block |
||
| 114 | 112 | { $query = $this->db->prepare("SELECT * FROM `log_emails` ORDER BY `idemail` ASC");
|
| 115 | 113 | try{
|
| 116 | 114 | $query->execute(); |
| 117 | - }catch(PDOException $e){
|
|
| 115 | + } catch(PDOException $e){
|
|
| 118 | 116 | die($e->getMessage()); |
| 119 | 117 | } |
| 120 | 118 | return $query->fetchAll(); |
@@ -123,7 +121,7 @@ discard block |
||
| 123 | 121 | { $query = $this->db->prepare("SELECT * FROM `log_emails` WHERE `emailstatus` <> 'Sent' AND senddate <= UNIX_TIMESTAMP(NOW()) ORDER BY `senddate` ASC");
|
| 124 | 122 | try{
|
| 125 | 123 | $query->execute(); |
| 126 | - }catch(PDOException $e){
|
|
| 124 | + } catch(PDOException $e){
|
|
| 127 | 125 | die($e->getMessage()); |
| 128 | 126 | } |
| 129 | 127 | return $query->fetchAll(); |
@@ -145,8 +143,7 @@ discard block |
||
| 145 | 143 | $WshShell = new COM("WScript.Shell");
|
| 146 | 144 | $oExec = $WshShell->Run("cmd /C $cmd", 0, false);
|
| 147 | 145 | return $oExec == 0 ? true : false; |
| 148 | - } |
|
| 149 | - else {
|
|
| 146 | + } else {
|
|
| 150 | 147 | $cmd = "php /batch/sendnewticket.bat"; |
| 151 | 148 | exec($cmd . " > /dev/null &"); |
| 152 | 149 | } |
@@ -158,8 +155,7 @@ discard block |
||
| 158 | 155 | $WshShell = new COM("WScript.Shell");
|
| 159 | 156 | $oExec = $WshShell->Run("cmd /C $cmd", 0, false);
|
| 160 | 157 | return $oExec == 0 ? true : false; |
| 161 | - } |
|
| 162 | - else {
|
|
| 158 | + } else {
|
|
| 163 | 159 | $cmd = "php /batch/sendslaremainder.bat"; |
| 164 | 160 | exec($cmd . " > /dev/null &"); |
| 165 | 161 | } |
@@ -12,7 +12,7 @@ discard block |
||
| 12 | 12 | $rows = $query->fetchColumn(); |
| 13 | 13 | if($rows == 1){
|
| 14 | 14 | return true; |
| 15 | - }else{
|
|
| 15 | + } else{
|
|
| 16 | 16 | return false; |
| 17 | 17 | } |
| 18 | 18 | } catch (PDOException $e){
|
@@ -39,7 +39,7 @@ discard block |
||
| 39 | 39 | $query->bindValue(13, $pro); |
| 40 | 40 | try{
|
| 41 | 41 | $query->execute(); |
| 42 | - }catch(PDOException $e){
|
|
| 42 | + } catch(PDOException $e){
|
|
| 43 | 43 | die($e->getMessage()); |
| 44 | 44 | } |
| 45 | 45 | } |
@@ -66,8 +66,7 @@ discard block |
||
| 66 | 66 | $query->bindValue(18, $id); |
| 67 | 67 | try{
|
| 68 | 68 | $query->execute(); |
| 69 | - } |
|
| 70 | - catch(PDOException $e){
|
|
| 69 | + } catch(PDOException $e){
|
|
| 71 | 70 | die($e->getMessage()); |
| 72 | 71 | } |
| 73 | 72 | } |
@@ -77,8 +76,7 @@ discard block |
||
| 77 | 76 | $query->bindValue(1, $id); |
| 78 | 77 | try{
|
| 79 | 78 | $query->execute(); |
| 80 | - } |
|
| 81 | - catch(PDOException $e){
|
|
| 79 | + } catch(PDOException $e){
|
|
| 82 | 80 | die($e->getMessage()); |
| 83 | 81 | } |
| 84 | 82 | } |
@@ -96,7 +94,7 @@ discard block |
||
| 96 | 94 | { $query = $this->db->prepare("SELECT * FROM `tickets` ORDER BY `ticketnumber` DESC");
|
| 97 | 95 | try{
|
| 98 | 96 | $query->execute(); |
| 99 | - }catch(PDOException $e){
|
|
| 97 | + } catch(PDOException $e){
|
|
| 100 | 98 | die($e->getMessage()); |
| 101 | 99 | } |
| 102 | 100 | return $query->fetchAll(); |
@@ -105,7 +103,7 @@ discard block |
||
| 105 | 103 | { $query = $this->db->prepare("SELECT pro FROM `tickets`");
|
| 106 | 104 | try{
|
| 107 | 105 | $query->execute(); |
| 108 | - }catch(PDOException $e){
|
|
| 106 | + } catch(PDOException $e){
|
|
| 109 | 107 | die($e->getMessage()); |
| 110 | 108 | } |
| 111 | 109 | return $query->fetchAll(); |
@@ -114,7 +112,7 @@ discard block |
||
| 114 | 112 | { $query = $this->db->prepare("SELECT * FROM `tickets` WHERE `ticketstatus` <> 'Closed' ORDER BY `ticketnumber` DESC");
|
| 115 | 113 | try{
|
| 116 | 114 | $query->execute(); |
| 117 | - }catch(PDOException $e){
|
|
| 115 | + } catch(PDOException $e){
|
|
| 118 | 116 | die($e->getMessage()); |
| 119 | 117 | } |
| 120 | 118 | return $query->fetchAll(); |
@@ -124,7 +122,7 @@ discard block |
||
| 124 | 122 | $query->bindValue(1, $userid); |
| 125 | 123 | try{
|
| 126 | 124 | $query->execute(); |
| 127 | - }catch(PDOException $e){
|
|
| 125 | + } catch(PDOException $e){
|
|
| 128 | 126 | die($e->getMessage()); |
| 129 | 127 | } |
| 130 | 128 | return $query->fetchAll(); |
@@ -134,7 +132,7 @@ discard block |
||
| 134 | 132 | $query->bindValue(1, $userid); |
| 135 | 133 | try{
|
| 136 | 134 | $query->execute(); |
| 137 | - }catch(PDOException $e){
|
|
| 135 | + } catch(PDOException $e){
|
|
| 138 | 136 | die($e->getMessage()); |
| 139 | 137 | } |
| 140 | 138 | return $query->fetchAll(); |
@@ -144,7 +142,7 @@ discard block |
||
| 144 | 142 | $query->bindValue(1, $username); |
| 145 | 143 | try{
|
| 146 | 144 | $query->execute(); |
| 147 | - }catch(PDOException $e){
|
|
| 145 | + } catch(PDOException $e){
|
|
| 148 | 146 | die($e->getMessage()); |
| 149 | 147 | } |
| 150 | 148 | return $query->fetchAll(); |
@@ -155,7 +153,7 @@ discard block |
||
| 155 | 153 | $query->bindValue(2, 'Closed'); |
| 156 | 154 | try{
|
| 157 | 155 | $query->execute(); |
| 158 | - }catch(PDOException $e){
|
|
| 156 | + } catch(PDOException $e){
|
|
| 159 | 157 | die($e->getMessage()); |
| 160 | 158 | } |
| 161 | 159 | return $query->fetchAll(); |
@@ -165,7 +163,7 @@ discard block |
||
| 165 | 163 | $query->bindValue(1, $ticketstatus); |
| 166 | 164 | try{
|
| 167 | 165 | $query->execute(); |
| 168 | - }catch(PDOException $e){
|
|
| 166 | + } catch(PDOException $e){
|
|
| 169 | 167 | die($e->getMessage()); |
| 170 | 168 | } |
| 171 | 169 | return $query->fetchAll(); |
@@ -176,7 +174,7 @@ discard block |
||
| 176 | 174 | $query->bindValue(2, $toperiod); |
| 177 | 175 | try{
|
| 178 | 176 | $query->execute(); |
| 179 | - }catch(PDOException $e){
|
|
| 177 | + } catch(PDOException $e){
|
|
| 180 | 178 | die($e->getMessage()); |
| 181 | 179 | } |
| 182 | 180 | return $query->fetchAll(); |
@@ -185,7 +183,7 @@ discard block |
||
| 185 | 183 | { $query = $this->db->prepare("SELECT `idcustomer`, count(*) as `total` FROM `tickets` GROUP BY `idcustomer` ORDER BY total DESC LIMIT 5");
|
| 186 | 184 | try{
|
| 187 | 185 | $query->execute(); |
| 188 | - }catch(PDOException $e){
|
|
| 186 | + } catch(PDOException $e){
|
|
| 189 | 187 | die($e->getMessage()); |
| 190 | 188 | } |
| 191 | 189 | return $query->fetchAll(); |
@@ -194,7 +192,7 @@ discard block |
||
| 194 | 192 | { $query = $this->db->prepare("SELECT ticketstatus, count(*) as total FROM `tickets` GROUP BY ticketstatus");
|
| 195 | 193 | try{
|
| 196 | 194 | $query->execute(); |
| 197 | - }catch(PDOException $e){
|
|
| 195 | + } catch(PDOException $e){
|
|
| 198 | 196 | die($e->getMessage()); |
| 199 | 197 | } |
| 200 | 198 | return $query->fetchAll(); |
@@ -204,7 +202,7 @@ discard block |
||
| 204 | 202 | $query = $this->db->prepare($sql); |
| 205 | 203 | try{
|
| 206 | 204 | $query->execute(); |
| 207 | - }catch(PDOException $e){
|
|
| 205 | + } catch(PDOException $e){
|
|
| 208 | 206 | die($e->getMessage()); |
| 209 | 207 | } |
| 210 | 208 | return $query->fetchAll(); |
@@ -214,7 +212,7 @@ discard block |
||
| 214 | 212 | $query = $this->db->prepare($sql); |
| 215 | 213 | try{
|
| 216 | 214 | $query->execute(); |
| 217 | - }catch(PDOException $e){
|
|
| 215 | + } catch(PDOException $e){
|
|
| 218 | 216 | die($e->getMessage()); |
| 219 | 217 | } |
| 220 | 218 | return $query->fetchAll(); |
@@ -267,7 +265,7 @@ discard block |
||
| 267 | 265 | $query->bindValue(21, $changedate); |
| 268 | 266 | try{
|
| 269 | 267 | $query->execute(); |
| 270 | - }catch(PDOException $e){
|
|
| 268 | + } catch(PDOException $e){
|
|
| 271 | 269 | die($e->getMessage()); |
| 272 | 270 | } |
| 273 | 271 | } |
@@ -276,7 +274,7 @@ discard block |
||
| 276 | 274 | $query->bindValue(1, $id); |
| 277 | 275 | try{
|
| 278 | 276 | $query->execute(); |
| 279 | - }catch(PDOException $e){
|
|
| 277 | + } catch(PDOException $e){
|
|
| 280 | 278 | die($e->getMessage()); |
| 281 | 279 | } |
| 282 | 280 | return $query->fetchAll(); |
@@ -11,7 +11,7 @@ discard block |
||
| 11 | 11 | $rows = $query->fetchColumn(); |
| 12 | 12 | if($rows == 1){
|
| 13 | 13 | return true; |
| 14 | - }else{
|
|
| 14 | + } else{
|
|
| 15 | 15 | return false; |
| 16 | 16 | } |
| 17 | 17 | } catch (PDOException $e){
|
@@ -28,7 +28,7 @@ discard block |
||
| 28 | 28 | $query->bindValue(5, $slawarning); |
| 29 | 29 | try{
|
| 30 | 30 | $query->execute(); |
| 31 | - }catch(PDOException $e){
|
|
| 31 | + } catch(PDOException $e){
|
|
| 32 | 32 | die($e->getMessage()); |
| 33 | 33 | } |
| 34 | 34 | } |
@@ -42,8 +42,7 @@ discard block |
||
| 42 | 42 | $query->bindValue(5, $slaid); |
| 43 | 43 | try{
|
| 44 | 44 | $query->execute(); |
| 45 | - } |
|
| 46 | - catch(PDOException $e){
|
|
| 45 | + } catch(PDOException $e){
|
|
| 47 | 46 | die($e->getMessage()); |
| 48 | 47 | } |
| 49 | 48 | |
@@ -54,8 +53,7 @@ discard block |
||
| 54 | 53 | $query->bindValue(1, $id); |
| 55 | 54 | try{
|
| 56 | 55 | $query->execute(); |
| 57 | - } |
|
| 58 | - catch(PDOException $e){
|
|
| 56 | + } catch(PDOException $e){
|
|
| 59 | 57 | die($e->getMessage()); |
| 60 | 58 | } |
| 61 | 59 | } |
@@ -73,7 +71,7 @@ discard block |
||
| 73 | 71 | { $query = $this->db->prepare("SELECT * FROM `sla` ORDER BY `slaid` ASC");
|
| 74 | 72 | try{
|
| 75 | 73 | $query->execute(); |
| 76 | - }catch(PDOException $e){
|
|
| 74 | + } catch(PDOException $e){
|
|
| 77 | 75 | die($e->getMessage()); |
| 78 | 76 | } |
| 79 | 77 | return $query->fetchAll(); |
@@ -11,7 +11,7 @@ discard block |
||
| 11 | 11 | $rows = $query->fetchColumn(); |
| 12 | 12 | if($rows == 1){
|
| 13 | 13 | return true; |
| 14 | - }else{
|
|
| 14 | + } else{
|
|
| 15 | 15 | return false; |
| 16 | 16 | } |
| 17 | 17 | } catch (PDOException $e){
|
@@ -27,7 +27,7 @@ discard block |
||
| 27 | 27 | $rows = $query->fetchColumn(); |
| 28 | 28 | if($rows == 1){
|
| 29 | 29 | return true; |
| 30 | - }else{
|
|
| 30 | + } else{
|
|
| 31 | 31 | return false; |
| 32 | 32 | } |
| 33 | 33 | } catch (PDOException $e){
|
@@ -49,7 +49,7 @@ discard block |
||
| 49 | 49 | $query->bindValue(9, $ip); |
| 50 | 50 | try{
|
| 51 | 51 | $query->execute(); |
| 52 | - }catch(PDOException $e){
|
|
| 52 | + } catch(PDOException $e){
|
|
| 53 | 53 | die($e->getMessage()); |
| 54 | 54 | } |
| 55 | 55 | } |
@@ -69,8 +69,7 @@ discard block |
||
| 69 | 69 | $query->bindValue(10, $idcustomer); |
| 70 | 70 | try{
|
| 71 | 71 | $query->execute(); |
| 72 | - } |
|
| 73 | - catch(PDOException $e){
|
|
| 72 | + } catch(PDOException $e){
|
|
| 74 | 73 | die($e->getMessage()); |
| 75 | 74 | } |
| 76 | 75 | } |
@@ -80,8 +79,7 @@ discard block |
||
| 80 | 79 | $query->bindValue(1, $id); |
| 81 | 80 | try{
|
| 82 | 81 | $query->execute(); |
| 83 | - } |
|
| 84 | - catch(PDOException $e){
|
|
| 82 | + } catch(PDOException $e){
|
|
| 85 | 83 | die($e->getMessage()); |
| 86 | 84 | } |
| 87 | 85 | } |
@@ -100,7 +98,7 @@ discard block |
||
| 100 | 98 | $query_2->bindValue(2, $email); |
| 101 | 99 | $query_2->execute(); |
| 102 | 100 | return true; |
| 103 | - }else{
|
|
| 101 | + } else{
|
|
| 104 | 102 | return false; |
| 105 | 103 | } |
| 106 | 104 | } catch(PDOException $e){
|
@@ -117,7 +115,7 @@ discard block |
||
| 117 | 115 | $rows = $query->fetchColumn(); |
| 118 | 116 | if($rows == 1){
|
| 119 | 117 | return true; |
| 120 | - }else{
|
|
| 118 | + } else{
|
|
| 121 | 119 | return false; |
| 122 | 120 | } |
| 123 | 121 | } catch(PDOException $e){
|
@@ -134,10 +132,10 @@ discard block |
||
| 134 | 132 | $id = $data['id']; |
| 135 | 133 | if($stored_password === sha1($password)){
|
| 136 | 134 | return $id; |
| 137 | - }else{
|
|
| 135 | + } else{
|
|
| 138 | 136 | return false; |
| 139 | 137 | } |
| 140 | - }catch(PDOException $e){
|
|
| 138 | + } catch(PDOException $e){
|
|
| 141 | 139 | die($e->getMessage()); |
| 142 | 140 | } |
| 143 | 141 | } |
@@ -155,7 +153,7 @@ discard block |
||
| 155 | 153 | { $query = $this->db->prepare("SELECT * FROM `customers` ORDER BY `namacustomer` ASC");
|
| 156 | 154 | try{
|
| 157 | 155 | $query->execute(); |
| 158 | - }catch(PDOException $e){
|
|
| 156 | + } catch(PDOException $e){
|
|
| 159 | 157 | die($e->getMessage()); |
| 160 | 158 | } |
| 161 | 159 | return $query->fetchAll(); |
@@ -19,7 +19,7 @@ |
||
| 19 | 19 | { $query = $this->db->prepare("SELECT * FROM `sla` ORDER BY `slaid` ASC");
|
| 20 | 20 | try{
|
| 21 | 21 | $query->execute(); |
| 22 | - }catch(PDOException $e){
|
|
| 22 | + } catch(PDOException $e){
|
|
| 23 | 23 | die($e->getMessage()); |
| 24 | 24 | } |
| 25 | 25 | return $query->fetchAll(); |
@@ -11,7 +11,7 @@ discard block |
||
| 11 | 11 | $rows = $query->fetchColumn(); |
| 12 | 12 | if($rows == 1){
|
| 13 | 13 | return true; |
| 14 | - }else{
|
|
| 14 | + } else{
|
|
| 15 | 15 | return false; |
| 16 | 16 | } |
| 17 | 17 | } catch (PDOException $e){
|
@@ -36,7 +36,7 @@ discard block |
||
| 36 | 36 | $query->bindValue(13, $contractperiod); |
| 37 | 37 | try{
|
| 38 | 38 | $query->execute(); |
| 39 | - }catch(PDOException $e){
|
|
| 39 | + } catch(PDOException $e){
|
|
| 40 | 40 | die($e->getMessage()); |
| 41 | 41 | } |
| 42 | 42 | } |
@@ -59,8 +59,7 @@ discard block |
||
| 59 | 59 | $query->bindValue(14, $projectid); |
| 60 | 60 | try{
|
| 61 | 61 | $query->execute(); |
| 62 | - } |
|
| 63 | - catch(PDOException $e){
|
|
| 62 | + } catch(PDOException $e){
|
|
| 64 | 63 | die($e->getMessage()); |
| 65 | 64 | } |
| 66 | 65 | |
@@ -71,8 +70,7 @@ discard block |
||
| 71 | 70 | $query->bindValue(1, $id); |
| 72 | 71 | try{
|
| 73 | 72 | $query->execute(); |
| 74 | - } |
|
| 75 | - catch(PDOException $e){
|
|
| 73 | + } catch(PDOException $e){
|
|
| 76 | 74 | die($e->getMessage()); |
| 77 | 75 | } |
| 78 | 76 | } |
@@ -90,7 +88,7 @@ discard block |
||
| 90 | 88 | { $query = $this->db->prepare("SELECT * FROM `projects` ORDER BY `projectid` DESC");
|
| 91 | 89 | try{
|
| 92 | 90 | $query->execute(); |
| 93 | - }catch(PDOException $e){
|
|
| 91 | + } catch(PDOException $e){
|
|
| 94 | 92 | die($e->getMessage()); |
| 95 | 93 | } |
| 96 | 94 | return $query->fetchAll(); |