PageRenderTime 37ms CodeModel.GetById 12ms RepoModel.GetById 0ms app.codeStats 0ms

/aoliz/core/include/smartyplugins/function.header.php

http://phpfor.googlecode.com/
PHP | 43 lines | 30 code | 5 blank | 8 comment | 1 complexity | f3d11b6aa8e17cece759573940690fbd MD5 | raw file
  1. <?php
  2. function tpl_function_header($params, &$smarty)
  3. {
  4. $system = &$GLOBALS['system'];
  5. $data['TITLE'] = &$smarty->title;
  6. $data['KEYWORDS'] = &$smarty->keywords;
  7. $data['DESCRIPTION'] = &$smarty->desc;
  8. $data['headers'] = &$system->ctl->header;
  9. $output = &$system->loadModel('system/frontend');
  10. $data['theme_dir'] = $system->base_url().'themes/'.$output->theme;
  11. if($theme_info=($system->getConf('site.theme_'.$system->getConf('system.ui.current_theme').'_color'))){
  12. $data['theme_color_href']=$system->base_url().'themes/'.$system->getConf('system.ui.current_theme').'/'.$theme_info;
  13. }
  14. //echo $system->getConf('site.theme_'.$system->getConf('system.ui.current_theme').'_color');
  15. $shop=array('set'=>array());
  16. $shop['set']['path'] = substr(PHP_SELF, 0, strrpos(PHP_SELF, '/') + 1);
  17. $shop['set']['buytarget']=$system->getConf('site.buy.target'); //ajax?????
  18. $shop['set']['dragcart']=$system->getConf('ux.dragcart');; //????
  19. $shop['set']['refer_timeout']=$system->getConf('site.refer_timeout');; //refer????
  20. $shop['url']['addcart'] = $system->mkUrl('cart','ajaxadd');
  21. $shop['url']['shipping'] = $system->mkUrl('cart','shipping');
  22. $shop['url']['payment'] = $system->mkUrl('cart','payment');
  23. $shop['url']['total'] = $system->mkUrl('cart','total');
  24. $shop['url']['viewcart'] = $system->mkUrl('cart','view');
  25. $shop['url']['ordertotal'] = $system->mkUrl('cart','total');
  26. $shop['url']['applycoupon'] = $system->mkUrl('cart','applycoupon');
  27. $shop['url']['diff'] = $system->mkUrl('product','diff');
  28. $data['shopDefine'] = json_encode($shop);
  29. /*if(constant('DEBUG_JS')){
  30. $data['scripts'] = find(BASE_DIR.'/statics/headjs_src','js','statics/headjs_src');
  31. }elseif(constant('GZIP_JS')){
  32. $data['scripts'] = array('statics/head.jgz');
  33. }else{
  34. $data['scripts'] = array('statics/head.js');
  35. }*/
  36. echo $smarty->_fetch_compile_include('shop:common/header.html',$data);
  37. }
  38. ?>