What's new

Problem acc maker TDB [GOD/GM]

Status
Not open for further replies.

scooler

User
Joined
Jan 18, 2009
Messages
15
Reaction score
0
Witam mam problem z acc makerm kt?ry znajdowa? si? razem z silnikiem dragon ball v0.5 wiec tak acc maker dzia?a idzie za?o?y? konto itp...
ale jak wchodzie w "Admin Panel" i chce stworzy? GM "Create GM" to wyskakuj? mi b??dy:


Deprecated: Function eregi() is deprecated in C:\xampp\htdocs\class\iobox.php on line 105
Deprecated: Function eregi() is deprecated in C:\xampp\htdocs\class\iobox.php on line 105
Deprecated: Function eregi() is deprecated in C:\xampp\htdocs\class\iobox.php on line 105
Deprecated: Function eregi() is deprecated in C:\xampp\htdocs\class\iobox.php on line 105
No groups found



i nie idzie stworzy? GM ale w ostatnie linijce jest napisane "nie znaleziono grup"
wiec postanowi?em stworzy? grupe "Create Group" i wyskakuje mi nast?puj?ce okno:





nie rozumiem tego co tam trzeba poda? wiec tam du?o pr?bowa?em ale za ka?dym razem gdy che zapisa? "Save" to pojawia si? komunikat i nast?puj?ce errory :






i nie wiem jak temu zaradzi?
wiec prosi? bym was o pomoc jak to zrobi? albo jaki? inny przepis na GMa/GODa


Z G?RY DZI?KUJE

je?eli napisa?em to w z?ym temacie prosz? o przeniesienie
 

Grzechu

Senior User
Joined
Nov 29, 2008
Messages
1,263
Reaction score
93
Odp: Problem acc maker TDB [GOD/GM]

Przez baz? danych nie idzie zrobi? gm'a/god'a?
Poka? plik iobox.php
 

scooler

User
Joined
Jan 18, 2009
Messages
15
Reaction score
0
Odp: Problem acc maker TDB [GOD/GM]

Code:
$code.= '</select> <label for="'.$this->name.'__'.$name.'">- '.ucfirst($name).'</label>';
	$this->elements[] = $code;
}
public function addCaptcha(){
	global $cfg;
	if(!$cfg['use_captcha']) return;
	if (isset($_POST['ajax']))
		$img = 'doimg.php?'.time();
	else
		$img = '../doimg.php?'.time();
	$_SESSION['RandomText'] = substr(str_shuffle(strtolower('qwertyuipasdfhjklzxcvnm12345789')), 0, 6);
	$this->elements[]= '<img width="250px" height="40px" src="'.$img.'" alt="Verification Image"/>';
	$this->elements[]= '<input id="captcha" name="'.$this->name.'__captcha" type="text" maxlength="10" style="text-transform: uppercase"/> <label for="captcha">- Verification</label>';
}
public function addInput($name, $type = 'text', $value = '', $length = 100, $readonly = false){
	if ($readonly) $readonly = ' readonly="readonly"';
	else $readonly = '';
	$this->elements[]= '<input id="'.$this->name.'__'.$name.'" name="'.$this->name.'__'.$name.'" type="'.$type.'" maxlength="'.$length.'" value="'.$value.'"'.$readonly.'/> <label for="'.$this->name.'__'.$name.'">- '.ucfirst($name).'</label>';
}
public function addCheckBox($name, $check = false){
	if ($check) $check = ' checked="checked"';
	else $check = '';
	$this->elements[]= '<input type="checkbox" id="'.$this->name.'__'.$name.'" name="'.$this->name.'__'.$name.'"'.$check.'> <label for="'.$this->name.'__'.$name.'">'.ucfirst($name).'</label>';
}
public function addTextbox($name,$value = '',$cols = 40,$rows = 10){
	$this->elements[]= '<textarea name="'.$this->name.'__'.$name.'" cols="'.$cols.'" rows="'.$rows.'">'.$value.'</textarea>';
}
public function addSubmit($text){
	$this->buttons[]= '<input style="width: 100px; height: 25px;" type="submit" name="'.$this->name.'__'.$this->name.'" value="'.$text.'"/>';
}
public function addReload($text){
	$this->buttons[]= '<input style="width: 100px; height: 25px;" onclick="ajax(\'form\',\''.htmlspecialchars($_SERVER['PHP_SELF']).'\',\'\',true)" type="button" name="'.$this->name.'__'.$this->name.'" value="'.$text.'"/>';
}
public function addRefresh($text){
	$this->buttons[]= '<input onclick="location.reload(false)" type="button" style="width: 100px; height: 25px;" value="'.$text.'"/>';
}
public function addClose($text){
	$this->buttons[]= '<input style="width: 100px; height: 25px;" onclick="document.getElementById(\'iobox\').style[\'visibility\'] = \'hidden\'" type="button" value="'.$text.'"/>';
}
public function addCode($code){
	$this->elements[]= $code;
}
public function addLabel($code){
	$this->label = '<legend>'.$code.'</legend>';
}
public function getCode(){
	if (isset($_POST['ajax']))
		$code = '<table cellspacing="10px" onmouseup="Cookies.create(\'iobox_x\',document.getElementById(\'iobox\').style.left,1);Cookies.create(\'iobox_y\',document.getElementById(\'iobox\').style.top,1);" style="visibility:hidden" id="iobox" class="draggable"><tr><td><fieldset>'.$this->label.'<form id="'.$this->name.'" action="javascript:ajax(\'form\',\''.htmlspecialchars($this->target).'\',getParams(document.getElementById(\''.$this->name.'\')),true)" method="post">';
	else
		$code = '<div id="iobox" class="iobox"><fieldset>'.$this->label.'<form id="'.$this->name.'" action="'.htmlspecialchars($this->target).'" method="post">';
	foreach ($this->elements as $element)
		$code.= $element."<br/><div style=\"margin-top: 5px;\"></div>\r\n";
	$code.= '<hr style="margin: 10px 2px 2px 2px; padding: 0;"/> | ';
	foreach ($this->buttons as $button)
		$code.= $button." | \r\n";
	$code.= '</form></fieldset></td></tr></table>';
	return $code;
}
public function show(){
	echo $this->getCode();
}
}

class Form
{
public $attrs;
public function __construct($name){
		foreach( array_keys($_POST) as $key){
			if (eregi('^'.$name.'__',$key)){
				$p = explode('__', $key);
				$this->attrs[$p[1]] = trim($_POST[$key]);
			}
		}
}
public function getBool($attr){
	return $this->attrs[$attr] === 'on';
}
public function exists(){
	if (isset($this->attrs)) return true;
	else return false;
}
public function validated(){
	global $cfg;
	if (!$cfg['use_captcha']) return true;
	if (strtolower($this->attrs['captcha']) === $_SESSION['RandomText'] && !empty($_SESSION['RandomText'])){
		$_SESSION['RandomText'] = null;
		return true;
	}else return false;
}
}
 
Last edited by a moderator:

Grzechu

Senior User
Joined
Nov 29, 2008
Messages
1,263
Reaction score
93
Odp: Problem acc maker TDB [GOD/GM]

chyba jednak nie wklei?e? ca?ego kodu...
 

scooler

User
Joined
Jan 18, 2009
Messages
15
Reaction score
0
jakiego ?
to wiesz jak to zrobi? ? ?

Notka moderatorska:
Sklejone
 
Last edited by a moderator:

Grzechu

Senior User
Joined
Nov 29, 2008
Messages
1,263
Reaction score
93
Odp: Problem acc maker TDB [GOD/GM]

Wklei?e? ca?y plik iobox.php?

Spr?buj zamieni? na ten kod:
Code:
$code.= '</select> <label for="'.$this->name.'__'.$name.'">- '.ucfirst($name).'</label>';
$this->elements[] = $code;
}
public function addCaptcha(){
global $cfg;
if(!$cfg['use_captcha']) return;
if (isset($_POST['ajax']))
$img = 'doimg.php?'.time();
else
$img = '../doimg.php?'.time();
$_SESSION['RandomText'] = substr(str_shuffle(strtolower('qwertyuipasdfhjklzx cvnm12345789')), 0, 6);
$this->elements[]= '<img width="250px" height="40px" src="'.$img.'" alt="Verification Image"/>';
$this->elements[]= '<input id="captcha" name="'.$this->name.'__captcha" type="text" maxlength="10" style="text-transform: uppercase"/> <label for="captcha">- Verification</label>';
}
public function addInput($name, $type = 'text', $value = '', $length = 100, $readonly = false){
if ($readonly) $readonly = ' readonly="readonly"';
else $readonly = '';
$this->elements[]= '<input id="'.$this->name.'__'.$name.'" name="'.$this->name.'__'.$name.'" type="'.$type.'" maxlength="'.$length.'" value="'.$value.'"'.$readonly.'/> <label for="'.$this->name.'__'.$name.'">- '.ucfirst($name).'</label>';
}
public function addCheckBox($name, $check = false){
if ($check) $check = ' checked="checked"';
else $check = '';
$this->elements[]= '<input type="checkbox" id="'.$this->name.'__'.$name.'" name="'.$this->name.'__'.$name.'"'.$check.'> <label for="'.$this->name.'__'.$name.'">'.ucfirst($name).'</label>';
}
public function addTextbox($name,$value = '',$cols = 40,$rows = 10){
$this->elements[]= '<textarea name="'.$this->name.'__'.$name.'" cols="'.$cols.'" rows="'.$rows.'">'.$value.'</textarea>';
}
public function addSubmit($text){
$this->buttons[]= '<input style="width: 100px; height: 25px;" type="submit" name="'.$this->name.'__'.$this->name.'" value="'.$text.'"/>';
}
public function addReload($text){
$this->buttons[]= '<input style="width: 100px; height: 25px;" onclick="ajax(\'form\',\''.htmlspecialchars($_SERV ER['PHP_SELF']).'\',\'\',true)" type="button" name="'.$this->name.'__'.$this->name.'" value="'.$text.'"/>';
}
public function addRefresh($text){
$this->buttons[]= '<input onclick="location.reload(false)" type="button" style="width: 100px; height: 25px;" value="'.$text.'"/>';
}
public function addClose($text){
$this->buttons[]= '<input style="width: 100px; height: 25px;" onclick="document.getElementById(\'iobox\').style[\'visibility\'] = \'hidden\'" type="button" value="'.$text.'"/>';
}
public function addCode($code){
$this->elements[]= $code;
}
public function addLabel($code){
$this->label = '<legend>'.$code.'</legend>';
}
public function getCode(){
if (isset($_POST['ajax']))
$code = '<table cellspacing="10px" onmouseup="Cookies.create(\'iobox_x\',document.get ElementById(\'iobox\').style.left,1);Cookies.creat e(\'iobox_y\',document.getElementById(\'iobox\').s tyle.top,1);" style="visibility:hidden" id="iobox" class="draggable"><tr><td><fieldset>'.$this->label.'<form id="'.$this->name.'" action="javascript:ajax(\'form\',\''.htmlspecialch ars($this->target).'\',getParams(document.getElementById(\'' .$this->name.'\')),true)" method="post">';
else
$code = '<div id="iobox" class="iobox"><fieldset>'.$this->label.'<form id="'.$this->name.'" action="'.htmlspecialchars($this->target).'" method="post">';
foreach ($this->elements as $element)
$code.= $element."<br/><div style=\"margin-top: 5px;\"></div>\r\n";
$code.= '<hr style="margin: 10px 2px 2px 2px; padding: 0;"/> | ';
foreach ($this->buttons as $button)
$code.= $button." | \r\n";
$code.= '</form></fieldset></td></tr></table>';
return $code;
}
public function show(){
echo $this->getCode();
}
}

class Form
{
public $attrs;
public function __construct($name){
foreach( array_keys($_POST) as $key){
if (preg_match('^'.$name.'__',$key)){
$p = explode('__', $key);
$this->attrs[$p[1]] = trim($_POST[$key]);
}
}
}
public function getBool($attr){
return $this->attrs[$attr] === 'on';
}
public function exists(){
if (isset($this->attrs)) return true;
else return false;
}
public function validated(){
global $cfg;
if (!$cfg['use_captcha']) return true;
if (strtolower($this->attrs['captcha']) === $_SESSION['RandomText'] && !empty($_SESSION['RandomText'])){
$_SESSION['RandomText'] = null;
return true;
}else return false;
}
}
 

scooler

User
Joined
Jan 18, 2009
Messages
15
Reaction score
0
Odp: Problem acc maker TDB [GOD/GM]

teraz to ca?kiem nie idzie XD pe?on b??d?w
 

Grzechu

Senior User
Joined
Nov 29, 2008
Messages
1,263
Reaction score
93
Odp: Problem acc maker TDB [GOD/GM]

Podaj te b??dy i podaj jakiej wersji php u?ywasz
 

scooler

User
Joined
Jan 18, 2009
Messages
15
Reaction score
0
Code:
'.$code.''; } public function getCode(){ if (isset($_POST['ajax'])) $code = '
'.$this->label.'
'; else $code = '
'.$this->label.''; foreach ($this->elements as $element) $code.= $element."
\r\n"; $code.= ' | '; foreach ($this->buttons as $button) $code.= $button." | \r\n"; $code.= '
'; return $code; } public function show(){ echo $this->getCode(); } } class Form { public $attrs; public function __construct($name){ foreach( array_keys($_POST) as $key){ if (preg_match('^'.$name.'__',$key)){ $p = explode('__', $key); $this->attrs[$p[1]] = trim($_POST[$key]); } } } public function getBool($attr){ return $this->attrs[$attr] === 'on'; } public function exists(){ if (isset($this->attrs)) return true; else return false; } public function validated(){ global $cfg; if (!$cfg['use_captcha']) return true; if (strtolower($this->attrs['captcha']) === $_SESSION['RandomText'] && !empty($_SESSION['RandomText'])){ $_SESSION['RandomText'] = null; return true; }else return false; } }
$code.= ' - '.ucfirst($name).''; $this->elements[] = $code; } public function addCaptcha(){ global $cfg; if(!$cfg['use_captcha']) return; if (isset($_POST['ajax'])) $img = 'doimg.php?'.time(); else $img = '../doimg.php?'.time(); $_SESSION['RandomText'] = substr(str_shuffle(strtolower('qwertyuipasdfhjklzx cvnm12345789')), 0, 6); $this->elements[]= 'Verification Image'; $this->elements[]= ' - Verification'; } public function addInput($name, $type = 'text', $value = '', $length = 100, $readonly = false){ if ($readonly) $readonly = ' readonly="readonly"'; else $readonly = ''; $this->elements[]= ' - '.ucfirst($name).''; } public function addCheckBox($name, $check = false){ if ($check) $check = ' checked="checked"'; else $check = ''; $this->elements[]= ' '.ucfirst($name).''; } public function addTextbox($name,$value = '',$cols = 40,$rows = 10){ $this->elements[]= ''.$value.''; } public function addSubmit($text){ $this->buttons[]= ''; } public function addReload($text){ $this->buttons[]= ''; } public function addRefresh($text){ $this->buttons[]= ''; } public function addClose($text){ $this->buttons[]= ''; } public function addCode($code){ $this->elements[]= $code; } public function addLabel($code){ $this->label = ''.$code.''; } public function getCode(){ if (isset($_POST['ajax'])) $code = '
'.$this->label.'
'; else $code = '
'.$this->label.''; foreach ($this->elements as $element) $code.= $element."
\r\n"; $code.= ' | '; foreach ($this->buttons as $button) $code.= $button." | \r\n"; $code.= '
'; return $code; } public function show(){ echo $this->getCode(); } } class Form { public $attrs; public function __construct($name){ foreach( array_keys($_POST) as $key){ if (preg_match('^'.$name.'__',$key)){ $p = explode('__', $key); $this->attrs[$p[1]] = trim($_POST[$key]); } } } public function getBool($attr){ return $this->attrs[$attr] === 'on'; } public function exists(){ if (isset($this->attrs)) return true; else return false; } public function validated(){ global $cfg; if (!$cfg['use_captcha']) return true; if (strtolower($this->attrs['captcha']) === $_SESSION['RandomText'] && !empty($_SESSION['RandomText'])){ $_SESSION['RandomText'] = null; return true; }else return false; } }
Fatal error: Class 'Form' not found in C:\xampp\htdocs\tools\character_search.php on line 23
PHP Version 5.3.1

Notka moderatorska:
Sklejone
 
Last edited by a moderator:

Grzechu

Senior User
Joined
Nov 29, 2008
Messages
1,263
Reaction score
93
Odp: Problem acc maker TDB [GOD/GM]

No to eregi() Ci nie b?dzie dzia?a? ;)
Spr?buj jeszcze tak
Code:
$code.= '</select> <label for="'.$this->name.'__'.$name.'">- '.ucfirst($name).'</label>';
$this->elements[] = $code;
}
public function addCaptcha(){
global $cfg;
if(!$cfg['use_captcha']) return;
if (isset($_POST['ajax']))
$img = 'doimg.php?'.time();
else
$img = '../doimg.php?'.time();
$_SESSION['RandomText'] = substr(str_shuffle(strtolower('qwertyuipasdfhjklzx cvnm12345789')), 0, 6);
$this->elements[]= '<img width="250px" height="40px" src="'.$img.'" alt="Verification Image"/>';
$this->elements[]= '<input id="captcha" name="'.$this->name.'__captcha" type="text" maxlength="10" style="text-transform: uppercase"/> <label for="captcha">- Verification</label>';
}
public function addInput($name, $type = 'text', $value = '', $length = 100, $readonly = false){
if ($readonly) $readonly = ' readonly="readonly"';
else $readonly = '';
$this->elements[]= '<input id="'.$this->name.'__'.$name.'" name="'.$this->name.'__'.$name.'" type="'.$type.'" maxlength="'.$length.'" value="'.$value.'"'.$readonly.'/> <label for="'.$this->name.'__'.$name.'">- '.ucfirst($name).'</label>';
}
public function addCheckBox($name, $check = false){
if ($check) $check = ' checked="checked"';
else $check = '';
$this->elements[]= '<input type="checkbox" id="'.$this->name.'__'.$name.'" name="'.$this->name.'__'.$name.'"'.$check.'> <label for="'.$this->name.'__'.$name.'">'.ucfirst($name).'</label>';
}
public function addTextbox($name,$value = '',$cols = 40,$rows = 10){
$this->elements[]= '<textarea name="'.$this->name.'__'.$name.'" cols="'.$cols.'" rows="'.$rows.'">'.$value.'</textarea>';
}
public function addSubmit($text){
$this->buttons[]= '<input style="width: 100px; height: 25px;" type="submit" name="'.$this->name.'__'.$this->name.'" value="'.$text.'"/>';
}
public function addReload($text){
$this->buttons[]= '<input style="width: 100px; height: 25px;" onclick="ajax(\'form\',\''.htmlspecialchars($_SERV ER['PHP_SELF']).'\',\'\',true)" type="button" name="'.$this->name.'__'.$this->name.'" value="'.$text.'"/>';
}
public function addRefresh($text){
$this->buttons[]= '<input onclick="location.reload(false)" type="button" style="width: 100px; height: 25px;" value="'.$text.'"/>';
}
public function addClose($text){
$this->buttons[]= '<input style="width: 100px; height: 25px;" onclick="document.getElementById(\'iobox\').style[\'visibility\'] = \'hidden\'" type="button" value="'.$text.'"/>';
}
public function addCode($code){
$this->elements[]= $code;
}
public function addLabel($code){
$this->label = '<legend>'.$code.'</legend>';
}
public function getCode(){
if (isset($_POST['ajax']))
$code = '<table cellspacing="10px" onmouseup="Cookies.create(\'iobox_x\',document.get ElementById(\'iobox\').style.left,1);Cookies.creat e(\'iobox_y\',document.getElementById(\'iobox\').s tyle.top,1);" style="visibility:hidden" id="iobox" class="draggable"><tr><td><fieldset>'.$this->label.'<form id="'.$this->name.'" action="javascript:ajax(\'form\',\''.htmlspecialch ars($this->target).'\',getParams(document.getElementById(\'' .$this->name.'\')),true)" method="post">';
else
$code = '<div id="iobox" class="iobox"><fieldset>'.$this->label.'<form id="'.$this->name.'" action="'.htmlspecialchars($this->target).'" method="post">';
foreach ($this->elements as $element)
$code.= $element."<br/><div style=\"margin-top: 5px;\"></div>\r\n";
$code.= '<hr style="margin: 10px 2px 2px 2px; padding: 0;"/> | ';
foreach ($this->buttons as $button)
$code.= $button." | \r\n";
$code.= '</form></fieldset></td></tr></table>';
return $code;
}
public function show(){
echo $this->getCode();
}
}
class Form
{
public $attrs;
public function __construct($name){
foreach( array_keys($_POST) as $key){
if (preg_match('/^' . $name . '__',$key)){
$p = explode('__', $key);
$this->attrs[$p[1]] = trim($_POST[$key]);
}
}
}
public function getBool($attr){
return $this->attrs[$attr] === 'on';
}
public function exists(){
if (isset($this->attrs)) return true;
else return false;
}
public function validated(){
global $cfg;
if (!$cfg['use_captcha']) return true;
if (strtolower($this->attrs['captcha']) === $_SESSION['RandomText'] && !empty($_SESSION['RandomText'])){
$_SESSION['RandomText'] = null;
return true;
}else return false;
}
}

Jak nie b?dzie dzia?a? to p??niej zagl?dn? do niego dok?adniej
 

scooler

User
Joined
Jan 18, 2009
Messages
15
Reaction score
0
ok
ale nie dzial tak samo errory XC
ale dzi?ki za wszelkie pr?by pomocy

Notka moderatorska:
Sklejone
 
Last edited by a moderator:

Grzechu

Senior User
Joined
Nov 29, 2008
Messages
1,263
Reaction score
93
Odp: Problem acc maker TDB [GOD/GM]

Code:
$code.= '</select> <label for="'.$this->name.'__'.$name.'">- '.ucfirst($name).'</label>';
$this->elements[] = $code;
}
public function addCaptcha(){
global $cfg;
if(!$cfg['use_captcha']) return;
if (isset($_POST['ajax']))
$img = 'doimg.php?'.time();
else
$img = '../doimg.php?'.time();
$_SESSION['RandomText'] = substr(str_shuffle(strtolower('qwertyuipasdfhjklzx cvnm12345789')), 0, 6);
$this->elements[]= '<img width="250px" height="40px" src="'.$img.'" alt="Verification Image"/>';
$this->elements[]= '<input id="captcha" name="'.$this->name.'__captcha" type="text" maxlength="10" style="text-transform: uppercase"/> <label for="captcha">- Verification</label>';
}
public function addInput($name, $type = 'text', $value = '', $length = 100, $readonly = false){
if ($readonly) $readonly = ' readonly="readonly"';
else $readonly = '';
$this->elements[]= '<input id="'.$this->name.'__'.$name.'" name="'.$this->name.'__'.$name.'" type="'.$type.'" maxlength="'.$length.'" value="'.$value.'"'.$readonly.'/> <label for="'.$this->name.'__'.$name.'">- '.ucfirst($name).'</label>';
}
public function addCheckBox($name, $check = false){
if ($check) $check = ' checked="checked"';
else $check = '';
$this->elements[]= '<input type="checkbox" id="'.$this->name.'__'.$name.'" name="'.$this->name.'__'.$name.'"'.$check.'> <label for="'.$this->name.'__'.$name.'">'.ucfirst($name).'</label>';
}
public function addTextbox($name,$value = '',$cols = 40,$rows = 10){
$this->elements[]= '<textarea name="'.$this->name.'__'.$name.'" cols="'.$cols.'" rows="'.$rows.'">'.$value.'</textarea>';
}
public function addSubmit($text){
$this->buttons[]= '<input style="width: 100px; height: 25px;" type="submit" name="'.$this->name.'__'.$this->name.'" value="'.$text.'"/>';
}
public function addReload($text){
$this->buttons[]= '<input style="width: 100px; height: 25px;" onclick="ajax(\'form\',\''.htmlspecialchars($_SERV ER['PHP_SELF']).'\',\'\',true)" type="button" name="'.$this->name.'__'.$this->name.'" value="'.$text.'"/>';
}
public function addRefresh($text){
$this->buttons[]= '<input onclick="location.reload(false)" type="button" style="width: 100px; height: 25px;" value="'.$text.'"/>';
}
public function addClose($text){
$this->buttons[]= '<input style="width: 100px; height: 25px;" onclick="document.getElementById(\'iobox\').style[\'visibility\'] = \'hidden\'" type="button" value="'.$text.'"/>';
}
public function addCode($code){
$this->elements[]= $code;
}
public function addLabel($code){
$this->label = '<legend>'.$code.'</legend>';
}
public function getCode(){
if (isset($_POST['ajax']))
$code = '<table cellspacing="10px" onmouseup="Cookies.create(\'iobox_x\',document.get ElementById(\'iobox\').style.left,1);Cookies.creat e(\'iobox_y\',document.getElementById(\'iobox\').s tyle.top,1);" style="visibility:hidden" id="iobox" class="draggable"><tr><td><fieldset>'.$this->label.'<form id="'.$this->name.'" action="javascript:ajax(\'form\',\''.htmlspecialch ars($this->target).'\',getParams(document.getElementById(\'' .$this->name.'\')),true)" method="post">';
else
$code = '<div id="iobox" class="iobox"><fieldset>'.$this->label.'<form id="'.$this->name.'" action="'.htmlspecialchars($this->target).'" method="post">';
foreach ($this->elements as $element)
$code.= $element."<br/><div style=\"margin-top: 5px;\"></div>\r\n";
$code.= '<hr style="margin: 10px 2px 2px 2px; padding: 0;"/> | ';
foreach ($this->buttons as $button)
$code.= $button." | \r\n";
$code.= '</form></fieldset></td></tr></table>';
return $code;
}
public function show(){
echo $this->getCode();
}
}
class Form
{
public $attrs;
public function __construct($name){
foreach( array_keys($_POST) as $key){
if (preg_match('/^' . $name . '__/',$key)){
$p = explode('__', $key);
$this->attrs[$p[1]] = trim($_POST[$key]);
}
}
}
public function getBool($attr){
return $this->attrs[$attr] === 'on';
}
public function exists(){
if (isset($this->attrs)) return true;
else return false;
}
public function validated(){
global $cfg;
if (!$cfg['use_captcha']) return true;
if (strtolower($this->attrs['captcha']) === $_SESSION['RandomText'] && !empty($_SESSION['RandomText'])){
$_SESSION['RandomText'] = null;
return true;
}else return false;
}
}
Teraz powinno dzia?a?, zapomnia?em o jednym znaku
 

Grzechu

Senior User
Joined
Nov 29, 2008
Messages
1,263
Reaction score
93
Odp: Problem acc maker TDB [GOD/GM]

poka? plik character_search.php
 

scooler

User
Joined
Jan 18, 2009
Messages
15
Reaction score
0
Odp: Problem acc maker TDB [GOD/GM]

ja mam plik tylko "characters"
 

scooler

User
Joined
Jan 18, 2009
Messages
15
Reaction score
0
to ci dac ????
PHP:
<?php 
/*
    Copyright (C) 2007 - 2008  Nicaw
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2 of the License, or
    (at your option) any later version.
    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.
    You should have received a copy of the GNU General Public License along
    with this program; if not, write to the Free Software Foundation, Inc.,
    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
include ("../include.inc.php");
require ('check.php');
//retrieve post data
$form = new Form('search');
//check if any data was submited
if ($form->exists()){
	if (strlen($form->attrs['name']) > 1){
		//do mysql search
		$query =  'SELECT name FROM players WHERE `name` LIKE \'%'.$form->attrs['name'].'%\'';
		$SQL = new SQL();
		$SQL->myQuery($query);
		if ($SQL->failed() || $SQL->num_rows() == 0){
			//create new message
			$msg = new IOBox('message');
			$msg->addMsg('Nothing found.');
			$msg->addReload('<< Back');
			$msg->addClose('Close');
			$msg->show();
		}else{
			while ($a = $SQL->fetch_array())
				$characters[] = $a['name'];
			//create new message
			$msg = new IOBox('admin');
			$msg->target = $_GET['script'];
			$msg->addMsg($SQL->num_rows().' character(s) found!');
			$msg->addSelect('list',array_combine($characters,$characters));
			$msg->addReload('<< Back');
			$msg->addClose('Cancel');
			$msg->addSubmit('Next >>');
			$msg->show();
		}
	}else{
		//create new message
		$msg = new IOBox('message');
		$msg->addMsg('Name must contain 2 characters at least.');
		$msg->addReload('<< Back');
		$msg->addClose('Close');
		$msg->show();
	}
}else{
	//create new form
	$form = new IOBox('search');
	$form->target = $_SERVER['PHP_SELF'].'?script='.$_POST['script'];
	$form->addLabel('Find Character');
	$form->addInput('name');
	$form->addClose('Cancel');
	$form->addSubmit('Next >>');
	$form->show();
}
?>
sorka znalaz?em XD
 
Last edited by a moderator:

Grzechu

Senior User
Joined
Nov 29, 2008
Messages
1,263
Reaction score
93
Odp: Problem acc maker TDB [GOD/GM]

No to mo?e dasz? :) i nie i pisz posta pod postem swoim ;)
 

scooler

User
Joined
Jan 18, 2009
Messages
15
Reaction score
0
ok sorry ja nowy w tych rzeczach
Problem zosta? rozwi?zany XD

Notka moderatorska:
Sklejone
 
Last edited by a moderator:

Hardcor997

User
Joined
Nov 17, 2009
Messages
29
Reaction score
0
Odp: Problem acc maker TDB [GOD/GM]

Ja z moim acc makerem robi?em tak :
Pobra?em Notepad++
i te bledy jakie Ci wyskakuj?
wchodzisz w
C:\xampp\htdocs\class\iobox.php
i usuwasz linijki ktore s? zle w twoim przypadku to jest "105"
usu? t? linijke, przewa?nie to bzet np "?, >, <"
 

Grzechu

Senior User
Joined
Nov 29, 2008
Messages
1,263
Reaction score
93
Odp: Problem acc maker TDB [GOD/GM]

Ja z moim acc makerem robi?em tak :
Pobra?em Notepad++
i te bledy jakie Ci wyskakuj?
wchodzisz w
C:\xampp\htdocs\class\iobox.php
i usuwasz linijki ktore s? zle w twoim przypadku to jest "105"
usu? t? linijke, przewa?nie to bzet np "?, >, <"

Jak by? widzia? jaki b??d wyskakuje w iobox.php to by? m?g? zobaczy?, ?e skrypt pr?buje skorzysta? z eregi, kt?rego php5.3 Nie obs?uguje ;) Tak?e nie gadaj, ?e nale?y to usun?? :)
 
Status
Not open for further replies.
Top