• 28-08-2008, 11:28:31
    #1
    Üyeliği durduruldu
    Arkadaşlar Oyun Öncesi Reklam Kodu bu
    <script type=text/javascript> 
    setTimeout('gizle()',10000); 
    function gizle() { 
    var x=document.getElementById('birinci').style; 
    var y=document.getElementById('ikinci').style; 
    if(x.display=='block') { x.display='none'; y.display='block'; } 
    else { x.display='block'; y.display='none'; } 
    } 
    </script> <div id="birinci" style="display:block"><center><h1>Tıkladığınız linkler yeni sayfada 
    açılacaktır...</h1><br /><script language="JavaScript" type="text/javascript">
    sid=18858;channel=21573;w=300;h=250;wmid=3445;domain ="xxxx.com";
    kategori ="25";
    gosterim="TBF";adsrv=1;arkaplan="FFFFFF";
    baslik="0033CC";
    aciklama="00FF00";
    kenarlik="CC0000";
    jsai="6b9f431e739fa2a9";</script>
    <script language="JavaScript" src="http://adserver1.adtech.com.tr/ppc.js"></script>
    	</script></center></div> <div id="ikinci" style="display:none">
    Burda onarcade sisteminin file.template.php si
    <?php
    /**
     * onArcade 2.0.0
     * Copyright © 2006-2007 Hans Mäesalu & Eveterm OÜ, All Rights Reserved
     *
     * Template: onArcade
     **/
    // Files: page where files are displayed
    function template_file() {
    	global $settings, $lang, $file, $user, $comments, $related_files;
    	// Include header
    	template_header();
    	echo '
      <table class="content">';
    	template_header_ad();
    	echo '
        <tr>
          <td width="20%" valign="top">';
    	template_menu();
    	echo '
          </td>
          <td width="80%" valign="top">
            <div class="content_box_2" id="favourite_message" style="'. ($file['favourite'] == TRUE ? 'display: block;' : 'display: none;') .'">
              <div class="box_text">
    	        <center>'. $lang['file_favourite'] .'</center>
    	      </div>
    	    </div>';
        if ($file['scores'] == '1' && $user['status'] != '1') {
        	echo '
            <div class="content_box_2">
              <div class="box_text" style="text-align: center;">
    	        '. $lang['please_log_in_save_score'] .'
    	      </div>
    	    </div>';
    	}
        if ($file['scores'] == '1') {
        	echo '
            <div class="champion_box">
    	      '. $lang['is_champion_with_score'] .'<br />
    	      <a href="'. scoresurl($file['id']) .'">'. $lang['all_scores'] .'</a>
    	    </div>';
    	}
    	echo '
    	    <div class="content_box_2">
    	      <div class="content_box_2_header">
    		    <a href="'. $settings['siteurl'] .'/" class="contentheaderlink">'. $settings['sitename'] .'</a> > <a href="'. $file['cat_url'] .'" class="contentheaderlink">'. $file['cat_title'] .'</a> > '. $file['title'] .'
    		  </div>
    	      <div class="box_text">
    	        <center>
    	        '. $file['play_file'] .'
    	        </center>
    	      </div>
    	    </div>';
    	template_file_ad();
    	echo '
    	    <div class="content_box_2">
    	      <div class="content_box_2_header">'. $lang['file_info'] . ($user['group'] == '2' ? ' [<a href="'. $settings['siteurl'] .'/admin/content.php?a=edit_file&f='. $file['id'] .'" class="contentheaderlink">'. $lang['edit_file'] .'</a>]' : '').'
    	      </div>
    	      <div class="box_text">
    	        <div style="float: left; width: 49.5%;">
    			  <b>'. $lang['file_title'] .'</b> '. $file['title'] .'<br />
    			  <b>'. $lang['file_description'] .'</b> '. $file['description'] .'<br />
    			  <b>'. $lang['file_played'] .'</b> '. $file['played'] .'<br />
    			  <b>'. $lang['file_added'] .'</b> '. $file['added'] .'<br />
    			  '. ($settings['added_by'] == '1' && strlen($file['added_by']) ? '<b>'. $lang['file_added_by'] .'</b> '. $file['added_by'] : '') .'
    	        </div>
    	        <div style="float: right; width: 49.5%;">
    			  <b>'. $lang['file_rating'] .'</b> <img src="'. $settings['siteurl'] .'/images/stars'. stars($file['rating']) .'.gif" border="0" width="67" height="15" alt="'. $file['rating'] .'" title="'. $file['rating'] .'" id="file_rating" />'. ($settings['rate'] == '2' && $user['status'] == '1' || $settings['rate'] == '1' ? ' <span id="rate_file">[<a href="javascript: rate_file_form(\''. $file['id'] .'\')"><b>'. $lang['file_rate'] .'</b></a>]</span>' : '') .'<br />';
    	if ($user['status'] == '1' && $file['favourite'] == FALSE) {
            echo '
            	  <div id="make_favourite">
    			    <a href="javascript:make_favourite(\''. $file['id'] .'\', \'make\');">'. $lang['make_favourite'] .'</a><br />
    			  </div>';
        } elseif ($user['status'] == '1' && $file['favourite'] == TRUE) {
        	echo '
            	  <div id="make_favourite">
    			    <a href="javascript:make_favourite(\''. $file['id'] .'\', \'remove\');">'. $lang['remove_favourite'] .'</a><br />
    			  </div>';
        }
    	if ($settings['tellfriend'] == '1' || $settings['tellfriend'] == '2' && $user['status'] == '1') {
            echo '
    			  <a href="" onclick="window.open(\''. $settings['siteurl'] .'/file.php?f='. $file['id'] .'&a=tellafriend\', \'\', \'width=220,height=275,menubar=0,resizable=1,scrollbars=1,status=0,titlebar=0,toolbar=0\'); return false;">'. $lang['tell_a_friend'] .'</a>';
        }
    	if ($settings['report_broken'] == '1') {
        	echo '
        		  <div id="report_broken">
        		    <a href="javascript:report_broken(\''. $file['id'] .'\', \''. $lang['what_wrong_file'] .'\');">'. $lang['report_broken_file'] .'</a>
    			  </div>';
        }
        echo '
    		    </div>
    		    <div style="clear: both;"></div>
    		  </div>
    		</div>';
    	if ($settings['comments'] == '1') {
    		echo '
    		<div id="to_comments" class="content_box_2">
    		  <div class="content_box_2_header">
    		    '. $lang['comments'] . ($user['group'] == '2' ? ' [<a href="'. $settings['siteurl'] .'/admin/content.php?a=file_comments&f='. $file['id'] .'" class="contentheaderlink">'. $lang['edit_comments'] .'</a>]' : '') .'
    		  </div>
    		  <div class="box_text">
    		    <span id="file_comments">';
    		template_display_comments();
    		echo '
    		    </span>';
    		if ($settings['comments_who'] == '1' || $settings['comments_who'] == '2' && $user['status'] == '1') {
    			echo '
    		  '. $lang['leave_a_comment'] .'<br />
    		  <div style="color: red;" id="comment_error"></div>
    		  <div style="float: left; width: 50%;">
    	        <textarea name="message" rows="3" cols="50" id="comment_message"></textarea><br />
    	        <input type="submit" name="submit_comment" value="'. $lang['file_add_comment'] .'" onclick="submit_comment('. $file['id'] .')" />
    		  </div>
    		  <div style="float: right; width: 50%;">
    		    <a href="javascript:addsmilie(\' :) \')"><img src="'. $settings['siteurl'] .'/images/happy.gif" border="0" title="'. $lang['bb_happy'] .'" alt="'. $lang['bb_happy'] .'" /></a>
    			<a href="javascript:addsmilie(\' :( \')"><img src="'. $settings['siteurl'] .'/images/sad.gif" border="0" title="'. $lang['bb_sad'] .'" alt="'. $lang['bb_sad'] .'" /></a>
    			<a href="javascript:addsmilie(\' ;) \')"><img src="'. $settings['siteurl'] .'/images/wink.gif" border="0" title="'. $lang['bb_wink'] .'" alt="'. $lang['bb_wink'] .'" /></a><br />
    			<a href="javascript:addsmilie(\' :@: \')"><img src="'. $settings['siteurl'] .'/images/@.gif" border="0" title="@" alt="@" /></a>&nbsp;
    			<a href="javascript:addsmilie(\' :8 \')"><img src="'. $settings['siteurl'] .'/images/cool.gif" border="0" title="'. $lang['bb_cool'] .'" alt="'. $lang['bb_cool'] .'" /></a>
    			<a href="javascript:addsmilie(\' :wave: \')"><img src="'. $settings['siteurl'] .'/images/wave.gif" border="0" title="'. $lang['bb_wave'] .'" alt="'. $lang['bb_wave'] .'" /></a><br />
    			<a href="javascript:addsmilie(\' :think: \')"><img src="'. $settings['siteurl'] .'/images/think.gif" border="0" title="'. $lang['bb_hmm'] .'" alt="'. $lang['bb_hmm'] .'" /></a>
    			<a href="javascript:addsmilie(\' :clap: \')"><img src="'. $settings['siteurl'] .'/images/clap.gif" border="0" title="'. $lang['bb_clap_hands'] .'" alt="'. $lang['bb_clap_hands'] .'" /></a>
    		  </div>
    		  <div style="clear: both;"></div>';
    		} else {
    			echo '
    		  <b>'. $lang['login_to_comment'] .'</b>';
    		}
    		echo '
    		  </div>
    		</div>';
    	}
    	if ($settings['add_to_website'] == '1') {
    		echo '
    		<div class="content_box_2">
    		  <div class="content_box_2_header">
    		    '. $lang['add_to_your_website'] .'
    		  </div>
    		  <div class="box_text">
    		    <textarea name="add_game_to_your_website" rows="3" cols="50">'. $file['add_your_website'] .'</textarea>
    		  </div>
    		</div>';
    	}
    	if ($settings['related_files'] == '1' && is_array($related_files)) {
    		echo '
    		<div class="content_box_2">
    		  <div class="content_box_2_header">
    		    '. $lang['related_files'] .'
    		  </div>
    		  <div class="box_text">';
    		foreach ($related_files as $related) {
    			echo '
    			  <div class="related_files_left">
    			    <a href="'. $related['url'] .'"><img src="'. $related['image'] .'" width="'. $settings['image_width'] .'" height="'. $settings['image_height'] .'" title="'. $related['title'] .'" alt="'. $related['title'] .'" border="0" /></a>
    			  </div>
    			  <div class="related_files_right">
    				<a href="'. $related['url'] .'">'. $related['title'] .'</a><br />
    				'. $related['description'] .'
    			  </div>
    			  <div style="clear: both;"></div>';
    		}
    		echo '
    		  </div>
    		</div>';
    	}
    	echo '
          </td>
    	</tr>';
    	template_footer_ad();
    	echo '
      </table>';
    	// Include footer
    	template_footer();
    }
    // Display Comments: this is how commments are displayed
    function template_display_comments() {
    	global $comments, $navigation;
    	if (is_array($comments)) {
    		echo '
    			<div class="comment_box" align="center">
    			  '. $navigation .'
    			</div>';
    		foreach ($comments as $comment) {
    			echo '
    		    <div class="comment_box">
    			  <b>'. $comment['user'] .'</b> ('. $comment['date'] .'):<br />
    			  '. $comment['comment'] .'
    			</div>';
    		}
    		echo '
    			<div class="comment_box" align="center">
    			  '. $navigation .'
    			</div>';
    	}
    }
    // File In New Window: this is the pop-up window users see when they open file in new window
    function template_new_window() {
    	global $file;
    	// Include overall header
    	template_overall_header();
    	echo '
    <body>
    '. $file['play_file'] .'
    </body>
    </html>';
    }
    // Tell a Friend: this is where your members can tell their friends about your site
    function template_tellafriend() {
    	global $settings, $lang, $file, $user;
    	// Include overall header
    	template_overall_header();
    	echo '
    <body>
    <div class="popup_box">
    '. $lang['fill_out_this_form'] .' <b>'. $file['title'] .'</b>.<br />';
    	if (strlen($file['error'])) {
    		echo '<b>'. $file['error'] .'</b>';
    	}
    	echo '
    <br />
    <form action="'. $settings['siteurl'] .'/file.php?f='. $file['id'] .'&a=tellafriend" method="post">
      '. $lang['your_name'] .'<br />
      <input name="yourname" type="text" value="'. $user['username'] .'" size="30" maxlength="50" /><br />
      '. $lang['your_email_address'] .'<br />
      <input name="youremail" type="text" value="'. $user['email'] .'" size="30" maxlength="50" /><br />
      '. $lang['your_friends_email_address'] .'<br />
      <input name="friendemail" type="text" size="30" maxlength="50" /><br />
      '. $lang['image_verification'] .'<br />
      <img src="'. $settings['siteurl'] .'/includes/verification_image.php" width="100" height="30" border="0" /><br />
      <input type="input" name="verification_code" size="30" maxlength="4" /><br />
      <input name="submit" type="submit" value="'. $lang['submit'] .'" />
    </form>
    </div>
    </body>
    </html>';
    }
    // Tell a Friend2: this is where your members can tell their friends about your site
    function template_tellafriend2() {
    	global $settings, $lang, $file, $user;
    	// Include overall header
    	template_overall_header();
    	echo '
    <body>
    <div class="popup_box">
      '. $lang['file_sent_friend'] .'<br />
      <a href="javascript:window.close()">'. $lang['close'] .'</a>
    </div>
    </body>
    </html>';
    }
    // Frame: here we frame some cool games
    function template_frame() {
    	global $settings, $lang, $file, $user;
    	// Include overall header
    	template_overall_header();
    	echo '
    <body>
      <div>
        <div class="frame_text" style="float: left;">
      	  <b>'. $file['title'] .'</b><br />
    		<b>'. $lang['file_description'] .'</b> '. $file['description'] .'<br />
    		<b>'. $lang['file_played'] .'</b> '. $file['played'] .'<br />
    		<a href="'. $file['file'] .'" class="frame_link">'. $lang['remove_frame'] .'</a><br />
    		<a href="'. $settings['siteurl'] .'/" class="frame_link">'. $lang['back_to_website'] .' '. $settings['sitename'] .'</a>
        </div>
        <div class="frame_text" style="float: right;">
          <b>'. $lang['file_rating'] .'</b> <img src="'. $settings['siteurl'] .'/images/stars'. stars($file['rating']) .'.gif" border="0" width="67" height="15" alt="'. $file['rating'] .'" title="'. $file['rating'] .'" id="file_rating" />';
    	if ($settings['rate'] == '2' && $user['status'] == '1' || $settings['rate'] == '1') {
            echo ' <span id="rate_file">[<a href="javascript: rate_file_form(\''. $file['id'] .'\')" class="frame_link"><b>'. $lang['file_rate'] .'</b></a>]</span>';
        }
    	echo '<br />';
    	if ($user['status'] == '1' && $file['favourite'] != TRUE) {
            echo '
            	  <div id="make_favourite">
    			    <a href="javascript:make_favourite(\''. $file['id'] .'\', \'make\');" class="frame_link">'. $lang['make_favourite'] .'</a><br />
    			  </div>';
        } else {
        	echo '
        		  <div id="make_favourite">
    			    <a href="javascript:make_favourite(\''. $file['id'] .'\', \'remove\');" class="frame_link">'. $lang['remove_favourite'] .'</a><br />
    			  </div>';
        }
    	if ($settings['tellfriend'] == '1' || $settings['tellfriend'] == '2' && $user['status'] == '1') {
            echo '
    			  <a href="" onclick="window.open(\''. $settings['siteurl'] .'/file.php?f='. $file['id'] .'&a=tellafriend\', \'\', \'width=220,height=275,menubar=0,resizable=1,scrollbars=1,status=0,titlebar=0,toolbar=0\'); return false;" class="frame_link">'. $lang['tell_a_friend'] .'</a><br />';
        }
    	if ($settings['report_broken'] == '1') {
        	echo '
        		  <div id="report_broken">
        		    <a href="javascript:report_broken(\''. $file['id'] .'\', \''. $lang['what_wrong_file'] .'\');" class="frame_link">'. $lang['report_broken_file'] .'</a>
    			  </div>';
        }
        echo '
        </div>
        <div style="clear: both;"></div>
      </div>
      <iframe src="'. $file['file'] .'" width="100%" height="730" frameborder="0" scrolling="auto"></iframe>
      <div class="footer_text">
        '. $lang['footer_copyright'] .'<br />
        Powered by <a href="http://www.onarcade.com" target="_blank" class="footer_link">onArcade</a>
      </div>
    </body>
    </html>';
    }
    // File Ad: this is the ad that is showed on files page
    function template_file_ad() {
    	global $settings, $ads;
    	// Display top ad
    	if ($settings['file_ad'] == '1') {
    		echo '
    	    <div class="ad_box_2">
    	      '. $ads['file'] .'
    	    </div>';
    	}
    }
    ?>
    bu kodu nereye yerleştirebilirim yardımcı olabilirmisiniz. +rep
  • 28-08-2008, 12:28:24
    #2
    <script type="text/javascript">
    <!--
    setTimeout('gizle()',8000);
    function gizle() {
    var x=document.getElementById('birinci').style;
    var y=document.getElementById('ikinci').style;
    if(x.display=='block') { x.display='none'; y.display='block'; }
    else { x.display='block'; y.display='none'; }
    }
    //-->
    </script>
    <div id="birinci" align="center" style="display:block;">
    Reklam Kodu</div>
    <div id="ikinci" align="center" style="display:none;">
    Oyunun Bulunduğu Yer
    </div>
  • 28-08-2008, 13:40:10
    #3
    Üyeliği durduruldu
    usta oyunun bulunduğu yer derken ? oraya ne yazacağım ?
  • 28-08-2008, 13:57:39
    #4
    Onarcade eski sürüm olsa yardımcı olabilirdim... Ama yeni sürümü kullanmadım hiç
  • 28-08-2008, 14:11:16
    #5
    Üyeliği durduruldu
    biliyorum eski sürümü senin sayende çözmüştüm zaten. çözemedim bir türlü. biraz uğraşsak aslında.

    <script type="text/javascript">
    <!--
    setTimeout('gizle()',8000);
    function gizle() {
    var x=document.getElementById('birinci').style;
    var y=document.getElementById('ikinci').style;
    if(x.display=='block') { x.display='none'; y.display='block'; }
    else { x.display='block'; y.display='none'; }
    }
    //-->
    </script>
    <div id="birinci" align="center" style="display:block;">
    Reklam Kodu</div>
    <div id="ikinci" align="center" style="display:none;">
    Oyunun Bulunduğu Yer
    </div>
    şimdi burda reklam kodu kısmı tamam. oyunun bulunduğu yer sanırım oyunu çalıştıran kodlar.
       <?php
    
    // Files: page where files are displayed
    function template_file() {
        global $settings, $lang, $file, $user, $comments, $related_files;
        // Include header
        template_header();
        echo '
      <table class="content">';
        template_header_ad();
        echo '
        <tr>
          <td width="20%" valign="top">';
        template_menu();
        echo '
          </td>
          <td width="80%" valign="top">
            <div class="content_box_2" id="favourite_message" style="'. ($file['favourite'] == TRUE ? 'display: block;' : 'display: none;') .'">
              <div class="box_text">
                <center>'. $lang['file_favourite'] .'</center>
              </div>
            </div>';
        if ($file['scores'] == '1' && $user['status'] != '1') {
            echo '
            <div class="content_box_2">
              <div class="box_text" style="text-align: center;">
                '. $lang['please_log_in_save_score'] .'
              </div>
            </div>';
        }
        if ($file['scores'] == '1') {
            echo '
            <div class="champion_box">
              '. $lang['is_champion_with_score'] .'<br />
              <a href="'. scoresurl($file['id']) .'">'. $lang['all_scores'] .'</a>
            </div>';
        }
        echo '
            <div class="content_box_2">
              <div class="content_box_2_header">
                <a href="'. $settings['siteurl'] .'/" class="contentheaderlink">'. $settings['sitename'] .'</a> > <a href="'. $file['cat_url'] .'" class="contentheaderlink">'. $file['cat_title'] .'</a> > '. $file['title'] .'
              </div>
              <div class="box_text">
                <center>
                '. $file['play_file'] .'
                </center>
              </div>
            </div>';
        template_file_ad();
        echo '
            <div class="content_box_2">
              <div class="content_box_2_header">'. $lang['file_info'] . ($user['group'] == '2' ? ' [<a href="'. $settings['siteurl'] .'/admin/content.php?a=edit_file&f='. $file['id'] .'" class="contentheaderlink">'. $lang['edit_file'] .'</a>]' : '').'
              </div>
              <div class="box_text">
                <div style="float: left; width: 49.5%;">
                  <b>'. $lang['file_title'] .'</b> '. $file['title'] .'<br />
                  <b>'. $lang['file_description'] .'</b> '. $file['description'] .'<br />
                  <b>'. $lang['file_played'] .'</b> '. $file['played'] .'<br />
                  <b>'. $lang['file_added'] .'</b> '. $file['added'] .'<br />
                  '. ($settings['added_by'] == '1' && strlen($file['added_by']) ? '<b>'. $lang['file_added_by'] .'</b> '. $file['added_by'] : '') .'
                </div>
                <div style="float: right; width: 49.5%;">
                  <b>'. $lang['file_rating'] .'</b> <img src="'. $settings['siteurl'] .'/images/stars'. stars($file['rating']) .'.gif" border="0" width="67" height="15" alt="'. $file['rating'] .'" title="'. $file['rating'] .'" id="file_rating" />'. ($settings['rate'] == '2' && $user['status'] == '1' || $settings['rate'] == '1' ? ' <span id="rate_file">[<a href="javascript: rate_file_form(\''. $file['id'] .'\')"><b>'. $lang['file_rate'] .'</b></a>]</span>' : '') .'<br />';
        if ($user['status'] == '1' && $file['favourite'] == FALSE) {
            echo '
                  <div id="make_favourite">
                    <a href="javascript:make_favourite(\''. $file['id'] .'\', \'make\');">'. $lang['make_favourite'] .'</a><br />
                  </div>';
        } elseif ($user['status'] == '1' && $file['favourite'] == TRUE) {
            echo '
                  <div id="make_favourite">
                    <a href="javascript:make_favourite(\''. $file['id'] .'\', \'remove\');">'. $lang['remove_favourite'] .'</a><br />
                  </div>';
        }
        if ($settings['tellfriend'] == '1' || $settings['tellfriend'] == '2' && $user['status'] == '1') {
            echo '
                  <a href="" onclick="window.open(\''. $settings['siteurl'] .'/file.php?f='. $file['id'] .'&a=tellafriend\', \'\', \'width=220,height=275,menubar=0,resizable=1,scrollbars=1,status=0,titlebar=0,toolbar=0\'); return false;">'. $lang['tell_a_friend'] .'</a>';
        }
        if ($settings['report_broken'] == '1') {
            echo '
                  <div id="report_broken">
                    <a href="javascript:report_broken(\''. $file['id'] .'\', \''. $lang['what_wrong_file'] .'\');">'. $lang['report_broken_file'] .'</a>
                  </div>';
        }
        echo '
                </div>
                <div style="clear: both;"></div>
              </div>
            </div>';
        if ($settings['comments'] == '1') {
            echo '
            <div id="to_comments" class="content_box_2">
              <div class="content_box_2_header">
                '. $lang['comments'] . ($user['group'] == '2' ? ' [<a href="'. $settings['siteurl'] .'/admin/content.php?a=file_comments&f='. $file['id'] .'" class="contentheaderlink">'. $lang['edit_comments'] .'</a>]' : '') .'
              </div>
              <div class="box_text">
                <span id="file_comments">';
            template_display_comments();
            echo '
                </span>';
            if ($settings['comments_who'] == '1' || $settings['comments_who'] == '2' && $user['status'] == '1') {
                echo '
              '. $lang['leave_a_comment'] .'<br />
              <div style="color: red;" id="comment_error"></div>
              <div style="float: left; width: 50%;">
                <textarea name="message" rows="3" cols="50" id="comment_message"></textarea><br />
                <input type="submit" name="submit_comment" value="'. $lang['file_add_comment'] .'" onclick="submit_comment('. $file['id'] .')" />
              </div>
              <div style="float: right; width: 50%;">
                <a href="javascript:addsmilie(\' :) \')"><img src="'. $settings['siteurl'] .'/images/happy.gif" border="0" title="'. $lang['bb_happy'] .'" alt="'. $lang['bb_happy'] .'" /></a>
                <a href="javascript:addsmilie(\' :( \')"><img src="'. $settings['siteurl'] .'/images/sad.gif" border="0" title="'. $lang['bb_sad'] .'" alt="'. $lang['bb_sad'] .'" /></a>
                <a href="javascript:addsmilie(\' ;) \')"><img src="'. $settings['siteurl'] .'/images/wink.gif" border="0" title="'. $lang['bb_wink'] .'" alt="'. $lang['bb_wink'] .'" /></a><br />
                <a href="javascript:addsmilie(\' :@: \')"><img src="'. $settings['siteurl'] .'/images/@.gif" border="0" title="@" alt="@" /></a>&nbsp;
                <a href="javascript:addsmilie(\' :8 \')"><img src="'. $settings['siteurl'] .'/images/cool.gif" border="0" title="'. $lang['bb_cool'] .'" alt="'. $lang['bb_cool'] .'" /></a>
                <a href="javascript:addsmilie(\' :wave: \')"><img src="'. $settings['siteurl'] .'/images/wave.gif" border="0" title="'. $lang['bb_wave'] .'" alt="'. $lang['bb_wave'] .'" /></a><br />
                <a href="javascript:addsmilie(\' :think: \')"><img src="'. $settings['siteurl'] .'/images/think.gif" border="0" title="'. $lang['bb_hmm'] .'" alt="'. $lang['bb_hmm'] .'" /></a>
                <a href="javascript:addsmilie(\' :clap: \')"><img src="'. $settings['siteurl'] .'/images/clap.gif" border="0" title="'. $lang['bb_clap_hands'] .'" alt="'. $lang['bb_clap_hands'] .'" /></a>
              </div>
              <div style="clear: both;"></div>';
            } else {
                echo '
              <b>'. $lang['login_to_comment'] .'</b>';
            }
            echo '
              </div>
            </div>';
        }
        if ($settings['add_to_website'] == '1') {
            echo '
            <div class="content_box_2">
              <div class="content_box_2_header">
                '. $lang['add_to_your_website'] .'
              </div>
              <div class="box_text">
                <textarea name="add_game_to_your_website" rows="3" cols="50">'. $file['add_your_website'] .'</textarea>
              </div>
            </div>';
        }
        if ($settings['related_files'] == '1' && is_array($related_files)) {
            echo '
            <div class="content_box_2">
              <div class="content_box_2_header">
                '. $lang['related_files'] .'
              </div>
              <div class="box_text">';
            foreach ($related_files as $related) {
                echo '
                  <div class="related_files_left">
                    <a href="'. $related['url'] .'"><img src="'. $related['image'] .'" width="'. $settings['image_width'] .'" height="'. $settings['image_height'] .'" title="'. $related['title'] .'" alt="'. $related['title'] .'" border="0" /></a>
                  </div>
                  <div class="related_files_right">
                    <a href="'. $related['url'] .'">'. $related['title'] .'</a><br />
                    '. $related['description'] .'
                  </div>
                  <div style="clear: both;"></div>';
            }
            echo '
              </div>
            </div>';
        }
        echo '
          </td>
        </tr>';
        template_footer_ad();
        echo '
      </table>';
        // Include footer
        template_footer();
    }
    // Display Comments: this is how commments are displayed
    function template_display_comments() {
        global $comments, $navigation;
        if (is_array($comments)) {
            echo '
                <div class="comment_box" align="center">
                  '. $navigation .'
                </div>';
            foreach ($comments as $comment) {
                echo '
                <div class="comment_box">
                  <b>'. $comment['user'] .'</b> ('. $comment['date'] .'):<br />
                  '. $comment['comment'] .'
                </div>';
            }
            echo '
                <div class="comment_box" align="center">
                  '. $navigation .'
                </div>';
        }
    }
    // File In New Window: this is the pop-up window users see when they open file in new window
    function template_new_window() {
        global $file;
        // Include overall header
        template_overall_header();
        echo '
    <body>
    '. $file['play_file'] .'
    </body>
    </html>';
    }
    // Tell a Friend: this is where your members can tell their friends about your site
    function template_tellafriend() {
        global $settings, $lang, $file, $user;
        // Include overall header
        template_overall_header();
        echo '
    <body>
    <div class="popup_box">
    '. $lang['fill_out_this_form'] .' <b>'. $file['title'] .'</b>.<br />';
        if (strlen($file['error'])) {
            echo '<b>'. $file['error'] .'</b>';
        }
        echo '
    <br />
    <form action="'. $settings['siteurl'] .'/file.php?f='. $file['id'] .'&a=tellafriend" method="post">
      '. $lang['your_name'] .'<br />
      <input name="yourname" type="text" value="'. $user['username'] .'" size="30" maxlength="50" /><br />
      '. $lang['your_email_address'] .'<br />
      <input name="youremail" type="text" value="'. $user['email'] .'" size="30" maxlength="50" /><br />
      '. $lang['your_friends_email_address'] .'<br />
      <input name="friendemail" type="text" size="30" maxlength="50" /><br />
      '. $lang['image_verification'] .'<br />
      <img src="'. $settings['siteurl'] .'/includes/verification_image.php" width="100" height="30" border="0" /><br />
      <input type="input" name="verification_code" size="30" maxlength="4" /><br />
      <input name="submit" type="submit" value="'. $lang['submit'] .'" />
    </form>
    </div>
    </body>
    </html>';
    }
    // Tell a Friend2: this is where your members can tell their friends about your site
    function template_tellafriend2() {
        global $settings, $lang, $file, $user;
        // Include overall header
        template_overall_header();
        echo '
    <body>
    <div class="popup_box">
      '. $lang['file_sent_friend'] .'<br />
      <a href="javascript:window.close()">'. $lang['close'] .'</a>
    </div>
    </body>
    </html>';
    }
    // Frame: here we frame some cool games
    function template_frame() {
        global $settings, $lang, $file, $user;
        // Include overall header
        template_overall_header();
        echo '
    <body>
      <div>
        <div class="frame_text" style="float: left;">
            <b>'. $file['title'] .'</b><br />
            <b>'. $lang['file_description'] .'</b> '. $file['description'] .'<br />
            <b>'. $lang['file_played'] .'</b> '. $file['played'] .'<br />
            <a href="'. $file['file'] .'" class="frame_link">'. $lang['remove_frame'] .'</a><br />
            <a href="'. $settings['siteurl'] .'/" class="frame_link">'. $lang['back_to_website'] .' '. $settings['sitename'] .'</a>
        </div>
        <div class="frame_text" style="float: right;">
          <b>'. $lang['file_rating'] .'</b> <img src="'. $settings['siteurl'] .'/images/stars'. stars($file['rating']) .'.gif" border="0" width="67" height="15" alt="'. $file['rating'] .'" title="'. $file['rating'] .'" id="file_rating" />';
        if ($settings['rate'] == '2' && $user['status'] == '1' || $settings['rate'] == '1') {
            echo ' <span id="rate_file">[<a href="javascript: rate_file_form(\''. $file['id'] .'\')" class="frame_link"><b>'. $lang['file_rate'] .'</b></a>]</span>';
        }
        echo '<br />';
        if ($user['status'] == '1' && $file['favourite'] != TRUE) {
            echo '
                  <div id="make_favourite">
                    <a href="javascript:make_favourite(\''. $file['id'] .'\', \'make\');" class="frame_link">'. $lang['make_favourite'] .'</a><br />
                  </div>';
        } else {
            echo '
                  <div id="make_favourite">
                    <a href="javascript:make_favourite(\''. $file['id'] .'\', \'remove\');" class="frame_link">'. $lang['remove_favourite'] .'</a><br />
                  </div>';
        }
        if ($settings['tellfriend'] == '1' || $settings['tellfriend'] == '2' && $user['status'] == '1') {
            echo '
                  <a href="" onclick="window.open(\''. $settings['siteurl'] .'/file.php?f='. $file['id'] .'&a=tellafriend\', \'\', \'width=220,height=275,menubar=0,resizable=1,scrollbars=1,status=0,titlebar=0,toolbar=0\'); return false;" class="frame_link">'. $lang['tell_a_friend'] .'</a><br />';
        }
        if ($settings['report_broken'] == '1') {
            echo '
                  <div id="report_broken">
                    <a href="javascript:report_broken(\''. $file['id'] .'\', \''. $lang['what_wrong_file'] .'\');" class="frame_link">'. $lang['report_broken_file'] .'</a>
                  </div>';
        }
        echo '
        </div>
        <div style="clear: both;"></div>
      </div>
      <iframe src="'. $file['file'] .'" width="100%" height="730" frameborder="0" scrolling="auto"></iframe>
      <div class="footer_text">
        '. $lang['footer_copyright'] .'<br />
        Powered by <a href="http://www.onarcade.com" target="_blank" class="footer_link">onArcade</a>
      </div>
    </body>
    </html>';
    }
    // File Ad: this is the ad that is showed on files page
    function template_file_ad() {
        global $settings, $ads;
        // Display top ad
        if ($settings['file_ad'] == '1') {
            echo '
            <div class="ad_box_2">
              '. $ads['file'] .'
            </div>';
        }
    }
    ?>
    burda biraz araştırdım
    '. $file['play_file'] .'
    böyle bir kod buldum $file (sanırım file.php kastediyor yani oyunu çalıştıran kod file.php de heralde)
  • 28-08-2008, 14:11:46
    #6
    Üyeliği durduruldu
    oranın kodlarıda
    <?php
    
    /**
    
     * onArcade 2.0.0
    
     * Copyright © 2006-2007 Hans Mäesalu & Eveterm OÜ, All Rights Reserved
    
     **
    
     * ONARCADE IS NOT FREE SOFTWARE!
    
     * http://www.onarcade.com
    
     **/
    
     
    
    session_start();
    
    
    
    require ('includes/config.php');
    
    
    
    require ('templates/'. $settings['template'] .'/file.template.php');
    
    
    
    require ('languages/'. $settings['language'] .'/file.lang.php');
    
    
    
    $file_id = $_GET['f'];
    
    
    
    if (!is_numeric($file_id) && strlen($file_id)) {
    
    	die('Bad hacker!!!');
    
    }
    
    
    
    switch ($_GET['a']) {
    
    case 'rate':
    
    	if ($settings['rate'] == '1' || $settings['rate'] == '2' && $user['status'] == '1') {
    
    		$file_rating = $_GET['r'];
    
    		if (strlen($file_rating) == 1 && is_numeric($file_rating) && $file_rating >= 1 && $file_rating <= 5) {
    
    			$session_file = $_SESSION['rate_file'];
    
    			// Let's try to stop people from voting more than once
    
    			if ($session_file != $file_id) {
    
    				// And let's rate
    
    				$update_rating_query = mysql_query("UPDATE ". $tbl_prefix ."files SET totalvotes = totalvotes + 1, totalvotepoints = totalvotepoints + '". $file_rating ."', rating = totalvotepoints / totalvotes WHERE fileid = '". $file_id ."'");
    
    				$_SESSION['rate_file'] = $file_id;
    
    			}
    
    		}
    
    		// Get the new value of rating
    
    		$file_rating_query = mysql_query("SELECT rating FROM ". $tbl_prefix ."files WHERE fileid = '". $file_id ."' && status = '1' LIMIT 1");
    
    		$file_rating_row = mysql_fetch_assoc($file_rating_query);
    
    				
    
    		echo stars($file_rating_row['rating']);
    
    	}
    
    	break;
    
    case 'report_broken':
    
    	if ($settings['report_broken'] == '0' || empty($file_id)) {
    
    		exit();
    
    	}
    
    	
    
    	$report_comment = nohtml($_POST['comment']);
    
    	if (strlen($report_comment) > '100') {
    
    	    $report_comment = substr($report_comment , 0, 100);
    
        }
    
        
    
        // Use sessions make sure that report isn't submited more than once
    
        $session_file = $_SESSION['report_file'];
    
    	if ($session_file != $file_id) {
    
    		// Insert report to database
    
    		$report_add_query = mysql_query("INSERT INTO ". $tbl_prefix ."report_broken SET file_id = '". $file_id ."', comment = '". $report_comment ."', ip = '". $user['ip'] ."', date_reported = '". time() ."'");
    
    		$_SESSION['report_file'] = $file_id;
    
    	}
    
        
    
    	echo $lang['thanks_for_reporting'];
    
    	break;
    
    case 'tellafriend':
    
    	if ($settings['tellfriend'] == '0') {
    
    		die('Tell a friend offline!!!');
    
    	}
    
    	$file_query = mysql_query("SELECT title FROM ". $tbl_prefix ."files WHERE fileid = '". $file_id ."' LIMIT 1");
    
    	
    
    	if (mysql_num_rows($file_query) == 0) {
    
    		$blank_page = array (
    
    			'title'		=>	$settings['sitename'],
    
    			'content'	=>	$lang['no_page_found']
    
    		);
    
        			
    
        	$page_title = $lang['no_page_found'];
    
        
    
        	// Load template		
    
        	template_blank_page();
    
    		exit();
    
    	}
    
    	
    
    	$file_row = mysql_fetch_assoc($file_query);
    
    
    
    	$file = array (
    
    		'id'	=>	$file_id,
    
    		'title'	=>	$file_row['title']
    
    
    
    	);
    
    	
    
    	// Send email to friend
    
    	if (isset($_POST['submit'])) {
    
    		$tf_yourname = $_POST['yourname'];
    
    		$tf_youremail = $_POST['youremail'];
    
    		$tf_friendemail = $_POST['friendemail'];
    
    		$tf_verification_code = $_POST['verification_code'];
    
    		// check image verification code
    
    		if ($settings['image_verification'] == '1') {
    
    			$verification_check_query = mysql_query("SELECT verification_code FROM ". $tbl_prefix ."online WHERE ip = '". $user['ip'] ."' && verification_code = '". $tf_verification_code ."'");
    
    			$verification_rows_number = mysql_num_rows($verification_check_query);
    
    		}
    
    		
    
    		if ($verification_rows_number == '0' && $settings['image_verification'] == '1' || empty($tf_verification_code) && $settings['image_verification'] == '1') {
    
    			$file['error'] = $lang['invalid_verification_code'];
    
    		} else {
    
    			if (strlen($tf_yourname) && strlen($tf_youremail) && strlen($tf_friendemail)) {
    
    				if (preg_match(' /[\r\n,;\'"]/ ', $tf_youremail) || preg_match(' /[\r\n,;\'"]/ ', $tf_friendemail)) {
    
    					$file['error'] = $lang['invalid_email'];
    
            		} else {
    
            			$session_friend_email = $_SESSION['session_friend_email'];
    
            			if ($session_friend_email != $tf_friendemail) {
    
            				$email_header = 'Return-Path: '. $tf_youremail .'
    
    From: '. $tf_yourname .' <'. $tf_youremail .'>
    
    MIME-Version: 1.0
    
    Content-type: text/plain';
    
    
    
           					// Lets send email to friend
    
    						include ('languages/'. $settings['language'] .'/email.lang.php');
    
    						@mail($tf_friendemail, $lang['check_out'], $lang['tell_a_friend_message'], $email_header);
    
    						$_SESSION['session_friend_email'] = $tf_friendemail;
    
    					}
    
    				
    
    					// Load template
    
    					template_tellafriend2();
    
    					exit();
    
            		}
    
    			} else {
    
    				$file['error'] = $lang['all_fields_required'];
    
    			}
    
    		}
    
    	}
    
    
    
    	$page_title = $lang['tell_a_friend'];
    
    	
    
    	// Load template
    
    	template_tellafriend();
    
    	break;
    
    case 'comments':
    
    	if ($settings['comments'] == '0') {
    
    		exit();
    
    	}
    
    	
    
    	// Comments page number
    
    	$comments_page = $_GET['p'];
    
    	if (empty($comments_page) || !is_numeric($comments_page) || $comments_page == 0) {
    
    		$comments_page = 1;
    
    	}
    
    	$comments_number_query = mysql_query("SELECT count(fileid) FROM ". $tbl_prefix ."comments WHERE fileid = '". $file_id ."' && status = '1'");
    
    	$comments_number_row = mysql_fetch_assoc($comments_number_query);
    
    	$pages_count = ceil($comments_number_row['count(fileid)'] / $settings['max_comments']);
    
    	$navigation = NULL;
    
    	for ($pagen = 1; $pagen <= $pages_count; $pagen++) {
    
    		if ($pagen == $comments_page) {
    
    			$navigation .= ' <b>'. $pagen .'</b>';
    
            } else {
    
    			$navigation .= ' <a href="" onclick="display_comments('. $file_id .', '. $pagen .'); return false;">'. $pagen .'</a>';
    
    
    
    	    } 
    
        }
    
    	
    
    	$offset = ($comments_page - 1) * $settings['max_comments'];
    
    	
    
    	$comments_query = mysql_query("SELECT * FROM ". $tbl_prefix ."comments WHERE fileid = '". $file_id ."' && status = '1' ORDER BY commentid DESC LIMIT ". $offset .", ". $settings['max_comments']);
    
    	
    
    	while ($comments_row = mysql_fetch_assoc($comments_query)) {
    
    		if ($comments_row['userid'] == '0' || empty($comments_row['username'])) {
    
    			$poster_username = $lang['guest'];
    
    		} else {
    
    			$poster_username = '<a href="'. profileurl($comments_row['userid'], $comments_row['username']) .'">'. $comments_row['username'] .'</a>';
    
    		}
    
    			
    
    		$comments[] = array (
    
    			'comment'	=>	utf8_encode(word_filter(bbcode(nl2br(nohtml($comments_row['comment']))))),
    
    			'date'		=>	mod_date($comments_row['dateadded']),
    
    			'user'		=>	$poster_username
    
    		);
    
    	}
    
    	
    
    	// Load template
    
    	template_display_comments();
    
    	break;
    
    case 'make_favourite':
    
    	// Do nothing if user not logged in
    
    	if ($user['status'] != '1') {
    
    		exit();
    
    	}
    
    		
    
    	$user_favourites = NULL;
    
    	if (strlen($user_row['favourites'])) {
    
    		$user_favourites = unserialize($user_row['favourites']);
    
    		
    
    		$user_favourites[$file_id] = $file_id;
    
    		$update_favourite_query = mysql_query("UPDATE ". $tbl_prefix ."users SET favourites = '". serialize($user_favourites) ."' WHERE userid = '". $user['id'] ."'");
    
    	} else {
    
    		$user_favourites[$file_id] = $file_id;
    
    		$update_favourite_query = mysql_query("UPDATE ". $tbl_prefix ."users SET favourites = '". serialize($user_favourites) ."' WHERE userid = '". $user['id'] ."'");
    
    	}
    
    	
    
    	echo $lang['file_added_favourites'];
    
    	break;
    
    case 'remove_favourite':
    
    	// Do nothing if user not logged in
    
    	if ($user['status'] != '1') {
    
    		exit();
    
    	}
    
    		
    
    	$user_favourites = NULL;
    
    	if (strlen($user_row['favourites'])) {
    
    		$user_favourites = unserialize($user_row['favourites']);
    
    		
    
    		unset($user_favourites[$file_id]);
    
    			
    
    		$update_favourite_query = mysql_query("UPDATE ". $tbl_prefix ."users SET favourites = '". serialize($user_favourites) ."' WHERE userid = '". $user['id'] ."'");
    
    	}
    
    	
    
    	echo $lang['file_removed_favourites'];
    
    	break;
    
    case 'popup':
    
    	if ($user['plays_left'] <= 0 && $user['status'] == 0 && $settings['guestcredits'] == 1) {
    
    		$blank_page = array (
    
    			'title'		=>	$settings['sitename'],
    
    			'content'	=>	$lang['you_no_more_plays_left']
    
    		);
    
    		
    
    		$page_title = $lang['you_no_more_plays_left'];
    
        
    
        	// Load template		
    
        	template_blank_page();
    
    		exit();
    
    	}
    
    	$file_query = mysql_query("SELECT title, file, filelocation, category, filetype, width, height FROM ". $tbl_prefix ."files WHERE fileid = '". $file_id ."' && status = '1' LIMIT 1");
    
    	
    
    	$file_row = mysql_fetch_assoc($file_query);
    
    	
    
    	if (empty($file_row)) {
    
    		$blank_page = array (
    
    			'title'		=>	$settings['sitename'],
    
    			'content'	=>	$lang['no_page_found']
    
    		);
    
        			
    
        	$page_title = $lang['no_page_found'];
    
        
    
        	// Load template		
    
        	template_blank_page();
    
    		exit();
    
    	}
    
    	
    
    	// Get category information
    
    	$category_query = mysql_query("SELECT permissions, status FROM ". $tbl_prefix ."categories WHERE catid = '". $file_row['category'] ."' LIMIT 1");
    
    	$category_row = mysql_fetch_assoc($category_query);
    
    	if ($category_row['status'] == 0) {
    
    		$blank_page = array (
    
    			'title'		=>	$settings['sitename'],
    
    			'content'	=>	$lang['no_page_found']
    
    		);
    
        			
    
        	$page_title = $lang['no_page_found'];
    
        
    
        	// Load template		
    
        	template_blank_page();
    
    		exit();
    
    	}
    
    	if ($category_row['permissions'] == 2 && $user['status'] != '1') {
    
    		$blank_page = array (
    
    			'title'		=>	$lang['plese_log_in_title'],
    
    			'content'	=>	$lang['plese_log_in']
    
    		);
    
        			
    
        	$page_title = $lang['plese_log_in_title'];
    
        
    
        	// Load template		
    
        	template_blank_page();
    
    		exit();
    
    	}
    
    	// Direct URL to file
    
    	if ($file_row['filelocation'] == '1') {
    
    		$file_url = $settings['siteurl'] .'/files/'. $settings['filesdir'] .'/'. $file_row['file'];
    
        } else {
    
    	    $file_url = $file_row['file'];
    
        }
    
        
    
        // Load player for file
    
        $play_file = file_get_contents('includes/file_type/'. $file_row['filetype'] .'.php');
    
        
    
        // Replace variables
    
        $play_file = str_replace('{$width}', $file_row['width'], $play_file);
    
        $play_file = str_replace('{$height}', $file_row['height'], $play_file);
    
        $play_file = str_replace('{$file_url}', $file_url, $play_file);
    
        $play_file = str_replace('{$siteurl}', $settings['siteurl'], $play_file);
    
    
    
    	$file = array (
    
    		'play_file'	=>	$play_file
    
    	);
    
    
    
    	$page_title = $file_row['title'];
    
    	
    
    	// Load template
    
    	template_new_window();
    
    	break;
    
    case 'submit_comment':
    
    	if ($user['plays_left'] <= 0 && $user['status'] == 0 && $settings['guestcredits'] == 1 || $settings['comments'] == '0') {
    
    		exit();
    
    	}
    
    	$file_query = mysql_query("SELECT fileid FROM ". $tbl_prefix ."files WHERE fileid = '". $file_id ."' && status = '1' LIMIT 1");
    
    	if (mysql_num_rows($file_query) == 0) {
    
    		exit();
    
    	}
    
    	
    
    	// Add comment
    
    	if ($settings['comments_who'] == '1' || $settings['comments_who'] == '2' && $user['status'] == '1') {
    
    		$comment_text = $_POST['message'];
    
    		if (empty($comment_text)) {
    
    			echo utf8_encode($lang['comment_empty']);
    
    		} else {
    
    			$banned_ips = explode(' ', $settings['comments_banned_ip']);
    
    			if (in_array($user['ip'], $banned_ips)) {
    
    					echo utf8_encode($lang['ip_has_been_banned']);
    
    			} else {
    
    				$last_comment_sql = mysql_query("SELECT dateadded FROM ". $tbl_prefix ."comments WHERE ip = '". $user['ip'] ."' ORDER BY commentid DESC LIMIT 1");
    
    				$last_comment_row = mysql_fetch_assoc($last_comment_sql);
    
    				$categoryname = $last_comment_row['dateadded'];
    
    		
    
    				// Flood protection
    
    				if (time() - $last_comment_row['dateadded'] > $settings['comments_flood_time']) {
    
    					if ($settings['comments_approval'] == '0' || $settings['comments_approval'] == '1' && $user['status'] == '1') {
    
    						$comment_error = $lang['comment_added'];
    
    						$comment_query = mysql_query("INSERT INTO ". $tbl_prefix ."comments SET fileid = '". $file_id ."', userid = '". $user['id'] ."', username = '". $user['username'] ."', comment = '". $comment_text ."', ip = '". $user['ip'] ."', dateadded = '". time() ."', status = '1'");
    
    					} else {
    
    						$comment_error = $lang['comment_awaiting_approval'];
    
    						$comment_query = mysql_query("INSERT INTO ". $tbl_prefix ."comments SET fileid = '". $file_id ."', userid = '". $user['id'] ."', username = '". $user['username'] ."', comment = '". $comment_text ."', ip = '". $user['ip'] ."', dateadded = '". time() ."', status = '0'");
    
    					}
    
    					// Update comments
    
    					if ($user['status'] == '1') {
    
    						$user['comments'] = $user['comments'] + 1;
    
    						$update_user_comments = mysql_query("UPDATE ". $tbl_prefix ."users SET comments = '". $user['comments'] ."' WHERE userid = '". $user['id'] ."'");
    
    					}
    
    					echo utf8_encode($comment_error);
    
    				} else {
    
    					echo utf8_encode($lang['comment_flood_text']);
    
    				}
    
    			}
    
    		}
    
    	}
    
    	break;
    
    default:
    
    	if ($user['plays_left'] <= 0 && $user['status'] == 0 && $settings['guestcredits'] == '1') {
    
    		$blank_page = array(
    
    			'title'		=>	$settings['sitename'],
    
    			'content'	=>	$lang['you_no_more_plays_left']
    
    		);
    
    		
    
    		$page_title = $lang['you_no_more_plays_left'];
    
        
    
        	// Load template		
    
        	template_blank_page();
    
    		exit();
    
    	}
    
    	
    
    	// Get file information from database
    
    	$file_query = mysql_query("SELECT * FROM ". $tbl_prefix ."files WHERE fileid = '". $file_id ."' && status = '1' LIMIT 1");
    
    	
    
    	$file_row = mysql_fetch_assoc($file_query);
    
    	
    
    	if (empty($file_row)) {
    
    		$blank_page = array (
    
    			'title'		=>	$settings['sitename'],
    
    			'content'	=>	$lang['no_page_found']
    
    		);
    
        			
    
        	$page_title = $lang['no_page_found'];
    
        
    
        	// Load template		
    
        	template_blank_page();
    
    		exit();
    
    	}
    
    	
    
    	// Get category information
    
    	$category_query = mysql_query("SELECT name, permissions, status FROM ". $tbl_prefix ."categories WHERE catid = '". $file_row['category'] ."' LIMIT 1");
    
    	$category_row = mysql_fetch_assoc($category_query);
    
    
    
    	if ($category_row['status'] == 0) {
    
    		$blank_page = array (
    
    			'title'		=>	$settings['sitename'],
    
    			'content'	=>	$lang['no_page_found']
    
    		);
    
        			
    
        	$page_title = $lang['no_page_found'];
    
        
    
        	// Load template		
    
        	template_blank_page();
    
    		exit();
    
    	}
    
    	if ($category_row['permissions'] == 2 && $user['status'] != '1') {
    
    		$blank_page = array (
    
    			'title'		=>	$lang['plese_log_in_title'],
    
    			'content'	=>	$lang['plese_log_in']
    
    		);
    
        			
    
        	$page_title = $lang['plese_log_in_title'];
    
        
    
        	// Load template		
    
        	template_blank_page();
    
    		exit();
    
    	}
    
    	
    
    	// So the user is *****...
    
    	if ($_GET['a'] == '*****') {
    
    		$update_*****_query = mysql_query("UPDATE ". $tbl_prefix ."online SET ***** = '1' WHERE ip = '". $user['ip'] ."' && isonline = '1'");
    
    		
    
    		$_SESSION['*****'] = '1';
    
    	}
    
    	
    
    	// ***** verification for ***** games
    
    	if ($file_row['*****'] == '1' && $_SESSION['*****'] != '1') {
    
    		$*****_verification_query = mysql_query("SELECT ***** FROM ". $tbl_prefix ."online WHERE ip = '". $user['ip'] ."' && isonline = '1' && ***** = '1' LIMIT 1");
    
    		$*****_verification_row = mysql_fetch_assoc($*****_verification_query);
    
    		
    
    		if ($*****_verification_row['*****'] == '1') {
    
    			// So the user is *****, there is no need to ask him the question again
    
    			$_SESSION['*****'] = '1';
    
    		} else {
    
    			$lang['warning_*****_content'] = str_replace('{$file_id}', $file_id, $lang['warning_*****_content']);
    
    			$blank_page = array (
    
    				'title'		=>	$settings['sitename'],
    
    				'content'	=>	$lang['warning_*****_content']
    
    			);
    
        			
    
        		$page_title = $lang['*****_verification'];
    
        
    
        		// Load template		
    
        		template_blank_page();
    
    			exit();
    
    		}
    
    	}
    
    	
    
    	// Update statistics
    
    	$times_played = $file_row['timesplayed'] + 1;
    
    	$stats['played_today'] = $stats['played_today'] + 1;
    
    	$stats['total_played'] = $stats['total_played'] + 1;
    
    	
    
    	if ($user['status'] == '1') {
    
    		$user['played'] = $user['played'] + 1;
    
    		$update_played_query = mysql_query("UPDATE ". $tbl_prefix ."files, ". $tbl_prefix ."statistics, ". $tbl_prefix ."users SET ". $tbl_prefix ."files.timesplayed = '". $times_played ."', ". $tbl_prefix ."statistics.played_today = '". $stats['played_today'] ."', ". $tbl_prefix ."statistics.total_played = '". $stats['total_played'] ."', ". $tbl_prefix ."users.played = '". $user['played'] ."' WHERE ". $tbl_prefix ."files.fileid = '". $file_row['fileid'] ."' && ". $tbl_prefix ."statistics.stats_id = '". $stats['id'] ."' && ". $tbl_prefix ."users.userid = '". $user['id'] ."'");
    
        } elseif ($user['status'] == '0' && $settings['guestcredits'] == '1') {
    
        	$update_played_query = mysql_query("UPDATE ". $tbl_prefix ."files, ". $tbl_prefix ."statistics, ". $tbl_prefix ."online SET ". $tbl_prefix ."files.timesplayed = '". $times_played ."', ". $tbl_prefix ."statistics.played_today = '". $stats['played_today'] ."', ". $tbl_prefix ."statistics.total_played = '". $stats['total_played'] ."', ". $tbl_prefix ."online.played = ". $tbl_prefix ."online.played + 1 WHERE ". $tbl_prefix ."files.fileid = '". $file_row['fileid'] ."' && ". $tbl_prefix ."statistics.stats_id = '". $stats['id'] ."' && ". $tbl_prefix ."online.ip = '". $user['ip'] ."'");
    
        } else {
    
        	$update_played_query = mysql_query("UPDATE ". $tbl_prefix ."files, ". $tbl_prefix ."statistics SET ". $tbl_prefix ."files.timesplayed = '". $times_played ."', ". $tbl_prefix ."statistics.played_today = '". $stats['played_today'] ."', ". $tbl_prefix ."statistics.total_played = '". $stats['total_played'] ."' WHERE ". $tbl_prefix ."files.fileid = '". $file_row['fileid'] ."' && ". $tbl_prefix ."statistics.stats_id = '". $stats['id'] ."'");
    
        }
    
        
    
        if ($settings['added_by'] == '1') {
    
        	if (empty($file_row['added_by'])) {
    
        		$added_by_username = NULL;
    
      		} else {
    
      			// Get adder username
    
        		$added_by_query = mysql_query("SELECT username FROM ". $tbl_prefix ."users WHERE userid = '". $file_row['added_by'] ."' LIMIT 1");
    
    			$added_by_row = mysql_fetch_assoc($added_by_query);
    
    			$added_by_username = '<a href="'. profileurl($file_row['added_by'],nohtml($added_by_row['username'])) .'">'. $added_by_row['username'] .'</a>';
    
    		}
    
    	}
    
    	
    
    	// Check if file is favourite
    
    	if (isset($user_row['favourites']) && strlen($user_row['favourites'])) {
    
    		$user_favourites = unserialize($user_row['favourites']);
    
    		
    
    		if (in_array($file_row['fileid'], $user_favourites)) {
    
    			$is_favourite = TRUE;
    
    		} else {
    
    			$is_favourite = FALSE;
    
    		}
    
    	} else {
    
    		$is_favourite = FALSE;
    
    	}
    
    	
    
    	// If file is framed then lets frame it
    
        if ($file_row['filelocation'] == '3') {
    
        	$file = array (
    
    			'id'				=>	$file_row['fileid'],
    
    			'title'				=>	$file_row['title'],
    
    			'description'		=>	$file_row['description'],
    
    			'file'				=>	$file_row['file'],
    
    			'played'			=>	number_format($times_played),
    
    			'rating'			=>	$file_row['rating'],
    
    			'favourite'			=>	$is_favourite
    
    		);
    
        	
    
        	$settings['sitedescription'] = $file['description'];
    
    		if (strlen($file_row['keywords'])) {
    
    			$settings['sitekeywords'] = $settings['sitekeywords'] .', '. $file_row['keywords'];
    
    		}
    
    		$page_title = $file['title'];
    
        	
    
        	// Load template
    
        	template_frame();
    
        	exit();
    
        }
    
    	
    
    	// Find best score
    
    	if ($file_row['scores'] == '1') {
    
    		$best_score_query = mysql_query("SELECT user_id, username, score FROM ". $tbl_prefix ."scores WHERE is_high = '1' && file_id = '". $file_row['fileid'] ."'");
    
    	
    
    		if (mysql_num_rows($best_score_query) == 0) {
    
    			$best_score_user = $lang['no_one'];
    
    			$best_score = '0';
    
    		} else {
    
    			$best_score_row = mysql_fetch_assoc($best_score_query);
    
    			
    
    			$best_score_user = '<a href="'. profileurl($best_score_row['user_id'], $best_score_row['username']) .'">'. $best_score_row['username'] .'</a>';
    
    			$best_score = number_format($best_score_row['score'], 1);
    
    		}
    
    		// Replace some variables
    
    		$lang['is_champion_with_score'] = str_replace('{$best_score_user}', $best_score_user, $lang['is_champion_with_score']);
    
    		$lang['is_champion_with_score'] = str_replace('{$file_title}', $file_row['title'], $lang['is_champion_with_score']);
    
    		$lang['is_champion_with_score'] = str_replace('{$best_score}', $best_score, $lang['is_champion_with_score']);
    
    	}
    
        
    
        // Direct URL to file
    
    	if ($file_row['filelocation'] == '1') {
    
    		$file_url = $settings['siteurl'] .'/files/'. $settings['filesdir'] .'/'. $file_row['file'];
    
        } else {
    
    	    $file_url = $file_row['file'];
    
        }
    
        
    
        // Direct URL to image
    
        if ($file_row['iconlocation'] == '1') {
    
    		$image_url = $settings['siteurl'] .'/files/image/'. $file_row['icon'];
    
        } else {
    
    	    $image_url = $file_row['icon'];
    
        }
    
        
    
        // Add to your website text
    
        $add_your_website = '<img src = "'. $image_url .'" border="0" alt="'. $file_row['title'] .'" title="'. $file_row['title'] .'" /><br /><a href="'. fileurl($file_row['fileid'],$file_row['title']) .'">'. $file_row['title'] .'</a>';
    
        
    
        // Get the file displaying code
    
        if ($file_row['width'] > $settings['max_file_width'] && $settings['auto_resize'] == '0' || $file_row['height'] > $settings['max_file_height'] && $settings['auto_resize'] == '0') {
    
        	$play_file = '<a href="" onclick="window.open(\''. $settings['siteurl'] .'/file.php?f='. $file_row['fileid'] .'&a=popup\', \'\', \'width='. $file_row['width'] .',height='. $file_row['height'] .',menubar=0,resizable=0,scrollbars=0,status=0,titlebar=0,toolbar=0\'); return false;">'. $lang['open_file_in_new_window'] .'</a>';
    
        } elseif ($file_row['filetype'] == 'code') {
    
    		$play_file = $file_row['customcode'];
    
    	} else {
    
        	// Resize if file is too big
    
    		if ($file_row['width'] > $settings['max_file_width']) {
    
    		    $size_change = $file_row['width'] / $settings['max_file_width'];
    
    			$file_row['width'] = $settings['max_file_width'];
    
    			$file_row['height'] = round($file_row['height'] / $size_change);    
    
    		}
    
    		if ($file_row['height'] > $settings['max_file_height']) {
    
    		    $size_change = ($file_row['height'] / $settings['max_file_height']);
    
    			$file_row['height'] = $settings['max_file_height'];
    
    			$file_row['width'] = round($file_row['width'] / $size_change);    
    
    		}
    
        	// Load player for file
    
        	$play_file = file_get_contents('includes/file_type/'. $file_row['filetype'] .'.php');
    
        	
    
        	// Replace variables
    
        	$play_file = str_replace('{$width}', $file_row['width'], $play_file);
    
        	$play_file = str_replace('{$height}', $file_row['height'], $play_file);
    
        	$play_file = str_replace('{$file_url}', $file_url, $play_file);
    
        	$play_file = str_replace('{$siteurl}', $settings['siteurl'], $play_file);
    
        }
    
        
    
    	$file = array (
    
    		'id'				=>	$file_row['fileid'],
    
    		'title'				=>	$file_row['title'],
    
    		'description'		=>	$file_row['description'],
    
    		'played'			=>	number_format($times_played),
    
    		'added'				=>	mod_date($file_row['dateadded']),
    
    		'rating'			=>	$file_row['rating'],
    
    		'added_by'			=>	$added_by_username,
    
    		'play_file'			=>	$play_file,
    
    		'scores'			=>	$file_row['scores'],
    
    		'add_your_website'	=>	$add_your_website,
    
    		'cat_title'			=>	$category_row['name'],
    
    		'cat_url'			=>	categoryurl($file_row['category'], $category_row['name'], 1),
    
    		'favourite'			=>	$is_favourite,
    
    		'comment_error'		=>	$comment_error
    
    	);
    
    	
    
    	if ($settings['comments'] == '1') {
    
    		// Build navigation menu
    
    		$comments_number_query = mysql_query("SELECT count(fileid) FROM ". $tbl_prefix ."comments WHERE fileid = '". $file_id ."' && status = '1'");
    
    		$comments_number_row = mysql_fetch_assoc($comments_number_query);
    
    		$pages_count = ceil($comments_number_row['count(fileid)'] / $settings['max_comments']);
    
    		$navigation = NULL;
    
    		for ($pagen = 1; $pagen <= $pages_count; $pagen++) {
    
    			if ($pagen == 1) {
    
    				$navigation .= ' <b>'. $pagen .'</b>';
    
            	} else {
    
    				$navigation .= ' <a href="" onclick="display_comments('. $file_id .', '. $pagen .'); return false;">'. $pagen .'</a>';
    
    	    	} 
    
        	}
    
        	// Get comments
    
    		$comments_query = mysql_query("SELECT * FROM ". $tbl_prefix ."comments WHERE fileid = '". $file_id ."' && status = '1' ORDER BY commentid DESC LIMIT 0, ". $settings['max_comments']);
    
    		
    
    		while ($comments_row = mysql_fetch_assoc($comments_query)) {
    
    			if ($comments_row['userid'] == '0' || empty($comments_row['username'])) {
    
    				$poster_username = $lang['guest'];
    
    			} else {
    
    				$poster_username = '<a href="'. profileurl($comments_row['userid'], $comments_row['username']) .'">'. $comments_row['username'] .'</a>';
    
    			}
    
    			
    
    			$comments[] = array (
    
    				'comment'	=>	word_filter(bbcode(nl2br(nohtml($comments_row['comment'])))),
    
    				'date'		=>	mod_date($comments_row['dateadded']),
    
    				'user'		=>	$poster_username
    
    			);
    
    	
    
    		}
    
    	}
    
    	
    
    	if ($settings['related_files'] == '1') {
    
    		$related_query = mysql_query("SELECT fileid, title, description, icon, iconlocation, timesplayed FROM ". $tbl_prefix ."files WHERE category = '". $file_row['category'] ."' && status ='1' && fileid != '". $file_row['fileid'] ."' ORDER BY RAND() LIMIT ". $settings['max_related_files']);
    
    		while ($related_row = mysql_fetch_assoc($related_query)) {
    
    			if ($related_row['iconlocation'] == '1') {
    
    				$image_url = $settings['siteurl'] .'/files/image/'. $related_row['icon'];
    
    			} else {
    
    				$image_url = $related_row['icon'];
    
    			}
    
    			$related_files[] = array (
    
    				'title'			=>	$related_row['title'],
    
    				'url'			=>	fileurl($related_row['fileid'],$related_row['title'],1),
    
    				'description'	=>	$related_row['description'],
    
    				'image'			=>	$image_url
    
    			);	
    
    		
    
    		}
    
    	}
    
    	
    
    	$settings['sitedescription'] = $file['description'];
    
    	if (strlen($file_row['keywords'])) {
    
    		$settings['sitekeywords'] = $settings['sitekeywords'] .', '. $file_row['keywords'];
    
    	}
    
    	$page_title = $file['title'];
    
    
    
    	// Load template
    
    	template_file();
    
    }
    
    
    
    ?>
    bu
  • 30-08-2008, 15:34:52
    #7
    Verdiğin templatede 46 satırın bulunduğu yeri aşağıdaki gibi düzenle,

    Hangi script ise ön izlemesinden kaynak kodlarına bak oyunun bulunduğu html taglarını bularak kodları değiştirebilirdinde.

    <div class="box_text">
    <center>

    <div id="birinci" align="center" style="display:block;">
    Reklam Kodu
    </div>

    <div id="ikinci" align="center" style="display:none;">
    '. $file['play_file'] .'
    </div>
    </center>
    </div>
  • 30-08-2008, 17:31:41
    #8
    Üyeliği durduruldu
    <div class="box_text">
    <center>
    
    <div id="birinci" align="center" style="display:block;">
    Reklam Kodu
    </div>
    
    <div id="ikinci" align="center" style="display:none;">
    '. $file['play_file'] .'
    </div>
    </center>
    </div>

    bu kodu ekledim tamam oldu ama yukarsına

    <script type="text/javascript">
    <!--
    setTimeout('gizle()',8000);
    function gizle() {
    var x=document.getElementById('birinci').style;
    var y=document.getElementById('ikinci').style;
    if(x.display=='block') { x.display='none'; y.display='block'; }
    else { x.display='block'; y.display='none'; }
    }
    //-->
    </script>

    bunu ekleyince
    sayfa bembeyaz oluyo
  • 30-08-2008, 17:50:47
    #9
       <?php
    
    // Files: page where files are displayed
    function template_file() {
        global $settings, $lang, $file, $user, $comments, $related_files;
        // Include header
        template_header();
        echo '
      <table class="content">';
        template_header_ad();
        echo '
        <tr>
          <td width="20%" valign="top">';
        template_menu();
        echo '
          </td>
          <td width="80%" valign="top">
            <div class="content_box_2" id="favourite_message" style="'. ($file['favourite'] == TRUE ? 'display: block;' : 'display: none;') .'">
              <div class="box_text">
                <center>'. $lang['file_favourite'] .'</center>
              </div>
            </div>';
        if ($file['scores'] == '1' && $user['status'] != '1') {
            echo '
            <div class="content_box_2">
              <div class="box_text" style="text-align: center;">
                '. $lang['please_log_in_save_score'] .'
              </div>
            </div>';
        }
        if ($file['scores'] == '1') {
            echo '
            <div class="champion_box">
              '. $lang['is_champion_with_score'] .'<br />
              <a href="'. scoresurl($file['id']) .'">'. $lang['all_scores'] .'</a>
            </div>';
        }
        echo '
            <div class="content_box_2">
              <div class="content_box_2_header">
                <a href="'. $settings['siteurl'] .'/" class="contentheaderlink">'. $settings['sitename'] .'</a> > <a href="'. $file['cat_url'] .'" class="contentheaderlink">'. $file['cat_title'] .'</a> > '. $file['title'] .'
              </div>
                    <div class="box_text">
                    <center>
    
                    <div id="birinci" align="center" style="display:block;">
                    Reklam Kodu
                    </div>
    
                    <div id="ikinci" align="center" style="display:none;">
                    '. $file['play_file'] .'
                    </div>
                    </center>
                    </div>
            </div>';
        template_file_ad();
        echo '
            <div class="content_box_2">
              <div class="content_box_2_header">'. $lang['file_info'] . ($user['group'] == '2' ? ' [<a href="'. $settings['siteurl'] .'/admin/content.php?a=edit_file&f='. $file['id'] .'" class="contentheaderlink">'. $lang['edit_file'] .'</a>]' : '').'
              </div>
              <div class="box_text">
                <div style="float: left; width: 49.5%;">
                  <b>'. $lang['file_title'] .'</b> '. $file['title'] .'<br />
                  <b>'. $lang['file_description'] .'</b> '. $file['description'] .'<br />
                  <b>'. $lang['file_played'] .'</b> '. $file['played'] .'<br />
                  <b>'. $lang['file_added'] .'</b> '. $file['added'] .'<br />
                  '. ($settings['added_by'] == '1' && strlen($file['added_by']) ? '<b>'. $lang['file_added_by'] .'</b> '. $file['added_by'] : '') .'
                </div>
                <div style="float: right; width: 49.5%;">
                  <b>'. $lang['file_rating'] .'</b> <img src="'. $settings['siteurl'] .'/images/stars'. stars($file['rating']) .'.gif" border="0" width="67" height="15" alt="'. $file['rating'] .'" title="'. $file['rating'] .'" id="file_rating" />'. ($settings['rate'] == '2' && $user['status'] == '1' || $settings['rate'] == '1' ? ' <span id="rate_file">[<a href="javascript: rate_file_form(\''. $file['id'] .'\')"><b>'. $lang['file_rate'] .'</b></a>]</span>' : '') .'<br />';
        if ($user['status'] == '1' && $file['favourite'] == FALSE) {
            echo '
                  <div id="make_favourite">
                    <a href="javascript:make_favourite(\''. $file['id'] .'\', \'make\');">'. $lang['make_favourite'] .'</a><br />
                  </div>';
        } elseif ($user['status'] == '1' && $file['favourite'] == TRUE) {
            echo '
                  <div id="make_favourite">
                    <a href="javascript:make_favourite(\''. $file['id'] .'\', \'remove\');">'. $lang['remove_favourite'] .'</a><br />
                  </div>';
        }
        if ($settings['tellfriend'] == '1' || $settings['tellfriend'] == '2' && $user['status'] == '1') {
            echo '
                  <a href="" onclick="window.open(\''. $settings['siteurl'] .'/file.php?f='. $file['id'] .'&a=tellafriend\', \'\', \'width=220,height=275,menubar=0,resizable=1,scrollbars=1,status=0,titlebar=0,toolbar=0\'); return false;">'. $lang['tell_a_friend'] .'</a>';
        }
        if ($settings['report_broken'] == '1') {
            echo '
                  <div id="report_broken">
                    <a href="javascript:report_broken(\''. $file['id'] .'\', \''. $lang['what_wrong_file'] .'\');">'. $lang['report_broken_file'] .'</a>
                  </div>';
        }
        echo '
                </div>
                <div style="clear: both;"></div>
              </div>
            </div>';
        if ($settings['comments'] == '1') {
            echo '
            <div id="to_comments" class="content_box_2">
              <div class="content_box_2_header">
                '. $lang['comments'] . ($user['group'] == '2' ? ' [<a href="'. $settings['siteurl'] .'/admin/content.php?a=file_comments&f='. $file['id'] .'" class="contentheaderlink">'. $lang['edit_comments'] .'</a>]' : '') .'
              </div>
              <div class="box_text">
                <span id="file_comments">';
            template_display_comments();
            echo '
                </span>';
            if ($settings['comments_who'] == '1' || $settings['comments_who'] == '2' && $user['status'] == '1') {
                echo '
              '. $lang['leave_a_comment'] .'<br />
              <div style="color: red;" id="comment_error"></div>
              <div style="float: left; width: 50%;">
                <textarea name="message" rows="3" cols="50" id="comment_message"></textarea><br />
                <input type="submit" name="submit_comment" value="'. $lang['file_add_comment'] .'" onclick="submit_comment('. $file['id'] .')" />
              </div>
              <div style="float: right; width: 50%;">
                <a href="javascript:addsmilie(\' :) \')"><img src="'. $settings['siteurl'] .'/images/happy.gif" border="0" title="'. $lang['bb_happy'] .'" alt="'. $lang['bb_happy'] .'" /></a>
                <a href="javascript:addsmilie(\' :( \')"><img src="'. $settings['siteurl'] .'/images/sad.gif" border="0" title="'. $lang['bb_sad'] .'" alt="'. $lang['bb_sad'] .'" /></a>
                <a href="javascript:addsmilie(\' ;) \')"><img src="'. $settings['siteurl'] .'/images/wink.gif" border="0" title="'. $lang['bb_wink'] .'" alt="'. $lang['bb_wink'] .'" /></a><br />
                <a href="javascript:addsmilie(\' :@: \')"><img src="'. $settings['siteurl'] .'/images/@.gif" border="0" title="@" alt="@" /></a>&nbsp;
                <a href="javascript:addsmilie(\' :8 \')"><img src="'. $settings['siteurl'] .'/images/cool.gif" border="0" title="'. $lang['bb_cool'] .'" alt="'. $lang['bb_cool'] .'" /></a>
                <a href="javascript:addsmilie(\' :wave: \')"><img src="'. $settings['siteurl'] .'/images/wave.gif" border="0" title="'. $lang['bb_wave'] .'" alt="'. $lang['bb_wave'] .'" /></a><br />
                <a href="javascript:addsmilie(\' :think: \')"><img src="'. $settings['siteurl'] .'/images/think.gif" border="0" title="'. $lang['bb_hmm'] .'" alt="'. $lang['bb_hmm'] .'" /></a>
                <a href="javascript:addsmilie(\' :clap: \')"><img src="'. $settings['siteurl'] .'/images/clap.gif" border="0" title="'. $lang['bb_clap_hands'] .'" alt="'. $lang['bb_clap_hands'] .'" /></a>
              </div>
              <div style="clear: both;"></div>';
            } else {
                echo '
              <b>'. $lang['login_to_comment'] .'</b>';
            }
            echo '
              </div>
            </div>';
        }
        if ($settings['add_to_website'] == '1') {
            echo '
            <div class="content_box_2">
              <div class="content_box_2_header">
                '. $lang['add_to_your_website'] .'
              </div>
              <div class="box_text">
                <textarea name="add_game_to_your_website" rows="3" cols="50">'. $file['add_your_website'] .'</textarea>
              </div>
            </div>';
        }
        if ($settings['related_files'] == '1' && is_array($related_files)) {
            echo '
            <div class="content_box_2">
              <div class="content_box_2_header">
                '. $lang['related_files'] .'
              </div>
              <div class="box_text">';
            foreach ($related_files as $related) {
                echo '
                  <div class="related_files_left">
                    <a href="'. $related['url'] .'"><img src="'. $related['image'] .'" width="'. $settings['image_width'] .'" height="'. $settings['image_height'] .'" title="'. $related['title'] .'" alt="'. $related['title'] .'" border="0" /></a>
                  </div>
                  <div class="related_files_right">
                    <a href="'. $related['url'] .'">'. $related['title'] .'</a><br />
                    '. $related['description'] .'
                  </div>
                  <div style="clear: both;"></div>';
            }
            echo '
              </div>
            </div>';
        }
        echo '
          </td>
        </tr>';
        template_footer_ad();
        echo '
      </table>';
        // Include footer
        template_footer();
    }
    // Display Comments: this is how commments are displayed
    function template_display_comments() {
        global $comments, $navigation;
        if (is_array($comments)) {
            echo '
                <div class="comment_box" align="center">
                  '. $navigation .'
                </div>';
            foreach ($comments as $comment) {
                echo '
                <div class="comment_box">
                  <b>'. $comment['user'] .'</b> ('. $comment['date'] .'):<br />
                  '. $comment['comment'] .'
                </div>';
            }
            echo '
                <div class="comment_box" align="center">
                  '. $navigation .'
                </div>';
        }
    }
    // File In New Window: this is the pop-up window users see when they open file in new window
    function template_new_window() {
        global $file;
        // Include overall header
        template_overall_header();
        echo '
    <body>
    '. $file['play_file'] .'
    </body>
    </html>';
    }
    // Tell a Friend: this is where your members can tell their friends about your site
    function template_tellafriend() {
        global $settings, $lang, $file, $user;
        // Include overall header
        template_overall_header();
        echo '
    <body>
    <div class="popup_box">
    '. $lang['fill_out_this_form'] .' <b>'. $file['title'] .'</b>.<br />';
        if (strlen($file['error'])) {
            echo '<b>'. $file['error'] .'</b>';
        }
        echo '
    <br />
    <form action="'. $settings['siteurl'] .'/file.php?f='. $file['id'] .'&a=tellafriend" method="post">
      '. $lang['your_name'] .'<br />
      <input name="yourname" type="text" value="'. $user['username'] .'" size="30" maxlength="50" /><br />
      '. $lang['your_email_address'] .'<br />
      <input name="youremail" type="text" value="'. $user['email'] .'" size="30" maxlength="50" /><br />
      '. $lang['your_friends_email_address'] .'<br />
      <input name="friendemail" type="text" size="30" maxlength="50" /><br />
      '. $lang['image_verification'] .'<br />
      <img src="'. $settings['siteurl'] .'/includes/verification_image.php" width="100" height="30" border="0" /><br />
      <input type="input" name="verification_code" size="30" maxlength="4" /><br />
      <input name="submit" type="submit" value="'. $lang['submit'] .'" />
    </form>
    </div>
    </body>
    </html>';
    }
    // Tell a Friend2: this is where your members can tell their friends about your site
    function template_tellafriend2() {
        global $settings, $lang, $file, $user;
        // Include overall header
        template_overall_header();
        echo '
    <body>
    <div class="popup_box">
      '. $lang['file_sent_friend'] .'<br />
      <a href="javascript:window.close()">'. $lang['close'] .'</a>
    </div>
    </body>
    </html>';
    }
    // Frame: here we frame some cool games
    function template_frame() {
        global $settings, $lang, $file, $user;
        // Include overall header
        template_overall_header();
        echo '
    <body>
      <div>
        <div class="frame_text" style="float: left;">
            <b>'. $file['title'] .'</b><br />
            <b>'. $lang['file_description'] .'</b> '. $file['description'] .'<br />
            <b>'. $lang['file_played'] .'</b> '. $file['played'] .'<br />
            <a href="'. $file['file'] .'" class="frame_link">'. $lang['remove_frame'] .'</a><br />
            <a href="'. $settings['siteurl'] .'/" class="frame_link">'. $lang['back_to_website'] .' '. $settings['sitename'] .'</a>
        </div>
        <div class="frame_text" style="float: right;">
          <b>'. $lang['file_rating'] .'</b> <img src="'. $settings['siteurl'] .'/images/stars'. stars($file['rating']) .'.gif" border="0" width="67" height="15" alt="'. $file['rating'] .'" title="'. $file['rating'] .'" id="file_rating" />';
        if ($settings['rate'] == '2' && $user['status'] == '1' || $settings['rate'] == '1') {
            echo ' <span id="rate_file">[<a href="javascript: rate_file_form(\''. $file['id'] .'\')" class="frame_link"><b>'. $lang['file_rate'] .'</b></a>]</span>';
        }
        echo '<br />';
        if ($user['status'] == '1' && $file['favourite'] != TRUE) {
            echo '
                  <div id="make_favourite">
                    <a href="javascript:make_favourite(\''. $file['id'] .'\', \'make\');" class="frame_link">'. $lang['make_favourite'] .'</a><br />
                  </div>';
        } else {
            echo '
                  <div id="make_favourite">
                    <a href="javascript:make_favourite(\''. $file['id'] .'\', \'remove\');" class="frame_link">'. $lang['remove_favourite'] .'</a><br />
                  </div>';
        }
        if ($settings['tellfriend'] == '1' || $settings['tellfriend'] == '2' && $user['status'] == '1') {
            echo '
                  <a href="" onclick="window.open(\''. $settings['siteurl'] .'/file.php?f='. $file['id'] .'&a=tellafriend\', \'\', \'width=220,height=275,menubar=0,resizable=1,scrollbars=1,status=0,titlebar=0,toolbar=0\'); return false;" class="frame_link">'. $lang['tell_a_friend'] .'</a><br />';
        }
        if ($settings['report_broken'] == '1') {
            echo '
                  <div id="report_broken">
                    <a href="javascript:report_broken(\''. $file['id'] .'\', \''. $lang['what_wrong_file'] .'\');" class="frame_link">'. $lang['report_broken_file'] .'</a>
                  </div>';
        }
        echo '
        </div>
        <div style="clear: both;"></div>
      </div>
      <iframe src="'. $file['file'] .'" width="100%" height="730" frameborder="0" scrolling="auto"></iframe>
      <div class="footer_text">
        '. $lang['footer_copyright'] .'<br />
        Powered by <a href="http://www.onarcade.com" target="_blank" class="footer_link">onArcade</a>
      </div>
    </body>
    </html>';
    }
    // File Ad: this is the ad that is showed on files page
    function template_file_ad() {
        global $settings, $ads;
        // Display top ad
        if ($settings['file_ad'] == '1') {
            echo '
            <div class="ad_box_2">
              '. $ads['file'] .'
            </div>';
        }
    }
    ?>