Advertisement
rawyon

Untitled

Mar 11th, 2011
439
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 2.04 KB | None | 0 0
  1. <?php
  2. /**
  3.  * Sida som kräver att man är inloggad
  4.  *
  5.  * createpage.php
  6.  */
  7.  
  8. //anslut.php
  9. require "anslut.php";
  10.  
  11. session_start();
  12.  
  13. if (!isset($_SESSION['login']) || $_SESSION['login'] != true) {
  14.     header('Refresh: 3; url=admin.php');
  15.     print 'Om 3 sekunder blir du länkad till login-sidan';
  16.     exit;
  17. }
  18.  
  19. // header
  20. require "header.php";
  21. ?>
  22. <div id="content">
  23.    <h1>Skapa en ny sida</h1>
  24.    <p>Tryck <a href="changepage.php">här</a> för att skapa en sida!</p>
  25.    
  26. <!---menynamn--->
  27. <form method="post" action="<?php echo $_SERVER['PHP_SELF']; ?>">
  28.         <p>
  29.             <label for="mail">menynamn:</label> <input type="text" name="mail" id="mail"/>
  30.         </p>
  31. </form>
  32.  
  33. <!---rubrik--->
  34. <form method="post" action="<?php echo $_SERVER['PHP_SELF']; ?>">
  35.         <p>
  36.             <label for="mail">rubrik:</label> <input type="text" name="mail" id="mail"/>
  37.         </p>
  38. </form>
  39.  
  40. <!---title--->
  41. <form method="post" action="<?php echo $_SERVER['PHP_SELF']; ?>">
  42.         <p>
  43.             <label for="mail">title:</label> <input type="text" name="mail" id="mail"/>
  44.         </p>
  45. </form>
  46.  
  47. <!---text--->
  48. <form method="post" action="<?php echo $_SERVER['PHP_SELF']; ?>">
  49.         <p>
  50.           <label for="text">Brödtext</label>
  51.             <textarea id="text" name="text"><p>
  52.                 <?php  echo $text; ?>
  53.             </p></textarea>
  54.         </p>
  55.         <p>
  56.            <input type="hidden" value="<?php echo $text; ?>" name="contentID" />
  57.             <input type="submit" />
  58.         </p>
  59.     </form>
  60.  
  61.      <script src="ckeditor/ckeditor.js"></script>
  62. </fieldset>
  63.  
  64.  
  65. <script>
  66. CKEDITOR.config.toolbar_MA=[
  67.   ['Source','-','Cut','Copy','Paste','-','Undo','Redo','RemoveFormat','-','Link','Unlink','-','Image','SpecialChar'],
  68.   '/',
  69.   ['Format','Templates','Bold','Italic','-','Subscript','Superscript','-',['JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock'],'-','NumberedList','BulletedList','-','Outdent','Indent']
  70. ];
  71.  
  72.  
  73. CKEDITOR.replace("text", { toolbar: "MA" } );
  74. </script>
  75.  
  76.    <p><a href="logout.php">Logga ut</a></p>
  77. </div>
  78.  
  79. <?php
  80. // footer
  81. require "footer.php";
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement