Advertisement
Guest User

Untitled

a guest
May 16th, 2014
322
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.33 KB | None | 0 0
  1. <?php
  2. /**
  3. *
  4. * @ This file is created by deZender.Net
  5. * @ deZender (PHP5 Decoder for Zend Encoder/SafeGuard & PhpExpress)
  6. *
  7. * @ Version : 2.0.0.3
  8. * @ Author : DeZender
  9. * @ Release on : 06.05.2013
  10. * @ Official site : http://DeZender.Net
  11. *
  12. */
  13.  
  14. class nm_serial {
  15.  
  16.  
  17. public $chave_completa = null;
  18. public $tipo_chave = null;
  19. public $dv_1 = null;
  20. public $dv_2 = null;
  21. public $dv_3 = null;
  22. public $dv_4 = null;
  23. public $seq_serial = array();
  24. public $alfa = array(1 => "1", 2 => "2", 3 => "3", 4 => "4", 5 => "5", 6 => "6", 7 => "7", 8 => "8", 9 => "9", "A" => "10", "B" => "11", "C" => "12", "D" => "13", "E" => "14", "F" => "15", "G" => "16", "H" => "17", "I" => "18", "J" => "19", "K" => "20", "L" => "21", "M" => "22", "N" => "23", "O" => "24", "P" => "25", "Q" => "26", "R" => "27", "S" => "28", "T" => "29", "U" => "30", "V" => "31", "W" => "32", "X" => "33", "Y" => "34", "Z" => "35");
  25. public $num = array(1 => "1", 2 => "2", 3 => "3", 4 => "4", 5 => "5", 6 => "6", 7 => "7", 8 => "8", 9 => "9", 10 => "A", 11 => "B", 12 => "C", 13 => "D", 14 => "E", 15 => "F", 16 => "G", 17 => "H", 18 => "I", 19 => "J", 20 => "K", 21 => "L", 22 => "M", 23 => "N", 24 => "O", 25 => "P", 26 => "Q", 27 => "R", 28 => "S", 29 => "T", 30 => "U", 31 => "V", 32 => "W", 33 => "X", 34 => "Y", 35 => "Z");
  26. public function nm_avanca_serial($seq) {
  27. $this->abre_serial($seq);
  28. $x = 11;
  29. $this->seq_serial[11]++;
  30. while (0 < $x) {
  31. $x--;
  32. continue;
  33. if ($this->seq_serial[$x] == 36) {
  34. $this->seq_serial[$x] = 1;
  35. $this->seq_serial[$x - 1]++;
  36. }
  37. else {
  38. break;
  39. }
  40. continue;
  41. }
  42. $retorno = $this->num[$this->seq_serial[1]] . $this->num[$this->seq_serial[2]] . $this->num[$this->seq_serial[3]] . $this->num[$this->seq_serial[4]] . $this->num[$this->seq_serial[5]] . $this->num[$this->seq_serial[6]] . $this->num[$this->seq_serial[7]] . $this->num[$this->seq_serial[8]] . $this->num[$this->seq_serial[9]] . $this->num[$this->seq_serial[10]] . $this->num[$this->seq_serial[11]];
  43. return $retorno;
  44. }
  45.  
  46. public function nm_gera_serial($tp_ch, $ult_seq) {
  47. $this->tipo_chave = $this->alfa[$tp_ch];
  48. $this->abre_serial($ult_seq);
  49. $this->calc_dv();
  50. $this->fecha_chave();
  51. return $this->chave_completa;
  52. }
  53. ....................................................................
  54. .............................
  55. .........
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement