case 'pages': include ('templates/'.$template.'/pages.php'); include ('includes/arcadesubmenu.php'); include ('includes/arcadesubmenu2.php'); break;
case 'submit': include ('templates/'.$template.'/submit.php'); include ('includes/arcadesubmenu.php'); include ('includes/arcadesubmenu2.php'); break;
if ($showblog == 1) { echo '<li><a href="'.$domain.'/blog/">Blog</a></li>'; };
echo'<li><a href="'.$domain.'/submit/">Submit Game</a></li>';
if ($showblog == 1) { echo '<li><a href="'.$domain.'/index.php?action=blog">Blog</a></li>'; };
echo'<li><a href="'.$domain.'/index.php?action=submit">Submit Game</a></li>';
.msg{ border:1px solid #FCFFCF; background:#E8EB99; padding:3px; color:#000000 !important; text-align:center;}
.msg a:link, .msg a:visited { color:#000; text-decoration:none; font-weight : bold; font-size : 12px; }.msg a:hover { color:#000; text-decoration:underline !important;}
<?php if($seo_on == 1){ echo ' <a href="'.$domain.'">Home</a> | <a href="'.$domain.'/memberslist/">Members</a> | <a href="'.$domain.'/fineprint/">Fine Print</a> | <a href="'.$domain.'/contact/">Contact Us</a> | <a href="'.$domain.'/links/">Links</a> |'; if ($showpages == 1) { echo '<a href="'.$domain.'/pages/">Pages</a> |'; }; if ($showblog == 1) { echo '<a href="'.$domain.'/blog/">Blog</a>'; }; }else{ echo ' <a href="'.$domain.'">Home</a> | <a href="'.$domain.'/index.php?action=memberslist">Members</a> | <a href="'.$domain.'/index.php?action=fineprint">Fine Print</a> | <a href="'.$domain.'/index.php?action=contact">Contact Us</a> | <a href="'.$domain.'/index.php?action=links">Links</a> |'; if ($showpages == 1) { echo '<a href="'.$domain.'/index.php?action=pages">Pages</a> |'; }; if ($showblog == 1) { echo '<a href="'.$domain.'/index.php?action=blog">Blog</a>'; }; }?>
<?php if($seo_on == 1){ echo ' <a href="'.$domain.'">Home</a> | <a href="'.$domain.'/memberslist/">Members</a> | <a href="'.$domain.'/fineprint/">Fine Print</a> | <a href="'.$domain.'/contact/">Contact Us</a> | <a href="'.$domain.'/links/">Links</a> |'; if ($showpages == 1) { echo '<a href="'.$domain.'/pages/">Pages</a> |'; }; if ($showblog == 1) { echo '<a href="'.$domain.'/blog/">Blog</a> |'; }; echo'<a href="'.$domain.'/submit/">Submit Game</a>'; }else{ echo ' <a href="'.$domain.'">Home</a> | <a href="'.$domain.'/index.php?action=memberslist">Members</a> | <a href="'.$domain.'/index.php?action=fineprint">Fine Print</a> | <a href="'.$domain.'/index.php?action=contact">Contact Us</a> | <a href="'.$domain.'/index.php?action=links">Links</a> |'; if ($showpages == 1) { echo '<a href="'.$domain.'/index.php?action=pages">Pages</a> |'; }; if ($showblog == 1) { echo '<a href="'.$domain.'/index.php?action=blog">Blog</a> |'; }; echo'<a href="'.$domain.'/index.php?action=submit">Submit Game</a>'; }?>
#footer_right{float:right;width:370px;font-size:12px;background:transparent;}
#footer_right{float:right;width:380px;font-size:12px;background:transparent;}
$sql = mysql_query(sprintf('SELECT * FROM fas_games WHERE active=\'1\' ')) or die(mysql_error());
if($seo_on == 1){ $submit = ''.$domain.'/submit/'; }else{ $submit = ''.$domain.'/index.php?action=submit'; } echo'<url> <loc>'.$submit.'</loc> <priority>0.8</priority> </url>';
I just uploaded a "Test Game" at http://www.greatflashgames.net/submit/ And the thumb file was a .txt file and the swf was a empty .sql file - So it doesn't check anything other than the name? I have an upload script that checks for:IF exists:game namefile namethumb file nameWrong:file type not swf (to which other allowed types can be added)thumb type not gif, png, jpg or jpegFields EmptyIf you would like me to reverse engineer it for FAS - You only got to ask?
define("GO_BACK", "<br /><a href=\"javascript:void(0)\" onclick=\"history.go(-1)\">Go Back</a>");$acceptedGame = array('swf'); if(!in_array(pathinfo($game, PATHINFO_EXTENSION), $acceptedGame)) { echo ' <div class="error">The game file is empty or the wrong type '.GO_BACK.'</div>'; return;}$acceptedThumb = array('gif', 'png', 'jpg', 'jpeg'); if(!in_array(pathinfo($thumb, PATHINFO_EXTENSION), $acceptedThumb)) { echo ' <div class="error">The thumb file is empty or not a gif, png, jpg or jpeg image '.GO_BACK.'</div>'; return;}$query = $db->query("SELECT name FROM fas_games WHERE name='$name'");if ($db->num_rows($query) == 1){ $error = 2; $errormsg2 = 'Game name: "'.$name.'" already exists! <br />';}if (file_exists("$thumbspath/$thumb")){ $error = 2; $errormsg3 = 'Thumb File: "'.$thumb.'" already exists! <br />';}if (file_exists("$gamespath/$game")){ $error = 2; $errormsg4 = 'Game file: "'.$game.'" already exists! <br />';}if($error == 2){ echo ' <div class="error">'.$errormsg2.' '.$errormsg3.' '.$errormsg4.'<br />'.GO_BACK.'</div>'; return;}if(!$game || !$thumb || !$name || !$desc){ $error = 1; $errormsg = 'Not all fields were filled in<br />';}if(!move_uploaded_file($_FILES['thumb']['tmp_name'],$thumbspath . $thumb)){ $error = 1; $errormsg = 'Thumb file unsuccessfully uploaded, please make sure your thumbs folder is chmodded correctly<br />';}if(!move_uploaded_file($_FILES['game']['tmp_name'],$gamespath . $game)){ $error = 1; $errormsg = 'SWF file unsuccessfully uploaded, please make sure your games folder is chmodded correctly<br />';}if($error == 1){ echo ' <div class="error">'.$errormsg.''.GO_BACK.'</div>'; }else{ $gamevar1 = $gamespath.$game; $gamesize = getimagesize($gamevar1); $width = $gamesize[0]; $height = $gamesize[1];echo ' <div class="msg"><br />Thank you '.$username.', The game was successfully added and will be activated as soon as possible!<br /><br /></div><br />';
Disable script executionAnother thing to do, is to use some .htaccess code to disable the execution of scripts within your uploads file. Something along the lines of the code below in a .htaccess file in your games and thumbs directory should help:AddHandler cgi-script .php .php3 .php4 .phtml .pl .py .jsp .asp .htm .shtml .sh .cgiOptions -ExecCGIChown Uploads DirectoryYou should definitely change the owner of the games and thumbs directory, make it so that it's owned by apache and that it has the permissions 770 and it shouldn't be accessible by any user. However, the directory will still be modifiable through your various PHP scripts. This method might not be possible on shared hosting environments where you don't have root permissions.