Ver Mensaje Individual
  #3 (permalink)  
Antiguo 25/01/2013, 16:09
MtCristian
 
Fecha de Ingreso: enero-2013
Mensajes: 2
Antigüedad: 11 años, 9 meses
Puntos: 0
Respuesta: Fatal error: Class 'FormValidator' not found in

en la linea 176 del erro solo esta

$f = new FormValidator($elems);

/****************************************/
/* register codes */
/****************************************/
if (isset($_GET['activate'])) {

$uname = clean_variable(md5_decrypt($_GET['activate']));
echo notice("<strong>$uname</strong> Sua conta foi registrada com sucesso!!");

$activate = $GLOBALS['db']->Execute("Update Memb_info set bloc_code = 0, mail_chek=1 where mail_chek=0 and bloc_code = 1 and memb___id = ?",array($uname));
writelog("$uname successfull activation","regsiter");

mailer('', "Registro ativado",$uname. " Sua conta foi ativada com sucessonnObrigado!",$uname);

} else {

if (!isset($_POST['submit'])) {
echo reg_form();
} elseif (isset($_POST['submit'])) {
$elems[] = array('name'=>'fname','label'=>'Login Invalido ('.$config['reg_min_len'].'-'.$config['reg_max_len'].' Alpha-Numeric Characters)', 'type'=>'text','uname'=>'true', 'required'=>true, 'len_min'=>$config['reg_min_len'],'len_max'=>$config['reg_max_len'], 'cont' =>'alpha');
$elems[] = array('name'=>'nickname','label'=>'Nickname Invalido ('.$config['reg_min_len'].'-'.$config['reg_max_len'].' Alpha-Numeric Characters)', 'type'=>'text','uname'=>'true', 'required'=>true, 'len_min'=>$config['reg_min_len'],'len_max'=>$config['reg_max_len'], 'cont' =>'alpha');
$elems[] = array('name'=>'email', 'label'=>'Email invalido (ex. [email protected] MAX: '.$config['reg_max_mail'].')', 'type'=>'text', 'required'=>true, 'len_max'=>$config['reg_max_mail'], 'cont' => 'email');
$elems[] = array('name'=>'pass1', 'label'=>'Senha Invalida ('.$config['reg_min_len'].'-'.$config['reg_max_len'].' Alpha-Numeric Characters)', 'type'=>'text', 'required'=>true, 'len_min'=>$config['reg_min_len'],'len_max'=>$config['reg_max_len'], 'cont' =>'alpha');
$elems[] = array('name'=>'pass2', 'label'=>'Senha Invalida','type'=>'text', 'required'=>true, 'len_min'=>$config['reg_min_len'],'len_max'=>$config['reg_max_len'], 'cont' =>'alpha','equal'=> array('pass1'));


$f = new FormValidator($elems); <---- aqui el error 176 que me da
$err = $f->validate($_POST);

if ( $err === true ) {

$valid = $f->getValidElems();

foreach ( $valid as $k => $v ) {

if ( $valid[$k][0][1] == false ) {
// Empty label field
if ( empty($valid[$k][0][2]) ) {
// then echo the form name of a field
echo notice($valid[$k][0][2]);
}
else {
echo notice($valid[$k][0][2]);
}
}
}

} else {
$error = 0;
if (valid_account($_POST['fname']) === true) {
echo notice("O Login que voce tentou usar ja se encontra em uso.");

$error = 1;
}
if (valid_email($_POST['email']) === true) {
echo notice("O E-mail que voce tentou usar ja se encontra em uso.");

$error = 1;
}
if (valid_NickName($_POST['nickname']) === true) {
echo notice("O Nick que voce tentou usar ja se encontra em uso.");

$error = 1;
}
if ($config['reg_allow'] == 0 ) {
echo notice("A Op&ccedil;&atilde;o de registro est&aacute; temporariamente desabilitada. Por favor contacte o administrador pelo email @ " .$config['admin_mail'], "ALERT REGISTRATION CLOSE");
$error = 1;
}
if ($error!=1) {
if ($config['reg_mail_check'] == 1) {



writeLog('Register Needs Activate: '. $_POST['fname'],'register');
echo
notice('<br><h3>'. $_POST['fname'].
' Sua conta foi registrada com sucesso.!</h3>
Visite nosso parceiro: http://www.gunboundsapo.br',"Email Activation Needed");

} else {


$result = $db->Execute("SELECT TotalRank FROM `game` order by `TotalRank` desc LIMIT 1");
$rank = $result->GetArray();
$rankmax = $rank[0]['TotalRank'];
$rankmax++;
$result = $db->Execute("insert into `game`(Id, NickName, Money, TotalScore, SeasonScore, TotalGrade, SeasonGrade, Country, CountryGrade, TotalRank, SeasonRank, CountryRank) values (?, ?, ?, '1000', '0', '19', '19', ?, 19, ?, ?, ?)",
array($_POST['fname'], $_POST['nickname'], $config['user_gold'], $_POST['country'], $rankmax, $rankmax, $rankmax));
if ($db->Affected_Rows() > 0) {

$result = $db->Execute("insert into `cash` (ID, Cash) values (?,?)", array($_POST['fname'],$config['user_cash']));

$db->Execute("insert into `user`(Id, user, Gender, NickName, Password, Status, MuteTime, RestrictTime, Authority, E_Mail, Country, User_Level, Authority2, Pergunta, Resposta, coin) values (?, ?, ?, ?, ?, '1', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '1', ?, ?, 1, 1, ?, ?, ?)",
array($_POST['fname'],$_POST['fname'],$_POST['gender'], $_POST['nickname'], $_POST['pass1'],$_POST['email'], $_POST['country'],$_POST['Pergunta'], $_POST['Resposta'], $config['user_coin']));

$db->Execute("insert into `gunwcuser` (Id, user, Gender, NickName, User_Level, Authority2, Password, Status, MuteTime, RestrictTime, Authority, E_Mail, Country, AuthorityBackup) values (?, ?, ?, ?, 1, 1, ?, 1, '0000-00-00 00:00:00', '0000-00-00 00:00:00', 1, ?, ?, 0)",
array($_POST['fname'],$_POST['fname'],$_POST['gender'], $_POST['nickname'], $_POST['pass1'],$_POST['email'], $_POST['country']));


$mail = "Veja os dados da sua conta abaixo;nn Login: ". $_POST['fname'] ."nn Senha: ". $_POST['pass2'];
if (mailer($_POST['email'], "Bem-Vindo(a)", $mail) == true) echo notice('Foi enviado um e-mail com os dados de sua conta (voce nao precisa confirmar sua conta no email) e apenas infomando login e senha.');
writeLog('Register: '. $_POST['fname'],'register');
echo notice('<br><h3>'. $_POST['fname'].
' Carregando!</h3>');
header('Refresh: 1; url=?go=entrar');
} else {
notice('Database has encountered an Error.<br> Do not worry Database will be fixed.<br> Please try your registration again.','ERROR');
$db->Execute('ALTER TABLE `game` ADD `NickName` VARCHAR( 15 ) NOT NULL');

}
}

} else {
echo reg_form();
}

}

}


}




?>