autorizator_user.php
2.39 KB
1
2
3
4
5
6
7
8
9
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
58
59
60
61
62
<?
// Ïîäêëþ÷åíèå
include_once($_SERVER['DOCUMENT_ROOT']."/config/config.php");
include_once($_SERVER['DOCUMENT_ROOT']."/account/func/func.php");
include_once($_SERVER['DOCUMENT_ROOT']."/account/func/func.eMailing.php");
global $GET;
if (!isset($_SESSION['user']['id'])) {
echo "<script language=\"JavaScript\">{ location.href=\"/\"; self.focus(); } </script>";
}
/* echo"
<link rel='stylesheet' href='/css/account.css' type='text/css'/>
<link rel='stylesheet' href='/css/admin.css' type='text/css'/>";
*/
// ===============================
// === Óâåäîìëåíèå î ñîîáùåíèè ===
// ===============================
/*
if (isset($_SESSION['user']['id'])) {
global $path; $message='';
// Ïîäñ÷åò íîâûõ ñîîáùåíèé
$sql = "SELECT id FROM zlo_users_message WHERE `status`=3 AND `to`='".$_SESSION['user']['id']."'";
$result = mysql_query($sql) or die(mysql_error());
$total_messages=mysql_affected_rows();
if ($total_messages!=0) {
$message="Ó âàñ $total_messages íîâûõ ñîîáùåíèé ";
}
// Ïîäñ÷åò íîâûõ îïðîñîâ
$sql = "SELECT a.id
FROM zlo_users_audience AS a
WHERE a.`date_end` > NOW( )
AND a.`show` =1
AND a.id NOT IN (
SELECT audience_id
FROM zlo_users_audience_answers AS w
WHERE w.user_id ='".$_SESSION['user']['id']."')";
$result = mysql_query($sql) or die(mysql_error());
$total_audience=mysql_affected_rows();
if ($total_audience!=0) {
$message.='\nÓ âàñ '.$total_audience.' íîâûõ îïðîñà.';
}
if ($message!='') {
// ×òî ïðè êàæäîì ïðîñìîòðå íå âûëàçèëà òàáëè÷êà ñ êîë. ñîîáùåíèé
if ((isset($path[2]) && $path[2]!='messages') || !isset($path[2])) {
if (!isset($_SESSION['user']['notify']['new_mail']) ||
isset($_SESSION['user']['notify']['new_mail']) && $_SESSION['user']['notify']['new_mail']==0) {
echo("<script>alert('$message')</script>");
$_SESSION['user']['notify']['new_mail']=1 ;
}
}
}
}
*/
?>