Vzdávám se :) Co k tomu dodat??? Snad jen, že o několik řádků výš nejsou s touto funkcí žádné potíže... Pro úplnost sem uvedu kód:
$q = mysql_query("SELECT * FROM ".$this->table); // zjistime, zda existuje tabulka
if(!$q){
mysql_query($this->new_table) or die("Konfigurace modulu \"".$this->name."\" selhala!"); // vytvoreni tabulky
if(!mysql_query($this->superuser)){
mysql_query("DRO P TABLE ".$this->table);
die("Konfigurace modulu \"".$this->name."\" selhala!"); // vytvoreni superuzivatele
}
}
$this->output = new Output; // vystup
$this->output->cond("form");
session_start(); // zapneme sessions
$this->login(); // prihlaseni
$this->NewUser(); // registrace
if($_GET["users"] == "logout"){ // odhlaseni
$_SESSION["login"] = false;
}
$this->nick = $_SESSION["login"];
$this->settings(); // nastaveni
if($this->nick){
$this->output->vars("nick", $this->nick);
$this->output->cond("log2");
$this->output->cond("form", false);
$query = mysql_query("SELECT permission FROM ".$this->table." WHERE nick='".addslashes($this->nick)."'"); // prava
list($this->ac) = mysql_fetch_row($query);
}
if($_GET["user"]){ // info o uzivateli
$user = rawurldecode($_GET["user"]);
$q = mysql_query("SELECT name,email FROM ".$this->table." WHERE nick='".addslashes($user)."'");
if(mysql_num_rows($q) == 0){
$this->output->cond("info_error");
} else{
$info = mysql_fetch_rows($q);
$this->output->cond("info_ok");
$this->output->arr("info", 0, $user);
$this->output->arr("info", 1, $info[0]);
$this->output->arr("info", 2, $info[1]);
}
}
// info o prihlasenem uzivateli
$q = mysql_query("SELECT name,email FROM ".$this->table." WHERE nick='".addslashes($this->nick)."'");
$iuser = mysql_fetch_rows($q);
$this->output->arr("iuser", 0, stripslashes($iuser[0]));
$this->output->arr("iuser", 1, stripslashes($iuser[1]));