CopyrightController.class.php 5.5 KB

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