34 include(
"../class/config.php");
38 "caller" => array (
"request",
"string",
""),
39 "select" => array (
"request",
"string",
""),
40 "curdir" => array (
"request",
"string",
""),
41 "lastcurdir" => array (
"request",
"string",
""),
42 "file" => array (
"request",
"string",
""),
43 "bid" => array (
"request",
"string",
""),
51 $rot=substr($curdir,0,$pos);
52 $next=@strpos($curdir,
"/",$pos+1);
53 $nextstr=substr($curdir,$pos+1,$next-$pos-1);
54 $c=opendir($root.$rot);
56 while (
$r=readdir(
$c)) {
57 if (is_dir($root.$rot.
"/".
$r) &&
$r!=
"." &&
$r!=
"..") { $tmp[
$i++]=
$r; }
60 foreach ($tmp as
$r) {
62 $brlist[]=array(
"dir"=>$r,
"level"=>$level,
"put"=>
ife($curdir==$rot.
"/".$r.
"/",
"",$rot.
"/".$r));
72 $pat=explode(
"/",$curdir);
73 $brlist=array(array(
"dir"=>
"/",
"level"=>0,
"put"=>
ife($curdir==
"/",
"",
"/") ));
81 if (substr($file,0,1)!=
"/") $file=
"/".$file;
82 if (substr($file,-1)!=
"/") $file.=
"/";
83 if (!$file) $file=
"/";
89 <!DOCTYPE html PUBLIC
"-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
90 <html xmlns=
"http://www.w3.org/1999/xhtml" xml:lang=
"fr" lang=
"fr">
92 <title>Recherche
d'un dossier</title>
93 <link rel="stylesheet" href="styles/style.css" type="text/css" />
94 <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
95 <script src="js/jquery.min_embedded.js" type="text/javascript"></script>
96 <script type="text/javascript">
97 /* Fonction appellée lors du lancement d'un popup Fichier : */
98 function popupfile() {
100 if (document.forms[
"main"].file)
101 document.forms[
"main"].file.focus();
104 function addslashes(ch) {
105 ch = ch.replace(/\\/g,
"\\\\")
106 ch = ch.replace(/\
'/g,"\\'")
107 ch = ch.replace(/\"/g,"\\\
"")
113 window.parent.document.<?php echo $caller; ?>.value = addslashes( $(
"#file").val() );
114 window.parent.jQuery(
'#<?php echo $bid; ?>').dialog(
'close');
119 <body
class=
"light" onload=
"popupfile();">
120 <h3><?php
__(
"Searching for a folder"); ?></h3>
126 echo _(
"Error, cannot find this folder").
"<br />";
128 echo
"<a href=\"browseforfolder2.php?caller=".urlencode($caller).
"&curdir=".
$root.
"&bid=".$bid.
"\">"._(
"Back to the root folder").
"</a><br />";
133 <form method=
"post" id=
"main" name=
"main" action=
"browseforfolder2.php">
135 <input type=
"hidden" name=
"caller" value=
"<?php echo $caller; ?>" />
136 <input type=
"hidden" name=
"lastcurdir" value=
"<?php echo $curdir; ?>" />
137 <input type=
"hidden" name=
"bid" value=
"<?php echo $bid; ?>" />
139 <input type=
"text" class=
"int" id=
"file" name=
"file" size=
"20" value=
"<?php ehe($file); ?>" /><br />
141 <input type=
"button" name=
"select" value=
"<?php __("Select
"); ?>" class=
"inb" onclick=
"retour();" />
142 <input type=
"button" name=
"cancel" value=
"<?php __("Cancel
"); ?>" class=
"inb" onclick=
"window.parent.jQuery('#<?php echo $bid; ?>').dialog('close');" />
146 <table
style=
"border: 0" cellspacing=
"2" cellpadding=
"0">
152 echo
"<td width=\"16\"></td>";
153 if ($val[
"put"]!=
"") {
155 <td width=
"16"><img src=
"icon/folder.png" width=
"16" height=
"16" alt=
"" /></td>
159 <td width=
"16"><img src=
"icon/openfold.png" width=
"16" height=
"16" alt=
"" /></td>
162 echo
"<td colspan=\"".($maxlevel-$val[
"level"]+1).
"\">";
163 if ($val[
"put"]!=
"") {
164 echo
"<a href=\"browseforfolder2.php?caller=".urlencode($caller).
"&bid=".$bid.
"&file=".urlencode($val[
"put"]).
"\">".$val[
"dir"].
"</a>";
166 echo
"<b>".$val[
"dir"].
"</b>";
168 echo
"</td>\n</tr>\n";