function parse_content(&$toparse) { $toparse = htmlspecialchars_decode($toparse); $explo = explode('|', $toparse); foreach ($explo as $index => $part) { $part = trim($part); if ($part[0] == '+') { $func = explode(',', $part, 4); switch ($func[0]) { case "+img": $explo[$index] = imgtag($func[1], $func[2]); break; case "+spacer": $explo[$index] = spacertag($func[1]); break; case "+atvgall": $explo[$index] = build_atv_gallery(); break; case "+imagegall": $explo[$index] = '<h1>Image Gallery</h1>' . imageupload() . '<p><br><br></p>' . delimage() . '<p><br><br></p>' . buildgallery(); break; case "+csv": $explo[$index] = csvfileupload(); break; case "+viparea": $explo[$index] = viparea(); break; case "+dbviewer": $explo[$index] = dbcontrol() . printusers() . printfiles() . printnotes() . printcms(); break; case "+filedeposit": $explo[$index] = filedeposit(); break; case "+newsfeed": $explo[$index] = build_newsfeed(); break; case "+projfeed": $explo[$index] = build_projectfeed($func[1]); break; case "+login": $explo[$index] = login_page(); break; case "+contactprofile": $explo[$index] = profilepage(); break; } } } $toparse = implode($explo); }
"> <?php if (strpos($page["tag"], "system") === FALSE) { if (strlen($page["headline"]) < 50) { echo "<h1>" . $page["headline"] . "</h1>"; } else { echo "<h2>" . $page["headline"] . "</h2>"; } if (strpos($page["tag"], "project") !== FALSE) { echo '<i class="thin">' . date_converter($page["created"]) . '</i>'; //Function is in general.php } } echo $page["main"]; if ($_SESSION["status"] == "admin" && $_SESSION["editmode"] == 1) { echo spacertag(true); if (!isset($page["id"])) { //New page echo ' <h3>Create a new page!</h3> <form action="' . htmlspecialchars($_SERVER["PHP_SELF"]) . '" method="POST"> <input type="hidden" name="id" value=""> <input type="hidden" name="created" value="' . date("o-m") . '"> <input type="submit" name="savepage" class="subm" value="Save"> <p>Name: <input type="text" name="name" class="inp" value="' . $_SESSION["reqpage"] . '"></p> <p>Showname: <input type="text" name="showname" class="inp" value="' . $page["showname"] . '"></p> <p>Feature Page <input type="checkbox" name="featured" value="yes"></p> <p>Title: <input type="text" name="title" class="inp" value="' . $page["title"] . '"></p> <p>Tag: <input type="text" name="tag" class="inp" value="' . $page["tag"] . '"></p> <p>VisibleTo: <input type="text" name="visibleto" class="inp" value="' . $page["visibleto"] . '"></p> <p>Includes: <br><textarea name="includes" class="cms" rows="2" cols="87">' . $page["includes"] . '</textarea></p>