- 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
- 46
- 47
- 48
- 49
- 50
- 51
- 52
- 53
- 54
- 55
- 56
- 57
/* beg govno_2 */
$auk_connect = new mysqli($hostname, $username, $password, $auk_database);
if ($auk_connect->connect_error) {
trigger_error("Connection failed: " . $auk_connect->connect_error);
exit;
}
function getAukcionUserInfo($auk_user_id = null) {
global $auk_connect;
if (!is_numeric($auk_user_id)) {
return false;
}
$query_result = $auk_connect->query('SELECT * FROM `aukcion_users` au INNER JOIN wa_contact wc ON au.`contact_id` = wc.id
WHERE
wc.`id` = '.$auk_user_id.'');
if ($query_result) {
$auk_contact_info = $query_result->fetch_array(MYSQLI_ASSOC);
return $auk_contact_info;
} else {
return false;
}
}
// var_dump($_SESSION);
if (isset($_SESSION['auth_user'])) {
if (isset($_SESSION['auth_user']['id']) && ($_SESSION['auth_user']['id'] > 0)) {
$govno_2 = getAukcionUserInfo($_SESSION['auth_user']['id']);
if (empty($govno_2)) {
// разлогиниваемся с govno
//unset($_SESSION['ID_P']);
} elseif (isset($govno_2['akk_id']) && is_numeric($govno_2['akk_id'])) {
// var_dump('AKK_ID=', $govno_2['akk_id']);
$govno_3_result = mysql_query('SELECT akk, id_akk, contakt FROM akk WHERE id_akk = '.$govno_2['akk_id'].'');
if ($govno_3_result) {
$govno_contact_info = mysql_fetch_assoc($govno_3_result);
if (!empty($govno_contact_info)) {
$_SESSION['ID_P']=array(
1=>$govno_contact_info['id_akk'],
2=>md5($_SERVER['REMOTE_ADDR']),
3=>$govno_contact_info['contakt']
);
//var_dump('123123123123123123123');
}
}
}
} else {
// разлогиниваемся с govno
unset($_SESSION['ID_P']);
}
} else {
// разлогиниваемся с govno
unset($_SESSION['ID_P']);
}
//var_dump($_SESSION);
//}
/* end govno_2 */
govnokoder2 14.09.2016 13:33 # +1
$govno = mysql_query("SELECT akk, id_akk, contakt FROM akk WHERE akk <> ''");
while ($data = mysql_fetch_array($govno)) {
if ($data[0] == md5($_SERVER['REMOTE_ADDR'])) {
session_start();
$_SESSION['ID_P']=array(
1=>$data[1],
2=>md5($_SERVER['REMOTE_ADDR']),
3=>$data[2]
);
mysql_query("UPDATE akk SET akk='' WHERE id_akk = ".$data[1]);
break;
}
}
if(!$no_form)
{
if($_SESSION['ID_P'] && !$v_cabinete)
{
?>
Steve_Brown 14.09.2016 15:03 # 0
- Вот оно!
XEP 14.09.2016 18:30 # 0
huesto 14.09.2016 19:11 # 0
barop 14.09.2016 21:12 # −64
HAPKOMAH 14.09.2016 22:43 # 0
с тех пор как не пишешь на пхп?
BEPXOBHAR_PA9A 14.09.2016 23:31 # 0
HAPKOMAH 14.09.2016 23:44 # 0
BEPXOBHAR_PA9A 14.09.2016 23:47 # 0
HAPKOMAH 14.09.2016 23:48 # 0
HAPKOMAH 14.09.2016 23:56 # 0