Jump to content

Recommended Posts

Templates are not showing on the index.php, I get the following

 

templatedir/header.php"); ?>

Hello and welcome to MyMarket! This is the homepage, web masters, use this area:

 

    * Provide a basic map of the site

    * Advertise your on-sale items

    * Welcome customers to your site

    * Do useful things

 

To begin shopping, go to the shopping page or buy the on-special items to your right. Your shopping cart is always visible on the left side of your screen. Click it to edit the contents of your basket or to check out.

templatedir/footer.php"); ?>

 

Here is the code for the index.php

 


<?
/* index.php (c) 2000 Ying Zhang (ying@zippydesign.com)
*
* TERMS OF USAGE:
* This file was written and developed by Ying Zhang (ying@zippydesign.com)
* for educational and demonstration purposes only.  You are hereby granted the 
* rights to use, modify, and redistribute this file as you like.  The only
* requirement is that you must retain this notice, without modifications, at
* the top of your source code.  No warranties or guarantees are expressed or
* implied. DO NOT use this code in a production environment without
* understanding the limitations and weaknesses pretaining to or caused by the
* use of these scripts, directly or indirectly. USE AT YOUR OWN RISK!
*/

/******************************************************************************
* MAIN
*****************************************************************************/
include("application.php");

$DOC_TITLE = "MyMarket Home";
include("$CFG->templatedir/header.php");
?>

<table width=100%>
<tr valign="top">
	<td class=normal>
		Hello and welcome to MyMarket!  This is the homepage, web masters,
		use this area:
		<ul class=normal>
			<li>Provide a basic map of the site</li>
			<li>Advertise your on-sale items</li>
			<li>Welcome customers to your site</li>
			<li>Do useful things</li>
		</ul>

		<p>To begin shopping, <a href="shopping/">go to the shopping page</a>
		or buy the on-special items to your right.  Your shopping cart is
		always visible on the left side of your screen.  Click it to edit
		the contents of your basket or to check out.
	</td>
</tr>
</table>

<?
include("$CFG->templatedir/footer.php");
?>


 

Here is the code for the application.php which contains the settings of the location of the templates etc

 


<?
/* $RCSfile: application.php,v $ (c) 2000 Ying Zhang (ying@zippydesign.com)
*
* $Revision: 1.7 $
* $Date: 2002/09/23 17:31:17 $
* $Author: yingz $
*
* TERMS OF USAGE:
* This file was written and developed by Ying Zhang (ying@zippydesign.com)
* for educational and demonstration purposes only.  You are hereby granted the
* rights to use, modify, and redistribute this file as you like.  The only
* requirement is that you must retain this notice, without modifications, at
* the top of your source code.  No warranties or guarantees are expressed or
* implied. DO NOT use this code in a production environment without
* understanding the limitations and weaknesses pretaining to or caused by the
* use of these scripts, directly or indirectly. USE AT YOUR OWN RISK!
*/

/* turn on verbose error reporting (15) to see all warnings and errors */
error_reporting(15);

/* define a generic object */
class object {};

$CFG = new object;

/* database configuration */
$CFG->dbhost = "localhost";
$CFG->dbname = "mymarket";
$CFG->dbuser = "myuser";
$CFG->dbpass = "mypassword";

/* directory configuration, if all your mymarket files are in one directory
* you probably only need to set the wwwroot variable.  valid examples are:
*
* $CFG->wwwroot = "http://myserver.com/mymarket";
* $CFG->wwwroot = "http://localhost/mymarket";
*
* do not include the trailing slash. dirroot is the physical path on your
* server where mymarket can find it's files. for more security, it is
* recommended that you move the libraries and templates ($CFG->libdir
* and $CFG->templatedir) outside of your web directories.
*/
$CFG->wwwroot     = "http://localhost/mymarket";
$CFG->dirroot     = “C:/wamp/www/mymarket”;
$CFG->templatedir = "$CFG->dirroot/templates";
$CFG->libdir      = "$CFG->dirroot/lib";
$CFG->imagedir    = "$CFG->wwwroot/images";
$CFG->icondir     = "$CFG->imagedir/icons";
$CFG->bannerdir   = "$CFG->imagedir/banners";
$CFG->support     = "support@mymarket.org";
$CFG->version     = "1.71";
$CFG->sessionname = "mymarket";

/* extended configuration */
$CFG->showsponsor   = true;		// enabled banner advertising
$CFG->currency      = "$";
$CFG->currencyfirst = true;	// show the currency symbol before the price tag

/* define database error handling behavior, since we are in development stages
* we will turn on all the debugging messages to help us troubleshoot */
$DB_DEBUG = true;
$DB_DIE_ON_FAIL = true;

/* load up standard libraries */
require("$CFG->libdir/stdlib.php");
require("$CFG->libdir/dblib.php");
require("$CFG->libdir/mymarket.php");
require("$CFG->libdir/cart.php");

/* setup some global variables */
$ME = qualified_me();

/* start up the sessions, to keep things simple we just have two
* variables, USER containing user information and CART containing
* the user's shopping cart. */
ini_set("session.name", $CFG->sessionname);
session_start();
session_register("USER");
session_register("CART");

/* initialize the USER object if necessary */
if (! isset($_SESSION["USER"])) {
$_SESSION["USER"] = array();
}

/* initialize the CART object if necessary */
if (! isset($_SESSION["CART"])) {
$_SESSION["CART"] = new Cart;
}

$USER = &$_SESSION["USER"];
$CART = &$_SESSION["CART"];

/* connect to the database */
db_connect($CFG->dbhost, $CFG->dbname, $CFG->dbuser, $CFG->dbpass);
?>



Link to comment
https://forums.phpfreaks.com/topic/155182-cant-get-templates-to-show/
Share on other sites

You already have an existing thread for this same problem - http://www.phpfreaks.com/forums/index.php/topic,249020.0.html

 

Answering the troubleshooting questions that were asked in that thread might lead to a solution.

 

Does your server even have php installed?

We only see the information you provide in your post. If someone gives you a list of things to check and asks for specific information about what your are doing or what you see in front of you and you don't bother to check or provide answers to those questions, you cannot get a solution.

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.