0)?" and State='".$State."' ":" ")."and StopTag='0' order by CiNm"; $SQL="select count(*) from `City` where CoID= '$TCoID'".((strlen($State)>0)?" and State='".$State."' ":" ")."and StopTag='0' order by CiNm"; if(getFirstField($SQL)==1){ $TCiCd=getFirstField("select CiCd from `City` where CoID= '$TCoID'".((strlen($State)>0)?" and State='".$State."' ":" ")."and StopTag='0' order by CiNm"); } } $BaseSelectSQLCount="select count(*) FROM `State` where CoID= '$TCoID' and StopTag='0'"; $SelectSQL="select A.State,B.CiCd,B.CiNm FROM `State` A inner join `City` B on A.State=B.State where A.CoID= '".$TCoID."' and A.StopTag='0' and B.StopTag='0' order by A.State,B.CiNm"; $OptionNm="CiNm"; $OptionValue="CiCd"; $FormNm="Data"; $FieldNm="TCiCd"; $BaseField="State"; ?> 無標題文件 "; echo HiddenTB1("TCoID",$TCoID); echo ""; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; //查詢USAClassroom //查詢城市代碼、城市名稱 $sqlCi="select * from City where CoID= '".$TCoID."' and CiCd='".$TCiCd."' and StopTag='0' order by CiCd"; // echo $sqlCi; $SqlCiQ=mysql_Query($sqlCi); list($SeqCi,$CiCdCi,$CiNmCi,$CoIDCi,$StateCi,$CshowFlag)=mysql_fetch_row($SqlCiQ); echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; $SqlUSA="select *,if((ClassSchedule is Null or length(ClassSchedule)=0),'1','0') as NoShowClassSchedule,Concat(Tel,if(length(Tel01)>0,concat('
',Tel01),''),if(length(Tel02)>0,concat('
',Tel02),''),if(length(Tel03)>0,concat('
',Tel03),'')) as NewTel,Concat('',trim(Email),'',if(length(Email01)>0,concat('
','',trim(Email01),''),''),if(length(Email02)>0,concat('
','',trim(Email02),''),''),if(length(Email03)>0,concat('
','',trim(Email03),''),'')) as NewEmail from USAClassroom where COID='".$TCoID."'".(strlen($TCiCd)==0?"":" and CiCd='".$TCiCd."'").(strlen($State)!=0?" and State='".$State."' ":"")." and Showflag='0' order by CiCd,TeacherName"; //echo $SqlUSA; $res_all=db_query($SqlUSA); $num_all=db_num_rows($res_all); if($num_all>0){ for($i=0;$i<$num_all;$i++){ $row=db_fetch_array($res_all); echo " "; echo "\n"; echo "\n"; } } ?>
".$CoNmm."\n"; echo "

"; if($NotToHaveToSetStateTag=="0"){ $SQL="select * FROM `State` where CoID= '$TCoID' and StopTag='0' order by State"; $otherStr="onChange=\"".$BaseField."_redirect(this.options.selectedIndex)\""; echo "States".ShowCB($SQL,$BaseField,$State,"State","StNm",$otherStr); $SQL="select * FROM `City` where CoID= '$TCoID' and State='".$State."' and StopTag='0' order by State,CiNm"; }else{ $SQL="select * FROM `City` where CoID= '$TCoID' and StopTag='0' order by State,CiNm"; } $otherStr="onChange=\"javascript:Data.submit();\""; echo "City".ShowCB($SQL,"TCiCd",$TCiCd,"CiCd","CiNm",$otherStr); echo "
".$CoNmm."".($NotToHaveToSetStateTag=="0"?"> ".$StateNm."":"")."> ".$CiNmCi."
\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "
\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; if($row["NoShowClassSchedule"]=="0"){ echo "\n"; echo "\n"; echo "\n"; echo "\n"; } echo "
".$row["Center"]."
Instructor".$row["TeacherName"]." E-Mail ".$row["NewEmail"]."
Phone".$row["NewTel"]." Fax".$row["Fax"]."
Address".$row["Address"]."
Class Schedule".str_replace("\\","",urldecode(($row['ClassSchedule'])))."