I have a page that lists property listings assigned to a specific user (a manage page), with brief text details and a picture.
Each of these listings has several images with it, that aren't seen unless they click on the listing itself to edit/view it.
I'd like to put a warning next to the listing on this manage page if one or more of the images assigned to that listing id are over a certain size. I'm not quite sure how to do this. When I put in the code, I get an error at the top giving an filesize stat warning, listing all of the files run together:
Code: Warning: filesize() [function.filesize]: stat failed for re_images/1263001649_offer_christmasstory.jpg|1263001038_offer_TEST.jpg in
Here is the code I've got that has the problem:
Code: if($rows > '0')
{
$ListingTable .= "<table align=center width=510 border=1 bordercolor=black frame=hsides rules=rows cellspacing=0>n";
while($a1 = mysql_fetch_array($r1))
{
$size = filesize('re_images/'.$a1[image]);
if( $size > 153600 )
{
echo '<p align=center><img src="images/warning.gif" border="0"></p>';
$warning="<font color=#FF0000 size=5>!!</font></b>";
}
$ListingTable .= "<tr onMouseOver="this.style.background='#E2E2E2'; this.style.cursor='hand'" onMouseOut="this.style.background='white'" onClick="window.open('info.php?id=$a1[ListingID]', '_top')">nt";
if($a1[PriorityLevel] > '1')
{
//get the priority level name
$qp = "select PriorityName from re2_priority where PriorityLevel = '$a1[PriorityLevel]' ";
$rp = mysql_query($qp) or die(mysql_error());
$ap = mysql_fetch_array($rp);
$sub = "<span class=RedLink><sup>$ap[0]</sup></span>";
}
else
{
$sub = "";
}
$ListingTable .= "nt<td width=15>";
if(!empty($a1[image]))
{
$ListingTable .= "<img src="myimages/camera.jpg" width=15 height=15>$warning";
}
$ListingTable .= "</td>nt";
$ListingTable .= "<td width=305>$a1[city], $a1[state], $a1[address] $sub</td>nt";
$ListingTable .= "<td width=80>$a1[rooms] br, $a1[bathrooms] ba";
$MyPrice = number_format($a1[Price], 2, ".", ",");
$ListingTable .= "</td>nt<td align=center width=100><b>$$MyPrice</td>n";
$ListingTable .= "</tr>n";
}
$ListingTable .= "</table>";
}
I've coded this on the next page that shows all of the image, and it worked good. This one, I just couldn't figure out how to tell the server to look in the folder to see if any of the image associated with an id are a certain size
Seperate team from score
I am writing a site that does a NFL Pick 'em type application and I have a feed that gives me the scores of the NFL games every week I have it split apart down to each game two teams and a score
Search in the PHP Files
have to search asterisk(*) in the php code of the php files .
Display the user's weight lost in the past week
Hello everyone,I am working on a weight loss app for my site, and I want to display the user's weight lost in the past week, I have the current weight and the total weight lost today working great,
C++ Http request?
Code:
MII Trends - add data onto chart object
Hello,
button.click += new eventhandler() not works in if(!ispostback)
i want to use button.clcik event in function VIewScrap() which is called in if(!ispostback) but itdoes not works any slolution ?
Format timestamp from mysql
When I tried this:Code: date("m/d/Y H:i A", $row['timestamp'])I got 12/31/1969 18:33 PM, so I know the time section is working at least. How can I get the mm/dd/yyyy section to work
Insert numbers from Barcode scanner into online php page
I have a real big problem, Here is what I'm trying to do. I have a Intermec CN3 handheld computer that has a builtin scanner. We have built a website that manage our inventory. How? We have a simple
How to use Ajax to verify data on a DB ?
Hello everyone, well i want to know how to check a value if it exists or not on a Data base and capturing this without making postback (no click on a button or other control) ofcourse by using Ajax,
New to mysqli library - Multiple query problem
Greetings,I am writing a batch program that executes 3 queries on a single page. Using mysql libraries and regular queries works just fine. I am rewriting the page to include a stored procedure. The