
dezkit
Members-
Posts
1,236 -
Joined
-
Last visited
Everything posted by dezkit
-
doesn't work databases: quickgam_amx and quickgam_jbamxbans
-
can you implement it in my code, i can't seem to figure it out, thank you
-
oops, i forgot, quickgam_jbamxbans is another database, not another table, sorry
-
Hi guys, I have this code, that grabs all the data from a table and echos it, but i have this one separate table for Jailbreak. how can I grab the data from quickgam_jbamxbans for jailbreak only, thank you so much. here is my code: <table border=0 CELLPADDING=4> <tr> <td align=right>Alias</td> <td align=center><a href="http://xxxx/forumdisplay.php?f=2">Dust2Pub</a></td> <td align=center><a href="http://xxxx/forumdisplay.php?f=3">Deathmatch</a></td> <td align=center><a href="http://xxxx/forumdisplay.php?f=4">Deathrun</a></td> <td align=center><a href="http://xxxx/forumdisplay.php?f=55">Jailbreak</a></td> <td align=center><a href="http://xxxx/forumdisplay.php?f=5">KZ/Bhop</a></td> <td align=center><a href="http://xxxx/forumdisplay.php?f=8">Freezetag</a></td> <td align=center><a href="http://xxxx/forumdisplay.php?f=6">ZPlague</a></td> <td align=center><a href="http://xxxx/forumdisplay.php?f=7">ZRevolution</a></td> </tr> <?php mysql_connect("localhost", "quickgam_me", "xxxx") or die(mysql_error()); mysql_select_db("quickgam_amx") or die(mysql_error()); $query = " SELECT admin_id, server_id, nickname, hostname, access, ashow, admintype FROM amx_amxadmins a, amx_serverinfo s, amx_admins_servers c WHERE c.admin_id = a.id AND c.server_id = s.id AND a.id = c.admin_id AND a.admintype = a.admintype AND a.ashow = a.ashow ORDER BY a.admintype DESC, a.nickname ASC"; $result = mysql_query($query) or die(mysql_error()); while($row = mysql_fetch_array($result)){ $nicks[$row['nickname']][]=$row['server_id']; $admin[$row['nickname']]=$row['admintype']; } $color="1"; foreach($nicks as $nickname=>$serverids) { if($color==1){ $hello = implode(" ",$serverids); echo "<tr bgcolor='#FFF9A1'><td align=right><b>".$nickname."</b><br>"; if($admin[$nickname]=="3"){ echo "<i>Owner</i>"; }elseif($admin[$nickname]=="2"){ echo "<i>Head Admin</i>"; }elseif($admin[$nickname]=="1"){ echo "<i>Admin</i>"; }elseif($admin[$nickname]=="0"){ echo "<i>Co-Owner</i>"; } echo "</td>"; if(strstr($hello,"4")){ // d2pub echo "<td><center><img src='http://xxxx/yes.gif' alt=''></center></td>"; } else { echo "<td><center><img src='http://xxxx/no.gif' alt=''></center></td>"; } if(strstr($hello,"6")){ // deathmatch echo "<td><center><img src='http://xxxx/yes.gif' alt=''></center></td>"; } else { echo "<td><center><img src='http://xxxx/no.gif' alt=''></center></td>"; } if(strstr($hello,"1")){ // deathrun echo "<td><center><img src='http://xxxx/yes.gif' alt=''></center></td>"; } else { echo "<td><center><img src='http://xxxx/no.gif' alt=''></center></td>"; } if(strstr($hello,"8")){ // jailbreak echo "<td><center><img src='http://xxxx/yes.gif' alt=''></center></td>"; } else { echo "<td><center><img src='http://xxxx/no.gif' alt=''></center></td>"; } if(strstr($hello,"17")){ // kz/bhop echo "<td><center><img src='http://xxxx/yes.gif' alt=''></center></td>"; } else { echo "<td><center><img src='http://xxxx/no.gif' alt=''></center></td>"; } if(strstr($hello,"2")){ // simpsons echo "<td><center><img src='http://xxxx/yes.gif' alt=''></center></td>"; } else { echo "<td><center><img src='http://xxxx/no.gif' alt=''></center></td>"; } if(strstr($hello,"14")){ // plague echo "<td><center><img src='http://xxxx/yes.gif' alt=''></center></td>"; } else { echo "<td><center><img src='http://xxxx/no.gif' alt=''></center></td>"; } if(strstr($hello,"5")){ // rev echo "<td><center><img src='http://xxxx/yes.gif' alt=''></center></td>"; } else { echo "<td><center><img src='http://xxxx/no.gif' alt=''></center></td>"; } $color="2"; } else { $hello = implode(" ",$serverids); echo "<tr bgcolor=''><td align=right><b>".$nickname."</b><br>"; if($admin[$nickname]=="3"){ echo "<i>Owner</i>"; }elseif($admin[$nickname]=="2"){ echo "<i>Head Admin</i>"; }elseif($admin[$nickname]=="1"){ echo "<i>Admin</i>"; }elseif($admin[$nickname]=="0"){ echo "<i>Co-Owner</i>"; } echo "</td>"; if(strstr($hello,"4")){ // d2pub echo "<td><center><img src='http://xxxx/yes.gif' alt=''></center></td>"; } else { echo "<td><center><img src='http://xxxx/no.gif' alt=''></center></td>"; } if(strstr($hello,"6")){ // deathmatch echo "<td><center><img src='http://xxxx/yes.gif' alt=''></center></td>"; } else { echo "<td><center><img src='http://xxxx/no.gif' alt=''></center></td>"; } if(strstr($hello,"1")){ // deathrun echo "<td><center><img src='http://xxxx/yes.gif' alt=''></center></td>"; } else { echo "<td><center><img src='http://xxxx/no.gif' alt=''></center></td>"; } if(strstr($hello,"8")){ // jailbreak echo "<td><center><img src='http://xxxx/yes.gif' alt=''></center></td>"; } else { echo "<td><center><img src='http://xxxx/no.gif' alt=''></center></td>"; } if(strstr($hello,"17")){ // kz/bhop echo "<td><center><img src='http://xxxx/yes.gif' alt=''></center></td>"; } else { echo "<td><center><img src='http://xxxx/no.gif' alt=''></center></td>"; } if(strstr($hello,"2")){ // simpsons echo "<td><center><img src='http://xxxx/yes.gif' alt=''></center></td>"; } else { echo "<td><center><img src='http://xxxx/no.gif' alt=''></center></td>"; } if(strstr($hello,"14")){ // plague echo "<td><center><img src='http://xxxx/yes.gif' alt=''></center></td>"; } else { echo "<td><center><img src='http://xxxx/no.gif' alt=''></center></td>"; } if(strstr($hello,"5")){ // rev echo "<td><center><img src='http://xxxx/yes.gif' alt=''></center></td>"; } else { echo "<td><center><img src='http://xxxx/no.gif' alt=''></center></td>"; } $color="1"; } } ?> </tr> <tr> <td align=right>Alias</td> <td align=center><a href="http://xxxx/forumdisplay.php?f=2">Dust2Pub</a></td> <td align=center><a href="http://xxxx/forumdisplay.php?f=3">Deathmatch</a></td> <td align=center><a href="http://xxxx/forumdisplay.php?f=4">Deathrun</a></td> <td align=center><a href="http://xxxx/forumdisplay.php?f=55">Jailbreak</a></td> <td align=center><a href="http://xxxx/forumdisplay.php?f=5">KZ/Bhop</a></td> <td align=center><a href="http://xxxx/forumdisplay.php?f=8">Freezetag</a></td> <td align=center><a href="http://xxxx/forumdisplay.php?f=6">ZPlague</a></td> <td align=center><a href="http://xxxx/forumdisplay.php?f=7">ZRevolution</a></td> </tr> </table> please help me out, thank you for anything posted
-
If selected, + 10 dollars to final order in paypal
dezkit replied to dezkit's topic in PHP Coding Help
Hi, thanks for the response, but I don't know where to put that. Here is my current code. <?php $submit_y = $_POST["submit_y"]; if(!$submit_y){ ?> <center> <form action="" method="post"> <table><tr><td align=right><input type="hidden" name="on0" value="In-game name">In-game name: </td><td><input type="text" name="os0" maxlength="60"></td></tr> <tr><td align=right><input type="hidden" name="on1" value="SteamID">SteamID: </td><td><input type="text" name="os1" maxlength="60"></td></tr> <tr><td align=right><input type="hidden" name="on2" value="Server">Server: </td><td><select name="os2"> <option value="All Servers">All Servers $60.00 <option value="Deathrun">Deathrun $10.00 <option value="Jailbreak">Jailbreak $10.00 <option value="Simpsons Freezetag">Simpsons Freezetag $10.00 <option value="RPG Surf">RPG Surf $10.00 <option value="Zombie Plague">Zombie Plague $10.00 <option value="Zombie Revolution">Zombie Revolution $10.00 </select> </td></tr> <tr><td align=right><input type="hidden" name="on3" value="Type of admin">Type of admin: </td><td><select name="os3"> <option value="Basic admin">Basic admin <option value="Full admin + $10.00">Full admin + $10.00 </select> </td></tr> </table> <input type="image" src="https://www.paypal.com/en_US/i/btn/btn_buynow_LG.gif" border="0" name="submit" value="submit" alt="PayPal - The safer, easier way to pay online!"> </form> </center> <?php } else { ?> <form action="https://www.paypal.com/cgi-bin/webscr" method="post"> <input type="hidden" name="cmd" value="_xclick"> <input type="hidden" name="business" value="[email protected]"> <input type="hidden" name="lc" value="US"> <input type="hidden" name="item_name" value="Buy Admin"> <input type="hidden" name="button_subtype" value="products"> <input type="hidden" name="currency_code" value="USD"> <input type="hidden" name="bn" value="PP-BuyNowBF:btn_buynow_LG.gif:NonHostedGuest"> <input type="hidden" name="currency_code" value="USD"> <input type="hidden" name="option_select0" value="All Servers"> <input type="hidden" name="option_amount0" value="60.00"> <input type="hidden" name="option_select1" value="Deathrun"> <input type="hidden" name="option_amount1" value="10.00"> <input type="hidden" name="option_select2" value="Jailbreak"> <input type="hidden" name="option_amount2" value="10.00"> <input type="hidden" name="option_select3" value="Simpsons Freezetag"> <input type="hidden" name="option_amount3" value="10.00"> <input type="hidden" name="option_select4" value="RPG Surf"> <input type="hidden" name="option_amount4" value="10.00"> <input type="hidden" name="option_select5" value="Zombie Plague"> <input type="hidden" name="option_amount5" value="10.00"> <input type="hidden" name="option_select6" value="Zombie Revolution"> <input type="hidden" name="option_amount6" value="10.00"> <input type="hidden" name="option_index" value="0"> <?php } ?> -
Hello guys, I have this code: <form action="https://www.paypal.com/cgi-bin/webscr" method="post"> <input type="hidden" name="cmd" value="_xclick"> <input type="hidden" name="business" value="[email protected]"> <input type="hidden" name="lc" value="US"> <input type="hidden" name="item_name" value="Buy Admin"> <input type="hidden" name="button_subtype" value="products"> <input type="hidden" name="currency_code" value="USD"> <input type="hidden" name="bn" value="PP-BuyNowBF:btn_buynow_LG.gif:NonHostedGuest"> <table> <tr><td><input type="hidden" name="on0" value="Server">Server</td></tr><tr><td><select name="os0"> <option value="All Servers">All Servers $60.00 <option value="Deathrun">Deathrun $10.00 <option value="Jailbreak">Jailbreak $10.00 <option value="Simpsons Freezetag">Simpsons Freezetag $10.00 <option value="RPG Surf">RPG Surf $10.00 <option value="Zombie Plague">Zombie Plague $10.00 <option value="Zombie Revolution">Zombie Revolution $10.00 </select> </td></tr> <tr><td><input type="hidden" name="on1" value="Type of admin">Type of admin</td></tr><tr><td><select name="os1"> <option value="Basic admin">Basic admin <option value="Full admin + $10.00">Full admin + $10.00 </select> </td></tr> <tr><td><input type="hidden" name="on2" value="In-game name">In-game name</td></tr><tr><td><input type="text" name="os2" maxlength="60"></td></tr> <tr><td><input type="hidden" name="on3" value="SteamID">SteamID</td></tr><tr><td><input type="text" name="os3" maxlength="60"></td></tr> </table> <input type="hidden" name="currency_code" value="USD"> <input type="hidden" name="option_select0" value="All Servers"> <input type="hidden" name="option_amount0" value="60.00"> <input type="hidden" name="option_select1" value="Deathrun"> <input type="hidden" name="option_amount1" value="10.00"> <input type="hidden" name="option_select2" value="Jailbreak"> <input type="hidden" name="option_amount2" value="10.00"> <input type="hidden" name="option_select3" value="Simpsons Freezetag"> <input type="hidden" name="option_amount3" value="10.00"> <input type="hidden" name="option_select4" value="RPG Surf"> <input type="hidden" name="option_amount4" value="10.00"> <input type="hidden" name="option_select5" value="Zombie Plague"> <input type="hidden" name="option_amount5" value="10.00"> <input type="hidden" name="option_select6" value="Zombie Revolution"> <input type="hidden" name="option_amount6" value="10.00"> <input type="hidden" name="option_index" value="0"> <input type="image" src="https://www.paypal.com/en_US/i/btn/btn_buynow_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!"> <img alt="" border="0" src="https://www.paypal.com/en_US/i/scr/pixel.gif" width="1" height="1"> </form> What I'm trying to do is so that if Type of admin is selected to Full admin, then the final price will have 10 dollars added. Thank you
-
when a person submits a form with a certain amount of custom fields, if the payment goes through, is there a way to send an email to me with all custom fields and stuff? thank you
-
Can't fetch a certain data in mysql for some reason.
dezkit replied to dezkit's topic in PHP Coding Help
Amazing, works like a charm, thank you very much!!!! -
Can't fetch a certain data in mysql for some reason.
dezkit replied to dezkit's topic in PHP Coding Help
Here: <table border=0 CELLPADDING=5> <tr> <td align=right>Alias</td> <td align=center>Dust2Pub</td> <td align=center>Deathmatch</td> <td align=center>Deathrun</td> <td align=center>Jailbreak</td> <td align=center>RPGSurf</td> <td align=center>SimpsonsFreezetag</td> <td align=center>ZombiePlague</td> <td align=center>ZombieRevolution</td> </tr> <?php $query = " SELECT admin_id, server_id, nickname, hostname, access, ashow, admintype FROM amx_amxadmins a, amx_serverinfo s, amx_admins_servers c WHERE c.admin_id = a.id AND c.server_id = s.id AND a.id = c.admin_id AND a.admintype = a.admintype ORDER BY a.admintype DESC"; $result = mysql_query($query) or die(mysql_error()); while($row = mysql_fetch_array($result)){ $nicks[][$row['nickname']][$row['admintype']]=$row['server_id']; } $admintype = $row['admintype']; $color="1"; foreach($nicks as $nickname=>$serverids) { if($color==1){ $hello = implode(" ",$serverids); echo "<tr bgcolor='#FFF9A1'><td align=right>".$nickname."<br>"; if($admintype=="3") {echo "Owner"; }elseif($admintype=="2") {echo "Head Admin"; }elseif($admintype=="1") {echo "Server Admin";} echo "</td>"; if(strstr($hello,"4")){ // d2pub echo "<td><center><img src='http://quick-gaming.net/yes.gif' alt=''></center></td>"; } else { echo "<td><center><img src='http://quick-gaming.net/no.gif' alt=''></center></td>"; } $color="2"; } else { $hello = implode(" ",$serverids); echo "<tr bgcolor=''><td align=right>".$nickname."<br>"; if($admintype=="3") {echo "Owner"; }elseif($admintype=="2") {echo "Head Admin"; }elseif($admintype=="1") {echo "Server Admin";} echo "</td>"; if(strstr($hello,"4")){ // d2pub echo "<td><center><img src='http://quick-gaming.net/yes.gif' alt=''></center></td>"; } else { echo "<td><center><img src='http://quick-gaming.net/no.gif' alt=''></center></td>"; } $color="1"; } } ?> </tr> <tr> <td align=right>Alias</td> <td align=center>Dust2Pub</td> <td align=center>Deathmatch</td> <td align=center>Deathrun</td> <td align=center>Jailbreak</td> <td align=center>RPGSurf</td> <td align=center>SimpsonsFreezetag</td> <td align=center>ZombiePlague</td> <td align=center>ZombieRevolution</td> </tr> </table> Thank you -
Can't fetch a certain data in mysql for some reason.
dezkit replied to dezkit's topic in PHP Coding Help
still doesn't work hehe, thanks for the responses though -
Can't fetch a certain data in mysql for some reason.
dezkit replied to dezkit's topic in PHP Coding Help
This is the error when I try to put that in. Fatal error: Cannot use [] for reading in /home/quickgam/public_html/dezkit.php on line 30 -
Can't fetch a certain data in mysql for some reason.
dezkit replied to dezkit's topic in PHP Coding Help
anybody, even have an idea? -
Can't fetch a certain data in mysql for some reason.
dezkit replied to dezkit's topic in PHP Coding Help
bump -
Can't fetch a certain data in mysql for some reason.
dezkit replied to dezkit's topic in PHP Coding Help
Maybe I have to join it in query orsomething? -
Can't fetch a certain data in mysql for some reason.
dezkit replied to dezkit's topic in PHP Coding Help
No error, or anything, even if I put the $row['admintype'] outside the whileloop, and foreach. -
Hello guys. I have a certain problem, I want to fetch "admintype" and "ashow" from the amx_amxadmins table, but I can't seem to get it correctly, it just shows up blank, How can i fix this problem? Here is my code: <table border=0 CELLPADDING=5> <tr> <td align=right>Alias</td> <td align=center>Dust2Pub</td> <td align=center>Deathmatch</td> <td align=center>Deathrun</td> <td align=center>Jailbreak</td> <td align=center>RPGSurf</td> <td align=center>SimpsonsFreezetag</td> <td align=center>ZombiePlague</td> <td align=center>ZombieRevolution</td> </tr> <?php $query = " SELECT admin_id, server_id, nickname, hostname, access, ashow, admintype FROM amx_amxadmins a, amx_serverinfo s, amx_admins_servers c WHERE c.admin_id = a.id AND c.server_id = s.id AND a.id = c.admin_id AND a.admintype = a.admintype ORDER BY a.admintype DESC"; $result = mysql_query($query) or die(mysql_error()); while($row = mysql_fetch_array($result)){ $nicks[$row['nickname']][]=$row['server_id']; } $admintype = $row['admintype']; $color="1"; foreach($nicks as $nickname=>$serverids) { if($color==1){ $hello = implode(" ",$serverids); echo "<tr bgcolor='#FFF9A1'><td align=right>".$nickname."<br>"; if($admintype=="3") {echo "Owner"; }elseif($admintype=="2") {echo "Head Admin"; }elseif($admintype=="1") {echo "Server Admin";} echo "</td>"; if(strstr($hello,"4")){ // d2pub echo "<td><center><img src='http://quick-gaming.net/yes.gif' alt=''></center></td>"; } else { echo "<td><center><img src='http://quick-gaming.net/no.gif' alt=''></center></td>"; } $color="2"; } else { $hello = implode(" ",$serverids); echo "<tr bgcolor=''><td align=right>".$nickname."<br>"; if($admintype=="3") {echo "Owner"; }elseif($admintype=="2") {echo "Head Admin"; }elseif($admintype=="1") {echo "Server Admin";} echo "</td>"; if(strstr($hello,"4")){ // d2pub echo "<td><center><img src='http://quick-gaming.net/yes.gif' alt=''></center></td>"; } else { echo "<td><center><img src='http://quick-gaming.net/no.gif' alt=''></center></td>"; } $color="1"; } } ?> </tr> <tr> <td align=right>Alias</td> <td align=center>Dust2Pub</td> <td align=center>Deathmatch</td> <td align=center>Deathrun</td> <td align=center>Jailbreak</td> <td align=center>RPGSurf</td> <td align=center>SimpsonsFreezetag</td> <td align=center>ZombiePlague</td> <td align=center>ZombieRevolution</td> </tr> </table> Thank you! table layouts amx_amxadmins id nickname ashow admintype amx_serverinfo id hostname amx_admins_servers admin_id server_id
-
Bump before i got to bed
-
HOLY JESUS. It worked! Thank you soo much!! I've been looking into my laptop screen for 4 hours thinking how to solve my problem, and you came and solved it. Thank you and to the others in the thread! Is there also a way to make so that the nicknames that have the most server_id's assigned to them get to be on the list first? Thank you again!
-
Yeah i know, but you don't understand, this is what i want something like array("1"=>"1,2,3,4,5","2"=>"1,2,3") not array("1"=>"1","1"=>"2","1"=>"3","1"=>"4","1"=>"5","2"=>"1","2"=>"2","2"=>"3")
-
I changed my mind, and yeah it didn't work. my problem will be solved if only i knew how to make nickname into an array containing all the server_id's itslinked to.
-
OMG this is so frustrating, to keep things simple now, is there a way to turn the nicknames into an array? for example nickname server_id 1 1 1 2 1 3 1 4 1 5 2 1 2 2 2 3 into nickname server_id 1 1|2|3|4|5 2 1|2|3 thank you guys if you reply.
-
Sorry the last image didn't show what i want to do, this is what i have now i want to have all the checkmarks on one line for nickname, how do i do this?
-
I have no idea. Why does this show up anyways? I changed GROUP BY to ORDER BY.