forked from DarinPhillips/people-prodigy
/
footer.php
54 lines (39 loc) · 1.04 KB
/
footer.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
<?php
class Footer1
{
function footer_display($common,$db_object,$user_id)
{
$user_table=$common->prefix_table("user_table");
$sql="select user_type from $user_table where user_id='$user_id'";
$sql_res=$db_object->get_a_line($sql);
if($sql_res[user_type]=="external")
{
$path=$common->path;
$filename=$path."templates/ext_footer.html";
$values[path]="$common->http_path";
}
else
{
$path=$common->path;
$filename=$path."templates/footer.html";
}
$filecontent=$common->return_file_content($db_object,$filename);
$myhtml=<<<EOD
<a href="career/front_panel.php">Front Panel</a>
EOD;
$exist=$_COOKIE["viewasadmin"];
if($exist!="")
{
$filecontent=preg_replace("/<{(.*?)}>/s","",$filecontent);
}
else
{
$filecontent=preg_replace("/<{Admin_mode_Setup}>(.*)<{Admin_mode_Setup}>/s","",$filecontent);
}
$filecontent = $common->direct_replace($db_object,$filecontent,$values);
echo $filecontent;
}
}
$ftobj=new Footer1;
$ftobj->footer_display($common,$db_object,$user_id);
?>