这个代码怎么显示不了上面的导航和底下的帮助信息啊

2016-07-07 15:14 来源:www.chinab4c.com 作者:ecshop专家

  1. <?php

  2. define('IN_ECS', true);

  3. require(dirname(__FILE__) . '/includes/init.php');

  4. $smarty->assign('group_buy_goods', index_get_group_buyex());

  5. $smarty->display("time.dwt");

  6. function index_get_group_buyex( )
  7. {
  8. $time = gmtime( );

  9. $sql = "SELECT gb.act_id AS group_buy_id, gb.goods_id, gb.ext_info, gb.goods_name,gb.end_time, g.goods_thumb,g.market_price, g.goods_img, gb.act_desc FROM ".$GLOBALS['ecs']->table( "goods_activity" )." AS gb, ".$GLOBALS['ecs']->table( "goods" )." AS g WHERE gb.act_type = '".GAT_GROUP_BUY."' AND g.goods_id = gb.goods_id AND gb.start_time <= '".$time."' AND gb.end_time >= '".$time."' AND g.is_delete = 0 ORDER BY gb.act_id DESC ".( "LIMIT 40" );
  10. $res = $GLOBALS['db']->query( $sql );
  11. while ( $row = $GLOBALS['db']->fetchRow( $res ) )
  12. {
  13. $row['market_price_no_format'] = $row['market_price'];
  14. $row['goods_img'] = get_image_path( $row['goods_id'], $row['goods_img'] );
  15. $row['thumb'] = get_image_path( $row['goods_id'], $row['goods_thumb'], TRUE );
  16. $ext_info = unserialize( $row['ext_info'] );
  17. $row = array_merge( $row, $ext_info );
  18. $price_ladder = $ext_info['price_ladder'];
  19. if ( !is_array( $price_ladder ) && empty( $price_ladder ) )
  20. {
  21. $row['last_price'] = price_format( 0 );
  22. }
  23. else
  24. {
  25. foreach ( $price_ladder as $amount_price )
  26. {
  27. $price_ladder[$amount_price['amount']] = $amount_price['price'];
  28. }
  29. }
  30. ksort( $price_ladder );
  31. $row['last_price_no_format'] = end( $price_ladder );
  32. $row['last_price'] = price_format( end( $price_ladder ) );
  33. $stat = group_buy_stat( $row['group_buy_id'], $row['deposit'] );
  34. $row['valid_order'] = $stat['valid_order'];
  35. $row['url'] = build_uri( "group_buy", array(
  36. "gbid" => $row['group_buy_id']
  37. ) );
  38. $row['short_name'] = 0 < $GLOBALS['_CFG']['goods_name_length'] ? sub_str( $row['goods_name'], $GLOBALS['_CFG']['goods_name_length'] ) : $row['goods_name'];
  39. $row['short_style_name'] = add_style( $row['short_name'], "" );
  40. $row['market_price'] = price_format( $row['market_price'] );
  41. $row['end_time'] = $row['end_time'];
  42. $group_buy_list[] = $row;

  43. }

  44. return $group_buy_list;
  45. }
  46. function get_goods_saving( $price, $market_price )
  47. {
  48. $total = array( "saving" => 0, "save_rate" => 0 );
  49. $total['saving'] = $market_price - $price;
  50. $total['save_rate'] = $market_price != 0 ? round( $price / $market_price, 2 ) * 10 : 0;
  51. return $total;
  52. }
复制代码
是在网上下载的一个代码,是限购的功能代码,,但是不能显示导航菜单,也不显示底部的帮助中心和版权等信息;;;高手帮忙改改啊;;

谢谢

回答:
你这个代码。没用把

www.bd600.com

因为你的代码中没有加载“导航栏”和“帮助中心”的代码。
修改如下:



require(dirname(__FILE__) . '/includes/init.php');

下边增加以下两行代码

assign_template();
$smarty->assign('helps',get_shop_help()); // 网店帮助

只为下个模板 之前下载附件很简单现在 居然要达到高级会员才可以下载附件。这个也太伤人了吧!难道要不停的回帖 。。回个几百才能达到下载附件的资格,谁又那么有空来回个几百帖呢?为了能下我喜爱板子我开始疯狂的回帖请各位大大见谅......希望官方能改下权限!

要调用公共的导航数据

看下4楼的答复吧