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