[parasy commit] r37 - in trunk: sql upload upload/parasy upload/plugins/parasy upload/templates/babel

0 views
Skip to first unread message

codesite...@google.com

unread,
Jan 2, 2008, 9:18:28 AM1/2/08
to project...@googlegroups.com
Author: Saiccc
Date: Wed Jan 2 06:17:47 2008
New Revision: 37

Modified:
trunk/sql/parasy.mysql.sql
trunk/upload/.htaccess
trunk/upload/logging.php
trunk/upload/parasy.php
trunk/upload/parasy/ParasyCore.php
trunk/upload/plugins/parasy/now.inc.php
trunk/upload/templates/babel/login.htm
trunk/upload/templates/babel/login_wap.htm
trunk/upload/templates/babel/now_im.htm
trunk/upload/templates/babel/now_wap.htm

Log:
login problem fixed

Modified: trunk/sql/parasy.mysql.sql
==============================================================================
--- trunk/sql/parasy.mysql.sql (original)
+++ trunk/sql/parasy.mysql.sql Wed Jan 2 06:17:47 2008
@@ -190,6 +190,20 @@
KEY `INDEX_PROGRESS` (`tta_progress`)
) ENGINE=MyISAM DEFAULT CHARSET=gbk;

+
+CREATE TABLE `cdb_plugin_tod_note` (
+ `note_id` int(10) unsigned NOT NULL auto_increment,
+ `note_hash` varchar(8) NOT NULL,
+ `note_uid` int(10) unsigned NOT NULL default '0',
+ `note_private` int(10) unsigned NOT NULL default '0',
+ `note_message` mediumtext NOT NULL,
+ `note_created` int(10) unsigned NOT NULL default '0',
+ `note_lastupdated` int(10) unsigned NOT NULL default '0',
+ `note_lasttouched` int(10) unsigned NOT NULL default '0',
+ PRIMARY KEY (`note_id`),
+ KEY `INDEX_UID` (`note_uid`)
+) ENGINE=MyISAM DEFAULT CHARSET=gbk;
+
-- --------------------------------------------------------

--

Modified: trunk/upload/.htaccess
==============================================================================
--- trunk/upload/.htaccess (original)
+++ trunk/upload/.htaccess Wed Jan 2 06:17:47 2008
@@ -1,4 +1,5 @@
RewriteEngine On
+
RewriteBase /bbs

RewriteRule ^archiver/([a-z0-9\-]+\.html)$ archiver/index.php?$1 [L]
@@ -33,8 +34,6 @@
RewriteRule ^my-(.+)-fid-([0-9]+)\.html$ my.php?item=$1&srchfid=$2 [L]
RewriteRule ^my-(.+)\.html$ my.php?item=$1 [L]

-
-
RewriteRule ^newthread-([0-9]+)-([0-9]+)\.html$
post.php?action=newthread&fid=$1&extra=page%3D$2 [L]
RewriteRule ^reply-([0-9]+)-([0-9]+)-([0-9]+)\.html$
post.php?action=reply&fid=$1&tid=$2&extra=page%3D$3 [L]
RewriteRule ^redirect-([0-9]+)\.html$
redirect.php?tid=$1&goto=lastpost#lastpost [L]
@@ -74,11 +73,14 @@

RewriteRule ^passwd.nnm$ member.php?action=lostpasswd [L]
RewriteRule ^login.nnm$ logging.php?action=login [L]
-RewriteRule ^login-db.nnm$ logging.php?action=login&dashboard=1 [L]
-RewriteRule ^login-m.nnm$ logging.php?action=login&mobile=1 [L]
+RewriteRule ^login-db.nnm$ logging.php?action=login&app=dashboard [L]
+RewriteRule ^login-m.nnm$ logging.php?action=login&app=mobile [L]
+RewriteRule ^login-now.nnm$ logging.php?action=login&app=now_mobile [L]
RewriteRule ^signup.nnm$ register.php [L]
RewriteRule ^digest.nnm$ digest.php [L]
RewriteRule ^logout-([^\/]+).nnm$
logging.php?action=logout&formhash=$1 [L]
+RewriteRule ^logout-now-([^\/]+).nnm$
logging.php?action=logout&app=now_mobile&formhash=$1 [L]
+
RewriteRule ^pm.nnm$ pm.php [L]
RewriteRule ^search.nnm$ search.php [L]
RewriteRule ^favorite.nnm$ my.php?item=favorites&type=thread [L]
@@ -105,6 +107,7 @@
RewriteRule ^tod$ plugin.php?identifier=tod&module=tod&action=home [L]
RewriteRule ^tod/$ plugin.php?identifier=tod&module=tod&action=home [L]
RewriteRule ^tod/([^\/]+)$
plugin.php?identifier=tod&module=tod&action=home&username=$1 [L]
+RewriteRule ^tod/([^\/]+)/notes$
plugin.php?identifier=tod&module=tod&action=notes&username=$1 [L]

RewriteRule ^now$ plugin.php?identifier=now&module=now&action=index [L]
RewriteRule ^now/$ plugin.php?identifier=now&module=now&action=index [L]
@@ -143,13 +146,15 @@
RewriteRule ^del/savepoint/([0-9]+)$
parasy_operation.php?type=svp&operation=del&savepoint_id=$1 [L]
RewriteRule ^del/chl/([0-9]+)$
parasy_operation.php?type=chl&operation=del&chl_id=$1 [L]

-RewriteRule ^topic/latest.html$ parasy.php?action=topic_latest [L]
-RewriteRule ^topic/answered.html$ parasy.php?action=topic_answered [L]
RewriteRule ^expense/view.nnm$ parasy.php?action=expense_view [L]
RewriteRule ^expense/view/([0-9]+)$
parasy.php?action=expense_view&page=$1 [L]
RewriteRule ^session/stats.nnm$ parasy.php?action=session [L]
RewriteRule ^new_features.html$ parasy.php?action=about [L]
RewriteRule ^about$ parasy.php?action=about [L]
+RewriteRule ^topic-latest.html$ parasy.php?action=topic_latest [L]
+RewriteRule ^topic-answered.html$ parasy.php?action=topic_answered [L]
+RewriteRule ^topic/latest.html$ parasy.php?action=topic_latest [L]
+RewriteRule ^topic/answered.html$ parasy.php?action=topic_answered [L]

RewriteRule ^m$ parasy.php?action=mobile_home [L]
RewriteRule ^m/$ parasy.php?action=mobile_home [L]

Modified: trunk/upload/logging.php
==============================================================================
--- trunk/upload/logging.php (original)
+++ trunk/upload/logging.php Wed Jan 2 06:17:47 2008
@@ -33,9 +33,9 @@
showmessage('logout_succeed', 'api/relateshopex.php?action=logout&forward='.rawurlencode($dreferer).'&verify='.$verify);
} else {
if(preg_match('/(mozilla|opera|m3gate|winwap|openwave)/i',
$_SERVER['HTTP_USER_AGENT'])) {
- showmessage('logout_succeed', dreferer());
+ showmessage('logout_succeed', dreferer());
} else {
- wapshowmessage('login_succeed', 'now');
+ wapshowmessage('logout_succeed', 'now');
}
}

@@ -74,7 +74,7 @@
if($seccodecheck) {
$seccode = random(6, 1) + $seccode{0} * 1000000;
}
- if($mobile==1) {
+ if($app=='mobile' || $app=='now_mobile') {
include template('login_wap');
} else if(preg_match('/(mozilla|opera|m3gate|winwap|openwave)/i',
$_SERVER['HTTP_USER_AGENT'])) {
include template('login');
@@ -151,22 +151,18 @@
if($groupid == 8) {
showmessage('login_succeed_inactive_member', 'memcp.php');
} else {
- if($dashboard =='1') {
+ if($app =='dashboard') {
showmessage('login_succeed', $bbsdir.'/dashboard');
- } elseif($mobile =='1') {
+ } elseif($app =='mobile') {
wapshowmessage('login_succeed', 'm');
- } else {
- if(preg_match('/(mozilla|opera|m3gate|winwap|openwave)/i',
$_SERVER['HTTP_USER_AGENT'])) {
- if ($from=='im') {
- wapshowmessage('login_succeed', $bbsdir.'/im');
- } elseif ($app=='touch') {
- wapshowmessage('login_succeed', $referer == $bbsdir.'/i' ?
$bbsdir.'/i' : dreferer(),'','i_touch');
- } else {
- showmessage('login_succeed', dreferer());
- }
- } else {
+ } elseif($app =='now_mobile') {
wapshowmessage('login_succeed', 'now');
- }
+ } elseif($app =='im') {
+ wapshowmessage('login_succeed', $bbsdir.'/im');
+ } elseif($app =='touch') {
+ wapshowmessage('login_succeed', $referer == $bbsdir.'/i' ?
$bbsdir.'/i' : dreferer(),'','i_touch');
+ } else {
+ howmessage('login_succeed', dreferer());
}
}
}

Modified: trunk/upload/parasy.php
==============================================================================
--- trunk/upload/parasy.php (original)
+++ trunk/upload/parasy.php Wed Jan 2 06:17:47 2008
@@ -4,7 +4,6 @@
* Usage: Loader for Web
*/
define('CURSCRIPT', 'parasy');
-
require_once './include/common.inc.php';

if (isset($_GET['action'])) {
@@ -109,11 +108,6 @@
}
include template('mobile_home');
break;
-
- case 'mobile_view':
- require_once './parasy/ParasyMobileViewCore.php';
- break;
-
}

?>

Modified: trunk/upload/parasy/ParasyCore.php
==============================================================================
--- trunk/upload/parasy/ParasyCore.php (original)
+++ trunk/upload/parasy/ParasyCore.php Wed Jan 2 06:17:47 2008
@@ -686,4 +686,10 @@
}
}

+/* Today Functions */
+function notehash($note_id) {
+ global $discuz_user, $discuz_uid, $discuz_pw, $timestamp, $discuz_auth_key;
+ return strtoupper(substr(md5(substr($timestamp, 0,
-7).$discuz_user.$discuz_uid.$discuz_pw.$discuz_auth_key.$note_id), 8, 8));
+}
+
?>

Modified: trunk/upload/plugins/parasy/now.inc.php
==============================================================================
--- trunk/upload/plugins/parasy/now.inc.php (original)
+++ trunk/upload/plugins/parasy/now.inc.php Wed Jan 2 06:17:47 2008
@@ -434,7 +434,7 @@
$fontcolor = "#000";
}
if ($app_charset == 'utf-8') {
- $content_sql =
mysql_real_escape_string(stripslashes(iconv('utf-8', 'gbk', $content)));
+ $content_sql = mysql_real_escape_string(stripslashes(iconv('utf-8',
$charset, $content)));
} else {
$content_sql = mysql_real_escape_string(stripslashes($content));
}

Modified: trunk/upload/templates/babel/login.htm
==============================================================================
--- trunk/upload/templates/babel/login.htm (original)
+++ trunk/upload/templates/babel/login.htm Wed Jan 2 06:17:47 2008
@@ -2,7 +2,7 @@
<div class="subtable nav" style="width: {TABLEWIDTH}">
<img src="{IMGDIR}/map.png" align="absmiddle" alt="You are here"
class="map" /><a href="$indexname">$bbname</a> &raquo; {lang member_login}
</div></div>
-<!--{if $dashboard =='1'}-->
+<!--{if $app == 'dashboard'}-->
<div class="maintable">
<img src="{IMGDIR}/exclamation.png" align="absmiddle"/> ��ʹ��Dashboardǰ����Ҫ��¼��������־
</div>
@@ -10,8 +10,8 @@
<form method="post" name="login" action="logging.php?action=login&amp;">
<input type="hidden" name="formhash" value="{FORMHASH}">
<input type="hidden" name="referer" value="$referer">
-<!--{if $dashboard =='1'}-->
-<input type="hidden" name="dashboard" value="1">
+<!--{if $app == 'dashboard'}-->
+<input type="hidden" name="app" value="dashboard">
<!--{/if}-->
<div class="maintable">
<table cellspacing="{INNERBORDERWIDTH}" cellpadding="{TABLESPACE}"
width="99%" align="center">

Modified: trunk/upload/templates/babel/login_wap.htm
==============================================================================
--- trunk/upload/templates/babel/login_wap.htm (original)
+++ trunk/upload/templates/babel/login_wap.htm Wed Jan 2 06:17:47 2008
@@ -6,14 +6,15 @@
</head>
<body>
<h1>{MOBILE_NAME} Mobile</h1>
-<div class="content"><small><!--{if $mobile==1}--><a
href="$bbsdir/m">{MOBILE_NAME}</a><!--{else}--><a
href="$bbsdir/now">Nowhere</a><!--{/if}--> &gt; ��¼</small></div>
+<div class="content"><small><!--{if $app =='mobile'}--><a
href="$bbsdir/m">{MOBILE_NAME}</a><!--{else}--><a
href="$bbsdir/now">Nowhere</a><!--{/if}--> &gt; ��¼</small></div>
<div class="content">
<form method="post" name="login" action="logging.php?action=login&amp;">
<input type="hidden" name="formhash" value="{FORMHASH}">
-<!--{if $mobile==1}-->
-<input type="hidden" name="mobile" value="1">
+<!--{if $app =='mobile'}-->
+<input type="hidden" name="app" value="mobile">
+<!--{else}-->
+<input type="hidden" name="app" value="now_mobile">
<!--{/if}-->
-<input type="hidden" name="referer" value="now">
<input type="hidden" name="cookietime" value="315360000">
<div><input class="radio" type="radio" name="loginfield"
value="username" checked
onclick="document.login.username.focus();">{lang username}<input
class="radio" type="radio" name="loginfield" value="uid"
onclick="document.login.username.focus();">{lang uid} : <input
type="text" name="username" size="25" maxlength="40" tabindex="2"></div>
<div>{lang password} <input type="password" name="password" size="25" tabindex="3"></div>

Modified: trunk/upload/templates/babel/now_im.htm
==============================================================================
--- trunk/upload/templates/babel/now_im.htm (original)
+++ trunk/upload/templates/babel/now_im.htm Wed Jan 2 06:17:47 2008
@@ -33,7 +33,7 @@
</form>
<!--{else}-->
<table width="100%" border="0" cellspacing="0" cellpadding="0">
-<form method="post" name="login" action="logging.php?action=login&amp;from=im">
+<form method="post" name="login" action="logging.php?action=login&amp;app=im">
<input type="hidden" name="formhash" value="{FORMHASH}">
<input type="hidden" name="referer" value="/bbs/im">
<input type="hidden" name="cookietime" value="315360000">

Modified: trunk/upload/templates/babel/now_wap.htm
==============================================================================
--- trunk/upload/templates/babel/now_wap.htm (original)
+++ trunk/upload/templates/babel/now_wap.htm Wed Jan 2 06:17:47 2008
@@ -7,7 +7,7 @@
<body>
<h1>Nowhere Mobile</h1>
<!--{eval $discuz_userssen = rawurlencode($discuz_userss);}-->
-<div class="content"><small><!--{if $discuz_uid}--><a
href="$bbsdir/now/$discuz_userssen">$discuz_userss</a> - <a
href="$bbsdir/now/$discuz_userssen/friends">�ҵĺ���</a> - <a
href="$bbsdir/m">��̳</a> - <a
href="$bbsdir/$link_logout">�dz�</a><!--{else}--><a
href="$bbsdir/m">��̳</a> - <a href="$bbsdir/$link_login">��¼</a><!--{/if}--></small></div>
+<div class="content"><small><!--{if $discuz_uid}--><a
href="$bbsdir/now/$discuz_userssen">$discuz_userss</a> - <a
href="$bbsdir/now/$discuz_userssen/friends">�ҵĺ���</a> - <a
href="$bbsdir/m">��̳</a> - <a
href="$bbsdir/$link_logout">�dz�</a><!--{else}--><a
href="$bbsdir/m">��̳</a> - <a href="$bbsdir/login-now.nnm">��¼</a><!--{/if}--></small></div>
<!--{if $user_nick}-->
<div class="content"><small><a href="$bbsdir/now">Nowhere</a> &gt;
$author<!--{if $action == friends}--> &gt; �ҵĺ���<!--{/if}--></small></div>
<!--{/if}-->
@@ -23,11 +23,11 @@
<input type="hidden" name="module" value="$identifier">
<input type="hidden" name="identifier" value="$identifier">
<!--{if $action ==friends }-->
-<input type="hidden" name="now_return" value="/$user_nick_en/friends" />
+<input type="hidden" name="now_return"
value="now/$user_nick_en/friends" />
<!--{elseif $action !=friends && $user_nick}-->
-<input type="hidden" name="now_return" value="/$user_nick_en" />
+<input type="hidden" name="now_return" value="now/$user_nick_en" />
<!--{else}-->
-<input type="hidden" name="now_return" value="/" />
+<input type="hidden" name="now_return" value="now/" />
<!--{/if}-->
<input type="submit" name="submit" value="����" class="go">
<small> &nbsp; ֻ��д123����Ŷ</small></form></div>

Reply all
Reply to author
Forward
0 new messages