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/inc/ |
Upload File : |
<? function index_reindex($mid) { global $dcrs; global $newline; global $dcrURL; index_remove($mid); $s=tmq("select * from media where randid='$mid' "); $s=tmq_fetch_array($s); $i=tmq("select * from index_ctrl "); $str=""; /// build tag str to âÁàÁ add in kw $mdts=tmq("select distinct word1 from webpage_bibtag where bibid='$s[ID]' ",false); $taggedlist=","; while ($mdtsr=tmq_fetch_array($mdts)) { $taggedlist.=",$mdtsr[word1]"; } $taggedlist.=","; $taggedlist=addslashes($taggedlist); $taggedlist=str_replace(',,',',',$taggedlist); // end build tag str //index year $ir2=tmq("select * from dcdir where tbname ='dc_date' ",false); $idxyea=""; while ($ir2r=tmq_fetch_array($ir2)) { //echo $ir2r[fid]." "; $eachrepeattag=tmq("select * from $ir2r[tbname] where mid='$mid' ",false); while($eachrepeattagr=tmq_fetch_array($eachrepeattag)) { for ($irep=0;$irep<=30;$irep++) { $tmp= $eachrepeattagr["f$irep"]; $tmp=explode('-',$tmp); $tmp=$tmp[0]; $idxyea=trim($idxyea,'|')."|" . $tmp; } } } //start find fttype $mdts=tmq("select * from media_ftitems where mid='$mid' ",false); $fttypelist=Array(); $strannotation=""; while ($mdtsr=tmq_fetch_array($mdts)) { if ($mdtsr[iscover]=="yes" &&$mdtsr[coveranddisplay]<>"yes" ) { continue; } $tmpmdstrtype=get_fttypecode($mdtsr); $fttypelist[]=$tmpmdstrtype; $mapp=tmq("select * from media_ftitems_anno where ftid='$mdtsr[id]' and mid='$mid' "); $thisanno=""; while ($mappr=tmq_fetch_array($mapp)) { $strannotation=$strannotation."|". addslashes($mappr[text]); $thisanno=$thisanno."|". addslashes($mappr[text]); } tmq("update media_ftitems set cachecate='$tmpmdstrtype',annostr='$thisanno' where id='$mdtsr[id]' ",false); } $fttypelist = array_unique($fttypelist); $fttypelist=implode(",", $fttypelist); //end find fttype $restmp=Array(); while ($ir=tmq_fetch_array($i)) { //echo "<B>$ir[name]</B>="; $ir2=tmq("select * from dcdir where $ir[fid] ='on' ",false); $tmp=""; while ($ir2r=tmq_fetch_array($ir2)) { //echo $ir2r[fid]." "; $eachrepeattag=tmq("select * from $ir2r[tbname] where mid='$mid' ",false); while($eachrepeattagr=tmq_fetch_array($eachrepeattag)) { for ($irep=0;$irep<=30;$irep++) { $tmp=trim($tmp,'|')."|" . $eachrepeattagr["f$irep"]; } } } //taggedlist s if ($ir[code]=="kw") { $tmp.="$taggedlist"; $tmp.="$strannotation"; } if ($ir[code]=="annostr") { $tmp.="$strannotation"; } //taggedlist e //$tmp=rem2space($tmp); //$tmp=substr($tmp,1); $tmp=trim($tmp,'|'); $tmp=addslashes($tmp); $str=$str . " $ir[fid]=\"$tmp\" ,"; //echo "<BR>"; $restmp[$ir[fid]]=$tmp; } //$str=index_markword($str); $str=trim($str,','); //start gather midtypes if (barcodeval_get("webpage-rmi-isenable")=="yes") { $indexiden=barcodeval_get("webpage-rmi-iden"); } /////////////////////////////////////////// if (barcodeval_get("webpage-rmi-isenable")=="yes") { $cover=tmq("select * from media_ftitems where iscover='yes' and mid='$mid' "); if (tmq_num_rows($cover)!=0) { $cover=tmq_fetch_array($cover); $coverurl=get_fturl($cover); if ($cover[uploadtype]=="upload") { $coverurl.=".thumb.jpg"; } } else { $coverurl="$dcrURL/neoimg/nocovergray.png"; } $indexmap=barcodeval_get("webpage-rmi-indexmap"); $indexiden=barcodeval_get("webpage-rmi-iden"); $indexdb=barcodeval_get("webpage-rmi-db"); $indexhost=barcodeval_get("webpage-rmi-host"); $indexuname=barcodeval_get("webpage-rmi-uname"); $indexpassw=barcodeval_get("webpage-rmi-passw"); $indexmap=explodenewline($indexmap); @reset($indexmap); $sq="insert into index_db set remoteindex='$indexiden' , remoteindex_ref='$mid' , remoteindex_cov='$coverurl' ,"; while (list($mk,$mv)=each($indexmap)) { $mv=explode('=',$mv); $mv[1]=trim($mv[1]); if ($mv[1]!="") { $sq.=" $mv[0]=\"".$restmp[$mv[0]]."\" ,"; //echo $mv[0]; } } $sq=trim($sq,','); aliceos_tmqs($sq,false,$indexdb,$indexhost,$indexuname,$indexpassw); } /////////////////////////////////////////// $str="insert into index_db set ". $str . " , mid='$mid', mdtype='$midlist', bibtag='$taggedlist', bcode='$midlist2', webpageshowcase='$s[webpageshowcase]', webpageshowcaseall='$s[webpageshowcaseall]', placelist='$placelist', lastactive='$s[lastactive]', LIBSITE='$s[LIBSITE]', useradminid='$s[useradminid]', fttypelist=',$fttypelist,', cate='$s[cate]', idxyea='$idxyea', importid='$s[importid]' "; tmq("$str ",false); //index_indexft($mid); include_once("$dcrs/dublin.bibrating.inc.php"); bibrating_recal($mid); //echo "[$str]"; } ?>