In the code I am trying to render the members/$mem_id/image01.jpg. The default pic is rendering perfectly, but the member's pic isn't. I made sure that I address the proper directory because if not the default image wouldn't render either. Is there something I'm missing in my code that is keeping the member image from rendering?
<?php
include_once("scripts/checkuserlog.php");
// ------- ESTABLISH THE PAGE ID ACCORDING TO CONDITIONS ---------
if (isset($_GET['id'])) {
$pro_id = preg_replace('#[^0-9]#i', '', $_GET['id']); // filter everything but numbers
} else if (isset($_SESSION['idx'])) {
$id = $logOptions_id;
}
$cacheBuster = rand(999999999,9999999999999); // Put on an image URL will help always show new when changed
$sql_status = mysql_query("SELECT * FROM status WHERE wall_id='$pro_id' ORDER BY date DESC LIMIT 50");
$statusDisplayList = "";
while($row = mysql_fetch_array($sql_status)){
$status_id = $row["id"];
$mem_id = $row["mem_id"];
$status = $row["status"];
$sName = $row["sName"];
$date = $row["date"];
/////// Mechanism to Display Pic. See if they have uploaded a pic or not //////////////////////////
$ucheck_pic = "/members/$mem_id/image01.jpg";
$udefault_pic = "/members/0/image01.jpg";
if (file_exists($ucheck_pic)) {
$status_pic = '<div style="overflow:hidden; width:50px;"><img src="' . $ucheck_pic . '" width="50px" border="0" /></div>'; // forces picture to be 100px wide and no more
} else {
$status_pic = "<img src=\"$udefault_pic\" width=\"50px\" border=\"0\" />"; // forces default picture to be 100px wide and no more
}
// Delete blab display
if ($logOptions_id != $mem_id) {
$deleteButton = '<a href="delete_status.php?id=' . $status_id . '"></a>';
} else {
$deleteButton = '<a href="delete_status.php?id=' . $status_id . '">Delete</a>';
}
$statusDisplayList .=
'<div style="background-color:#FFF" class="load_status">
<div class="status_img"><a href="profile.php?id=' . $mem_id . '">' . $status_pic . '</a></div>
<div class="status_text"><a href="profile.php?id=' . $mem_id . '"><strong>' . $sName . '</strong></a><p class="text">'.$status.'</p>
<div class="date">'.$date.' · ' . $deleteButton . '</div>
</div>
<div class="clear"></div>
</div>';
}// ------- END MEMBER BLABS OUTPUT CONSTRUCTION ---------
?>
<!-- Created by Barrett at RRPowered.com -->
<html>
<head>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js"></script>
<script type="text/javascript" src="jquery.elastic.js"></script>
<link href="/style/main.css" rel="stylesheet" type="text/css" />
<link rel="stylesheet" type="text/css" href="status.css">
<title>FaceBook Style Status Update</title>
<script type="text/javascript">
/*
* Auto Expanding Text Area
* by Jan Jarfalk (www.unwrongest.com)
*/
$( function(){
$(".input_box").elastic().css("height","30px");
$(".input_box").focus(function(){
$(this).filter(function(){
return $(this).val() == "" || $(this).val() == "Testimony...."
}).val("").css("color","#000000");
});
$(".input_box").blur(function(){
$(this).filter(function(){
return $(this).val() == ""
}).val("Testimony....").css("color","#808080");
});
$("#share").click(function(){
var a_p = "";
var d = new Date();
var curr_hour = d.getHours();
if (curr_hour < 12){
a_p = "am";
}else{
a_p = "pm";
}
if (curr_hour == 0){
curr_hour = 12;
}
if (curr_hour > 12){
curr_hour = curr_hour - 12;
}
var curr_min = d.getMinutes();
curr_min = curr_min + "";
if (curr_min.length == 1){
curr_min = "0" + curr_min;
}
var m_names = new Array("Jan", "Feb", "Mar",
"Apr", "May", "Jun", "Jul", "Aug", "Sep",
"Oct", "Nov", "Dec");
var d = new Date();
var curr_date = d.getDate();
var curr_month = d.getMonth();
var curr_year = d.getFullYear();
var date = m_names[curr_month] +" "+ curr_date +" "+"at"+" "+ curr_hour + ":" + curr_min + " " + a_p;
$(".loading").show();
var status=$(".input_box").val();
if(status == "Testimony...."){
$(".loading").hide();
}else{
var DATA = 'status=' + status + '&date=' +date;
$.ajax({
type: "POST",
url: "status_update.php?id=<?php echo "$pro_id"; ?>",
data: DATA,
cache: false,
success: function(data){
$(".load_status_out").append(data);
$(".loading").hide();
$(".input_box").val("Testimony....").css("color","#808080").css("height","30px");
}
});
}
return false;
});
});
</script>
</head>
<body>
<h1>FaceBook style status update</h1>
<div class="con">
<div class="pd">
<div class="share">Share:</div>
<div class="status">Status</div>
<div class="loading"></div>
</div>
<div class="img_top"></div>
<div class="text_status">
<textarea class="input_box" />Testimony....</textarea></div>
<div class="button_outside_border_blue" id="share">
<div class="button_inside_border_blue">
Share
</div>
</div>
<div class="clear"></div>
<div class="load_status_out"><?php echo "$statusDisplayList"; ?></div>
</div>
</body>
</html>