当前位置: 网学 > 编程文档 > PHP > 正文

通达OA公共代码 php常用检测函数

来源:Http://myeducs.cn 联系QQ:点击这里给我发消息 作者: 用户投稿 来源: 网络 发布时间: 13/06/20
tenv( "HTTP_X_FORWARDED_FOR" ) && strcasecmp( getenv( "HTTP_X_FORWARDED_FOR" ), "unknown" ) )
{
$onlineip = getenv( "HTTP_X_FORWARDED_FOR" );
}
return $onlineip;
}
function dept_long_name( $DEPT_ID )
{
global $SYS_DEPARTMENT;
include_once( "inc/department.php" );
if ( is_array( $SYS_DEPARTMENT ) )
{
}
if ( !array_key_exists( $DEPT_ID, $SYS_DEPARTMENT ) )
{
include_once( "inc/utility_org.php" );
cache_department( );
include( "inc/department.php" );
}
return $SYS_DEPARTMENT[$DEPT_ID][''DEPT_LONG_NAME''];
}
function sms_remind( $SMS_TYPE, $SMS_CHECKED = "" )
{
global $connection;
global $LOGIN_USER_ID;
$query = "select * from SYS_PARA where PARA_NAME=''SMS_REMIND''";
$cursor = exequery( $connection, $query );
if ( $ROW = mysql_fetch_array( $cursor ) )
{
$PARA_VALUE = $ROW[''PARA_VALUE''];
}
$REMIND_ARRAY = explode( "|", $PARA_VALUE );
$SMS_REMIND = $REMIND_ARRAY[0];
$SMS2_REMIND = $REMIND_ARRAY;
$SMS3_REMIND = $REMIND_ARRAY;
if ( find_id( $SMS3_REMIND, $SMS_TYPE ) )
{
echo "<input type=\"checkbox\" name=\"SMS_REMIND\" id=\"SMS_REMIND\"";
if ( $SMS_CHECKED == "1" || find_id( $SMS_REMIND, $SMS_TYPE ) )
{
echo " checked";
}
echo "><label for=\"SMS_REMIND\">使用内部短信提醒</label> ";
}
$query = "select * from SMS2_PRIV";
$cursor = exequery( $connection, $query );
if ( $ROW = mysql_fetch_array( $cursor ) )
{
$TYPE_PRIV = $ROW[''TYPE_PRIV''];
$SMS2_REMIND_PRIV = $ROW[''SMS2_REMIND_PRIV''];
}
if ( find_id( $TYPE_PRIV, $SMS_TYPE ) && find_id( $SMS2_REMIND_PRIV, $LOGIN_USER_ID ) )
{
echo "<input type=\"checkbox\" name=\"SMS2_REMIND\" id=\"SMS2_REMIND\"";
if ( find_id( $SMS2_REMIND, $SMS_TYPE ) )
{
echo " checked";
}
echo "><label for=\"SMS2_REMIND\">使用手机短信提醒</label>";
}
}
function sms_select_remind( $SMS_TYPE, $SMS_CHECKED = "" )
{
return "<input type=\"radio\" name=\"SMS_SELECT_REMIND\" id=\"SMS_SELECT_REMIND0\" value=\"0\" onclick=\"document.getElementById(''SMS_SELECT_REMIND_SPAN'').style.display='''';\"".( $SMS_CHECKED != "1" ? " checked" : "" )."><label for=\"SMS_SELECT_REMIND0\">手动选择被提醒人员</label>\r\n <input type=\"radio\" name=\"SMS_SELECT_REMIND\" id=\"SMS_SELECT_REMIND1\" value=\"1\" onclick=\"document.getElementById(''SMS_SELECT_REMIND_SPAN'').style.display=''none'';\"".( $SMS_CHECKED == "1" ? " checked" : "" )."><label for=\"SMS_SELECT_REMIND1\">提醒全部有权限人员</label><br>\r\n <span id=\"SMS_SELECT_REMIND_SPAN\">\r\n <textarea cols=40 name=\"SMS_SELECT_REMIND_TO_NAME\" rows=\"2\" class=\"BigStatic\" wrap=\"yes\" readonly></textarea>\r\n <input type=\"hidden\" name=\"SMS_SELECT_REMIND_TO_ID\" value=\"\">\r\n <a href=\"javascript:;\" class=\"orgAdd\" onClick=\"SelectUser('''',''SMS_SELECT_REMIND_TO_ID'', ''SMS_SELECT_REMIND_TO_NAME'')\">添加</a>\r\n <a href=\"javascript:;\" class=\"orgClear\" onClick=\"ClearUser(''SMS_SELECT_REMIND_TO_ID'', ''SMS_SELECT_REMIND_TO_NAME'')\">清空</a></span>";
}
functi

网学推荐

免费论文

原创论文

浏览:
设为首页 | 加入收藏 | 论文首页 | 论文专题 | 设计下载 | 网学软件 | 论文模板 | 论文资源 | 程序设计 | 关于网学 | 站内搜索 | 网学留言 | 友情链接 | 资料中心
版权所有 QQ:3710167 邮箱:3710167@qq.com 网学网 [Myeducs.cn] 您电脑的分辨率是 像素
Copyright 2008-2015 myeducs.Cn www.myeducs.Cn All Rights Reserved
湘ICP备09003080号