代码拉取完成,页面将自动刷新
同步操作将从 邓云溪/罗湖医院体检科 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
<?php
require_once(dirname(__FILE__)."/"."global.php");
require_once(PHP168_PATH."inc/encode.php");
require(PHP168_PATH."inc/head.php");
require(PHP168_PATH.'/JYAPI.php');
require(PHP168_PATH.'/JYSmarty.php');
(""==$act)?($act="send"):($act = $_GET["act"]);
$smarty->assign("act",$act);
$smarty->assign("unitname",$webdb['webname']);
if($act=="send"){
$user_ip = ($_SERVER["HTTP_VIA"]) ? $_SERVER["HTTP_X_FORWARDED_FOR"] : $_SERVER["REMOTE_ADDR"];
$user_ip = ($user_ip) ? $user_ip : $_SERVER["REMOTE_ADDR"];
$attr = new JYAPI("Model_JiuyiAttr");
$mailtype = $attr->getAllAttr("fk = 'mailtypeid'",'att_id as typeid, att_name as typename');
$curtype[43] = "checked";
$smarty->assign("mailtype",$mailtype);
$smarty->assign("curtype",$curtype);
$smarty->assign("user_ip",$user_ip);
$smarty->display("mail_index.html");
$smarty->display("mail_send.html");
}elseif($act=="list"){
$mail = new JYAPI("Model_Mailbox",true);
$p = isset( $_GET["p"] ) ? $_GET["p"] : 1;
$pageSize = 10;
$where ='unit_id = '.UNITID.' and has_reply = 1 and reply_public = 1';
$maillist = $mail->getAllMail($where,'*','send_time desc',$p,$pageSize);
$smarty->assign("maillist",$maillist);
$dpager = $mail->pager;
$smarty->assign("dpager", $dpager);
$smarty->assign("url", "mailbox.php?act=list&page=|num|");
$smarty->display("mail_index.html");
$smarty->display("mail_list.html");
}elseif($act=="mymail"){
$ispost = count($_POST);
$sender_name = $_POST["sender_name"];
$sender_pwd = $_POST["sender_pwd"];
$mailcnt =0;
if($ispost){
$mail = new JYAPI("Model_Mailbox");
$where = 'unit_id ='.UNITID;
$where .= " and sender_name = '$sender_name' and sender_pwd = '$sender_pwd'";
$maillist = $mail->getAllMail($where,'*','',1,50);
$mailcnt = count($maillist);
$smarty->assign("maillist",$maillist);
$smarty->assign("sender_name",$sender_name);
$smarty->assign("sender_pwd",$sender_pwd);
}
$smarty->assign("mailcnt",$mailcnt);
$smarty->display("mail_index.html");
$smarty->display("mail_melist.html");
}elseif($act=="review"){
$id = $_GET["id"];
$mail = new JYAPI("Model_Mailbox");
$vo = $mail->getOneMail($id);
$smarty->assign("vo",$vo);
$smarty->display("mail_index.html");
$smarty->display("mail_review.html");
}elseif($act=="insert"){
//获取表单的数据
$vo = $_POST;
//验证过程
if($vo[sender_name]==""){
echo "<font color='red'>请填写您的姓名</font><br><a href='/mailbox.php'>点击填写信件表单</a>";
exit;
}elseif($vo[sender_pwd]==""){
echo "<font color='red'>请填写读信密码</font><br><a href='/mailbox.php'>点击填写信件表单</a>";
exit;
}elseif($vo[sender_tell]==""){
echo "<font color='red'>请填写您的联系电话</font><br><a href='/mailbox.php'>点击填写信件表单</a>";
exit;
}elseif($vo[mail_title]==""){
echo "<font color='red'>请填写信件标题</font><br><a href='/mailbox.php'>点击填写信件表单</a>";
exit;
}elseif($vo[mail_content]==""){
echo "<font color='red'>请填写信件内容</font><br><a href='/mailbox.php'>点击填写信件表单</a>";
exit;
}
$is_public = $_POST["is_public"];
if($is_public=="on"){
$is_public = 1;
}else{
$is_public = 0;
}
$vo["is_public"]=$is_public;
$mail = new JYAPI("Model_Mailbox");
$mail->newMail(UNITID,$vo);
echo "<script language='javascript'>alert('信件提交成功');window.location = '/mailbox.php';</script>";
}
require(PHP168_PATH."inc/foot.php");
?>
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。