Location: PHPKode > projects > Webgolin > webgolin/index.php
<?
/*************************************************************
*                         Index file                         *
*                 Copyright Softlech Corporation             *
*                  Created by: Fernando Martinez             *
*                        25/12/05                            *
**************************************************************/
/**
 *  This file is a web application template.
 *  You can modify the layout and content but there are certain
 *  things that you must keep to be able to take advantage of the 
 *  framework. We have added comments to indicate what is 
 *  required and what is optional. 
 */
 		   // start session. required
		   session_start();
		   // store the entry point to the app for later use. Required
		   $path = realpath(".");
		   // include the application constants. Required
		   include_once('core/config/cvglobals.inc.php');
		   // include 2 optional simple classes related to the request and response. 
		   include_once('core/utils/Request.php');
		   include_once('core/utils/Response.php');
		   // stamp that the user entered the app through the correct entry point.
		   // Required only if you want to force users to access your files through a main entry point.	
		   $stamp = "ok";
		   // include the action handler and forwarder. Required			   	
		   include_once('core/Navigator.php');
		   // The next 6 lines are related to language. Required only if you
		   // want to provide app translation.	
		   $lang = $_SESSION['lang_tbl'];
		   if(!isset($lang))
		   {
		   	  $_SESSION['lang_tbl']=CV_DEFAULT_LANG;
		   }	   
		   include_once('core/config/'.$lang.'_globals.inc.php');
		   // if you are not including the 2 optional files above,
		   // then you also don't need these 2 lines.	 
		   $request  = unserialize($_SESSION['request']);
		   $response = unserialize($_SESSION['response']);
		   
?>
<html>
  <head>
        <meta http-equiv="Content-Type" content="text/html;">
        <? // if you are not using the response class, then replace calls to 
           // response->Write() with echo.
           // siteTitle is a global where you can specify a title for your web page.	
        ?>
		<title><?$response->Write($siteTitle)?></title>
		<? // the next 3 lines are required only if you want to provide
		   // skins for your app.	 
		?>
		<style type="text/css">
		@import "css/<? echo $skincss ?>";
		</style>

		<META name="keywords" content="framework,php,web,web applications,applications,software, web sites">
		<META name="description" content="Webgolin: An Open Source PHP Development Framework.">
<?
		
	       include("header.inc");
	   ?>	
	   
  </head>
	<body>
	
		<table border="0" width="100%" height="647" cellspacing="0" cellpadding="0" bordercolor="#FFFFFF">
			<tr>
				<td height="42" colspan="1" width="98">
                  <p align="center"><blink><font face="Jester"><a href="index.php?action=app&item=home"><img border="0" title="Learn, be Free!!" src="<?$response->Write("media/".$siteLogo)?>" alt="Welcome to Mr. Tutor!!">
                  </a>
                  </font></blink>
                </td>
                <td height="42" width="40"></td>
				<td colspan="2" hspace="10" valign="center" height="42">
              </td>
				
			</tr>
			<tr>
				<td height="40" align="left" width="98"><b>&nbsp;<? echo(CV_CONTENTS);?>&nbsp;&nbsp;</b></td>
				<td height="40" bordercolor="#FF0000" width="40">
				</td>
				<td colspan="2" align="top" valign="top" height="40" bordercolor="#000080" >

				<?
				// keep this line if you want to use the top menu
				include_once($mainmenu);
				?>
				</td>
			</tr>
			<tr>
				<td  valign="top" width="98">
				 <? // keep this line if you want the menu on the left.
				    // of course you can always change the layout y modifying
				    // this html table.  
				    ?>
                  <? include($menu1); ?>
					
				</td>
				<td rowspan="2" valign="top"  bordercolor="#FF0000" width="40"><img border="0" src="<?$response->Write("media/lside.gif")?>">
                  <p>&nbsp;</p>
				</td> 
				<td width="100%" rowspan="1" valign="top"   align="left" style="text-align: Justify">
				<table width="100%" cellpadding="7">
				<tr><td valign="top"   align="left" style="text-align: Justify">
				    
                    <font face="Verdana">
                    <?
                    // the next 5 lines provide feedback created in the backend
                    // as a result of certain actions.
                    if(isset($_SESSION['feedback']))
                    {
                    	echo($_SESSION['feedback']);
                    	unset($_SESSION['feedback']);
                    }
                    // these lines are required to include the content that needs
                    // to be displayed as a result of an action.
                    // There are two types of views: include and echo. The type is 
                    // set with the value of the global variable viewMethod. Usually
                    // the navigator will set this value.
                    // The actual content of the view comes in the variable includePage.
                    // As their names suggests, an echo view is one that must be echoed,
                    // whereas an include view is one that represents a file name and so,
                    // must be included.
                    // Normally all the app and adm actions will create echo views. 
                    if(strpos($viewMethod,"echo")!==false)
                    {
                    	echo($includePage);
                    	$viewMethod="include";
                    }else
                    {  // an include view can be language independent or not
                       // see the files under config/ and the handlers.php for
                       // more information.
                    	if(strpos($includePage,"CV_")!==false)
                    	{
                    		include($$includePage);
                    	}else
                    	include($includePage); 
                    }?>
</td></tr></table>
                  </td>
             <td rowspan="1" valign="top"  bordercolor="#FF0000" width="104">
             <? // keep this if you required the right hand side menu.
             ?>
                 <? include($menu2); ?>
				</td>     
			</tr>
			<tr>
				<td height="25" valign="top" width="98">

                    &nbsp;&nbsp; 
                    <p>&nbsp;
                    </p>
					<p>&nbsp; </p>
				</td>
				<td height="25">
				
				</td>
				<td height="25" width="104">
				
				</td>
				<td height="25" width="1">
				</td>
			</tr>
			
		</table>
<? // keep this include if you want to specify a common bottom for all your views.
?>		
<? include("bottom.inc"); ?>
	</body>
</html>
Return current item: Webgolin