-
Posts
2,657 -
Joined
-
Last visited
-
Days Won
74
Content Type
Profiles
Forums
Events
Everything posted by Uridium
-
Very small mod just thought it might make a difference add this to your viewuser.php and you can see whos viewing profiles... print" <h1>[url='viewuser.php?u=$userid']{$ir['username']}[/url]</h1><h3> Is currently viewing your profile.</h3>"; Thats it :)
-
Re: [mccode] Additional Currency If you are wanting Gems instead of Crystals or if you wanted Gems and Crystals. You will need to edit EVERY file on your FTP that gives out crystals either renaming Crystals to Gems ( for gems only ) or adding an extra Query so users gain Gems + Crystals........ or reduce gems + crystrals.
-
Re: [V1] Russian Roulette [V1] Menice im assuming this is how you wanted it to look. call this file russian.php << as its the ony link i can see in the script <?php require"globals.php"; if($ir['jail'] or $ir['hospital']) { die("This page cannot be accessed while in jail or hospital."); } if ($_GET['action'] != 'Shoot') { print "Well. Here you are, sitting with a guy you dont know ready to die!! dont waist a shot you only got {$ir['shots']} shot left for the day . "; print " Choose how many turns you want to use <form method=post action=russian.php?action=Shoot><input type=hidden name=action value=Shoot><input type='text' name='pow' value='{$ir['shots']}'> <input type=submit value='Shoot'></form>"; } else { $pow=abs((int) $_POST['pow']); for($i=0;$i<$pow;$i++) { if ($ir['shots'] < 0) { print("You dont have enough shots to shoot!!! "); } else { $chance = rand(1,6); mysql_query("update users set shots=shots-1 where userid=$userid",$c); if ($chance == 1) { $hosptime = rand(1,10); $healthl = rand(50,100); { Print("you Grab the gun and Pull the trigger!!!![b]POW>>>>> WOW[b] YOUR DEAD MAN.....HE Wins You Lose {$healthl} Health and are in the hospital for {$hosptime} "); mysql_query("UPDATE users SET hp=hp-{$healthl} WHERE userid=$userid",$c); $ir['hospital']+=$hosptime; $ir['hp']=$healthl; $reason = "Lost russian roulette"; mysql_query("UPDATE users SET hospital=hospital+{$hosptime}, hospreason = '$reason' WHERE userid=$userid",$c); } } } if ($chance == 2) { $hosptime = rand(1,10); $healthl = rand(50,100); Print("You Grab the gun and Pull the trigger!!!![b]POW>>>>> WOW[b] YOUR DEAD MAN.....HE Wins You Lose {$healthl} Health and are in the hospital for {$hosptime} minutes!!! "); mysql_query("UPDATE users SET hp=hp-{$healthl} WHERE userid=$userid",$c); $ir['hospital']+=$hosptime; $ir['hp']=$healthl; $reason = "Lost russian roulette"; mysql_query("UPDATE users SET hospital=hospital+{$hosptime}, hospreason='$reason' WHERE userid=$userid",$c); print"you have [b]{$ir['shots']}[/b] Shots left "; } if ($chance == 3) { $amnt = rand(500,1000000); if($ir['money'] > $amnt) print "You Grab the gun and Pull the trigger!!!![b]CLICK.....CLICK WOW[b] The Man in the bar Pulls The trigger.....Pow you win the \$ {$amnt}!!!! "; mysql_query("update users set money=money+{$amnt} where userid=$userid",$c); $ir['money']=$amnt; print"you have [b]{$ir['shots']}[/b] Shots left "; } if ($chance == 6) { $hosptime = rand(1,10); $healthl = rand(50,100); Print("You Grab the gun and Pull the trigger!!!![b]POW>>>>> WOW[b] YOUR DEAD MAN.....HE Wins You Lose {$healthl} Health and are in the hospital for {$hosptime} minutes!!! "); mysql_query("UPDATE users SET hp=hp-{$healthl} WHERE userid=$userid",$c); $ir['hospital']+=$hosptime; $ir['hp']=$healthl; $reason ="Lost russian roulette"; mysql_query("UPDATE users SET hospital=hospital+{$hosptime}, hospreason = '$reason' WHERE userid=$userid",$c); print"you have [b]{$ir['shots']}[/b] Shots left "; } if ($chance == 5) { $hosptime = rand(1,10); $healthl = rand(50,100); Print("ou Grab the gun and Pull the trigger!!!![b]POW>>>>> WOW[b] YOUR DEAD MAN.....HE Wins You Lose {$healthl} Health and are in the hospital for {$hosptime} minutes!!! "); mysql_query("UPDATE users SET hp=hp-{$healthl} WHERE userid=$userid",$c); $ir['hospital']+=$hosptime; $ir['hp']=$healthl; $reason = "Lost russian roulette"; mysql_query("UPDATE users SET hospital=hospital+{$hosptime}, hospreason = '$reason' WHERE userid=$userid",$c); print"you have [b]{$ir['shots']}[/b] Shots left "; } if ($chance == 4) { $hosptime = rand(1,10); $healthl = rand(50,100); Print("ou Grab the gun and Pull the trigger!!!![b]POW>>>>> WOW[b] YOUR DEAD MAN.....HE Wins You Lose {$healthl} Health and are in the hospital for {$hosptime} minutes "); mysql_query("UPDATE users SET hp=hp-{$healthl} WHERE userid=$userid",$c); $ir['hospital']+=$hosptime; $ir['hp']=$healthl; $reason ="Lost russian roulette"; mysql_query("UPDATE users SET hospital=hospital+{$hosptime}, hospreason = '$reason' WHERE userid=$userid",$c); print"you have [b]{$ir['shots']}[/b] Shots left "; } print " Choose how many Shots you want to use <form method=post action=russian.php?action=Shoot><input type=hidden name=action value=Shoot><input type='text' name='pow' value='{$ir['shots']}'> <input type=submit value='Shoot'></form>"; } } if($ir['shots']==0) { print "Sorry, all turns used! "; } $h->endpage(); ?> Add this to cron_day $db->query("UPDATE users SET shots=6"); CRON ALTER TABLE users ADD shots INT (11) NOT NULL default=6; And the final part just confused me :)
-
Re: [V1] V1 Help Please Bless him i think he means Illusions lol Glad to have helped matey any more probs gizza hout on MSN.
-
Re: [mccode v2] Tag Mod (Complete) Not sure why these are called ARENA when the original sqls were named tagmarket so change CREATE TABLE `arena` ( `tmID` INT(11) NOT NULL AUTO_INCREMENT, `tmQTY` BIGINT(50) UNSIGNED NOT NULL DEFAULT '0', `tmADDER` INT(11) NOT NULL DEFAULT '0', `tmPRICE` BIGINT(50) UNSIGNED NOT NULL DEFAULT '0' PRIMARY KEY (`tmID`) ) ENGINE=MyISAM ; to CREATE TABLE `tagmarket` ( `tmID` INT(11) NOT NULL AUTO_INCREMENT, `tmQTY` BIGINT(50) UNSIGNED NOT NULL DEFAULT '0', `tmADDER` INT(11) NOT NULL DEFAULT '0', `tmPRICE` BIGINT(50) UNSIGNED NOT NULL DEFAULT '0' PRIMARY KEY (`tmID`) ) ENGINE=MyISAM ;
-
Re: [mccode v2] Tag Mod (Complete) if your using auto_increment you will need a primary key CREATE TABLE `arena` ( `tmID` INT(11) NOT NULL AUTO_INCREMENT, `tmQTY` BIGINT(50) UNSIGNED NOT NULL DEFAULT '0', `tmADDER` INT(11) NOT NULL DEFAULT '0', `tmPRICE` BIGINT(50) UNSIGNED NOT NULL DEFAULT '0' PRIMARY KEY (`tmID`) ) ENGINE=MyISAM ;
-
Re: [mccode v2]My Simple Search Streets The one your referring to is a more advanced Search area nothing to do with streets. Damn glad i could edit lol
-
[mccode v2] Item needed to perform crime.
Uridium replied to shaved92bravada's topic in Free Modifications
Re: [mccode v2] Item needed to perform crime. I dont want paying for the help but whats your website -
Re: attack.php help what you could do is add a Query to the following pages jail.php and hospital.php Create a new SQL ALTER TABLE users ADD nocache INT (11) NOT NULL DEFAULT 0; and place this in the above pages if($ir['nocache']==1) { die("<h2>Your Currently Engaged in a Fight"); } open up attack take and put $db->query("UPDATE users SET nocache=1 WHERE userid=$userid"); Now in attackwin and attackbeat and attacklose place $db->query("UPDATE users SET nocache=0 WHERE userid=$userid"); that will stop them from using 2 pages
-
Re: Help the reason your probably getting that error is cos your staff_items.php has more Queries than your actual SQL so if youve adde extra in the past to the staff_items.php you will have to replace those SQLS back to phpmyadmin.. That will resolve your problem :)
-
Re: [MCCODES v2] Trivia Quiz Creator I havent completed that part yet the SCRIPT above is for the admin section so you can build your quizzes.. Shouldt be too long before its fully functional..
-
Login & Register & Header & Lost Password
Uridium replied to veaseyspike's topic in Free Modifications
Re: Login & Register & Header & Lost Password Just a quick note to those NEW Members of CE if your using this Script. Remove all mentions of $IP = ($_SERVER['HTTP_X_FORWARDED_FOR']) ? $_SERVER['HTTP_X_FORWARDED_FOR'] : $_SERVER['REMOTE_ADDR']; and replace with $IP = $_SERVER['REMOTE_ADDR']; -
Re: admins cant be feded [v2] It creates 2 accounts one in the users and one in a new table called admin just incase someone did decide to ban you. you just login via a seperate page other than the register.php and you can edit yourself. Think of it as a GOD account
-
Re: [mccode v2]My Simple Search Streets There are a few street scripts on here and some are able to place items into your inventory. have a browse about or even look at how your own items are placed into your inventory. on the staff_items.php theres a insert in the script that will help do what your looking for. But bare in mind when you do this with the above script the chances of finding the item will be far greater so make a small uncostly item. print"BLAH BLAH BLAH you found an hidden item check your inventory"; $db->query("INSERT INTO inventory VALUES('',1,$userid,1)",$c); } Change the 1 value to that of one of your own inventory item VALUES('',1,$userid,1)",$c);
-
Re: [MCCODES v2] Trivia Quiz Creator now open up smenu.php and add these links [url='staff_trivia.php?action=addtrivia']Create New Trivia[/url] [url='staff_trivia.php?action=edittrivia']Edit Exsisting Trivia[/url] [url='staff_trivia.php?action=deletetrivia']Delete Trivia[/url] [url='staff_trivia.php?action=addquestions']Create New Questions[/url] [url='staff_trivia.php?action=editquestions']Edit Exsisting Questions[/url] [url='staff_trivia.php?action=deletequestions']Delete Questions[/url] Staff Panel works 100% tested kicked and booted it to make sure and a final kick for good measure When creating a TIVIA NAME and giving it an ID the ID must match that of the Questions for that particular QUIZ........
-
Re: [MCCODES v2] Trivia Quiz Creator PART 2 of 2 just join together from Part 1 function edit_trivia_sub() { global $db,$ir,$c,$h,$userid; if($ir['user_level'] != 2) { die("403"); } global $ir,$c,$h,$userid, $db; $db->query("UPDATE trivia_games SET gamename='{$_POST['gamename']}', gamedesc='{$_POST['gamedesc']}', prize='{$_POST['prize']}', price='{$_POST['price']}', game='{$_POST['triviaid']}', timer='{$_POST['timer']}' WHERE id={$_POST['id']}"); print "<h1>Trivia <font color='cyan'>{$_POST['gamename']} </font>Edited...</h1> <h3>OPTIONS</h3> [url='staff_trivia.php?action=addtrivia']Create New Trivia[/url] [url='staff_trivia.php?action=edittrivia']Edit Exsisting Trivia[/url] [url='staff_trivia.php?action=deletetrivia']Delete Trivia[/url]"; stafflog_add("Edited Trivia {$_POST['gamename']}"); } /* START OF THE QUESTIONS SECTION */ function add_questions_begin() { global $db,$ir, $c; if($ir['user_level'] != 2) { die("403"); } print "<table width='169' cellpadding='0' cellspacing='0'> <tr> <td width='169' height='39' background='block_01.jpg'><center>Trivia Form Creator</td></center></tr> <tr> <td width='169' background='block_02.jpg' valign='top'> <form action='staff_trivia.php?action=addquestionssub' method='post'> Question : <textarea rows='6' cols='25' name='question' /></textarea> Answer 1 : <input type='text' name='answer1' /> Answer 2 : <input type='text' name='answer2' /> Answer 3 : <input type='text' name='answer3' /> Answer 4 : <input type='text' name='answer4' /> Correct Answer ID : <input type='text' name='answer' /> Use this with game user ID#: <input type='text' name='triviaid' /> <input type='submit' value='Create Questions' /></form> <tr> <td width='169' height='21' height='21' background='block_03.jpg'><center></td></tr><tr><td> </center></td></tr> <tr></table>"; } function add_questions_submit() { global $db,$ir,$c,$userid; if($ir['user_level'] != 2) { die("403"); } if(!isset($_POST['question']) || !isset($_POST['answer1']) || !isset($_POST['answer2']) || !isset($_POST['answer3']) || !isset($_POST['answer4']) || !isset($_POST['answer']) || !isset($_POST['triviaid'])) { print "You missed one or more of the required fields. Please go back and try again. [url='staff_trivia.php?action=addquestions']> Back[/url]"; $h->endpage(); exit; } $gname=$db->query("SELECT * FROM trivia_questions WHERE question='{$_POST['question']}'"); if($db->num_rows($gname) != 0) { print "<h1><font color='red'>Duplicated Question Entry Detected!</h1> <h3>Sorry Question <font color='yellow'>{$_POST['question']} </font>already in use</h3>"; $query='SELECT * FROM trivia_questions'; $result=mysql_query($query); $num=mysql_numrows($result); print"<table border='2' cellspacing='2' cellpadding='2'> <tr> <th><font face='Arial, Helvetica, sans-serif'><h3><font color='yellow'>Question</h3></font></th> <th><font face='Arial, Helvetica, sans-serif'><h3><font color='cyan'>Answer 1</h3></font></th> <th><font face='Arial, Helvetica, sans-serif'><h3><font color='blue'>Answer 2</h3></font></th> <th><font face='Arial, Helvetica, sans-serif'><h3><font color='cyan'>Answer 3</h3></font></th> <th><font face='Arial, Helvetica, sans-serif'><h3><font color='blue'>Answer 4</h3></font></th> <th><font face='Arial, Helvetica, sans-serif'><h3><font color='blue'>Correct Answer</h3></font></th> <th><font face='Arial, Helvetica, sans-serif'><h3><font color='blue'>User Game ID#</h3></font></th> </tr> "; $i=0; while ($i < $num) { $f1=mysql_result($result,$i,'question'); $f2=mysql_result($result,$i,'answer1'); $f3=mysql_result($result,$i,'answer2'); $f4=mysql_result($result,$i,'answer3'); $f5=mysql_result($result,$i,'answer4'); $f6=mysql_result($result,$i,'answer'); $f6=mysql_result($result,$i,'game'); print" <table border='2' cellspacing='3' cellpadding='3'> <tr> <td><font face='Arial, Helvetica, sans-serif'>[b]<h3><font color='yellow'>$f1</h3></font>[/b]</font></td> <td><font face='Arial, Helvetica, sans-serif'><h3><font color='cyan'>$f2</h3></font></font></td> <td><font face='Arial, Helvetica, sans-serif'><h3><font color='blue'>$f3</h3></font></font></td> <td><font face='Arial, Helvetica, sans-serif'>[b]<h3><font color='yellow'>$f4</h3></font>[/b]</font></td> <td><font face='Arial, Helvetica, sans-serif'><h3><font color='cyan'>$f5</h3></font></font></td> <td><font face='Arial, Helvetica, sans-serif'><h3><font color='blue'>$f6</h3></font></font></td> <td><font face='Arial, Helvetica, sans-serif'><h3><font color='red'>[url='staff_trivia.php?action=deletequestions']X[/url]</h3></font></font></td> </tr>"; $i++; } print " <a href='staff_trivia.php?action=addquestions'><center><font size=3>Return To Questions Editor </center></font></a> "; Print"<center><h3><font color='lightgreen'>Lastest Addition listed Below</h3></font>"; exit; } $idupe=$db->query("SELECT * FROM trivia_questions WHERE game='{$_POST['triviaid']}'"); if($db->fetch_row($idupe) != 0) { print "<h1><font color='red'>Duplicated Game ID# Entry Detected!</h1> <h3>Sorry game ID# <font color='yellow'>{$_POST['triviaid']} </font>already in use</h3>"; $query='SELECT * FROM trivia_questions'; $result=mysql_query($query); $num=mysql_numrows($result); print"<table border='2' cellspacing='2' cellpadding='2'> <tr> <th><font face='Arial, Helvetica, sans-serif'><h3><font color='yellow'>Question</h3></font></th> <th><font face='Arial, Helvetica, sans-serif'><h3><font color='cyan'>Answer 1</h3></font></th> <th><font face='Arial, Helvetica, sans-serif'><h3><font color='blue'>Answer 2</h3></font></th> <th><font face='Arial, Helvetica, sans-serif'><h3><font color='cyan'>Answer 3</h3></font></th> <th><font face='Arial, Helvetica, sans-serif'><h3><font color='blue'>Answer 4</h3></font></th> <th><font face='Arial, Helvetica, sans-serif'><h3><font color='blue'>Correct Answer</h3></font></th> <th><font face='Arial, Helvetica, sans-serif'><h3><font color='blue'>User Game ID#</h3></font></th> </tr> "; $i=0; while ($i < $num) { $f1=mysql_result($result,$i,'question'); $f2=mysql_result($result,$i,'answer1'); $f3=mysql_result($result,$i,'answer2'); $f4=mysql_result($result,$i,'answer3'); $f5=mysql_result($result,$i,'answer4'); $f6=mysql_result($result,$i,'answer'); $f6=mysql_result($result,$i,'game'); print" <table border='2' cellspacing='3' cellpadding='3'> <tr> <td><font face='Arial, Helvetica, sans-serif'>[b]<h3><font color='yellow'>$f1</h3></font>[/b]</font></td> <td><font face='Arial, Helvetica, sans-serif'><h3><font color='cyan'>$f2</h3></font></font></td> <td><font face='Arial, Helvetica, sans-serif'><h3><font color='blue'>$f3</h3></font></font></td> <td><font face='Arial, Helvetica, sans-serif'>[b]<h3><font color='yellow'>$f4</h3></font>[/b]</font></td> <td><font face='Arial, Helvetica, sans-serif'><h3><font color='cyan'>$f5</h3></font></font></td> <td><font face='Arial, Helvetica, sans-serif'><h3><font color='blue'>$f6</h3></font></font></td> <td><font face='Arial, Helvetica, sans-serif'><h3><font color='red'>[url='staff_trivia.php?action=deletequestions']X[/url]</h3></font></font></td> </tr>"; $i++; } print " <a href='staff_trivia.php?action=addquestions'><center><font size=3>Return To Questions Editor </center></font></a> "; Print"<center><h3>Lastest Addition listed Below</h3>"; exit; } $db->query("INSERT INTO trivia_questions (question, answer1, answer2, answer3, answer4, answer, game) VALUES( '{$_POST['question']}', '{$_POST['answer1']}', '{$_POST['answer2']}', '{$_POST['answer3']}', '{$_POST['answer4']}', '{$_POST['answer']}','{$_POST['triviaid']}')"); print "<h1>Trivia Created! <font color='cyan'>{$_POST['question']} </font></h1> <h3>OPTIONS</h3> [url='staff_trivia.php?action=addquestions']Create New Trivia[/url] [url='staff_trivia.php?action=editquestions']Edit Exsisting Trivia[/url] [url='staff_trivia.php?action=deletequestions']Delete Trivia[/url]"; stafflog_add("Created Trivia {$_POST['question']} for exsisting Trivia called {$_POST['gamename']}"); } function deletequestions() { global $db,$ir,$c,$h,$userid; if($_POST['id']) { $q=$db->query("SELECT * FROM trivia_questions WHERE id={$_POST['id']}"); $old2=$db->fetch_row($q); $db->query("DELETE FROM trivia_questions WHERE id={$_POST['id']}"); print "<h2>Trivia Game {$old2['question']} Removed.</h2> <h3>OPTIONS</h3> [url='staff_trivia.php?action=addquestions']Create New Trivia[/url] [url='staff_trivia.php?action=editquestions']Edit Exsisting Trivia[/url] <a href='staff_trivia.php?action=deletequestions'>Delete Questions/a>"; stafflog_add("Deleted Trivia Game {$old2['gamenanme']}"); } else { print "<h3>Deleting a Question</h3><hr /> <form action='staff_trivia.php?action=deletequestions' method='post'> <h2>Delete Question:</h2> ".delquestion_dropdown($c, "id")." <input type='submit' value='Delete This Catagory' /></form>"; } } function edit_questions_begin() { global $db,$ir,$c,$h,$userid; if($ir['user_level'] != 2) { die("403"); } print "<h3>Editing Question Form</h3> <form action='staff_trivia.php?action=editquestionsform' method='post'> <h2>Edit Question ?:</h2> ".question_dropdown($c,"question")." <input type='submit' value='Edit Trivia Question' /></form>"; } function edit_questions_form() { global $db,$ir,$c,$h,$userid; if($ir['user_level'] != 2) { die("403"); } $edq1=$db->query("SELECT * FROM trivia_questions WHERE id={$_POST['question']}"); $quizquestedit=$db->fetch_row($edq1); print "<h3>Editing Question</h3> <table width='169' cellpadding='0' cellspacing='0'> <tr> <td width='169' height='39' background='block_01.jpg'><center>Questions Editor</td></center></tr> <tr> <td width='169' background='block_02.jpg' valign='top'> <form action='staff_trivia.php?action=editquestionssub' method='post'> <input type='hidden' name='id' value='{$quizquestedit['id']}'/> Question: <input type='text' name='question' value='{$quizquestedit['question']}'/> Answer 1 <input type='text' name='answer1' value='{$quizquestedit['answer1']}'/> Answer 2 <input type='text' name='answer2' value='{$quizquestedit['answer2']}'/> Answer 3 <input type='text' name='answer3' value='{$quizquestedit['answer3']}'/> Answer 4 <input type='text' name='answer4' value='{$quizquestedit['answer4']}'/> Correct Answer <input type='text' name='answer' value='{$quizquestedit['answer']}'/> Question for trivia ID#<input type='text' name='triviaid' value='{$quizquestedit['game']}'/> <input type='submit' value='Edit Trivia' /></form>"; } function edit_questions_submit() { global $db,$ir,$c,$h,$userid; if($ir['user_level'] != 2) { die("403"); } global $ir,$c,$h,$userid, $db; $db->query("UPDATE trivia_questions SET question='{$_POST['question']}', answer1='{$_POST['answer1']}', answer2='{$_POST['answer2']}', answer3='{$_POST['answer3']}', answer4='{$_POST['answer4']}', answer='{$_POST['answer']}', game='{$_POST['triviaid']}' WHERE id={$_POST['id']}"); print "<h1>Trivia <font color='cyan'>{$_POST['question']} </font>Edited...which is in use with Trivia Quiz {$_POST['gamename']}</h1> <h3>OPTIONS</h3> [url='staff_trivia.php?action=addquestions']Create New Trivia[/url] [url='staff_trivia.php?action=editquestions']Edit Exsisting Trivia[/url] [url='staff_trivia.php?action=deletequestions']Delete Trivia[/url]"; stafflog_add("Edited Trivia {$_POST['question']}"); } /* END OF QUESTIONS SECTION */ $h->endpage(); ?>
-
Re: [MCCODES v2] Trivia Quiz Creator call this file staff_trivia.php PART 1 of 2 Exceeds 20000 Charaters <?PHP include "sglobals.php"; switch($_GET['action']) { case 'addtrivia': add_trivia_begin(); break; case 'addtriviasub': add_trivia_submit(); break; case 'deletetrivia': deletetrivia(); break; case 'edittrivia': edit_trivia_begin(); break; case 'edittriviaform': edit_trivia_form(); break; case 'edittriviasub': edit_trivia_sub(); break; case 'addquestions': add_questions_begin(); break; case 'addquestionssub': add_questions_submit(); break; case 'editquestions': edit_questions_begin(); break; case 'editquestionsform': edit_questions_form(); break; case 'editquestionssub': edit_questions_submit(); break; case 'deletequestions': deletequestions(); break; default: print "Error: This script requires an action."; break; } function htmlspcl($in) { return str_replace("'", "'", htmlspecialchars($in)); } function add_trivia_begin() { global $db,$ir, $c; if($ir['user_level'] != 2) { die("403"); } print "<table width='169' cellpadding='0' cellspacing='0'> <tr> <td width='169' height='39' background='block_01.jpg'><center>Trivia Form Creator</td></center></tr> <tr> <td width='169' background='block_02.jpg' valign='top'> <form action='staff_trivia.php?action=addtriviasub' method='post'> Trivia Name: <input type='text' name='gamename' /> Trivia Description: <input type='text' name='gamedesc' /> Trivia Price <input type='text' name='prize' /> For Getting Per Question Correct Trivia Cost: <input type='text' name='price' /> Set Timer : <input type='text' name='timer' /> Trivia ID#: <input type='text' name='triviaid' /> <input type='submit' value='Create Trivia Form' /></form> <tr> <td width='169' height='21' height='21' background='block_03.jpg'><center></td></tr><tr><td> </center></td></tr> <tr></table>"; } function add_trivia_submit() { global $db,$ir,$c,$userid; if($ir['user_level'] != 2) { die("403"); } if(!isset($_POST['gamename']) || !isset($_POST['gamedesc']) || !isset($_POST['prize']) || !isset($_POST['price']) || !isset($_POST['timer']) || !isset($_POST['triviaid'])) { print "You missed one or more of the required fields. Please go back and try again. [url='staff_trivia.php?action=addtrivia']> Back[/url]"; $h->endpage(); exit; } $prize=abs((int) $_POST['prize']); $price=abs((int) $_POST['price']); $timer=abs((int) $_POST['timer']); $gname=$db->query("SELECT * FROM trivia_games WHERE gamename='{$_POST['gamename']}'"); if($db->num_rows($gname) != 0) { print "<h1><font color='red'>Duplicated Game Name Entry Detected!</h1> <h3>Sorry game name <font color='yellow'>{$_POST['gamename']} </font>already in use</h3>"; $query='SELECT * FROM trivia_games'; $result=mysql_query($query); $num=mysql_numrows($result); print"<table border='2' cellspacing='2' cellpadding='2'> <tr> <th><font face='Arial, Helvetica, sans-serif'><h3><font color='yellow'>Description</h3></font></th> <th><font face='Arial, Helvetica, sans-serif'><h3><font color='cyan'>Game Name</h3></font></th> <th><font face='Arial, Helvetica, sans-serif'><h3><font color='blue'>User Entry ID#</h3></font></th> <th><font face='Arial, Helvetica, sans-serif'><h3><font color='blue'>Timer Seconds</h3></font></th> </tr> "; $i=0; while ($i < $num) { $f1=mysql_result($result,$i,'gamedesc'); $f2=mysql_result($result,$i,'gamename'); $f3=mysql_result($result,$i,'game'); $f4=mysql_result($result,$i,'timer'); print" <table border='2' cellspacing='3' cellpadding='3'> <tr> <td><font face='Arial, Helvetica, sans-serif'>[b]<h3><font color='yellow'>$f1</h3></font>[/b]</font></td> <td><font face='Arial, Helvetica, sans-serif'><h3><font color='cyan'>$f2</h3></font></font></td> <td><font face='Arial, Helvetica, sans-serif'><h3><font color='blue'>$f3</h3></font></font></td> <td><font face='Arial, Helvetica, sans-serif'><h3><font color='green'>$f4</h3></font></font></td> <td><font face='Arial, Helvetica, sans-serif'><h3><font color='red'>[url='staff_trivia.php?action=deletetrivia']X[/url]</h3></font></font></td> </tr>"; $i++; } print " <a href='staff_trivia.php?action=addtrivia'><center><font size=3>Return To Editor </center></font></a> "; Print"<center><h3><font color='lightgreen'>Lastest Addition listed Below</h3></font>"; exit; } $idupe=$db->query("SELECT * FROM trivia_games WHERE game='{$_POST['triviaid']}'"); if($db->fetch_row($idupe) != 0) { print "<h1><font color='red'>Duplicated Game ID# Entry Detected!</h1> <h3>Sorry game ID# <font color='yellow'>{$_POST['triviaid']} </font>already in use</h3>"; $query='SELECT * FROM trivia_games'; $result=mysql_query($query); $num=mysql_numrows($result); print"<table border='2' cellspacing='2' cellpadding='2'> <tr> <th><font face='Arial, Helvetica, sans-serif'><h3><font color='yellow'>Description</h3></font></th> <th><font face='Arial, Helvetica, sans-serif'><h3><font color='cyan'>Game Name</h3></font></th> <th><font face='Arial, Helvetica, sans-serif'><h3><font color='blue'>User Entry ID#</h3></font></th> <th><font face='Arial, Helvetica, sans-serif'><h3><font color='blue'>Timer Seconds</h3></font></th> </tr> "; $i=0; while ($i < $num) { $f1=mysql_result($result,$i,'gamedesc'); $f2=mysql_result($result,$i,'gamename'); $f3=mysql_result($result,$i,'game'); $f4=mysql_result($result,$i,'timer'); print" <table border='2' cellspacing='3' cellpadding='3'> <tr> <td><font face='Arial, Helvetica, sans-serif'>[b]<h3><font color='yellow'>$f1</h3></font>[/b]</font></td> <td><font face='Arial, Helvetica, sans-serif'><h3><font color='cyan'>$f2</h3></font></font></td> <td><font face='Arial, Helvetica, sans-serif'><h3><font color='blue'>$f3</h3></font></font></td> <td><font face='Arial, Helvetica, sans-serif'><h3><font color='green'>$f4</h3></font></font></td> <td><font face='Arial, Helvetica, sans-serif'><h3><font color='red'>[url='staff_trivia.php?action=deletetrivia']X[/url]</h3></font></font></td> </tr>"; $i++; } print " <a href='staff_trivia.php?action=addtrivia'><center><font size=3>Return To Editor </center></font></a> "; Print"<center><h3>Lastest Addition listed Below</h3>"; exit; } $db->query("INSERT INTO trivia_games (gamename, gamedesc, prize, price, timer, game) VALUES( '{$_POST['gamename']}', '{$_POST['gamedesc']}', '{$_POST['prize']}', '{$_POST['price']}', '{$_POST['timer']}', '{$_POST['triviaid']}')"); print "<h1>Trivia Created! <font color='cyan'>{$_POST['gamename']} </font></h1> <h3>OPTIONS</h3> [url='staff_trivia.php?action=addtrivia']Create New Trivia[/url] [url='staff_trivia.php?action=edittrivia']Edit Exsisting Trivia[/url] [url='staff_trivia.php?action=deletetrivia']Delete Trivia[/url]"; stafflog_add("Created Trivia {$_POST['gamename']} "); } function deletetrivia() { global $db,$ir,$c,$h,$userid; if($_POST['id']) { $q=$db->query("SELECT * FROM trivia_games WHERE id={$_POST['id']}"); $old=$db->fetch_row($q); $db->query("DELETE FROM trivia_games WHERE id={$_POST['id']}"); print "<h2>Trivia Game {$old['gamename']} Removed.</h2> <h3>OPTIONS</h3> [url='staff_trivia.php?action=addtrivia']Create New Trivia[/url] [url='staff_trivia.php?action=edittrivia']Edit Exsisting Trivia[/url] [url='staff_trivia.php?action=deletetrivia']Delete Trivia[/url]"; stafflog_add("Deleted Trivia Game {$old['gamenanme']}"); } else { print "<h3>Deleting a id</h3><hr /> <form action='staff_trivia.php?action=deletetrivia' method='post'> <h2>Delete Trivia Game </h2> ".id_dropdown($c, "id")." <input type='submit' value='Delete This Game' /></form>"; } } function edit_trivia_begin() { global $db,$ir,$c,$h,$userid; if($ir['user_level'] != 2) { die("403"); } print "<h3>Editing Trivia Form</h3> <form action='staff_trivia.php?action=edittriviaform' method='post'> <h2>Edit Which Trivia ?</h2> ".id_dropdown($c,'id')." <input type='submit' value='Edit Trivia Game' /></form>"; } function edit_trivia_form() { global $db,$ir,$c,$h,$userid; if($ir['user_level'] != 2) { die("403"); } $edq=$db->query("SELECT * FROM trivia_games WHERE id={$_POST['id']}"); $quizedit=$db->fetch_row($edq); print "<h3>Editing Trivia Form</h3> <form action='staff_trivia.php?action=edittriviasub' method='post'> <input type='hidden' name='id' value='{$quizedit['id']}'/> Trivia Name: <input type='text' name='gamename' value='{$quizedit['gamename']}'/> Trivia Description: <input type='text' name='gamedesc' value='{$quizedit['gamedesc']}'/> Trivia Price <input type='text' name='prize' value='{$quizedit['prize']}'/> For getting Per Question Correct Trivia Cost: <input type='text' name='price' value='{$quizedit['price']}'/> Game Timer: <input type='text' name='timer' value='{$quizedit['timer']}'/> <input type='hidden' name='triviaid' value='{$quizedit['game']}'/> <input type='submit' value='Edit Trivia' /></form>"; }
-
Re: [MCCODES v2] Trivia Quiz Creator For now i'll Post the Admin section for the Trivia Creator just so i dont muck it up later whilst editing stuff..... SQLS CREATE TABLE IF NOT EXISTS `trivia_games` ( `id` int(11) NOT NULL auto_increment, `gamename` varchar(32) NOT NULL default '', `gamedesc` varchar(128) NOT NULL default '', `prize` int(11) NOT NULL default '0', `price` int(11) NOT NULL default '0', `game` int(11) NOT NULL default '0', `timer` int(11) NOT NULL default '60', PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ; CREATE TABLE IF NOT EXISTS `trivia_questions` ( `id` int(11) NOT NULL auto_increment, `question` varchar(255) NOT NULL default '', `answer1` varchar(128) NOT NULL default '', `answer2` varchar(128) NOT NULL default '', `answer3` varchar(128) NOT NULL default '', `answer4` varchar(128) NOT NULL default '', `answer` tinyint(4) NOT NULL default '0', `game` int(11) NOT NULL default '0', PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ; CREATE TABLE IF NOT EXISTS `trivia_records` ( `id` int(11) NOT NULL auto_increment, `userid` int(11) NOT NULL default '0', `last_question` int(11) NOT NULL default '0', `playagain` int(11) NOT NULL default '0', `game` int(11) NOT NULL default '0', PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ; Open up global_func.php and add function delquestion_dropdown($connection,$ddname="id",$selected=-1) { global $db; $ret="<select name='$ddname' type='dropdown'>"; $q=$db->query("SELECT * FROM trivia_questions ORDER BY id ASC"); if($selected < 1) { $ret.="<option value='0' selected='selected'>-- None --</option>"; } else { $ret.="<option value='0'>-- None --</option>"; } while($r=$db->fetch_row($q)) { $ret.="\n<option value='{$r['id']}'"; if ($selected == $r['id']) { $ret.=" selected='selected'";$first=1; } $ret.=">{$r['question']}</option>"; } $ret.="\n</select>"; return $ret; } function question_dropdown($connection,$ddname="question",$selected=-1) { global $db; $ret="<select name='$ddname' type='dropdown'>"; $q=$db->query("SELECT * FROM trivia_questions ORDER BY question ASC"); if($selected < 1) { $ret.="<option value='0' selected='selected'>-- None --</option>"; } else { $ret.="<option value='0'>-- None --</option>"; } while($r=$db->fetch_row($q)) { $ret.="\n<option value='{$r['id']}'"; if ($selected == $r['id']) { $ret.=" selected='selected'";$first=1; } $ret.=">{$r['question']}</option>"; } $ret.="\n</select>"; return $ret; } function id_dropdown($connection,$ddname="id",$selected=-1) { global $db; $ret="<select name='$ddname' type='dropdown'>"; $q=$db->query("SELECT * FROM trivia_games ORDER BY gamename ASC"); if($selected < 1) { $ret.="<option value='0' selected='selected'>-- None --</option>"; } else { $ret.="<option value='0'>-- None --</option>"; } while($r=$db->fetch_row($q)) { $ret.="\n<option value='{$r['id']}'"; if ($selected == $r['id']) { $ret.=" selected='selected'";$first=1; } $ret.=">{$r['gamename']}</option>"; } $ret.="\n</select>"; return $ret; } Part 2 BELOW
-
Re: admins cant be feded [v2] I remodded my installer.php so when your the first one to Reg your placed into a different table called Admin saves anyone harrasing you ;)
-
Re: [mccode v2] Gift.php [edited] Yep Gotta Agree worked for me to as i used Jasons Copy
-
Re: always running from a fight Would you like the long or short version for that question lol heres my Theory.... The Attack Script on MCC has never been decent. We make it loook good Graphically but i donit think anyone has ever cured its problems
-
Re: [MCCODES v2] Trivia Quiz Creator I keep running into problems damn thing wont put the added questions in correct order. Im slacking in my old age lol
-
Re: [v2] Fish & Chippy mod OH heck did i just help soeone with stolen source codes ?? SORRY GUYS wasnt aware...
-
Re: [v2] Fish & Chippy mod if you have still got time to edit your post you need to change all links to chippy.php as they are pointing to bar24.php
-
Re: [v2] Fish & Chippy mod Im going to give you +1 just for the reason its a british Chippy mod :) Nicely done