人人商城

0_0_home.tpl.php 3.8KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. <?php defined('IN_IA') or exit('Access Denied');?><?php (!empty($this) && $this instanceof WeModuleSite) ? (include $this->template('common/header', TEMPLATE_INCLUDEPATH)) : (include template('common/header', TEMPLATE_INCLUDEPATH));?>
  2. <style type="text/css">
  3. body{
  4. font:<?php echo $_W['styles']['fontsize'];?> <?php echo $_W['styles']['fontfamily'];?>;
  5. color:<?php if(empty($_W['styles']['fontcolor'])) { ?>#555<?php } else { ?><?php echo $_W['styles']['fontcolor'];?><?php } ?>;
  6. padding:0;
  7. margin:0;
  8. background-image:url('<?php if(empty($_W['styles']['indexbgimg'])) { ?>./themes/default/images/bg_index.jpg<?php } else { ?><?php echo $_W['styles']['indexbgimg'];?><?php } ?>');
  9. background-size:cover;
  10. background-color:<?php if(empty($_W['styles']['indexbgcolor'])) { ?>#fbf5df<?php } else { ?><?php echo $_W['styles']['indexbgcolor'];?><?php } ?>;
  11. <?php echo $_W['styles']['indexbgextra'];?>
  12. }
  13. a{color:<?php echo $_W['styles']['linkcolor'];?>; text-decoration:none;}
  14. <?php echo $_W['styles']['css'];?>
  15. .home-container{width:58%;overflow:hidden;margin:.6em .3em;}
  16. .home-container .box-item{float:left;display:block;text-decoration:none;outline:none;width:5em;height:6em;margin:.1em;background:rgba(0, 0, 0, 0.3);text-align:center;color:#ccc;}
  17. .home-container i{display:block;height:45px; margin: 5px auto; font-size:35px; padding-top:10px; width:45px;}
  18. .home-container span{color:<?php echo $_W['styles']['fontnavcolor'];?>;display:block; width:90%; margin:0 5%; overflow:hidden; height:20px; line-height:20px;}
  19. .footer{color:#dddddd;}
  20. .home-container ul li{background-color:rgba(0, 0, 0, 0.3);padding:0 10px;margin:1%;display: inline-block;height:45px;width:100%;}
  21. .home-container ul li a{text-decoration: none;}
  22. .home-container .title{color:#ccc;}
  23. .home-container .createtime{color:#999;font-size:12px}
  24. </style>
  25. <div class="home-container clearfix">
  26. <?php $site_navs = modulefunc('site', 'site_navs', array (
  27. 'func' => 'site_navs',
  28. 'item' => 'row',
  29. 'limit' => 10,
  30. 'index' => 'iteration',
  31. 'multiid' => 0,
  32. 'uniacid' => 0,
  33. 'acid' => 0,
  34. )); if(is_array($site_navs)) { $i=0; foreach($site_navs as $i => $row) { $i++; $row['iteration'] = $i; ?>
  35. <?php echo $row['html'];?>
  36. <?php } } ?>
  37. <!-- 该分类下文章-start -->
  38. <?php if($_GPC['c'] == 'home' && !empty($_GPC['t'])) { ?>
  39. <ul class="list list-unstyled">
  40. <?php if(is_array($category_list)) { foreach($category_list as $cid => $category) { ?>
  41. <?php $result = modulefunc('site', 'site_article', array (
  42. 'func' => 'site_article',
  43. 'cid' => $cid,
  44. 'return' => 'true',
  45. 'assign' => 'result',
  46. 'limit' => 10,
  47. 'index' => 'iteration',
  48. 'multiid' => 0,
  49. 'uniacid' => 0,
  50. 'acid' => 0,
  51. )); ?>
  52. <?php if(is_array($result['list'])) { foreach($result['list'] as $row) { ?>
  53. <li>
  54. <a href="<?php echo $row['linkurl'];?>">
  55. <div class="title"><?php echo cutstr($row['title'],10,1);?></div>
  56. <div class="createtime"><?php echo date('Y-m-d H:i:s', $row['createtime'])?></div>
  57. </a>
  58. </li>
  59. <?php } } ?>
  60. <?php } } ?>
  61. </ul>
  62. <?php } ?>
  63. <!-- 该分类下文章-start -->
  64. <ul class="list list-unstyled">
  65. <?php $result = modulefunc('site', 'site_article', array (
  66. 'module' => 'site',
  67. 'func' => 'site_article',
  68. 'cid' => $cid,
  69. 'assign' => 'result',
  70. 'return' => 'true',
  71. 'limit' => 10,
  72. 'index' => 'iteration',
  73. 'multiid' => 0,
  74. 'uniacid' => 0,
  75. 'acid' => 0,
  76. )); ?>
  77. <?php if(is_array($result['list'])) { foreach($result['list'] as $row) { ?>
  78. <li>
  79. <a href="<?php echo $row['linkurl'];?>">
  80. <div class="title"><?php echo cutstr($row['title'],40,1);?></div>
  81. <div class="createtime"><?php echo date('Y-m-d H:i:s', $row['createtime'])?></div>
  82. </a>
  83. </li>
  84. <?php } } ?>
  85. </ul>
  86. </div>
  87. <?php (!empty($this) && $this instanceof WeModuleSite) ? (include $this->template('common/footer', TEMPLATE_INCLUDEPATH)) : (include template('common/footer', TEMPLATE_INCLUDEPATH));?>