本文整理汇总了PHP中getVar函数的典型用法代码示例。如果您正苦于以下问题:PHP getVar函数的具体用法?PHP getVar怎么用?PHP getVar使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了getVar函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: process
/**
* save the changes...
*/
function process()
{
global $errors, $selected, $create, $sitepage_CLNID, $cluster_node_NAME, $db, $oid, $sid, $clt;
$this->check();
if ($selected != "0" && $sitepage_CLNID != "0" && $sitepage_CLNID != "") {
$mid = getVar("mid");
$sql = "UPDATE sitepage SET CLNID = {$sitepage_CLNID} WHERE SPID = {$oid}";
$query = new query($db, $sql);
$query->free();
// reload page, now in editing mode...
global $db;
$db->close();
header("Location: sitepagebrowser.php?sid={$sid}&mid={$mid}&action=editobject&go=update&oid={$oid}");
exit;
} else {
if ($create != "0" && $errors == "") {
$mid = getVar("mid");
$nextId = nextGUID();
$sql = "INSERT INTO cluster_node (CLNID, CLT_ID, NAME, DELETED) VALUES({$nextId}, {$clt}, '{$cluster_node_NAME}', 0)";
$query = new query($db, $sql);
$sql = "UPDATE sitepage SET CLNID = {$nextId} WHERE SPID = {$oid}";
$query = new query($db, $sql);
$query->free();
$backup = $oid;
$oid = $nextId;
syncClusterVariations();
$oid = $backup;
global $db;
$db->close();
header("Location: sitepagebrowser.php?sid={$sid}&mid={$mid}&action=editobject&go=update&oid={$oid}");
exit;
}
}
}
开发者ID:BackupTheBerlios,项目名称:nxwcms-svn,代码行数:37,代码来源:logic_selectcluster.inc.php
示例2: getVariables
function getVariables($id, $con)
{
$url = 'https://bugzilla.mozilla.org/rest/bug?id=' . $id . '';
$url_comment = 'https://bugzilla.mozilla.org/rest/bug/' . $id . '/comment';
$url_changes = 'https://bugzilla.mozilla.org/rest/bug/' . $id . '/history';
getVar($url, $url_comment, $url_changes, $id, $con);
}
开发者ID:Triumvirato,项目名称:Tesi,代码行数:7,代码来源:pag1.php
示例3: RenderPage_login
function RenderPage_login()
{
global $config, $html;
$config['title'] = 'Login';
$html->setPageFrame('basic');
// load page html
$html->LoadCss('login.css');
$outputs = RenderHTML::LoadHTML('pages/login.php');
if (!is_array($outputs)) {
echo 'Failed to load html!';
exit;
}
// display error
$messages = '';
if (isset($_SESSION['error'])) {
if (is_array($_SESSION['error'])) {
foreach ($_SESSION['error'] as $msg) {
$messages .= str_replace('{message}', $msg, $outputs['error']);
}
} else {
$messages .= str_replace('{message}', $_SESSION['error'], $outputs['error']);
}
unset($_SESSION['error']);
}
$tags = array('messages' => $messages, 'username' => $config['demo'] ? 'demo' : getVar(LOGIN_FORM_USERNAME), 'password' => $config['demo'] ? 'demo' : '');
RenderHTML::RenderTags($outputs['body'], $tags);
unset($tags, $messages);
return $outputs['body'];
}
开发者ID:GRANTSWIM4,项目名称:WebAuctionPlus-1.2,代码行数:29,代码来源:login.php
示例4: cron_main
/**
* main cron function
* @return string
*/
function cron_main()
{
global $config;
// always send reminders and reminders
churchcore_sendReminders();
churchcore_sendMails();
if (getVar("standby")) {
// email with feedback image
if ($id = getVar("mailqueue_id")) {
db_query("UPDATE {cc_mail_queue} \n SET reading_count = reading_count + 1 \n WHERE id=:id", array(":id" => $id));
}
// Check if it's time to do a normal cron job
if (getConf("cronjob_delay") > 0) {
$last_cron = db_query("SELECT value old, UNIX_TIMESTAMP() act \n FROM {cc_config} \n WHERE name='last_cron'")->fetch();
if ($last_cron) {
if ($last_cron->act - $config["cronjob_delay"] > $last_cron->old) {
db_query("UPDATE {cc_config} \n SET VALUE= UNIX_TIMESTAMP() \n WHERE name='last_cron'");
do_cron();
}
}
}
header('Content-Type: image/gif');
//tiniest transparent GIF, credit: http://probablyprogramming.com/2009/03/15/the-tiniest-gif-ever
echo base64_decode('R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==');
} else {
do_cron();
if (getVar("manual")) {
addInfoMessage(t("cronjob.succeed"));
return " ";
}
}
}
开发者ID:toXel,项目名称:churchtools_basic,代码行数:36,代码来源:cron.php
示例5: resetPassword
function resetPassword()
{
global $db;
$this->editAccount();
$oldpwd = getVar('old-pwd', NULL, $_REQUEST, 'string');
$pwd = getVar('password', NULL, $_REQUEST, 'string');
$retpwd = getVar('retype-pwd', NULL, $_REQUEST, 'string');
$authtype = AUTHENTICATION;
if ($authtype != "internal") {
echo "<script> \$('#pwd-data').prepend('<font color=orange>Feature not supported for this authentication mode!<br></font>');</script>";
} else {
if ($retpwd != $pwd) {
echo "<script> \$('#pwd-data').prepend('<font color=red>The two passwords do not match!<br></font>');</script>";
} else {
$user = $_SESSION['loggedin'];
$query = $db->makeQuery("select password from homer_logon where useremail = '?'", $user);
$res = $db->loadObjectList($query);
if (count($res) > 0) {
$pass_column = "password";
$oldpwd_db = $res[0]->{$pass_column};
if ($oldpwd_db != md5($oldpwd)) {
echo "<script> \$('#pwd-data').prepend('<font color=red>The old password is not correct!<br></font>');</script>";
} else {
$query = $db->makeQuery("update homer_logon SET password ='?' WHERE useremail = '?' limit 1;", md5($pwd), $_SESSION['loggedin']);
$db->executeQuery($query);
echo "<script> \$('#pwd-data').prepend('<font color=green>Password reset successfuly.<br></font>');</script>";
}
} else {
echo "<script> \$('#pwd-data').prepend('<font color=red>Logged user not found!<br></font>');</script>";
}
}
}
}
开发者ID:linuxmaniac,项目名称:homer,代码行数:33,代码来源:account.php
示例6: AbstractEnvelope
/**
* Standard constructor
* @param integer ID of the Cluster-Template-Item that is used to create this Content-Item.
* @param integer ID of the Cluster-Variation the clti is from.
* @param booleean Forced Edit-All-Mode
* @param booleaan Suppress permissions checks
*/
function AbstractEnvelope($clti, $cl, $forceEditAll=false, $isExternal = false) {
global $db, $lang, $aclf, $isArticle;
$this->forceEditAll = $forceEditAll;
$this->clti = $clti;
$this->cl = $cl;
$this->action = value("action");
$this->saction = value("saction");
$this->eid = value("eid", "NUMERIC");
if ($this->action == "0" || $this->action == "")
$this->action = value("acstate");
if (value("saction", "", "") != "")
$this->action = getVar("lastaction");
// Get the other configuration variables...
$sql = "SELECT MINCARD, MAXCARD, NAME, FKID FROM cluster_template_items WHERE CLTI_ID = $clti";
$query = new query($db, $sql);
$query->getrow();
$this->mincard = $query->field("MINCARD");
$this->maxcard = $query->field("MAXCARD");
$this->name = $query->field("NAME");
$this->plugin = $query->field("FKID");
$query->free();
$this->editState = (($this->action == $lang->get("edit_all")) || ($this->action == $lang->get("save") || $this->action == $lang->get("save_back") || $this->action == "editsingle" || value("status") == "editsingle") && $this->action != $lang->get("back")) || $isArticle || $forceEditAll;
if ($isExternal) {
$this->developer = true;
$this->editor = true;
} else {
$this->developer = $aclf->checkAccessToFunction("EDIT_CL_CONTENT");
$this->editor = $aclf->checkAccessToFunction("EDIT_CL_CONTENT");
}
$this->members = $this->getItemData();
$this->prepare_overview();
}
开发者ID:BackupTheBerlios,项目名称:nxwcms-svn,代码行数:42,代码来源:abstract_envelope.php
示例7: call
/**
* Call function and returns JSON result
*
* @return string
*/
function call()
{
$params = isset($_GET["func"]) ? $_GET : $_POST;
if (!($func = getVar('func'))) {
return jsend()->error("Parameter func nicht definiert!");
}
try {
if (method_exists($this->module, $func)) {
return jsend()->success($this->module->{$func}($params));
}
if (!isset($this->funcs[$func])) {
return jsend()->error("Function {$func} was not defined as Function!");
}
$func = $this->funcs[$func];
if ($func["auth"] != null) {
// Split auth string for OR-Combinations
$allowed = false;
foreach (explode('||', $func["auth"]) as $val) {
if (user_access(trim($val), $func["module"])) {
$allowed = true;
}
}
if (!$allowed) {
throw new CTNoPermission($func["auth"], $func["module"]);
}
}
return jsend()->success(call_user_func($this->getFunctionName($func["name"]), $params));
} catch (CTFail $e) {
return jsend()->fail($e);
} catch (CTNoPermission $e) {
return jsend()->fail($e);
} catch (Exception $e) {
return jsend()->error($e);
}
}
开发者ID:toXel,项目名称:churchtools_basic,代码行数:40,代码来源:CTAjaxHandler.class.php
示例8: getVar
function getVar($v, $d = '')
{
if (isset($_GLOBAL[$v])) {
return $_GLOBAL[$v];
}
if (isset($_SESSION[$v])) {
return $_SESSION[$v];
}
if (isset($_COOKIE[$v])) {
return $_COOKIE[$v];
}
if (isset($_GET[$v])) {
return $_GET[$v];
}
if (isset($_POST[$v])) {
return $_POST[$v];
}
if (isset($_FILES[$v])) {
return $_FILES[$v];
}
if (isset($_SESSION['userdata'][$v]) && $v != 'password') {
return $_SESSION['userdata'][$v];
}
if (isset($_SESSION['forms'][$v])) {
return $_SESSION['forms'][$v];
}
if ($v != strtolower($v)) {
return getVar(strtolower($v), $d);
}
return $d;
}
开发者ID:AmandaSyachri,项目名称:webworks-webme,代码行数:31,代码来源:common.php
示例9: PageMain
function PageMain()
{
global $template, $templatesdir, $includesdir, $config;
//Do any page logic here.
//If $using_db is set in standard_page_logic.inc the global $db
//will be set. Most db queries should be done in a class library, though.
//This simple example does stuff internally. For complicated json, you
//might be better off making a json template in templates/js
$template['callback'] = getVar('callback');
$template['echo'] = getVar('echo');
if ($template['callback'] != "" && preg_match('/^\\w+$/', $template['callback'])) {
//use jsonp
header('Content-type: text/javascript');
} else {
//standard json
header('Content-type: application/json');
}
$pid = getVar('plusid');
if ($pid == "") {
$pid = '109463793347920104139';
}
$person = new PlusPerson();
$person->loadByGooglePlusID($pid);
if ($person->plusperson_id == 0) {
$person->googleplus_id = $pid;
$person->updateFromGooglePlusService();
$person->insertIntoDB();
} else {
if (strtotime($person->modified_dt) < strtotime("-6 hours")) {
$person->updateFromGooglePlusService();
$person->fetched_relationships = 0;
$person->updateDB();
}
}
//Get the posts from G+
$posts = PlusPost::FetchActivityStream($person->googleplus_id);
//Save them all into the DB (merge will try to update them if they exist already)
foreach ($posts as $post) {
$post->mergeStreamPostIntoDB();
}
$postsdata = array();
foreach ($posts as $post) {
$data = array('googleplus_postid' => $post->googleplus_postid, 'author_id' => $post->author_id, 'post_data' => $post->post_data, 'share_content' => $post->share_content, 'shared_postid' => $post->shared_postid);
$postsdata[] = $data;
}
$persondata = array('googleplus_id' => $person->googleplus_id, 'first_name' => $person->first_name, 'last_name' => $person->last_name, 'profile_photo' => $person->profile_photo, 'introduction' => $person->introduction, 'subhead' => $person->subhead);
$data = array('plusperson' => $persondata, 'posts' => $postsdata);
$responsedata = json_encode($data);
//wrap jsonp if necessary
if ($template['callback'] != "" && preg_match('/^\\w+$/', $template['callback'])) {
$responsedata = $template['callback'] . '(' . $responsedata . ');';
}
echo $responsedata;
}
开发者ID:haytxamard,项目名称:php.googleplusapi,代码行数:54,代码来源:getplusposts.php
示例10: ObjectForm
/**
* standard constructor
* @param string $headline Headline, to be displayed in the form
* @param string $icon Icon, to be displayed in the form. Name of the file, stored in images folder.
* @param string $name Name of the form. Will be used in HTML.
* @param string $action Next script, that shall be called when submitting. Empty if self.
* @param string $method POST or GET for sending the form. POST is default and strongly recommended
* @param string $enctype Specify the enctype for the form. Use only when submitting files as multipart.
*/
function ObjectForm($headline, $icon = "", $name = "form1", $action = "", $method = "POST", $enctype = "") {
Form::Form($headline, $icon, $name, $action, $method, $enctype);
// initialize with values.
global $oid, $action, $variation, $changevariation;
$this->oid = $oid;
$this->externalAction = $action;
$this->title = getDBCell("content", "NAME", "CID = $oid");
$this->headline .= ": " . $this->title;
// get current variation!
if (isset($variation) && isset($changevariation))
pushVar("variation", $variation);
$this->variation = getVar("variation");
if ($this->variation == 0)
$this->variation = 1; // set to standard.
$this->populateVariations();
// get current edit-scheme (META or CONTENT)
global $changeeditor, $lang, $processing, $page_state;
if (isset($changeeditor)) {
pushVar("schemeEditor", $changeeditor);
$processing = ""; // enable database loading if switched.
$page_state = "START";
}
$this->editor = getVar("schemeEditor");
if ($this->editor == "")
$this->editor = $lang->get("ed_content");
// prepare the form drawing.
// check, if variation is defined or not.
if (count($this->variations) > 0) {
// define sniplets.
$this->draw_jobButton();
$this->draw_variationSelector();
$this->draw_myBody();
$this->draw_config();
} else {
global $lang;
$this->addToTopText($lang->get("no_variations"));
$this->setTopStyle($this->errorstyle);
}
}
开发者ID:BackupTheBerlios,项目名称:nxwcms-svn,代码行数:61,代码来源:object_form.php
示例11: RenderPage_login
function RenderPage_login()
{
global $config, $html;
$config['title'] = 'Login';
$html->setPageFrame('basic');
// load page html
$html->LoadCss('login.css');
$outputs = RenderHTML::LoadHTML('pages/login.php');
$html->addTags(array('messages' => '', 'username' => $config['demo'] ? 'demo' : getVar(LOGIN_FORM_USERNAME), 'password' => $config['demo'] ? 'demo' : ''));
// display error
if (getVar('error') != '') {
$html->addTags(array('messages' => str_replace('{message}', 'Login Failed', $outputs['error'])));
}
return $outputs['body'];
}
开发者ID:Furt,项目名称:WebAuctionPlus,代码行数:15,代码来源:login.php
示例12: Search_showResults
/**
* retrieve list of search results
*
* @return string HTML list of search results
*/
function Search_showResults()
{
// { variables
global $PAGEDATA;
$start = getVar('start', 0);
$search = getVar('search');
if (!$search) {
return '<em id="searchResultsTitle">no search text entered</em>';
}
$totalfound = 0;
$c = '';
// }
// { pages
$q = dbAll('select * from pages where (name like "%' . $search . '%" or body like "%' . $search . '%") order by edate desc limit ' . $start . ',20');
$n = count($q);
if ($n > 0) {
$totalfound += $n;
foreach ($q as $p) {
Page::getInstance($p['id'], $p);
}
$q = array_slice($q, $start, 20);
$c .= '<h2>' . __('Page Search Results') . '</h2><em id="searchResultsTitle">';
if ($n == 1) {
$c .= __('1 result found');
} else {
$c .= __('%1 results found', $n);
}
$c .= '</em> <div>';
if ($start > 0) {
$c .= '[<a href="' . $PAGEDATA->getRelativeURL() . '?search=' . urlencode($search) . '&start=' . ($start - 20) . '">previous 20</a>] ';
}
if ($start + 20 < $n) {
$c .= '[<a href="' . $PAGEDATA->getRelativeURL() . '?search=' . urlencode($search) . '&start=' . ($start + 20) . '">next 20</a>] ';
}
$c .= '<ol start="' . ($start + 1) . '" id="searchResults">';
foreach ($q as $r) {
$title = $r['title'] == '' ? $r['name'] : $r['title'];
$c .= '<li><h4>' . htmlspecialchars($title) . '</h4>' . '<p>' . substr(preg_replace('/<[^>]*>/', '', $r['body']), 0, 200) . '...<br /><a href="/' . urlencode($r['name']) . '?search=' . $search . '">/' . htmlspecialchars($r['name']) . '</a></p></li>';
}
$c .= '</ol></div>';
}
// }
if (!$totalfound) {
$c .= '<em id="searchResultsTitle">no results found</em>';
}
return $c;
}
开发者ID:AmandaSyachri,项目名称:webworks-webme,代码行数:52,代码来源:search.php
示例13: getVarClean
function getVarClean($name, $type = '', $defaultValue = NULL)
{
$var = getVar($name);
$var = cleanVar($var);
if ($var == '' && $defaultValue !== NULL) {
return $defaultValue;
}
if (!isset($type)) {
return $var;
}
switch ($type) {
case 'bool':
if (is_bool($var)) {
return $var;
}
break;
case 'str':
case 'string':
if (is_string($var)) {
return $var;
}
break;
case 'object':
if (is_object($var)) {
return $var;
}
break;
case 'array':
if (is_array($var)) {
return $var;
}
break;
case 'float':
case 'int':
case 'numeric':
if (is_numeric($var)) {
return $var;
}
break;
default:
return $var;
}
if (isset($defaultValue)) {
return $defaultValue;
}
return '';
}
开发者ID:wiliamdecosta,项目名称:ifalconi_oci_responsive,代码行数:47,代码来源:request_helper.php
示例14: PageMain
function PageMain()
{
global $template, $templatesdir, $includesdir, $config;
//Do any page logic here.
//If $using_db is set in standard_page_logic.inc the global $db
//will be set. Most db queries should be done in a class library, though.
//This simple example does stuff internally. For complicated json, you
//might be better off making a json template in templates/js
$template['callback'] = getVar('callback');
$template['echo'] = getVar('echo');
if ($template['callback'] != "" && preg_match('/^\\w+$/', $template['callback'])) {
//use jsonp
header('Content-type: text/javascript');
} else {
//standard json
header('Content-type: application/json');
}
$pid = getVar('plusid');
if ($pid == "") {
$pid = '109463793347920104139';
}
$plookup = array();
$linklookup = array();
$people = array();
$links = array();
//This person
$person = getCachedPerson($pid);
$pdata = extractPersonData($person, 0);
$plookup[$pdata['id']] = 1;
//Followees
$followees = PlusPerson::FetchVisiblePlusPeople($person->googleplus_id);
foreach ($followees as $followee) {
$pdata = extractPersonData($followee, 1);
if (!isset($plookup[$pdata['id']])) {
$people[] = $pdata;
$plookup[$pdata['id']] = 1;
}
}
$data = array('person' => extractPersonData($person, 0), 'relationships' => $people);
$responsedata = json_encode($data);
//wrap jsonp if necessary
if ($template['callback'] != "" && preg_match('/^\\w+$/', $template['callback'])) {
$responsedata = $template['callback'] . '(' . $responsedata . ');';
}
echo $responsedata;
}
开发者ID:haytxamard,项目名称:php.googleplusapi,代码行数:46,代码来源:getencircled.php
示例15: isSelected
function isSelected($name, $option, $default = false, $return = false)
{
if (postVar($name, true) == $option || getVar($name, true) == $option) {
/* make sure == not used (for string to int comparison) */
if ($return) {
return 'selected';
}
echo 'selected';
} else {
if (!postVar($name, true) && !getVar($name, true) && $default) {
if ($return) {
return 'selected';
}
echo 'selected';
}
}
}
开发者ID:bitcalc,项目名称:snippets,代码行数:17,代码来源:functions.php
示例16: getLastPage
function getLastPage()
{
global $config;
if (!empty($config['lastpage'])) {
return $config['lastpage'];
}
$lastpage = getVar('lastpage');
if (empty($lastpage)) {
$lastpage = @$_SERVER['HTTP_REFERER'];
} elseif (startsWith($lastpage, 'page-')) {
$lastpage = './?page=' . substr($lastpage, strlen('page-'));
}
if (empty($lastpage)) {
$lastpage = './';
}
$config['lastpage'] = $lastpage;
return $lastpage;
}
开发者ID:GRANTSWIM4,项目名称:WebAuctionPlus-1.2,代码行数:18,代码来源:inc.php
示例17: CreateHtml
function CreateHtml()
{
global $sid;
if (!isset($sid)) {
$sid = getVar($sid);
}
$HtmlValue = htmlspecialchars($this->Value);
$Html = '<div>';
if ($this->IsCompatible()) {
if (isset($_GET['fcksource']) && $_GET['fcksource'] == "true") {
$File = 'fckeditor.original.html';
} else {
$File = 'fckeditor.html';
}
$Link = "{$this->BasePath}editor/{$File}?InstanceName={$this->InstanceName}&sid={$sid}";
if ($this->ToolbarSet != '') {
$Link .= "&Toolbar={$this->ToolbarSet}";
}
// Render the linked hidden field.
$Html .= "<input type=\"hidden\" id=\"{$this->InstanceName}\" name=\"{$this->InstanceName}\" value=\"{$HtmlValue}\" style=\"display:none\" />";
// Render the configurations hidden field.
$Html .= "<input type=\"hidden\" id=\"{$this->InstanceName}___Config\" value=\"" . $this->GetConfigFieldString() . "\" style=\"display:none\" />";
// Render the editor IFRAME.
$Html .= "<iframe id=\"{$this->InstanceName}___Frame\" src=\"{$Link}\" width=\"{$this->Width}\" height=\"{$this->Height}\" frameborder=\"0\" scrolling=\"no\"></iframe>";
} else {
if (strpos($this->Width, '%') === false) {
$WidthCSS = $this->Width . 'px';
} else {
$WidthCSS = $this->Width;
}
if (strpos($this->Height, '%') === false) {
$HeightCSS = $this->Height . 'px';
} else {
$HeightCSS = $this->Height;
}
$Html .= "<textarea name=\"{$this->InstanceName}\" rows=\"4\" cols=\"40\" style=\"width: {$WidthCSS}; height: {$HeightCSS}\">{$HtmlValue}</textarea>";
}
$Html .= '</div>';
return $Html;
}
开发者ID:BackupTheBerlios,项目名称:nxwcms-svn,代码行数:40,代码来源:fckeditor_php5.php
示例18: TabBar
/**
* standard constructor.
*/
function TabBar($tabid = 'menu', $id = "mmid")
{
$this->id = $id;
$temp_menu = $_GET[$this->id];
if ($temp_menu == '') {
$temp_menu = $_POST[$this->id];
}
if ($temp_menu == '') {
$temp_menu = getVar($tabid);
}
$this->selectedMenu = 1;
$this->selectedSubmenu = 0;
if ($temp_menu != "") {
//process the menu id (mid) now.
// it has Form: <menu>x<submenu>
$msplit = explode("x", $temp_menu);
$this->selectedMenu = $msplit[0];
$this->selectedSubmenu = $msplit[1];
}
pushVar($tabid, $temp_menu);
$this->doc = $_SERVER['REQUEST_URI'];
}
开发者ID:BackupTheBerlios,项目名称:nxwcms-svn,代码行数:25,代码来源:tabbar.php
示例19: icqStatus
function icqStatus($uin, $return = false)
{
$stored = getVar('icq:' . $uin);
$upd = true;
$nowtime = time();
if (!empty($stored)) {
$stored = unserialize($stored);
if ($stored['when'] + 3600 <= $nowtime) {
$upd = true;
} else {
$upd = false;
}
}
if ($upd) {
//Проверка icq статуса
$status = 'na';
$fp = @fsockopen("status.icq.com", 80);
if ($fp) {
fputs($fp, "GET /online.gif?icq={$uin}&img=5 HTTP/1.0\n\n");
while ($line = fgets($fp, 128)) {
if (strpos($line, 'Location') !== false) {
if (strpos($line, 'online1') !== false) {
$status = 'online';
} elseif (strpos($line, 'online0') !== false) {
$status = 'offline';
}
break;
}
}
}
$stored = array('when' => $nowtime, 'status' => $status);
setVar('icq:' . $uin, serialize($stored));
}
if ($return) {
return $stored['status'];
} else {
echo '<img src="/Images/Icons/icq/' . $stored['status'] . '.gif" width="15" height="15" alt="icq ' . $stored['status'] . '" /> ' . $uin;
}
}
开发者ID:holycheater,项目名称:Booot,代码行数:39,代码来源:additionalFunctions.php
示例20: cmsmenu
/**
* standard constructor.
*/
function cmsmenu() {
global $mid, $auth;
$temp_menu = "";
if (!isset($mid)) {
$temp_menu = getVar("menu");
} else {
$temp_menu = $mid;
}
if ($temp_menu != "") {
//process the menu id (mid) now.
// it has Form: <menu>x<submenu>
$msplit = explode("x", $temp_menu);
$this->selectedMenu = $msplit[0];
$this->selectedSubmenu = $msplit[1];
}
pushVar("menu", $temp_menu);
}
开发者ID:BackupTheBerlios,项目名称:nxwcms-svn,代码行数:25,代码来源:cmsmenu_old.php
注:本文中的getVar函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论