SilentLittleCat 7 lat temu
rodzic
commit
0701ce9581
3 zmienionych plików z 284 dodań i 51 usunięć
  1. 86 50
      .idea/workspace.xml
  2. 196 0
      index.php
  3. 2 1
      template/wfdsoft_jiaohu/forum/discuz.php

+ 86 - 50
.idea/workspace.xml

xqd xqd xqd xqd xqd xqd xqd xqd xqd xqd
@@ -2,8 +2,8 @@
 <project version="4">
   <component name="ChangeListManager">
     <list default="true" id="deb87e12-87cf-4e37-bffe-bf7390933348" name="Default" comment="">
-      <change beforePath="$PROJECT_DIR$/index.php" afterPath="$PROJECT_DIR$/index.php" />
-      <change beforePath="$PROJECT_DIR$/misc.php" afterPath="$PROJECT_DIR$/misc.php" />
+      <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" afterPath="$PROJECT_DIR$/.idea/workspace.xml" />
+      <change beforePath="$PROJECT_DIR$/template/wfdsoft_jiaohu/forum/discuz.php" afterPath="$PROJECT_DIR$/template/wfdsoft_jiaohu/forum/discuz.php" />
     </list>
     <option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
     <option name="TRACKING_ENABLED" value="true" />
@@ -24,7 +24,7 @@
           </provider>
         </entry>
       </file>
-      <file leaf-file-name="index.php" pinned="false" current-in-tab="true">
+      <file leaf-file-name="index.php" pinned="false" current-in-tab="false">
         <entry file="file://$PROJECT_DIR$/index.php">
           <provider selected="true" editor-type-id="text-editor">
             <state relative-caret-position="31">
@@ -34,6 +34,36 @@
           </provider>
         </entry>
       </file>
+      <file leaf-file-name="index.htm" pinned="false" current-in-tab="false">
+        <entry file="file://$PROJECT_DIR$/template/wfdsoft_jiaohu/group/index.htm">
+          <provider selected="true" editor-type-id="text-editor">
+            <state relative-caret-position="0">
+              <caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
+              <folding />
+            </state>
+          </provider>
+        </entry>
+      </file>
+      <file leaf-file-name="index.htm" pinned="false" current-in-tab="false">
+        <entry file="file://$PROJECT_DIR$/data/threadcache/index.htm">
+          <provider selected="true" editor-type-id="text-editor">
+            <state relative-caret-position="0">
+              <caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
+              <folding />
+            </state>
+          </provider>
+        </entry>
+      </file>
+      <file leaf-file-name="discuz.php" pinned="false" current-in-tab="true">
+        <entry file="file://$PROJECT_DIR$/template/wfdsoft_jiaohu/forum/discuz.php">
+          <provider selected="true" editor-type-id="text-editor">
+            <state relative-caret-position="0">
+              <caret line="0" column="28" lean-forward="false" selection-start-line="0" selection-start-column="28" selection-end-line="0" selection-end-column="28" />
+              <folding />
+            </state>
+          </provider>
+        </entry>
+      </file>
     </leaf>
   </component>
   <component name="FindInProjectRecents">
@@ -105,6 +135,7 @@
         <option value="$PROJECT_DIR$/home.php" />
         <option value="$PROJECT_DIR$/misc.php" />
         <option value="$PROJECT_DIR$/index.php" />
+        <option value="$PROJECT_DIR$/template/wfdsoft_jiaohu/forum/discuz.php" />
       </list>
     </option>
   </component>
@@ -156,13 +187,13 @@
               <item name="zijia" type="b2602c69:ProjectViewProjectNode" />
               <item name="zijia" type="2a2b976b:PhpTreeStructureProvider$1" />
               <item name="template" type="2a2b976b:PhpTreeStructureProvider$1" />
-              <item name="default" type="2a2b976b:PhpTreeStructureProvider$1" />
+              <item name="wfdsoft_jiaohu" type="2a2b976b:PhpTreeStructureProvider$1" />
             </path>
             <path>
               <item name="zijia" type="b2602c69:ProjectViewProjectNode" />
               <item name="zijia" type="2a2b976b:PhpTreeStructureProvider$1" />
               <item name="template" type="2a2b976b:PhpTreeStructureProvider$1" />
-              <item name="default" type="2a2b976b:PhpTreeStructureProvider$1" />
+              <item name="wfdsoft_jiaohu" type="2a2b976b:PhpTreeStructureProvider$1" />
               <item name="forum" type="2a2b976b:PhpTreeStructureProvider$1" />
             </path>
           </expand>
@@ -214,12 +245,12 @@
       <workItem from="1525227575525" duration="11054000" />
       <workItem from="1525275777043" duration="4000" />
       <workItem from="1525612433789" duration="9986000" />
-      <workItem from="1525658293907" duration="19803000" />
+      <workItem from="1525658293907" duration="20751000" />
     </task>
     <servers />
   </component>
   <component name="TimeTrackingManager">
-    <option name="totallyTimeSpent" value="45677000" />
+    <option name="totallyTimeSpent" value="46625000" />
   </component>
   <component name="ToolWindowManager">
     <frame x="-9" y="-9" width="1938" height="1048" extended-state="7" />
@@ -257,41 +288,6 @@
     <watches-manager />
   </component>
   <component name="editorHistoryManager">
-    <entry file="file://$PROJECT_DIR$/source/language/lang_message.php">
-      <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="558">
-          <caret line="40" column="36" lean-forward="true" selection-start-line="40" selection-start-column="36" selection-end-line="40" selection-end-column="36" />
-        </state>
-      </provider>
-    </entry>
-    <entry file="file://$PROJECT_DIR$/source/function/function_message.php">
-      <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="527">
-          <caret line="141" column="25" lean-forward="true" selection-start-line="141" selection-start-column="25" selection-end-line="141" selection-end-column="25" />
-        </state>
-      </provider>
-    </entry>
-    <entry file="file://$PROJECT_DIR$/static/js/forum_post.js">
-      <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="294">
-          <caret line="548" column="22" lean-forward="true" selection-start-line="548" selection-start-column="22" selection-end-line="548" selection-end-column="22" />
-        </state>
-      </provider>
-    </entry>
-    <entry file="file://$PROJECT_DIR$/template/wfdsoft_jiaohu/common/header_no_nav.php">
-      <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="0">
-          <caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
-        </state>
-      </provider>
-    </entry>
-    <entry file="file://$PROJECT_DIR$/template/default/common/header.htm">
-      <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="0">
-          <caret line="0" column="23" lean-forward="false" selection-start-line="0" selection-start-column="23" selection-end-line="0" selection-end-column="23" />
-        </state>
-      </provider>
-    </entry>
     <entry file="file://$PROJECT_DIR$/static/js/common.js">
       <provider selected="true" editor-type-id="text-editor">
         <state relative-caret-position="853">
@@ -830,14 +826,6 @@
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/template/wfdsoft_jiaohu/group/index.htm">
-      <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="-3487">
-          <caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
-          <folding />
-        </state>
-      </provider>
-    </entry>
     <entry file="file://$PROJECT_DIR$/template/index.htm">
       <provider selected="true" editor-type-id="text-editor">
         <state relative-caret-position="0">
@@ -902,6 +890,14 @@
         </state>
       </provider>
     </entry>
+    <entry file="file://$PROJECT_DIR$/template/wfdsoft_jiaohu/discuz_style_wfdsoft_jiaohu.xml">
+      <provider selected="true" editor-type-id="text-editor">
+        <state relative-caret-position="0">
+          <caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
+          <folding />
+        </state>
+      </provider>
+    </entry>
     <entry file="file://$PROJECT_DIR$/index.php">
       <provider selected="true" editor-type-id="text-editor">
         <state relative-caret-position="31">
@@ -910,5 +906,45 @@
         </state>
       </provider>
     </entry>
+    <entry file="file://$PROJECT_DIR$/data/template/index.htm">
+      <provider selected="true" editor-type-id="text-editor">
+        <state relative-caret-position="0">
+          <caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
+          <folding />
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/template/wfdsoft_jiaohu/group/index.htm">
+      <provider selected="true" editor-type-id="text-editor">
+        <state relative-caret-position="0">
+          <caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
+          <folding />
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/data/discuzx_utility.lock">
+      <provider selected="true" editor-type-id="text-editor">
+        <state relative-caret-position="0">
+          <caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
+          <folding />
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/data/threadcache/index.htm">
+      <provider selected="true" editor-type-id="text-editor">
+        <state relative-caret-position="0">
+          <caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
+          <folding />
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/template/wfdsoft_jiaohu/forum/discuz.php">
+      <provider selected="true" editor-type-id="text-editor">
+        <state relative-caret-position="0">
+          <caret line="0" column="28" lean-forward="false" selection-start-line="0" selection-start-column="28" selection-end-line="0" selection-end-column="28" />
+          <folding />
+        </state>
+      </provider>
+    </entry>
   </component>
 </project>

+ 196 - 0
index.php

xqd
@@ -0,0 +1,196 @@
+<?php
+print_r('ok');exit();
+function isMobile()
+{ 
+    // 如果有HTTP_X_WAP_PROFILE则一定是移动设备
+    if (isset ($_SERVER['HTTP_X_WAP_PROFILE']))
+    {
+        return true;
+    } 
+    // 如果via信息含有wap则一定是移动设备,部分服务商会屏蔽该信息
+    if (isset ($_SERVER['HTTP_VIA']))
+    { 
+        // 找不到为flase,否则为true
+        return stristr($_SERVER['HTTP_VIA'], "wap") ? true : false;
+    } 
+    // 脑残法,判断手机发送的客户端标志,兼容性有待提高
+    if (isset ($_SERVER['HTTP_USER_AGENT']))
+    {
+        $clientkeywords = array ('nokia',          'sony',           'ericsson',            'mot',   'samsung',            'htc',            'sgh',           'lg',           'sharp',            'sie-',         'philips',            'panasonic',            'alcatel',            'lenovo',            'iphone','ipod',   'blackberry', 'meizu','android','netfront','symbian','ucweb','windowsce','palm','operamini','operamobi','openwave','nexusone','cldc','midp','wap','mobile'
+            ); 
+        // 从HTTP_USER_AGENT中查找手机浏览器的关键字
+        if (preg_match("/(" . implode('|', $clientkeywords) . ")/i", strtolower($_SERVER['HTTP_USER_AGENT'])))
+        {
+            return true;
+        } 
+    } 
+    // 协议法,因为有可能不准确,放到最后判断
+    if (isset ($_SERVER['HTTP_ACCEPT']))
+    { 
+        // 如果只支持wml并且不支持html那一定是移动设备
+        // 如果支持wml和html但是wml在html之前则是移动设备
+        if ((strpos($_SERVER['HTTP_ACCEPT'], 'vnd.wap.wml') !== false) && (strpos($_SERVER['HTTP_ACCEPT'], 'text/html') === false || (strpos($_SERVER['HTTP_ACCEPT'], 'vnd.wap.wml') < strpos($_SERVER['HTTP_ACCEPT'], 'text/html'))))
+        {
+            return true;
+        } 
+    } 
+    return false;
+} 
+//if(isMobile()){
+//	header("Location:http://m.9026.com");  
+//}
+
+/**
+ *      [Discuz!] (C)2001-2099 Comsenz Inc.
+ *      This is NOT a freeware, use is subject to license terms
+ *
+ *      $Id: index.php 34524 2014-05-15 04:42:23Z nemohou $
+ */
+
+if(!empty($_SERVER['QUERY_STRING']) && is_numeric($_SERVER['QUERY_STRING'])) {
+	$_ENV['curapp'] = 'home';
+	$_GET = array('mod'=>'space', 'uid'=>$_SERVER['QUERY_STRING']);
+} else {
+
+	$url = '';
+	$domain = $_ENV = array();
+	$jump = false;
+	@include_once './data/sysdata/cache_domain.php';
+	$_ENV['domain'] = $domain;
+	if(empty($_ENV['domain'])) {
+		$_ENV['curapp'] = 'forum';
+	} else {
+		$_ENV['defaultapp'] = array('portal.php' => 'portal', 'forum.php' => 'forum', 'group.php' => 'group', 'home.php' => 'home');
+		$_ENV['hostarr'] = explode('.', $_SERVER['HTTP_HOST']);
+		$_ENV['domainroot'] = substr($_SERVER['HTTP_HOST'], strpos($_SERVER['HTTP_HOST'], '.')+1);
+		if(!empty($_ENV['domain']['app']) && is_array($_ENV['domain']['app']) && in_array($_SERVER['HTTP_HOST'], $_ENV['domain']['app'])) {
+			$_ENV['curapp'] = array_search($_SERVER['HTTP_HOST'], $_ENV['domain']['app']);
+			if($_ENV['curapp'] == 'mobile') {
+				$_ENV['curapp'] = 'forum';
+				if(!isset($_GET['mobile'])) {
+					@$_GET['mobile'] = '2';
+				}
+			}
+			if($_ENV['curapp'] == 'default' || !isset($_ENV['defaultapp'][$_ENV['curapp'].'.php'])) {
+				$_ENV['curapp'] = '';
+			}
+		} elseif(!empty($_ENV['domain']['root']) && is_array($_ENV['domain']['root']) && in_array($_ENV['domainroot'], $_ENV['domain']['root'])) {
+
+			$_G['setting']['holddomain'] = $_ENV['domain']['holddomain'] ? $_ENV['domain']['holddomain'] : array('www');
+			$list = $_ENV['domain']['list'];
+			if(isset($list[$_SERVER['HTTP_HOST']])) {
+				$domain = $list[$_SERVER['HTTP_HOST']];
+				switch($domain['idtype']) {
+					case 'subarea':
+						$_ENV['curapp'] = 'forum';
+						$_GET['gid'] = intval($domain['id']);
+						break;
+					case 'forum':
+						$_ENV['curapp'] = 'forum';
+						$_GET['mod'] = 'forumdisplay';
+						$_GET['fid'] = intval($domain['id']);
+						break;
+					case 'topic':
+						$_ENV['curapp'] = 'portal';
+						$_GET['mod'] = 'topic';
+						$_GET['topicid'] = intval($domain['id']);
+						break;
+					case 'channel':
+						$_ENV['curapp'] = 'portal';
+						$_GET['mod'] = 'list';
+						$_GET['catid'] = intval($domain['id']);
+						break;
+					case 'plugin':
+						$_ENV['curapp'] = 'plugin';
+						$_GET['id'] = $domain['id'];
+						$_GET['fromapp'] = 'index';
+						break;
+				}
+			} elseif(count($_ENV['hostarr']) > 2 && $_ENV['hostarr'][0] != 'www' && !checkholddomain($_ENV['hostarr'][0])) {
+				$_ENV['prefixdomain'] = addslashes($_ENV['hostarr'][0]);
+				$_ENV['domainroot'] = addslashes($_ENV['domainroot']);
+				require_once './source/class/class_core.php';
+				C::app()->init_setting = true;
+				C::app()->init_user = false;
+				C::app()->init_session = false;
+				C::app()->init_cron = false;
+				C::app()->init_misc = false;
+				C::app()->init();
+				$jump = true;
+				$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 = $apphost ? 'http://'.$apphost.'/' : '';
+				switch($domain['idtype']) {
+					case 'home':
+						if($_G['setting']['rewritestatus'] && in_array('home_space', $_G['setting']['rewritestatus'])) {
+							$url = rewriteoutput('home_space', 1, $apphost, $domain['id']);
+						} else {
+							$url = $apphost.'home.php?mod=space&uid='.$domain['id'];
+						}
+						break;
+					case 'group':
+						if($_G['setting']['rewritestatus'] && in_array('group_group', $_G['setting']['rewritestatus'])) {
+							$url = rewriteoutput('group_group', 1, $apphost, $domain['id']);
+						} else {
+							$url = $apphost.'forum.php?mod=group&fid='.$domain['id'].'&page=1';
+						}
+						break;
+				}
+			}
+		} else {
+			$jump = true;
+		}
+		if(empty($url) && empty($_ENV['curapp'])) {
+			if(!empty($_ENV['domain']['defaultindex']) && !$jump) {
+				if($_ENV['defaultapp'][$_ENV['domain']['defaultindex']]) {
+					$_ENV['curapp'] = $_ENV['defaultapp'][$_ENV['domain']['defaultindex']];
+				} else {
+					$url = $_ENV['domain']['defaultindex'];
+				}
+			} else {
+				if($jump) {
+					$url = empty($_ENV['domain']['app']['default']) ? (!empty($_ENV['domain']['defaultindex']) ? $_ENV['domain']['defaultindex'] : 'forum.php') : 'http://'.$_ENV['domain']['app']['default'];
+				} else {
+					$_ENV['curapp'] = 'forum';
+				}
+			}
+		}
+	}
+}
+if(!empty($url)) {
+	$delimiter = strrpos($url, '?') ? '&' : '?';
+	if(isset($_GET['fromuid']) && $_GET['fromuid']) {
+		$url .= sprintf('%sfromuid=%d', $delimiter, $_GET['fromuid']);
+	} elseif(isset($_GET['fromuser']) && $_GET['fromuser']) {
+		$url .= sprintf('%sfromuser=%s', $delimiter, rawurlencode($_GET['fromuser']));
+	}
+	header("HTTP/1.1 301 Moved Permanently");
+	header("location: $url");
+} else {
+	require './'.$_ENV['curapp'].'.php';
+}
+
+function checkholddomain($domain) {
+	global $_G;
+
+	$domain = strtolower($domain);
+	if(preg_match("/^[^a-z]/i", $domain)) return true;
+	$holdmainarr = empty($_G['setting']['holddomain']) ? array('www') : explode('|', $_G['setting']['holddomain']);
+	$ishold = false;
+	foreach ($holdmainarr as $value) {
+		if(strpos($value, '*') === false) {
+			if(strtolower($value) == $domain) {
+				$ishold = true;
+				break;
+			}
+		} else {
+			$value = str_replace('*', '.*?', $value);
+			if(@preg_match("/$value/i", $domain)) {
+				$ishold = true;
+				break;
+			}
+		}
+	}
+	return $ishold;
+}
+?>

+ 2 - 1
template/wfdsoft_jiaohu/forum/discuz.php

xqd
@@ -1,4 +1,5 @@
-<?php echo '周末设计商业模板保护!请购买正版模板, 客服QQ: 125422921 , http://www.wfdsoft.com/ ';exit;?>
+<?php print_r('ok'); exit(); ?>
+<?php echo '锟斤拷末锟斤拷锟斤拷锟揭的o拷灞o拷锟斤拷锟斤拷牍猴拷锟斤拷锟斤拷锟侥o拷锟�, 锟酵凤拷QQ: 125422921 , http://www.wfdsoft.com/ ';exit;?>
 <!--{template common/header}-->
 
 <div id="pt" class="bm cl">