Server IP : 149.202.105.228 / Your IP : 216.73.216.18 Web Server : Apache System : Linux webm129.cluster030.gra.hosting.ovh.net 5.15.167-ovh-vps-grsec-zfs-classid #1 SMP Tue Sep 17 08:14:20 UTC 2024 x86_64 User : atfycaf ( 116275) PHP Version : 7.4.33 Disable Function : _dyuweyrj4,_dyuweyrj4r,dl MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home/atfycaf/www/admin/ |
Upload File : |
<?php $thisCheckID = 42; include "globalVars.php"; include "header.php"; ?> <h2>Create a New Event for Registration</h2> <?php if (isset($_POST["createEvent"])) { $eventType = cleanPost($_POST["eventType"], $conn); $eventRegType = cleanPost($_POST["eventRegType"], $conn); $eventTitle = cleanPost($_POST["eventTitle"], $conn); $eventLocation = cleanPost($_POST["eventLocation"], $conn); $eventStartDate = cleanPost($_POST["eventStartDate"], $conn); list($startDay, $startMonth, $startYear) = explode("/", $eventStartDate); $eventStartDate = $startYear ."-". $startMonth ."-". $startDay; $regStartDate = cleanPost($_POST["regStartDate"], $conn); list($regStartDay, $regStartMonth, $regStartYear) = explode("/", $regStartDate); $regStartDate = $regStartYear ."-". $regStartMonth ."-". $regStartDay; $regEndDate = cleanPost($_POST["regEndDate"], $conn); list($regEndDay, $regEndMonth, $regEndYear) = explode("/", $regEndDate); $regEndDate = $regEndYear ."-". $regEndMonth ."-". $regEndDay; $eventText = $_POST["eventText"]; $pageURL = str_replace($badURL, $goodURL, $eventTitle); $pageURL = strtolower($pageURL) ; $dupQuery = mysqli_query($conn, "SELECT id FROM forthcomingEvents WHERE pageURL LIKE '$pageURL%%'"); $isDup = mysqli_num_rows($dupQuery); if ($isDup > 0) { $pageURL .= "-". ($isDup + 1); } mysqli_query($conn, "INSERT INTO forthcomingEvents (pageURL, eventTitle, eventType, eventRegType, eventLocation, eventStartDate, regStartDate, regEndDate, eventText) VALUES ('$pageURL', '". addslashes($eventTitle) ."', '$eventType', '$eventRegType', '". addslashes($eventLocation) ."', '$eventStartDate', '$regStartDate', '$regEndDate', '". addslashes($eventText) ."')") or die (mysqli_error($conn)); $trackDate = date("Y-m-d H:i:s"); mysqli_query($conn, "INSERT INTO userActions (dateCreated, adminID, pageTracking, databaseUpdated, updateDetails) VALUES ('$trackDate', '$adminID', 'admin/forthcomingNew.html', 'forthcomingEvents', 'The User ". addslashes($adminName) ." <$adminEmail> created the ". addslashes($eventTitle) ." event for registration')"); echo "<p><strong>Success!</strong> The new Event $eventTitle has been created.</p>"; } else { ?> <p>Register a new league or tournament to advertise for bowlers to register for. This will be advertised on the site for 2 days prior to the start of the advertising period until the end date you select below</p> <form action="forthcomingNew.html" method="post" style="float:left; clear:both;"> <div class="descStTab"> <div class="pFormRow"> <div class="pFormTitle">League or Tournament?:</div> <div class="pFormSelect"> <select name="eventType" required> <option value="" selected disabled>Select</option> <option value="1">Tournament</option> <option value="2">League</option> </select> <div class="pFormLabel"> <label class="labelName">League or Tournament?:</label> </div> </div> </div> <div class="pFormRow"> <div class="pFormTitle">Registration Type: <span class="infoButton"><img src="images/infoButton.png" width="14" height="14" alt="Help" title="Help" border="0" /><span>This will be used in the registration page to show the correct number of registration boxes (1 per person / team)</span></span></div> <div class="pFormSelect"> <select name="eventRegType" required> <option value="" selected disabled>Select</option> <option value="1">Solo</option> <option value="2">Pair</option> <option value="3">Triples</option> <option value="4">Team</option> </select> <div class="pFormLabel"> <label class="labelName">Registration Type:</label> </div> </div> </div> <div class="pFormRow"> <div class="pFormTitle">Event Title: <span class="infoButton"><img src="images/infoButton.png" width="14" height="14" alt="Help" title="Help" border="0" /><span>This should explain exactly what the event is (eg: Mixed Pairs Autumn Knockout Tournament <?php echo date("Y") ?> / Winter Teams League <?php echo date("Y") ?>)</span></span></div> <div class="pFormInput"> <input type="text" name="eventTitle" size="50" /> <div class="pFormLabel"> <label class="labelName">Event Title:</label> </div> </div> </div> <div class="pFormRow"> <div class="pFormTitle">Event Location:</div> <div class="pFormInput"> <input type="text" name="eventLocation" size="50" /> <div class="pFormLabel"> <label class="labelName">Event Location:</label> </div> </div> </div> <div class="pFormRow"> <div class="pFormTitle">Tournament / League Start Date</div> <div class="pFormInput"> <input type="text" name="eventStartDate" id="eventStartDate" size="50" required /> <div class="pFormLabel"> <label class="labelName">Tournament/ League Start Date:</label> </div> </div> </div> <div class="pFormRow"> <div class="pFormTitle">Registration Start Date</div> <div class="pFormInput"> <input type="text" name="regStartDate" id="regStartDate" size="50" required /> <div class="pFormLabel"> <label class="labelName">Registration Start Date:</label> </div> </div> </div> <div class="pFormRow"> <div class="pFormTitle">Registration End Date</div> <div class="pFormInput"> <input type="text" name="regEndDate" id="regEndDate" size="50" required /> <div class="pFormLabel"> <label class="labelName">Registration End Date:</label> </div> </div> </div> <div class="pFormRow pFormTxtRow"> <div class="pFormTitle">Text about the Event: <span class="infoButton"><img src="images/infoButton.png" width="14" height="14" alt="Help" title="Help" border="0" /><span>This should be detailed information about the event and will appear on the registration page above the form the bowlers will use to register for the event</span></span></div> <div id="eventText" class="tinyTxtEditor"></div> <div class="pFormLabel"> <label class="labelName">Text about the Event:</label> </div> </div> </div> <input type="submit" class="submitButton" name="createEvent" value="Create New Event" /> </form> <?php } ?> <?php include "footer.php"; ?>