Exemplo n.º 1
0
                 break;
             }
         }
     }
 } else {
     if (isset($_GET['action']) && isset($_GET['id'])) {
         if ($_GET['action'] == "edit") {
             $text = $admin->editContent($_GET['id']);
             if ($text == "") {
                 $error = "Something went wrongo!";
             } else {
                 break;
             }
         } else {
             if ($_GET['action'] == "unlink") {
                 if ($admin->unlinkContent($_GET['id'])) {
                     $success = "Unlinked the content with id: " . $_GET['id'];
                 } else {
                     $error = "Could not unlink the content with id: " . $_GET['id'];
                 }
             } else {
                 if ($_GET['action'] == "remove") {
                     if ($admin->removeContent($_GET['id'])) {
                         $success = "Removed the content with id: " . $_GET['id'];
                     } else {
                         $error = "Could not remove the content with id: " . $_GET['id'];
                     }
                 }
             }
         }
     }