<?php if (isset($_POST['page'])) { $page = $_POST['page']; } else { header('Location: index.php'); } if (trim($page) == "cont") { require_once '../CMS/db/contact_detail_class.php'; $con = contact_detail::getdetail(); if ($con === 0) { die("Contect detail is not available"); } echo " <h3>Contact detail</h3><hr />" . $con->detail; }
<?php if (!isset($_SERVER['HTTP_REFERER'])) { header("location: ../../access_denied.php?data=You don't have direct access to this page"); } require_once '../../db/contact_detail_class.php'; require_once '../../db/site_log_class.php'; require_once '../../db/user_class.php'; session_start(); $de = new contact_detail($_POST['editor1']); $answer = $de->handlerequest(); echo $answer; $l = new site_log(NULL, NULL, $_SESSION['user']->username, $_SERVER['REMOTE_ADDR'], " contact details updated"); $l->insertlog();
<?php //if(!isset($_SERVER['HTTP_REFERER'])){ // header("location: ../../access_denied.php?data=You don't have direct access to this page"); //} require_once 'db/contact_detail_class.php'; ?> <script src="textEditor/ckeditor.js"></script> <form action="server/gen-detail/contact_detail_update.php" id="editdetail" method="post"> <textarea id="editor1" name="editor1" style="width:50px;"> <?php $de = contact_detail::getdetail(); echo $de->detail; ?> </textarea> <script> CKEDITOR.replace( 'editor1' ); </script><br /> <button type="submit">Submit</button> <button type="reset">Reset</button> </form>