⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 index.php

📁 php-4.4.7学习linux时下载的源代码
💻 PHP
📖 第 1 页 / 共 3 页
字号:
	$pos=0;	$num='';		while(($sub[$pos]>='0')&&($sub[$pos]<='9')){		$num.=$sub[$pos++];	}		$str=ereg_replace('\$r'.$num, ''.$Randoms[$num], $str);    }    //    if (strstr($str,'$CL')&&($t=='res')) {//	if (strtolower($clones) == 'no') {//	    $str=ereg_replace('\$CL', '', $str);//	} elseif ($crc<>'') {//	}	$str=ereg_replace('\$CL', $clon, $str);//    }        if($echo) echo $str; else return $str;}// -----------------------------------------------// make_nav($query_orig)// -----------------------------------------------function make_nav($query_orig){   global $found,$np,$isnext,$ps,$tag,$ul,$self,$o,$m,$cat;   global $dt, $dp, $dx, $dm, $dy, $dd, $db, $de, $lang, $wm, $wf;   global $q_local,$ul_local,$t_local,$db_local,$de_local,$lang_local;   if($np>0){     $prevp=$np-1;     $prev_href="$self?q=$q_local&np=$prevp&m=$m".                ($ps==20?'':"&ps=$ps").                ($tag==''?'':"&t=$t_local").                ($ul==''?'':"&ul=$ul_local").		($wm==''?'':"&wm=$wm").		($wf==''?'':"&wf=$wf").                (!$o?'':"&o=$o").                ($dt=='back'?'':"&dt=$dt").                (!$dp?'':"&dp=$dp").                (!$dx?'':"&dx=$dx").                ($dd=='01'?'':"&dd=$dd").                (!$dm?'':"&dm=$dm").                ($dy=='1970'?'':"&dy=$dy").                ($db=='01/01/1970'?'':"&db=$db_local").                ($de=='31/12/2020'?'':"&de=$de_local").                ($cat==''?'':"&cat=$cat").                ($lang==''?'':"&lang=$lang_local");     $nav_left="<TD><A HREF=\"$prev_href\">Prev</A></TD>\n";   } elseif ($np==0) {     $nav_left="<TD><FONT COLOR=\"#707070\">Prev</FONT></TD>\n";   }   if($isnext==1) {     $nextp=$np+1;     $next_href="$self?q=$q_local&np=$nextp&m=$m".     		($ps==20?'':"&ps=$ps").                ($tag==''?'':"&t=$t_local").                ($ul==''?'':"&ul=$ul_local").		($wm==''?'':"&wm=$wm").		($wf==''?'':"&wf=$wf").                (!$o?'':"&o=$o").                ($dt=='back'?'':"&dt=$dt").                (!$dp?'':"&dp=$dp").                (!$dx?'':"&dx=$dx").                ($dd=='01'?'':"&dd=$dd").                (!$dm?'':"&dm=$dm").                ($dy=='1970'?'':"&dy=$dy").                ($db=='01/01/1970'?'':"&db=$db_local").                ($de=='31/12/2020'?'':"&de=$de_local").                ($cat==''?'':"&cat=$cat").                ($lang==''?'':"&lang=$lang_local");     $nav_right="<TD><A HREF=\"$next_href\">Next</TD>\n";   } else {     $nav_right="<TD><FONT COLOR=\"#707070\">Next</FONT></TD>\n";   }   $nav_bar0='<TD>$NP</TD>';   $nav_bar1='<TD><A HREF="$NH">$NP</A></TD>';   $tp=ceil($found/$ps);   $cp=$np+1;   if ($cp>5) {      $lp=$cp-5;   } else {      $lp=1;   }   $rp=$lp+10-1;   if ($rp>$tp) {      $rp=$tp;      $lp=$rp-10+1;      if ($lp<1) $lp=1;   }   if ($lp!=$rp) {      for ($i=$lp; $i<=$rp;$i++) {         $realp=$i-1;            if ($i==$cp) {            $nav_bar=$nav_bar.$nav_bar0;         } else {            $nav_bar=$nav_bar.$nav_bar1;         }                  $href="$self?q=$q_local&np=$realp&m=$m".               	($ps==20?'':"&ps=$ps").                ($tag==''?'':"&t=$t_local").                ($ul==''?'':"&ul=$ul_local").		($wm==''?'':"&wm=$wm").		($wf==''?'':"&wf=$wf").                (!$o?'':"&o=$o").                ($dt=='back'?'':"&dt=$dt").                (!$dp?'':"&dp=$dp").                (!$dx?'':"&dx=$dx").                ($dd=='01'?'':"&dd=$dd").                (!$dm?'':"&dm=$dm").                ($dy=='1970'?'':"&dy=$dy").                ($db=='01/01/1970'?'':"&db=$db_local").                ($de=='31/12/2020'?'':"&de=$de_local").                ($cat==''?'':"&cat=$cat").                ($lang==''?'':"&lang=$lang_local");         $nav_bar=ereg_replace('\$NP',"$i",$nav_bar);         $nav_bar=ereg_replace('\$NH',"$href",$nav_bar);      }         $nav="<TABLE BORDER=0><TR>$nav_left $nav_bar $nav_right</TR></TABLE>\n";   } elseif ($found) {      $nav="<TABLE BORDER=0><TR>$nav_left $nav_right</TR></TABLE>\n";   }      return $nav;}// -----------------------------------------------//  M A I N // -----------------------------------------------   if (preg_match("/^(\d+)\.(\d+)\.(\d+)/",phpversion(),$param)) {	$phpver=$param[1];   	if ($param[2] < 9) {   		$phpver .= "0$param[2]";   	} else {   		$phpver .= "$param[2]";   	}        if ($param[3] < 9) {   		$phpver .= "0$param[3]";   	} else {   		$phpver .= "$param[3]";   	}   } else {   	print "Cannot determine php version: <b>".phpversion()."</b>\n";   	exit;   }        $have_spell_flag=0;   if (Udm_Api_Version() >= 30204) {	$udm_agent=Udm_Alloc_Agent($dbaddr);	   } else {	$udm_agent=Udm_Alloc_Agent($dbaddr,$dbmode);	   }          Udm_Set_Agent_Param($udm_agent,UDM_PARAM_PAGE_SIZE,$ps);   Udm_Set_Agent_Param($udm_agent,UDM_PARAM_PAGE_NUM,$np);   if ($phpver >= 40006) {        if ($temp_cp_arr=Udm_Cat_Path($udm_agent,$cat)) {	       	reset($temp_cp_arr);	       	$temp_cp='';	       	for ($i=0; $i<count($temp_cp_arr); $i+=2) {	       		$cp_path=$temp_cp_arr[$i];	       		$cp_name=$temp_cp_arr[$i+1];	       		$temp_cp .= " &gt; <a href=\"$PHP_SELF?cat=$cp_path\">$cp_name</a> ";	       	}	       	$t_CP=$temp_cp;	} 	if ($temp_cp_arr=Udm_Cat_List($udm_agent,$cat)) {	       	reset($temp_cp_arr);	       	$temp_cp='';	        for ($i=0; $i<count($temp_cp_arr); $i+=2) {	       		$cp_path=$temp_cp_arr[$i];	       		$cp_name=$temp_cp_arr[$i+1];	       		$temp_cp .= "<a href=\"$PHP_SELF?cat=$cp_path\">$cp_name</a><br>";	       	}	        $t_CS=$temp_cp;	}        if ($temp_cp_arr=Udm_Cat_Path($udm_agent,$category)) {	       	reset($temp_cp_arr);	       	$temp_cp='';	        for ($i=0; $i<count($temp_cp_arr); $i+=2) {	      		$cp_path=$temp_cp_arr[$i];	       		$cp_name=$temp_cp_arr[$i+1];	       		$temp_cp .= " &gt; <a href=\"$PHP_SELF?cat=$cp_path\">$cp_name</a> ";	       	}	        $t_DY=$temp_cp;	}   }   $trackquery=strtolower($trackquery);   if ($trackquery == 'yes') {   	Udm_Set_Agent_Param($udm_agent,UDM_PARAM_TRACK_MODE,UDM_TRACK_ENABLED);   } else {   	Udm_Set_Agent_Param($udm_agent,UDM_PARAM_TRACK_MODE,UDM_TRACK_DISABLED);   }   $phrase=strtolower($phrase);   if ($phrase == 'yes') {   	Udm_Set_Agent_Param($udm_agent,UDM_PARAM_PHRASE_MODE,UDM_PHRASE_ENABLED);   } else {   	Udm_Set_Agent_Param($udm_agent,UDM_PARAM_PHRASE_MODE,UDM_PHRASE_DISABLED);   }   $cache=strtolower($cache);   if ($cache == 'yes') {   	Udm_Set_Agent_Param($udm_agent,UDM_PARAM_CACHE_MODE,UDM_CACHE_ENABLED);   } else {   	Udm_Set_Agent_Param($udm_agent,UDM_PARAM_CACHE_MODE,UDM_CACHE_DISABLED);   }   $ispelluseprefixes=strtolower($ispelluseprefixes);   if ($ispelluseprefixes == 'yes') {   	Udm_Set_Agent_Param($udm_agent,UDM_PARAM_ISPELL_PREFIXES,UDM_PREFIXES_ENABLED);   } else {   	Udm_Set_Agent_Param($udm_agent,UDM_PARAM_ISPELL_PREFIXES,UDM_PREFIXES_DISABLED);   }   if (Udm_Api_Version() >= 30111) {   	$crosswords=strtolower($crosswords);   	if ($crosswords == 'yes') {   		Udm_Set_Agent_Param($udm_agent,UDM_PARAM_CROSS_WORDS,UDM_CROSS_WORDS_ENABLED);   	} else {   		Udm_Set_Agent_Param($udm_agent,UDM_PARAM_CROSS_WORDS,UDM_CROSS_WORDS_DISABLED);   	}   }   if ($localcharset != '') {   	Udm_Set_Agent_Param($udm_agent,UDM_PARAM_CHARSET,$localcharset);   }      if (Udm_Api_Version() >= 30200) {	      	if ($localcharset == '') Udm_Set_Agent_Param($udm_agent,UDM_PARAM_CHARSET,'utf-8');   	if ($browsercharset != '') {   		Udm_Set_Agent_Param($udm_agent,UDM_PARAM_BROWSER_CHARSET,$browsercharset);		Header ("Content-Type: text/html; charset=$browsercharset");	} else {		Udm_Set_Agent_Param($udm_agent,UDM_PARAM_BROWSER_CHARSET,'utf-8');		Header ("Content-Type: text/html; charset=utf-8");		}		if ($hlbeg != '') {		Udm_Set_Agent_Param($udm_agent,UDM_PARAM_HLBEG,$hlbeg);		} else {	        $hlbeg='<font color="000088"><b>';		Udm_Set_Agent_Param($udm_agent,UDM_PARAM_HLBEG,'<font color="000088"><b>');		}	if ($hlend != '') {		Udm_Set_Agent_Param($udm_agent,UDM_PARAM_HLEND,$hlend);		} else {		$hlend='</b></font>';		Udm_Set_Agent_Param($udm_agent,UDM_PARAM_HLEND,'</b></font>');		}   }   for ($i=0; $i < count($stopwordtable_arr); $i++) {   	if ($stopwordtable_arr[$i] != '') {   		Udm_Set_Agent_Param($udm_agent,UDM_PARAM_STOPTABLE,$stopwordtable_arr[$i]);   	}   }   for ($i=0; $i < count($stopwordfile_arr); $i++) {   	if ($stopwordfile_arr[$i] != '') {   		Udm_Set_Agent_Param($udm_agent,UDM_PARAM_STOPFILE,$stopwordfile_arr[$i]);   	}   }   if (Udm_Api_Version() >= 30203) {   	        for ($i=0; $i < count($synonym_arr); $i++) {   	    if ($synonym_arr[$i] != '') {   	        Udm_Set_Agent_Param($udm_agent,UDM_PARAM_SYNONYM,$synonym_arr[$i]);   	    }        }		for ($i=0; $i < count($searchd_arr); $i++) {   	    if ($searchd_arr[$i] != '') {   	        Udm_Set_Agent_Param($udm_agent,UDM_PARAM_SEARCHD,$searchd_arr[$i]);   	    }        }	Udm_Set_Agent_Param($udm_agent,UDM_PARAM_QSTRING,$QUERY_STRING);        Udm_Set_Agent_Param($udm_agent,UDM_PARAM_REMOTE_ADDR,$REMOTE_ADDR);   }   if (Udm_Api_Version() >= 30204) {   		if ($have_query_flag)Udm_Set_Agent_Param($udm_agent,UDM_PARAM_QUERY,$query_orig);	if ($storedaddr != '') Udm_Set_Agent_Param($udm_agent,UDM_PARAM_STORED,$storedaddr);   }   if  ($m=='any') {   	Udm_Set_Agent_Param($udm_agent,UDM_PARAM_SEARCH_MODE,UDM_MODE_ANY);   } elseif ($m=='all') {   	Udm_Set_Agent_Param($udm_agent,UDM_PARAM_SEARCH_MODE,UDM_MODE_ALL);   } elseif ($m=='bool') {   	Udm_Set_Agent_Param($udm_agent,UDM_PARAM_SEARCH_MODE,UDM_MODE_BOOL);   } elseif ($m=='phrase') {   	Udm_Set_Agent_Param($udm_agent,UDM_PARAM_SEARCH_MODE,UDM_MODE_PHRASE);   } else {   	Udm_Set_Agent_Param($udm_agent,UDM_PARAM_SEARCH_MODE,UDM_MODE_ALL);   }   if  ($wm=='wrd') {   	Udm_Set_Agent_Param($udm_agent,UDM_PARAM_WORD_MATCH,UDM_MATCH_WORD);   } elseif ($wm=='beg') {   	Udm_Set_Agent_Param($udm_agent,UDM_PARAM_WORD_MATCH,UDM_MATCH_BEGIN);   } elseif ($wm=='end') {   	Udm_Set_Agent_Param($udm_agent,UDM_PARAM_WORD_MATCH,UDM_MATCH_END);   } elseif ($wm=='sub') {   	Udm_Set_Agent_Param($udm_agent,UDM_PARAM_WORD_MATCH,UDM_MATCH_SUBSTR);   } else {   	Udm_Set_Agent_Param($udm_agent,UDM_PARAM_WORD_MATCH,UDM_MATCH_WORD);   }   if ($minwordlength >= 0) {   	Udm_Set_Agent_Param($udm_agent,UDM_PARAM_MIN_WORD_LEN,$minwordlength);   }   if ($maxwordlength >= 0) {   	Udm_Set_Agent_Param($udm_agent,UDM_PARAM_MAX_WORD_LEN,$maxwordlength);	   }      if ($phpver >= 40007) {   	if ($vardir != '') Udm_Set_Agent_Param($udm_agent,UDM_PARAM_VARDIR,$vardir);	if ($datadir != '') Udm_Set_Agent_Param($udm_agent,UDM_PARAM_VARDIR,$datadir);   }   if ($wf != '') {   	Udm_Set_Agent_Param($udm_agent,UDM_PARAM_WEIGHT_FACTOR,$wf);   }   if ($ul != '') {   	$auto_wild=strtolower($auto_wild);      	if (($auto_wild == 'yes') || 	    ($auto_wild == '')) {   		if ((substr($ul,0,7) == 'http://') ||

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -