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


PHP loggedin函数代码示例

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


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

示例1: confirmlogin

function confirmlogin()
{
    if (!loggedin()) {
        header("Location: ./index.php");
        /* Redirect browser */
        exit;
    }
}
开发者ID:ps48,项目名称:report-portal,代码行数:8,代码来源:session.php

示例2: index

	/**
	 * Index Page for this controller.
	 *
	 * Maps to the following URL
	 * 		http://example.com/index.php/welcome
	 *	- or -  
	 * 		http://example.com/index.php/welcome/index
	 *	- or -
	 * Since this controller is set as the default controller in 
	 * config/routes.php, it's displayed at http://example.com/
	 *
	 * So any other public methods not prefixed with an underscore will
	 * map to /index.php/welcome/<method_name>
	 * @see http://codeigniter.com/user_guide/general/urls.html
	 */
	public function index() {
		$this->load->view('top');
		if(loggedin()) {
			$this->load->view('loggedin');
		} else {
			$this->load->view('login');
		}
		$this->load->view('bottom');
	}
开发者ID:nli75,项目名称:XRSizeCI,代码行数:24,代码来源:main.php

示例3: profile

	public function profile() {
		if(loggedin() ) {
			$data['content'] = 'profile';
			$this->load->model('User_model');
			$data['info'] = $this->User_model->getUserinfo();
			$this->load->view('template', $data);
		} else {
			redirect(base_url().'news/', 'refresh');
		}
	}
开发者ID:nli75,项目名称:XRSizeCI,代码行数:10,代码来源:user.php

示例4: index

	public function index() {
		if(loggedin() ) {
			$this->load->model('events_model');
			$data['events'] = $this->events_model->get_last_events();
			$data['content'] = 'events';
			$this->load->view('template', $data);
		} else {
			redirect(base_url().'news/', 'refresh');
		}
	}
开发者ID:nli75,项目名称:XRSizeCI,代码行数:10,代码来源:dashboard.php

示例5: isEditor

function isEditor()
{
    if (loggedin()) {
        if (!empty($_SESSION['user_type'])) {
            if ($_SESSION['user_type'] == 'edit') {
                return true;
            }
        }
    }
    return false;
}
开发者ID:karuppiah7890,项目名称:tsn,代码行数:11,代码来源:auth_core.inc.php

示例6: submissionform_redo

function submissionform_redo()
{
    global $logged_in, $user, $HTTP_POST_VARS, $SUBMISSION, $MAIN;
    $WORK = loggedin();
    //lets redraw the submission form.
    $WORK = insert_into_template($SUBMISSION, "{LOGGEDIN}", $WORK);
    $WORK = insert_into_template($WORK, "{REQUESTFOR}", $HTTP_POST_VARS['request_for']);
    $WORK = insert_into_template($WORK, "{REQUEST}", $HTTP_POST_VARS['request']);
    $WORK = insert_into_template($MAIN, "{CONTENT}", $WORK);
    $WORK = filltemplate($WORK, "Submit a Prayer Request");
    printf("%s", striptemplate($WORK));
}
开发者ID:BackupTheBerlios,项目名称:fishcms-svn,代码行数:12,代码来源:plsubmission.php

示例7: submissionform_redo

function submissionform_redo()
{
    global $logged_in, $user, $HTTP_POST_VARS, $HTTP_GET_VARS, $MAIN, $LEAVEPRAISE;
    $WORK = loggedin();
    //lets redraw the request form.
    $WORK = insert_into_template($LEAVEPRAISE, "{LOGGEDIN}", $WORK);
    $WORK = insert_into_template($WORK, "{REQUESTID}", $HTTP_GET_VARS['request']);
    $WORK = insert_into_template($WORK, "{PREFILL}", $HTTP_POST_VARS['praise']);
    $WORK = insert_into_template($MAIN, "{CONTENT}", $WORK);
    $WORK = filltemplate($WORK, "Leave Praise");
    printf("%s", striptemplate($WORK));
}
开发者ID:BackupTheBerlios,项目名称:fishcms-svn,代码行数:12,代码来源:leavepraise.php

示例8: getuser

function getuser()
{
    global $conn;
    if (loggedin()) {
        $query = "SELECT * FROM `users` WHERE `username` = '" . $_SESSION['username'] . "'";
    } else {
        $query = "SELECT * FROM `users` WHERE `username` = '" . $conn->real_escape_string($_POST['username']) . "'";
    }
    $result = $conn->query($query);
    if ($result->num_rows > 0) {
        return $result->fetch_assoc();
    }
}
开发者ID:rcredhit,项目名称:hostellot.github.io,代码行数:13,代码来源:core.inc.php

示例9: signin

function signin($db)
{
    echo "Enter username:" . "\n";
    $name = trim(fgets(STDIN));
    echo "Enter password:\n";
    $pass = trim(fgets(STDIN));
    $val = $db->checkUser($name, $pass);
    if ($val) {
        echo "\n** Welcome ----login successfull**\n";
        loggedin($db);
    } else {
        echo "login fails";
    }
}
开发者ID:hassan-maqsood,项目名称:hassanmaqsood-repo,代码行数:14,代码来源:simulator.php

示例10: getfield

function getfield($field, $table, $conn)
{
    if (loggedin()) {
        $userid = $_SESSION['userid'];
        $query = "SELECT {$field} FROM {$table} WHERE id='{$userid}'";
        if ($result = $conn->query($query)) {
            if ($result->num_rows > 0) {
                if ($result = $result->fetch_row()) {
                    return $result;
                } else {
                    echo "fetch row fault";
                }
            } elseif ($result->num_rows < 0) {
                echo "num_rows < 0";
            } else {
                echo "cant detect";
            }
        } else {
            echo "failed - in getfield";
        }
    }
}
开发者ID:07101994,项目名称:Formia-Google-Forms-Simulation,代码行数:22,代码来源:core.inc.php

示例11: tmpCountModules

function tmpCountModules($module_name)
{
    if (substr($module_name, 0, 4) == 'user') {
        return false;
    }
    if ($module_name == 'quicklinks') {
        return false;
    }
    if ($module_name == 'right') {
        return false;
    }
    if ($module_name == 'commands') {
        return loggedin() && !gpExists('x4Page');
    }
    if ($module_name == 'menuright') {
        return loggedin();
    }
    if (gpExists('x4Page')) {
        return false;
    }
    return true;
}
开发者ID:KlabsTechnology,项目名称:andro,代码行数:22,代码来源:andromeda.php

示例12: listing

	public function listing() {
		if(loggedin() ) {
			$ppage = 5;
			$start = 0;
			$this->load->model('Events_model');
			$config['base_url'] = base_url().'event/listing/page/';
			$config['total_rows'] = count($this->Events_model->get_events_by_user($_SESSION['id']));
			$config['per_page'] = $ppage;
			$config['full_tag_open'] = '<p>';
			$config['full_tag_close'] = '</p>';
			$this->pagination->initialize($config);
			if($this->uri->segment(4) != '') {
				$start = $this->uri->segment(4);
			}
			$data['events'] = $this->Events_model->get_events_by_user($_SESSION['id'], $start, $ppage);
			$data['content'] = 'events';
			$data['pages'] = $this->pagination->create_links();

			$this->load->view('template', $data);
			
		} else {
			redirect(base_url().'news/', 'refresh');
		}
	}
开发者ID:nli75,项目名称:XRSizeCI,代码行数:24,代码来源:event.php

示例13: if

				<div class="menu_bg">
					<ul>
						<li><a href="<?php echo $sitepath; ?>/index.php">Home</a></li>
						<li><a href="<?php echo $sitepath; ?>/about.php">About</a></li>
						<li><a href="<?php echo $sitepath; ?>/services.php">Services</a></li>
						<li><a href="<?php echo $sitepath; ?>/faq.php">FAQ</a></li>
						<li><a href="<?php echo $sitepath; ?>/terms.php">Terms</a></li>
						<li><a href="<?php echo $sitepath; ?>/contact.php">Contact Us</a></li>
						<li><a href="<?php echo $sitepath; ?>/signup.php">Registration</a></li>
					</ul>
				</div>
				<span class="nav_icon_right"></span>
			</div>
			<div class="login_button">
				<span class="login_icon"></span>
				<?php if(loggedin()) 
					{
				?>
				<h1><a href="<?php echo $sitepath; ?>/logout.php">Logout</a></h1>
				<?php
					}
					else
					{
			?>
			<h1><a href="<?php echo $sitepath; ?>/login.php">Login</a></h1>
			<?php   
					} 
			?>
			</div>
		</div>
	</div>
开发者ID:jobayerccj,项目名称:hamad-mayo,代码行数:31,代码来源:header.php

示例14: session_start

<?php

session_start();
include 'config.php';
include 'functions.php';
@($uid = $_SESSION['user_id']);
@($user = $_SESSION['user']);
$date = time();
$dateAjax = date("M j G", $date);
echo "<div id='dateAjax' class='{$dateAjax}'></div>";
loggedin();
//IF USER ONLINE OR NO
$unread_notif = unread_notif($uid);
echo "Welcome back , " . $user;
echo "\t <a href='user/{$user}'>PROFILE</a> | <a href='friends.php?id={$uid}'>My friends</a> |<a href='notifications.php'>Notifications (" . $unread_notif . ")</a> | <a href='freq.php'>Friend requests( " . Nfreq($uid) . " )</a> |<a href='settings.php'>Settings</a>| <a href='search.php'>Search</a> | Help | <a href='logout.php'>Sign out</a><hr />";
//GET LAST ID POSTED
$lastID = mysql_query("select * from notes order by notes_id desc limit 1");
$IDoop = mysql_fetch_array($lastID);
$lastUsedID = $IDoop['notes_id'];
$lastUsedID1 = $lastUsedID++;
$lastUsedID = hashit($lastUsedID);
echo "<input type='hidden' name='lastID' id='lastID' value='{$lastUsedID}' />";
?>
<script type="text/javascript" src="jquery.js"></script>

<script type="text/javascript">
jQuery(function($) {
					
	//ADD A NOTE///////////////////////////////////////////////////////////////////////
	$('#send_note').click(function() {
							   
开发者ID:rymaga,项目名称:notes-app,代码行数:30,代码来源:welcome.php

示例15: array

<body>
<div id="header">
	<h1><?php 
echo SITE_TITLE;
?>
</h1>
	<?php 
$menuitems = array();
if ($GLOBALS["page"] != "mainMenu") {
    $menuitems[] = "<a href=\"" . SITEROOT_WEB . "\">Back to main menu</a>";
}
$menuitems[] = "<a href=\"" . SITEROOT_WEB . "eqiat\">Authoring tool</a>";
if (loggedin() && $GLOBALS["page"] != "logout") {
    $menuitems[] = "<a id=\"logoutlink\" href=\"" . SITEROOT_WEB . "?page=logout\">Log out (<strong>" . htmlspecialchars(username()) . "</strong>)</a>";
} else {
    if (!loggedin() && ($GLOBALS["page"] != "login" && !isset($_SESSION["nextpage"]))) {
        $menuitems[] = "<a href=\"" . SITEROOT_WEB . "?page=login\">Log in</a>";
    }
}
if ($GLOBALS["page"] != "help") {
    $menuitems[] = "<a href=\"" . SITEROOT_WEB . "?page=help\">Help</a>";
}
if (!empty($menuitems)) {
    ?>
		<ul id="headermenu">
			<?php 
    foreach ($menuitems as $menuitem) {
        ?>
				<li><?php 
        echo $menuitem;
        ?>
开发者ID:rprince,项目名称:questionbank,代码行数:31,代码来源:htmlheader.php


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