buntfu Posted February 13, 2008 Share Posted February 13, 2008 it is pulling the featured store stuff twice on the mainpage.. its only supposed to be store image and info underneath not twice. www.buntfu.com <!--- Start of Featured Store Mod ---> <? if ($setts['enable_stores']) { ?> <?=headercat(MSG_FEATURED_STORES);?> <table width="100%" border="0" cellspacing="1" cellpadding="2" bgcolor="#fffdf4" style="border-left: 1px solid #BAFF98; border-right: 1px solid #BAFF98; border-bottom: 1px solid #BAFF98;"> <? if ($_GET['start'] == "") $start = 0; else $start = $_GET['start']; $limit = 1; $select_condition = "LEFT JOIN " . DB_PREFIX . "fees_tiers s ON shop_account_id=tier_id WHERE active=1 AND shop_active=1 AND store_featured=1"; $getStores = mysql_query("SELECT user_id, shop_logo_path, username, shop_name, aboutme_page_content, shop_nb_items FROM probid_users WHERE active='1' AND shop_active='1' AND shop_nb_items>'0' AND aboutme_page_type='0'".$addQuery." order by rand() ASC LIMIT ".$start.",".$limit) or die(mysql_error()); ?> <? $feat_stores_details = $db->random_rows('users', 'user_id, shop_name, shop_logo_path, shop_mainpage, username, shop_nb_items', $select_condition, 4); (string) $featured_stores_table = null; for ($i=3; $i<$nb_featured_stores; $i++) { $store_link = process_link('shop', array('name' => $feat_stores_details[$i]['shop_name'], 'username' => $feat_stores_details[$i]['username'], 'user_id' => $feat_stores_details[$i]['user_id'])); $store_logo = (!empty($feat_stores_details[$i]['shop_logo_path'])) ? $feat_stores_details[$i]['shop_logo_path'] : 'images/noimg.gif'; ?> <tr height="15" class="<? echo (($count++)%2==0) ? "item":"item"; ?>"> <? $storepath = $feat_stores_details[$i]['shop_logo_path']; ?> <TD align=center> <div><img src='themes/<?=$setts['default_theme'];?>/img/pixel.gif' width='1' height='5'></div> <div><img src='themes/<?=$setts['default_theme'];?>/img/pixel.gif' width='1' height='5'></div> <a href="<?=process_link('shop', array('name' => $feat_stores_details[$i]['shop_name'], 'username' => $feat_stores_details[$i]['username'], 'user_id' => $feat_stores_details[$i]['user_id'])); ?>"> <img src="<? echo 'thumbnail.php?pic=' . $store_logo . '&w=125&sq=Y&b=Y" border="0" alt="' . $feat_stores_details[$i]['shop_name'];?>"></a> <BR><a href="<?=process_link('shop', array('name' => $feat_stores_details[$i]['shop_name'], 'username' => $feat_stores_details[$i]['username'], 'user_id' => $feat_stores_details[$i]['user_id'])); ?>"><?=$feat_stores_details[$i]['shop_name'];?></a> <BR>ITEMS STORE: <?=$feat_stores_details[$i]['shop_nb_items'];?> <BR>SELLER: <a href="user_reputation.php?user_id=<?=$feat_stores_details[$i]['user_id'];?>"><?=$feat_stores_details[$i]['username'];?></a> </TD> </tr><? } ?> </table> <? } ?> <!--- End of Featured Store Mod ---> Quote Link to comment https://forums.phpfreaks.com/topic/90799-what-is-wrong-with-this/ Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.