Jump to content
MakeWebGames

Uridium

Members
  • Posts

    2,667
  • Joined

  • Last visited

  • Days Won

    75

Everything posted by Uridium

  1. Re-done this slightly ITEMS can be added when Adding an Education (no longer needs ItemID) Stats now Update Properly without use of a cron... When course completed when adding stats they are now Decimal so you can decide what to give out and the stats wont go mental as before... Noticed a bug when adding amount of clicks to give a user per session. This has now been fixed and any Education you make the clicks will be determined from what you give,,,, Still adding a few new things.... 1. User gets a Shield or Trophy for completion of a module. 2. Users can take more than 1 course at a time but probably no more than 3 << MAY NEED HELP WITH THIS BIT IF ANYONE WANTS TO 3. Add luxuries Like gain points/crystals for Modules Completed 4. Boost rep for gangs who take Gang Courses. I'll think of more as i go along.
  2. I found a few other errors Haunted especially on the staff section so ironing those out and a few others...
  3. <<< ILL HAVE TO LOOK INTO THIS ISSUE AS IT WASNT WHAT I THOUGHT IT WAS >>> Im going to Re-code this as its using SQLS already given by the standard MCC courses and look into a few other issues ive found along the way.
  4. very nice CJ :)
  5. Came across this script thought it might come in useful it will allow you to Move Images from one folder on your FTP to another Ive made a few amendments to the script so it allows for Multiple folders to be made so your not overwriting the one youve just sent......   <?php //FileMover 0.9 //Script is used to copy all the files in one dir to seperate folders with x amount of files each. //Run it from any dir.. just edit the config below and run using ./FileMover (Check the php location above) //Feel free to use this wherever.. I'd wouldn't mind a free lunch though!! -> [email][email protected][/email] //-Dustin Drewery //************* CONFIG *******************/ //Set the folder to look for pics in. (no /) $dir = "images"; //Set the maximum number of pics for each dir $max = 300; //Where do you want to save them? (no /) // MAKE SURE THIS EXISTS AND IS CHMOD 777!! //Don't put it in the same folder as your originals either.. $copyPath = "Movedimages"; //Prefix, if any, to add to the folder name.. new folder names will be prefix1 prefix2 prefix3... $prefix = "folder"; //List of prefixes to copy.. ALL CAPS $fileTypes = array("JPG","JPEG","GIF","BMP"); $negativeTypes = array("txt","php","html","htm","sql"); //Thats it!!! //******* You shouldn't need to edit below this line ***********************/ CopyDirContents($dir,$max,$fileTypes,$copyPath,$prefix); function CopyDirContents($dir,$max,$fileTypes,$copyPath,$prefix=null){ ini_set("max_execution_time",6000); if (!is_dir($dir)){die ("<h2>Error: Folder name <font color='red'>$dir!</font> Doesnt Exsist</h2>");} $totalFiles = 0; $dirNum =rand(1,999999); $cur = 1; $curDir = $copyPath."/".$prefix.$dirNum; mkdir($curDir); if ($root=@opendir($dir)){ while ($file=readdir($root)){ if($file=="." || $file==".."){continue;} if(is_dir($dir."/".$file)){ continue; }else{ $fileParts = explode(".",$file); if(!is_array($fileParts) || !in_array(strtoupper($fileParts[count($fileParts)-1]),$fileTypes)) {continue;} if($cur > $max) { $dirNum++; $curDir = $copyPath."/".$prefix.$dirNum; mkdir($curDir); $cur = 1; } print"<font color'green'>"; copy($dir."/".$file,$curDir."/".$file); print"<font color='blue'>".$file."</font>\t\t\t EXTRACTED TO \t".$curDir."/".$file."\n</font> "; $cur++; $totalFiles++; } } } if ($totalFiles='0'){die ();} } {die ("<h2><font color='red'>Error: WRONG IMAGE FORMAT SUPPLIED.</font></h2>");} exit; if ($totalFiles > 0) { print "<font color='green'><h2>Copied $totalFiles Files Successfully</h2></font> files from <font color='green'>$dir </font>Moved to <font color='blue'>$copyPath/$prefix</font>".$dirNum."\n"; } ?>   Credit goes to Dustin Drewery...
  6. if i was a woman i could have bitch slapped you all ;)
  7. I gotta agree with JDS on this one the mod was crap never did get it to work :)
  8. echo <<<EOF <script> <!-- function fullwin(targeturl){ window.open(targeturl,"","fullscreen,scrollbars,addressbar") } //--> </script> <form> <input type="image" img src="wow.gif" onClick="fullwin('index.php')" ALT="View Game in full screen mode" style="FILTER: alpha(style=3, opacity=100,finishopacity=0, startx=0, finishx=100, starty=0, finishy=100) ALT="Open Window In Full View Mode" height="150" width=150" border="6" value="FULL SCREEN" > <font color="#aeaeae">FULL SCREEN</font> </form> EOF;   This one comes with an image button but will work the same on all Browsers
  9. This script will allow those testing new features in a game that get hosped or jailed to have a choice of which they want to evade from also replenishes health, hp and will   <?PHP include "globals.php"; switch($_GET['action']) { case 'jail': jail(); break; case 'hosp': hosp(); break; case 'health': health(); break; default: prefs_home(); break; } function prefs_home() { global $db,$ir,$c,$userid,$h; print "<h2>Replenish Page</h2> <h3>Page code from illusions</h3> [url='xxxxxx.php?action=jail']<h2>GET OUT OF JAIL FREE</h2> [/url] [url='xxxxxx.php?action=hosp']<h2>RESET YOUR HOSPITAL TIME</h2>[/url] [url='xxxxxx.php?action=health']<h2>RE-GENERATE YOUR HEALTH</h2>[/url] "; } function jail() { global $db,$ir,$c,$userid,$h; $db->query("UPDATE users SET jail=0 WHERE userid=$userid"); Print"<h1>GET OUT OF JAIL CARD USED</h1> [url='index.php']Return To Game[/url]"; } function hosp() { global $db,$ir,$c,$userid,$h; $db->query("UPDATE users SET hospital=0 WHERE userid=$userid"); Print"<h1>TIMER REMOVED FROM HOSPITAL</h1> [url='index.php']Return To Game[/url]"; } function health() { global $db,$ir,$c,$userid,$h; $db->query("UPDATE users SET energy=maxenergy, will=maxwill, hp=maxhp WHERE userid=$userid"); Print"<h1>ENERGY REPLENISHED</h1> [url='index.php']Return To Game[/url]"; } $h->endpage(); ?>   Add more cases and functions if you need them SAVE THIS PAGE AS WHATEVER YOU WANT BUT MAKE SURE YOU ALTER THE XXXXXX.php in the hrefs section. to that of your newly named file
  10. PART 3 call this file searchvideo.php   <?php include "globals.php"; if(!$_GET['searchvideo']) { print "You did not enter anything! [size="1"]> [/size][url='videos.php']Back[/url]"; } else { $video=$db->query("SELECT * FROM user_videos WHERE artist LIKE ('%{$_GET['searchvideo']}%')"); print " <font size=+1>Search Results for <font color=red>[b]{$_GET['searchvideo']}[/b]</font> Found ".$db->num_rows($video)." <table width=75% border=1 cellspacing=0> <th bgcolor=#000000>Artist</th> <th bgcolor=#111111>Video Track</th> <th bgcolor=#222222>Watch</th> </tr>"; while($ir=$db->fetch_row($video)) { print "<tr> <td bgcolor=#999999>{$ir['artist']}</a></td> <td bgcolor=#999999>{$ir['tracktitle']}</a></td> <td bgcolor=#999999><center>[[url='playvideo.php?u={$ir['][size="1"]<font color=yellow>Watch</font>[/size][/url]]</center></td> </tr>"; } print "</table> [size="1"]> [/size][url='videos.php']Back[/url]"; } $h->endpage(); ?>   And finally Call this file playvideo.php   <?php include "globals.php"; global $db,$r,$c,$userid; $_GET['st'] = abs((int) $_GET['st']); $st=($_GET['st']) ? $_GET['st'] : 0; $by=($_GET['by']) ? $_GET['by'] : 'tracktitle'; $ord=($_GET['ord']) ? $_GET['ord'] : 'ASC'; $_GET['u'] = abs((int) $_GET['u']); if(!$_GET['u']) { print "Invalid use of file"; } else { $video=$db->query("SELECT * FROM user_videos WHERE videoID={$_GET['u']}",$c); if($db->fetch_row($video) == 0) { print "There is no such video!"; } else { $r=$db->query("SELECT artist, tracktitle, playerswflink, width, height, allowaccess, autostart, views, pending FROM user_videos WHERE videoID={$_GET['u']}",$c); $r = $db->fetch_row($r); if($r['pending'] ==0) { echo '<div class="grey_info"><p class="c narrow"><h2>Sorry the media file <font color="red">'.$r['tracktitle'].' </font>has not been Approved by Staff yet</h2> Return to Video Home Page [url="videos.php"][ RETURN ][/url]</div>'; $h->endpage(); exit(); } $db->query("UPDATE user_videos SET views=views+1 WHERE videoID={$_GET['u']}"); print " <h1>Artist <font color='yellow'>{$r['artist']}</font> Track <font color='yellow'> {$r['tracktitle']}</font></h1> <h2>number of times viewed <font color='lightgreen'>{$r['views']}</h2></font> [img=curtains.png] <DIV STYLE='position:absolute; top:680px; left:340px; width:200px; height:50px'> <CENTER><FONT SIZE='+2' COLOR='00ff00'><embed src='{$r['playerswflink']}' width='{$r['width']}' height='{$r['height']}' allowsiptallowaccess='{$r['allowaccess']}' allowfullseen='{$r['playerswflink']}&fullscreen=true' width='{$r['width']}' height='{$r['height']}' flashvars='height={$r['height']}&width={$r['width']}&file={$r['playerswflink']}&backcolor=0x000000&frontcolor=0xFFFFFF&lightcolor=0xCC0000&displayheight={$r['height']}&autostart='{$r['autostart']}' /></a></embed></center> </FONT></CENTER> </DIV> "; } } $h->endpage(); ?>   Im still working on the staff PENDING Section but that shouldnt take too long to do.
  11. PART 2 call this file usercreatedvideos.php   <?php /* USER CREATED VIDEOS V1 ILLUSIONS 2010 */ include "globals.php"; switch($_GET['videotask']) { case "search": search_video(); break; case "addvideo": addvideo(); break; case "editvideo": editvideo(); break; case "delvideo": delvideo(); break; default: uservids_home(); break; } function uservids_home() { global $db,$ir,$c,$userid,$h; print "<h3>Preferences</h3> [url='usercreatedvideos.php?videotask=search']<h2>Search Online Media Sites</h2>[/url] [url='usercreatedvideos.php?videotask=addvideo']<h2>Add a Video</h2>[/url] "; } function addvideo() { global $db, $ir, $c, $h, $userid, $pending; $width=abs((int) $_POST['width']); $height=abs((int) $_POST['height']); if($_POST['name'] && $_POST['title'] && $height && $width) { $db->query("INSERT INTO user_videos VALUES(NULL, '{$_POST['userid']}', '{$_POST['name']}', '{$_POST['title']}', '{$_POST['alphabet']}', '{$_POST['playerswflink']}', '{$_POST['allowaccess']}', '{$_POST['autostart']}', '$width', '$height', '{$_POST['source']}', '{$_POST['views']}', '{$_POST['pending']}')"); print "video Artist {$_POST['name']} Track Title {$_POST['title']} added. <h1>Preview</h1> <center><embed src='{$_POST['playerswflink']}' width='$width' height='$height' allowsiptallowaccess='{$_POST['playerswflink']}' allowfullseen='true' flashvars='height=$height&width=$width&file={$_POST['playerswflink']}&backcolor=0x000000&frontcolor=0xFFFFFF&lightcolor=0xCC0000&displayheight=$height&autostart={$_POST['autostart']}'/></a></embed></center> "; } else { if($ir['pending'] ==0) { echo '<div class="grey_info"><p class="c narrow"><h1>Sorry You Currently Have a Track In <font color="green">PENDING</font> Once APPROVED You Can Add Another..</h1></div>'; $h->endpage(); exit(); } print "<div class='darkergrey_info'><p class='c narrow'><h3>Adding New Media</h3></div> <form action='usercreatedvideos.php?videotask=addvideo' method='post'> <div class='grey_info'><p class='c narrow'> <input type='hidden' name='userid' value='{$ir['userid']}'/> Artist Name: <input type='text' name='name' /> Track Title: <input type='text' name='title' /> Media Type: <input type='text' name='alphabet' /> [size="1"] EG Radio / Video / Audio Track[/size] Video link: <input type='text' name='playerswflink' /> Example [url]http://www.domain.com/music/flash.php?id=[/url] <input type='hidden' name='allowaccess' value='always'/> <input type='hidden' name='autostart' value='false'/> <input type='hidden' name='width' value='480'/> <input type='hidden' name='height' value='400'/> Video Source: <input type='text' name='source' />Example youtube.com <input type='hidden' name='views' value='0' /> <input type='hidden' name='pending' value='0' /> <input type='submit' value='Add video' /></form> </div>"; } } function editvideo() { global $db, $ir, $r, $c, $h, $userid; switch($_POST['step']) { case "2": $width=abs((int) $_POST['width']); $height=abs((int) $_POST['height']); $name=$_POST['name']; $db->query("UPDATE user_videos SET userid='{$_POST['userid']}', artist='$name', tracktitle='{$_POST['title']}', videoalphabet='{$_POST['alphabet']}', playerswflink='{$_POST['playerswflink']}', width=$width, height=$height, source='{$_POST['source']}', views='{$_POST['views']}', pending='{$_POST['pending']}' WHERE videoID={$_POST['video']}"); print " <div class='darkergrey_info'><p class='c narrow'><h1>GENERAL INFO</h1> TRACKTITLE = {$_POST['title']} ARTIST = $name WIDTH = $width HEIGHT = $height</br /> VIDEO GENRE = Music Video</br /> VIDEO VIEWS = {$_POST['views']} </div><div class='grey_info'><p class='c narrow'> {$_POST['title']} was edited successfully.</div><div class='darkergrey_info'><p class='c narrow'><h1>Previewing {$_POST['title']}</h1> NOTE! If you cannot see a Preview of your chosen track Check the URL for this video and make sure its Correct and that the owner of the Video hasnt Disabled the Ability to Embed the Video...</div> <div class='grey_info'><p class='c narrow'> EDIT ANOTHER [url='usercreatedvideos.php?videotask=editvideo'][ EDIT ] [/url] CREATE ANOTHER [url='usercreatedvideos.php?videotask=addvideo'][ CREATE ] [/url] Or View this Video on its usual channel [url='{$_POST[']VIEW FULL SCREEN MODE[/url] <center><embed src='{$_POST['playerswflink']}' width='$width' height='$height' allowsiptallowaccess='{$_POST['allowaccess']}' allowfullseen='true' flashvars='height=$height&width=$width&file={$_POST['playerswflink']}&backcolor=0x000000&frontcolor=0xFFFFFF&lightcolor=0xCC0000&displayheight=$height&autostart={$_POST['autostart']}'/></a></embed></center> </div> <div class='grey_info'><p class='c narrow'> EDIT ANOTHER [url='usercreatedvideos.php?videotask=editvideo'][ EDIT ] [/url] CREATE ANOTHER [url='usercreatedvideos.php?videotask=addvideo'][ CREATE ] [/url] </div>"; break; case "1": $q=$db->query("SELECT * FROM user_videos WHERE videoID={$_POST['video']}"); $old=$db->fetch_row($q); if($old['pending'] ==0) { echo '<div class="grey_info"><p class="c narrow"><h2>Sorry Media Can Not Be Edited as its Status is <font color="green">PENDING</font> Current Video Pending ARTIST: = <font color="red">'.$old['artist'].'</font> TRACK: = <font color="red">'.$old['tracktitle'].'</font></h2></div>'; $h->endpage(); exit(); } print "<div class='darkergrey_info'><p class='c narrow'><h3>Editing video {$old['tracktitle']}</h3></div> <div class='grey_info'><p class='c narrow'> <form action='usercreatedvideos.php?videotask=editvideo' method='post'> <input type='hidden' name='step' value='2' /> <input type='hidden' name='userid' value='{$ir['userid']}' /> <input type='hidden' name='video' value='{$_POST['video']}' /> Artist Name <input type='text' name='name' value='{$old['artist']}' /> Track Title: <input type='text' name='title' value='{$old['tracktitle']}' /> Alphabet Entry: <input type='text' name='alphabet' value='{$old['videoalphabet']}' /> SWF link Text: <input type='text' name='playerswflink' value='{$old['playerswflink']}' /> <input type='hidden' name='allowaccess' value='{$old['allowaccess']}' /> <input type='hidden' name='autostart' value='{$old['autostart']}' /> <input type='hidden' name='width' value='{$old['width']}' /> <input type='hidden' name='height' value='{$old['height']}' /> Video Source: <input type='text' name='source' value='{$old['source']}' /> <input type='hidden' name='views' value='{$old['views']}' /> <input type='hidden' name='pending' value='{$old['pending']}' /> <input type='submit' value='Edit video' /></form></div> "; break; default: print " <div class='darkergrey_info'><p class='c narrow'> <h3>Editing a video</h3></div> <form action='usercreatedvideos.php?videotask=editvideo' method='post'> <input type='hidden' name='step' value='1' /> <div class='grey_info'><p class='c narrow'> Your videos: ".user_video_dropdown($r, "video")." <input type='submit' value='Edit video' /></form> </div> "; break; } } function delvideo() { global $db,$ir,$r,$c,$h,$userid; if($_POST['video']) { $q=$db->query("SELECT * FROM user_videos WHERE videoID={$_POST['video']}"); $old=$db->fetch_row($q); $db->query("DELETE FROM user_videos WHERE videoID={$_POST['video']}"); print "<div class='grey_info'><p class='c narrow'><h1>Video {$old['tracktitle']} deleted.</h1></div>"; } else { if($ir['pending'] ==0) { echo '<div class="grey_info"><p class="c narrow"><h1>Sorry You Currently Have a Track In <font color="green">PENDING</font> You cannot Delete Any Further Tracks.</h1></div>'; $h->endpage(); exit(); } print "<div class='darkergrey_info'><p class='c narrow'> <h3>Deleting a video</h3></div> <div class='grey_info'><p class='c narrow'> <form action='usercreatedvideos.php?videotask=delvideo' method='post'> video: ".user_video_dropdown($r, "video")." <input type='submit' value='Delete video' /></form></div>"; } } function search_video() { global $db, $ir, $c, $h, $userid; } print "<div class='darkergrey_info'><p class='c narrow'><h3>Searching for Media</h3> <center></div> <div class='grey_info'><p class='c narrow'> <form method='get' action='http://www.youtube.com/results?' target='_blank' /> Enter Search Term<input type='text' name='search_query' /> <input type='submit' value='Search Youtube' /> </form></center> <form method='get' action='http://video.google.co.uk/videosearch?' target='_blank' /> Enter Search Term <input type='text' name='q' /> <input type='submit' value='Search Google' /> </form></center> <form method='get' action='http://video.yahoo.com/search/?' target='_blank' /> Enter Search Term<input type='text' name='p' /> <input type='submit' value='Search Yahoo' /> </form></center></div>"; $h->endpage(); ?>   Now call this file videos.php   <?php include "globals.php"; $_GET['st'] = abs((int) $_GET['st']); $st=($_GET['st']) ? $_GET['st'] : 0; $by=($_GET['by']) ? $_GET['by'] : 'tracktitle'; $ord=($_GET['ord']) ? $_GET['ord'] : 'ASC'; if($ir['preview']==0) { print "<h3>Videos</h3>"; print "<form action='searchvideo.php' method='get'><input type='text' name='searchvideo' /><input type='submit' value='Search ARTIST' /></form>"; $cnt=$db->query("SELECT * FROM videos",$c); $membs=mysql_num_rows($cnt); $pages=(int) ($membs/100)+1; if($membs % 100 == 0) { $pages--; } print "Pages: "; for($i=1;$i <= $pages;$i++) { $stl=($i-1)*10; print "[url='videos.php?st=$stl']$i[/url]"; } print " Order By: [url='videos.php?st=$st&by=videoalphabet&ord=$ord']Alphabet Letter[/url]| [url='videos.php?st=$st&by=artist&ord=$ord']artist[/url]| [url='videos.php?st=$st&by=tracktitle&ord=$ord']Track Title[/url] [url='videos.php?st=$st&by=$by&ord=asc']Ascending[/url]| [url='videos.php?st=$st&by=$by&ord=desc']Descending[/url] "; $q=$db->query("SELECT * FROM videos ORDER BY $by $ord LIMIT $st,100"); $no1=$st+1; $no2=$st+10; print "Showing Videos $no1 to $no2 by order of $by $ord. <table width=75% cellspacing=1 class='table'><tr style='background:gray'><th>[url='videos.php?st=$st&by=tracktitle&ord=$ord']Track Name[/url]</th><th>[url='videos.php?st=$st&by=artist&ord=$ord']Artists Name[/url]</th><th>[url='videos.php?st=$st&by=videoalphabet&ord=$ord']Letter[/url]</th><th>Preview</th><th>[url='videos.php?st=$st&by=source&ord=$ord']Submitted by[/url]</th><th>[url='videos.php?st=$st&by=views&ord=$ord']Views[/url]</th></tr>"; while($r=$db->fetch_row($q)) { $d=""; if($r['tracktitle']) { $r['artist'] = "<font color=red>{$r['artist']}</font>";$d=""; } print "<tr><td>{$r['tracktitle']}</td><td>[url='playvideo.php?u={$r[']{$r['artist']}[/url]</td><td>{$r['videoalphabet']}</td><td><center><embed src='{$r['playerswflink']}' width='100' height='100' allowsiptallowaccess='{$r['videophplink']}' allowfullseen='true' flashvars='height=100&width=100&file={$r['videophplink']}&backcolor=0x000000&frontcolor=0xFFFFFF&lightcolor=0xCC0000&displayheight=100&autostart='false'/></a></embed><td>{$r['source']}</td></center> </td>"; print "</td></tr>"; } print "</table>"; } else if($ir['preview']==1) { print "<h3>Videos</h3>"; print "<form action='searchvideo.php' method='get'><input type='text' name='searchvideo' /><input type='submit' value='Search ARTIST' /></form>"; $cnt=$db->query("SELECT * FROM videos",$c); $membs=mysql_num_rows($cnt); $pages=(int) ($membs/100)+1; if($membs % 100 == 0) { $pages--; } print "Pages: "; for($i=1;$i <= $pages;$i++) { $stl=($i-1)*10; print "[url='videos.php?st=$stl&by=$by&ord=$ord']$i[/url]"; } print " Order By: [url='videos.php?st=$st&by=videoalphabet&ord=$ord']Alphabet Letter[/url]| [url='videos.php?st=$st&by=artist&ord=$ord']artist[/url]| [url='videos.php?st=$st&by=tracktitle&ord=$ord']Track Title[/url] [url='videos.php?st=$st&by=$by&ord=asc']Ascending[/url]| [url='videos.php?st=$st&by=$by&ord=desc']Descending[/url] "; $q=$db->query("SELECT * FROM user_videos ORDER BY $by $ord LIMIT $st,100"); $no1=$st+1; $no2=$st+10; print "Showing Videos $no1 to $no2 by order of $by $ord. <table width=100% cellspacing=1 class='table'><tr style='background:gray'><th>[url='videos.php?st=$st&by=tracktitle&ord=$ord']Track Name[/url]</th><th>[url='videos.php?st=$st&by=artist&ord=$ord']Artists Name[/url]</th><th>[url='videos.php?st=$st&by=videoalphabet&ord=$ord']Letter[/url]</th><th>[url='videos.php?st=$st&by=source&ord=$ord']Submitted By[/url]</th><th>[url='videos.php?st=$st&by=views&ord=$ord']Views[/url]</th><th>[url='videos.php?st=$st&by=pending&ord=$ord']pending[/url]</th></tr>"; while($r=$db->fetch_row($q)) { $d=""; if($r['tracktitle']) { $r['artist'] = "<font color=red>{$r['artist']}</font>";$d=""; } print "<tr><td>{$r['tracktitle']}</td><td>[url='playvideo.php?u={$r[']{$r['artist']}[/url]</td><td>{$r['videoalphabet']}</td><td>{$r['source']}</td><td>{$r['views']}</td><td>{$r['pending']}</td></center> </td>"; print "</td></tr>"; } print "</table>"; } print"<font size=+1><center> &copy Illusions 2010 </font></center>"; $h->endpage(); ?>   PART 3 BELOW
  12. Get the silly bits out of the way First..... Put this in header.php inside your CSS   div.grey_info{border:1px #999999 solid;width:80%;margin:auto;background:#555 } div.darkergrey_info{border:1px #777777 solid;width:80%;margin:auto;background:#777 }   Now open up preferences.php Add these Cases and links..   case 'previewon': preview_on(); break; case 'previewoff': preview_off(); break;   and the Links   Turn Video Preview: [url='preferences.php?action=previewon']ON[/url] or [url='preferences.php?action=previewoff']OFF[/url] </div>"; if($ir['pending'] ==0) { echo '<div class="grey_info"><p class="c narrow"><h1>Videos Unavailable When <font color="green">PENDING</font></h1></div>'; $h->endpage(); exit(); } else { print" <div class='darkergrey_info'><p class='c narrow'><h3>Video Options</h3></div> <div class='grey_info'><p class='c narrow'> Edit a Video [url='usercreatedvideos.php?videotask=editvideo'][ EDIT ] [/url] Add A Video [url='usercreatedvideos.php?videotask=addvideo'][ CREATE ] [/url] Delete A Video [url='usercreatedvideos.php?videotask=delvideo'][ DELETE ] [/url] </div>"; }   Same File add the functions....   function preview_on() { global $db,$ir,$c,$userid,$h; $db->query("UPDATE users SET preview=0 WHERE userid=$userid"); Print"<h2> Video Previewing Enabled [NOTE] This may slow down your machine or page</h2> [url='index.php']Return To Game[/url] or [url='videos.php']Goto Videos[/url]"; } function preview_off() { global $db,$ir,$c,$userid,$h; $db->query("UPDATE users SET preview=1 WHERE userid=$userid"); Print"<h2> Video Previewing Disabled</h2> [url='index.php']Return To Game[/url] or [url='videos.php']Goto Videos[/url]"; }   Now for the SQLS [mysql]CREATE TABLE IF NOT EXISTS `user_videos` ( `videoID` int(11) NOT NULL auto_increment, `userid` int(11) NOT NULL, `artist` varchar(255) NOT NULL default '', `tracktitle` varchar(255) NOT NULL default '', `videoalphabet` varchar(255) NOT NULL default 'A', `playerswflink` varchar(255) NOT NULL default '', `allowaccess` varchar(255) NOT NULL default 'always', `autostart` varchar(255) NOT NULL default 'true', `width` int(11) NOT NULL default '350', `height` int(11) NOT NULL default '400', `source` varchar(255) NOT NULL, `views` int(11) NOT NULL default '0', `pending` tinyint(2) NOT NULL default '0', PRIMARY KEY (`videoID`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1;[/mysql] Also add these 2 SQLS to Users [mysql]ALTER users ADD preview int(2) NOT NULL default '0'; ALTER users ADD pending tinyint(2) NOT NULL default '0';[/mysql] Open up global_func.php and add   function user_video_dropdown($connection,$ddname="video",$selected=-1) { global $db,$r,$ir; $ret="<select name='$ddname' type='dropdown'>"; $q=$db->query("SELECT * FROM user_videos WHERE userid={$ir['userid']} ORDER BY tracktitle ASC"); if($selected == -1) { $first=0; } else { $first=1; } while($r=$db->fetch_row($q)) { $ret.="\n<option value='{$r['videoID']}'"; if ($selected == $r['username'] || $first == 0) { $ret.=" selected='selected'";$first=1; } $ret.= ">{$r['tracktitle']}</option>"; } $ret.="\n</select>"; return $ret; }   SECOND PART TO FOLLOW.
  13. PREPARING SCRIPT TO BE POSTED......
  14. I only see a few problems with this mod your using Jail and hosp as a Rand yet your not using the rand when they goto hosp or jail was alos a bit confused about the EOF; as its not being used anywhere else...
  15. I Agree i dont see the point in it either.. But another coder may see something completely different and it may help to make an entirely new mod :) So its not about what i post its about what potential others can see from it :)
  16. ...UPDATE... Users when adding Videos have to be approved by staff before being aired. Added Videos are set as Pending until Staff are happy that it causes no discomfort to other users... Whilst a Video is in Pending Mode.. Ability to ADD, EDIT and DELETE are frozen......
  17. As Promised ive been busy updating the Media script this one is now more User friendly Staff and Users can add their favourite Videos or music or radio stations from a Vast Majority of media Sites. the newly improved script Lets users Vote on a users choice of media wether its good or bad. Users and staff can edit, delete and add new media. But Staff have the abililty to Delete media they feel is unappropriate..... SCREENIES EDITING ADDING [ UPDATE ] Ive decided to remove staff ability to add Videos as it seemed pointless. Now also includes Ability to add flash Games.....
  18. This MOD is undergoing a Few Improvements to make it more user and staff friendly
  19. nice addition,,,, :) +2000 Just to help you out Coly dont put spaces in image tags. so   { print "[img=events copy.gif]"; } else { print "[img=events.png]"; }   Would become   { print "[img=eventscopy.gif]"; } else { print "[img=events.png]"; }   Same for mail copy.....
  20. 1 = Staff and User System can add but cannot update or delete created themes at moment.. 2 = Having an issue when newly regd players enter the game for the first time they will not see a theme just a skeleton page. This is probably an easy fix. 3 = Images need adding to Users choice so they can see what backdrops they can choose from.. everything else is working fine.......
  21. If anyone cares to take over my recent project Regards the Theme Generator mod can you contact me on here.. The mod is about 90% complete just needs some fine tuning..
  22. This mod is coming along nicely its about 45% completed already so the expected release date should be sooner than i imagined All images or some images depending on user settings can have fixed backgrounds Images can be replaced with colours for those on slow connections... Pages can be moved up, down, left or right for better viewing Fonts can be setup for those that want to view the game with Fonts from their PC SCREENIE AND WITH A FEW CLICKS AND A FEW CLICKS MORE This is probably one of the fastest MCC styled game changer ever lol
  23. <?PHP EOF;}} // <<< NOT SURE IF THIS IS PART OF YOUR SCRIPT BUT IF NOT JUST REMOVE IT.. function userdata($ir,$lv,$fm,$cm,$dosessh=1) { global $db,$c,$userid, $set; $IP = $_SERVER['REMOTE_ADDR']; $db->query("UPDATE users SET laston=unix_timestamp(),lastip='$IP' WHERE userid=$userid"); if(!$ir['email']) { global $domain; die ("Your account may be broken. Please mail help@{$domain} stating your username and player ID."); } if($dosessh && ($_SESSION['attacking'] || $ir['attacking'])) { print "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; } $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=""; $_GET['ID'] = abs(@intval($_GET['ID'])); $_GET['viewforum'] = abs(@intval($_GET['viewforum'])); $_GET['viewtopic'] = abs(@intval($_GET['viewtopic'])); $stmr=''; $u=$ir['username']; if($ir['user_level'] > 1) { $stmr=""; }; if($ir['donatordays']) { $u = "{$ir['username']}'; $d='"; } $gn=''; global $staffpage; if($ir['fedjail']) { $q=$db->query("SELECT * FROM fedjail WHERE fed_userid=$userid"); $r=$db->fetch_row($q); die("You Have Been Dragged Off To {$set['game_name']} Federal Prision For {$r['fed_days']} Day(s). Reason: {$r['fed_reason']}"); } function endpage() { global $db; function menuarea() {include "mainmenu.php"; global $ir, $c; print "Nav Bar"; } function smenuarea() {include "smenu.php"; global $ir, $c; print "Staff Bar"; } function maincontent() { global $ir, $c, $db; print "Layout Info Layout Name: Desert Storm V1 Type: Tables, Div Iframes: NO Download Requirements: - No requirments needed. Features: - A Desert theme Description: This simple layout is practice for me, a practice with color combinations that I havent use, like this, a yellow-brownish-sand-like, for a desert theme :)Copyright & Final CommentsThis layout is copyrighted by SenkouRyu, dont edit the copyright info anywhere! Be sure to check [url]http://www.senkouryu.net[/url] for more layouts like this or even better ones " } ?>
  24. I can see a fair few errors with this But like Alabamahit said its hard to read as its all bunched up try turning WRAP off on your text editor... from what i can see your errors are Reason: {$r['fed_reason']}");}print <<";} change to Reason: {$r['fed_reason']}"); } and function endpage() {global $db;print < change to function endpage() { global $db; Thats all i can see at moment also change $IP = ($_SERVER['HTTP_X_FORWARDED_FOR']) ? $_SERVER['HTTP_X_FORWARDED_FOR'] : $_SERVER['REMOTE_ADDR']; to $IP = $_SERVER['REMOTE_ADDR'];
×
×
  • Create New...