Вход Регистрация
Файл: manager3/search.php
Строк: 95
<?php
define
('_IN_JOHNCMS', 1);
$textl = 'Менеджер';
require_once (
"../incfiles/core.php");
require_once (
"../incfiles/head.php");
require_once (
"../incfiles/regglobals.php");
 
echo
'<b><center>*Football MANAGER*</center></b><br/>';

if (
$datauser['name'])
{

#### Проверка ####
$file=file("clubs.dat");
foreach (
$file as $key=>$val)
{
$uarr=explode("|",$val);
  if (
$uarr[1]==$datauser['name'])
   {
   
$club=$uarr[0];
echo 
$club;
echo 
'<br/>';   echo '<br/><center>Поиск игрока</center><br/>';
   }
}
########



if (!isset($act) || $act=="")
   {
   echo 
'<form action="search.php?act=go" method="post">
         Игрок(или часть имени):<input type="text" maxlength="20" name="pl"/><br/>
         <input type="submit" value="Найти"/></form>'
;
   }

  if (
$act=="go")
     {
$pl=htmlspecialchars($pl);
$pl=substr($pl,0,20);
$pl=trim($pl); 

echo
' Найденные игроки:<hr/>';


$arrita=array("Siena" , "Atalanta" , "Cagliari" , "Bologna" , "Lecce" , "Fiorentina" ,"Genoa" , "Inter" , "Juventus" , "Lazio" , "Chievo" , "Milan" , "Napoli" , "Palermo" , "Reggina" , "Roma" , "Sampdoria" , "Torino" , "Udinese" , "Catania");
$arreng=array("Arsenal" , "Aston_Villa" , "Hall_City" , "Blackburn" , "Bolton" , "Chelsea" ,"Stock_City" , "Everton" , "Fullham" , "Liverpool" , "Manchester_City" , "Manchester_United" , "Middlesbrough" , "Newcastle" , "Portsmouth" , "West_Bromvich" , "Sunderland" , "Tottenham" , "West_Ham" , "Wigan");
$arrspa=array("Barcelona" , "Valencia" , "Real_M" , "Sevilla" , "Atletico_M" , "Deportivo" , "Villarreal" , "Malaga" , "Valladolid" , "Getafe" , "Racing" , "Sporting_G" , "Athletic_B" , "Almeria" , "Betis" , "Numancia" , "Recreativo" , "Espanyol" , "Mallorca" , "Osasuna");  
$arrger=array("Hoffenheim" , "Bayern_M" , "Hertha" , "Hamburger" , "Bayer_L" , "Borussia_D" , "Schalke" , "Werder" , "Wolfsburg" , "Stuttgart" , "Cologne" , "Eintracht" , "Hannover_96" , "Arminia" , "Karlsruher" , "Energie_Cottbus" , "Bochum" , "Borussia_M");
$arrrus=array("Rubin" , "CSKA_M" , "Dynamo_M" , "Amkar" , "Zenit" , "Krylia_Sovetov" , "Lokomotiv_M" , "Spartak_M" , "Moscow" , "Terek" , "Saturn" , "Spartak_N" , "Tom" , "Khimki" , "Shinnik" , "Luch-Energiya");
$arrukr=array("Arsenal_K" , "Chornomorets" , "Dnepr" , "Dynamo_K" , "Illichivets" , "Karpaty" , "Kharkiv" , "Kryvbas" , "Lviv" , "Metalist_K" , "Metalurg_D" , "Metalurg_Z" , "Shakhtar" , "Tavriya" , "Vorskla" , "Zorya");

for (
$i=0;$i<count($arrita);$i++)
    {
    
$file=file(BASEDIR."manager3/italy/$arrita[$i].dat");
       foreach (
$file as $k=>$v)
                {
                
$ex=explode("|",$v);
                   if (
ereg($pl,$ex[0]))
                      {
$ex[2]=$ex[2]/1000000;
                      echo 
$ex[0].'/'.$ex[1].'('.$ex[3].'/'.$ex[4].'/'.$ex[5].'/'.$ex[6].'/'.$ex[7].'/'.$ex[8].') <br/>Клуб: '.$arrita[$i].' <br/> Цена: '.$ex[2].' млн.<hr/>';
                      }
                }
    }

for (
$i=0;$i<count($arreng);$i++)
    {
    
$file=file(BASEDIR."manager3/england/$arreng[$i].dat");
       foreach (
$file as $k=>$v)
                {
                
$ex=explode("|",$v);
                   if (
ereg($pl,$ex[0]))
                      {
$ex[2]=$ex[2]/1000000;
                      echo 
$ex[0].'/'.$ex[1].'('.$ex[3].'/'.$ex[4].'/'.$ex[5].'/'.$ex[6].'/'.$ex[7].'/'.$ex[8].') <br/>Клуб: '.$arreng[$i].' <br/> Цена: '.$ex[2].' млн.<hr/>';
                      }
                }
    }
for (
$i=0;$i<count($arrspa);$i++)
    {
    
$file=file(BASEDIR."manager3/spain/$arrspa[$i].dat");
       foreach (
$file as $k=>$v)
                {
                
$ex=explode("|",$v);
                 if (
ereg($pl,$ex[0]))
                      {
$ex[2]=$ex[2]/1000000;
                      echo 
$ex[0].'/'.$ex[1].'('.$ex[3].'/'.$ex[4].'/'.$ex[5].'/'.$ex[6].'/'.$ex[7].'/'.$ex[8].') <br/>Клуб: '.$arrspa[$i].' <br/> Цена: '.$ex[2].' млн.<hr/>';
                      }
                }
    }
for (
$i=0;$i<count($arrger);$i++)
    {
    
$file=file(BASEDIR."manager3/germany/$arrger[$i].dat");
       foreach (
$file as $k=>$v)
                {
                
$ex=explode("|",$v);
                 if (
ereg($pl,$ex[0]))
                      {
$ex[2]=$ex[2]/1000000;
                      echo 
$ex[0].'/'.$ex[1].'('.$ex[3].'/'.$ex[4].'/'.$ex[5].'/'.$ex[6].'/'.$ex[7].'/'.$ex[8].') <br/>Клуб: '.$arrger[$i].' <br/> Цена: '.$ex[2].' млн.<hr/>';
                      }
                }
    }
for (
$i=0;$i<count($arrrus);$i++)
    {
    
$file=file(BASEDIR."manager3/russia/$arrrus[$i].dat");
       foreach (
$file as $k=>$v)
                {
                
$ex=explode("|",$v);
                  if (
ereg($pl,$ex[0]))
                      {
$ex[2]=$ex[2]/1000000;
                      echo 
$ex[0].'/'.$ex[1].'('.$ex[3].'/'.$ex[4].'/'.$ex[5].'/'.$ex[6].'/'.$ex[7].'/'.$ex[8].') <br/>Клуб:'.$arrrus[$i].' <br/> Цена: '.$ex[2].' млн.<hr/>';
                      }
                }
    }
for (
$i=0;$i<count($arrukr);$i++)
    {
    
$file=file(BASEDIR."manager3/ukraine/$arrukr[$i].dat");
       foreach (
$file as $k=>$v)
                {
$ex[2]=$ex[2]/1000000;
                
$ex=explode("|",$v);
                  if (
ereg($pl,$ex[0]))
                      {
$ex[2]=$ex[2]/1000000;
                      echo 
$ex[0].'/'.$ex[1].'('.$ex[3].'/'.$ex[4].'/'.$ex[5].'/'.$ex[6].'/'.$ex[7].'/'.$ex[8].') <br/>Клуб: '.$arrukr[$i].' <br/> Цена: '.$ex[2].' млн.<hr/>';
                      }
                }
    }

    echo 
'[<a href="search.php">Назад</a>]<br/>';
   }






} else {
    echo 
'Игра доступна только зарегистрированым пользователям';
}



echo
'[<a href="main.php?'.SID.'">В панель управления</a>]<br/>';
require_once (
"../incfiles/end.php");
?>
Онлайн: 0
Реклама