Tarih: 2007-02-09, 18:36:40 Mesaj konusu: flashchat türkçe nick login sorunu
arkadaşlar flash chatta türkçe karakter içeren bazı nickler giriş yapamıyor bazılarıda giriş yapsa bile nick garip şekiller vede semboller içeriyor bunun bir çözümü varmı acaba ..
sisteme girişi sağlayan dosya bu dosya.
Kod:
php
//The DefaultCMS implementation behaves as usual content management system - i.e. checks provided login/password against system database and uses user roles predefined in it.
class DefaultCMS {
var $autocreateUsers = false; //change this to false to disabe nonexisting users auto creation
var $userid = null;
var $loginStmt;
var $getUserStmt;
var $addUserStmt;
var $getUsersStmt;
var $constArr;
//-----------------------------------------------------------------------------------------
function DefaultCMS()
{
$this->getUserStmt = new Statement("SELECT * FROM {$this->constArr['users']} WHERE {$this->constArr['id']}=? LIMIT 1");
$this->getUsersStmt = new Statement("SELECT * FROM {$this->constArr['users']} ORDER BY {$this->constArr['login']}");
$this->delStmt = new Statement("DELETE FROM {$this->constArr['users']} WHERE {$this->constArr['login']}=?");
$encode_type = $this->constArr['encode_type'];
switch( $encode_type )
{
case 'sha1' : $this->loginStmt = new Statement("SELECT * FROM {$this->constArr['users']} WHERE {$this->constArr['login']}=? AND {$this->constArr['password']}=SHA1(?) LIMIT 1");
$this->addUserStmt = new Statement("INSERT INTO {$this->constArr['users']} ({$this->constArr['login']}, {$this->constArr['password']}) VALUES(?, SHA1(?))");
break;
case 'mysql_pass' :
$this->loginStmt = new Statement("SELECT * FROM {$this->constArr['users']} WHERE {$this->constArr['login']}=? AND {$this->constArr['password']}=PASSWORD(?) LIMIT 1");
$this->addUserStmt = new Statement("INSERT INTO {$this->constArr['users']} ({$this->constArr['login']}, {$this->constArr['password']}) VALUES(?, PASSWORD(?))");
break;
default : $this->loginStmt = new Statement("SELECT * FROM {$this->constArr['users']} WHERE {$this->constArr['login']}=? AND {$this->constArr['password']}=? LIMIT 1");
$this->addUserStmt = new Statement("INSERT INTO {$this->constArr['users']} ({$this->constArr['login']}, {$this->constArr['password']}) VALUES(?, ?)");
break;
}
}
//-----------------------------------------------------------------------------------------
function isLoggedIn()
{
return $this->userid;
}
//-----------------------------------------------------------------------------------------
function login($login, $password)
{
$this->userid = null;
Bu forumda yeni başlıklar açamazsınız Bu forumdaki başlıklara cevap veremezsiniz Bu forumdaki mesajlarınızı değiştiremezsiniz Bu forumdaki mesajlarınızı silemezsiniz Bu forumdaki anketlerde oy kullanamazsınız