Jump to content

my img thumbs are messing with me


goran

Recommended Posts

I can get everything to display properly, but the image thumb. My page which should display photos looks like this

 

<?php require_once("../../includes/initialize.php"); ?>
<?php if (!$session->is_logged_in()) { redirect_to("login.php"); } ?>
<?php
 // Find all the photos
 $photos = Photograph::find_all();
?>
<?php include_layout_template('admin_header.php'); ?>


<h2>Photographs</h2>


<?php echo output_message($message); ?>
<table class="bordered">
 <tr>
   <th>Image</th>
   <th>Filename</th>
   <th>Caption</th>
   <th>Size</th>
   <th>Type</th>
<th> </th>
 </tr>
<?php foreach($photos as $photo): ?>
 <tr>
   <td><img src="public/admin/<?php echo $photo->image_path(); ?>" width="100" /></td>
   <td><?php echo $photo->filename; ?></td>
   <td><?php echo $photo->caption; ?></td>
   <td><?php echo $photo->size_as_text(); ?></td>
   <td><?php echo $photo->type; ?></td>
<td><a href="delete_photo.php?id=<?php echo $photo->id; ?>">Delete</a></td>
 </tr>
<?php endforeach; ?>
</table>
<br />
<a href="photo_upload.php">Upload a new photograph</a>


<?php include_layout_template('admin_footer.php'); ?>

 

The result is

 

76060_219331344872972_456932472_n.jpg

 

The relevant files are attached, sorry for asking of you to debug a distant site, but I have no other option left.

photograph.php

initialize.php

Link to comment
https://forums.phpfreaks.com/topic/274592-my-img-thumbs-are-messing-with-me/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.