store_free_freight.php 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. <?php
  2. /**
  3. * 免运费额度设置
  4. *
  5. *
  6. *
  7. **by 好商城V3 www.33hao.com 运营版*/
  8. defined('InShopNC') or exit('Access Invalid!');
  9. class store_free_freightControl extends BaseSellerControl {
  10. public function __construct(){
  11. parent::__construct();
  12. }
  13. public function indexOp(){
  14. $model_store = Model('store');
  15. if (chksubmit()) {
  16. $store_free_price = floatval(abs($_POST['store_free_price']));
  17. $store_free_time = $_POST['store_free_time'];
  18. $model_store->editStore(array('store_free_price'=>$store_free_price,'store_free_time'=>$store_free_time),array('store_id'=>$_SESSION['store_id']));
  19. showDialog(L('nc_common_save_succ'),'reload','succ');
  20. }
  21. Tpl::output('store_free_price',$this->store_info['store_free_price']);
  22. Tpl::output('store_free_time',$this->store_info['store_free_time']);
  23. self::profile_menu('daddress','free_freight');
  24. Tpl::showpage('store_free_freight.index');
  25. }
  26. /**
  27. * 用户中心右边,小导航
  28. *
  29. * @param string $menu_type 导航类型
  30. * @param string $menu_key 当前导航的menu_key
  31. * @return
  32. */
  33. private function profile_menu($menu_type,$menu_key='') {
  34. $menu_array = array();
  35. switch ($menu_type) {
  36. case 'free_freight':
  37. $menu_array = array(
  38. array('menu_key'=>'free_freight', 'menu_name'=>'免运费额度', 'menu_url'=>'index.php?act=store_free_freight')
  39. );
  40. break;
  41. }
  42. Tpl::output('member_menu',$menu_array);
  43. Tpl::output('menu_key',$menu_key);
  44. }
  45. }
  46. ?>