优化 HTTPS 支持性优化
This commit is contained in:
parent
9198a30cdb
commit
d1896cff8b
|
@ -21,7 +21,7 @@ $apitype = empty($_GET['attach']) || !preg_match('/^[a-z0-9]+$/i', $_GET['attach
|
||||||
require_once DISCUZ_ROOT.'./api/trade/api_' . $apitype . '.php';
|
require_once DISCUZ_ROOT.'./api/trade/api_' . $apitype . '.php';
|
||||||
|
|
||||||
$PHP_SELF = $_SERVER['PHP_SELF'];
|
$PHP_SELF = $_SERVER['PHP_SELF'];
|
||||||
$_G['siteurl'] = dhtmlspecialchars('http://'.$_SERVER['HTTP_HOST'].preg_replace("/\/+(api\/trade)?\/*$/i", '', substr($PHP_SELF, 0, strrpos($PHP_SELF, '/'))).'/');
|
$_G['siteurl'] = dhtmlspecialchars($_G['scheme'].'://'.$_SERVER['HTTP_HOST'].preg_replace("/\/+(api\/trade)?\/*$/i", '', substr($PHP_SELF, 0, strrpos($PHP_SELF, '/'))).'/');
|
||||||
|
|
||||||
$notifydata = trade_notifycheck('trade');
|
$notifydata = trade_notifycheck('trade');
|
||||||
|
|
||||||
|
|
|
@ -79,7 +79,7 @@ if(!empty($_SERVER['QUERY_STRING']) && is_numeric($_SERVER['QUERY_STRING'])) {
|
||||||
$jump = true;
|
$jump = true;
|
||||||
$domain = C::t('common_domain')->fetch_by_domain_domainroot($_ENV['prefixdomain'], $_ENV['domainroot']);
|
$domain = C::t('common_domain')->fetch_by_domain_domainroot($_ENV['prefixdomain'], $_ENV['domainroot']);
|
||||||
$apphost = $_ENV['domain']['app'][$domain['idtype']] ? $_ENV['domain']['app'][$domain['idtype']] : $_ENV['domain']['app']['default'];
|
$apphost = $_ENV['domain']['app'][$domain['idtype']] ? $_ENV['domain']['app'][$domain['idtype']] : $_ENV['domain']['app']['default'];
|
||||||
$apphost = $apphost ? 'http://'.$apphost.'/' : '';
|
$apphost = $apphost ? $_G['scheme'].'://'.$apphost.'/' : '';
|
||||||
switch($domain['idtype']) {
|
switch($domain['idtype']) {
|
||||||
case 'home':
|
case 'home':
|
||||||
if($_G['setting']['rewritestatus'] && in_array('home_space', $_G['setting']['rewritestatus'])) {
|
if($_G['setting']['rewritestatus'] && in_array('home_space', $_G['setting']['rewritestatus'])) {
|
||||||
|
@ -109,7 +109,7 @@ if(!empty($_SERVER['QUERY_STRING']) && is_numeric($_SERVER['QUERY_STRING'])) {
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if($jump) {
|
if($jump) {
|
||||||
$url = empty($_ENV['domain']['app']['default']) ? (!empty($_ENV['domain']['defaultindex']) ? $_ENV['domain']['defaultindex'] : 'forum.php') : 'http://'.$_ENV['domain']['app']['default'];
|
$url = empty($_ENV['domain']['app']['default']) ? (!empty($_ENV['domain']['defaultindex']) ? $_ENV['domain']['defaultindex'] : 'forum.php') : $_ENV['domain']['app']['default'];
|
||||||
} else {
|
} else {
|
||||||
$_ENV['curapp'] = 'forum';
|
$_ENV['curapp'] = 'forum';
|
||||||
}
|
}
|
||||||
|
|
|
@ -75,7 +75,7 @@ if($operation == 'app') {
|
||||||
}
|
}
|
||||||
|
|
||||||
if($_GET['appnew']['mobile'] != $olddomain['mobile']) {
|
if($_GET['appnew']['mobile'] != $olddomain['mobile']) {
|
||||||
C::t('common_nav')->update_by_identifier('mobile', array('url' => (!$_GET['appnew']['mobile'] ? 'forum.php?mobile=yes' : 'http://'.$_GET['appnew']['mobile'])));
|
C::t('common_nav')->update_by_identifier('mobile', array('url' => (!$_GET['appnew']['mobile'] ? 'forum.php?mobile=yes' : $_G['scheme'].'://'.$_GET['appnew']['mobile'])));
|
||||||
}
|
}
|
||||||
|
|
||||||
C::t('common_setting')->update('domain',$_G['setting']['domain']);
|
C::t('common_setting')->update('domain',$_G['setting']['domain']);
|
||||||
|
|
|
@ -626,7 +626,7 @@ var rowtypedata = [
|
||||||
showsetting('forums_edit_extend_forum_horizontal', 'forumcolumnsnew', $mforum[0]['forumcolumns'], 'text');
|
showsetting('forums_edit_extend_forum_horizontal', 'forumcolumnsnew', $mforum[0]['forumcolumns'], 'text');
|
||||||
showsetting('forums_edit_extend_cat_sub_horizontal', 'catforumcolumnsnew', $mforum[0]['catforumcolumns'], 'text');
|
showsetting('forums_edit_extend_cat_sub_horizontal', 'catforumcolumnsnew', $mforum[0]['catforumcolumns'], 'text');
|
||||||
if(!empty($_G['setting']['domain']['root']['forum'])) {
|
if(!empty($_G['setting']['domain']['root']['forum'])) {
|
||||||
showsetting('forums_edit_extend_domain', '', '', 'http://<input type="text" name="domainnew" class="txt" value="'.$mforum[0]['domain'].'" style="width:100px; margin-right:0px;" >.'.$_G['setting']['domain']['root']['forum']);
|
showsetting('forums_edit_extend_domain', '', '', $_G['scheme'].'://<input type="text" name="domainnew" class="txt" value="'.$mforum[0]['domain'].'" style="width:100px; margin-right:0px;" >.'.$_G['setting']['domain']['root']['forum']);
|
||||||
} else {
|
} else {
|
||||||
showsetting('forums_edit_extend_domain', 'domainnew', '', 'text', 'disabled');
|
showsetting('forums_edit_extend_domain', 'domainnew', '', 'text', 'disabled');
|
||||||
}
|
}
|
||||||
|
@ -800,7 +800,7 @@ var rowtypedata = [
|
||||||
showsetting('forums_edit_basic_keys', 'keysnew', $forumkeys[$fid], 'text');
|
showsetting('forums_edit_basic_keys', 'keysnew', $forumkeys[$fid], 'text');
|
||||||
if(!empty($_G['setting']['domain']['root']['forum'])) {
|
if(!empty($_G['setting']['domain']['root']['forum'])) {
|
||||||
$iname = $multiset ? "multinew[{$_G[showsetting_multi]}][domainnew]" : 'domainnew';
|
$iname = $multiset ? "multinew[{$_G[showsetting_multi]}][domainnew]" : 'domainnew';
|
||||||
showsetting('forums_edit_extend_domain', '', '', 'http://<input type="text" name="'.$iname.'" class="txt" value="'.$forum['domain'].'" style="width:100px; margin-right:0px;" >.'.$_G['setting']['domain']['root']['forum']);
|
showsetting('forums_edit_extend_domain', '', '', $_G['scheme'].'://<input type="text" name="'.$iname.'" class="txt" value="'.$forum['domain'].'" style="width:100px; margin-right:0px;" >.'.$_G['setting']['domain']['root']['forum']);
|
||||||
} elseif(!$multiset) {
|
} elseif(!$multiset) {
|
||||||
showsetting('forums_edit_extend_domain', 'domainnew', '', 'text', 'disabled');
|
showsetting('forums_edit_extend_domain', 'domainnew', '', 'text', 'disabled');
|
||||||
}
|
}
|
||||||
|
|
|
@ -442,7 +442,7 @@ SCRIPT;
|
||||||
showsetting('setindex', 'setindex', $setindex, 'radio');
|
showsetting('setindex', 'setindex', $setindex, 'radio');
|
||||||
if($cate['level'] == 0) {
|
if($cate['level'] == 0) {
|
||||||
if(!empty($_G['setting']['domain']['root']['channel'])) {
|
if(!empty($_G['setting']['domain']['root']['channel'])) {
|
||||||
showsetting('forums_edit_extend_domain', '', '', 'http://<input type="text" class="txt" name="domain" class="txt" value="'.$cate['domain'].'" style="width:100px; margin-right:0px;" >.'.$_G['setting']['domain']['root']['channel']);
|
showsetting('forums_edit_extend_domain', '', '', $_G['scheme'].'://<input type="text" class="txt" name="domain" class="txt" value="'.$cate['domain'].'" style="width:100px; margin-right:0px;" >.'.$_G['setting']['domain']['root']['channel']);
|
||||||
} else {
|
} else {
|
||||||
showsetting('forums_edit_extend_domain', 'domain', '', 'text', 'disabled');
|
showsetting('forums_edit_extend_domain', 'domain', '', 'text', 'disabled');
|
||||||
}
|
}
|
||||||
|
|
|
@ -163,7 +163,7 @@ SEARCH;
|
||||||
($value['htmlmade'] ? "[<a href='$htmlname' target='_blank'>HTML</a>]" : '')
|
($value['htmlmade'] ? "[<a href='$htmlname' target='_blank'>HTML</a>]" : '')
|
||||||
."<a href=\"portal.php?mod=topic&topicid=$topicid\" target=\"_blank\">".$value[title]."</a>"
|
."<a href=\"portal.php?mod=topic&topicid=$topicid\" target=\"_blank\">".$value[title]."</a>"
|
||||||
.($value['closed'] ? ' ['.cplang('topic_closed_yes').']' : ''),
|
.($value['closed'] ? ' ['.cplang('topic_closed_yes').']' : ''),
|
||||||
$value['domain'] && !empty($_G['setting']['domain']['root']['topic']) ? 'http://'.$value['domain'].'.'.$_G['setting']['domain']['root']['topic'] : '',
|
$value['domain'] && !empty($_G['setting']['domain']['root']['topic']) ? $_G['scheme'].'://'.$value['domain'].'.'.$_G['setting']['domain']['root']['topic'] : '',
|
||||||
$value['name'],
|
$value['name'],
|
||||||
"<a href=\"home.php?mod=space&uid=$value[uid]&do=profile\" target=\"_blank\">$value[username]</a>",
|
"<a href=\"home.php?mod=space&uid=$value[uid]&do=profile\" target=\"_blank\">$value[username]</a>",
|
||||||
dgmdate($value[dateline]),
|
dgmdate($value[dateline]),
|
||||||
|
|
|
@ -100,7 +100,7 @@ class task {
|
||||||
$task['allowapply'] = $task['allowapply'] > 0 ? 1 : 0;
|
$task['allowapply'] = $task['allowapply'] > 0 ? 1 : 0;
|
||||||
}
|
}
|
||||||
$task['icon'] = $task['icon'] ? $task['icon'] : 'task.gif';
|
$task['icon'] = $task['icon'] ? $task['icon'] : 'task.gif';
|
||||||
if(strtolower(substr($task['icon'], 0, 7)) != 'http://') {
|
if(!preg_match('/^https?:\/\//is', $this->task['icon'])) {
|
||||||
$escript = explode(':', $task['scriptname']);
|
$escript = explode(':', $task['scriptname']);
|
||||||
if(count($escript) > 1 && file_exists(DISCUZ_ROOT.'./source/plugin/'.$escript[0].'/task/task_'.$escript[1].'.gif')) {
|
if(count($escript) > 1 && file_exists(DISCUZ_ROOT.'./source/plugin/'.$escript[0].'/task/task_'.$escript[1].'.gif')) {
|
||||||
$task['icon'] = 'source/plugin/'.$escript[0].'/task/task_'.$escript[1].'.gif';
|
$task['icon'] = 'source/plugin/'.$escript[0].'/task/task_'.$escript[1].'.gif';
|
||||||
|
@ -161,7 +161,7 @@ class task {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
$this->task['icon'] = $this->task['icon'] ? $this->task['icon'] : 'task.gif';
|
$this->task['icon'] = $this->task['icon'] ? $this->task['icon'] : 'task.gif';
|
||||||
if(strtolower(substr($this->task['icon'], 0, 7)) != 'http://') {
|
if(!preg_match('/^https?:\/\//is', $this->task['icon'])) {
|
||||||
$escript = explode(':', $this->task['scriptname']);
|
$escript = explode(':', $this->task['scriptname']);
|
||||||
if(count($escript) > 1 && file_exists(DISCUZ_ROOT.'./source/plugin/'.$escript[0].'/task/task_'.$escript[1].'.gif')) {
|
if(count($escript) > 1 && file_exists(DISCUZ_ROOT.'./source/plugin/'.$escript[0].'/task/task_'.$escript[1].'.gif')) {
|
||||||
$this->task['icon'] = 'source/plugin/'.$escript[0].'/task/task_'.$escript[1].'.gif';
|
$this->task['icon'] = 'source/plugin/'.$escript[0].'/task/task_'.$escript[1].'.gif';
|
||||||
|
|
|
@ -114,7 +114,7 @@ class helper_form {
|
||||||
foreach($urllist[0] as $key => $val) {
|
foreach($urllist[0] as $key => $val) {
|
||||||
$val = trim($val);
|
$val = trim($val);
|
||||||
$return[0][$key] = $val;
|
$return[0][$key] = $val;
|
||||||
if(!preg_match('/^http:\/\//is', $val)) $val = 'http://'.$val;
|
if(!preg_match('/^https?:\/\//is', $val)) $val = 'http://'.$val;
|
||||||
$tmp = parse_url($val);
|
$tmp = parse_url($val);
|
||||||
$return[1][$key] = $tmp['host'];
|
$return[1][$key] = $tmp['host'];
|
||||||
if($tmp['port']){
|
if($tmp['port']){
|
||||||
|
|
|
@ -17,7 +17,7 @@ function build_cache_relatedlink() {
|
||||||
$data = array();
|
$data = array();
|
||||||
$query = C::t('common_relatedlink')->range();
|
$query = C::t('common_relatedlink')->range();
|
||||||
foreach($query as $link) {
|
foreach($query as $link) {
|
||||||
if(!(strpos($link['url'], '://'))) {
|
if(!preg_match('/^https?:\/\//is', $link)) {
|
||||||
$link['url'] = 'http://'.$link['url'];
|
$link['url'] = 'http://'.$link['url'];
|
||||||
}
|
}
|
||||||
$data[] = $link;
|
$data[] = $link;
|
||||||
|
|
|
@ -202,7 +202,7 @@ function imgtag($attributes) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@extract($value);
|
@extract($value);
|
||||||
if(!preg_match("/^(http|https):\/\//i", $src)) {
|
if(!preg_match("/^https?:\/\//i", $src)) {
|
||||||
$src = absoluteurl($src);
|
$src = absoluteurl($src);
|
||||||
}
|
}
|
||||||
return $src ? ($width && $height ? '[img='.$width.','.$height.']'.$src.'[/img]' : '[img]'.$src.'[/img]') : '';
|
return $src ? ($width && $height ? '[img='.$width.','.$height.']'.$src.'[/img]' : '[img]'.$src.'[/img]') : '';
|
||||||
|
|
|
@ -99,6 +99,7 @@ function _dfsockopen($url, $limit = 0, $post = '', $cookie = '', $bysocket = FAL
|
||||||
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
|
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
|
||||||
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
|
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
|
||||||
curl_setopt($ch, CURLOPT_HEADER, 1);
|
curl_setopt($ch, CURLOPT_HEADER, 1);
|
||||||
|
curl_setopt($ch, CURLOPT_PROXY, 'http://127.0.0.1:12759');
|
||||||
if($post) {
|
if($post) {
|
||||||
curl_setopt($ch, CURLOPT_POST, 1);
|
curl_setopt($ch, CURLOPT_POST, 1);
|
||||||
if($encodetype == 'URLENCODE') {
|
if($encodetype == 'URLENCODE') {
|
||||||
|
|
|
@ -251,11 +251,11 @@ function space_domain($space) {
|
||||||
if($_G['setting']['allowspacedomain'] && $_G['setting']['domain']['root']['home']) {
|
if($_G['setting']['allowspacedomain'] && $_G['setting']['domain']['root']['home']) {
|
||||||
space_merge($space, 'field_home');
|
space_merge($space, 'field_home');
|
||||||
if($space['domain']) {
|
if($space['domain']) {
|
||||||
$space['domainurl'] = 'http://'.$space['domain'].'.'.$_G['setting']['domain']['root']['home'];
|
$space['domainurl'] = $_G['scheme'].'://'.$space['domain'].'.'.$_G['setting']['domain']['root']['home'];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(!empty($_G['setting']['domain']['app']['home'])) {
|
if(!empty($_G['setting']['domain']['app']['home'])) {
|
||||||
$space['domainurl'] = 'http://'.$_G['setting']['domain']['app']['home'].'/?'.$space['uid'];
|
$space['domainurl'] = $_G['scheme'].'://'.$_G['setting']['domain']['app']['home'].'/?'.$space['uid'];
|
||||||
} elseif(empty($space['domainurl'])) {
|
} elseif(empty($space['domainurl'])) {
|
||||||
$space['domainurl'] = $_G['siteurl'].'?'.$space['uid'];
|
$space['domainurl'] = $_G['siteurl'].'?'.$space['uid'];
|
||||||
}
|
}
|
||||||
|
|
|
@ -255,7 +255,7 @@ function procthread($thread, $timeformat = 'd') {
|
||||||
$pagelinks = '';
|
$pagelinks = '';
|
||||||
if($postsnum > $_G['ppp']) {
|
if($postsnum > $_G['ppp']) {
|
||||||
if($_G['setting']['domain']['app']['forum'] || $_G['setting']['domain']['app']['default']) {
|
if($_G['setting']['domain']['app']['forum'] || $_G['setting']['domain']['app']['default']) {
|
||||||
$domain = 'http://'.($_G['setting']['domain']['app']['forum'] ? $_G['setting']['domain']['app']['forum'] : ($_G['setting']['domain']['app']['default'] ? $_G['setting']['domain']['app']['default'] : '')).'/';
|
$domain = $_G['scheme'].'://'.($_G['setting']['domain']['app']['forum'] ? $_G['setting']['domain']['app']['forum'] : ($_G['setting']['domain']['app']['default'] ? $_G['setting']['domain']['app']['default'] : '')).'/';
|
||||||
} else {
|
} else {
|
||||||
$domain = $_G['siteurl'];
|
$domain = $_G['siteurl'];
|
||||||
}
|
}
|
||||||
|
|
|
@ -137,7 +137,7 @@ function profile_setting($fieldid, $space=array(), $showstatus=false, $ignoreunc
|
||||||
$html = '<p id="residedistrictbox">'.showdistrict($values, $elems, 'residedistrictbox', 1, 'reside').'</p>';
|
$html = '<p id="residedistrictbox">'.showdistrict($values, $elems, 'residedistrictbox', 1, 'reside').'</p>';
|
||||||
}
|
}
|
||||||
} elseif($fieldid=='qq') {
|
} elseif($fieldid=='qq') {
|
||||||
$html = "<input type=\"text\" name=\"$fieldid\" id=\"$fieldid\" class=\"px\" value=\"$space[$fieldid]\" tabindex=\"1\" /><p><a href=\"\" class=\"xi2\" onclick=\"this.href='http://wp.qq.com/set.html?from=discuz&uin='+$('$fieldid').value\" target=\"_blank\">".lang('spacecp', 'qq_set_status')."</a></p>";
|
$html = "<input type=\"text\" name=\"$fieldid\" id=\"$fieldid\" class=\"px\" value=\"$space[$fieldid]\" tabindex=\"1\" /><p><a href=\"\" class=\"xi2\" onclick=\"this.href='//wp.qq.com/set.html?from=discuz&uin='+$('$fieldid').value\" target=\"_blank\">".lang('spacecp', 'qq_set_status')."</a></p>";
|
||||||
} else {
|
} else {
|
||||||
if($field['unchangeable'] && $space[$fieldid]!='') {
|
if($field['unchangeable'] && $space[$fieldid]!='') {
|
||||||
if($field['formtype']=='file') {
|
if($field['formtype']=='file') {
|
||||||
|
@ -326,7 +326,7 @@ function profile_show($fieldid, $space=array(), $getalone = false) {
|
||||||
} elseif($fieldid == 'position') {
|
} elseif($fieldid == 'position') {
|
||||||
return nl2br($space['office'] ? $space['office'] : $space['position']);
|
return nl2br($space['office'] ? $space['office'] : $space['position']);
|
||||||
} elseif($fieldid == 'qq') {
|
} elseif($fieldid == 'qq') {
|
||||||
return '<a href="http://wpa.qq.com/msgrd?v=3&uin='.$space[$fieldid].'&site='.$_G['setting']['bbname'].'&menu=yes&from=discuz" target="_blank" title="'.lang('spacecp', 'qq_dialog').'"><img src="'.STATICURL.'/image/common/qq.gif" alt="QQ" style="margin:0px;"/></a>';
|
return '<a href="//wpa.qq.com/msgrd?v=3&uin='.$space[$fieldid].'&site='.$_G['setting']['bbname'].'&menu=yes&from=discuz" target="_blank" title="'.lang('spacecp', 'qq_dialog').'"><img src="'.STATICURL.'/image/common/qq.gif" alt="QQ" style="margin:0px;"/></a>';
|
||||||
} elseif($fieldid == 'qqnumber') {
|
} elseif($fieldid == 'qqnumber') {
|
||||||
return $space['qq'];
|
return $space['qq'];
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -74,7 +74,7 @@ if($catlist) {
|
||||||
$query = C::t('forum_forum')->fetch_all_subforum_by_fup($fids);
|
$query = C::t('forum_forum')->fetch_all_subforum_by_fup($fids);
|
||||||
foreach($query as $forum) {
|
foreach($query as $forum) {
|
||||||
if($_G['setting']['subforumsindex'] && $forumlist[$forum['fup']]['permission'] == 2) {
|
if($_G['setting']['subforumsindex'] && $forumlist[$forum['fup']]['permission'] == 2) {
|
||||||
$forumurl = !empty($forum['domain']) && !empty($_G['setting']['domain']['root']['forum']) ? 'http://'.$forum['domain'].'.'.$_G['setting']['domain']['root']['forum'] : 'forum.php?mod=forumdisplay&fid='.$forum['fid'];
|
$forumurl = !empty($forum['domain']) && !empty($_G['setting']['domain']['root']['forum']) ? $_G['scheme'].'://'.$forum['domain'].'.'.$_G['setting']['domain']['root']['forum'] : 'forum.php?mod=forumdisplay&fid='.$forum['fid'];
|
||||||
$forumlist[$forum['fup']]['subforums'] .= '<a href="'.$forumurl.'"><u>'.$forum['name'].'</u></a> ';
|
$forumlist[$forum['fup']]['subforums'] .= '<a href="'.$forumurl.'"><u>'.$forum['name'].'</u></a> ';
|
||||||
}
|
}
|
||||||
$forumlist[$forum['fup']]['threads'] += $forum['threads'];
|
$forumlist[$forum['fup']]['threads'] += $forum['threads'];
|
||||||
|
|
|
@ -134,7 +134,7 @@ function save_announce($id = 0, $starttime, $endtime, $subject, $type, $message,
|
||||||
|
|
||||||
if(empty($subject) || empty($message)) {
|
if(empty($subject) || empty($message)) {
|
||||||
acpmsg('modcp_ann_empty');
|
acpmsg('modcp_ann_empty');
|
||||||
} elseif($type == 1 && substr(strtolower($message), 0, 7) != 'http://') {
|
} elseif($type == 1 && !preg_match('/^https?:\/\//is', $message)) {
|
||||||
acpmsg('modcp_ann_urlerror');
|
acpmsg('modcp_ann_urlerror');
|
||||||
} else {
|
} else {
|
||||||
$data = array('author'=>$_G['username'], 'subject'=>$subject, 'type'=>$type, 'starttime'=>$starttime, 'endtime'=>$endtime,
|
$data = array('author'=>$_G['username'], 'subject'=>$subject, 'type'=>$type, 'starttime'=>$starttime, 'endtime'=>$endtime,
|
||||||
|
|
|
@ -69,11 +69,11 @@ if(submitcheck("articlesubmit", 0, $seccodecheck, $secqaacheck)) {
|
||||||
$_GET['fromurl'] = str_replace('&', '&', dhtmlspecialchars($_GET['fromurl']));
|
$_GET['fromurl'] = str_replace('&', '&', dhtmlspecialchars($_GET['fromurl']));
|
||||||
$_GET['dateline'] = !empty($_GET['dateline']) ? strtotime($_GET['dateline']) : TIMESTAMP;
|
$_GET['dateline'] = !empty($_GET['dateline']) ? strtotime($_GET['dateline']) : TIMESTAMP;
|
||||||
|
|
||||||
if(substr($_GET['url'], 0, 7) !== 'http://') {
|
if(!preg_match('/^https?:\/\//', $_GET['url'])) {
|
||||||
$_GET['url'] = '';
|
$_GET['url'] = '';
|
||||||
}
|
}
|
||||||
|
|
||||||
if(substr($_GET['fromurl'], 0, 7) !== 'http://') {
|
if(!preg_match('/^https?:\/\//', $_GET['fromurl'])) {
|
||||||
$_GET['fromurl'] = '';
|
$_GET['fromurl'] = '';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -23,8 +23,8 @@ foreach($query as $value) {
|
||||||
$value['bigpic'] = pic_get($value['filepath'], 'album', $value['thumb'], $value['remote'], 0);
|
$value['bigpic'] = pic_get($value['filepath'], 'album', $value['thumb'], $value['remote'], 0);
|
||||||
$value['pic'] = pic_get($value['filepath'], 'album', $value['thumb'], $value['remote']);
|
$value['pic'] = pic_get($value['filepath'], 'album', $value['thumb'], $value['remote']);
|
||||||
$value['count'] = $count;
|
$value['count'] = $count;
|
||||||
$value['url'] = (substr(strtolower($value['bigpic']), 0, 7) == 'http://' ? '' : $_G['siteurl']) . $value['bigpic'];
|
$value['url'] = (preg_match('/^https?:\/\//', $value['bigpic']) ? '' : $_G['siteurl']) . $value['bigpic'];
|
||||||
$value['thumburl'] = (substr(strtolower($value['pic']), 0, 7) == 'http://' ? '' : $_G['siteurl']) . $value['pic'];
|
$value['thumburl'] = (preg_match('/^https?:\/\//', $value['pic']) ? '' : $_G['siteurl']) . $value['pic'];
|
||||||
$photolist[] = $value;
|
$photolist[] = $value;
|
||||||
}
|
}
|
||||||
$_GET['ajaxtarget'] = 'albumphoto';
|
$_GET['ajaxtarget'] = 'albumphoto';
|
||||||
|
|
|
@ -263,7 +263,7 @@ if(!$gid && (!defined('FORUM_INDEX_PAGE_MEMORY') || !FORUM_INDEX_PAGE_MEMORY)) {
|
||||||
$forumlist[$forum['fup']]['posts'] += $forum['posts'];
|
$forumlist[$forum['fup']]['posts'] += $forum['posts'];
|
||||||
$forumlist[$forum['fup']]['todayposts'] += $forum['todayposts'];
|
$forumlist[$forum['fup']]['todayposts'] += $forum['todayposts'];
|
||||||
if($_G['setting']['subforumsindex'] && $forumlist[$forum['fup']]['permission'] == 2 && !($forumlist[$forum['fup']]['simple'] & 16) || ($forumlist[$forum['fup']]['simple'] & 8)) {
|
if($_G['setting']['subforumsindex'] && $forumlist[$forum['fup']]['permission'] == 2 && !($forumlist[$forum['fup']]['simple'] & 16) || ($forumlist[$forum['fup']]['simple'] & 8)) {
|
||||||
$forumurl = !empty($forum['domain']) && !empty($_G['setting']['domain']['root']['forum']) ? 'http://'.$forum['domain'].'.'.$_G['setting']['domain']['root']['forum'] : 'forum.php?mod=forumdisplay&fid='.$forum['fid'];
|
$forumurl = !empty($forum['domain']) && !empty($_G['setting']['domain']['root']['forum']) ? $_G['scheme'].'://'.$forum['domain'].'.'.$_G['setting']['domain']['root']['forum'] : 'forum.php?mod=forumdisplay&fid='.$forum['fid'];
|
||||||
$forumlist[$forum['fup']]['subforums'] .= (empty($forumlist[$forum['fup']]['subforums']) ? '' : ', ').'<a href="'.$forumurl.'" '.(!empty($forum['extra']['namecolor']) ? ' style="color: ' . $forum['extra']['namecolor'].';"' : '') . '>'.$forum['name'].'</a>';
|
$forumlist[$forum['fup']]['subforums'] .= (empty($forumlist[$forum['fup']]['subforums']) ? '' : ', ').'<a href="'.$forumurl.'" '.(!empty($forum['extra']['namecolor']) ? ' style="color: ' . $forum['extra']['namecolor'].';"' : '') . '>'.$forum['name'].'</a>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1357,7 +1357,7 @@ function viewthread_baseinfo($post, $extra) {
|
||||||
if($field != 'qq') {
|
if($field != 'qq') {
|
||||||
$v = profile_show($field, $post);
|
$v = profile_show($field, $post);
|
||||||
} elseif(!empty($post['qq'])) {
|
} elseif(!empty($post['qq'])) {
|
||||||
$v = '<a href="http://wpa.qq.com/msgrd?v=3&uin='.$post['qq'].'&site='.$_G['setting']['bbname'].'&menu=yes&from=discuz" target="_blank" title="'.lang('spacecp', 'qq_dialog').'"><img src="'.STATICURL.'/image/common/qq_big.gif" alt="QQ" style="margin:0px;"/></a>';
|
$v = '<a href="//wpa.qq.com/msgrd?v=3&uin='.$post['qq'].'&site='.$_G['setting']['bbname'].'&menu=yes&from=discuz" target="_blank" title="'.lang('spacecp', 'qq_dialog').'"><img src="'.STATICURL.'/image/common/qq_big.gif" alt="QQ" style="margin:0px;"/></a>';
|
||||||
}
|
}
|
||||||
if($v) {
|
if($v) {
|
||||||
if(!isset($_G['cache']['profilesetting'])) {
|
if(!isset($_G['cache']['profilesetting'])) {
|
||||||
|
|
|
@ -11,12 +11,12 @@ if(!defined('IN_DISCUZ')) {
|
||||||
}
|
}
|
||||||
if($mod == 'mobile' && defined('IN_MOBILE')) {
|
if($mod == 'mobile' && defined('IN_MOBILE')) {
|
||||||
if($_G['setting']['domain']['app']['mobile']) {
|
if($_G['setting']['domain']['app']['mobile']) {
|
||||||
dheader("Location:http://".$_G['setting']['domain']['app']['mobile']);
|
dheader('Location:'.$_G['scheme'].'://'.$_G['setting']['domain']['app']['mobile']);
|
||||||
} else {
|
} else {
|
||||||
dheader("Location:".$_G['siteurl'].'forum.php?mobile=yes');
|
dheader('Location:'.$_G['siteurl'].'forum.php?mobile=yes');
|
||||||
}
|
}
|
||||||
} elseif(!$_G['setting']['mobile']['allowmobile']) {
|
} elseif(!$_G['setting']['mobile']['allowmobile']) {
|
||||||
dheader("Location:".($_G['setting']['domain']['app']['default'] ? "http://".$_G['setting']['domain']['app']['default'] : $_G['siteurl']));
|
dheader("Location:".($_G['setting']['domain']['app']['default'] ? $_G['scheme'].'://'.$_G['setting']['domain']['app']['default'] : $_G['siteurl']));
|
||||||
}
|
}
|
||||||
include DISCUZ_ROOT.'./source/language/mobile/lang_template.php';
|
include DISCUZ_ROOT.'./source/language/mobile/lang_template.php';
|
||||||
$_G['lang'] = array_merge($_G['lang'], $lang);
|
$_G['lang'] = array_merge($_G['lang'], $lang);
|
||||||
|
@ -56,7 +56,7 @@ if($_GET['view'] == true) {
|
||||||
include template('mobile/forum/discuz');
|
include template('mobile/forum/discuz');
|
||||||
} else {
|
} else {
|
||||||
if($_G['setting']['domain']['app']['mobile']) {
|
if($_G['setting']['domain']['app']['mobile']) {
|
||||||
$url = 'http://'.$_G['setting']['domain']['app']['mobile'];
|
$url = $_G['scheme'].'://'.$_G['setting']['domain']['app']['mobile'];
|
||||||
$file = 'newmobiledomain.png';
|
$file = 'newmobiledomain.png';
|
||||||
} elseif($_G['setting']['mobile']['allowmnew']) {
|
} elseif($_G['setting']['mobile']['allowmnew']) {
|
||||||
$url = $_G['siteurl'].'m/';
|
$url = $_G['siteurl'].'m/';
|
||||||
|
|
|
@ -54,7 +54,7 @@
|
||||||
<div id="ft" class="wp cl">
|
<div id="ft" class="wp cl">
|
||||||
<div id="flk" class="y">
|
<div id="flk" class="y">
|
||||||
<p>
|
<p>
|
||||||
<!--{if $_G['setting']['site_qq']}--><a href="http://wpa.qq.com/msgrd?v=3&uin=$_G['setting']['site_qq']&site=$_G['setting']['bbname']&menu=yes&from=discuz" target="_blank" title="QQ"><img src="{IMGDIR}/site_qq.jpg" alt="QQ" /></a><span class="pipe">|</span><!--{/if}-->
|
<!--{if $_G['setting']['site_qq']}--><a href="//wpa.qq.com/msgrd?v=3&uin=$_G['setting']['site_qq']&site=$_G['setting']['bbname']&menu=yes&from=discuz" target="_blank" title="QQ"><img src="{IMGDIR}/site_qq.jpg" alt="QQ" /></a><span class="pipe">|</span><!--{/if}-->
|
||||||
<!--{loop $_G['setting']['footernavs'] $nav}--><!--{if $nav['available'] && ($nav['type'] && (!$nav['level'] || ($nav['level'] == 1 && $_G['uid']) || ($nav['level'] == 2 && $_G['adminid'] > 0) || ($nav['level'] == 3 && $_G['adminid'] == 1)) ||
|
<!--{loop $_G['setting']['footernavs'] $nav}--><!--{if $nav['available'] && ($nav['type'] && (!$nav['level'] || ($nav['level'] == 1 && $_G['uid']) || ($nav['level'] == 2 && $_G['adminid'] > 0) || ($nav['level'] == 3 && $_G['adminid'] == 1)) ||
|
||||||
!$nav['type'] && ($nav['id'] == 'stat' && $_G['group']['allowstatdata'] || $nav['id'] == 'report' && $_G['uid'] || $nav['id'] == 'archiver' || $nav['id'] == 'mobile' || $nav['id'] == 'darkroom'))}-->$nav[code]<span class="pipe">|</span><!--{/if}--><!--{/loop}-->
|
!$nav['type'] && ($nav['id'] == 'stat' && $_G['group']['allowstatdata'] || $nav['id'] == 'report' && $_G['uid'] || $nav['id'] == 'archiver' || $nav['id'] == 'mobile' || $nav['id'] == 'darkroom'))}-->$nav[code]<span class="pipe">|</span><!--{/if}--><!--{/loop}-->
|
||||||
<strong><a href="$_G['setting']['siteurl']" target="_blank">$_G['setting']['sitename']</a></strong>
|
<strong><a href="$_G['setting']['siteurl']" target="_blank">$_G['setting']['sitename']</a></strong>
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
<!--{subtemplate common/header_common}-->
|
<!--{subtemplate common/header_common}-->
|
||||||
<meta name="application-name" content="$_G['setting']['bbname']" />
|
<meta name="application-name" content="$_G['setting']['bbname']" />
|
||||||
<meta name="msapplication-tooltip" content="$_G['setting']['bbname']" />
|
<meta name="msapplication-tooltip" content="$_G['setting']['bbname']" />
|
||||||
<!--{if $_G['setting']['portalstatus']}--><meta name="msapplication-task" content="name=$_G['setting']['navs'][1]['navname'];action-uri={echo !empty($_G['setting']['domain']['app']['portal']) ? 'http://'.$_G['setting']['domain']['app']['portal'] : $_G[siteurl].'portal.php'};icon-uri={$_G[siteurl]}{IMGDIR}/portal.ico" /><!--{/if}-->
|
<!--{if $_G['setting']['portalstatus']}--><meta name="msapplication-task" content="name=$_G['setting']['navs'][1]['navname'];action-uri={echo !empty($_G['setting']['domain']['app']['portal']) ? $_G['scheme'].'://'.$_G['setting']['domain']['app']['portal'] : $_G[siteurl].'portal.php'};icon-uri={$_G[siteurl]}{IMGDIR}/portal.ico" /><!--{/if}-->
|
||||||
<meta name="msapplication-task" content="name=$_G['setting']['navs'][2]['navname'];action-uri={echo !empty($_G['setting']['domain']['app']['forum']) ? 'http://'.$_G['setting']['domain']['app']['forum'] : $_G[siteurl].'forum.php'};icon-uri={$_G[siteurl]}{IMGDIR}/bbs.ico" />
|
<meta name="msapplication-task" content="name=$_G['setting']['navs'][2]['navname'];action-uri={echo !empty($_G['setting']['domain']['app']['forum']) ? $_G['scheme'].'//'.$_G['setting']['domain']['app']['forum'] : $_G[siteurl].'forum.php'};icon-uri={$_G[siteurl]}{IMGDIR}/bbs.ico" />
|
||||||
<!--{if $_G['setting']['groupstatus']}--><meta name="msapplication-task" content="name=$_G['setting']['navs'][3]['navname'];action-uri={echo !empty($_G['setting']['domain']['app']['group']) ? 'http://'.$_G['setting']['domain']['app']['group'] : $_G[siteurl].'group.php'};icon-uri={$_G[siteurl]}{IMGDIR}/group.ico" /><!--{/if}-->
|
<!--{if $_G['setting']['groupstatus']}--><meta name="msapplication-task" content="name=$_G['setting']['navs'][3]['navname'];action-uri={echo !empty($_G['setting']['domain']['app']['group']) ? $_G['scheme'].'://'.$_G['setting']['domain']['app']['group'] : $_G[siteurl].'group.php'};icon-uri={$_G[siteurl]}{IMGDIR}/group.ico" /><!--{/if}-->
|
||||||
<!--{if helper_access::check_module('feed')}--><meta name="msapplication-task" content="name=$_G['setting']['navs'][4]['navname'];action-uri={echo !empty($_G['setting']['domain']['app']['home']) ? 'http://'.$_G['setting']['domain']['app']['home'] : $_G[siteurl].'home.php'};icon-uri={$_G[siteurl]}{IMGDIR}/home.ico" /><!--{/if}-->
|
<!--{if helper_access::check_module('feed')}--><meta name="msapplication-task" content="name=$_G['setting']['navs'][4]['navname'];action-uri={echo !empty($_G['setting']['domain']['app']['home']) ? $_G['scheme'].'://'.$_G['setting']['domain']['app']['home'] : $_G[siteurl].'home.php'};icon-uri={$_G[siteurl]}{IMGDIR}/home.ico" /><!--{/if}-->
|
||||||
<!--{if $_G['basescript'] == 'forum' && $_G['setting']['archiver']}-->
|
<!--{if $_G['basescript'] == 'forum' && $_G['setting']['archiver']}-->
|
||||||
<link rel="archives" title="$_G['setting']['bbname']" href="{$_G[siteurl]}archiver/" />
|
<link rel="archives" title="$_G['setting']['bbname']" href="{$_G[siteurl]}archiver/" />
|
||||||
<!--{/if}-->
|
<!--{/if}-->
|
||||||
|
@ -122,7 +122,7 @@
|
||||||
<div class="wp">
|
<div class="wp">
|
||||||
<div class="hdc cl">
|
<div class="hdc cl">
|
||||||
<!--{eval $mnid = getcurrentnav();}-->
|
<!--{eval $mnid = getcurrentnav();}-->
|
||||||
<h2><!--{if !isset($_G['setting']['navlogos'][$mnid])}--><a href="{if $_G['setting']['domain']['app']['default']}http://{$_G['setting']['domain']['app']['default']}/{else}./{/if}" title="$_G['setting']['bbname']">{$_G['style']['boardlogo']}</a><!--{else}-->$_G['setting']['navlogos'][$mnid]<!--{/if}--></h2>
|
<h2><!--{if !isset($_G['setting']['navlogos'][$mnid])}--><a href="{if $_G['setting']['domain']['app']['default']}{$_G['scheme']}://{$_G['setting']['domain']['app']['default']}/{else}./{/if}" title="$_G['setting']['bbname']">{$_G['style']['boardlogo']}</a><!--{else}-->$_G['setting']['navlogos'][$mnid]<!--{/if}--></h2>
|
||||||
<!--{template common/header_userstatus}-->
|
<!--{template common/header_userstatus}-->
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
@ -246,7 +246,7 @@
|
||||||
<!--{loop $forum_favlist $key $favorite}-->
|
<!--{loop $forum_favlist $key $favorite}-->
|
||||||
<!--{if $favforumlist[$favorite[id]]}-->
|
<!--{if $favforumlist[$favorite[id]]}-->
|
||||||
<!--{eval $forum=$favforumlist[$favorite[id]];}-->
|
<!--{eval $forum=$favforumlist[$favorite[id]];}-->
|
||||||
<!--{eval $forumurl = !empty($forum['domain']) && !empty($_G['setting']['domain']['root']['forum']) ? 'http://'.$forum['domain'].'.'.$_G['setting']['domain']['root']['forum'] : 'forum.php?mod=forumdisplay&fid='.$forum['fid'];}-->
|
<!--{eval $forumurl = !empty($forum['domain']) && !empty($_G['setting']['domain']['root']['forum']) ? $_G['scheme'].'://'.$forum['domain'].'.'.$_G['setting']['domain']['root']['forum'] : 'forum.php?mod=forumdisplay&fid='.$forum['fid'];}-->
|
||||||
<!--{if $forumcolumns>1}-->
|
<!--{if $forumcolumns>1}-->
|
||||||
<!--{if $favorderid && ($favorderid % $forumcolumns == 0)}-->
|
<!--{if $favorderid && ($favorderid % $forumcolumns == 0)}-->
|
||||||
</tr>
|
</tr>
|
||||||
|
@ -341,7 +341,7 @@
|
||||||
<img id="category_$cat[fid]_img" src="{IMGDIR}/$cat[collapseimg]" title="{lang spread}" alt="{lang spread}" onclick="toggle_collapse('category_$cat[fid]');" />
|
<img id="category_$cat[fid]_img" src="{IMGDIR}/$cat[collapseimg]" title="{lang spread}" alt="{lang spread}" onclick="toggle_collapse('category_$cat[fid]');" />
|
||||||
</span>
|
</span>
|
||||||
<!--{if $cat['moderators']}--><span class="y">{lang forum_category_modedby}: $cat[moderators]</span><!--{/if}-->
|
<!--{if $cat['moderators']}--><span class="y">{lang forum_category_modedby}: $cat[moderators]</span><!--{/if}-->
|
||||||
<!--{eval $caturl = !empty($cat['domain']) && !empty($_G['setting']['domain']['root']['forum']) ? 'http://'.$cat['domain'].'.'.$_G['setting']['domain']['root']['forum'] : '';}-->
|
<!--{eval $caturl = !empty($cat['domain']) && !empty($_G['setting']['domain']['root']['forum']) ? $_G['scheme'].'://'.$cat['domain'].'.'.$_G['setting']['domain']['root']['forum'] : '';}-->
|
||||||
<h2><a href="{if !empty($caturl)}$caturl{else}forum.php?gid=$cat[fid]{/if}" style="{if $cat[extra][namecolor]}color: {$cat[extra][namecolor]};{/if}">$cat[name]</a></h2>
|
<h2><a href="{if !empty($caturl)}$caturl{else}forum.php?gid=$cat[fid]{/if}" style="{if $cat[extra][namecolor]}color: {$cat[extra][namecolor]};{/if}">$cat[name]</a></h2>
|
||||||
</div>
|
</div>
|
||||||
<div id="category_$cat[fid]" class="bm_c" style="{echo $collapse['category_'.$cat[fid]]}">
|
<div id="category_$cat[fid]" class="bm_c" style="{echo $collapse['category_'.$cat[fid]]}">
|
||||||
|
@ -349,7 +349,7 @@
|
||||||
<tr>
|
<tr>
|
||||||
<!--{loop $cat[forums] $forumid}-->
|
<!--{loop $cat[forums] $forumid}-->
|
||||||
<!--{eval $forum=$forumlist[$forumid];}-->
|
<!--{eval $forum=$forumlist[$forumid];}-->
|
||||||
<!--{eval $forumurl = !empty($forum['domain']) && !empty($_G['setting']['domain']['root']['forum']) ? 'http://'.$forum['domain'].'.'.$_G['setting']['domain']['root']['forum'] : 'forum.php?mod=forumdisplay&fid='.$forum['fid'];}-->
|
<!--{eval $forumurl = !empty($forum['domain']) && !empty($_G['setting']['domain']['root']['forum']) ? $_G['scheme'].'://'.$forum['domain'].'.'.$_G['setting']['domain']['root']['forum'] : 'forum.php?mod=forumdisplay&fid='.$forum['fid'];}-->
|
||||||
<!--{if $cat['forumcolumns']}-->
|
<!--{if $cat['forumcolumns']}-->
|
||||||
<!--{if $forum['orderid'] && ($forum['orderid'] % $cat['forumcolumns'] == 0)}-->
|
<!--{if $forum['orderid'] && ($forum['orderid'] % $cat['forumcolumns'] == 0)}-->
|
||||||
</tr>
|
</tr>
|
||||||
|
|
|
@ -68,7 +68,7 @@
|
||||||
<!--{if (!empty($_G[forum][domain]) && !empty($_G['setting']['domain']['root']['forum'])) || $moderatedby || ($_G['page'] == 1 && $_G['forum']['rules'])}-->
|
<!--{if (!empty($_G[forum][domain]) && !empty($_G['setting']['domain']['root']['forum'])) || $moderatedby || ($_G['page'] == 1 && $_G['forum']['rules'])}-->
|
||||||
<div class="bm_c cl pbn">
|
<div class="bm_c cl pbn">
|
||||||
<!--{if !empty($_G[forum][domain]) && !empty($_G['setting']['domain']['root']['forum'])}-->
|
<!--{if !empty($_G[forum][domain]) && !empty($_G['setting']['domain']['root']['forum'])}-->
|
||||||
<div class="pbn">{lang forum_domain}: <a href="http://{$_G[forum][domain]}.{$_G['setting']['domain']['root']['forum']}" id="group_link">http://{$_G[forum][domain]}.{$_G['setting']['domain']['root']['forum']}</a></div>
|
<div class="pbn">{lang forum_domain}: <a href="{$_G['scheme']}://{$_G[forum][domain]}.{$_G['setting']['domain']['root']['forum']}" id="group_link">{$_G['scheme']}://{$_G[forum][domain]}.{$_G['setting']['domain']['root']['forum']}</a></div>
|
||||||
<!--{/if}-->
|
<!--{/if}-->
|
||||||
<!--{if $moderatedby}--><div>{lang forum_modedby}: <span class="xi2">$moderatedby</span></div><!--{/if}-->
|
<!--{if $moderatedby}--><div>{lang forum_modedby}: <span class="xi2">$moderatedby</span></div><!--{/if}-->
|
||||||
<!--{if $_G['page'] == 1 && $_G['forum']['rules']}-->
|
<!--{if $_G['page'] == 1 && $_G['forum']['rules']}-->
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
<!--{loop $leftside['favorites'] $favfid $fdata}-->
|
<!--{loop $leftside['favorites'] $favfid $fdata}-->
|
||||||
<dd>
|
<dd>
|
||||||
<!--{if !empty($_G['cache']['forums'][$favfid]['domain']) && !empty($_G['setting']['domain']['root']['forum'])}-->
|
<!--{if !empty($_G['cache']['forums'][$favfid]['domain']) && !empty($_G['setting']['domain']['root']['forum'])}-->
|
||||||
<a href="http://{$_G['cache']['forums'][$favfid]['domain']}.{$_G['setting']['domain']['root']['forum']}" title="$fdata[0]">$fdata[0]</a>
|
<a href="{$_G['scheme']}://{$_G['cache']['forums'][$favfid]['domain']}.{$_G['setting']['domain']['root']['forum']}" title="$fdata[0]">$fdata[0]</a>
|
||||||
<!--{else}-->
|
<!--{else}-->
|
||||||
<a href="forum.php?mod=forumdisplay&fid=$favfid">$fdata[0]</a>
|
<a href="forum.php?mod=forumdisplay&fid=$favfid">$fdata[0]</a>
|
||||||
<!--{/if}-->
|
<!--{/if}-->
|
||||||
|
@ -21,7 +21,7 @@
|
||||||
<!--{loop $gdata['sub'] $subfid $name}-->
|
<!--{loop $gdata['sub'] $subfid $name}-->
|
||||||
<dd{if $_G['fid'] == $subfid || $_G['forum']['fup'] == $subfid} class="bdl_a"{/if}>
|
<dd{if $_G['fid'] == $subfid || $_G['forum']['fup'] == $subfid} class="bdl_a"{/if}>
|
||||||
<!--{if !empty($_G['cache']['forums'][$subfid]['domain']) && !empty($_G['setting']['domain']['root']['forum'])}-->
|
<!--{if !empty($_G['cache']['forums'][$subfid]['domain']) && !empty($_G['setting']['domain']['root']['forum'])}-->
|
||||||
<a href="http://{$_G['cache']['forums'][$subfid]['domain']}.{$_G['setting']['domain']['root']['forum']}" title="$name">$name</a>
|
<a href="{$_G['scheme']}://{$_G['cache']['forums'][$subfid]['domain']}.{$_G['setting']['domain']['root']['forum']}" title="$name">$name</a>
|
||||||
<!--{else}-->
|
<!--{else}-->
|
||||||
<a href="forum.php?mod=forumdisplay&fid=$subfid" title="$name">$name</a>
|
<a href="forum.php?mod=forumdisplay&fid=$subfid" title="$name">$name</a>
|
||||||
<!--{/if}-->
|
<!--{/if}-->
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
<table cellspacing="0" cellpadding="0" class="fl_tb">
|
<table cellspacing="0" cellpadding="0" class="fl_tb">
|
||||||
<tr>
|
<tr>
|
||||||
<!--{loop $sublist $sub}-->
|
<!--{loop $sublist $sub}-->
|
||||||
<!--{eval $forumurl = !empty($sub['domain']) && !empty($_G['setting']['domain']['root']['forum']) ? 'http://'.$sub['domain'].'.'.$_G['setting']['domain']['root']['forum'] : 'forum.php?mod=forumdisplay&fid='.$sub['fid'];}-->
|
<!--{eval $forumurl = !empty($sub['domain']) && !empty($_G['setting']['domain']['root']['forum']) ? $_G['scheme'].'://'.$sub['domain'].'.'.$_G['setting']['domain']['root']['forum'] : 'forum.php?mod=forumdisplay&fid='.$sub['fid'];}-->
|
||||||
<!--{if $_G['forum']['forumcolumns']}-->
|
<!--{if $_G['forum']['forumcolumns']}-->
|
||||||
<!--{if $sub['orderid'] && ($sub['orderid'] % $_G['forum']['forumcolumns'] == 0)}-->
|
<!--{if $sub['orderid'] && ($sub['orderid'] % $_G['forum']['forumcolumns'] == 0)}-->
|
||||||
</tr>
|
</tr>
|
||||||
|
|
|
@ -35,10 +35,10 @@
|
||||||
<dt class="ptn">
|
<dt class="ptn">
|
||||||
<span class="y">
|
<span class="y">
|
||||||
<a href="home.php?mod=spacecp&ac=pm&op=showmsg&handlekey=showmsg_$post[authorid]&touid=$post[authorid]&pmid=0&daterange=2" onclick="showWindow('sendpm', this.href)" style="font-weight: 200"><img src="{IMGDIR}/pmto.gif" style="vertical-align:middle" />{lang send_pm}</a>
|
<a href="home.php?mod=spacecp&ac=pm&op=showmsg&handlekey=showmsg_$post[authorid]&touid=$post[authorid]&pmid=0&daterange=2" onclick="showWindow('sendpm', this.href)" style="font-weight: 200"><img src="{IMGDIR}/pmto.gif" style="vertical-align:middle" />{lang send_pm}</a>
|
||||||
<!--{if $post['qq']}--> <a href="http://wpa.qq.com/msgrd?v=3&uin=$post[qq]&site=$_G['setting']['bbname']&menu=yes&from=discuz" target="_blank" title="QQ"><img src="{IMGDIR}/qq.gif" alt="QQ" style="vertical-align:middle" /></a><!--{/if}-->
|
<!--{if $post['qq']}--> <a href="//wpa.qq.com/msgrd?v=3&uin=$post[qq]&site=$_G['setting']['bbname']&menu=yes&from=discuz" target="_blank" title="QQ"><img src="{IMGDIR}/qq.gif" alt="QQ" style="vertical-align:middle" /></a><!--{/if}-->
|
||||||
<!--{if $post['icq']}--> <a href="http://wwp.icq.com/scripts/search.dll?to=$post[icq]" target="_blank" title="ICQ"><img src="{IMGDIR}/icq.gif" alt="ICQ" style="vertical-align:middle" /></a><!--{/if}-->
|
<!--{if $post['icq']}--> <a href="//wwp.icq.com/scripts/search.dll?to=$post[icq]" target="_blank" title="ICQ"><img src="{IMGDIR}/icq.gif" alt="ICQ" style="vertical-align:middle" /></a><!--{/if}-->
|
||||||
<!--{if $post['yahoo']}--> <a href="http://edit.yahoo.com/config/send_webmesg?.target=$post[yahoo]&.src=pg" target="_blank" title="Yahoo"><img src="{IMGDIR}/yahoo.gif" alt="Yahoo!" style="vertical-align:middle" /></a><!--{/if}-->
|
<!--{if $post['yahoo']}--> <a href="//edit.yahoo.com/config/send_webmesg?.target=$post[yahoo]&.src=pg" target="_blank" title="Yahoo"><img src="{IMGDIR}/yahoo.gif" alt="Yahoo!" style="vertical-align:middle" /></a><!--{/if}-->
|
||||||
<!--{if $post['taobao']}--> <a href="javascript:;" onclick="window.open('http://amos.im.alisoft.com/msg.aw?v=2&uid='+encodeURIComponent('$post[taobaoas]')+'&site=cntaobao&s=2&charset=utf-8')" title="{lang taobao}"><img src="{IMGDIR}/taobao.gif" alt="{lang taobao}" style="vertical-align:middle" /></a><!--{/if}-->
|
<!--{if $post['taobao']}--> <a href="javascript:;" onclick="window.open('//amos.im.alisoft.com/msg.aw?v=2&uid='+encodeURIComponent('$post[taobaoas]')+'&site=cntaobao&s=2&charset=utf-8')" title="{lang taobao}"><img src="{IMGDIR}/taobao.gif" alt="{lang taobao}" style="vertical-align:middle" /></a><!--{/if}-->
|
||||||
</span>
|
</span>
|
||||||
$trade[seller]
|
$trade[seller]
|
||||||
<!--{if $_G['setting']['verify']['enabled']}-->
|
<!--{if $_G['setting']['verify']['enabled']}-->
|
||||||
|
|
|
@ -44,10 +44,10 @@ $postshowavatars = !($_G['setting']['bannedmessages'] & 2 && ($post['memberstatu
|
||||||
</div>
|
</div>
|
||||||
{eval viewthread_profile_node('top', $post);}
|
{eval viewthread_profile_node('top', $post);}
|
||||||
<div class="imicn">
|
<div class="imicn">
|
||||||
<!--{if $post['qq'] && !$post['privacy']['profile']['qq']}--><a href="http://wpa.qq.com/msgrd?v=3&uin=$post[qq]&site=$_G['setting']['bbname']&menu=yes&from=discuz" target="_blank" title="QQ"><img src="{IMGDIR}/qq.gif" alt="QQ" /></a><!--{/if}-->
|
<!--{if $post['qq'] && !$post['privacy']['profile']['qq']}--><a href="//wpa.qq.com/msgrd?v=3&uin=$post[qq]&site=$_G['setting']['bbname']&menu=yes&from=discuz" target="_blank" title="QQ"><img src="{IMGDIR}/qq.gif" alt="QQ" /></a><!--{/if}-->
|
||||||
<!--{if $post['icq'] && !$post['privacy']['profile']['icq']}--><a href="http://wwp.icq.com/scripts/search.dll?to=$post[icq]" target="_blank" title="ICQ"><img src="{IMGDIR}/icq.gif" alt="ICQ" /></a><!--{/if}-->
|
<!--{if $post['icq'] && !$post['privacy']['profile']['icq']}--><a href="//wwp.icq.com/scripts/search.dll?to=$post[icq]" target="_blank" title="ICQ"><img src="{IMGDIR}/icq.gif" alt="ICQ" /></a><!--{/if}-->
|
||||||
<!--{if $post['yahoo'] && !$post['privacy']['profile']['yahoo']}--><a href="http://edit.yahoo.com/config/send_webmesg?.target=$post[yahoo]&.src=pg" target="_blank" title="Yahoo"><img src="{IMGDIR}/yahoo.gif" alt="Yahoo!" /></a><!--{/if}-->
|
<!--{if $post['yahoo'] && !$post['privacy']['profile']['yahoo']}--><a href="//edit.yahoo.com/config/send_webmesg?.target=$post[yahoo]&.src=pg" target="_blank" title="Yahoo"><img src="{IMGDIR}/yahoo.gif" alt="Yahoo!" /></a><!--{/if}-->
|
||||||
<!--{if $post['taobao'] && !$post['privacy']['profile']['taobao']}--><a href="javascript:;" onclick="window.open('http://amos.im.alisoft.com/msg.aw?v=2&uid='+encodeURIComponent('$post[taobaoas]')+'&site=cntaobao&s=2&charset=utf-8')" title="{lang taobao}"><img src="{IMGDIR}/taobao.gif" alt="{lang taobao}" /></a><!--{/if}-->
|
<!--{if $post['taobao'] && !$post['privacy']['profile']['taobao']}--><a href="javascript:;" onclick="window.open('//amos.im.alisoft.com/msg.aw?v=2&uid='+encodeURIComponent('$post[taobaoas]')+'&site=cntaobao&s=2&charset=utf-8')" title="{lang taobao}"><img src="{IMGDIR}/taobao.gif" alt="{lang taobao}" /></a><!--{/if}-->
|
||||||
<!--{if $post['site'] && !$post['privacy']['profile']['site']}--><a href="$post[site]" target="_blank" title="{lang member_homepage}"><img src="{IMGDIR}/forumlink.gif" alt="{lang member_homepage}" /></a><!--{/if}-->
|
<!--{if $post['site'] && !$post['privacy']['profile']['site']}--><a href="$post[site]" target="_blank" title="{lang member_homepage}"><img src="{IMGDIR}/forumlink.gif" alt="{lang member_homepage}" /></a><!--{/if}-->
|
||||||
<a href="home.php?mod=space&uid=$post[authorid]&do=profile" target="_blank" title="{lang member_viewpro}"><img src="{IMGDIR}/userinfo.gif" alt="{lang member_viewpro}" /></a>
|
<a href="home.php?mod=space&uid=$post[authorid]&do=profile" target="_blank" title="{lang member_viewpro}"><img src="{IMGDIR}/userinfo.gif" alt="{lang member_viewpro}" /></a>
|
||||||
<!--{hook/viewthread_imicons $postcount}-->
|
<!--{hook/viewthread_imicons $postcount}-->
|
||||||
|
|
|
@ -80,7 +80,7 @@
|
||||||
<tr>
|
<tr>
|
||||||
<th>{lang subdomain}</th>
|
<th>{lang subdomain}</th>
|
||||||
<td>
|
<td>
|
||||||
http://<input type="text" name="domain" class="px" value="$_G[forum][domain]" style="width: 100px;" />.{$_G['setting']['domain']['root']['group']}
|
{$_G['scheme']}://<input type="text" name="domain" class="px" value="$_G[forum][domain]" style="width: 100px;" />.{$_G['setting']['domain']['root']['group']}
|
||||||
<p class="d">
|
<p class="d">
|
||||||
{lang group_domain_message}<br/>
|
{lang group_domain_message}<br/>
|
||||||
<!--{if $_G[forum][domain] && $consume}-->{lang group_edit_domain_message}<!--{/if}-->
|
<!--{if $_G[forum][domain] && $consume}-->{lang group_edit_domain_message}<!--{/if}-->
|
||||||
|
|
|
@ -139,7 +139,7 @@
|
||||||
<div class="bm_c">
|
<div class="bm_c">
|
||||||
<p>
|
<p>
|
||||||
<!--{if $_G['setting']['allowgroupdomain'] && !empty($_G['setting']['domain']['root']['group']) && !empty($_G['forum']['domain'])}-->
|
<!--{if $_G['setting']['allowgroupdomain'] && !empty($_G['setting']['domain']['root']['group']) && !empty($_G['forum']['domain'])}-->
|
||||||
<a href="http://{$_G[forum][domain]}.{$_G['setting']['domain']['root']['group']}" id="group_link"></a>
|
<a href="{$_G['scheme']}://{$_G[forum][domain]}.{$_G['setting']['domain']['root']['group']}" id="group_link"></a>
|
||||||
<!--{else}-->
|
<!--{else}-->
|
||||||
<a href="forum.php?mod=group&fid={$_G[fid]}" id="group_link"></a>
|
<a href="forum.php?mod=group&fid={$_G[fid]}" id="group_link"></a>
|
||||||
<!--{/if}-->
|
<!--{/if}-->
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
<!--{/if}-->
|
<!--{/if}-->
|
||||||
<ul class="pf_l cl pbm mbm">
|
<ul class="pf_l cl pbm mbm">
|
||||||
<!--{if $_G['setting']['allowspacedomain'] && $_G['setting']['domain']['root']['home'] && checkperm('domainlength') && !empty($space['domain'])}-->
|
<!--{if $_G['setting']['allowspacedomain'] && $_G['setting']['domain']['root']['home'] && checkperm('domainlength') && !empty($space['domain'])}-->
|
||||||
<!--{eval $spaceurl = 'http://'.$space['domain'].'.'.$_G['setting']['domain']['root']['home'];}-->
|
<!--{eval $spaceurl = $_G['scheme'].'://'.$space['domain'].'.'.$_G['setting']['domain']['root']['home'];}-->
|
||||||
<li><em>{lang second_domain}</em><a href="$spaceurl" onclick="setCopy('$spaceurl', '{lang copy_space_address}');return false;">$spaceurl</a></li>
|
<li><em>{lang second_domain}</em><a href="$spaceurl" onclick="setCopy('$spaceurl', '{lang copy_space_address}');return false;">$spaceurl</a></li>
|
||||||
<!--{/if}-->
|
<!--{/if}-->
|
||||||
<!--{if $_G[setting][homepagestyle]}-->
|
<!--{if $_G[setting][homepagestyle]}-->
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
<!--{if !$space[domain] && $dcredit}--><p>{lang edit_domain_message}</p><!--{/if}-->
|
<!--{if !$space[domain] && $dcredit}--><p>{lang edit_domain_message}</p><!--{/if}-->
|
||||||
<div class="mtw bm bmn hm">
|
<div class="mtw bm bmn hm">
|
||||||
<p class="mtw mbn">
|
<p class="mtw mbn">
|
||||||
http://<input type="text" name="domain" value="$space[domain]" size="20" class="px vm" />.{$_G[setting][domain][root][home]}
|
{$_G['scheme']}://<input type="text" name="domain" value="$space[domain]" size="20" class="px vm" />.{$_G[setting][domain][root][home]}
|
||||||
<input type="hidden" name="domainsubmit" value="true" />
|
<input type="hidden" name="domainsubmit" value="true" />
|
||||||
<button type="submit" name="domainsubmitbtn" id="domainsubmitbtn" value="true" class="pn vm" /><em>{lang edit_domain}</em></button>
|
<button type="submit" name="domainsubmitbtn" id="domainsubmitbtn" value="true" class="pn vm" /><em>{lang edit_domain}</em></button>
|
||||||
</p>
|
</p>
|
||||||
|
|
|
@ -116,7 +116,7 @@ body {background: #FFF; background-image:none; line-height: 130%; font-size: 10p
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<!--{if $_G['setting']['domain']['app']['mobile']}-->
|
<!--{if $_G['setting']['domain']['app']['mobile']}-->
|
||||||
{eval $nav = 'http://'.$_G['setting']['domain']['app']['mobile'];}
|
{eval $nav = $_G['scheme'].'://'.$_G['setting']['domain']['app']['mobile'];}
|
||||||
<!--{else}-->
|
<!--{else}-->
|
||||||
{eval $nav = "forum.php";}
|
{eval $nav = "forum.php";}
|
||||||
<!--{/if}-->
|
<!--{/if}-->
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
<p class="mbw xg2">{lang login_mobile_join}</p>
|
<p class="mbw xg2">{lang login_mobile_join}</p>
|
||||||
<p class="hm mbw" style="font-size: 18px; color: #F60;">
|
<p class="hm mbw" style="font-size: 18px; color: #F60;">
|
||||||
<!--{if $_G['setting']['domain']['app']['mobile']}-->
|
<!--{if $_G['setting']['domain']['app']['mobile']}-->
|
||||||
http://{$_G['setting']['domain']['app']['mobile']}
|
{$_G['scheme']}://{$_G['setting']['domain']['app']['mobile']}
|
||||||
<!--{else}-->
|
<!--{else}-->
|
||||||
{$_G['siteurl']}forum.php
|
{$_G['siteurl']}forum.php
|
||||||
<!--{/if}-->
|
<!--{/if}-->
|
||||||
|
|
|
@ -34,7 +34,7 @@
|
||||||
<header class="header">
|
<header class="header">
|
||||||
<div class="hdc cl">
|
<div class="hdc cl">
|
||||||
<!--{if $_G['setting']['domain']['app']['mobile']}-->
|
<!--{if $_G['setting']['domain']['app']['mobile']}-->
|
||||||
{eval $nav = 'http://'.$_G['setting']['domain']['app']['mobile'];}
|
{eval $nav = $_G['scheme'].'://'.$_G['setting']['domain']['app']['mobile'];}
|
||||||
<!--{else}-->
|
<!--{else}-->
|
||||||
{eval $nav = "forum.php";}
|
{eval $nav = "forum.php";}
|
||||||
<!--{/if}-->
|
<!--{/if}-->
|
||||||
|
|
|
@ -63,7 +63,7 @@
|
||||||
<header class="header">
|
<header class="header">
|
||||||
<div class="hdc cl">
|
<div class="hdc cl">
|
||||||
<!--{if $_G['setting']['domain']['app']['mobile']}-->
|
<!--{if $_G['setting']['domain']['app']['mobile']}-->
|
||||||
{eval $nav = 'http://'.$_G['setting']['domain']['app']['mobile'];}
|
{eval $nav = $_G['scheme'].'://'.$_G['setting']['domain']['app']['mobile'];}
|
||||||
<!--{else}-->
|
<!--{else}-->
|
||||||
{eval $nav = "forum.php";}
|
{eval $nav = "forum.php";}
|
||||||
<!--{/if}-->
|
<!--{/if}-->
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
<header class="header">
|
<header class="header">
|
||||||
<div class="hdc cl">
|
<div class="hdc cl">
|
||||||
<!--{if $_G['setting']['domain']['app']['mobile']}-->
|
<!--{if $_G['setting']['domain']['app']['mobile']}-->
|
||||||
{eval $nav = 'http://'.$_G['setting']['domain']['app']['mobile'];}
|
{eval $nav = $_G['scheme'].'://'.$_G['setting']['domain']['app']['mobile'];}
|
||||||
<!--{else}-->
|
<!--{else}-->
|
||||||
{eval $nav = "forum.php";}
|
{eval $nav = "forum.php";}
|
||||||
<!--{/if}-->
|
<!--{/if}-->
|
||||||
|
|
|
@ -40,7 +40,7 @@
|
||||||
<header class="header">
|
<header class="header">
|
||||||
<div class="hdc cl">
|
<div class="hdc cl">
|
||||||
<!--{if $_G['setting']['domain']['app']['mobile']}-->
|
<!--{if $_G['setting']['domain']['app']['mobile']}-->
|
||||||
{eval $nav = 'http://'.$_G['setting']['domain']['app']['mobile'];}
|
{eval $nav = $_G['scheme'].'://'.$_G['setting']['domain']['app']['mobile'];}
|
||||||
<!--{else}-->
|
<!--{else}-->
|
||||||
{eval $nav = "forum.php";}
|
{eval $nav = "forum.php";}
|
||||||
<!--{/if}-->
|
<!--{/if}-->
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
<header class="header">
|
<header class="header">
|
||||||
<div class="hdc cl">
|
<div class="hdc cl">
|
||||||
<!--{if $_G['setting']['domain']['app']['mobile']}-->
|
<!--{if $_G['setting']['domain']['app']['mobile']}-->
|
||||||
{eval $nav = 'http://'.$_G['setting']['domain']['app']['mobile'];}
|
{eval $nav = $_G['scheme'].'://'.$_G['setting']['domain']['app']['mobile'];}
|
||||||
<!--{else}-->
|
<!--{else}-->
|
||||||
{eval $nav = "forum.php";}
|
{eval $nav = "forum.php";}
|
||||||
<!--{/if}-->
|
<!--{/if}-->
|
||||||
|
|
|
@ -223,82 +223,8 @@ function uc_fopen2($url, $limit = 0, $post = '', $cookie = '', $bysocket = FALSE
|
||||||
}
|
}
|
||||||
|
|
||||||
function uc_fopen($url, $limit = 0, $post = '', $cookie = '', $bysocket = FALSE, $ip = '', $timeout = 15, $block = TRUE) {
|
function uc_fopen($url, $limit = 0, $post = '', $cookie = '', $bysocket = FALSE, $ip = '', $timeout = 15, $block = TRUE) {
|
||||||
$return = '';
|
require_once libfile('function/filesock');
|
||||||
$matches = parse_url($url);
|
return _dfsockopen($url, $limit, $post, $cookie, $bysocket, $ip, $timeout, $block);
|
||||||
!isset($matches['scheme']) && $matches['scheme'] = '';
|
|
||||||
!isset($matches['host']) && $matches['host'] = '';
|
|
||||||
!isset($matches['path']) && $matches['path'] = '';
|
|
||||||
!isset($matches['query']) && $matches['query'] = '';
|
|
||||||
!isset($matches['port']) && $matches['port'] = '';
|
|
||||||
$scheme = $matches['scheme'];
|
|
||||||
$host = $matches['host'];
|
|
||||||
$path = $matches['path'] ? $matches['path'].($matches['query'] ? '?'.$matches['query'] : '') : '/';
|
|
||||||
$port = !empty($matches['port']) ? $matches['port'] : 80;
|
|
||||||
if($post) {
|
|
||||||
$out = "POST $path HTTP/1.0\r\n";
|
|
||||||
$header = "Accept: */*\r\n";
|
|
||||||
$header .= "Accept-Language: zh-cn\r\n";
|
|
||||||
$header .= "Content-Type: application/x-www-form-urlencoded\r\n";
|
|
||||||
$header .= "User-Agent: $_SERVER[HTTP_USER_AGENT]\r\n";
|
|
||||||
$header .= "Host: $host\r\n";
|
|
||||||
$header .= 'Content-Length: '.strlen($post)."\r\n";
|
|
||||||
$header .= "Connection: Close\r\n";
|
|
||||||
$header .= "Cache-Control: no-cache\r\n";
|
|
||||||
$header .= "Cookie: $cookie\r\n\r\n";
|
|
||||||
$out .= $header.$post;
|
|
||||||
} else {
|
|
||||||
$out = "GET $path HTTP/1.0\r\n";
|
|
||||||
$header = "Accept: */*\r\n";
|
|
||||||
$header .= "Accept-Language: zh-cn\r\n";
|
|
||||||
$header .= "User-Agent: $_SERVER[HTTP_USER_AGENT]\r\n";
|
|
||||||
$header .= "Host: $host\r\n";
|
|
||||||
$header .= "Connection: Close\r\n";
|
|
||||||
$header .= "Cookie: $cookie\r\n\r\n";
|
|
||||||
$out .= $header;
|
|
||||||
}
|
|
||||||
|
|
||||||
$fpflag = 0;
|
|
||||||
if(!$fp = @fsocketopen(($ip ? $ip : $host), $port, $errno, $errstr, $timeout)) {
|
|
||||||
$context = array(
|
|
||||||
'http' => array(
|
|
||||||
'method' => $post ? 'POST' : 'GET',
|
|
||||||
'header' => $header,
|
|
||||||
'content' => $post,
|
|
||||||
'timeout' => $timeout,
|
|
||||||
),
|
|
||||||
);
|
|
||||||
$context = stream_context_create($context);
|
|
||||||
$fp = @fopen($scheme.'://'.($ip ? $ip : $host).':'.$port.$path, 'b', false, $context);
|
|
||||||
$fpflag = 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
if(!$fp) {
|
|
||||||
return '';
|
|
||||||
} else {
|
|
||||||
stream_set_blocking($fp, $block);
|
|
||||||
stream_set_timeout($fp, $timeout);
|
|
||||||
@fwrite($fp, $out);
|
|
||||||
$status = stream_get_meta_data($fp);
|
|
||||||
if(!$status['timed_out']) {
|
|
||||||
while (!feof($fp) && !$fpflag) {
|
|
||||||
if(($header = @fgets($fp)) && ($header == "\r\n" || $header == "\n")) {
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
$stop = false;
|
|
||||||
while(!feof($fp) && !$stop) {
|
|
||||||
$data = fread($fp, ($limit == 0 || $limit > 8192 ? 8192 : $limit));
|
|
||||||
$return .= $data;
|
|
||||||
if($limit) {
|
|
||||||
$limit -= strlen($data);
|
|
||||||
$stop = $limit <= 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@fclose($fp);
|
|
||||||
return $return;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function uc_app_ls() {
|
function uc_app_ls() {
|
||||||
|
@ -589,7 +515,7 @@ function uc_tag_get($tagname, $nums = 0) {
|
||||||
function uc_avatar($uid, $type = 'virtual', $returnhtml = 1) {
|
function uc_avatar($uid, $type = 'virtual', $returnhtml = 1) {
|
||||||
$uid = intval($uid);
|
$uid = intval($uid);
|
||||||
$uc_input = uc_api_input("uid=$uid");
|
$uc_input = uc_api_input("uid=$uid");
|
||||||
$uc_avatarflash = UC_API.'/images/camera.swf?inajax=1&appid='.UC_APPID.'&input='.$uc_input.'&agent='.md5($_SERVER['HTTP_USER_AGENT']).'&ucapi='.urlencode(str_replace('http://', '', UC_API)).'&avatartype='.$type.'&uploadSize=2048';
|
$uc_avatarflash = UC_API.'/images/camera.swf?inajax=1&appid='.UC_APPID.'&input='.$uc_input.'&agent='.md5($_SERVER['HTTP_USER_AGENT']).'&ucapi='.urlencode(UC_API).'&avatartype='.$type.'&uploadSize=2048';
|
||||||
if($returnhtml) {
|
if($returnhtml) {
|
||||||
return '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" width="450" height="253" id="mycamera" align="middle">
|
return '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" width="450" height="253" id="mycamera" align="middle">
|
||||||
<param name="allowScriptAccess" value="always" />
|
<param name="allowScriptAccess" value="always" />
|
||||||
|
|
Loading…
Reference in New Issue