tester1991
PHP МегаМозГ
- Регистрация
- 24 Сен 2008
- Сообщения
- 741
- Реакции
- 181
Top 10 Самых общительных на главной
Top.class.php
Использование
Список кто в чате
Online.class.php
Использование
Top.class.php
Код:
<?php
/**
* Class Index, login page creator
*
* LICENSE: CREATIVE COMMONS PUBLIC LICENSE "Namensnennung — Nicht-kommerziell 2.0"
*
* @copyright 2009 <SEDesign />
* @license http://creativecommons.org/licenses/by-nc/2.0/de/
* @version $3.0.6$
* @link http://www.sedesign.de/de_produkte_chat-v3.html
* @since File available since Alpha 1.0
*/
class Top extends DbConectionMaker
{
/**
* LangXml Obj for login page
* @var LangXml
*/
public $lang;
/**
* Unix timestamp for login form. This serve as a test for bot blocking.
* @var int
*/
public $aktuell_date_u;
/**
* Constructor
*
* @uses ConnectDB::sqlSet()
* @uses ConnectDB::close()
* @return void
*/
public function __construct (){
// call parent Constructor from class DbConectionMaker
parent::__construct();
$online=$this->dbObj->sqlGet("SELECT etchat_username,etchat_user_point,etchat_user_id FROM `db1_etchat_user`
ORDER BY `etchat_user_point` DESC
LIMIT 0 , 10");
$i=0;
$j=0;
while($online[$i][$j]!="")
{
echo "<a href='?profile&op=show&id=".$online[$i][$j+2]."'>".$online[$i][$j]." ".$online[$i][$j+1]."</a><br>";
$i++;
}
// close db connection
$this->dbObj->close();
// create new LangXml Object
$langObj = new LangXml;
$this->lang=$langObj->getLang()->index_php[0];
$this->aktuell_date_u=date('U');
$_SESSION[$this->_prefix.'set_check']=md5($this->aktuell_date_u);
}
/**
* Initializer for template
*
* @return void
*/
}
Код:
$tmp=new Top();
Online.class.php
Код:
<?php
/**
* Class Index, login page creator
*
* LICENSE: CREATIVE COMMONS PUBLIC LICENSE "Namensnennung — Nicht-kommerziell 2.0"
*
* @copyright 2009 <SEDesign />
* @license http://creativecommons.org/licenses/by-nc/2.0/de/
* @version $3.0.6$
* @link http://www.sedesign.de/de_produkte_chat-v3.html
* @since File available since Alpha 1.0
*/
class Online extends DbConectionMaker
{
/**
* LangXml Obj for login page
* @var LangXml
*/
public $lang;
/**
* Unix timestamp for login form. This serve as a test for bot blocking.
* @var int
*/
public $aktuell_date_u;
/**
* Constructor
*
* @uses ConnectDB::sqlSet()
* @uses ConnectDB::close()
* @return void
*/
public function __construct (){
// call parent Constructor from class DbConectionMaker
parent::__construct();
$online=$this->dbObj->sqlGet("select etchat_user_online_user_name,etchat_onlineuser_fid from db1_etchat_useronline");
$i=0;
$j=0;
while($online[$i][$j]!="")
{
echo "<a href='?profile&op=show&id=".$online[$i][$j+1]."'>".$online[$i][$j]."</a><br>";
$i++;
}
// close db connection
$this->dbObj->close();
// create new LangXml Object
$langObj = new LangXml;
$this->lang=$langObj->getLang()->index_php[0];
$this->aktuell_date_u=date('U');
$_SESSION[$this->_prefix.'set_check']=md5($this->aktuell_date_u);
}
/**
* Initializer for template
*
* @return void
*/
}
Код:
$obj=new Online();