check_type.php(使用类型检验函数)
复制代码 代码如下:
复制代码 代码如下:
复制代码 代码如下:
if ( $CODE_NO == $SELECTED )
{
$OPTION_STR .= " selected";
}
$OPTION_STR .= ">".$CODE_NAME."\n";
}
else if ( $TYPE == "R" )
{
$OPTION_STR .= "if ( $CODE_NO == $SELECTED )
{
$OPTION_STR .= " checked";
}
$OPTION_STR .= ">".$CODE_NAME."\n";
}
else if ( $TYPE == "C" )
{
$OPTION_STR .= "if ( find_id( $SELECTED, $CODE_NO ) )
{
$OPTION_STR .= " checked";
}
$OPTION_STR .= ">".$CODE_NAME."\n";
}
}
return $OPTION_STR;
}
function get_code_array( $PARENT_NO, $REVERSE = FALSE )
{
$CODE_ARRAY = array( );
if ( $PARENT_NO == "" )
{
return $CODE_ARRAY;
}
global $connection;
$query = "select CODE_NO,CODE_NAME from SYS_CODE where PARENT_NO='".$PARENT_NO."' order by CODE_ORDER";
$cursor = exequery( $connection, $query );
while ( $ROW = mysql_fetch_array( $cursor ) )
{
$CODE_NO = $ROW['CODE_NO'];
$CODE_NAME = $ROW['CODE_NAME'];
if ( !$REVERSE )
{
$CODE_ARRAY[$CODE_NO] = $CODE_NAME;
}
else
{
$CODE_ARRAY[$CODE_NAME] = $CODE_NO;
}
}
return $CODE_ARRAY;
}
function sms_type_url( $SMS_TYPE, $CONTENT )
{
switch ( $SMS_TYPE )
{
case "0" :
$URL = "/general/sms/receive/";
return $URL;
case "1" :
$URL = "/general/notify/show/";
return $URL;
case "2" :
$URL = "/general/email/inbox/?BOX_ID=0";
return $URL;
case "3" :
$URL = "/general/netmeeting/";
return $URL;
case "4" :
$URL = "/general/salary/report/";
return $URL;
case "5" :
$URL = "/general/calendar/";
return $URL;
case "6" :
if ( strstr( $CONTENT, "提交" ) && strstr( $CONTENT, "申请" ) && strstr( $CONTENT, "请批示" ) )
{
$URL = "/general/attendance/manage/";
return $URL;
}
$URL = "/general/attendance/personal/";
return $URL;
case "7" :
$URL = "/general/workflow/list";
return $URL;
case "8" :
$URL = "/general/meeting/manage/";
return $URL;
case "9" :
if ( strstr( $CONTENT, "提交" ) )
{
if ( strstr( $CONTENT, "申请" ) )
{
}
}
if ( strstr( $CONTENT, "请批示" ) || strstr( $CONTENT, "部门领导" ) && strstr( $CONTENT, "批准了" ) )
{
$URL = "/general/vehicle/checkup/";
return $URL;
}
if ( strstr( $CONTENT, "部门审批" ) )
{
$URL = "/general/vehicle/dept_manage/";
return $URL;
}
$URL = "/general/vehicle/";
return $URL;
case "10" :
$URL = "/general/mobile_sms/";
return $URL;
case "11" :
$URL = "/general/vote/show/";
return $URL;
case "12" :
$URL = "/general/work_plan/show/";
return $URL;
case "13" :
$URL = "/general/diary/";
return $URL;
case "14" :
$URL = "/general/news/show/";
return $URL;
case "15" :
$URL = "/general/score/submit/";
return $URL;
case "16" :
$URL = "/general/file_folder/index1.php";
return $URL;
case "17" :
$URL = "/general/netdisk";
return $URL;
case "18" :
$URL = "/general/bbs";
return $URL;
case "20" :
$URL = "/general/file_folder?FILE_SORT=2&SORT_ID=0";
return $URL;
case "30" :
$URL = "/general/training/manage/show";
return $URL;
case "31" :
if ( strstr( $CONTENT, "批准了" ) || strstr( $CONTENT, "未批准" ) || strstr( $CONTENT, "撤销了" ) )
{
$URL = "/general/training/train/apply/";
return $URL;
}
$URL = "/general/training/manage/apply_manage/";
return $URL;
case "32" :
$URL = "/general/training/train/survey/";
return $URL;
case "33" :
$URL = "/general/training/train/information/";
return $URL;
case "34" :
$URL = "/general/training/train/assessment/";
return $URL;
case "35" :
$URL = "/general/hrms/manage/";
}
return $URL;
}
function avatar_size( $AVATAR )
{
global $ROOT_PATH;
global $connection;
global $AVATAR_WIDTH;
global $AVATAR_HEIGHT;
$FILENAME = $ROOT_PATH."images/avatar/".$AVATAR.".gif";
if ( !$AVATAR_WIDTH && !$AVATAR_HEIGHT )
{
$query = "SELECT AVATAR_WIDTH,AVATAR_HEIGHT from INTERFACE";
$cursor = exequery( $connection, $query );
if ( $ROW = mysql_fetch_array( $cursor ) )
{
$AVATAR_WIDTH = $ROW['AVATAR_WIDTH'];
$AVATAR_HEIGHT = $ROW['AVATAR_HEIGHT'];
}
}
$IMG_ATTR = @getimagesize( $FILENAME );
if ( $AVATAR_WIDTH < $IMG_ATTR[0] )
{
$IMG_ATTR[0] = $AVATAR_WIDTH;
}
if ( $AVATAR_HEIGHT < $IMG_ATTR[1] )
{
$IMG_ATTR[1] = $AVATAR_HEIGHT;
}
if ( $IMG_ATTR[0] < 15 )
{
$IMG_ATTR[0] = 15;
}
if ( $IMG_ATTR[1] < 15 )
{
$IMG_ATTR[1] = 15;
}
return "width=\"".$IMG_ATTR['0']."\" height=\"{$IMG_ATTR['1']}\"";
}
function format_cvs( $STR )
{
$STR = str_replace( "\"", "", $STR );
$STR = str_replace( "\n", "", $STR );
$STR = str_replace( "\r", "", $STR );
$STR = str_replace( "'", "\\'", $STR );
if ( strpos( $STR, "," ) === FALSE )
{
return $STR;
}
$STR = "\"".$STR."\"";
return $STR;
}
function keyed_str( $TXT, $ENCRYPT_KEY )
{
$ENCRYPT_KEY = md5( $ENCRYPT_KEY );
$CTR = 0;
$TMP = "";
$I = 0;
for ( ; $I < strlen( $TXT ); ++$I )
{
if ( $CTR == strlen( $ENCRYPT_KEY ) )
{
$CTR = 0;
}
$TMP .= substr( $TXT, $I, 1 ) ^ substr( $ENCRYPT_KEY, $CTR, 1 );
++$CTR;
}
return $TMP;
}
function encrypt_str( $TXT, $KEY )
{
srand( ( double )microtime( ) * 1000000 );
$ENCRYPT_KEY = md5( rand( 0, 32000 ) );
$CTR = 0;
$TMP = "";
$I = 0;
for ( ; $I < strlen( $TXT ); ++$I )
{
if ( $CTR == strlen( $ENCRYPT_KEY ) )
{
$CTR = 0;
}
$TMP .= substr( $ENCRYPT_KEY, $CTR, 1 ).( substr( $TXT, $I, 1 ) ^ substr( $ENCRYPT_KEY, $CTR, 1 ) );
++$CTR;
}
return keyed_str( $TMP, $KEY );
}
function decrypt_str( $TXT, $KEY )
{
$TXT = keyed_str( $TXT, $KEY );
$TMP = "";
$I = 0;
for ( ; $I < strlen( $TXT ); ++$I )
{
$MD5 = substr( $TXT, $I, 1 );
++$I;
$TMP .= substr( $TXT, $I, 1 ) ^ $MD5;
}
return $TMP;
}
function get_client_ip( )
{
if ( getenv( "REMOTE_ADDR" ) && strcasecmp( getenv( "REMOTE_ADDR" ), "unknown" ) )
{
$onlineip = getenv( "REMOTE_ADDR" );
return $onlineip;
}
if ( isset( $_SERVER['REMOTE_ADDR'] ) && $_SERVER['REMOTE_ADDR'] && strcasecmp( $_SERVER['REMOTE_ADDR'], "unknown" ) )
{
$onlineip = $_SERVER['REMOTE_ADDR'];
return $onlineip;
}
if ( getenv( "HTTP_CLIENT_IP" ) && strcasecmp( getenv( "HTTP_CLIENT_IP" ), "unknown" ) )
{
$onlineip = getenv( "HTTP_CLIENT_IP" );
return $onlineip;
}
if ( getenv( "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[1];
$SMS3_REMIND = $REMIND_ARRAY[2];
if ( find_id( $SMS3_REMIND, $SMS_TYPE ) )
{
echo "if ( $SMS_CHECKED == "1" || find_id( $SMS_REMIND, $SMS_TYPE ) )
{
echo " checked";
}
echo ">使用内部短信提醒 ";
}
$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 "if ( find_id( $SMS2_REMIND, $SMS_TYPE ) )
{
echo " checked";
}
echo ">使用手机短信提醒";
}
}
function sms_select_remind( $SMS_TYPE, $SMS_CHECKED = "" )
{
return "手动选择被提醒人员\r\n 提醒全部有权限人员
\r\n \r\n \r\n \r\n 添加\r\n 清空";
}
function sms2_select_remind( $SMS_TYPE, $SMS_CHECKED = "" )
{
global $connection;
global $LOGIN_USER_ID;
$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 ) )
{
return "手动选择被提醒人员\r\n 提醒全部有权限人员
\r\n \r\n \r\n \r\n 添加\r\n 清空";
}
}
function page_bar( $current_start_item, $total_items, $page_size = 10, $var_name = "start", $script_href = NULL, $direct_print = FALSE )
{
if ( $current_start_item < 0 || $total_items < $current_start_item )
{
$current_start_item = 0;
}
if ( $script_href == NULL )
{
$script_href = $_SERVER['PHP_SELF'];
}
if ( $_SERVER['QUERY_STRING'] != "" )
{
$script_href .= "?".$_SERVER['QUERY_STRING'];
}
$script_href = preg_replace( "/^(.+)(\\?|&)TOTAL_ITEMS=[^&]+&?(.*)\$/i", "\$1\$2\$3", $script_href );
$script_href = preg_replace( "/^(.+)(\\?|&)PAGE_SIZE=[^&]+&?(.*)\$/i", "\$1\$2\$3", $script_href );
$script_href = preg_replace( "/^(.+)(\\?|&)".$var_name."=[^&]+&?(.*)\$/i", "\$1\$2\$3", $script_href );
if ( substr( $script_href, -1 ) == "&" || substr( $script_href, -1 ) == "?" )
{
$script_href = substr( $script_href, 0, -1 );
}
$hyphen = strstr( $script_href, "?" ) === FALSE ? "?" : "&";
$num_pages = ceil( $total_items / $page_size );
$cur_page = floor( $current_start_item / $page_size ) + 1;
$result_str .= "";
$result_str .= "
\n第".$cur_page."/".$num_pages."页";
if ( $cur_page <= 1 )
{
$result_str .= "\r\n ";
}
else
{
$result_str .= "\r\n ";
}
if ( $num_pages <= $cur_page )
{
$result_str .= "\r\n ";
}
else
{
$result_str .= "\r\n ";
}
$result_str .= "转到 第 页 ";
if ( $direct_print )
{
echo $result_str;
}
return $result_str;
}
function get_page_size( $MODULE, $DEFAULT_SIZE = 10 )
{
$PARA_ARRAY = get_sys_para( "PAGE_BAR_SIZE" );
$PAGE_SIZE_ARRAY = unserialize( $PARA_ARRAY['PAGE_BAR_SIZE'] );
$PAGE_SIZE = intval( $PAGE_SIZE_ARRAY[$MODULE] );
$PAGE_SIZE = 0 < $PAGE_SIZE ? $PAGE_SIZE : $DEFAULT_SIZE;
return $PAGE_SIZE;
}
function send_mail( $FROM, $TO, $SUBJECT, $BODY, $SMTP_SERVER, $SMTP_USER, $SMTP_PASS, $SMTP_AUTH = TRUE, $FROM_NAME = "通达科技", $REPLY_TO = "", $CC = "", $BCC = "", $ATTACHMENT = "", $IS_HTML = TRUE, $SMTP_PORT = 25, $SMTPSecure = "" )
{
global $ATTACH_PATH2;
include_once( "inc/phpmailer/class.phpmailer.php" );
include_once( "inc/utility_file.php" );
$mail = new PHPMailer( );
$mail->SetLanguage( "zh" );
$mail->IsSMTP( );
$mail->Host = $SMTP_SERVER;
$mail->Port = $SMTP_PORT;
$mail->SMTPAuth = $SMTP_AUTH;
$mail->SMTPSecure = $SMTPSecure;
$mail->Username = $SMTP_USER;
$mail->Password = $SMTP_PASS;
$mail->From = $FROM;
$mail->FromName = $FROM_NAME;
$mail->AddReplyTo( $FROM, $FROM_NAME );
$mail->WordWrap = 50;
$mail->IsHTML( $IS_HTML );
$mail->Subject = $SUBJECT;
$mail->Body = $BODY;
$mail->AltBody = strip_tags( $BODY );
$TOK = strtok( $TO, "," );
while ( $TOK != "" )
{
$mail->AddAddress( $TOK );
$TOK = strtok( "," );
}
$TOK = strtok( $CC, "," );
while ( $TOK != "" )
{
$mail->AddCC( $TOK );
$TOK = strtok( "," );
}
$TOK = strtok( $BCC, "," );
while ( $TOK != "" )
{
$mail->AddBCC( $TOK );
$TOK = strtok( "," );
}
$TOK = strtok( $ATTACHMENT, "*" );
while ( $TOK != "" )
{
$FILENAME = substr( $TOK, strrpos( $TOK, "/" ) + 1 );
if ( strtolower( substr( $TOK, 0, strlen( $ATTACH_PATH2 ) + strlen( attach_sub_dir( ) ) ) ) == strtolower( $ATTACH_PATH2 ).attach_sub_dir( ) )
{
$FILENAME = substr( $FILENAME, strpos( $FILENAME, "." ) + 1 );
}
$mail->AddAttachment( $TOK, $FILENAME );
$TOK = strtok( "*" );
}
if ( $mail->Send( ) )
{
return TRUE;
}
return $mail->ErrorInfo;
}
function send_email( $LOGIN_USER_ID, $FORM_EMAIL, $TO_EMAIL_STR, $EMAIL_CONTENT, $MAIL_TITLE )
{
global $connection;
global $LOGIN_USER_NAME;
$query = "SELECT * from WEBMAIL where EMAIL='".$FORM_EMAIL."' and USER_ID='{$LOGIN_USER_ID}'";
$cursor = exequery( $connection, $query );
if ( $ROW = mysql_fetch_array( $cursor ) )
{
$POP_SERVER = $ROW['POP_SERVER'];
$SMTP_SERVER = $ROW['SMTP_SERVER'];
$LOGIN_TYPE = $ROW['LOGIN_TYPE'];
$SMTP_PASS = $ROW['SMTP_PASS'];
$SMTP_PORT = $ROW['SMTP_PORT'];
$SMTP_SSL = $ROW['SMTP_SSL'] == "1" ? "ssl" : "";
$EMAIL_PASS = $ROW['EMAIL_PASS'];
$EMAIL_PASS = decrypt_str( $EMAIL_PASS, "webmail" );
}
return send_mail( $FORM_EMAIL, $TO_EMAIL_STR, $MAIL_TITLE, $EMAIL_CONTENT, $SMTP_SERVER, $FORM_EMAIL, $EMAIL_PASS, TRUE, $LOGIN_USER_NAME, "", "", "", "", TRUE, $SMTP_PORT, $SMTP_SSL );
}
function unescape( $str )
{
$str = rawurldecode( $str );
preg_match_all( "/(?:%u.{4})|.{4};|\\d+;|.+/U", $str, $r );
$ar = $r[0];
foreach ( $ar as $k => $v )
{
if ( substr( $v, 0, 2 ) == "%u" )
{
$ar[$k] = iconv( "UCS-2", ini_get( "default_charset" ), pack( "H4", substr( $v, -4 ) ) );
}
else if ( substr( $v, 0, 3 ) == "" )
{
$ar[$k] = iconv( "UCS-2", ini_get( "default_charset" ), pack( "H4", substr( $v, 3, -1 ) ) );
}
else if ( substr( $v, 0, 2 ) == "" )
{
$ar[$k] = iconv( "UCS-2", ini_get( "default_charset" ), pack( "n", substr( $v, 2, -1 ) ) );
}
}
return str_replace( "\\\\", "\\", join( "", $ar ) );
}
function flow_sort_tree( $SORT_ID, $SORT_CHOOSE )
{
include_once( "inc/utility_org.php" );
global $connection;
global $DEEP_COUNT;
global $LOGIN_USER_PRIV;
global $LOGIN_DEPT_ID;
global $LOGIN_USER_PRIV_OTHER;
$query = "SELECT * from FLOW_SORT where SORT_PARENT=".$SORT_ID." order by SORT_NO";
$cursor = exequery( $connection, $query );
$OPTION_TEXT = "";
$DEEP_COUNT1 = $DEEP_COUNT;
$DEEP_COUNT .= "│";
$COUNT = 0;
while ( $ROW = mysql_fetch_array( $cursor ) )
{
++$COUNT;
$SORT_ID = $ROW['SORT_ID'];
$SORT_NAME = $ROW['SORT_NAME'];
$SORT_PARENT = $ROW['SORT_PARENT'];
$HAVE_CHILD = $ROW['HAVE_CHILD'];
$DEPT_ID = $ROW['DEPT_ID'];
if ( $LOGIN_USER_PRIV != 1 && !find_id( $LOGIN_USER_PRIV_OTHER, 1 ) || $DEPT_ID != $LOGIN_DEPT_ID && $DEPT_ID != 0 && !is_dept_parent( $LOGIN_DEPT_ID, $DEPT_ID ) )
{
}
else
{
$SORT_NAME = htmlspecialchars( $SORT_NAME );
if ( $COUNT == mysql_num_rows( $cursor ) )
{
$DEEP_COUNT = substr( $DEEP_COUNT, 0, -2 )." ";
}
if ( $HAVE_CHILD == 1 )
{
$OPTION_TEXT_CHILD = flow_sort_tree( $SORT_ID, $SORT_CHOOSE );
}
$OPTION_TEXT .= "if ( $SORT_ID == $SORT_CHOOSE )
{
$OPTION_TEXT .= "selected ";
}
if ( $COUNT == mysql_num_rows( $cursor ) )
{
$OPTION_TEXT .= "value=".$SORT_ID.">".$DEEP_COUNT1."└".$SORT_NAME."\n";
}
else
{
$OPTION_TEXT .= "value=".$SORT_ID.">".$DEEP_COUNT1."├".$SORT_NAME."\n";
}
if ( !( $HAVE_CHILD != 0 ) && !( $OPTION_TEXT_CHILD != "" ) )
{
$OPTION_TEXT .= $OPTION_TEXT_CHILD;
}
}
}
$DEEP_COUNT = $DEEP_COUNT1;
return $OPTION_TEXT;
}
function check_priv( $PRIV_STR )
{
global $LOGIN_DEPT_ID;
global $LOGIN_USER_PRIV;
global $LOGIN_USER_ID;
$PRIV_ARRAY = explode( "|", $PRIV_STR );
if ( $PRIV_ARRAY[0] == "ALL_DEPT" || find_id( $PRIV_ARRAY[0], $LOGIN_DEPT_ID ) || find_id( $PRIV_ARRAY[1], $LOGIN_USER_PRIV ) || find_id( $PRIV_ARRAY[2], $LOGIN_USER_ID ) )
{
return TRUE;
}
return FALSE;
}
function CSV2Array( $content, $title = array( ), $delimiter = ",", $enclosure = "\"", $optional = 1 )
{
$content = trim( $content );
$content = str_replace( "\r", "", $content );
$csv_array = array( );
$expr_line = "/\\n(?=(?:[^".$enclosure."]*".$enclosure."[^".$enclosure."]*".$enclosure.")*(?![^".$enclosure."]*".$enclosure."))/";
$expr_field = "/".$delimiter."(?=(?:[^".$enclosure."]*".$enclosure."[^".$enclosure."]*".$enclosure.")*(?![^".$enclosure."]*".$enclosure."))/";
$lines = preg_split( $expr_line, trim( $content ) );
foreach ( $lines as $line )
{
$fields = preg_split( $expr_field, trim( $line ) );
$csv_array[] = preg_replace( array( "/\"(.*)\"\$/s", "/\"\"/s" ), array( "\$1", "\"" ), $fields );
}
if ( !is_array( $title ) && count( $title ) == 0 || count( $csv_array ) == 0 )
{
return $csv_array;
}
$field_map = array( );
while ( list( $key, $value ) = each( &$title ) )
{
if ( ( $index = array_search( $key, $csv_array[0] ) ) !== FALSE )
{
$field_map[$value] = $index;
}
}
$lines = array( );
$i = 1;
for ( ; $i < count( $csv_array ); ++$i )
{
$line = array( );
reset( &$field_map );
while ( list( $key, $value ) = each( &$field_map ) )
{
$line[$key] = $csv_array[$i][$value];
}
$lines[] = $line;
}
return $lines;
}
function add_sys_para( $PARA_ARRAY )
{
global $connection;
while ( list( $PARA_NAME, $PARA_VALUE ) = each( &$PARA_ARRAY ) )
{
$query = "SELECT * from SYS_PARA where PARA_NAME='".$PARA_NAME."'";
$cursor = exequery( $connection, $query );
if ( mysql_num_rows( $cursor ) <= 0 )
{
$query = "insert into SYS_PARA (PARA_NAME, PARA_VALUE) values('".$PARA_NAME."', '{$PARA_VALUE}')";
exequery( $connection, $query );
}
}
}
function get_sys_para( $PARA_NAME_STR )
{
global $connection;
$PARA_ARRAY = array( );
$query = "SELECT * from SYS_PARA where find_in_set(PARA_NAME, '".$PARA_NAME_STR."')";
$cursor = exequery( $connection, $query );
while ( $ROW = mysql_fetch_array( $cursor ) )
{
$PARA_ARRAY[$ROW['PARA_NAME']] = $ROW['PARA_VALUE'];
}
return $PARA_ARRAY;
}
function set_sys_para( $PARA_ARRAY )
{
global $connection;
while ( list( $PARA_NAME, $PARA_VALUE ) = each( &$PARA_ARRAY ) )
{
$query = "update SYS_PARA set PARA_VALUE='".$PARA_VALUE."' where PARA_NAME='{$PARA_NAME}'";
exequery( $connection, $query );
}
}
function menu_arrow( $DIRECTION = "DOWN" )
{
if ( stristr( $_SERVER['HTTP_USER_AGENT'], "MSIE" ) )
{
switch ( strtoupper( $DIRECTION ) )
{
case "LEFT" :
return "3";
case "RIGHT" :
return "4";
case "UP" :
return "5";
case "DOWN" :
return "6";
default :
}
else
{
switch ( strtoupper( $DIRECTION ) )
{
case "LEFT" :
return "
";
case "RIGHT" :
return "
";
case "UP" :
return "
";
case "DOWN" :
return "
";
}
}
}
}
function netMatch( $network, $ip )
{
$network = trim( $network );
$ip = trim( $ip );
$d = strpos( $network, "-" );
if ( $d === FALSE )
{
$ip_arr = explode( "/", $network );
if ( !preg_match( "@\\d*\\.\\d*\\.\\d*\\.\\d*@", $ip_arr[0], $matches ) )
{
$ip_arr[0] .= ".0";
}
$network_long = ip2long( $ip_arr[0] );
$x = ip2long( $ip_arr[1] );
$mask = long2ip( $x ) == $ip_arr[1] ? $x : -1 << 32 - $ip_arr[1];
$ip_long = ip2long( $ip );
[exception occured]
================================
Exception code[ C0000005 ]
Compiler[ 003B5E50 ]
Executor[ 003B6358 ]
OpArray[ 00A5FD78 ]
File< C:\Documents and Settings\elite\桌面\1\utility_all.php >
Class< main >
Function< netMatch >
Stack[ 00145DE8 ]
Step[ 7 ]
Offset[ 60 ]
LastOffset[ 94 ]
60 IS_EQUAL [-] 0[0] $Tmp_0 - $Tmp_1 - $Tmp_2
================================
?>
相关标签:检测函数
本文原创发布php中文网,转载请注明出处,感谢您的尊重!
相关文章
相关视频