代码拉取完成,页面将自动刷新
同步操作将从 邓云溪/罗湖医院体检科 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
<?php
require(dirname(__FILE__)."/"."global.php");
require_once(PHP168_PATH."inc/encode.php");
require(PHP168_PATH."inc/head.php");
require(PHP168_PATH.'/JYSmarty.php');
require(PHP168_PATH.'/JYAPI.php');
//require(PHP168_PATH.'/jyapi_local.php');
//error_reporting(7);
$ask = new JYAPI("Model_Ask",true);
//如果提交咨询,则保留提交的内容,并返回当前页
if($act == "send"){
if( isset( $_POST["title"] ) && !empty($_POST["title"]) ){
// 处理提交
$ask_info = array(
"title" => $_POST["title"],
"content" => $_POST["content"],
"dep_id" => isset( $_POST["dep_id"] ) ? $_POST["dep_id"] : "",
"ip" => getenv("REMOTE_ADDR"),
"post_name" => $_POST["post_name"],
"unit_id" => UNITID,
"doctor_id" => isset( $_POST["doctor_id"] ) ? $_POST["doctor_id"] : "",
);
if( false != $ask->newAsk($ask_info)){
$out = "<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\"><script>alert(\"成功提交咨询\");";
$comeurl = $_POST['comeurl'];
if($comeurl){
$out .= "</script><meta http-equiv = \"refresh\" content = \"0; url=".$comeurl."\" />";
}else{
$out .= "</script><meta http-equiv = \"refresh\" content = \"0; url=ask.php?depid=".(isset( $_POST["dep_id"] ) ? $_POST["dep_id"] : "")."\" /></head></html>";
}
echo $out;
exit;
}
}
}else{
//如果没有提交,则显示咨询的列表
$dep = new JYAPI("Model_Dep");
$where = "unit_id_path ='".UNITID.",'";
$depid=789;
$deplist = $dep->getAllDep($where,'dep_id,dep_name','position desc',1,50);
$smarty->assign("deplist", $deplist);
$depid=isset($_GET['depid']) ? $_GET['depid']:0;
if($depid){
$depinfo = $dep->getOneDep($depid); // 取得科室资料
$smarty->assign("depinfo",$depinfo);
}
$askid = isset($_GET['askid']) ? $_GET['askid'] : 0;
$page = (isset($_GET['page'])) ? $_GET['page'] : 1;
if($askid){
//获取咨询及回复信息
$askinfo = $ask->getAskInfo($askid);
$smarty->assign("askinfo",$askinfo);
$smarty->display("ask.html");
}else{
$page = (isset($_GET['page'])) ? $_GET['page'] : 1;
$pageSize = 20;
$where = "unit_id_path='".UNITID.",'";
//取回复咨询
$where .= " and has_reply = 1 ";
$depid=789;
if($depid){
$where .= " and dep_id_path ='".$depid.",'";
}
$asklist = $ask->getAllAsk($where,'*','post_time desc',$page,$pageSize);
$dpager = $ask->pager;
$smarty->assign("asklist",$asklist);
$smarty->assign("dpager", $dpager);
$smarty->assign("url", "ask.php?depid=$depid&page=|num|");
$currdep[$depid] = " selected ";
$smarty->assign("currdep",$currdep);
$smarty->display("ask_list.html");
}
}
require(PHP168_PATH."inc/foot.php");
?>
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。