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


PHP getid函数代码示例

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


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

示例1: deleteposting

function deleteposting($uid)
{
    global $dbcon, $board;
    $id = getid($uid);
    if (!$id) {
        $reply = "Your posting is not in the system";
    } else {
        $getuid = $dbcon->Execute("Delete from {$board} where id = " . $dbcon->qstr($id));
        $reply = "Your posting has been removed from the board. <a href=\"{$PHP_SELF}\">Return to {$board} board</a><P>";
    }
    echo $reply;
}
开发者ID:radicaldesigns,项目名称:amp,代码行数:12,代码来源:ride_signin.php

示例2: search

function search()
{
    global $logged;
    if (!isset($_POST['submit'])) {
        $Temp = new Template();
        $Temp->dir = $logged['dskin'];
        $Temp->file = "search_find.tpl";
        $Temp->tp(__LINE__, __FILE__);
        return $Temp->html;
    } else {
        $t = $_POST['s'] == 2 ? 1 : 2;
        $type = $_POST['s'] == 2 ? '`topics`' : '`replies`';
        $type_ = $_POST['s'] == 2 ? '`title`' : '`post`';
        $query = htmlspecialchars($_POST['query']);
        $sql = mysql_query("SELECT * FROM " . $type . " WHERE " . $type_ . " LIKE '%" . $query . "%'");
        if (empty($query) || $query == "") {
            pageerror("Search Error", "Something was blank.", "Looks like you left the search field blank, please go back and try again.");
        }
        if (mysql_num_rows($sql) <= 0) {
            pageerror("Search Error", "Not found", "Looks like there wasn't post or topic in the database that matched your query.");
        }
        $content = "";
        while ($row = mysql_fetch_array($sql)) {
            switch ($t) {
                case 1:
                    if (getFP($row['fid'], 1)) {
                        $Temp = new Template();
                        $Temp->dir = $logged['dskin'];
                        $Temp->file = "search_msg.tpl";
                        $Temp->tp(__LINE__, __FILE__);
                        $Temp->tr(array('TID' => $row['id'], 'TNAME' => $row['title'], 'UID' => getid($row['username']), 'DATE' => !empty($row['date']) ? date("m-d-y", $row['date']) : 'unknown', 'MESSAGE' => nl2br(bbcode_format(getFirstPost($row['id']))), 'POSTER' => $row['username']));
                        $content .= $Temp->html;
                    }
                    break;
                case 2:
                    if (getFP(topic_parent_($row['id']), 1)) {
                        $Temp = new Template();
                        $Temp->dir = $logged['dskin'];
                        $Temp->file = "search_msg.tpl";
                        $Temp->tp(__LINE__, __FILE__);
                        $Temp->tr(array('TID' => $row['tid'], 'TNAME' => topicName($row['title']), 'UID' => getid($row['username']), 'DATE' => !empty($row['date']) ? date("m-d-y", $row['date']) : 'unknown', 'MESSAGE' => nl2br(bbcode_format($row['post'])), 'POSTER' => $row['username']));
                        $content .= $Temp->html;
                    }
                    break;
            }
        }
        if (empty($content) || $content == "") {
            pageerror("Search Error", "Not found", "Looks like there wasn't post or topic in the database that matched your query.");
        }
        return $content;
    }
}
开发者ID:exts,项目名称:nab145,代码行数:52,代码来源:search.php

示例3: emailadd

function emailadd($email)
{
    global $dbcon;
    $MM_insert = 1;
    mt_srand((double) microtime() * 1000000);
    $randval = mt_rand();
    $MM_editTable = "phplist_user_user";
    $MM_fieldsStr = "email|value|confirmed|value|randval|value|htmlemail|value|entered|value";
    $MM_columnsStr = "email|',none,''|confirmed|none,1,1|uniqid|',none,''|htmlemail|none,1,1|entered|',none,now()";
    require "Connections/insetstuff.php";
    require "Connections/dataactions.php";
    $emailid = getid($email);
    return $emailid;
}
开发者ID:radicaldesigns,项目名称:amp,代码行数:14,代码来源:emaillist_functions.php

示例4: users_online

 function users_online()
 {
     $all_users = "";
     echo "<b>Users Online:</b><br />";
     $time = time() - 300;
     $users = mysql_query("SELECT `level`,`username` FROM users WHERE online >= '{$time}' ORDER BY online DESC");
     $USZ = mysql_num_rows($users);
     if ($USZ == 0) {
         echo "There hasn't been anyone online in the past 5 minutes.";
     } else {
         while ($uzas = mysql_fetch_array($users)) {
             $all_users .= "<a style='text-decoration:none;' href='?act=profile&amp;profile;id=" . getid($uzas['username']) . "' title=\"View " . $uzas['username'] . "'s Profile\">" . legend($uzas['level'], $uzas['username']) . "</a>,";
         }
     }
     echo substr($all_users, 0, strlen($all_users) - 1);
 }
开发者ID:exts,项目名称:nab145,代码行数:16,代码来源:wrappers.php

示例5: sql

<?
    require_once '../lib/util.php';
    if (isset($_POST['newuser'])) {
        sql("SELECT uid FROM users WHERE username='{$_POST['username']}';");
        if (getrow()) {
            $message = 'Username already taken';
        } else {
            sql("INSERT INTO users (username, password) VALUES ('{$_POST['username']}', '{$_POST['password']}');");
            session_start();
            $_SESSION['uid'] = getid();
            redirect($_POST['redirect']);
            die("You are now logged in (for some reason the redirect didn't work)");
        }
    } else {
        sql("SELECT uid FROM users WHERE username='{$_POST['username']}' AND password='{$_POST['password']}';");
        if ($row = getrow()) {
            session_start();
            $_SESSION['uid'] = $row['uid'];
            redirect($_POST['redirect']);
            die("You are now logged in (for some reason the redirect didn't work)");
        }
    }
?>
<html>
    <head><title>Login</title></head>
    <body>
        <h1> DISCLAIMER: <font color=red>Do not use your real password</font></h1>
        <hr>
        Log in:
        <form method='POST'>
            <? hiddenInputs($_GET) ?>
开发者ID:JonLoesch,项目名称:security,代码行数:31,代码来源:login.php

示例6: getid

<!DOCTYPE html>

<?php 
include "includes/app_top.php";
$getid = getid('rid');
checkUserLogin();
include "includes/styles.php";
include "../includes/colorbox.php";
?>
<script type="text/javascript">  
function validatefilter() {	
if(document.getElementById('keyword').value=='') {
alert("Enter keyword");
document.getElementById('keyword').focus();
return false;
}
} 
</script>

<link rel="stylesheet" href="../css/styles.css" type="text/css" />
    
<meta name="viewport" content="initial-scale=1.0, user-scalable=no">
<meta charset="utf-8">

</head>
<body>
<?php 
include "includes/header.php";
?>
<div class="division-1">
<h1>LEADERBOARDS</h1>
开发者ID:AamAadmiParty,项目名称:emc3,代码行数:31,代码来源:dashboard.php

示例7: session_start

 <?php 
require_once 'include/db_connect.php';
session_start();
if (!$_SESSION['name']) {
    header("Location:index.php");
}
?>
       
<?php 
require_once 'include/db_connect.php';
require_once 'functions.php';
$lname = $_SESSION['name'];
$pid1 = getid($lname, 'user_id');
#echo $pid1;
?>




<?php 
require_once 'include/db_connect.php';
require_once 'functions.php';
$my_id = $pid1;
$action = mysql_real_escape_string($_GET['action']);
$user = mysql_real_escape_string($_GET['user']);
if ($action == 'send') {
    $in = mysql_query("insert into frnd_req(from1,to1) values('{$my_id}','{$user}')");
}
if ($action == 'cancel') {
    $in = mysql_query("delete from frnd_req where from1='{$my_id}' and to1='{$user}'");
}
开发者ID:syed-mudasir,项目名称:social-network,代码行数:31,代码来源:action.php

示例8: getid

<?php

include "includes/app_top.php";
$pcat = "Website";
$pagetitle = "FAQS";
$getid = getid('id');
$pid = getid('pid');
$t = get('t');
checkAdminLogin();
checkState();
if ($action == "addvideo") {
    $orderno = $_POST['orderno'] != '' ? cleanQuery($_POST['orderno']) : 20;
    $query = "insert into videos(heading,state_id,  orderno, youtube, datemodified) VALUE ('" . cleanQuery($_POST['heading']) . "','" . cleanQuery($_POST['stateid']) . "', " . $orderno . ",'" . cleanQuery($_POST['videoid']) . "','{$date}')";
    mysqli_query($mysqli, $query);
    // echo $query;
    tep_redirect(tep_href_link($pagename, 'action1=add&action=add'));
}
if ($action == "change") {
    $orderno = $_POST['orderno2'] != '' ? cleanQuery($_POST['orderno2']) : 20;
    $query = "update videos set heading='" . cleanQuery($_POST['heading2']) . "',state_id='" . cleanQuery($_POST['stateid']) . "', orderno=" . $orderno . ", youtube='" . cleanQuery($_POST['videoid2']) . "', datemodified='{$date}'  where id=" . $getid;
    mysqli_query($mysqli, $query);
    tep_redirect(tep_href_link($pagename, 'action1=update'));
}
?>
 
<?php 
include "includes/styles.php";
include "includes/colorbox.php";
?>
<script type="text/javascript">
function validate1(form){
开发者ID:AamAadmiParty,项目名称:emc3,代码行数:31,代码来源:faqs.php

示例9: getid

    if (!($r % 2)) {
        echo '
      <tr>
        <td>&nbsp;</td>
        <td>
		<div class="card">
        ' . getid($_REQUEST["sel_students"][$r]) . '
        </div>
		</td>
				';
    } else {
        echo '
        <td ' . setput($spaceb) . '>&nbsp;</td>
        <td>
        <div class="card">
        ' . getid($_REQUEST["sel_students"][$r]) . '
        </div>
        </td>
        <td>&nbsp;</td>
      </tr>
				';
        $tr_close = 1;
    }
    ?>
		
    <?php 
}
//End ::: for($r = 0; $r < count($_REQUEST["sel_students"]); $r++)
if (!$tr_close) {
    echo "</tr>\n";
}
开发者ID:wikiwyrhead,项目名称:openSIS-ID-Card-Addon,代码行数:31,代码来源:for_idcardexpt.php

示例10: getid

<?php

require_once 'include/db_connect.php';
require_once 'functions.php';
$uname = $_POST['uname'];
$sname = $_POST['sname'];
$hsname = $_POST['hsname'];
$gname = $_POST['gname'];
$pgname = $_POST['pgname'];
$i1 = $_POST['i1'];
$i2 = $_POST['i2'];
$s1 = $_POST['s1'];
$s2 = $_POST['s2'];
$gender = $_POST['sex'];
$you = $_POST['you'];
$uid1 = getid($uname, 'user_id');
$category;
if ($gname !== "null") {
    $ghash = rand(1004545, 44646546464.0);
} else {
    $ghash = 1004546;
    gnone();
}
$shash = rand(205, 546844);
if ($hsname !== "null") {
    $hhash = rand(141, 541654165465.0);
} else {
    $hhash = 142;
    inone();
}
if ($pgname !== "null") {
开发者ID:syed-mudasir,项目名称:social-network,代码行数:31,代码来源:reverification1.php

示例11: checkAdminLogin

<?php

include "includes/app_top.php";
$pcat = "Members";
$pagetitle = "Send Mail";
checkAdminLogin();
checkState();
$getid = getid('id');
$mid = getid('mid');
$aid = getid('aid');
$aa = "";
if ($action == 'send') {
    $email = cleanQuery($_POST['emailfrom']);
    $esubject = $_POST['subject2'];
    $emailtext = "<div style='font-family:Trebuchet MS; font-size:13px;'>" . $_POST['description'] . "</div>";
    $text = $_POST['emails'];
    $list = split("[\n\t\r,]+", $text);
    # This sends the email to the addresses entered
    $no = count($list);
    $emailtext = str_replace("'", "\\'", $emailtext);
    $emailtext = str_replace('\\"', '"', $emailtext);
    require 'includes/mailer.php';
    for ($i = 0; $i < $no; $i++) {
        sendmail($email, "Aam Aadmi Party", $list[$i], $esubject, $emailtext);
        //$aa=@mail("$list[$i]", $esubject, $emailtext, "From: $email\r\nReply-to: $email\r\nContent-type: text/html; charset=utf-8");
    }
    //if($aa)
    tep_redirect(tep_href_link($pagename, 'action1=success'));
    //else
    //tep_redirect(tep_href_link($pagename,'action1=err'));
    //echo $esubject.'<br/>'.$emailtext;
开发者ID:AamAadmiParty,项目名称:emc3,代码行数:31,代码来源:send-mail.php

示例12: TicketMessageCreate

 function TicketMessageCreate()
 {
     Server::InitCacheManager();
     $message = new TicketMessage();
     $params = ApiV2::GetObjectFields("TicketMessage");
     if ($message = $this->CreateFromJSON($params, json_decode($_POST["p_data"]), $message, "TicketMessage")) {
         $ticket = new Ticket($message->TicketId, true);
         $ticket->LoadMessages();
         if (count($ticket->Messages) == 0) {
             $message->Id = $ticket->Id;
         } else {
             $message->Id = getid(32);
         }
         if (!empty($message->SenderId)) {
             if (Operator::GetSystemId($message->SenderId) != null) {
                 $message->SenderUserId = Operator::GetSystemId($message->SenderId);
             }
         }
         if (is_array($message->Customs)) {
             $message->Customs = ApiV2::ToNameBasedArray($message->Customs);
             $message->Customs = DataInput::ToIndexBased($message->Customs);
         }
         if (is_array($message->Comments)) {
             foreach ($message->Comments as $comar) {
                 $message->AddComment($comar[0], $ticket->Id, $comar[1]);
             }
         }
         if (empty($message->ChannelId)) {
             $message->ChannelId = getId(32);
         }
         $message->Hash = $ticket->GetHash();
         $message->Save($ticket->Id);
         if (!empty($_POST["p_sendemailreply"])) {
             $ticket->Load();
             $ticket->SendEditorReply($message->Id, !empty($_POST["p_quotemessageid"]) ? $_POST["p_quotemessageid"] : "");
         }
         if (!empty($_POST["p_sendemailresponder"])) {
             $ticket->Load();
             $ticket->SendAutoresponder(null, null, $message);
         }
         $ticket->SetLastUpdate(time());
         $this->JSONOutput = APIV2::Encode(array("TicketMessage" => ApiV2::ClearObject($params, $message)), $this->JSONParams);
     }
 }
开发者ID:sgh1986915,项目名称:laravel-eyerideonline,代码行数:44,代码来源:objects.apiv2.inc.php

示例13: TicketMessageCreate

 function TicketMessageCreate()
 {
     $message = new TicketMessage();
     $params = ApiV2::GetObjectFields("TicketMessage");
     if ($message = $this->CreateFromJSON($params, json_decode($_POST["p_data"]), $message, "TicketMessage")) {
         $ticket = new Ticket($message->TicketId, true);
         $ticket->LoadMessages();
         if (count($ticket->Messages) == 0) {
             $message->Id = $ticket->Id;
         } else {
             $message->Id = getid(32);
         }
         if (is_array($message->Customs)) {
             $message->Customs = ApiV2::ToNameBasedArray($message->Customs);
             $message->Customs = DataInput::ToIndexBased($message->Customs);
         }
         if (is_array($message->Comments)) {
             foreach ($message->Comments as $comar) {
                 $message->AddComment($comar[0], $ticket->Id, $comar[1]);
             }
         }
         if (empty($message->ChannelId)) {
             $message->ChannelId = getId(32);
         }
         $message->Hash = $ticket->GetHash();
         $message->Save($ticket->Id);
         $this->JSONOutput = APIV2::Encode(array("TicketMessage" => ApiV2::ClearObject($params, $message)), $this->JSONParams);
     }
 }
开发者ID:bgabor,项目名称:RenaniaOpencart,代码行数:29,代码来源:objects.apiv2.inc.php

示例14: doid

function doid($file)
{
    return str_replace("../", "", $file) . ": <br>&nbsp; &nbsp; ID[" . getid($file) . "] MD5[" . getmd5($file) . "]<br>";
}
开发者ID:hky,项目名称:bytehoard,代码行数:4,代码来源:sysinfo.inc.php

示例15: Hashmap

 $HUSERLIST = new Hashmap();
 $user_id = $facebook->getUser();
 $H1 = getid($facebook, $user_id);
 //1st time get user's
 // echo array_sum($H->values());
 //print_r ($H);
 $H->putAll($H1);
 $one = $H1->keys();
 $HUSERLIST->put($user_id, $one);
 //print_r ($one);
 echo "</br>";
 for ($i = 0; $i < count($one); $i++) {
     //2nd get user's 1st
     //echo ($one[$i])."</br>";
     // echo $i."</br>";
     $H2 = getid($facebook, $one[$i]);
     $f1 = $H1->get($one[$i]);
     $H->mulAll($H2, 0.7 + 0.2 * $f1);
     $one2 = $H2->keys();
     $HUSERLIST->put($one[$i], $one2);
 }
 $H->putAll($H1);
 $H->remove($user_id);
 //echo "H:".array_sum($H->values());
 $H->Hsort();
 // print_r ($H);
 $endk = $H->keys();
 $enflist = array_diff($endk, $flist);
 $eflist = array_diff($endk, $enflist);
 //print_r ($endk);
 $ecou = count($endk);
开发者ID:eaglerayp,项目名称:IR-Facebook-friends,代码行数:31,代码来源:IRproj1.php


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