start(); } session_unregister(ses.'_redirect'); include(main_root.main_dir.'_lib/funx/function_common.php'); include(main_root.main_dir.'_lib/vda/vdaemon.php'); include(site_root.site_dir.'plugins/classifieds/plugin.php'); define('sidetoload',main_template_dir.'side.php'); $pagewhat = 'estorex'; $estorex = 1; $description = ''; $keywords = ''; $title = 'For sale items - {site_title}'; $main_template_dir = $_SERVER['DOCUMENT_ROOT'].'/'.site_path.'templates/default/'; $cat_id = 0; if(isset($_SERVER['PATH_INFO'])){ $var_array = explode("/",$_SERVER['PATH_INFO']); $var_count = count($var_array); $auser_name = $var_array[1]; //auser id $tagb = 'view'; $estore_item = 1; $query_u = "SELECT * from ".tbl_users." where auser_name='".$auser_name."'"; $u = mysql_query($query_u,con_dna); $row_u = mysql_fetch_assoc($u); $auser_id = $row_u['auser_id']; $query_p = "SELECT * from ".tbl_profile." where auser_id='".$auser_id."'"; $p = mysql_query($query_p,con_dna); $row_p = mysql_fetch_assoc($p); $auser_name = $row_u['auser_name']; $auser_email = $row_u['auser_email']; $auser_level = $row_u['auser_level']; $auser_signdate = $row_u['auser_signdate']; $auser_signip = $row_u['auser_signip']; $auser_status = $row_u['auser_status']; $auser_lastlogindate = $row_u['auser_lastlogindate']; $auser_lastloginip = $row_u['auser_lastloginip']; $auser_notify = $row_u['auser_notify']; $auser_passupdate = $row_u['auser_passupdate']; $auser_passupip = $row_u['auser_passupip']; $auser_nick = $row_p['auser_nick']; $auser_fname = $row_p['auser_fname']; $auser_mname = $row_p['auser_mname']; $auser_lname = $row_p['auser_lname']; $auser_bday = $row_p['auser_bday']; $auser_bdaym = $row_p['auser_bdaym']; $auser_bdayd = $row_p['auser_bdayd']; $auser_bdayy = $row_p['auser_bdayy']; $auser_age = $row_p['auser_age']; $auser_gender = $row_p['auser_gender']; $auser_address = $row_p['auser_address']; $auser_suburb = $row_p['auser_suburb']; $auser_addressb = $row_p['auser_addressb']; $auser_city = $row_p['auser_city']; $auser_zipcode = $row_p['auser_zipcode']; $auser_company = $row_p['auser_company']; $auser_fax = $row_p['auser_fax']; $auser_telephone = $row_p['auser_telephone']; $auser_mobile = $row_p['auser_mobile']; $auser_state = $row_p['auser_state']; $auser_country = $row_p['auser_country']; $auser_photo = $row_p['auser_photo']; $auser_lastupdate = $row_p['auser_lastupdate']; $auser_lastupip = $row_p['auser_lastupip']; $pagewhat = 'estorex'; $description = $auser_name.' Estore - {site_title}'; $keywords = str_replace(" ",",",$auser_name.' Estore - {site_title}'); $title = $auser_name.' Estore - {main_name}'; $checkestore = estore_checkstore($auser_id); define('checkestore',$checkestore); if(checkestore > 0){ $query_estorexx = "SELECT * from ".tbl_users_classifieds." where auser_id='$auser_id'"; $estorexx = mysql_query($query_estorexx,con_dna); $row_estorexx = mysql_fetch_assoc($estorexx); $estore_title = $row_estorexx['estore_title']; $estore_item = $row_estorexx['estore_item']; $estore_itemb = $row_estorexx['estore_itemb']; $estore_item_layout = $row_estorexx['estore_item_layout']; $estore_item_layoutb = $row_estorexx['estore_item_layoutb']; $estore_template = 'edefault';//$row_estorexx['estore_template']; $title = $estore_title.' - {main_name}'; $main_template_dir = $_SERVER['DOCUMENT_ROOT'].'/'.site_path.'templates/'.$estore_template.'/'; if(isset($var_array[2])){ $estore_page = strtolower($var_array[2]); if(file_exists(site_root.site_dir.'plugins/classifieds/inx_efront_'.$estore_page.'.php')){ if($estore_page=='category'){ $cat_idx = 0; if(isset($var_array[3])){ $cat_idx = $var_array[3]; } $title = $estore_title.' - Categories'; $catx = estore_subcategories($cat_idx,$auser_name,$auser_id); $cat_map = estore_bread($cat_idx,$auser_name,$auser_id); }// category if($estore_page=='specials'){ $title = 'Special and Discounted items - '.$estore_title; } if($estore_page=='features'){ $title = 'Featured items - '.$estore_title; } if($estore_page=='latest'){ $title = 'New Items - '.$estore_title; } if($estore_page=='item'){ $p_id = $var_array[3]; //page id $tagb = 'view'; $query_item = "SELECT * from ".tbl_products." where p_id='".$p_id."' and auser_id='$auser_id' and p_dispstatus=1"; $item = mysql_query($query_item,con_dna); $totalRows_item = mysql_num_rows($item); $row_item = mysql_fetch_assoc($item); $p_id = $row_item['p_id']; $auser_id = $row_item['auser_id']; $auser_name = $row_item['auser_name']; $store_id = $row_item['store_id']; $catx_id = $row_item['cat_id']; $cat_level = $row_item['cat_level']; $cat_map = $row_item['cat_map']; $cat_name = $row_item['cat_name']; $p_name = $row_item['p_name']; $p_desc = $row_item['p_desc']; $p_image = $row_item['p_image']; $p_dateadded = $row_item['p_dateadded']; $p_datemodified = $row_item['p_datemodified']; $p_allowcomments = $row_item['p_allowcomments']; $p_priceoption = $row_item['p_priceoption']; $p_special = $row_item['estore_special']; $p_special_price = $row_item['estore_special_price']; $priceoption = 'Fixed'; if($p_priceoption==1){ $priceoption = 'Negotiable'; } $p_price = 'Php '.number($row_item['p_price'],2);//.' ('.$priceoption.')'; $p_viewcount = $row_item['p_viewcount']; $p_status = $row_item['p_status']; $p_stockstatus = $row_item['p_stockstatus']; $p_banstatus = $row_item['p_banstatus']; $p_tags = $row_item['p_tags']; $p_sold = $row_item['p_sold']; $p_premium = $row_item['p_premium']; $p_allowcomments_text = $p_allowcomments==1?'Allowed':'Not allowed'; $sel_allowcomments = $p_allowcomments==1?'checked="checked"':''; $title = $p_name.' at '.$p_price.' - '.$estore_title; $description = substr($p_desc,0,255).' '.$estore_title; $keywords = str_replace(" ",", ",$p_tags.' '.$p_name.' '.$cat_name); $keywords = str_replace("|",", ",$p_tags.' '.$p_name.' '.$cat_name); }//estore_page = item if($estore_page=='admin'){ header("Location: ".c_main_domain."classifieds/my"); exit(); } define('pagetoload',site_root.site_dir.'plugins/classifieds/inx_efront_'.$estore_page.'.php'); include($main_template_dir.'template.php'); } else { define('pagetoload',site_root.site_dir.'plugins/classifieds/inx_front_estore.php'); include($main_template_dir.'template.php'); } } else { define('pagetoload',site_root.site_dir.'plugins/classifieds/inx_front_estore.php'); include($main_template_dir.'template.php'); } } else { define('pagetoload',site_root.site_dir.'plugins/classifieds/inx_front_ustore.php'); include($main_template_dir.'template.php'); } } else { define('pagetoload',site_root.site_dir.'plugins/classifieds/inx_index.php'); include($main_template_dir.'template.php'); } if(c_cache==1){ $c->end(); } VDEnd(); mysql_close(con_dna); mysql_close(con_dnadelete); mysql_close(con_dnainsert); mysql_close(con_dnaupdate); ob_end_flush(); ?>