TalkPHP
 
 
Account Login
Latest Articles
» The basic usage of PHPTAL, a XML/XHTML template library for PHP
» Vulnerable methods and the areas they are commonly trusted in.
» Simple way to protect a form from bot
» The Basics On: How Session Stealing Works
» How to keep your forms from double posting data
IRC Channel
IRC Speech Bubble Join the friendly bunch on IRC...
(#TalkPHP on Freenode)

...Also available via a web interface.

See this thread for information on the TalkPHP Free Hugs Initiative™. Subject to availability.
Associates
Associates
CSS Tutorials
Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old 06-09-2008, 04:44 AM   #1 (permalink)
The Acquainted
 
Peuplarchie's Avatar
 
Join Date: May 2008
Location: Québec
Posts: 104
Thanks: 10
Peuplarchie is on a distinguished road
Application Can't solve browser error

Good day to you all,
I have a page, code given below, which give me 2 different error in explorer than firefox.


Explorer error:
1) when I click on a photos, it return an error on line 179, will be hightlighted in the code below. It should open images_test.php in div id cont. work in firefox.

Firefox error:
1) The second menu, list directory, the menu don't appear. work in explorer .


Common error ;
1) in both browser, as in another thread, in the second menu, there is an arrow on each option of the sub menu, even if there is no folder in that folder.

PHP Code:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>The Ponder - Marc Richer</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<META HTTP-EQUIV="imagetoolbar" CONTENT="no" />

<link rel="stylesheet" href="style.css" type="text/css" />
<script type="text/javascript" src="dolphin.js"></script>
<link rel="stylesheet" type="text/css" href="pro_dropdown_2.css" />
<script src="stuHover.js" type="text/javascript"></script>




<style><!--
a:hover{text-decoration: underline ;}
a:hover{font-weight: bold;}

.black0 {
font-size: 12px;
font-family: georgia, Arial, Helvetica, sans-serif;
text-decoration: none;
color: #000000;}
.black000 {
font-size: 12px;
font-family:  Arial, Helvetica, sans-serif;
text-decoration: none;
color: #000000;}
.black002 {
font-size: 18px;
font-family:   Arial, Helvetica, sans-serif;
text-decoration: none;
color: #000000;}
.blue002 {
font-size: 18px;
font-family:   Arial, Helvetica, sans-serif;
text-decoration: none;
color: #003366;}
.blue0 {
font-size: 12px;
font-family: georgia,Arial, Helvetica, sans-serif;
text-decoration: none;
color: #003366;}
.black02 {
font-size: 15px;
font-family: georgia,Arial, Helvetica, sans-serif;
text-decoration: none;
color: #000000;}
.black00 {
font-size: 10px;
font-family: georgia,Arial, Helvetica, sans-serif;
text-decoration: none;
color: #000000;}
.white00 {
font-size: 15px;
font-family: georgia,Arial, Helvetica, sans-serif;
text-decoration: none;
color: #ffffff;}
.white000 {
font-size: 10px;
font-family: Arial, Helvetica, sans-serif;
text-decoration: none;
color: #ffffff;}
.whitet {
font-size: 18px;
font-family: Arial, Helvetica, sans-serif;
text-decoration: none;
color: #000000;}
.red002 {
font-size: 18px;
font-family:   Arial, Helvetica, sans-serif;
text-decoration: none;
color: #cc0000;}


//-->
</style>






<style type="text/css">
 
#container {
margin-bottom:5px;
width:800px;
align:center;
position:center;
}
.rtop, .rbottom{display:block; }

.rtop *, .rbottom *{display: block; height: 1px; overflow: hidden; background: #1D6893;}
.rtop1 *, .rbottom1 *{display: block; height: 1px; overflow: hidden; background: #1D6893;}
.r1{margin: 0 5px;}

.r2{margin: 0 3px }

.r3{margin: 0 2px;
}

.r4{margin: 0 1px; height: 2px;}




 
#container0 {
margin-bottom:5px;
width:240px;
align:center;
position:center;
}
.rtop0, .rbottom0{display:block; }

.rtop0 *, .rbottom0 *{display: block; height: 1px; overflow: hidden; background: #000033;}
.rtop10 *, .rbottom10 *{display: block; height: 1px; overflow: hidden; background: #000033;}
.r10{margin: 0 5px;}

.r20{margin: 0 3px }

.r30{margin: 0 2px;
}

.r40{margin: 0 1px; height: 2px;}


</style>





<script type="text/javascript">



/***********************************************
* Dynamic Ajax Content- © Dynamic Drive DHTML code library (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit Dynamic Drive at http://www.dynamicdrive.com/ for full source code
***********************************************/

var bustcachevar=1 //bust potential caching of external pages after initial request? (1=yes, 0=no)
var loadedobjects=""
var rootdomain="http://"+window.location.hostname
var bustcacheparameter=""

function ajaxpage(url, containerid){
var page_request = false
if (window.XMLHttpRequest) // if Mozilla, Safari etc
page_request = new XMLHttpRequest()
else if (window.ActiveXObject){ // if IE
try {
page_request = new ActiveXObject("Msxml2.XMLHTTP")

catch (e){
try{
page_request = new ActiveXObject("Microsoft.XMLHTTP")
}
catch (e){}
}
}
else
return false
page_request.onreadystatechange=function(){
loadpage(page_request, containerid)
}
if (bustcachevar) //if bust caching of external page
bustcacheparameter=(url.indexOf("?")!=-1)? "&"+new Date().getTime() : "?"+new Date().getTime()
page_request.open('GET', url+bustcacheparameter, true)
page_request.send(null)
}

function loadpage(page_request, containerid){
if (page_request.readyState == 4 && (page_request.status==200 || window.location.href.indexOf("http")==-1))
document.getElementById(containerid).innerHTML=page_request.responseText
}

function loadobjs(){
if (!document.getElementById)
return
for (i=0; i<arguments.length; i++){
var file=arguments[i]
var fileref=""
if (loadedobjects.indexOf(file)==-1){ //Check to see if this object has not already been added to page before proceeding
if (file.indexOf(".js")!=-1){ //If object is a js file
fileref=document.createElement('script')
fileref.setAttribute("type","text/javascript");
fileref.setAttribute("src", file);
}
else if (file.indexOf(".css")!=-1){ //If object is a css file
fileref=document.createElement("link")
fileref.setAttribute("rel", "stylesheet");
fileref.setAttribute("type", "text/css");
fileref.setAttribute("href", file);
}
}
if (fileref!=""){
document.getElementsByTagName("head").item(0).appendChild(fileref)
loadedobjects+=file+" " //Remember this object as being already added to page
}
}
}


</script>



<script type="text/javascript">

/***********************************************
* Ajax Includes script- © Dynamic Drive DHTML code library (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit Dynamic Drive at http://www.dynamicdrive.com/ for full source code
***********************************************/

//To include a page, invoke ajaxinclude("afile.htm") in the BODY of page
//Included file MUST be from the same domain as the page displaying it.

var rootdomain="http://"+window.location.hostname

function ajaxinclude(url) {
var page_request = false
if (window.XMLHttpRequest) // if Mozilla, Safari etc
page_request = new XMLHttpRequest()
else if (window.ActiveXObject){ // if IE
try {
page_request = new ActiveXObject("Msxml2.XMLHTTP")

catch (e){
try{
page_request = new ActiveXObject("Microsoft.XMLHTTP")
}
catch (e){}
}
}
else
return false
page_request.open('GET', url, false) //get page synchronously 
page_request.send(null)
writecontent(page_request)
}

function writecontent(page_request){
if (window.location.href.indexOf("http")==-1 || page_request.status==200)
document.write(page_request.responseText)
}

</script>










</head>

<body bgcolor="#000000" align="center" link="black" alink="red" vlink="blue">




<center>

<div id="container" align="center">

<b class="rtop">

<b class="r1"></b> <b class="r2"></b> <b class="r3"></b> <b class="r4"></b>

</b>
<div style="background:#1D6893; color: #fff; font-family:verdana;font-size:12px; padding:5px;text-align:left; width:790px;" align="center">





<?PHP

$myFile 
"http://ponder.peuplies.info/V_0-1/Muraille/Change-panorama/change_panorama.txt";
$fh fopen($myFile'r');
$outputt fgets($fh);
$output str_replace("../..""http://ponder.peuplies.info/V_0-1"$outputt );
fclose($fh);

echo 
'<table border="0" cellpadding="0" cellspacing="0" align="center">
<tr><td  width="780" align="center">
<img src="'
.$output.'" width="780" />
</td></tr>'
;


//FIRST MENU
?>

<tr><td bgcolor="#003366" width="780" align="center"><table border="0" cellpadding="0" cellspacing="0" align="center" bgcolor="#003366">
<tr><td width="780" align="center" bgcolor="#003366">

    <div id="dolphincontainer">
    <div id="dolphinnav">
    <ul>
    <li><a href="http://test.com/V_0-1/index.php" rel="home"><span>Home - Acceuil</span></a></li>
    <li><a href="http://ponder.peuplies.info/V_0-1/Blog/blog.php" rel="blog"><span>Blog</span></a></li>
    <li><a href="http://test.com/V_0-1/Art/index.php" rel="pictures"><span>Pictures - Photos</span></a></li>
    <li><a href="http://test.com/V_0-1/Members/members_index.php" rel="members"><span>Members - Membres</span></a></li>
    <li><a href="http://test.com/V_0-1/Contact/contact.php" rel="contact"><span>Contact Us - Nous joindre</span></a></li>
    </ul>
    </div>
    
    <!-- Sub Menus container. Do not remove -->
    <div id="dolphin_inner">

    <div id="home" class="innercontent">
    ThePonder.ca
    </div>

    <div id="blog" class="innercontent">
    Blog of ThePonder.ca  ||  Blog de ThePonder.ca
    </div>

    <div id="pictures" class="innercontent">
    Picture gallery of ThePonder.ca  ||  Gallerie photos de ThePonder.ca
    </div>

    <div id="members" class="innercontent">
    Members area of ThePonder.ca  ||  Section membres de ThePonder.ca
    </div>

    <div id="contact" class="innercontent">
    Contact ThePonder.ca  ||  Joindre ThePonder.ca
    </div>
    <!-- End Sub Menus container -->
    </div>

    </div>


<script type="text/javascript">

//dolphintabs.init("ID_OF_TAB_MENU_ITSELF", SELECTED_INDEX)
dolphintabs.init("dolphinnav", 2)

</script>

</td></tr>
</table>

<tr><td width="780" align="center" bgcolor="#1D6893"><br></td></tr>

<tr><td width="780" align="left" bgcolor="#cccccc">



//SECOND MENU


 <? 

    
echo "<ul id=\"nav\">\r";
        echo 
"<li class=\"top\"><a href=\"#\" class=\"top_link\"><span class=\"down\">For Sales - &Agrave; Vendre</span></a></li>\r";
        echo 
"<ul class=\"sub\">\r";
function 
dirlist($dir$ul=true
{     
 
        
$dh opendir($dir); 
        
// the trick is creating the appropriate list tags 
        // before and after the loop 
        // however if the folder is empty then there shouldn't
        // be any UL tags. $isleaf keeps track of that
        
$isleaf=true;
        while((
$file readdir($dh)) !== false
        { 
                if(
$file == "." || $file == ".."
                        continue; 
                
$filed $file;
                
$file $dir "/" $file;
                if(
is_dir($file)) 
                { 
                
                        if (
$isleaf) { $isleaf=false; if ($ul) echo "<ul>\r"; }
                        echo 
"<li><a href=\"http://ponder.peuplies.info/V_0-1/Art/test_images.php?folder=$file\" class=\"fly\">$filed</a></li>\r"

                        
dirlist($dir."/".$filed);

 
               }
        } 
        if (!
$isleaf && $ul) echo "</ul>\r"


}    

dirlist ("Pictures/Pics/Pic-S"false);

echo 
"</ul>";


        echo 
"<li class=\"top\"><a href=\"#\" class=\"top_link\"><span class=\"down\">For Sale Themed - &Agrave; vendre class&eacute;es</span></a></li>\r";
        echo 
"<ul class=\"sub\">\r";
function 
dirlistss($dirss$ulss=true
{     
 
        
$dhss opendir($dirss); 
        
// the trick is creating the appropriate list tags 
        // before and after the loop 
        // however if the folder is empty then there shouldn't
        // be any UL tags. $isleaf keeps track of that
        
$isleafss=true;
        while((
$filess readdir($dhss)) !== false
        { 
                if(
$filess == "." || $filess == ".."
                        continue; 
                
$filedss $filess;
                
$filess $dirss "/" $filess;
                if(
is_dir($filess)) 
                { 
                
                        if (
$isleafss) { $isleafss=false; if ($ulss) echo "<ul>\r"; }
                        echo 
"<li><a href=\"http://ponder.peuplies.info/V_0-1/Art/test_images.php?folder=$filess\" class=\"blue0\">$filedss</a></li>\r"

                        
dirlist($dirss."/".$filedss);

 
               }
        } 
        if (!
$isleafss && $ulss) echo "</ul>\r"


}    

dirlistss ("Pictures/Category/Pic-S"false);



?>
</ul>









<tr><td width="780" align="center" bgcolor="#ffffff"><br></td></tr>
<tr><td width="780" align="center" bgcolor="#ffffff"><b class="blue0">Click on an image to see it full size ! -- Cliquer sur une image pour la voir en grand format !</b></td></tr>


<tr><td width="780" bgcolor="#ffffff" align="center" valign="top"><table valign="top" align="center" width="100%" border="0">
<tr><td width="500" bgcolor="#ffffff" align="center" valign="top"><table valign="top" align="center" width="100%" border="0">




<?php
//LIST IMAGES DIRECTORY



$imgdir$_GET['folder'];
$imgdir.="/";

   
 
$allowed_types = array('.png','.jpg','.jpeg','.gif'); // list of filetypes you want to show

$images = array();
chdir($imgdir);
$dimg opendir('.');

while(
false !== ($imgfile readdir($dimg)))
{
    
$ext strtolower(strrchr($imgfile'.'));
    if(
in_array($ext$allowed_types)){
        
$images[] = $imgfile;
    } 
}

usort($images'sort_by_date_and_size');

function 
sort_by_date_and_size($a$b){
   
$timeA filemtime($a);
   
$timeB filemtime($b);
   if (
date('M-d-Y'$timeA) == date('M-d-Y'$timeB)){
       
//Compare layout sizes.
       
$hA date('H'$timeA);
       
$hB date('H'$timeB);
       if (
$hA <12 && $hB 12 || $hA >= 12 && $hB >= 12){
           return 
0;
           
       }
       else if (
$hA 12){
           return -
1;
       }
       else {
           return 
1;
       }
   }
   else {
       return 
$timeB-$timeA;


   }
}  
  

  
       foreach (
$images as $img) {
echo 
"<a href=\"javascript:ajaxpage('images_test.php?pathqq=".$imgdir."&imageqq=".$img."', 'cont');\" >"
echo 
"<img src=\"http://ponder.peuplies.info/V_0-1/Art/".$imgdir."".$img."\" width=\"50\" border=\"0\" title=\"".$img."\" alt=\"".$img."\" /></a>";

}

?>




//DIV ID CONT --- WHERE IMAGES_TEST.PHP SHOW
</table>
</td>
   <td width="270" bgcolor="#cccccc" align="center" valign="top"><table valign="top" align="center" width="260" border="0" cellspacing="0">
   <div id="cont" name="cont" with="260"></div>

</td></tr>
</table>

</table>
</table>





</div>

<!--content goes here -->

<b class="rbottom">

<b class="r4"></b> <b class="r3"></b> <b class="r2"></b> <b class="r1"></b>

</b>

</div>


</center>



</body>
</html>
__________________
That's why we are not alone on earth... let's build !
Peuplarchie is offline  
Reply With Quote
Old 06-09-2008, 05:48 AM   #2 (permalink)
The Frequenter
 
Join Date: Dec 2007
Location: In my basement
Posts: 386
Thanks: 47
Aaron is on a distinguished road
Default

dude, I have one thing to say... Your selectors are extremely confusing.
__________________
Signatures are nothing but incriminating.
Send a message via MSN to Aaron
Aaron is offline  
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


All times are GMT. The time now is 04:57 AM.

 
     

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Inactive Reminders By Icora Web Design