程序问题
By
简单
at 2015-08-09 • 0人收藏 • 2417人看过
请问发新贴的会话如果长时间不操作可以保持多久,或者长时间编辑会不会丢失会话
17 个回复 | 最后更新于 2015-08-15
回复#4 @lincanbin :
鉴权函数中
function Auth($MinRoleRequire, $AuthorizedUserID = 0, $StatusRequire = false) { global $CurUserRole, $CurUserID, $CurUserInfo, $Lang, $RequestURI; $error = ''; if ($CurUserRole < $MinRoleRequire) { $error = str_replace('{{RoleDict}}', $Lang['RolesDict'][$MinRoleRequire], $Lang['Error_Insufficient_Permissions']); } if ($CurUserID && $StatusRequire == true && $CurUserInfo['UserAccountStatus'] == 0) { $error = $Lang['Error_Account_navailable']; } if ($AuthorizedUserID && $CurUserID && $CurUserID == $AuthorizedUserID) { $error = false; } if ($error) { AlertMsg($Lang['Error_Message'], $error, 401); } }
$AuthorizedUserID, $StatusRequire //代表什么含义啊
if ($CurUserID && $StatusRequire == true && $CurUserInfo['UserAccountStatus'] == 0) //这个判断又是什么意思
回复#13 @lincanbin :
if ($Page <= 10) { $TopicsArray = $DB->query('SELECT `ID`, `Topic`, `Tags`, `UserID`, `UserName`, `LastName`, `LastTime`, `Replies` FROM ' . $Prefix . 'topics force index(LastTime) WHERE IsDel=0 ORDER BY LastTime DESC LIMIT ' . ($Page - 1) * $Config['TopicsPerPage'] . ',' . $Config['TopicsPerPage']); if ($MCache && $Page == 1) { $MCache->set(MemCachePrefix . 'Homepage', $TopicsArray, 0, 600); } } else { $TopicsArray = $DB->query('SELECT `ID`, `Topic`, `Tags`, `UserID`, `UserName`, `LastName`, `LastTime`, `Replies` FROM ' . $Prefix . 'topics force index(LastTime) WHERE LastTime<=(SELECT LastTime FROM ' . $Prefix . 'topics force index(LastTime) WHERE IsDel=0 ORDER BY LastTime DESC LIMIT ' . ($Page - 1) * $Config['TopicsPerPage'] . ',1) and IsDel=0 ORDER BY LastTime DESC LIMIT ' . $Config['TopicsPerPage']); }
index页面的,这两个怎么区分,为什么要分别写?
登录后方可回帖
大约一个月,另外有草稿,不用担心丢失。