Jump to content
MakeWebGames

Uridium

Members
  • Posts

    2,667
  • Joined

  • Last visited

  • Days Won

    75

Everything posted by Uridium

  1. Coincinding with the theme creator heres the Banner creator version to go with it. SQLS CREATE TABLE IF NOT EXISTS `banner` ( `bannerID` int(11) NOT NULL auto_increment, `bannerTITLE` varchar(255) NOT NULL default 'default', `bannerDATA` varchar(255) NOT NULL default '1', `bannerLOCK` int(11) NOT NULL default '0', PRIMARY KEY (`bannerID`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=19 ; ALTER TABLE `users` ADD `bannerID` varchar(255) NOT NULL default '1' ; Open up global_func and add this after the <? function banner_dropdown($connection,$ddname="banner",$selected=-1) { global $db; $ret="<select name='$ddname' type='dropdown'>"; $q=$db->query("SELECT * FROM banner ORDER BY bannerDATA ASC"); if($selected == -1) { $first=0; } else { $first=1; } while($r=$db->fetch_row($q)) { $ret.="\n<option value='{$r['bannerDATA']}'"; if ($selected == $r['bannerDATA'] || $first == 0) { $ret.=" selected='selected'";$first=1; } $ret.= ">{$r['bannerTITLE']}</option>"; } $ret.="\n</select>"; return $ret; } Now call this file banner.php <?php /* Big Thanks to KILLAH for this Script /* 2008 KILLAH & ILLUSIONS /* Mccodes V2 banner Change */ include("globals.php"); switch($_GET['action']) { case 'accept': accept_banner_begin(); break; default: print "Error: This script requires an action."; break; } function accept_banner_begin() { global $ir,$h; if($_POST['banner']) { $banner = abs(@intval($_POST['banner'])); $rows = mysql_num_rows(mysql_query("SELECT bannerID FROM banner WHERE bannerID=".$banner)); if($rows == 0) { echo 'This banner does not exist. Go AWAY!'; $h->endpage(); exit; } mysql_query("UPDATE users SET bannerID=".$banner." WHERE userid=".$ir['userid']); echo ' <h2>banner Updated </h2> <a href=index.php>[REFRESH banner]</a>'; $h->endpage(); exit; } $q = mysql_query("SELECT bannerID FROM banner"); $r = mysql_fetch_assoc($q); echo ' <h3>Choose Your banner</h3> <form action="banner.php?action=accept" method="post"> banner: '.banner_dropdown($r,'banner').' <input type="submit" value="Choose banner"> </form>'; } $h->endpage(); ?> And call this one staff_bannermaker.php <?php //* V2 banner Maker //* Joint Effort between ILLUSIONS and TONKA //* Free for to those Members of Criminal Existance Forums //* All we ask is that you keep this Notice intact //* BELOW CODES FOR sbanner.php //* > [url='staff_bannermaker.php?action=newbanner']Add banner Link[/url] //* > [url='staff_bannermaker.php?action=editbanner']Edit banner Link[/url] *// include "sglobals.php"; //This contains user stuffs switch($_GET['action']) { case 'newbanner': new_banner_form(); break; case 'newbannersub': new_banner_submit(); break; case 'editbanner': edit_banner_begin(); break; case 'editbannerform': edit_banner_form(); break; case 'editbannersub': edit_banner_sub(); break; default: print "Error: This script requires an action."; break; } function htmlspcl($in) { return str_replace("'", "'", htmlspecialchars($in)); } function new_banner_form() { global $db,$ir, $c; if($ir['user_level'] != 2) { die("403"); } print "Adding a new banner. <form action='staff_bannermaker.php?action=newbannersub' method='post'> banner ID: <input type='text' name='bannerID' /> banner Title: <input type='text' name='bannerTITLE' /> banner DATA <input type='text' name='bannerDATA' /> <input type='submit' value='Create New banner' /></form>"; } function new_banner_submit() { global $db,$ir,$c,$bannerID; if($ir['user_level'] != 2) { die("403"); } if(!isset($_POST['bannerID']) || !isset($_POST['bannerTITLE']) || !isset($_POST['bannerDATA'])) { print "You missed one or more of the required fields. Please go back and try again. [url='staff_bannermaker.php?action=newbanner']> Back[/url]"; $h->endpage(); exit; } $db->query("INSERT INTO banner (bannerID, bannerTITLE, bannerDATA) VALUES( '{$_POST['bannerID']}', '{$_POST['bannerTITLE']}', '{$_POST['bannerDATA']}')"); //$i=mysql_insert_bannerid($c); print " <font size=3>Successfully Created banner {$_POST['bannerTITLE']}</font>"; stafflog_add("Created banner {$_POST['bannerTITLE']} "); } function edit_banner_begin() { global $db,$ir,$c,$h,$userid; if($ir['user_level'] != 2) { die("403"); } print "<h3>Editing banner</h3> <form action='staff_bannermaker.php?action=editbannerform' method='post'> banner: ".banner_dropdown($c,'banner')." <input type='submit' value='Edit banner' /></form> OR enter a banner ID to edit: <form action='staff_bannermaker.php?action=editbannerform' method='post'> banner: <input type='text' name='banner' value='0' /> <input type='submit' value='Edit banner' /></form>"; } function edit_banner_form() { global $db,$ir,$c,$h,$userid; if($ir['user_level'] != 2) { die("403"); } $q = $db->query("SELECT * FROM banner WHERE bannerID='{$_POST['banner']}'"); $r = $db->fetch_row($q); print "<h3>banner Editing System</h3> <form action='staff_bannermaker.php?action=editbannersub' method='post'> banner ID: <input type='text' name='bannerID' value='{$r['bannerID']}' /> banner Title: <input type='text' name='bannerTITLE' value='{$r['bannerTITLE']}' /> banner DATA: <input type='text' name='bannerDATA' value='{$r['bannerDATA']}' /> <input type='submit' value='Edit banner' /></form>"; } function edit_banner_sub() { global $db,$ir,$c,$h,$userid; if($ir['user_level'] != 2) { die("403"); } $go=0; if(!isset($_POST['bannerID'])) { $go=1; } if(!isset($_POST['bannerTITLE'])) { $go=1; } if(!isset($_POST['bannerDATA'])) { $go=1; } if($go) { print "You did not fully fill out the form."; $_POST['banner']=$_POST['bannerID']; edit_banner_form(); } $u=$db->query("SELECT * FROM banner WHERE bannerTITLE='{$_POST['bannerTITLE']}' and bannerID='{$_POST['bannerID']}'"); if($db->num_rows($u) != 0) { print "That banner Name is already in use please choose another."; print " [url='staff_bannermaker.php?action=editbanner']> Back[/url]"; $h->endpage(); exit; } $oq=$db->query("SELECT * FROM banner WHERE bannerID={$_POST['bannerID']}"); $rm=$db->fetch_row($oq); $db->query("UPDATE banner SET bannerTITLE='{$_POST['bannerTITLE']}', bannerDATA='{$_POST['bannerDATA']}' WHERE bannerID={$_POST['bannerID']}"); stafflog_add("Edited banner {$_POST['bannerTITLE']} [{$_POST['bannerID']}]"); print "banner edited...."; } $h->endpage(); ?> Place this link either in your preferences.php or mainmenu.php [url='banner.php?action=accept']Change Banner[/url] and add these 2 to your smenu.php > [url='staff_bannermaker.php?action=newbanner']Add banner Link[/url] > [url='staff_bannermaker.php?action=editbanner']Edit banner Link[/url] Now open up Header.php and look for global $staffpage; and underneath add $q = $db->query("SELECT bannerID FROM users WHERE userid=$userid",$c); $b = $db->fetch_row($q); Still in the header where the [/code] And thats it...
  2. I got bored of altering the layout of menus so it would look right. So i decided to make a Drag n Drop system.... Users and staff can sort their own links out in any order they want.. DEMO http://www.slave-traders.net/heater.php forgot to mention no need for SQLs as the Links will stay as you want them even if you refresh the screen.... UPDATE links can now be disabled and re-enabled by Via the script
  3. Re: [MOD UPDATE} V2 Themecreator 100% Completed Working Copy Once ive picked my Bratt up from school i will post the Banner Creator... Your probably thinking whats the point of it. well in a nutshell The header image is one that is always visible no matter what page is viewed.. so why not show off your header pics for everyone to see and choose from..
  4. Re: if you have a game or have a game in the maiking read on Cheapest hosting ive found is xaamp ;)
  5. Re: [MOD UPDATE} V2 Themecreator 100% Completed Working Copy Hey slow down guys im not that good lol
  6. Re: [MOD UPDATE} V2 Themecreator 100% Completed Working Copy MIX AND MATCH HEADER AND THEME Seeing as the above worked well. I decided to go one step further and Create a Banner editor it does exactly as the script above does but your users can Mix and Match their Theme and Headers to their own Preference... DEMO www.slave-traders.net Click on Preferences then Change Banner.... The Admin System is the same as the Theme Creator,,,,
  7. Re: [MOD UPDATE} V2 Themecreator 100% Completed Working Copy Now that ive had some decent sleep :) and thanks yet again to Killah or otherwise i would still be awake lol I'll be adding some new ADDONS. 1 = Lock Themes 2 = Delete a Theme and reset those that are using that particular theme to one that is available. 3 = View which themes are being used the most by your members. so you can choose to delete or lock those that are not being used,,, 4 = Summary of Current ID's of themes that are in use... And if i think of any others on the way i'll just add them..
  8. Re: [MOD UPDATE} V2 Themecreator 100% Completed Working Copy Most of this script is taken from the Menu Creator that myself and Tonka made sometime ago The enirety of staff_themecreator.php uses the exact same structure...... There is a lock function which i havent added yet.... but over time i will just keep adding to it.....
  9. Re: [MOD UPDATE} V2 Themecreator 100% Completed Working Copy Open up header.php And copy from <---- to -----> Where your CSS is laid out You will need to save it on a text editor as a css for now you will need to give it a number example 1.css you can give it proper name when your adding your theme,,,,, Whilst in header.php Add   global $db,$ir,$c,$h,$userid,$set,$theme; $q = $db->query("SELECT ThemeID FROM users WHERE userid=$userid",$c); $t = $db->fetch_row($q);   and before after the <TITLE> add   <title>{$set['game_name']}</title> <link rel="stylesheet" type="text/css" href="{$t['ThemeID']}.css" />   Now call this File staff_themecreator.php   <?php //* V2 Theme Creator //* Illusions 2008 this notice must stay intact //* Free for to those Members of Criminal Existance Forums //* All we ask is that you keep this Notice intact *// include "sglobals.php"; //This contains user stuffs switch($_GET['action']) { case 'newtheme': new_theme_form(); break; case 'newthemesub': new_theme_submit(); break; case 'edittheme': edit_theme_begin(); break; case 'editthemeform': edit_theme_form(); break; case 'editthemesub': edit_theme_sub(); break; default: print "Error: This script requires an action."; break; } function htmlspcl($in) { return str_replace("'", "'", htmlspecialchars($in)); } function new_theme_form() { global $db,$ir,$c,$ThemeID; if($ir['user_level'] != 2) { die("403"); } $oq=$db->query("SELECT * FROM Theme WHERE ThemeTITLE='{$_POST['ThemeTITLE']}' and ThemeID='{$_POST['ThemeID']}'"); $rm=$db->fetch_row($oq); print "<h1>Adding a new Theme</h1> <form action='staff_themecreator.php?action=newthemesub' method='post'> Theme ID: <input type='text' name='ThemeID' /> Theme Title: <input type='text' name='ThemeTITLE' /> Theme CSS Name: <input type='text' name='ThemeDATA' /> <input type='submit' value='Create New Theme' /> Theme ID's already in use are {$_POST['ThemeID']} </form>"; } function new_theme_submit() { global $db,$ir,$c,$ThemeID; if($ir['user_level'] != 2) { die("403"); } if(!isset($_POST['ThemeID']) || !isset($_POST['ThemeTITLE']) || !isset($_POST['ThemeDATA'])) { print "You missed one or more of the required fields. Please go back and try again. [url='staff_themecreator.php?action=newtheme']> Back[/url]"; $h->endpage(); exit; } $db->query("INSERT INTO Theme (ThemeID, ThemeTITLE, ThemeDATA) VALUES( '{$_POST['ThemeID']}', '{$_POST['ThemeTITLE']}', '{$_POST['ThemeDATA']}')"); //$i=mysql_insert_Themeid($c); print " <font size=3>Successfully Created Theme {$_POST['ThemeTITLE']}</font>"; stafflog_add("Created Theme {$_POST['ThemeTITLE']} "); } function edit_theme_begin() { global $db,$ir,$c,$h,$userid; if($ir['user_level'] != 2) { die("403"); } print "<h3>Editing Theme</h3> <form action='staff_themecreator.php?action=editthemeform' method='post'> Theme: ".Theme_dropdown($c,'Theme')." <input type='submit' value='Edit Theme' /></form> OR enter a Theme ID to edit: <form action='staff_themecreator.php?action=editthemeform' method='post'> Theme: <input type='text' name='Theme' value='0' /> <input type='submit' value='Edit Theme' /></form>"; } function edit_theme_form() { global $db,$ir,$c,$h,$userid; if($ir['user_level'] != 2) { die("403"); } $q = $db->query("SELECT * FROM Theme WHERE ThemeDATA='{$_POST['Theme']}'"); $r = $db->fetch_row($q); print "<h3>Theme Editing System</h3> <form action='staff_themecreator.php?action=editthemesub' method='post'> Theme ID: <input type='text' name='ThemeID' value='{$r['ThemeID']}' /> Theme Title: <input type='text' name='ThemeTITLE' value='{$r['ThemeTITLE']}' /> Theme CSS: <input type='text' name='ThemeDATA' value='{$r['ThemeDATA']}' /> <input type='submit' value='Edit Theme' /></form>"; } function edit_theme_sub() { global $db,$ir,$c,$h,$userid; if($ir['user_level'] != 2) { die("403"); } $go=0; if(!isset($_POST['ThemeID'])) { $go=1; } if(!isset($_POST['ThemeTITLE'])) { $go=1; } if(!isset($_POST['ThemeDATA'])) { $go=1; } if($go) { print "You did not fully fill out the form."; $_POST['Theme']=$_POST['ThemeID']; edit_theme_form(); } $oq=$db->query("SELECT * FROM Theme WHERE ThemeTITLE='{$_POST['ThemeTITLE']}' and ThemeID='{$_POST['ThemeID']}'"); $rm=$db->fetch_row($oq); $db->query("UPDATE Theme SET ThemeTITLE='{$_POST['ThemeTITLE']}', ThemeDATA='{$_POST['ThemeDATA']}' WHERE ThemeID={$_POST['ThemeID']}"); stafflog_add("Edited Theme {$_POST['ThemeTITLE']} [{$_POST['ThemeID']}]"); print " <h1>Theme</h1><h3><font color='yellow'> {$_POST['ThemeTITLE']}</h3></font><h1> edited.... Successfully</h1>"; } $h->endpage(); ?>   Finally open smenu.php and add these links...   > [url='staff_themecreator.php?action=newtheme']Add A New Theme[/url] > [url='staff_themecreator.php?action=edittheme']Edit A Theme[/url]   And that it remember The CSS that you have taken from your header.php needs to be converted to a normal css file. and uploaded back to the server....
  10. SQLS   CREATE TABLE IF NOT EXISTS `Theme` ( `ThemeID` int(11) NOT NULL auto_increment, `ThemeTITLE` varchar(255) NOT NULL default '', `ThemeDATA` varchar(255) NOT NULL default 'orig.css', `ThemeLOCK` int(11) NOT NULL default '0', PRIMARY KEY (`ThemeID`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=19 ;   AND   ALTER TABLE `users` ADD `ThemeID` INT( 11 ) NOT NULL DEFAULT '1' ;   Call this file choose.php Thanks to KILLAH for the Script   <?php /* Big Thanks to KILLAH for this Script /* 2008 KILLAH & ILLUSIONS /* Mccodes V2 Theme Change */ include("globals.php"); switch($_GET['action']) { case 'accept': accept_theme_begin(); break; default: print "Error: This script requires an action."; break; } function accept_theme_begin() { global $ir,$h; if($_POST['Theme']) { $theme = abs(@intval($_POST['Theme'])); $rows = mysql_num_rows(mysql_query("SELECT ThemeID FROM Theme WHERE ThemeID=".$theme)); if($rows == 0) { echo 'This theme does not exist. Go AWAY!'; $h->endpage(); exit; } mysql_query("UPDATE users SET ThemeID=".$theme." WHERE userid=".$ir['userid']); echo ' <h2>Theme Updated </h2> <a href=index.php>[REFRESH THEME]</a>'; $h->endpage(); exit; } $q = mysql_query("SELECT ThemeID FROM Theme"); $r = mysql_fetch_assoc($q); echo ' <h3>Choose Your Theme</h3> <form action="choose.php?action=accept" method="post"> Theme: '.Theme_dropdown($r,'Theme').' <input type="submit" value="Choose Theme"> </form>'; } $h->endpage(); ?>   Add this link to either explore.php or mainmenu.php or preferences.php   [url='choose.php?action=accept']Change Game Theme[/url]   Add this to global_func.php   function Theme_dropdown($connection,$ddname="Theme",$selected=-1) { global $db; $ret="<select name='$ddname' type='dropdown'>"; $q=$db->query("SELECT * FROM Theme ORDER BY ThemeDATA ASC"); if($selected == -1) { $first=0; } else { $first=1; } while($r=$db->fetch_row($q)) { $ret.="\n<option value='{$r['ThemeDATA']}'"; if ($selected == $r['ThemeDATA'] || $first == 0) { $ret.=" selected='selected'";$first=1; } $ret.= ">{$r['ThemeTITLE']}</option>"; } $ret.="\n</select>"; return $ret; }   PART 2 Below.....
  11. Re: [MOD] V2 Theme Changer as Promised 96% completed Thanks to Kyle AKA KILLAH the Them project is back on track will post up later on a new thread so as to not confuse anyone with this one.. Big Thanks to Killah :)
  12. Re: Database Wont update with $_POST kyle your a star cheers matey :) Its been driving me nuts for hours lol i can finally get some sleep :) zzzzzzzzzzzzzzzzz
  13. Re: Database Wont update with $_POST Cheers Kyle how do i change the method so its not abs(@intval as i redid the script and am using characters now abs(@intval ???
  14. Re: [MOD] V2 Theme Changer as Promised 96% completed Just to NOTE the Above script is not the final product those that are using it will encounter Errors I will post the working copy as soon as ive worked out what ive missed...
  15. Re: [mccode] [TGM] Delete Gang Option [TGM] i use pen and paper ;)
  16. Re: Database Wont update with $_POST Afraid not ive been up all night im shattered can you try explain what you think maybe wrong by the way thats only one part of the script the INSERT is on another script and Obviously the global_func is handling the dropdown... Can ya put me out of my misery.
  17. Got a little problem and its bugging the heck out of me. Ive made a theme changer script and it did actually work until my PC crashed whilst sending a file back also the text Editor Corrupted the file i was editing so ive had to start again from scratch.. I have a colum ni the users table called ThemeDATA which stores the Css links... When a user tried to update a new theme it just empties the ThemeDATA im using this for the UPDATE.... $db->query("UPDATE users SET ThemeDATA='{$_POST['Theme']}' WHERE userid=$userid",$c); if i mispell the word $userid obviously i get an error but wanted to see if the ThemeDATA='{$_POST['Theme']}' was working which it was as i coulod see the snowflake.css link that i wanted to add as a theme. again this also worked for the userid which is correct... if i mispelt the other query But when i put the whole code corrected it accepts it without any errors at all but the ThemeDATA column is blank... I cant for the life of me work it out.. So i'll Post.. and hope :)   <?php include "globals.php"; switch($_GET['action']) { case 'accept': accept_theme_begin(); break; case 'accepttheme': accept_theme(); break; default: print "Error: This script requires an action."; break; } function accept_theme_begin() { global $db,$ir,$c,$h,$userid; $q = $db->query("SELECT * FROM Theme WHERE ThemeDATA='{$_POST['Theme']}'"); $r = $db->fetch_row($q); print "<h3>Choose Your Theme</h3> <form action='choose.php?action=accepttheme' method='post'> Theme: ".Theme_dropdown($r,'Theme')." <input type='submit' value='Choose Theme' /></form>"; } function accept_theme() { global $db,$ir,$c,$h,$userid; if($r['Theme'] > 10) { die(" <h1>Theme Error Css Not Found or Numerator out of Range</h1>"); } $oq=$db->query("SELECT * FROM Theme WHERE ThemeDATA='{$_POST['Theme']}'"); $rm=$db->fetch_row($oq); $db->query("UPDATE users SET ThemeDATA='{$_POST['Theme']}' WHERE userid=$userid",$c); print " <h1>Theme</h1><h3><font color='yellow'> {$_POST['Theme']} </h3></font><h1> Updated.... Successfully</h1> <a href='index.php'> <h2>[Refresh Theme]</h2>"; } $h->endpage(); ?>
  18. Re: [MOD] V2 Theme Changer as Promised 96% completed Yep most people who viewed it Earlier saw it working Correctly however like a plnoker i sent back and old file to the FTP and overwrote the one i was working on which is now casuing issues..
  19. Re: [MOD] ALL VERSIONS Interactive Radio station for your members The world is your Oyster
  20. Re: [MOD] V2 Theme Changer as Promised 96% completed Well im pleased to say guys ive cracked it :) and just in time for Chrimbo. You can test out the theme changer at www.slave-traders.net for now till i get all the files ive ammended together and repost the working copy on here.. when on site click on preference then choose your theme
  21. UPDATE: Update for theme creator SQL   ALTER TABLE `users` ADD `ThemeID` INT( 11 ) NOT NULL DEFAULT '1' ;   Use this as your choose.php   <?php //* ILLUSIONS 2008 //* Theme Creator //* This Notice Must Stay Intact*// include "globals.php"; switch($_GET['action']) { case 'accept': accept_theme_begin(); break; case 'accepttheme': accept_theme(); break; default: print "Error: This script requires an action."; break; } function accept_theme_begin() { global $db,$ir,$c,$h,$userid; $q = $db->query("SELECT * FROM Theme WHERE ThemeID='{$_POST['ThemeID']}'"); $r = $db->fetch_row($q); print "<h3>Choose Your Theme</h3> <form action='choose.php?action=accepttheme' method='post'> Theme: ".Theme_dropdown($r,'Theme')." <input type='submit' value='Choose Theme' /></form>"; } function accept_theme() { global $db,$ir,$c,$h,$userid, $ThemeTITLE, $ThemeID; if($r['Theme'] > 3) { die(" <h1>Theme Error Css Not Found or Numerator out of Range</h1>"); } $oq=$db->query("SELECT * FROM Theme WHERE ThemeID='{$_POST['ThemeID']}'"); $rm=$db->fetch_row($oq); $db->query("UPDATE users SET ThemeID='{$_POST['Theme']}' WHERE userid=$userid",$c); print " <h1>Theme</h1><h3><font color='yellow'> {$_POST['Theme']} </h3></font><h1> Chosen.... Successfully</h1>"; } $h->endpage(); ?>   All thats left to do now is the header.php
  22. Ok im Posting this earlier than expected so that i dont forget what ive done...... SQLS   CREATE TABLE IF NOT EXISTS `Theme` ( `ThemeID` int(11) NOT NULL auto_increment, `ThemeTITLE` varchar(255) NOT NULL default '', `ThemeDATA` varchar(255) NOT NULL default 'orig.css', `ThemeLOCK` int(11) NOT NULL default '0', PRIMARY KEY (`ThemeID`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=19 ;   Call This File staff_themecreator.php   <?php //* V2 Theme Creator //* Illusions 2008 this notice must stay intact //* Free for to those Members of Criminal Existance Forums //* All we ask is that you keep this Notice intact //* ADD THE BELOW CODES to smenu.php //* > [url='staff_themecreator.php?action=newtheme']Add A New Theme[/url] //* > [url='staff_themecreator.php?action=edittheme']Edit A Theme[/url] *// include "sglobals.php"; //This contains user stuffs switch($_GET['action']) { case 'newtheme': new_theme_form(); break; case 'newthemesub': new_theme_submit(); break; case 'edittheme': edit_theme_begin(); break; case 'editthemeform': edit_theme_form(); break; case 'editthemesub': edit_theme_sub(); break; default: print "Error: This script requires an action."; break; } function htmlspcl($in) { return str_replace("'", "'", htmlspecialchars($in)); } function new_theme_form() { global $db,$ir,$c,$ThemeID; if($ir['user_level'] != 2) { die("403"); } $oq=$db->query("SELECT * FROM Theme WHERE ThemeTITLE='{$_POST['ThemeTITLE']}' and ThemeID='{$_POST['ThemeID']}'"); $rm=$db->fetch_row($oq); print "<h1>Adding a new Theme</h1> <form action='staff_themecreator.php?action=newthemesub' method='post'> Theme ID: <input type='text' name='ThemeID' /> Theme Title: <input type='text' name='ThemeTITLE' /> Theme CSS Name: <input type='text' name='ThemeDATA' /> <input type='submit' value='Create New Theme' /> Theme ID's already in use are {$_POST['ThemeID']} </form>"; } function new_theme_submit() { global $db,$ir,$c,$ThemeID; if($ir['user_level'] != 2) { die("403"); } if(!isset($_POST['ThemeID']) || !isset($_POST['ThemeTITLE']) || !isset($_POST['ThemeDATA'])) { print "You missed one or more of the required fields. Please go back and try again. [url='staff_themecreator.php?action=newtheme']> Back[/url]"; $h->endpage(); exit; } $db->query("INSERT INTO Theme (ThemeID, ThemeTITLE, ThemeDATA) VALUES( '{$_POST['ThemeID']}', '{$_POST['ThemeTITLE']}', '{$_POST['ThemeDATA']}')"); //$i=mysql_insert_Themeid($c); print " <font size=3>Successfully Created Theme {$_POST['ThemeTITLE']}</font>"; stafflog_add("Created Theme {$_POST['ThemeTITLE']} "); } function edit_theme_begin() { global $db,$ir,$c,$h,$userid; if($ir['user_level'] != 2) { die("403"); } print "<h3>Editing Theme</h3> <form action='staff_themecreator.php?action=editthemeform' method='post'> Theme: ".Theme_dropdown($c,'Theme')." <input type='submit' value='Edit Theme' /></form> OR enter a Theme ID to edit: <form action='staff_themecreator.php?action=editthemeform' method='post'> Theme: <input type='text' name='Theme' value='0' /> <input type='submit' value='Edit Theme' /></form>"; } function edit_theme_form() { global $db,$ir,$c,$h,$userid; if($ir['user_level'] != 2) { die("403"); } $q = $db->query("SELECT * FROM Theme WHERE ThemeID='{$_POST['Theme']}'"); $r = $db->fetch_row($q); print "<h3>Theme Editing System</h3> <form action='staff_themecreator.php?action=editthemesub' method='post'> Theme ID: <input type='text' name='ThemeID' value='{$r['ThemeID']}' /> Theme Title: <input type='text' name='ThemeTITLE' value='{$r['ThemeTITLE']}' /> Theme CSS: <input type='text' name='ThemeDATA' value='{$r['ThemeDATA']}' /> <input type='submit' value='Edit Theme' /></form>"; } function edit_theme_sub() { global $db,$ir,$c,$h,$userid; if($ir['user_level'] != 2) { die("403"); } $go=0; if(!isset($_POST['ThemeID'])) { $go=1; } if(!isset($_POST['ThemeTITLE'])) { $go=1; } if(!isset($_POST['ThemeDATA'])) { $go=1; } if($go) { print "You did not fully fill out the form."; $_POST['Theme']=$_POST['ThemeID']; edit_theme_form(); } $oq=$db->query("SELECT * FROM Theme WHERE ThemeTITLE='{$_POST['ThemeTITLE']}' and ThemeID='{$_POST['ThemeID']}'"); $rm=$db->fetch_row($oq); $db->query("UPDATE Theme SET ThemeTITLE='{$_POST['ThemeTITLE']}', ThemeDATA='{$_POST['ThemeDATA']}' WHERE ThemeID={$_POST['ThemeID']}"); stafflog_add("Edited Theme {$_POST['ThemeTITLE']} [{$_POST['ThemeID']}]"); print " <h1>Theme</h1><h3><font color='yellow'> {$_POST['ThemeTITLE']}</h3></font><h1> edited.... Successfully</h1>"; } $h->endpage(); ?>   Open up Prefernces.php and add   [url='choose.php?action=accept']Change Game Layout[/url] ";   Now open up global_func.php and add   function Theme_dropdown($connection,$ddname="Theme",$selected=-1) { global $db; $ret="<select name='$ddname' type='dropdown'>"; $q=$db->query("SELECT * FROM Theme ORDER BY ThemeTITLE ASC"); if($selected == -1) { $first=0; } else { $first=1; } while($r=$db->fetch_row($q)) { $ret.="\n<option value='{$r['ThemeID']}'"; if ($selected == $r['Theme'] || $first == 0) { $ret.=" selected='selected'";$first=1; } $ret.= ">{$r['ThemeTITLE']}</option>"; } $ret.="\n</select>"; return $ret; }   now call this file choose.php   <?php include "globals.php"; switch($_GET['action']) { case 'accept': accept_theme_begin(); break; default: print "Error: This script requires an action."; break; } function accept_theme_begin() { global $db,$ir,$c,$h,$userid; if($ir['user_level'] != 2) { die("403"); } $q = $db->query("SELECT * FROM Theme WHERE ThemeID='{$_POST['Theme']}'"); $r = $db->fetch_row($q); print "<h3>Choose Your Theme</h3> <form action='choose.php?action=accept' method='post'> Theme: ".Theme_dropdown($c,'Theme')." <input type='submit' value='Choose Theme' /></form>"; } $h->endpage(); ?>   Im still working on the User base so bare with me You will need to create you own CSS on your site and give it a name example test.css this will be the Value when you add the Theme DATA name from staff panel.. Still working on header.php at moment but the admin section has been completed
  23. Re: [MOD] ALL VERSIONS Interactive Radio station for your members Not sure why youd want a screen shot but heres one
  24. This mod will allow your users to play your game from inside Windows Media Player The ASX file stays on the users PC and when click on will open up your desired radio station and the main window will become your website.... call this file... radiotuner.asx   <ASX version="3.0" BANNERBAR="AUTO"> <ABSTRACT>Slave Traders</ABSTRACT> <TITLE>Slave Traders Radio</TITLE> <AUTHOR>http://www.slave-traders.net</AUTHOR> <COPYRIGHT>(c)2008 Illusions</COPYRIGHT> <LOGO href = "http://www.slave-traders..net/title.jpg" Style = "BANNER" /> <MOREINFO href="http://www.slave-traders..net" /> <REPEAT> <ENTRY> <ABSTRACT>Slave Radio</ABSTRACT> <TITLE>Slave Traders Radio</TITLE> <PARAM NAME="HTMLView" VALUE="http://www.slave-traders.net"/> <REF HREF="http://38.96.148.45:9334" /> <PARAM NAME="Location" VALUE="USA" /> <PARAM NAME="Genre" VALUE="Rock/pop" /> <PARAM NAME="Homepage" VALUE="http://www.slave-traders.net" /> <AUTHOR>http://www.slave-traders.net</AUTHOR> <COPYRIGHT>(c)2008 Illusions</COPYRIGHT> <MOREINFO HREF="http://www.slave-traders..net" /> </ENTRY> </REPEAT> </ASX>   And place a link in your mainmenu.php to point to the file.. in the above code change this part to that of your desired radio station <REF HREF="http://38.96.148.45:9334" /> And alter any URLS from slave-traders to that of your own gamesite.
  25. Re: [mccodes v2]New and improved inventory code sources for free! there should only be 4 VALUES on the inventory dbase you have 5 which is causing the count error inv_id inv_itemid inv_userid inv_qty taken from staff_items.php   function give_item_submit() { global $db,$ir,$c; if($ir['user_level'] > 3) { die("403"); } $db->query("INSERT INTO inventory VALUES('',{$_POST['item']},{$_POST['user']},{$_POST['qty']})",$c) or die(mysql_error()); print "You gave {$_POST['qty']} of item ID {$_POST['item']} to user ID {$_POST['user']}"; stafflog_add("Gave {$_POST['qty']} of item ID {$_POST['item']} to user ID {$_POST['user']}"); }
×
×
  • Create New...