Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php include("scripts/login.php");
- $tag=$_GET['tag'];
- echo "
- <html>
- <head>
- <title>sJ - Update User $tag</title>
- </head>
- <body>
- ";
- $loc="localhost";
- $username="sj";
- $password="this is my password, not yours!";
- $database="sj_xbl";
- $link = mysql_connect($loc,$username,$password);
- mysql_connect($loc,$username,$password);
- @mysql_select_db($database) or die( "Unable to select database");
- $query="SELECT * FROM members WHERE tag='$tag'";
- $result=mysql_query($query);
- $num=mysql_numrows($result);
- mysql_close();
- $i=0;
- while ($i < $num) {
- $tag=mysql_result($result,$i,"tag");
- $email=mysql_result($result,$i,"email");
- $points=mysql_result($result,$i,"points");
- $referral=mysql_result($result,$i,"referral");
- $age=mysql_result($result,$i,"age");
- $rank=mysql_result($result,$i,"rank");
- $active=mysql_result($result,$i,"active");
- $avatar=mysql_result($result,$i,"avatar");
- if ($active == 0) {
- $status = '<font color="yellow">Pending</font>';
- }
- elseif ($active == 1) {
- $status = '<font color="green">Active</font>';
- }
- elseif ($active == 2) {
- $status = '<font color="red">Suspended</font>';
- }
- if ($rank == 'img src="images/ranks/GEN.png\"') {
- $gen == 'selected="selected"'
- }
- elseif ($rank == 'img src=\"images/ranks/LTG.png\"') {
- $ltg == 'selected="selected"'
- }
- elseif ($rank == 'img src=\"images/ranks/MG.png\"') {
- $mg == 'selected="selected"'
- }
- elseif ($rank == 'img src=\"images/ranks/BG.png\"') {
- $bg == 'selected="selected"'
- }
- elseif ($rank == 'img src=\"images/ranks/COL.png\"') {
- $col == 'selected="selected"'
- }
- elseif ($rank == 'img src=\"images/ranks/MAJ.png\"') {
- $maj == 'selected="selected"'
- }
- elseif ($rank == 'img src=\"images/ranks/1LT.png\"') {
- $1lt == 'selected="selected"'
- }
- elseif ($rank == 'img src=\"images/ranks/SFC.png\"') {
- $sfc == 'selected="selected"'
- }
- elseif ($rank == 'img src=\"images/ranks/SGT.png\"') {
- $sgt == 'selected="selected"'
- }
- elseif ($rank == 'img src=\"images/ranks/PFC.png\"') {
- $pfc == 'selected="selected"'
- }
- echo "
- <form action='scripts/update.insert.php' method='post'>
- <input type='hidden' value='$tag' name='ud_tag'>
- GamerTag: $tag<br>
- Email: <input type='text' name='ud_email' value='$email'><br>
- Points: <input type='text' name='ud_points' value='$points'><br>
- Referral: <input type='text' name='ud_referral' value='$referral'><br>
- Age: <input type='text' name='ud_age' value='$age'><br>
- Current Rank: <$rank /> <br>
- New Rank: <select name='ud_rank'>
- <option value='img src=\"images/ranks/GEN.png\" alt=\"General\" ' $gen >General</option>
- <option value='img src=\"images/ranks/LTG.png\" alt=\"Leiutenant General\" ' $ltg >Leiutenant General</option>
- <option value='img src=\"images/ranks/MG.png\" alt=\"Major General\" ' $mg >Major General</option>
- <option value='img src=\"images/ranks/BG.png\" alt=\"Brigadier General\" ' $bg >Brigadier General</option>
- <option value='img src=\"images/ranks/COL.png\" alt=\"Colonel\" ' $col >Colonel</option>
- <option value='img src=\"images/ranks/MAJ.png\" alt=\"Major\" ' $maj >Major</option>
- <option value='img src=\"images/ranks/CPT.png\" alt=\"Captain\" ' $cpt >Captain</option>
- <option value='img src=\"images/ranks/2LT.png\" alt=\"Lieutenant\" ' $1lt >Lieutenant</option>
- <option value='img src=\"images/ranks/MSG.png\" alt=\"Master Sergeant\" ' $msg >Master Sergeant</option>
- <option value='img src=\"images/ranks/SFC.png\" alt=\"Sergeant First Class\" ' $sfc >Sergeant First Class</option>
- <option value='img src=\"images/ranks/SGT.png\" alt=\"Sergeant\" ' $sgt >Sergeant</option>
- <option value='img src=\"images/ranks/PFC.png\" alt=\"Private\" ' $pfc >Private</option>
- </select><br />
- Current activity: $status<br />
- New activity: <select name=\"ud_active\">
- <option value=\"2\">Suspended</option>
- <option value=\"1\">Active</option>
- <option value=\"0\">Pending</option>
- </select><br />
- Avatar: <input type='text' name='ud_avatar' value='$avatar'><br>
- <input type=\"Submit\" value=\"Update\">
- </form>
- <br />
- <font color=\"red\">Important:</font>
- <p>Activity values</p>
- <ul>
- <li>0 - Pending</li>
- <li>1 - Active</li>
- <li>2 - Suspended</li>
- </ul>
- ";
- ++$i;
- }
- ?>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement