日期:2014-05-17 浏览次数:20651 次
<?
include("../config.inc.php");
//医生排班列表开始
$strDoctorTime = "";
if( isset($_REQUEST['Action']) && !empty($_REQUEST['Action']) && ($_REQUEST['Action'] == "setdoctortime") ){
$sqlDoctorTime = "select sid,doctorid,CONVERT(varchar(100), starttime, 20) as starttime,CONVERT(varchar(100), endtime, 120) as endtime,duration,createtime,type,operid,status,visits_counts,original_counts,istrue from gst_scheduling where doctorid = '".$_REQUEST['doctorid']."' ";
//if ( (isset($_REQUEST['starttime']) && !empty($_REQUEST['starttime'])) && (isset($_REQUEST['endtime']) && !empty($_REQUEST['endtime'])) ) {
// $sqlDoctorTime .= " ";
//}
$sqlDoctorTime .= " order by sid desc";
$resDoctorTime = $SqlDB->Query($sqlDoctorTime);
$arrDoctorTime = $SqlDB->getRows($resDoctorTime);
for($i=0; $i<count($arrDoctorTime); $i++) {
$strSelectStatus = ""; //初始号源下拉值
$strSelectStatus = "<select name=\"originalcounts\" id=\"originalcounts\">";
$strSelectStatus .= "<option value=\"1|".$arrDoctorTime[$i]['sid']."\" ";
if(trim($arrDoctorTime[$i]['original_counts']) == "1") $strSelectStatus .= ' selected';
$strSelectStatus .= ">1</option>";
$strSelectStatus .= "<option value=\"2|".$arrDoctorTime[$i]['sid']."\" ";
if(trim($arrDoctorTime[$i]['original_counts']) == "2") $strSelectStatus .= ' selected';
$strSelectStatus .= ">2</option>";
$strSelectStatus .= "<option value=\"3|".$arrDoctorTime[$i]['sid']."\" ";
if(trim($arrDoctorTime[$i]['original_counts']) == "3") $strSelectStatus .= ' selected';
$strSelectStatus .= ">3</option>";
$strSelectStatus .= "<option value=\"4|".$arrDoctorTime[$i]['sid']."\" ";
if(trim($arrDoctorTime[$i]['original_counts']) == "4") $strSelectStatus .= ' selected';
$strSelectStatus .= ">4</option>";
$strSelectStatus .= "<option value=\"5|".$arrDoctorTime[$i]['sid']."\" ";
if(trim($arrDoctorTime[$i]['original_counts']) == "5") $strSelectStatus .= ' selected';
$strSelectStatus .= ">5</option>";