当前位置: 首页>>代码示例>>PHP>>正文


PHP user_authorization函数代码示例

本文整理汇总了PHP中user_authorization函数的典型用法代码示例。如果您正苦于以下问题:PHP user_authorization函数的具体用法?PHP user_authorization怎么用?PHP user_authorization使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了user_authorization函数的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: preg_replace

    $PHP_AUTH_USER = preg_replace("/'|\"|\\\\|;/", "", $PHP_AUTH_USER);
}
$stmt = "SELECT selected_language from vicidial_users where user='{$PHP_AUTH_USER}';";
if ($DB) {
    echo "|{$stmt}|\n";
}
$rslt = mysql_to_mysqli($stmt, $link);
$sl_ct = mysqli_num_rows($rslt);
if ($sl_ct > 0) {
    $row = mysqli_fetch_row($rslt);
    $VUselected_language = $row[0];
}
$auth = 0;
$reports_auth = 0;
$admin_auth = 0;
$auth_message = user_authorization($PHP_AUTH_USER, $PHP_AUTH_PW, 'REPORTS', 0);
if ($auth_message == 'GOOD') {
    $auth = 1;
}
if ($auth > 0) {
    $stmt = "SELECT count(*) from vicidial_users where user='{$PHP_AUTH_USER}' and user_level > 7 and view_reports='1';";
    if ($DB) {
        echo "|{$stmt}|\n";
    }
    $rslt = mysql_to_mysqli($stmt, $link);
    $row = mysqli_fetch_row($rslt);
    $admin_auth = $row[0];
    $stmt = "SELECT count(*) from vicidial_users where user='{$PHP_AUTH_USER}' and user_level > 6 and view_reports='1';";
    if ($DB) {
        echo "|{$stmt}|\n";
    }
开发者ID:vultuk,项目名称:VicidialSubversion,代码行数:31,代码来源:AST_timeonVDADall.php

示例2: preg_replace

    $SSagent_debug_logging = $row[3];
}
##### END SETTINGS LOOKUP #####
###########################################
if ($non_latin < 1) {
    $user = preg_replace("/[^-_0-9a-zA-Z]/", "", $user);
}
if (strlen($SSagent_debug_logging) > 1) {
    if ($SSagent_debug_logging == "{$user}") {
        $SSagent_debug_logging = 1;
    } else {
        $SSagent_debug_logging = 0;
    }
}
$auth = 0;
$auth_message = user_authorization($user, $pass, '', 0, 1, 0);
if ($auth_message == 'GOOD') {
    $auth = 1;
}
if (strlen($user) < 2 or strlen($pass) < 2 or $auth == 0) {
    echo _QXZ("Invalid Username/Password") . ": |{$user}|{$pass}|{$auth_message}|\n";
    exit;
} else {
    if (strlen($server_ip) < 6 or !isset($server_ip) or (strlen($session_name) < 12 or !isset($session_name))) {
        echo _QXZ("Invalid server_ip") . ": |{$server_ip}|  or  Invalid session_name: |{$session_name}|\n";
        #underscore
        exit;
    } else {
        $stmt = "SELECT count(*) from web_client_sessions where session_name='{$session_name}' and server_ip='{$server_ip}';";
        if ($DB) {
            echo "|{$stmt}|\n";
开发者ID:vultuk,项目名称:VicidialSubversion,代码行数:31,代码来源:active_list_refresh.php

示例3: mysql_to_mysqli

    echo "|{$stmt}|\n";
}
$rslt = mysql_to_mysqli($stmt, $link);
$sl_ct = mysqli_num_rows($rslt);
if ($sl_ct > 0) {
    $row = mysqli_fetch_row($rslt);
    $VUselected_language = $row[0];
}
if ($callcard_enabled < 1) {
    echo _QXZ("ERROR: CallCard is not active on this system") . "\n";
    exit;
}
$auth = 0;
$reports_auth = 0;
$admin_auth = 0;
$auth_message = user_authorization($USER, $PASS, '', 1);
if ($auth_message == 'GOOD') {
    $auth = 1;
}
if ($auth > 0) {
    $stmt = "SELECT count(*) from vicidial_users where user='{$USER}' and user_level > 7 and view_reports='1';";
    if ($DB) {
        echo "|{$stmt}|\n";
    }
    $rslt = mysql_to_mysqli($stmt, $link);
    $row = mysqli_fetch_row($rslt);
    $admin_auth = $row[0];
    $stmt = "SELECT count(*) from vicidial_users where user='{$USER}' and user_level > 6 and view_reports='1';";
    if ($DB) {
        echo "|{$stmt}|\n";
    }
开发者ID:vultuk,项目名称:VicidialSubversion,代码行数:31,代码来源:callcard_admin.php

示例4: api_log

################################################################################
### version - show version, date, time and time zone information for the API
################################################################################
if ($function == 'version') {
    $data = "VERSION: {$version}|BUILD: {$build}|DATE: {$NOW_TIME}|EPOCH: {$StarTtime}|DST: {$isdst}|TZ: {$DBSERVER_GMT}|TZNOW: {$SERVER_GMT}|";
    $result = 'SUCCESS';
    echo "{$data}\n";
    api_log($link, $api_logging, $api_script, $user, $agent_user, $function, $value, $result, $result_reason, $source, $data);
    exit;
}
################################################################################
### END version
################################################################################
##### BEGIN user authentication for all functions below #####
$auth = 0;
$auth_message = user_authorization($user, $pass, 'REPORTS', 1);
if ($auth_message == 'GOOD') {
    $auth = 1;
}
if ($auth < 1) {
    $VDdisplayMESSAGE = "ERROR: Login incorrect, please try again";
    if ($auth_message == 'LOCK') {
        $VDdisplayMESSAGE = "ERROR: Too many login attempts, try again in 15 minutes";
        Header("Content-type: text/html; charset=utf-8");
        echo "{$VDdisplayMESSAGE}: |{$user}|{$auth_message}|\n";
        exit;
    }
    Header("Content-type: text/html; charset=utf-8");
    echo "{$VDdisplayMESSAGE}: |{$user}|{$pass}|{$auth_message}|\n";
    exit;
}
开发者ID:vultuk,项目名称:VicidialSubversion,代码行数:31,代码来源:non_agent_api.php

示例5: date

$NOW_TIME = date("Y-m-d H:i:s");
$REC_TIME = date("Ymd-His");
$FILE_datetime = $STARTtime;
$ext_context = 'demo';
$stmt = "SELECT selected_language from vicidial_users where user='{$PHP_AUTH_USER}';";
if ($DB) {
    echo "|{$stmt}|\n";
}
$rslt = mysql_to_mysqli($stmt, $link);
$sl_ct = mysqli_num_rows($rslt);
if ($sl_ct > 0) {
    $row = mysqli_fetch_row($rslt);
    $VUselected_language = $row[0];
}
$auth = 0;
$auth_message = user_authorization($PHP_AUTH_USER, $PHP_AUTH_PW, 'QC', 1);
if ($auth_message == 'GOOD') {
    $auth = 1;
}
if ($auth < 1) {
    $VDdisplayMESSAGE = _QXZ("Login incorrect, please try again");
    if ($auth_message == 'LOCK') {
        $VDdisplayMESSAGE = _QXZ("Too many login attempts, try again in 15 minutes");
        Header("Content-type: text/html; charset=utf-8");
        echo "{$VDdisplayMESSAGE}: |{$PHP_AUTH_USER}|{$auth_message}|\n";
        exit;
    }
    Header("WWW-Authenticate: Basic realm=\"CONTACT-CENTER-ADMIN\"");
    Header("HTTP/1.0 401 Unauthorized");
    echo "{$VDdisplayMESSAGE}: |{$PHP_AUTH_USER}|{$PHP_AUTH_PW}|{$auth_message}|\n";
    exit;
开发者ID:vultuk,项目名称:VicidialSubversion,代码行数:31,代码来源:closer_popup.php

示例6: user_authorization

}
# default optional vars if not set
if (!isset($format)) {
    $format = "text";
}
if ($format == 'debug') {
    $DB = 1;
}
if (!isset($ACTION)) {
    $ACTION = "refresh";
}
if (!isset($query_date)) {
    $query_date = $NOW_DATE;
}
$auth = 0;
$auth_message = user_authorization($user, $pass, '', 0, $bcrypt, 0);
if ($auth_message == 'GOOD') {
    $auth = 1;
}
$stmt = "SELECT count(*) from vicidial_users where user='{$user}' and ( (modify_leads='1') or (qc_enabled='1') );";
if ($DB) {
    echo "|{$stmt}|\n";
}
$rslt = mysql_to_mysqli($stmt, $link);
$row = mysqli_fetch_row($rslt);
$VUmodify = $row[0];
$stmt = "SELECT count(*) from vicidial_live_agents where user='{$user}';";
if ($DB) {
    echo "|{$stmt}|\n";
}
$rslt = mysql_to_mysqli($stmt, $link);
开发者ID:vultuk,项目名称:VicidialSubversion,代码行数:31,代码来源:vdc_form_display.php

示例7: _QXZ

    echo "<tr><td align=\"left\" colspan=\"2\"><font size=\"1\"><br />" . _QXZ("VERSION:") . " {$version} &nbsp; &nbsp; &nbsp; " . _QXZ("BUILD:") . " {$build}</font></td></tr>\n";
    echo "</table></center>\n";
    echo "</form>\n\n";
    echo "</body>\n\n";
    echo "</html>\n\n";
    exit;
} else {
    if ($WeBRooTWritablE > 0) {
        $fp = fopen("./vicidial_auth_entries.txt", "a");
    }
    $VDloginDISPLAY = 0;
    if (strlen($VD_login) < 2 or strlen($VD_pass) < 2) {
        $VDloginDISPLAY = 1;
    } else {
        $auth = 0;
        $auth_message = user_authorization($VD_login, $VD_pass, '', 1, 0, 0);
        if ($auth_message == 'GOOD') {
            $auth = 1;
        }
        if ($auth > 0) {
            ##### grab the full name of the agent
            $stmt = "SELECT full_name,user_level,hotkeys_active,agent_choose_ingroups,scheduled_callbacks,agentonly_callbacks,agentcall_manual,vicidial_recording,vicidial_transfers,closer_default_blended,user_group,vicidial_recording_override,alter_custphone_override,alert_enabled,agent_shift_enforcement_override,shift_override_flag,allow_alerts,closer_campaigns,agent_choose_territories,custom_one,custom_two,custom_three,custom_four,custom_five,agent_call_log_view_override,agent_choose_blended,agent_lead_search_override from vicidial_users where user='{$VD_login}';";
            $rslt = mysql_to_mysqli($stmt, $link);
            if ($mel > 0) {
                mysql_error_logging($NOW_TIME, $link, $mel, $stmt, '09004', $VD_login, $server_ip, $session_name, $one_mysql_log);
            }
            $row = mysqli_fetch_row($rslt);
            $LOGfullname = $row[0];
            $user_level = $row[1];
            $VU_user_group = $row[10];
            ### Gather timeclock and shift enforcement restriction settings
开发者ID:vultuk,项目名称:VicidialSubversion,代码行数:31,代码来源:phone_only.php


注:本文中的user_authorization函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。