SHARE
TWEET

Untitled

a guest Jul 19th, 2019 86 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. try {
  2.     $conAD = new PDO('oci:dbname=//localhost:1521/xe/ORCL', 'wms_eadi', 'wms_eadi');
  3.     $conAD->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
  4. } catch(PDOException $e) {
  5.     echo 'ERROR: ' . $e->getMessage();
  6. }
  7.  
  8. //$db_connectAG = '(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=172.20.220.43)(PORT=1521)) (CONNECT_DATA=(SID=alcisagprd)))';
  9. //$db_userAG = 'core_11_1';
  10. //$db_passAG = 'T3cn1c05p';
  11. //$db = "oci:dbname=alcisagprd";
  12. //$conAG = oci_connect($db_user,$db_pass,$db_connectAG,'AL32UTF8');
  13.  
  14.  
  15. //$conAG = new PDO("oci:dbname=".$db_connectAG,$db_userAG,$db_passAG);
  16.  
  17. //$db_connectAD = '(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=172.20.220.32)(PORT=1522)) (CONNECT_DATA=(SID=ALCISSTB)))';
  18. //$db_userAD = 'wms_eadi';
  19. //$db_passAD = 'wms_eadi';
  20. //$conAD = oci_pconnect($db_userAD,$db_passAD,$db_connectAD,'AL32UTF8');
  21. //$conAD = oci_connect("wms_eadi","wms_eadi","ALCIS_NEW"); conexão alternativa
  22. //$conAG = oci_connect('core_11_1', 'T3cn1c05p', 'ALCISAGPRD','AL32UTF8');
  23.  
  24.  
  25. //$AD = oci_parse($conAD,"select k.suchbegriff from KLIENTEN k where (k.suchbegriff = '".$cnpj."' or k.suchbegriff = '".$tb_cnpj."')");
  26. //oci_execute($AD);
  27. //$lineAD = oci_fetch_all($AD, $res);
  28.  
  29. $AD = $conAD->query("select k.suchbegriff from KLIENTEN k where (k.suchbegriff = '".$cnpj."' or k.suchbegriff = '".$tb_cnpj."')");
  30. $AD->execute();
  31. $lineAD = $AD->rowCount();
  32.  
  33. $AG = $conAG->query("select k.suchbegriff from KLIENTEN k where (k.suchbegriff = '".$cnpj."' or k.suchbegriff = '".$tb_cnpj."')");
  34. $AG->execute();
  35. $lineAG = $AD->rowCount();
  36.  
  37. //$AG = oci_parse($conAG,"select k.suchbegriff from KLIENTEN k where (k.suchbegriff = '".$cnpj."' or k.suchbegriff = '".$tb_cnpj."')");
  38. //oci_execute($AG);
  39. //$lineAG = oci_fetch_all($AG, $res);
  40.  
  41. if($lineAD > 0 && $lineAG > 0){
  42.     header("Location: clientes/indexFull.php");
  43. }else if($lineAD > 0 && $lineAG == 0){
  44.     header("Location: clientes/index.php");
  45. }else if($lineAG > 0 && $lineAD == 0){
  46.     header("Location: clienteAG/indexAG.php");
  47. }else{
  48.     echo "<script>
  49.             alert('CNPJ NÃO SE ENCONTRADO NA BASE DADOS\nFAVOR ENTRAR EM CONTATO COM ATENDIMENTO');
  50.             location.href='formulario_cadastroTeste.php';
  51.          </script>";
  52. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top