2024年3月16日发(作者:)
Office 2010安装教程
1.先打开“我的电脑”。
2.右键单机“DVD-Rom”,选择“打开”。
3.找到“”,双击打开。
4.安装窗口出现了,接受条款,单击“继续”。
5.单击“自定义”。
$conf, $time; $_uid = user_token_get_do(); empty($_uid) and user_token_clear(); // 退出登录 return $_uid; } // 用户 function user_token_get_do() { global $conf, $time, $ip, $useragent; $token = param($conf['cookie_pre'] . 'token'); if (empty($token)) return FALSE; $tokenkey = md5(xn_key()); $s = xn_decrypt($token, $tokenkey); if (empty($s)) return FALSE; $arr = explode("\t", $s); if (count($arr) != 5) return FALSE; list($_ip, $_time, $_uid, $_pwd, $ua_md5) = $arr; if (array_value($conf, 'login_ip') && $ip != $_ip) return FALSE; if (array_value($conf, 'login_ua') && md5($useragent) != $ua_md5) return FALSE; $_user = user_read($_uid); if (empty($_user)) return FALSE; if (array_value($conf, 'login_only') && $_user['login_date'] != $_time) return FALSE; // 密码是否被修改 if (md5($_user['password']) != $_pwd) return FALSE; return $_uid; } // 设置 token,防止 sid 过期后被删除 function user_token_set($uid) { global $conf, $time; if (empty($uid)) return ''; $token = user_token_gen($uid); setcookie($conf['cookie_pre'] . 'token', $token, $time + 86400000, $conf['cookie_path'], $conf['cookie_domain'], '', TRUE); return $token; } function user_token_clear() { global $conf, $time; setcookie($conf['cookie_pre'] . 'token', '', $time - 8640000, $conf['cookie_path'], $conf['cookie_domain'], '', TRUE); } function user_token_gen($uid) { global $conf, $time, $ip, $useragent; $key = 'user_token' . $uid; static $cache = array(); if (isset($cache[$key])) return $cache[$key]; $user = user_read($uid); $pwd = md5($user['password']); $ua_md5 = md5($useragent); $tokenkey = md5(xn_key()); $cache[$key] = xn_encrypt("$ip $time $uid $pwd $ua_md5", $tokenkey); return $cache[$key]; } // 前台登录验证 function user_login_check() { global $user; empty($user) and http_location(url('user-login')); } // 获取用户来路 function user_http_referer() { global $conf; $referer = param('referer'); // 优先从参数获取 | GET is priority empty($referer) and $referer = array_value($_SERVER, 'HTTP_REFERER', ''); $referer = str_replace(array('\"', '"', '<', '>', ' ', '*', "\t", "\r", "\n"), '', $referer); // 干掉特殊字符 strip special chars if ( !preg_match('#^(http|https)://[\w\-=/\.]+/[\w\-=.%\#?]*$#is', $referer) || FALSE !== strpos($referer, url('user-login')) || FALSE !== strpos($referer, url('user-logout')) || FALSE !== strpos($referer, url('user-create')) || FALSE !== strpos($referer, url('user-setpw')) || FALSE !== strpos($referer, url('user-resetpw_complete')) ) { $referer = $conf['path']; } return $referer; } function user_auth_check($token) { global $time, $ip; $auth = param(2); $s = xn_decrypt($auth); empty($s) and message(-1, lang('decrypt_failed')); $arr = explode('-', $s); count($arr) != 4 and message(-1, lang('encrypt_failed')); list($_ip, $_time, $_uid, $_pwd) = $arr; $_user = user_read($_uid); empty($_user) and message(-1, lang('user_not_exists')); $time - $_time > 3600 and message(-1, lang('link_has_expired')); return $_user; } ?>权限没有,则隐藏 function forum_list_access_filter($forumlist, $gid, $allow = 'allowread') { global $grouplist; if (empty($forumlist)) return array(); if (1 == $gid) return $forumlist; $forumlist_filter = $forumlist; $group = $grouplist[$gid]; foreach ($forumlist_filter as $fid => $forum) { if (empty($forum['accesson']) && empty($group[$allow]) || !empty($forum['accesson']) && empty($forum['accesslist'][$gid][$allow])) { unset($forumlist_filter[$fid]); } unset($forumlist_filter[$fid]['accesslist']); } return $forumlist_filter; } function forum_filter_moduid($moduids) { $moduids = trim($moduids); if (empty($moduids)) return ''; $arr = explode(',', $moduids); $r = array(); foreach ($arr as $_uid) { $_uid = intval($_uid); $_user = user_read($_uid); if (empty($_user)) continue; if ($_user['gid'] > 4) continue; $r[] = $_uid; } return implode(',', $r); } function forum_safe_info($forum) { //unset($forum['moduids']); return $forum; } function forum_filter($forumlist) { foreach ($forumlist as &$val) { unset($val['brief'], $val['announcement'], $val['seo_title'], $val['seo_keywords'], $val['create_date_fmt'], $val['icon_url'], $val['modlist']); } return $forumlist; } function forum_format_url($forum) { global $conf; if (0 == $forum['category']) { // 列表URL $url = url('list-' . $forum['fid'], '', FALSE); } elseif (1 == $forum['category']) { // 频道 $url = url('category-' . $forum['fid'], '', FALSE); } elseif (2 == $forum['category']) { // 单页 $url = url('read-' . trim($forum['brief']), '', FALSE); } if ($conf['url_rewrite_on'] > 1 && $forum['well_alias']) { if (0 == $forum['category'] || 1 == $forum['category']) { $url = url($forum['well_alias'], '', FALSE); } elseif (2 == $forum['category']) { // 单页 $url = ($forum['threads'] && $forum['brief']) ? url($forum['well_alias'] . '-' . trim($forum['brief']), '', FALSE) : url($forum['well_alias'], '', FALSE); } } return $url; } function well_forum_alias() { $forumlist = forum_list_cache(); if (empty($forumlist)) return ''; $key = 'forum-alias'; static $cache = array(); if (isset($cache[$key])) return $cache[$key]; $cache[$key] = array(); foreach ($forumlist as $val) { if ($val['well_alias']) $cache[$key][$val['fid']] = $val['well_alias']; } return array_flip($cache[$key]); } function well_forum_alias_cache() { global $conf; $key = 'forum-alias-cache'; static $cache = array(); // 用静态变量只能在当前 request 生命周期缓存,跨进程需要再加一层缓存:redis/memcached/xcache/apc if (isset($cache[$key])) return $cache[$key]; if ('mysql' == $conf['cache']['type']) { $arr = well_forum_alias(); } else { $arr = cache_get($key); if (NULL === $arr) { $arr = well_forum_alias(); !empty($arr) AND cache_set($key, $arr); } } $cache[$key] = empty($arr) ? '' : $arr; return $cache[$key]; } ?>return FALSE; $r = well_tag_thread__update(array('id' => $id), $update); return $r; } function well_tag_thread_find($tagid, $page, $pagesize) { $arr = well_tag_thread__find(array('tagid' => $tagid), array('id' => -1), $page, $pagesize); return $arr; } function well_tag_thread_find_by_tid($tid, $page, $pagesize) { $arr = well_tag_thread__find(array('tid' => $tid), array(), $page, $pagesize); return $arr; } ?>
发布评论