CopyrightController.class.php 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170
  1. <?php
  2. /**
  3. * lionfish 商城系统
  4. *
  5. *
  6. * @author fish
  7. *
  8. */
  9. namespace Seller\Controller;
  10. class CopyrightController extends CommonController{
  11. protected function _initialize(){
  12. parent::_initialize();
  13. }
  14. public function account()
  15. {
  16. //parameter[s_uname]
  17. //parameter[s_passwd]
  18. $info = M('seller')->where( array('s_id' => SELLERUID) )->find();
  19. if(IS_POST){
  20. $model=D('Admin/Seller');
  21. $data=I('post.parameter');
  22. $data['s_id'] = SELLERUID;
  23. $return=$model->edit_seller_user($data);
  24. show_json(1, array('url' => $_SERVER['HTTP_REFERER']));
  25. }
  26. $this->info = $info;
  27. $this->display();
  28. }
  29. public function index()
  30. {
  31. if (IS_POST) {
  32. $data = I('request.parameter');
  33. $data = $data;
  34. $data['footer_copyright_desc'] = trim($data['footer_copyright_desc']);
  35. $data['footer_copyright_logo'] = save_media($data['footer_copyright_logo']);
  36. $data['footer_copyright_url'] = trim($data['footer_copyright_url']);
  37. $data['footer_copyright_dialing'] = trim($data['footer_copyright_dialing']);
  38. $data['footer_copyright_tel'] = trim($data['footer_copyright_tel']);
  39. D('Seller/Config')->update($data);
  40. show_json(1, array('url' => $_SERVER['HTTP_REFERER']));
  41. }
  42. $data = D('Seller/Config')->get_all_config();
  43. $this->data = $data;
  44. $this->display();
  45. }
  46. public function about()
  47. {
  48. $_GPC = I('request.');
  49. if (IS_POST) {
  50. $data = ((is_array($_GPC['parameter']) ? $_GPC['parameter'] : array()));
  51. $data['personal_center_about_us'] = trim($data['personal_center_about_us']);
  52. $data['is_show_about_us'] = trim($data['is_show_about_us']);
  53. D('Seller/Config')->update($data);
  54. show_json(1, array('url' => $_SERVER['HTTP_REFERER']));
  55. }
  56. $data = D('Seller/Config')->get_all_config();
  57. $this->data = $data;
  58. $this->display();
  59. }
  60. public function ordericon()
  61. {
  62. $_GPC = I('request.');
  63. if (IS_POST) {
  64. $data = ((is_array($_GPC['parameter']) ? $_GPC['parameter'] : array()));
  65. $param = array();
  66. $param['user_order_menu_icons'] = array();
  67. $param['user_order_menu_icons']['i1'] = trim($data['user_order_menu_icon1']);
  68. $param['user_order_menu_icons']['i2'] = trim($data['user_order_menu_icon2']);
  69. $param['user_order_menu_icons']['i3'] = trim($data['user_order_menu_icon3']);
  70. $param['user_order_menu_icons']['i4'] = trim($data['user_order_menu_icon4']);
  71. $param['user_order_menu_icons']['i5'] = trim($data['user_order_menu_icon5']);
  72. $param['user_order_menu_icons'] = serialize($param['user_order_menu_icons']);
  73. D('Seller/Config')->update($param);
  74. show_json(1, array('url' => $_SERVER['HTTP_REFERER']));
  75. }
  76. $data = D('Seller/Config')->get_all_config();
  77. if(!is_array($data['user_order_menu_icons'])) $data['user_order_menu_icons'] = unserialize($data['user_order_menu_icons'] );
  78. $this->data = $data;
  79. $this->display();
  80. }
  81. public function icon()
  82. {
  83. $_GPC = I('request.');
  84. if (IS_POST) {
  85. $data = ((is_array($_GPC['parameter']) ? $_GPC['parameter'] : array()));
  86. $param = array();
  87. $param['user_order_menu_icons'] = array();
  88. $param['user_order_menu_icons']['i1'] = trim($data['user_order_menu_icon1']);
  89. $param['user_order_menu_icons']['i2'] = trim($data['user_order_menu_icon2']);
  90. $param['user_order_menu_icons']['i3'] = trim($data['user_order_menu_icon3']);
  91. $param['user_order_menu_icons']['i4'] = trim($data['user_order_menu_icon4']);
  92. $param['user_order_menu_icons']['i5'] = trim($data['user_order_menu_icon5']);
  93. $param['user_order_menu_icons'] = serialize($param['user_order_menu_icons']);
  94. $param['user_tool_icons'] = array();
  95. $param['user_tool_icons']['i1'] = trim($data['user_tool_icon1']);
  96. $param['user_tool_icons']['i2'] = trim($data['user_tool_icon2']);
  97. $param['user_tool_icons']['i3'] = trim($data['user_tool_icon3']);
  98. $param['user_tool_icons']['i4'] = trim($data['user_tool_icon4']);
  99. $param['user_tool_icons']['i5'] = trim($data['user_tool_icon5']);
  100. $param['user_tool_icons']['i6'] = trim($data['user_tool_icon6']);
  101. $param['user_tool_icons']['i7'] = trim($data['user_tool_icon7']);
  102. $param['user_tool_icons']['i8'] = trim($data['user_tool_icon8']);
  103. $param['user_tool_icons']['i9'] = trim($data['user_tool_icon9']);
  104. $param['user_tool_icons']['i10'] = trim($data['user_tool_icon10']);
  105. $param['user_tool_icons']['i11'] = trim($data['user_tool_icon11']);
  106. $param['user_tool_icons']['i12'] = trim($data['user_tool_icon12']);
  107. $param['user_tool_icons']['i13'] = trim($data['user_tool_icon13']);
  108. $param['user_tool_icons']['i14'] = trim($data['user_tool_icon14']);
  109. $param['user_tool_icons']['i15'] = trim($data['user_tool_icon15']);
  110. $param['user_tool_icons'] = serialize($param['user_tool_icons']);
  111. $param['user_tool_showtype'] = $data['user_tool_showtype'];
  112. D('Seller/Config')->update($param);
  113. show_json(1, array('url' => $_SERVER['HTTP_REFERER']));
  114. }
  115. $data = D('Seller/Config')->get_all_config();
  116. if(!is_array($data['user_order_menu_icons'])) $data['user_order_menu_icons'] = unserialize($data['user_order_menu_icons'] );
  117. if(!is_array($data['user_tool_icons'])) $data['user_tool_icons'] = unserialize($data['user_tool_icons'] );
  118. $this->data = $data;
  119. $this->display();
  120. }
  121. }
  122. ?>