BIc_sortdir.php
Line #0:<?php
Line #1:
Line #2:require('bisql.php');
Line #3:body('','yellow','yellow');
Line #4:
Line #5:
Line #6://if (!empty($szures)) $szures='?';
Line #7://BI_alert($szures);
Line #8:
Line #9:$xx=0;
Line #10:
Line #11:$konyvtar=$_GET["konyvtar"];
Line #12:
Line #13:if (isset($konyvtar)){
Line #14:
Line #15:
Line #16:
Line #17:
Line #18:// if (!chdir($konyvtar)) die('<b>Error into CHDIR');
Line #19:
Line #20:
Line #21:
Line #22:$akonyvtar=getcwd();
Line #23:
Line #24:
Line #25:
Line #26:$Xkonyvtar=$akonyvtar.'/UpLoad';
Line #27:
Line #28:
Line #29:
Line #30: if (chdir($Xkonyvtar)) {
Line #31:// echo "Current directory is now: " . $Xkonyvtar . "\n";
Line #32:} else {
Line #33: echo $Xkonyvtar . "Couldn't change directory\n";
Line #34: exit;
Line #35:
Line #36:}
Line #37:
Line #38: $I=0;
Line #39: $d = dir($Xkonyvtar);
Line #40:// echo "DIR :".$Xkonyvtar."<br>\n";
Line #41:// echo "Handle:".$d->handle."<br>\n";
Line #42:// echo "Path :".$d->path."<br>\n";
Line #43:
Line #44:// if ($konyvtar==='.') $konyvtar=getcwd();
Line #45:
Line #46:
Line #47:
Line #48: while ($entry = $d->read()) {
Line #49:
Line #50:
Line #51: $szuki=1;
Line #52:
Line #53: if (!empty($szures)) {
Line #54:
Line #55: $szuki=strpos('*-*'.strtolower($entry), strtolower($szures));
Line #56: }
Line #57:
Line #58:// BI_alert($I.'/'.$entry.'szukind:'.$szuki);
Line #59:
Line #60:
Line #61: if ($entry != "." and $entry != ".." and $szuki>0 ) {
Line #62: $I++;
Line #63: $tomb[$I] = $entry;
Line #64:
Line #65:
Line #66: }
Line #67: }
Line #68:
Line #69:
Line #70:sort ($tomb);
Line #71:
Line #72:echo('<table width=600 height=40 border=1 text=black bgcolor=yellow><font color="black">');
Line #73:
Line #74:$diri=strpos($konyvtar, 'www.webjegy.hu/docs/')+20;
Line #75:$dirw=strlen($konyvtar);
Line #76:$dirp='http://www.webjegy.hu/'.substr($konyvtar,$diri,$dirw-$diri);
Line #77:
Line #78://BI_alert($I.'.db '.$dirw.':'.$dirp);
Line #79:
Line #80:
Line #81:if ($dirw-$diri>0) $dirp.='/';
Line #82:
Line #83:// echo "Path+ ".$dirp."<br>\n";
Line #84:
Line #85:for ($j= 0; $j < $I; $j++) {
Line #86:
Line #87: $entry = $tomb[$j];
Line #88: $meret = filesize($entry);
Line #89: $ido = date ("Y-m-d H:i:s.", filemtime($entry));
Line #90: $xx=$j+1;
Line #91:
Line #92:// BI_alert($entry.'/'.$xx.':'.$ido);
Line #93:
Line #94: echo '<tr><td ALIGN="right"><font color="black">'.$xx.'</td><td ALIGN="right">';
Line #95:// echo '<A STYLE="{color : green}" href="'.$dirp.$entry. '">'.$entry.'</td><td ALIGN="right">';
Line #96: echo '<A STYLE="{color : green}" href="'.$entry. '">'.$entry.'</td><td ALIGN="right">';
Line #97: echo $ido.'</td><td ALIGN="right">'.$meret."</td>";
Line #98:
Line #99: echo '<td ALIGN="center"><A href="phpline.php?&fajl='.$entry.'"><IMG SRC="edit.png" title="EDIT"></td>';
Line #100: echo '<td ALIGN="center"><A href="phpline.php?&fajl='.$entry.'"><IMG SRC="print.png" title="EDIT"></td>';
Line #101: echo '<td ALIGN="center"><A href="phpline.php?&fajl='.$entry.'"><IMG SRC="search.png" title="EDIT"></td>';
Line #102: echo '<td ALIGN="center"><A href="'.$dirp.$entry. '"><IMG SRC="drop.png" title="DELETE"></td>';
Line #103: if (strpos(strtolower($entry), '.new')>0) {
Line #104: echo '<td ALIGN="center"><A STYLE="{vlink : green}" href="sqlbin.php?&sqlfile='.$entry.'&sqlpar=new"><IMG SRC="key.png" title="SQL"></td>';
Line #105: }
Line #106: if (strpos(strtolower($entry), '.dat')>0) {
Line #107: echo '<td ALIGN="center"><A STYLE="{link-color : yellow}" href="sqlbin.php?&sqlfile='.$entry.'&sqlpar=dat"><IMG SRC="sql.png" title="SQL"></td>';
Line #108: }
Line #109:
Line #110: if (strpos(strtolower($entry), '.upd')>0) {
Line #111: echo '<td ALIGN="center"><A STYLE="{link-color : yellow}" href="sqlbin.php?&sqlfile='.$entry.'&sqlpar=dat"><IMG SRC="import.png" title="SQL"></td>';
Line #112: }
Line #113:
Line #114: echo "</font></tr>";
Line #115:
Line #116:}
Line #117:
Line #118:// print "<td align=center>
Line #119:// <a href=".$l."id=$r[$idxf]
Line #120:
Line #121:// </td>";
Line #122:
Line #123:
Line #124:// GVARlist();
Line #125:
Line #126:
Line #127:
Line #128: echo('</table>');
Line #129:
Line #130:
Line #131: $d->close();
Line #132:
Line #133:
Line #134:
Line #135:
Line #136:
Line #137:
Line #138:// exit;
Line #139:
Line #140:
Line #141:}
Line #142:?>