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

PHP getSessionUser函数代码示例

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

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



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

示例1: displayAdminControls

function displayAdminControls($user)
{
    if (!isset($user)) {
        $user = getSessionUser();
    }
    if ($user->isAdmin()) {
        include "../views/adminButton.view.php";
    }
}
开发者ID:cownby,项目名称:weblab2015-project,代码行数:9,代码来源:utilities.php


示例2: checkAdminPwd

/**
 * Fonction vérifiant le password de l'admin.
 * @return bool : true si le password est bon, sinon false.
 */
function checkAdminPwd()
{
    $userSession = getSessionUser();
    $userMdpTest = new User(array("Mdp" => $_POST['mdpAdmin']));
    $userMdpTest->setHashMdp();
    if ($userSession->getDroit()[0]->getLibelle() and $userSession->getMdp() == $userMdpTest->getMdp()) {
        return true;
    }
    return false;
}
开发者ID:OvynFlavian,项目名称:IntegrationTP_Groupe_1,代码行数:14,代码来源:session.lib.php


示例3: userHoldsRight

function userHoldsRight($RightId, $SessionId)
{
    global $Mysql;
    $UserId = getSessionUser($SessionId);
    $getUserRight = $Mysql->query("SELECT * FROM rights_assigned WHERE UserId='{$UserId}' AND RightId='{$RightId}'");
    if ($getUserRight->num_rows == 0) {
        return false;
    } else {
        return true;
    }
}
开发者ID:nzol,项目名称:roadshow,代码行数:11,代码来源:globalfunctions.php


示例4: printLogEntry

function printLogEntry($name, $gc, $type, $created, $log, $logId, $username, $logType, $difficulty, $terrain, $favorites, $finds, $country, $url, $sessionResults, $address, $district, $lat, $lon)
{
    $type = determineTypeIcon($type);
    $difficulty = ratingToStars("D:", $difficulty);
    $terrain = ratingToStars("T:", $terrain);
    $district = districtToImage($country, $district);
    $country = countryToImage($country);
    $logType = determineLogTypeIcon($logType);
    $ratio = findsToRatio($finds, $favorites);
    $favorites = favoritesToHearts($favorites);
    $images = DB::queryFirstColumn("SELECT\n                                           url\n                                         FROM\n                                           image\n                                         WHERE\n                                           image.log = %i", $logId);
    if (isset($lat) && isset($lon)) {
        $address = "<a href='http://maps.google.com/maps?q={$lat},{$lon}'>{$address}</a>";
    }
    if (substr($created, 0, 10) == date('d.m.Y')) {
        echo "<div class='panel panel-primary'>";
    } else {
        echo "<div class='panel panel-info'>";
    }
    $favoritesRatio = "";
    if ($favorites != "" && $ratio != "") {
        $favoritesRatio = "({$favorites} {$ratio})";
    }
    if ($type != "") {
        echo "<div class='panel-heading'><a href='{$url}'><b>{$name}</b></a> <img src='res/icons/{$type}' width='20px' /> {$difficulty} {$terrain} {$favoritesRatio} {$country} {$district} {$address}</div>";
    } else {
        echo "<div class='panel-heading'><b>{$name}</b></div>";
    }
    echo "<div class='panel-body'>{$log}";
    if (!empty($images)) {
        foreach ($images as $image) {
            echo '<img class="img-rounded img-padding" src="' . $image . '" />';
        }
    }
    echo "</div>";
    $urlencodedUsername = urlencode($username);
    if (in_array($gc, $sessionResults) && $username != getSessionUser()) {
        echo "<div class='panel-footer'><a class='u' href='index.php?username={$urlencodedUsername}'>{$username}</a> {$logType} {$created} (You <i class='fa fa-thumbs-up'></i> this one too.)</div>";
    } else {
        echo "<div class='panel-footer'><a class='u' href='index.php?username={$urlencodedUsername}'>{$username}</a> {$logType} {$created}</div>";
    }
    echo "</div>";
}
开发者ID:mircowidmer,项目名称:geonews,代码行数:43,代码来源:general.php


示例5: editProfil

function editProfil()
{
    $user = getSessionUser();
    ?>

<form class="form-horizontal" action="profil.page.php?to=edit" method="post">
    <div class="form-group">
        <label class="control-label col-sm-3" for="userName">Changement de pseudo:</label>
        <div class="col-sm-6">
            <input type="text" class="form-control" id="userName" name="userName" value="<?php 
    echo $user->getUserName();
    ?>
" placeholder="Votre pseudo">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-sm-3" for="userName">Changement d'adresse mail:</label>
        <div class="col-sm-6">
            <input type="email" class="form-control" id="email" name="email" value="<?php 
    echo $user->getEmail();
    ?>
" placeholder="Votre email">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-sm-3" for="Mdp">Changement de mot de passe:</label>
        <div class="col-sm-6">
            <input type="password" class="form-control" id="Mdp" name="Mdp" placeholder="Entrez votre mot de passe">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-sm-3" for="MdpBis">Réentrez votre changement de mot de passe :</label>
        <div class="col-sm-6">
            <input type="password" class="form-control" id="MdpBis" name="MdpBis" placeholder="Réentrez votre mot de passe">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-sm-3" for="Tel">Changer de numéro de téléphone:</label>
        <div class="col-sm-6">
            <input type="text" class="form-control" id="Tel" name="Tel" value="<?php 
    echo $user->getTel();
    ?>
" placeholder="Entrez votre numéro de téléphone">
        </div>
    </div>
    <div class="form-group">
        <div class="col-sm-offset-3 col-sm-10">
            <div class="checkbox">
                <label>
                    <input  type="checkbox" id="Private" name="Private" value="1" <?php 
    if ($user->getIsPrivate() == 1) {
        ?>
checked<?php 
    }
    ?>
>S'afficher en public
                </label>
            </div>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-sm-3" for="MdpActuel">Entrez votre mot de passe actuel : (obligatoire pour le changement) </label>
        <div class="col-sm-6">
            <input type="password" class="form-control" id="MdpActuel" name="MdpActuel" placeholder="Entrez votre mot de passe actuel" required>
        </div>
    </div>
    <div class="form-group">
        <div class="col-sm-offset-3 col-sm-6">
            <button type="submit" class="btn-block btn-primary btn-lg" name="formulaire" id="formulaire">Soumettre</button>
        </div>
    </div>
</form>
<?php 
}
开发者ID:OvynFlavian,项目名称:IntegrationTP_Groupe_1,代码行数:74,代码来源:profil.form.php


示例6: changeownpass

 public function changeownpass()
 {
     if (isStudent()) {
         $this->kickOut();
     }
     if ($_POST) {
         $this->form_validation->set_rules('password1', 'New Password', 'trim|required|xss_clean');
         $this->form_validation->set_rules('password', 'Confirm Password', 'trim|required|xss_clean');
     }
     if ($this->form_validation->run() == FALSE) {
         $errors = validation_errors();
         if (!empty($errors)) {
             addError($errors);
         }
     } else {
         $username = getSessionUser();
         $result = $this->users->changePassword($username, $this->input->post('password'));
         if ($result) {
             addSuccess(getTxt('CongratulationsChangedPassword') . " " . $username);
         } else {
             addError(getTxt('ProcessingError'));
         }
     }
     //List of CSS to pass to this view
     $data = $this->StyleData;
     $this->load->view('users/change_yourpassword', $data);
 }
开发者ID:CMIP5,项目名称:HUC8Climate,代码行数:27,代码来源:user.php


示例7: header

    $_SESSION['error'] = "Sign in!";
    header('Location: form.php');
    die;
}
$user = $_SESSION['username'];
$user_id = $_SESSION['user_id'];
if (!getSessionUser($user, $user_id)) {
    session_destroy();
    header('Location: form.php');
    die;
}
/* MESSAGE POST-IT */
print '<div id="post_it"></div>';
require_once 'request.php';
/* DEFINE VARS */
$sess = getSessionUser($user, $user_id);
$get = getUser($user);
$post = getAllPosts();
$profile = 'all';
$fulltag = '';
/* WHICH POSTS TO SHOW*/
if (isset($_GET['profile'])) {
    $profile = preg_replace("/[^a-zA-Z0-9@#]/", "", $_GET['profile']);
    if ($profile == 'all') {
        $post = getAllPosts();
    } elseif ($profile == 'at' . $sess['username']) {
        $post = findAt($sess['username']);
    } elseif (!$profile == getUser($profile)) {
        print '<div class="post_it"><h3>';
        print "There's no user with that name...";
        print '</h3><button type="button" id="hide_btn" class="button">close</button></div>';
开发者ID:nilvisa,项目名称:litter,代码行数:31,代码来源:header.php


示例8: header

    exit;
}
$userid = $result['userid'];
$op = $result['op'];
$task = $op['single_task'];
if ($task['completed'] == 1) {
    header('location: index.php');
    exit;
}
$sid = createNewSessionByUserid($userid);
if (is_null($sid)) {
    header('location: index.php');
    exit;
}
setcookie('sid', $sid, time() + 365 * 24 * 60 * 60);
$user = getSessionUser($sid);
if (is_null($user)) {
    setcookie('sid', '', time() - 3600);
    header('Location: index.php');
    exit;
}
$css = array('home.css', 'task-completed.css');
include 'common/header.php';
include 'lib/op-with-tasks-view.php';
?>

    
    <div class="container sections-wrapper"><div class="row"><div class="col-md-6 col-md-offset-3 col-sm-12">

    <h2>Problem Reported!</h2>
    <p>The problem completing this task has been reported. <br/><br/>
开发者ID:jrharshath,项目名称:martaarmy_barracks,代码行数:31,代码来源:task-problem.php


示例9: addStationsFromDb

        <div class='panel-heading'>No geocaches with location data found</div>
        <div class='panel-body'>None of the geocaches you have found contain location data. Upload your finds <a href="upload.php">here</a>.</div>
      </div>
    </div>
    <div id="map" hidden="hidden"></div>
<?php 
if (isEmbedded()) {
    ?>
    <script type="text/javascript">
        $('#map').height($(window).height());
        addStationsFromDb(<?php 
    echo "'" . getSessionUser() . "'";
    ?>
);
    </script>
<?php 
} else {
    ?>
    <script type="text/javascript">
        $('#map').height($(window).height() - 50);
        addStationsFromDb(<?php 
    echo "'" . getSessionUser() . "'";
    ?>
);
    </script>
<?php 
}
?>
    </body>
</html>
开发者ID:mircowidmer,项目名称:geonews,代码行数:30,代码来源:map.php


示例10: finishWith

return:
{
	'status': 'success' // 'fail', 'nologin', 'missingdata', 'missingfield'
}
*/
function finishWith($status, $sid = NULL)
{
    exit(json_encode(array('status' => $status)));
}
if (!isset($_COOKIE["sid"])) {
    finishWith('nologin');
}
include '../lib/db.php';
include '../lib/op-with-tasks-view.php';
init_db();
$user = getSessionUser($_COOKIE["sid"]);
if (is_null($user)) {
    setcookie('sid', '', time() - 3600);
    finishWith('nologin');
}
if (!isset($_POST['opid'])) {
    finishWith('missingopid');
}
$opid = intval($_POST['opid']);
$op = getOperationById($opid);
$op_part_data = NULL;
if (!is_null($op['data'])) {
    if (!isset($_POST['data'])) {
        finishWith('missingdata');
    }
    $indata = json_decode($_POST['data']);
开发者ID:jrharshath,项目名称:martaarmy_barracks,代码行数:31,代码来源:join-op.php


示例11: getUser

<meta name="mobile-web-app-capable" content="yes">
<link rel="apple-touch-icon" href="img/logo_icon.png"/>
<link rel="apple-touch-icon-precomposed" href="img/logo_icon.png"/>
<link rel="icon" sizes="192x192" href="img/logo_icon.png">
<link rel="icon" sizes="128x128" href="img/logo_icon.png">
<link rel="shortcut icon" type="image/png" href="/favicon.png"/>
<link rel="stylesheet" href="css/foundation.css" />
<link rel="stylesheet" href="css/plantyCustom.css" />
<link rel="manifest" href="manifest.json">
<script src="js/vendor/modernizr.js"></script>
<script src="js/planty.js"></script>
<link rel="stylesheet" href="css/plantyCustom.css" />
</head>
<body>
<?php 
$user = getUser(getSessionUser());
?>
<div class="row">
	<div class="large-12 columns">

		<div class="row">
			<div class="large-12 columns headerFix">
				<nav class="top-bar" data-topbar>
					<ul class="title-area">

						<li class="name">
            	<a href="index.php" alt="Planty"><img src="/img/logo_text.png" class="logoText"/></a>
						</li>
						<li class="toggle-topbar menu-icon"><a href="#" class="welcomeText">Welcome, <span><?php 
echo $user->name;
?>
开发者ID:skin,项目名称:planty,代码行数:31,代码来源:header.php


示例12: array

$november = array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
$december = array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
$year = array();
$year[0] = $january;
$year[1] = $february;
$year[2] = $march;
$year[3] = $april;
$year[4] = $may;
$year[5] = $june;
$year[6] = $july;
$year[7] = $august;
$year[8] = $september;
$year[9] = $october;
$year[10] = $november;
$year[11] = $december;
$results = DB::query("SELECT DISTINCT\n                          month(log.created) as 'month',\n                          day(log.created) as 'day'\n                        FROM\n                          geocache, log, logtype, user, type\n                        WHERE\n                          geocache.id = log.geocache AND\n                          log.user = user.id AND\n                          type.id = geocache.type AND\n                          log.type = logtype.id AND\n                          (logtype.type = 'Found it' OR logtype.type = 'Attended' OR logtype.type = 'Webcam Photo Taken') AND\n                          user.username = %s\n                        ORDER BY\n                          log.created DESC,\n                          log.id DESC", getSessionUser());
$total = 0;
foreach ($results as $row) {
    $month = $row['month'] - 1;
    $day = $row['day'] - 1;
    $year[$month][$day] = 1;
    $total++;
}
function printMonth($month)
{
    foreach ($month as $day) {
        if ($day == '1') {
            echo '<td style="background-color: #D0F5A9;"><i class="fa fa-calendar-check-o"></i></td>';
        } else {
            echo '<td style="background-color: #F5D0A9;"><i class="fa fa-calendar-minus-o"></i></td>';
        }
开发者ID:mircowidmer,项目名称:geonews,代码行数:31,代码来源:dateMatrix.php


示例13: getSessionUser

                        echo "<tr>\n\t\t\t\t\t\t\t\t<td></td>\n\t\t\t\t\t\t\t\t<td><a href=\"index.php?a=30&b=2&idstatut=2&idsession=" . $idsession . "&iduser=" . $row["id_user"] . "\"><button type=\"button\" class=\"btn bg-purple sm\"  title=\"Mettre en liste d'attente\"><i class=\"fa fa-repeat\"></i></button></a></td>\n\t\t\t\t\t\t\t\t<td>" . $row["nom_user"] . " " . $row["prenom_user"] . "</td>\n\t\t\t\t\t\t\t\t<td>" . $affichage . "</td>\n                                 </tr>";
                    }
                }
                ?>
          </tbody></table>
		  <?php 
            }
        }
    }
    ?>
		</div>
	</div>
		
	<?php 
    // liste des user en liste d'attente
    $result = getSessionUser($idsession, 2);
    $nb = mysqli_num_rows($result);
    if ($nb > 0) {
        ?>
              
     	
		<div class="box box-success"><div class="box-header"><h3 class="box-title">Liste des participants en liste d'attente   <small class="badge bg-blue" data-toggle="tooltip" title="Classement par ordre d'arriv&eacute;e, du plus ancien au plus r&eacute;cent"><i class="fa fa-info"></i></small></h3></div>
		<div class="box-body"><table class="table">
				<thead> 
					<th></th> 
					
					<th>Nom, prenom</th>
					<!--<th>autres inscriptions (pdf)</th>-->
				</thead><tbody>
		<?php 
        for ($i = 1; $i <= $nb; $i++) {
开发者ID:ctariel,项目名称:CyberGestionnaireLGB,代码行数:31,代码来源:admin_session.php


示例14: dirname

<?php

require_once dirname(__FILE__) . "/settings.php";
require_once dirname(__FILE__) . "/lang/" . $langauge . ".php";
require_once dirname(__FILE__) . "/funcs.general.php";
require_once dirname(__FILE__) . "/class.RCAPI.php";
require_once dirname(__FILE__) . "/class.redcapAuth.php";
require_once dirname(__FILE__) . "/class.redcapportaluser.php";
require_once dirname(__FILE__) . "/class.mail.php";
require_once dirname(__FILE__) . "/class.htmlpage.php";
$PAGE = basename($_SERVER["SCRIPT_FILENAME"]);
$start_time = microtime(true);
// $end_time = microtime(true) - $start_time; //measure script time
/*
	Start Session and determine if we are authenticated
	Authenticated means user+pass has matched, but does NOT mean the account is active
*/
session_start();
$loggedInUser = getSessionUser();
if (!empty($loggedInUser)) {
    // Check for logout
    if (isset($_GET['logout']) && $_GET['logout'] == 1) {
        logout("Goodbye!");
    }
}
开发者ID:susom,项目名称:redcap-API-portal,代码行数:25,代码来源:config.php


示例15: session_start

<?php

session_start();
include 'globalfunctions.php';
$SessionId = $_POST['CLICKA_currentSessionId'];
$CurrentUserId = getSessionUser($SessionId);
$FormId = getSessionVar($SessionId, "currentlySelectedForm");
$getForm = $Mysql->query("SELECT * FROM forms WHERE Id='{$FormId}'");
$rsForm = $getForm->fetch_assoc();
$BackgroundColour = $rsForm['BackgroundColour'];
$FormBackground = $rsForm['FormBackground'];
$getFormInputs = $Mysql->query("SELECT * FROM forms_inputs WHERE FormId='{$FormId}' ORDER BY SortNum ASC");
?>
<script type="text/javascript">

function scriptLoaded() {

       $('#formChosen').modal('hide');

    document.getElementById('topbartext').innerHTML = "<button type=\"button\" class=\"btn btn-warning\" onclick=\"exitFormEntry()\" style=\"height:20px;padding-top:0px;\">Exit</button> Fill Out: <?php 
echo $rsForm['FormName'];
?>
"
    document.getElementById('sidenav').style.display="none"
    document.body.style.backgroundColor = "#<?php 
echo $BackgroundColour;
?>
";
    document.getElementById('page-wrapper').style.marginLeft="0px"
    document.getElementById('page-wrapper').style.backgroundColor="#<?php 
echo $BackgroundColour;
开发者ID:nzol,项目名称:roadshow,代码行数:31,代码来源:filloutform.php


示例16: initRequire

/**
 * Created by PhpStorm.
 * User: Flavian Ovyn
 * Date: 15/10/2015
 * Time: 15:24
 */
require "../Library/constante.lib.php";
require "../Library/Fonctions/Fonctions.php";
initRequire();
initRequireEntityManager();
require "../Form/administration.form.php";
require "../Library/Page/administration.lib.php";
require "../Manager/User_ActivityManager.manager.php";
$configIni = getConfigFile();
startSession();
$user = getSessionUser();
$isConnect = isConnect();
if (!$isConnect or $user->getDroit()[0]->getLibelle() != "Administrateur") {
    header("Location:../");
}
?>

<!doctype html>
<html lang="fr">
<head>
    <meta charset="UTF-8">
    <title>Administration</title>
    <link rel="icon" type="image/png" href="../Images/favicon.png" />
    <link rel="stylesheet" type="text/css" href="../vendor/twitter/bootstrap/dist/css/bootstrap.css">
    <link rel="stylesheet" type="text/css" href="../Style/general.css">
开发者ID:OvynFlavian,项目名称:IntegrationTP_Groupe_1,代码行数:30,代码来源:administration.page.php


示例17: getSessionUser

</dd></dl>	  
	</div>
	
	   <div class="box-footer">
	<a href="index.php?a=30&b=1&idsession=<?php 
echo $idsession;
?>
"><button class="btn btn-default" type="submit"> <i class="fa fa-arrow-circle-left"></i> Retour aux inscriptions</button></a></div>
	</div></div>
	<!-- Fin DETAIL DE L'ATELIER-->

<div class="col-lg-7">
    <?php 
// liste des user inscrit a un atelier
if ($act == 0) {
    $result2 = getSessionUser($idsession, $statutdatesession);
} elseif ($act == 1) {
    $result2 = getSessionValidpresences($idsession, $iddate);
}
$nb = mysqli_num_rows($result2);
if ($nb > 0) {
    ?>

<form method="post" action="<?php 
    echo $action;
    ?>
">
<div class="box box-success"><div class="box-header"><h3 class="box-title">Liste des participants &agrave; cet session</h3></div>
	<div class="box-body">
		<table class="table"> 
			<thead><tr> 
开发者ID:ctariel,项目名称:CyberGestionnaireLGB,代码行数:31,代码来源:admin_session_presence.php


示例18: getUserPower

/**
 *
 *根据缓存用户名 获取用户权限
 */
function getUserPower()
{
    $loginName = getSessionUser();
    $sql = "SELECT `user_power`,`login_name` FROM `tb_users` WHERE `login_name` = '" . $loginName . "'";
    $result = mysql_query($sql, connectDB());
    if (!is_bool($result)) {
        //存在数据
        $user_power = mysql_fetch_array($result, MYSQL_ASSOC);
        return $user_power;
    } else {
        //不存在数据 返回 0
        return NULL;
    }
}
开发者ID:jacoobwang,项目名称:ecp,代码行数:18,代码来源:functions.php


示例19: urldecode

            <div class="form-group">
              <input class="form-control" name="username" placeholder="Username">
            </div>
          </form>
        </div>
      </div>
<?php 
}
if (isset($_GET['username']) && $_GET['username'] != '' || getSessionUser() != "") {
    if (isset($_GET['username']) && $_GET['username'] != '') {
        $username = urldecode($_GET['username']);
    } else {
        $username = getSessionUser();
    }
    if (getSessionUser() != "") {
        $sessionResults = DB::queryFirstColumn("SELECT\n                              geocache.gc\n                            FROM\n                              geocache, log, logtype, user, type\n                            WHERE\n                              geocache.id = log.geocache AND\n                              log.user = user.id AND\n                              type.id = geocache.type AND\n                              log.type = logtype.id AND\n                              logtype.type = 'Found it' AND\n                              user.username = %s AND\n                              month(curdate()) = month(created) AND\n                              day(curdate()) = day(created) AND\n                              year(curdate()) != year(created)\n                            ORDER BY\n                              log.created DESC,\n                              log.id DESC", getSessionUser());
    } else {
        $sessionResults = array();
    }
    $finds = DB::queryFirstField("SELECT finds FROM user WHERE username = %s", $username);
    echo "<div class='panel panel-info'>";
    $month = date('m');
    $day = date('d');
    echo "<div class='panel-heading'>On this day of <b>{$username}</b> ({$finds})</div>";
    echo "</div>";
} else {
    echo "<div class='panel panel-info'>";
    $month = date('m');
    $day = date('d');
    echo "<div class='panel-heading'>On this day of all indexed users</div>";
    echo "</div>";
开发者ID:mircowidmer,项目名称:geonews,代码行数:31,代码来源:memories.php


示例20: getSessionUser

          </form>
        </div>
      </div>
      <div class='panel panel-info'>
        <div class='panel-heading'>Remove user from feed</div>
        <div class='panel-body'>
          <form class="form-inline">
            <div class="form-group">
              <div class="dropdown">
                <button class="btn btn-default dropdown-toggle" type="button" id="dropdownMenu1" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true">
                  Remove user
                  <span class="caret"></span>
                </button>
                <ul class="dropdown-menu">
<?php 
$users = DB::queryFirstColumn("SELECT\n                                   u2.username\n                                 FROM\n                                   user u1, feed, user u2\n                                 WHERE\n                                   feed.user = u1.id AND\n                                   u1.username = %s AND\n                                   u2.id = feed.feeduser", getSessionUser());
foreach ($users as $user) {
    echo '<li><a href="?removeUser=' . urlencode($user) . '">' . $user . '</a></li>';
}
?>
                </ul>
              </div>
            </div>
          </form>
        </div>
      </div>
    </div>
    <script type="text/javascript">geolookup();</script>
  </body>
</html>
开发者ID:mircowidmer,项目名称:geonews,代码行数:30,代码来源:settings.php



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

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