function updategroupcreditlog($fid, $uid) { global $_G; if (empty($fid) || empty($uid)) { return false; } $today = date('Ymd', TIMESTAMP); $updategroupcredit = getcookie('groupcredit_' . $fid); if ($updategroupcredit < $today) { $status = DB::result_first("SELECT logdate FROM " . DB::table('forum_groupcreditslog') . " WHERE fid='{$fid}' AND uid='{$uid}' AND logdate='{$today}'"); if (empty($status)) { DB::query("UPDATE " . DB::table('forum_forum') . " SET commoncredits=commoncredits+1 WHERE fid='{$fid}'"); DB::query("REPLACE INTO " . DB::table('forum_groupcreditslog') . " (fid, uid, logdate) VALUES ('{$fid}', '{$uid}', '{$today}')"); if (empty($_G['forum']) || empty($_G['forum']['level'])) { $forum = DB::fetch_first("SELECT name, level, commoncredits FROM " . DB::table('forum_forum') . " WHERE fid='{$fid}'"); } else { $_G['forum']['commoncredits']++; $forum =& $_G['forum']; } if (empty($_G['grouplevels'])) { loadcache('grouplevels'); } $grouplevel = $_G['grouplevels'][$forum['level']]; if ($grouplevel['type'] == 'default' && !($forum['commoncredits'] >= $grouplevel['creditshigher'] && $forum['commoncredits'] < $grouplevel['creditslower'])) { $levelid = DB::result_first("SELECT levelid FROM " . DB::table('forum_grouplevel') . " WHERE type='default' AND creditshigher<='{$forum['commoncredits']}' AND creditslower>'{$forum['commoncredits']}' LIMIT 1"); if (!empty($levelid)) { DB::query("UPDATE " . DB::table('forum_forum') . " SET level='{$levelid}' WHERE fid='{$fid}'"); $groupfounderuid = DB::result_first("SELECT founderuid FROM " . DB::table('forum_forumfield') . " WHERE fid='{$fid}' LIMIT 1"); notification_add($groupfounderuid, 'system', 'grouplevel_update', array('groupname' => '<a href="forum.php?mod=group&fid=' . $fid . '">' . $forum['name'] . '</a>', 'newlevel' => $_G['grouplevels'][$levelid]['leveltitle'])); } } } dsetcookie('groupcredit_' . $fid, $today, 86400); } }
public function global_cpnav_extra1() { $custom_zone = getcookie('bacy_gmt_cz'); if (!$custom_zone) { $custom_zone = 8; } $data = lang('home/template', 'timezone'); $command_str = "\$timezone=array({$data});"; eval($command_str); $gmt = '<script type="text/javascript" src="./source/plugin/bacy_gmt/gmt.js" ></script>'; $gmt .= '<a id="bacy_gmt" href="javascript:;" style="text-decoration:none;" onmouseover="delayShow(this, function(){showMenu({\'ctrlid\':\'bacy_gmt\',\'pos\':\'43!\',\'duration\':\'3\'})});"></a>'; $gmt .= '<table id="bacy_gmt_menu" class="p_pop" style="display:none;">'; $gmt .= '<tr><td><div class="y"><a href="plugin.php?id=bacy_gmt:gmt&act=aboutme" onclick="showWindow(\'gmt_aboutme\',this.href);return false;">[About Me]</a><a href="javascript:;" onclick="hideMenu(\'bacy_gmt_menu\');">[X]</a></div><strong>' . lang('plugin/bacy_gmt', 'info') . '</strong></td></tr>'; $gmt .= '<tr><td><select id="bacy_gmt_timeoffset" onchange="hideMenu(\'bacy_gmt_menu\'),setcookie(\'bacy_gmt_cz\',this.value,86400 * 30);startGmtClock();">'; foreach ($timezone as $key => $desc) { if ($key < 9999) { if ($key == $custom_zone) { $gmt .= '<option value="' . $key . '" selected >' . $desc . '</option>'; } else { $gmt .= '<option value="' . $key . '" >' . $desc . '</option>'; } } } $gmt .= '</select></td></tr><tr><td></td></tr>'; $gmt .= '</table>'; $gmt .= '<script type="text/javascript">startGmtClock()</script>'; return $gmt; }
function __construct() { global $_G; //C1:不在用户组;C2:未签到;C3:已签到,没有cookies;C4:已签到,有cookies; $this->_table['l'] = 'plugin_dsuamupper'; $this->_table['c'] = 'plugin_dsuamupperc'; if ($_G['uid']) { $this->vars = $_G['cache']['plugin']['dsu_amupper']; $this->vars['offset'] = $_G['setting']['timeoffset']; $this->vars['gids'] = (array) unserialize($this->vars['gids']); $this->vars['zdqd'] = (array) unserialize($this->vars['zdqd']); $this->vars['today'] = dgmdate($_G['timestamp'], 'Ymd', $this->vars['offset']); $this->_cookise = getcookie('dsu_amupper'); $this->_cookised = getcookie('dsu_amuppered'); $this->_time = 0; if (!$this->_cookised || !$this->_cookise) { $this->vars['uid'] = C::t('#dsu_amupper#plugin_dsuamupper')->fetch($_G['uid']); //$this->_time = $this->_istoday($this->vars['uid']['lasttime']); } elseif ($this->_cookised == $_G['uid']) { $this->_time = 0; } else { $this->_time = -1; } } }
/** * 登录验证 */ public function login() { $account = htmlspecialchars(trim($_GET['account'])); $password = trim($_GET['password']); $captchacode = trim($_GET['captchacode']); if ($captchacode && $captchacode != getcookie('captchacode')) { $this->showAppError(-1, '验证码输入错误', array('code' => $captchacode)); } if (strlen($account) < 2) { $this->showAppError(-2, '账号输入不正确', array('account' => $account)); } if (strlen($password) < 6) { $this->showAppError(-3, '密码输入不正确', array('password' => $password)); } $member = new Member(); if (isemail($account)) { $returns = $member->Login($account, $password, 'email'); } elseif (ismobile($account)) { $returns = $member->Login($account, $password, 'mobile'); } if ($member->uid < 0) { $returns = $member->Login($account, $password); } if ($member->uid > 0) { $returns['userpic'] = avatar($member->uid); $this->showAppData($returns); } else { $this->showAppError(-4, '账号和密码不匹配', array('account' => $account, 'password' => $password)); } }
function mobileplugin_dsu_amupper() { global $_G; loadcache('plugin'); $this->vars = $_G['cache']['plugin']['dsu_amupper']; $this->vars['offset'] = $_G['setting']['timeoffset']; $this->vars['today'] = dgmdate($_G['timestamp'], 'Ymd', $this->vars['offset']); $this->cookiefooter = getcookie('dsu_amupper_footer'); }
function plugin_dsu_amupper() { global $_G; $this->vars = $_G['cache']['plugin']['dsu_amupper']; $this->vars['offset'] = $_G['setting']['timeoffset']; $this->vars['today'] = dgmdate($_G['timestamp'], 'Ymd', $this->vars['offset']); $this->cookiefooter = getcookie('dsu_amupper_footer' . $_G['uid']); $this->cookieforce = getcookie('dsu_amupper_force' . $_G['uid']); $this->from = $_SERVER['HTTP_REFERER']; }
function register_input() { global $_G; $_G['gp_rid'] = strip_tags($_G['gp_rid']); $return = ''; if ($_G['gp_action'] == 'activation') { include template('dsu_amufzc:afzc'); return $return; } else { $input = (array) unserialize(base64_decode(getcookie('dsu_amufzc_' . $_G['gp_rid']))); include template('dsu_amufzc:fzc'); return $return; } }
function global_footer() { global $_G; $result = ''; $uid = (int) $_G['uid']; if (!empty($uid) && (CURSCRIPT != 'home' && $_GET['mod'] != 'spacecp')) { $showpop = getcookie('ltncpop'); if (empty($showpop)) { $ifset = DB::result_first("SELECT addname FROM " . DB::table('common_member') . " WHERE uid={$uid}"); if (empty($ifset)) { $result = " "; } } } return $result; }
public function LOGIN() { //var_dump($this->Model->database); $content = array(); $user = getpost("user"); $pass = getpost("pass"); $usercookie = getcookie("user"); $passcookie = getcookie("pass"); ob_start(); if ($usercookie != null) { if ($passcookie != null) { $data = $this->Model->database->login($usercookie, $passcookie); if ($data['login'] == 1) { header('location:index.php?controll=kiemtra&action=manager'); } } } if (isset($_POST['submit'])) { if ($user != null) { if ($pass != null) { $data = $this->Model->database->login($user, $pass); if ($data['login'] == 1) { setcookie("user", $user, time() + 360); setcookie("pass", $pass, time() + 360); header('location:index.php?controll=kiemtra&action=manager'); } else { echo "Tài khoản hoặc mật khẩu sai!"; } } else { echo "Bạn chưa nhập password!"; } } else { echo "Bạn chưa nhập user!"; } } $content = ob_get_contents(); ob_end_clean(); $this->View->load("login", $content); $this->View->Show(); }
function updategroupcreditlog($fid, $uid) { global $_G; if (empty($fid) || empty($uid)) { return false; } $today = date('Ymd', TIMESTAMP); $updategroupcredit = getcookie('groupcredit_' . $fid); if ($updategroupcredit < $today) { $status = C::t('forum_groupcreditslog')->check_logdate($fid, $uid, $today); if (empty($status)) { C::t('forum_forum')->update_commoncredits($fid); C::t('forum_groupcreditslog')->insert(array('fid' => $fid, 'uid' => $uid, 'logdate' => $today), false, true); if (empty($_G['forum']) || empty($_G['forum']['level'])) { $forum = C::t('forum_forum')->fetch($fid); $forum = array('name' => $forum['name'], 'level' => $forum['level'], 'commoncredits' => $forum['commoncredits']); } else { $_G['forum']['commoncredits']++; $forum =& $_G['forum']; } if (empty($_G['grouplevels'])) { loadcache('grouplevels'); } $grouplevel = $_G['grouplevels'][$forum['level']]; if ($grouplevel['type'] == 'default' && !($forum['commoncredits'] >= $grouplevel['creditshigher'] && $forum['commoncredits'] < $grouplevel['creditslower'])) { $levelinfo = C::t('forum_grouplevel')->fetch_by_credits($forum['commoncredits']); $levelid = $levelinfo['levelid']; if (!empty($levelid)) { C::t('forum_forum')->update_group_level($levelid, $fid); $query = C::t('forum_forumfield')->fetch($fid); $groupfounderuid = $query['founderuid']; notification_add($groupfounderuid, 'system', 'grouplevel_update', array('groupname' => '<a href="forum.php?mod=group&fid=' . $fid . '">' . $forum['name'] . '</a>', 'newlevel' => $_G['grouplevels'][$levelid]['leveltitle'], 'from_id' => 0, 'from_idtype' => 'changeusergroup')); } } } dsetcookie('groupcredit_' . $fid, $today, 86400); } }
public function global_footer() { global $_G, $_GET; if (self::$securityStatus != TRUE) { return false; } $formhash = formhash(); if ($_G['adminid']) { $processName = 'securityOperate'; if (self::$isAdminGroup && !discuz_process::islocked($processName, 30)) { $ajaxReportScript = <<<EOF \t\t\t\t\t<script type='text/javascript'> \t\t\t\t\tvar url = SITEURL + '/plugin.php?id=security:sitemaster'; \t\t\t\t\tvar x = new Ajax(); \t\t\t\t\tx.post(url, 'formhash={$formhash}', function(s){}); \t\t\t\t\t</script> EOF; } } $processName = 'securityRetry'; $time = 10; if (!discuz_process::islocked($processName, $time)) { if (C::t('#security#security_failedlog')->count()) { $ajaxRetryScript = <<<EOF \t\t\t\t\t<script type='text/javascript'> \t\t\t\t\tvar urlRetry = SITEURL + '/plugin.php?id=security:job'; \t\t\t\t\tvar ajaxRetry = new Ajax(); \t\t\t\t\tajaxRetry.post(urlRetry, 'formhash={$formhash}', function(s){}); \t\t\t\t\t</script> EOF; } } if ($_G['setting']['connect']['allow'] && !$_G['uid'] && $_G['setting']['security_qqlogin_alone']) { $loginboxdisappear = <<<EOF \t\t\t\t<script type="text/javascript"> \t\t\t\tif(\$('lsform')) { \t\t\t\t\tvar divs = \$('lsform').getElementsByTagName('div'); \t\t\t\t\tfor(i in divs) { \t\t\t\t\t\tif(divs[i] && divs[i].className == 'y pns') { \t\t\t\t\t\t\tdivs[i].style.display = 'none'; \t\t\t\t\t\t} \t\t\t\t\t\tif(divs[i] && divs[i].className == 'fastlg_fm y') { \t\t\t\t\t\t\tdivs[i].style.borderWidth = '0px'; \t\t\t\t\t\t} \t\t\t\t\t} \t\t\t\t} \t\t\t\t</script> EOF; if (!(CURMODULE == 'connect' && $_G['connectguest'])) { $_G['connect']['referer'] = !$_G['inajax'] && CURSCRIPT != 'member' ? $_G['basefilename'] . ($_SERVER['QUERY_STRING'] ? '?' . $_SERVER['QUERY_STRING'] : '') : dreferer(); $_G['connect']['login_url'] = $_G['siteurl'] . 'connect.php?mod=login&op=init&referer=' . urlencode($_G['connect']['referer'] ? $_G['connect']['referer'] : 'index.php'); $loginstr = '<div class="rfm bw0"><table><tr><th>' . lang('plugin/security', 'quicklogin') . ': </th><td><a href="' . $_G['connect']['login_url'] . '&statfrom=login" target="_top" rel="nofollow"><img src="' . IMGDIR . '/qq_login.gif" class="vm" /></a></td></tr></table></div>'; $loginboxdisappear .= <<<EOF \t\t\t\t<script type="text/javascript"> \t\t\t\tvar loginform = document.getElementsByTagName('form'); \t\t\t\tif(loginform) { \t\t\t\t\tfor(i in loginform) { \t\t\t\t\t\tif(loginform[i].id && loginform[i].id.substr(0, 11) == 'loginform_L') { \t\t\t\t\t\t\tloginform[i].innerHTML = '{$loginstr}'; \t\t\t\t\t\t} \t\t\t\t\t} \t\t\t\t} \t\t\t\t</script> EOF; } } if ($_G['setting']['connect']['allow'] && $_G['uid'] && $_G['setting']['security_safelogin'] && !$_G['member']['conisbind'] && CURMODULE != 'post' && getcookie('safelogintips')) { $msg = '<p>' . lang('plugin/security', 'safelogintips') . '</p><p class="mtm"><a href="connect.php?mod=config" target="_blank"><img src="' . IMGDIR . '/qq_bind_small.gif" class="qq_bind" align="absmiddle" /></a></p>'; $safelogintips = <<<EOF \t\t\t\t<script type="text/javascript"> \t\t\t\thideWindow('safelogintips'); \t\t\t\tshowDialog('{$msg}', 'notice', null, '(function() { window.location.href="connect.php?mod=config"; })();', 0, null, null, null, null, null, null); \t\t\t\t</script> EOF; dsetcookie('safelogintips'); } return $ajaxReportScript . $ajaxRetryScript . $loginboxdisappear . $safelogintips; }
$info['topic'] = $data['topic']; if ($_GET['action'] == 'preview') { $bbcode->setSmileys($data['dosmileys']); if ($config['wordstatus'] == 0) { $data['dowords'] = 0; } $bbcode->setReplace($data['dowords']); $data['formatted_comment'] = $bbcode->parse($data['comment']); } } else { $data = array('name' => '', 'email' => '', 'comment' => '', 'dosmileys' => 1, 'dowords' => 1, 'digest' => 0, 'topic' => $lang->phrase('reply_prefix') . $info['topic'], 'human' => null); $memberdata_obj = $scache->load('memberdata'); $memberdata = $memberdata_obj->get(); // Multiquote $qids = $gpc->get('qid', arr_int); $pids = getcookie('vquote'); if (!empty($pids) && preg_match("/^[0-9,]+\$/", $pids)) { $qids = array_merge($qids, explode(',', $pids)); $qids = array_unique($qids); makecookie($config['cookie_prefix'] . '_vquote', '', 0); } if (count($qids) > 0) { $result = $db->query(' SELECT name, comment, guest FROM ' . $db->pre . 'replies WHERE id IN(' . implode(',', $qids) . ') LIMIT ' . $config['maxmultiquote'], __LINE__, __FILE__); while ($row = $gpc->prepare($db->fetch_assoc($result))) { if ($row['guest'] == 0) { if (isset($memberdata[$row['name']])) { $row['name'] = $memberdata[$row['name']];
} function method_3($n) { $x = $i = 0; $s = ""; $str = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz"; while ($i < $n) { $x = mt_rand(0, strlen($str)); $s .= substr($str, $x, 1); $i++; } return $s; } function getHashCash($tokenvv) { while (substr(sha1($tokenvv . $s, true), 0, 2) != "og") { $s = method_3(16); } return $s; } $sidtoken = ee("becaf9be", base64_decode($json12->data->security->encrypt_string)); $sid = explode("_", $sidtoken)[0]; $token = explode("_", $sidtoken)[1]; $tokenvv = $json10->data->token->vv; $tokenup = $json10->data->token->up; $hashcash = getHashCash($tokenvv . "o"); $post = "videoid={$v}&url={$topenlace}&sid={$sid}&referer=null&uid=0&totalseg=&totalsec=&h={$hashcash}&fullflag=0&t={$tokenvv}&ikuflag=u1%5Fm1&source=video"; $call = "http://stat.youku.com/player/addPlayerStaticReport"; $stat = curl_proxy($call, "", "", $headers, 1, $post, 0, $cookie); $cookie .= getcookie($stat, "_f");
$_SGLOBAL['tpl_blockvalue'] = array(); $_SGLOBAL['debug_query'] = array(); define('A_DIR', $_SCONFIG['attachmentdir']); if (substr($_SCONFIG['attachmentdir'], 0, 2) == './' && empty($_SCONFIG['attachmenturl'])) { $_SCONFIG['attachmenturl'] = S_URL . substr($_SCONFIG['attachmentdir'], 1); } define('A_URL', $_SCONFIG['attachmenturl']); $newsiteurl = S_URL; if (strpos($newsiteurl, '://') === false) { $newsiteurl = 'http://' . (empty($_SERVER['HTTP_HOST']) ? $_SERVER['SERVER_NAME'] : $_SERVER['HTTP_HOST']) . $newsiteurl; } define('S_URL_ALL', $newsiteurl); if (empty($nolanguage)) { include_once S_ROOT . './language/main.lang.php'; } if (file_exists(S_ROOT . './index.html')) { define('S_ISPHP', '1'); } //链接数据库 dbconnect(); if (!defined('IN_SUPESITE_UPDATE')) { getcookie(); } //获取频道信息 $channels = getchannels(); //计划任务 @(include_once S_ROOT . './data/system/cron.cache.php'); if (empty($_SGLOBAL['cronnextrun']) || $_SGLOBAL['cronnextrun'] <= $_SGLOBAL['timestamp']) { include_once S_ROOT . './function/cron.func.php'; runcron(); }
function getAvatar($profileImg) { if (getcookie('p_avatar') == 'true') { return 'img.php?imgurl=' . $profileImg; } return preg_replace('/https?:\\/\\/\\w+([0-9])\\.twimg\\.com/i', 'https://s3.amazonaws.com/twitter_production', $profileImg); }
if (empty($_G['cache']['portalcategory'])) { showmessage('portal_article_add_nopermission'); } $category = $_G['cache']['portalcategory']; $cate = $category[$catid]; $categoryselect = category_showselect('portal', 'catid', true, !empty($article['catid']) ? $article['catid'] : $catid); if ($aid) { $catid = intval($article['catid']); } if ($aid && $article['highlight']) { $stylecheck = ''; $stylecheck = explode('|', $article['highlight']); } $from_cookie_str = ''; $from_cookie = array(); $from_cookie_str = stripcslashes(getcookie('from_cookie')); $from_cookie = explode("\t", $from_cookie_str); $from_cookie = array_filter($from_cookie); if ($article) { foreach (C::t('portal_article_content')->fetch_all($aid) as $key => $value) { $nextpage = ''; if ($key > 0) { $pagetitle = $value['title'] ? '[title=' . $value['title'] . ']' : ''; $nextpage = "\r\n" . '<strong>##########NextPage' . $pagetitle . '##########</strong>'; } else { $article_content['title'] = $value['title']; } $article_content['content'] .= $nextpage . $value['content']; } $article['attach_image'] = $article['attach_file'] = ''; foreach (C::t('portal_attachment')->fetch_all_by_aid($aid) as $value) {
function visitedsetcookie($tid) { $tid = intval($tid); if ($tid) { $threadvisited = getcookie('threadvisited'); if (!strexists(",{$threadvisited},", ",{$tid},")) { $threadvisited = $threadvisited ? explode(',', $threadvisited) : array(); $threadvisited[] = $tid; if (count($threadvisited) > 5) { array_shift($threadvisited); } dsetcookie('threadvisited', implode(',', $threadvisited), 864000); } } }
<?php if (!defined('IN_DISCUZ')) { exit('Access Denied'); } $citys = api_indata('server_city'); if (getcookie('curcity')) { $curcity = $citys[getcookie('curcity')]['shortname']; } else { $curcity = lang('plugin/yiqixueba', 'quanguocity'); } $temp = C::t(GM('shop_shopsetting'))->fetch('shoptemplate'); $styledir = 'source/plugin/yiqixueba/template/style/shop/' . $temp; $shopsorts = api_indata('server_goodssort'); //$dznav = C::t('common_nav')->fetch_all_mainnav(); foreach (C::t('common_nav')->fetch_all_mainnav() as $k => $v) { if ($v['available'] == 1) { $dznav[$v['id']] = $v; } } //dump($dznav); //dump($_G['setting']['navs']); foreach ($shopsorts as $k => $v) { if ($v['sortupid'] == '') { $sorts[$v['sortname']] = $v; $sorts[$v['sortname']]['sortselect'] = str_replace('hover', 'select', $v['sortname']); foreach ($shopsorts as $k1 => $v1) { if ($v1['sortupid'] == $v['sortname']) { if ($sid == $v['sortname']) { $subsorts[] = $v1; }
/** * This script gets and prepares userdata, checks login data, sets cookies and manages sessions. * * @return object Data of the user who is calling this script */ function logged() { global $config, $db, $gpc, $scache, $plugins; $this->deleteOldSessions(); $sessionid = $gpc->get('s', str); if (empty($sessionid) || strlen($sessionid) != $config['sid_length']) { $sessionid = false; $this->querysid = false; } $vdata = $gpc->save_str(getcookie('vdata')); $vlastvisit = $gpc->save_int(getcookie('vlastvisit')); $vhash = $gpc->save_str(getcookie('vhash')); if ($config['allow_http_auth'] == 1) { if (!empty($_SERVER['PHP_AUTH_USER']) && !empty($_SERVER['PHP_AUTH_PW'])) { $http_user = $gpc->save_str($_SERVER['PHP_AUTH_USER']); $http_pw = $gpc->save_str($_SERVER['PHP_AUTH_PW']); $result = $db->query("SELECT id, pw FROM {$db->pre}user WHERE name = '{$http_user}' AND MD5('{$http_pw}') = pw LIMIT 1"); if ($db->num_rows($result) == 1) { $this->cookiedata = $db->fetch_num($result); } else { $this->httpAuth(); } } else { $this->httpAuth(); } } elseif (!empty($vdata)) { $this->cookies = true; $this->cookiedata = explode("|", $vdata); } else { $this->cookiedata = array(0, ''); } if (!empty($vlastvisit)) { $this->cookies = true; $this->cookielastvisit = $vlastvisit; } else { $this->cookielastvisit = 0; } if (isset($vhash)) { $this->cookies = true; if (strlen($vhash) != $config['sid_length']) { $this->sid = ''; } else { $this->sid = $vhash; } } elseif ($sessionid) { $this->sid = $sessionid; } else { $this->sid = ''; } if (empty($this->sid) && array_empty($this->cookiedata)) { $result = $db->query('SELECT sid FROM ' . $db->pre . 'session WHERE ip = "' . $this->ip . '" AND mid = "0" LIMIT 1', __LINE__, __FILE__); if ($db->num_rows($result) == 1) { $sidrow = $db->fetch_assoc($result); $this->sid = $sidrow['sid']; $this->querysid = true; } } // Checke nun die Session if (empty($this->sid)) { if (SCRIPTNAME != 'external') { $my = $this->sid_new(); } else { $my->vlogin = false; $fields = $db->list_fields($db->pre . 'user'); $fields = array_merge($fields, $db->list_fields($db->pre . 'session')); $fields = array_merge($fields, $db->list_fields($db->pre . 'userfields')); foreach ($fields as $field) { $my->{$field} = null; } } } else { $my = $this->sid_load(); } $expire = ($config['sessionsave'] + 1) * 60; makecookie($config['cookie_prefix'] . '_vhash', $this->sid, $expire); if ($gpc->get('action') == "markasread" || !isset($my->mark)) { $my->mark = array(); } else { $my->mark = unserialize(html_entity_decode($my->mark, ENT_QUOTES)); } if (!is_array($my->mark)) { $my->mark = array(); } if (!$my->vlogin) { $my->id = 0; } if (!isset($my->pwfaccess)) { $my->pwfaccess = array(); } else { $my->pwfaccess = unserialize(html_entity_decode($my->pwfaccess, ENT_QUOTES)); } if (!is_array($my->pwfaccess)) { $my->pwfaccess = array(); } if (!isset($my->settings)) { $my->settings = array(); } else { $my->settings = unserialize(html_entity_decode($my->settings, ENT_QUOTES)); } if (!is_array($my->settings)) { $my->settings = array(); } if (!isset($my->timezone) || $my->timezone == NULL) { $my->timezone = $config['timezone']; } $my->timezonestr = ''; if ($my->timezone != 0) { if ($my->timezone[0] != '+' && $my->timezone > 0) { $my->timezonestr = '+' . $my->timezone; } else { $my->timezonestr = $my->timezone; } } $admin = $gpc->get('admin', str); if ($admin != $config['cryptkey']) { $fresh = false; } else { $fresh = true; } $loaddesign_obj = $scache->load('loaddesign'); $cache = $loaddesign_obj->get($fresh); $q_tpl = $gpc->get('design', int); if (isset($my->template) == false || isset($cache[$my->template]) == false) { $my->template = $config['templatedir']; } if (isset($my->settings['q_tpl']) && isset($cache[$my->settings['q_tpl']])) { $my->template = $my->settings['q_tpl']; } if (isset($cache[$q_tpl])) { if ($admin != 1) { $my->settings['q_tpl'] = $q_tpl; } $my->template = $q_tpl; } $my->templateid = $cache[$my->template]['template']; $my->imagesid = $cache[$my->template]['images']; $my->cssid = $cache[$my->template]['stylesheet']; $loadlanguage_obj = $scache->load('loadlanguage'); $cache2 = $loadlanguage_obj->get(); $q_lng = $gpc->get('language', int); if (isset($my->language) == false || isset($cache2[$my->language]) == false) { $my->language = $config['langdir']; } if (isset($my->settings['q_lng']) && isset($cache2[$my->settings['q_lng']])) { $my->language = $my->settings['q_lng']; } if (isset($cache2[$q_lng])) { $my->settings['q_lng'] = $q_lng; $my->language = $q_lng; } if (isset($my->lastvisit) && !$my->clv) { $my->clv = $my->lastvisit; } if (!isset($my->opt_hidebad)) { $my->opt_hidebad = 0; } if (!isset($my->opt_showsig)) { $my->opt_showsig = 1; } ($code = $plugins->load('permissions_logged_end')) ? eval($code) : null; $this->sid2url($my); return $my; }
function _noscript() { global $_G; $this->_makedzjs(); $uri = $_SERVER['REQUEST_URI']; if ($uri) { $urlInfo = parse_url($uri); $this->discuzParams['url'] = $urlInfo['path']; $this->discuzParams['arg'] = urlencode($urlInfo['query']); } else { $this->discuzParams['url'] = '/'; $this->discuzParams['arg'] = '-'; } $this->discuzParams['tz'] = sprintf('%0d', -$_G['timenow']['offset']); $siteUrl = parse_url($_G['siteurl']); $this->discuzParams['dm'] = $siteUrl['host']; $pvi = getcookie('pvi'); if (!$pvi) { $pvi = mt_rand(1, 0x7fffffff) % 10000000000; dsetcookie('pvi', $pvi, 2145888000); } $this->discuzParams['pvi'] = $pvi; $si = getcookie('si'); if (!$si) { $si = 's' . mt_rand(1, 0x7fffffff) % 10000000000; dsetcookie('si', $si); } $this->discuzParams['si'] = $si; $cloudstatpost = getcookie('cloudstatpost'); dsetcookie('cloudstatpost'); $cloudstatpost = explode('D', $cloudstatpost); if ($cloudstatpost[0] == 'thread') { $this->discuzParams['nt'] = 1; $this->discuzParams['ui'] = $cloudstatpost[1]; $this->discuzParams['fi'] = $cloudstatpost[2]; $this->discuzParams['ti'] = $cloudstatpost[3]; $subject = $_G['forum_thread']['subject']; $charset = $_G['charset']; if (empty($charset)) { foreach ($_G['config']['db'] as $key => $cfg) { if ($cfg['dbcharset']) { $charset = $cfg['dbcharset']; break; } } } if ('GBK' != strtoupper($charset) && !empty($charset)) { $subject = diconv($subject, $charset, 'GBK'); } $this->extraParams[] = "tn=" . urlencode($subject); } elseif ($cloudstatpost[0] == 'post') { $this->discuzParams['nt'] = 2; $this->discuzParams['ui'] = $cloudstatpost[1]; $this->discuzParams['fi'] = $cloudstatpost[2]; $this->discuzParams['ti'] = $cloudstatpost[3]; $this->discuzParams['pi'] = $cloudstatpost[4]; } $ref = $_SERVER['HTTP_REFERER']; if ($ref) { $refInfo = parse_url($ref); $this->discuzParams['rdm'] = $refInfo['host']; $this->discuzParams['rarg'] = urlencode($refInfo['query']); $this->discuzParams['rurl'] = $refInfo['path']; } $this->extraParams[] = 'mt=0'; $this->discuzParams['rnd'] = mt_rand(1, 0x7fffffff); $query = ''; foreach ($this->discuzParams as $key => $val) { $query .= "{$key}={$val}&"; } $pingd = 'http://pingtcss.qq.com/pingd?' . $query . 'ext=' . implode(';', $this->extraParams); return '<img src="' . $pingd . '" height="1" width="1" style="float:right" noerror="true" />'; }
} $subops = array('mokuailist', 'mokuaiedit', 'currentver', 'templatelist', 'pluginlang', 'mokuainode', 'nodeedit', 'nodeview'); $subop = in_array($subop, $subops) ? $subop : $subops[0]; //模块信息读取 require_once libfile('class/xml'); $mokuais = $mokuais_temp = xml2array(file_get_contents(MOKUAI_DIR . "/server/1.0/Data/mokuai.xml")); $mokuais = array_sort($mokuais, 'displayorder', 'desc'); $biaoshi = getgpc('biaoshi'); $version = strip_tags(trim(getgpc('version'))); $mokuai_info = $mokuais[$biaoshi]['version'][$version]; $nodetype = getgpc('nodetype'); $nodetypes = array('global', 'admincp', 'member', 'yiqixueba', 'api', 'ajax', 'hook', 'plugin'); $nodetype = in_array($nodetype, $nodetypes) ? $nodetype : $nodetypes[0]; //人性化记住上次编辑的版本情况 if (getcookie('debugmokuai')) { $debugmks = explode(",", getcookie('debugmokuai')); } if ($subop == 'mokuailist') { if (!submitcheck('submit')) { showtips(lang('plugin/yiqixueba', 'server_mokuai_list_tips')); showformheader($this_page . '&subop=mokuailist'); showtableheader(lang('plugin/yiqixueba', 'server_mokuai_list')); showsubtitle(array('', lang('plugin/yiqixueba', 'mokuai_name'), lang('plugin/yiqixueba', 'mokuai_description'), '', '', lang('plugin/yiqixueba', 'status'))); foreach ($mokuais as $mk => $row) { showtablerow('', array('class="td25"', 'class="td25"', 'style="width:350px"', 'style="width:45px"', '', 'class="td25"'), array((is_array($row['version']) ? '<a href="javascript:;" class="right" onclick="toggle_group(\'subnav_' . $mk . '\', this)">[' . (in_array($mk, $debugmks) ? '-' : '+') . ']</a>' : '') . (is_array($row['version']) ? '<input type="checkbox" class="checkbox" value="" disabled="disabled" />' : "<input class=\"checkbox\" type=\"checkbox\" name=\"delete[]\" value=\"{$mk}\" />"), "<input type=\"text\" class=\"txt\" size=\"2\" name=\"displayordernew[]\" value=\"{$row['displayorder']}\">", "<div><input type=\"text\" class=\"txt\" size=\"15\" name=\"biaoshinew[]\" value=\"" . $mk . "\" readonly=\"readonly\"><input type=\"text\" class=\"txt\" size=\"15\" name=\"namenew[]\" value=\"" . $row['name'] . "\">" . "<a href=\"###\" onclick=\"addrowdirect=1;addrow(this, 1, '{$mk}')\" class=\"addchildboard\">" . lang('plugin/yiqixueba', 'add_ver') . "</a></div>", '', '', "")); showtagheader('tbody', 'subnav_' . $mk, in_array($mk, $debugmks) ? true : false); foreach ($row['version'] as $kk => $subrow) { //$nodes1 = $nodes1_temp = xml2array(file_get_contents(MOKUAI_DIR."/".$mk."/".$kk."/node.xml")); //file_put_contents (MOKUAI_DIR."/server/1.0/Data/node_".$mk."_".$kk.".xml",diconv(array2xml($nodes1, 1),"UTF-8", $_G['charset']."//IGNORE")); // foreach($nodes1 as $k=>$v ){ // if(!$v['menu']){
/** * Creates a new session. * * If cookies are disabled the page will be reloaded with session id added to query string. * * @param boolean Set to true if this function is called from sid_load() * @return object Data of the user who is calling this script */ function sid_new() { global $config, $db, $gpc; if (!$this->sidload && !array_empty($this->cookiedata)) { $load = $db->query('SELECT mid FROM '.$db->pre.'session WHERE mid = "'.$this->cookiedata[0].'" LIMIT 1'); if ($db->num_rows($load) == 1) { $this->sidload = true; $my = $this->sid_load(); return $my; } } if (!array_empty($this->cookiedata) && count($this->cookiedata) == 2) { $result = $db->query('SELECT u.*, f.* FROM '.$db->pre.'user AS u LEFT JOIN '.$db->pre.'userfields as f ON f.ufid = u.id WHERE u.id = "'.$this->cookiedata[0].'" AND u.pw = "'.$this->cookiedata[1].'" LIMIT 1'); $my = $this->cleanUserData($db->fetch_object($result)); $nodata = ($db->num_rows($result) == 1) ? false : true; if ($nodata == true) { // Loginversuch mit falschen Daten => Versuch protokollieren! makecookie($config['cookie_prefix'].'_vdata', '|', 0); set_failed_login(); } } else { $nodata = true; } if (!isset($my) || !is_object($my)) { $my = new stdClass(); } if ($nodata == false && $my->confirm == '11') { $id = &$my->id; $lastvisit = $my->lastvisit; $my->clv = $my->lastvisit; $my->vlogin = true; makecookie($config['cookie_prefix'].'_vdata', $my->id."|".$my->pw); } else { $id = 0; $lastvisit = $gpc->save_int(getcookie('vlastvisit')); $my->clv = $lastvisit; $my->vlogin = false; makecookie($config['cookie_prefix'].'_vdata', "|", -60); } $my->is_bot = $this->log_robot(); $this->sid = $this->construct_sid(); $my->sid = &$this->sid; $my->mark = serialize(array()); $my->pwfaccess = serialize(array()); $my->settings = serialize(array()); $action = $gpc->get('action', str); $qid = $gpc->get('id', int); $db->query("INSERT INTO {$db->pre}session (sid, mid, wiw_script, wiw_action, wiw_id, active, ip, user_agent, lastvisit, mark, pwfaccess, settings, is_bot) VALUES ('{$this->sid}', '{$id}','".SCRIPTNAME."','{$action}','{$qid}','".time()."','{$this->ip}','".$gpc->save_str($this->user_agent)."','{$lastvisit}','".$db->escape_string($my->mark)."','".$db->escape_string($my->pwfaccess)."','".$db->escape_string($my->settings)."','{$my->is_bot}')"); return $my; }
http://www.fni.com/ mbrennen@fni.com voice: 972.669.0041 fax: 972.669.8972 */ header("Pragma: no-cache"); Header("Expires: 0"); header("Cache-control: No-Cache"); require_once '../bit_setup_inc.php'; require './functions.php'; // ========== start of variable loading ========== // load passed variables and cookie variables // int or double cast the numbers, no exceptions // custid cookie is mime encoded, don't escape $CookieCustID = getcookie("Cookie{$instid}CustID"); $CookieCart = getcookie("Cookie{$instid}Cart"); $cartid = getparam('cartid'); $key1 = getparam('key1'); $psku = getparam('psku'); $zid = (int) getparam('zid'); $lid = (int) getparam('lid'); $cat = (int) getparam('cat'); $nlst = (int) getparam('nlst'); $olst = (int) getparam('olst'); $olimit = (int) getparam('olimit'); // ========== end of variable loading ========== require './public.php'; require './flags.php'; require './cartid.php'; require './languages.php'; $webid = (int) $webid;
if (!$thread['visiable'] && !$self) { showmessage("对不起,此视频正在审核中!", "plugin.php?id=smart_video"); } require_once libfile("function/reply", "plugin/smart_video"); $post = C::t("#smart_video#video")->fetch_first("smart_video_post", "tid={$tid} and first=1"); $relt_video = C::t("#smart_video#video")->fetch_all_by_where('smart_video_thread', 'fcid=' . $thread['fcid'] . " and num=1", 'play desc,dateline desc', 0, $smart['renum']); $relt_album = C::t("#smart_video#video")->fetch_all_by_where('smart_video_thread', 'num>1', 'play desc,dateline desc', 0, 6); $navtitle = $thread['subject']; $mes = stripslashes($post['message']); $video = unserialize(stripslashes($post['audio'])); $metakeywords = $navtitle . ',' . $post['fname'] . ',' . $thread['subject']; $metadescription = cutstr($mes, 90, ''); $num = $thread['num']; $perpage = max(1, $smart['per_reply']); $page = 1; $where = "tid={$tid} and first<>1"; $replys = C::t("#smart_video#video")->fetch_all_by_where('smart_video_post', $where, 'dateline desc', 0, $perpage); $maxnum = C::t("#smart_video#video")->count_by_where('smart_video_post', $where); $url = SMART_VIDEO_URL . ":ajax&type=reply&tid={$tid}"; $multi = get_smart_page($maxnum, $perpage, $page, $url, 10, 1, "reply_reajax"); $smiley = get_smiley(); $svalue = intval(getcookie("ping_video_" . $thread[tid])); $ext = smart_get_ext($video[0]['link']); $first_url = get_smart_url($video[0][link], $tid, 0); if ($num > 1) { $height = 660; include template("smart_video:vl"); } else { $height = 660; include template("smart_video:v"); }
/*********************/ if (!defined("IN_DISCUZ")) { exit("Access Denied"); } loadcache("pdnovelcategory"); $ncc = $_G['cache']['pdnovelcategory']; $catid = $_G['gp_catid'] ? $_G['gp_catid'] : 0; $full = $_G['gp_full'] ? intval($_G['gp_full']) : 0; $words = $_G['gp_words'] ? intval($_G['gp_words']) : 0; $update = $_G['gp_update'] ? intval($_G['gp_update']) : 0; $letter = $_G['gp_letter'] ? addslashes($_G['gp_letter']) : 0; $orderby = $_G['gp_orderby'] ? intval($_G['gp_orderby']) : 0; $page = $_G['gp_page'] ? intval($_G['gp_page']) : 1; $sql = $orderbyadd = ""; if ($_G['gp_show'] != '0' && $_G['gp_show'] != '1') { $show = getcookie('list_show') ? getcookie('list_show') : 0; } else { $show = $_G['gp_show']; } if (0 < $catid) { $category = DB::fetch_first("SELECT * FROM " . DB::table("pdnovel_category") . (" WHERE catid=" . $catid)); if ($category) { $navtitle = $category['catname'] . " - " . (0 < $category['upid'] ? $ncc[$category['upid']]['catname'] . " - " : "") . $navtitle; $metakeywords = $category['keyword']; $metadescription = $category['description']; } else { showmessage($lang['novel_error']); } if ($ncc[$catid][children]) { $i = 0; foreach ($ncc[$catid][children] as $ncccatids) {
<?php error_reporting(E_ALL ^ E_NOTICE ^ E_WARNING); header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); header("Cache-Control: no-cache, must-revalidate"); header("Pramga: no-cache"); $lifeTime = 900; session_set_cookie_params($lifeTime); session_start(); $s = session_id(); if ($_SERVER['PHP_SELF'] == "/index.php") { $url = "http://172.18.0.240/selfsearch/default.aspx#"; $array = get_headers($url, 1); if (preg_match('/200/', $array[0])) { require "model/request.php"; $fapath = dirname(__FILE__); $cookie = dirname(__FILE__) . '/temp/' . $s . '.tmp'; $_SESSION['cookieurl'] = $cookie; getcookie($cookie); $hidden = gethidden($cookie); $hiddens = $hidden[0]; $hiddense = $hidden[1]; require 'view/head.php'; require 'view/login.php'; //首页的内容 } else { echo "<script>alert('远程url资源无效!')</script>"; } }
sendmail("{$_G[member][username]} <{$emailnew}>", lang('email', 'email_verify_subject'), $email_verify_message); } else { emailcheck_send($space['uid'], $emailnew); } } if ($setarr) { DB::update('common_member', $setarr, array('uid' => $_G['uid'])); } if ($authstr) { showmessage('profile_email_verify', 'home.php?mod=spacecp&ac=profile&op=password'); } else { showmessage('profile_succeed', 'home.php?mod=spacecp&ac=profile&op=password'); } } if ($operation == 'password') { $resend = getcookie('resendemail'); $resend = empty($resend) ? true : TIMESTAMP - $resend > 300; if ($_G['gp_resend'] && $resend) { $toemail = $space['newemail'] ? $space['newemail'] : $space['email']; emailcheck_send($space['uid'], $toemail); dsetcookie('resendemail', TIMESTAMP); showmessage('send_activate_mail_succeed', "home.php?mod=spacecp&ac=profile&op=password"); } elseif ($_G['gp_resend']) { showmessage('send_activate_mail_error', "home.php?mod=spacecp&ac=profile&op=password"); } $actives = array('password' => ' class="a"'); $navtitle = lang('core', 'title_password_security'); } else { space_merge($space, 'field_home'); space_merge($space, 'field_forum'); require_once libfile('function/editor');
function logged() { global $config, $db, $phpdoc, $gpc; // Alte Sessions (nach bestimmter Zeit, die geprüft wird) löschen if ($this->SessionDel() == true) { $sessionsave = $config['sessionsave'] * 60; $old = time() - $sessionsave; $db->query("DELETE FROM {$db->pre}session WHERE active <= '" . $old . "'", __LINE__, __FILE__); } $sessionid = $gpc->get('s', str); if (empty($sessionid) || strlen($sessionid) != $config['sid_length']) { $sessionid = FALSE; $this->querysid = FALSE; } $vdata = $gpc->save_str(getcookie('vdata')); $vlastvisit = $gpc->save_int(getcookie('vlastvisit')); $vhash = $gpc->save_str(getcookie('vhash')); // Read additional data if (!empty($vdata)) { $this->cookies = TRUE; $this->cookiedata = explode("|", $vdata); } else { $this->cookiedata = array(0, ''); } if (!empty($vlastvisit)) { $this->cookies = TRUE; $this->cookielastvisit = $vlastvisit; } else { $this->cookielastvisit = 0; } if (isset($vhash)) { $this->cookies = TRUE; if (strlen($vhash) != $config['sid_length']) { $this->sid = ''; } else { $this->sid = $vhash; } } elseif ($sessionid) { $this->sid = $sessionid; } else { $this->sid = ''; } if (empty($this->sid)) { $result = $db->query('SELECT sid FROM ' . $db->pre . 'session WHERE ip = "' . $this->ip . '" AND mid = "0" LIMIT 1', __LINE__, __FILE__); if ($db->num_rows() == 1) { $sidrow = $db->fetch_assoc($result); $this->sid = $sidrow['sid']; $this->querysid = TRUE; } } // Checke nun die Session if (empty($this->sid)) { if (SCRIPTNAME != 'external') { $my = $this->sid_new(); } else { $my->vlogin = FALSE; } } else { $my = $this->sid_load(); } $expire = $config['sessionsave'] + 1 * 60; makecookie($config['cookie_prefix'] . '_vhash', $this->sid, $expire); if ($gpc->get('action') == "markasread" || !isset($my->mark)) { $my->mark = array(); } else { $my->mark = unserialize(html_entity_decode($my->mark, ENT_QUOTES)); } if (!is_array($my->mark)) { $my->mark = array(); } if ($my->vlogin) { makecookie($config['cookie_prefix'] . '_vdata', $my->id . "|" . $my->pw); } else { $my->id = 0; } if (!isset($my->pwfaccess)) { $my->pwfaccess = array(); } else { $my->pwfaccess = unserialize(html_entity_decode($my->pwfaccess, ENT_QUOTES)); } if (!is_array($my->pwfaccess)) { $my->pwfaccess = array(); } if (!isset($my->settings)) { $my->settings = array(); } else { $my->settings = unserialize(html_entity_decode($my->settings, ENT_QUOTES)); } if (!is_array($my->settings)) { $my->settings = array(); } if (!isset($my->timezone) || $my->timezone == NULL) { $my->timezone = $config['timezone']; } $my->timezonestr = ''; if ($my->timezone != 0) { if ($my->timezone[0] != '+' && $my->timezone > 0) { $my->timezonestr = '+' . $my->timezone; } else { $my->timezonestr = $my->timezone; } } $cache = cache_loaddesign(); $q_tpl = $gpc->get('design', int); if (isset($my->template) == false || isset($cache[$my->template]) == false) { $my->template = $config['templatedir']; } if (isset($my->settings['q_tpl']) && isset($cache[$my->settings['q_tpl']])) { $my->template = $my->settings['q_tpl']; } if (isset($cache[$q_tpl])) { //if ($gpc->get('admin', int) != 1) { $my->settings['q_tpl'] = $q_tpl; //} $my->template = $q_tpl; } $my->templateid = $cache[$my->template]['template']; $my->imagesid = $cache[$my->template]['images']; $my->cssid = $cache[$my->template]['stylesheet']; $my->smileyfolder = $cache[$my->template]['smileyfolder']; $cache2 = cache_loadlanguage(); $q_lng = $gpc->get('lang', int); if (isset($my->language) == false || isset($cache2[$my->language]) == false) { $my->language = $config['langdir']; } if (isset($my->settings['q_lng']) && isset($cache2[$my->settings['q_lng']]) != false) { $my->language = $my->settings['q_lng']; } if (isset($cache2[$q_lng]) != false) { $my->settings['q_lng'] = $q_lng; $my->language = $q_lng; } if (isset($my->lastvisit) && !$my->clv) { $my->clv = $my->lastvisit; } if (!isset($my->opt_hidebad)) { $my->opt_hidebad = 0; } if (!isset($my->opt_showsig)) { $my->opt_showsig = 1; } if ($this->bi[1] == 'e') { $slog = new slog(); $my = $slog->logged(); global $lang; $lang->init($my->language); $tpl = new tpl(); ob_start(); include 'data/banned.php'; $banned = ob_get_contents(); ob_end_clean(); echo $tpl->parse("banned"); $phpdoc->Out(); $db->close(); exit; } $this->sid2url(); return $my; }
emailcheck_send($space['uid'], $emailnew); dsetcookie('newemail', "{$space['uid']}\t{$emailnew}\t{$_G['timestamp']}", 31536000); } if ($setarr) { DB::update('common_member', $setarr, array('uid' => $_G['uid'])); } if ($authstr) { showmessage('profile_email_verify', 'home.php?mod=spacecp&ac=profile&op=password'); } else { showmessage('profile_succeed', 'home.php?mod=spacecp&ac=profile&op=password'); } } if ($operation == 'password') { $resend = getcookie('resendemail'); $resend = empty($resend) ? true : TIMESTAMP - $resend > 300; $newemail = getcookie('newemail'); $space['newemail'] = !$space['emailstatus'] ? $space['email'] : ''; if (!empty($newemail)) { $mailinfo = explode("\t", $newemail); $space['newemail'] = $mailinfo[0] == $_G['uid'] && isemail($mailinfo[1]) && $mailinfo[1] != $space['email'] ? $mailinfo[1] : ''; } if ($_G['gp_resend'] && $resend) { $toemail = $space['newemail'] ? $space['newemail'] : $space['email']; emailcheck_send($space['uid'], $toemail); dsetcookie('resendemail', TIMESTAMP); showmessage('send_activate_mail_succeed', "home.php?mod=spacecp&ac=profile&op=password"); } elseif ($_G['gp_resend']) { showmessage('send_activate_mail_error', "home.php?mod=spacecp&ac=profile&op=password"); } if (!empty($space['newemail'])) { $acitvemessage = lang('spacecp', 'email_acitve_message', array('newemail' => $space['newemail'], 'imgdir' => $_G['style']['imgdir']));
function write_groupviewed($fid) { $fid = intval($fid); if ($fid) { $groupviewed_limit = 8; $groupviewed = getcookie('groupviewed'); if (!strexists(",{$groupviewed},", ",{$fid},")) { $groupviewed = $groupviewed ? explode(',', $groupviewed) : array(); $groupviewed[] = $fid; if (count($groupviewed) > $groupviewed_limit) { array_shift($groupviewed); } dsetcookie('groupviewed', implode(',', $groupviewed), 86400); } } }