<?php $packid=$_GET["packid"]; $title=$_GET["title"]; $tas=$_GET["tas"]; // Include config file require_once "configs.php"; $rows=0; ?> <h3>Show user(s) on Program <?php echo $title." ,TAS=".$tas;?></h3> <?php echo "<table id=tble style='overflow-x:auto;' class='table'>"; echo "<tr>"; echo "<th>Mgr</th><th style='width:150px;' onclick='sortTableX(1)'>Company</th><th onclick='sortTableX(2)'>User</th><th>Percent</th><th>Grade</th><th style='width:100px;'>Score [<a href=# onclick='sortTablen()'>🔺</a> <a href=# onclick='sortTablen2()' >🔻</a>]</th><th>Edit</th>"; echo "</tr>"; // Attempt select query execution $sql="select * from dyna left join users on dyna.ownerid=users.id left join fixa on fixa.id=dyna.packid where dyna.packid=".$packid." order by dyna.ibox"; $i=0; $res = $db->query($sql); while ($row = $res->fetchArray()) { $tlink="<a href=superuser_gofe.php?id=".$row['ownerid']."&username=".$row['username']."&ownid=".$row["ownerid"]."&guser=".$row['guser']."&packid=".$row['id']."&title=".urlencode($row['title'] ).">"; $rlink="<a href=removeransap.php?userid=".$row['ownerid']."&username=".$row['username']."&guser=".$row['guser']."&packid=".$packid."&title=".urlencode($row['title'] ).">"; $sclink="<a href=zlistscs.php?userid=".$row['ownerid']."&username=".$row['username']."&guser=".$row['guser']."&packid=".$packid."&title=".urlencode($row['title'] ).">"; $mlink="<a href=zuseraddp.php?userid=".$row['ownerid']."&username=".$row['username']."&guser=".$row['guser']."&packid=".$packid."&title=".urlencode($row['title'] ).">"; echo "<tr>"; echo "<td>".$mlink.substr($row["title"],0,150)."(".$row["packid"].")"."</a></td>"; echo "<td>".$row["company"]."</td>"; echo "<td>".$row["username"]."(".$row["ownerid"].")"."</td>"; $percent=number_format(floor(($row["ibox"]/$tas)*100),2); $percent=number_format(($row["ibox"]/$tas)*100,2); $perc=($row["ibox"]/$row["tas"])*100; $grade="A"; if ($perc<80) $grade="B"; if ($perc<70) $grade="C"; if ($perc<59) $grade="D"; echo "<td>".$perc."%</a></td>"; echo "<td>".$grade."</td>"; echo "<td>".$sclink.$row["ibox"]."</a></td>"; //echo "<td>".$rlink ."DONT -REAL DELETE</a></td>"; echo "<td>".$tlink ."-AEdiT</a></td>"; echo "</tr>"; $i++; } echo "</table>"; ?>
Edit file:zprog_listi.php3542