子選單
-
function read_dir_files($path)
{
$aaa=dir($path);
while($bbb=$aaa->read())
{
if($bbb!="." && $bbb!="..")
{
//echo "dir=>".$path."/".$bbb."
"; if(is_dir($path."/".$bbb))//讀取目錄 { //echo "dir=>".$path."/".$bbb."
"; $arr_str.=read_dir_files($path."/".$bbb); } else//讀取檔案 { //echo $path."/".$bbb."
"; $arr_str.="@".$path."/".$bbb; } } } //回傳 return $arr_str; } $path = "images"; $arr_str=read_dir_files($path); $arr_files=split("@",$arr_str); $arr_rnd[0]=""; //echo "run test
"; for($x=0;$x<10;$x++) { $rnd=ceil(rand(1,sizeof($arr_files)-1)); //echo $rnd."=>".array_search($rnd,$arr_rnd)."=>"; while(array_search($rnd,$arr_rnd)>-1) { $rnd=ceil(rand(1,sizeof($arr_files)-1)); } $arr_rnd[$x]=$rnd; //echo $rnd."
"; } for($x=0;$x<10;$x++) { // echo $arr_rnd[$x]."=>".$arr_files[$arr_rnd[$x]]."
"; echo "
//wqUųW $gradeclass = array("senior"=>, "junior"=>ꤤ, "primary"=>p, "preschool"=>X); $edu_unit = array("edu"=>н, "soc"=>Sн, "hea"=>鰷, "wu"=>ǫ); $schoolname = array("senior"=>, "junior"=>ꤤ, "primary"=>p, "preschool"=>X); // function linkarray($f, $array){ //$f = "-"; for ($i = 0; $i < count($array); $i++) { $ofn = ""; $ofs = 0; $ofn = $array[$i]; $all .= $ofn.$f; } $final = safeEscapeString(substr($all, 0 ,-strlen($f))); return $final; } //ܰTfunction function show_msg($msg){ echo ""; }; //͵CLfunction function print_page(){ echo ""; }; //sɦVfunction function redirect_URL($url){ $url_tmp = "self.location=\"$url\";"; echo ""; break;// {Ǧܦ|X{~A]~ఱ{XiAõݤ^e }; //sɦVfunction 2 ΩP_JƪrƤ function redirect_URL_NEW($url){ $url_tmp = "self.location=\"$url\";"; echo ""; break;// {Ǧܦ|X{~A]~ఱ{XiAõݤ^e }; //oh檺JƼ function countform($Array=""){ $j = 0; for ($i=0; $i
"; $db->disconnect(); redirect_URL_NEW($url); //return false; } else{ return true; } }; //YݬOܡAˬdǤJѼƬO_ƦrA function checkIfNumeric($gid){ if(!is_numeric($gid)){ die(); } else{ return $gid; } }; // function date_validate(& $db, $url, $data){ if ( !ereg("^([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})+ ([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2})+$", $data) ){ echo "
"; $db->disconnect(); //redirect_URL_NEW($url); echo "W@>"; } }; //ɶ /* -------------------------------------------------- *) (* Num2CNum NԧBƦrনƦrr (* ϥΥܨ: (* Num2CNum(10002.34) ==> @UsGIT| (* (* Author: Wolfgang Chien