- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
- 31
- 32
- 33
- 34
- 35
- 36
- 37
- 38
- 39
- 40
- 41
- 42
- 43
- 44
- 45
/*Проверка авторизации*/
if ($action == 'login') {
if (($entlogin && $entpass) <> '') {
$per = "SELECT * FROM ".$sql_dop."users";
if(!mysql_query($per)) {
$page = 'error';
$id = '2,1,1';
}
$result = mysql_query($per);
$qwe = 0;
while ($row = mysql_fetch_row($result)) {
if ($entlogin == $row[1] && md5($entpass) == $row[2]) {
$qwe = 1;
$date = date("d m Y H:i:s");
$mmsec = microtime(msec);
$kod = md5($date.$row[0].$row[1].$row[2].$mmsec);
$does_into_sessions = "INSERT INTO ".$sql_dop."sessions(user,kod) VALUES ('$row[0]','$kod')";
if(!mysql_query($does_into_sessions)) {
error(3,1,1);
}
setcookie('session_code', $kod);
$ubr = 1;
if ($row[10] == 2) {
$urb = 2;
}
if ($row[10] == 3) {
$urb = 2;
}
setcookie('userbar', $urb);
$session_code = $kod;
$page = '';
}
}
} else {
$page = 'error';
$id = '5,0,0';
}
if ($qwe == 0) {
echo "<strong>Ошибка авторизации...</strong>";
echo "<meta http-equiv='refresh' content='1; url=index.php'>";
exit();
}
}
syntheticcharms 16.07.2011 18:56 # +1
bugmenot 16.07.2011 19:51 # +1
LegionDead 16.07.2011 19:55 # 0
Amadey 16.07.2011 19:58 # +5
Amadey 16.07.2011 18:57 # 0
Lure Of Chaos 16.07.2011 19:26 # +2
Nicklasos 17.07.2011 00:17 # +1
syntheticcharms 17.07.2011 01:03 # 0
KirAmp 17.07.2011 16:14 # 0
Lure Of Chaos 17.07.2011 18:25 # 0
Vasiliy 17.07.2011 18:35 # 0
bugmenot 17.07.2011 21:52 # 0
Lure Of Chaos 17.07.2011 22:14 # 0
bugmenot 18.07.2011 08:42 # 0
jQuery 18.07.2011 08:30 # 0
syntheticcharms 17.07.2011 01:01 # 0
if ($entlogin == $row[1] && md5($entpass) == $row[2]) , как будто про where человек не слышал
De-Luxis 17.07.2011 11:03 # 0
JeremyW 18.07.2011 19:35 # 0
Lure Of Chaos 18.07.2011 20:21 # +2
guest 19.07.2011 06:08 # 0
JeremyW 19.07.2011 12:56 # +1
SELECT $columns FROM $table WHERE $user=mysql_fetch_row(mysql_query('SELEC T ...'))[0] ORDER BY $_GET['сорт_колумн'];
LegionDead 19.07.2011 09:43 # −1