filesearchcat.php
来自「wap 程序 手器电脑通用」· PHP 代码 · 共 75 行
PHP
75 行
<?php
/**
*
* @package wappyCULT: wap community script
* @version 1.00 2006/09/12 21:53:27 wappy
* @copyright (c) 2004-2006 wappyCULT
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
*
*/
/**
*/
header("Content-type: text/vnd.wap.wml; charset=ISO-8859-1");
echo "<?xml version=\"1.0\" encoding=\"ISO-8859-1\" ?>";
echo "<!DOCTYPE wml PUBLIC \"-//WAPFORUM//DTD WML 1.1//EN\"
\"http://www.wapforum.org/DTD/wml_1.1.xml\">\n";
echo "<!-- wappyCULT -->\n";
echo "<!-- Copyright (C) wappyCULT 2006-2007 -->\n";
echo "<wml>";
echo "<head>
<meta http-equiv=\"Cache-Control\" content=\"no-cache\"/>
</head>";
echo "<card newcontext=\"true\" title=\"wappyCULT\">";
echo "<p mode=\"nowrap\">\n";
echo "<small>\n";
function search($target, $directory){
if(is_dir($directory)){
$direc = opendir($directory);
while(false !== ($file = readdir($direc))){
if($file !="." && $file != ".."){
if(is_file($directory."/".$file)){
if(preg_match("/$target/i", $file)){
$size = round(filesize($directory."/".$file)/1024,1);
$rev = strrev ($file);
$exp = explode (".", $rev);
$true = strrev ($exp[0]);
$trueext = strtolower ($true);
if ($trueext=="zip" OR $trueext=="rar" OR $trueext=="gz" OR $trueext=="mid" OR $trueext=="midi" OR $trueext=="sis" OR $trueext=="bmp" OR $trueext=="wbmp" OR $trueext=="mmf" OR $trueext=="png" OR $trueext=="jar" OR $trueext=="jad" OR $trueext=="exe" OR $trueext=="doc" OR $trueext=="mp3" OR $trueext=="mp4" OR $trueext=="3gp" OR $trueext=="avi" OR $trueext=="gif" OR $trueext=="jpg" OR $trueext=="jpeg" OR $trueext=="nth" OR $trueext=="thm" OR $trueext=="amr"){ echo "»<a href=\"$directory/$file\">$file ($size KB)</a><br/>";}
}
}else if(is_dir($directory."/".$file)){
search($target,$directory."/".$file);
}
}
}
closedir($direc);
}
return ;
}
$cat = explode ("/", $path);
echo "<b>Search Results:</b><br/>---<br/>";
search("$search", "$cat[1]");
echo "---<br/></small><small>Search folder:</small><br/>
<input title=\"search:\" emptyok=\"true\" name=\"q\"/><br/><small>
<a href=\"filesearchcat.php?action=main&sid=$sid&search=$(q)\">Search</a><br/>";
echo "---<br/><a href=\"/$cat[1]/index.php?action=main&sid=$sid&page=$page\">«Back</a><br/>---<br/><a href=\"index.php?action=main&sid=$sid\"><img src=\"images/home.gif\" alt=\"\"/>Home</a><br/>---<br/>©2004-2006 wappyCULT";
echo "</small>\n";
echo "</p>";
echo "</card>";
echo "</wml>";
?>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?