本文整理汇总了PHP中get_login_id函数的典型用法代码示例。如果您正苦于以下问题:PHP get_login_id函数的具体用法?PHP get_login_id怎么用?PHP get_login_id使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了get_login_id函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: Commit
function Commit($post)
{
$message = trim($post["message"]);
$r = SQLLib::SelectRow("SELECT count(0) as c FROM bbs_posts WHERE topic=".$this->topic);
$a = array();
$a["userlastpost"] = get_login_id();
$a["lastpost"] = date("Y-m-d H:i:s");
$a["count"] = $r->c;
SQLLib::UpdateRow("bbs_topics",$a,"id=".$this->topic);
$a = array();
$a["added"] = date("Y-m-d H:i:s");
$a["author"] = get_login_id();
$a["post"] = $message;
$a["topic"] = $this->topic;
SQLLib::InsertRow("bbs_posts",$a);
@unlink("cache/pouetbox_latestbbs.cache");
return array();
}
开发者ID:neodyme60,项目名称:pouet2.0,代码行数:25,代码来源:box-bbs-post.php
示例2: file_save
function file_save($filearr)
{
if ($filearr['error'] != 0) {
echo 'error occured by upload';
return FALSE;
}
$path = $_SERVER['DOCUMENT_ROOT'] . '/forum/uploads/';
if (file_exists($filearr['tmp_name']) && is_readable($filearr['tmp_name'])) {
$newname = md5($filearr['tmp_name']);
if (strrpos($filearr['name'], '.')) {
$ext = substr($filearr['name'], strrpos($filearr['name'], '.'));
} else {
$ext = '';
}
while (file_exists($path . $newname)) {
echo "filename {$newname} exists<br />\n";
$newname = md5($newname);
}
$newname = substr($newname, 0, -5) . '.' . substr($newname, -4);
if (move_uploaded_file($filearr['tmp_name'], $path . $newname)) {
db_query("INSERT INTO files VALUES(NULL,'" . get_login_id() . "','{$newname}')");
return $newname;
}
}
echo "\n" . $filearr['tmp_name'] . "\n";
return FALSE;
}
开发者ID:vulnerabilityCode,项目名称:ctf,代码行数:27,代码来源:uploads.inc.php
示例3: Commit
function Commit($data)
{
$post = array();
global $REQUESTTYPES;
if ($REQUESTTYPES[ $_POST["requestType"] ])
{
$error = $REQUESTTYPES[ $_POST["requestType"] ]::ValidateRequest($data,$post);
if ($error) return $error;
}
else
{
return array("no such request type!");
}
$a = array();
$a["requestType"] = $data["requestType"];
if($_REQUEST["prod"])
{
$a["itemID"] = (int)$_REQUEST["prod"];
$a["itemType"] = "prod";
}
$a["requestDate"] = date("Y-m-d H:i:s");
$a["userID"] = get_login_id();
$a["requestBlob"] = serialize($post);
global $reqID;
$reqID = SQLLib::InsertRow("modification_requests",$a);
return array();
}
开发者ID:neodyme60,项目名称:pouet2.0,代码行数:31,代码来源:submit_modification_request.php
示例4: Commit
function Commit($post)
{
$message = trim($post["comment"]);
$rating = $post["rating"];
if ($this->myVote)
$rating = "isok"; // user already has a vote
$vote = 0;
switch($rating) {
case "rulez": $vote = 1; break;
case "sucks": $vote = -1; break;
default: $vote = 0; break;
}
$a = array();
$a["addedDate"] = date("Y-m-d H:i:s");
$a["who"] = get_login_id();
$a["which"] = $this->prod;
$a["comment"] = $message;
$a["rating"] = $vote;
SQLLib::InsertRow("comments",$a);
$rulez=0;
$piggie=0;
$sucks=0;
$total=0;
$checktable = array();
$r = SQLLib::SelectRows("SELECT rating,who FROM comments WHERE which=".$this->prod);
foreach ($r as $t)
if(!array_key_exists($t->who, $checktable) || $t->rating != 0)
$checktable[$t->who] = $t->rating;
foreach($checktable as $k=>$v)
{
if($v==1) $rulez++;
else if($v==-1) $sucks++;
else $piggie++;
$total++;
}
if ($total!=0)
$avg = sprintf("%.2f",(float)($rulez*1+$sucks*-1)/(float)$total);
else
$avg = "0.00";
$a = array();
$a["voteup"] = $rulez;
$a["votepig"] = $piggie;
$a["votedown"] = $sucks;
$a["voteavg"] = $avg;
SQLLib::UpdateRow("prods",$a,"id=".$this->prod);
@unlink("cache/pouetbox_latestcomments.cache");
@unlink("cache/pouetbox_topmonth.cache");
@unlink("cache/pouetbox_stats.cache");
return array();
}
开发者ID:neodyme60,项目名称:pouet2.0,代码行数:60,代码来源:box-prod-post.php
示例5: Commit
function Commit( $data )
{
$a = array();
$a["name"] = trim($data["name"]);
$a["desc"] = $data["desc"];
$a["upkeeper"] = get_login_id();
$a["addedUser"] = get_login_id();
$a["addedDate"] = date("Y-m-d H:i:s");
$this->listID = SQLLib::InsertRow("lists",$a);
return array();
}
开发者ID:neodyme60,项目名称:pouet2.0,代码行数:12,代码来源:submit_list.php
示例6: get_login_gids
function get_login_gids()
{
if (!empty($_SESSION['user'])) {
$q = "SELECT gid FROM groups WHERE belongsto='%" . get_login_id() . "%'";
$res = db_fetch_query(db_query($q), SQLITE_NUM);
if (isset($res['0']['0'])) {
return $res['0']['0'];
} else {
return 0;
}
} else {
die('no logged in user detected');
}
}
开发者ID:vulnerabilityCode,项目名称:ctf,代码行数:14,代码来源:user.inc.php
示例7: RenderBody
function RenderBody()
{
global $currentUser;
if (!get_login_id())
{
require_once("box-login.php");
$box = new PouetBoxLogin();
$box->RenderBody();
}
else
{
if (!$currentUser->CanPostInBBS())
return;
echo "<form action='add.php' method='post'>\n";
$csrf = new CSRFProtect();
$csrf->PrintToken();
echo "<div class='content'>\n";
echo " <input type='hidden' name='type' value='bbs'>\n";
echo " <label for='topic'>topic:</label>\n";
echo " <input name='topic' id='topic'/>\n";
echo " <label for='category'>category:</label>\n";
echo " <select name='category' id='category'>\n";
foreach($this->categories as $v)
printf("<option value='%s'>%s</option>",_html($v),_html($v));
echo " </select>\n";
echo " <label for='message'>message:</label>\n";
echo " <textarea name='message' id='message'></textarea>\n";
echo " <div><a href='faq.php#BB Code'><b>BB Code</b></a> is allowed here</div>\n";
echo "</div>\n";
echo "<div class='foot'>\n";
echo " <script language='JavaScript' type='text/javascript'>\n";
echo " <!--\n";
echo " document.observe('dom:loaded',function(){ AddPreviewButton($('submit')); });\n";
echo " //-->\n";
echo " </script>\n";
echo " <input type='submit' value='Submit' id='submit'>";
echo "</div>\n";
echo "</form>\n";
}
}
开发者ID:neodyme60,项目名称:pouet2.0,代码行数:47,代码来源:box-bbs-open.php
示例8: Commit
function Commit($data)
{
global $groupID;
$a = array();
$a["name"] = trim($data["name"]);
$a["acronym"] = $data["acronym"];
$a["web"] = $data["website"];
$a["addedUser"] = get_login_id();
$a["csdb"] = $data["csdbID"];
//$a["zxdemo"] = $data["zxdemoID"];
$a["demozoo"] = $data["demozooID"];
$a["addedDate"] = date("Y-m-d H:i:s");
$this->groupID = SQLLib::InsertRow("groups",$a);
return array();
}
开发者ID:neodyme60,项目名称:pouet2.0,代码行数:17,代码来源:box-group-submit.php
示例9: RenderBody
function RenderBody()
{
//echo "\n\n";
//echo "<div class='pouettbl' id='".$this->uniqueID."'>\n";
if (get_login_id())
{
echo "<ul class='boxlist'>\n";
echo " <li><a href='submit_prod.php'>submit a prod</a></li>\n";
echo " <li><a href='submit_group.php'>submit a group</a></li>\n";
echo " <li><a href='submit_party.php'>submit a party</a></li>\n";
echo " <li><a href='submit_board.php'>submit a bulletin board</a></li>\n";
echo " <li><a href='submit_avatar.php'>upload an avatar</a></li>\n";
echo " <li><a href='submit_logo.php'>upload a logo</a></li>\n";
echo " <li><a href='submit_list.php'>create a list</a></li>\n";
echo " <li><a href='logo_vote.php'>vote on logos</a></li>\n";
echo "</ul>\n";
}
echo "<h2>free 4 all stuffz!</h2>\n";
echo "<ul class='boxlist'>\n";
echo " <li><a href='http://www.bitfellas.org/submitnews.php'>submit news via bitfellas</a></li>\n";
echo "</ul>\n";
//echo "</div>\n";
}
开发者ID:neodyme60,项目名称:pouet2.0,代码行数:23,代码来源:submit.php
示例10: RenderBody
function RenderBody() {
if (!get_login_id())
{
echo "<div class='content loggedout'>\n";
printf( "<a href='login.php?return=%s'>login via SceneID</a>",_html(rootRelativePath()) );
echo "</div>\n";
} else {
global $currentUser;
echo "<div class='content loggedin'>\n";
echo "you are logged in as<br/>\n";
echo $currentUser->PrintLinkedAvatar()." ";
echo $currentUser->PrintLinkedName();
echo "</div>\n";
if ($currentUser->IsGloperator())
{
$req = SQLLib::SelectRow("select count(*) as c from modification_requests where approved is null")->c;
if ($req)
{
echo "<div class='content notifications'>\n";
echo "[ <a href='admin_modification_requests.php' class='adminlink'>";
echo $req;
if ($req==1)
echo " request waiting!";
else
echo " requests waiting!";
echo "</a> ]";
echo "</div>\n";
}
}
echo "<div class='foot'>\n";
echo "<a href='account.php'>account</a> ::\n";
echo "<a href='customizer.php'>custöomizer</a> ::\n";
echo "<a href='logout.php'>logout</a>\n";
echo "</div>";
}
}
开发者ID:neodyme60,项目名称:pouet2.0,代码行数:36,代码来源:box-login.php
示例11: Commit
function Commit($data)
{
$this->LoadFromDB();
$prodID = (int)$this->prod->id;
$sql = array();
if ($this->fields["releaseDate"])
{
if ($data["releaseDate_month"] && $data["releaseDate_year"] && checkdate( (int)$data["releaseDate_month"], 15, (int)$data["releaseDate_year"]) )
$sql["releaseDate"] = sprintf("%04d-%02d-15",$data["releaseDate_year"],$data["releaseDate_month"]);
else if ($data["releaseDate_year"])
$sql["releaseDate"] = sprintf("%04d-00-15",$data["releaseDate_year"]);
else
$sql["releaseDate"] = null;
}
if ($this->fields["partyCompo"])
$sql["party_compo"] = nullify($data["partyCompo"]);
if ($this->fields["partyRank"])
$sql["party_place"] = $data["partyRank"];
if ($sql)
SQLLib::UpdateRow("prods",$sql,"id=".$prodID);
if ($this->fields["screenshot"])
{
if(is_uploaded_file($_FILES["screenshot"]["tmp_name"]))
{
foreach( array( "jpg","gif","png" ) as $v )
@unlink( get_local_screenshot_path( $prodID, $v ) );
list($width,$height,$type) = GetImageSize($_FILES["screenshot"]["tmp_name"]);
$extension = "_";
switch($type) {
case 1:$extension="gif";break;
case 2:$extension="jpg";break;
case 3:$extension="png";break;
}
move_uploaded_file_fake( $_FILES["screenshot"]["tmp_name"], get_local_screenshot_path( $prodID, $extension ) );
$a = array();
$a["prod"] = $prodID;
$a["user"] = get_login_id();
$a["added"] = date("Y-m-d H:i:s");
SQLLib::InsertRow("screenshots",$a);
}
}
if ($this->fields["nfofile"])
{
if(is_uploaded_file($_FILES["nfofile"]["tmp_name"]))
{
move_uploaded_file_fake( $_FILES["nfofile"]["tmp_name"], get_local_nfo_path( $prodID ) );
$a = array();
$a["prod"] = $prodID;
$a["user"] = get_login_id();
$a["added"] = date("Y-m-d H:i:s");
SQLLib::InsertRow("nfos",$a);
}
}
return array();
}
开发者ID:neodyme60,项目名称:pouet2.0,代码行数:64,代码来源:submit_prod_info.php
示例12: Commit
function Commit($data)
{
global $currentUser;
global $currentUserSettings;
global $ephemeralStorage;
$sql = array();
foreach ($this->fieldsSettings as $k=>$v)
{
if ($v["type"] == "number")
{
$sql[$k] = min($v["max"], max($v["min"], (int)($data[$k]) ));
}
else
{
$sql[$k] = (int)$data[$k];
}
$currentUserSettings->$k = (int)$sql[$k];
}
if (SQLLib::SelectRow(sprintf_esc("select id from usersettings where id = %d",(int)get_login_id())))
{
SQLLib::UpdateRow("usersettings",$sql,"id=".(int)get_login_id());
}
else
{
$sql["id"] = (int)get_login_id();
SQLLib::InsertRow("usersettings",$sql);
}
$ephemeralStorage->set( "settings:".$currentUser->id, $currentUserSettings );
}
开发者ID:neodyme60,项目名称:pouet2.0,代码行数:29,代码来源:customizer.php
示例13: export_xls
//$_SESSION['report_value'] = $result;
/*echo $col++;
echo "<pre>";
print_r( $_SESSION['report_value'] );
echo "</pre>";
foreach($_SESSION['report_value'] as $rows){
foreach($rows as $key => $val ){
print_r( $rows["$key"] );
print "Key $key, Value $val\n";
}
}*/
export_xls($_SESSION['report_value'], $cols_name, "export", "export");
exit;
}
auth_check("member", false, false);
$user_id = get_login_id();
$get_member_group_sql = "SELECT group_id,name FROM plu_member WHERE account = '{$user_id}'";
$member_info = $db->get_results($get_member_group_sql, ARRAY_A);
$_SESSION['member_group'] = $member_info[0]['group_id'];
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>CMS後台管理系統-商品服務列表</title>
<script src="js/jquery.js" type="text/javascript"></script>
<script src="js/jquery.history_remote.pack.js" type="text/javascript"></script>
<script src="js/jquery.tabs.pack.js" type="text/javascript"></script>
<script type="text/javascript">
function aHover(url){
开发者ID:kingwang317,项目名称:it4fun-guam,代码行数:31,代码来源:blog.php
示例14: PouetBoxBBSView
$topicid = (int)$_GET["which"];
$view = new PouetBoxBBSView($topicid);
$view->Load();
$post = new PouetBoxBBSPost($topicid);
$TITLE = $view->topic->topic;
require_once("include_pouet/header.php");
require("include_pouet/menu.inc.php");
echo "<div id='content'>\n";
if ($view->topic)
{
echo $view->Render();
if (!get_login_id())
{
require_once("include_pouet/box-login.php");
$box = new PouetBoxLogin();
$box->Render();
}
else
{
if ($view->topic->id == FIXMETHREAD_ID)
{
$msg = new PouetBoxModalMessage( true );
$msg->uniqueID = "pouetbox_fixmewarning";
$msg->classes[] = "errorbox";
$msg->title = "want to add or update a link ?";
$msg->message = "we've made a new automated edit request system to modify prods - if you just want to add credits or links to prods, <b>go to the prod page and click the edit link at the bottom</b>!";
$msg->Render();
开发者ID:neodyme60,项目名称:pouet2.0,代码行数:31,代码来源:topic.php
示例15: date_default_timezone_set
//VER 0.01-INITIAL VERSION, SD:16/09/2014 ED:08/10/2014,TRACKER NO:82
//*********************************************************************************************************//-->
<?php
require_once 'google/appengine/api/mail/Message.php';
use google\appengine\api\mail\Message;
include "COMMON_FUNCTIONS.php";
include "CONNECTION.php";
date_default_timezone_set('Asia/Kolkata');
$get_active_user=array();
$get_active_user=get_active_login_id();//GET ALL ACTIVE LOGIN ID
$currentdate=date("Y-m-d");//CURRENT DATE
$Current_day=date('l');//CURRENT DAY
$check_ph=Check_public_holiday($currentdate);//CHECK CURRENT DATE IS IN PUBLIC HOLIDAY
$check_onduty=check_onduty($currentdate);//CHECK CURRENT DATE IS IN ONDUTY
$get_login_id=array();
$get_login_id=get_login_id($currentdate);//GET WHO ARE ALL ENTERED REPORT FOR CURRENT DATE
$ph_array=get_public_holiday();// GET ALL PUBLIC HOLIDAY
$select_admin="SELECT * FROM VW_ACCESS_RIGHTS_TERMINATE_LOGINID WHERE URC_DATA='ADMIN'";
$select_sadmin="SELECT * FROM VW_ACCESS_RIGHTS_TERMINATE_LOGINID WHERE URC_DATA='SUPER ADMIN'";
$admin_rs=mysqli_query($con,$select_admin);
$sadmin_rs=mysqli_query($con,$select_sadmin);
if($row=mysqli_fetch_array($admin_rs)){
$admin=$row["ULD_LOGINID"];//get admin
}
if($row=mysqli_fetch_array($sadmin_rs)){
$sadmin=$row["ULD_LOGINID"];//get super admin
}
$select_template="SELECT * FROM EMAIL_TEMPLATE_DETAILS WHERE ET_ID=3";
$select_template_rs=mysqli_query($con,$select_template);
if($row=mysqli_fetch_array($select_template_rs)){
$mail_subject=$row["ETD_EMAIL_SUBJECT"];
开发者ID:Rajagunasekaran,项目名称:BACKUP,代码行数:31,代码来源:REMAINDER_MAIL.php
示例16: Breadcrumb
$trail = new Breadcrumb();
?>
<script type="text/javascript">
function logoutHaver(){
location.href = "index.php?func=logout";
}
function changeLangHaver(lang){
location.href = "index.php?func=set_lang&lang="+lang;
}
</script>
<div class="page-bread">
<p><?php
$trail->output();
?>
<b class="user">使用者 : <?php
echo get_login_id();
?>
<input type="button"name="button"class="button60" value="登出" onClick="logoutHaver()" title=""/><br /><br />
Change Language
<select name="change_lang" id="change_lang" onChange="changeLangHaver(this.value);">
<option value="ZH-TW" >繁體中文</option>
<option value="ZH-CN" >简体中文</option>
<option value="DE" >Deutsch</option>
<option value="EN" >English</option>
</select>
</b>
</p>
</div>
<script type="text/javascript">
开发者ID:kingwang317,项目名称:it4fun-guam,代码行数:31,代码来源:plu_header.php
示例17: get_login_id
<?php
require_once 'includes/header.inc.php';
require_once 'includes/user.inc.php';
$q = "SELECT * FROM files WHERE up_user_id='" . get_login_id() . "'";
$res = db_fetch_array(db_query($q), SQLITE_ASSOC);
$keys = array_keys($res['0']);
echo '<table border=1 width=850><tr>';
foreach ($keys as $k) {
echo "\t" . '<td>' . $k . '</td>' . "\n";
}
echo '</tr>' . "\n";
foreach ($res as $r) {
echo '<tr>' . "\n";
foreach ($r as $k => $rt) {
echo "\t" . '<td>';
if ($k == 'file') {
echo '<a href="uploads/' . $rt . '">';
}
echo $rt;
if ($k == 'file') {
echo '</a>';
}
echo '</td>' . "\n";
}
echo '</tr>' . "\n";
}
echo '</table>';
echo '<br /><br />' . "\n";
echo '<a href="' . $_SERVER['HTTP_REFERER'] . '">Back</a>';
require_once 'includes/footer.inc.php';
开发者ID:vulnerabilityCode,项目名称:ctf,代码行数:31,代码来源:fileoverview.php
示例18: user2id
} else {
$tou = user2id($receiver);
}
if (post_save(get_login_id(), $tou, $message)) {
echo 'Message successfully saved!<br />';
} else {
echo ' Problem saving message ... Try again please.<br />';
}
form_msg();
echo '<br /><br />' . "\n";
unset($_GET);
unset($_POST);
echo '<a href="' . $_SERVER['PHP_SELF'] . '">Return to overview</a><br />' . "\n";
} else {
if (!isset($uid)) {
$uid = get_login_id();
}
$q = "SELECT * FROM msgs WHERE to_id='" . sqlite_escape_string($uid) . "'";
$res = db_fetch_array(db_query($q), SQLITE_ASSOC);
$keys = array_keys($res['0']);
echo '<table border=1 width=850><tr>';
foreach ($keys as $k) {
echo "\t" . '<td>' . $k . '</td>' . "\n";
}
echo '</tr>' . "\n";
foreach ($res as $r) {
echo '<tr>' . "\n";
foreach ($r as $rt) {
echo "\t" . '<td>' . $rt . '</td>' . "\n";
}
echo '</tr>' . "\n";
开发者ID:vulnerabilityCode,项目名称:ctf,代码行数:31,代码来源:mailbox.php
示例19: auth_get_modules
function auth_get_modules($site_id = 0, $is_front = null, $mod_type = null, $is_admin = null, $mcat_id = null)
{
$user_id = get_login_id();
if (empty($user_id)) {
return null;
}
$available_funcs = auth_get_functions($user_id, $site_id);
if (empty($available_funcs)) {
return null;
}
$sql_values = "'" . implode("','", $available_funcs) . "'";
$sql = "SELECT DISTINCT m.mod_id, m.mod_name, m.mcat_id, m.mod_order FROM sys_functions AS f, sys_modules AS m ";
$sql .= "WHERE mod_enable = 1 AND func_id IN ({$sql_values}) AND f.mod_id = m.mod_id ";
if (isset($is_admin)) {
$sql .= "AND m.mod_admin = '" . ($is_admin ? 1 : 0) . "' ";
}
if (isset($is_front)) {
$sql .= "AND mod_frontname IS " . ($is_front ? "NOT" : "") . " NULL ";
}
if (isset($mod_type)) {
$mod_type = addslashes($mod_type);
$sql .= "AND m.mod_type = '{$mod_type}' ";
}
if (isset($mcat_id)) {
$mcat_id = addslashes($mcat_id);
$sql .= "AND m.mcat_id = '{$mcat_id}' ";
}
//避免在子站出現不支援的功能
if ($site_id > 0) {
$sql .= "AND m.mod_multi_site = '1' ";
}
$sql .= "ORDER BY m.mod_order, f.func_order";
$db = init_db();
$results = $db->get_results($sql);
if (isset($results)) {
foreach ($results as $row) {
$sub_funcs = auth_get_func_calls($site_id, $row->mod_id);
$data[] = array('mod_id' => $row->mod_id, 'mcat_id' => $row->mcat_id, 'mod_name' => $row->mod_name, 'mod_order' => $row->mod_order, 'func_call' => $sub_funcs);
}
}
return $data;
}
开发者ID:kingwang317,项目名称:it4fun-guam,代码行数:42,代码来源:auth.inc.php
示例20: set_log
function set_log($func_id, $row_id, $status)
{
$db = init_db();
$user_id = get_login_id();
$status = strtoupper($status);
if (!strpos("INSERT,UPDATE,DELETE", $status)) {
echo "status type error";
return true;
}
$sql = "INSERT INTO `sys_log` (`log_id` ,`func_id` ,`row_id` ,`log_status` ,`log_time` ,`user_id`)\r\n\tVALUES (NULL , '{$func_id}', '{$row_id}', '{$status}', 'NOW()', '{$login_id}') ";
$db->query($sql);
}
开发者ID:kingwang317,项目名称:it4fun-guam,代码行数:12,代码来源:std.inc.php
注:本文中的get_login_id函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论