"clocktower, post: 42948":any code for uploading a torrent,comments,forums,etc
"clocktower, post: 42920":is there a radio block that adds shoutcast? using winamp
$dispname = "<b>" . $smallname . "</b>";add after:$last = $CURUSER["last_browse"] - 3600;
// Start NEW! mod
if (sql_timestamp_to_unix_timestamp($row["added"]) >= $last)
$dispname .= "<b><font color=red> - ("._NEW."!)</font></b>";
// end NEW! mod
now i decided to not change the last_browse in the mysql. this will update the last browse correctly.
find in torrents.php:
[code]if($CURUSER["view_torrents"]=="no")
show_error_msg("Error","You do not have permission to view torrents",1);add after:$noww = $now = time();
mysql_query("UPDATE users SET last_browse = $noww WHERE id=$CURUSER[id]") or sqlerr();"SpaZiuR, post: 42767":can you help me in the question i asked above?
dbconn();
add after:
parked();
now find in download.php:
dbconn();
add after:
parked(); // Convert UTC to user's timezone
function utc_to_tz ($timestamp=0) {
GLOBAL $CURUSER;
if (!is_numeric($timestamp))
$timestamp = sql_timestamp_to_unix_timestamp($timestamp);
if ($timestamp == 0)
$timestamp = gmtime();
$timestamp = $timestamp + ($CURUSER['tzoffset']*60);
return date("Y-m-d H:i:s", $timestamp);
}
function utc_to_tz_time ($timestamp=0) {
GLOBAL $CURUSER;
if (!is_numeric($timestamp))
$timestamp = sql_timestamp_to_unix_timestamp($timestamp);
if ($timestamp == 0)
$timestamp = gmtime();
$timestamp = $timestamp + ($CURUSER['tzoffset']*60);
return $timestamp;
} print "<td align=center><a href=admincp.php?action=parked><img src=images/admin/confirmaccounts.gif border=0 width=32 height=32><br><center><b>Parked<BR>Users</center></b></a><BR></td>";also add in admincp.php:#======================================================================#
# Parked users
#======================================================================#
if ($action == "parked") {
if ($CURUSER["class"] < "6"){
show_error_msg("Error","Sorry you do not have the rights to view this page!",1);
}
stdhead("Parked Users Management");
navmenu();
$res2 = mysql_query("SELECT COUNT(*) FROM users WHERE parked='yes'");
$row = mysql_fetch_array($res2);
$count = $row[0];
$perpage = 50;
list($pagertop, $pagerbottom, $limit) = pager($perpage, $count, "admincp.php?action=parked&");
begin_frame("Parked Users Management");
echo $pagertop;
?>
<CENTER><table align=center cellpadding="0" cellspacing="0" class="table_table" width="100%" border="1">
<tr>
<td class=table_head align=center>Username</td>
<td class=table_head align=center>Added</td>
<td class=table_head align=center>Last Visit</td>
<td class=table_head align=center>Uploaded</td>
<td class=table_head align=center>Downloaded</td>
<td class=table_head align=center>Edit?</td>
</tr>
<?
$rqq = "SELECT id, username, last_access, added, uploaded, downloaded FROM users WHERE parked='yes' ORDER BY username $limit ";
$resqq = mysql_query($rqq);
while ($row = mysql_fetch_array($resqq)){
extract ($row);
echo "<tr><td class=table_col1><a href=account-details.php?id=$row[id]>$row[username]</a></td><td class=table_col2>".utc_to_tz($row['added'])."</td><td class=table_col1>$row[last_access]</td><td class=table_col2>".mksize($row["uploaded"])."</td><td class=table_col1>".mksize($row["downloaded"])."</td><td class=table_col2><a href=account-details.php?id=$row[id]>EDIT</a></td></tr>\n";
}
echo "</table></CENTER>\n";
print($pagerbottom);
end_frame();
stdfoot();
}
#======================================================================#
# End Parked users
#======================================================================#
if ($action == 'edituser'){"AzuriS, post: 41615":I've got 4
in admin-modtasks.php
wich one is the good one ?
if (!is_valid_id($userid))
show_error_msg("Editing Failed", "Invalid UserID",1);
print("<tr><td>Downloaded</td><td align=left><input type=text size=30 name=downloaded value=\"$user[downloaded]\"> ".mksize($user[downloaded])."</tr>\n");
add below:
print("<tr><td>Points Bonus</td><td align=left><input type=text size=4 name=seedbonus value=$user[seedbonus]></tr>\n");
find in admin-modtasks.php:
if (!is_valid_id($userid))
show_error_msg("Editing Failed", "Invalid UserID",1);
add below:
$seedbonus = $_POST["seedbonus"];
$sbon = mysql_query("SELECT seedbonus FROM users WHERE id=$userid") or sqlerr();
if ($sbon) {
$sbonus = mysql_fetch_assoc($sbon);
if ($sbonus['seedbonus'] != $seedbonus) {
mysql_query("UPDATE users SET seedbonus=$seedbonus WHERE id=$userid") or sqlerr();
}
}