files.php
上传用户:jiangbw
上传日期:2022-03-16
资源大小:49k
文件大小:3k
- <?
- /*======================================================================*
- || #################################################################### ||
- || # BUILD UNDER PHP SCRIPTNET 3.2.1 FRAMEWORK ||
- || # ---------------------------------------------------------------- # ||
- || # Code2Art Open Source Software. All Rights Reserved. ||
- || # This file should be redistributed in whole or significant part. # ||
- || # ------------------ SCRIPTNET IS FREE SOFTWARE ------------------ # ||
- || # http://www.code2art.com | http://www.code2art.com/scriptnet # ||
- || # Copyleft by Benediktus Ardian Hersanto, SE # ||
- || # Sorry if this framework is still unavailable for public # ||
- || # because I still searching on my own head. # ||
- || #################################################################### ||
- *======================================================================*/
- /*======================================================================*
- || #################################################################### ||
- || DBF to MySQL Bulk Converter 2.0 ||
- ||______________________________________________________________________||
- || This utility was developed on 2006, since this were used to be on ||
- || my own library. But I think I should share it to you, because I ||
- || need to save my work on Internet (I don't believe on my own HD drive)||
- || it always crash and had a terrible bad sectors. ||
- || Thanks to all person who download this utility, I hope you enjoy it. ||
- || ||
- || Regards, ||
- || Benediktus Ardian Hersanto,SE (ardie_b@yahoo.com) ||
- /*======================================================================*/
- // ---------------------------------------------------------------------//
- // Free to use for everyone who understand PHP
- // ---------------------------------------------------------------------//
- include('init.php');
- LoadClass('session');
- set_time_limit(0);
- if(isset($_SESSION['source'])) {
- $session = new session;
- $session->session_destroy();
- }
- ?>
- <html>
- <head>
- <meta http-equiv="Content-Language" content="en-us">
- <meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
- <title>New Page 2</title>
- </head>
- <body topmargin="0" leftmargin="0" rightmargin="0" bottommargin="0" marginwidth="0" marginheight="0">
- <form name="dir_list" method="POST" target="_top" action="import.php">
- <?
- $d = dir(DEFAULT_DATA_DIR);
- ?>
- <table border="0" width="100%" cellspacing="0" cellpadding="0">
- <?
- $i = 0;
- while (false !== ($entry = $d->read())) {
- if(strlen($entry)>2) {
- $dirname = DEFAULT_DATA_DIR."/".$entry;
- if (is_dir($dirname)) {
- if ($dh = opendir($dirname)) {
- if(isset($files)) unset($files);
- while (($file = readdir($dh)) != false) {
- if(eregi('.dbf',strtolower(basename($file))))
- $files[] = $file;
- }
- closedir($dh);
- }
- }
- ?>
- <tr>
- <td width="20" align="center" bgcolor="<?=is_int($i/2)?"#C0C0C0":"#FFFFFF"?>">
-
- <p><input type="checkbox" name="<?=basename($entry,'.dbf')?>" value="<?=isset($files)?implode(",",$files):$entry?>"></p></td>
- <td bgcolor="<?=is_int($i/2)?"#C0C0C0":"#FFFFFF"?>"><?=$entry?></td>
- </tr>
- <? $i++;
- }
- }
- $d->close();
- ?>
- </table>
- <input name="dbname" type="hidden" value="">
- <input name="type" type="hidden" value="">
- </form>
- </body>
- </html>