control.php 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. <?php
  2. /**
  3. * 物流自提服务站父类
  4. *
  5. ***/
  6. defined('InShopNC') or exit('Access Invalid!');
  7. class BaseDeliveryControl{
  8. /**
  9. * 构造函数
  10. */
  11. public function __construct(){
  12. /**
  13. * 读取通用、布局的语言包
  14. */
  15. Language::read('common');
  16. /**
  17. * 设置布局文件内容
  18. */
  19. Tpl::setLayout('delivery_layout');
  20. /**
  21. * SEO
  22. */
  23. $this->SEO();
  24. /**
  25. * 获取导航
  26. */
  27. Tpl::output('nav_list', rkcache('nav',true));
  28. }
  29. /**
  30. * SEO
  31. */
  32. protected function SEO() {
  33. Tpl::output('html_title','物流自提服务站 ' . C('site_name') . '');
  34. Tpl::output('seo_keywords','');
  35. Tpl::output('seo_description','');
  36. }
  37. }
  38. /**
  39. * 操作中心
  40. * @author Administrator
  41. *
  42. */
  43. class BaseDeliveryCenterControl extends BaseDeliveryControl{
  44. public function __construct() {
  45. parent::__construct();
  46. if ($_SESSION['delivery_login'] != 1) {
  47. @header('location: index.php?act=login');die;
  48. }
  49. }
  50. }
  51. /**
  52. * 操作中心
  53. * @author Administrator
  54. *
  55. */
  56. class BaseAccountCenterControl extends BaseDeliveryControl{
  57. public function __construct() {
  58. parent::__construct();
  59. Tpl::setLayout('login_layout');
  60. }
  61. }