$urlError = ""; $_SESSION["instructions"] = instructions($newurl); $newembedcode = autoembed($newurl); if (strpos($newurl, '#') != FALSE) { $newurl = substr($newurl, 0, strpos($newurl, "#")); } } } else { $newurl = $_POST["url"]; $newurl = str_replace("www.", "", $newurl); $newurl = rtrim($newurl, "/"); $newurl = str_replace(" ", "", $newurl); $newurl = str_replace("https://", "http://", $newurl); $newurl = str_replace(":|:|:|:", "", $newurl); $urlError = ""; $_SESSION["instructions"] = instructions($newurl); $newembedcode = autoembed($newurl); if (strpos($newurl, '#') != FALSE) { $newurl = substr($newurl, 0, strpos($newurl, "#")); } } //---validate schedule---// if (isset($_POST["M"]) or isset($_POST["T"]) or isset($_POST["W"]) or isset($_POST["R"]) or isset($_POST["F"]) or isset($_POST["S"]) or isset($_POST["U"])) { if ($_POST["time"] === "") { $scheduleError = "<div class='errormessage'>set the time</div>"; $time = ""; } else { $time = timezero($_POST["time"]); $newschedule = $time . "d"; if (isset($_POST["M"]) and $_POST["M"] == "M") { $newschedule = $newschedule . "M";
//init if ($privs == 9) { //admin if (isset($_POST['uploadFile'])) { $msg = processUpload(); } if (isset($_POST['uploadFile']) and !$msg or isset($_POST['addEvents'])) { $errors = processEvtFields($_POST['sDate'], $_POST['eDate'], $_POST['sTime'], $_POST['eTime'], $_POST['title'], $_POST['catID']); } if (isset($_POST['addEvents']) and !$errors) { $msg = addEvents(); //add events to calendar } echo "<p class='error'>{$msg}</p>\n"; echo "<div class='scrollBoxAd'>\n"; if (!isset($_POST['uploadFile']) and !isset($_POST['addEvents']) or isset($_POST['uploadFile']) and $msg) { instructions(); } echo "<div class='centerBox'>\n"; if (!isset($_POST['uploadFile']) and !isset($_POST['addEvents']) or isset($_POST['uploadFile']) and $msg) { uploadFile(); } elseif (!isset($_POST['addEvents']) or $errors) { displayEvents($errors); //file uploaded or errors, display events } else { echo "<button type='button' onclick=\"window.location.href='index.php?lc&cP=96'\">{$ax['back']}</button>\n"; } echo "</div>\n</div>\n"; } else { echo "<p class='error'>{$ax['no_way']}</p>\n"; }
<?php function instructions($ins1, $ins2, $ins3, $ins4, $ins5, $ins6, $ins7, $ins8, $ins9, $ins10, $ins11) { echo $ins1 . "\n"; echo $ins2 . "\n"; echo $ins3 . "\n"; echo $ins4 . "\n"; echo $ins5 . "\n"; echo $ins6 . "\n"; echo $ins7 . "\n"; echo $ins8 . "\n"; echo $ins9 . "\n"; echo $ins10 . "\n"; echo $ins11 . "\n"; } echo instructions("Up", "Up", "Down", "Down", "Left", "Right", "Left", "Right", "B", "A", "Start");