moved /inc to ../includes
git-svn-id: svn://svn.cccv.de/engel-system@281 29ba0400-6e00-0410-a75a-ca02368028f8main
@ -0,0 +1,58 @@
|
|||||||
|
<?PHP
|
||||||
|
|
||||||
|
include ("./inc/config.php");
|
||||||
|
include ("./inc/error_handler.php");
|
||||||
|
include ("./inc/config_db.php");
|
||||||
|
if( !isset($_SESSION)) session_start();
|
||||||
|
include ("./inc/secure.php");
|
||||||
|
|
||||||
|
|
||||||
|
// Parameter check
|
||||||
|
if( !isset($_GET["UID"]) )
|
||||||
|
$_GET["UID"]= "-1";
|
||||||
|
|
||||||
|
$SQL= "SELECT * FROM `UserPicture` WHERE `UID`='". $_GET["UID"]. "'";
|
||||||
|
$res = mysql_query( $SQL, $con);
|
||||||
|
|
||||||
|
if( mysql_num_rows($res) == 1)
|
||||||
|
{
|
||||||
|
//genügend rechte
|
||||||
|
if( !isset($_SESSION['UID']) || $_SESSION['UID'] == -1)
|
||||||
|
{
|
||||||
|
header( "HTTP/1.0 403 Forbidden");
|
||||||
|
die( "403 Forbidden");
|
||||||
|
}
|
||||||
|
|
||||||
|
// ist das bild sichtbar?
|
||||||
|
if( (mysql_result($res, 0, "show")=="N") AND
|
||||||
|
($_SESSION['UID']!=$_GET["UID"]) AND
|
||||||
|
($_SESSION['CVS'][ "admin/UserPicture.php" ] == "N"))
|
||||||
|
{
|
||||||
|
$SQL= "SELECT * FROM `UserPicture` WHERE `UID`='-1'";
|
||||||
|
$res = mysql_query( $SQL, $con);
|
||||||
|
if( mysql_num_rows($res) != 1)
|
||||||
|
{
|
||||||
|
header( 'HTTP/1.0 404 Not Found');
|
||||||
|
die( "404 Not Found");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// bild aus db auslesen
|
||||||
|
$bild = mysql_result($res, 0, "Bild");
|
||||||
|
|
||||||
|
// ausgabe bild
|
||||||
|
header( "Accept-Ranges: bytes");
|
||||||
|
header( "Content-Length: ". strlen($bild));
|
||||||
|
header( "Content-type: ". mysql_result($res, 0, "ContentType"));
|
||||||
|
header( "Cache-control: public");
|
||||||
|
header( "Cache-request-directive: min-fresh = 120");
|
||||||
|
header( "Cache-request-directive: max-age = 360");
|
||||||
|
echo $bild;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
header( 'HTTP/1.0 404 Not Found');
|
||||||
|
die( "404 Not Found");
|
||||||
|
}
|
||||||
|
|
||||||
|
?>
|
@ -0,0 +1,39 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
if( !isset($_SESSION['UID']))
|
||||||
|
$_SESSION['UID'] = -1;
|
||||||
|
|
||||||
|
// CVS import Data
|
||||||
|
$SQL = "SELECT * FROM `UserCVS` WHERE UID=".$_SESSION['UID'];
|
||||||
|
$Erg_CVS = mysql_query($SQL, $con);
|
||||||
|
$_SESSION['CVS'] = mysql_fetch_array($Erg_CVS);
|
||||||
|
|
||||||
|
//pagename ermitteln
|
||||||
|
$Page["Name"] = substr( $_SERVER['PHP_SELF'], strlen($ENGEL_ROOT) );
|
||||||
|
|
||||||
|
|
||||||
|
//recht für diese seite auslesen
|
||||||
|
if( isset( $_SESSION['CVS'][ $Page["Name"] ]))
|
||||||
|
$Page["CVS"] = $_SESSION['CVS'][ $Page["Name"] ];
|
||||||
|
else
|
||||||
|
{
|
||||||
|
echo "SYSTEM ERROR: now right for ". $Page["Name"]. "exist";
|
||||||
|
die;
|
||||||
|
}
|
||||||
|
|
||||||
|
if( $DEBUG )
|
||||||
|
{
|
||||||
|
// echo "UserID:". $_SESSION["UID"]. "<br>";
|
||||||
|
// echo "Nick:". $_SESSION["Nick"]. "<br>";
|
||||||
|
|
||||||
|
foreach( $_SESSION as $k => $v)
|
||||||
|
echo "$k = $v<br>\n";
|
||||||
|
|
||||||
|
if( strlen($Page["CVS"]) == 0 )
|
||||||
|
echo "<h1><u> CVS ERROR, on page '". $Page["Name"]. "'</u></h1>";
|
||||||
|
else
|
||||||
|
echo "CVS: ". $Page["Name"]. " => '". $Page["CVS"]. "'<br>";
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
?>
|
After Width: | Height: | Size: 933 B |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 581 B |
After Width: | Height: | Size: 286 B |
After Width: | Height: | Size: 266 B |
After Width: | Height: | Size: 293 B |
After Width: | Height: | Size: 685 B |
After Width: | Height: | Size: 276 B |
After Width: | Height: | Size: 1.0 KiB |
After Width: | Height: | Size: 1.0 KiB |
After Width: | Height: | Size: 1.0 KiB |
After Width: | Height: | Size: 980 B |
After Width: | Height: | Size: 322 B |
After Width: | Height: | Size: 731 B |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 1.0 KiB |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 883 B |
After Width: | Height: | Size: 364 B |
After Width: | Height: | Size: 662 B |
After Width: | Height: | Size: 223 B |
After Width: | Height: | Size: 1021 B |
After Width: | Height: | Size: 956 B |
After Width: | Height: | Size: 173 B |
After Width: | Height: | Size: 159 B |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 1.8 KiB |
After Width: | Height: | Size: 710 B |
After Width: | Height: | Size: 945 B |
After Width: | Height: | Size: 318 B |
After Width: | Height: | Size: 717 B |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 961 B |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 471 B |
After Width: | Height: | Size: 3.8 KiB |
After Width: | Height: | Size: 3.1 KiB |
After Width: | Height: | Size: 235 B |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 2.6 KiB |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 5.6 KiB |
After Width: | Height: | Size: 4.6 KiB |
After Width: | Height: | Size: 1.3 KiB |
After Width: | Height: | Size: 214 B |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 228 B |
After Width: | Height: | Size: 2.2 KiB |
After Width: | Height: | Size: 1021 B |
After Width: | Height: | Size: 223 B |
After Width: | Height: | Size: 176 B |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 572 B |
After Width: | Height: | Size: 1.0 KiB |
After Width: | Height: | Size: 163 B |
After Width: | Height: | Size: 2.6 KiB |
After Width: | Height: | Size: 236 B |
After Width: | Height: | Size: 232 B |
After Width: | Height: | Size: 240 B |
After Width: | Height: | Size: 233 B |
After Width: | Height: | Size: 448 B |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 171 B |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 4.4 KiB |
After Width: | Height: | Size: 158 B |
After Width: | Height: | Size: 5.7 KiB |
After Width: | Height: | Size: 161 B |
After Width: | Height: | Size: 204 B |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 653 B |
After Width: | Height: | Size: 2.0 KiB |
After Width: | Height: | Size: 324 B |
After Width: | Height: | Size: 1.0 KiB |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 154 B |
After Width: | Height: | Size: 2.2 KiB |
After Width: | Height: | Size: 173 B |
After Width: | Height: | Size: 757 B |
After Width: | Height: | Size: 206 B |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 240 B |
After Width: | Height: | Size: 659 B |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 3.7 KiB |
After Width: | Height: | Size: 184 B |
After Width: | Height: | Size: 167 B |
After Width: | Height: | Size: 487 B |
After Width: | Height: | Size: 359 B |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 169 B |
After Width: | Height: | Size: 981 B |
After Width: | Height: | Size: 868 B |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 243 B |
After Width: | Height: | Size: 236 B |