diff --git a/phptools.php b/phptools.php index 1080121..bd34e64 100644 --- a/phptools.php +++ b/phptools.php @@ -2,6 +2,10 @@ require_once 'tools.php'; + require_once 'tools_session.php'; + require_once 'form/form_editbox.php'; require_once 'form/form_button.php'; require_once 'form/form.php'; + + require_once 'ui_sidebar.php'; diff --git a/ui_sidebar.php b/ui_sidebar.php index 6f24406..e73343b 100644 --- a/ui_sidebar.php +++ b/ui_sidebar.php @@ -5,11 +5,30 @@ class UISideBar { - private $active=""; + private $active; + + private $screen_width; + private $screen_height; + + private $sidebar_width; //bootstarp中屏幕被分为12列宽,我们在PC桌面宽度环境,导航栏宽度设为1。手机/平板纵屏中,导航栏宽度设为2 public function __construct($a) { $this->active=$a; + + init_session(); + + $this->screen_width =$_SESSION["screen_width" ]; + $this->screen_height=$_SESSION["screen_height" ]; + + if($this->screen_width>$this->screen_height) //横向布局 + { + $this->sidebar_width=1; + } + else //纵向布局 + { + $this->sidebar_width=2; + } } private function echo_item($link,$text) @@ -24,30 +43,16 @@ private function echo_header() { - init_session(); + echo_html_header("ChinaMall ERP System"); - echo_html_header("CMI MoneyCabinet"); - - echo_title(); - - echo '