"); $endPos = strpos($content, ""); if (($beginPos === false) || ($endPos === false)) { die("Cannot read file " . $targetFile); } else $beginPos += 19; $contentLen = $endPos - $beginPos; $content = dehtmlize(substr($content, $beginPos, $contentLen)); ?>



     |     
getCurrentIP(); } else { $loggedInUser = null; $ip = $_SERVER['REMOTE_ADDR']; } if ($deleteme === "1") { global $CMS_CONTENT_URL_PATH; if ($loggedInUser == null) { die("What, you think you can delete this file even though you're not logged in? Pssh!"); } require_once("contenthandler.php"); ContentHandler::deleteFile($loggedInUser, $file); print "File deleted successfully. Back to Litgloss."; } else { $ip = null; if (isset($_SESSION['LoggedInUser'])) { $loggedInUser = $_SESSION['LoggedInUser']; $ip = $loggedInUser->getCurrentIP(); } else { $loggedInUser = null; $ip = $_SERVER['REMOTE_ADDR']; } require_once("contenthandler.php"); $ret = ContentHandler::submitEdit($loggedInUser, $ip, $file, $content); if ($ret == ContentHandler::$CONTENT_POSTED) echo "Changes have been successfully applied to the page."; else if ($ret == ContentHandler::$CONTENT_QUEUED) echo "Changes have been queued for approval by an administrator."; else if ($ret == ContentHandler::$CONTENT_FAILURE) echo "Editing of content has FAILED!"; } } ?>