Un peu d'aide avec les fichiers PHP INCLUDE
- RSMEDUDE
- Novice


- Inscription: Juil 10, 2004
- Messages: 33
- Status: Offline
Bonjour à tous,
Je suis un membre de longue date, mais très rarement, je poste ici. À cette fin, j'espère que je poste ce sujet au bon endroit.
Avant d'entrer dans les choses, je tiens à préciser que je suis un novice avec PHP. J'apprends mais beaucoup du codage que j'utilise est soit un libre d'utiliser le téléchargement avec la notation correcte ou codage j'ai figuré dehors comment faire travailler ensemble de façon différente de sites.
Je suis en train de travailler sur mon site de clubs de chemin de fer de modèle et de ce que j'essaie de faire est de prendre un en-tête à inclure le fichier de sorte que j'ai ce qu'on appelle le « réfrigérateur » apparaître sur chaque page. Les autres avantages à cela sont que l'en-tête en bout de ligne apparaisse de manière uniforme sur toutes les pages et je n'aurai seulement une seule page pour modifier les mises à jour pour le « réfrigérateur ». J'ai la plupart des pages fonctionne comment je le veux, mais j'ai certains qui sont un peu têtu et je ne sais pas pourquoi.
Avant de vous montrer le code pour ce que je veux accomplir ici sont des liens.
Voilà comment le site ressemble et fonctionne maintenant : lecture société d'ingénieurs principaux Site de modèles
Il s'agit plus ou moins ce que je veux qu'il ressemble : Site de la société de lecture du modèle ingénieurs BETA
Dans le site bêta, vous verrez que certaines pages chargement comme elles le devraient avec le « réfrigérateur » en haut tandis que d'autres chargement sans elle. Ceux sans est des pages de mon problème. L'exemple de code de ce que je travaille avec c'est-à-dire énumérés ci-dessous est de la page h.php et la page contact_us.php.
FICHIER : h.php
<html>
<head>
<meta http-equiv="Content-Language" content="en-us">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<meta name="GENERATOR" content="Microsoft FrontPage 6.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<meta name="resource-type" content="document">
<meta name="Generator" content="Microsoft FrontPage 4.0">
<meta name="revisit-after" content="10">
<meta name="keywords" content="live, steam, miniature, small, scale, ho , o, gauge, laurel, run, lite, rail, railroad, model, rsme, reading, society, engineers, club, livesteam, literail,">
<meta name="rating" content="Safe For Kids">
<title>Reading Society of Model Engineers</title>
<base target="main">
<LINK REL=stylesheet TYPE="text/css" HREF=rsme.css>
<style type="text/css">
/*Example CSS for the two demo scrollers*/
#pscroller2{
width: 490px;
height: 25px;
padding: 3px;
background-color: #C0C0C0;
}
#pscroller2 a{
text-decoration: none;
}
.someclass{ //class
}
</style>
<script type="text/javascript">
/*Example message arrays for the two demo scrollers*/
var pausecontent2=new Array()
pausecontent2[0]='<center><a href="http://www.rsme.org/calendar/2012/oct.php">RSME Run Day October 7, 2012 12pm - 5pm</a></center>'
pausecontent2[1]='<center><a href="http://www.rsme.org/pdf/RSME_2012_OPEN_HOUSE_FLYER.pdf" target="window">RSME Fall Open House October 20 and 21, 2012 12pm - 5pm</a></center>'
pausecontent2[2]='<center><a href="http://www.rsme.org/calendar/2012/nov.php">RSME Run Day November 4, 2012 12pm - 5pm</a></center>'
</script>
<script type="text/javascript">
/***********************************************
SaveCancel* Pausing up-down scroller- ? Dynamic Drive (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit http://www.dynamicdrive.com/ for this script and 100s more.
***********************************************/
function pausescroller(content, divId, divClass, delay){
this.content=content //message array content
this.tickerid=divId //ID of ticker div to display information
this.delay=delay //Delay between msg change, in miliseconds.
this.mouseoverBol=0 //Boolean to indicate whether mouse is currently over scroller (and pause it if it is)
this.hiddendivpointer=1 //index of message array for hidden div
document.write('<div id="'+divId+'" class="'+divClass+'" style="position: relative; overflow: hidden"><div class="innerDiv" style="position: absolute; width: 100%" id="'+divId+'1">'+content[0]+'</div><div class="innerDiv" style="position: absolute; width: 100%; visibility: hidden" id="'+divId+'2">'+content[1]+'</div></div>')
var scrollerinstance=this
if (window.addEventListener) //run onload in DOM2 browsers
window.addEventListener("load", function(){scrollerinstance.initialize()}, false)
else if (window.attachEvent) //run onload in IE5.5+
window.attachEvent("onload", function(){scrollerinstance.initialize()})
else if (document.getElementById) //if legacy DOM browsers, just start scroller after 0.5 sec
setTimeout(function(){scrollerinstance.initialize()}, 500)
}
// -------------------------------------------------------------------
// initialize()- Initialize scroller method.
// -Get div objects, set initial positions, start up down animation
// -------------------------------------------------------------------
pausescroller.prototype.initialize=function(){
this.tickerdiv=document.getElementById(this.tickerid)
this.visiblediv=document.getElementById(this.tickerid+"1")
this.hiddendiv=document.getElementById(this.tickerid+"2")
this.visibledivtop=parseInt(pausescroller.getCSSpadding(this.tickerdiv))
//set width of inner DIVs to outer DIV's width minus padding (padding assumed to be top padding x 2)
this.visiblediv.style.width=this.hiddendiv.style.width=this.tickerdiv.offsetWidth-(this.visibledivtop*2)+"px"
this.getinline(this.visiblediv, this.hiddendiv)
this.hiddendiv.style.visibility="visible"
var scrollerinstance=this
document.getElementById(this.tickerid).onmouseover=function(){scrollerinstance.mouseoverBol=1}
document.getElementById(this.tickerid).onmouseout=function(){scrollerinstance.mouseoverBol=0}
if (window.attachEvent) //Clean up loose references in IE
window.attachEvent("onunload", function(){scrollerinstance.tickerdiv.onmouseover=scrollerinstance.tickerdiv.onmouseout=null})
setTimeout(function(){scrollerinstance.animateup()}, this.delay)
}
// -------------------------------------------------------------------
// animateup()- Move the two inner divs of the scroller up and in sync
// -------------------------------------------------------------------
pausescroller.prototype.animateup=function(){
var scrollerinstance=this
if (parseInt(this.hiddendiv.style.top)>(this.visibledivtop+5)){
this.visiblediv.style.top=parseInt(this.visiblediv.style.top)-5+"px"
this.hiddendiv.style.top=parseInt(this.hiddendiv.style.top)-5+"px"
setTimeout(function(){scrollerinstance.animateup()}, 50)
}
else{
this.getinline(this.hiddendiv, this.visiblediv)
this.swapdivs()
setTimeout(function(){scrollerinstance.setmessage()}, this.delay)
}
}
// -------------------------------------------------------------------
// swapdivs()- Swap between which is the visible and which is the hidden div
// -------------------------------------------------------------------
pausescroller.prototype.swapdivs=function(){
var tempcontainer=this.visiblediv
this.visiblediv=this.hiddendiv
this.hiddendiv=tempcontainer
}
pausescroller.prototype.getinline=function(div1, div2){
div1.style.top=this.visibledivtop+"px"
div2.style.top=Math.max(div1.parentNode.offsetHeight, div1.offsetHeight)+"px"
}
// -------------------------------------------------------------------
// setmessage()- Populate the hidden div with the next message before it's visible
// -------------------------------------------------------------------
pausescroller.prototype.setmessage=function(){
var scrollerinstance=this
if (this.mouseoverBol==1) //if mouse is currently over scoller, do nothing (pause it)
setTimeout(function(){scrollerinstance.setmessage()}, 100)
else{
var i=this.hiddendivpointer
var ceiling=this.content.length
this.hiddendivpointer=(i+1>ceiling-1)? 0 : i+1
this.hiddendiv.innerHTML=this.content[this.hiddendivpointer]
this.animateup()
}
}
pausescroller.getCSSpadding=function(tickerobj){ //get CSS padding value, if any
if (tickerobj.currentStyle)
return tickerobj.currentStyle["paddingTop"]
else if (window.getComputedStyle) //if DOM2
return window.getComputedStyle(tickerobj, "").getPropertyValue("padding-top")
else
return 0
}
</script>
</head>
<body topmargin="5">
<table border="0" cellpadding="0" cellspacing="0" width="100%" height="100">
<tr>
<td align="center" height="100" width="250" valign="top"><img src="http://www.rsme.org/images/rsmelogo.gif" width="178" height="88" align="center"></td>
<td align="center" height="100" width="840" valign="top"><FONT SIZE="5"><B>Reading Society of Model Engineers</font></b><p>Berks County, Pennsylvania, USA<BR>
<font size="2"><BR></font>
<!-- BEGIN NEWS FADER TEXT -->
<table width="139">
<tr>
<td align="centeR"><font color="red" size="4"><b><i>HOTBOX</i></b></font>
</td>
</tr>
<tr>
<td>
<script type="text/javascript">
new pausescroller(pausecontent2, "pscroller2", "someclass", 3600)
</script>
</td>
</tr>
</table>
<!-- END FADER -->
</p></td>
<td align="center" height="100" width="250" valign="top"><img border="0" src="http://www.rsme.org/images/LITERAIL.gif" width="216" height="112" align="center"></td>
</tr>
</table>
</center>
</p>
</body>
</html>
FICHIER : contact_us.php
<?php
ob_start('ob_gzhandler');
session_start();
include 'contact_us_inc.php';
// if submit
if (($_POST[x])&&(substr($_SESSION[igif], 17) === $_SESSION['afloat'])){
// posted
$x = $_POST[x];
// decode, strip string and round numbers
$a = base64_decode($_SESSION['afloat']);
$b = 0 + $a;
$a = explode(" ", $a);
$a = $a[3];
$bb = round($b);
$aa = round($a);
// x coords
$gc = explode(" ", '0 19 40 60 82 104 79 100 121 142 163 185');
// check if correct number has been clicked
$ac = $aa + 6;
if ($bb <= $aa){ $ac = $bb + 1; }
//wrong number clicked error message below
$mess = "ERROR: Sorry " . $_POST[yname] . " wrong number clicked";
// if correct number clicked success
if (($x >= $gc[$ac-1]) && ($x <= $gc[$ac])){
// submit your form
$to = $owner_email;
$headers = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
// Additional headers
$headers .= 'From:<' . $_POST[email] . '>' . $_POST[yname] . "\r\n";
$headers .= 'RSME General Contact Form Version 1.0' . "\r\n";
// Message content
$messages = '<br><br><b>Name:</b> ' . $_POST[yname] . '<p><B>E-mail:</b> ' . $_POST[email] . '<p><b>Comments:</b> <br>' . $_POST[message];
// Mail it
mail($to, "RSME MAIL: General Contact Form", $messages, $headers);
$yname = $_POST[yname];
?>
<script>
alert("Thank you <? echo $yname; ?> for your correspondance. We will be sure to get back to you soon!");
window.location = "<?=$redirect;?>";
</script>
<?
exit; }
//demo alert message below
?>
<script>
alert("<?=$mess;?>");
window.location = window.location;
</script>
<?
session_unset();
session_destroy();
ob_end_flush();
exit;
}
// afloat = base64_encoded random string
$afloat = base64_encode(" " . $num1 = rand(0,3) . "." . $num2 = rand(100,999) . "
Float " . $num3 = rand(1,4) . "." . $num4 = rand(100,999) . " ");
// rectangle x coord
$aler = "> 78";
if(round($num1 . "." . $num2) <= round($num3 . "." . $num4)) {$aler = "< 105";}
// create random image
$_SESSION[igif] = "create_gif.php?a=" . $afloat . "";
$_SESSION['afloat'] = $afloat;
?>
<html>
<head>
<meta http-equiv="Content-Language" content="en-us">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<meta name="GENERATOR" content="Microsoft FrontPage 6.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<meta name="resource-type" content="document">
<meta name="Generator" content="rsmeorga Tag Generator">
<meta name="revisit-after" content="10">
<meta name="keywords" content="live, steam, miniature, small, scale, ho , o, gauge, laurel, run, lite, rail, railroad, model, rsme, reading, society, engineers, club, livesteam, literail,">
<meta name="rating" content="Safe For Kids">
<title>Reading Society of Model Engineers</title>
<LINK REL=stylesheet TYPE="text/css" HREF=../rsme.css>
<style type="text/css">
/* click image */
.cd {
width: 185px;
height: 15px;
background-image: url(<?=$_SESSION[igif];?>);
background-repeat: no-repeat;
position: relative;
left:<?=rand(-100,100);?>px;
bottom:<?=rand(-5,20);?>px;
z-index: 2;
}
</style>
<script language="JavaScript">
// submit form func val i date
function submitform() {
if (document.xcoords.yname.value == "") {
alert("Please Enter Your Name.");
return false; }
if (document.xcoords.email.value == "" || document.xcoords.email.value.indexOf("@")<1|| document.xcoords.email.value.indexOf(".")<1) {
alert("Please Enter Valid E-mail");
return false;}
if (document.xcoords.message.value == "") {
alert("Please Enter Question/Message.");
return false; }
// if box coord submit else rectangle coord alert
// Do not edit javascript below this line. you can edit the alert message
if (document.xcoords.x.value <?=$aler;?>) {
document.xcoords.submit();
} else {
alert("Click number in square identicale to number in rectangle to submit.");
}
}
// image x value
function xcoord(event) {
image = event.offsetX?(event.offsetX):event.pageX-document.getElementById("coord").offsetLeft;
document.xcoords.x.value = image;
}
</script>
</head>
<body text="black" bgcolor="#C0C0C0" topmargin="5">
<?php include("../h.php"); ?>
<p align="left">The RSME is pleased to announce that we now have a general contact form setup on our website. You can now use this form to request general information about the RSME. We thank you for your patients while we created this section of the site. You can also click on the officers link to the left and select a specific officer or committee chairman to contact. We still have our traditional means of communication via the telephone or by writing us a letter and dropping it in the mail. No matter which route you choose to contact us we certainly look forward to hearing from you!</p>
<table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%">
<tr>
<td width="33%" align="center" valign="top"><b>United States Postal Service</b></td>
<td width="33%" align="center" valign="top"><b>Club House Phone<br>
(please leave a message)</b></td>
<td width="34%" align="center" valign="top"><b>Online contact form</b></td>
</tr>
<tr>
<td width="33%" align="center" valign="top"><br>Reading Society of Model Engineers<br>
P.O. Box 13011<br>
Reading, PA 19612</td>
<td width="33%" align="center" valign="top"><br>Phone Number: 610-929-5444</td>
<td width="34%" align="center">
<table summary="" border="0">
<form name="xcoords" action="<?=$_SERVER['PHP_SELF']; ?>" method="post">
<tr>
<td valign="top">Name: </td><td><input type="text" name="yname" size="40" maxlength="256" style="border: 1px solid <?=$bordercolor;?>"><br><br>
</td>
</tr>
<tr>
<td valign="top">E-Mail: </td><td><input type="text" name="email" size="40" maxlength="256" style="border: 1px solid <?=$bordercolor;?>"><br><br>
</td>
</tr>
<tr>
<td valign="top">Comments: </td><td><textarea name="message" cols="30" rows="7" style="border: 1px solid <?=$bordercolor;?>; background: #F5F5F5"></textarea>
<input type="hidden" name="x" /> </td>
</tr>
<tr><td colspan=2 style="font: 11px Arial; color: <?=$bordercolor;?>; border-color: <?=$bordercolor;?>; border-style: solid; border-width: 1px; background: #F8F8FF; height: 30px; width: 310px; padding-top: 5px; padding-right: 5px; padding-bottom: 5px; padding-left: 5px; position: relative; font-weight: normal;">To submit this form to the Reading Society of Model Engineers. Please click the number that is presented to you on the right side of the word "click".</td>
</table></form><p><div id="coord" onClick="submitform(xcoord(event))" class="cd"></div></div><p></div>
</td>
</tr>
</table>
</body>
</html>
<?php ob_end_flush(); ?>
Je tiens à remercier toutes les personnes pour toute aide, que je peux obtenir là-dessus à l'avance.
Je suis un membre de longue date, mais très rarement, je poste ici. À cette fin, j'espère que je poste ce sujet au bon endroit.
Avant d'entrer dans les choses, je tiens à préciser que je suis un novice avec PHP. J'apprends mais beaucoup du codage que j'utilise est soit un libre d'utiliser le téléchargement avec la notation correcte ou codage j'ai figuré dehors comment faire travailler ensemble de façon différente de sites.
Je suis en train de travailler sur mon site de clubs de chemin de fer de modèle et de ce que j'essaie de faire est de prendre un en-tête à inclure le fichier de sorte que j'ai ce qu'on appelle le « réfrigérateur » apparaître sur chaque page. Les autres avantages à cela sont que l'en-tête en bout de ligne apparaisse de manière uniforme sur toutes les pages et je n'aurai seulement une seule page pour modifier les mises à jour pour le « réfrigérateur ». J'ai la plupart des pages fonctionne comment je le veux, mais j'ai certains qui sont un peu têtu et je ne sais pas pourquoi.
Avant de vous montrer le code pour ce que je veux accomplir ici sont des liens.
Voilà comment le site ressemble et fonctionne maintenant : lecture société d'ingénieurs principaux Site de modèles
Il s'agit plus ou moins ce que je veux qu'il ressemble : Site de la société de lecture du modèle ingénieurs BETA
Dans le site bêta, vous verrez que certaines pages chargement comme elles le devraient avec le « réfrigérateur » en haut tandis que d'autres chargement sans elle. Ceux sans est des pages de mon problème. L'exemple de code de ce que je travaille avec c'est-à-dire énumérés ci-dessous est de la page h.php et la page contact_us.php.
FICHIER : h.php
Code: [ Select ]
<html>
<head>
<meta http-equiv="Content-Language" content="en-us">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<meta name="GENERATOR" content="Microsoft FrontPage 6.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<meta name="resource-type" content="document">
<meta name="Generator" content="Microsoft FrontPage 4.0">
<meta name="revisit-after" content="10">
<meta name="keywords" content="live, steam, miniature, small, scale, ho , o, gauge, laurel, run, lite, rail, railroad, model, rsme, reading, society, engineers, club, livesteam, literail,">
<meta name="rating" content="Safe For Kids">
<title>Reading Society of Model Engineers</title>
<base target="main">
<LINK REL=stylesheet TYPE="text/css" HREF=rsme.css>
<style type="text/css">
/*Example CSS for the two demo scrollers*/
#pscroller2{
width: 490px;
height: 25px;
padding: 3px;
background-color: #C0C0C0;
}
#pscroller2 a{
text-decoration: none;
}
.someclass{ //class
}
</style>
<script type="text/javascript">
/*Example message arrays for the two demo scrollers*/
var pausecontent2=new Array()
pausecontent2[0]='<center><a href="http://www.rsme.org/calendar/2012/oct.php">RSME Run Day October 7, 2012 12pm - 5pm</a></center>'
pausecontent2[1]='<center><a href="http://www.rsme.org/pdf/RSME_2012_OPEN_HOUSE_FLYER.pdf" target="window">RSME Fall Open House October 20 and 21, 2012 12pm - 5pm</a></center>'
pausecontent2[2]='<center><a href="http://www.rsme.org/calendar/2012/nov.php">RSME Run Day November 4, 2012 12pm - 5pm</a></center>'
</script>
<script type="text/javascript">
/***********************************************
SaveCancel* Pausing up-down scroller- ? Dynamic Drive (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit http://www.dynamicdrive.com/ for this script and 100s more.
***********************************************/
function pausescroller(content, divId, divClass, delay){
this.content=content //message array content
this.tickerid=divId //ID of ticker div to display information
this.delay=delay //Delay between msg change, in miliseconds.
this.mouseoverBol=0 //Boolean to indicate whether mouse is currently over scroller (and pause it if it is)
this.hiddendivpointer=1 //index of message array for hidden div
document.write('<div id="'+divId+'" class="'+divClass+'" style="position: relative; overflow: hidden"><div class="innerDiv" style="position: absolute; width: 100%" id="'+divId+'1">'+content[0]+'</div><div class="innerDiv" style="position: absolute; width: 100%; visibility: hidden" id="'+divId+'2">'+content[1]+'</div></div>')
var scrollerinstance=this
if (window.addEventListener) //run onload in DOM2 browsers
window.addEventListener("load", function(){scrollerinstance.initialize()}, false)
else if (window.attachEvent) //run onload in IE5.5+
window.attachEvent("onload", function(){scrollerinstance.initialize()})
else if (document.getElementById) //if legacy DOM browsers, just start scroller after 0.5 sec
setTimeout(function(){scrollerinstance.initialize()}, 500)
}
// -------------------------------------------------------------------
// initialize()- Initialize scroller method.
// -Get div objects, set initial positions, start up down animation
// -------------------------------------------------------------------
pausescroller.prototype.initialize=function(){
this.tickerdiv=document.getElementById(this.tickerid)
this.visiblediv=document.getElementById(this.tickerid+"1")
this.hiddendiv=document.getElementById(this.tickerid+"2")
this.visibledivtop=parseInt(pausescroller.getCSSpadding(this.tickerdiv))
//set width of inner DIVs to outer DIV's width minus padding (padding assumed to be top padding x 2)
this.visiblediv.style.width=this.hiddendiv.style.width=this.tickerdiv.offsetWidth-(this.visibledivtop*2)+"px"
this.getinline(this.visiblediv, this.hiddendiv)
this.hiddendiv.style.visibility="visible"
var scrollerinstance=this
document.getElementById(this.tickerid).onmouseover=function(){scrollerinstance.mouseoverBol=1}
document.getElementById(this.tickerid).onmouseout=function(){scrollerinstance.mouseoverBol=0}
if (window.attachEvent) //Clean up loose references in IE
window.attachEvent("onunload", function(){scrollerinstance.tickerdiv.onmouseover=scrollerinstance.tickerdiv.onmouseout=null})
setTimeout(function(){scrollerinstance.animateup()}, this.delay)
}
// -------------------------------------------------------------------
// animateup()- Move the two inner divs of the scroller up and in sync
// -------------------------------------------------------------------
pausescroller.prototype.animateup=function(){
var scrollerinstance=this
if (parseInt(this.hiddendiv.style.top)>(this.visibledivtop+5)){
this.visiblediv.style.top=parseInt(this.visiblediv.style.top)-5+"px"
this.hiddendiv.style.top=parseInt(this.hiddendiv.style.top)-5+"px"
setTimeout(function(){scrollerinstance.animateup()}, 50)
}
else{
this.getinline(this.hiddendiv, this.visiblediv)
this.swapdivs()
setTimeout(function(){scrollerinstance.setmessage()}, this.delay)
}
}
// -------------------------------------------------------------------
// swapdivs()- Swap between which is the visible and which is the hidden div
// -------------------------------------------------------------------
pausescroller.prototype.swapdivs=function(){
var tempcontainer=this.visiblediv
this.visiblediv=this.hiddendiv
this.hiddendiv=tempcontainer
}
pausescroller.prototype.getinline=function(div1, div2){
div1.style.top=this.visibledivtop+"px"
div2.style.top=Math.max(div1.parentNode.offsetHeight, div1.offsetHeight)+"px"
}
// -------------------------------------------------------------------
// setmessage()- Populate the hidden div with the next message before it's visible
// -------------------------------------------------------------------
pausescroller.prototype.setmessage=function(){
var scrollerinstance=this
if (this.mouseoverBol==1) //if mouse is currently over scoller, do nothing (pause it)
setTimeout(function(){scrollerinstance.setmessage()}, 100)
else{
var i=this.hiddendivpointer
var ceiling=this.content.length
this.hiddendivpointer=(i+1>ceiling-1)? 0 : i+1
this.hiddendiv.innerHTML=this.content[this.hiddendivpointer]
this.animateup()
}
}
pausescroller.getCSSpadding=function(tickerobj){ //get CSS padding value, if any
if (tickerobj.currentStyle)
return tickerobj.currentStyle["paddingTop"]
else if (window.getComputedStyle) //if DOM2
return window.getComputedStyle(tickerobj, "").getPropertyValue("padding-top")
else
return 0
}
</script>
</head>
<body topmargin="5">
<table border="0" cellpadding="0" cellspacing="0" width="100%" height="100">
<tr>
<td align="center" height="100" width="250" valign="top"><img src="http://www.rsme.org/images/rsmelogo.gif" width="178" height="88" align="center"></td>
<td align="center" height="100" width="840" valign="top"><FONT SIZE="5"><B>Reading Society of Model Engineers</font></b><p>Berks County, Pennsylvania, USA<BR>
<font size="2"><BR></font>
<!-- BEGIN NEWS FADER TEXT -->
<table width="139">
<tr>
<td align="centeR"><font color="red" size="4"><b><i>HOTBOX</i></b></font>
</td>
</tr>
<tr>
<td>
<script type="text/javascript">
new pausescroller(pausecontent2, "pscroller2", "someclass", 3600)
</script>
</td>
</tr>
</table>
<!-- END FADER -->
</p></td>
<td align="center" height="100" width="250" valign="top"><img border="0" src="http://www.rsme.org/images/LITERAIL.gif" width="216" height="112" align="center"></td>
</tr>
</table>
</center>
</p>
</body>
</html>
- <html>
- <head>
- <meta http-equiv="Content-Language" content="en-us">
- <meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
- <meta name="GENERATOR" content="Microsoft FrontPage 6.0">
- <meta name="ProgId" content="FrontPage.Editor.Document">
- <meta name="resource-type" content="document">
- <meta name="Generator" content="Microsoft FrontPage 4.0">
- <meta name="revisit-after" content="10">
- <meta name="keywords" content="live, steam, miniature, small, scale, ho , o, gauge, laurel, run, lite, rail, railroad, model, rsme, reading, society, engineers, club, livesteam, literail,">
- <meta name="rating" content="Safe For Kids">
- <title>Reading Society of Model Engineers</title>
- <base target="main">
- <LINK REL=stylesheet TYPE="text/css" HREF=rsme.css>
- <style type="text/css">
- /*Example CSS for the two demo scrollers*/
- #pscroller2{
- width: 490px;
- height: 25px;
- padding: 3px;
- background-color: #C0C0C0;
- }
- #pscroller2 a{
- text-decoration: none;
- }
- .someclass{ //class
- }
- </style>
- <script type="text/javascript">
- /*Example message arrays for the two demo scrollers*/
- var pausecontent2=new Array()
- pausecontent2[0]='<center><a href="http://www.rsme.org/calendar/2012/oct.php">RSME Run Day October 7, 2012 12pm - 5pm</a></center>'
- pausecontent2[1]='<center><a href="http://www.rsme.org/pdf/RSME_2012_OPEN_HOUSE_FLYER.pdf" target="window">RSME Fall Open House October 20 and 21, 2012 12pm - 5pm</a></center>'
- pausecontent2[2]='<center><a href="http://www.rsme.org/calendar/2012/nov.php">RSME Run Day November 4, 2012 12pm - 5pm</a></center>'
- </script>
- <script type="text/javascript">
- /***********************************************
- SaveCancel* Pausing up-down scroller- ? Dynamic Drive (www.dynamicdrive.com)
- * This notice MUST stay intact for legal use
- * Visit http://www.dynamicdrive.com/ for this script and 100s more.
- ***********************************************/
- function pausescroller(content, divId, divClass, delay){
- this.content=content //message array content
- this.tickerid=divId //ID of ticker div to display information
- this.delay=delay //Delay between msg change, in miliseconds.
- this.mouseoverBol=0 //Boolean to indicate whether mouse is currently over scroller (and pause it if it is)
- this.hiddendivpointer=1 //index of message array for hidden div
- document.write('<div id="'+divId+'" class="'+divClass+'" style="position: relative; overflow: hidden"><div class="innerDiv" style="position: absolute; width: 100%" id="'+divId+'1">'+content[0]+'</div><div class="innerDiv" style="position: absolute; width: 100%; visibility: hidden" id="'+divId+'2">'+content[1]+'</div></div>')
- var scrollerinstance=this
- if (window.addEventListener) //run onload in DOM2 browsers
- window.addEventListener("load", function(){scrollerinstance.initialize()}, false)
- else if (window.attachEvent) //run onload in IE5.5+
- window.attachEvent("onload", function(){scrollerinstance.initialize()})
- else if (document.getElementById) //if legacy DOM browsers, just start scroller after 0.5 sec
- setTimeout(function(){scrollerinstance.initialize()}, 500)
- }
- // -------------------------------------------------------------------
- // initialize()- Initialize scroller method.
- // -Get div objects, set initial positions, start up down animation
- // -------------------------------------------------------------------
- pausescroller.prototype.initialize=function(){
- this.tickerdiv=document.getElementById(this.tickerid)
- this.visiblediv=document.getElementById(this.tickerid+"1")
- this.hiddendiv=document.getElementById(this.tickerid+"2")
- this.visibledivtop=parseInt(pausescroller.getCSSpadding(this.tickerdiv))
- //set width of inner DIVs to outer DIV's width minus padding (padding assumed to be top padding x 2)
- this.visiblediv.style.width=this.hiddendiv.style.width=this.tickerdiv.offsetWidth-(this.visibledivtop*2)+"px"
- this.getinline(this.visiblediv, this.hiddendiv)
- this.hiddendiv.style.visibility="visible"
- var scrollerinstance=this
- document.getElementById(this.tickerid).onmouseover=function(){scrollerinstance.mouseoverBol=1}
- document.getElementById(this.tickerid).onmouseout=function(){scrollerinstance.mouseoverBol=0}
- if (window.attachEvent) //Clean up loose references in IE
- window.attachEvent("onunload", function(){scrollerinstance.tickerdiv.onmouseover=scrollerinstance.tickerdiv.onmouseout=null})
- setTimeout(function(){scrollerinstance.animateup()}, this.delay)
- }
- // -------------------------------------------------------------------
- // animateup()- Move the two inner divs of the scroller up and in sync
- // -------------------------------------------------------------------
- pausescroller.prototype.animateup=function(){
- var scrollerinstance=this
- if (parseInt(this.hiddendiv.style.top)>(this.visibledivtop+5)){
- this.visiblediv.style.top=parseInt(this.visiblediv.style.top)-5+"px"
- this.hiddendiv.style.top=parseInt(this.hiddendiv.style.top)-5+"px"
- setTimeout(function(){scrollerinstance.animateup()}, 50)
- }
- else{
- this.getinline(this.hiddendiv, this.visiblediv)
- this.swapdivs()
- setTimeout(function(){scrollerinstance.setmessage()}, this.delay)
- }
- }
- // -------------------------------------------------------------------
- // swapdivs()- Swap between which is the visible and which is the hidden div
- // -------------------------------------------------------------------
- pausescroller.prototype.swapdivs=function(){
- var tempcontainer=this.visiblediv
- this.visiblediv=this.hiddendiv
- this.hiddendiv=tempcontainer
- }
- pausescroller.prototype.getinline=function(div1, div2){
- div1.style.top=this.visibledivtop+"px"
- div2.style.top=Math.max(div1.parentNode.offsetHeight, div1.offsetHeight)+"px"
- }
- // -------------------------------------------------------------------
- // setmessage()- Populate the hidden div with the next message before it's visible
- // -------------------------------------------------------------------
- pausescroller.prototype.setmessage=function(){
- var scrollerinstance=this
- if (this.mouseoverBol==1) //if mouse is currently over scoller, do nothing (pause it)
- setTimeout(function(){scrollerinstance.setmessage()}, 100)
- else{
- var i=this.hiddendivpointer
- var ceiling=this.content.length
- this.hiddendivpointer=(i+1>ceiling-1)? 0 : i+1
- this.hiddendiv.innerHTML=this.content[this.hiddendivpointer]
- this.animateup()
- }
- }
- pausescroller.getCSSpadding=function(tickerobj){ //get CSS padding value, if any
- if (tickerobj.currentStyle)
- return tickerobj.currentStyle["paddingTop"]
- else if (window.getComputedStyle) //if DOM2
- return window.getComputedStyle(tickerobj, "").getPropertyValue("padding-top")
- else
- return 0
- }
- </script>
- </head>
- <body topmargin="5">
- <table border="0" cellpadding="0" cellspacing="0" width="100%" height="100">
- <tr>
- <td align="center" height="100" width="250" valign="top"><img src="http://www.rsme.org/images/rsmelogo.gif" width="178" height="88" align="center"></td>
- <td align="center" height="100" width="840" valign="top"><FONT SIZE="5"><B>Reading Society of Model Engineers</font></b><p>Berks County, Pennsylvania, USA<BR>
- <font size="2"><BR></font>
- <!-- BEGIN NEWS FADER TEXT -->
- <table width="139">
- <tr>
- <td align="centeR"><font color="red" size="4"><b><i>HOTBOX</i></b></font>
- </td>
- </tr>
- <tr>
- <td>
- <script type="text/javascript">
- new pausescroller(pausecontent2, "pscroller2", "someclass", 3600)
- </script>
- </td>
- </tr>
- </table>
- <!-- END FADER -->
- </p></td>
- <td align="center" height="100" width="250" valign="top"><img border="0" src="http://www.rsme.org/images/LITERAIL.gif" width="216" height="112" align="center"></td>
- </tr>
- </table>
- </center>
- </p>
- </body>
- </html>
FICHIER : contact_us.php
Code: [ Select ]
<?php
ob_start('ob_gzhandler');
session_start();
include 'contact_us_inc.php';
// if submit
if (($_POST[x])&&(substr($_SESSION[igif], 17) === $_SESSION['afloat'])){
// posted
$x = $_POST[x];
// decode, strip string and round numbers
$a = base64_decode($_SESSION['afloat']);
$b = 0 + $a;
$a = explode(" ", $a);
$a = $a[3];
$bb = round($b);
$aa = round($a);
// x coords
$gc = explode(" ", '0 19 40 60 82 104 79 100 121 142 163 185');
// check if correct number has been clicked
$ac = $aa + 6;
if ($bb <= $aa){ $ac = $bb + 1; }
//wrong number clicked error message below
$mess = "ERROR: Sorry " . $_POST[yname] . " wrong number clicked";
// if correct number clicked success
if (($x >= $gc[$ac-1]) && ($x <= $gc[$ac])){
// submit your form
$to = $owner_email;
$headers = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
// Additional headers
$headers .= 'From:<' . $_POST[email] . '>' . $_POST[yname] . "\r\n";
$headers .= 'RSME General Contact Form Version 1.0' . "\r\n";
// Message content
$messages = '<br><br><b>Name:</b> ' . $_POST[yname] . '<p><B>E-mail:</b> ' . $_POST[email] . '<p><b>Comments:</b> <br>' . $_POST[message];
// Mail it
mail($to, "RSME MAIL: General Contact Form", $messages, $headers);
$yname = $_POST[yname];
?>
<script>
alert("Thank you <? echo $yname; ?> for your correspondance. We will be sure to get back to you soon!");
window.location = "<?=$redirect;?>";
</script>
<?
exit; }
//demo alert message below
?>
<script>
alert("<?=$mess;?>");
window.location = window.location;
</script>
<?
session_unset();
session_destroy();
ob_end_flush();
exit;
}
// afloat = base64_encoded random string
$afloat = base64_encode(" " . $num1 = rand(0,3) . "." . $num2 = rand(100,999) . "
Float " . $num3 = rand(1,4) . "." . $num4 = rand(100,999) . " ");
// rectangle x coord
$aler = "> 78";
if(round($num1 . "." . $num2) <= round($num3 . "." . $num4)) {$aler = "< 105";}
// create random image
$_SESSION[igif] = "create_gif.php?a=" . $afloat . "";
$_SESSION['afloat'] = $afloat;
?>
<html>
<head>
<meta http-equiv="Content-Language" content="en-us">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<meta name="GENERATOR" content="Microsoft FrontPage 6.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<meta name="resource-type" content="document">
<meta name="Generator" content="rsmeorga Tag Generator">
<meta name="revisit-after" content="10">
<meta name="keywords" content="live, steam, miniature, small, scale, ho , o, gauge, laurel, run, lite, rail, railroad, model, rsme, reading, society, engineers, club, livesteam, literail,">
<meta name="rating" content="Safe For Kids">
<title>Reading Society of Model Engineers</title>
<LINK REL=stylesheet TYPE="text/css" HREF=../rsme.css>
<style type="text/css">
/* click image */
.cd {
width: 185px;
height: 15px;
background-image: url(<?=$_SESSION[igif];?>);
background-repeat: no-repeat;
position: relative;
left:<?=rand(-100,100);?>px;
bottom:<?=rand(-5,20);?>px;
z-index: 2;
}
</style>
<script language="JavaScript">
// submit form func val i date
function submitform() {
if (document.xcoords.yname.value == "") {
alert("Please Enter Your Name.");
return false; }
if (document.xcoords.email.value == "" || document.xcoords.email.value.indexOf("@")<1|| document.xcoords.email.value.indexOf(".")<1) {
alert("Please Enter Valid E-mail");
return false;}
if (document.xcoords.message.value == "") {
alert("Please Enter Question/Message.");
return false; }
// if box coord submit else rectangle coord alert
// Do not edit javascript below this line. you can edit the alert message
if (document.xcoords.x.value <?=$aler;?>) {
document.xcoords.submit();
} else {
alert("Click number in square identicale to number in rectangle to submit.");
}
}
// image x value
function xcoord(event) {
image = event.offsetX?(event.offsetX):event.pageX-document.getElementById("coord").offsetLeft;
document.xcoords.x.value = image;
}
</script>
</head>
<body text="black" bgcolor="#C0C0C0" topmargin="5">
<?php include("../h.php"); ?>
<p align="left">The RSME is pleased to announce that we now have a general contact form setup on our website. You can now use this form to request general information about the RSME. We thank you for your patients while we created this section of the site. You can also click on the officers link to the left and select a specific officer or committee chairman to contact. We still have our traditional means of communication via the telephone or by writing us a letter and dropping it in the mail. No matter which route you choose to contact us we certainly look forward to hearing from you!</p>
<table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%">
<tr>
<td width="33%" align="center" valign="top"><b>United States Postal Service</b></td>
<td width="33%" align="center" valign="top"><b>Club House Phone<br>
(please leave a message)</b></td>
<td width="34%" align="center" valign="top"><b>Online contact form</b></td>
</tr>
<tr>
<td width="33%" align="center" valign="top"><br>Reading Society of Model Engineers<br>
P.O. Box 13011<br>
Reading, PA 19612</td>
<td width="33%" align="center" valign="top"><br>Phone Number: 610-929-5444</td>
<td width="34%" align="center">
<table summary="" border="0">
<form name="xcoords" action="<?=$_SERVER['PHP_SELF']; ?>" method="post">
<tr>
<td valign="top">Name: </td><td><input type="text" name="yname" size="40" maxlength="256" style="border: 1px solid <?=$bordercolor;?>"><br><br>
</td>
</tr>
<tr>
<td valign="top">E-Mail: </td><td><input type="text" name="email" size="40" maxlength="256" style="border: 1px solid <?=$bordercolor;?>"><br><br>
</td>
</tr>
<tr>
<td valign="top">Comments: </td><td><textarea name="message" cols="30" rows="7" style="border: 1px solid <?=$bordercolor;?>; background: #F5F5F5"></textarea>
<input type="hidden" name="x" /> </td>
</tr>
<tr><td colspan=2 style="font: 11px Arial; color: <?=$bordercolor;?>; border-color: <?=$bordercolor;?>; border-style: solid; border-width: 1px; background: #F8F8FF; height: 30px; width: 310px; padding-top: 5px; padding-right: 5px; padding-bottom: 5px; padding-left: 5px; position: relative; font-weight: normal;">To submit this form to the Reading Society of Model Engineers. Please click the number that is presented to you on the right side of the word "click".</td>
</table></form><p><div id="coord" onClick="submitform(xcoord(event))" class="cd"></div></div><p></div>
</td>
</tr>
</table>
</body>
</html>
<?php ob_end_flush(); ?>
- <?php
- ob_start('ob_gzhandler');
- session_start();
- include 'contact_us_inc.php';
- // if submit
- if (($_POST[x])&&(substr($_SESSION[igif], 17) === $_SESSION['afloat'])){
- // posted
- $x = $_POST[x];
- // decode, strip string and round numbers
- $a = base64_decode($_SESSION['afloat']);
- $b = 0 + $a;
- $a = explode(" ", $a);
- $a = $a[3];
- $bb = round($b);
- $aa = round($a);
- // x coords
- $gc = explode(" ", '0 19 40 60 82 104 79 100 121 142 163 185');
- // check if correct number has been clicked
- $ac = $aa + 6;
- if ($bb <= $aa){ $ac = $bb + 1; }
- //wrong number clicked error message below
- $mess = "ERROR: Sorry " . $_POST[yname] . " wrong number clicked";
- // if correct number clicked success
- if (($x >= $gc[$ac-1]) && ($x <= $gc[$ac])){
- // submit your form
- $to = $owner_email;
- $headers = 'MIME-Version: 1.0' . "\r\n";
- $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
- // Additional headers
- $headers .= 'From:<' . $_POST[email] . '>' . $_POST[yname] . "\r\n";
- $headers .= 'RSME General Contact Form Version 1.0' . "\r\n";
- // Message content
- $messages = '<br><br><b>Name:</b> ' . $_POST[yname] . '<p><B>E-mail:</b> ' . $_POST[email] . '<p><b>Comments:</b> <br>' . $_POST[message];
- // Mail it
- mail($to, "RSME MAIL: General Contact Form", $messages, $headers);
- $yname = $_POST[yname];
- ?>
- <script>
- alert("Thank you <? echo $yname; ?> for your correspondance. We will be sure to get back to you soon!");
- window.location = "<?=$redirect;?>";
- </script>
- <?
- exit; }
- //demo alert message below
- ?>
- <script>
- alert("<?=$mess;?>");
- window.location = window.location;
- </script>
- <?
- session_unset();
- session_destroy();
- ob_end_flush();
- exit;
- }
- // afloat = base64_encoded random string
- $afloat = base64_encode(" " . $num1 = rand(0,3) . "." . $num2 = rand(100,999) . "
- Float " . $num3 = rand(1,4) . "." . $num4 = rand(100,999) . " ");
- // rectangle x coord
- $aler = "> 78";
- if(round($num1 . "." . $num2) <= round($num3 . "." . $num4)) {$aler = "< 105";}
- // create random image
- $_SESSION[igif] = "create_gif.php?a=" . $afloat . "";
- $_SESSION['afloat'] = $afloat;
- ?>
- <html>
- <head>
- <meta http-equiv="Content-Language" content="en-us">
- <meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
- <meta name="GENERATOR" content="Microsoft FrontPage 6.0">
- <meta name="ProgId" content="FrontPage.Editor.Document">
- <meta name="resource-type" content="document">
- <meta name="Generator" content="rsmeorga Tag Generator">
- <meta name="revisit-after" content="10">
- <meta name="keywords" content="live, steam, miniature, small, scale, ho , o, gauge, laurel, run, lite, rail, railroad, model, rsme, reading, society, engineers, club, livesteam, literail,">
- <meta name="rating" content="Safe For Kids">
- <title>Reading Society of Model Engineers</title>
- <LINK REL=stylesheet TYPE="text/css" HREF=../rsme.css>
- <style type="text/css">
- /* click image */
- .cd {
- width: 185px;
- height: 15px;
- background-image: url(<?=$_SESSION[igif];?>);
- background-repeat: no-repeat;
- position: relative;
- left:<?=rand(-100,100);?>px;
- bottom:<?=rand(-5,20);?>px;
- z-index: 2;
- }
- </style>
- <script language="JavaScript">
- // submit form func val i date
- function submitform() {
- if (document.xcoords.yname.value == "") {
- alert("Please Enter Your Name.");
- return false; }
- if (document.xcoords.email.value == "" || document.xcoords.email.value.indexOf("@")<1|| document.xcoords.email.value.indexOf(".")<1) {
- alert("Please Enter Valid E-mail");
- return false;}
- if (document.xcoords.message.value == "") {
- alert("Please Enter Question/Message.");
- return false; }
- // if box coord submit else rectangle coord alert
- // Do not edit javascript below this line. you can edit the alert message
- if (document.xcoords.x.value <?=$aler;?>) {
- document.xcoords.submit();
- } else {
- alert("Click number in square identicale to number in rectangle to submit.");
- }
- }
- // image x value
- function xcoord(event) {
- image = event.offsetX?(event.offsetX):event.pageX-document.getElementById("coord").offsetLeft;
- document.xcoords.x.value = image;
- }
- </script>
- </head>
- <body text="black" bgcolor="#C0C0C0" topmargin="5">
- <?php include("../h.php"); ?>
- <p align="left">The RSME is pleased to announce that we now have a general contact form setup on our website. You can now use this form to request general information about the RSME. We thank you for your patients while we created this section of the site. You can also click on the officers link to the left and select a specific officer or committee chairman to contact. We still have our traditional means of communication via the telephone or by writing us a letter and dropping it in the mail. No matter which route you choose to contact us we certainly look forward to hearing from you!</p>
- <table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%">
- <tr>
- <td width="33%" align="center" valign="top"><b>United States Postal Service</b></td>
- <td width="33%" align="center" valign="top"><b>Club House Phone<br>
- (please leave a message)</b></td>
- <td width="34%" align="center" valign="top"><b>Online contact form</b></td>
- </tr>
- <tr>
- <td width="33%" align="center" valign="top"><br>Reading Society of Model Engineers<br>
- P.O. Box 13011<br>
- Reading, PA 19612</td>
- <td width="33%" align="center" valign="top"><br>Phone Number: 610-929-5444</td>
- <td width="34%" align="center">
- <table summary="" border="0">
- <form name="xcoords" action="<?=$_SERVER['PHP_SELF']; ?>" method="post">
- <tr>
- <td valign="top">Name: </td><td><input type="text" name="yname" size="40" maxlength="256" style="border: 1px solid <?=$bordercolor;?>"><br><br>
- </td>
- </tr>
- <tr>
- <td valign="top">E-Mail: </td><td><input type="text" name="email" size="40" maxlength="256" style="border: 1px solid <?=$bordercolor;?>"><br><br>
- </td>
- </tr>
- <tr>
- <td valign="top">Comments: </td><td><textarea name="message" cols="30" rows="7" style="border: 1px solid <?=$bordercolor;?>; background: #F5F5F5"></textarea>
- <input type="hidden" name="x" /> </td>
- </tr>
- <tr><td colspan=2 style="font: 11px Arial; color: <?=$bordercolor;?>; border-color: <?=$bordercolor;?>; border-style: solid; border-width: 1px; background: #F8F8FF; height: 30px; width: 310px; padding-top: 5px; padding-right: 5px; padding-bottom: 5px; padding-left: 5px; position: relative; font-weight: normal;">To submit this form to the Reading Society of Model Engineers. Please click the number that is presented to you on the right side of the word "click".</td>
- </table></form><p><div id="coord" onClick="submitform(xcoord(event))" class="cd"></div></div><p></div>
- </td>
- </tr>
- </table>
- </body>
- </html>
- <?php ob_end_flush(); ?>
Je tiens à remercier toutes les personnes pour toute aide, que je peux obtenir là-dessus à l'avance.
- Anonymous
- Bot


- Inscription: 25 Feb 2008
- Messages: ?
- Loc: Ozzuland
- Status: Online
Janvier 22nd, 2013, 4:05 am
- ScottG
- Proficient


- Inscription: Juil 06, 2010
- Messages: 260
- Status: Offline
OK, donc je vois quelques choses, une chose est avec les fichiers include, que vous n'avez pas besoin de faire comme son propre page séparée. N'inclure que ce qui est nécessaire.
Mauvais exemple (ce que votre train de faire)
h.php
contact_us.php
Sortie (ce qui obtient construit)
Bon exemple
h.php
contact_us.php
Sortie (ce qui obtient construit)
et l'autre est que vous cherchez ici h.php http://rsme.org/h.php où il n'existe pas le fichier se trouve ici http://rsme.org/beta3/h.php donc inclure la bonne déclaration serait
Mauvais exemple (ce que votre train de faire)
h.php
HTML Code: [ Select ]
<html>
<head>
<title>Hotbox</title>
<head>
<body>
Some content
</body>
</html>
<head>
<title>Hotbox</title>
<head>
<body>
Some content
</body>
</html>
- <html>
- <head>
- <title>Hotbox</title>
- <head>
- <body>
- Some content
- </body>
- </html>
contact_us.php
HTML Code: [ Select ]
<html>
<head>
<title>Contact Us</title>
<head>
<body>
<?php include("../h.php"); ?>
Some content For the contact page
</body>
</html>
<head>
<title>Contact Us</title>
<head>
<body>
<?php include("../h.php"); ?>
Some content For the contact page
</body>
</html>
- <html>
- <head>
- <title>Contact Us</title>
- <head>
- <body>
- <?php include("../h.php"); ?>
- Some content For the contact page
- </body>
- </html>
Sortie (ce qui obtient construit)
HTML Code: [ Select ]
<html>
<head>
<title>Contact Us</title>
<head>
<body>
<html>
<head>
<title>Hotbox</title>
<head>
<body>
Some content
</body>
</html>
Some content For the contact page
</body>
</html>
<head>
<title>Contact Us</title>
<head>
<body>
<html>
<head>
<title>Hotbox</title>
<head>
<body>
Some content
</body>
</html>
Some content For the contact page
</body>
</html>
- <html>
- <head>
- <title>Contact Us</title>
- <head>
- <body>
- <html>
- <head>
- <title>Hotbox</title>
- <head>
- <body>
- Some content
- </body>
- </html>
- Some content For the contact page
- </body>
- </html>
Bon exemple
h.php
HTML Code: [ Select ]
Some Content
- Some Content
contact_us.php
HTML Code: [ Select ]
<html>
<head>
<title>Contact Us</title>
<head>
<body>
<?php include("../h.php"); ?>
Some content For the contact page
</body>
</html>
<head>
<title>Contact Us</title>
<head>
<body>
<?php include("../h.php"); ?>
Some content For the contact page
</body>
</html>
- <html>
- <head>
- <title>Contact Us</title>
- <head>
- <body>
- <?php include("../h.php"); ?>
- Some content For the contact page
- </body>
- </html>
Sortie (ce qui obtient construit)
HTML Code: [ Select ]
<html>
<head>
<title>Contact Us</title>
<head>
<body>
Some Content
Some content For the contact page
</body>
</html>
<head>
<title>Contact Us</title>
<head>
<body>
Some Content
Some content For the contact page
</body>
</html>
- <html>
- <head>
- <title>Contact Us</title>
- <head>
- <body>
- Some Content
- Some content For the contact page
- </body>
- </html>
et l'autre est que vous cherchez ici h.php http://rsme.org/h.php où il n'existe pas le fichier se trouve ici http://rsme.org/beta3/h.php donc inclure la bonne déclaration serait
PHP Code: [ Select ]
<?php include("h.php"); ?>
- <?php include("h.php"); ?>
- RSMEDUDE
- Novice


- Inscription: Juil 10, 2004
- Messages: 33
- Status: Offline
Salut ScottG,
Merci pour la réponse. Je vois ce que vous entendez par avoir trop d'informations dans le fichier include (h.php). Il s'agissait de ma première tentative à faire cela, et étant donné que je n'ai pas couru aucun problèmes sur les fichiers initiaux, je ne pense pas que cela causerait un problème. Cela dit ce que vous êtes montrant moi ici fait sens pour moi.
J'ai fait le changement dans le fichier include afin que seuls le code nécessaire pour rendre l'information travail est là. J'ai alors téléchargé le fichier à nouveau et fait en sorte que cela a fonctionné encore sur les pages qu'il a précédemment travaillé sur. Il extrait aussi bon.
J'ai regardé puis effectuer les modifications au fichier de contenu (contact_us.php). La seule chose qui me tient vers le haut de changer cela est le fait que j'ai ce fichier dans un sous-dossier. Je suis en train d'écrire tout en ce sens que le dossier beta3 est le répertoire racine. Ceci étant dit que le fichier contact_us.php est en fait situé dans un dossier appelé des formes. La structure de répertoire ressemble à cette (root%/beta3/forms %). Le fichier h.php se tient dans le répertoire beta3 qui est censé pour agir comme répertoire racine pour des fins de test. Là, car si je comprends bien les choses, j'ai besoin de dire le codage pour regarder en arrière un répertoire pour trouver h.php. Cela a-t-il un sens ? Donc je me suis assuré une fois de plus que la ligne include regardé sur contact_us.php mais je reçois toujours la même chose. J'ai vider mon cache et heureux tout ce jazz. Je ne vois pas comment le faire en tapant.../h.php rendrait aller tout le chemin du retour vers le répertoire racine « réel » ( http://www.rsme.org ) où le site actif est en cours d'exécution. Ai-je raté quelque chose ?
Je peux poster nouveau codage si nécessaire !
Merci pour la réponse. Je vois ce que vous entendez par avoir trop d'informations dans le fichier include (h.php). Il s'agissait de ma première tentative à faire cela, et étant donné que je n'ai pas couru aucun problèmes sur les fichiers initiaux, je ne pense pas que cela causerait un problème. Cela dit ce que vous êtes montrant moi ici fait sens pour moi.
J'ai fait le changement dans le fichier include afin que seuls le code nécessaire pour rendre l'information travail est là. J'ai alors téléchargé le fichier à nouveau et fait en sorte que cela a fonctionné encore sur les pages qu'il a précédemment travaillé sur. Il extrait aussi bon.
J'ai regardé puis effectuer les modifications au fichier de contenu (contact_us.php). La seule chose qui me tient vers le haut de changer cela est le fait que j'ai ce fichier dans un sous-dossier. Je suis en train d'écrire tout en ce sens que le dossier beta3 est le répertoire racine. Ceci étant dit que le fichier contact_us.php est en fait situé dans un dossier appelé des formes. La structure de répertoire ressemble à cette (root%/beta3/forms %). Le fichier h.php se tient dans le répertoire beta3 qui est censé pour agir comme répertoire racine pour des fins de test. Là, car si je comprends bien les choses, j'ai besoin de dire le codage pour regarder en arrière un répertoire pour trouver h.php. Cela a-t-il un sens ? Donc je me suis assuré une fois de plus que la ligne include regardé sur contact_us.php mais je reçois toujours la même chose. J'ai vider mon cache et heureux tout ce jazz. Je ne vois pas comment le faire en tapant.../h.php rendrait aller tout le chemin du retour vers le répertoire racine « réel » ( http://www.rsme.org ) où le site actif est en cours d'exécution. Ai-je raté quelque chose ?
Je peux poster nouveau codage si nécessaire !
- ScottG
- Proficient


- Inscription: Juil 06, 2010
- Messages: 260
- Status: Offline
La raison pour laquelle que cela semble étrange est l'utilisation d'images que j'ai utilisé les informations que j'avais sous la main pour arriver à la conclusion, où le fichier a été assis et il a semblé être assis dans le dossier beta3 c'est pourquoi j'ai dit que.../ vous faudrait remonter d'un niveau ou à vos racines. Ceci étant dit le lien pour le contact nous page http://rsme.org/forms/contact_us.php et pas http://rsme.org/beta3/forms/contact_us.php car je reste loin de l'utilisation de cadres ayant.../ sur la page contact vous prendrait le le dossier beta3 si vous êtes allé directement àhttp://rsme.org/beta3/forms/contact_us.php
Je n'ai pas utilisé des images, Oh dans environ 10++ ans donc je ne sais pas si il y aurait un problème de portée avec des essais que je pouvais faire lorsque j'arrive à travailler demain ou devrais-je dire aujourd'hui
Je n'ai pas utilisé des images, Oh dans environ 10++ ans donc je ne sais pas si il y aurait un problème de portée avec des essais que je pouvais faire lorsque j'arrive à travailler demain ou devrais-je dire aujourd'hui
- ScottG
- Proficient


- Inscription: Juil 06, 2010
- Messages: 260
- Status: Offline
- ScottG
- Proficient


- Inscription: Juil 06, 2010
- Messages: 260
- Status: Offline
J'ai aussi ne pouvais m'empêcher remarquer que le reste du site a également plusieurs balises de tête et le corps ne sais pas si il est sur toutes les pages ou non, mais quelque chose à regarder.
J'ai vu beaucoup de cassé et désapprouvées tags utilisés dans la page d'accueil.
Im va inclure mon projet de test. J'ai aussi jeté ainsi une maquette rapide de votre site avec l'aide d'images basés sur la structure de fichiers que j'utilise dans tous mes projets.
J'ai mis le plus de travail à se débarrasser de toutes les balises dépréciées et tags cassés sur l'index. J'ai fait place titulaire pages pour plus les autres pages à l'exception de la livre de guess, galerie photo, calendrier et whats nouvelles pages en raison de la structure de dossiers que vous avez configuré. Vous pouvez utiliser le cadre moins d'installation si vous voulez continuez à utiliser les cadres son votre appel.
Cela n'a pas fallu me tarde de faire si vous continuez à utiliser les cadres n'est complètement amende.
J'ai vu beaucoup de cassé et désapprouvées tags utilisés dans la page d'accueil.
Im va inclure mon projet de test. J'ai aussi jeté ainsi une maquette rapide de votre site avec l'aide d'images basés sur la structure de fichiers que j'utilise dans tous mes projets.
J'ai mis le plus de travail à se débarrasser de toutes les balises dépréciées et tags cassés sur l'index. J'ai fait place titulaire pages pour plus les autres pages à l'exception de la livre de guess, galerie photo, calendrier et whats nouvelles pages en raison de la structure de dossiers que vous avez configuré. Vous pouvez utiliser le cadre moins d'installation si vous voulez continuez à utiliser les cadres son votre appel.
Cela n'a pas fallu me tarde de faire si vous continuez à utiliser les cadres n'est complètement amende.
Attachments:
Attachments:
Page 1 sur 1
Pour répondre à ce sujet, vous devez vous connecter ou vous enregistrer. Il est gratuit.
Afficher de l'information
- Total des messages de ce sujet: 6 messages
- Utilisateurs parcourant ce forum: Aucun utilisateur enregistré et 142 invités
- Vous ne pouvez pas poster de nouveaux sujets
- Vous ne pouvez pas répondre aux sujets
- Vous ne pouvez pas éditer vos messages
- Vous ne pouvez pas supprimer vos messages
- Vous ne pouvez pas joindre des fichiers
