Project

General

Profile

mdi.php

mdi.php - sigap, 08/18/2009 07:27 PM

 
1
<?
2
include("connect.php");
3
include("getsomething.php");
4
$djour=date("Y-m-d H:i:s");
5
// Request to update last user page
6
if (isset($_SERVER['HTTP_REFERER']) ) {
7
        $requete2="Update spy set page='".$_SERVER['HTTP_REFERER']."' where userid=".getuserid($_SESSION['uzrlogin']); 
8
        $ret2 = mysql_query ($requete2) or die (mysql_error ()); // Request execution
9
}
10
//If User is logging out
11
if (isset($_GET['logout'])) {
12
        $sid=$_SESSION['sid'];
13
        $requete="UPDATE session set date_fin='$djour' where session_id='$sid'";
14
        $ret = mysql_query ($requete) or die (mysql_error ());
15
        $requete1="Update user set user_last_session='".$sid."' where user_id=".getuserid($_SESSION['uzrlogin']); // Request to update last user session
16
        $ret1 = mysql_query ($requete1) or die (mysql_error ()); // Request execution
17
        session_destroy();
18
        header("location:index.php");
19
}
20

    
21
if (isset($_SESSION['uzrlogin'])) {
22
        $uzr=$_SESSION['uzrlogin'];
23
        if (isset($_GET['tag']) && $_GET['tag']<>'') {
24
                $pageid=$_GET['tag'];
25
        }else{
26
                $pageid="0";
27
        }
28
        $uzr_id=getuserid($uzr);
29
echo "<html xmlns=\"http://www.w3.org/1999/xhtml\">
30
<head>
31
<meta http-equiv=\"Content-Type\" content=\"text/html; charset=iso-8859-1\" />
32
<title>Portfolio | ".strtoupper($uzr)."</title>
33
<link rel=\"stylesheet\" href=\"stylesheets/stylesheet.css\" type=\"text/css\" />
34
<link rel=\"stylesheet\" href=\"stylesheets/styleplanning.css\" type=\"text/css\">
35
<script language=javascript src=js/menu-constructor.js ></script>
36
<script language=javascript src=js/add_remove.js></script>
37
<script language=javascript src=js/planning.js ></script>
38
<script language=javascript src=js/functions.js></script>
39
<script language=javascript>
40
function writediv(id,nom)
41
        { ";
42
                echo"document.getElementById('pageNav').innerHTML =";
43
                include("contextual.php");
44
echo"}
45
</script>
46
</head>
47
<body onmousemove=\"closesubnav(event);\">";
48
// Fanion Portfolio
49
echo'
50
<div id=deconnexion><a href='.getPage("config/pages/principale").'?logout onclick="return confirm(\'Confirmez-vous votre d?connexion de Portfolio ?\');"><img border="0" src="pict/Bouton-Deconnexion.gif" /></a></div>
51
<table width=100% border=0 cellpadding=0 cellspacing=0>
52
        <tr><td height=21 background=pict/Portfolio-charte-bg.gif width=100%>
53
        <img src=pict/Portfolio-etiquette.gif /> 
54
        </td></tr>
55
        <tr><td width=100% bgcolor=#ffffff>';
56
// Portfolio Toolbar
57
        include("Portfolio-toolbar.php");
58
echo'</td></tr>
59
        </table>';
60
        if (isset($_GET['tag'])) {
61
                $urlvar=getPage("config/pages/principale")."?tag=".$_GET['tag']."&tab=";
62
        }else{
63
                $urlvar=getPage("config/pages/principale")."?tab=";
64
        }
65
        if (isset($_GET['tab']) && $_GET['tab']<>"") {
66
                $tab=$_GET['tab'];
67
                if ($tab=="d") {
68
                        $imagedossier="pict/onglet-dossier-actif.gif";
69
                        $imageannonce="pict/onglet-annonce.gif";
70
                        $imageplanning="pict/onglet-planning.gif";
71
                }
72
                if ($tab=="a") {
73
                        $imagedossier="pict/onglet-dossier.gif";
74
                        $imageannonce="pict/onglet-annonce-actif.gif";
75
                        $imageplanning="pict/onglet-planning.gif";
76
                }
77
                if ($tab=="p") {
78
                        $imagedossier="pict/onglet-dossier.gif";
79
                        $imageannonce="pict/onglet-annonce.gif";
80
                        $imageplanning="pict/onglet-planning-actif.gif";
81
                }
82
        }else{
83
                $imagedossier="pict/onglet-dossier-actif.gif";
84
                $imageannonce="pict/onglet-annonce.gif";
85
                $imageplanning="pict/onglet-planning.gif";
86
        }        
87
// Onglet Portfolio
88
$id_div="";
89
if (getNav()=="MSIE") {
90
        $id_div="utility_ie";
91
}
92
if (getNav()=="Firefox") {
93
        $id_div="utility";
94
}
95
echo"<div id=".$id_div.">
96
                        <a href=".getPage("config/pages/principale")."><img src=pict/onglet-accueil.gif border=0 /></a>
97
                        <a href=".$urlvar."d><img src=$imagedossier border=0 /></a>
98
                        <a href=".$urlvar."a><img src=$imageannonce border=0 /></a>
99
                        <a href=".$urlvar."p><img src=$imageplanning border=0 /></a>
100
                </div>";
101
// Menu Horizontal
102
include("menu.php");
103
// Zone Dynamique du document
104
echo'<div id=pagecell1>
105
                <img src=pict/tl_curve_white.gif height=6 width=6 id=tl />
106
                <img src=pict/tr_curve_white.gif height=6 width=6 id=tr />';
107
                // Zone titre de page
108
                include("page-title.php");
109
                //Menu Contextuel
110
                include("right-click.php");
111
                 //Zone Centrale
112
                include("mainframe.php");
113
                 // Ligne d'infos Appli
114
                include("info-Portfolio.php");
115
                echo'<br />';
116
                //Script cache menu
117
                include("cache_menu.php");
118
                echo '<script language=javascript src=js/info-bulle.js ></script>';
119
                echo'</body></html>' ;
120
echo'</div>';
121
} else { // si session_login no set
122
        include("requireid.php");
123
}
124

    
125
?>