子選單
現在位置:討論與交流/檔案下載區
//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
$maxsize ){
echo " ".$des." Xgƪrƽd:".$minsize."r > ".$idata." > ".$maxsize."r
";
$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 "榡TAЭsg
";
$db->disconnect();
//redirect_URL_NEW($url);
echo "W@>";
}
};
//ɶ
/* -------------------------------------------------- *)
(* Num2CNum NԧBƦrনƦrr
(* ϥΥܨ:
(* Num2CNum(10002.34) ==> @UsGIT|
(*
(* Author: Wolfgang Chien
(* Date: 1996/08/04
(* Update Date:
(* -------------------------------------------------- */
// (* NrϦV, Ҧp: ǤJ '1234', Ǧ^ '4321' *)
function ConvertStr($sBeConvert){
$tt = '';
for ($x = strlen($sBeConvert)-1;$x>=0; $x--)
$tt .= substr($sBeConvert,$x,1);
return $tt;
}
function Num2CNum($dblArabic,$ChineseNumeric='') {
if ($ChineseNumeric=='')
$ChineseNumeric = 's@GT|CKE';
$result = "";
$bInZero = True;
$sArabic = $dblArabic;
if (substr($sArabic,0,1) == '-'){
$bMinus = True;
$sArabic = substr($sArabic, 1, 254);
}
else
$bMinus = False;
$iPosOfDecimalPoint = strpos($sArabic,'.'); //(* opIm *)
//(* Bzƪ *)
if ($iPosOfDecimalPoint == 0)
$sIntArabic = ConvertStr($sArabic);
else
$sIntArabic = ConvertStr(substr($sArabic, 0, $iPosOfDecimalPoint));
//(* qӦư_HC|Ƭ@p` *)
for ($iSection = 0 ; $iSection<= intval((strlen($sIntArabic)-1)/4);$iSection++) {
$sSectionArabic = substr($sIntArabic, $iSection * 4 , 4);
$sSection = '';
// (* HU i : ӤQʤd|Ӧ *)
for ($i=0;$i< strlen($sSectionArabic);$i++){
$iDigit = Ord(substr($sSectionArabic,$i,1)) - 48;
if ($iDigit == 0) {
//(* 1. קK 's' ХX{ *)
//(* 2. Ӧƪ 0 ন 's' *)
if (!$bInZero and $i != 0)
$sSection = 's'.$sSection;
$bInZero = True;
}
else {
switch ($i) {
case 1: $sSection = 'Q'.$sSection;
break;
case 2: $sSection = ''.$sSection;
break;
case 3: $sSection = 'd'.$sSection;
break;
}
$sSection = substr($ChineseNumeric, 2 * $iDigit, 2).$sSection;
$bInZero = False;
}
}
//(* [WӤp` *)
if (strLen($sSection) == 0) {
if (strLen($result) > 0 and substr($result, 0, 2) != 's')
$result = 's'.$result;
}
else {
switch ($iSection) {
case 0: $result = $sSection;
break;
case 1: $result = $sSection . 'U' . $result;
break;
case 2: $result = $sSection . '' . $result;
break;
case 3: $result = $sSection . '' . $result;
break;
}
}
}
//(* BzpIk䪺 *)
if ($iPosOfDecimalPoint > 0 ) {
$result .= 'I';
for ($i = $iPosOfDecimalPoint +1;$i