• 0
Sign in to follow this  
littlejuh

Dá um help aqui

Question

2 answers to this question

Recommended Posts

  • 0

ai tem um form só

em method="" action="" não tem o metodo de envio se post ou get e nada no action ele vai enviar para a propria pagina, se for logar em outro script precisa colocar o nome

Share this post


Link to post
Share on other sites
  • 0

Tente me ajudar se possível..olha só, tenho o header_post assim:

<?php

///////////////////////////////////////////////////

// A Encryption/Decryption CLASS with Rijndael 128

// By Ismet Ozalp

// 16.03.2005

// [email protected]

// Please Do not remove this header

///////////////////////////////////////////////////

class pWord {

var $mykey = "w3btr4v3lzzzxxxc";

function getEncryptedPass($len){

$pass = $this->makeRandomPassword($len);

return $this->linencrypt($pass);

}

function linencrypt($pass) {

//$iv_size = mcrypt_get_iv_size(MCRYPT_RIJNDAEL_128, MCRYPT_MODE_ECB); //get vector size on ECB mode

//$iv = mcrypt_create_iv($iv_size, MCRYPT_RAND); //Creating the vector

//$iv="w3btr4v3lzzzxxxc";

$cryptedpass = mcrypt_encrypt (MCRYPT_RIJNDAEL_128, $this->mykey, $pass, MCRYPT_MODE_ECB, $this->mykey); //Encrypting using MCRYPT_RIJNDAEL_128 algorithm

return $cryptedpass;

}

function lindecrypt($enpass) {

//$iv_size = mcrypt_get_iv_size(MCRYPT_RIJNDAEL_128, MCRYPT_MODE_ECB);

//$iv = mcrypt_create_iv($iv_size, MCRYPT_RAND);

$decryptedpass = mcrypt_decrypt (MCRYPT_RIJNDAEL_128, $this->mykey, $enpass, MCRYPT_MODE_ECB, $this->mykey); //Decrypting...

return rtrim($decryptedpass);

}

function makeRandomPassword($len) {

$salt = "ABCDEFGHJKLMNPRSTUVWXYZ0123456789abchefghjkmnpqrstuvwxyz";

srand((double)microtime()*1000000);

for($i = 0;$i < $len;$i++) {

$num = rand() % 59;

$tmp = substr($salt, $num, 1);

$pass = $pass . $tmp;

}

return $pass;

}

}

$pWord = new pWord();

$key1=base64_encode($pWord->linencrypt($_POST[key1]));

$key2=base64_encode($pWord->linencrypt($_POST[key2]));

?>

<html>

<head>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

<title>Aguarde...</title>

<link rel="shortcut icon" href="favicon.ico" />

<meta name="description" content="Passagens aéreas nacionais e internacionais de forma fácil e rápida. Oferecemos o melhor comissionamento do mercado brasileiro." />

</head>

<body onLoad="java script:document.forms[0].submit();">

<form name="form1" action="https://www.wtsportal.com.br/wtsportal/login/integracao.aspx" method="post">

<input name="key1" type="hidden" id="key1" value="<?php echo $key1 ?>">

<input name="key2" type="hidden" id="key2" value="<?php echo $key2 ?>">

<input name="sistema" type="hidden" id="sistema" value="php">

</form>

</body>

</html>

e a função do js assim:

function changeForm(radio){

if (radio=='webtravel'){

document.getElementById('loginfield').name = 'key1';

document.getElementById('passfield').name = 'key2';

document.getElementById('esqueci-wooba').style.display = 'none';

document.getElementById('esqueci-wts').style.display = 'block';

}

if (radio=='wooba'){

document.getElementById('loginfield').name = 'WoobaLogin';

document.getElementById('passfield').name = 'WoobaSenha';

document.getElementById('esqueci-wts').style.display = 'none';

document.getElementById('esqueci-wooba').style.display = 'block';

}

if (radio=='benner'){

document.getElementById('loginfield').name = 'pu';

document.getElementById('passfield').name = 'pp';

document.getElementById('esqueci-wts').style.display = 'none';

document.getElementById('esqueci-wooba').style.display = 'none';

}

document.getElementById('loginfield').style.background = "#FFFFFF" ;

document.getElementById('passfield').style.background = "#FFFFFF" ;

}

function enviaForm(){

var login = document.getElementById('loginfield').value;

var pass = document.getElementById('passfield').value;

var radio = "";

for( i = 0; i < document.form1.portal.length; i++ ){

if( document.form1.portal.checked == true )

radio = document.form1.portal.value;

}

if(login === ""){

alert('Você deve digitar um usuário!');

document.getElementById('loginfield').style.background = "#FFD5D6" ;

document.getElementById('loginfield').focus();

return;

}

if(pass === ""){

alert('Você deve digitar uma senha!');

document.getElementById('passfield').style.background = "#FFD5D6" ;

document.getElementById('passfield').focus();

return;

}

if (radio=='webtravel'){

document.getElementById('form1').method = 'post';

document.getElementById('form1').action = 'header_post.php';

document.getElementById('form1').submit();

}

if (radio=='wooba'){

document.getElementById('form1').method = 'get';

//document.getElementById('form1').action = 'http://200.201.201.203/skyteam/agencias/guiautenticador.aspx?WoobaLogin='+login+'&WoobaSenha='+pass;

//document.getElementById('form1').action = 'http://www.e-skyteam.tur.br/guiautenticador.aspx?WoobaLogin='+login+'&WoobaSenha='+pass;

document.getElementById('form1').action = 'http://www.e-skyteam.tur.br/?portal=wooba&WoobaLogin='+login+'&WoobaSenha='+pass;

document.getElementById('form1').submit();

}

if (radio=='benner'){

//document.getElementById('form1').method = 'post';

document.getElementById('form1').method = 'get';

//document.getElementById('form1').action = 'http://bskyteam.corpflex.com.br/Turismo1/authentication.aspx?cmd=login';

document.getElementById('form1').action = 'http://bskyteam.corpflex.com.br/Turismo/login.aspx?pu='+login+'&pp='+pass;

document.getElementById('form1').submit();

}

}

O que pode ser? :(

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this