Ejemplo n.º 1
0
  * Add new content
  *  Select type (normal text, blog post, guestbook module, image gallery module)
  *  Select which page to link to
  * 
  * Edit content
  *  Select which page to link to
  *      Send and edit
  *  editor - html and rich text
  *  save
  *  remove
  */
 if (isset($_GET['name']) && isset($_GET['type']) && isset($_GET['parent']) && $_GET['type'] != "" && $_GET['parent'] != "") {
     if ($_GET['name'] == "") {
         $error = "Please fill in a name for the content";
     } else {
         $text = $admin->addContent($_GET['name'], $_GET['parent'], $_GET['type']);
         if ($text == 1) {
             $success = "Added content!";
         } else {
             if ($text == "") {
                 $error = "Something went wrong!";
             } else {
                 break;
             }
         }
     }
 } else {
     if (isset($_GET['action']) && isset($_GET['id'])) {
         if ($_GET['action'] == "edit") {
             $text = $admin->editContent($_GET['id']);
             if ($text == "") {