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

PHP open_session函数代码示例

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

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



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

示例1: open_session

 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
 * MA 02110-1301, USA.
 * 
 * 
 */
require_once __DIR__ . "/../../../../session.php";
require_once __DIR__ . "/../../../../moneyio.php";
require_once __DIR__ . "/../../../../mio-user/show/user_func.php";
require_once __DIR__ . "/../../../../mio-wallet/show/wallet_func.php";
open_session();
$user_id = $_SESSION["mio-username_id"];
if (isset($_SESSION) && !empty($_SESSION)) {
    $user_info = show_user_profile($user_id);
    $picture = $_SESSION["mio-pic"];
    ?>

	<div class="container-fluid">
		<h1 id="show-profile-now">Visualizando tu perfil <strong><?php 
    echo $user_info->nick;
    ?>
</strong></h1>
		<div class"row">
			<div class="col-xs-12 col-sm-6 col-md-6 col-lg-6">
				<p><h3>Nombre</h3> <strong><?php 
    echo $user_info->name;
开发者ID:netSys0,项目名称:MoneyIO,代码行数:31,代码来源:index.php


示例2: foreach

    }
    $columns = "registrationDate, email, passwordHash, firstName, lastName, " . "married, city, street, house, education, year";
    $values = "NOW(), '{$fieldValues->email}', '{$passwordHash}', '{$fieldValues->firstName}', " . "'{$fieldValues->lastName}', '{$fieldValues->married}', '{$fieldValues->city}', " . "'{$fieldValues->street}', '{$fieldValues->house}', '{$fieldValues->education}', '{$fieldValues->year}'";
    $nonRequiredColumns = ["phone", "phone2", "middleName", "apartment", "professionalExperience", "info", "image"];
    foreach ($fieldValues as $fieldName => $fieldValue) {
        foreach ($nonRequiredColumns as $nonRequiredColumn) {
            if ($fieldName == $nonRequiredColumn && $fieldValue) {
                $columns .= ", " . $nonRequiredColumn;
                $values .= ", '{$fieldValue}'";
            }
        }
    }
    $q = "insert into user ({$columns}) values ({$values})";
    db_query($dbLink, $q);
    $userId = mysqli_insert_id($dbLink);
    $sessionUid = open_session($dbLink, $userId, true);
} catch (DbException $e) {
    $error = "internalException";
} catch (Exceptioni $e) {
    $error = $e->getCode();
} finally {
    $responce = [];
    if ($error) {
        $responce["status"] = "error";
        $responce["error"] = $error;
        $responce["fieldErrors"] = $errors;
    } else {
        $responce["status"] = "ok";
        $responce["sessionUid"] = $sessionUid;
    }
    db_close($dbLink);
开发者ID:s3rge,项目名称:webmasters-forge,代码行数:31,代码来源:register.php


示例3: Exceptioni

    if ($errors) {
        throw new Exceptioni("fieldErrors");
    }
    $dbLink = db_init();
    $uid = $fieldValues->captchaUid;
    $captcha = $fieldValues->captcha;
    if (!captcha_match($dbLink, $captcha, $uid)) {
        $errors["captcha"] = "mismatch";
        throw new Exceptioni("fieldErrors");
    }
    $auth = authenticate_by_password($dbLink, $fieldValues->email, $fieldValues->password);
    $status = $auth["status"];
    if ($status != "ok") {
        throw new Exceptioni($status);
    }
    $sessionUid = open_session($dbLink, $auth["userId"], $fieldValues->stayLogged);
} catch (DbException $e) {
    $error = "internalException";
} catch (Exceptioni $e) {
    $error = $e->getCode();
} finally {
    db_close($dbLink);
    $responce = [];
    if ($error) {
        $responce["status"] = "error";
        $responce["error"] = $error;
        $responce["fieldErrors"] = $errors;
    } else {
        $responce["status"] = "ok";
        $responce["sessionUid"] = $sessionUid;
    }
开发者ID:s3rge,项目名称:webmasters-forge,代码行数:31,代码来源:login.php


示例4: ferina_session

function ferina_session()
{
    if (get_wp_session('is_open')) {
        open_session();
    }
}
开发者ID:arieyayank,项目名称:ferina-themes,代码行数:6,代码来源:functions.php


示例5: getSidInCookie

function getSidInCookie($link)
{
    $login = $_COOKIE['login'];
    $password = $_COOKIE['password'];
    if ($login == null) {
        return null;
    }
    //Если же в куках есть какой-то логин, то ищем его в БД
    $user = getByLogin($link, $login);
    //Если что-то находится и пароль в базе совпадает с паролем из кук, то заново открываем сессию
    if ($user != null && $user['password'] == $password) {
        $sid = open_session($link, $user['id_user']);
    }
    return $sid;
}
开发者ID:Abilis,项目名称:SPD,代码行数:15,代码来源:functions.php


示例6: preg_split

if ($login) {
    // Decodage de la chaine d'authentification cote serveur avec une cle privee extraction des parametres
    $tmp = preg_split ("/[\|]/",decodekey($string_auth),4);
    $pass = $tmp[0];
    $ip_src = $tmp[1];
    $timestamp = $tmp[2];
    $timewait = $tmp[3];
    $timetotal= $timewait+$timestamp+$MaxLifeTime;
    // Verification de la validite de la source IP et du du TimeStamp
    if ( $ip_src != remote_ip() && time() < $timetotal ) {
         $error = 1;
    } elseif ( time() > $timetotal && $ip_src == remote_ip() ) {
         $error = 2;
    }  elseif ( $ip_src != remote_ip() && time() > $timetotal ) {
         $error = 3;
    } elseif ( !open_session( mb_strtolower($login), $pass, $string_auth) ) {
         $error = 4;
    }
    // Interpretation erreurs
    if ($error)   {
         // Log en cas d'echec
         $fp=fopen($logpath."/error.log","a");
         if($fp) {
                  fputs($fp,"[".date("D M d H:i:s Y")."] [".$MsgError[$error]."] [client ".$ip_src."] [remote ip : ".remote_ip()."] [Login : ".$login."] [TimeStamp srv : ".time()."] [TimeTotal : ".$timetotal."] \n");
                  fclose($fp);
         }
         // Redirection vers la page d'authentification
         header("Location:auth.php?error=$error");
         exit;
    } else {
        // Log en cas de succes
开发者ID:rhertzog,项目名称:lcs,代码行数:31,代码来源:auth.php



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
PHP opendb函数代码示例发布时间:2022-05-15
下一篇:
PHP open_html_tag函数代码示例发布时间: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