function tuopu_tree($tj_username, $dtp, $dtp1, $glo_gui) { global $db, $db_prefix, $periods, $begintime, $monthfrom, $monthto, $jsfloer1, $timelimit1, $timelimit2, $timelimit, $psearch, $periods1; $glo_gui; if ($dtp >= $dtp1) { echo '<table align="center" cellpadding="0" cellspacing="0"><tr> '; $i = 1; for ($m = 1; $m <= $glo_gui; $m++) { $sql13 = "select * from {$db_prefix}bwnet where preid='{$tj_username}' and pos='{$m}'"; $rs = $db->get_one($sql13); $c_num = $glo_gui; 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['id'])) { $sqls = "select * from {$db_prefix}users where username='******'username'] . "'"; $rss = $db->get_one($sqls); echo ' <table border="0" cellpadding="0" cellspacing="1" bgcolor="#517DBF" align="center" width="80" style="margin:0px auto;"> <tr> <td align="center" bgcolor="#FFFFFF"><table width="100%" border="0" cellspacing="1" cellpadding="0"> '; switch ($rss["rank"]) { case 1: $bg1 = "#009999"; $bgcol = "#009999"; $bg2 = "#009999"; break; case 2: $bg1 = "#8891ed"; $bgcol = "#8891ed"; $bg2 = "#8891ed"; break; case 3: $bg1 = "#AA3939"; $bgcol = "#AA3939"; $bg2 = "#AA3939"; break; case 4: $bg1 = "#336699"; $bgcol = "#336699"; $bg2 = "#336699"; break; case 5: $bg1 = "#ff0000"; $bgcol = "#ff0000"; $bg2 = "#ff0000"; break; case 6: $bg1 = "#FFCC00"; $bgcol = "#FFCC00"; $bg2 = "#FFCC00"; break; case 7: $bg1 = "#FF9900"; $bgcol = "#FF9900"; $bg2 = "#FF9900"; break; } if ($rss['state'] == 0) { $bg1 = "#666666"; $bgcol = "#666666"; $bg2 = "#666666"; } echo ' <tr> <td align="center" bgcolor="'; echo $bg1; echo '"><a style="WIDTH: 100px; BACKGROUND-COLOR: '; echo rankcolor($rss["rank"]); echo '" href="?userid='; echo urlencode($rs["username"]); echo '&type='; echo $type; echo '&periods='; echo $periods; echo '&psearch='; echo $psearch; echo '&periods1='; echo $periods; 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 $rss["realname"]; echo '</font></td> </tr> <tr> <td align="center" bgcolor="'; echo $bg2; echo '">'; $rankname = getuserrank($rss["rank"]); echo $rankname; echo '</td> </tr> '; if ($rss['state'] == 0) { echo ' <tr> <td height="20" align="center" bgcolor="'; echo $bg2; echo '">'; echo "未确认"; echo '</td> </tr> '; } echo ' <tr> <td align="center" background="images/tab_19.gif">'; echo date("Y-m-d", $rs["addtime"]); echo '</td> </tr> </table></td> </tr> </table> '; } else { echo ' <table border="0" cellpadding="0" cellspacing="1" bgcolor="#517DBF" align="center" style="margin:0px auto;"> <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}users 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["id"], $dtp, $dtp1 + 1, $glo_gui); } echo ' </div> </td> '; $i++; } echo '</tr> </table> '; } }
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> '; } }
function tuopu_tree($tj_username, $dtp, $dtp1) { global $db; global $db_prefix, $hytjnetznum, $hytjnetznum1, $timelimit, $timelimit2; if ($dtp1 <= $dtp) { echo '<table align="center" cellpadding="0" cellspacing="0"><tr> '; $sql = "select * from {$db_prefix}users where tjrname='" . $tj_username . "'"; $result = $db->query($sql); $c_num = $db->num_rows($result); $i = 1; while ($rs = $db->fetch_array($result)) { $hytjnetznum = 1; $hytjnetznum1 = 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 ' <table width="100" 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"> <tr> <td height="20" align="center" bgcolor="#66c2cd"><font color="ffffff"><strong>'; echo $rs["username"]; echo '</strong></font></td> </tr> <!-- <tr> <td height="20" align="center" bgcolor="#1956A6"><font color="ffffff">'; echo $rs["realname"]; echo '</font></td> </tr> --> <tr> <td height="20" align="center" bgcolor="#B0E0E6">'; echo getuserrank($rs["rank"]); echo '</td> </tr> <tr> <td height="20" align="center" bgcolor="#E7F2FB">'; echo date("Y-m-d", $rs["regtime"]); echo '</td> </tr> </table></td> </tr> </table> '; $sql1 = "select count(id) as c from {$db_prefix}users where tjrname='" . $rs["username"] . "'"; $rs1 = $db->get_one($sql1); echo ' <div style="display:block" id="table_'; echo $rs["id"]; echo '"> '; if ($dtp1 < $dtp) { echo ' '; if ($rs1["c"] > 0) { 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> '; } echo ' '; if ($rs1["c"] == 1) { echo ' <table align="center" border="0" cellspacing="0" cellpadding="0"> <tr> <td align="center"><img src="/images/line.gif" alt="" width="8" border="0" style="WIDTH: 1px; HEIGHT: 20px" /></td> </tr> </table> '; } echo ' '; } echo ' '; tuopu_tree($rs["username"], $dtp, $dtp1 + 1); echo ' </div> </td> '; $i++; } $db->free_result($result); echo '</tr> </table> '; } }
function tuopu_tree($tj_username, $dtp, $dtp1) { global $db; global $db_prefix, $tjnet; if ($dtp1 <= $dtp) { echo '<table align="center" cellpadding="0" cellspacing="0"><tr> '; if ($tjnet == 1) { $str = 'timepre'; } else { $str = 'timepre' . $tjnet; } $sql = "select * from {$db_prefix}users where " . $str . "='" . $tj_username . "'"; $result = $db->query($sql); $c_num = $db->num_rows($result); $i = 1; while ($rs = $db->fetch_array($result)) { 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 ' <table width="100" 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 ($rs["rank"]) { case 1: $bg1 = "#009999"; $bgcol = "#009999"; $bg2 = "#009999"; break; case 2: $bg1 = "#8891ed"; $bgcol = "#8891ed"; $bg2 = "#8891ed"; break; case 3: $bg1 = "#AA3939"; $bgcol = "#AA3939"; $bg2 = "#AA3939"; break; case 4: $bg1 = "#336699"; $bgcol = "#336699"; $bg2 = "#336699"; break; case 5: $bg1 = "#ff0000"; $bgcol = "#ff0000"; $bg2 = "#ff0000"; break; case 6: $bg1 = "#FFCC00"; $bgcol = "#FFCC00"; $bg2 = "#FFCC00"; break; case 7: $bg1 = "#FF9900"; $bgcol = "#FF9900"; $bg2 = "#FF9900"; break; } echo ' <tr> <td height="20" align="center" bgcolor="'; echo $bg1; echo '"><a style="WIDTH: 100px; BACKGROUND-COLOR: '; echo rankcolor($rs["rank"]); echo '" href="?userid='; echo urlencode($rs["username"]); echo '&tjnet='; echo $tjnet; echo '"><font color="ffffff"><strong>'; echo $rs["username"]; echo '</strong></font></a></td> </tr> <tr> <td height="20" align="center" bgcolor="'; echo $bg2; echo '">'; echo $rs["realname"]; echo '</td> </tr> <tr> <td height="20" align="center" bgcolor="'; echo $bg2; echo '">'; echo getuserrank($rs["rank"]); echo '</td> </tr> <tr> <td height="20" align="center" bgcolor="#E7F2FB">'; if ($tjnet == 1) { echo date("Y-m-d H:i:s", $rs["confirmtime"]); } else { echo date("Y-m-d H:i:s", $rs["confirmtime" . $tjnet]); } echo '</td> </tr> </table></td> </tr> </table> '; $sql1 = "select count(id) as c from {$db_prefix}users where timepre='" . $rs["username"] . "'"; $rs1 = $db->get_one($sql1); echo ' <div style="display:block" id="table_'; echo $rs["id"]; echo '"> '; if ($dtp1 < $dtp) { echo ' '; if ($rs1["c"] > 0) { 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> '; } echo ' '; if ($rs1["c"] == 1) { echo ' <table align="center" border="0" cellspacing="0" cellpadding="0"> <tr> <td align="center"><img src="/images/line.gif" alt="" width="8" border="0" style="WIDTH: 1px; HEIGHT: 20px" /></td> </tr> </table> '; } echo ' '; } echo ' '; tuopu_tree($rs["username"], $dtp, $dtp1 + 1); echo ' </div> </td> '; $i++; } $db->free_result($result); echo '</tr> </table> '; } }