Просмотр файла includes/index.php

Размер файла: 1.52Kb
  1. <?php
  2. error_reporting(3);
  3.  
  4. include($rootpath."function.inc");
  5.  
  6. if (substr($_SERVER['QUERY_STRING'],0,9)=='not_found') include($rootpath."not_found_wap.php");
  7. if (substr($_SERVER['QUERY_STRING'],0,14)=='access_denided') include($rootpath."access_denided_wap.php");
  8.  
  9. define("DBName","kmx");
  10. define("HostName","localhost");
  11. define("UserName","kmx");
  12. define("Password","kmx-hosting");
  13.  
  14. $connectserv=@mysql_connect(HostName, UserName, Password);
  15. $selectDB=@mysql_select_db(DBName);
  16. $connect_bd=(($connectserv!=0)&&($selectDB!=0));
  17.  
  18. mt_srand((double)microtime()*1000000);
  19.  
  20. if ($HTTP_POST_VARS['query']!='')
  21. $target=explode('/',$HTTP_POST_VARS['query'],7);
  22. else
  23. $target=explode('/',$_SERVER['QUERY_STRING'],7);
  24.  
  25. if ($target[0]!='') $id =$target[0];
  26. if ($target[1]!='') $query0=$target[1];
  27. if ($target[2]!='') $query1=$target[2];
  28. if ($target[3]!='') $query2=$target[3];
  29. if ($target[4]!='') $query3=$target[4];
  30. if ($target[5]!='') $query4=$target[5];
  31. if ($target[6]!='') $query5=$target[6];
  32.  
  33. include($rootpath."user_check.inc");
  34.  
  35. #$msg='<small><b>В результате сбоя были повреждены некоторые сайты. Часть была восстановлена, часть пришлось восстанавливать из backup за 5:00 30.03.2005г. Приносим глубочайшие извинения!</b></small><br/>';
  36.  
  37. switch ($terminal)
  38. {
  39. case 'web': include($rootpath."web/index.php");
  40. case 'wap': include($rootpath."wap/index.php");
  41. case 'wap2': include($rootpath."wap2/index.php");
  42. case 'adm': include($rootpath."admin/index.php");
  43. default: include($rootpath."wap/index.php");
  44. }
  45. ?>