linea21-core
[ class tree: linea21-core ] [ index: linea21-core ] [ all elements ]

Source for file list.php

Documentation is available at list.php

  1. <?php
  2. /**
  3.  * @package linea21.core
  4.  * @subpackage search
  5.  * @author linea21 <info@linea21.com>
  6.  * @version $id SVN
  7.  * @access public
  8.  * @license http://opensource.org/licenses/gpl-3.0.html
  9.  */
  10. ?>
  11. <div id="chemin">
  12. <ul>
  13.     <li><a href="index.php" class="chemin_home"><?php echo _t('way','home');?></a>
  14.     </li>
  15.     <li><a href="<?php echo $rub_link?>" id="chemin_<?php echo $rub?>"
  16.         class="chemin_rub"><?php echo _t('menu','search');?></a></li>
  17.     <li><span><?php echo formatNavTitle(_t('menu_alt',$rub)) ?></span></li>
  18. </ul>
  19. </div>
  20. <!--end barre haute -->
  21.  
  22. <?php
  23. include_once(THEME_ADMIN_PATH."quickicons.php");
  24. ?>
  25. <div class="contentcontainer"><?php include_once(override($dir.'/menurub.php'THEME_ADMIN_PATH))?>
  26. <div id="content">
  27. <?php
  28. if (!isset($_POST['valid'])) {
  29.   echo '<h2>' _t('menu','search''</h2>' END_LINE;
  30. ?>
  31.   <form action="<?php echo $_SERVER['PHP_SELF'];?>" method="post">
  32.     <div id="searchcontent">
  33.         <label for="search"><?php echo _t('search','keywords');?></label>
  34.         <input type="text" maxlength="150" class="textfield" name="search" id="search" style="margin-right: 30px" /> <br class="brendstep" />
  35.         <div style="margin: 3em 200px">
  36.             <input type="radio" name="searchtype" id="searchtype_1" value="one" checked="checked" />
  37.             <label for="searchtype_1" class="autowidth"><?php echo _t('search','one_of_them');?></label>
  38.             <input type="radio" name="searchtype" id="searchtype_2" value="all" />
  39.             <label for="searchtype_2" class="autowidth"><?php echo _t('search','all_of_them');?></label>
  40.             <input type="radio" name="searchtype" id="searchtype_3" value="exp" />
  41.             <label for="searchtype_3" class="autowidth"><?php echo _t('search','expression');?></label>
  42.         </div>
  43.         <input type="hidden" name="rub" id="rubsearch" value="<?php echo $rub;?>" />
  44.         <br class="brendstep" />
  45.         <input type="submit" value="<?php echo _t('search','text_button');?>" name="valid" class="button" id="validsearch" />
  46.     </div>
  47.    </form>
  48. <?php
  49. else {
  50.   $type 'ADMIN';
  51.   include_once($dir "/display.php");
  52.   if (!isset($_REQUEST['search']|| strlen($_REQUEST['search']<= 2)
  53.   {
  54.     echo '<div class="info">'.END_LINE;
  55.     echo _t('search','min_length');
  56.     echo  '</div>'.END_LINE;
  57.   else {
  58.     if (isset($_REQUEST['searchincome'])) $str trim($_REQUEST['searchincome']);
  59.     else $str $_REQUEST['search'];
  60.     if (!isset($_REQUEST['searchtype'])) $searchtype 'one';
  61.     else $searchtype $_REQUEST['searchtype'];
  62.     if($searchtype=='one'$display_method=_t('search','one_of_them');
  63.     if($searchtype=='all'$display_method=_t('search','all_of_them');
  64.     if($searchtype=='exp'$display_method=_t('search','expression');
  65.     echo '<h2>' _t('search','result''</h2>' END_LINE;
  66.  
  67.     echo '<div id="KeyWords">'.END_LINE;
  68.     echo _t('search','keywords');
  69.     echo formatText($str'2HTML').'<br />'.END_LINE;
  70.     echo _t('search','method');
  71.     echo $display_method.'<br />'.END_LINE;
  72.     echo '</div>'.END_LINE;
  73.     echo '<div id="search-results">'.END_LINE;
  74.     $start_time getmicrotime();
  75.     if ($rub == 'home'$rub 'all';
  76.     switch ($rub{
  77.         case 'page':
  78.             $l21auth->isSuperAdmin(DisplaySearchPage($str$type$searchtypeReloadIndex('admin');
  79.             break;
  80.       case 'project':
  81.         $l21auth->isSuperAdmin(DisplaySearchProject($str$type$searchtypeReloadIndex('admin');
  82.         break;
  83.       case 'news':
  84.         $l21auth->hasRight('news'DisplaySearchNews($str$type$searchtypeReloadIndex('admin');
  85.         break;
  86.       case 'newsletter':
  87.         $l21auth->isSuperAdmin(DisplaySearchNewsletter($str$type$searchtypeReloadIndex('admin');
  88.         break;
  89.       case 'publication':
  90.         $l21auth->hasRight('publication'DisplaySearchPublication($str$type$searchtypeReloadIndex('admin');
  91.         $l21auth->hasRight('publication'DisplaySearchPubliContents($str$type$searchtypeReloadIndex('admin');
  92.         break;
  93.       case 'workshop':
  94.         $l21auth->hasRight('workshop'DisplaySearchWorkshop($str$type$searchtypeReloadIndex('admin');
  95.         $l21auth->hasRight('workshop'DisplaySearchWorkshopRep($str$type$searchtypeReloadIndex('admin');
  96.         $l21auth->hasRight('workshop'DisplaySearchWorkshopRepContents($str$type$searchtypeReloadIndex('admin');
  97.         $l21auth->hasRight('workshop'DisplaySearchWorkshopCalendar($str$type$searchtypeReloadIndex('admin');
  98.         $l21auth->hasRight('workshop'DisplaySearchWorkshopCom($str$type$searchtypeReloadIndex('admin');
  99.         break;
  100.       case 'workshoprep':
  101.         $l21auth->hasRight('workshop'DisplaySearchWorkshopRep($str$type$searchtypeReloadIndex('admin');
  102.         $l21auth->hasRight('workshop'DisplaySearchWorkshopRepContents($str$type$searchtypeReloadIndex('admin');
  103.         break;
  104.       case 'dashboard':
  105.         $l21auth->hasRight('dashboard'DisplaySearchSdi($str$type$searchtypeReloadIndex('admin');
  106.         break;
  107.       case 'sdi':
  108.         $l21auth->hasRight('dashboard'DisplaySearchSdi($str$type$searchtypeReloadIndex('admin');
  109.         break;
  110.       case 'comment':
  111.         $l21auth->isSuperAdmin(DisplaySearchComment($str$type$searchtypeReloadIndex('admin');
  112.         break;
  113.       case 'yellowpages':
  114.         $l21auth->isSuperAdmin(DisplaySearchYellowpages($str$type$searchtypeReloadIndex('admin');
  115.         break;
  116.       case 'user':
  117.         $l21auth->isSuperAdmin(DisplaySearchUser($str$type$searchtypeReloadIndex('admin');
  118.         break;
  119.       case 'theme':
  120.         $l21auth->isSuperAdmin(DisplaySearchTheme($str$type$searchtypeReloadIndex('admin');
  121.         break;
  122.       case 'scale':
  123.         $l21auth->isSuperAdmin(DisplaySearchScale($str$type$searchtypeReloadIndex('admin');
  124.         break;
  125.       case 'level':
  126.         $l21auth->isSuperAdmin(DisplaySearchLevel($str$type$searchtypeReloadIndex('admin');
  127.         break;
  128.       case 'all':
  129.           if ($l21auth->isSuperAdmin()) DisplaySearchPage($str$type$searchtype);
  130.           echo '<hr />';
  131.         if ($l21auth->isSuperAdmin()) DisplaySearchProject($str$type$searchtype);
  132.         echo '<hr />';
  133.         if ($l21auth->hasRight('news')) DisplaySearchNews($str$type$searchtype);
  134.         echo '<hr />';
  135.         if ($l21auth->isSuperAdmin()) DisplaySearchNewsletter($str$type$searchtype);
  136.         echo '<hr />';
  137.         if ($l21auth->hasRight('publication')) DisplaySearchPublication($str$type$searchtype);
  138.         if ($l21auth->hasRight('publication')) DisplaySearchPubliContents($str$type$searchtype);
  139.         echo '<hr />';
  140.         if ($l21auth->hasRight('workshop')) DisplaySearchWorkshop($str$type$searchtype);
  141.         if ($l21auth->hasRight('workshop')) DisplaySearchWorkshopRep($str$type$searchtype);
  142.         if ($l21auth->hasRight('workshop')) DisplaySearchWorkshopRepContents($str$type$searchtype);
  143.         if ($l21auth->hasRight('workshop')) DisplaySearchWorkshopCalendar($str$type$searchtype);
  144.         if ($l21auth->hasRight('workshop')) DisplaySearchWorkshopCom($str$type$searchtype);
  145.         echo '<hr />';
  146.         if ($l21auth->hasRight('dashboard')) DisplaySearchSdi($str$type$searchtype);
  147.         echo '<hr />';
  148.         if ($l21auth->isSuperAdmin()) DisplaySearchComment($str$type$searchtype);
  149.         echo '<hr />';
  150.         if ($l21auth->isSuperAdmin()) DisplaySearchYellowpages($str$type$searchtype);
  151.         echo '<hr />';
  152.         if ($l21auth->isSuperAdmin()) DisplaySearchUser($str$type$searchtype);
  153.         echo '<hr />';
  154.         if ($l21auth->isSuperAdmin()) DisplaySearchTheme($str$type$searchtype);
  155.         echo '<hr />';
  156.         if ($l21auth->isSuperAdmin()) DisplaySearchScale($str$type$searchtype);
  157.         echo '<hr />';
  158.         if ($l21auth->isSuperAdmin()) DisplaySearchLevel($str$type$searchtype);
  159.         echo '<hr />';
  160.         break;
  161.       default:
  162.     }
  163.     echo '</div>'.END_LINE;
  164.     $end_time getmicrotime();
  165.     DisplayQueryTime($start_time$end_time);
  166.     logfile(LOG_KEYWORDS,array($str$type$searchtype$rubi2c_realip()));
  167.     
  168.     footerAddJS('../lib/js/jquery.easyMark.js');
  169.     // we remove words < 3 chars
  170.     $keywords preg_replace(array('/\b\w{1,2}\b/','/\s+/'),array('',' '),$_REQUEST['search']);
  171.     $js "$('#search-results').easymark('highlight', '".formatText($keywords)."');";
  172.     footerAddInlineJS($js);
  173.   }
  174. }
  175. ?>
  176. </div>
  177. <?php include_once(override($dir.'/help.php'THEME_ADMIN_PATH))?></div>

Documentation generated on Thu, 20 Mar 2014 16:48:41 +0100 by phpDocumentor 1.4.1