fetch("SELECT id,title,img_hash,status,date_added FROM bd_items WHERE user_id=$user_id ORDER BY date_added DESC"); include 'header.php'; include 'users/myaccount.php'; include 'sidebar.php'; break; case 'myaccount_submit': verify_access(); process_submission(); include 'header.php'; include 'users/submit.php'; include 'sidebar.php'; break; case 'logout': process_logout(); break; case 'login': process_login(); include 'header.php'; include 'users/login.php'; include 'sidebar.php'; break; case 'register': process_registration(); include 'header.php'; include 'users/register.php'; include 'sidebar.php'; break; break; case 'image': $id = (int)$_GET["id"]; $item = $db->fetchrow("SELECT id,title,description,img_hash,buy_now FROM bd_items WHERE id=$id AND status=1"); $lucky_items = $db->fetch("SELECT id,title,img_hash FROM bd_items ORDER BY RAND() LIMIT 15"); include 'header.php'; include 'pages/item.php'; include 'bottom_bar_item.php'; include 'sidebar.php'; break; case 'browse': $page_num = (isset($_GET["page_num"])) ? (int)$_GET["page_num"] : 1; $page_num = ($page_num<1) ? 1 : $page_num; $page_limit_sql = ($page_num-1)*45 . ',45'; $items = $db->fetch("SELECT id,title,img_hash FROM bd_items WHERE status=1 ORDER BY date_added DESC, id DESC LIMIT $page_limit_sql"); $page_count = ceil($db->result("SELECT COUNT(id) FROM bd_items WHERE status=1")/45); include 'header.php'; include 'pages/browse.php'; include 'sidebar.php'; break; case 'home': default: $items = $db->fetch("SELECT id,title,img_hash FROM bd_items WHERE status=1 ORDER BY RAND() LIMIT 30"); $lucky_items = $db->fetch("SELECT id,title,img_hash FROM bd_items WHERE status=1 ORDER BY RAND() LIMIT 15"); include 'header.php'; include 'pages/home.php'; include 'bottom_bar_home.php'; include 'sidebar.php'; } include 'footer.php'; ?>