-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathcommon-loggedin-header.php
106 lines (88 loc) · 2.95 KB
/
common-loggedin-header.php
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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
<?php
global $color_code;
global $color_theme;
global $ppc_engine_name;
global $page_width;
global $logo_path;
global $logo_display_option;
$thead=new Template();
$thead->loadTemplate("common-templates/common-loggedin-header.tpl.html");
$welcome= str_replace("{USERNAME}",$user->getUsername(),$thead->checkComMsg(1085));
$thead->setValue("{WELCOME1}",$welcome);
$selected_colorcode=array();
foreach ($color_code as $key=>$value)
{
if($key==$color_theme)
{
$selected_colorcode=$value;
break;
}
}
if(isset($_COOKIE['language'])&& ($_COOKIE['language']!=""))
{
$langid=$_COOKIE['language'];
$result=mysql_query("select code from adserver_languages where id='$langid'");
$row1=mysql_fetch_row($result);
$langcookie=$row1[0];
}
else
{
$langcookie=$GLOBALS['client_language'];
}
$header_ctrstr="";
$header_res=mysql_query("select * from adserver_languages where status='1' order by language asc");
// echo mysql_num_rows($res);
$header_ctrstr.="<select name=\"lang\" id=\"lang\" onChange=\"changelanguage();\" style=\"width:100px\" dir='ltr' >";
while($header_row=mysql_fetch_row($header_res))
{
$header_ctrstr.="<option value=\"$header_row[0]_$header_row[3]\"";
if($GLOBALS['client_language'] == $header_row[3])
$header_ctrstr.="selected";
$header_ctrstr.=">$header_row[1] </option>";
}
$header_ctrstr.="</select>";
//...............................Adserver5.4..........................
$thead->setValue("{OFFLINE}",$offline_image);
$thead->setValue("{CHATVISIBLE}",$chat_visible_status);
$thead->setValue("{ONLINE}",$online_image);
$thead->setValue("{CHATSTATUS}",$chat_status);
$thead->setValue("{PUBLICIMAGE}",$public_background);
$thead->setValue("{BANNERS}",$GLOBALS['banners_folder']);
if($chat_visible_status==1)
{
if($chat_status==1)
{
mysql_query("update nesote_chat_login_status set status=1 where user_id='1' ");
}
}
//...............................Adserver5.4..........................
$thead->setValue("{LOGODISPLAY}",$logo_display_option);
$thead->setValue("{COLORTHEME1}",$selected_colorcode[0]);
$thead->setValue("{COLORTHEME2}",$selected_colorcode[1]);
$thead->setValue("{COLORTHEME4}","style=\" color:$selected_colorcode[3]\"");
$thead->setValue("{ENGINE_NAME}",$template->checkComMsg(0001));
$thead->setValue("{LOGO}",$logo_path);
$thead->setValue("{PAGEWIDTH}",$page_width);
$thead->setValue("{LANGUAGE}",$header_ctrstr);
$thead->setValue("{COLORTHEME1}",$selected_colorcode[0]);
$thead->setValue("{BANNERS}",$GLOBALS['banners_folder']);
if($GLOBALS['direction']=="ltr")
{
$thead->setValue("{LEFTCLASS}",'headleft');
$thead->setValue("{RIGHTCLASS}",'headright');
}
else
{
$thead->setValue("{LEFTCLASS}",'headright');
$thead->setValue("{RIGHTCLASS}",'headleft');
}
if($bgimage_type==1)
{
$thead->setValue("{BGTYPE}","fixed");
}
else
{
$thead->setValue("{BGTYPE}","scroll");
}
eval('?>'.$thead->getPage().'<?php ');
?>