| Server IP : 180.180.241.3 / Your IP : 216.73.216.25 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/login.importid/ |
Upload File : |
<?
;
ob_start();
ini_set("max_execution_time",600);
include ("../inc/config.inc.php");
head();
include ("_REQPERM.php");
mn_lib();
$indexpertime=getval("_SETTING","indexeachround");
if ($newindex=="yes") {
tmq("update media set reindexstatus='no' where importid='$ID'");
}
if ($contindex=="yes") {
//find current page
$calpage =tmq("select id from media where importid='$ID' and reindexstatus='yes' " );
$page=floor(tmq_num_rows($calpage) / $indexpertime);
}
if ($ID=="[EMPTY]") {
$ID="";
}
if ($page=="") {
$page=1;
}
$sql ="select id from media where importid='$ID'" ;
$s=tmq($sql);
$n=tmq_num_rows($s);
$numset=ceil($n / $indexpertime);
$redirpath="index.php";
if ($n>$indexpertime) {
if ($page>($numset+1)) {
?><SCRIPT LANGUAGE="JavaScript">
<!--
alert("INDEX COMPLETED");
//-->
</SCRIPT><?
redir("index.php",0);
die;
}
?><BR><BR><CENTER><? echo getlang("เนื่องจากเป็นการ Index ข้อมูลจำนวนมาก จึงแบ่งการ Index ออกเป็น ::l::To re-index large amount of data, system will split index operation to"); ?><? echo $numset+1 ?> <? echo getlang("ครั้ง ครั้งละ ประมาณ ::l::round. Estimated "); ?><BR>
<? echo $indexpertime ?> <? echo getlang("รายการ ขณะนี้เป็นการ Index รอบที่::l::records/round current round is"); ?>
<? echo $page ?>/<? echo $numset +1?><BR>
<? echo getlang("หลังจาก Index เสร็จใจแต่ละรอบ โปรแกรมจะเริ่มทำการ Index รอบต่อไปโดยอัตโนมัติ::l::. After finish this round system will continue automatically"); ?><BR><BR><BR>
<FONT SIZE="" COLOR="#5D5D5D"><B><H1>[<? echo $page ?>/<? echo $numset +1?>]</H1></B></FONT><BR><?
echo html_graph("V",$numset+1,$page,20,500,"#3DB66D");
?><BR><I>Indexing ....</I></CENTER><?
$redirpath="reindex.php?ID=$ID&page=".($page+1);
}
ob_flush();
sleep(1);
$sql ="select * from media where importid='$ID' and reindexstatus='no' limit 0 , $indexpertime" ;
//$sql ="select id from media where importid='$ID' and reindexstatus='no' limit " . (($page-1)*$indexpertime) ." , $indexpertime" ;
$s=tmq($sql);
while ($r=tmq_fetch_array($s)) {
tmq("update media set reindexstatus='yes' where importid='$ID' and randid='$r[randid]' ");
index_reindex($r[randid]);
}
/////////////////////////////////////////////
redir("$redirpath",1);
foot();
?>