From 09619e09ed4544a0529231bfc8dd81ec719f2810 Mon Sep 17 00:00:00 2001 From: Cash Costello Date: Sat, 28 Mar 2009 03:01:00 +0000 Subject: moved edit and delete to page handler - need to update links --- start.php | 59 ++++++++++++++++++++++++++++++++++------------------------- 1 file changed, 34 insertions(+), 25 deletions(-) (limited to 'start.php') diff --git a/start.php b/start.php index 16923787e..798becce4 100644 --- a/start.php +++ b/start.php @@ -113,48 +113,57 @@ if (isset($page[0])) { - switch($page[0]) - { + switch($page[0]) + { case "owned": //view list of albums owned by container if (isset($page[1])) set_input('username',$page[1]); include($CONFIG->pluginspath . "tidypics/index.php"); - break; - - case "view": //view an image individually - set_input('guid',$page[1]); + break; + + case "view": //view an image individually + if (isset($page[1])) set_input('guid',$page[1]); include($CONFIG->pluginspath . "tidypics/viewimage.php"); break; case "album": //view an album individually - set_input('guid',$page[1]); + if (isset($page[1])) set_input('guid',$page[1]); include($CONFIG->pluginspath . "tidypics/viewalbum.php"); break; case "new": //create new album if (isset($page[1])) set_input('username',$page[1]); - include($CONFIG->pluginspath . "tidypics/newalbum.php"); - break; - - case "upload": //upload images to album + include($CONFIG->pluginspath . "tidypics/newalbum.php"); + break; + + case "upload": //upload images to album if (isset($page[1])) set_input('container_guid',$page[1]); - include($CONFIG->pluginspath . "tidypics/upload.php"); - break; - - case "friends": + include($CONFIG->pluginspath . "tidypics/upload.php"); + break; + + case "edit": //edit image or album + if (isset($page[1])) set_input('guid',$page[1]); + include($CONFIG->pluginspath . "tidypics/edit.php"); + break; + + case "delete": //edit image or album + if (isset($page[1])) set_input('guid',$page[1]); + include($CONFIG->pluginspath . "tidypics/actions/delete.php"); + break; + + case "friends": if (isset($page[1])) set_input('username',$page[1]); - include($CONFIG->pluginspath . "tidypics/friends.php"); - break; - - case "world": - include($CONFIG->pluginspath . "tidypics/world.php"); - break; - - } + include($CONFIG->pluginspath . "tidypics/friends.php"); + break; + + case "world": + include($CONFIG->pluginspath . "tidypics/world.php"); + break; + + } } else { - // Include the standard profile index - if (isset($page[1])) set_input('username',$page[1]); + // going to the index because something is wrong with the page handler include($CONFIG->pluginspath . "tidypics/index.php"); } -- cgit v1.2.3