Authored by whb

在线登记

@@ -9,7 +9,8 @@ class Controller_Onlinereg extends Controller_Abstract @@ -9,7 +9,8 @@ class Controller_Onlinereg extends Controller_Abstract
9 */ 9 */
10 public function indexAction() 10 public function indexAction()
11 { 11 {
12 - 12 + $mediaTotal = Facade_Onlinereg::getDownloadTotalByType(Facade_Onlinereg::TYPE_ONLINE_MEDIA);
  13 + $this->_view['mediaTotal'] = $mediaTotal;
13 } 14 }
14 15
15 /** 16 /**
@@ -22,7 +23,7 @@ class Controller_Onlinereg extends Controller_Abstract @@ -22,7 +23,7 @@ class Controller_Onlinereg extends Controller_Abstract
22 } 23 }
23 24
24 /** 25 /**
25 - * 赞助商 26 + * 赞助商英文
26 */ 27 */
27 public function sponsorenAction() 28 public function sponsorenAction()
28 { 29 {
@@ -36,11 +37,13 @@ class Controller_Onlinereg extends Controller_Abstract @@ -36,11 +37,13 @@ class Controller_Onlinereg extends Controller_Abstract
36 public function mediaAction() 37 public function mediaAction()
37 { 38 {
38 $this->_view['type'] = Facade_Onlinereg::TYPE_ONLINE_MEDIA; 39 $this->_view['type'] = Facade_Onlinereg::TYPE_ONLINE_MEDIA;
  40 + $mediaTotal = Facade_Onlinereg::getDownloadTotalByType(Facade_Onlinereg::TYPE_ONLINE_MEDIA);
  41 + $this->_view['mediaTotal'] = $mediaTotal;
39 $this->setSession('yohood', 'type', Facade_Onlinereg::TYPE_ONLINE_MEDIA); 42 $this->setSession('yohood', 'type', Facade_Onlinereg::TYPE_ONLINE_MEDIA);
40 } 43 }
41 44
42 /** 45 /**
43 - * 新闻稿 46 + * 新闻稿英文
44 */ 47 */
45 public function mediaenAction() 48 public function mediaenAction()
46 { 49 {
@@ -58,7 +61,7 @@ class Controller_Onlinereg extends Controller_Abstract @@ -58,7 +61,7 @@ class Controller_Onlinereg extends Controller_Abstract
58 } 61 }
59 62
60 /** 63 /**
61 - * 参展商 64 + * 参展商英文
62 */ 65 */
63 public function exhibitorenAction() 66 public function exhibitorenAction()
64 { 67 {
@@ -230,7 +233,7 @@ class Controller_Onlinereg extends Controller_Abstract @@ -230,7 +233,7 @@ class Controller_Onlinereg extends Controller_Abstract
230 */ 233 */
231 public function downloadAction() 234 public function downloadAction()
232 { 235 {
233 - $id = $this->_request->query('id'); 236 + $id = intval($this->_request->query('id'));
234 if(!empty($id)) 237 if(!empty($id))
235 { 238 {
236 $download = Facade_Onlinereg::getDownloadById($id); 239 $download = Facade_Onlinereg::getDownloadById($id);
@@ -13,7 +13,9 @@ @@ -13,7 +13,9 @@
13 <div class="background"><a href="/onlinereg/media"></a></div> 13 <div class="background"><a href="/onlinereg/media"></a></div>
14 <div class="apply-operate"> 14 <div class="apply-operate">
15 <a href="/onlinereg/media">在线登记</a> 15 <a href="/onlinereg/media">在线登记</a>
16 - <a href="/onlinereg/mediadown">新闻稿下载</a> 16 + <?php if(!empty($this->mediaTotal)):?>
  17 + <a href="/onlinereg/mediadown">新闻稿下载</a>
  18 + <?php endif;?>
17 </div> 19 </div>
18 </li> 20 </li>
19 <li class="apply-right"> 21 <li class="apply-right">
@@ -9,7 +9,9 @@ @@ -9,7 +9,9 @@
9 <div class="submit-content"> 9 <div class="submit-content">
10 <div class="page-header"> 10 <div class="page-header">
11 <a href="/onlinereg/media" class="active"><span>在线登记</span></a> 11 <a href="/onlinereg/media" class="active"><span>在线登记</span></a>
12 - <a href="/onlinereg/mediadown" class="end"><span>新闻稿下载</span></a> 12 + <?php if(!empty($this->mediaTotal)):?>
  13 + <a href="/onlinereg/mediadown" class="end"><span>新闻稿下载</span></a>
  14 + <?php endif;?>
13 </div> 15 </div>
14 <div class="pull-left"> 16 <div class="pull-left">
15 <div class="content-sub"> 17 <div class="content-sub">