1234567891011121314151617 |
- <?php
- header("content-type:image/png");
- $root = $_SERVER['DOCUMENT_ROOT'];
- include($root . "/util/session.php");//checks that the user is logged in
- //include($root . "/util/privilege_check.php");
- $img=mysqli_real_escape_string($db,$_GET['username']);
- //if($_SESSION['user_type'] = "admin" || $_SESSION['username'] == $username){
- $sql="select * from user_info where login='$img'";
- $result=mysqli_query($db,$sql);
- if($row=mysqli_fetch_array($result)){
- $image_name=$row['login'] . ".png";
- $image_content=$row['picture'];
- echo $image;
- }
- // }
- ?>
|