✏️ 正在编辑: ajax_all_downline.php
路径:
/home/llpreacharge/public_html/Master_Distributers/ajax_all_downline.php
提示:
您可以编辑任何文件(包括二进制文件),但请注意不当修改可能导致文件损坏。
<?php include'connection.php'; $downlineUsr = $_GET['downlineUsr']; $userid = $_GET['usrid']; function getUserData($usr) { include'connection.php'; $quGetName="SELECT * FROM user WHERE Userid='$usr'"; $reGetName=mysqli_query($con,$quGetName); $dataGetName=mysqli_fetch_array($reGetName); return $dataGetName; } echo"<table cellpadding='20' border='2'> <tr> <th>Sl.</th> <th>Join Date</th> <th>Userid</th> <th>Name</th> <th>Mobile No.</th> <th>City</th> <th>Sponsor</th> <th>Parent</th> <th>Level</th> </tr>"; if($downlineUsr=="All") { $quDownline="SELECT * FROM user WHERE Parent1='$userid' OR Parent1='$userid' OR Parent2='$userid' OR Parent3='$userid' OR Parent4='$userid' OR Parent5='$userid' OR Parent6='$userid' OR Parent7='$userid' OR Parent8='$userid'"; } else { $quDownline="SELECT * FROM user WHERE $downlineUsr='$userid'"; } $reDownline=mysqli_query($con,$quDownline); $countDownline=mysqli_num_rows($reDownline); if($countDownline>0) { $sl=0; while($dataDownline=mysqli_fetch_array($reDownline)) { $sl=$sl+1; if($dataDownline['Parent1']==$userid){ $level = "Level 1"; }elseif($dataDownline['Parent2']==$userid){ $level = "Level 2"; }elseif($dataDownline['Parent3']==$userid){ $level = "Level 3"; }elseif($dataDownline['Parent4']==$userid){ $level = "Level 4"; }elseif($dataDownline['Parent5']==$userid){ $level = "Level 5"; }elseif($dataDownline['Parent6']==$userid){ $level = "Level 6"; }elseif($dataDownline['Parent7']==$userid){ $level = "Level 7"; }elseif($dataDownline['Parent8']==$userid){ $level = "Level 8"; } $sponserData=getUserData($dataDownline['SponserId']); $parentData=getUserData($dataDownline['Parent1']); echo "<tr>"; echo "<td>".$sl."</td>"; echo "<td>".$dataDownline['Date']."</td>"; echo "<td>".$dataDownline['Userid']."</td>"; echo "<td>".$dataDownline['Name']."</td>"; echo "<td>".$dataDownline['Mobile']."</td>"; echo "<td>".$dataDownline['District']."</td>"; echo "<td>".$sponserData['Name']."</td>"; echo "<td>".$parentData['Name']."</td>"; echo "<td>".$level."</td>"; echo "</tr>"; } } else { echo "<tr><td colspan='9'><p style='color:red;'>Data Not Found !</p></td></tr>"; } ?> <script> hideLoader(); </script>
💾 保存文件
← 返回文件管理器