PageRenderTime 46ms CodeModel.GetById 23ms RepoModel.GetById 1ms app.codeStats 0ms

/baser/views/elements/search.php

https://github.com/hashing/basercms
PHP | 37 lines | 19 code | 0 blank | 18 comment | 4 complexity | 5665bc542ce8f2dcb649b2255e983fad MD5 | raw file
Possible License(s): MIT
  1. <?php
  2. /* SVN FILE: $Id$ */
  3. /**
  4. * [PUBLISH] サイト内検索フォーム
  5. *
  6. * PHP versions 5
  7. *
  8. * baserCMS : Based Website Development Project <http://basercms.net>
  9. * Copyright 2008 - 2012, baserCMS Users Community <http://sites.google.com/site/baserusers/>
  10. *
  11. * @copyright Copyright 2008 - 2012, baserCMS Users Community
  12. * @link http://basercms.net baserCMS Project
  13. * @package baser.views
  14. * @since baserCMS v 0.1.0
  15. * @version $Revision$
  16. * @modifiedby $LastChangedBy$
  17. * @lastmodified $Date$
  18. * @license http://basercms.net/license/index.html
  19. */
  20. if(Configure::read('BcRequest.isMaintenance')) {
  21. return;
  22. }
  23. if(!empty($this->passedArgs['num'])) {
  24. $url = array('plugin' => null, 'controller' => 'contents', 'num' => $this->passedArgs['num']);
  25. } else {
  26. $url = array('plugin' => null, 'controller' => 'contents');
  27. }
  28. ?>
  29. <div class="section search-box">
  30. <?php echo $bcForm->create('Content', array('type' => 'get', 'action' => 'search', 'url' => $url)) ?>
  31. <?php if(unserialize($bcBaser->siteConfig['content_categories'])) : ?>
  32. <?php echo $bcForm->input('Content.c', array('type' => 'select', 'options' => unserialize($bcBaser->siteConfig['content_categories']), 'empty' => 'カテゴリー: 指定しない ')) ?>
  33. <?php endif ?>
  34. <?php echo $bcForm->input('Content.q') ?>
  35. <?php echo $bcForm->submit('検索', array('div'=>false)) ?>
  36. <?php echo $bcForm->end() ?>
  37. </div>