Server IP : 180.180.241.3 / Your IP : 216.73.216.252 Web Server : Microsoft-IIS/7.5 System : Windows NT NETWORK-NHRC 6.1 build 7601 (Windows Server 2008 R2 Standard Edition Service Pack 1) i586 User : IUSR ( 0) PHP Version : 5.3.28 Disable Function : NONE MySQL : ON | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : C:/AppServ/www/umedia3/root.importer_indexword/ |
Upload File : |
<?php ; ini_set("max_execution_time",600); include ("../inc/config.inc.php"); head(); mn_root("importer_indexword"); pagesection(getlang("นำเข้าข้อมูลคำ::l::Word Importer")); $fpath=$dcrs."/_input/import/$file"; //echo $fpath; if (!file_exists($fpath)) { ?><CENTER><? echo getlang("หาไฟล์ที่ท่านเลือกไม่พบ กรุณา <A HREF='index.php'>คลิกที่นี่</A> เพื่อกลับไปเลือกไฟล์อีกครั้ง::l::Your choosed file not found <A HREF='index.php'>please click here</A> to continue"); ?></CENTER><? die; } ?> <BR> <CENTER><? echo getlang("ระบบกำลังเริ่มทำการนำเข้าข้อมูล::l::Starting import data to import process"); ?> <BR>... <BR>...<BR>... </CENTER><BR><TABLE align=center width=550> <? //echo("\$sep_rec=\"$sep_rec\";"); $file=barcodeval_get("importer_indexword-file"); $sep_rec=barcodeval_get("importer_indexword-sep_rec"); $fpath=$dcrs."/_input/import/$file"; //echo $fpath; if (!file_exists($fpath)) { ?><CENTER><? echo getlang("หาไฟล์ที่ท่านเลือกไม่พบ กรุณา <A HREF='index.php'>คลิกที่นี่</A> เพื่อกลับไปเลือกไฟล์อีกครั้ง::l::Your choosed file not found <A HREF='index.php'>please click here</A> to continue"); ?></CENTER><? die; } $sep_rec=stripslashes($sep_rec); eval("\$sep_rec=\"$sep_rec\";"); /* eval("\$sep_rec=\"$sep_rec\";"); eval("\$sep_field=\"$sep_field\";"); eval("\$cover_field=\"$cover_field\";"); */ // Note that !== did not exist until 4.0.0-RC2 $Stime=time(); $reclist=file_get_contents($fpath); $reclist=explode($sep_rec,$reclist); $reclistcount=count($reclist); if (count($reclist)<=2) { echo "Cannot find any record from your specification"; die; } $importdt=time(); $reclistcount=count($reclist); if ($reclistcount>50000) { $reclistcount=50000; } for ($i=0;$i<=$reclistcount;$i++) { $word=trim($reclist[$i]); if ($word!="") { indexword_insert("$word",$importdt,0,$importdt,"YES"); } } $Etime=time(); ?> </TABLE> <BR><CENTER><? echo getlang("การนำเข้าเรียบร้อย นำเข้า ::l::Import successfull "); ?><? echo number_format($i);?> <? echo getlang("รายการ โดยใช้เวลา::l:: records in"); ?> <? echo number_format(($Etime-$Stime));?> <? echo getlang("วินาที::l::second"); ?><BR> </CENTER> <BR><BR><TABLE align=center> <TR> <TD></TD> </TR> </TABLE> <BR><? foot(); ?>