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 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158
|
<?
require "secure/db.inc";
if (!isset($_COOKIE['EJcookie']))
{
if(isset($_POST) && !empty($_POST['user']) && !empty($_POST['pass']))
{
extract($_POST);
$sql = "select * from users where user='".$user."'";
$req = mysql_query($sql) or die('Erreur SQL !<br>'.$sql.'<br>'.mysql_error());
$data = mysql_fetch_assoc($req);
if($data['pass'] != md5($pass)) { $secu=3; }
else { $secu=$data['secu']; setcookie("EJcookie",$user); }
}
else
{ $secu=0; }
}
else
{
$user=$_COOKIE['EJcookie'];
$sql = "select * from users where user='".$user."'";
$req = mysql_query($sql) or die('Erreur SQL !<br>'.$sql.'<br>'.mysql_error());
$data = mysql_fetch_assoc($req);
$secu=$data['secu'];
}
?>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Famille Elias-Jean</title>
<link href="style.css" rel="stylesheet" type="text/css">
<script type="text/javascript" language="javascript">
function checkpage() {
if (document.getElementById){
document.getElementById('load').style.visibility='hidden';
}
}
</script>
</head>
<body onLoad="checkpage();" background="img/bckgrnd.jpg">
<table width="100%" border="1">
<tr>
<td width="10%">
<?
if ($secu==0)
{
echo "
<form name=\"CONNEXION\" method=\"post\" action=\"index.php\">
<table width=\"100%\" valign=\"top\" border=\"0\">
<tr>
<td width=\"50\" align=\"center\" id=\"texte1\">Login : </td>
<td align=\"left\"><input type=\"text\" name=\"user\" value=\"\"></td>
</tr>
<tr>
<td align=\"center\" id=\"texte1\">Pass : </td>
<td align=\"left\"><input type=\"password\" name=\"pass\" value=\"\"></td>
</tr>
<tr>
<td> </td>
<td align=\"left\"><input type=\"submit\" name=\"uservalid\" value=\"Se connecter\"></td>
</tr>
</table></form>";
}
elseif ($secu>0)
{
echo "<table width=\"100%\" border=\"1\"><tr><td align=\"center\"><span id=\"texte1\">".$data['user']."</span> <span id=\"texte2\">connecté</span></td></tr></table>";
}
?>
</td>
<td width="90%">
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="100%" height="100">
<param name="movie" value="img/myfile.swf">
<param name="quality" value="high">
<embed src="img/myfile.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="600" height="100"></embed>
</object>
</td>
</tr>
<tr>
<td rowspan="2" valign="top"><span id="texte1">
<?
if (isset($_GET['file']) && (!empty($_GET['file'])))
{
if ($_GET['file']=="photos")
{
if (isset($_GET['dir']) && (!empty($_GET['dir'])))
{ $cur=$_GET['dir']; }
else $cur="photos/content";
include "photos/functions.php";
$base="photos/content";
list_dir($base,$cur);
list_file($cur);
}
}
?>
</span></td>
<td height="50" align="center">
<?
if ($secu==1)
{
echo "
<a href=\"index.php?file=photos\"><img src=\"img/photos.png\" border=\"0\"></a>
<img src=\"img/sep.png\" border=\"0\">
<a href=\"index.php?file=videos\"><img src=\"img/videos.png\" border=\"0\"></a>
";
}
elseif ($secu==2)
{
echo "
<a href=\"index.php?file=photos\"><img src=\"img/photos.png\" border=\"0\"></a>
<img src=\"img/sep.png\" border=\"0\">
<a href=\"index.php?file=videos\"><img src=\"img/videos.png\" border=\"0\"></a>
<img src=\"img/sep.png\" border=\"0\">
<a href=\"index.php?file=admin\"><img src=\"img/admin.png\" border=\"0\"></a>
";
}
?>
</td>
</tr>
<tr>
<td height="1200" bgcolor="#333333" align="center" valign="top">
<?
if (isset($_GET['file']) && (!empty($_GET['file'])))
{
if ($_GET['file']=="photos")
{
if (isset($_GET['dir']) && (!empty($_GET['dir'])))
{
$dir= $_GET['dir'];
if (isset($_GET['show']) && (!empty($_GET['show'])))
{
$show= $_GET['show'];
echo "<img id=\"load\" src=\"img/loading.gif\" /><img src=\"$dir/$show\" width=\"800\" />";
}
else echo "";
}
else echo "";
}
if ($_GET['file']=="videos") { require "videos/index.php"; }
if (($_GET['file']=="admin") && ($secu==2)) { require "admin/index.php"; }
}
else
{
echo "
<img src=\"img/croixbasque.gif\">
<img src=\"img/bienvenue.gif\">
<img src=\"img/croixbasque.gif\">
</br>
<img src=\"img/accueil.gif\" width=\"50%\" align=\"center\">
";
}
?>
</td>
</tr>
</table>
</body>
</html> |