Just a small add on I created and want to share with you:
It's just a small CP add on which shows all away users.
To add it do the following:
In admin/index.php
FIND:
PHP Code:
makenavselect("Users");
Add above:
PHP Code:
makenavoption("Find away user","user.php?action=findaway");
In admin/user.php
FIND:
Add above:
PHP Code:
// ###################### Start findaway #######################
if ($action=="findaway") {
if ($orderby=="") {
$orderby="awaydate";
}
if ($limitstart=="") {
$limitstart=0;
} else {
$limitstart--;
}
if ($limitnumber=="") {
$limitnumber=99999999;
}
$users=$DB_site->query("SELECT user.userid,username,FROM_UNIXTIME(awaydate) AS awaydate,returndate,awayreason,away FROM user WHERE away = 1 ORDER BY $orderby $direction LIMIT $limitstart,$limitnumber");
$countusers=$DB_site->query_first("SELECT COUNT(*) AS users FROM user WHERE away=1");
$limitfinish=$limitstart+$limitnumber;
echo "<p>Showing records ".($limitstart+1)." to ".iif($limitfinish>$countusers[users],$countusers[users],$limitfinish)." of $countusers[users]. Click username to view forum profile.</p>";
doformheader("","");
echo "<tr class='tblhead'>";
echo "<td><p><b><span class='tblhead'>Name</span></b></p></td>";
echo "<td><p><b><span class='tblhead'>Options</span></b></p></td>";
echo "<td><p><b><span class='tblhead'>Away reason</span></b></p></td>";
echo "<td><p><b><span class='tblhead'>Away date</span></b></p></td>";
echo "<td><p><b><span class='tblhead'>Return date</span></b></p></td>";
echo "</tr>\n";
while ($user=$DB_site->fetch_array($users)) {
echo "<tr class='".getrowbg()."'>";
echo "<td><p><a href='../member.php?s=$session[sessionhash]&action=getinfo&userid=$user[userid]' target='_blank'>$user[username]</a> </p></td>";
echo "<td><p>".
makelinkcode("edit","user.php?s=$session[sessionhash]&action=edit&userid=$user[userid]")."
</p></td>";
echo "<td><p>$user[awayreason] </p></td>";
echo "<td><p>$user[awaydate] </p></td>";
echo "<td><p>$user[returndate]</p></td>";
echo "</tr>\n";
} // end while
echo "</table></td></tr></table></form>";
if ($limitnumber!=99999999 AND $limitfinish<$countusers[users]) {
doformheader("user","findaway");
makehiddencode("ausername",$ausername);
makehiddencode("awaydate",$awaydate);
makehiddencode("returndate",$returndate);
makehiddencode("awayreason",$awayreason);
makehiddencode("orderby",$orderby);
makehiddencode("direction",$direction);
makehiddencode("limitstart",$limitstart+$limitnumber+1);
makehiddencode("limitnumber",$limitnumber);
echo "<input type=submit value=\"Show Next Page\">";
}
}
Upload the two files and you will find a new link under Users: "Find away user ".
Thats all

Not the best, but it works