本文整理汇总了PHP中Accounts::SessionLive方法的典型用法代码示例。如果您正苦于以下问题:PHP Accounts::SessionLive方法的具体用法?PHP Accounts::SessionLive怎么用?PHP Accounts::SessionLive使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Accounts
的用法示例。
在下文中一共展示了Accounts::SessionLive方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: Accounts
<?php
$accounts = new Accounts();
if ($accounts->SessionLive() == true) {
?>
<div id="login-modal" class="modal fade" role="dialog">
<div class="modal-dialog">
<!-- Modal content-->
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">×</button>
<h4 class="modal-title">Your Profile</h4>
</div>
<div class="modal-body">
User Profile Under Development
<br />
<img class='img-thumbnail'><br />
Username: <?php
echo $accounts->UserDetails("username", SessionID());
?>
<br />
Email: <?php
echo $accounts->UserDetails("email", SessionID());
?>
<br />
Member Since: <?php
echo $accounts->UserDetails("joindate", SessionID());
?>
<br />
示例2: Accounts
<?php
DEFINE("TITLE", "Login");
$accounts = new Accounts();
if ($accounts->SessionLive() == false) {
?>
<div class="col-xs-6 col-xs-offset-3">
<div class="panel panel-info">
<div class="panel-heading">
Login to <?php
echo GUILD_NAME;
?>
</div>
<div class="panel-body">
<form id="login_default" method="POST">
<input type="text" class="form-control" id="login_username" placeholder="Username"><br />
<input type="password" class="form-control" id="login_password" placeholder="Password"><br />
<br />
<input type="submit" class="btn btn-success form-control" id="login_button" value="Login">
</form>
<div class="login_status col-xs-6 col-xs-offset-3"></div>
</div>
</div>
</div>
<script>
$(document).ready(function () {
$('#login_button').click(function(e)
{
e.preventDefault();
var username=$("#login_username").val();