function tuopu_tree($tj_username, $dtp, $dtp1) { global $db; global $db_prefix, $periods, $zyj, $xyj, $syj, $begintime, $monthfrom, $monthto, $jsfloer1, $price, $timelimit1, $timelimit2, $timelimit, $periods, $psearch, $periods1; if ($dtp >= $dtp1) { echo '<table align="center" cellpadding="0" cellspacing="0"><tr> '; $sql = "select prenum from {$db_prefix}bnet where username='******' "; $res = $db->get_one($sql); $i = 1; for ($m = 1; $m <= $res["prenum"]; $m++) { $sql = "select * from {$db_prefix}bnet where prename='{$tj_username}' and pos='{$m}'"; $rs = $db->get_one($sql); $sqlu1 = "select rank,realname from {$db_prefix}users where username='******'username'] . "'"; $rsu1 = $db->get_one($sqlu1); $c_num = $res["prenum"]; $price = 0; $new = 0; echo ' <td valign="top"> '; if ($c_num > 1) { echo ' '; if ($i == 1 && $c_num > $i) { echo ' <table border="0" cellspacing="0" cellpadding="0" width="100%"> <tr> <td align="center"><table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td width="50%" height="1" ></td> <td width="50%" height="1" bgcolor="#003399"></td> </tr> </table> <img style="WIDTH: 1px; HEIGHT: 20px" alt="" src="/images/line.gif" border="0" /></td> </tr> </table> '; } else { if ($i > 1 && $c_num == $i) { echo ' <table border="0" cellspacing="0" cellpadding="0" width="100%"> <tr> <td align="center"><table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td width="50%" height="1" bgcolor="#003399"></td> <td width="50%" height="1" ></td> </tr> </table> <img style="WIDTH: 1px; HEIGHT: 20px" alt="" src="/images/line.gif" border="0" /></td> </tr> </table> '; } else { echo ' <table border="0" cellspacing="0" cellpadding="0" width="100%"> <tr> <td align="center"><table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td width="50%" height="1" bgcolor="#003399"></td> <td width="50%" height="1" bgcolor="#003399"></td> </tr> </table> <img src="/images/line.gif" alt="" width="27" border="0" style="WIDTH: 1px; HEIGHT: 20px" /></td> </tr> </table> '; } } } echo ' <!----> '; if (!empty($rs)) { echo ' <table border="0" cellpadding="0" cellspacing="1" bgcolor="#517DBF" align="center" style="margin:0px 10px;"> <tr> <td align="center" bgcolor="#FFFFFF"><table width="100%" border="0" cellspacing="1" cellpadding="0"> '; switch ($rsu1["rank"]) { case 0: $bg1 = "#CCff09"; $bgcol = "#CCff09"; $bg2 = "#EAC3C3"; break; case 1: $bg1 = "#CC0099"; $bgcol = "#CC0099"; $bg2 = "#F2B6E3"; break; case 2: $bg1 = "#AA3939"; $bgcol = "#AA3939"; $bg2 = "#EAC3C3"; break; case 3: $bg1 = "#FF9900"; $bgcol = "#FF9900"; $bg2 = "#FF9900"; break; case 4: $bg1 = "#336699"; $bgcol = "#336699"; $bg2 = "#336699"; break; case 5: $bg1 = "#ff0000"; $bgcol = "#ff0000"; $bg2 = "#ff0000"; break; } echo ' <tr> <td align="center" bgcolor="'; echo $bg1; echo '"><a style="WIDTH: 100px; BACKGROUND-COLOR: '; echo rankcolor($rsu1["rank"]); echo '" href="?userid='; echo urlencode($rs["username"]); echo '&periods='; echo $periods; echo '&periods='; echo $periods; echo '&psearch='; echo $psearch; echo '&periods1='; echo $periods1; echo '"><font color="ffffff"><strong>'; echo $rs["username"]; echo '</strong></font></a></td> </tr> <tr> <td height="20" align="center" bgcolor="'; echo $bg1; echo '"><font color="ffffff">'; echo $rsu1["realname"]; echo '</font></td> </tr> <tr> <td align="center" bgcolor="'; echo $bg2; echo '"> '; $rankname = getuserrank($rsu1["rank"]); echo $rankname; echo '</td> </tr> <tr> <td align="center" bgcolor="#B0E0E6"> <table width="100%" cellspacing="1" cellpadding="0" border="0" bgcolor="#E7F2FB"> <tbody bgcolor="#c9e8ec"> <!--<tr> <td> </td> '; for ($j = 1; $j <= 2; $j++) { echo ' <td>'; echo $j; echo '区</td> '; } echo ' </tr> <tr> <td>新增</td> '; $total2 = ""; for ($j = 1; $j <= 2; $j++) { echo ' <td align="center" > '; $ss2 = ""; $sql = "select * from {$db_prefix}bnet where prename='" . $rs["username"] . "' and pos='{$j}' "; $ss2 = $db->get_one($sql); $new = 0; if (!empty($ss2)) { $price = 0; $price2 = 0; $price = getusertimepv($ss2["username"]); $price2 = getspanpv($ss2["username"]); $total2[$j] = $price2; $new = $price; if (!empty($new)) { echo $new; } else { echo "0"; } } else { echo "0"; } echo '</td> '; } echo ' </tr> <tr> <td> 累计 </td> '; for ($j = 1; $j <= 2; $j++) { echo ' <td align="center"> '; if (!empty($total2[$j])) { echo $total2[$j]; } else { echo "0"; } echo '</td> '; } echo ' </tr> --> </tbody> </table> </td> </tr> <tr> <td align="center" background="images/tab_19.gif">'; echo "期数:" . $rs["periods"]; echo '</td> </tr> <tr> <td align="center" background="images/tab_19.gif">'; echo date("Y-m-d", $rs["intime"]); echo '</td> </tr> </table></td> </tr> </table> '; } else { echo ' <table border="0" cellpadding="0" cellspacing="1" bgcolor="#517DBF" align="center" style="margin:0px 10px;"> <tr> <td align="center" background="images/tab_19.gif" width="70"> <font color="#0f743c"><strong>注册</strong></font> </td> </tr> </table> '; } echo ' '; $sql1 = "select * from {$db_prefix}bnet where username='******' "; $rs1 = $db->get_one($sql1); echo ' <div style="display:" id="table_'; echo $rs["id"]; echo '"> '; if (!empty($rs1) && $dtp1 < $dtp) { echo ' <table align="center" border="0" cellspacing="0" cellpadding="0"> <tr> <td align="center"><img style="WIDTH: 1px; HEIGHT: 20px" alt="" src="/images/line.gif" border="0" /></td> </tr> </table> '; tuopu_tree($rs["username"], $dtp, $dtp1 + 1); } echo ' </div> </td> '; $i++; } echo '</tr> </table> '; } }
'; echo $rankary[$rs["rank"]]; echo ' </div></td> '; $total2 = ""; for ($j = 1; $j <= 2; $j++) { echo ' <td height="20" bgcolor="#FFFFFF"><div align="center"> '; $sql = "select * from {$db_prefix}users where prename='" . $rs["username"] . "' and pos='{$j}'"; $ss2 = $db->get_one($sql); $new = 0; if (!empty($ss2)) { $price = 0; $price2 = 0; $price = getusertimepv($ss2["username"]); $price2 = getspanpv($ss2["username"]); $total2[$j] = $price2; $new = $price; if (!empty($new)) { echo $new; } else { echo "0"; } } else { echo "0"; } echo ' </div></td> '; } echo ' ';