Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /**
- *
- * @ This file is created by deZender.Net
- * @ deZender (PHP5 Decoder for Zend Encoder/SafeGuard & PhpExpress)
- *
- * @ Version : 2.0.0.3
- * @ Author : DeZender
- * @ Release on : 06.05.2013
- * @ Official site : http://DeZender.Net
- *
- */
- class nm_serial {
- public $chave_completa = null;
- public $tipo_chave = null;
- public $dv_1 = null;
- public $dv_2 = null;
- public $dv_3 = null;
- public $dv_4 = null;
- public $seq_serial = array();
- 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");
- 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");
- public function nm_avanca_serial($seq) {
- $this->abre_serial($seq);
- $x = 11;
- $this->seq_serial[11]++;
- while (0 < $x) {
- $x--;
- continue;
- if ($this->seq_serial[$x] == 36) {
- $this->seq_serial[$x] = 1;
- $this->seq_serial[$x - 1]++;
- }
- else {
- break;
- }
- continue;
- }
- $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]];
- return $retorno;
- }
- public function nm_gera_serial($tp_ch, $ult_seq) {
- $this->tipo_chave = $this->alfa[$tp_ch];
- $this->abre_serial($ult_seq);
- $this->calc_dv();
- $this->fecha_chave();
- return $this->chave_completa;
- }
- ....................................................................
- .............................
- .........
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement