Another punishment beside humiliation or deleteing just that ad, is after the first warning remove all of their content and ban them.
I was working on what you were requesting but just have ran out of time in my schedule. Have to start getting the apt ready for our new baby this week and have a few other commitments that will cut down on the time I spend in the forum for a few days.
Here is what I had at the last test. There is a problem with the second sSQL and I just didn't have time to look any further. Hopefully someone will spot my error or foolishness and finish this up.
administration/userimages.php (new file)
PHP Code:
require_once('includes/init.php');
$id=$_REQUEST['id'];
//select
$sSQL='SELECT id FROM '.PREFIX.'products WHERE owner='.$id;
$result=$db->query($sSQL);
while ($row=$result->fetch())
{
//select
$sSQL2='SELECT * FROM '.PREFIX.'prodimages WHERE pid='.$row['id'];
$result2=$db->query($sSQL2);
$results = array();
$i=0;
while ($rs=$result2->fetch())
{
$tmp = array(
'id' => $rs['id'],
'pid' =>$rs['pid'],
'title' => $rs['title'],
'image' => $rs['image'],
);
$results[$i++] = $tmp;
}
}
$class_tpl->assign('results',$results);
$class_tpl->assign('body','userimages.tpl.php');
$class_tpl->display('layout.tpl.php');
userimages template - administration/templates/userimages.tpl.php (new file):
HTML Code:
{* User Images *}
<table class="tableborder">
<tr>
<th><img src="images/nav_m.gif" /> <strong>User Images</strong></th>
</tr>
<tr>
<td></td>
</tr>
{foreach from=$results item=item}
<tr>
<td><a href="listinginfo.php?view={$item.pid}"><img src="../thumbs/small_{$item.image}" /></a><br />{$item.title}</td>
</tr>
{foreachelse}
<tr>
<td>This user has 0 images.</td>
</tr>
{/foreach}
</table>
administration/users/userinfo.tpl.php:
HTML Code:
<a href="userimages.php?id={$member}">view user's images </a>
userinfo.php
PHP Code:
$class_tpl->assign('member',$member);
I think that was it. I had it calling 1 image from each listing before I realized I was doing it wrong, I tried this one time which left me with nothing. Maybe someone will look at my code in userimages.php and fix it.