Login
Username: Password:
Remember me

[Sign Up] / [Recover Password]

Theme / Language

Popular
New Torrents
new name
Size: 18.40 MB
Most active
new name
S: 74 L: 3
New Posters
User Posts

Go to Profile

@Mancino i had the same issue, seems an theme people was using is now vip only.. Nice of people to say something LOL.............
or for the lazy people!!! use this one

<?php
require "backend/functions.php";
dbconn(false);
loggedinonly();

if (get_user_class() < 2)
   show_error_msg("Acces denied", "You must be at least Power User!", 1);

 function usertable($res, $frame_caption)
{
global $CURUSER;
begin_frame($frame_caption, true);
 
?>
<table class=table_table width=100% align=center border=0 cellpadding=4>
<tr style="font:bold">
   <td class=table_head align=center width=10%>Rank</td>
   <td class=table_head align=left width=20%>User</td>
   <td class=table_head align=left width=10%>Uploaded</td>
   <td class=table_head align=left width=10%>Downloaded</td>
   <td class=table_head align=center width=10%>Ratio</td>
   <td class=table_head align=center width=20%>Joined</td>
</tr>
<?php
   $num = 0;
   while ($a = mysql_fetch_assoc($res))
   {
++$num;
$highlight = $CURUSER["id"] == $a["userid"] ? " bgcolor=#1B2B1F" : "";
if ($a["downloaded"])
{
  $ratio = $a["uploaded"] / $a["downloaded"];
  $color = get_ratio_color($ratio);
  $ratio = number_format($ratio, 2);
  if ($color)
$ratio = "<font color=$color>$ratio</font>";
}
else
  $ratio = "Inf.";
print("<tr$highlight>
       <td class=table_col1 align=center>$num</td>
       <td class=table_col2 align=left$highlight><a href=account-details.php?id=" .$a["userid"] . "><b>".class_user($a[username])."</b>" ."</td>
       <td class=table_col1 align=left$highlight><font color=limegreen>" . mksize($a["uploaded"]) . "</font></td>
       <td class=table_col2 align=left$highlight><font color=#FF2400>" . mksize($a["downloaded"]) . "</font></td>
       <td class=table_col1 align=center$highlight>" . $ratio ."</td>
       <td class=table_col2 align=center>" . gmdate("d-M-Y",strtotime($a["added"])) . " (" .get_elapsed_time(sql_timestamp_to_unix_timestamp($a["added"])) . " ago)</td>
     </tr>");
}
print("</table>");
end_frame();
}
function _torrenttable($res, $frame_caption)
{
begin_frame($frame_caption, true);
?>
<table class=table_table width=100% align=center border=0 cellpadding=4>
<tr style="font:bold">
   <td class=table_head align=center>Rank</td>
   <td class=table_head align=left>Name</td>
   <td class=table_head align=center><img src="images/ready.png" border=0 title=Completed></td>
   <td class=table_head align=right>Traffic</td>
   <td class=table_head align=right><img src="images/seed.gif" border=0 title=Seeders></td></td>
   <td class=table_head align=right><img src="images/leech.gif" border=0 title=Leechers></td></td>
   <td class=table_head align=right>Total</td>
   <td class=table_head align=right>Ratio</td>
</tr>
<?php
   $num = 0;
   while ($a = mysql_fetch_assoc($res))
   {
++$num;
if ($a["leechers"])
{
  $r = $a["seeders"] / $a["leechers"];
  $ratio = "<font color=" . get_ratio_color($r) . ">" . number_format($r, 2) . "</font>";
}
else
  $ratio = "Inf.";
     
   print("<tr>
       <td align=center class=table_col1>$num</td>
       <td align=left class=table_col2><a href=torrents-details.php?id=" . $a["id"] . "&hit=1><b>" . $a["name"] . "</b></a></td>
       <td align=center class=table_col1><font color=#0080FF><b>" . number_format($a["times_completed"]) . "</b></font></td>
       <td align=right class=table_col2>" . mksize($a["data"]) . "</td>
       <td align=right class=table_col1><font color=limegreen><b>" . number_format($a["seeders"]) . "</b></font></td>
       <td align=right class=table_col2><font color=red><b>" . number_format($a["leechers"]) . "</b></font></td>
       <td align=right class=table_col1>" . ($a["leechers"] + $a["seeders"]) . "</td>
       <td align=right class=table_col2>$ratio</td>
   </tr>n");
}
   print("</table>");

end_frame();
}

 function countriestable($res, $frame_caption, $what)
 {
global $CURUSER;
begin_frame($frame_caption, true);
?>
<table class=table_table width=50% align=center border=0 cellpadding=4>
<tr style="font:bold">
   <td class=table_head align=center>Rank</td>
   <td class=table_head align=center>Country&nbsp;Flag</td>
   <td class=table_head align=left>Country&nbsp;Name</td>
   <td class=table_head align=right><?=$what?></td>
</tr>
<?php
   $num = 0;
       while ($a = mysql_fetch_assoc($res))
   {
   ++$num;
   if ($what == "Users")
       $value = number_format($a["num"]);
   elseif ($what == "Uploaded")
       $value = mksize($a["ul"]);
   elseif ($what == "Average")
       $value = mksize($a["ul_avg"]);
   elseif ($what == "Ratio")
       $value = number_format($a["r"],2);
     
if ($a[flagpic]) {
   $flag = "<img align=center src=images/countries/$a[flagpic]>";
} else {
   $flag = "<img align=center src=images/countries/unknown.gif>";
}
 
if ($a[name]) {
   $name = "<b>$a[name]</b>";
} else {
   $name = "<b>Land of Homeless!</b>";
}

   print("<tr>
   <td align=center class=table_col1>$num</td>
   <td align=center class=table_col2>" . "$flag</td>
   <td class=table_col1>$name</td>" . "
   <td align=right class=table_col2>$value</td>
   </tr>n");
}
   print("</table>");
end_frame();
}

stdhead("Top 10");
begin_frame("..:: Top Ten ::..");

   $type = isset($_GET["type"]) ? 0 + $_GET["type"] : 0;
   if (!in_array($type,array(1,2,3)))
   $type = 1;
 
   $limit = isset($_GET["lim"]) ? 0 + $_GET["lim"] : false;
   $subtype = isset($_GET["subtype"]) ? $_GET["subtype"] : false;

   print("<div style='font: bold 12px Verdana; margin-top:10px; margin-bottom:15px' align=center>" .
   ($type == 1 && !$limit ? "Users" : "<a href=topten.php?type=1>Users</a>") .    " | " .
   ($type == 2 && !$limit ? "Torrents" : "<a href=topten.php?type=2>Torrents</a>") . " | " .
   ($type == 3 && !$limit ? "Countries" : "<a href=topten.php?type=3>Countries</a>") . "
   </div>n");

   $pu = get_user_class($CURUSER) >= 3;

 if (!$pu)
$limit = 10;

 if ($type == 1)
 {
   $mainquery = "SELECT id as userid, username, added, uploaded, downloaded, uploaded / (UNIX_TIMESTAMP(NOW()) - UNIX_TIMESTAMP(added)) AS upspeed, downloaded / (UNIX_TIMESTAMP(NOW()) - UNIX_TIMESTAMP(added)) AS downspeed FROM users WHERE enabled = 'yes'";

if (!$limit || $limit > 250)
$limit = 10;

  if ($limit == 10 || $subtype == "ul")
  {
  $order = "uploaded DESC";
  $r = SQL_Query_exec($mainquery . " ORDER BY $order " . " LIMIT $limit");
usertable($r, "Top $limit Uploaders" . ($limit == 10 && $pu ? " <font class=small> - [<a href=topten.php?type=1&amp;lim=100&amp;subtype=ul>Top 100</a>] - [<a href=topten.php?type=1&amp;lim=250&amp;subtype=ul>Top 250</a>]</font>" : ""));
  }

  if ($limit == 10 || $subtype == "dl")
  {
  $order = "downloaded DESC";
$r = SQL_Query_exec($mainquery . " ORDER BY $order " . " LIMIT $limit");
usertable($r, "Top $limit Downloaders" . ($limit == 10 && $pu ? " <font class=small> - [<a href=topten.php?type=1&amp;lim=100&amp;subtype=dl>Top 100</a>] - [<a href=topten.php?type=1&amp;lim=250&amp;subtype=dl>Top 250</a>]</font>" : ""));
  }

  if ($limit == 10 || $subtype == "uls")
  {
  $order = "upspeed DESC";
  $r = SQL_Query_exec($mainquery . " ORDER BY $order " . " LIMIT $limit");
usertable($r, "Top $limit Fastest Uploaders <font class=small>(average, includes inactive time)</font>" .
      ($limit == 10 && $pu ? " <font class=small> - [<a href=topten.php?type=1&amp;lim=100&amp;subtype=uls>Top 100</a>] - [<a
      href=topten.php?type=1&amp;lim=250&amp;subtype=uls>Top 250</a>]</font>" : ""));
  }

  if ($limit == 10 || $subtype == "dls")
  {
  $order = "downspeed DESC";
  $r = SQL_Query_exec($mainquery . "  ORDER BY $order " . " LIMIT $limit");
usertable($r, "Top $limit Fastest Downloaders <font class=small>(average, includes inactive time)</font>" . ($limit == 10 && $pu ? " <font class=small> - [<a href=topten.php?type=1&amp;lim=100&amp;subtype=dls>Top 100</a>] - [<a href=topten.php?type=1&amp;lim=250&amp;subtype=dls>Top 250</a>]</font>" : ""));
  }

  if ($limit == 10 || $subtype == "bsh")
  {
  $order = "uploaded / downloaded DESC";
  $extrawhere = " AND downloaded > 1073741824";
$r = SQL_Query_exec($mainquery . $extrawhere . " ORDER BY $order " . " LIMIT $limit");
usertable($r, "Top $limit Best Sharers <font class=small>(with minimum 1 GB downloaded)</font>" . ($limit == 10 && $pu ? " <font class=small> - [<a href=topten.php?type=1&amp;lim=100&amp;subtype=bsh>Top 100</a>] - [<a href=topten.php?type=1&amp;lim=250&amp;subtype=bsh>Top 250</a>]</font>" : ""));
  }

  if ($limit == 10 || $subtype == "wsh")
  {
  $order = "uploaded / downloaded ASC, downloaded DESC";
$extrawhere = " AND downloaded > 1073741824";
$r = SQL_Query_exec($mainquery . $extrawhere . " ORDER BY $order " . " LIMIT $limit");
usertable($r, "Top $limit Worst Sharers <font class=small>(with minimum 1 GB downloaded)</font>" . ($limit == 10 && $pu ? " <font class=small> - [<a href=topten.php?type=1&amp;lim=100&amp;subtype=wsh>Top 100</a>] - [<a href=topten.php?type=1&amp;lim=250&amp;subtype=wsh>Top 250</a>]</font>" : ""));
  }
 }

 elseif ($type == 2)
 {
 if (!$limit || $limit > 50)
$limit = 10;

  if ($limit == 10 || $subtype == "act")
  {
$r = SQL_Query_exec("SELECT t.*, (t.size * t.times_completed + SUM(p.downloaded)) AS data FROM torrents AS t LEFT JOIN peers AS p ON t.id = p.torrent WHERE p.seeder = 'no' GROUP BY t.id ORDER BY seeders + leechers DESC, seeders DESC, added ASC LIMIT $limit");
_torrenttable($r, "Top $limit Most Active Torrents" . ($limit == 10 && $pu ? " <font class=small> - [<a href=topten.php?type=2&amp;lim=25&amp;subtype=act>Top 25</a>] - [<a href=topten.php?type=2&amp;lim=50&amp;subtype=act>Top 50</a>]</font>" : ""));
  }

  if ($limit == 10 || $subtype == "sna")
  {
$r = SQL_Query_exec("SELECT t.*, (t.size * t.times_completed + SUM(p.downloaded)) AS data FROM torrents AS t LEFT JOIN peers AS p ON t.id = p.torrent WHERE p.seeder = 'no' GROUP BY t.id ORDER BY times_completed DESC LIMIT $limit");
_torrenttable($r, "Top $limit Most Snatched Torrents" . ($limit == 10 && $pu ? " <font class=small> - [<a href=topten.php?type=2&amp;lim=25&amp;subtype=sna>Top 25</a>] - [<a href=topten.php?type=2&amp;lim=50&amp;subtype=sna>Top 50</a>]</font>" : ""));
  }

  if ($limit == 10 || $subtype == "mdt")
  {
$r = SQL_Query_exec("SELECT t.*, (t.size * t.times_completed + SUM(p.downloaded)) AS data FROM torrents AS t LEFT JOIN peers AS p ON t.id = p.torrent WHERE p.seeder = 'no' AND leechers >= 5 AND times_completed > 0 GROUP BY t.id ORDER BY data DESC, added ASC LIMIT $limit");
_torrenttable($r, "Top $limit Most Data Transferred Torrents" . ($limit == 10 && $pu ? " <font class=small> - [<a href=topten.php?type=2&amp;lim=25&amp;subtype=mdt>Top 25</a>] - [<a href=topten.php?type=2&amp;lim=50&amp;subtype=mdt>Top 50</a>]</font>" : ""));
  }

  if ($limit == 10 || $subtype == "bse")
  {
$r = SQL_Query_exec("SELECT t.*, (t.size * t.times_completed + SUM(p.downloaded)) AS data FROM torrents AS t LEFT JOIN peers AS p ON t.id = p.torrent WHERE p.seeder = 'no' AND seeders >= 5 GROUP BY t.id ORDER BY seeders / leechers DESC, seeders DESC, added ASC LIMIT $limit");
_torrenttable($r, "Top $limit Best Seeded Torrents <font class=small>(with minimum 5 seeders)</font>" . ($limit == 10 && $pu ? " <font class=small> - [<a href=topten.php?type=2&amp;lim=25&amp;subtype=bse>Top 25</a>] - [<a href=topten.php?type=2&amp;lim=50&amp;subtype=bse>Top 50</a>]</font>" : ""));
  }

  if ($limit == 10 || $subtype == "wse")
  {
$r = SQL_Query_exec("SELECT t.*, (t.size * t.times_completed + SUM(p.downloaded)) AS data FROM torrents AS t LEFT JOIN peers AS p ON t.id = p.torrent WHERE p.seeder = 'no' AND leechers >= 5 AND times_completed > 0 GROUP BY t.id ORDER BY seeders / leechers ASC, leechers DESC LIMIT $limit");
_torrenttable($r, "Top $limit Worst Seeded Torrents <font class=small>(with minimum 5 leechers, excluding unsnatched torrents)</font>" . ($limit == 10 && $pu ? " <font class=small> - [<a href=topten.php?type=2&amp;lim=25&amp;subtype=wse>Top 25</a>] - [<a href=topten.php?type=2&amp;lim=50&amp;subtype=wse>Top 50</a>]</font>" : ""));
  }
}
elseif ($type == 3)
{
if (!$limit || $limit > 25)
$limit = 10;

if ($limit == 10 || $subtype == "us")
{
$r = SQL_Query_exec("SELECT name, flagpic, COUNT(users.country) as num FROM countries LEFT JOIN users ON users.country = countries.id GROUP BY name ORDER BY num DESC LIMIT $limit");
countriestable($r, "Top $limit Countries<font class=small> (users)</font>" . ($limit == 10 && $pu ? " <font class=small> - [<a href=topten.php?type=3&amp;lim=25&amp;subtype=us>Top 25</a>]</font>" : ""),"Users");
}
if ($limit == 10 || $subtype == "ul")
{
$r = SQL_Query_exec("SELECT c.name, c.flagpic, sum(u.uploaded) AS ul FROM users AS u LEFT JOIN countries AS c ON u.country = c.id WHERE u.enabled = 'yes' GROUP BY c.name ORDER BY ul DESC LIMIT $limit");
countriestable($r, "Top $limit Countries<font class=small> (total uploaded)</font>" . ($limit == 10 && $pu ? " <font class=small> - [<a href=topten.php?type=3&amp;lim=25&amp;subtype=ul>Top 25</a>]</font>" : ""),"Uploaded");
}
if ($limit == 10 || $subtype == "avg")
{
$r = SQL_Query_exec("SELECT c.name, c.flagpic, sum(u.uploaded)/count(u.id) AS ul_avg FROM users AS u LEFT JOIN countries AS c ON u.country = c.id WHERE u.enabled = 'yes' GROUP BY c.name HAVING sum(u.uploaded) > 1099511627776 AND count(u.id) >= 100 ORDER BY ul_avg DESC LIMIT $limit");
countriestable($r, "Top $limit Countries<font class=small> (average total uploaded per user, with minimum 1TB uploaded and 100 users)</font>" . ($limit == 10 && $pu ? " <font class=small> - [<a href=topten.php?type=3&amp;lim=25&amp;subtype=avg>Top 25</a>]</font>" : ""),"Average");
}
if ($limit == 10 || $subtype == "r")
{
$r = SQL_Query_exec("SELECT c.name, c.flagpic, sum(u.uploaded)/sum(u.downloaded) AS r FROM users AS u LEFT JOIN countries AS c ON u.country = c.id WHERE u.enabled = 'yes' GROUP BY c.name HAVING sum(u.uploaded) > 1099511627776 AND sum(u.downloaded) > 1099511627776 AND count(u.id) >= 100 ORDER BY r DESC LIMIT $limit");
countriestable($r, "Top $limit Countries<font class=small> (ratio, with minimum 1TB uploaded, 1TB downloaded and 100 users)</font>" . ($limit == 10 && $pu ? " <font class=small> - [<a href=topten.php?type=3&amp;lim=25&amp;subtype=r>Top 25</a>]</font>" : ""),"Ratio");
}
}

end_frame();
stdfoot();
?>
calcs easy,, look at the code lol

uploaded / (UNIX_TIMESTAMP(NOW()) - UNIX_TIMESTAMP(added)) AS upspeed

now is well NOW!!! and added is well ADDED lol!

its easy if you wanted to remove them just remove

<td class=table_head align=left width=10%>UL speed</td>  
<td class=table_head align=left width=10%>DL speed</td>
<td class=table_col2 align=left$highlight><font color=limegreen>" . mksize($a["upspeed"]) . "/s" ."</font></td>
<td class=table_col2 align=left$highlight><font color=#FF2400>" . mksize($a["downspeed"]) . "/s" . "</font></td>

and change

<td class=table_col1 align=left$highlight><font color=#FF2400>" . mksize($a["downloaded"]) . "</font></td> to
<td class=table_col2 align=left$highlight><font color=#FF2400>" . mksize($a["downloaded"]) . "</font></td>

I dont think bigmax1 shows up that after if ever now..
looking at the code they basically calced by how long an torrent took to dl or been seeded for.. tt never really had any good speed calcs and if did prob would be another dreaded query.

I guess in theory could be handy if say like dled at 1000PB lol; or seeded at unreal speed!
this addon can be extremely slowing down your site cause its prob ran every like 15 minutes or when ever your cleanup is run.. Best bet is to move it to an cron so it can be run like daily or something LOL

[url="http://torrenttrader.org/topic/16995-automated-cron"]http://torrenttrader.org/topic/16995-automated-cron[/url] has very basic cron.. I personally just copy  cron[color=rgb(102,102,0)].[/color]php to cron_24[color=rgb(102,102,0)].[/color]php then add the stuff I want to run every 24 hours.

Other then that it might be the code messed up and why its sending the same emails over and over.. I remember something like this before great xenfore fail.... But it was prob lost in the transfers around.. I dont use it myself so cant help fix it.  I find it pointless to send 3 emails when 1 can do it and give people 10 days to respond lol
one from here [url="http://torrenttrader.org/topic/17587-auto-disable-accounts/?p=92507"]http://torrenttrader.org/topic/17587-auto-disable-accounts/?p=92507[/url] is an little better on load, it dont send 3 pms thought lol

you could also use

AND parked='no'
if have that on your site to help the people the might go vacations..

I cant run either on on my site lol, gmail has an email limit per day and once hit it have to verify account again, if you dont NO emails sent from your site!
add

AND `class` < 3
after all the

enabled = 'yes'
in the $res1,$res2,$res3 querys like

enabled = 'yes' AND `class` < 3
changing 3 to what ever max class you want to be immune.
Upload Activity — 2014-05-24 11:14:12 in v2.08 Mods Completed
not sure why you posting about an snatched list in an topic that has nothing and [size=18px]nothing[/size] more to do with..............................

post in the correct topic and someone might help.
something like this might work..

functions.php

case 'bookmark':
           if($CURUSER) {
           $bookt = SQL_Query_exec("SELECT torrentid FROM bookmarks WHERE torrentid = $row[id] AND userid = $CURUSER[id]");
           if (mysql_num_rows($bookt) > 0)                        
             print("<td class=ttable_col$x align=center><a href='takedelbookmark.php?bookmarkid=$id' title='Delete'><img src='images/delchat.gif' border='0' width='16px' alt='delete' title='delete' /></a></td>");
             else
             print("<td class=ttable_col$x align=center><a href='bookmarks.php?torrent=$id' title='Bookmark'><img src='images/MyBookmarks3.png' border='0' width='16px' alt='Bookmark' title='Bookmark' /></a></td>");
           }
             break;

Its untested and for 2.08 i dont care about any version lower!

you prob also change to change this 1 one in torrents-details

// Bookmarks mod
$bookt = SQL_Query_exec("SELECT torrentid FROM bookmarks WHERE torrentid = $row[id] AND userid = $CURUSER[id]");
if (mysql_num_rows($bookt) > 0)
    print("<div align='right'><div align='right'><a href='takedelbookmark.php?bookmarkid=". $row[id] ."'><b>[Ne plus suivre]</b></a></td></tr>n&nbsp;");
    else
print("<div align='right'><a href='bookmarks.php?torrent=$row[id]'><b>[Suivre]</b></a></td></tr>n&nbsp;");
//end bookmarks
to



 // Bookmarks mod
if ($CURUSER) {
$bookt = SQL_Query_exec("SELECT torrentid FROM bookmarks WHERE torrentid = $row[id] AND userid = $CURUSER[id]");
if (mysql_num_rows($bookt) > 0)
       print("<div align='right'><div align='right'><a href='takedelbookmark.php?bookmarkid=". $row[id] ."'><b>[Ne plus suivre]</b></a></td></tr>n&nbsp;");
       else
       print("<div align='right'><a href='bookmarks.php?torrent=$row[id]'><b>[Suivre]</b></a></td></tr>n&nbsp;");
}
  //end bookmarks
[url="http://devscorner.xyz/index.php?/topic/18044-date-of-birth-addon-for-208/#entry92477"]http://devscorner.xyz/index.php?/topic/18044-date-of-birth-addon-for-208/#entry92477[/url]
this is based on [url="http://torrenttrader.org/index.php?showtopic=4591&hl=birthday"]http://torrenttrader.org/index.php?showtopic=4591&hl=birthday[/url]

and [url="http://torrenttrader.org/topic/11611-date-of-birth-at-registration"]http://torrenttrader.org/topic/11611-date-of-birth-at-registration[/url]

I did not create it, I just fixed it to work with 2.08

If you dont know what this does then prob not for you.

1st sql

ALTER TABLE `users` ADD dob DATE NOT NULL default '0000-00-00';
Then languages.find

$LANG["AGE"] = "Age";
after add

$LANG["DATE_OF_BIRTHDAY"] = "Birth Date";
$LANG["DOB_FAILED_MSG"] = "Do not leave any required Birthday Fields blank.";

account.phpchange

<b><?php echo T_("AGE"); ?>:</b> <?php echo $CURUSER["age"]; ?><br />to

<?php
///////////////// BIRTHDAY MOD /////////////////////
if ($CURUSER[dob] != "0000-00-00") {
   $current = gmdate("Y-m-d", time() + $CURUSER['tzoffset'] * 60);
   $birthday = $CURUSER["dob"];
   list($year2, $month2, $day2) = preg_split('/[-]/', $current);
   list($year1, $month1, $day1) = preg_split('/[-]/', $birthday);
   
   if ($month2 < $month1) {
       $age = $year2 - $year1 - 1;
   }
   if ($month2 == $month1) {
       if ($day2 < $day1) {
           $age = $year2 - $year1 - 1;
       } else {
           $age = $year2 - $year1;
       }
   }
   if ($month2 > $month1) {
       $age = $year2 - $year1;
   }
   print(T_("AGE").": $agen");
   print(T_("DATE_OF_BIRTHDAY").": $birthdayn<br />");
}
///////////////// BIRTHDAY MOD /////////////////////
?>        

remove

 if (is_valid_id($age))
$updateset[] = "age = '$age'";

account-details.phpreplace

<?php echo T_("AGE"); ?>: <?php echo htmlspecialchars($user["age"])?><br />with
<?php
if ($user[dob] != "0000-00-00") {
   $current = gmdate("Y-m-d", time() + $CURUSER['tzoffset'] * 60);
   $birthday = $user["dob"];
   list($year2, $month2, $day2) = preg_split('/[-]/', $current);
   list($year1, $month1, $day1) = preg_split('/[-]/', $birthday);
   if ($month2 < $month1) {
       $age = $year2 - $year1 - 1;
   }
   if ($month2 == $month1) {
       if ($day2 < $day1) {
           $age = $year2 - $year1 - 1;
       } else {
           $age = $year2 - $year1;
       }
   }
   if ($month2 > $month1) {
       $age = $year2 - $year1;
   }
   print(T_("AGE").": $agen");
   if ($user["id"] == $CURUSER["id"] || $CURUSER["control_panel"] == "yes") {
       print(T_("DATE_OF_BIRTHDAY").": $birthdayn<br />");
   } else {
       print("n<br />");
   }
}
///////////////// BIRTHDAY MOD /////////////////////
?>        

account-signup.phpreplace


$age = (int) $_POST["age"];

with
    $year = (int) $_POST["year"];
   $month = (int) $_POST["month"];
   $day = (int) $_POST["day"];
   if (!$year || !$month || !$day)
       $message = T_("DOB_FAILED_MSG");
   $dob = "$year-$month-$day";

farther down replace
, age

with
, dob

and
, $age

with
, $dob
to display the age in account-details.php

replace

		<?php echo T_("AGE"); ?>: <?php echo htmlspecialchars($user["age"])?><br />

with
<?php
if ($user[dob] != "0000-00-00") {
   $current = gmdate("Y-m-d", time() + $CURUSER['tzoffset'] * 60);
   $birthday = $user["dob"];
   list($year2, $month2, $day2) = preg_split('/[-]/', $current);
   list($year1, $month1, $day1) = preg_split('/[-]/', $birthday);
   if ($month2 < $month1) {
       $age = $year2 - $year1 - 1;
   }
   if ($month2 == $month1) {
       if ($day2 < $day1) {
           $age = $year2 - $year1 - 1;
       } else {
           $age = $year2 - $year1;
       }
   }
   if ($month2 > $month1) {
       $age = $year2 - $year1;
   }
   print(T_("AGE").": $agen");
   if ($user["id"] == $CURUSER["id"] || $CURUSER["control_panel"] == "yes") {
       print("Birth Date: $birthdayn<br />");
   } else {
       print("n<br />");
   }
}
///////////////// BIRTHDAY MOD /////////////////////
?>        

as you can prob tell its for 2.08 lol, i dont touch any versions below 2.08
farther up or something dob defined in the takesignup.

$year = (int) $_POST["year"];
   $month = (int) $_POST["month"];
   $day = (int) $_POST["day"];
   if (!$year || !$month || !$day)
       $message = "Do not leave any required Birthday Fields blank.";
   $dob = "$year-$month-$day";
not sure what you mean about "age"?? its prob an older then sin old mod or something someone made to display the age without doing math.. age field would be wrong every year anyway unless some kind of script to update it.you could change this

echo "<td align=left>Date of Birth <font color=#FF0000 class=small>(Req)</font>:</td><td align=left>";

to
echo "<td><b><font color=FF0000>" .T_("DATE_OF_BIRTHDAY"). ": </font><font color='red' class="required">*</font></b></td><td valign="top" align=left>";

i personally like using (Req) instead of * lol less confusing to members.
prob is $CURUSER is not defined in account-signup lol cause they dont have an current username..

This one seems to work fine on my site.


<?php
echo "<td align=left>Date of Birth <font color=#FF0000 class=small>(Req)</font>:</td><td align=left>";
echo "<select name='day'>n";
echo "<option value='0'>--</option>n";
for ($d = 1; $d <= 31; $d++) {
   $s = $d == $day ? 'selected' : '';
   echo "<option value='$d' $s>$d</option>n";
} //$d = 1; $d <= 31; $d++
echo "</select>n";
echo "<select name='month'>n";
echo "<option value='0'>--</option>n";
for ($m = 1; $m <= 12; $m++) {
   $s = $m == $month ? 'selected' : '';
   printf("<option value='$m' $s>%s</option>n", date("F", mktime(0, 0, 0, $m, 1, 1970)));
} //$m = 1; $m <= 12; $m++
echo "</select>n";
echo "<select name='year'>n";
echo "<option value='0'>--</option>n";
for ($y = 1909; $y <= date('Y'); $y++) {
   $s = $y == $year ? 'selected' : '';
   echo "<option value='$y' $s>$y</option>n";
} //$y = 1909; $y <= date('Y'); $y++
echo "</select></td>";
?>
Hello TorrentTrader — 2014-05-16 11:06:12 in General Chat
@DShattuck its how you attract bans.. for that matter any spammers here.
I got this page in an email from 1 of my hosts..

[url="http://leasewebnoc.com/en/networkstatus/leaseweb-ip-range-blacklisted-by-uceprotect"]http://leasewebnoc.com/en/networkstatus/leaseweb-ip-range-blacklisted-by-uceprotect[/url]

Just another reason to use smtp for emails :)
Hello TorrentTrader — 2014-05-12 20:40:23 in General Chat
I cant do much with them now.. flagged it as an spammer but now it dont ban or remove the posts anymore  :(  atleast the person cant post anymore.
Error You aren't permitted to upload this kind of file

rofl.
createtorrent — 2014-05-11 17:43:26 in General Chat
Cause most winblows clients have an builtin torrent maker and dont need an external program.
Users online

No users online

Search



Statistics

    Torrents

  • Tracking: 3
  • Todays torrents: 0
  • Seeders: 0
  • Leechers: 0
  • Peers: 0
  • Downloaded: 89.96 GB
  • Uploaded: 9.86 GB

  • Members

  • We have: 838
  • New today: 0
  • Guest today: 9

  • Online

  • Total online: 1
  • Members: 0
  • Guests online: 1
  • Comments: 3
  • Messages: 1,728