please tell me what is the meaning of this code , i have tried it on my website but it usually says you are not allowed to access directly to it
this is the code
please help me :

<?php
defined( '_VALID_MOS' ) or die( 'Direct Access to this location is not allowed.' );
// needed to seperate the ISO number from the language file constant _ISO
$iso = explode( '=', _ISO );

 ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<style type="text/css"> .button, .module_s1, .module_s1 div, .module_s1 td {behavior: url(<?php echo $mosConfig_live_site;?>/templates/theme001/css/iepngfix.htc);}
</style>
<?php mosShowHead(); ?>
<?php
if ( $my->id ) {
	initEditor();
}
?>
<meta http-equiv="Content-Type" content="text/html; <?php echo _ISO; ?>" />
<link href="<?php echo $mosConfig_live_site;?>/templates/theme001/css/template_css.css" rel="stylesheet" type="text/css"/>
</head>

<body>

<div class="main">
    <div id="header">
        <div class="column_1 column"><a href="index.php"><img src="<?php echo $mosConfig_live_site;?>/templates/theme001/images/logo.jpg" alt="" /></a></div>
        <div class="column_2 column">
            <div class="form">
                <div><div>
					 	<table>
							<tr>
								<td>
									search:&nbsp;
								</td>
								<td>
									<?php mosLoadModules('user4',-1); ?>
								</td>
								<td>
									<a href="index.php">Home</a><a href="index.php?option=com_weblinks&Itemid=29">Links</a><a href=" 	 index.php?option=com_contact&task=view&contact_id=1&Itemid=30">Contact Us</a>
								</td>
							</tr>
						</table>
                </div></div>
            </div>
            <div class="banner">
            	<?php
					if (mosCountModules('banner') >= 1) {
					mosLoadModules('banner');	}
				?>
            </div>
        </div>
        <div class="clear"></div>
     </div>
     <div class="moduletable_tm_top_menu">
     		<?php mosLoadModules('top',-1); ?>
        <div class="clear"></div>
     </div>
     <div id="pathway_text">
		<?php mosPathWay(); ?>
     </div>
     <div>
		<table id="content">
        	<tr>
				<td class="column_1">
					<?php mosLoadModules('left',-3); ?>
				 </td>
				 <td class="column_2">
					<div class="content_bottom_center">
						<div class="content_bottom_left">
							<div class="content_bottom_right">
								<div class="content_top_center">
									<div class="content_top_left">
										<div class="content_top_right">
											<?php mosMainBody(); ?>
										</div>
									</div>
								</div>
							</div>
						</div>
					</div>
				 </td>
				 <td class="column_3">
					<?php mosLoadModules('right',-3); ?>
				 </td>
            </tr>
        </table>
     </div>
     <div id="footer">
     	<?php include_once( $GLOBALS['mosConfig_absolute_path'] . '/includes/footer.php' ); ?>
     </div>
</div>


<?php mosLoadModules('debug', -1);?>
</body>
</html>

Recommended Answers

All 6 Replies

Member Avatar for diafol

What is it all about? You posted it. You know where it came from and the site should have some information on it.

Member Avatar for Zagga

So you found some code, you have no idea what it does, but you put it on your website anyway?

A very simple Google search takes you to the Joomla site.

Or were you expecting someone to explain the code line by line?

This code is about 97 lines

guys . you really helped me with your answers . useless answers. i want to what it can do and that is all what i want

Are you stupid or just rude?

You have already been told what it is. Its part of the joomla cms.

http://www.joomla.org/

Read the comments I have added.

<?php
/*
 * This checks to see if the constant "_VALID_MOS" has been set. *
 * If this constant has not been set the script exits with       *
 * 'Direct Access to this location is not allowed' and will not  *
 * execute past this point.                                      *
*/
defined( '_VALID_MOS' ) or die( 'Direct Access to this location is not allowed.' );
// needed to seperate the ISO number from the language file constant _ISO
/*
  The below function explodes the $iso array into a string           
  variablible. Each value is seperated by "="
*/
$iso = explode( '=', _ISO );

 ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<style type="text/css"> .button, .module_s1, .module_s1 div, .module_s1 td {behavior: url(<?php echo $mosConfig_live_site;?>/templates/theme001/css/iepngfix.htc);}
</style>

<?php 
/* This is a call to the function mosShowHead(), most probally inserts the head
infomation into the page */
mosShowHead(); ?>
<?php
/* The below checks the class assigned to $my for a variable id. If this returns true
   the function initEditor() is run, most probally elevating your privs
*/
if ( $my->id ) {
	initEditor();
}
?>
<meta http-equiv="Content-Type" content="text/html; <?php echo _ISO; ?>" />
<link href="<?php echo $mosConfig_live_site;?>/templates/theme001/css/template_css.css" rel="stylesheet" type="text/css"/>
</head>

<body>

<div class="main">
    <div id="header">
        <div class="column_1 column"><a href="index.php"><img src="<?php echo $mosConfig_live_site;?>/templates/theme001/images/logo.jpg" alt="" /></a></div>
        <div class="column_2 column">
            <div class="form">
                <div><div>
					 	<table>
							<tr>
								<td>
									search:&nbsp;
								</td>
								<td>
									<?php mosLoadModules('user4',-1); 
/* The above calls mosLoadModules passing the string user4 and the int -1 */
?>
								</td>
								<td>
									<a href="index.php">Home</a><a href="index.php?option=com_weblinks&Itemid=29">Links</a><a href=" 	 index.php?option=com_contact&task=view&contact_id=1&Itemid=30">Contact Us</a>
								</td>
							</tr>
						</table>
                </div></div>
            </div>
            <div class="banner">
            	<?php
/* This passes mosCountModules function banner, if it returns more than or equal to 1 mosLoadModules is passed the sting banner */
					if (mosCountModules('banner') >= 1) {
					mosLoadModules('banner');	}
				?>
            </div>
        </div>
        <div class="clear"></div>
     </div>
     <div class="moduletable_tm_top_menu">
     		<?php mosLoadModules('top',-1); ?>
        <div class="clear"></div>
     </div>
     <div id="pathway_text">
		<?php mosPathWay(); ?>
     </div>
     <div>
		<table id="content">
        	<tr>
				<td class="column_1">
					<?php mosLoadModules('left',-3); ?>
				 </td>
				 <td class="column_2">
					<div class="content_bottom_center">
						<div class="content_bottom_left">
							<div class="content_bottom_right">
								<div class="content_top_center">
									<div class="content_top_left">
										<div class="content_top_right">
											<?php mosMainBody(); ?>
										</div>
									</div>
								</div>
							</div>
						</div>
					</div>
				 </td>
				 <td class="column_3">
					<?php mosLoadModules('right',-3); ?>
				 </td>
            </tr>
        </table>
     </div>
     <div id="footer">
     	<?php include_once( $GLOBALS['mosConfig_absolute_path'] . '/includes/footer.php' ); ?>
     </div>
</div>


<?php mosLoadModules('debug', -1);?>
</body>
</html>

You should be able to work the rest out from the comments I have added. I think you should also apoligise to the others after being so rude to them, they are trying to help you and your at fault for badly wording your question.

Member Avatar for diafol

guys . you really helped me with your answers . useless answers. i want to what it can do and that is all what i want

You want to know what it does? Have you tried it? Do you have the vaguest idea what it should be used for? Sounds to me like you've got hold of some random piece of code and thinking it looks impressive, posted here. So here's another useless answer for you. You'll keep getting them because of your idiotic initial question. Move on, life's too short - I can't imagine anybody here is going to have any patience with this.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.