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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.