Jump to content
MakeWebGames

inferno564

Members
  • Posts

    66
  • Joined

  • Last visited

Everything posted by inferno564

  1. Re: mccodes v2 newspaper   oh sorry here you go postad.php <?php //Please Keep This Notice //Made By:Iseeyou94056 //Type:Free //Please Do Not Sell This It Is Free //Please Dont Take Credit For This You Did Not Make It include "globals.php"; if($_GET['action'] == "add") { print "<h3>Add Advertisement ($5,000)</h3> <form action='postad.php?action=added' method='post'> Ad Title: <input type='text' name='npTITLE' class='textbox'> Ad Body: <textarea rows=5 cols=18 name='npBODY' class='textbox'></textarea> <input class='textbox' type='submit' value='Place Ad ($5,000)' /> </form> <font color=red>[b]WARNING:[/b] Only plain text will work Do not advertise other games Follow the rules. "; } if($_GET['action'] == "added") { if($ir['money']>5000) { print "Congratulations, you bought a an ad for \$5,000! "; $db->query("UPDATE users SET money=money-5000 WHERE userid=$userid"); $title=str_replace(array("\n"),array(" "),strip_tags($_POST['npTITLE'])); $body=str_replace(array("\n"),array(" "),strip_tags($_POST['npBODY'])); $q=$db->query("INSERT INTO `npaper` VALUES (NULL, '$userid', '$title', '$body', unix_timestamp())"); print "Ad Added! [url='newspaper.php']>Back[/url]"; } else { print "You do not have enough money to add an ad. [url='explore.php']Back to town...[/url]"; } } ?>
  2. Re: mccodes v2 newspaper   sorry i am confused to what you are trying to say here this works for me <?php session_start(); ob_start(); if(get_magic_quotes_gpc() == 0) { foreach($_POST as $k => $v) { $_POST[$k]=addslashes($v); } foreach($_GET as $k => $v) { $_GET[$k]=addslashes($v); } } require "global_func.php"; if($_SESSION['loggedin']==0) { header("Location: login.php");exit; } $userid=$_SESSION['userid']; include "config.php"; global $_CONFIG; define("MONO_ON", 1); require "class/class_db_{$_CONFIG['driver']}.php"; $db=new database; $db->configure($_CONFIG['hostname'], $_CONFIG['username'], $_CONFIG['password'], $_CONFIG['database'], $_CONFIG['persistent']); $db->connect(); $c=$db->connection_id; $set=array(); $settq=$db->query("SELECT * FROM settings"); while($r=$db->fetch_row($settq)) { $set[$r['conf_name']]=$r['conf_value']; } $domain=$_SERVER['HTTP_HOST']; $ir=$db->fetch_row($is); global $macropage; if($macropage && !$ir['verified'] && $set['validate_on']==1) check_level(); $fm=money_formatter($ir['money']); $cm=money_formatter($ir['crystals'],''); $lv=date('F j, Y, g:i a',$ir['laston']); $q=$db->query("SELECT * FROM papercontent LIMIT 1"); $content=$db->fetch_single($q); $q=$db->query("SELECT content1 FROM papercontent LIMIT 1"); $content1=$db->fetch_single($q); $q=$db->query("SELECT content2 FROM papercontent LIMIT 1"); $content2=$db->fetch_single($q); $q=$db->query("SELECT content3 FROM papercontent LIMIT 1"); $content3=$db->fetch_single($q); $q=$db->query("SELECT content4 FROM papercontent LIMIT 1"); $content4=$db->fetch_single($q); $q=$db->query("SELECT content5 FROM papercontent LIMIT 1"); $content5=$db->fetch_single($q); $q=$db->query("SELECT user_level FROM users WHERE userid=$userid"); $r=$db->fetch_row($q); echo "<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Strict//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd'> <html xmlns='http://www.w3.org/1999/xhtml'> <head> <meta http-equiv='content-type' content='text/html; charset=utf-8' /> <title>{$set['game_name']} Newspaper</title> <meta name='keywords' content='' /> <meta name='description' content='' /> <link href='1.css' rel='stylesheet' type='text/css' /> </head> <body> <div id='outer'> <div id='header'> <h1>[url='#']The Newspaper[/url]</h1> <h2>by APOC inc</h2> </div> <div id='menu'> <ul> <li class='first'>[url='index.php']Home[/url] [*][url='gym.php']Local Gym[/url] [*][url='halloffame.php']Hall Of Fame[/url] [*][url='job.php']Job[/url] [*][url='education.php']Schools Near You[/url] [/list] </div> <div id='content'> <div id='xbg1'></div> <div id='primaryContentContainer'> <div id='primaryContent'> <hr color='brown'> <MARQUEE bgcolor='black' loop=-5 scrollamount=4 width=100%><font color=brown><font size=4> [b] {$set['game_marquee']}</th> [/b] </font></font></MARQUEE><hr color='brown'> <h2>The Lastest News</h2>"; echo " </td><td colspan=2>$content</td> <h3>Storys</h3> <ul> </td><td colspan=2>$content1</td> </td><td colspan=2>$content2</td> [/list] <h3>Whats New</h3> <blockquote> </td><td colspan=2>$content3</td></p> </blockquote> <h3>Old News</h3> </td><td colspan=2>$content4</td> </div> </div> <div id='secondaryContent'>"; print " <table width=90% cellspacing=1 class='table'><center><h3>Player Advertisements</h3><center> | [url='newspaper.php?action=add'][b]Buy An Advertisement ($5,000)[/b][/url]"; if($ir['user_level'] > 1) { print " | <a href=newspaper.php?action=all>[b]DELETE ALL[/b]</a>"; } $anpdata=mysql_query("SELECT * FROM npaper"); $q=mysql_query("SELECT user_level FROM users WHERE userid=$userid"); $r=$db->fetch_row($q); print "<marquee speed=2 direction=up onmouseover='this.stop()' onmouseout='this.start()' class='textbox'>"; while($npdata=$db->fetch_row($anpdata)) { $us=mysql_query("SELECT username FROM users WHERE userid={$npdata['npADDER']}"); $us=$db->fetch_single($us); $time=date('F j',$npdata['npTIME']); print " <hr> [b]Ad By: [url='viewuser.php?u={$npdata[']<font color=red>{$us}</font> [{$npdata['npADDER']}][/url] | Added On: {$time}[/b]"; if($r['user_level'] != 1) { print " | <a href=newspaper.php?action=npID&npID={$npdata['npID']}>[b]DELETE[/b]</a>"; } print " [i]<u>{$npdata['npTITLE']}[/i]</u> [i]{$npdata['npBODY']}[/i] "; } print "<hr /></marquee> </table>"; $q=mysql_query("SELECT user_level FROM users WHERE userid=$userid"); $r=$db->fetch_row($q); if($r['user_level'] != 1) { if($_GET['action'] == "all") { if($r['user_level'] != 1) { mysql_query("TRUNCATE TABLE npaper"); print "Newspaper Ads All Cleared! <META HTTP-EQUIV=Refresh CONTENT='1;url=newspaper.php'>"; } } else if($_GET['action'] == "npID") { if($r['user_level'] != 1) { mysql_query("DELETE FROM npaper WHERE npID={$_GET['npID']}"); print "News Paper Ad ID {$_GET['npID']} deleted! <META HTTP-EQUIV=Refresh CONTENT='1;url=newspaper.php'>"; } } } if($_GET['action'] == "add") { print "<h3>Add Advertisement ($5,000)</h3> <form action='postad.php?action=added' method='post'> Ad Title: <input type='text' name='npTITLE' class='textbox'> Ad Body: <textarea rows=5 cols=18 name='npBODY' class='textbox'></textarea> <input class='textbox' type='submit' value='Place Ad ($5,000)' /> </form> <font color=red>[b]WARNING:[/b] Only plain text will work Do not advertise other games Follow the rules. "; } if($_GET['action'] == "added") { if($ir['money']>9999) { print "Congratulations, you bought a an ad for \$5,000! "; $db->query("UPDATE users SET money=money-5000 WHERE userid=$userid"); $title=str_replace(array("\n"),array(" "),strip_tags($_POST['npTITLE'])); $body=str_replace(array("\n"),array(" "),strip_tags($_POST['npBODY'])); $q=$db->query("INSERT INTO `npaper` VALUES (NULL, '$userid', '$title', '$body', unix_timestamp())"); print "Ad Added! [url='newspaper.php']>Back[/url]"; } else { print "You do not have enough money to add an ad. [url='explore.php']Back to town...[/url]"; } } echo " <ul> [/list] </div> <div class='clear'></div> </div> <div id='footer'> Copyright © 2009 {$set['game_name']} by inferno564</p> </div> </div> <div style='font-size: 0.8em; text-align: center;'> Design downloaded from Zeroweb.org: [url='http://www.zeroweb.org']Free website templates, layouts, and tools.[/url] </div> </body> </html> "; ?>
  3. Re: mccodes v2 newspaper   oh because if you have css in your header then this wont look good at all because they confict with each other, and it won't display properly.
  4. Re: mccodes v2 newspaper ads are working ya 8-) :-D :lol: newspaper.php <?php session_start(); ob_start(); if(get_magic_quotes_gpc() == 0) { foreach($_POST as $k => $v) { $_POST[$k]=addslashes($v); } foreach($_GET as $k => $v) { $_GET[$k]=addslashes($v); } } require "global_func.php"; if($_SESSION['loggedin']==0) { header("Location: login.php");exit; } $userid=$_SESSION['userid']; include "config.php"; global $_CONFIG; define("MONO_ON", 1); require "class/class_db_{$_CONFIG['driver']}.php"; $db=new database; $db->configure($_CONFIG['hostname'], $_CONFIG['username'], $_CONFIG['password'], $_CONFIG['database'], $_CONFIG['persistent']); $db->connect(); $c=$db->connection_id; $set=array(); $settq=$db->query("SELECT * FROM settings"); while($r=$db->fetch_row($settq)) { $set[$r['conf_name']]=$r['conf_value']; } $domain=$_SERVER['HTTP_HOST']; $ir=$db->fetch_row($is); global $macropage; if($macropage && !$ir['verified'] && $set['validate_on']==1) check_level(); $fm=money_formatter($ir['money']); $cm=money_formatter($ir['crystals'],''); $lv=date('F j, Y, g:i a',$ir['laston']); $q=$db->query("SELECT * FROM papercontent LIMIT 1"); $content=$db->fetch_single($q); $q=$db->query("SELECT content1 FROM papercontent LIMIT 1"); $content1=$db->fetch_single($q); $q=$db->query("SELECT content2 FROM papercontent LIMIT 1"); $content2=$db->fetch_single($q); $q=$db->query("SELECT content3 FROM papercontent LIMIT 1"); $content3=$db->fetch_single($q); $q=$db->query("SELECT content4 FROM papercontent LIMIT 1"); $content4=$db->fetch_single($q); $q=$db->query("SELECT content5 FROM papercontent LIMIT 1"); $content5=$db->fetch_single($q); $q=$db->query("SELECT user_level FROM users WHERE userid=$userid"); $r=$db->fetch_row($q); echo "<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Strict//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd'> <html xmlns='http://www.w3.org/1999/xhtml'> <head> <meta http-equiv='content-type' content='text/html; charset=utf-8' /> <title>{$set['game_name']} Newspaper</title> <meta name='keywords' content='' /> <meta name='description' content='' /> <link href='1.css' rel='stylesheet' type='text/css' /> </head> <body> <div id='outer'> <div id='header'> <h1>[url='#']The Newspaper[/url]</h1> <h2>by APOC inc</h2> </div> <div id='menu'> <ul> <li class='first'>[url='index.php']Home[/url] [*][url='gym.php']Local Gym[/url] [*][url='halloffame.php']Hall Of Fame[/url] [*][url='job.php']Job[/url] [*][url='education.php']Schools Near You[/url] [/list] </div> <div id='content'> <div id='xbg1'></div> <div id='primaryContentContainer'> <div id='primaryContent'> <hr color='brown'> <MARQUEE bgcolor='black' loop=-5 scrollamount=4 width=100%><font color=brown><font size=4> [b] {$set['game_marquee']}</th> [/b] </font></font></MARQUEE><hr color='brown'> <h2>The Lastest News</h2>"; echo " </td><td colspan=2>$content</td> <h3>Storys</h3> <ul> </td><td colspan=2>$content1</td> </td><td colspan=2>$content2</td> [/list] <h3>Whats New</h3> <blockquote> </td><td colspan=2>$content3</td></p> </blockquote> <h3>Old News</h3> </td><td colspan=2>$content4</td> </div> </div> <div id='secondaryContent'> <h3>Ads</h3>"; print " <table width=90% cellspacing=1 class='table'><center><h3>Player Advertisements</h3><center> | [url='newspaper.php?action=add'][b]Buy An Advertisement ($10,000)[/b][/url]"; if($ir['user_level'] > 1) { print " | <a href=newspaper.php?action=all>[b]DELETE ALL[/b]</a>"; } $anpdata=mysql_query("SELECT * FROM npaper"); $q=mysql_query("SELECT user_level FROM users WHERE userid=$userid"); $r=$db->fetch_row($q); print "<marquee speed=2 direction=up onmouseover='this.stop()' onmouseout='this.start()' class='textbox'>"; while($npdata=$db->fetch_row($anpdata)) { $us=mysql_query("SELECT username FROM users WHERE userid={$npdata['npADDER']}"); $us=$db->fetch_single($us); $time=date('F j',$npdata['npTIME']); print " <hr> [b]Ad By: [url='viewuser.php?u={$npdata[']<font color=red>{$us}</font> [{$npdata['npADDER']}][/url] | Added On: {$time}[/b]"; if($r['user_level'] != 1) { print " | <a href=newspaper.php?action=npID&npID={$npdata['npID']}>[b]DELETE[/b]</a>"; } print " [i]<u>{$npdata['npTITLE']}[/i]</u> [i]{$npdata['npBODY']}[/i] "; } print "<hr /></marquee> </table>"; $q=mysql_query("SELECT user_level FROM users WHERE userid=$userid"); $r=$db->fetch_row($q); if($r['user_level'] != 1) { if($_GET['action'] == "all") { if($r['user_level'] != 1) { mysql_query("TRUNCATE TABLE npaper"); print "Newspaper Ads All Cleared! <META HTTP-EQUIV=Refresh CONTENT='1;url=newspaper.php'>"; } } else if($_GET['action'] == "npID") { if($r['user_level'] != 1) { mysql_query("DELETE FROM npaper WHERE npID={$_GET['npID']}"); print "News Paper Ad ID {$_GET['npID']} deleted! <META HTTP-EQUIV=Refresh CONTENT='1;url=newspaper.php'>"; } } } if($_GET['action'] == "add") { print "<h3>Add Advertisement ($10,000)</h3> <form action='postad.php?action=added' method='post'> Ad Title: <input type='text' name='npTITLE' class='textbox'> Ad Body: <textarea rows=5 cols=18 name='npBODY' class='textbox'></textarea> <input class='textbox' type='submit' value='Place Ad ($10,000)' /> </form> <font color=red>[b]WARNING:[/b] Only plain text will work Do not advertise other games Follow the rules. "; } if($_GET['action'] == "added") { if($ir['money']>9999) { print "Congratulations, you bought a an ad for \$10,000! "; $db->query("UPDATE users SET money=money-10000 WHERE userid=$userid"); $title=str_replace(array("\n"),array(" "),strip_tags($_POST['npTITLE'])); $body=str_replace(array("\n"),array(" "),strip_tags($_POST['npBODY'])); $q=$db->query("INSERT INTO `npaper` VALUES (NULL, '$userid', '$title', '$body', unix_timestamp())"); print "Ad Added! [url='newspaper.php']>Back[/url]"; } else { print "You do not have enough money to add an ad. [url='explore.php']Back to town...[/url]"; } } echo " <ul> [/list] </div> <div class='clear'></div> </div> <div id='footer'> Copyright © 2006 Sitename.com. Designed by [url='http://www.freecsstemplates.org']Free CSS Templates[/url] edited by inferno564</p> </div> </div> <div style='font-size: 0.8em; text-align: center;'> Design downloaded from Zeroweb.org: [url='http://www.zeroweb.org']Free website templates, layouts, and tools.[/url] </div> </body> </html> "; ?>
  5. Re: mccodes v2 newspaper some edits newspaper.php <?php session_start(); ob_start(); if(get_magic_quotes_gpc() == 0) { foreach($_POST as $k => $v) { $_POST[$k]=addslashes($v); } foreach($_GET as $k => $v) { $_GET[$k]=addslashes($v); } } require "global_func.php"; if($_SESSION['loggedin']==0) { header("Location: login.php");exit; } $userid=$_SESSION['userid']; include "config.php"; global $_CONFIG; define("MONO_ON", 1); require "class/class_db_{$_CONFIG['driver']}.php"; $db=new database; $db->configure($_CONFIG['hostname'], $_CONFIG['username'], $_CONFIG['password'], $_CONFIG['database'], $_CONFIG['persistent']); $db->connect(); $c=$db->connection_id; $set=array(); $settq=$db->query("SELECT * FROM settings"); while($r=$db->fetch_row($settq)) { $set[$r['conf_name']]=$r['conf_value']; } $domain=$_SERVER['HTTP_HOST']; $ir=$db->fetch_row($is); global $macropage; if($macropage && !$ir['verified'] && $set['validate_on']==1) check_level(); $fm=money_formatter($ir['money']); $cm=money_formatter($ir['crystals'],''); $lv=date('F j, Y, g:i a',$ir['laston']); $q=$db->query("SELECT * FROM papercontent LIMIT 1"); $content=$db->fetch_single($q); $q=$db->query("SELECT content1 FROM papercontent LIMIT 1"); $content1=$db->fetch_single($q); $q=$db->query("SELECT content2 FROM papercontent LIMIT 1"); $content2=$db->fetch_single($q); $q=$db->query("SELECT content3 FROM papercontent LIMIT 1"); $content3=$db->fetch_single($q); $q=$db->query("SELECT content4 FROM papercontent LIMIT 1"); $content4=$db->fetch_single($q); $q=$db->query("SELECT content5 FROM papercontent LIMIT 1"); $content5=$db->fetch_single($q); $q=$db->query("SELECT user_level FROM users WHERE userid=$userid"); $r=$db->fetch_row($q); echo "<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Strict//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd'> <html xmlns='http://www.w3.org/1999/xhtml'> <head> <meta http-equiv='content-type' content='text/html; charset=utf-8' /> <title>{$set['game_name']} Newspaper</title> <meta name='keywords' content='' /> <meta name='description' content='' /> <link href='1.css' rel='stylesheet' type='text/css' /> </head> <body> <div id='outer'> <div id='header'> <h1>[url='#']The Newspaper[/url]</h1> <h2>by APOC inc</h2> </div> <div id='menu'> <ul> <li class='first'>[url='index.php']Home[/url] [*][url='gym.php']Local Gym[/url] [*][url='halloffame.php']Hall Of Fame[/url] [*][url='job.php']Job[/url] [*][url='education.php']Schools Near You[/url] [/list] </div> <div id='content'> <div id='xbg1'></div> <div id='primaryContentContainer'> <div id='primaryContent'> <hr color='brown'> <MARQUEE bgcolor='black' loop=-5 scrollamount=4 width=100%><font color=brown><font size=4> [b] {$set['game_marquee']}</th> [/b] </font></font></MARQUEE><hr color='brown'> <h2>The Lastest News</h2>"; echo " </td><td colspan=2>$content</td> <h3>Storys</h3> <ul> </td><td colspan=2>$content1</td> </td><td colspan=2>$content2</td> [/list] <h3>Whats New</h3> <blockquote> </td><td colspan=2>$content3</td></p> </blockquote> <h3>Old News</h3> </td><td colspan=2>$content4</td> </div> </div> <div id='secondaryContent'> <h3>Ads</h3>"; print " <table width=90% cellspacing=1 class='table'><center><h3>Player Advertisements</h3><center> | [url='newspaper.php?action=add'][b]Buy An Advertisement ($10,000)[/b][/url]"; if($ir['user_level'] > 1) { print " | <a href=newspaper.php?action=all>[b]DELETE ALL[/b]</a>"; } $anpdata=mysql_query("SELECT * FROM npaper"); $q=mysql_query("SELECT user_level FROM users WHERE userid=$userid"); $r=$db->fetch_row($q); print "<marquee speed=2 direction=up onmouseover='this.stop()' onmouseout='this.start()' class='textbox'>"; while($npdata=$db->fetch_row($anpdata)) { $us=mysql_query("SELECT username FROM users WHERE userid={$npdata['npADDER']}"); $us=$db->fetch_single($us); $time=date('F j',$npdata['npTIME']); print " <hr> [b]Ad By: [url='viewuser.php?u={$npdata[']<font color=red>{$us}</font> [{$npdata['npADDER']}][/url] | Added On: {$time}[/b]"; if($r['user_level'] != 1) { print " | <a href=newspaper.php?action=npID&npID={$npdata['npID']}>[b]DELETE[/b]</a>"; } print " [i]<u>{$npdata['npTITLE']}[/i]</u> [i]{$npdata['npBODY']}[/i] "; } print "<hr /></marquee> </table>"; $q=mysql_query("SELECT user_level FROM users WHERE userid=$userid"); $r=$db->fetch_row($q); if($r['user_level'] != 1) { if($_GET['action'] == "all") { if($r['user_level'] != 1) { mysql_query("TRUNCATE TABLE npaper"); print "Newspaper Ads All Cleared! <META HTTP-EQUIV=Refresh CONTENT='1;url=newspaper.php'>"; } } else if($_GET['action'] == "npID") { if($r['user_level'] != 1) { mysql_query("DELETE FROM npaper WHERE npID={$_GET['npID']}"); print "News Paper Ad ID {$_GET['npID']} deleted! <META HTTP-EQUIV=Refresh CONTENT='1;url=newspaper.php'>"; } } } if($_GET['action'] == "add") { print "<h3>Add Advertisement ($10,000)</h3> <form action='newspaper.php?action=added' method='post'> Ad Title: <input type='text' name='npTITLE' class='textbox'> Ad Body: <textarea rows=14 cols=65 name='npBODY' class='textbox'></textarea> <input class='textbox' type='submit' value='Place Ad ($10,000)' /> </form> <font color=red>[b]WARNING:[/b] Only plain text will work Do not advertise other games Follow the rules."; } if($_GET['action'] == "added") { if($ir['money']>9999) { print "Congratulations, you bought an ad for \$10,000! "; mysql_query("UPDATE users SET money=money-10000 WHERE userid=$userid"); $title=str_replace(array("\n"),array(" "),strip_tags($_POST['npTITLE'])); $body=str_replace(array("\n"),array(" "),strip_tags($_POST['npBODY'])); $q=mysql_query("INSERT INTO `npaper` VALUES (NULL, '$userid', '$title', '$body', unix_timestamp())"); print "Advertisement was successfully added! <META HTTP-EQUIV=Refresh CONTENT='5;url=newspaper.php'>"; } } echo " <ul> [/list] </div> <div class='clear'></div> </div> <div id='footer'> Copyright © 2006 Sitename.com. Designed by [url='http://www.freecsstemplates.org']Free CSS Templates[/url] edited by inferno564</p> </div> </div> <div style='font-size: 0.8em; text-align: center;'> Design downloaded from Zeroweb.org: [url='http://www.zeroweb.org']Free website templates, layouts, and tools.[/url] </div> </body> </html> "; ?>   staff_special.php hole code <?php include "sglobals.php"; if($ir['user_level'] < 2) { die("403"); } //This contains punishment stuffs switch($_GET['action']) { case 'editnews': newspaper_form(); break; case 'subnews': newspaper_submit(); break; case 'subnews1': newspaper1_submit(); break; case 'subnews2': newspaper2_submit(); break; case 'subnews3': newspaper3_submit(); break; case 'subnews4': newspaper4_submit(); break; case 'subnews5': newspaper5_submit(); break; case 'givedpform': give_dp_form(); break; case 'givedpsub': give_dp_submit(); break; case 'stafflist': staff_list(); break; case 'userlevel': userlevel(); break; case 'userlevelform': userlevelform(); break; case 'massmailer': massmailer(); break; default: print "Error: This script requires an action."; break; } function newspaper_form() { global $db,$ir,$c,$h,$userid; $q=$db->query("SELECT * FROM papercontent LIMIT 1"); $news=$db->fetch_single($q); $q=$db->query("SELECT content1 FROM papercontent LIMIT 1"); $news1=$db->fetch_single($q); $q=$db->query("SELECT content2 FROM papercontent LIMIT 1"); $news2=$db->fetch_single($q); $q=$db->query("SELECT content3 FROM papercontent LIMIT 1"); $news3=$db->fetch_single($q); $q=$db->query("SELECT content4 FROM papercontent LIMIT 1"); $news4=$db->fetch_single($q); $q=$db->query("SELECT content5 FROM papercontent LIMIT 1"); $news5=$db->fetch_single($q); print "<table width=90% border='2'><tr><td><h3>Editing Newspaper</h3>(YOU NEED TO 'CHANGE' THESE ONE AT A TIME) <table><tr><td> <h4>Article 1</h4> <form action='staff_special.php?action=subnews' method='post'> <textarea rows='15 cols='30' name='newspaper'>$news</textarea> <input type='submit' value='Change' /></form></td><td> <h4>Article 2</h4> <form action='staff_special.php?action=subnews1' method='post'> <textarea rows='15' cols='30' name='newspaper1'>$news1</textarea> <input type='submit' value='Change' /></form></td></tr><tr><td> </td></tr><tr><td> <h4>Article 3</h4> <form action='staff_special.php?action=subnews2' method='post'> <textarea rows='15' cols='30' name='newspaper2'>$news2</textarea> <input type='submit' value='Change' /></form></td><td> <h4>Article 4</h4> <form action='staff_special.php?action=subnews3' method='post'> <textarea rows='15' cols='30' name='newspaper3'>$news3</textarea> <input type='submit' value='Change' /></form></td></tr><tr><td> </td></tr><tr><td> <h4>Article 5</h4> <form action='staff_special.php?action=subnews4' method='post'> <textarea rows='15' cols='30' name='newspaper4'>$news4</textarea> <input type='submit' value='Change' /></form></td><td> <h4>Article 6</h4> <form action='staff_special.php?action=subnews5' method='post'> <textarea rows='15' cols='30' name='newspaper5'>$news5</textarea> <input type='submit' value='Change' /></form> </td></tr> </table></td></tr></table> "; } function newspaper_submit() { global $db,$ir,$c,$h,$userid; $news=$_POST['newspaper']; $news1=$_POST['newspaper1']; $news2=$_POST['newspaper2']; $news3=$_POST['newspaper3']; $news4=$_POST['newspaper4']; $news5=$_POST['newspaper5']; $db->query("UPDATE papercontent SET content='$news'"); print "Newspaper updated!"; stafflog_add("Updated game newspaper"); } function newspaper1_submit() { global $db,$ir,$c,$h,$userid; $news1=$_POST['newspaper1']; $db->query("UPDATE papercontent SET content1='$news1'"); print "Newspaper updated!"; stafflog_add("Updated game newspaper"); } function newspaper2_submit() { global $db,$ir,$c,$h,$userid; $news2=$_POST['newspaper2']; $db->query("UPDATE papercontent SET content2='$news2'"); print "Newspaper updated!"; stafflog_add("Updated game newspaper"); } function newspaper3_submit() { global $db,$ir,$c,$h,$userid; $news3=$_POST['newspaper3']; $db->query("UPDATE papercontent SET content3='$news3'"); print "Newspaper updated!"; stafflog_add("Updated game newspaper"); } function newspaper4_submit() { global $db,$ir,$c,$h,$userid; $news4=$_POST['newspaper4']; $db->query("UPDATE papercontent SET content4='$news4'"); print "Newspaper updated!"; stafflog_add("Updated game newspaper"); } function newspaper5_submit() { global $db,$ir,$c,$h,$userid; $news5=$_POST['newspaper5']; $db->query("UPDATE papercontent SET content5='$news5'"); print "Newspaper updated!"; stafflog_add("Updated game newspaper"); } function give_dp_form() { global $db,$ir,$c,$h,$userid; print "<h3>Giving User DP</h3> The user will receive the benefits of one 30-day donator pack. <form action='staff_special.php?action=givedpsub' method='post'> User: ".user_dropdown($c,'user')." <input type='radio' name='type' value='1' /> Pack 1 (Standard) <input type='radio' name='type' value='2' /> Pack 2 (Crystals) <input type='radio' name='type' value='3' /> Pack 3 (IQ) <input type='radio' name='type' value='4' /> Pack 4 (5.00) <input type='radio' name='type' value='5' /> Pack 5 (10.00) <input type='submit' value='Give User DP' /></form>"; } function give_dp_submit() { global $db,$ir,$c,$h,$userid; if($_POST['type']==1) { $db->query("UPDATE users u LEFT JOIN userstats us ON u.userid=us.userid SET u.money=u.money+5000,u.crystals=u.crystals+50, us.IQ=us.IQ+50,u.donatordays=u.donatordays+30 WHERE u.userid={$_POST['user']}"); $d=30; } else if($_POST['type']==2) { $db->query("UPDATE users u LEFT JOIN userstats us ON u.userid=us.userid SET u.crystals=u.crystals+100,u.donatordays=u.donatordays+30 WHERE u.userid={$_POST['user']}"); $d=30; } else if($_POST['type']==3) { $db->query("UPDATE users u LEFT JOIN userstats us ON u.userid=us.userid SET us.IQ=us.IQ+120,u.donatordays=u.donatordays+30 WHERE u.userid={$_POST['user']}"); $d=30; } else if($_POST['type']==4) { $db->query("UPDATE users u LEFT JOIN userstats us ON u.userid=us.userid SET u.money=u.money+15000,u.crystals=u.crystals+75, us.IQ=us.IQ+80,u.donatordays=u.donatordays+55 WHERE u.userid={$_POST['user']}"); $d=55; } else if($_POST['type']==5) { $db->query("UPDATE users u LEFT JOIN userstats us ON u.userid=us.userid SET u.money=u.money+35000,u.crystals=u.crystals+160, us.IQ=us.IQ+180,u.donatordays=u.donatordays+115 WHERE u.userid={$_POST['user']}"); $d=115; } event_add($_POST['user'],"You were given one $d -day donator pack (Pack {$_POST['type']}) from the administration.",$c); print "User given a DP."; stafflog_add("Gave ID {$_POST['user']} a $d -day donator pack (Pack {$_POST['type']})"); } function staff_list() { global $db,$ir,$c,$h,$userid; print "<h3>Staff Management</h3>"; print "[b]Admins[/b] <table width=80%><tr style='background:gray'> <th>User</th> <th>Online?</th> <th>Links</th> </tr>"; $q=$db->query("SELECT * FROM users WHERE user_level=2 ORDER BY userid ASC"); while($r=$db->fetch_row($q)) { if($r['laston'] >= time()-15*60) { $on="<font color=green>[b]Online[/b]</font>"; } else { $on="<font color=red>[b]Offline[/b]</font>"; } print "\n<tr> <td>[url='viewuser.php?u={$r[']{$r['username']}[/url] [{$r['userid']}]</td> <td>$on</td> <td>[url='staff_special.php?action=userlevel&level=3&ID={$r[']Secretary[/url] · [url='staff_special.php?action=userlevel&level=5&ID={$r[']Assistant[/url] · [url='staff_special.php?action=userlevel&level=1&ID={$r[']Member[/url]</td></tr>"; } print "</table>"; print "[b]Secretaries[/b] <table width=80%><tr style='background:gray'> <th>User</th> <th>Online?</th> <th>Links</th> </tr>"; $q=$db->query("SELECT * FROM users WHERE user_level=3 ORDER BY userid ASC"); while($r=$db->fetch_row($q)) { if($r['laston'] >= time()-15*60) { $on="<font color=green>[b]Online[/b]</font>"; } else { $on="<font color=red>[b]Offline[/b]</font>"; } print "\n<tr> <td>[url='viewuser.php?u={$r[']{$r['username']}[/url] [{$r['userid']}]</td> <td>$on</td> <td>[url='staff_special.php?action=userlevel&level=2&ID={$r[']Admin[/url] · [url='staff_special.php?action=userlevel&level=5&ID={$r[']Assistant[/url] · [url='staff_special.php?action=userlevel&level=1&ID={$r[']Member[/url]</td></tr>"; } print "</table>"; print "[b]Assistants[/b] <table width=80%><tr style='background:gray'> <th>User</th> <th>Online?</th> <th>Links</th> </tr>"; $q=$db->query("SELECT * FROM users WHERE user_level=5 ORDER BY userid ASC"); while($r=$db->fetch_row($q)) { if($r['laston'] >= time()-15*60) { $on="<font color=green>[b]Online[/b]</font>"; } else { $on="<font color=red>[b]Offline[/b]</font>"; } print "\n<tr> <td>[url='viewuser.php?u={$r[']{$r['username']}[/url] [{$r['userid']}]</td> <td>$on</td> <td>[url='staff_special.php?action=userlevel&level=2&ID={$r[']Admin[/url] · [url='staff_special.php?action=userlevel&level=3&ID={$r[']Secretary[/url] · [url='staff_special.php?action=userlevel&level=1&ID={$r[']Member[/url]</td></tr>"; } print "</table>"; } function userlevel() { global $db,$ir,$c,$h,$userid; $_GET['level']=abs((int) $_GET['level']); $_GET['ID']=abs((int) $_GET['ID']); $db->query("UPDATE users SET user_level={$_GET['level']} WHERE userid={$_GET['ID']}"); print "User's level adjusted."; stafflog_add("Adjusted user ID {$_GET['ID']}'s staff status."); } function userlevelform() { global $db,$ir,$c,$h,$userid; print "<h3>User Level Adjust</h3> <form action='staff_special.php' method='get'> <input type='hidden' name='action' value='userlevel'> User: ".user_dropdown($c,'ID')." User Level: <input type='radio' name='level' value='1' /> Member <input type='radio' name='level' value='2' /> Admin <input type='radio' name='level' value='3' /> Secretary <input type='radio' name='level' value='4' /> IRC Op <input type='radio' name='level' value='5' /> Assistant <input type='submit' value='Adjust' /></form>"; } function massmailer() { global $db,$ir,$c,$userid; if($_POST['text']) { $_POST['text']=nl2br(strip_tags($_POST['text'])); $subj="This is a mass mail from the administration"; if($_POST['cat']==1) $q=$db->query("SELECT * FROM users "); else if($_POST['cat']==2) $q=$db->query("SELECT * FROM users WHERE user_level > 1"); else if($_POST['cat']==3) $q=$db->query("SELECT * FROM users WHERE user_level=2"); else $q=$db->query("SELECT * FROM users WHERE user_level={$_POST['level']}"); while($r=$db->fetch_row($q)) { $db->query("INSERT INTO mail VALUES('', 0, 0, {$r['userid']}, unix_timestamp(),'$subj','{$_POST['text']}')"); print "Mass mail sent to {$r['username']}. "; } print "Mass mail sending complete! [url='staff_special.php?action=massmailer']> Back[/url]"; } else { print "[b]Mass Mailer[/b] <form action='staff_special.php?action=massmailer' method='post'> Text: <textarea name='text' rows='7' cols='40'></textarea> <input type='radio' name='cat' value='1' /> Send to all members <input type='radio' name='cat' value='2' /> Send to staff only <input type='radio' name='cat' value='3' /> Send to admins only OR Send to user level: <input type='radio' name='level' value='1' /> Member <input type='radio' name='level' value='2' /> Admin <input type='radio' name='level' value='3' /> Secretary <input type='radio' name='level' value='5' /> Assistant <input type='submit' value='Send' /></form>"; } } $h->endpage(); ?>
  6. Re: mccodes v2 newspaper http://76.114.46.95/ sorry my register was messed up user: test pass: test
  7. Re: mccodes v2 newspaper for a demo go to http://apoc.ath.cx/login.php user:demo pass:demo
  8. Re: mccodes v2 newspaper features editing from staff panel, player ads, scrool bar, and a cool design
  9. first off im a noob at this so the Ads thing wont work fix it if you want and please post it. :wink: i used codes from http://criminalexistence.com/ceforums/index.php?topic=28208.0 TMan and http://criminalexistence.com/ceforums/index.php?topic=28928.0 gideon prewett enter these sqls INSERT INTO `settings` ( `conf_id` , `conf_name` , `conf_value` ) VALUES ( '', 'game_marquee', 'default' ) ALTER TABLE `papercontent` ADD `content1` LONGTEXT CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL ; ALTER TABLE `papercontent` ADD `content2` LONGTEXT CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL ; ALTER TABLE `papercontent` ADD `content3` LONGTEXT CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL ; ALTER TABLE `papercontent` ADD `content4` LONGTEXT CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL ; ALTER TABLE `papercontent` ADD `content5` LONGTEXT CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL ; CREATE TABLE `npaper` ( `npID` int(11) NOT NULL auto_increment, `npADDER` int(11) NOT NULL default '0', `npTITLE` varchar(255) NOT NULL default '', `npBODY` text NOT NULL, `npTIME` int(11) NOT NULL default '0', PRIMARY KEY (`npID`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=20 ; Find In staff.php Game Description: <textarea rows='7' cols='50' name='game_description'>{$set['game_description']}</textarea> Add Under: Game MARQUEE: <textarea rows='7' cols='50' name='game_marquee'>{$set['game_marquee']}</textarea> Go to staff_special.php and edit the NEWS/top section <?php include "sglobals.php"; if($ir['user_level'] < 2) { die("403"); } //This contains punishment stuffs switch($_GET['action']) { case 'editnews': newspaper_form(); break; case 'subnews': newspaper_submit(); break; case 'subnews1': newspaper1_submit(); break; case 'subnews2': newspaper2_submit(); break; case 'subnews3': newspaper3_submit(); break; case 'subnews4': newspaper4_submit(); break; case 'subnews5': newspaper5_submit(); break; case 'givedpform': give_dp_form(); break; case 'givedpsub': give_dp_submit(); break; case 'stafflist': staff_list(); break; case 'userlevel': userlevel(); break; case 'userlevelform': userlevelform(); break; case 'massmailer': massmailer(); break; default: print "Error: This script requires an action."; break; } function newspaper_form() { global $db,$ir,$c,$h,$userid; $q=$db->query("SELECT * FROM papercontent LIMIT 1"); $news=$db->fetch_single($q); $q=$db->query("SELECT content1 FROM papercontent LIMIT 1"); $news1=$db->fetch_single($q); $q=$db->query("SELECT content2 FROM papercontent LIMIT 1"); $news2=$db->fetch_single($q); $q=$db->query("SELECT content3 FROM papercontent LIMIT 1"); $news3=$db->fetch_single($q); $q=$db->query("SELECT content4 FROM papercontent LIMIT 1"); $news4=$db->fetch_single($q); $q=$db->query("SELECT content5 FROM papercontent LIMIT 1"); $news5=$db->fetch_single($q); print "<table width=90% border='2'><tr><td><h3>Editing Newspaper</h3>(YOU NEED TO 'CHANGE' THESE ONE AT A TIME) <table><tr><td> <h4>Article 1</h4> <form action='staff_special.php?action=subnews' method='post'> <textarea rows='20' cols='50' name='newspaper'>$news</textarea> <input type='submit' value='Change' /></form></td><td> <h4>Article 2</h4> <form action='staff_special.php?action=subnews1' method='post'> <textarea rows='20' cols='50' name='newspaper1'>$news1</textarea> <input type='submit' value='Change' /></form></td></tr><tr><td> </td></tr><tr><td> <h4>Article 3</h4> <form action='staff_special.php?action=subnews2' method='post'> <textarea rows='20' cols='50' name='newspaper2'>$news2</textarea> <input type='submit' value='Change' /></form></td><td> <h4>Article 4</h4> <form action='staff_special.php?action=subnews3' method='post'> <textarea rows='20' cols='50' name='newspaper3'>$news3</textarea> <input type='submit' value='Change' /></form></td></tr><tr><td> </td></tr><tr><td> <h4>Article 5</h4> <form action='staff_special.php?action=subnews4' method='post'> <textarea rows='20' cols='50' name='newspaper4'>$news4</textarea> <input type='submit' value='Change' /></form></td><td> <h4>Article 6</h4> <form action='staff_special.php?action=subnews5' method='post'> <textarea rows='20' cols='50' name='newspaper5'>$news5</textarea> <input type='submit' value='Change' /></form> </td></tr> </table></td></tr></table> "; } function newspaper_submit() { global $db,$ir,$c,$h,$userid; $news=$_POST['newspaper']; $news1=$_POST['newspaper1']; $news2=$_POST['newspaper2']; $news3=$_POST['newspaper3']; $news4=$_POST['newspaper4']; $news5=$_POST['newspaper5']; $db->query("UPDATE papercontent SET content='$news'"); print "Newspaper updated!"; stafflog_add("Updated game newspaper"); } function newspaper1_submit() { global $db,$ir,$c,$h,$userid; $news1=$_POST['newspaper1']; $db->query("UPDATE papercontent SET content1='$news1'"); print "Newspaper updated!"; stafflog_add("Updated game newspaper"); } function newspaper2_submit() { global $db,$ir,$c,$h,$userid; $news2=$_POST['newspaper2']; $db->query("UPDATE papercontent SET content2='$news2'"); print "Newspaper updated!"; stafflog_add("Updated game newspaper"); } function newspaper3_submit() { global $db,$ir,$c,$h,$userid; $news3=$_POST['newspaper3']; $db->query("UPDATE papercontent SET content3='$news3'"); print "Newspaper updated!"; stafflog_add("Updated game newspaper"); } function newspaper4_submit() { global $db,$ir,$c,$h,$userid; $news4=$_POST['newspaper4']; $db->query("UPDATE papercontent SET content4='$news4'"); print "Newspaper updated!"; stafflog_add("Updated game newspaper"); } function newspaper5_submit() { global $db,$ir,$c,$h,$userid; $news5=$_POST['newspaper5']; $db->query("UPDATE papercontent SET content5='$news5'"); print "Newspaper updated!"; stafflog_add("Updated game newspaper"); } open Newspaper.php and replace with: <?php //author is Inferno564 free to use edit please keep this here because i worked hard on this lol session_start(); ob_start(); if(get_magic_quotes_gpc() == 0) { foreach($_POST as $k => $v) { $_POST[$k]=addslashes($v); } foreach($_GET as $k => $v) { $_GET[$k]=addslashes($v); } } require "global_func.php"; if($_SESSION['loggedin']==0) { header("Location: login.php");exit; } $userid=$_SESSION['userid']; include "config.php"; global $_CONFIG; define("MONO_ON", 1); require "class/class_db_{$_CONFIG['driver']}.php"; $db=new database; $db->configure($_CONFIG['hostname'], $_CONFIG['username'], $_CONFIG['password'], $_CONFIG['database'], $_CONFIG['persistent']); $db->connect(); $c=$db->connection_id; $set=array(); $settq=$db->query("SELECT * FROM settings"); while($r=$db->fetch_row($settq)) { $set[$r['conf_name']]=$r['conf_value']; } $domain=$_SERVER['HTTP_HOST']; $ir=$db->fetch_row($is); global $macropage; if($macropage && !$ir['verified'] && $set['validate_on']==1) check_level(); $fm=money_formatter($ir['money']); $cm=money_formatter($ir['crystals'],''); $lv=date('F j, Y, g:i a',$ir['laston']); $q=$db->query("SELECT * FROM papercontent LIMIT 1"); $content=$db->fetch_single($q); $q=$db->query("SELECT content1 FROM papercontent LIMIT 1"); $content1=$db->fetch_single($q); $q=$db->query("SELECT content2 FROM papercontent LIMIT 1"); $content2=$db->fetch_single($q); $q=$db->query("SELECT content3 FROM papercontent LIMIT 1"); $content3=$db->fetch_single($q); $q=$db->query("SELECT content4 FROM papercontent LIMIT 1"); $content4=$db->fetch_single($q); $q=$db->query("SELECT content5 FROM papercontent LIMIT 1"); $content5=$db->fetch_single($q); $q=$db->query("SELECT user_level FROM users WHERE userid=$userid"); $r=$db->fetch_row($q); echo "<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Strict//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd'> <html xmlns='http://www.w3.org/1999/xhtml'> <head> <meta http-equiv='content-type' content='text/html; charset=utf-8' /> <title>{$set['game_name']} Newspaper</title> <meta name='keywords' content='' /> <meta name='description' content='' /> <link href='1.css' rel='stylesheet' type='text/css' /> </head> <body> <div id='outer'> <div id='header'> <h1>[url='#']The Newspaper[/url]</h1> <h2>by APOC inc</h2> </div> <div id='menu'> <ul> <li class='first'>[url='index.php']Home[/url] [*][url='gym.php']Local Gym[/url] [*][url='halloffame.php']Hall Of Fame[/url] [*][url='job.php']Job[/url] [*][url='education.php']Schools Near You[/url] [/list] </div> <div id='content'> <div id='xbg1'></div> <div id='primaryContentContainer'> <div id='primaryContent'> <hr color='brown'> <MARQUEE bgcolor='black' loop=-5 scrollamount=4 width=100%><font color=brown><font size=4> [b] {$set['game_marquee']}</th> [/b] </font></font></MARQUEE><hr color='brown'> <h2>The Lastest News</h2>"; echo " </td><td colspan=2>$content</td> <h3>Storys</h3> <ul> </td><td colspan=2>$content1</td> </td><td colspan=2>$content2</td> [/list] <h3>Whats New</h3> <blockquote> </td><td colspan=2>$content3</td></p> </blockquote> <h3>Old News</h3> </td><td colspan=2>$content4</td> </div> </div> <div id='secondaryContent'> <h3>Ads</h3>"; print " <table width=90% cellspacing=1 class='table'><center><h3>Player Advertisements</h3><center> | [url='newspaper.php?action=add'][b]Buy An Advertisement ($10,000)[/b][/url]"; if($ir['user_level'] > 1) { print " | <a href=newspaper.php?action=all>[b]DELETE ALL[/b]</a>"; } $anpdata=mysql_query("SELECT * FROM npaper"); $q=mysql_query("SELECT user_level FROM users WHERE userid=$userid"); $r=$db->fetch_row($q); print "<marquee speed=2 direction=up onmouseover='this.stop()' onmouseout='this.start()' class='textbox'>"; while($npdata=$db->fetch_row($anpdata)) { $us=mysql_query("SELECT username FROM users WHERE userid={$npdata['npADDER']}"); $us=$db->fetch_single($us); $time=date('F j',$npdata['npTIME']); print " <hr> [b]Ad By: [url='viewuser.php?u={$npdata[']<font color=red>{$us}</font> [{$npdata['npADDER']}][/url] | Added On: {$time}[/b]"; if($r['user_level'] != 1) { print " | <a href=newspaper.php?action=npID&npID={$npdata['npID']}>[b]DELETE[/b]</a>"; } print " [i]<u>{$npdata['npTITLE']}[/i]</u> [i]{$npdata['npBODY']}[/i] "; } print "<hr /></marquee> </table>"; $q=mysql_query("SELECT user_level FROM users WHERE userid=$userid"); $r=$db->fetch_row($q); if($r['user_level'] != 1) { if($_GET['action'] == "all") { if($r['user_level'] != 1) { mysql_query("TRUNCATE TABLE npaper"); print "Newspaper Ads All Cleared! <META HTTP-EQUIV=Refresh CONTENT='1;url=newspaper.php'>"; } } else if($_GET['action'] == "npID") { if($r['user_level'] != 1) { mysql_query("DELETE FROM npaper WHERE npID={$_GET['npID']}"); print "News Paper Ad ID {$_GET['npID']} deleted! <META HTTP-EQUIV=Refresh CONTENT='1;url=newspaper.php'>"; } } } if($_GET['action'] == "add") { print "<h3>Add Advertisement ($10,000)</h3> <form action='newspaper.php?action=added' method='post'> Ad Title: <input type='text' name='npTITLE' class='textbox'> Ad Body: <textarea rows=14 cols=65 name='npBODY' class='textbox'></textarea> <input class='textbox' type='submit' value='Place Ad ($10,000)' /> </form> <font color=red>[b]WARNING:[/b] Only plain text will work Do not advertise other games Follow the rules."; } if($_GET['action'] == "added") { if($ir['money']>9999) { print "Congratulations, you bought an ad for \$10,000! "; mysql_query("UPDATE users SET money=money-10000 WHERE userid=$userid"); $title=str_replace(array("\n"),array(" "),strip_tags($_POST['npTITLE'])); $body=str_replace(array("\n"),array(" "),strip_tags($_POST['npBODY'])); $q=mysql_query("INSERT INTO `npaper` VALUES (NULL, '$userid', '$title', '$body', unix_timestamp())"); print "Advertisement was successfully added! <META HTTP-EQUIV=Refresh CONTENT='5;url=newspaper.php'>"; } } echo " <ul> [/list] </div> <div class='clear'></div> </div> <div id='footer'> Copyright © 2006 Sitename.com. Designed by [url='http://www.freecsstemplates.org']Free CSS Templates[/url]</p> </div> </div> <div style='font-size: 0.8em; text-align: center;'> Design downloaded from Zeroweb.org: [url='http://www.zeroweb.org']Free website templates, layouts, and tools.[/url] </div> </body> </html> "; ?> tell me if i forgot anything ill fix it :-D
  10. i am coding a new newspaper ,but i don't want the header.php to be used, but i still want to use the global.php. so is there a way to use the header for only some pages. ex: if page=newspaper.php include "mainmenu.php"; } else { require "header.php"; something like that. is there a way to do this :?
  11. Re: (help) events problem+gang events What ip hack?
  12. Re: [MCCODES V2] 100% Working Copy Enhanced Schooling     you have to remove the Courses table in sql first then enter this code CREATE TABLE IF NOT EXISTS `courses` ( `crID` int(11) NOT NULL auto_increment, `crNAME` varchar(255) NOT NULL default '', `crDESC` text NOT NULL, `crSTARTING` text NOT NULL, `crCOMPLETED` text NOT NULL, `crCOST` int(11) NOT NULL default '0', `crENERGY` int(11) NOT NULL default '0', `crCASHPRIZE` int(11) NOT NULL default '0', `crITEM` int(11) NOT NULL default '0', `crQTY` int(11) NOT NULL default '0', `crCOMPPERCENT` int(11) NOT NULL default '0', `crPERCENT` int(11) NOT NULL default '0', `crCLICKS` int(11) NOT NULL default '0', `crPERCLICKS` int(11) NOT NULL default '0', `crSTR` int(11) NOT NULL default '0', `crGUARD` int(11) NOT NULL default '0', `crLABOUR` int(11) NOT NULL default '0', `crAGIL` int(11) NOT NULL default '0', `crIQ` int(11) NOT NULL default '0', PRIMARY KEY (`crID`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1;
  13. Re: [MCCODES V2] 100% Working Copy Enhanced Schooling   that didn't work but i think this will. it is just edited version of one of your lines of code. open your education.php and underneath include"globals.php"; put this code if($ir['minus_clicks'] >= 3) { die("<h2>You have used your 3 valid tuition trains come back in an hour</h2>"); exit($h->endpage()); }
  14. Re: [MCCODES V2] 100% Working Copy Enhanced Schooling i found 1 exploit that I don't know how to fix. If you study and you use up all your turns for that hour you can just go back and keep refreshing until you have used up all the turns for the day.
  15. Re: (help) events problem+gang events found out what the problem was all of my sql got changed and some php files were changed easy fix though
  16. Re: (help) events problem+gang events ok i have many mods so replacing might be a problem header.php <?php /** * Layout made by: Shaved92bravada Idea came from another post on CE * Rest of code is just standard V2 MCcodes * Made as a free mod so it is not to be sold. * This header.php is not secure by any means * Your own mods need to be done to secure it or search the forums. */ header('X-UA-Compatible: IE=EmulateIE7'); class headers { function startheaders() { global $db,$c,$userid,$ir; $back="#5A5A5A"; //Define the background colour of your site here. $enperc=(int) ($ir['energy']/$ir['maxenergy']*100); $wiperc=(int) ($ir['will']/$ir['maxwill']*100); $experc=(int) ( $ir['exp']/$ir['exp_needed']*100); $brperc=(int) ($ir['brave']/$ir['maxbrave']*100); $hpperc=(int) ($ir['hp']/$ir['maxhp']*100); $enopp=100-$enperc; $wiopp=100-$wiperc; $exopp=100-$experc; $bropp=100-$brperc; $hpopp=100-$hpperc; $d=""; $u=$ir['username']; if($ir['donatordays']) { $u = "<font color=red>{$ir['username']}</font>";$d="[img=donator.gif]"; } $gn=""; $fm=money_formatter($ir['money']); $cm=money_formatter($ir['crystals'],''); echo <<<EOF <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <html> <head> <title>{$set['game_name']}</title> <style> body { background: #2D2D2D; font-family:Verdana, fantasy; font-size:13px; color: black; scrollbar-base-color: black; scrollbar-arrow-color: red; scrollbar-DarkShadow-Color: black; } a:visited,a:active,a:link { color: black;text-decoration: none; } a:hover { color: red;text-decoration: overline underline;background: none; } table,tr,td { font-family:Palatino Linotype; color: black;font-size: 12px; } .button { font-family:Verdana, fantasy; font-size:13; color:#FFFFFF; background-color: red; } input,textarea,dropdown{ font-family:Verdana, fantasy; font-size:13; color: #ffffff; background-color: #000000; border: 1px solid; } textarea,.submit input{ font-family:Verdana, fantasy; font-size:13; color:#ffffff; background-color: black; } .table { background-color:#000000; } .table3 { background-color:#000000; } .table td { background-color:#DEDEDE; height:22px; } .table3 td { background-color:#CCCCCC; } td .alt { background-color:#EEEEEE; height:22px; } td .h { background-image:url(tablehgrad.png); background-repeat:repeat-x; font-weight: bold; background-color: #D6D6D6; } .table th { background-image:url(tablehgrad.png); background-repeat:repeat-x; font-weight: bold; background-color: #D6D6D6; } .menu th { font-font-size: 12px; color: silver; background-image:url(th.png); background-repeat:repeat-x; font-weight: bold; background-color: #4B4B4B; } .stats td { font-font-size: 12px; color: black; font-weight: bold; } .menu td { font-font-size: 12px; color: black; text-align: center; background-image:url(tdover.png); background-repeat:repeat-x; font-weight: bold; background-color: #4B4B4B; } .menu td:hover{ color: black; background-image:url(td.png); </style> </head><body> <center><table width=1018 border=0 cellpadding=0 cellspacing=0><tr><td background="top.png" height=223 width=1018> <table width=1000 height="159"><td width=5></td></td> <td align='left' width="688" height='147' valign="top"> <div id="header"> <h1>[img=/images/banner.png]</h1> </div> <td><center><font color=white><center> [b]Name:[/b] $gn{$u} [{$ir['userid']}] $d [b]Money:[/b] {$fm} [b]Level:[/b] {$ir['level']} [b]Crystals:[/b] {$ir['crystals']} [[url='logout.php']<font color=red>Emergency Logout</font>[/url]]</font> <font color=green>[[url='cyberbank.php']<font color=yellow>Cyber Bank[/url]</font><font color=green>]</font> </center></td></tr></table> <table width=1000 class='stats'><tr><td width=5></td> <td><font color=white>|</td><td>[b]<font color=white>Energy:</font>[/b] <font color=white>{$enperc}% [url='crystaltemple.php?spend=refill'][size="1"]</font><font color=yellow>[refill]</font>[/size][/url] <img src=greenbar.png width=$enperc height=5><img src=redbar.png width=$enopp height=5></td><td><font color=white>|</td> <td><font color=white>|</td><td>[b]<font color=white>Will:</font>[/b] <font color=white>{$wiperc}% <img src=bluebar.png width=$wiperc height=5><img src=redbar.png width=$wiopp height=5></td><td><font color=white>|</td> <td><font color=white>|</td><td>[b]<font color=white>Brave:</font>[/b] <font color=white>{$ir['brave']}/{$ir['maxbrave']} <img src=yellowbar.png width=$brperc height=5><img src=redbar.png width=$bropp height=5></td><td><font color=white>|</td> <td><font color=white>|</td><td>[b]<font color=white>EXP:</font>[/b] <font color=white>{$experc}% <img src=navybar.png width=$experc height=5><img src=redbar.png width=$exopp height=5></td><td><font color=white>|</td> <td><font color=white>|</td><td>[b]<font color=white>Health:</font>[/b] <font color=white>{$hpperc}% <img src=greenbar.png width=$hpperc height=5><img src=redbar.png width=$hpopp height=5></td><td><font color=white>|</td> </tr></table></center></td> </tr> <td background='middle.png'> <table width=100% border=0 cellpadding=0 cellspacing=0> <tr valign="top"><td width=10></td><td width=145> EOF; } function userdata($ir,$lv,$fm,$cm,$dosessh=1) { global $db,$c,$userid, $set; $IP = ($_SERVER['HTTP_X_FORWARDED_FOR']) ? $_SERVER['HTTP_X_FORWARDED_FOR'] : $_SERVER['REMOTE_ADDR']; $db->query("UPDATE users SET laston=unix_timestamp(),lastip='$IP' WHERE userid=$userid"); if(!$ir['email']) { global $domain; die ("<body></td><td>Your account may be broken. Please mail help@{$domain} stating your username and player ID.</td><td width=25></td></tr> </table> <tr><td><image src='bottom.png'></td></tr></table>"); } if($dosessh && ($_SESSION['attacking'] || $ir['attacking'])) { echo "You lost all your EXP for running from the fight."; $db->query("UPDATE users SET exp=0,attacking=0 WHERE userid=$userid"); $_SESSION['attacking']=0; } global $staffpage; $bgcolor = '#878787'; echo <<<OUT <center> <form name='Tick'> <div id='clock' name='clock'></div> </form> <script> <!-- function show(){ var Digital=new Date() var hours=Digital.getHours() var minutes=Digital.getMinutes() var seconds=Digital.getSeconds() var dn='AM' if (hours>12){ dn='PM' hours=hours-12 } if (hours==0) hours=12 if (minutes<=9) minutes='0'+minutes if (seconds<=9) seconds='0'+seconds document.getElementById('clock').innerHTML =hours+':'+minutes+':' +seconds+' '+dn setTimeout('show()',1000) } show() //--> </script> OUT; if($ir['fedjail']) { $q=$db->query("SELECT * FROM fedjail WHERE fed_userid=$userid"); $r=$db->fetch_row($q); die("</td><td>[b]<font color=red size=+1>You have been put in the {$set['game_name']} Federal Jail for {$r['fed_days']} day(s). Reason: {$r['fed_reason']}</font>[/b]</td><td width=25></td></tr> </table> <tr><td><image src='bottom.png'></td></tr></table></body></html>"); } if(file_exists('ipbans/'.$IP)) { die("</td><td>[b]<font color=red size=+1>Your IP has been banned from {$set['game_name']}, there is no way around this.</font>[/b]</td><td width=25></td></tr> </table> <tr><td><image src='bottom.png'></td></tr></table></body></html>"); } } function menuarea() { include "mainmenu.php"; global $ir,$c; $bgcolor = '#878787'; echo '</td><td width=30></td><td width=775><center>'; if($ir['hospital']) { echo "[b]NB:[/b] You are currently in hospital for {$ir['hospital']} minutes. "; } if($ir['jail']) { echo "[b]NB:[/b] You are currently in jail for {$ir['jail']} minutes. "; } } function smenuarea() { include "smenu.php"; global $ir,$c; $bgcolor = '#878787'; echo '</td><td width=30></td><td width=775><center>'; } function endpage() {echo "</td>"; global $db,$c,$userid, $ir; echo <<<OUT </td><td width=25></td></tr> </table> <tr><td><image src='bottom.png'></td></tr></table> OUT; } } ?>     globals.php <?php /*--------------------------------- -- MCCodes 2.0 -- By Dabomstew ---------------------------------*/ session_start(); ob_start(); if(get_magic_quotes_gpc() == 0) { foreach($_POST as $k => $v) { $_POST[$k]=addslashes($v); } foreach($_GET as $k => $v) { $_GET[$k]=addslashes($v); } } require "global_func.php"; if($_SESSION['loggedin']==0) { header("Location: login.php");exit; } $userid=$_SESSION['userid']; require "header.php"; include "config.php"; global $_CONFIG; define("MONO_ON", 1); require "class/class_db_{$_CONFIG['driver']}.php"; $db=new database; $db->configure($_CONFIG['hostname'], $_CONFIG['username'], $_CONFIG['password'], $_CONFIG['database'], $_CONFIG['persistent']); $db->connect(); $c=$db->connection_id; $set=array(); $settq=$db->query("SELECT * FROM settings"); while($r=$db->fetch_row($settq)) { $set[$r['conf_name']]=$r['conf_value']; } $domain=$_SERVER['HTTP_HOST']; global $jobquery, $housequery; if($jobquery) { $is=$db->query("SELECT u.*,us.*,j.*,jr.* FROM users u LEFT JOIN userstats us ON u.userid=us.userid LEFT JOIN jobs j ON j.jID=u.job LEFT JOIN jobranks jr ON jr.jrID=u.jobrank WHERE u.userid=$userid"); } else if($housequery) { $is=$db->query("SELECT u.*,us.*,h.* FROM users u LEFT JOIN userstats us ON u.userid=us.userid LEFT JOIN houses h ON h.hWILL=u.maxwill WHERE u.userid=$userid"); } else { $is=$db->query("SELECT u.*,us.* FROM users u LEFT JOIN userstats us ON u.userid=us.userid WHERE u.userid=$userid"); } $ir=$db->fetch_row($is); if($ir['force_logout']) { $db->query("UPDATE users SET force_logout=0 WHERE userid=$userid"); session_unset(); session_destroy(); header("Location: login.php"); exit; } global $macropage; if($macropage && !$ir['verified'] && $set['validate_on']==1) { header("Location: macro1.php?refer=$macropage"); exit; } check_level(); $h = new headers; $h->startheaders(); $fm=money_formatter($ir['money']); $cm=money_formatter($ir['crystals'],''); $lv=date('F j, Y, g:i a',$ir['laston']); global $atkpage; if($atkpage) { $h->userdata($ir,$lv,$fm,$cm,0); } else { $h->userdata($ir,$lv,$fm,$cm); } global $menuhide; if(!$menuhide) { $h->menuarea(); } print <<<OUT <iframe name='shoutbox' id='shoutbox' src='shoutbox.php' width='95%' frameborder='0'></iframe> <form method='POST' name='shouting' target='shoutbox' action='shoutbox.php'> <input type='text' id='shout' name='shout'> <input type='submit' value='Shout!' onclick='window.location="{$_SERVER['PHP_SELF']}";'> </form> OUT; ?>
  17. Re: (help) events problem+gang events is there any way to stop this at all? :-(
  18. Re: (help) events problem+gang events before AFTER
  19. Re: (help) events problem+gang events not only that now mails are doing it to ex:word is test but is changed to teet its very odd
  20. i dont know how or why, but my gang events and events dont work it just says ether (o) or (a) nothing else, but there is no errors or sighs to what it is. anyone have a clue how to fix this? here is some pics
  21. Re: attack logs problem thank you :-D
  22. i acedently deleted my attacklogs sql would someone please post there sql for this part :-)
  23. Re: [MCCODES V2] 100% Working Copy Enhanced Schooling oh i found the problem in your sql provided it says ALTER TABLE users ADD crpercent INT (11) NOT NULL default 0; ALTER TABLE users ADD course_clicks INT (11) NOT NULL default 18; ALTER TABLE users ADD minus_clicks INT (11) NOT NULL default 0; ALTER TABLE users ADD clickend INT (11) NOT NULL default 0; but in the php it says cpercent so i just edited the sql and +1 for mod
  24. Re: [MCCODES V2] 100% Working Copy Enhanced Schooling Schooling QUERY ERROR: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1 Query was SELECT * FROM inventory WHERE inv_userid=1 and inv_itemid= please how do you fix this? education.php
  25. Re: [mccode V2] Search Islands       <?php /** * author thahacker07 * */ include "globals.php"; echo "<h3>The Streets</h3>"; $db->query("UPDATE users SET islands=1");{ die("[b]You have already searched The Islands as much as you can today.[/b]"); } echo "<table width='100%'><tr><td width='25%' align='left' valign='top'>"; for ($i = 1; $i <= 100; $i++) { echo sprintf("[b]%s)[/b]", $i); $randnum = rand(0, 1000); if ($randnum < 51) { echo "<font color='red'> You found nothing</font> "; } if ($randnum < 16) { echo "you fall over!lol"; } if ($randnum < 10) { echo "You see a guy getting mugged, but you decide to keep walking. You don't want to be in his shoes anytime soon.> "; } if ($randnum < 123) { $gain = rand(1, 3); echo "While searching the City Streets you found [b]$gain[/b] crystals."; $db->query("UPDATE users SET crystals=crystals+$gain where userid=$userid", $c); } else { echo sprintf("<font color='green'> You found [b]$%d[/b]</font> ", number_format($randnum)); } $total += $randnum; if ($i == 25 or $i == 50 or $i == 75) { echo "</td><td width='25%' align='left' valign='top'>"; } } echo " "; echo sprintf("</td></tr></table> [b]You found a total of $%d searching The Streets![/b] ", $total); $newmoney = $ir['money'] + $total; $result = sprintf("UPDATE users SET money=%d WHERE userid=%u", $newmoney, $userid); $db->query($result); $h->endpage(); ?>   Everything is fixed following the 100 Search things not a big change but hey good for new people WOW nice job
×
×
  • Create New...