@@ -53,8 +53,8 @@ |
||
| 53 | 53 | } |
| 54 | 54 | |
| 55 | 55 | // After we have inserted the data, we want to head back to the main users page |
| 56 | - header('Location: subTypes.php'); // Move to the home page of the admin section |
|
| 57 | - exit; |
|
| 56 | + header('Location: subTypes.php'); // Move to the home page of the admin section |
|
| 57 | + exit; |
|
| 58 | 58 | } |
| 59 | 59 | include 'includes/header.php'; |
| 60 | 60 | ?> |
@@ -14,7 +14,7 @@ discard block |
||
| 14 | 14 | exit; |
| 15 | 15 | } |
| 16 | 16 | if (!isAdmin()) { |
| 17 | - header('Location: error.php?no=100&page='.basename($_SERVER['SCRIPT_FILENAME'])); |
|
| 17 | + header('Location: error.php?no=100&page=' . basename($_SERVER['SCRIPT_FILENAME'])); |
|
| 18 | 18 | exit; |
| 19 | 19 | } |
| 20 | 20 | |
@@ -37,7 +37,7 @@ discard block |
||
| 37 | 37 | |
| 38 | 38 | $sql = ("INSERT INTO cr_eventSubTypes (name, description) VALUES ('$name', '$description')"); |
| 39 | 39 | if (!mysqli_query(db(), $sql)) { |
| 40 | - die('Error: '.mysqli_error(db())); |
|
| 40 | + die('Error: ' . mysqli_error(db())); |
|
| 41 | 41 | } |
| 42 | 42 | } else { |
| 43 | 43 | // Otherwise we are dealing with edits, not new stuff |
@@ -88,10 +88,10 @@ discard block |
||
| 88 | 88 | $result = mysqli_query(db(), $sql) or die(mysqli_error(db())); |
| 89 | 89 | |
| 90 | 90 | while ($row = mysqli_fetch_array($result, MYSQLI_ASSOC)) { |
| 91 | - echo '<input type="hidden" name="formindex[]" value="'.$row['id'].'" />'; |
|
| 92 | - echo "<input name='name[]' value='".$row['name']."' />"; |
|
| 91 | + echo '<input type="hidden" name="formindex[]" value="' . $row['id'] . '" />'; |
|
| 92 | + echo "<input name='name[]' value='" . $row['name'] . "' />"; |
|
| 93 | 93 | |
| 94 | - echo " <a href='subTypes.php?method=remove&subType=".$row['id']."'><i class='fa fa-times'></i></a><br />"; |
|
| 94 | + echo " <a href='subTypes.php?method=remove&subType=" . $row['id'] . "'><i class='fa fa-times'></i></a><br />"; |
|
| 95 | 95 | } ?> |
| 96 | 96 | </div><!-- /.box-body --> |
| 97 | 97 | <div class="box-footer"> |
@@ -34,11 +34,11 @@ discard block |
||
| 34 | 34 | |
| 35 | 35 | // get token |
| 36 | 36 | $response = $client->request( |
| 37 | - 'POST', |
|
| 38 | - 'v3/tokens.json', |
|
| 39 | - ['form_params' => ['api_key' => siteConfig()['recording']['locomotivecms']['apiKey'], |
|
| 40 | - 'email' => siteConfig()['recording']['locomotivecms']['email'], ]] |
|
| 41 | - ); |
|
| 37 | + 'POST', |
|
| 38 | + 'v3/tokens.json', |
|
| 39 | + ['form_params' => ['api_key' => siteConfig()['recording']['locomotivecms']['apiKey'], |
|
| 40 | + 'email' => siteConfig()['recording']['locomotivecms']['email'], ]] |
|
| 41 | + ); |
|
| 42 | 42 | if ($response->getStatusCode() == 201) { |
| 43 | 43 | $token = json_decode($response->getBody())->token; |
| 44 | 44 | } |
@@ -46,9 +46,9 @@ discard block |
||
| 46 | 46 | // test token |
| 47 | 47 | if (isset($token)) { |
| 48 | 48 | $response = $client->request( |
| 49 | - 'GET', |
|
| 50 | - 'v3/my_account.json', |
|
| 51 | - ['query' => ['auth_token' => $token]]); |
|
| 49 | + 'GET', |
|
| 50 | + 'v3/my_account.json', |
|
| 51 | + ['query' => ['auth_token' => $token]]); |
|
| 52 | 52 | var_dump($response); |
| 53 | 53 | } else { |
| 54 | 54 | echo '<p>Unable to connect to main site</p>'; |
@@ -19,7 +19,7 @@ discard block |
||
| 19 | 19 | // only load page if functionality enabled |
| 20 | 20 | if (siteConfig()['recording']['type'] != 'locomotivecms') { |
| 21 | 21 | echo '<p>This feature is not enabled</p>'; |
| 22 | - echo '<p><a href='.siteSettings()->getSiteUrl().'>< back to homepage</a></p>'; |
|
| 22 | + echo '<p><a href=' . siteSettings()->getSiteUrl() . '>< back to homepage</a></p>'; |
|
| 23 | 23 | exit; |
| 24 | 24 | } |
| 25 | 25 | |
@@ -27,7 +27,7 @@ discard block |
||
| 27 | 27 | |
| 28 | 28 | $client = new Client([ |
| 29 | 29 | // Base URI is used with relative requests |
| 30 | - 'base_uri' => siteConfig()['recording']['locomotivecms']['url'].'/locomotive/api/', |
|
| 30 | + 'base_uri' => siteConfig()['recording']['locomotivecms']['url'] . '/locomotive/api/', |
|
| 31 | 31 | // You can set any number of default request options. |
| 32 | 32 | 'timeout' => 2.0, |
| 33 | 33 | ]); |
@@ -52,6 +52,6 @@ discard block |
||
| 52 | 52 | var_dump($response); |
| 53 | 53 | } else { |
| 54 | 54 | echo '<p>Unable to connect to main site</p>'; |
| 55 | - echo '<p><a href='.siteSettings()->getSiteUrl().'>< back to homepage</a></p>'; |
|
| 55 | + echo '<p><a href=' . siteSettings()->getSiteUrl() . '>< back to homepage</a></p>'; |
|
| 56 | 56 | exit; |
| 57 | 57 | } |
@@ -53,7 +53,7 @@ |
||
| 53 | 53 | $statusMessage = 'Sent successfully'; |
| 54 | 54 | } else { |
| 55 | 55 | foreach ($sent as $errorMessage) { |
| 56 | - $statusMessage .= '<p>'.$errorMessage.'</p>'; |
|
| 56 | + $statusMessage .= '<p>' . $errorMessage . '</p>'; |
|
| 57 | 57 | } |
| 58 | 58 | } |
| 59 | 59 | |
@@ -39,18 +39,18 @@ discard block |
||
| 39 | 39 | $sql = "UPDATE cr_documents SET title = '$resourcename', description = '$resourcedescription', link = '$resourcelink' WHERE id = '$id'"; |
| 40 | 40 | |
| 41 | 41 | if (!mysqli_query(db(), $sql)) { |
| 42 | - die('Error: '.mysqli_error(db())); |
|
| 42 | + die('Error: ' . mysqli_error(db())); |
|
| 43 | 43 | } |
| 44 | 44 | } else { |
| 45 | 45 | if ($_FILES['resourcefile']['tmp_name'] == 'none') { |
| 46 | 46 | } else { |
| 47 | 47 | $filename = $_FILES['resourcefile']['name']; |
| 48 | - copy($_FILES['resourcefile']['tmp_name'], './documents/'.$_FILES['resourcefile']['name']); |
|
| 48 | + copy($_FILES['resourcefile']['tmp_name'], './documents/' . $_FILES['resourcefile']['name']); |
|
| 49 | 49 | } |
| 50 | 50 | |
| 51 | 51 | $sql = ("INSERT INTO cr_documents (title, description, url, link) VALUES ('$resourcename', '$resourcedescription', '$filename', '$resourcelink')"); |
| 52 | 52 | if (!mysqli_query(db(), $sql)) { |
| 53 | - die('Error: '.mysqli_error(db())); |
|
| 53 | + die('Error: ' . mysqli_error(db())); |
|
| 54 | 54 | } |
| 55 | 55 | // After we have inserted the data, we want to head back to the main page |
| 56 | 56 | } |
@@ -83,7 +83,7 @@ discard block |
||
| 83 | 83 | if ($action == 'new') { |
| 84 | 84 | $actionlink = 'resources.php?action=newsent'; |
| 85 | 85 | } else { |
| 86 | - $actionlink = 'resources.php?action=editsent&id='.$id; |
|
| 86 | + $actionlink = 'resources.php?action=editsent&id=' . $id; |
|
| 87 | 87 | $sql = "SELECT * FROM cr_documents WHERE id = '$id'"; |
| 88 | 88 | $result = mysqli_query(db(), $sql) or die(mysqli_error(db())); |
| 89 | 89 | |
@@ -206,7 +206,7 @@ discard block |
||
| 206 | 206 | <?php echo $Parsedown->text(htmlspecialchars($row['description'])); ?> |
| 207 | 207 | </div> |
| 208 | 208 | <div class="box-footer"> |
| 209 | - <a class="btn btn-primary" href="<?php echo ($row['url'] != '') ? 'documents/'.$row['url'] : '#' ?>">Download</a> |
|
| 209 | + <a class="btn btn-primary" href="<?php echo ($row['url'] != '') ? 'documents/' . $row['url'] : '#' ?>">Download</a> |
|
| 210 | 210 | <?php if (isAdmin()): ?> |
| 211 | 211 | <a class="btn btn-warning" href='resources.php?action=edit&id=<?php echo $resourceID; ?>'><i class='fa fa-pencil'></i> Edit</a> |
| 212 | 212 | <button type="button" class='btn btn-danger' data-toggle='modal' data-target='#deleteModal<?php echo $resourceID; ?>'><i class='fa fa-times'></i> Remove</a> |
@@ -105,7 +105,7 @@ |
||
| 105 | 105 | <label class="fa fa-lock" for="login__password"><span class="hidden">Password</span></label> |
| 106 | 106 | <input name="password" id="login__password" type="password" class="form__input" placeholder="Password" required> |
| 107 | 107 | </div> |
| 108 | - <?php if (!empty($message)): echo '<p>'.$message.'</p>'; endif; ?> |
|
| 108 | + <?php if (!empty($message)): echo '<p>' . $message . '</p>'; endif; ?> |
|
| 109 | 109 | <div class="form__field"> |
| 110 | 110 | <input type="submit" value="Sign In"> |
| 111 | 111 | </div> |
@@ -33,7 +33,7 @@ discard block |
||
| 33 | 33 | exit; |
| 34 | 34 | } |
| 35 | 35 | if (!isAdmin()) { |
| 36 | - header('Location: error.php?no=100&page='.basename($_SERVER['SCRIPT_FILENAME'])); |
|
| 36 | + header('Location: error.php?no=100&page=' . basename($_SERVER['SCRIPT_FILENAME'])); |
|
| 37 | 37 | exit; |
| 38 | 38 | } |
| 39 | 39 | |
@@ -56,7 +56,7 @@ discard block |
||
| 56 | 56 | $bandName = $_POST['bandname']; |
| 57 | 57 | $sql = ("INSERT INTO cr_bands (bandLeader) VALUES ('$bandName')"); |
| 58 | 58 | if (!mysqli_query(db(), $sql)) { |
| 59 | - die('Error: '.mysqli_error(db())); |
|
| 59 | + die('Error: ' . mysqli_error(db())); |
|
| 60 | 60 | } |
| 61 | 61 | } else { |
| 62 | 62 | $editbandID = $_GET['band']; |
@@ -64,7 +64,7 @@ discard block |
||
| 64 | 64 | |
| 65 | 65 | $sql = ("INSERT INTO cr_bandMembers (bandID, skillID) VALUES ('$editbandID', '$editskillID')"); |
| 66 | 66 | if (!mysqli_query(db(), $sql)) { |
| 67 | - die('Error: '.mysqli_error(db())); |
|
| 67 | + die('Error: ' . mysqli_error(db())); |
|
| 68 | 68 | } |
| 69 | 69 | } |
| 70 | 70 | // After we have inserted the data, we want to head back to the main page |
@@ -99,8 +99,8 @@ discard block |
||
| 99 | 99 | <div class="elementBackground"> |
| 100 | 100 | <h2><a name="section<?php echo $row['bandID']; ?>"><?php echo $row['bandLeader']; ?></a> <?php if (isAdmin()) { |
| 101 | 101 | echo " |
| 102 | - <a href='editBand.php?id=".$bandid."'><img src='graphics/tool.png' /></a> |
|
| 103 | - <a href='viewBands.php?skillremove=true&bandid=".$bandid."'><img src='graphics/close.png' /></a>"; |
|
| 102 | + <a href='editBand.php?id=".$bandid . "'><img src='graphics/tool.png' /></a> |
|
| 103 | + <a href='viewBands.php?skillremove=true&bandid=".$bandid . "'><img src='graphics/close.png' /></a>"; |
|
| 104 | 104 | } ?></h2> |
| 105 | 105 | |
| 106 | 106 | <?php |
@@ -120,8 +120,8 @@ discard block |
||
| 120 | 120 | while ($rowskills = mysqli_fetch_array($resultskills, MYSQLI_ASSOC)) { |
| 121 | 121 | $bandMembersID = $bandMember['bandMembersID']; |
| 122 | 122 | $sqlusers = ''; |
| 123 | - echo '<strong>'.$rowskills['name'].'</strong> '; |
|
| 124 | - echo '<em> '.$rowskills['skill'].'</em>'." <a href='viewBands.php?skillremove=true&bandMembersID=".$bandMembersID."'><img src='graphics/close.png' /></a><br />"; |
|
| 123 | + echo '<strong>' . $rowskills['name'] . '</strong> '; |
|
| 124 | + echo '<em> ' . $rowskills['skill'] . '</em>' . " <a href='viewBands.php?skillremove=true&bandMembersID=" . $bandMembersID . "'><img src='graphics/close.png' /></a><br />"; |
|
| 125 | 125 | } |
| 126 | 126 | } |
| 127 | 127 | } |
@@ -136,8 +136,8 @@ discard block |
||
| 136 | 136 | <label for="name">Add members:</label> |
| 137 | 137 | <select name="name" id="name"> |
| 138 | 138 | <?php while ($addMember = mysqli_fetch_array($resultaddMembers, MYSQLI_ASSOC)) { |
| 139 | - echo "<option value='".$addMember['skillID']."'>"; |
|
| 140 | - echo $addMember['name'].' - '.$addMember['skill']; |
|
| 139 | + echo "<option value='" . $addMember['skillID'] . "'>"; |
|
| 140 | + echo $addMember['name'] . ' - ' . $addMember['skill']; |
|
| 141 | 141 | echo '</option>'; |
| 142 | 142 | } ?> |
| 143 | 143 | </select> |
@@ -139,12 +139,12 @@ |
||
| 139 | 139 | <tbody> |
| 140 | 140 | <?php |
| 141 | 141 | $sql = "SELECT s.date,s.detail1,s.detail2,s.detail3,s.type,trim(concat(u.firstName,' ',u.lastName)) AS name FROM cr_statistics s INNER JOIN cr_users u ON u.id = s.userid"; |
| 142 | - if (!isAdmin()) { |
|
| 143 | - $sql .= 'WHERE u.ID=s.userID'; |
|
| 144 | - if (!$debug) { |
|
| 145 | - $sql .= " AND s.type = 'system'"; |
|
| 146 | - } |
|
| 147 | - } |
|
| 142 | + if (!isAdmin()) { |
|
| 143 | + $sql .= 'WHERE u.ID=s.userID'; |
|
| 144 | + if (!$debug) { |
|
| 145 | + $sql .= " AND s.type = 'system'"; |
|
| 146 | + } |
|
| 147 | + } |
|
| 148 | 148 | $sql .= ' ORDER BY date desc '.$limit; |
| 149 | 149 | $result = mysqli_query(db(), $sql) or die(mysqli_error(db())); |
| 150 | 150 | while ($row = mysqli_fetch_array($result, MYSQLI_ASSOC)) { |
@@ -14,7 +14,7 @@ discard block |
||
| 14 | 14 | exit; |
| 15 | 15 | } |
| 16 | 16 | if (!isAdmin()) { |
| 17 | - header('Location: error.php?no=100&page='.basename($_SERVER['SCRIPT_FILENAME'])); |
|
| 17 | + header('Location: error.php?no=100&page=' . basename($_SERVER['SCRIPT_FILENAME'])); |
|
| 18 | 18 | exit; |
| 19 | 19 | } |
| 20 | 20 | |
@@ -26,28 +26,28 @@ discard block |
||
| 26 | 26 | if ($method == 'truncate') { |
| 27 | 27 | $sql = "CREATE TABLE tmp_system_statistics as SELECT * from cr_statistics WHERE type='system'"; |
| 28 | 28 | if (!mysqli_query(db(), $sql)) { |
| 29 | - die('Error: '.mysqli_error(db())); |
|
| 29 | + die('Error: ' . mysqli_error(db())); |
|
| 30 | 30 | } |
| 31 | 31 | |
| 32 | 32 | $sql = ('TRUNCATE TABLE cr_statistics'); |
| 33 | 33 | if (!mysqli_query(db(), $sql)) { |
| 34 | - die('Error: '.mysqli_error(db())); |
|
| 34 | + die('Error: ' . mysqli_error(db())); |
|
| 35 | 35 | } |
| 36 | 36 | |
| 37 | 37 | $sql = ('ALTER TABLE cr_statistics AUTO_INCREMENT = 50'); |
| 38 | 38 | if (!mysqli_query(db(), $sql)) { |
| 39 | - die('Error: '.mysqli_error(db())); |
|
| 39 | + die('Error: ' . mysqli_error(db())); |
|
| 40 | 40 | } |
| 41 | 41 | |
| 42 | 42 | $sql = 'INSERT INTO cr_statistics (userid,date,type,detail1,detail2,detail3,script) '; |
| 43 | - $sql = $sql.'SELECT userid,date,type,detail1,detail2,detail3,script from tmp_system_statistics order by date'; |
|
| 43 | + $sql = $sql . 'SELECT userid,date,type,detail1,detail2,detail3,script from tmp_system_statistics order by date'; |
|
| 44 | 44 | if (!mysqli_query(db(), $sql)) { |
| 45 | - die('Error: '.mysqli_error(db())); |
|
| 45 | + die('Error: ' . mysqli_error(db())); |
|
| 46 | 46 | } |
| 47 | 47 | |
| 48 | 48 | $sql = 'DROP TABLE tmp_system_statistics'; |
| 49 | 49 | if (!mysqli_query(db(), $sql)) { |
| 50 | - die('Error: '.mysqli_error(db())); |
|
| 50 | + die('Error: ' . mysqli_error(db())); |
|
| 51 | 51 | } |
| 52 | 52 | |
| 53 | 53 | insertStatistics('system', __FILE__, 'statistics deleted'); |
@@ -103,22 +103,22 @@ discard block |
||
| 103 | 103 | <?php |
| 104 | 104 | |
| 105 | 105 | $sql = 'SELECT VERSION( ) AS mysqli_version'; |
| 106 | - $result = mysqli_query(db(), $sql) or die('MySQL-Error: '.mysqli_error(db())); |
|
| 106 | + $result = mysqli_query(db(), $sql) or die('MySQL-Error: ' . mysqli_error(db())); |
|
| 107 | 107 | $dbv = mysqli_fetch_array($result, MYSQLI_ASSOC); |
| 108 | 108 | $mysqli_version = $dbv['mysqli_version']; |
| 109 | 109 | |
| 110 | 110 | if (substr($mysqli_version, 0, 1) == 5) { |
| 111 | - $sql = "SELECT getBrowserInfo(detail3) as browser,count(*) as count from cr_statistics where detail1 like 'login%' and detail3!='' group by getBrowserInfo(detail3) order by count desc ".$browserLimit; |
|
| 111 | + $sql = "SELECT getBrowserInfo(detail3) as browser,count(*) as count from cr_statistics where detail1 like 'login%' and detail3!='' group by getBrowserInfo(detail3) order by count desc " . $browserLimit; |
|
| 112 | 112 | } else { |
| 113 | - $sql = "SELECT detail3 as browser,count(*) as count from cr_statistics where detail1 like 'login%' and detail3!='' group by detail3 order by count desc ".$browserLimit; |
|
| 113 | + $sql = "SELECT detail3 as browser,count(*) as count from cr_statistics where detail1 like 'login%' and detail3!='' group by detail3 order by count desc " . $browserLimit; |
|
| 114 | 114 | } |
| 115 | 115 | |
| 116 | 116 | $result = mysqli_query(db(), $sql) or die(mysqli_error(db())); |
| 117 | 117 | while ($row = mysqli_fetch_array($result, MYSQLI_ASSOC)) { |
| 118 | 118 | extract($row); |
| 119 | 119 | echo '<tr>'; |
| 120 | - echo '<td>'.$browser.'</td>'; |
|
| 121 | - echo '<td>'.$count.'</td>'; |
|
| 120 | + echo '<td>' . $browser . '</td>'; |
|
| 121 | + echo '<td>' . $count . '</td>'; |
|
| 122 | 122 | echo '</tr>'; |
| 123 | 123 | } ?> |
| 124 | 124 | |
@@ -145,16 +145,16 @@ discard block |
||
| 145 | 145 | $sql .= " AND s.type = 'system'"; |
| 146 | 146 | } |
| 147 | 147 | } |
| 148 | - $sql .= ' ORDER BY date desc '.$limit; |
|
| 148 | + $sql .= ' ORDER BY date desc ' . $limit; |
|
| 149 | 149 | $result = mysqli_query(db(), $sql) or die(mysqli_error(db())); |
| 150 | 150 | while ($row = mysqli_fetch_array($result, MYSQLI_ASSOC)) { |
| 151 | 151 | extract($row); |
| 152 | 152 | echo '<tr>'; |
| 153 | - echo '<td>'.$date.'</td>'; |
|
| 154 | - echo '<td>'.$name.'</td>'; |
|
| 155 | - echo '<td>'.$type.'</td>'; |
|
| 156 | - echo '<td>'.$detail1.'</td>'; |
|
| 157 | - echo '<td>'.$detail2.'</td>'; |
|
| 153 | + echo '<td>' . $date . '</td>'; |
|
| 154 | + echo '<td>' . $name . '</td>'; |
|
| 155 | + echo '<td>' . $type . '</td>'; |
|
| 156 | + echo '<td>' . $detail1 . '</td>'; |
|
| 157 | + echo '<td>' . $detail2 . '</td>'; |
|
| 158 | 158 | //echo "<td>".$detail3."</td>"; |
| 159 | 159 | echo '</tr>'; |
| 160 | 160 | } |
@@ -567,7 +567,8 @@ discard block |
||
| 567 | 567 | <?php if (!$userRole->getReserve()): ?> |
| 568 | 568 | <?php $isInEvent = in_array($userRole->getId(), $usersInEvent) ?> |
| 569 | 569 | <option value="<?php echo $userRole->getId() ?>" <?php echo $isInEvent ? 'selected="selected"' : '' ?>><?php echo $userRole->getUser()->getFirstName().' '.$userRole->getUser()->getLastName() ?></option> |
| 570 | - <?php else: ?> |
|
| 570 | + <?php else { |
|
| 571 | + : ?> |
|
| 571 | 572 | <?php $countReserve += 1 ?> |
| 572 | 573 | <?php endif //!userRole->getReserve?> |
| 573 | 574 | <?php endforeach //users?> |
@@ -646,4 +647,6 @@ discard block |
||
| 646 | 647 | </div><!-- /.createSeries --> |
| 647 | 648 | |
| 648 | 649 | |
| 649 | -<?php include 'includes/footer.php'; ?> |
|
| 650 | +<?php include 'includes/footer.php'; |
|
| 651 | +} |
|
| 652 | +?> |
|
@@ -45,7 +45,7 @@ discard block |
||
| 45 | 45 | if (($userisBandAdmin) || ($userisEventEditor) || (isAdmin())) { |
| 46 | 46 | // Just continue the code |
| 47 | 47 | } else { |
| 48 | - header('Location: error.php?no=100&page='.basename($_SERVER['SCRIPT_FILENAME'])); |
|
| 48 | + header('Location: error.php?no=100&page=' . basename($_SERVER['SCRIPT_FILENAME'])); |
|
| 49 | 49 | } |
| 50 | 50 | |
| 51 | 51 | if ($userisBandAdmin) { |
@@ -82,7 +82,7 @@ discard block |
||
| 82 | 82 | $location = $row['location']; |
| 83 | 83 | $locationname = $row['locationname']; |
| 84 | 84 | if ($action == 'edit') { |
| 85 | - $formaction = '?action=edit&id='.$id; |
|
| 85 | + $formaction = '?action=edit&id=' . $id; |
|
| 86 | 86 | } else { |
| 87 | 87 | $formaction = ''; |
| 88 | 88 | } |
@@ -139,8 +139,8 @@ discard block |
||
| 139 | 139 | |
| 140 | 140 | // convert format of date |
| 141 | 141 | $date = str_replace('/', '-', $date); // ensure it isn't read as mm/dd/yyyy |
| 142 | - $date = strftime('%Y-%m-%d', strtotime($date.' 00:00:00')); |
|
| 143 | - $date = $date.' '.$time.':00'; |
|
| 142 | + $date = strftime('%Y-%m-%d', strtotime($date . ' 00:00:00')); |
|
| 143 | + $date = $date . ' ' . $time . ':00'; |
|
| 144 | 144 | $date = mysqli_real_escape_string(db(), $date); |
| 145 | 145 | |
| 146 | 146 | if ($action == 'edit') { |
@@ -210,10 +210,10 @@ discard block |
||
| 210 | 210 | //if ($userisBandAdmin) $delete_all_sql = $delete_all_sql . " and skillID in (select skillID from cr_skills where groupid=2)"; |
| 211 | 211 | //if ($userisEventEditor) $delete_all_sql = $delete_all_sql . " and skillID in (select skillID from cr_skills where groupid!=2)"; |
| 212 | 212 | if ($userisBandAdmin) { |
| 213 | - $delete_all_sql = $delete_all_sql.' and skillID in (select skillID from cr_skills where groupid in (2,3,4))'; |
|
| 213 | + $delete_all_sql = $delete_all_sql . ' and skillID in (select skillID from cr_skills where groupid in (2,3,4))'; |
|
| 214 | 214 | } |
| 215 | 215 | if ($userisEventEditor) { |
| 216 | - $delete_all_sql = $delete_all_sql.' and skillID in (select skillID from cr_skills where not (groupid in (2,3,4)))'; |
|
| 216 | + $delete_all_sql = $delete_all_sql . ' and skillID in (select skillID from cr_skills where not (groupid in (2,3,4)))'; |
|
| 217 | 217 | } |
| 218 | 218 | mysqli_query(db(), $delete_all_sql) or die(mysqli_error(db())); |
| 219 | 219 | } |
@@ -221,9 +221,9 @@ discard block |
||
| 221 | 221 | // redirect |
| 222 | 222 | if (isset($_SESSION['lastEventsFilter'])) { |
| 223 | 223 | $type = $_SESSION['lastEventsFilter']; |
| 224 | - header('Location: events.php?view=all&filter='.$type.'#event'.$eventID); |
|
| 224 | + header('Location: events.php?view=all&filter=' . $type . '#event' . $eventID); |
|
| 225 | 225 | } else { |
| 226 | - header('Location: events.php?view=all#event'.$eventID); |
|
| 226 | + header('Location: events.php?view=all#event' . $eventID); |
|
| 227 | 227 | } |
| 228 | 228 | exit; |
| 229 | 229 | } |
@@ -300,7 +300,7 @@ discard block |
||
| 300 | 300 | while ($ob = mysqli_fetch_object($result)) { |
| 301 | 301 | if (!(isset($type) && $ob->id == $type)) { |
| 302 | 302 | $defaultTime = strftime('%H:%M', strtotime($ob->defaultTime)); |
| 303 | - echo "<option value='".$ob->id."' title='".$ob->description."' data-time='".($defaultTime == '00:00' ? '' : $defaultTime)."' data-location='".(is_null($ob->defaultLocationId) ? '' : $ob->defaultLocationId)."'>".$ob->name.'</option>'; |
|
| 303 | + echo "<option value='" . $ob->id . "' title='" . $ob->description . "' data-time='" . ($defaultTime == '00:00' ? '' : $defaultTime) . "' data-location='" . (is_null($ob->defaultLocationId) ? '' : $ob->defaultLocationId) . "'>" . $ob->name . '</option>'; |
|
| 304 | 304 | } |
| 305 | 305 | } ?> |
| 306 | 306 | </select> |
@@ -326,7 +326,7 @@ discard block |
||
| 326 | 326 | while ($row = mysqli_fetch_array($result, MYSQLI_ASSOC)) { |
| 327 | 327 | if (isset($subtype) && $row['id'] == $subtype) { |
| 328 | 328 | } else { |
| 329 | - echo "<option value='".$row['id']."' title='".$row['description']."'>".$row['name'].'</option>'; |
|
| 329 | + echo "<option value='" . $row['id'] . "' title='" . $row['description'] . "'>" . $row['name'] . '</option>'; |
|
| 330 | 330 | } |
| 331 | 331 | } ?> |
| 332 | 332 | </select> |
@@ -354,7 +354,7 @@ discard block |
||
| 354 | 354 | while ($row = mysqli_fetch_array($result, MYSQLI_ASSOC)) { |
| 355 | 355 | if (isset($location) && $row['id'] == $location) { |
| 356 | 356 | } else { |
| 357 | - echo "<option value='".$row['id']."'>".$row['name'].'</option>'; |
|
| 357 | + echo "<option value='" . $row['id'] . "'>" . $row['name'] . '</option>'; |
|
| 358 | 358 | } |
| 359 | 359 | } ?> |
| 360 | 360 | </select> |
@@ -497,7 +497,7 @@ discard block |
||
| 497 | 497 | while ($row = mysqli_fetch_array($result, MYSQLI_ASSOC)) { |
| 498 | 498 | if (isset($type) && $row['id'] == $type) { |
| 499 | 499 | } else { |
| 500 | - echo "<option value='".$row['id']."' title='".$row['description']."'>".$row['name'].'</option>'; |
|
| 500 | + echo "<option value='" . $row['id'] . "' title='" . $row['description'] . "'>" . $row['name'] . '</option>'; |
|
| 501 | 501 | } |
| 502 | 502 | } ?> |
| 503 | 503 | </select> |
@@ -567,8 +567,8 @@ discard block |
||
| 567 | 567 | <?php foreach ($role->getUserRoles() as $userRole): ?> |
| 568 | 568 | <?php if (!$userRole->getReserve()): ?> |
| 569 | 569 | <?php $isInEvent = in_array($userRole->getId(), $usersInEvent) ?> |
| 570 | - <option value="<?php echo $userRole->getId() ?>" <?php echo $isInEvent ? 'selected="selected"' : '' ?>><?php echo $userRole->getUser()->getFirstName().' '.$userRole->getUser()->getLastName() ?></option> |
|
| 571 | - <?php else: ?> |
|
| 570 | + <option value="<?php echo $userRole->getId() ?>" <?php echo $isInEvent ? 'selected="selected"' : '' ?>><?php echo $userRole->getUser()->getFirstName() . ' ' . $userRole->getUser()->getLastName() ?></option> |
|
| 571 | + <?php else : ?> |
|
| 572 | 572 | <?php $countReserve += 1 ?> |
| 573 | 573 | <?php endif //!userRole->getReserve?> |
| 574 | 574 | <?php endforeach //users?> |
@@ -578,7 +578,7 @@ discard block |
||
| 578 | 578 | <?php foreach ($role->getUserRoles() as $userRole): ?> |
| 579 | 579 | <?php if ($userRole->getReserve()): ?> |
| 580 | 580 | <?php $isInEvent = in_array($userRole->getId(), $usersInEvent) ?> |
| 581 | - <option value="<?php echo $userRole->getId() ?>" <?php echo $isInEvent ? 'selected="selected"' : '' ?>><?php echo $userRole->getUser()->getFirstName().' '.$userRole->getUser()->getLastName() ?></option> |
|
| 581 | + <option value="<?php echo $userRole->getId() ?>" <?php echo $isInEvent ? 'selected="selected"' : '' ?>><?php echo $userRole->getUser()->getFirstName() . ' ' . $userRole->getUser()->getLastName() ?></option> |
|
| 582 | 582 | <?php endif ?> |
| 583 | 583 | <?php endforeach //users?> |
| 584 | 584 | </optgroup> |
@@ -87,23 +87,23 @@ |
||
| 87 | 87 | WHERE |
| 88 | 88 | date >= CURDATE() |
| 89 | 89 | AND date_format( date , "%y-%m-%d" ) |
| 90 | - <= date_format( DATE_ADD(now(), INTERVAL '.$daysAlert.' DAY ) , "%y-%m-%d" )'; |
|
| 90 | + <= date_format( DATE_ADD(now(), INTERVAL '.$daysAlert . ' DAY ) , "%y-%m-%d" )'; |
|
| 91 | 91 | $resultEvents = mysqli_query(db(), $sqlEvents) or die(mysqli_error(db())); |
| 92 | 92 | $i = 0; |
| 93 | 93 | while ($rowEvents = mysqli_fetch_array($resultEvents, MYSQLI_ASSOC)) { |
| 94 | 94 | $usersNotified = notifyEveryoneForEvent($rowEvents['id']); |
| 95 | 95 | if (count($usersNotified) > 0) { |
| 96 | - $out = $out.'Automatic notifications sent to users ('.implode(', ', $usersNotified).') for event '.$rowEvents['id'].' on '.$rowEvents['date'].".<br>\r\n"; |
|
| 96 | + $out = $out . 'Automatic notifications sent to users (' . implode(', ', $usersNotified) . ') for event ' . $rowEvents['id'] . ' on ' . $rowEvents['date'] . ".<br>\r\n"; |
|
| 97 | 97 | } else { |
| 98 | - $out = $out.'No notifications sent for event '.$rowEvents['id'].' on '.$rowEvents['date'].".<br>\r\n"; |
|
| 98 | + $out = $out . 'No notifications sent for event ' . $rowEvents['id'] . ' on ' . $rowEvents['date'] . ".<br>\r\n"; |
|
| 99 | 99 | } |
| 100 | 100 | $i = $i + 1; |
| 101 | 101 | } |
| 102 | 102 | if ($i == 0) { |
| 103 | - $out = $out.'No events found to automatically notify for.'; |
|
| 103 | + $out = $out . 'No events found to automatically notify for.'; |
|
| 104 | 104 | } |
| 105 | 105 | } else { |
| 106 | - $out = $out.'Automatic notifications are disabled.'; |
|
| 106 | + $out = $out . 'Automatic notifications are disabled.'; |
|
| 107 | 107 | } ?> |
| 108 | 108 | <html> |
| 109 | 109 | <body> |