Changeset 82 for db/index.php
- Timestamp:
- Sep 29, 2007, 8:25:17 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
db/index.php
r77 r82 5 5 6 6 /* =========== Config =========== */ 7 if( !file_exists('./config.php') ){ exit; }; 7 8 require_once './config.php'; 8 9 9 10 /* =========== Připojení k Databázi =========== */ 10 11 11 @mysql_connect( $Config['D atabase']['Host'], $Config['Database']['User'], $Config['Database']['Password'] )12 @mysql_connect( $Config['DB_read']['Database']['Host'], $Config['DB_read']['Database']['User'], $Config['DB_read']['Database']['Password'] ) 12 13 OR DIE("<p>Vyskytla se chyba a nelze se připojit k databázi.<br> Zkuste to později.</p>"); 13 mysql_select_db($Config['DB_read']['Database'])14 OR DIE("<p>Nepodařilo se nastavit pracovní databázi ".$Config['DB_read']['D atabase']."!</p>");15 mysql_query("SET NAMES ".$Config['DB_read']['Charset']);14 @mysql_select_db($Config['DB_read']['DB_read']['Database']) 15 OR DIE("<p>Nepodařilo se nastavit pracovní databázi ".$Config['DB_read']['DB_read']['Database']."!</p>"); 16 @mysql_query("SET NAMES ".$Config['DB_read']['DB_read']['Charset']); 16 17 17 18 /* =========== Speciální FCE =========== */ … … 20 21 $str = @str_replace("\r","",$str); 21 22 return $str; 23 }; 24 25 function AbsCheck($int){ return (abs($int)==$int)? true : false; }; 26 27 function CheckQuestRace(){ 28 22 29 }; 23 30 … … 108 115 /* =========== GET hodnoty =========== */ 109 116 $id = $_GET['id']; // tady získá id z adresy 117 $q = addslashes($_GET['q']); 110 118 $limit = $_GET['list']; // tady získá list z adresy 111 119 if( is_numeric($limit) == FALSE ){ unset($limit); }; 112 120 if( $limit < 1 OR empty($limit) ){ $limit = 1; }; 113 121 $quest = addslashes($_GET['quest']); 122 if( is_numeric($quest) == FALSE ){ unset($quest); }; 123 $creature = addslashes($_GET['creature']); 124 if( is_numeric($creature) == FALSE ){ unset($creature); }; 114 125 $lvl_d = addslashes($_GET['lvl_d']); 115 126 if( is_numeric($lvl_d) == FALSE ){ unset($lvl_d); };
Note:
See TracChangeset
for help on using the changeset viewer.