Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'bingo'@'localhost' (using password: YES) in /home/deubingo/public_html/include_systemsettings.php on line 14
Warning: mysql_select_db(): supplied argument is not a valid MySQL-Link resource in /home/deubingo/public_html/include_systemsettings.php on line 15
function CPFValido(CPF) {
if(CPF=='11111111111' || CPF=='22222222222' || CPF=='33333333333' || CPF=='44444444444' || CPF=='55555555555' || CPF=='66666666666' || CPF=='77777777777' || CPF=='88888888888' || CPF=='99999999999' || CPF=='00000000000'){
return false;
}
var k, i, j, Soma;
if (CPF.length != 11)
return false;
k =0;
while(k <= 1) {
Soma = 0;
j = 10 + k;
for (i=0; i<9+k; i++){
Soma += parseInt(CPF.charAt(i),10)*j;
j--;
}//end for
Soma = 11 - Soma%11;
if (Soma >= 10)
Soma = 0;
if (parseInt(CPF.charAt(9+k),10) != Soma)
return false;
k++;
}//end while
return true;
}
function VrfCNPJCPF(obj) {
if(obj.value!=''){
if (CPFValido(obj.value) == false) {
alert("CPF Inválido para o campo '"+obj.label+"'");
obj.focus();
}else {
obj.value = Mask(obj.value, "###.###.###-##");
obj.mask = "###.###.###-##";
}
}
}
function validaCadastro() {
RtrnBool = true;
// Verify Name
if (document.forms.Cadastro.nome.value.replace(/(^\s*)|(\s*$)/g, "")=="") {
alert('Nome não preenchido.');
document.forms.Cadastro.nome.style.border = "1px solid #FF0000";
document.forms.Cadastro.nome.focus();
RtrnBool = false;
} else {
document.forms.Cadastro.nome.style.border = "1px solid #7f9db9";
}
// Verify Username
if ((document.forms.Cadastro.apelido.value.replace(/(^\s*)|(\s*$)/g, "")=="")&&(RtrnBool!=false)) {
alert('Apelido não preenchido.');
document.forms.Cadastro.apelido.style.border = "1px solid #FF0000";
document.forms.Cadastro.apelido.focus();
RtrnBool = false;
} else {
document.forms.Cadastro.apelido.style.border = "1px solid #7f9db9";
}
if ((document.forms.Cadastro.apelido.value.indexOf(" ")>=1)&&(RtrnBool!=false)) {
alert('Digitar seu Apelido sem espaços');
document.forms.Cadastro.apelido.style.border = "1px solid #FF0000";
document.forms.Cadastro.apelido.focus();
RtrnBool = false;
} else {
document.forms.Cadastro.apelido.style.border = "1px solid #7f9db9";
}
// Verify Password
if ((document.forms.Cadastro.senha.value!=document.forms.Cadastro.senha_confirme.value)&&(RtrnBool!=false)) {
alert('Senha não confere com confirmação. \n Verifique.');
document.forms.Cadastro.senha_confirme.style.border = "1px solid #FF0000";
document.forms.Cadastro.senha_confirme.focus();
RtrnBool = false;
} else {
document.forms.Cadastro.senha_confirme.style.border = "1px solid #7f9db9";
}
if ((document.forms.Cadastro.senha.value.replace(/(^\s*)|(\s*$)/g, "")=="")&&(RtrnBool!=false)) {
alert('Senha não preenchida.');
document.forms.Cadastro.senha.style.border = "1px solid #FF0000";
document.forms.Cadastro.senha.focus();
RtrnBool = false;
} else {
document.forms.Cadastro.senha.style.border = "1px solid #7f9db9";
}
// Verify Email
if ((document.forms.Cadastro.email.value!=document.forms.Cadastro.email_confirme.value)&&(RtrnBool!=false)) {
alert('Email não confere com confirmação. \n Verifique.');
document.forms.Cadastro.email_confirme.style.border = "1px solid #FF0000";
document.forms.Cadastro.email_confirme.focus();
RtrnBool = false;
} else {
document.forms.Cadastro.email_confirme.style.border = "1px solid #7f9db9";
}
if ((document.forms.Cadastro.email.value.replace(/(^\s*)|(\s*$)/g, "")=="")&&(RtrnBool!=false)) {
alert('Email não preenchido.');
document.forms.Cadastro.email.style.border = "1px solid #FF0000";
document.forms.Cadastro.email.focus();
RtrnBool = false;
} else {
document.forms.Cadastro.email.style.border = "1px solid #7f9db9";
}
// Verify Birth Date
// Day
if ((document.forms.Cadastro.dia.value==0)&&(RtrnBool!=false)) {
alert('Data Nascimento: Dia não preenchido.');
document.forms.Cadastro.dia.style.border = "1px solid #FF0000";
document.forms.Cadastro.dia.focus();
RtrnBool = false;
} else {
document.forms.Cadastro.dia.style.border = "1px solid #7f9db9";
}
// Month
if ((document.forms.Cadastro.mes.value==0)&&(RtrnBool!=false)) {
alert('Data Nascimento: Mês não preenchido.');
document.forms.Cadastro.mes.style.border = "1px solid #FF0000";
document.forms.Cadastro.mes.focus();
RtrnBool = false;
} else {
document.forms.Cadastro.mes.style.border = "1px solid #7f9db9";
}
// Year
if ((document.forms.Cadastro.ano.value==0)&&(RtrnBool!=false)) {
alert('Data Nascimento: Ano não preenchido.');
document.forms.Cadastro.ano.style.border = "1px solid #FF0000";
document.forms.Cadastro.ano.focus();
RtrnBool = false;
} else {
document.forms.Cadastro.ano.style.border = "1px solid #7f9db9";
}
// Verify Sex
if ((document.forms.Cadastro.sexo.value==0)&&(RtrnBool!=false)) {
alert('Sexo não preenchido.');
document.forms.Cadastro.sexo.style.border = "1px solid #FF0000";
document.forms.Cadastro.sexo.focus();
RtrnBool = false;
} else {
document.forms.Cadastro.sexo.style.border = "1px solid #7f9db9";
}
// Verify City
if ((document.forms.Cadastro.cidade.value.replace(/(^\s*)|(\s*$)/g, "")=="")&&(RtrnBool!=false)) {
alert('Cidade não preenchida.');
document.forms.Cadastro.cidade.style.border = "1px solid #FF0000";
document.forms.Cadastro.cidade.focus();
RtrnBool = false;
} else {
document.forms.Cadastro.cidade.style.border = "1px solid #7f9db9";
}
// Verify State
if ((document.forms.Cadastro.estado.value=="--")&&(RtrnBool!=false)) {
alert('Estado não preenchido.');
document.forms.Cadastro.estado.style.border = "1px solid #FF0000";
document.forms.Cadastro.estado.focus();
RtrnBool = false;
} else {
document.forms.Cadastro.estado.style.border = "1px solid #7f9db9";
}
// Verify Rules & 18 years of age
if ((document.forms.Cadastro.regras.checked==false)&&(RtrnBool!=false)) {
alert('Declaro estar de acordo com as Regras do site');
document.forms.Cadastro.regras.style.border = "1px solid #FF0000";
document.forms.Cadastro.regras.focus();
RtrnBool = false;
} else {
document.forms.Cadastro.regras.style.border = "1px solid #7f9db9";
}
if ((document.forms.Cadastro.anos18.checked==false)&&(RtrnBool!=false)) {
alert('Proibido para menores de 18 anos');
document.forms.Cadastro.anos18.style.border = "1px solid #FF0000";
document.forms.Cadastro.anos18.focus();
RtrnBool = false;
} else {
document.forms.Cadastro.anos18.style.border = "1px solid #7f9db9";
}
return RtrnBool;
}