Commit 4f15562f authored by wangxinghua's avatar wangxinghua

init 2

parent f94d31f8
<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=7" />
<title>病房探视系统</title>
<link href="__APP__/__PUBLIC__/css/reset.css" rel="stylesheet" type="text/css" />
<link href="__APP__/__PUBLIC__/css/zh-cn-system.css" rel="stylesheet" type="text/css" />
<link href="__APP__/__PUBLIC__/css/table_form.css" rel="stylesheet" type="text/css" />
<link href="__APP__/__PUBLIC__/css/dialog.css" rel="stylesheet" type="text/css" />
<link rel="stylesheet" type="text/css" href="__APP__/__PUBLIC__/css/style/zh-cn-styles1.css" title="styles1" media="screen" />
<link rel="alternate stylesheet" type="text/css" href="__APP__/__PUBLIC__/css/style/zh-cn-styles2.css" title="styles2" media="screen" />
<link rel="alternate stylesheet" type="text/css" href="__APP__/__PUBLIC__/css/style/zh-cn-styles3.css" title="styles3" media="screen" />
<link rel="alternate stylesheet" type="text/css" href="__APP__/__PUBLIC__/css/style/zh-cn-styles4.css" title="styles4" media="screen" />
<script language="javascript" type="text/javascript" src="__APP__/__PUBLIC__/js/jquery.min.js"></script>
<script language="javascript" type="text/javascript" src="__APP__/__PUBLIC__/js/styleswitch.js"></script>
<script language="javascript" type="text/javascript" src="__APP__/__PUBLIC__/js/admin_common.js"></script>
<script language="javascript" type="text/javascript" src="__APP__/__PUBLIC__/js/dialog.js"></script>
<body>
<style type="text/css">
html{_overflow-y:scroll}
</style>
<script type="text/javascript">
function complete(msg,status){
$("input").val('');
if (status==1)
{
alertMsg(msg);
setTimeout(function(){
window.top.art.dialog({id:'alert'}).close();
},2000);
}else{
alertMsg(msg);
}
}
function alertMsg(msg)
{
window.top.art.dialog({id:'alert',content:decodeURIComponent(msg),lock:true,width:'220',height:'70'});
}
</script>
<form name="myform" action="__APP__/sys/updatepasswd" method="post" id="myform" target="iframe">
<table width="100%" class="table_form contentWrap">
<tr>
<td width="80">用户名</td>
<td><?php echo ($_SESSION['account']); ?></td>
</tr>
<tr>
<td>旧密码</td>
<td><input type="password" name="old_password" id="old_password" class="input-text"></input><font color="red">*</font></td>
</tr>
<tr>
<td>新密码</td>
<td><input type="password" name="new_password" id="new_password" class="input-text"></input><font color="red">*</font></td>
</tr>
<tr>
<td>重复新密码</td>
<td><input type="password" name="new_pwdconfirm" id="new_pwdconfirm" class="input-text"></input><font color="red">*</font></td>
</tr>
</table>
<div class="bk15"></div>
<button type="submit" class="button" name="dosubmit" style="margin-left:5px;"><img src="__APP__/Public/images/curd/b_save.png" style="vertical-align:text-bottom;"/>提交</button>
</form>
<iframe style="display:none" name="iframe"></iframe>
</body>
</html>
\ No newline at end of file
<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" class="off">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
<title>病房探视系统</title>
<link href="__APP__/__PUBLIC__/css/reset.css" rel="stylesheet" type="text/css" />
<link href="__APP__/__PUBLIC__/css/zh-cn-system.css" rel="stylesheet" type="text/css" />
<link href="__APP__/__PUBLIC__/css/dialog.css" rel="stylesheet" type="text/css" />
<link rel="stylesheet" type="text/css" href="__APP__/__PUBLIC__/css/style/zh-cn-styles1.css" title="styles1" media="screen" />
<link rel="alternate stylesheet" type="text/css" href="__APP__/__PUBLIC__/css/style/zh-cn-styles2.css" title="styles2" media="screen" />
<link rel="alternate stylesheet" type="text/css" href="__APP__/__PUBLIC__/css/style/zh-cn-styles3.css" title="styles3" media="screen" />
<link rel="alternate stylesheet" type="text/css" href="__APP__/__PUBLIC__/css/style/zh-cn-styles4.css" title="styles4" media="screen" />
<script language="javascript" type="text/javascript" src="__APP__/__PUBLIC__/js/jquery.min.js"></script>
<script language="javascript" type="text/javascript" src="__APP__/__PUBLIC__/js/styleswitch.js"></script>
<script language="javascript" type="text/javascript" src="__APP__/__PUBLIC__/js/admin_common.js"></script>
<script language="javascript" type="text/javascript" src="__APP__/__PUBLIC__/js/dialog.js"></script>
<style type="text/css">
.objbody{overflow:hidden}
</style>
</head>
<body scroll="no" class="objbody">
<div class="header">
<div class="logo lf"><span class="invisible">病房探视系统</span></div>
<div class="rt-col">
<div class="tab_style white cut_line text-r">
<ul id="Skin">
<li class="s1 styleswitch" rel="styles1"></li>
<li class="s2 styleswitch" rel="styles2"></li>
<li class="s3 styleswitch" rel="styles3"></li>
<li class="s4 styleswitch" rel="styles4"></li>
</ul>
</div>
</div>
<div class="col-auto">
<div class="log white cut_line">
当前版本:v1.0.1<span>|</span>
您好!<?php echo ($_SESSION['account']); ?><a href="__APP__/manage/logout">[退出]</a><span>|</span>
<a href="javascript:window.top.art.dialog({id:'add',iframe:'__APP__/index/map',title:'系统地图', width:'540', height:'500'}, function(){var d = window.top.art.dialog({id:'add'}).data.iframe;}, function(){window.top.art.dialog({id:'add'}).close()});void(0);">系统地图</a>
</div>
<ul class="nav white" id="top_menu">
<?php if(is_array($mlist)): $k = 0; $__LIST__ = $mlist;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): ++$k;$mod = ($k % 2 )?><li id="_M<?php echo ($vo["id"]); ?>" class="top_menu <?php if($k == 1): ?>on<?php endif; ?>"><a href="javascript:;" onclick="_M(<?php echo ($vo["id"]); ?>,'__APP__/index/menu/pid/<?php echo ($vo["id"]); ?>')" hidefocus="true" style="outline:none;"><?php echo ($vo["title"]); ?></a></li><?php endforeach; endif; else: echo "" ;endif; ?>
</ul>
</div>
</div>
<div id="content">
<div class="col-left left_menu">
<div id="Scroll" style="height: 441px;"><div id="leftMain"></div></div>
<a title="展开与关闭" class="open" hidefocus="hidefocus" style="outline-style: none; outline-width: medium; height: 407px;" id="openClose" href="javascript:;"><span class="hidden">展开</span></a>
</div>
<div class="col-auto mr8">
<div class="crumbs">
当前位置:<span id="current_pos"></span></div>
<div class="col-1">
<div class="content" style="position:relative; overflow:hidden">
<iframe name="right" id="rightMain" src="" frameborder="false" scrolling="auto" style="border:none; margin-bottom:30px" width="100%" height="auto" allowtransparency="true"></iframe>
<div class="fav-nav" style="text-align:center;">
©2019 病房探视系统&nbsp;|&nbsp;技术支持:北京融威众邦电子技术有限公司&nbsp;|&nbsp;联系电话:010-62152062
<input type="hidden" id="menuid" value="">
<input type="hidden" id="bigid" value="" />
<div id="help" class="fav-help"></div>
</div>
</div>
</div>
</div>
</div>
<div class="scroll"><a href="javascript:;" class="per" title="使用鼠标滚轴滚动侧栏" onclick="menuScroll(1);"></a><a href="javascript:;" class="next" title="使用鼠标滚轴滚动侧栏" onclick="menuScroll(2);"></a></div>
<script type="text/javascript">
if(!Array.prototype.map)
Array.prototype.map = function(fn,scope) {
var result = [],ri = 0;
for (var i = 0,n = this.length; i < n; i++){
if(i in this){
result[ri++] = fn.call(scope ,this[i],i,this);
}
}
return result;
};
var getWindowSize = function(){
return ["Height","Width"].map(function(name){
return window["inner"+name] ||
document.compatMode === "CSS1Compat" && document.documentElement[ "client" + name ] || document.body[ "client" + name ]
});
}
/*
window.onload = function (){
if(!+"\v1" && !document.querySelector) { // for IE6 IE7
document.body.onresize = resize;
} else {
window.onresize = resize;
}
function resize() {
wSize();
return false;
}
}
*/
function wSize(){
//这是一字符串
var str=getWindowSize();
var strs= new Array(); //定义一数组
strs=str.toString().split(","); //字符分割
var heights = strs[0]-150,Body = $('body');$('#rightMain').height(heights);
//iframe.height = strs[0]-46;
if(strs[1]<980){
$('.header').css('width',980+'px');
$('#content').css('width',980+'px');
Body.attr('scroll','');
Body.removeClass('objbody');
}else{
$('.header').css('width','auto');
$('#content').css('width','auto');
Body.attr('scroll','no');
Body.addClass('objbody');
}
var openClose = $("#rightMain").height()+39;
$('#center_frame').height(openClose+9);
$("#openClose").height(openClose+30);
$("#Scroll").height(openClose-20);
windowW();
}
wSize();
function windowW(){
if($('#Scroll').height()<$("#leftMain").height()){
$(".scroll").show();
}else{
$(".scroll").hide();
}
}
//windowW();
//站点下拉菜单
$(function(){
var offset = $(".tab_web").offset();
$(".tab_web").mouseover(function(){
$(".tab-web-panel").css({ "left": +offset.left+4, "top": +offset.top+$('.tab_web').height()+2});
$(".tab-web-panel").show();
});
$(".tab_web span").mouseout(function(){hidden_site_list_1()});
$(".tab-web-panel").mouseover(function(){clearh();$('.tab_web a').addClass('on')}).mouseout(function(){hidden_site_list_1();$('.tab_web a').removeClass('on')});
//默认载入左侧菜单
$("#leftMain").html('<?php echo ($html); ?>');
$(".switchs").each(function(i){
var ul = $(this).parent().next()
$(this).click(
function(){
if(ul.is(':visible')){
ul.hide();
$(this).removeClass('on');
}else{
ul.show();
$(this).addClass('on');
}
})
});
$(".top_menu:first a").click();
/*
//异步加载
$("#leftMain").load("__APP__/index/menu/pid/<?php echo ($mlist[0]['id']); ?>",function(){
$('.sub_menu').each(function(){
if($(this).attr('data-url') == '<?php echo ($url); ?>')
{
$(this).addClass('on fb blue');
}
});
});
*/
})
//隐藏站点下拉。
var s = 0;
var h;
function hidden_site_list() {
s++;
if(s>=3) {
$('.tab-web-panel').hide();
clearInterval(h);
s = 0;
}
}
function clearh(){
if(h)clearInterval(h);
}
function hidden_site_list_1() {
h = setInterval("hidden_site_list()", 1);
}
//左侧开关
$("#openClose").click(function(){
if($(this).data('clicknum')==1) {
$("html").removeClass("on");
$(".left_menu").removeClass("left_menu_on");
$(this).removeClass("close");
$(this).data('clicknum', 0);
$(".scroll").show();
} else {
$(".left_menu").addClass("left_menu_on");
$(this).addClass("close");
$("html").addClass("on");
$(this).data('clicknum', 1);
$(".scroll").hide();
}
return false;
});
function _M(menuid,targetUrl) {
$("#menuid").val(menuid);
$("#bigid").val(menuid);
/*
$("#leftMain").load(targetUrl, {limit: 25}, function(){
//是否跳到第一个子菜单
location.href=$("#leftMain a:first").attr('href');
windowW();
});
*/
$("h3[id^=h]").css('display','none');
$("ul[id^=ul]").css('display','none');
$("#h"+menuid).css('display','');
$("#ul"+menuid).css('display','');
$("#ul"+menuid+" li:first a").click();
//$("#rightMain").attr('src', targetUrl);
$('.top_menu').removeClass("on");
$('#_M'+menuid).addClass("on");
//$("#current_pos").html($('#_M'+menuid+' a:first').html());
//当点击顶部菜单后,隐藏中间的框架
//显示左侧菜单,当点击顶部时,展开左侧
$(".left_menu").removeClass("left_menu_on");
$("#openClose").removeClass("close");
$("html").removeClass("on");
$("#openClose").data('clicknum', 0);
$("#current_pos").data('clicknum', 1);
}
function _MP(menuid,targetUrl, sjmenu) {
$("#menuid").val(menuid);
$("#rightMain").attr('src', targetUrl);
$('.sub_menu').removeClass("on fb blue");
$('#_MP'+menuid).addClass("on fb blue");
var con = $("#current_pos").html();
$("#current_pos").html(sjmenu);
$("#current_pos").data('clicknum', 1);
}
(function(){
var addEvent = (function(){
if (window.addEventListener) {
return function(el, sType, fn, capture) {
el.addEventListener(sType, fn, (capture));
};
} else if (window.attachEvent) {
return function(el, sType, fn, capture) {
el.attachEvent("on" + sType, fn);
};
} else {
return function(){};}
})(),
Scroll = document.getElementById('Scroll');
// IE6/IE7/IE8/Opera 10+/Safari5+
addEvent(Scroll, 'mousewheel', function(event){
event = window.event || event ;
if(event.wheelDelta <= 0 || event.detail > 0) {
Scroll.scrollTop = Scroll.scrollTop + 29;
} else {
Scroll.scrollTop = Scroll.scrollTop - 29;
}
}, false);
// Firefox 3.5+
addEvent(Scroll, 'DOMMouseScroll', function(event){
event = window.event || event ;
if(event.wheelDelta <= 0 || event.detail > 0) {
Scroll.scrollTop = Scroll.scrollTop + 29;
} else {
Scroll.scrollTop = Scroll.scrollTop - 29;
}
}, false);
})();
function menuScroll(num){
var Scroll = document.getElementById('Scroll');
if(num==1){
Scroll.scrollTop = Scroll.scrollTop - 60;
}else{
Scroll.scrollTop = Scroll.scrollTop + 60;
}
}
</script>
</body>
</html>
\ No newline at end of file
<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=7" />
<title>病房探视系统</title>
<link href="__APP__/__PUBLIC__/css/reset.css" rel="stylesheet" type="text/css" />
<link href="__APP__/__PUBLIC__/css/zh-cn-system.css" rel="stylesheet" type="text/css" />
<link href="__APP__/__PUBLIC__/css/table_form.css" rel="stylesheet" type="text/css" />
<link href="__APP__/__PUBLIC__/css/dialog.css" rel="stylesheet" type="text/css" />
<link rel="stylesheet" type="text/css" href="__APP__/__PUBLIC__/css/style/zh-cn-styles1.css" title="styles1" media="screen" />
<link rel="alternate stylesheet" type="text/css" href="__APP__/__PUBLIC__/css/style/zh-cn-styles2.css" title="styles2" media="screen" />
<link rel="alternate stylesheet" type="text/css" href="__APP__/__PUBLIC__/css/style/zh-cn-styles3.css" title="styles3" media="screen" />
<link rel="alternate stylesheet" type="text/css" href="__APP__/__PUBLIC__/css/style/zh-cn-styles4.css" title="styles4" media="screen" />
<script language="javascript" type="text/javascript" src="__APP__/__PUBLIC__/js/jquery.min.js"></script>
<script language="javascript" type="text/javascript" src="__APP__/__PUBLIC__/js/styleswitch.js"></script>
<script language="javascript" type="text/javascript" src="__APP__/__PUBLIC__/js/admin_common.js"></script>
<script language="javascript" type="text/javascript" src="__APP__/__PUBLIC__/js/dialog.js"></script>
<script type="text/javascript" src="__APP__/__PUBLIC__/js/datepicker/WdatePicker.js"></script>
</head>
<body>
<script language="JavaScript">
$(function(){
$("input[name='b_auth'][value='<?php echo ($vo["b_auth"]); ?>']").attr("checked", "checked");
$('a.remove').click(function(){
$(this).parent().parent().parent().parent().parent().remove();
});
if('<?php echo ($vo["id"]); ?>' == '' && '<?php echo ($is_has_rule); ?>' == '')
{
funAdd();
}
});
function complete(msg,status){
if (status==1)
{
alertMsg(msg);
if("<?php echo ($_GET['from']); ?>" != 'patient')
{
window.top.right.location.href="__APP__/authority/index";
}
else
{
window.top.right.location.reload();
}
setTimeout(function(){
window.top.art.dialog({id:'alert'}).close();
window.top.art.dialog({id:'addAuth'}).close();
},2000);
}else{
alertMsg(msg);
}
}
function alertMsg(msg)
{
window.top.art.dialog({id:'alert',content:decodeURIComponent(msg),lock:true,width:'220',height:'70'});
}
function funAdd()
{
index = 1;
if("<?php echo ($_GET['from']); ?>" == 'patient')
index = 3;
i = $('.table_form tr:eq('+index+') td:eq(0) table').size();
table = "<table><tr><td><input type=\"checkbox\" name=\"week["+i+"][]\" value=\"1\">周一 <input type=\"checkbox\" name=\"week["+i+"][]\" value=\"2\">周二 <input type=\"checkbox\" name=\"week["+i+"][]\" value=\"3\">周三 <input type=\"checkbox\" name=\"week["+i+"][]\" value=\"4\">周四 <input type=\"checkbox\" name=\"week["+i+"][]\" value=\"5\">周五 <input type=\"checkbox\" name=\"week["+i+"][]\" value=\"6\">周六 <input type=\"checkbox\" name=\"week["+i+"][]\" value=\"7\">周日 <input type=\"checkbox\" name=\"week["+i+"][]\" value=\"8\">法定假日 <font color=\"red\">*</font></td></tr><tr><td>时间:<input class=\"Wdate input-text\" type=\"text\" onClick=\"new WdatePicker({skin:'whyGreen',dateFmt:'HH:mm'})\" name=\"st[]\" style=\"width:60px\">到 <input class=\"Wdate input-text\" type=\"text\" onClick=\"new WdatePicker({skin:'whyGreen',dateFmt:'HH:mm'})\" name=\"et[]\" style=\"width:60px\"><font color=\"red\">*</font></td></tr><tr><td>人数:<input type=\"text\" name=\"number[]\" size=\"5\"><font color=\"red\">注:不填表示不限制</font></td></tr><tr><td>次数:<input type=\"text\" name=\"cishu[]\" size=\"5\"><font color=\"red\">注:不填表示不限制</font></td></tr>";
if(i > 0)
table += "<tr><td align=\"right\"><div class=\"content-menu ib-a blue line-x\"><a class=\"on remove\" href=\"javascript:;\"><em>删除</em></a></div></td></tr>"
table += "</table>";
$('.table_form tr:eq('+index+') td:eq(0)').append(table);
$('a.remove').click(function(){
$(this).parent().parent().parent().parent().parent().remove();
});
}
</script>
<style type="text/css">
html{_overflow-y:scroll}
</style><div id="closeParentTime" style="display:none"></div>
<?php if($vo["id"] > 0): ?><form name="myform" id="myform" action="__APP__/authority/update" method="post" target="iframe">
<input type="hidden" name="id" value="<?php echo ($vo["id"]); ?>">
<?php else: ?>
<form name="myform" id="myform" action="__APP__/authority/insert" method="post" target="iframe">
<input type="hidden" name="from" value="<?php echo ($_GET['from']); ?>">
<input type="hidden" name="zhuyuanhao" value="<?php echo ($_GET['zhuyuanhao']); ?>"><?php endif; ?>
<div class="pad_10">
<?php if($_GET['from'] != 'patient'): ?><div class="content-menu ib-a blue line-x">
<a class="on" href="javascript:history.go(-1)"><img src="__APP__/Public/images/curd/b_back.png" /><em>返回</em></a>
</div><?php endif; ?>
</div>
<div style='overflow-y:auto;overflow-x:hidden' class='scrolltable'>
<table width="100%" cellspacing="0" class="table_form contentWrap">
<?php if($_GET['from'] != 'patient'): ?><tr>
<th align="left">权限名称</th>
<td><input type="text" name="name" id="name" value="<?php echo ($vo["name"]); ?>" size="15"><font color="red">*</font></td>
</tr>
<?php else: ?>
<?php if(isset($_GET['bpv']) && $_GET['bpv'])
echo '<tr><td colspan="2">已勾选患者:'.rtrim($_GET['bpv'],',').'</td></tr>';
?>
<tr><td colspan="2">继承病区权限</td></tr>
<tr><td colspan="2">
<input type="radio" name="b_auth" value="0" />是,<span style="color:red">注:此处设置的权限会与病区权限叠加</span></td></tr>
<tr><td colspan="2">
<input type="radio" name="b_auth" value="1" />否,<span style="color:red">注:此处设置的权限会忽略病区的权限</span></td>
</tr><?php endif; ?>
<tr>
<th>权限规则</th>
<td>
<?php if($vo){ ?>
<?php if(is_array($vo["rule"])): $k = 0; $__LIST__ = $vo["rule"];if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$rule): ++$k;$mod = ($k % 2 )?><table>
<?php $t = explode('-',$rule['time']);$w = explode(',',$rule['week']); ?>
<tr>
<td>
<input type="checkbox" name="week[<?php echo ($k-1); ?>][]" <?php if(in_array(1,$w)){echo "checked";} ?> value="1">周一
<input type="checkbox" name="week[<?php echo ($k-1); ?>][]" <?php if(in_array(2,$w)){echo "checked";} ?> value="2">周二
<input type="checkbox" name="week[<?php echo ($k-1); ?>][]" <?php if(in_array(3,$w)){echo "checked";} ?> value="3">周三
<input type="checkbox" name="week[<?php echo ($k-1); ?>][]" <?php if(in_array(4,$w)){echo "checked";} ?> value="4">周四
<input type="checkbox" name="week[<?php echo ($k-1); ?>][]" <?php if(in_array(5,$w)){echo "checked";} ?> value="5">周五
<input type="checkbox" name="week[<?php echo ($k-1); ?>][]" <?php if(in_array(6,$w)){echo "checked";} ?> value="6">周六
<input type="checkbox" name="week[<?php echo ($k-1); ?>][]" <?php if(in_array(7,$w)){echo "checked";} ?> value="7">周日
<input type="checkbox" name="week[<?php echo ($k-1); ?>][]" <?php if(in_array(8,$w)){echo "checked";} ?> value="8">法定假日
<font color="red">*</font>
</td>
</tr>
<tr>
<td>
时间:<input class="Wdate" type="text" onClick="new WdatePicker({skin:'whyGreen',dateFmt:'HH:mm'})" name="st[]" style="width:60px" value="<?php echo ($t[0]); ?>">
<input class="Wdate" type="text" onClick="new WdatePicker({skin:'whyGreen',dateFmt:'HH:mm'})" name="et[]" style="width:60px" value="<?php echo ($t[1]); ?>">
<font color="red">*</font>
</td>
</tr>
<tr>
<td>
人数:<input type="text" name="number[]" size="5" value="<?php echo ($rule["number"]); ?>">
<font color="red">注:不填表示不限制</font>
</td>
</tr>
<tr>
<td>
次数:<input type="text" name="cishu[]" size="5" value="<?php echo ($rule["cishu"]); ?>">
<font color="red">注:不填表示不限制</font>
</td>
</tr>
<tr>
<td align="right">
<div class="content-menu ib-a blue line-x">
<a class="on remove" href="javascript:;"><em>删除</em></a>
</div>
</td>
</tr>
</table><?php endforeach; endif; else: echo "" ;endif; ?>
<?php }else{ ?>
&nbsp;<?php } ?>
<td></tr>
<tr><td></td><td><div class="content-menu ib-a blue line-x">
<a class="on" href="javascript:funAdd()"><em>+新增</em></a>
</div></td></tr>
<?php if($_GET['from'] != 'patient'): ?><tr>
<th>备注</th>
<td>
<textarea name="remark" id="remark" cols="50" rows="10"><?php echo ($vo["remark"]); ?></textarea>
</td>
</tr><?php endif; ?>
</table>
</div>
<div class="bk10"></div>
<?php if($_GET['from'] != 'patient'): ?><div class="btn" style="padding-left:170px;">
<button type="submit" class="button" name="dosubmit"><img src="__APP__/Public/images/curd/b_save.png" style="vertical-align:text-bottom"/>提交</button>
</div><?php endif; ?>
</div>
</form>
</div>
<iframe style="display:none" name="iframe"></iframe>
</body>
</html>
\ No newline at end of file
<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=7" />
<title>病房探视系统</title>
<link href="__APP__/__PUBLIC__/css/reset.css" rel="stylesheet" type="text/css" />
<link href="__APP__/__PUBLIC__/css/zh-cn-system.css" rel="stylesheet" type="text/css" />
<link href="__APP__/__PUBLIC__/css/table_form.css" rel="stylesheet" type="text/css" />
<link href="__APP__/__PUBLIC__/css/dialog.css" rel="stylesheet" type="text/css" />
<link rel="stylesheet" type="text/css" href="__APP__/__PUBLIC__/css/style/zh-cn-styles1.css" title="styles1" media="screen" />
<link rel="alternate stylesheet" type="text/css" href="__APP__/__PUBLIC__/css/style/zh-cn-styles2.css" title="styles2" media="screen" />
<link rel="alternate stylesheet" type="text/css" href="__APP__/__PUBLIC__/css/style/zh-cn-styles3.css" title="styles3" media="screen" />
<link rel="alternate stylesheet" type="text/css" href="__APP__/__PUBLIC__/css/style/zh-cn-styles4.css" title="styles4" media="screen" />
<script language="javascript" type="text/javascript" src="__APP__/__PUBLIC__/js/jquery.min.js"></script>
<script language="javascript" type="text/javascript" src="__APP__/__PUBLIC__/js/styleswitch.js"></script>
<script language="javascript" type="text/javascript" src="__APP__/__PUBLIC__/js/admin_common.js"></script>
<script language="javascript" type="text/javascript" src="__APP__/__PUBLIC__/js/dialog.js"></script>
<script type="text/javascript" src="__APP__/__PUBLIC__/js/datepicker/WdatePicker.js"></script>
</head>
<body>
<div class="subnav">
<div class="content-menu ib-a blue line-x">
</div>
</div>
<style type="text/css">
html{_overflow-y:scroll}
</style><div class="pad-lr-10">
<form name="searchform" action="__ACTION__" method="get" id="formid">
<table width="100%" cellspacing="0" class="search-form">
<tbody>
<tr>
<td><div class="explain-col">
年月:<input class="Wdate" type="text" onClick="new WdatePicker({skin:'whyGreen',dateFmt:'yyyy-MM'})" value="<?php echo ($_GET['ym']); ?>" name="ym" size="8">
时间:<input class="Wdate" type="text" onClick="new WdatePicker({skin:'whyGreen',dateFmt:'dd HH:mm:ss'})" value="<?php echo ($_GET['stime']); ?>" name="stime" size="12">
<input class="Wdate" type="text" onClick="new WdatePicker({skin:'whyGreen',dateFmt:'dd HH:mm:ss'})" value="<?php echo ($_GET['etime']); ?>" name="etime" size="12">
二维码:<input type="text" value="<?php echo ($_GET['no']); ?>" class="input-text" name="no" size="18">
动作:<select name="direction">
<option value="" <?php if($_GET['direction'] == ''): ?>selected<?php endif; ?>>请选择</option>
<option value="0" <?php if($_GET['direction'] == '0'): ?>selected<?php endif; ?>></option>
<option value="1" <?php if($_GET['direction'] == '1'): ?>selected<?php endif; ?>></option>
</select>
<button type="submit" class="button" onclick="fnsubmit('formid','__ACTION__','get');"><img src="__APP__/Public/images/curd/b_search.png" style="vertical-align:text-top"/>查询</button>
</div>
</td>
</tr>
</tbody>
</table>
<div class="table-list">
<table width="100%" cellspacing="0">
<thead>
<tr>
<th width="80">二维码编号</th>
<th width="80">被访人住院号</th>
<th width="50">动作</th>
<th width="80">时间</th>
<th width="80">闸机编号</th>
<th width="10%">操作</th>
</tr>
</thead><tbody>
<?php if($list){ ?>
<?php if(is_array($list)): $i = 0; $__LIST__ = $list;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$o): ++$i;$mod = ($i % 2 )?><tr>
<td align="center"><?php echo ($o["no"]); ?></td>
<td align="center"><?php echo ($o["zhuyuanhao"]); ?></td>
<td align="center"><?php if($o["direction"] == 1): ?><?php else: ?><?php endif; ?></td>
<td align="center"><?php echo ($o["time"]); ?></td>
<td align="center"><?php echo ($o["mid"]); ?></td>
<td align="center">
</td>
</tr><?php endforeach; endif; else: echo "" ;endif; ?>
<?php }else{ ?>
<tr><td colspan="6">没有相关记录</td></tr>
<?php } ?>
</tbody>
</table>
<div id="pages"><?php echo ($page); ?></div>
</div>
</div>
</form>
</div>
</body>
</html>
\ No newline at end of file
<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=7" />
<title>病房探视系统</title>
<link href="__APP__/__PUBLIC__/css/reset.css" rel="stylesheet" type="text/css" />
<link href="__APP__/__PUBLIC__/css/zh-cn-system.css" rel="stylesheet" type="text/css" />
<link href="__APP__/__PUBLIC__/css/table_form.css" rel="stylesheet" type="text/css" />
<link href="__APP__/__PUBLIC__/css/dialog.css" rel="stylesheet" type="text/css" />
<link rel="stylesheet" type="text/css" href="__APP__/__PUBLIC__/css/style/zh-cn-styles1.css" title="styles1" media="screen" />
<link rel="alternate stylesheet" type="text/css" href="__APP__/__PUBLIC__/css/style/zh-cn-styles2.css" title="styles2" media="screen" />
<link rel="alternate stylesheet" type="text/css" href="__APP__/__PUBLIC__/css/style/zh-cn-styles3.css" title="styles3" media="screen" />
<link rel="alternate stylesheet" type="text/css" href="__APP__/__PUBLIC__/css/style/zh-cn-styles4.css" title="styles4" media="screen" />
<script language="javascript" type="text/javascript" src="__APP__/__PUBLIC__/js/jquery.min.js"></script>
<script language="javascript" type="text/javascript" src="__APP__/__PUBLIC__/js/styleswitch.js"></script>
<script language="javascript" type="text/javascript" src="__APP__/__PUBLIC__/js/admin_common.js"></script>
<script language="javascript" type="text/javascript" src="__APP__/__PUBLIC__/js/dialog.js"></script>
<script type="text/javascript">
function depAdd(zhuyuanhao,type)
{
window.top.art.dialog({id:'depAdd',iframe:'__APP__/hospital/dep?zhuyuanhao='+zhuyuanhao+'&type='+type,title:'新增家属', width:'300', height:'120',lock:true}, function(){
var d = window.top.art.dialog({id:'depAdd'}).data.iframe;
d.$('#depform').submit();
return false;
}, function(){window.top.art.dialog({id:'depAdd'}).close()});
}
function depDel(zhuyuanhao,type,id)
{
window.top.art.dialog({title:'提示',content:'会将家属以及家属拥有的权限删除,确定删除吗?',lock:true,width:'200',height:'50'},function(){
$.ajax({
url:"__APP__/hospital/depdelajax",
type:"post",
dataType:"json",
data:{zhuyuanhao:zhuyuanhao,type:type,id:id},
success:function(req){
window.top.art.dialog({
id:'alert',
content:decodeURIComponent(req.info),
lock:true,
width:'220',
height:'70'
});
if(req.status == 1)
{
setTimeout(function(){
window.top.art.dialog({id:'alert'}).close();
$("input[name='id[]'][value='"+id+"']").parent().parent().remove();
},2000);
}
},
error:function(){
window.top.art.dialog({id:'alert',content:decodeURIComponent(title+'失败'),lock:true,width:'220',height:'70'});
}
});
},function(){});}
</script>
</head>
<body>
<style type="text/css">
html{_overflow-y:scroll}
</style>
<form name="searchform" action="__ACTION__" method="get" id="formid">
<table width="100%" cellspacing="0" class="search-form">
<tbody>
<tr>
<td><div class="explain-col" style="margin-top:5px;">
<?php if($_GET['type'] == 1): ?>注:陪住权限限定1人
<?php elseif($_GET['type'] == 2): ?>
注:外出检查权限限定2人<?php endif; ?>
<div style="margin-top:5px;">
<input type="hidden" name="type" value="<?php echo ($_GET['type']); ?>">
<input type="hidden" name="zhuyuanhao" value="<?php echo ($_GET['zhuyuanhao']); ?>">
身份证号:<input type="text" value="<?php echo ($_GET['shenfenzheng']); ?>" class="input-text" name="shenfenzheng">
<button type="submit" class="button" onclick="fnsubmit('formid','__ACTION__','get');"><img src="__APP__/Public/images/curd/b_search.png" style="vertical-align:text-top"/>查询</button>
</div>
</div>
</td>
</tr>
</tbody>
</table>
</form>
<div class="table-list">
<div>
<input type="radio" value="1" name="status" <?php if($status == 1): ?>checked="checked"<?php endif; ?>>启用
<input type="radio" value="0" name="status" <?php if($status == 0): ?>checked="checked"<?php endif; ?>>停用
</div>
<div class="content-menu ib-a blue line-x">
<a class="on" href="javascript:depAdd('<?php echo ($_GET['zhuyuanhao']); ?>',<?php echo ($_GET['type']); ?>)"><em>+新增家属</em></a>
</div>
请从以下家属列表中选择
<table width="100%" cellspacing="0">
<thead>
<tr>
<th width="35" align="center">&nbsp;</th>
<th width="100" align="left">姓名</th>
<th width="120" align="left">身份证号</th>
<th width="80" align="left">手机号</th>
<th>&nbsp;</th>
</tr>
</thead><tbody id="deptbody">
<?php if($list){ ?>
<?php if(is_array($list)): $i = 0; $__LIST__ = $list;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$o): ++$i;$mod = ($i % 2 )?><tr>
<td width="35">
<input type="checkbox" name="id[]" value="<?php echo ($o["id"]); ?>" <?php if($obids[$o['id']] == 1): ?>checked="checked"<?php endif; ?>>
</td>
<td><?php echo ($o["name"]); ?></td>
<td><?php echo ($o["shenfenzheng"]); ?></td>
<td><?php echo ($o["mobile"]); ?></td>
<td><a class="on" href="javascript:depDel('<?php echo ($_GET['zhuyuanhao']); ?>',<?php echo ($_GET['type']); ?>,<?php echo ($o["id"]); ?>)"><em>删除</em></a></td>
</tr><?php endforeach; endif; else: echo "" ;endif; ?>
<?php }else{ ?>
<tr><td colspan="5">没有相关记录</td></tr>
<?php } ?>
</tbody>
</table>
</div>
</body>
</body>
</html>
\ No newline at end of file
<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=7" />
<title>病房探视系统</title>
<link href="__APP__/__PUBLIC__/css/reset.css" rel="stylesheet" type="text/css" />
<link href="__APP__/__PUBLIC__/css/zh-cn-system.css" rel="stylesheet" type="text/css" />
<link href="__APP__/__PUBLIC__/css/table_form.css" rel="stylesheet" type="text/css" />
<link href="__APP__/__PUBLIC__/css/dialog.css" rel="stylesheet" type="text/css" />
<link rel="stylesheet" type="text/css" href="__APP__/__PUBLIC__/css/style/zh-cn-styles1.css" title="styles1" media="screen" />
<link rel="alternate stylesheet" type="text/css" href="__APP__/__PUBLIC__/css/style/zh-cn-styles2.css" title="styles2" media="screen" />
<link rel="alternate stylesheet" type="text/css" href="__APP__/__PUBLIC__/css/style/zh-cn-styles3.css" title="styles3" media="screen" />
<link rel="alternate stylesheet" type="text/css" href="__APP__/__PUBLIC__/css/style/zh-cn-styles4.css" title="styles4" media="screen" />
<script language="javascript" type="text/javascript" src="__APP__/__PUBLIC__/js/jquery.min.js"></script>
<script language="javascript" type="text/javascript" src="__APP__/__PUBLIC__/js/styleswitch.js"></script>
<script language="javascript" type="text/javascript" src="__APP__/__PUBLIC__/js/admin_common.js"></script>
<script language="javascript" type="text/javascript" src="__APP__/__PUBLIC__/js/dialog.js"></script>
</head>
<body>
<div class="subnav">
<div class="content-menu ib-a blue line-x">
<a class="add fb" href="__APP__/authority/edit"><img src="__APP__/Public/images/curd/b_add.png" /><em>添加权限</em></a></div>
</div>
<style type="text/css">
html{_overflow-y:scroll}
</style><div class="pad-lr-10">
<form name="searchform" action="__ACTION__" method="get" id="formid">
<table width="100%" cellspacing="0" class="search-form">
<tbody>
<tr>
<td><div class="explain-col">
权限名称:<input type="text" value="<?php echo ($filter['name']); ?>" class="input-text" name="name">
<button type="submit" class="button" onclick="fnsubmit('formid','__ACTION__','get');"><img src="__APP__/Public/images/curd/b_search.png" style="vertical-align:text-top"/>查询</button>
</div>
</td>
</tr>
</tbody>
</table>
<div class="table-list">
<table width="100%" cellspacing="0">
<thead>
<tr>
<th width="35" align="center"><input type="checkbox" value="" id="check_box" onclick="selectall('id[]');"></th>
<th width="150">权限名称</th>
<th width="300">规则</th>
<th width="60">类型</th>
<th align="left">备注</th>
<th>操作</th>
</tr>
</thead><tbody>
<?php if($list){ ?>
<?php if(is_array($list)): $i = 0; $__LIST__ = $list;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$o): ++$i;$mod = ($i % 2 )?><tr>
<td align="center" width="35">
<?php if($o['is_sys'] == 1){
if($_SESSION['rid'] == 1){?>
<input type="checkbox" name="id[]" value="{$o.id}">
<?php }}else{ ?>
<input type="checkbox" name="id[]" value="<?php echo ($o["id"]); ?>">
<?php } ?>
</td>
<td align="center"><?php echo ($o["name"]); ?></td>
<td align="left"><?php echo ($o["rule"]); ?></td>
<td align="center"><?php echo ($o["is_sys_text"]); ?></td>
<td align="left"><?php echo ($o["remark"]); ?></td>
<td align="center" width="10%">
<?php if($o["is_sys"] == 1): ?><?php if($_SESSION['rid'] == 1): ?><a href='__APP__/authority/edit/id/<?php echo ($o["id"]); ?>'><img src="__APP__/Public/images/curd/b_edit.png" />修改</a><?php endif; ?>
<?php else: ?>
<a href='__APP__/authority/edit/id/<?php echo ($o["id"]); ?>'><img src="__APP__/Public/images/curd/b_edit.png" />修改</a><?php endif; ?>
<?php if($o["is_sys"] != 1): ?><a href="javascript:void(0);" onClick="if(confirm('确认要删除 『 <?php echo ($o["name"]); ?> 』 吗?'))location.href='__APP__/authority/delete/id/<?php echo ($o["id"]); ?>';"><img src="__APP__/Public/images/curd/b_drop.png" />删除</a><?php endif; ?>
</td>
</tr><?php endforeach; endif; else: echo "" ;endif; ?>
<?php }else{ ?>
<tr><td colspan="4">没有相关记录</td></tr>
<?php } ?>
</tbody>
</table>
<div class="btn"><a href="#"
onClick="javascript:$('input[type=checkbox]').attr('checked', true)">全选</a>/<a
href="#"
onClick="javascript:$('input[type=checkbox]').attr('checked', false)">取消</a>
<select name="deletesel">
<option value="selected">选中</option>
<option value="all">全部</option>
</select>
<button name="submit" type="submit" class="button" onClick="return checkForm();"><img src="__APP__/Public/images/curd/b_drop.png" />删除</button>
</div>
<div id="pages"><?php echo ($page); ?></div>
</div>
</div>
</form>
</div>
<script type="text/javascript">
function checkForm() {
if(confirm('确认要删除吗?'))
{
if($('select[name=deletesel]:eq(0)').attr('value') == 'selected')
{
var ids='';
$("input[name='id[]']:checked").each(function(i, n){
ids += $(n).val() + ',';
});
if(ids=='') {
window.top.art.dialog({content:"请选择再执行操作",lock:true,width:'200',height:'50',time:1.5},function(){});
return false;}
}
else
{
if($("input[name='id[]']").size() < 1)
{
window.top.art.dialog({content:"没有要删除的记录",lock:true,width:'200',height:'50',time:1.5},function(){});
return false;}
}
fnsubmit('formid','__APP__/authority/delete','post');
return true;
}
else
return false;
}
</script>
</body>
</html>
\ No newline at end of file
<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=7" />
<title>病房探视系统</title>
<link href="__APP__/__PUBLIC__/css/reset.css" rel="stylesheet" type="text/css" />
<link href="__APP__/__PUBLIC__/css/zh-cn-system.css" rel="stylesheet" type="text/css" />
<link href="__APP__/__PUBLIC__/css/table_form.css" rel="stylesheet" type="text/css" />
<link href="__APP__/__PUBLIC__/css/dialog.css" rel="stylesheet" type="text/css" />
<link rel="stylesheet" type="text/css" href="__APP__/__PUBLIC__/css/style/zh-cn-styles1.css" title="styles1" media="screen" />
<link rel="alternate stylesheet" type="text/css" href="__APP__/__PUBLIC__/css/style/zh-cn-styles2.css" title="styles2" media="screen" />
<link rel="alternate stylesheet" type="text/css" href="__APP__/__PUBLIC__/css/style/zh-cn-styles3.css" title="styles3" media="screen" />
<link rel="alternate stylesheet" type="text/css" href="__APP__/__PUBLIC__/css/style/zh-cn-styles4.css" title="styles4" media="screen" />
<script language="javascript" type="text/javascript" src="__APP__/__PUBLIC__/js/jquery.min.js"></script>
<script language="javascript" type="text/javascript" src="__APP__/__PUBLIC__/js/styleswitch.js"></script>
<script language="javascript" type="text/javascript" src="__APP__/__PUBLIC__/js/admin_common.js"></script>
<script language="javascript" type="text/javascript" src="__APP__/__PUBLIC__/js/dialog.js"></script>
<script type="text/javascript">
setPosTitle('<?php echo ($_GET["rid"]); ?>','<?php echo ($_GET["rname"]); ?>下的用户列表');
</script>
</head>
<body>
<?php if($_GET['rid']) { ?>
<div class="subnav">
<div class="content-menu ib-a blue line-x">
<a class="add fb" href="__APP__/sys/adduser/rid/<?php echo ($filter['rid']); ?>/rname/<?php echo ($_GET["rname"]); ?>"><img src="__APP__/Public/images/curd/b_add.png" /><em>添加本角色用户</em></a>
</div>
</div>
<?php }else{ ?>
<div class="subnav">
<div class="content-menu ib-a blue line-x">
<a class="add fb" href="__APP__/sys/adduser/rid/<?php echo ($filter['rid']); ?>"><img src="__APP__/Public/images/curd/b_add.png" /><em>添加用户</em></a></div>
</div>
<?php } ?>
<div class="pad-lr-10">
<form name="searchform" action="__ACTION__" method="get" id="formid">
<input name="rid" value="<?php echo ($_GET["rid"]); ?>" type="hidden"/>
<table width="100%" cellspacing="0" class="search-form">
<tr>
<td><div class="explain-col">
用户名:<input type="text" value="<?php echo ($filter['account']); ?>" class="input-text" name="account">
<button type="submit" class="button" onclick="fnsubmit('formid','__ACTION__','get');"><img src="__APP__/Public/images/curd/b_search.png" style="vertical-align:text-top"/>查询</button>
</div>
</td>
</tr>
</table>
</form>
<div class="table-list">
<table width="100%" cellspacing="0">
<thead>
<tr>
<th width="35" align="center"><input type="checkbox" value="" id="check_box" onclick="selectall('user_id[]');"></th>
<th>用户名</th>
<th>所属角色</th>
<th>添加时间</th>
<th>上次登录时间</th>
<th>上次登录IP</th>
<th>登录次数</th>
<th>状态</th>
<th>操作</th>
</tr>
</thead>
<tbody>
<?php if($list){ ?>
<?php if(is_array($list)): $i = 0; $__LIST__ = $list;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$user): ++$i;$mod = ($i % 2 )?><tr>
<td align="center" width="35"><?php if(($user["id"] != 1) && ($user["id"] != $_SESSION['adnamangeAuthId'])): ?><input type="checkbox" name="user_id[]" value="<?php echo ($user["id"]); ?>"><?php endif; ?></td>
<td align="center"><?php echo ($user["account"]); ?></td>
<td align="center"><?php echo ($user["name"]); ?></td>
<td align="center"><?php echo (date("Y-m-d H:i:s",$user["create_time"])); ?></td>
<td align="center"><?php if($user["last_login_time"] > 0): ?><?php echo (date("Y-m-d H:i:s",$user["last_login_time"])); ?><?php endif; ?></td>
<td align="center"><?php echo ($user["last_login_ip"]); ?></td>
<td align="center"><?php echo ($user["login_count"]); ?></td>
<td align="center"><?php if($user["status"] == 1): ?>启用<?php else: ?>禁用<?php endif; ?></td>
<td align="center">
<?php if(($user["id"] != 1) && ($user["id"] != $_SESSION['adnamangeAuthId'])): ?><a href='__APP__/sys/adduser/id/<?php echo ($user["id"]); ?>'><img src="__APP__/Public/images/curd/b_edit.png" />修改</a>
<a href='javascript:void(0)' onClick="if(confirm('确认要删除<?php echo ($user["account"]); ?>吗?'))
location.href='__APP__/sys/deleteuser/id/<?php echo ($user["id"]); ?>'"><img src="__APP__/Public/images/curd/b_drop.png" />删除</a>
<?php if($user["status"] == 1): ?><a href='__APP__/sys/activeuser/id/<?php echo ($user["id"]); ?>/status/0'><img src="__APP__/Public/images/curd/b_cancel.png" />禁用</a>
<?php else: ?>
<a href='__APP__/sys/activeuser/id/<?php echo ($user["id"]); ?>/status/1'><img src="__APP__/Public/images/curd/b_ok.png" />启用</a><?php endif; ?><?php endif; ?>
</td>
</tr><?php endforeach; endif; else: echo "" ;endif; ?>
<?php }else{ ?>
<tr><td colspan="10">没有相关记录</td></tr>
<?php } ?>
</tbody>
</table>
<div class="btn">
<a href="#" onClick="javascript:$('input[type=checkbox]').attr('checked', true)">全选</a>/
<a href="#" onClick="javascript:$('input[type=checkbox]').attr('checked', false)">取消</a>
<select name="deletesel">
<option value="selected">选中</option>
<option value="all">全部</option>
</select>
<button name="submit" type="submit" class="button" onClick="if(confirm('确认要删除吗?')){if($('select[name=deletesel]:eq(0)').attr('value') == 'selected'){checkuid();return false;}else fnsubmit('formid','__APP__/sys/deleteuser','post');}return false;">
<img src="__APP__/Public/images/curd/b_drop.png" />删除</button>
</div>
<div id="pages"><?php echo ($page); ?></div>
</div>
</div>
<script type="text/javascript">
function checkuid() {
var ids='';
$("input[name='user_id[]']:checked").each(function(i, n){
ids += $(n).val() + ',';
});
if(ids=='') {
window.top.art.dialog({content:"请选择再执行操作",lock:true,width:'200',height:'50',time:1.5},function(){});
return false;} else {
fnsubmit('formid','__APP__/sys/deleteuser','post');
}
}
</script>
</body>
</html>
\ No newline at end of file
<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=7" />
<title>病房探视系统</title>
<link href="__APP__/__PUBLIC__/css/reset.css" rel="stylesheet" type="text/css" />
<link href="__APP__/__PUBLIC__/css/zh-cn-system.css" rel="stylesheet" type="text/css" />
<link href="__APP__/__PUBLIC__/css/table_form.css" rel="stylesheet" type="text/css" />
<link href="__APP__/__PUBLIC__/css/dialog.css" rel="stylesheet" type="text/css" />
<link rel="stylesheet" type="text/css" href="__APP__/__PUBLIC__/css/style/zh-cn-styles1.css" title="styles1" media="screen" />
<link rel="alternate stylesheet" type="text/css" href="__APP__/__PUBLIC__/css/style/zh-cn-styles2.css" title="styles2" media="screen" />
<link rel="alternate stylesheet" type="text/css" href="__APP__/__PUBLIC__/css/style/zh-cn-styles3.css" title="styles3" media="screen" />
<link rel="alternate stylesheet" type="text/css" href="__APP__/__PUBLIC__/css/style/zh-cn-styles4.css" title="styles4" media="screen" />
<script language="javascript" type="text/javascript" src="__APP__/__PUBLIC__/js/jquery.min.js"></script>
<script language="javascript" type="text/javascript" src="__APP__/__PUBLIC__/js/styleswitch.js"></script>
<script language="javascript" type="text/javascript" src="__APP__/__PUBLIC__/js/admin_common.js"></script>
<script language="javascript" type="text/javascript" src="__APP__/__PUBLIC__/js/dialog.js"></script>
<body>
<style type="text/css">
html{_overflow-y:scroll}
</style>
<div id="main_frameid" class="pad-10" style="_margin-right:-12px;_width:98.9%;">
<div class="col-2 lf mr10" style="width:100%;margin-top: 10px;">
<h6>使用帮助</h6>
<div class="content">
编写中...
<!--<h4>1.权限设置</h4>
<p><pre>
选择权限管理-权限信息菜单,可在此设置基本的权限规则
添加/修改:
a.可以选择周一到周日,法定节假日
b.时间精确到分
c.人数指被访人能被多少不同的人访问,次数指每个访客可以进闸机的次数,出不算
不同的时间范围是一条规则,点新增可增加多条规则
删除:
删除需谨慎,会将已分配给病区的权限删除;系统内置的权限不允许删除;
</pre>
</p>
<h4>2.权限分类</h4>
<h5>a.病区权限</h5>
<h5>b.患者权限</h5>
<h5>c.家属权限</h5>
优先级最高
-->
</div>
</div>
</body>
</html>
\ No newline at end of file
<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
<title>病房探视系统-登录</title>
<link rel="stylesheet" type="text/css" href="__APP__/__PUBLIC__/css/login.css" />
<script type="text/javascript">
window.onload = function(){
if(self!=top){top.location.href = self.location.href;}
document.myform.username.focus();
//document.getElementById('code_img').click();
}
</script>
</head>
<body style="background:url('/__PUBLIC__/images/admin_img/bj_black.png') no-repeat;">
<div id="login_bg" class="login_box">
<div class="login_iptbox" style="width: 420px;">
<form action="__APP__/manage/checklogin" method="post" name="myform">
<input name="dosubmit" value="" type="submit" class="login_tj_btn" />
用户名:<input name="username" id="username" type="text" class="ipt" value="" />
密码:<input name="password" type="password" id="password" class="ipt" value="" />
<!--验证码:<input name="verify" type="text" class="ipt ipt_reg" onfocus="document.getElementById('yzm').style.display='block'" autocomplete="off"/>
<div id="yzm" class="yzm">
<img id='code_img' onclick='this.src="__APP__/manage/verify/t/"+Math.random()' src='__APP__/manage/verify'><br /><a href="javascript:document.getElementById('code_img').src='__APP__/manage/verify/t/'+Math.random();void(0);">单击更换验证码</a></div>
</form>
</div>
</div>-->
<div class="copy_right">©2019 病房探视系统&nbsp;|&nbsp;技术支持:北京融威众邦电子技术有限公司&nbsp;|&nbsp;联系电话:010-62152062</div>
</body>
</html>
\ No newline at end of file
<?php if (!defined('THINK_PATH')) exit();?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=7" />
<title>病房探视系统</title>
<link href="__APP__/__PUBLIC__/css/reset.css" rel="stylesheet" type="text/css" />
<link href="__APP__/__PUBLIC__/css/zh-cn-system.css" rel="stylesheet" type="text/css" />
<link href="__APP__/__PUBLIC__/css/table_form.css" rel="stylesheet" type="text/css" />
<link href="__APP__/__PUBLIC__/css/dialog.css" rel="stylesheet" type="text/css" />
<link rel="stylesheet" type="text/css" href="__APP__/__PUBLIC__/css/style/zh-cn-styles1.css" title="styles1" media="screen" />
<link rel="alternate stylesheet" type="text/css" href="__APP__/__PUBLIC__/css/style/zh-cn-styles2.css" title="styles2" media="screen" />
<link rel="alternate stylesheet" type="text/css" href="__APP__/__PUBLIC__/css/style/zh-cn-styles3.css" title="styles3" media="screen" />
<link rel="alternate stylesheet" type="text/css" href="__APP__/__PUBLIC__/css/style/zh-cn-styles4.css" title="styles4" media="screen" />
<script language="javascript" type="text/javascript" src="__APP__/__PUBLIC__/js/jquery.min.js"></script>
<script language="javascript" type="text/javascript" src="__APP__/__PUBLIC__/js/styleswitch.js"></script>
<script language="javascript" type="text/javascript" src="__APP__/__PUBLIC__/js/admin_common.js"></script>
<script language="javascript" type="text/javascript" src="__APP__/__PUBLIC__/js/dialog.js"></script>
<body>
<style type="text/css">
html{_overflow-y:scroll}
</style>
<div id="main_frameid" class="pad-10" style="_margin-right:-12px;_width:98.9%;">
<script type="text/javascript">
$(function(){
updateDev();
if ($.browser.msie && parseInt($.browser.version) < 7) $('#browserVersionAlert').show();
$("input[name='one_open']").change(function(){
setOneopen($(this).val());
});
});
function updateDev()
{
if($("td[id^='td_dev']").size()>0)
{
setTimeout("updateDev()", parseInt('<?php echo C('DEVICE_ACTIVE_TIME') ?>')*1000);
$.getJSON('__APP__/index/updateDev', function(data){
for(k in data)
{
$("td[id='td_dev"+k+"']").html('<img src="__APP__/Public/images/'+data[k]+'">');
}
});
}
}
function setOneopen(v)
{
$.getJSON('__APP__/index/setoneopen/v/'+v, function(data){
if(data == '1')
{
window.top.art.dialog({
id:'alert',
content:'操作成功',
lock:true,
width:'220',
height:'70'
});
setTimeout(function(){
window.top.art.dialog({id:'alert'}).close();
},2000);
}
else
{
window.top.art.dialog({id:'alert',content:'操作失败',lock:true,width:'220',height:'70'});
}
});
}
</script>
<div class="explain-col mb10" style="display:none" id="browserVersionAlert">
使用IE8浏览器可获得最佳视觉效果</div>
<div class="col-2 lf mr10" style="width:100%">
<h6>闸机设备</h6>
<div class="content">
<div class="table-list">
<div style="padding-bottom:5px;">
<span style="font-size:16px;font-weight:bolder;color:red">一键开门</span>
<input type="radio" name="one_open" value="1" <?php if($one_open == 1): ?>checked="checked"<?php endif; ?>>
<input type="radio" name="one_open" value="0" <?php if($one_open == 0): ?>checked="checked"<?php endif; ?>>
注:如果设置"是",所有闸机将开门适用于特殊情况
</div>
<table width="100%" cellspacing="0">
<thead>
<tr>
<th>设备编号</th>
<th>IP地址</th>
<th>方向</th>
<th>位置</th>
<th>状态</th>
</tr>
</thead>
<tbody>
<?php if($list){ ?>
<?php if(is_array($list)): $i = 0; $__LIST__ = $list;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$m): ++$i;$mod = ($i % 2 )?><tr>
<td align="center" width="100"><?php echo ($m["code"]); ?></td>
<td align="center" widht="120"><?php echo (long2ip($m["ip"])); ?></td>
<td align="center" width="80">
<?php
if($m['direction'] == 0)
echo '进';
else if ($m['direction'] == 1)
echo '出';
else
echo '进&出';
?>
</td>
<td align="center" widht="120"><?php echo ($m["position"]); ?></td>
<td align="center" width="80" id="td_dev<?php echo ($m["code"]); ?>"><img src="__APP__/Public/images/<?php if(time() - $m['active_time'] > C('DEVICE_ACTIVE_TIME')) echo 'disabled.gif'; else echo 'enable.gif'; ?>"/></td>
</tr><?php endforeach; endif; else: echo "" ;endif; ?>
<?php }else{ ?>
<tr><td colspan="6">没有相关记录</td></tr>
<?php } ?>
</tbody>
</table>
</div>
</div>
</body>
</html>
\ No newline at end of file
<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=7" />
<title>病房探视系统</title>
<link href="__APP__/__PUBLIC__/css/reset.css" rel="stylesheet" type="text/css" />
<link href="__APP__/__PUBLIC__/css/zh-cn-system.css" rel="stylesheet" type="text/css" />
<link href="__APP__/__PUBLIC__/css/table_form.css" rel="stylesheet" type="text/css" />
<link href="__APP__/__PUBLIC__/css/dialog.css" rel="stylesheet" type="text/css" />
<link rel="stylesheet" type="text/css" href="__APP__/__PUBLIC__/css/style/zh-cn-styles1.css" title="styles1" media="screen" />
<link rel="alternate stylesheet" type="text/css" href="__APP__/__PUBLIC__/css/style/zh-cn-styles2.css" title="styles2" media="screen" />
<link rel="alternate stylesheet" type="text/css" href="__APP__/__PUBLIC__/css/style/zh-cn-styles3.css" title="styles3" media="screen" />
<link rel="alternate stylesheet" type="text/css" href="__APP__/__PUBLIC__/css/style/zh-cn-styles4.css" title="styles4" media="screen" />
<script language="javascript" type="text/javascript" src="__APP__/__PUBLIC__/js/jquery.min.js"></script>
<script language="javascript" type="text/javascript" src="__APP__/__PUBLIC__/js/styleswitch.js"></script>
<script language="javascript" type="text/javascript" src="__APP__/__PUBLIC__/js/admin_common.js"></script>
<script language="javascript" type="text/javascript" src="__APP__/__PUBLIC__/js/dialog.js"></script>
<script type="text/javascript" src="__APP__/__PUBLIC__/js/datepicker/WdatePicker.js"></script>
<script type="text/javascript">
//查看显示二维码
function showEwm(no)
{
var ewm_host = '<?php echo C('FRONTEND_HOST')?>frontend/Index/createEwm';
window.top.art.dialog({id:'showEwm',content:'<img src="'+ewm_host+'/code/'+no+'" />',title:'二维码', width:'300', height:'200'},function () {
window.top.art.dialog({id:'showEwm'}).close();
}
);
}
</script>
</head>
<body>
<div class="subnav">
<div class="content-menu ib-a blue line-x">
</div>
</div>
<style type="text/css">
html{_overflow-y:scroll}
</style><div class="pad-lr-10">
<form name="searchform" action="__ACTION__" method="get" id="formid">
<table width="100%" cellspacing="0" class="search-form">
<tbody>
<tr>
<td><div class="explain-col" style="border-bottom:0px;">
年份:<input class="Wdate" type="text" onClick="new WdatePicker({skin:'whyGreen',dateFmt:'yyyy'})" value="<?php echo ($_GET['year']); ?>" name="year" size="5">
时间:<input class="Wdate" type="text" onClick="new WdatePicker({skin:'whyGreen',dateFmt:'MM-dd HH:mm:ss'})" value="<?php echo ($_GET['stime']); ?>" name="stime" size="15">
<input class="Wdate" type="text" onClick="new WdatePicker({skin:'whyGreen',dateFmt:'MM-dd HH:mm:ss'})" value="<?php echo ($_GET['etime']); ?>" name="etime" size="15">
二维码:<input type="text" value="<?php echo ($_GET['no']); ?>" class="input-text" name="no" size="18">
</div><div class="explain-col" style="border-top:0px;border-bottom:0px;">
被访人:<input type="text" value="<?php echo ($_GET['bfr']); ?>" class="input-text" name="bfr" placeholder="支持被访人住院号、手机号后四位" size="25">
访客:<input type="text" value="<?php echo ($_GET['guest']); ?>" class="input-text" name="guest" placeholder="支持访客姓名、电话、身份证号" size="25">
<button type="submit" class="button" onclick="fnsubmit('formid','__ACTION__','get');"><img src="__APP__/Public/images/curd/b_search.png" style="vertical-align:text-top"/>查询</button>
</div>
<div class="explain-col" style="border-top:0px;color:red">
家属二维码凭条丢失或损坏不能出门怎么办?请找到该家属的登记记录,然后点击操作栏中的“查看二维码”,让家属用拍照即可
</div>
</td>
</tr>
</tbody>
</table>
<div class="table-list">
<table width="100%" cellspacing="0">
<thead>
<tr>
<th width="80">二维码编号</th>
<th width="80">姓名</th>
<th width="120">身份证号</th>
<th width="100">手机号码</th>
<th width="80">被访人住院号</th>
<th width="100">被访人手机后四位</th>
<th width="80">登记时间</th>
<th width="100">操作</th>
</tr>
</thead><tbody>
<?php if($list){ ?>
<?php if(is_array($list)): $i = 0; $__LIST__ = $list;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$o): ++$i;$mod = ($i % 2 )?><tr>
<td align="center"><?php echo ($o["no"]); ?></td>
<td align="center"><?php echo ($o["name"]); ?></td>
<td align="center"><?php echo ($o["shenfenzheng"]); ?></td>
<td align="center"><?php echo ($o["mobile"]); ?></td>
<td align="center"><?php echo ($o["zhuyuanhao"]); ?></td>
<td align="center"><?php echo ($o["p_mobile"]); ?></td>
<td align="center"><?php echo ($o["addtime"]); ?></td>
<td align="center">
<a href="javascript:showEwm('<?php echo ($o["no"]); ?>')">查看二维码</a>|
<a href="__APP__/guest/inout/no/<?php echo ($o["no"]); ?>/ym/<?php echo ($_GET['year']); ?>-<?php echo substr($_GET['stime'],0,2);?>/stime/<?php echo substr($_GET['stime'],3);?>/etime/31 23:59:59">查看进出日志</a>
</td>
</tr><?php endforeach; endif; else: echo "" ;endif; ?>
<?php }else{ ?>
<tr><td colspan="8">没有相关记录</td></tr>
<?php } ?>
</tbody>
</table>
<div id="pages"><?php echo ($page); ?></div>
</div>
</div>
</form>
</div>
</body>
</html>
\ No newline at end of file
<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=7" />
<title>病房探视系统</title>
<link href="__APP__/__PUBLIC__/css/reset.css" rel="stylesheet" type="text/css" />
<link href="__APP__/__PUBLIC__/css/zh-cn-system.css" rel="stylesheet" type="text/css" />
<link href="__APP__/__PUBLIC__/css/table_form.css" rel="stylesheet" type="text/css" />
<link href="__APP__/__PUBLIC__/css/dialog.css" rel="stylesheet" type="text/css" />
<link rel="stylesheet" type="text/css" href="__APP__/__PUBLIC__/css/style/zh-cn-styles1.css" title="styles1" media="screen" />
<link rel="alternate stylesheet" type="text/css" href="__APP__/__PUBLIC__/css/style/zh-cn-styles2.css" title="styles2" media="screen" />
<link rel="alternate stylesheet" type="text/css" href="__APP__/__PUBLIC__/css/style/zh-cn-styles3.css" title="styles3" media="screen" />
<link rel="alternate stylesheet" type="text/css" href="__APP__/__PUBLIC__/css/style/zh-cn-styles4.css" title="styles4" media="screen" />
<script language="javascript" type="text/javascript" src="__APP__/__PUBLIC__/js/jquery.min.js"></script>
<script language="javascript" type="text/javascript" src="__APP__/__PUBLIC__/js/styleswitch.js"></script>
<script language="javascript" type="text/javascript" src="__APP__/__PUBLIC__/js/admin_common.js"></script>
<script language="javascript" type="text/javascript" src="__APP__/__PUBLIC__/js/dialog.js"></script>
<body>
<style type="text/css">
html{_overflow-y:scroll}
</style>
<div id="main_frameid" class="pad-10" style="_margin-right:-12px;_width:98.9%;">
<script type="text/javascript">
$(function(){
getTime();
if ($.browser.msie && parseInt($.browser.version) < 7) $('#browserVersionAlert').show();
});
function getTime()
{
setTimeout("getTime()", 1000);
$.getJSON('__APP__/index/gettime', function(data){
$('#time').html(data.time);
});
}
</script>
<div class="explain-col mb10" style="display:none" id="browserVersionAlert">
使用IE8浏览器可获得最佳视觉效果</div>
<div class="col-2 lf mr10" style="width:100%;margin-top: 10px;">
<h6>服务器环境</h6>
<div class="content">
<table>
<?php if(is_array($info)): $i = 0; $__LIST__ = $info;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$v): ++$i;$mod = ($i % 2 )?><tr><td><?php echo ($key); ?>:</td><td <?php if($key == '服务器时间'): ?>id="time"<?php endif; ?>><?php echo ($v); ?></td></tr><?php endforeach; endif; else: echo "" ;endif; ?>
<tr height="30px"><th colspan="2">&nbsp;</th></tr>
</table>
</div>
</div>
</body>
</html>
\ No newline at end of file
<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=7" />
<title>病房探视系统</title>
<link href="__APP__/__PUBLIC__/css/reset.css" rel="stylesheet" type="text/css" />
<link href="__APP__/__PUBLIC__/css/zh-cn-system.css" rel="stylesheet" type="text/css" />
<link href="__APP__/__PUBLIC__/css/table_form.css" rel="stylesheet" type="text/css" />
<link href="__APP__/__PUBLIC__/css/dialog.css" rel="stylesheet" type="text/css" />
<link rel="stylesheet" type="text/css" href="__APP__/__PUBLIC__/css/style/zh-cn-styles1.css" title="styles1" media="screen" />
<link rel="alternate stylesheet" type="text/css" href="__APP__/__PUBLIC__/css/style/zh-cn-styles2.css" title="styles2" media="screen" />
<link rel="alternate stylesheet" type="text/css" href="__APP__/__PUBLIC__/css/style/zh-cn-styles3.css" title="styles3" media="screen" />
<link rel="alternate stylesheet" type="text/css" href="__APP__/__PUBLIC__/css/style/zh-cn-styles4.css" title="styles4" media="screen" />
<script language="javascript" type="text/javascript" src="__APP__/__PUBLIC__/js/jquery.min.js"></script>
<script language="javascript" type="text/javascript" src="__APP__/__PUBLIC__/js/styleswitch.js"></script>
<script language="javascript" type="text/javascript" src="__APP__/__PUBLIC__/js/admin_common.js"></script>
<script language="javascript" type="text/javascript" src="__APP__/__PUBLIC__/js/dialog.js"></script>
<link href="__APP__/__PUBLIC__/css/jquery.treeview.css" rel="stylesheet" type="text/css" />
<script language="javascript" type="text/javascript" src="__APP__/__PUBLIC__/js/jquery.treeview.min.js"></script>
<script type="text/javascript">
$(function(){
$('#id_area').treeview();
$(":checkbox").bind("click",function(event){
event.stopPropagation(); //停止事件冒泡
});
});
function fnrs(id,level)
{
var ck = $('#'+id).attr('checked');
var cl = $('#'+id).attr('class');
switch(level)
{
case 1:
$('.'+id).each(function(){this.checked = ck;$('.'+this.id).each(function(){this.checked = ck;$('.'+this.id).each(function(){this.checked = ck;})})});
break;
case 2:
$('.'+id).each(function(){this.click();this.checked = ck});
if($('#'+id).attr('checked')==true)
$('#'+cl).attr('checked',true);
else
{
if($(':checkbox[class="'+cl+'"][checked=true]').size()==0)
{
$('#'+cl).attr('checked',false);
}
}
break;
case 3:
$('.'+id).each(function(){this.checked = ck;});
if(ck==true)
{
$('#'+cl).attr('checked',true);
$('#'+$('#'+cl).attr('class')).attr('checked',true);
}
else
{
if($(':checkbox[class="'+cl+'"][checked=true]').size()==0)
{
$('#'+cl).attr('checked',false);
if($(':checkbox[class="'+$('#'+cl).attr('class')+'"][checked=true]').size()==0)
$('#'+$('#'+cl).attr('class')).attr('checked',false);
}
}
break;
case 4:
if(ck==true)
{
$('#'+cl).attr('checked',true);
$('#'+$('#'+cl).attr('class')).attr('checked',true);
$('#'+$('#'+$('#'+cl).attr('class')).attr('class')).attr('checked',true);
}
else
{
if($(':checkbox[class="'+cl+'"][checked=true]').size()==0)
{
$('#'+cl).attr('checked',false);
if($(':checkbox[class="'+$('#'+cl).attr('class')+'"][checked=true]').size()==0)
$('#'+$('#'+cl).attr('class')).attr('checked',false);
if($(':checkbox[class="'+$('#'+$('#'+cl).attr('class')).attr('class')+'"][checked=true]').size()==0)
$('#'+$('#'+$('#'+cl).attr('class')).attr('class')).attr('checked',false);
}
}
break;
}
}
function complete(msg,status){
if (status==1)
{
alertMsg(msg);
setTimeout(function(){
window.top.art.dialog({id:'alert'}).close();
window.top.right.location.href="__APP__/sys/role";
},2000);
}else{
alertMsg(msg);
}
}
function alertMsg(msg)
{
window.top.art.dialog({id:'alert',content:decodeURIComponent(msg),lock:true,width:'220',height:'70'});
}
</script>
</head>
<body>
<style type="text/css">
html{_overflow-y:scroll}
</style><div class="pad-lr-10">
<div class="pad_10">
<div class="content-menu ib-a blue line-x"><a class="on" href="javascript:history.go(-1)"><img src="__APP__/Public/images/curd/b_back.png" /><em>返回</em></a></div>
</div>
<form name="myform" action="__APP__/sys/grantnode" method="post" target="iframe">
<input type="hidden" value="<?php echo ($id); ?>" name="rid" />
<div class="explain-col">
资源列表
</div>
<div class="table-list">
<ul id="id_area" class="filetree">
<?php echo ($html); ?>
</ul>
</div>
<div class="bk15"></div>
<button type="submit" class="button" name="dosubmit"><img src="__APP__/Public/images/curd/b_save.png" style="vertical-align:text-bottom"/>提交</button>
</form>
</div>
<iframe style="display:none" name="iframe"></iframe>
</body>
</html>
\ No newline at end of file
<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=7" />
<title>病房探视系统</title>
<link href="__APP__/__PUBLIC__/css/reset.css" rel="stylesheet" type="text/css" />
<link href="__APP__/__PUBLIC__/css/zh-cn-system.css" rel="stylesheet" type="text/css" />
<link href="__APP__/__PUBLIC__/css/table_form.css" rel="stylesheet" type="text/css" />
<link href="__APP__/__PUBLIC__/css/dialog.css" rel="stylesheet" type="text/css" />
<link rel="stylesheet" type="text/css" href="__APP__/__PUBLIC__/css/style/zh-cn-styles1.css" title="styles1" media="screen" />
<link rel="alternate stylesheet" type="text/css" href="__APP__/__PUBLIC__/css/style/zh-cn-styles2.css" title="styles2" media="screen" />
<link rel="alternate stylesheet" type="text/css" href="__APP__/__PUBLIC__/css/style/zh-cn-styles3.css" title="styles3" media="screen" />
<link rel="alternate stylesheet" type="text/css" href="__APP__/__PUBLIC__/css/style/zh-cn-styles4.css" title="styles4" media="screen" />
<script language="javascript" type="text/javascript" src="__APP__/__PUBLIC__/js/jquery.min.js"></script>
<script language="javascript" type="text/javascript" src="__APP__/__PUBLIC__/js/styleswitch.js"></script>
<script language="javascript" type="text/javascript" src="__APP__/__PUBLIC__/js/admin_common.js"></script>
<script language="javascript" type="text/javascript" src="__APP__/__PUBLIC__/js/dialog.js"></script>
</head>
<body>
<script language="JavaScript">
function complete(msg,status){
if (status==1)
{
alertMsg(msg);
setTimeout(function(){
window.top.art.dialog({id:'alert'}).close();
window.top.right.location.href="__APP__/sys/user?rid=<?php echo ($rid); ?>&rname=<?php echo ($_GET["rname"]); ?>";
},2000);
}else{
alertMsg(msg);
}
}
function alertMsg(msg)
{
window.top.art.dialog({id:'alert',content:decodeURIComponent(msg),lock:true,width:'220',height:'70'});
}
</script>
<style type="text/css">
html{_overflow-y:scroll}
#pass-strength-result {
background-color: #EEEEEE;
border-color: #DDDDDD !important;
border-style: solid;
border-width: 1px;
margin: 5px 5px 5px 0;
padding: 5px;
text-align: center;
width: 200px;
}
#pass-strength-result.bad {
background-color: #FFB78C;
border-color: #FF853C !important;
}
#pass-strength-result.good {
background-color: #FFEC8B;
border-color: #FFCC00 !important;
}
#pass-strength-result.short {
background-color: #FFA0A0;
border-color: #F04040 !important;
}
#pass-strength-result.strong {
background-color: #C3FF88;
border-color: #8DFF1C !important;
}
</style>
<div id="closeParentTime" style="display:none"></div>
<?php if($vo["id"] > 0): ?><form name="myform" id="myform" action="__APP__/sys/updateuser" method="post" target="iframe">
<input type="hidden" name="id" value="<?php echo ($vo["id"]); ?>">
<?php else: ?>
<form name="myform" id="myform" action="__APP__/sys/insertuser" method="post" target="iframe"><?php endif; ?>
<div class="pad_10">
<div class="content-menu ib-a blue line-x"><a class="on" href="javascript:history.go(-1)"><img src="__APP__/Public/images/curd/b_back.png" /><em>返回</em></a></div>
</div>
<div style='overflow-y:auto;overflow-x:hidden' class='scrolltable'>
<table width="100%" cellspacing="0" class="table_form contentWrap">
<tr>
<th width="120">用户名</th>
<td><input type="text" name="account" id="user_login" value="<?php echo ($vo["account"]); ?>" size="15"><font color="red">*</font>注:3个字符以上,字母或数字组合</td>
</tr>
<tr>
<th width="120">密码</th>
<td><input type="password" name="password" id="password" value="" size="15" class="input-text"><font color="red">*</font><?php if($vo["id"] > 0): ?>注:不修改请留空<?php endif; ?></td>
</tr>
<tr>
<th width="120">病区编码</th>
<td><input type="text" name="bind_account" id="bind_account" value="<?php echo ($vo["bind_account"]); ?>" size="15" class="input-text"><?php if($vo["id"] > 0): ?>注:关联病区时候填入<?php endif; ?></td>
</tr>
<tr>
<th width="120" valign="top">确认密码</th>
<td>
<input type="password" name="repassword" id="repassword" size="15" class="input-text"><font color="red">*</font><?php if($vo["id"] > 0): ?>注:不修改请留空<?php endif; ?>
<div id="pass-strength-result">强度评估</div>
<p>提示:您的密码最好至少包含 7 个字符。为了保证密码强度,使用大小写字母,数字和符号,例如 ! " ? $ % ^ &amp; )。</p>
</td>
</tr>
<tr>
<th width="120">状态</th>
<td><select name="status"><option value="1">启用</option><option value="0">禁用</option></select><font color="red">*</font></td>
</tr>
<?php if($rid != ''): ?><input type="hidden" name="role_id" value="<?php echo ($rid); ?>" />
<?php else: ?>
<tr>
<th width="80">角色</th>
<td><select name="role_id" class="select">
<option value="">-请选择-</option>
<?php if(is_array($role)): foreach($role as $key=>$r): ?><option value="<?php echo ($r["id"]); ?>" <?php if($r['id'] == $vo['role_id']): ?>selected<?php endif; ?>><?php echo ($r["name"]); ?></option><?php endforeach; endif; ?>
</select>&nbsp;<font color="red">*</font></td>
</tr><?php endif; ?>
<tr>
<th width="120">备注</th>
<td><textarea name="remark" cols="30" rows="3"><?php echo ($vo["remark"]); ?></textarea></td>
</tr>
</table>
</div>
<div class="bk10"></div>
<div class="btn">
<button type="submit" class="button" name="dosubmit" style="margin-left:5px;"><img src="__APP__/Public/images/curd/b_save.png" style="vertical-align:text-bottom"/>提交</button>
</div>
</div>
</form>
</div>
<script type='text/javascript'>
/* <![CDATA[ */
var pwsL10n = {"empty":"强度评估","short":"极弱","bad":"弱","good":"中等","strong":"强","mismatch":"不匹配"};
/* ]]> */
</script>
<script language="javascript" type="text/javascript" src="__APP__/__PUBLIC__/js/password.js"></script>
<iframe style="display:none" name="iframe"></iframe>
</body>
</html>
\ No newline at end of file
<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=7" />
<title>病房探视系统</title>
<link href="__APP__/__PUBLIC__/css/reset.css" rel="stylesheet" type="text/css" />
<link href="__APP__/__PUBLIC__/css/zh-cn-system.css" rel="stylesheet" type="text/css" />
<link href="__APP__/__PUBLIC__/css/table_form.css" rel="stylesheet" type="text/css" />
<link href="__APP__/__PUBLIC__/css/dialog.css" rel="stylesheet" type="text/css" />
<link rel="stylesheet" type="text/css" href="__APP__/__PUBLIC__/css/style/zh-cn-styles1.css" title="styles1" media="screen" />
<link rel="alternate stylesheet" type="text/css" href="__APP__/__PUBLIC__/css/style/zh-cn-styles2.css" title="styles2" media="screen" />
<link rel="alternate stylesheet" type="text/css" href="__APP__/__PUBLIC__/css/style/zh-cn-styles3.css" title="styles3" media="screen" />
<link rel="alternate stylesheet" type="text/css" href="__APP__/__PUBLIC__/css/style/zh-cn-styles4.css" title="styles4" media="screen" />
<script language="javascript" type="text/javascript" src="__APP__/__PUBLIC__/js/jquery.min.js"></script>
<script language="javascript" type="text/javascript" src="__APP__/__PUBLIC__/js/styleswitch.js"></script>
<script language="javascript" type="text/javascript" src="__APP__/__PUBLIC__/js/admin_common.js"></script>
<script language="javascript" type="text/javascript" src="__APP__/__PUBLIC__/js/dialog.js"></script>
</head>
<body>
<div class="subnav">
<div class="content-menu ib-a blue line-x">
<a class="add fb" href="__APP__/sys/addrole"><img src="__APP__/Public/images/curd/b_add.png" /><em>添加角色</em></a></div>
</div>
<div class="pad-lr-10">
<form name="searchform" action="__ACTION__" method="get" id="formid">
<table width="100%" cellspacing="0" class="search-form">
<tbody>
<tr>
<td><div class="explain-col">
角色名称:<input type="text" value="<?php echo ($filter['name']); ?>" class="input-text" name="name">
<button type="submit" class="button" onclick="fnsubmit('formid','__ACTION__','get');"><img src="__APP__/Public/images/curd/b_search.png" style="vertical-align:text-top"/>查询</button>
</div>
</td>
</tr>
</tbody>
</table>
<div class="table-list">
<table width="100%" cellspacing="0">
<thead>
<tr>
<th width="35" align="center"><input type="checkbox" value="" id="check_box" onclick="selectall('role_id[]');"></th>
<th>角色名称</th>
<th>备注</th>
<th>操作</th>
</tr>
</thead>
<tbody>
<?php if($list){ ?>
<?php if(is_array($list)): $i = 0; $__LIST__ = $list;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$role): ++$i;$mod = ($i % 2 )?><tr>
<td align="center" width="35"><?php if($role["id"] != 1): ?><input type="checkbox" name="role_id[]" value="<?php echo ($role["id"]); ?>"><?php endif; ?></td>
<td align="center"><?php echo ($role["name"]); ?></td>
<td align="center"><?php echo ($role["remark"]); ?></td>
<td align="center">
<a href='__APP__/sys/user/rid/<?php echo ($role["id"]); ?>'>用户列表</a>
<?php if(($role["id"] != 1) && ($role["id"] != $_SESSION['rid'])): ?><a href='__APP__/sys/addrole/id/<?php echo ($role["id"]); ?>'><img src="__APP__/Public/images/curd/b_edit.png" />修改</a>
<a href='javascript:void(0)' onClick="if(confirm('确认要删除<?php echo ($role["name"]); ?>吗?'))
location.href='__APP__/sys/deleterole/id/<?php echo ($role["id"]); ?>'"><img src="__APP__/Public/images/curd/b_drop.png" />删除</a>
<a href='__APP__/sys/node/id/<?php echo ($role["id"]); ?>'><img src="__APP__/Public/images/curd/b_tblops.png" />授权</a><?php endif; ?>
</if>
</td>
</tr><?php endforeach; endif; else: echo "" ;endif; ?>
<?php }else{ ?>
<tr><td colspan="4">没有相关记录</td></tr>
<?php } ?>
</tbody>
</table>
<div class="btn">
<a href="#" onClick="javascript:$('input[type=checkbox]').attr('checked', true)">全选</a>/
<a href="#" onClick="javascript:$('input[type=checkbox]').attr('checked', false)">取消</a>
<select name="deletesel">
<option value="selected">选中</option>
<option value="all">全部</option>
</select>
<button name="submit" type="submit" class="button" onclick="return checkForm();"><img src="__APP__/Public/images/curd/b_drop.png"/>删除</button>
</div>
<div id="pages"><?php echo ($page); ?></div>
</div>
</form>
</div>
<script type="text/javascript">
function checkForm() {
if(confirm('确认要删除吗?'))
{
if($('select[name=deletesel]:eq(0)').attr('value') == 'selected')
{
var ids='';
$("input[name='role_id[]']:checked").each(function(i, n){
ids += $(n).val() + ',';
});
if(ids=='') {
window.top.art.dialog({content:"请选择再执行操作",lock:true,width:'200',height:'50',time:1.5},function(){});
return false;}
}
fnsubmit('formid','__APP__/sys/deleterole','post');
return true;
}
else
return false;
}
</script>
</body>
</html>
\ No newline at end of file
<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=7" />
<title>病房探视系统</title>
<link href="__APP__/__PUBLIC__/css/reset.css" rel="stylesheet" type="text/css" />
<link href="__APP__/__PUBLIC__/css/zh-cn-system.css" rel="stylesheet" type="text/css" />
<link href="__APP__/__PUBLIC__/css/table_form.css" rel="stylesheet" type="text/css" />
<link href="__APP__/__PUBLIC__/css/dialog.css" rel="stylesheet" type="text/css" />
<link rel="stylesheet" type="text/css" href="__APP__/__PUBLIC__/css/style/zh-cn-styles1.css" title="styles1" media="screen" />
<link rel="alternate stylesheet" type="text/css" href="__APP__/__PUBLIC__/css/style/zh-cn-styles2.css" title="styles2" media="screen" />
<link rel="alternate stylesheet" type="text/css" href="__APP__/__PUBLIC__/css/style/zh-cn-styles3.css" title="styles3" media="screen" />
<link rel="alternate stylesheet" type="text/css" href="__APP__/__PUBLIC__/css/style/zh-cn-styles4.css" title="styles4" media="screen" />
<script language="javascript" type="text/javascript" src="__APP__/__PUBLIC__/js/jquery.min.js"></script>
<script language="javascript" type="text/javascript" src="__APP__/__PUBLIC__/js/styleswitch.js"></script>
<script language="javascript" type="text/javascript" src="__APP__/__PUBLIC__/js/admin_common.js"></script>
<script language="javascript" type="text/javascript" src="__APP__/__PUBLIC__/js/dialog.js"></script>
<script type="text/javascript" src="__APP__/__PUBLIC__/js/datepicker/WdatePicker.js"></script>
<script type="text/javascript">
//选择权限弹窗
function selectAuth(code)
{
window.top.art.dialog({id:'select',iframe:'__APP__/authority/index?from=unit&bingqucode='+code,title:'设置权限', width:'400', height:'300'}, function(){
var d = window.top.art.dialog({id:'select'}).data.iframe;
fnselect(code,d.$("input:radio[name='id']:checked").val());
}, function(){window.top.art.dialog({id:'select'}).close()});
}
function fnselect(code,authority_id)
{
$.ajax({
url:'__APP__/authority/sel',
type:'post',
dataType:'json',
data:{code:code,authority_id:authority_id},
success:function(req){
complete(req.info,req.status);
},
error:function(){
complete('设置权限失败',0);
}
});
}
function complete(msg,status){
if (status==1)
{
alertMsg(msg);
setTimeout(function(){
window.top.art.dialog({id:'alert'}).close();
},2000);
}else{
alertMsg(msg);
}
}
function alertMsg(msg)
{
window.top.art.dialog({id:'alert',content:decodeURIComponent(msg),lock:true,width:'220',height:'70'});
}
</script>
</head>
<body>
<div class="subnav">
<div class="content-menu ib-a blue line-x">
</div>
</div>
<style type="text/css">
html{_overflow-y:scroll}
</style><div class="pad-lr-10">
<form name="searchform" action="__ACTION__" method="get" id="formid">
<table width="100%" cellspacing="0" class="search-form">
<tbody>
<tr>
<td><div class="explain-col">
病区名称:<input type="text" value="<?php echo ($_GET['bingqu']); ?>" class="input-text" name="bingqu" placeholder="">
科室名称:<input type="text" value="<?php echo ($_GET['keshi']); ?>" class="input-text" name="keshi" placeholder="">
<button type="submit" class="button" onclick="fnsubmit('formid','__ACTION__','get');"><img src="__APP__/Public/images/curd/b_search.png" style="vertical-align:text-top"/>查询</button>
</div>
</td>
</tr>
</tbody>
</table>
<div class="table-list">
<table width="100%" cellspacing="0">
<thead>
<tr>
<th width="80">病区编号</th>
<th width="80">病区名称</th>
<th width="80">科室编号</th>
<th width="80">科室名称</th>
<th width="10%">操作</th>
</tr>
</thead><tbody>
<?php if($list){ ?>
<?php if(is_array($list)): $i = 0; $__LIST__ = $list;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$o): ++$i;$mod = ($i % 2 )?><tr>
<td align="center"><?php echo ($o["BINGQUCODE"]); ?></td>
<td align="center"><?php echo ($o["BINGQU"]); ?></td>
<td align="center"><?php echo ($o["KESHICODE"]); ?></td>
<td align="center"><?php echo ($o["KESHI"]); ?></td>
<td align="center">
<a href='javascript:selectAuth(<?php echo ($o["BINGQUCODE"]); ?>)'><img src="__APP__/Public/images/curd/b_tblops.png" />设置权限</a>
</td>
</tr><?php endforeach; endif; else: echo "" ;endif; ?>
<?php }else{ ?>
<tr><td colspan="6">没有相关记录</td></tr>
<?php } ?>
</tbody>
</table>
<div id="pages"><?php echo ($page); ?></div>
</div>
</div>
</form>
</div>
</body>
</html>
\ No newline at end of file
<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=7" />
<title>病房探视系统</title>
<link href="__APP__/__PUBLIC__/css/reset.css" rel="stylesheet" type="text/css" />
<link href="__APP__/__PUBLIC__/css/zh-cn-system.css" rel="stylesheet" type="text/css" />
<link href="__APP__/__PUBLIC__/css/table_form.css" rel="stylesheet" type="text/css" />
<link href="__APP__/__PUBLIC__/css/dialog.css" rel="stylesheet" type="text/css" />
<link rel="stylesheet" type="text/css" href="__APP__/__PUBLIC__/css/style/zh-cn-styles1.css" title="styles1" media="screen" />
<link rel="alternate stylesheet" type="text/css" href="__APP__/__PUBLIC__/css/style/zh-cn-styles2.css" title="styles2" media="screen" />
<link rel="alternate stylesheet" type="text/css" href="__APP__/__PUBLIC__/css/style/zh-cn-styles3.css" title="styles3" media="screen" />
<link rel="alternate stylesheet" type="text/css" href="__APP__/__PUBLIC__/css/style/zh-cn-styles4.css" title="styles4" media="screen" />
<script language="javascript" type="text/javascript" src="__APP__/__PUBLIC__/js/jquery.min.js"></script>
<script language="javascript" type="text/javascript" src="__APP__/__PUBLIC__/js/styleswitch.js"></script>
<script language="javascript" type="text/javascript" src="__APP__/__PUBLIC__/js/admin_common.js"></script>
<script language="javascript" type="text/javascript" src="__APP__/__PUBLIC__/js/dialog.js"></script>
</head>
<body>
<script language="JavaScript">
function complete(msg,status){
if (status==1)
{
alertMsg(msg);
setTimeout(function(){
window.top.art.dialog({id:'alert'}).close();
window.top.right.location.href="__APP__/sys/role";
},2000);
}else{
alertMsg(msg);
}
}
function alertMsg(msg)
{
window.top.art.dialog({id:'alert',content:decodeURIComponent(msg),lock:true,width:'220',height:'70'});
}
function newclassselect()
{
var v = $('select[name="class_id"]:first').attr('value');
var pid = '<?php echo ($vo["parent_id"]); ?>';
if(v)
{
$.post('__APP__/sys/addrole',{act:'classajax',class_id:v,parent_id:pid},function(data){
$('select[name="parent_id"]:first').html(data);
});
}
}
$(function(){
if('<?php echo ($vo["id"]); ?>')
{
newclassselect();
}
});
</script>
<style type="text/css">
html{_overflow-y:scroll}
</style><div id="closeParentTime" style="display:none"></div>
<?php if($vo["id"] > 0): ?><form name="myform" id="myform" action="__APP__/sys/updaterole" method="post" target="iframe">
<input type="hidden" name="id" value="<?php echo ($vo["id"]); ?>">
<?php else: ?>
<form name="myform" id="myform" action="__APP__/sys/insertrole" method="post" target="iframe""><?php endif; ?>
<div class="pad_10">
<div class="content-menu ib-a blue line-x"><a class="on" href="javascript:history.go(-1)"><img src="__APP__/Public/images/curd/b_back.png" /><em>返回</em></a></div>
</div>
<div style='overflow-y:auto;overflow-x:hidden' class='scrolltable'>
<table width="100%" cellspacing="0" class="table_form contentWrap">
<tr>
<th width="120">角色名称</th>
<td><input type="text" name="name" id="name" value="<?php echo ($vo["name"]); ?>" size="15"><font color="red">*</font></td>
</tr>
<tr>
<th width="120">备注</th>
<td><textarea name="remark" cols="30" rows="3"><?php echo ($vo["remark"]); ?></textarea></td>
</tr>
</table>
</div>
<div class="bk10"></div>
<div class="btn">
<button type="submit" class="button" name="dosubmit" style="margin-left:5px;"><img src="__APP__/Public/images/curd/b_save.png" style="vertical-align:text-bottom"/>提交</button>
</div>
</div>
</form>
</div>
<iframe style="display:none" name="iframe"></iframe>
</body>
</html>
\ No newline at end of file
<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>提示信息</title>
<style type="text/css">
<!--
*{ padding:0; margin:0; font-size:12px}
a:link,a:visited{text-decoration:none;color:#0068a6}
a:hover,a:active{color:#ff6600;text-decoration: underline}
.showMsg{border: 1px solid #1e64c8; zoom:1; width:450px; height:172px;position:absolute;top:44%;left:50%;margin:-87px 0 0 -225px}
.showMsg h5{background-image: url(__APP__/Public/images/msg_img/msg.png);background-repeat: no-repeat; color:#fff; padding-left:35px; height:25px; line-height:26px;*line-height:28px; overflow:hidden; font-size:14px; text-align:left}
.showMsg .content{ padding:46px 12px 10px 45px; font-size:14px; height:64px; text-align:left}
.showMsg .bottom{ background:#e4ecf7; margin: 0 1px 1px 1px;line-height:26px; *line-height:30px; height:26px; text-align:center}
.showMsg .ok,.showMsg .guery{background: url(__APP__/Public/images/msg_img/msg_bg.png) no-repeat 0px -560px;}
.showMsg .guery{background-position: left -460px;}
-->
</style>
<script type="text/javascript">
url = '<?php echo ($jumpUrl); ?>';
function jumpurl()
{
setTimeout(function(){location.href=url},<?php echo ($waitSecond); ?>*1000);
}
</script>
</head>
</head>
<body <?php if($message != L( '_VALID_ACCESS_' )): ?>onload="jumpurl()"<?php endif; ?>
<div class="showMsg" style="text-align:center">
<h5>提示信息</h5>
<div class="content guery" style="display:inline-block;display:-moz-inline-stack;zoom:1;*display:inline;max-width:330px"><?php echo ($message); ?>
<?php if($message == L( '_VALID_ACCESS_' )): ?><!--<a href="__APP__/manage/logout">退出</a>--><?php endif; ?>
</div>
<?php if($message != L( '_VALID_ACCESS_' )): ?><div class="bottom">
<a href="<?php echo ($jumpUrl); ?>">如果您的浏览器没有自动跳转,请点击这里</a>
</div><?php endif; ?>
</div>
</body>
</html>
\ No newline at end of file
<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=7" />
<title>病房探视系统</title>
<link href="__APP__/__PUBLIC__/css/reset.css" rel="stylesheet" type="text/css" />
<link href="__APP__/__PUBLIC__/css/zh-cn-system.css" rel="stylesheet" type="text/css" />
<link href="__APP__/__PUBLIC__/css/table_form.css" rel="stylesheet" type="text/css" />
<link href="__APP__/__PUBLIC__/css/dialog.css" rel="stylesheet" type="text/css" />
<link rel="stylesheet" type="text/css" href="__APP__/__PUBLIC__/css/style/zh-cn-styles1.css" title="styles1" media="screen" />
<link rel="alternate stylesheet" type="text/css" href="__APP__/__PUBLIC__/css/style/zh-cn-styles2.css" title="styles2" media="screen" />
<link rel="alternate stylesheet" type="text/css" href="__APP__/__PUBLIC__/css/style/zh-cn-styles3.css" title="styles3" media="screen" />
<link rel="alternate stylesheet" type="text/css" href="__APP__/__PUBLIC__/css/style/zh-cn-styles4.css" title="styles4" media="screen" />
<script language="javascript" type="text/javascript" src="__APP__/__PUBLIC__/js/jquery.min.js"></script>
<script language="javascript" type="text/javascript" src="__APP__/__PUBLIC__/js/styleswitch.js"></script>
<script language="javascript" type="text/javascript" src="__APP__/__PUBLIC__/js/admin_common.js"></script>
<script language="javascript" type="text/javascript" src="__APP__/__PUBLIC__/js/dialog.js"></script>
<script type="text/javascript" src="__APP__/__PUBLIC__/js/datepicker/WdatePicker.js"></script>
<script type="text/javascript">
//增加权限弹窗
function addAuth(zhuyuanhao,title,bpv)
{
window.top.art.dialog({id:'addAuth',iframe:'__APP__/authority/edit?from=patient&zhuyuanhao='+zhuyuanhao+'&bpv='+bpv,title:title, width:'500', height:'400'}, function(){
var d = window.top.art.dialog({id:'addAuth'}).data.iframe;
d.$('#myform').submit();return false;
}, function(){window.top.art.dialog({id:'addAuth'}).close();});
}
//设置权限弹窗
function setAuth(zhuyuanhao,type)
{
id = 'setAuth'+type;
title = '设置';
if(type == 1)
title += '陪住';
else if(type == 2)
title += '陪同外出检查';
title += '权限';
window.top.art.dialog({id:id,iframe:'__APP__/hospital/set?zhuyuanhao='+zhuyuanhao+'&type='+type,title:title, width:'500', height:'400'}, function(){
var d = window.top.art.dialog({id:id}).data.iframe;
setAuthAjax(zhuyuanhao,type,d.$("input[name^=id]:checked"),title,id,d.$("input[name='status']:checked").val());
return false;
}, function(){window.top.art.dialog({id:id}).close()});
}
function setAuthAjax(zhuyuanhao,type,id,title,did,status)
{
ids = '';
if(type == 1 && id.size() > 1)
{
window.top.art.dialog({id:'alert',content:'最多选择一名家属',lock:true,width:'220',height:'70'});
return false;
}
if(type == 2 && id.size() > 2)
{
window.top.art.dialog({id:'alert',content:'最多选择两名家属',lock:true,width:'220',height:'70'});
return false;
}
id.each(function(){
ids += $(this).val()+',';
});
$.ajax({
url:"__APP__/hospital/setajax",
type:"post",
dataType:"json",
data:{zhuyuanhao:zhuyuanhao,type:type,id:ids,status:status},
success:function(req){
window.top.art.dialog({
id:'alert',
content:decodeURIComponent(req.info),
lock:true,
width:'220',
height:'70'
});
if(req.status == 1)
{
setTimeout(function(){
window.top.art.dialog({id:'alert'}).close();
window.top.art.dialog({id:did}).close();
},2000);
}
},
error:function(){
window.top.art.dialog({id:'alert',content:decodeURIComponent(title+'失败'),lock:true,width:'220',height:'70'});
}
});
}
//其他设置
function otherAuth(zhuyuanhao)
{
window.top.art.dialog({id:'otherAuth',iframe:'__APP__/hospital/otherset?zhuyuanhao='+zhuyuanhao,title:'其他设置', width:'500', height:'320'}, function(){
var d = window.top.art.dialog({id:'otherAuth'}).data.iframe;
d.$('#othersetform').submit();return false;
}, function(){window.top.art.dialog({id:'otherAuth'}).close()});
}
</script>
</head>
<body>
<div class="subnav">
<div class="content-menu ib-a blue line-x">
</div>
</div>
<style type="text/css">
html{_overflow-y:scroll}
</style><div class="pad-lr-10">
<form name="searchform" action="__ACTION__" method="get" id="formid">
<table width="100%" cellspacing="0" class="search-form">
<tbody>
<tr>
<td><div class="explain-col">
住院号:<input type="text" value="<?php echo ($_GET['zhuyuanhao']); ?>" class="input-text" name="zhuyuanhao">
所属病区:<input type="text" value="<?php echo ($_GET['bingqu']); ?>" class="input-text" name="bingqu">
基本信息:<input type="text" value="<?php echo ($_GET['xds']); ?>" class="input-text" name="xds" placeholder="姓名、电话、身份证号" size="25">
<span <?php if($_SESSION['account'] == 'ssjr'): ?>style="display:none"<?php endif; ?>>
状态:
<select name="status">
<option value="" <?php if($_GET['status'] == ''): ?>selected<?php endif; ?>>请选择</option>
<option value="0" <?php if($_GET['status'] == '0'): ?>selected<?php endif; ?>>在院</option>
<option value="1" <?php if($_GET['status'] == '1'): ?>selected<?php endif; ?>>出院</option>
</select>
</span>
<button type="submit" class="button" onclick="fnsubmit('formid','__ACTION__','get');"><img src="__APP__/Public/images/curd/b_search.png" style="vertical-align:text-top"/>查询</button>
</div>
</td>
</tr>
</tbody>
</table>
<div class="table-list">
<?php if($_SESSION['account'] != 'ssjr'): ?><div><button name="submit" type="submit" class="button" onClick="return checkForm();"><img src="__APP__/Public/images/curd/b_tblops.png" />批量增加权限</button><div><?php endif; ?>
<table width="100%" cellspacing="0" style="margin-top:10px;">
<thead>
<tr>
<th width="35" align="center"><input type="checkbox" value="" id="check_box" onclick="selectall('id[]');"></th>
<th width="60">住院号</th>
<th width="30">床号</th>
<th width="50">姓名</th>
<th width="120">身份证号</th>
<th width="100">手机号码</th>
<th width="100">科室|病区</th>
<th width="80">住院时间</th>
<!--<th width="80">住院次数</th>-->
<th width="80">出院时间</th>
<th width="100">综合状态</th>
<th width="180">操作</th>
</tr>
</thead><tbody>
<?php if($list){ ?>
<?php if(is_array($list)): $i = 0; $__LIST__ = $list;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$o): ++$i;$mod = ($i % 2 )?><?php if($rulekv[$o['ZHUYUANHAO']] != '' && $rulekv[$o['ZHUYUANHAO']] != '[]')
echo "<tr style=\"background-color:#DDDDDD;\">";
else
echo "<tr>";
?>
<td align="center" width="35">
<?php if($o["YNOUT"] != 1): ?><input type="checkbox" name="id[]" bpv="<?php echo ($o["BEDNO"]); ?>-<?php echo ($o["PAT_NAME"]); ?>" value="<?php echo ($o["ZHUYUANHAO"]); ?>"><?php endif; ?>
</td>
<td align="center"><?php echo ($o["ZHUYUANHAO"]); ?></td>
<td align="center"><?php echo ($o["BEDNO"]); ?></td>
<td align="center"><?php echo ($o["PAT_NAME"]); ?></td>
<td align="center"><?php echo ($o["SHENFENZHENG"]); ?></td>
<td align="center"><?php echo ($o["TELPHONE"]); ?></td>
<td align="center"><?php echo ($o["KESHI"]); ?>|<?php echo ($o["BINGQU"]); ?></td>
<td align="center"><?php echo ($o["IN_TIME_YMD"]); ?></php></td>
<!--<td align="center"><?php echo ($o["TIMES"]); ?></td>-->
<td align="center"><?php if($o["YNOUT"] == 1): ?><font color="red"><?php echo ($o["OUTDATE_YMD"]); ?></font><?php else: ?><?php endif; ?></td>
<td align="center">
<?php
if($_SESSION['account'] == 'ssjr'){
if($sskv[$o['ZHUYUANHAO']] == 1)
echo '<span style="color:red">手术;</span>';
else
echo '<span title="'.$arule_kv[1].'"></span>';
}
else
{
if(!isset($zhqx[$o['ZHUYUANHAO']]))
{
echo '<span title="'.$arule_kv[1].'"></span>';
}
else
{
foreach($zhqx[$o['ZHUYUANHAO']] as $z)
{
if($z[0] == '普通权限')
echo '<span title="'.$z[1].'">'.$z[0].'</span>;';
else
echo '<span style="color:red" title="'.$z[1].'">'.$z[0].'</span>;';
}
}
}
?>
</td>
<td align="center">
<a href="javascript:addAuth('<?php echo ($o["ZHUYUANHAO"]); ?>','增加权限','')"><img src="__APP__/Public/images/curd/b_tblops.png" />
增加权限
<?php if($rulekv[$o['ZHUYUANHAO']] != '' && $rulekv[$o['ZHUYUANHAO']] != '[]')
echo '<font color="red">(已设置)</font>';?>
</a><!--&nbsp;|
<a href="javascript:setAuth('<?php echo ($o["ZHUYUANHAO"]); ?>',1)"><img src="__APP__/Public/images/curd/b_tblops.png" />陪住权限</a><br>
<a href="javascript:setAuth('<?php echo ($o["ZHUYUANHAO"]); ?>',2)"><img src="__APP__/Public/images/curd/b_tblops.png" />外出检查&nbsp;|
<a href="javascript:otherAuth('<?php echo ($o["ZHUYUANHAO"]); ?>')"><img src="__APP__/Public/images/curd/b_tblops.png" />其他设置-->
</td>
</tr><?php endforeach; endif; else: echo "" ;endif; ?>
<?php }else{ ?>
<tr><td colspan="10">没有相关记录</td></tr>
<?php } ?>
</tbody>
</table>
<?php if($_SESSION['account'] != 'ssjr'): ?><div class="btn">
<a href="#" onClick="javascript:$('input[type=checkbox]').attr('checked', true)">全选</a>
/<a href="#"onClick="javascript:$('input[type=checkbox]').attr('checked', false)">取消</a>
<button name="submit" type="submit" class="button" onClick="return checkForm();"><img src="__APP__/Public/images/curd/b_tblops.png" />批量增加权限</button>
</div><?php endif; ?>
<div id="pages"><?php echo ($page); ?></div>
</div>
</div>
</form>
</div>
<script type="text/javascript">
function checkForm() {
if($("input[name='id[]']").size() > 0)
{
var ids='';
var bpv='';
$("input[name='id[]']:checked").each(function(i, n){
ids += $(n).val() + ',';
bpv += $(n).attr('bpv')+',';
});
if(ids=='') {
window.top.art.dialog({content:"请勾选再执行该操作",lock:true,width:'200',height:'50',time:3},function(){});
return false;}
}
else
{
window.top.art.dialog({content:"没有要操作的记录",lock:true,width:'200',height:'50',time:3},function(){});
return false;}
addAuth(ids,'批量增加权限',bpv);
return false;
}
</script>
</body>
</html>
\ No newline at end of file
<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=7" />
<title>病房探视系统</title>
<link href="__APP__/__PUBLIC__/css/reset.css" rel="stylesheet" type="text/css" />
<link href="__APP__/__PUBLIC__/css/zh-cn-system.css" rel="stylesheet" type="text/css" />
<link href="__APP__/__PUBLIC__/css/table_form.css" rel="stylesheet" type="text/css" />
<link href="__APP__/__PUBLIC__/css/dialog.css" rel="stylesheet" type="text/css" />
<link rel="stylesheet" type="text/css" href="__APP__/__PUBLIC__/css/style/zh-cn-styles1.css" title="styles1" media="screen" />
<link rel="alternate stylesheet" type="text/css" href="__APP__/__PUBLIC__/css/style/zh-cn-styles2.css" title="styles2" media="screen" />
<link rel="alternate stylesheet" type="text/css" href="__APP__/__PUBLIC__/css/style/zh-cn-styles3.css" title="styles3" media="screen" />
<link rel="alternate stylesheet" type="text/css" href="__APP__/__PUBLIC__/css/style/zh-cn-styles4.css" title="styles4" media="screen" />
<script language="javascript" type="text/javascript" src="__APP__/__PUBLIC__/js/jquery.min.js"></script>
<script language="javascript" type="text/javascript" src="__APP__/__PUBLIC__/js/styleswitch.js"></script>
<script language="javascript" type="text/javascript" src="__APP__/__PUBLIC__/js/admin_common.js"></script>
<script language="javascript" type="text/javascript" src="__APP__/__PUBLIC__/js/dialog.js"></script>
<script type="text/javascript" src="__APP__/__PUBLIC__/js/datepicker/WdatePicker.js"></script>
</head>
<body>
<div class="subnav">
</div>
<style type="text/css">
html{_overflow-y:scroll}
</style><div class="pad-lr-10">
<form name="searchform" action="__ACTION__" method="get" >
<table width="100%" cellspacing="0" class="search-form">
<tbody>
<tr>
<td><div class="explain-col">
用户名:<input type="text" value="<?php echo ($filter['account']); ?>" class="input-text" name="account">
操作:<input type="text" value="<?php echo ($filter['action']); ?>" class="input-text" name="action">
开始时间:<input type="text" value="<?php echo ($filter['btime']); ?>" class="Wdate" name='btime' style="width:160px" onClick="new WdatePicker({skin:'whyGreen',dateFmt:'yyyy-MM-dd HH:mm:ss'})">
结束时间:<input type="text" value="<?php echo ($filter['etime']); ?>" class="Wdate" name='etime' style="width:160px" onClick="new WdatePicker({skin:'whyGreen',dateFmt:'yyyy-MM-dd HH:mm:ss'})">
<button type="submit" class="button"><img src="__APP__/Public/images/curd/b_search.png" style="vertical-align:text-top"/>查询</button>
</div>
</td>
</tr>
</tbody>
</table>
</form>
<div class="table-list">
<table width="100%" cellspacing="0">
<thead>
<tr>
<th>用户名</th>
<th>操作</th>
<th>结果</th>
<th>时间</th>
</tr>
</thead>
<tbody>
<?php if($list){ ?>
<?php if(is_array($list)): $i = 0; $__LIST__ = $list;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$log): ++$i;$mod = ($i % 2 )?><tr>
<td align="center"><?php echo ($log["account"]); ?></td>
<td style="width:400px;word-break:break-all;word-wrap:break-word;overflow:hidden"><?php echo ($log["action"]); ?></td>
<td align="center"><?php if($log["result"] == 1): ?>成功<?php else: ?>失败<?php endif; ?></td>
<td align="center"><?php echo ($log["time"]); ?></td>
</tr><?php endforeach; endif; else: echo "" ;endif; ?>
<?php }else{ ?>
<tr><td colspan="4">没有相关记录</td></tr>
<?php } ?>
</tbody>
</table>
<div id="pages"><?php echo ($page); ?></div>
</div>
</body>
</html>
\ No newline at end of file
<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=7" />
<title>病房探视系统</title>
<link href="__APP__/__PUBLIC__/css/reset.css" rel="stylesheet" type="text/css" />
<link href="__APP__/__PUBLIC__/css/zh-cn-system.css" rel="stylesheet" type="text/css" />
<link href="__APP__/__PUBLIC__/css/table_form.css" rel="stylesheet" type="text/css" />
<link href="__APP__/__PUBLIC__/css/dialog.css" rel="stylesheet" type="text/css" />
<link rel="stylesheet" type="text/css" href="__APP__/__PUBLIC__/css/style/zh-cn-styles1.css" title="styles1" media="screen" />
<link rel="alternate stylesheet" type="text/css" href="__APP__/__PUBLIC__/css/style/zh-cn-styles2.css" title="styles2" media="screen" />
<link rel="alternate stylesheet" type="text/css" href="__APP__/__PUBLIC__/css/style/zh-cn-styles3.css" title="styles3" media="screen" />
<link rel="alternate stylesheet" type="text/css" href="__APP__/__PUBLIC__/css/style/zh-cn-styles4.css" title="styles4" media="screen" />
<script language="javascript" type="text/javascript" src="__APP__/__PUBLIC__/js/jquery.min.js"></script>
<script language="javascript" type="text/javascript" src="__APP__/__PUBLIC__/js/styleswitch.js"></script>
<script language="javascript" type="text/javascript" src="__APP__/__PUBLIC__/js/admin_common.js"></script>
<script language="javascript" type="text/javascript" src="__APP__/__PUBLIC__/js/dialog.js"></script>
</head>
<body>
<style type="text/css">
html{_overflow-y:scroll}
</style>
<div class="pad-10">
<?php echo ($html); ?>
</div>
</body>
</body>
</html>
\ No newline at end of file
<?php
return array (
'mlist' =>
array (
0 =>
array (
'name' => 'index',
'title' => '首页',
'id' => '22',
),
1 =>
array (
'name' => 'hospital',
'title' => '医院信息',
'id' => '17',
),
2 =>
array (
'name' => 'guest',
'title' => '访客信息',
'id' => '25',
),
3 =>
array (
'name' => 'authority',
'title' => '权限管理',
'id' => '29',
),
4 =>
array (
'name' => 'sys',
'title' => '系统管理',
'id' => '1',
),
),
'url' => 'sys/log',
'html' => '<h3 class="f14" id="h1" style="display:none"><span title="展开与收缩" class="switchs cu on"></span>系统管理</h3><ul style="display:none" id="ul1"><li class="sub_menu" data-url="sys/log" id="_MP1000_0"><a style="outline: medium none;" hidefocus="true" href="javascript:;" onclick="_MP(\\\'1000_0\\\',\\\'__APP__/sys/log\\\',\\\'操作日志\\\');">操作日志</a></li><li class="sub_menu" data-url="sys/password" id="_MP1000_1"><a style="outline: medium none;" hidefocus="true" href="javascript:;" onclick="_MP(\\\'1000_1\\\',\\\'__APP__/sys/password\\\',\\\'修改密码\\\');">修改密码</a></li><li class="sub_menu" data-url="sys/user" id="_MP1000_2"><a style="outline: medium none;" hidefocus="true" href="javascript:;" onclick="_MP(\\\'1000_2\\\',\\\'__APP__/sys/user\\\',\\\'用户\\\');">用户</a></li><li class="sub_menu" data-url="sys/role" id="_MP1000_3"><a style="outline: medium none;" hidefocus="true" href="javascript:;" onclick="_MP(\\\'1000_3\\\',\\\'__APP__/sys/role\\\',\\\'角色\\\');">角色</a></li></ul><h3 class="f14" id="h17" style="display:none"><span title="展开与收缩" class="switchs cu on"></span>医院信息</h3><ul style="display:none" id="ul17"><li class="sub_menu" data-url="hospital/patient" id="_MP1001_4"><a style="outline: medium none;" hidefocus="true" href="javascript:;" onclick="_MP(\\\'1001_4\\\',\\\'__APP__/hospital/patient\\\',\\\'住院患者\\\');">住院患者</a></li><li class="sub_menu" data-url="hospital/unit" id="_MP1001_5"><a style="outline: medium none;" hidefocus="true" href="javascript:;" onclick="_MP(\\\'1001_5\\\',\\\'__APP__/hospital/unit\\\',\\\'病区\\\');">病区</a></li></ul><h3 class="f14" id="h22" style="display:none"><span title="展开与收缩" class="switchs cu on"></span>首页</h3><ul style="display:none" id="ul22"><li class="sub_menu" data-url="index/dev" id="_MP1002_6"><a style="outline: medium none;" hidefocus="true" href="javascript:;" onclick="_MP(\\\'1002_6\\\',\\\'__APP__/index/dev\\\',\\\'闸机设备\\\');">闸机设备</a></li><li class="sub_menu" data-url="index/info" id="_MP1002_10"><a style="outline: medium none;" hidefocus="true" href="javascript:;" onclick="_MP(\\\'1002_10\\\',\\\'__APP__/index/info\\\',\\\'服务器环境\\\');">服务器环境</a></li><li class="sub_menu" data-url="index/help" id="_MP1002_11"><a style="outline: medium none;" hidefocus="true" href="javascript:;" onclick="_MP(\\\'1002_11\\\',\\\'__APP__/index/help\\\',\\\'使用帮助\\\');">使用帮助</a></li></ul><h3 class="f14" id="h25" style="display:none"><span title="展开与收缩" class="switchs cu on"></span>访客信息</h3><ul style="display:none" id="ul25"><li class="sub_menu" data-url="guest/index" id="_MP1003_7"><a style="outline: medium none;" hidefocus="true" href="javascript:;" onclick="_MP(\\\'1003_7\\\',\\\'__APP__/guest/index\\\',\\\'登记记录\\\');">登记记录</a></li><li class="sub_menu" data-url="guest/inout" id="_MP1003_8"><a style="outline: medium none;" hidefocus="true" href="javascript:;" onclick="_MP(\\\'1003_8\\\',\\\'__APP__/guest/inout\\\',\\\'进出日志\\\');">进出日志</a></li></ul><h3 class="f14" id="h29" style="display:none"><span title="展开与收缩" class="switchs cu on"></span>权限管理</h3><ul style="display:none" id="ul29"><li class="sub_menu" data-url="authority/index" id="_MP1004_9"><a style="outline: medium none;" hidefocus="true" href="javascript:;" onclick="_MP(\\\'1004_9\\\',\\\'__APP__/authority/index\\\',\\\'权限信息\\\');">权限信息</a></li></ul>',
);
?>
\ No newline at end of file
<?php
return array (
'mlist' =>
array (
0 =>
array (
'name' => 'hospital',
'title' => '医院信息',
'id' => '17',
),
1 =>
array (
'name' => 'guest',
'title' => '访客信息',
'id' => '25',
),
2 =>
array (
'name' => 'authority',
'title' => '权限管理',
'id' => '29',
),
3 =>
array (
'name' => 'sys',
'title' => '系统管理',
'id' => '1',
),
),
'url' => 'sys/password',
'html' => '<h3 class="f14" id="h1" style="display:none"><span title="展开与收缩" class="switchs cu on"></span>系统管理</h3><ul style="display:none" id="ul1"><li class="sub_menu" data-url="sys/password" id="_MP1000_0"><a style="outline: medium none;" hidefocus="true" href="javascript:;" onclick="_MP(\\\'1000_0\\\',\\\'__APP__/sys/password\\\',\\\'修改密码\\\');">修改密码</a></li></ul><h3 class="f14" id="h17" style="display:none"><span title="展开与收缩" class="switchs cu on"></span>医院信息</h3><ul style="display:none" id="ul17"><li class="sub_menu" data-url="hospital/patient" id="_MP1001_1"><a style="outline: medium none;" hidefocus="true" href="javascript:;" onclick="_MP(\\\'1001_1\\\',\\\'__APP__/hospital/patient\\\',\\\'住院患者\\\');">住院患者</a></li><li class="sub_menu" data-url="hospital/unit" id="_MP1001_2"><a style="outline: medium none;" hidefocus="true" href="javascript:;" onclick="_MP(\\\'1001_2\\\',\\\'__APP__/hospital/unit\\\',\\\'病区\\\');">病区</a></li></ul><h3 class="f14" id="h25" style="display:none"><span title="展开与收缩" class="switchs cu on"></span>访客信息</h3><ul style="display:none" id="ul25"><li class="sub_menu" data-url="guest/index" id="_MP1002_3"><a style="outline: medium none;" hidefocus="true" href="javascript:;" onclick="_MP(\\\'1002_3\\\',\\\'__APP__/guest/index\\\',\\\'登记记录\\\');">登记记录</a></li><li class="sub_menu" data-url="guest/inout" id="_MP1002_4"><a style="outline: medium none;" hidefocus="true" href="javascript:;" onclick="_MP(\\\'1002_4\\\',\\\'__APP__/guest/inout\\\',\\\'进出日志\\\');">进出日志</a></li></ul><h3 class="f14" id="h29" style="display:none"><span title="展开与收缩" class="switchs cu on"></span>权限管理</h3><ul style="display:none" id="ul29"><li class="sub_menu" data-url="authority/index" id="_MP1003_5"><a style="outline: medium none;" hidefocus="true" href="javascript:;" onclick="_MP(\\\'1003_5\\\',\\\'__APP__/authority/index\\\',\\\'权限信息\\\');">权限信息</a></li></ul>',
);
?>
\ No newline at end of file
<?php
return array (
'mlist' =>
array (
0 =>
array (
'name' => 'hospital',
'title' => '医院信息',
'id' => '17',
),
1 =>
array (
'name' => 'guest',
'title' => '访客信息',
'id' => '25',
),
),
'url' => 'hospital/patient',
'html' => '<h3 class="f14" id="h17" style="display:none"><span title="展开与收缩" class="switchs cu on"></span>医院信息</h3><ul style="display:none" id="ul17"><li class="sub_menu" data-url="hospital/patient" id="_MP1000_0"><a style="outline: medium none;" hidefocus="true" href="javascript:;" onclick="_MP(\\\'1000_0\\\',\\\'__APP__/hospital/patient\\\',\\\'住院患者\\\');">住院患者</a></li><li class="sub_menu" data-url="hospital/unit" id="_MP1000_1"><a style="outline: medium none;" hidefocus="true" href="javascript:;" onclick="_MP(\\\'1000_1\\\',\\\'__APP__/hospital/unit\\\',\\\'病区\\\');">病区</a></li></ul><h3 class="f14" id="h25" style="display:none"><span title="展开与收缩" class="switchs cu on"></span>访客信息</h3><ul style="display:none" id="ul25"><li class="sub_menu" data-url="guest/index" id="_MP1001_2"><a style="outline: medium none;" hidefocus="true" href="javascript:;" onclick="_MP(\\\'1001_2\\\',\\\'__APP__/guest/index\\\',\\\'登记记录\\\');">登记记录</a></li><li class="sub_menu" data-url="guest/inout" id="_MP1001_3"><a style="outline: medium none;" hidefocus="true" href="javascript:;" onclick="_MP(\\\'1001_3\\\',\\\'__APP__/guest/inout\\\',\\\'进出日志\\\');">进出日志</a></li></ul>',
);
?>
\ No newline at end of file
<?php
return array (
0 => 'role_id',
1 => 'node_id',
2 => 'level',
3 => 'module',
'_autoinc' => false,
);
?>
\ No newline at end of file
<?php
return array (
0 => 'id',
1 => 'name',
2 => 'rule',
3 => 'is_sys',
4 => 'user_id',
5 => 'remark',
'_autoinc' => true,
'_pk' => 'id',
);
?>
\ No newline at end of file
<?php
return array (
0 => 'key',
1 => 'value',
'_autoinc' => false,
);
?>
\ No newline at end of file
<?php
return array (
0 => 'id',
1 => 'zhuyuanhao',
2 => 'shenfenzheng',
3 => 'name',
4 => 'mobile',
'_autoinc' => true,
'_pk' => 'id',
);
?>
\ No newline at end of file
<?php
return array (
0 => 'id',
1 => 'direction',
2 => 'code',
3 => 'ip',
4 => 'position',
5 => 'active_time',
'_autoinc' => true,
'_pk' => 'id',
);
?>
\ No newline at end of file
<?php
return array (
0 => 'id',
1 => 'no',
2 => 'zhuyuanhao',
3 => 'shenfenzheng',
4 => 'name',
5 => 'mobile',
6 => 'p_mobile',
7 => 'addtime',
8 => 'is_self',
'_autoinc' => true,
'_pk' => 'id',
);
?>
\ No newline at end of file
<?php
return array (
0 => 'id',
1 => 'no',
2 => 'zhuyuanhao',
3 => 'shenfenzheng',
4 => 'name',
5 => 'mobile',
6 => 'p_mobile',
7 => 'addtime',
8 => 'is_self',
'_autoinc' => true,
'_pk' => 'id',
);
?>
\ No newline at end of file
<?php
return array (
'_autoinc' => false,
);
?>
\ No newline at end of file
<?php
return array (
0 => 'id',
1 => 'no',
2 => 'zhuyuanhao',
3 => 'direction',
4 => 'time',
5 => 'mid',
'_autoinc' => true,
'_pk' => 'id',
);
?>
\ No newline at end of file
<?php
return array (
'_autoinc' => false,
);
?>
\ No newline at end of file
<?php
return array (
0 => 'id',
1 => 'uid',
2 => 'action',
3 => 'result',
4 => 'time',
'_autoinc' => true,
'_pk' => 'id',
);
?>
\ No newline at end of file
<?php
return array (
0 => 'id',
1 => 'zhuyuanhao',
2 => 'kid',
3 => 'bid',
4 => 'rule',
5 => 'is_die',
6 => 'is_out',
7 => 'is_operation',
8 => 'is_icu',
9 => 'is_operation_j',
10 => 'is_operation_z',
11 => 'operation_z_date',
12 => 'b_auth',
13 => 'die_date',
14 => 'out_date',
15 => 'operation_date',
16 => 'operation_j_date',
17 => 'in_status',
18 => 'pz_status',
19 => 'jc_status',
20 => 'visit_cause',
'_autoinc' => true,
'_pk' => 'id',
);
?>
\ No newline at end of file
<?php
return array (
0 => 'id',
1 => 'name',
2 => 'pid',
3 => 'status',
4 => 'remark',
'_autoinc' => true,
'_pk' => 'id',
);
?>
\ No newline at end of file
<?php
return array (
0 => 'role_id',
1 => 'user_id',
'_autoinc' => false,
);
?>
\ No newline at end of file
<?php
return array (
0 => 'id',
1 => 'account',
2 => 'nickname',
3 => 'password',
4 => 'bind_account',
5 => 'last_login_time',
6 => 'last_login_ip',
7 => 'login_count',
8 => 'verify',
9 => 'email',
10 => 'remark',
11 => 'create_time',
12 => 'update_time',
13 => 'status',
14 => 'type_id',
15 => 'info',
'_autoinc' => true,
'_pk' => 'id',
);
?>
\ No newline at end of file
<?php
return array (
0 => 'id',
1 => 'name',
2 => 'title',
3 => 'status',
4 => 'sort',
5 => 'pid',
6 => 'level',
7 => 'menu',
'_autoinc' => true,
'_pk' => 'id',
);
?>
\ No newline at end of file
[ 2019-12-02T18:21:33+08:00 ] ERR: (ThinkException) 无法加载模块Public
[ 2019-12-05T11:15:03+08:00 ] ERR: (ThinkException) 无法加载模块Public
[ 2019-12-05T16:52:45+08:00 ] ERR: (ThinkException) 无法加载模块Public
[ 2019-12-05T17:19:42+08:00 ] ERR: (ThinkException) 无法加载模块Public
[ 2019-12-06T10:52:26+08:00 ] ERR: (ThinkException) 无法加载模块Public
[ 2019-12-06T12:36:38+08:00 ] ERR: (ThinkException) 无法加载模块Public
[ 2019-12-06T12:36:59+08:00 ] ERR: (ThinkException) 无法加载模块Public
[ 2019-12-06T14:01:37+08:00 ] ERR: (ThinkException) 非法操作__app__
[ 2019-12-06T14:01:37+08:00 ] ERR: (ThinkException) 非法操作__app__
[ 2019-12-06T14:01:37+08:00 ] ERR: (ThinkException) 非法操作__app__
[ 2019-12-06T14:01:37+08:00 ] ERR: (ThinkException) 非法操作__app__
[ 2019-12-06T14:01:37+08:00 ] ERR: (ThinkException) 非法操作__app__
[ 2019-12-06T14:01:38+08:00 ] ERR: (ThinkException) 非法操作__app__
[ 2019-12-06T14:01:38+08:00 ] ERR: (ThinkException) 非法操作__app__
[ 2019-12-06T14:01:39+08:00 ] ERR: (ThinkException) 非法操作__app__
[ 2019-12-06T14:01:39+08:00 ] ERR: (ThinkException) 非法操作__app__
[ 2019-12-06T14:01:39+08:00 ] ERR: (ThinkException) 非法操作__app__
[ 2019-12-06T14:01:39+08:00 ] ERR: (ThinkException) 非法操作__app__
[ 2019-12-06T14:01:39+08:00 ] ERR: (ThinkException) 非法操作__app__
[ 2019-12-06T14:01:39+08:00 ] ERR: (ThinkException) 非法操作__app__
[ 2019-12-06T14:01:39+08:00 ] ERR: (ThinkException) 非法操作__app__
[ 2019-12-06T14:01:40+08:00 ] ERR: (ThinkException) 非法操作__app__
[ 2019-12-06T14:01:40+08:00 ] ERR: (ThinkException) 非法操作__app__
[ 2019-12-06T14:01:40+08:00 ] ERR: (ThinkException) 非法操作__app__
[ 2019-12-06T14:01:40+08:00 ] ERR: (ThinkException) 非法操作__app__
[ 2019-12-06T14:01:40+08:00 ] ERR: (ThinkException) 非法操作__app__
[ 2019-12-06T14:01:40+08:00 ] ERR: (ThinkException) 非法操作__app__
[ 2019-12-06T14:01:40+08:00 ] ERR: (ThinkException) 非法操作__app__
[ 2019-12-06T14:01:40+08:00 ] ERR: (ThinkException) 非法操作__app__
[ 2019-12-06T14:01:40+08:00 ] ERR: (ThinkException) 非法操作__app__
[ 2019-12-06T14:01:40+08:00 ] ERR: (ThinkException) 非法操作__app__
[ 2019-12-06T14:01:40+08:00 ] ERR: (ThinkException) 非法操作__app__
[ 2019-12-06T14:01:40+08:00 ] ERR: (ThinkException) 非法操作__app__
[ 2019-12-06T14:01:40+08:00 ] ERR: (ThinkException) 非法操作__app__
[ 2019-12-06T14:01:41+08:00 ] ERR: (ThinkException) 非法操作__app__
[ 2019-12-11T13:21:52+08:00 ] ERR: (ThinkException) 无法加载模块Public
[ 2019-12-11T17:23:15+08:00 ] ERR: (ThinkException) 无法加载模块Public
[ 2019-12-11T17:29:09+08:00 ] ERR: (ThinkException) 无法加载模块Public
[ 2019-12-11T17:56:37+08:00 ] ERR: (ThinkException) 无法加载模块Public
[ 2019-12-11T17:56:39+08:00 ] ERR: (ThinkException) 无法加载模块Public
[ 2019-12-11T18:01:36+08:00 ] ERR: (ThinkException) 无法加载模块Public
[ 2019-12-11T18:01:44+08:00 ] ERR: (ThinkException) 无法加载模块Public
[ 2019-12-11T18:02:11+08:00 ] ERR: (ThinkException) 无法加载模块Public
[ 2019-12-12T15:57:37+08:00 ] ERR: (ThinkException) 无法加载模块Public
[ 2019-12-12T17:33:16+08:00 ] ERR: (ThinkException) 无法加载模块Public
[ 2019-12-12T17:43:24+08:00 ] ERR: (ThinkException) 无法加载模块Public
[ 2019-12-12T17:50:24+08:00 ] ERR: (ThinkException) 无法加载模块Public
[ 2019-12-19T15:36:15+08:00 ] ERR: (ThinkException) 无法加载模块Wxh20191209
[ 2019-12-25T14:05:20+08:00 ] ERR: (ThinkException) 无法加载模块Public
[ 2019-12-25T16:01:32+08:00 ] ERR: (ThinkException) 非法操作red
[ 2019-12-30T15:01:10+08:00 ] ERR: (ThinkException) 无法加载模块Public
[ 2020-01-03T14:52:57+08:00 ] ERR: (ThinkException) 无法加载模块Public
[ 2020-01-03T16:50:45+08:00 ] ERR: (ThinkException) 无法加载模块Public
[ 2020-01-03T17:14:48+08:00 ] ERR: (ThinkException) 无法加载模块Public
[ 2020-01-08T12:24:23+08:00 ] ERR: (ThinkException) 无法加载模块Public
[ 2020-01-08T12:26:39+08:00 ] ERR: (ThinkException) 无法加载模块Public
[ 2020-01-08T12:32:56+08:00 ] ERR: (ThinkException) XML标签语法错误 : $Think.session.account neq 'ssjr'
[ 2020-01-08T13:50:58+08:00 ] ERR: (ThinkException) 无法加载模块Public
[ 2020-01-14T13:37:15+08:00 ] ERR: (ThinkException) 无法加载模块Public
[ 2020-01-16T12:24:11+08:00 ] ERR: (ThinkException) 无法加载模块Public
[ 2020-01-17T11:28:49+08:00 ] ERR: (ThinkException) 无法加载模块Public
[ 2020-01-17T11:44:11+08:00 ] ERR: (ThinkException) 无法加载模块Public
[ 2020-02-13T13:59:43+08:00 ] ERR: (ThinkException) Unknown database 'gatedb'
[ 2020-02-14T10:51:51+08:00 ] ERR: (ThinkException) 无法加载模块
<?php function toDate($time, $format = 'Y-m-d H:i:s') { if (empty ( $time )) { return ''; } $format = str_replace ( '#', ':', $format ); return date ($format, $time ); } function get_client_ip() { if (getenv ( "HTTP_CLIENT_IP" ) && strcasecmp ( getenv ( "HTTP_CLIENT_IP" ), "unknown" )) $ip = getenv ( "HTTP_CLIENT_IP" ); else if (getenv ( "HTTP_X_FORWARDED_FOR" ) && strcasecmp ( getenv ( "HTTP_X_FORWARDED_FOR" ), "unknown" )) $ip = getenv ( "HTTP_X_FORWARDED_FOR" ); else if (getenv ( "REMOTE_ADDR" ) && strcasecmp ( getenv ( "REMOTE_ADDR" ), "unknown" )) $ip = getenv ( "REMOTE_ADDR" ); else if (isset ( $_SERVER ['REMOTE_ADDR'] ) && $_SERVER ['REMOTE_ADDR'] && strcasecmp ( $_SERVER ['REMOTE_ADDR'], "unknown" )) $ip = $_SERVER ['REMOTE_ADDR']; else $ip = "unknown"; return ($ip); } function cmssavecache($name = '', $fields = '') { $Model = D ( $name ); $list = $Model->select (); $data = array (); foreach ( $list as $key => $val ) { if (empty ( $fields )) { $data [$val [$Model->getPk ()]] = $val; } else { if (is_string ( $fields )) { $fields = explode ( ',', $fields ); } if (count ( $fields ) == 1) { $data [$val [$Model->getPk ()]] = $val [$fields [0]]; } else { foreach ( $fields as $field ) { $data [$val [$Model->getPk ()]] [] = $val [$field]; } } } } $savefile = cmsgetcache ( $name ); $content = "<?php\nreturn " . var_export ( array_change_key_case ( $data, CASE_UPPER ), true ) . ";\n?>"; file_put_contents ( $savefile, $content ); } function cmsgetcache($name = '') { return DATA_PATH . '~' . strtolower ( $name ) . '.php'; } function getStatus($status, $imageShow = true) { switch ($status) { case 0 : $showText = '禁用'; $showImg = '<IMG SRC="' . WEB_PUBLIC_PATH . '/Images/locked.gif" WIDTH="20" HEIGHT="20" BORDER="0" ALT="禁用">'; break; case 2 : $showText = '待审'; $showImg = '<IMG SRC="' . WEB_PUBLIC_PATH . '/Images/prected.gif" WIDTH="20" HEIGHT="20" BORDER="0" ALT="待审">'; break; case - 1 : $showText = '删除'; $showImg = '<IMG SRC="' . WEB_PUBLIC_PATH . '/Images/del.gif" WIDTH="20" HEIGHT="20" BORDER="0" ALT="删除">'; break; case 1 : default : $showText = '正常'; $showImg = '<IMG SRC="' . WEB_PUBLIC_PATH . '/Images/ok.gif" WIDTH="20" HEIGHT="20" BORDER="0" ALT="正常">'; } return ($imageShow === true) ? $showImg : $showText; } function getDefaultStyle($style) { if (empty ( $style )) { return 'blue'; } else { return $style; } } function IP($ip = '', $file = 'UTFWry.dat') { $_ip = array (); if (isset ( $_ip [$ip] )) { return $_ip [$ip]; } else { import ( "ORG.Net.IpLocation" ); $iplocation = new IpLocation ( $file ); $location = $iplocation->getlocation ( $ip ); $_ip [$ip] = $location ['country'] . $location ['area']; } return $_ip [$ip]; } function getNodeName($id) { if (Session::is_set ( 'nodeNameList' )) { $name = Session::get ( 'nodeNameList' ); return $name [$id]; } $Group = D ( "Node" ); $list = $Group->getField ( 'id,name' ); $name = $list [$id]; Session::set ( 'nodeNameList', $list ); return $name; } function get_pawn($pawn) { if ($pawn == 0) return "<span style='color:green'>没有</span>"; else return "<span style='color:red'>有</span>"; } function get_patent($patent) { if ($patent == 0) return "<span style='color:green'>没有</span>"; else return "<span style='color:red'>有</span>"; } function getNodeGroupName($id) { if (empty ( $id )) { return '未分组'; } if (isset ( $_SESSION ['nodeGroupList'] )) { return $_SESSION ['nodeGroupList'] [$id]; } $Group = D ( "Group" ); $list = $Group->getField ( 'id,title' ); $_SESSION ['nodeGroupList'] = $list; $name = $list [$id]; return $name; } function getCardStatus($status) { switch ($status) { case 0 : $show = '未启用'; break; case 1 : $show = '已启用'; break; case 2 : $show = '使用中'; break; case 3 : $show = '已禁用'; break; case 4 : $show = '已作废'; break; } return $show; } function showStatus($status, $id) { switch ($status) { case 0 : $info = '<a href="javascript:resume(' . $id . ')">恢复</a>'; break; case 2 : $info = '<a href="javascript:pass(' . $id . ')">批准</a>'; break; case 1 : $info = '<a href="javascript:forbid(' . $id . ')">禁用</a>'; break; case - 1 : $info = '<a href="javascript:recycle(' . $id . ')">还原</a>'; break; } return $info; } function build_verify($length = 4, $mode = 1) { return rand_string ( $length, $mode ); } function getGroupName($id) { if ($id == 0) { return '无上级组'; } if ($list = F ( 'groupName' )) { return $list [$id]; } $dao = D ( "Role" ); $list = $dao->findAll ( array ('field' => 'id,name' ) ); foreach ( $list as $vo ) { $nameList [$vo ['id']] = $vo ['name']; } $name = $nameList [$id]; F ( 'groupName', $nameList ); return $name; } function sort_by($array, $keyname = null, $sortby = 'asc') { $myarray = $inarray = array (); foreach ( $array as $i => $befree ) { $myarray [$i] = $array [$i] [$keyname]; } switch ($sortby) { case 'asc' : asort ( $myarray ); break; case 'desc' : case 'arsort' : arsort ( $myarray ); break; case 'natcasesor' : natcasesort ( $myarray ); break; } foreach ( $myarray as $key => $befree ) { $inarray [] = $array [$key]; } return $inarray; } function rand_string($len = 6, $type = '', $addChars = '') { $str = ''; switch ($type) { case 0 : $chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz' . $addChars; break; case 1 : $chars = str_repeat ( '0123456789', 3 ); break; case 2 : $chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' . $addChars; break; case 3 : $chars = 'abcdefghijklmnopqrstuvwxyz' . $addChars; break; default : $chars = 'ABCDEFGHIJKMNPQRSTUVWXYZabcdefghijkmnpqrstuvwxyz23456789' . $addChars; break; } if ($len > 10) { $chars = $type == 1 ? str_repeat ( $chars, $len ) : str_repeat ( $chars, 5 ); } if ($type != 4) { $chars = str_shuffle ( $chars ); $str = substr ( $chars, 0, $len ); } else { for($i = 0; $i < $len; $i ++) { $str .= msubstr ( $chars, floor ( mt_rand ( 0, mb_strlen ( $chars, 'utf-8' ) - 1 ) ), 1 ); } } return $str; } function pwdHash($password, $type = 'md5') { return hash ( $type, $password ); } function GetGPC($key, $type = 'integer', $var = 'R') { switch ($var) { case 'G': $var = $_GET; break; case 'P': $var = $_POST; break; case 'C': $var = $_COOKIE; $key = PTCMS_COOKIES_PRE . $key; break; case 'R': $var = $_REQUEST; break; } switch ($type) { case 'integer': $return = isset($var[$key]) ? intval($var[$key]) : 0; break; case 'string': $return = isset($var[$key]) ? $var[$key] : ''; break; case 'array': $return = isset($var[$key]) ? $var[$key] : array(); break; default: $return = isset($var[$key]) ? intval($var[$key]) : 0; } return $return; } function web_server_url() { $protocol = $_SERVER['SERVER_PROTOCOL']; $protocol = explode('/',$protocol); $protocol = strtolower($protocol[0]); return $protocol.'://'.$_SERVER['HTTP_HOST']; } return array ( 'app_debug' => false, 'app_domain_deploy' => false, 'app_sub_domain_deploy' => false, 'app_plugin_on' => false, 'app_file_case' => false, 'app_group_depr' => '.', 'app_group_list' => '', 'app_autoload_reg' => false, 'app_autoload_path' => 'Think.Util.', 'app_config_list' => array ( 0 => 'taglibs', 1 => 'routes', 2 => 'tags', 3 => 'htmls', 4 => 'modules', 5 => 'actions', ), 'cookie_expire' => 3600, 'cookie_domain' => '', 'cookie_path' => '/', 'cookie_prefix' => '', 'default_app' => '@', 'default_group' => 'Home', 'default_module' => 'Index', 'default_action' => 'index', 'default_charset' => 'utf-8', 'default_timezone' => 'PRC', 'default_ajax_return' => 'JSON', 'default_theme' => 'default', 'default_lang' => 'zh-cn', 'db_type' => 'mysql', 'db_host' => 'localhost', 'db_name' => 'gatedb', 'db_user' => 'root', 'db_pwd' => '168168', 'db_port' => '3306', 'db_prefix' => 'gate_', 'db_suffix' => '', 'db_fieldtype_check' => false, 'db_fields_cache' => true, 'db_charset' => 'utf8', 'db_deploy_type' => 0, 'db_rw_separate' => false, 'data_cache_time' => -1, 'data_cache_compress' => false, 'data_cache_check' => false, 'data_cache_type' => 'File', 'data_cache_path' => './Runtime/Temp/', 'data_cache_subdir' => false, 'data_path_level' => 1, 'error_message' => '您浏览的页面暂时发生了错误!请稍后再试~', 'error_page' => '', 'html_cache_on' => false, 'html_cache_time' => 60, 'html_read_type' => 1, 'html_file_suffix' => '.shtml', 'action_cache_on' => false, 'lang_switch_on' => false, 'lang_auto_detect' => true, 'log_exception_record' => true, 'log_record' => false, 'log_file_size' => 2097152, 'log_record_level' => array ( 0 => 'EMERG', 1 => 'ALERT', 2 => 'CRIT', 3 => 'ERR', ), 'page_rollpage' => 5, 'page_listrows' => 20, 'session_auto_start' => true, 'show_run_time' => false, 'show_adv_time' => false, 'show_db_times' => false, 'show_cache_times' => false, 'show_use_mem' => false, 'show_page_trace' => true, 'show_error_msg' => true, 'tmpl_engine_type' => 'Think', 'tmpl_detect_theme' => false, 'tmpl_template_suffix' => '.html', 'tmpl_content_type' => 'text/html', 'tmpl_cachfile_suffix' => '.php', 'tmpl_deny_func_list' => 'echo,exit', 'tmpl_parse_string' => array ( '__APP__' => '', '__PUBLIC__' => 'Public', ), 'tmpl_l_delim' => '{', 'tmpl_r_delim' => '}', 'tmpl_var_identify' => 'array', 'tmpl_strip_space' => false, 'tmpl_cache_on' => false, 'tmpl_cache_time' => -1, 'tmpl_action_error' => 'Public:success', 'tmpl_action_success' => 'Public:success', 'tmpl_trace_file' => './ThinkPHP/Tpl/PageTrace.tpl.php', 'tmpl_exception_file' => './ThinkPHP/Tpl/ThinkException.tpl.php', 'tmpl_file_depr' => '/', 'taglib_begin' => '<', 'taglib_end' => '>', 'taglib_load' => true, 'taglib_build_in' => 'cx', 'taglib_pre_load' => '', 'tag_nested_level' => 3, 'tag_extend_parse' => '', 'token_on' => false, 'token_name' => '__hash__', 'token_type' => 'md5', 'url_case_insensitive' => true, 'url_router_on' => false, 'url_route_rules' => array ( ), 'url_model' => 2, 'url_pathinfo_model' => 2, 'url_pathinfo_depr' => '/', 'url_html_suffix' => '', 'var_group' => 'g', 'var_module' => 'm', 'var_action' => 'a', 'var_router' => 'r', 'var_page' => 'p', 'var_template' => 't', 'var_language' => 'l', 'var_ajax_submit' => 'ajax', 'var_pathinfo' => 's', 'data_page' => 100, 'user_auth_on' => true, 'user_auth_type' => 1, 'user_auth_key' => 'adnamangeAuthId', 'admin_auth_key' => 'administrator', 'user_auth_model' => 'User', 'auth_pwd_encoder' => 'md5', 'user_auth_gateway' => '/Manage/login', 'not_auth_module' => 'Manage', 'require_auth_module' => '', 'not_auth_action' => 'gettime,updatedev,setoneopen,bquser', 'require_auth_action' => '', 'guest_auth_on' => false, 'guest_auth_id' => 0, 'rbac_role_table' => 'gate_role', 'rbac_user_table' => 'gate_role_user', 'rbac_access_table' => 'gate_access', 'rbac_node_table' => 'gate_node', 'device_active_time' => 30, 'frontend_host' => 'http://localhost:8083/', ); ?>
\ No newline at end of file
<?php
if (!defined('THINK_PATH')) exit(); if(version_compare(PHP_VERSION,'6.0.0','<') ) { @set_magic_quotes_runtime (0); define('MAGIC_QUOTES_GPC',get_magic_quotes_gpc()?True:False); } define('MEMORY_LIMIT_ON',function_exists('memory_get_usage')); define('IS_CGI',substr(PHP_SAPI, 0,3)=='cgi' ? 1 : 0 ); define('IS_WIN',strstr(PHP_OS, 'WIN') ? 1 : 0 ); define('IS_CLI',PHP_SAPI=='cli'? 1 : 0); if(!IS_CLI) { if(!defined('_PHP_FILE_')) { if(IS_CGI) { $_temp = explode('.php',$_SERVER["PHP_SELF"]); define('_PHP_FILE_', rtrim(str_replace($_SERVER["HTTP_HOST"],'',$_temp[0].'.php'),'/')); }else { define('_PHP_FILE_', rtrim($_SERVER["SCRIPT_NAME"],'/')); } } if(!defined('__ROOT__')) { if( strtoupper(APP_NAME) == strtoupper(basename(dirname(_PHP_FILE_))) ) { $_root = dirname(dirname(_PHP_FILE_)); }else { $_root = dirname(_PHP_FILE_); } define('__ROOT__', (($_root=='/' || $_root=='\\')?'':$_root)); } define('URL_COMMON', 0); define('URL_PATHINFO', 1); define('URL_REWRITE', 2); define('URL_COMPAT', 3); } define('THINK_VERSION', '2.1'); if(MEMORY_LIMIT_ON) { $GLOBALS['_startUseMems'] = memory_get_usage(); } define('CACHE_DIR', 'Cache'); define('HTML_DIR', 'Html'); define('CONF_DIR', 'Conf'); define('LIB_DIR', 'Lib'); define('LOG_DIR', 'Logs'); define('LANG_DIR', 'Lang'); define('TEMP_DIR', 'Temp'); define('TMPL_DIR', 'Tpl'); define('TMPL_PATH',APP_PATH.'/'.TMPL_DIR.'/'); define('HTML_PATH',APP_PATH.'/'.HTML_DIR.'/'); define('COMMON_PATH', APP_PATH.'/Common/'); define('LIB_PATH', APP_PATH.'/'.LIB_DIR.'/'); define('CACHE_PATH', RUNTIME_PATH.CACHE_DIR.'/'); define('CONFIG_PATH', APP_PATH.'/'.CONF_DIR.'/'); define('LOG_PATH', RUNTIME_PATH.LOG_DIR.'/'); define('LANG_PATH', APP_PATH.'/'.LANG_DIR.'/'); define('TEMP_PATH', RUNTIME_PATH.TEMP_DIR.'/'); define('DATA_PATH', RUNTIME_PATH.'Data/'); define('VENDOR_PATH',THINK_PATH.'/Vendor/'); set_include_path(get_include_path() . PATH_SEPARATOR . VENDOR_PATH); function N($key, $step=0) { static $_num = array(); if (!isset($_num[$key])) { $_num[$key] = 0; } if (empty($step)) return $_num[$key]; else $_num[$key] = $_num[$key] + (int) $step; } function U($url, $params=array(), $redirect=false, $suffix=true) { if (0 === strpos($url, '/')) $url = substr($url, 1); if (!strpos($url, '://')) $url = APP_NAME . '://' . $url; if (stripos($url, '@?')) { $url = str_replace('@?', '@think?', $url); } elseif (stripos($url, '@')) { $url = $url . MODULE_NAME; } $array = parse_url($url); $app = isset($array['scheme']) ? $array['scheme'] : APP_NAME; $route = isset($array['user']) ? $array['user'] : ''; if (defined('GROUP_NAME') && strcasecmp(GROUP_NAME, C('DEFAULT_GROUP'))) $group = GROUP_NAME; if (isset($array['path'])) { $action = substr($array['path'], 1); if (!isset($array['host'])) { $module = MODULE_NAME; } else { if (strpos($array['host'], '-')) { list($group, $module) = explode('-', $array['host']); } else { $module = $array['host']; } } } else { $module = MODULE_NAME; $action = $array['host']; } if (isset($array['query'])) { parse_str($array['query'], $query); $params = array_merge($query, $params); } if (C('APP_SUB_DOMAIN_DEPLOY')) { foreach (C('APP_SUB_DOMAIN_RULES') as $key => $rule) { if (in_array($group . "/", $rule)) $flag = true; if (in_array($group . "/" . $module, $rule)) { $flag = true; unset($module); } if (!isset($group) && in_array(GROUP_NAME . "/" . $module, $rule) && in_array($key,array(SUB_DOMAIN,"*"))) unset($module); if ($flag) { unset($group); if ($key != SUB_DOMAIN && $key != "*") { $sub_domain = $key; } break; } } } if (C('URL_MODEL') > 0) { $depr = C('URL_PATHINFO_MODEL') == 2 ? C('URL_PATHINFO_DEPR') : '/'; $str = $depr; foreach ($params as $var => $val) $str .= $var . $depr . $val . $depr; $str = substr($str, 0, -1); $group = isset($group) ? $group . $depr : ''; $module = isset($module) ? $module . $depr : ""; if (!empty($route)) { $url = str_replace(APP_NAME, $app, __APP__) . '/' . $group . $route . $str; } else { $url = str_replace(APP_NAME, $app, __APP__) . '/' . $group . $module . $action . $str; } if ($suffix && C('URL_HTML_SUFFIX')) $url .= C('URL_HTML_SUFFIX'); }else { $params = http_build_query($params); $params = !empty($params) ? '&' . $params : ''; if (isset($group)) { $url = str_replace(APP_NAME, $app, __APP__) . '?' . C('VAR_GROUP') . '=' . $group . '&' . C('VAR_MODULE') . '=' . $module . '&' . C('VAR_ACTION') . '=' . $action . $params; } else { $url = str_replace(APP_NAME, $app, __APP__) . '?' . C('VAR_MODULE') . '=' . $module . '&' . C('VAR_ACTION') . '=' . $action . $params; } } if (isset($sub_domain)) { $domain = str_replace(SUB_DOMAIN, $sub_domain, $_SERVER['HTTP_HOST']); $url = "http://" . $domain . $url; } if ($redirect) redirect($url); else return $url; } function parse_name($name, $type=0) { if ($type) { return ucfirst(preg_replace("/_([a-zA-Z])/e", "strtoupper('\\1')", $name)); } else { $name = preg_replace("/[A-Z]/", "_\\0", $name); return strtolower(trim($name, "_")); } } function halt($error) { if (IS_CLI) exit($error); $e = array(); if (C('APP_DEBUG')) { if (!is_array($error)) { $trace = debug_backtrace(); $e['message'] = $error; $e['file'] = $trace[0]['file']; $e['class'] = $trace[0]['class']; $e['function'] = $trace[0]['function']; $e['line'] = $trace[0]['line']; $traceInfo = ''; $time = date("y-m-d H:i:m"); foreach ($trace as $t) { $traceInfo .= '[' . $time . '] ' . $t['file'] . ' (' . $t['line'] . ') '; $traceInfo .= $t['class'] . $t['type'] . $t['function'] . '('; $traceInfo .= implode(', ', $t['args']); $traceInfo .=")<br/>"; } $e['trace'] = $traceInfo; } else { $e = $error; } include C('TMPL_EXCEPTION_FILE'); } else { $error_page = C('ERROR_PAGE'); if (!empty($error_page)) { redirect($error_page); } else { if (C('SHOW_ERROR_MSG')) $e['message'] = is_array($error) ? $error['message'] : $error; else $e['message'] = C('ERROR_MESSAGE'); include C('TMPL_EXCEPTION_FILE'); } } exit; } function redirect($url, $time=0, $msg='') { $url = str_replace(array("\n", "\r"), '', $url); if (empty($msg)) $msg = "系统将在{$time}秒之后自动跳转到{$url}!"; if (!headers_sent()) { if (0 === $time) { header("Location: " . $url); } else { header("refresh:{$time};url={$url}"); echo($msg); } exit(); } else { $str = "<meta http-equiv='Refresh' content='{$time};URL={$url}'>"; if ($time != 0) $str .= $msg; exit($str); } } function throw_exception($msg, $type='ThinkException', $code=0) { if (IS_CLI) exit($msg); if (class_exists($type, false)) throw new $type($msg, $code, true); else halt($msg); } function debug_start($label='') { $GLOBALS[$label]['_beginTime'] = microtime(TRUE); if (MEMORY_LIMIT_ON) $GLOBALS[$label]['_beginMem'] = memory_get_usage(); } function debug_end($label='') { $GLOBALS[$label]['_endTime'] = microtime(TRUE); echo '<div style="text-align:center;width:100%">Process ' . $label . ': Times ' . number_format($GLOBALS[$label]['_endTime'] - $GLOBALS[$label]['_beginTime'], 6) . 's '; if (MEMORY_LIMIT_ON) { $GLOBALS[$label]['_endMem'] = memory_get_usage(); echo ' Memories ' . number_format(($GLOBALS[$label]['_endMem'] - $GLOBALS[$label]['_beginMem']) / 1024) . ' k'; } echo '</div>'; } function dump($var, $echo=true, $label=null, $strict=true) { $label = ($label === null) ? '' : rtrim($label) . ' '; if (!$strict) { if (ini_get('html_errors')) { $output = print_r($var, true); $output = "<pre>" . $label . htmlspecialchars($output, ENT_QUOTES) . "</pre>"; } else { $output = $label . print_r($var, true); } } else { ob_start(); var_dump($var); $output = ob_get_clean(); if (!extension_loaded('xdebug')) { $output = preg_replace("/\]\=\>\n(\s+)/m", "] => ", $output); $output = '<pre>' . $label . htmlspecialchars($output, ENT_QUOTES) . '</pre>'; } } if ($echo) { echo($output); return null; }else return $output; } function get_instance_of($name, $method='', $args=array()) { static $_instance = array(); $identify = empty($args) ? $name . $method : $name . $method . to_guid_string($args); if (!isset($_instance[$identify])) { if (class_exists($name)) { $o = new $name(); if (method_exists($o, $method)) { if (!empty($args)) { $_instance[$identify] = call_user_func_array(array(&$o, $method), $args); } else { $_instance[$identify] = $o->$method(); } } else $_instance[$identify] = $o; } else halt(L('_CLASS_NOT_EXIST_') . ':' . $name); } return $_instance[$identify]; } function __autoload($name) { if (alias_import($name)) return; if (substr($name, -5) == "Model") { require_cache(LIB_PATH . 'Model/' . $name . '.class.php'); } elseif (substr($name, -6) == "Action") { require_cache(LIB_PATH . 'Action/' . $name . '.class.php'); } else { if (C('APP_AUTOLOAD_PATH')) { $paths = explode(',', C('APP_AUTOLOAD_PATH')); foreach ($paths as $path) { if (import($path . $name)) { return; } } } } return; } function require_cache($filename) { static $_importFiles = array(); $filename = realpath($filename); if (!isset($_importFiles[$filename])) { if (file_exists_case($filename)) { require $filename; $_importFiles[$filename] = true; } else { $_importFiles[$filename] = false; } } return $_importFiles[$filename]; } function file_exists_case($filename) { if (is_file($filename)) { if (IS_WIN && C('APP_FILE_CASE')) { if (basename(realpath($filename)) != basename($filename)) return false; } return true; } return false; } function import($class, $baseUrl = '', $ext='.class.php') { static $_file = array(); static $_class = array(); $class = str_replace(array('.', '#'), array('/', '.'), $class); if ('' === $baseUrl && false === strpos($class, '/')) { return alias_import($class); } if (isset($_file[$class . $baseUrl])) return true; else $_file[$class . $baseUrl] = true; $class_strut = explode("/", $class); if (empty($baseUrl)) { if ('@' == $class_strut[0] || APP_NAME == $class_strut[0]) { $baseUrl = dirname(LIB_PATH); $class = substr_replace($class, 'Lib/', 0, strlen($class_strut[0]) + 1); } elseif (in_array(strtolower($class_strut[0]), array('think', 'org', 'com'))) { $baseUrl = THINK_PATH . '/Lib/'; } else { $class = substr_replace($class, '', 0, strlen($class_strut[0]) + 1); $baseUrl = APP_PATH . '/../' . $class_strut[0] . '/' . LIB_DIR . '/'; } } if (substr($baseUrl, -1) != "/") $baseUrl .= "/"; $classfile = $baseUrl . $class . $ext; if ($ext == '.class.php' && is_file($classfile)) { $class = basename($classfile, $ext); if (isset($_class[$class])) throw_exception(L('_CLASS_CONFLICT_') . ':' . $_class[$class] . ' ' . $classfile); $_class[$class] = $classfile; } return require_cache($classfile); } function load($name, $baseUrl='', $ext='.php') { $name = str_replace(array('.', '#'), array('/', '.'), $name); if (empty($baseUrl)) { if (0 === strpos($name, '@/')) { $baseUrl = APP_PATH . '/Common/'; $name = substr($name, 2); } else { $baseUrl = THINK_PATH . '/Common/'; } } if (substr($baseUrl, -1) != "/") $baseUrl .= "/"; include $baseUrl . $name . $ext; } function vendor($class, $baseUrl = '', $ext='.php') { if (empty($baseUrl)) $baseUrl = VENDOR_PATH; return import($class, $baseUrl, $ext); } function alias_import($alias, $classfile='') { static $_alias = array(); if ('' !== $classfile) { $_alias[$alias] = $classfile; return; } if (is_string($alias)) { if (isset($_alias[$alias])) return require_cache($_alias[$alias]); }elseif (is_array($alias)) { foreach ($alias as $key => $val) $_alias[$key] = $val; return; } return false; } function D($name='', $app='') { static $_model = array(); if (empty($name)) return new Model; if (empty($app)) $app = C('DEFAULT_APP'); if (isset($_model[$app . $name])) return $_model[$app . $name]; $OriClassName = $name; if (strpos($name, '.')) { $array = explode('.', $name); $name = array_pop($array); $className = $name . 'Model'; import($app . '.Model.' . implode('.', $array) . '.' . $className); } else { $className = $name . 'Model'; import($app . '.Model.' . $className); } if (class_exists($className)) { $model = new $className(); } else { $model = new Model($name); } $_model[$app . $OriClassName] = $model; return $model; } function M($name='', $class='Model') { static $_model = array(); if (!isset($_model[$name . '_' . $class])) $_model[$name . '_' . $class] = new $class($name); return $_model[$name . '_' . $class]; } function A($name, $app='@') { static $_action = array(); if (isset($_action[$app . $name])) return $_action[$app . $name]; $OriClassName = $name; if (strpos($name, '.')) { $array = explode('.', $name); $name = array_pop($array); $className = $name . 'Action'; import($app . '.Action.' . implode('.', $array) . '.' . $className); } else { $className = $name . 'Action'; import($app . '.Action.' . $className); } if (class_exists($className)) { $action = new $className(); $_action[$app . $OriClassName] = $action; return $action; } else { return false; } } function R($module, $action, $app='@') { $class = A($module, $app); if ($class) return call_user_func(array(&$class, $action)); else return false; } function L($name=null, $value=null) { static $_lang = array(); if (empty($name)) return $_lang; if (is_string($name)) { $name = strtoupper($name); if (is_null($value)) return isset($_lang[$name]) ? $_lang[$name] : $name; $_lang[$name] = $value; return; } if (is_array($name)) $_lang = array_merge($_lang, array_change_key_case($name, CASE_UPPER)); return; } function C($name=null, $value=null) { static $_config = array(); if (empty($name)) return $_config; if (is_string($name)) { if (!strpos($name, '.')) { $name = strtolower($name); if (is_null($value)) return isset($_config[$name]) ? $_config[$name] : null; $_config[$name] = $value; return; } $name = explode('.', $name); $name[0] = strtolower($name[0]); if (is_null($value)) return isset($_config[$name[0]][$name[1]]) ? $_config[$name[0]][$name[1]] : null; $_config[$name[0]][$name[1]] = $value; return; } if (is_array($name)) return $_config = array_merge($_config, array_change_key_case($name)); return null; } function tag($name, $params=array()) { $tags = C('_TAGS_.' . $name); if (!empty($tags)) { foreach ($tags as $key => $call) { $result = B($call, $params); } } } function filter($name, &$content) { $class = $name . 'Filter'; require_cache(LIB_PATH . 'Filter/' . $class . '.class.php'); $filter = new $class(); $content = $filter->run($content); } function B($name, $params=array()) { $class = $name . 'Behavior'; require_cache(LIB_PATH . 'Behavior/' . $class . '.class.php'); $behavior = new $class(); return $behavior->run($params); } function W($name, $data=array(), $return=false) { $class = $name . 'Widget'; require_cache(LIB_PATH . 'Widget/' . $class . '.class.php'); if (!class_exists($class)) throw_exception(L('_CLASS_NOT_EXIST_') . ':' . $class); $widget = Think::instance($class); $content = $widget->render($data); if ($return) return $content; else echo $content; } function S($name, $value='', $expire='', $type='') { static $_cache = array(); alias_import('Cache'); $cache = Cache::getInstance($type); if ('' !== $value) { if (is_null($value)) { $result = $cache->rm($name); if ($result) unset($_cache[$type . '_' . $name]); return $result; }else { $cache->set($name, $value, $expire); $_cache[$type . '_' . $name] = $value; } return; } if (isset($_cache[$type . '_' . $name])) return $_cache[$type . '_' . $name]; $value = $cache->get($name); $_cache[$type . '_' . $name] = $value; return $value; } function F($name, $value='', $path=DATA_PATH) { static $_cache = array(); $filename = $path . $name . '.php'; if ('' !== $value) { if (is_null($value)) { return unlink($filename); } else { $dir = dirname($filename); if (!is_dir($dir)) mkdir($dir); return file_put_contents($filename, "<?php\nreturn " . var_export($value, true) . ";\n?>"); } } if (isset($_cache[$name])) return $_cache[$name]; if (is_file($filename)) { $value = include $filename; $_cache[$name] = $value; } else { $value = false; } return $value; } function to_guid_string($mix) { if (is_object($mix) && function_exists('spl_object_hash')) { return spl_object_hash($mix); } elseif (is_resource($mix)) { $mix = get_resource_type($mix) . strval($mix); } else { $mix = serialize($mix); } return md5($mix); } function strip_whitespace($content) { $stripStr = ''; $tokens = token_get_all($content); $last_space = false; for ($i = 0, $j = count($tokens); $i < $j; $i++) { if (is_string($tokens[$i])) { $last_space = false; $stripStr .= $tokens[$i]; } else { switch ($tokens[$i][0]) { case T_COMMENT: case T_DOC_COMMENT: break; case T_WHITESPACE: if (!$last_space) { $stripStr .= ' '; $last_space = true; } break; default: $last_space = false; $stripStr .= $tokens[$i][1]; } } } return $stripStr; } function compile($filename, $runtime=false) { $content = file_get_contents($filename); if (true === $runtime) $content = preg_replace('/\/\/\[RUNTIME\](.*?)\/\/\[\/RUNTIME\]/s', '', $content); $content = substr(trim($content), 5); if ('?>' == substr($content, -2)) $content = substr($content, 0, -2); return $content; } function array_define($array) { $content = ''; foreach ($array as $key => $val) { $key = strtoupper($key); if (in_array($key, array('THINK_PATH', 'APP_NAME', 'APP_PATH', 'APP_CACHE_NAME', 'RUNTIME_PATH', 'RUNTIME_ALLINONE', 'THINK_MODE'))) $content .= 'if(!defined(\'' . $key . '\')) '; if (is_int($val) || is_float($val)) { $content .= "define('" . $key . "'," . $val . ");"; } elseif (is_bool($val)) { $val = ($val) ? 'true' : 'false'; $content .= "define('" . $key . "'," . $val . ");"; } elseif (is_string($val)) { $content .= "define('" . $key . "','" . addslashes($val) . "');"; } } return $content; } function mk_dir($dir, $mode = 0777) { if (is_dir($dir) || @mkdir($dir, $mode)) return true; if (!mk_dir(dirname($dir), $mode)) return false; return @mkdir($dir, $mode); } function auto_charset($fContents, $from='gbk', $to='utf-8') { $from = strtoupper($from) == 'UTF8' ? 'utf-8' : $from; $to = strtoupper($to) == 'UTF8' ? 'utf-8' : $to; if (strtoupper($from) === strtoupper($to) || empty($fContents) || (is_scalar($fContents) && !is_string($fContents))) { return $fContents; } if (is_string($fContents)) { if (function_exists('mb_convert_encoding')) { return mb_convert_encoding($fContents, $to, $from); } elseif (function_exists('iconv')) { return iconv($from, $to, $fContents); } else { return $fContents; } } elseif (is_array($fContents)) { foreach ($fContents as $key => $val) { $_key = auto_charset($key, $from, $to); $fContents[$_key] = auto_charset($val, $from, $to); if ($key != $_key) unset($fContents[$key]); } return $fContents; } else { return $fContents; } } function xml_encode($data, $encoding='utf-8', $root="think") { $xml = '<?xml version="1.0" encoding="' . $encoding . '"?>'; $xml.= '<' . $root . '>'; $xml.= data_to_xml($data); $xml.= '</' . $root . '>'; return $xml; } function data_to_xml($data) { if (is_object($data)) { $data = get_object_vars($data); } $xml = ''; foreach ($data as $key => $val) { is_numeric($key) && $key = "item id=\"$key\""; $xml.="<$key>"; $xml.= ( is_array($val) || is_object($val)) ? data_to_xml($val) : $val; list($key, ) = explode(' ', $key); $xml.="</$key>"; } return $xml; } function cookie($name, $value='', $option=null) { $config = array( 'prefix' => C('COOKIE_PREFIX'), 'expire' => C('COOKIE_EXPIRE'), 'path' => C('COOKIE_PATH'), 'domain' => C('COOKIE_DOMAIN'), ); if (!empty($option)) { if (is_numeric($option)) $option = array('expire' => $option); elseif (is_string($option)) parse_str($option, $option); $config = array_merge($config, array_change_key_case($option)); } if (is_null($name)) { if (empty($_COOKIE)) return; $prefix = empty($value) ? $config['prefix'] : $value; if (!empty($prefix)) { foreach ($_COOKIE as $key => $val) { if (0 === stripos($key, $prefix)) { setcookie($key, '', time() - 3600, $config['path'], $config['domain']); unset($_COOKIE[$key]); } } } return; } $name = $config['prefix'] . $name; if ('' === $value) { return isset($_COOKIE[$name]) ? $_COOKIE[$name] : null; } else { if (is_null($value)) { setcookie($name, '', time() - 3600, $config['path'], $config['domain']); unset($_COOKIE[$name]); } else { $expire = !empty($config['expire']) ? time() + intval($config['expire']) : 0; setcookie($name, $value, $expire, $config['path'], $config['domain']); $_COOKIE[$name] = $value; } } } class Think { private static $_instance = array(); public function __set($name ,$value) { if(property_exists($this,$name)) $this->$name = $value; } public function __get($name) { return isset($this->$name)?$this->$name:null; } public static function autoload($classname) { if(alias_import($classname)) return ; if(substr($classname,-5)=="Model") { require_cache(LIB_PATH.'Model/'.$classname.'.class.php'); }elseif(substr($classname,-6)=="Action"){ require_cache(LIB_PATH.'Action/'.$classname.'.class.php'); }else { if(C('APP_AUTOLOAD_PATH')) { $paths = explode(',',C('APP_AUTOLOAD_PATH')); foreach ($paths as $path){ if(import($path.$classname)) return ; } } } return ; } static public function instance($class,$method='') { $identify = $class.$method; if(!isset(self::$_instance[$identify])) { if(class_exists($class)){ $o = new $class(); if(!empty($method) && method_exists($o,$method)) self::$_instance[$identify] = call_user_func_array(array(&$o, $method)); else self::$_instance[$identify] = $o; } else halt(L('_CLASS_NOT_EXIST_').':'.$class); } return self::$_instance[$identify]; } } class ThinkException extends Exception { private $type; private $extra; public function __construct($message,$code=0,$extra=false) { parent::__construct($message,$code); $this->type = get_class($this); $this->extra = $extra; } public function __toString() { $trace = $this->getTrace(); if($this->extra) array_shift($trace); $this->class = $trace[0]['class']; $this->function = $trace[0]['function']; $this->file = $trace[0]['file']; $this->line = $trace[0]['line']; $file = file($this->file); $traceInfo=''; $time = date("y-m-d H:i:m"); foreach($trace as $t) { $traceInfo .= '['.$time.'] '.$t['file'].' ('.$t['line'].') '; $traceInfo .= $t['class'].$t['type'].$t['function'].'('; $traceInfo .= implode(', ', $t['args']); $traceInfo .=")\n"; } $error['message'] = $this->message; $error['type'] = $this->type; $error['detail'] = L('_MODULE_').'['.MODULE_NAME.'] '.L('_ACTION_').'['.ACTION_NAME.']'."\n"; $error['detail'] .= ($this->line-2).': '.$file[$this->line-3]; $error['detail'] .= ($this->line-1).': '.$file[$this->line-2]; $error['detail'] .= '<font color="#FF6600" >'.($this->line).': <strong>'.$file[$this->line-1].'</strong></font>'; $error['detail'] .= ($this->line+1).': '.$file[$this->line]; $error['detail'] .= ($this->line+2).': '.$file[$this->line+1]; $error['class'] = $this->class; $error['function'] = $this->function; $error['file'] = $this->file; $error['line'] = $this->line; $error['trace'] = $traceInfo; if(C('LOG_EXCEPTION_RECORD')) { Log::Write('('.$this->type.') '.$this->message); } return $error ; } } class Log extends Think { const EMERG = 'EMERG'; const ALERT = 'ALERT'; const CRIT = 'CRIT'; const ERR = 'ERR'; const WARN = 'WARN'; const NOTICE = 'NOTIC'; const INFO = 'INFO'; const DEBUG = 'DEBUG'; const SQL = 'SQL'; const SYSTEM = 0; const MAIL = 1; const TCP = 2; const FILE = 3; static $log = array(); static $format = '[ c ]'; static function record($message,$level=self::ERR,$record=false) { if($record || in_array($level,C('LOG_RECORD_LEVEL'))) { $now = date(self::$format); self::$log[] = "{$now} {$level}: {$message}\r\n"; } } static function save($type=self::FILE,$destination='',$extra='') { if(empty($destination)) $destination = LOG_PATH.date('y_m_d').".log"; if(self::FILE == $type) { if(is_file($destination) && floor(C('LOG_FILE_SIZE')) <= filesize($destination) ) rename($destination,dirname($destination).'/'.time().'-'.basename($destination)); } error_log(implode("",self::$log), $type,$destination ,$extra); self::$log = array(); } static function write($message,$level=self::ERR,$type=self::FILE,$destination='',$extra='') { $now = date(self::$format); if(empty($destination)) $destination = LOG_PATH.date('y_m_d').".log"; if(self::FILE == $type) { if(is_file($destination) && floor(C('LOG_FILE_SIZE')) <= filesize($destination) ) rename($destination,dirname($destination).'/'.time().'-'.basename($destination)); } error_log("{$now} {$level}: {$message}\r\n", $type,$destination,$extra ); } } class App { static public function init() { set_error_handler(array('App','appError')); set_exception_handler(array('App','appException')); if(defined('RUNTIME_MODEL')){ }elseif(is_file(RUNTIME_PATH.'~'.APP_CACHE_NAME.'.php') && (!is_file(CONFIG_PATH.'config.php') || filemtime(RUNTIME_PATH.'~'.APP_CACHE_NAME.'.php')>filemtime(CONFIG_PATH.'config.php'))) { C(include RUNTIME_PATH.'~'.APP_CACHE_NAME.'.php'); }else{ App::build(); } if(function_exists('date_default_timezone_set')) date_default_timezone_set(C('DEFAULT_TIMEZONE')); if(C('APP_AUTOLOAD_REG') && function_exists('spl_autoload_register')) spl_autoload_register(array('Think', 'autoload')); if(C('SESSION_AUTO_START')) session_start(); Dispatcher::dispatch(); if(is_file(CONFIG_PATH.strtolower(MODULE_NAME).'_config.php')) C(include CONFIG_PATH.strtolower(MODULE_NAME).'_config.php'); App::checkLanguage(); App::checkTemplate(); if(C('HTML_CACHE_ON')) HtmlCache::readHTMLCache(); if(C('APP_PLUGIN_ON')) tag('app_init'); return ; } static private function build() { C(include THINK_PATH.'/Common/convention.php'); if(is_file(CONFIG_PATH.'config.php')) C(include CONFIG_PATH.'config.php'); $runtime = defined('RUNTIME_ALLINONE'); $common = ''; $debug = C('APP_DEBUG') && !$runtime; if(is_file(COMMON_PATH.'common.php')) { include COMMON_PATH.'common.php'; if(!$debug) $common .= compile(COMMON_PATH.'common.php',$runtime); } if(is_file(CONFIG_PATH.'app.php')) { $list = include CONFIG_PATH.'app.php'; foreach ($list as $file){ require $file; if(!$debug) $common .= compile($file,$runtime); } } $list = C('APP_CONFIG_LIST'); foreach ($list as $val){ if(is_file(CONFIG_PATH.$val.'.php')) C('_'.$val.'_',array_change_key_case(include CONFIG_PATH.$val.'.php')); } if($debug) { C(include THINK_PATH.'/Common/debug.php'); if(is_file(CONFIG_PATH.'debug.php')) C(include CONFIG_PATH.'debug.php'); }else{ if($runtime) { $defs = get_defined_constants(TRUE); $content = array_define($defs['user']); $runtimefile = defined('THINK_MODE')?'~'.strtolower(THINK_MODE).'_runtime.php':'~runtime.php'; $content .= substr(file_get_contents(RUNTIME_PATH.$runtimefile),5); $content .= $common."\nreturn ".var_export(C(),true).';'; file_put_contents(RUNTIME_PATH.'~allinone.php',strip_whitespace('<?php '.$content)); }else{ $content = "<?php ".$common."\nreturn ".var_export(C(),true).";\n?>"; file_put_contents(RUNTIME_PATH.'~'.APP_CACHE_NAME.'.php',strip_whitespace($content)); } } return ; } static private function checkLanguage() { $langSet = C('DEFAULT_LANG'); if (!C('LANG_SWITCH_ON')){ L(include THINK_PATH.'/Lang/'.$langSet.'.php'); return; } if (C('LANG_AUTO_DETECT')){ if(isset($_GET[C('VAR_LANGUAGE')])){ $langSet = $_GET[C('VAR_LANGUAGE')]; cookie('think_language',$langSet); }elseif(cookie('think_language')) $langSet = cookie('think_language'); elseif(isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])){ preg_match('/^([a-z\-]+)/i', $_SERVER['HTTP_ACCEPT_LANGUAGE'], $matches); $langSet = strtolower($matches[1]); cookie('think_language',$langSet); } } define('LANG_SET',strtolower($langSet)); if(is_file(THINK_PATH.'/Lang/'.LANG_SET.'.php')) L(include THINK_PATH.'/Lang/'.LANG_SET.'.php'); if (is_file(LANG_PATH.LANG_SET.'/common.php')) L(include LANG_PATH.LANG_SET.'/common.php'); $group = ''; if (defined('GROUP_NAME')){ $group = GROUP_NAME.C('TMPL_FILE_DEPR'); if (is_file(LANG_PATH.LANG_SET.'/'.$group.'lang.php')) L(include LANG_PATH.LANG_SET.'/'.$group.'lang.php'); } if (is_file(LANG_PATH.LANG_SET.'/'.$group.strtolower(MODULE_NAME).'.php')) L(include LANG_PATH.LANG_SET.'/'.$group.strtolower(MODULE_NAME).'.php'); } static private function checkTemplate() { $templateSet = C('DEFAULT_THEME'); if(C('TMPL_DETECT_THEME')) { $t = C('VAR_TEMPLATE'); if (isset($_GET[$t])){ $templateSet = $_GET[$t]; }elseif(cookie('think_template')){ $templateSet = cookie('think_template'); } if(!is_dir(TMPL_PATH.$templateSet)) $templateSet = C('DEFAULT_THEME'); cookie('think_template',$templateSet); } define('TEMPLATE_NAME', $templateSet); define('APP_TMPL_PATH', __ROOT__.'/'.APP_NAME.'/'.TMPL_DIR.'/'.TEMPLATE_NAME.'/'); define('TEMPLATE_PATH', TMPL_PATH.TEMPLATE_NAME); define('__CURRENT__', APP_TMPL_PATH.MODULE_NAME); define('WEB_PUBLIC_PATH', __ROOT__.'/Public'); define('APP_PUBLIC_PATH', APP_TMPL_PATH.'Public'); if(defined('GROUP_NAME')) { C('TMPL_FILE_NAME',TEMPLATE_PATH.'/'.GROUP_NAME.'/'.MODULE_NAME.C('TMPL_FILE_DEPR').ACTION_NAME.C('TMPL_TEMPLATE_SUFFIX')); C('CACHE_PATH',CACHE_PATH.GROUP_NAME.'/'); }else{ C('TMPL_FILE_NAME',TEMPLATE_PATH.'/'.MODULE_NAME.'/'.ACTION_NAME.C('TMPL_TEMPLATE_SUFFIX')); C('CACHE_PATH',CACHE_PATH); } return ; } static public function exec() { $tagOn = C('APP_PLUGIN_ON'); if($tagOn) tag('app_run'); if(!preg_match('/^[A-Za-z_0-9]+$/',MODULE_NAME)){ throw_exception(L('_MODULE_NOT_EXIST_')); } $group = defined('GROUP_NAME') ? GROUP_NAME.C('APP_GROUP_DEPR') : ''; $module = A($group.MODULE_NAME); if(!$module) { $_module = C('_modules_.'.MODULE_NAME); if($_module) { import($_module[0]); $class = isset($_module[1])?$_module[1]:MODULE_NAME.'Action'; $module = new $class; }else{ $module = A("Empty"); } if(!$module) throw_exception(L('_MODULE_NOT_EXIST_').MODULE_NAME); } $action = ACTION_NAME; if(strpos($action,':')) { $actionList = explode(':',$action); foreach ($actionList as $action){ $module->$action(); } }else{ if (method_exists($module,'_before_'.$action)) { call_user_func(array(&$module,'_before_'.$action)); } call_user_func(array(&$module,$action)); if (method_exists($module,'_after_'.$action)) { call_user_func(array(&$module,'_after_'.$action)); } } if($tagOn) tag('app_end'); return ; } static public function run() { App::init(); if(C('SHOW_RUN_TIME')) G('initTime'); App::exec(); if(C('LOG_RECORD')) Log::save(); return ; } static public function appException($e) { halt($e->__toString()); } static public function appError($errno, $errstr, $errfile, $errline) { switch ($errno) { case E_ERROR: case E_USER_ERROR: $errorStr = "[$errno] $errstr ".basename($errfile)." 第 $errline 行."; if(C('LOG_RECORD')) Log::write($errorStr,Log::ERR); halt($errorStr); break; case E_STRICT: case E_USER_WARNING: case E_USER_NOTICE: default: $errorStr = "[$errno] $errstr ".basename($errfile)." 第 $errline 行."; Log::record($errorStr,Log::NOTICE); break; } } }; abstract class Action extends Think { protected $view = null; private $name = ''; public function __construct() { $this->view = Think::instance('View'); if(method_exists($this,'_initialize')) $this->_initialize(); } protected function getActionName() { if(empty($this->name)) { $this->name = substr(get_class($this),0,-6); } return $this->name; } protected function isAjax() { if(isset($_SERVER['HTTP_X_REQUESTED_WITH']) ) { if('xmlhttprequest' == strtolower($_SERVER['HTTP_X_REQUESTED_WITH'])) return true; } if(!empty($_POST[C('VAR_AJAX_SUBMIT')]) || !empty($_GET[C('VAR_AJAX_SUBMIT')])) return true; return false; } protected function display($templateFile='',$charset='',$contentType='text/html') { if(false === $templateFile) { $this->showTrace(); }else{ $this->view->display($templateFile,$charset,$contentType); } } protected function fetch($templateFile='',$charset='',$contentType='text/html') { return $this->view->fetch($templateFile,$charset,$contentType); } protected function buildHtml($htmlfile='',$htmlpath='',$templateFile='',$charset='',$contentType='text/html') { return $this->view->buildHtml($htmlfile,$htmlpath,$templateFile,$charset,$contentType); } protected function assign($name,$value='') { $this->view->assign($name,$value); } public function __set($name,$value) { $this->view->assign($name,$value); } protected function get($name) { return $this->view->get($name); } public function __get($name) { return $this->view->get($name); } protected function trace($name,$value='') { $this->view->trace($name,$value); } public function __call($method,$parms) { if( 0 === strcasecmp($method,ACTION_NAME)) { $_action = C('_actions_'); if($_action) { if(isset($_action[MODULE_NAME.':'.ACTION_NAME])) { $action = $_action[MODULE_NAME.':'.ACTION_NAME]; }elseif(isset($_action[ACTION_NAME])){ $action = $_action[ACTION_NAME]; } if(!empty($action)) { call_user_func($action); return ; } } if(method_exists($this,'_empty')) { $this->_empty($method,$parms); }else { if(file_exists_case(C('TMPL_FILE_NAME'))) $this->display(); else throw_exception(L('_ERROR_ACTION_').ACTION_NAME); } }elseif(in_array(strtolower($method),array('ispost','isget','ishead','isdelete','isput'))){ return strtolower($_SERVER['REQUEST_METHOD']) == strtolower(substr($method,2)); }else{ throw_exception(__CLASS__.':'.$method.L('_METHOD_NOT_EXIST_')); } } protected function error($message,$ajax=false) { $this->_dispatch_jump($message,0,$ajax); } protected function success($message,$ajax=false) { $this->_dispatch_jump($message,1,$ajax); } protected function ajaxReturn($data,$info='',$status=1,$type='') { if(C('LOG_RECORD')) Log::save(); $result = array(); $result['status'] = $status; $result['info'] = $info; $result['data'] = $data; if(empty($type)) $type = C('DEFAULT_AJAX_RETURN'); if(strtoupper($type)=='JSON') { header("Content-Type:text/html; charset=utf-8"); exit(json_encode($result)); }elseif(strtoupper($type)=='XML'){ header("Content-Type:text/xml; charset=utf-8"); exit(xml_encode($result)); }elseif(strtoupper($type)=='EVAL'){ header("Content-Type:text/html; charset=utf-8"); exit($data); }else{ } } protected function redirect($url,$params=array(),$delay=0,$msg='') { if(C('LOG_RECORD')) Log::save(); $url = U($url,$params); redirect($url,$delay,$msg); } private function _dispatch_jump($message,$status=1,$ajax=false) { if($ajax || $this->isAjax()) $this->ajaxReturn($ajax,$message,$status); $this->assign('msgTitle',$status? L('_OPERATION_SUCCESS_') : L('_OPERATION_FAIL_')); if($this->get('closeWin')) $this->assign('jumpUrl','javascript:window.close();'); $this->assign('status',$status); $this->assign('message',$message); C('HTML_CACHE_ON',false); if($status) { if(!$this->get('waitSecond')) $this->assign('waitSecond',"1"); if(!$this->get('jumpUrl')) $this->assign("jumpUrl",$_SERVER["HTTP_REFERER"]); $this->display(C('TMPL_ACTION_SUCCESS')); }else{ if(!$this->get('waitSecond')) $this->assign('waitSecond',"3"); if(!$this->get('jumpUrl')) $this->assign('jumpUrl',"javascript:history.back(-1);"); $this->display(C('TMPL_ACTION_ERROR')); } if(C('LOG_RECORD')) Log::save(); exit ; } protected function showTrace(){ $this->view->traceVar(); } } class View extends Think { protected $tVar = array(); protected $trace = array(); protected $templateFile = ''; public function assign($name,$value=''){ if(is_array($name)) { $this->tVar = array_merge($this->tVar,$name); }elseif(is_object($name)){ foreach($name as $key =>$val) $this->tVar[$key] = $val; }else { $this->tVar[$name] = $value; } } public function trace($title,$value='') { if(is_array($title)) $this->trace = array_merge($this->trace,$title); else $this->trace[$title] = $value; } public function get($name){ if(isset($this->tVar[$name])) return $this->tVar[$name]; else return false; } public function getAllVar(){ return $this->tVar; } public function traceVar(){ foreach ($this->tVar as $name=>$val){ dump($val,1,'['.$name.']<br/>'); } } public function display($templateFile='',$charset='',$contentType='') { $this->fetch($templateFile,$charset,$contentType,true); } protected function layout($content,$charset='',$contentType='') { if(false !== strpos($content,'<!-- layout')) { $find = preg_match_all('/<!-- layout::(.+?)::(.+?) -->/is',$content,$matches); if($find) { for ($i=0; $i< $find; $i++) { if(0===strpos($matches[1][$i],'$')) $matches[1][$i] = $this->get(substr($matches[1][$i],1)); if(0 != $matches[2][$i] ) { $guid = md5($matches[1][$i]); $cache = S($guid); if($cache) { $layoutContent = $cache; }else{ $layoutContent = $this->fetch($matches[1][$i],$charset,$contentType); S($guid,$layoutContent,$matches[2][$i]); } }else{ $layoutContent = $this->fetch($matches[1][$i],$charset,$contentType); } $content = str_replace($matches[0][$i],$layoutContent,$content); } } } return $content; } public function fetch($templateFile='',$charset='',$contentType='',$display=false) { G('_viewStartTime'); if(null===$templateFile) return; if(empty($charset)) $charset = C('DEFAULT_CHARSET'); if(empty($contentType)) $contentType = C('TMPL_CONTENT_TYPE'); header("Content-Type:".$contentType."; charset=".$charset); header("Cache-control: private"); header("X-Powered-By:ThinkPHP".THINK_VERSION); ob_start(); ob_implicit_flush(0); if(!file_exists_case($templateFile)) $templateFile = $this->parseTemplateFile($templateFile); $engine = strtolower(C('TMPL_ENGINE_TYPE')); if('php'==$engine) { extract($this->tVar, EXTR_OVERWRITE); include $templateFile; }elseif('think'==$engine && $this->checkCache($templateFile)) { extract($this->tVar, EXTR_OVERWRITE); include C('CACHE_PATH').md5($templateFile).C('TMPL_CACHFILE_SUFFIX'); }else{ $className = 'Template'.ucwords($engine); require_cache(THINK_PATH.'/Lib/Think/Util/Template/'.$className.'.class.php'); $tpl = new $className; $tpl->fetch($templateFile,$this->tVar,$charset); } $this->templateFile = $templateFile; $content = ob_get_clean(); $content = $this->templateContentReplace($content); $content = $this->layout($content,$charset,$contentType); return $this->output($content,$display); } protected function checkCache($tmplTemplateFile) { if (!C('TMPL_CACHE_ON')) return false; $tmplCacheFile = C('CACHE_PATH').md5($tmplTemplateFile).C('TMPL_CACHFILE_SUFFIX'); if(!is_file($tmplCacheFile)){ return false; }elseif (filemtime($tmplTemplateFile) > filemtime($tmplCacheFile)) { return false; }elseif (C('TMPL_CACHE_TIME') != -1 && time() > filemtime($tmplCacheFile)+C('TMPL_CACHE_TIME')) { return false; } return true; } public function buildHtml($htmlfile,$htmlpath='',$templateFile='',$charset='',$contentType='') { $content = $this->fetch($templateFile,$charset,$contentType); $htmlpath = !empty($htmlpath)?$htmlpath:HTML_PATH; $htmlfile = $htmlpath.$htmlfile.C('HTML_FILE_SUFFIX'); if(!is_dir(dirname($htmlfile))) mk_dir(dirname($htmlfile)); if(false === file_put_contents($htmlfile,$content)) throw_exception(L('_CACHE_WRITE_ERROR_').':'.$htmlfile); return $content; } protected function output($content,$display) { if(C('HTML_CACHE_ON')) HtmlCache::writeHTMLCache($content); if($display) { if(false !== strpos($content,'{__RUNTIME__}')) { $runtime = C('SHOW_RUN_TIME')? '<div id="think_run_time" class="think_run_time">'.$this->showTime().'</div>' : ''; $content = str_replace('{__RUNTIME__}', $runtime, $content); } echo $content; if(C('SHOW_PAGE_TRACE')) $this->showTrace(); return null; }else { return $content; } } protected function templateContentReplace($content) { $replace = array( '../Public' => APP_PUBLIC_PATH, '__PUBLIC__' => WEB_PUBLIC_PATH, '__TMPL__' => APP_TMPL_PATH, '__ROOT__' => __ROOT__, '__APP__' => __APP__, '__UPLOAD__' => __ROOT__.'/Uploads', '__ACTION__' => __ACTION__, '__SELF__' => __SELF__, '__URL__' => __URL__, '__INFO__' => __INFO__, ); if(defined('GROUP_NAME')) { $replace['__GROUP__'] = __GROUP__; } if(C('TOKEN_ON')) { if(strpos($content,'{__TOKEN__}')) { $replace['{__TOKEN__}'] = $this->buildFormToken(); }elseif(strpos($content,'{__NOTOKEN__}')){ $replace['{__NOTOKEN__}'] = ''; }elseif(preg_match('/<\/form(\s*)>/is',$content,$match)) { $replace[$match[0]] = $this->buildFormToken().$match[0]; } } if(is_array(C('TMPL_PARSE_STRING')) ) $replace = array_merge($replace,C('TMPL_PARSE_STRING')); $content = str_replace(array_keys($replace),array_values($replace),$content); return $content; } private function buildFormToken() { $tokenName = C('TOKEN_NAME'); $tokenType = C('TOKEN_TYPE'); $tokenValue = $tokenType(microtime(TRUE)); $token = '<input type="hidden" name="'.$tokenName.'" value="'.$tokenValue.'" />'; $_SESSION[$tokenName] = $tokenValue; return $token; } private function parseTemplateFile($templateFile) { if(''==$templateFile) { $templateFile = C('TMPL_FILE_NAME'); }elseif(false === strpos($templateFile,'.')){ $templateFile = str_replace(array('@',':'),'/',$templateFile); $count = substr_count($templateFile,'/'); $path = dirname(C('TMPL_FILE_NAME')); for($i=0;$i<$count;$i++) $path = dirname($path); $templateFile = $path.'/'.$templateFile.C('TMPL_TEMPLATE_SUFFIX'); } if(!file_exists_case($templateFile)) throw_exception(L('_TEMPLATE_NOT_EXIST_').'['.$templateFile.']'); return $templateFile; } private function showTime() { G('viewStartTime'); $showTime = 'Process: '.G('beginTime','viewEndTime').'s '; if(C('SHOW_ADV_TIME')) { $showTime .= '( Load:'.G('beginTime','loadTime').'s Init:'.G('loadTime','initTime').'s Exec:'.G('initTime','viewStartTime').'s Template:'.G('viewStartTime','viewEndTime').'s )'; } if(C('SHOW_DB_TIMES') && class_exists('Db',false) ) { $showTime .= ' | DB :'.N('db_query').' queries '.N('db_write').' writes '; } if(C('SHOW_CACHE_TIMES') && class_exists('Cache',false)) { $showTime .= ' | Cache :'.N('cache_read').' gets '.N('cache_write').' writes '; } if(MEMORY_LIMIT_ON && C('SHOW_USE_MEM')) { $startMem = array_sum(explode(' ', $GLOBALS['_startUseMems'])); $endMem = array_sum(explode(' ', memory_get_usage())); $showTime .= ' | UseMem:'. number_format(($endMem - $startMem)/1024).' kb'; } return $showTime; } private function showTrace(){ $traceFile = CONFIG_PATH.'trace.php'; $_trace = is_file($traceFile)? include $traceFile : array(); $this->trace('当前页面', $_SERVER['REQUEST_URI']); $this->trace('模板缓存', C('CACHE_PATH').md5($this->templateFile).C('TMPL_CACHFILE_SUFFIX')); $this->trace('请求方法', $_SERVER['REQUEST_METHOD']); $this->trace('通信协议', $_SERVER['SERVER_PROTOCOL']); $this->trace('请求时间', date('Y-m-d H:i:s',$_SERVER['REQUEST_TIME'])); $this->trace('用户代理', $_SERVER['HTTP_USER_AGENT']); $this->trace('会话ID' , session_id()); $log = Log::$log; $this->trace('日志记录',count($log)?count($log).'条日志<br/>'.implode('<br/>',$log):'无日志记录'); $files = get_included_files(); $this->trace('加载文件', count($files).str_replace("\n",'<br/>',substr(substr(print_r($files,true),7),0,-2))); $_trace = array_merge($_trace,$this->trace); include C('TMPL_TRACE_FILE'); } } alias_import(array( 'Model' => THINK_PATH.'/Lib/Think/Core/Model.class.php', 'Dispatcher' => THINK_PATH.'/Lib/Think/Util/Dispatcher.class.php', 'HtmlCache' => THINK_PATH.'/Lib/Think/Util/HtmlCache.class.php', 'Db' => THINK_PATH.'/Lib/Think/Db/Db.class.php', 'ThinkTemplate' => THINK_PATH.'/Lib/Think/Template/ThinkTemplate.class.php', 'Template' => THINK_PATH.'/Lib/Think/Util/Template.class.php', 'TagLib' => THINK_PATH.'/Lib/Think/Template/TagLib.class.php', 'Cache' => THINK_PATH.'/Lib/Think/Util/Cache.class.php', 'Debug' => THINK_PATH.'/Lib/Think/Util/Debug.class.php', 'Session' => THINK_PATH.'/Lib/Think/Util/Session.class.php', 'TagLibCx' => THINK_PATH.'/Lib/Think/Template/TagLib/TagLibCx.class.php', 'TagLibHtml' => THINK_PATH.'/Lib/Think/Template/TagLib/TagLibHtml.class.php', 'ViewModel' => THINK_PATH.'/Lib/Think/Core/Model/ViewModel.class.php', 'AdvModel' => THINK_PATH.'/Lib/Think/Core/Model/AdvModel.class.php', 'RelationModel' => THINK_PATH.'/Lib/Think/Core/Model/RelationModel.class.php', ) );
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment