"; if ($action == 'login'){ include "./inc/login.php"; } else if ($action == 'logout'){ include "./inc/logout.php"; }else if (($action == 'add listing')&&($_SESSION['mode']=='manage')){ include "./inc/addlisting.inc.php"; }else if (($action == 'edit listing')&&($_SESSION['mode']=='manage')){ include "./inc/editlisting.inc.php"; }else if (($action == 'delete listing')&&($_SESSION['mode']=='manage')){ include "./inc/deletelisting.inc.php"; }else if (($action == 'update main image')&&($_SESSION['mode']=='manage')){ include "./inc/updatemainimage.inc.php"; }else if (($action == 'processimage')&&($_SESSION['mode']=='manage')){ include "./inc/processimage.inc.php"; } else if (($action == 'setfeatured')&&($_SESSION['mode']=='manage')){ include "./inc/setfeatured.inc.php"; } else if (($action == 'featsetting')&&($_SESSION['mode']=='manage')){ include "./inc/featsetting.inc.php"; } else if (($action == 'setrank')&&($_SESSION['mode']=='manage')){ include "./inc/setrank.inc.php"; } /* show the correct page */ if ($page == "") { $page = $_GET['page']; } if ($page == "manage"){ if ($_SESSION['mode']=='manage'){ include "./pages/mMain.php"; } else { include "./pages/mLogin.php"; } } else if (($page == "newlisting")&&($_SESSION['mode']=='manage')){ include "./pages/mNewListing.php"; } else if (($page == "editlisting")&&($_SESSION['mode']=='manage')){ include "./pages/mEditListing.php"; } else if (($page == "featured")&&($_SESSION['mode']=='manage')){ include "./pages/featured.php"; } else if ($page == "showlisting"){ include "./pages/showlisting.php"; } else if ($page == "getfeatured"){ include "./pages/getfeatured.php"; } else { // if nothing, show list of listings include "./pages/listings.php"; } ?>