function checkUserIsOnline($userid){
$online = false;
$res = $GLOBALS['TYPO3_DB']->sql_query('SELECT DISTINCT ses_userid, username, name
FROM fe_sessions LEFT JOIN fe_users ON (ses_userid=uid)
WHERE ses_tstamp+3600 > unix_timestamp() OR is_online+3600 > unix_timestamp() and ses_userid='.$userid);
while(false!==($row=$GLOBALS['TYPO3_DB']->sql_fetch_assoc($res))){
if($row['ses_userid']==$userid)$online=true;
}
return $online;
}
typo3在线用户
mysql优化的重要参数 key_buffer_size table_cache
Debian 4.0 apache2安装ssl及配置
安装apache,这个非常方便,输入apt-get install apache2即可。
安装ssl:apt-get install ssl-cert。 (continue reading…)
MySQL cache功能汇总
MySQL cache功能分析:
1 MySQL的cache功能的key的生成原理是:把select语句按照一定的hash规则生成唯一的key,select的结果生成value,即 key=>value。所以对于cache而言,select语句是区分大小写的,也区分空格的。两个select语句必须完完全全一致,才能够获 取到同一个cache。 (continue reading…)
typo3 debug sql
$TYPO3_CONF_VARS[‘SYS’][‘sqlDebug’] = ‘2’; // Modified or inserted by TYPO3 Install Tool.
Extenstion: cc_debug 让显示效果更好点 (continue reading…)
HTML5实战之桌面通知
桌面通知功能能够让浏览器即使是最小化状态也能将消息通知给用户。这和WebIM是最为天然的结合。不过,目前支持Desktop Notification功能的浏览器只有Chrome5+。
关于通知的基础知识可以参考以下文档:
Typo3 session
Using sessions
Sessions are a mechanism to carry user data (parameters) along the web site visit without having to post them over and over again. The data is available as long as the session is valid, usually until all browser windows are closed.
Since TYPO3 instantiates a session automatically, you can use this existing session to read/write data into it. However, you must first understand that sessions in frontend and backend are handled differently.
The routine on the other hand is always the same.
Recover your data from the session
Add values (possibly into an array that holds all the session data)
Save your data to the session (continue reading…)
MySQL性能优化的最佳21条经验
今天,数据库的操作越来越成为整个应用的性能瓶颈了,这点对于Web应用尤其明显。关于数据库的性能,这并不只是DBA才需要担心的事,而这更是我们程序员需要去关注的事情。当我们去设计数据库表结构,对操作数据库时(尤其是查表时的SQL语句),我们都需要注意数据操作的性能。这里,我们不会讲过多的SQL语句的优化,而只是针对MySQL这一Web应用最多的数据库。希望下面的这些优化技巧对你有用。 (continue reading…)
fpdf矢量图 EPS / AI
EPS / AI
Informations
Author: Valentin Schmidt
License: Freeware
Version: 1.6
From: http://staff.dasdeck.de/valentin/fpdf/fpdf_eps/ (continue reading…)