show一段用Lafe写的代码
July 18th, 2011
- class Layout_My_Layout extends Base_Layout{
- function build(){
- if($ua->isPc) $this->pc->display();
- else if($ua->isPad) $this->pad->display();
- else if($ua->isPhone) $this->phone->display();
- }
- public function layout_pc(){
- $main_body = "left_2_right_3_5.Right";
- $side_bar = "left_2_right_3_5.Left";
- if($ua->userReverse){
- $main_body = "left_3_right_2_5.Left"; //用户选择把side_bar放在右边的设置
- $side_bar = "left_3_right_2_5.Right";
- }
- $this->{'Header common_header'} = $headder_data;
- $this->{"Body $main_body main_panel"} = $side_data;
- $this->{"Body $side_bar side_panel"} = $right_data;
- $this->{'Footer common_footer'} = $footer_data;
- }
- public function layout_pad(){
- ......
- }
- public function layout_phone(){
- ......
- }
- }
Lafe是什么语言?
看上一篇,呵呵~
请问想交换友情链接怎么弄?
看完代码有点感觉了,哈哈,谢谢博主分享