?> </div> <?php } else { echo '<div class="message warning"><h1>Busted!</h1></div>'; } } ?> <?php if (!isset($_SESSION["ERROR"])) { if (useron()) { ?> <div id="UserPanel"> <ul> <?php if (!alreadyowner()) { ?> <li><a href="AddBusiness.php" target="_self">Add</a></li> <?php if (!isAdmin()) { ?> <li style="background-color:gray; padding:0.5em 2em;"><abbr title="You are not owner of One Business Record">Edit</abbr></li> <li style="background-color:gray; padding:0.5em 2em;"><abbr title="You are not owner of One Business Record">Delete</abbr></li> <?php } else { if (testdata() == true) { ?> <li><a href="Edit.php" target="_self">Edit</a></li> <li><a href="Delete.php" target="_self">Delete</a></li>
<?php $TitleSite = "WebYummy - Upload Image"; include 'header.php'; include 'Menu.php'; is_not_logged_in(); if (!alreadyowner() && !isAdmin()) { $_SESSION["ERROR"] = "You are not Own any Business Record"; $host = $_SERVER['HTTP_HOST']; $uri = rtrim(dirname($_SERVER['PHP_SELF']), '/\\'); $extra = 'error.php'; header("Location: http://{$host}{$uri}/{$extra}"); exit; } if (isset($_GET["BiD"])) { // Ελέγχει αν το BiD είναι αριθμός if (preg_match("/^[0-9]+\$/", $_GET["BiD"])) { $BiD = $_GET["BiD"]; } else { session_destroy(); session_start(); $_SESSION["ERROR"] = "Good Try ;)"; $host = $_SERVER['HTTP_HOST']; $public_directory = dirname($_SERVER['PHP_SELF']); //place each directory into array $directory_array = explode('/', $public_directory); //get highest or top level in array of directory strings $public_base = "/{$directory_array['1']}"; $uri = rtrim($public_base, '/\\'); $extra = "error.php"; header("Location: http://{$host}{$uri}/{$extra}");