I'm currently trying to figure out how to get this module to work ..
This is what it does
It displays the users Photo if there online it displays
them in a table 4 across and just adds a new one as its required this is what l got so far
|
Code:
|
<?php
if (!eregi("modules.php", $_SERVER['PHP_SELF'])) {
header("Location: ../../../index.php");
die ();
}
$index = 0;
require_once("mainfile.php");
$module_name = basename(dirname(__FILE__));
include("header.php");
global $count, $prefix;
echo"
";
OpenTable();
$sql = "SELECT time FROM ".$prefix."_userinfo_where WHERE username='$user_id'";
$imgs = dir('modules/Photo/memberphotos');
while ($file = $imgs->read()) {
if (eregi("gif", $file) || eregi("jpg", $file)) {
$imglist .= "$file ";
}
}
closedir($imgs->handle);
$imglist = explode(" ", $imglist);
sort($imglist);
for ($i=0; $i < sizeof($imglist); $i++) {
if($imglist[$i]!="") {
$image=$imglist[$i];
$user_id = $image;
$user_id = eregi_replace(".jpg","",$user_id);
$user_id = eregi_replace(".gif","",$user_id);
list($username) = mysql_fetch_row(mysql_query("SELECT username from ".$prefix."_users WHERE user_id='$user_id'"));
$count = 0;
echo "<table border=1>";
$asin = explode(".", $image);
$count++;
if($count == 1) { echo "<tr>"; }
echo" <td>
<center><a href=\"modules.php?name=Your_Account&op=userinfo&username=$username\"><center><img src=\"modules/Photo/memberphotos/$image\" border=\"0\" alt=\"$username\">
$username
</center></td>";
if($count == 4) { echo "</tr>"; }
if($count == 5) { $count = 0; }
}
echo "</table>";
CloseTable();
}
include("footer.php");
?> |
Its should also have the option to just show there username or photo kinda like a hide photo Option
Example Show Photo : Just Show Name(s)
Any help would be appreciated
XtraX