• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP login_form函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: routing

/**
 * routing
 *
 * @since 1.2.1
 * @deprecated 2.0.0
 *
 * @package Redaxscript
 * @category Center
 * @author Henry Ruhs
 */
function routing()
{
    /* check token */
    if ($_POST && $_POST['token'] != TOKEN) {
        notification(l('error_occurred'), l('token_incorrect'), l('home'), ROOT);
        return;
    }
    /* call default post */
    $post_list = array('comment', 'login', 'password_reset', 'registration', 'reminder', 'search');
    foreach ($post_list as $value) {
        if ($_POST[$value . '_post'] && function_exists($value . '_post')) {
            call_user_func($value . '_post');
            return;
        }
    }
    /* general routing */
    switch (FIRST_PARAMETER) {
        case 'admin':
            if (LOGGED_IN == TOKEN) {
                admin_routing();
            } else {
                notification(l('error_occurred'), l('access_no'), l('login'), 'login');
            }
            return;
        case 'login':
            login_form();
            return;
        case 'logout':
            if (LOGGED_IN == TOKEN) {
                logout();
            } else {
                notification(l('error_occurred'), l('access_no'), l('login'), 'login');
            }
            return;
        case 'password_reset':
            if (s('reminder') == 1 && FIRST_SUB_PARAMETER && THIRD_PARAMETER) {
                password_reset_form();
            } else {
                notification(l('error_occurred'), l('access_no'), l('home'), ROOT);
            }
            return;
        case 'registration':
            if (s('registration')) {
                registration_form();
            } else {
                notification(l('error_occurred'), l('access_no'), l('home'), ROOT);
            }
            return;
        case 'reminder':
            if (s('reminder') == 1) {
                reminder_form();
            } else {
                notification(l('error_occurred'), l('access_no'), l('home'), ROOT);
            }
            return;
        default:
            contents();
            return;
    }
}
开发者ID:ITw3,项目名称:redaxscript,代码行数:70,代码来源:center.php


示例2: login

function login()
{
    global $vars, $day, $month, $year, $phpc_script;
    $html = tag('div');
    //Check password and username
    if (isset($vars['username'])) {
        $user = $vars['username'];
        $password = $vars['password'];
        if (login_user($user, $password)) {
            $string = "{$phpc_script}?";
            $arguments = array();
            if (!empty($vars['lastaction'])) {
                $arguments[] = "action={$vars['lastaction']}";
            }
            if (!empty($vars['year'])) {
                $arguments[] = "year={$year}";
            }
            if (!empty($vars['month'])) {
                $arguments[] = "month={$month}";
            }
            if (!empty($vars['day'])) {
                $arguments[] = "day={$day}";
            }
            redirect($string . implode('&', $arguments));
            return tag('h2', _('Logged in.'));
        }
        $html->add(tag('h2', _('Sorry, Invalid Login')));
    }
    $html->add(login_form());
    return $html;
}
开发者ID:noprom,项目名称:cryptdb,代码行数:31,代码来源:login.php


示例3: actionAdmin

 function actionAdmin($sName = '')
 {
     $GLOBALS['iAdminPage'] = 1;
     require_once BX_DIRECTORY_PATH_INC . 'admin_design.inc.php';
     $sUri = $this->_oConfig->getUri();
     check_logged();
     if (!@isAdmin()) {
         send_headers_page_changed();
         login_form("", 1);
         exit;
     }
     //--- Process actions ---//
     $mixedResultSettings = '';
     if (isset($_POST['save']) && isset($_POST['cat'])) {
         $mixedResultSettings = $this->setSettings($_POST);
     }
     //--- Process actions ---//
     $aDetailsBox = $this->getDetailsForm(BX_PMT_ADMINISTRATOR_ID);
     $aPendingOrdersBox = $this->getOrdersBlock(BX_PMT_ORDERS_TYPE_PENDING, BX_PMT_ADMINISTRATOR_ID);
     $aProcessedOrdersBox = $this->getOrdersBlock(BX_PMT_ORDERS_TYPE_PROCESSED, BX_PMT_ADMINISTRATOR_ID);
     $aSubscriptionOrdersBox = $this->getOrdersBlock(BX_PMT_ORDERS_TYPE_SUBSCRIPTION, BX_PMT_ADMINISTRATOR_ID);
     $sContent = '';
     $sContent .= $this->_oTemplate->getJsCode('orders', true);
     $sContent .= DesignBoxAdmin(_t($this->_sLangsPrefix . 'bcpt_settings'), $GLOBALS['oAdmTemplate']->parseHtmlByName('design_box_content.html', array('content' => $this->getSettingsForm($mixedResultSettings))));
     $sContent .= DesignBoxAdmin(_t($this->_sLangsPrefix . 'bcpt_details'), $GLOBALS['oAdmTemplate']->parseHtmlByName('design_box_content.html', array('content' => $aDetailsBox[0])));
     $sContent .= DesignBoxAdmin(_t($this->_sLangsPrefix . 'bcpt_pending_orders'), $aPendingOrdersBox[0]);
     $sContent .= DesignBoxAdmin(_t($this->_sLangsPrefix . 'bcpt_processed_orders'), $aProcessedOrdersBox[0]);
     $sContent .= DesignBoxAdmin(_t($this->_sLangsPrefix . 'bcpt_subscription_orders'), $aSubscriptionOrdersBox[0]);
     $sContent .= $this->getMoreWindow();
     $sContent .= $this->getManualOrderWindow();
     $this->_oTemplate->addAdminJs(array('orders.js', '_orders.js'));
     $this->_oTemplate->addAdminCss(array('orders.css', '_orders.css'));
     $aParams = array('title' => array('page' => _t($this->_sLangsPrefix . 'pcpt_administration')), 'content' => array('page_main_code' => $sContent));
     $this->_oTemplate->getPageCodeAdmin($aParams);
 }
开发者ID:toxalot,项目名称:dolphin.pro,代码行数:35,代码来源:BxPfwModule.php


示例4: login

function login()
{
    global $vars, $phpc_script;
    $html = tag('div');
    //Check password and username
    if (isset($vars['username'])) {
        $user = $vars['username'];
        if (!isset($vars['password'])) {
            message(__("No password specified."));
        } else {
            $password = $vars['password'];
            if (login_user($user, $password)) {
                $url = $phpc_script;
                if (!empty($vars['lasturl'])) {
                    $url .= '?' . urldecode($vars['lasturl']);
                }
                redirect($url);
                return tag('h2', __('Logged in.'));
            }
            $html->add(tag('h2', __('Sorry, Invalid Login')));
        }
    }
    $html->add(login_form());
    return $html;
}
开发者ID:hubandbob,项目名称:php-calendar,代码行数:25,代码来源:login.php


示例5: reg_form

function reg_form()
{
    $config = get_config();
    $disable_acct = parse_bool($config, "disable_account_creation");
    page_head("Register");
    start_table();
    echo "<tr><td>";
    echo "<h3>Create an account</h3>";
    create_account_form(0, "download.php");
    echo "</td><td>";
    echo "<h3>If you already have an account, log in</h3>";
    login_form("download.php");
    echo "</td></tr>";
    end_table();
    page_tail();
}
开发者ID:CalvinZhu,项目名称:boinc,代码行数:16,代码来源:register.php


示例6: actionAuth

 function actionAuth()
 {
     $oRequest = OAuth2\Request::createFromGlobals();
     $oResponse = new OAuth2\Response();
     // validate the authorize request
     if (!$this->_oServer->validateAuthorizeRequest($oRequest, $oResponse)) {
         $o = json_decode($oResponse->getResponseBody());
         $this->_oTemplate->pageError($o->error_description);
     }
     if (!isLogged()) {
         $_REQUEST['relocate'] = BX_DOL_URL_ROOT . $this->_oConfig->getBaseUri() . 'auth/?client_id=' . bx_get('client_id') . '&response_type=' . bx_get('response_type') . '&state=' . bx_get('state') . '&redirect_uri=' . bx_get('redirect_uri');
         login_form('', 0, false, 'disable_external_auth no_join_text');
         return;
     }
     if (empty($_POST)) {
         $this->_oTemplate->pageAuth($this->_oDb->getClientTitle(bx_get('client_id')));
     }
     $this->_oServer->handleAuthorizeRequest($oRequest, $oResponse, (bool) bx_get('confirm'), getLoggedId());
     $oResponse->send();
 }
开发者ID:Gotgot59,项目名称:dolphin.pro,代码行数:20,代码来源:BxOAuthModule.php


示例7: skin_ClientPage_Default

function skin_ClientPage_Default()
{
    global $adm_pass;
    global $adm_login;
    global $conf_skin;
    ////////////////////////////////////
    // Create the top banner and menu //
    ////////////////////////////////////
    $anotherTopBanner = anotherTopBanner("DTC");
    $anotherLanguageSelection = anotherLanguageSelection();
    $lang_sel = skin($conf_skin, $anotherLanguageSelection, _("Language"));
    if ($adm_login != "" && isset($adm_login) && $adm_pass != "" && isset($adm_pass)) {
        // Fetch all the user informations, Print a nice error message if failure.
        $admin = fetchAdmin($adm_login, $adm_pass);
        if (($error = $admin["err"]) != 0) {
            $mesg = $admin["mesg"];
            $login_txt = _("Error") . " {$error} " . _("fetching admin: ") . "<font color=\"red\">{$mesg}</font><br>";
            $login_txt .= login_form();
            $login_skined = skin($conf_skin, $login_txt, _("Client panel:") . " " . _("Login"));
            $mypage = layout_login_and_languages($login_skined, $lang_sel);
        } else {
            // Draw the html forms
            $HTML_admin_edit_data = drawAdminTools($admin);
            $mypage = $HTML_admin_edit_data;
        }
    } else {
        $login_txt = login_form();
        $login_skined = skin($conf_skin, $login_txt, _("Client panel:") . " " . _("Login"));
        $mypage = layout_login_and_languages($login_skined, $lang_sel);
    }
    // Output the result !
    if (!isset($anotherHilight)) {
        $anotherHilight = "";
    }
    echo anotherPage("Client:", "", $anotherHilight, makePreloads(), $anotherTopBanner, "", $mypage, anotherFooter(""));
}
开发者ID:jeremy-cayrasso,项目名称:dtc,代码行数:36,代码来源:default_layout.php


示例8: skin_ClientPage

function skin_ClientPage()
{
    global $adm_pass;
    global $adm_login;
    global $conf_skin;
    global $page_metacontent;
    global $meta;
    global $confirm_javascript;
    global $java_script;
    global $skinCssString;
    global $console;
    ////////////////////////////////////
    // Create the top banner and menu //
    ////////////////////////////////////
    $anotherTopBanner = anotherTopBanner("DTC");
    $anotherLanguageSelection = anotherLanguageSelection();
    $lang_sel = skin($conf_skin, $anotherLanguageSelection, _("Language"));
    if ($adm_login != "" && isset($adm_login) && $adm_pass != "" && isset($adm_pass)) {
        // Fetch all the user informations, Print a nice error message if failure.
        $admin = fetchAdmin($adm_login, $adm_pass);
        if (($error = $admin["err"]) != 0) {
            $mesg = $admin["mesg"];
            $login_txt = _("Error") . " {$error} " . _("fetching admin: ") . "<font color=\"red\">{$mesg}</font><br>";
            $login_txt .= login_form();
            $login_skined = skin($conf_skin, $login_txt, _("Client panel:") . " " . _("Login"));
            $mypage = layout_login_and_languages($login_skined, $lang_sel);
        } else {
            // Draw the html forms
            $HTML_admin_edit_data = '<div class="box_wnb_content_container">' . drawAdminTools($admin) . '</div>';
            $mypage = $HTML_admin_edit_data;
        }
    } else {
        $login_txt = login_form();
        $mypage = skin($conf_skin, $login_txt, _("Client panel:") . " " . _("Login"));
    }
    echo "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\">\n<html>\n<head>\n<title>DTC: Client: " . $_SERVER['SERVER_NAME'] . "</title>\n{$page_metacontent}\n{$meta}\n</head>\n<body id=\"page\" leftmargin=\"0\" topmargin=\"0\" marginwidth=\"0\" marginheight=\"0\">\n\t  <div id=\"outerwrapper\">\n    <div id=\"wrapper\">\n\n" . makePreloads() . "\n{$confirm_javascript}\n{$java_script}\n<link rel=\"stylesheet\" href=\"gfx/skin/bwoup/skin.css\" type=\"text/css\">\n{$skinCssString}\n\n" . anotherTopBanner("DTC", "yes") . "<div id=\"usernavbarreplacement\"></div>\n<div id=\"content\"><div class=\"box_wnb_content_container\">" . $mypage . "</div></div>\n<div id=\"footer\">" . anotherFooter("Footer content<br><br>") . "</div>\n    </div>\n</div>\n</body>\n</html>";
}
开发者ID:jeremy-cayrasso,项目名称:dtc,代码行数:37,代码来源:layout.php


示例9: member_auth

function member_auth($member = 0, $error_handle = true, $bAjx = false)
{
    global $site;
    switch ($member) {
        case 0:
            $mem = 'member';
            $login_page = BX_DOL_URL_ROOT . "member.php";
            $iRole = BX_DOL_ROLE_MEMBER;
            break;
        case 1:
            $mem = 'admin';
            $login_page = BX_DOL_URL_ADMIN . "index.php";
            $iRole = BX_DOL_ROLE_ADMIN;
            break;
    }
    if (empty($_COOKIE['memberID']) || !isset($_COOKIE['memberPassword'])) {
        if ($error_handle) {
            $text = _t("_LOGIN_REQUIRED_AE1");
            if ($member == 0) {
                $text .= "<br />" . _t("_LOGIN_REQUIRED_AE2", $site['images'], BX_DOL_URL_ROOT, $site['title']);
            }
            $bAjxMode = (isset($_SERVER['HTTP_X_REQUESTED_WITH']) and $_SERVER['HTTP_X_REQUESTED_WITH'] == 'XMLHttpRequest') ? true : false;
            if ($member = 1 && $bAjx == true) {
                $bAjxMode = true;
            }
            login_form($text, $member, $bAjxMode);
        }
        return false;
    }
    return check_login(process_pass_data($_COOKIE['memberID']), process_pass_data($_COOKIE['memberPassword']), $iRole, $error_handle);
}
开发者ID:newton27,项目名称:dolphin.pro,代码行数:31,代码来源:admin.inc.php


示例10: actionAdmin

 function actionAdmin($sName = '')
 {
     $GLOBALS['iAdminPage'] = 1;
     require_once BX_DIRECTORY_PATH_INC . 'admin_design.inc.php';
     $sUri = $this->_oConfig->getUri();
     check_logged();
     if (!@isAdmin()) {
         send_headers_page_changed();
         login_form("", 1);
         exit;
     }
     //--- Process actions ---//
     $mixedResultSettings = '';
     if (isset($_POST['save']) && isset($_POST['cat'])) {
         $mixedResultSettings = $this->setSettings($_POST);
     }
     if (isset($_POST[$sUri . '-publish'])) {
         $this->_actPublish($_POST[$sUri . '-ids'], true);
     } else {
         if (isset($_POST[$sUri . '-unpublish'])) {
             $this->_actPublish($_POST[$sUri . '-ids'], false);
         } else {
             if (isset($_POST[$sUri . '-featured'])) {
                 $this->_actFeatured($_POST[$sUri . '-ids'], true);
             } else {
                 if (isset($_POST[$sUri . '-unfeatured'])) {
                     $this->_actFeatured($_POST[$sUri . '-ids'], false);
                 } else {
                     if (isset($_POST[$sUri . '-delete'])) {
                         $this->_actDelete($_POST[$sUri . '-ids']);
                     }
                 }
             }
         }
     }
     //--- Process actions ---//
     //--- Get New/Edit form ---//
     $sPostForm = '';
     if (!empty($sName)) {
         $sPostForm = $this->serviceEditBlock(process_db_input($sName, BX_TAGS_STRIP));
     } else {
         if (isset($_POST['id'])) {
             $sPostForm = $this->serviceEditBlock((int) $_POST['id']);
         } else {
             $sPostForm = $this->servicePostBlock();
         }
     }
     //--- Get New/Edit form ---//
     $sFilterValue = '';
     if (isset($_GET[$sUri . '-filter'])) {
         $sFilterValue = process_db_input($_GET[$sUri . '-filter'], BX_TAGS_STRIP);
     }
     $sContent = DesignBoxAdmin(_t('_' . $sUri . '_bcaption_settings'), $GLOBALS['oAdmTemplate']->parseHtmlByName('design_box_content.html', array('content' => $this->getSettingsForm($mixedResultSettings))));
     $sContent .= DesignBoxAdmin(_t('_' . $sUri . '_bcaption_post'), $sPostForm);
     $sContent .= DesignBoxAdmin(_t('_' . $sUri . '_bcaption_all'), $this->serviceAdminBlock(0, 0, $sFilterValue));
     $aParams = array('title' => array('page' => _t('_' . $sUri . '_pcaption_admin')), 'content' => array('page_main_code' => $sContent));
     $this->_oTemplate->getPageCodeAdmin($aParams);
 }
开发者ID:Prashank25,项目名称:dolphin.pro,代码行数:58,代码来源:BxDolTextModule.php


示例11: logout

/*
	회원관리 (로그인)
	2001.06 by Jungjoon Oh
*/
require "mem-lib.php";
require "db-lib.php";
if (!$url) {
    $url = $home_url;
}
if ($logout == 1) {
    logout($url);
} elseif ($id && $passwd) {
    login($id, $passwd, $url);
} else {
    login_form($url);
}
exit;
function logout($url)
{
    /* 쿠키 삭제 */
    setcookie("MemberID", "", time() - 3600);
    print_alert("로그아웃되었습니다.    ", "url|{$url}");
    exit;
}
function login($id, $passwd, $url)
{
    $dbh = dbconnect();
    $query = "select mem_id,mem_pw from member_data where mem_id='{$id}'";
    $sth = dbquery($dbh, $query);
    if (!$sth) {
开发者ID:puchon,项目名称:php4-book,代码行数:30,代码来源:login.php


示例12: bx_import

<?php

/**
 * Copyright (c) BoonEx Pty Limited - http://www.boonex.com/
 * CC-BY License - http://creativecommons.org/licenses/by/3.0/
 */
require_once BX_DIRECTORY_PATH_INC . 'admin_design.inc.php';
bx_import('Module', $aModule);
global $_page;
global $_page_cont;
$iIndex = 9;
$_page['name_index'] = $iIndex;
$_page['header'] = _t('_bx_pageac');
if (!@isAdmin()) {
    send_headers_page_changed();
    login_form("", 1);
    exit;
}
$oModule = new BxPageACModule($aModule);
$_page_cont[$iIndex]['page_main_code'] = $oModule->_oTemplate->getTabs();
PageCodeAdmin();
开发者ID:Prashank25,项目名称:dolphin.pro,代码行数:21,代码来源:admin.php


示例13: getId

            $iRecipientID = getId($vRecipientID);
            if ($iRecipientID) {
                $sOutputHtml = get_member_thumbnail($iRecipientID, 'none');
            }
            break;
    }
    // try to define the callback function name ;
    if (isset($_GET['callback_function']) and in_array($_GET['callback_function'], $aCallbackFunctions)) {
        if (method_exists($oMailBox, $_GET['callback_function'])) {
            $sOutputHtml = $oMailBox->{$_GET['callback_function']}();
        }
    }
    header('Content-Type: text/html; charset=utf-8');
    echo $sOutputHtml;
    exit;
}
// ** prepare to output page in normal mode ;
$sPageTitle = _t('_Mailbox');
$_page['name_index'] = 7;
$_page['header'] = $sPageTitle;
$_page['header_text'] = $sPageTitle;
$_page['js_name'] = $oMailBox->getJs();
$_page['css_name'] = $oMailBox->getCss();
$aVars = array('BaseUri' => BX_DOL_URL_ROOT);
$GLOBALS['oTopMenu']->setCustomSubActions($aVars, 'Mailbox', false);
if (!$aMailBoxSettings['member_id']) {
    login_form(_t("_LOGIN_OBSOLETE"), 0, false);
}
$_ni = $_page['name_index'];
$_page_cont[$_ni]['page_main_code'] = $oMailBox->getCode();
PageCode();
开发者ID:toxalot,项目名称:dolphin.pro,代码行数:31,代码来源:mail.php


示例14: header

if (!session_start()) {
    // If the session couldn't start, present an error
    header("Location: error.php");
    exit;
}
// Check to see if the user has already logged in
$loggedIn = empty($_SESSION['loggedin']) ? false : $_SESSION['loggedin'];
if ($loggedIn) {
    header("Location: home.php");
    exit;
}
$action = empty($_POST['action']) ? '' : $_POST['action'];
if ($action == "do_login") {
    handle_login();
} else {
    login_form();
}
function handle_login()
{
    $username = $_POST['username'];
    $password = $_POST['password'];
    require_once 'db.conf';
    $mysqli = new mysqli($dbhost, $dbuser, $dbpass, $dbname);
    if ($mysqli->connect_error) {
        $error = 'Error: ' . $mysqli->connect_errno . ' ' . $mysqli->connect_error;
        require "login_form.php";
        exit;
    }
    $username = $mysqli->real_escape_string($username);
    $password = $mysqli->real_escape_string($password);
    $query = "SELECT * FROM users WHERE username = '{$username}' AND password = '{$password}'";
开发者ID:Jrf5x8,项目名称:tennis,代码行数:31,代码来源:login.php


示例15: opendir

    $dp = opendir($dir);
    while ($subdir = readdir($dp)) {
        if ($subdir != '.' && $subdir != '..' && is_dir($dir . "/" . $subdir)) {
            $action_file = $dir . "/" . $subdir . "/" . $action . ".php";
            if (file_exists($action_file)) {
                require_once $action_file;
                $html .= $action();
            }
        }
    }
    //or show login form
} else {
    if (@$_GET['auth'] == 'login') {
        //Login data is correct
        if (check_login()) {
            $_SESSION['user'] = @$_POST['user'];
            header("location: /engine.php?action=start");
            //or isn't correct
        } else {
            $html .= login_form("<span style='color:red'>Ошибка в логине или пароле!</span><br/>");
        }
    } else {
        //Перебрасываем на форму входа в систему
        //echo generate_hash("", "");
        $html .= login_form();
    }
}
//Add footer
$html .= template_get('footer');
//Show HTML flow
echo $html;
开发者ID:dwbru,项目名称:guide-notify,代码行数:31,代码来源:engine.php


示例16: array

$_page['css_name'] = array('member_panel.css', 'categories.css', 'alert.css');
$_page['extra_js'] = "<script type=\"text/javascript\">urlIconLoading = \"" . getTemplateIcon('loading.gif') . "\";\n\t\$(document).ready( function() {\n\t\t\n\t\tvar sSendUrl = '" . $site['url'] . "alerts.php';\n\t\t\n\t\t\$('input', '#alertsMenu').click(function(){\n\t\t\tvar sQuery = \$('input', '#alertsMenu').serialize();\n\t\t\t\$.post(sSendUrl, sQuery, function(data) {\n\t\t\t\t\$('#alertsView').html(data);\n\t\t\t}\n\t\t);\n\t\t\n\t} );})\n\t</script>";
$_page['header'] = _t("_My Account");
// --------------- GET/POST actions
$member['ID'] = process_pass_data(empty($_POST['ID']) ? '' : $_POST['ID']);
$member['Password'] = process_pass_data(empty($_POST['Password']) ? '' : $_POST['Password']);
$bAjxMode = (isset($_SERVER['HTTP_X_REQUESTED_WITH']) and $_SERVER['HTTP_X_REQUESTED_WITH'] == 'XMLHttpRequest') ? true : false;
if (!(isset($_POST['ID']) && $_POST['ID'] && isset($_POST['Password']) && $_POST['Password']) && (!empty($_COOKIE['memberID']) && $_COOKIE['memberID'] && $_COOKIE['memberPassword'])) {
    if (!($logged['member'] = member_auth(0, false))) {
        login_form(_t("_LOGIN_OBSOLETE"), 0, $bAjxMode);
    }
} else {
    if (!isset($_POST['ID']) && !isset($_POST['Password'])) {
        // this is dynamic page -  send headers to not cache this page
        send_headers_page_changed();
        login_form('', 0, $bAjxMode);
    } else {
        require_once BX_DIRECTORY_PATH_CLASSES . 'BxDolAlerts.php';
        $oZ = new BxDolAlerts('profile', 'before_login', 0, 0, array('login' => $member['ID'], 'password' => $member['Password'], 'ip' => getVisitorIP()));
        $oZ->alert();
        $member['ID'] = getID($member['ID']);
        // Ajaxy check
        if ($bAjxMode) {
            echo check_password($member['ID'], $member['Password'], BX_DOL_ROLE_MEMBER, false) ? 'OK' : 'Fail';
            exit;
        }
        // Check if ID and Password are correct (addslashes already inside)
        if (check_password($member['ID'], $member['Password'])) {
            $p_arr = bx_login($member['ID'], (bool) $_POST['rememberMe']);
            //Storing IP Address
            if (getParam('enable_member_store_ip') == 'on') {
开发者ID:dalinhuang,项目名称:shopexts,代码行数:31,代码来源:member.php


示例17: member_auth

function member_auth($member = 0, $error_handle = true, $bAjx = false)
{
    global $site;
    global $dir;
    global $tab;
    global $logged;
    switch ($member) {
        case 0:
            $mem = 'member';
            $table = 'Profiles';
            $login_page = "{$site['url']}member.php";
            break;
        case 1:
            $mem = 'admin';
            $table = 'Admins';
            $login_page = "{$site['url_admin']}index.php";
            break;
        case 2:
            $mem = 'aff';
            $table = 'aff';
            $login_page = "{$site['url_aff']}index.php";
            break;
            //
        //
        case 3:
            $mem = 'moderator';
            $table = 'moderators';
            $login_page = "{$site['url']}moderators/index.php";
            break;
    }
    if (!$_COOKIE[$mem . "ID"] || !$_COOKIE[$mem . "Password"]) {
        if ($error_handle) {
            $text = _t("_LOGIN_REQUIRED_AE1");
            if (!$member) {
                $text .= "<br />" . _t("_LOGIN_REQUIRED_AE2", $site['images'], $site['url'], $site['title']);
            }
            $bAjxMode = (isset($_SERVER['HTTP_X_REQUESTED_WITH']) and $_SERVER['HTTP_X_REQUESTED_WITH'] == 'XMLHttpRequest') ? true : false;
            if ($member = 1 && $bAjx == true) {
                $bAjxMode = true;
            }
            login_form($text, $member, $bAjxMode);
        }
        return false;
    }
    return check_login($_COOKIE[$mem . 'ID'], $_COOKIE[$mem . 'Password'], $table, $error_handle);
}
开发者ID:BackupTheBerlios,项目名称:dolphin-dwbn-svn,代码行数:46,代码来源:admin.inc.php


示例18: send_headers_page_changed

Welcome back, <b><?php 
        echo $_POST['ID'];
        ?>
</b>. Logging you in...
<script language="Javascript">location.href='<?php 
        echo $_SERVER[PHP_SELF];
        ?>
';</script>
<?php 
        exit;
    }
}
if (!$_COOKIE['moderatorID'] || !$_COOKIE['moderatorPassword']) {
    send_headers_page_changed();
    // Display log in form if user is not logged in.
    login_form('', 3);
}
$logged['moderator'] = member_auth(3);
$_page['header'] = 'Moderator Panel';
TopCodeAdmin();
// Get number of total registered members.
$total_members = db_arr('SELECT COUNT(*) FROM `Profiles`;');
$total_members = $total_members[0];
//
$status_arr[0] = "Unconfirmed";
$status_arr[1] = "Approval";
$status_arr[2] = "Active";
$status_arr[3] = "Rejected";
$status_arr[4] = "Suspended";
ContentBlockHead("Total registered members");
?>
开发者ID:BackupTheBerlios,项目名称:dolphin-dwbn-svn,代码行数:31,代码来源:index.php


示例19: process_login

function process_login()
{
    global $label;
    $session_duration = ini_get("session.gc_maxlifetime");
    if ($session_duration == '') {
        $session_duration = 60 * 20;
    }
    $now = gmdate("Y-m-d H:i:s");
    $sql = "UPDATE `users` SET `logout_date`='{$now}' WHERE UNIX_TIMESTAMP(DATE_SUB('{$now}', INTERVAL {$session_duration} SECOND)) > UNIX_TIMESTAMP(last_request_time) AND (`logout_date` ='0000-00-00 00:00:00')";
    mysql_query($sql) or die($sql . mysql_error());
    if (!is_logged_in() || $_SESSION['MDS_Domain'] != "ADVERTISER") {
        ?>

	<html>
   <head>
	<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
   <title><?php 
        echo $label["advertiser_loginform_title"];
        ?>
</title>

   <link rel="stylesheet" type="text/css" href="style.css" />

   </head>
   <body>
   <p>&nbsp</p>
  <p>
   <center><img alt="" src="<?php 
        echo SITE_LOGO_URL;
        ?>
"/> <br>
   </p>
   <p>&nbsp</p>
   <table width="80%" cellpadding=5 border=1 style="border-collapse: collapse; border-style:solid; border-color:#E8E8E8">

	<tr>
	<td width="50%" valign="top" ><center><h3><?php 
        echo $label["advertiser_section_heading"];
        ?>
</h3></center>
		<?php 
        login_form();
        ?>

</td>
<?php 
        if (USE_AJAX == 'SIMPLE') {
            ?>
<td valign=top>
<center>
<h3><?php 
            echo $label["advertiser_section_newusr"];
            if (USE_AJAX == 'SIMPLE') {
                $order_page = 'order_pixels.php';
            } else {
                $order_page = 'select.php';
            }
            ?>
</h3>
<a class="big_link" href="<?php 
            echo $order_page;
            ?>
"><?php 
            echo $label["adv_login_new_link"];
            ?>
</a> <br><br><?php 
            echo $label["advertiser_go_buy_now"];
            ?>
      <h3 ></h3></center> 
</td>
<?php 
        }
        ?>
</tr>
</table>
<?php 
        echo_copyright();
        ?>
<!-- This software is free on the condition that you do not remove any copyright messages as part of the license. If you want to remove these, please see http://www.milliondollarscript.com/remove.html -->
<body>

		</body>

	 </html>

		<?php 
        die;
    } else {
        // update last_request_time
        $now = gmdate("Y-m-d H:i:s");
        $sql = "UPDATE `users` SET `last_request_time`='{$now}', logout_date='0' WHERE `Username`='" . $_SESSION['MDS_Username'] . "'";
        mysql_query($sql) or die($sql . mysql_error());
    }
}
开发者ID:mix376,项目名称:MillionDollarScript,代码行数:94,代码来源:login_functions.php


示例20: actionAdmin

 function actionAdmin()
 {
     $GLOBALS['iAdminPage'] = 1;
     require_once BX_DIRECTORY_PATH_INC . 'admin_design.inc.php';
     $sUri = $this->_oConfig->getUri();
     check_logged();
     if (!@isAdmin()) {
         send_headers_page_changed();
         login_form("", 1);
         exit;
     }
     //--- Process actions ---//
     $mixedResultSettings = '';
     if (isset($_POST['save']) && isset($_POST['cat'])) {
         $mixedResultSettings = $this->setSettings($_POST);
     }
     //--- Process actions ---//
     $sContent = DesignBoxAdmin(_t('_' . $sUri . '_bcaption_settings'), $GLOBALS['oAdmTemplate']->parseHtmlByName('design_box_content.html', array('content' => $this->getSettingsForm($mixedResultSettings))));
     $aParams = array('title' => array('page' => _t('_membership_pcaption_admin')), 'content' => array('page_main_code' => $sContent));
     $this->_oTemplate->getPageCodeAdmin($aParams);
 }
开发者ID:nsxa,项目名称:dolphin.pro,代码行数:21,代码来源:BxMbpModule.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP login_forum_box函数代码示例发布时间:2022-05-15
下一篇:
PHP login_footer函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap