Escolar Documentos
Profissional Documentos
Cultura Documentos
css"
#left { position:absolute;
top:20px;
left:0px;
width:130px;
background:gold;
color:purple;
border:2px solid purple;
}
#mainbody { margin-left:150px;
background:purple;
border:2px solid gold;
}
<p>
This left content could be general info that shows on all pages. Or perhaps a menu box - with
either buttons or text links. Use your imagination :) Example Link : <a
href="http://www.maketemplate.com/">
MakeTemplate</a>
</p>
<p align="center">
<img src=http://www.maketemplate.com/images/maketop.jpg>
</p>
<h1 align=center>
Test Heading</h1>
<p>
Just an example of using HTML tags in the input to insert an image. You can put links, images,
etc in this section <p>
<p>
blank space </p>
<p>
blank </p>
<html>
<head>
<title>
Bookmark Title Here </title>
<link rel="stylesheet" type="text/css" href="style.css">
</head>
<body>
<div id="left">
<?php include ("left.html") ?>
</div>
<div id="mainbody">
<?php include ("mainbody.html") ?>
</div>
</body>
</html>
VIP: This last file (index.php) is the main body of the php template. Please note that it 'loads' all
the other 'pieces' into the web page.
By setting up all pages using the code in the index.php file, you control all pages by changing 2
files (left.html and mainbody.html). Then for a new / individual page you change the 'mainbody'
file to mainbody2 (or similar)
.header { height:70px;
background:antiquewhite;
border:1px solid brown;
}
#mainbody { margin-left:120px;
padding-top:5px;
padding-right:20px;
padding-bottom:5px;
padding-left:20px;
background:antiquewhite;
border:0px solid brown;
}
#menu { position:absolute;
top:70px;
left:0px;
width:120px;
background:antiquewhite;
color:brown;
border:1px solid brown;
text-align: center;
}
.menuitem { width:100px;
background:ivory;
color:brown;
font-size:10px;
border:3px solid cornsilk ;
text-align: center;
}
.footer { width:100%;
text-align:center;
margin-top:5px;
padding:1px;
background:ivory;
color:brown;
border:1px solid red;
}
a:hover { font-size:14px;
background-color:yellow;
color:brown}
h1 { font-size:30px}
h2 { font-size:24px}
h3 { font-size:20px}
<p align="center">
<a href="/index.php">
<img src="http://www.maketemplate.com/images/banner.gif" border="0" alt="pic" />
</a>
</p>
<!-- Note: Everything in this page can be replaced with the text that you want on the main page
i.e. this is the 'homebody.html' page that is included in the template - so this will be the main
page text for the right side -->
<h3 align="center">
Secret Hint:<br />
If PHP Includes Not Required<br />
Use the style sheet code <br />
Use view source (save as :) </h3>
<h2 align="center">
CSS Template<br/>
2 Column <br/>
With Header n Footer</h2>
template space holder to keep template layout to keep template layout more template layout
space blah more template layout space
<p>
<b>
Footer</b>
This is just a test using plain text in the footer. Of course, the same options - such as image
banner and/or CSS generated banner could have been used here - Same as in heading. Refer to
CSS style sheet to see how the header, footer, heading class are used to control these two files.
</p>
VIP: This last file (index.php) is the main body of the php template. Please note that it 'loads' all
the other 'pieces' into the web page i.e. the external style sheet and the php include files are the
'pieces'.
By setting up all pages using the code in the index.php file, you control all pages by changing 3
files (header, menu, footer). Then for individual pages you change the 'body' file (such as
homebody, secondpagebody, etc). You also control the look n feel on all pages just by changing
the external style sheet (style.css) file
P.S. Of course, you must have a host (such as IBDhost) that allows php to take advantage of the
'power' of the includes. However, if you just need the template code without using php / includes,
just use view source and copy all the code.
#header { width:100%;
background:blue;
margin:0px;
padding:0px;
}
#leftbar { float:left;
width:40%;
height:30px;
background:blue;
text-align:right;
}
#rightbar { float:left;
width:60%;
height:30px;
background:aqua;
text-align:center;
}
#bar { width:100%;
background:blue;
}
a { font-family:Arial;
font-size:16px;
background-color:aqua;
color:darkblue;
font-weight:bold;
vertical-align:text-bottom;
}
<div id="header">
<div id="leftbar">
<img src="http://maketemplate.com/header/aquat.gif" border="0" width=55 height=30 />
</div>
<div id="rightbar">
<a href="">
Optional Link</a>
<a href="">
Optional Link</a>
</div>
</div>
<div id="bar">
<img src="logo.gif" width="100" height="50" border="0" align="left" />
<img src="eagle.gif" width="240" height="91" border="0" align="left" />
<img src="river.jpg" width="300" height="91" border="0" align="right" />
</div>
<div id="header">
<div id="leftbar">
<img src="aqua.gif" border="0" width=55 height=30 />
</div>
<div id="rightbar">
<a href="">
<img src="back.gif" border="0" width=128 height=23 />
</a>
<a href="">
<img src="back.gif" border="0" width=128 height=23 />
</a>
</div>
</div>
<html>
<head>
<title>
Favorites Title Here </title>
<link rel="stylesheet" type="text/css" href="headstyle.css">
</head>
<body>
<?php include ("header.html") ?>
</body>
</html>
VIP: This last file (test.php) is a temporary php include setup which uses the css (headstyle.css)
file and the 'include' (header.html) file for the body. In 'real life' the include file (header.html)
would be a copy n paste operation - for the 'body' of your existing page. The external style sheet
(headstyle.css) would be added to the head section, with code like this:
Of course, additional style elements would be recommended for a full external style sheet.
Examples of other style sheets are shown on this website and/or some of the 'more tutorial' sites
shown in the menu.
<style type="text/css">
<!--
body {
scrollbar-face-color:fuchsia;
scrollbar-highlight-color:yellow;
scrollbar-3dlight-color:orange;
scrollbar-darkshadow-color:darkblue;
scrollbar-shadow-color:gray;
scrollbar-arrow-color:yellow;
scrollbar-track-color:aqua;
-->
</style>
Feedback Form Code / Instructions
The source code for the two files (feedback.php and feedout.php) is shown below. Copy and
paste the feedback.php into your existing php page. Then copy and paste the output and Thank
You page into your existing Thank You page / template.
BTW: In the feedout.php file you must enter your 'from' and 'to' email address information.
VIP: The web host must have PHP safe mode OFF and the mail() function is required.
If not sure about Safe Mood, BE SURE to make and run a test.php (see notes)
feedback.php
<form action="feedout.php" method="post">
<!-- DO NOT change ANY of the php sections -->
<?php
$ipi = getenv("REMOTE_ADDR");
$httprefi = getenv ("HTTP_REFERER");
$httpagenti = getenv ("HTTP_USER_AGENT");
?>
<input type="hidden" name="ip" value="<?php echo $ipi ?>" />
<input type="hidden" name="httpref" value="<?php echo $httprefi ?>" />
<input type="hidden" name="httpagent" value="<?php echo $httpagenti ?>" />
<h2 align="center">Feedback Form</h2>
<p>
All input is blah blah ...... </p>
<p>Send Data to: <select name="attn" size="1">
<option value=" MT General Email ">General Email</option>
<option value=" MakeTemplate Owner ">Owner of MakeTemplate</option>
<option value=" Technical Support ">Technical Support</option>
<option value=" PHP Codemaster ">PHP Codemaster</option>
</select>
<br />
Name: <input type="text" name="nameis" size="20" /> Email:<input type="text" name="visitormail"
size="20" />
feedout.php
<h3 align="center">Thanks for your Feedback </h3>
<!-- VIP: change YourEmail to your real email -->
<?php
$ip = $_POST['ip'];
$httpagent = $_POST['httpagent'];
$httpref = $_POST['$httpref'];
$nameis = $_POST['nameis'];
$visitormail = $_POST['visitormail'];
$feedback = $_POST['feedback'];
$rating = $_POST['rating'];
$emailvalidation = $_POST['emailvalidation'];
$fieldvalidation = $_POST['fieldvalidation'];
$htmlcontrol= $_POST['htmlcontrol'];
$phpform = $_POST['phpform'];
$htmlform = $_POST['htmlform'];
$attn = $_POST['attn'];
echo $tellem;
if ($emailvalidation == "y") {
$req1 = "Email format Validation \n" ;
}
if ($fieldvalidation == "y") {
$req2 = "Required Form Field Validation \n";
}
if ($htmlcontrol == "y") {
$req3 = "More intergratd HTML (in form) \n";
}
if ($phpform == "y") {
$req4 = "Improved PHP form script generator \n";
}
if ($htmlform == "y") {
$req5 = "A complete HTML form generator \n";
}
$req = $req1 . $req2 . $req3 . $req4 . $req5;
$attn = $attn;
$subject = $attn;
$feedback = stripcslashes($feedback);
<p align="center">
</p>
Note: Some web host block the mail() function if the 'YourEmail' does not have your domain. In
other words: sometimes, the domain email address must be used - or the mail() function will not
work.
Use notepad (or other text editor) create an ASCII text file with this line:
<?php
$ip = $_POST['ip'];
$httpagent = $_POST['httpagent'];
$httpref = $_POST['$httpref'];
$nameis = $_POST['nameis'];
$visitormail = $_POST['visitormail'];
$feedback = $_POST['feedback'];
$rating = $_POST['rating'];
$emailvalidation = $_POST['emailvalidation'];
$fieldvalidation = $_POST['fieldvalidation'];
$htmlcontrol= $_POST['htmlcontrol'];
$phpform = $_POST['phpform'];
$htmlform = $_POST['htmlform'];
$attn = $_POST['attn'];
?>