Un poco de ayuda con archivos PHP incluyen
- RSMEDUDE
- Novice


- Registrado: Jul 10, 2004
- Mensajes: 33
- Status: Offline
Hola a todos,
Soy un miembro de mucho tiempo, pero muy rara vez publicar aquí. Para ello espero que estoy publicando esta cuestión en el lugar correcto.
Antes de empezar las cosas quiero decir que soy un novato con PHP. Estoy aprendiendo pero mucha de la codificación que estoy usando es ya sea una libre utilizar descarga con notación adecuada o codificación he descubierto cómo hacer junto fuera de cómo diferente sitios de trabajo.
Estoy tratando de trabajar en mi sitio Web clubes ferrocarril de modelo y lo que yo estoy tratando de lograr es hacer un encabezado de incluir el archivo para que tenga lo que llamamos el "cajas calientes" aparece en cada página. Los otros beneficios para esto son que el encabezado en última instancia será uniforme en todas las páginas y sólo tengo una página para editar las actualizaciones a las cajas "calientes". Tengo la mayor parte de las páginas funciona como quiero pero tengo algunos que están siendo un poco terco y no sé por qué.
Antes de mostrar el código para lo que quiero lograr aquí están algunos enlaces.
Esto es cómo el sitio parece y funciona ahora: sociedad de modelo ingenieros sitio principal de lectura
Esto es más o menos lo que quiero que se vea como: sitio de lectura sociedad de modelo ingenieros BETA
En el sitio BETA, verá que algunas páginas cargan la forma deberían con las cajas "calientes" en la parte superior mientras que otros la carga sin ella. Los que no son las páginas de mis problema. El código de ejemplo de lo que estoy trabajando con es a continuación es desde la página de h.php y la página de contact_us.php.
ARCHIVO: 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>
ARCHIVO: 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(); ?>
Me gustaría agradecer a todos por toda ayuda que puedo conseguir en esto de antemano.
Soy un miembro de mucho tiempo, pero muy rara vez publicar aquí. Para ello espero que estoy publicando esta cuestión en el lugar correcto.
Antes de empezar las cosas quiero decir que soy un novato con PHP. Estoy aprendiendo pero mucha de la codificación que estoy usando es ya sea una libre utilizar descarga con notación adecuada o codificación he descubierto cómo hacer junto fuera de cómo diferente sitios de trabajo.
Estoy tratando de trabajar en mi sitio Web clubes ferrocarril de modelo y lo que yo estoy tratando de lograr es hacer un encabezado de incluir el archivo para que tenga lo que llamamos el "cajas calientes" aparece en cada página. Los otros beneficios para esto son que el encabezado en última instancia será uniforme en todas las páginas y sólo tengo una página para editar las actualizaciones a las cajas "calientes". Tengo la mayor parte de las páginas funciona como quiero pero tengo algunos que están siendo un poco terco y no sé por qué.
Antes de mostrar el código para lo que quiero lograr aquí están algunos enlaces.
Esto es cómo el sitio parece y funciona ahora: sociedad de modelo ingenieros sitio principal de lectura
Esto es más o menos lo que quiero que se vea como: sitio de lectura sociedad de modelo ingenieros BETA
En el sitio BETA, verá que algunas páginas cargan la forma deberían con las cajas "calientes" en la parte superior mientras que otros la carga sin ella. Los que no son las páginas de mis problema. El código de ejemplo de lo que estoy trabajando con es a continuación es desde la página de h.php y la página de contact_us.php.
ARCHIVO: h.php
Código: [ 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>
ARCHIVO: contact_us.php
Código: [ 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(); ?>
Me gustaría agradecer a todos por toda ayuda que puedo conseguir en esto de antemano.
- Anonymous
- Bot


- Registrado: 25 Feb 2008
- Mensajes: ?
- Loc: Ozzuland
- Status: Online
Enero 22nd, 2013, 4:05 am
- ScottG
- Proficient


- Registrado: Jul 06, 2010
- Mensajes: 260
- Status: Offline
OK por lo que ver una cosa es con archivos de inclusión que no necesita hacerlo como su propia página separado un par de cosas. Incluir sólo lo que se necesita.
Mal ejemplo (lo que tu haciendo actualmente)
h.php
contact_us.php
Salida (lo que se construye)
Buen ejemplo
h.php
contact_us.php
Salida (lo que se construye)
y la otra es que buscas aquí h.php http://rsme.org/h.php donde no existe el archivo se encuentra aquí http://rsme.org/beta3/h.php para incluir la correcta declaración sería
Mal ejemplo (lo que tu haciendo actualmente)
h.php
HTML Código: [ 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 Código: [ 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>
Salida (lo que se construye)
HTML Código: [ 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>
Buen ejemplo
h.php
HTML Código: [ Select ]
Some Content
- Some Content
contact_us.php
HTML Código: [ 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>
Salida (lo que se construye)
HTML Código: [ 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>
y la otra es que buscas aquí h.php http://rsme.org/h.php donde no existe el archivo se encuentra aquí http://rsme.org/beta3/h.php para incluir la correcta declaración sería
PHP Código: [ Select ]
<?php include("h.php"); ?>
- <?php include("h.php"); ?>
- RSMEDUDE
- Novice


- Registrado: Jul 10, 2004
- Mensajes: 33
- Status: Offline
Hola ScottG,
Gracias por la respuesta. Veo que te refieres al tener demasiada información en el archivo de inclusión (h.php). Este fue mi primer intento en ello y ya que no se ejecutó en cualquier problema en los archivos iniciales que no pensé que esto podría causar un problema. Con dicho esto lo que está mostrando aquí tiene sentido para mí.
Yo hice el cambio para el archivo de inclusión de manera que sólo el código necesario para que la información existe trabajo. Luego subido el archivo nuevo y todavía hace que trabajó en las páginas que anteriormente estaba trabajando en. Este retirado como buena.
Entonces miré a realizar el cambio en el archivo de contenido (contact_us.php). Lo único que me sostiene en cambio es el hecho de que este archivo en una subcarpeta. Estoy tratando de escribir todo en el sentido de que la carpeta beta3 es el directorio raíz. Con esto que realmente se encuentra el archivo contact_us.php en una carpeta llamada formas. La estructura de directorios se ve como este (root%/beta3/forms %). El archivo h.php se celebra en el directorio de beta3 que se supone que actúa como el directorio raíz para propósitos de prueba. Allí para como entiendo las cosas que necesito decir la codificación para mirar hacia atrás un directorio para encontrar h.php. ¿Tiene esto sentido? Así que me aseguré de que una vez más que la línea de incluir mirado en contact_us.php pero yo todavía estoy recibiendo las mismas cosas. Purgar el caché de mi y todo lo que feliz jazz. No veo cómo escribiendo.../h.php sería ir hacia atrás en el directorio raíz «real» ( http://www.rsme.org ) donde se ejecuta el sitio Web activo. ¿Me estoy perdiendo algo allí?
¿Puedo publicar nueva codificación si realmente es necesario!
Gracias por la respuesta. Veo que te refieres al tener demasiada información en el archivo de inclusión (h.php). Este fue mi primer intento en ello y ya que no se ejecutó en cualquier problema en los archivos iniciales que no pensé que esto podría causar un problema. Con dicho esto lo que está mostrando aquí tiene sentido para mí.
Yo hice el cambio para el archivo de inclusión de manera que sólo el código necesario para que la información existe trabajo. Luego subido el archivo nuevo y todavía hace que trabajó en las páginas que anteriormente estaba trabajando en. Este retirado como buena.
Entonces miré a realizar el cambio en el archivo de contenido (contact_us.php). Lo único que me sostiene en cambio es el hecho de que este archivo en una subcarpeta. Estoy tratando de escribir todo en el sentido de que la carpeta beta3 es el directorio raíz. Con esto que realmente se encuentra el archivo contact_us.php en una carpeta llamada formas. La estructura de directorios se ve como este (root%/beta3/forms %). El archivo h.php se celebra en el directorio de beta3 que se supone que actúa como el directorio raíz para propósitos de prueba. Allí para como entiendo las cosas que necesito decir la codificación para mirar hacia atrás un directorio para encontrar h.php. ¿Tiene esto sentido? Así que me aseguré de que una vez más que la línea de incluir mirado en contact_us.php pero yo todavía estoy recibiendo las mismas cosas. Purgar el caché de mi y todo lo que feliz jazz. No veo cómo escribiendo.../h.php sería ir hacia atrás en el directorio raíz «real» ( http://www.rsme.org ) donde se ejecuta el sitio Web activo. ¿Me estoy perdiendo algo allí?
¿Puedo publicar nueva codificación si realmente es necesario!
- ScottG
- Proficient


- Registrado: Jul 06, 2010
- Mensajes: 260
- Status: Offline
La razón parece extraño es el uso de marcos que utiliza la información que tenía a la mano para llegar a la conclusión de que el archivo estaba sentado y parecía estar en la carpeta de beta3 es por eso que dije...se toma un nivel hacia arriba o a su raíz. con que ser dijo el link para el contacto nosotros página es http://rsme.org/forms/contact_us.php y no http://rsme.org/beta3/forms/contact_us.php ya me quedo lejos el uso de marcos que.../ en la página de contacto que tomaría el la carpeta beta3 Si fuiste directamente ahttp://rsme.org/beta3/forms/contact_us.php
No lo he usado marcos, Oh en 10++ unos años así que no sé si sería un problema de alcance con las pruebas de lo que pude hacer cuando llego a trabajar mañana o debo decir hoy
No lo he usado marcos, Oh en 10++ unos años así que no sé si sería un problema de alcance con las pruebas de lo que pude hacer cuando llego a trabajar mañana o debo decir hoy
- ScottG
- Proficient


- Registrado: Jul 06, 2010
- Mensajes: 260
- Status: Offline
- ScottG
- Proficient


- Registrado: Jul 06, 2010
- Mensajes: 260
- Status: Offline
También no he podido evitar pero note que el resto del sitio también tiene varias etiquetas de cabeza y el cuerpo no está seguro si en todas las páginas o no pero algo a mirar a.
He visto muchas etiquetas rotos y obsoletas, se utiliza sólo en la página principal.
IM va a incluir en mi proyecto de prueba. También lancé juntos un boceto rápido del sitio con utilizando marcos basados en la estructura de archivos que utilizo en todos mis proyectos.
Pongo más trabajo en la página de índice para deshacerse de todas las etiquetas obsoletas y roto. Hice lugar titular páginas para más otras páginas excepto el libro de guess, Galería de fotos, calendario y las páginas nuevo cuál es debido a la estructura de carpetas que se ha configurado. Puede utilizar el marco menos configuración si desea o seguir utilizando marcos de su su llamada.
Esto no me tomó mucho tiempo para hacer así que si usted continúa utilizando los marcos está completamente bien.
He visto muchas etiquetas rotos y obsoletas, se utiliza sólo en la página principal.
IM va a incluir en mi proyecto de prueba. También lancé juntos un boceto rápido del sitio con utilizando marcos basados en la estructura de archivos que utilizo en todos mis proyectos.
Pongo más trabajo en la página de índice para deshacerse de todas las etiquetas obsoletas y roto. Hice lugar titular páginas para más otras páginas excepto el libro de guess, Galería de fotos, calendario y las páginas nuevo cuál es debido a la estructura de carpetas que se ha configurado. Puede utilizar el marco menos configuración si desea o seguir utilizando marcos de su su llamada.
Esto no me tomó mucho tiempo para hacer así que si usted continúa utilizando los marcos está completamente bien.
Attachments:
Attachments:
Página 1 de 1
Para responder a este tema que necesita para ingresar o registrarse. Es gratis.
Publicar Información
- Total de mensajes en este tema: 6 mensajes
- Usuarios navegando por este Foro: No hay usuarios registrados visitando el Foro y 160 invitados
- No puede abrir nuevos temas en este Foro
- No puede responder a temas en este Foro
- No puede editar sus mensajes en este Foro
- No puede borrar sus mensajes en este Foro
- No puede enviar adjuntos en este Foro
