document.write('
Data hosted with ♥ by Pastebin.com - Download Raw - See Original
  1. <?php
  2. session_start();
  3. if(isset($_SESSION[\'user\'])) {
  4.  
  5. include \'../_class/cms_class.php\';
  6.  
  7. $obj = new modernCMS();
  8.  
  9. //Setup Our Connection Vars
  10. $obj->host = \'localhost\';
  11. $obj->username = \'root\';
  12. $obj->password = \'password\';
  13. $obj->db = \'database_Name\';
  14.  
  15. // Connect To Our Database
  16. $obj->connect();
  17.  
  18.  
  19. ?>
  20. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
  21. <html xmlns="http://www.w3.org/1999/xhtml">
  22. <head>
  23. <title>CMS Alpha</title>
  24. <meta http-equiv="X-UA-Compatible" content="IE=edge" />
  25. <link rel="stylesheet" type="text/css" href="../css/main.css" />
  26. <!-- TinyMCE -->
  27. <script type="text/javascript" src="jscripts/tiny_mce/tiny_mce.js"></script>
  28. <script type="text/javascript">
  29.     tinyMCE.init({
  30.         // General options
  31.         mode : "textareas",
  32.         theme : "advanced",
  33.         textarea_trigger : "convert_this",
  34.         plugins : "autolink,lists,pagebreak,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,inlinepopups,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template,wordcount,advlist,autosave",
  35.  
  36.         // Theme options
  37.         theme_advanced_buttons1 : "save,newdocument,|,bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,styleselect,formatselect,fontselect,fontsizeselect",
  38.         theme_advanced_buttons2 : "cut,copy,paste,pastetext,pasteword,|,search,replace,|,bullist,numlist,|,outdent,indent,blockquote,|,undo,redo,|,link,unlink,anchor,image,cleanup,help,code,|,insertdate,inserttime,preview,|,forecolor,backcolor",
  39.         theme_advanced_buttons3 : "tablecontrols,|,hr,removeformat,visualaid,|,sub,sup,|,charmap,emotions,iespell,media,advhr,|,print,|,ltr,rtl,|,fullscreen",
  40.         theme_advanced_buttons4 : "insertlayer,moveforward,movebackward,absolute,|,styleprops,|,cite,abbr,acronym,del,ins,attribs,|,visualchars,nonbreaking,template,pagebreak,restoredraft",
  41.         theme_advanced_toolbar_location : "top",
  42.         theme_advanced_toolbar_align : "left",
  43.         theme_advanced_statusbar_location : "bottom",
  44.         theme_advanced_resizing : true,
  45.  
  46.         // Example content CSS (should be your site CSS)
  47.         content_css : "css/content.css",
  48.  
  49.         // Drop lists for link/image/media/template dialogs
  50.         template_external_list_url : "lists/template_list.js",
  51.         external_link_list_url : "lists/link_list.js",
  52.         external_image_list_url : "lists/image_list.js",
  53.         external_image_list_url : "images.php",
  54.         media_external_list_url : "lists/media_list.js",
  55.  
  56.         // Style formats
  57.         style_formats : [
  58.             {title : \'Bold text\', inline : \'b\'},
  59.             {title : \'Red text\', inline : \'span\', styles : {color : \'#ff0000\'}},
  60.             {title : \'Red header\', block : \'h1\', styles : {color : \'#ff0000\'}},
  61.             {title : \'Example 1\', inline : \'span\', classes : \'example1\'},
  62.             {title : \'Example 2\', inline : \'span\', classes : \'example2\'},
  63.             {title : \'Table styles\'},
  64.             {title : \'Table row 1\', selector : \'tr\', classes : \'tablerow1\'}
  65.         ],
  66.  
  67.         // Replace values for the template plugin
  68.         template_replace_values : {
  69.             username : "Some User",
  70.             staffid : "991234"
  71.         }
  72.     });
  73. </script>
  74. <!-- /TinyMCE -->
  75.  
  76. </head>
  77. <body>
  78. <div id="page-wrap">
  79.   <h1>CMS Alpha</h1>
  80.   <h3>Add Content</h3>
  81.   <br />
  82.    <?php include \'../nav.php\'; ?>
  83.  
  84. <form method="post" action="index.php">
  85.     <div>
  86.         <input type="hidden" name="add" value="true" />
  87.     <div>
  88.         <label for="title">Title:</label>
  89.         <input type="text" name="title" id="title" />
  90.     </div>
  91.  
  92.         <!-- Gets replaced with TinyMCE, remember HTML in a textarea should be encoded -->
  93.         <div>
  94.         <label for="title">Message:</label>
  95.             <textarea id="body" name="body" rows="15" cols="80" style="width: 80%">
  96.                
  97.             </textarea>
  98.         </div>
  99.         <br />
  100.         <input type="submit" name="save" value="Submit" />
  101.     </div>
  102. </form>
  103. </div>
  104. <script type="text/javascript">
  105. if (document.location.protocol == \'file:\') {
  106.     alert("The examples might not work properly on the local file system due to security settings in your browser. Please use a real webserver.");
  107. }
  108. </script>
  109. </body>
  110. </html>
  111. <?php } ?>
');