PHP Classes

File: cms/admin/add-pages.php

Recommend this page to a friend!
  Classes of Vivek moyal   PHP Content Management System   cms/admin/add-pages.php   Download  
File: cms/admin/add-pages.php
Role: Example script
Content type: text/plain
Description: Example script
Class: PHP Content Management System
Manage content pages stored on a MySQL database
Author: By
Last change:
Date: 6 years ago
Size: 3,708 bytes


Class file image Download
<?php include_once './inc/header.php';
$message=new alertClass();
$gump = new GUMP();
'Title' => 'required',
'URL' => 'required',
'PageDetails' => 'required',
'PageName' => 'required'
'Title' => 'trim|sanitize_string',
'URL' => 'trim|sanitize_string',
'Keywords' => 'trim|sanitize_string',
'Description' => 'trim|sanitize_string',
'PageName' => 'trim|sanitize_string'
$validated_data = $gump->run($_POST);
$validated_data === false) {
} else {
define('pageclassconst', TRUE);
$pageClass=new pagesClass();

    <div class="container-fluid">
      <div class="row">
        <div class="col-sm-8 col-md-offset-2 main">
          <h1 class="page-header">Add Pages</h1>
          <?php echo $alert; ?>
<form method="post" action="<?php echo $_SERVER["PHP_SELF"] ?>" enctype="multipart/form-data">
              <div class="form-group">
                  <label>Page Name*</label>
                  <input type="text" id="PageName" name="PageName" value="<?php echo $_POST["PageName"] ?>" class="form-control">
              <div class="form-group">
                  <input type="text" id="Title" name="Title" value="<?php echo $_POST["Title"] ?>" class="form-control">
              <div class="form-group">
                  <input type="text" id="URL" name="URL" value="<?php echo $_POST["URL"] ?>" class="form-control">
              <div class="form-group">
                  <label>Meta Keywords</label>
                  <input type="text" id="Keywords" name="Keywords" value="<?php echo $_POST["Keywords"] ?>" class="form-control">
              <div class="form-group">
                  <label>Meta Description</label>
                  <textarea id="Description" name="Description" class="form-control"><?php echo $_POST["Description"] ?></textarea>
              <div class="form-group">
                  <label>Page Details*</label>
                  <textarea id="summernote" name="PageDetails"><?php echo $_POST["PageDetails"] ?></textarea>
              <input type="submit" id="submit" name="submit" value="Add Page" class="btn btn-primary">

    <!-- Bootstrap core JavaScript
    ================================================== -->
    <!-- Placed at the end of the document so the pages load faster -->
    <script src=""></script>
    <script src="../js/bootstrap.min.js"></script>
    <script src="../js/summernote/summernote.min.js"></script>
    $(document).ready(function() {
  height: 300, // set editor height
  minHeight: null, // set minimum height of editor
  maxHeight: null, // set maximum height of editor
  focus: true // set focus to editable area after initializing summernote