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


PHP captiveportal_disconnect_client函数代码示例

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


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

示例1: setTimeout

<head><title>Disconnecting...</title></head>
<body bgcolor="#435370">
<span style="color: #ffffff; font-family: Tahoma, Verdana, Arial, Helvetica, sans-serif; font-size: 11px;">
<b>You have been disconnected.</b>
</span>
<script type="text/javascript">
<!--
setTimeout('window.close();',5000) ;
-->
</script>
</body>
</html>

EOD;
    $safe_logout_id = SQLite3::escapeString($_POST['logout_id']);
    captiveportal_disconnect_client($safe_logout_id);
} else {
    if ($macfilter && $clientmac && captiveportal_blocked_mac($clientmac)) {
        captiveportal_logportalauth($clientmac, $clientmac, $clientip, "Blocked MAC address");
        if (!empty($cpcfg['blockedmacsurl'])) {
            portal_reply_page($cpcfg['blockedmacsurl'], "redir");
        } else {
            portal_reply_page($redirurl, "error", "This MAC address has been blocked");
        }
    } else {
        if ($clientmac && $radmac_enable && portal_mac_radius($clientmac, $clientip, $radiusctx)) {
            /* radius functions handle everything so we exit here since we're done */
        } else {
            if (portal_consume_passthrough_credit($clientmac)) {
                /* allow the client through if it had a pass-through credit for its MAC */
                captiveportal_logportalauth("unauthenticated", $clientmac, $clientip, "ACCEPT");
开发者ID:curtiszimmerman,项目名称:pfsense,代码行数:31,代码来源:index.php

示例2: TORT

	SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
	INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
	CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
	ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
	POSSIBILITY OF SUCH DAMAGE.
*/
require_once "guiconfig.inc";
require_once "functions.inc";
require_once "filter.inc";
require_once "captiveportal.inc";
$cpzone = $_GET['zone'];
if (isset($_POST['zone'])) {
    $cpzone = $_POST['zone'];
}
if ($_GET['act'] == "del" && !empty($cpzone)) {
    captiveportal_disconnect_client($_GET['id']);
    header("Location: status_captiveportal.php?zone={$cpzone}");
    exit;
}
$pgtitle = array(gettext("Status: Captive portal"));
$shortcut_section = "captiveportal";
if (!is_array($config['captiveportal'])) {
    $config['captiveportal'] = array();
}
$a_cp =& $config['captiveportal'];
if (count($a_cp) == 1) {
    $cpzone = current(array_keys($a_cp));
}
include "head.inc";
?>
开发者ID:hlcherub,项目名称:core,代码行数:30,代码来源:status_captiveportal.php

示例3: setTimeout

<html>
<head><title>Disconnecting...</title></head>
<body bgcolor="#435370">
<span style="color: #ffffff; font-family: Tahoma, Verdana, Arial, Helvetica, sans-serif; font-size: 11px;">
<b>You have been disconnected.</b>
</span>
<script type="text/javascript">
<!--
setTimeout('window.close();',5000) ;
-->
</script>
</body>
</html>

EOD;
    captiveportal_disconnect_client($_POST['logout_id']);
} else {
    if ($macfilter && $clientmac && captiveportal_blocked_mac($clientmac)) {
        captiveportal_logportalauth($clientmac, $clientmac, $clientip, "Blocked MAC address");
        if (!empty($cpcfg['blockedmacsurl'])) {
            portal_reply_page($cpcfg['blockedmacsurl'], "redir");
        } else {
            portal_reply_page($redirurl, "error", "This MAC address has been blocked");
        }
    } else {
        if ($clientmac && $radmac_enable && portal_mac_radius($clientmac, $clientip, $radiusctx)) {
            /* radius functions handle everything so we exit here since we're done */
        } else {
            if (portal_consume_passthrough_credit($clientmac)) {
                /* allow the client through if it had a pass-through credit for its MAC */
                captiveportal_logportalauth("unauthenticated", $clientmac, $clientip, "ACCEPT");
开发者ID:OptimWIFI,项目名称:pfsense,代码行数:31,代码来源:index.php

示例4: htmlspecialchars

 $mac_addr = $_POST['mac_addr'];
 $description = htmlspecialchars($_POST['description'], ENT_QUOTES, 'UTF-8');
 /* Check user whether if logged in captiveportal */
 if ($cpcontents) {
     foreach ($cpcontents as $cpcontent) {
         $cpent = explode(",", $cpcontent);
         $mac_dash = str_replace(':', '-', $cpent[3]);
         if ($mac_dash == $mac_addr) {
             $usession = $cpent[5];
             $ufound = true;
             break;
         }
     }
     /* Logout the user from captiveportal */
     if ($ufound) {
         captiveportal_disconnect_client($usession);
     }
 }
 if (!is_mac($mac_addr)) {
     $input_errors[] = "'{$mac_addr}' geçerli bir MAC adresi değil.";
     $macError = true;
 }
 if (strlen($description) > 60) {
     $input_errors[] = 'Açıklama uzunluğu 60 karakteri geçmemelidir.';
 }
 if (!$macError) {
     /* Check if MAC exists */
     $checkMac = $pdo->prepare("\n\t\t\t\tSELECT mac_addr\n\t\t\t\tFROM blocklist\n\t\t\t\tWHERE mac_addr = :mac\n\t\t\t");
     $checkMac->bindParam(':mac', $mac_addr);
     $checkMac->execute();
     $macFound = $checkMac->fetch(PDO::FETCH_ASSOC);
开发者ID:nuclewall,项目名称:nuclewall,代码行数:31,代码来源:hotspot_blocklist_edit.php


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