📄 no_pass.php
字号:
<?php
include_once( "inc/auth.php" );
include_once( "inc/utility_all.php" );
include_once( "inc/utility_org.php" );
if ( $DEPT_ID != 0 && !is_dept_priv( $DEPT_ID ) )
{
message( "错误", "您没有该部门的管理权限" );
button_back( );
exit( );
}
$query = "SELECT POST_PRIV from USER where USER_ID='".$LOGIN_USER_ID."'";
$cursor = exequery( $connection, $query );
if ( $ROW = mysql_fetch_array( $cursor ) )
{
$POST_PRIV = $ROW['POST_PRIV'];
}
if ( $POST_PRIV != "1" && $DEPT_ID == 0 )
{
message( "错误", "您没有全体部门的管理权限" );
button_back( );
exit( );
}
if ( $LOGIN_USER_PRIV != "1" )
{
$query = "SELECT PRIV_NO from USER_PRIV where USER_PRIV=".$LOGIN_USER_PRIV;
$cursor = exequery( $connection, $query );
if ( $ROW = mysql_fetch_array( $cursor ) )
{
$PRIV_NO = $ROW['PRIV_NO'];
}
$query = "SELECT USER_ID from USER,USER_PRIV where USER.USER_PRIV=USER_PRIV.USER_PRIV and USER_PRIV.PRIV_NO>'".$PRIV_NO."' and DEPT_ID={$DEPT_ID} and find_in_set(USER_ID,'{$USER_ID}')";
$cursor = exequery( $connection, $query );
$$USER_ID = "";
while ( $ROW = mysql_fetch_array( $cursor ) )
{
$USER_ID .= $ROW['USER_ID'].",";
}
}
$PASSWORD = crypt( "" );
$query = "update USER set PASSWORD='".$PASSWORD."', LAST_PASS_TIME='' where find_in_set(USER_ID,'{$USER_ID}')";
exequery( $connection, $query );
add_log( 11, $USER_ID, $LOGIN_USER_ID );
header( "location: user_new.php?DEPT_ID=".$DEPT_ID );
?>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -