[ Index ]
 

Code source de e107 0.7.8

Accédez au Source d'autres logiciels libresSoutenez Angelica Josefina !

title

Body

[fermer]

/e107_plugins/search_menu/ -> search_menu.php (source)

   1  <?php
   2  /*
   3  + ----------------------------------------------------------------------------+
   4  |     e107 website system
   5  |
   6  |     ©Steve Dunstan 2001-2002
   7  |     http://e107.org
   8  |     jalist@e107.org
   9  |
  10  |     Released under the terms and conditions of the
  11  |     GNU General Public License (http://gnu.org).
  12  |
  13  |     $Source: /cvsroot/e107/e107_0.7/e107_plugins/search_menu/search_menu.php,v $
  14  |     $Revision: 1.18 $
  15  |     $Date: 2006/04/23 09:34:26 $
  16  |     $Author: sweetas $
  17  +----------------------------------------------------------------------------+
  18  */
  19  if (!defined('e107_INIT')) { exit; }
  20  
  21  @include(e_PLUGIN."search_menu/languages/".e_LANGUAGE.".php");
  22  if (strstr(e_PAGE, "news.php")) {
  23       $page = 0;
  24  } elseif(strstr(e_PAGE, "comment.php")) {
  25       $page = 1;
  26  } elseif(strstr(e_PAGE, "content.php") && strstr(e_QUERY, "content")) {
  27       $page = 2;
  28  } elseif(strstr(e_PAGE, "content.php") && strstr(e_QUERY, "review")) {
  29       $page = 3;
  30  } elseif(strstr(e_PAGE, "content.php") && strstr(e_QUERY, "content")) {
  31       $page = 4;
  32  } elseif(strstr(e_PAGE, "chat.php")) {
  33       $page = 5;
  34  } elseif(strstr(e_PAGE, "links.php")) {
  35       $page = 6;
  36  } elseif(strstr(e_PAGE, "forum")) {
  37       $page = 7;
  38  } elseif(strstr(e_PAGE, "user.php") || strstr(e_PAGE, "usersettings.php")) {
  39       $page = 8;
  40  } elseif(strstr(e_PAGE, "download.php")) {
  41       $page = 9;
  42  } else {
  43       $page = 99;
  44  }
  45  
  46  if (isset($custom_query[1]) && $custom_query[1] != '') {
  47      $image_file = ($custom_query[1] != 'default') ? $custom_query[1] : e_PLUGIN_ABS.'search_menu/images/search.png';
  48      $width = (isset($custom_query[2]) && $custom_query[2]) ? $custom_query[2] : '16';
  49      $height = (isset($custom_query[3]) && $custom_query[3]) ? $custom_query[3] : '16';
  50          $search_button = "<input type='image' src='".$image_file."' value='".LAN_180."' style='width: ".$width."px; height: ".$height."px; border: 0px; vertical-align: middle' name='s' />";
  51  } else {
  52      $search_button = "<input class='button search' type='submit' name='s' value='".LAN_180."' />";
  53  }
  54  
  55  if (isset($custom_query[5]) && $custom_query[5]) {
  56      $value_text = "value='".$custom_query[5]."' onclick=\"this.value=''\"";
  57  } else {
  58      $value_text = "value=''";
  59  }
  60  
  61  $text = "<form method='get' action='".e_HTTP."search.php'>
  62      <div>
  63      <input class='tbox search' type='text' name='q' size='20' ".$value_text." maxlength='50' />
  64      <input type='hidden' name='r' value='0' />";
  65      
  66      if (isset($custom_query[4]) && $custom_query[4] != '') {
  67          $text .= "<input type='hidden' name='ref' value='".$custom_query[4]."' />";
  68      }
  69      
  70      $text .= $search_button."
  71      </div>
  72      </form>";
  73  if (isset($searchflat) && $searchflat) {
  74      echo $text;
  75  } else {
  76      $ns->tablerender(LAN_180." ".SITENAME, "<div style='text-align:center'>".$text."</div>", 'search');
  77  }
  78  ?>


Généré le : Sun Apr 1 01:23:32 2007 par Balluche grâce à PHPXref 0.7