Please help a Newbie out!

Hello,

I am not a PHP idiot, but very close to it. Until now I have been getting by…

Here is my problem. Have a look at the following page http://www.fast-speed-games.com/game/1241/Action-Sword.html. I am trying to switch the locations of the content box that says ‘ad’ near the top with the content box that has the ‘title’ and ‘description’ near the bottom of the page. I have tried it 20 times and the page comes out messed up. I’m pretty sure that it must be something relatively small, like a div tag or something but I am stumped. Here is the code…

[php]<?php
/**

  • onArcade 2.0.0
  • Copyright © 2006-2007 Hans Mдesalu & Eveterm OЬ, All Rights Reserved
  • Template: Dark
    **/

// Files: page where files are displayed
function template_file() {
global $settings, $lang, $file, $user, $comments,$page_title, $related_files;

template_header_file();

if ($file['scores'] == '1') {
	if ($user['status'] != '1') {
		echo '
  <div class="content_box">
    <center>'. $lang['please_log_in_save_score'] .'</center>
  </div>';
	}
	echo '
  <div id="champion_box">
    '. $lang['is_champion_with_score'] .'<br />
    <a href="'. scoresurl($file['id']) .'">'. $lang['all_scores'] .'</a>
  </div>';
}
if ($settings['sponsor'] == '1') {
	echo '
  <div id="sponsor">
    '. $lang['sponsor'] .': '. $file['sponsor'] .'
  </div>';
}

echo '
  <div class="content_box_header">
    <a href="'. $settings['siteurl'] .'/">Speed Games</a> > <a href="'. $file

[‘cat_url’] .’" >’. $file[‘cat_title’] .’ >
';

echo ’

   <div class="content_box">

ad





'; echo '
'. $page_title .'
'; echo '





'. $file['play_file'] .'




'; echo '




'; echo'


'. $lang['file_title'] .' '.

$file[‘title’] .’


‘. $lang[‘file_description’] .’ '. $file

[‘description’] .’

’;
if ($user[‘group’] == ‘2’) {
echo ’
‘. $lang[‘file_played’] .’ ‘. $file[‘played’] .’

‘. $lang[‘file_added’] .’ ‘. $file[‘added’] .’
’;
}
if ($user[‘status’] == ‘1’ && $file[‘favourite’] == FALSE) {
echo ’


<a href="javascript:make_favourite(’’. $file[‘id’] .’’,

‘make’);">’. $lang[‘make_favourite’] .’

‘;
} elseif ($user[‘status’] == ‘1’ && $file[‘favourite’] == TRUE) {
echo ’

<a href="javascript:make_favourite(’’. $file[‘id’] .’’,

‘remove’);">’. $lang[‘remove_favourite’] .’

‘;
}
echo’
'. ($settings[‘added_by’] == ‘1’ && strlen($file[‘added_by’]) ?

’. $lang[‘file_added_by’] .’ ‘. $file[‘added_by’] : ‘’) .’
';

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=250,height=275,menubar=0,resizable=1,scrollbars=1,status=0,titlebar=0,toolbar

=0’); return false;">’. $lang[‘tell_a_friend’] .’’;
}
if ($settings[‘report_broken’] == ‘1’) {
echo ’


<a href="javascript:report_broken(’’. $file[‘id’] .’’, ‘’. $lang

[‘what_wrong_file’] .’’);">’. $lang[‘report_broken_file’] .’


<input type="hidden" name="cx" value="partner-pub-5716692999916257:qz0g9kmenrl"

/>



';
template_file_ad();
if ($settings[‘comments’] == ‘1’) {
echo ’

‘.$page_title.’ - '. $lang[‘comments’] . ($user[‘group’] == ‘2’ ? ’ [<a

href="’. $settings[‘siteurl’] .’/admin/content.php?a=edit_file&f=’. $file[‘id’] .’"

class=“contentheaderlink”>’. $lang[‘edit_comments’] .’]’ : ‘’) .’




';
	if ($settings['comments_who'] == '1' || $settings['comments_who'] == 

‘2’ && $user[‘status’] == ‘1’) {
echo ’
‘. $lang[‘leave_a_comment’] .’



<textarea name=“message” rows=“3” cols=“40”

id=“comment_message”>

<input type=“submit” name=“submit_comment” value="’. $lang

[‘file_add_comment’] .’" onclick=“submit_comment(’. $file[‘id’] .’)” />



<img src="’. $settings

[‘siteurl’] .’/images/happy.gif" border=“0” title="’. $lang[‘bb_happy’] .’" alt="’.

$lang[‘bb_happy’] .’" />


<img src="’. $settings

[‘siteurl’] .’/images/sad.gif" border=“0” title="’. $lang[‘bb_sad’] .’" alt="’.

$lang[‘bb_sad’] .’" />


<img src="’. $settings

[‘siteurl’] .’/images/wink.gif" border=“0” title="’. $lang[‘bb_wink’] .’" alt="’.

$lang[‘bb_wink’] .’" />



<img src="’. $settings

[‘siteurl’] .’/images/@.gif" border=“0” title="@" alt="@" />

 
<img src="’. $settings

[‘siteurl’] .’/images/cool.gif" border=“0” title="’. $lang[‘bb_cool’] .’" alt="’.

$lang[‘bb_cool’] .’" />


<img src="’.

$settings[‘siteurl’] .’/images/wave.gif" border=“0” title="’. $lang[‘bb_wave’] .’"

alt="’. $lang[‘bb_wave’] .’" />



<img src="’.

$settings[‘siteurl’] .’/images/think.gif" border=“0” title="’. $lang[‘bb_hmm’] .’"

alt="’. $lang[‘bb_hmm’] .’" />


<img src="’.

$settings[‘siteurl’] .’/images/clap.gif" border=“0” title="’. $lang[‘bb_clap_hands’]

.’" alt="’. $lang[‘bb_clap_hands’] .’" />



‘;
} else {
echo ’
‘. $lang[‘login_to_comment’] .’’;
}
echo ’
';
}
if ($settings[‘related_files’] == ‘1’ && is_array($related_files)) {
echo ’
  <div class="content_box11">';
 $b = 0;
    foreach ($related_files as $related) {

$b = $b + 1;
echo ’

       <a href="'. $related['url'] .'"><img class="sliki_border" src="'. 

$related[‘image’] .’" width=“110” height=“91” " border=“0” />


';
if ($b == 8) {
$b = 0;
echo ’
';
}
}
}
if ($settings[‘add_to_website’] == ‘1’) {
echo ’

‘. $lang[‘add_to_your_website’] .’


'. $file

[‘add_your_website’] .’

';
}
template_footer_file();

}

// Display Comments: this is how commments are displayed
function template_display_comments() {
global $comments, $navigation;

if (is_array($comments)) {
	echo '
      <div class="pagination">
		'. $navigation .'
      </div>';
	foreach ($comments as $comment) {
		echo '
      <div class="comment_box">
		<b>'. $comment['user'] .'</b> ('. $comment['date'] .'):<br />
		'. $comment['comment'] .'
      </div>';
	}
	echo '
      <div class="pagination">
		'. $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;

template_overall_header();
echo '
'. $file['play_file'] .' ';

}

// Tell a Friend: this is where your members can tell their friends about your site
function template_tellafriend() {
global $settings, $lang, $file, $user;

template_overall_header();
echo '
'. $lang['fill_out_this_form'] .' '. $file['title'] .'.
'; if (strlen($file['error'])) { echo ''. $file['error'] .''; } echo '
<form action="'. $settings['siteurl'] .'/file.php?f='. $file['id'] .'&a=tellafriend"

method=“post”>
‘. $lang[‘your_name’] .’

<input name=“yourname” type=“text” value="’. $user[‘username’] .’" size=“30”

maxlength=“50” />

‘. $lang[‘your_email_address’] .’

<input name=“youremail” type=“text” value="’. $user[‘email’] .’" size=“30”

maxlength=“50” />

‘. $lang[‘your_friends_email_address’] .’



‘. $lang[‘image_verification’] .’

<img src="’. $settings[‘siteurl’] .’/includes/verification_image.php" width=“100”

height=“30” border=“0” />



';

}

// Tell a Friend2: this is where your members can tell their friends about your site
function template_tellafriend2() {
global $settings, $lang, $file, $user;

template_overall_header();
echo '
'. $lang['file_sent_friend'] .'
'. $lang['close'] .'
';

}

// Frame: here we frame some cool games
function template_frame() {
global $settings, $lang, $file, $user;

template_overall_header();
echo '
<div class="frame_text" text-align: center;">
<div id="header">
    </div>
	<div id="categories_bar">
 <ul id="categories_menu">
<li><a href="http://www.gunshootinggames.net">Home   </a>|</li>';
     foreach (menu_categories() as $category) {
	echo '
    <li>'. ($category['break'] == TRUE ? '  |  ' : '') .'<a href="'. 

$category[‘url’] .’">’. $category[‘title’] .’’;
}
echo ’


'. $lang['remove_frame'] .'<br

/>

‘. $lang[‘back_to_website’] .’

Shooting Games - Gun Shooting Games Online
';

echo '
</div>
<div style="clear: both;"></div>
<iframe src="'. $file['file'] .'" width="100%" height="730" frameborder="0"

scrolling=“auto”>

'. $lang['footer_copyright'] .'
Powered by onArcade
';

}

// File Ad: this is the ad that is showed on files page
function template_file_ad() {
global $settings, $ads;

// Display file ad
if ($settings['file_ad'] == '1') {
	echo '
  <div class="ad_box">
    '. $ads['file'] .'
  </div>';
}

}

?>[/php]

Thanks in advance for anyone who is willing to help!

Guessing…

[php]

<?php /** * onArcade 2.0.0 * Copyright © 2006-2007 Hans M?esalu & Eveterm O?, All Rights Reserved * * Template: Dark **/ // Files: page where files are displayed function template_file() { global $settings, $lang, $file, $user, $comments,$page_title, $related_files; template_header_file(); if ($file['scores'] == '1') { if ($user['status'] != '1') { echo '
'. $lang['please_log_in_save_score'] .'
'; } echo '
'. $lang['is_champion_with_score'] .'
'. $lang['all_scores'] .'
'; } if ($settings['sponsor'] == '1') { echo '
'. $lang['sponsor'] .': '. $file['sponsor'] .'
'; } echo '
Speed Games > '. $file['cat_title'] .' >
'; echo'


'. $lang['file_title'] .' '. $file['title'] .'

'. $lang['file_description'] .' '. $file ['description'] .'

'; if ($user['group'] == '2') { echo ' '. $lang['file_played'] .' '. $file['played'] .'
'. $lang['file_added'] .' '. $file['added'] .'
'; } if ($user['status'] == '1' && $file['favourite'] == FALSE) { echo '
'. $lang['make_favourite'] .'
'; } elseif ($user['status'] == '1' && $file['favourite'] == TRUE) { echo '
'. $lang['remove_favourite'] .'
'; } echo' '. ($settings['added_by'] == '1' && strlen($file['added_by']) ? ''. $lang['file_added_by'] .' '. $file['added_by'] : '') .' '; if ($settings['tellfriend'] == '1' || $settings['tellfriend'] == '2' && $user['status'] == '1') { echo ' '. $lang['tell_a_friend'] .''; } if ($settings['report_broken'] == '1') { echo '
'. $lang['report_broken_file'] .'


'; } echo '
'; template_file_ad(); if ($settings['comments'] == '1') { echo '
'.$page_title.' - '. $lang['comments'] . ($user['group'] == '2' ? ' ['. $lang['edit_comments'] .']' : '') .'
'; if ($settings['comments_who'] == '1' || $settings['comments_who'] == '2' && $user['status'] == '1') { echo ' '. $lang['leave_a_comment'] .'

'. 

$lang['bb_happy'] .' '. 

$lang['bb_sad'] .' '. 

$lang['bb_wink'] .'
@  '. 

$lang['bb_cool'] .' '. $lang['bb_wave'] .'
'. $lang['bb_hmm'] .' '. $lang['bb_clap_hands'] .'
'; } else { echo ' '. $lang['login_to_comment'] .''; } echo '
'; } if ($settings['related_files'] == '1' && is_array($related_files)) { echo '
'; $b = 0; foreach ($related_files as $related) { $b = $b + 1; echo '
'; if ($b == 8) { $b = 0; echo '
'; } } } if ($settings['add_to_website'] == '1') { echo '
'. $lang['add_to_your_website'] .'
'. $file ['add_your_website'] .'
'; } echo '
ad



'; echo '
'. $page_title .'
'; echo '





'. $file['play_file'] .'




'; echo '




'; template_footer_file(); } // Display Comments: this is how commments are displayed function template_display_comments() { global $comments, $navigation; if (is_array($comments)) { echo '
'. $navigation .'
'; foreach ($comments as $comment) { echo '
'. $comment['user'] .' ('. $comment['date'] .'):
'. $comment['comment'] .'
'; } echo '
'. $navigation .'
'; } } // 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; template_overall_header(); echo ' '. $file['play_file'] .' '; } // Tell a Friend: this is where your members can tell their friends about your site function template_tellafriend() { global $settings, $lang, $file, $user; template_overall_header(); echo '
'. $lang['fill_out_this_form'] .' '. $file['title'] .'.
'; if (strlen($file['error'])) { echo ''. $file['error'] .''; } echo '
'. $lang['your_name'] .'

'. $lang['your_email_address'] .'

'. $lang['your_friends_email_address'] .'

'. $lang['image_verification'] .'


'; } // Tell a Friend2: this is where your members can tell their friends about your site function template_tellafriend2() { global $settings, $lang, $file, $user; template_overall_header(); echo '
'. $lang['file_sent_friend'] .'
'. $lang['close'] .'
'; } // Frame: here we frame some cool games function template_frame() { global $settings, $lang, $file, $user; template_overall_header(); echo '

'. $lang['remove_frame'] .'

'. $lang['back_to_website'] .' Shooting Games - Gun Shooting Games Online
'; echo '
'. $lang['footer_copyright'] .'
Powered by onArcade
'; } // File Ad: this is the ad that is showed on files page function template_file_ad() { global $settings, $ads; // Display file ad if ($settings['file_ad'] == '1') { echo '
'. $ads['file'] .'
'; } } ?>[/php]
Sponsor our Newsletter | Privacy Policy | Terms of Service