Server IP : 149.202.105.228 / Your IP : 216.73.216.134 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/a/t/f/atfycaf/www/admin/ |
Upload File : |
<?php $thisCheckID = 28; include 'globalVars.php'; include 'header.php'; ?> <h2>Create a New Site Page</h2> <?php if (isset($_POST["createPage"])) { $pageNameEN = $_POST["pageName_en"]; $isPlaceholder = $_POST["placeHolder"]; foreach($langArray as $lang=>$langDisplay) { $pageName = str_replace($encBad, $encGood, $_POST["pageName_".$lang]); $headerTitle = str_replace($encBad, $encGood, $_POST["headerTitle_".$lang]); $metaKey = str_replace($encBad, $encGood, $_POST["metaKey_".$lang]); $metaDesc = str_replace($encBad, $encGood, $_POST["metaDesc_".$lang]); $pageTitle = str_replace($encBad, $encGood, $_POST["pageTitle_".$lang]); $pageURL = $pageName ; if ($pageURL == "") { $pageURL = $pageNameEN; } if ($lang == "ru") { $translit = new Translit(); $pageURL = $translit->Transliterate($pageURL); } $pageURL = str_replace($badURL, $goodURL, $pageURL); $pageURL = strtolower($pageURL) ; $dupQuery = mysqli_query($conn, "SELECT pageURL FROM pages_". $lang ." WHERE pageURL = '$pageURL'"); $isDup = mysqli_num_rows($dupQuery); if ($isDup > 0) { $pageURL .= "-". ($isDup + 1); } mysqli_query($conn, "INSERT INTO pages_". $lang ." (menuTitle, pageURL, headerTitle, metaKey, metaDesc, pageTitle, placeHolder) VALUES ('". addslashes($pageName) ."', '$pageURL', '". addslashes($headerTitle) ."', '". addslashes($metaKey) ."', '". addslashes($metaDesc) ."', '". addslashes($pageTitle) ."', '$isPlaceholder')") or die (mysqli_error($conn)); $pageID = mysqli_insert_id($conn); $trackDate = date("Y-m-d H:i:s"); mysqli_query($conn, "INSERT INTO userActions (dateCreated, adminID, pageTracking, databaseUpdated, updateDetails) VALUES ('$trackDate', '$adminID', 'admin/pagesNew.html', 'pages_". $lang ."', 'The User ". addslashes($adminName) ." <$adminEmail> created the new page ". addslashes($pageNameEN) ."')"); if (isset($_POST["divsToPost_". $lang])) { $divIDs = explode(",", $_POST["divsToPost_". $lang]); $mO = 1; foreach($divIDs as $divID) { if (trim($divID) == "") { } else { $divContent = $_POST["editable_". $lang ."_". $divID]; $divContent = str_replace( array( "THE KNOCKOUT FIXTURES WILL BE INSERTED HERE", "THE KNOCKOUT RESULTS WILL BE INSERTED HERE", "THE LEAGUE FIXTURES WILL BE INSERTED HERE", "THE LEAGUE RESULTS WILL BE INSERTED HERE", "THE LEAGUE TABLE WILL BE INSERTED HERE", "THE GALLERY SLIDES WILL BE INSERTED HERE", " sortableDiv", " sortSelectDiv", " ui-sortable-handle" ), array( "[[KNOCKOUT_FIXTURES_BOX]]", "[[KNOCKOUT_RESULTS_BOX]]", "[[LEAGUE_FIXTURES_BOX]]", "[[LEAGUE_RESULTS_BOX]]", "[[LEAGUE_TABLE_BOX]]", "[[GALLERY_BOX]]", "", "", "" ), $divContent ); mysqli_query($conn, "INSERT INTO pagesModules_". $lang ." (pageID, moduleOrder, moduleContent) VALUES ('$pageID', '$mO', '". addslashes($divContent) ."')") or die (mysqli_error()); $mO++; } } } } if (in_array("29", $adminPriv)) { ?> <a class="pagesBack" href="pagesEdit.html">Pages List</a> <?php } ?> <p>Success! The <?php echo $pageNameEN ?> page has been successfully created.</p> <p>You can now add this page to the main menu. <a href="menuMain.html" target="_blank">Click here to do that now</a></p> <?php include "xmlSitemap.php"; } else { if (count($langArray) != 1) { ?> <div id="langSelector"> <?php foreach($langArray as $langArrayURL=>$langArrayDisplay) { ?> <a id="<?php echo $langArrayURL ?>Selector"<?php if ($langArrayURL == "en") {?> class="selectedLang"<?php } ?>><?php echo $langArrayDisplay ?></a> <?php } ?> </div> <?php } ?> <form action="pagesNew.html" method="post" style="float:left; clear:both;"> <?php foreach($langArray as $langTab=>$langDisplay) { ?> <input type="hidden" name="divsToPost_<?php echo $langTab ?>" id="divsToPost_<?php echo $langTab ?>" value="" /> <div class="descTab" id="<?php echo $langTab ?>SelectorTab"> <div class="pFormRow"> <div class="pFormTitle">Page Name: <span class="infoButton"><img src="images/infoButton.png" alt="Help" title="Help" width="14" height="14" border="0"><span>The title of the page. This is used to create the URL of the page and is displayed in the main menu</span></span></div> <div class="pFormInput"> <input type="text" name="pageName_<?php echo $langTab ?>" id="pageName_<?php echo $langTab ?>" size="50" value="" /> <div class="pFormLabel"> <label class="labelName">Page Name:</label> </div> </div> </div> <div class="pFormRow"> <div class="pFormTitle">Header Title: <span class="infoButton"><img src="images/infoButton.png" alt="Help" title="Help" width="14" height="14" border="0"><span>The title of the page that appears in the browser window. This should be a good descriptive title of the page content</span></span></div> <div class="pFormInput"> <input type="text" name="headerTitle_<?php echo $langTab ?>" id="headerTitle_<?php echo $langTab ?>" size="50" value="" /> <div class="pFormLabel"> <label class="labelName">Header Title:</label> </div> </div> </div> <div class="pFormRow"> <div class="pFormTitle">Meta Keywords:</div> <div class="pFormInput"> <input type="text" name="metaKey_<?php echo $langTab ?>" id="metaKey_<?php echo $langTab ?>" size="50" value="" /> <div class="pFormLabel"> <label class="labelName">Meta Keywords:</label> </div> </div> </div> <div class="pFormRow"> <div class="pFormTitle">Meta Description: <span class="infoButton"><img src="images/infoButton.png" alt="Help" title="Help" width="14" height="14" border="0"><span>An expansion of the Header Title. This should give an overview of the content of this page</span></span></div> <div class="pFormInput"> <input type="text" name="metaDesc_<?php echo $langTab ?>" id="metaDesc_<?php echo $langTab ?>" size="50" value="" /> <div class="pFormLabel"> <label class="labelName">Meta Description:</label> </div> </div> </div> <div class="pFormRow"> <div class="pFormTitle">Page Title: <span class="infoButton"><img src="images/infoButton.png" alt="Help" title="Help" width="14" height="14" border="0"><span>The title of the page that appears over the header photo. Probably best if it is slightly different to the Header Title, but not essential. If you can't think of a different way to title the page then use the Header Title</span></span></div> <div class="pFormInput"> <input type="text" name="pageTitle_<?php echo $langTab ?>" id="pageTitle_<?php echo $langTab ?>" size="50" value="" /> <div class="pFormLabel"> <label class="labelName">Page Title:</label> </div> </div> </div> <?php if ($langTab == "en") { ?> <div class="pFormRow"> <div class="pFormTitle">Menu Type: <span class="infoButton"><img src="images/infoButton.png" width="14" height="14" alt="Help" title="Help" border="0" /><span>A visible page is a link in the menu, a Placeholder is just text to show a submenu</span></span></div> <div class="pFormSelect"> <select name="placeHolder" id="placeHolder"> <option value="0">This is a visible page</option> <option value="1">This is a Menu Placeholder</option> </select> <div class="pFormLabel"> <label class="labelName">Menu Type:</label> </div> </div> </div> <?php } ?> <div class="stdEntry"> <div class="divSelector"> <h3>Add a Section</h3> <a class="divStdType" id="divType1_<?php echo $langTab ?>">2 Boxes <span>2 Rectangular boxes set in the centre of the page</span></a> <a class="divStdType" id="divType2_<?php echo $langTab ?>">3 Boxes <span>3 Rectangular boxes set in the centre of the page</span></a> <a class="divStdType" id="divType3_<?php echo $langTab ?>">4 Boxes <span>4 Rectangular boxes set in the centre of the page</span></a> <a class="divStdType" id="divType4_<?php echo $langTab ?>">Text with Background <span>A text box with a full width picture background</span></a> <a class="divStdType" id="divType5_<?php echo $langTab ?>">Text without Background <span>A text box with a plain background</span></a> <a class="divStdType" id="divType6_<?php echo $langTab ?>">Tournaments Update <span>2 boxes with the latest knockout results and forthcoming fixtures</span></a> <a class="divStdType" id="divType7_<?php echo $langTab ?>">Leagues Update <span>2 boxes with the latest league results and forthcoming fixtures</span></a> <a class="divStdType" id="divType8_<?php echo $langTab ?>">Photo Gallery <span>A full width box showing random photos from the gallery</span></a> <h3>Move / Delete a Section</h3> <a class="moveDivs" id="moveDivs_<?php echo $langTab ?>">Move / Delete Sections <span>Click this button to change the form below so you can re-order or delete the sections. Click the button again to release the re-ordering and enable editing of the text and photos</span></a> </div> <div id="pageCanvas_<?php echo $langTab ?>" class="pageCanvas"></div> </div> </div> <?php } ?> <input type="submit" class="submitButton savePage" name="createPage" value="Create this Page" /> </form> <?php } ?> <?php include 'footer.php'; ?>