!C99Shell v. 2.0 [PHP 7 Update] [25.02.2019]!

Software: Apache/2.4.18 (Ubuntu). PHP/7.0.33-0ubuntu0.16.04.16 

uname -a: Linux digifus 3.13.0-57-generic #95-Ubuntu SMP Fri Jun 19 09:28:15 UTC 2015 x86_64 

uid=33(www-data) gid=33(www-data) groups=33(www-data) 

Safe-mode: OFF (not secure)

/var/www/html/almazenServer/application/libraries/   drwxr-xr-x
Free 9.9 GB of 29.4 GB (33.68%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


Viewing file:     PdfRtImagenes.php (16.89 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
    
// Incluimos el archivo fpdf
    
require_once APPPATH."/third_party/fpdf.php";
 
    
//Extendemos la clase Pdf de la clase fpdf para que herede todas sus variables y funciones
    
class PdfRtImagenes extends FPDF {
        protected 
$T128;                                         // Tableau des codes 128
        
protected $ABCset "";                                  // jeu des caractères éligibles au C128
        
protected $Aset "";                                    // Set A du jeu des caractères éligibles
        
protected $Bset "";                                    // Set B du jeu des caractères éligibles
        
protected $Cset "";                                    // Set C du jeu des caractères éligibles
        
protected $SetFrom;                                      // Convertisseur source des jeux vers le tableau
        
protected $SetTo;                                        // Convertisseur destination des jeux vers le tableau
        
protected $JStart = array("A"=>103"B"=>104"C"=>105); // Caractères de sélection de jeu au début du C128
        
protected $JSwap = array("A"=>101"B"=>100"C"=>99);   // Caractères de changement de jeu
       
    
        
public function __construct() {
            
parent::__construct();
            
$this->T128[] = array(212222);           //0 : [ ]               // composition des caractères
            
$this->T128[] = array(222122);           //1 : [!]
            
$this->T128[] = array(222221);           //2 : ["]
            
$this->T128[] = array(121223);           //3 : [#]
            
$this->T128[] = array(121322);           //4 : [$]
            
$this->T128[] = array(131222);           //5 : [%]
            
$this->T128[] = array(122213);           //6 : [&]
            
$this->T128[] = array(122312);           //7 : [']
            
$this->T128[] = array(132212);           //8 : [(]
            
$this->T128[] = array(221213);           //9 : [)]
            
$this->T128[] = array(221312);           //10 : [*]
            
$this->T128[] = array(231212);           //11 : [+]
            
$this->T128[] = array(112232);           //12 : [,]
            
$this->T128[] = array(122132);           //13 : [-]
            
$this->T128[] = array(122231);           //14 : [.]
            
$this->T128[] = array(113222);           //15 : [/]
            
$this->T128[] = array(123122);           //16 : [0]
            
$this->T128[] = array(123221);           //17 : [1]
            
$this->T128[] = array(223211);           //18 : [2]
            
$this->T128[] = array(221132);           //19 : [3]
            
$this->T128[] = array(221231);           //20 : [4]
            
$this->T128[] = array(213212);           //21 : [5]
            
$this->T128[] = array(223112);           //22 : [6]
            
$this->T128[] = array(312131);           //23 : [7]
            
$this->T128[] = array(311222);           //24 : [8]
            
$this->T128[] = array(321122);           //25 : [9]
            
$this->T128[] = array(321221);           //26 : [:]
            
$this->T128[] = array(312212);           //27 : [;]
            
$this->T128[] = array(322112);           //28 : [<]
            
$this->T128[] = array(322211);           //29 : [=]
            
$this->T128[] = array(212123);           //30 : [>]
            
$this->T128[] = array(212321);           //31 : [?]
            
$this->T128[] = array(232121);           //32 : [@]
            
$this->T128[] = array(111323);           //33 : [A]
            
$this->T128[] = array(131123);           //34 : [B]
            
$this->T128[] = array(131321);           //35 : [C]
            
$this->T128[] = array(112313);           //36 : [D]
            
$this->T128[] = array(132113);           //37 : [E]
            
$this->T128[] = array(132311);           //38 : [F]
            
$this->T128[] = array(211313);           //39 : [G]
            
$this->T128[] = array(231113);           //40 : [H]
            
$this->T128[] = array(231311);           //41 : [I]
            
$this->T128[] = array(112133);           //42 : [J]
            
$this->T128[] = array(112331);           //43 : [K]
            
$this->T128[] = array(132131);           //44 : [L]
            
$this->T128[] = array(113123);           //45 : [M]
            
$this->T128[] = array(113321);           //46 : [N]
            
$this->T128[] = array(133121);           //47 : [O]
            
$this->T128[] = array(313121);           //48 : [P]
            
$this->T128[] = array(211331);           //49 : [Q]
            
$this->T128[] = array(231131);           //50 : [R]
            
$this->T128[] = array(213113);           //51 : [S]
            
$this->T128[] = array(213311);           //52 : [T]
            
$this->T128[] = array(213131);           //53 : [U]
            
$this->T128[] = array(311123);           //54 : [V]
            
$this->T128[] = array(311321);           //55 : [W]
            
$this->T128[] = array(331121);           //56 : [X]
            
$this->T128[] = array(312113);           //57 : [Y]
            
$this->T128[] = array(312311);           //58 : [Z]
            
$this->T128[] = array(332111);           //59 : [[]
            
$this->T128[] = array(314111);           //60 : [\]
            
$this->T128[] = array(221411);           //61 : []]
            
$this->T128[] = array(431111);           //62 : [^]
            
$this->T128[] = array(111224);           //63 : [_]
            
$this->T128[] = array(111422);           //64 : [`]
            
$this->T128[] = array(121124);           //65 : [a]
            
$this->T128[] = array(121421);           //66 : [b]
            
$this->T128[] = array(141122);           //67 : [c]
            
$this->T128[] = array(141221);           //68 : [d]
            
$this->T128[] = array(112214);           //69 : [e]
            
$this->T128[] = array(112412);           //70 : [f]
            
$this->T128[] = array(122114);           //71 : [g]
            
$this->T128[] = array(122411);           //72 : [h]
            
$this->T128[] = array(142112);           //73 : [i]
            
$this->T128[] = array(142211);           //74 : [j]
            
$this->T128[] = array(241211);           //75 : [k]
            
$this->T128[] = array(221114);           //76 : [l]
            
$this->T128[] = array(413111);           //77 : [m]
            
$this->T128[] = array(241112);           //78 : [n]
            
$this->T128[] = array(134111);           //79 : [o]
            
$this->T128[] = array(111242);           //80 : [p]
            
$this->T128[] = array(121142);           //81 : [q]
            
$this->T128[] = array(121241);           //82 : [r]
            
$this->T128[] = array(114212);           //83 : [s]
            
$this->T128[] = array(124112);           //84 : [t]
            
$this->T128[] = array(124211);           //85 : [u]
            
$this->T128[] = array(411212);           //86 : [v]
            
$this->T128[] = array(421112);           //87 : [w]
            
$this->T128[] = array(421211);           //88 : [x]
            
$this->T128[] = array(212141);           //89 : [y]
            
$this->T128[] = array(214121);           //90 : [z]
            
$this->T128[] = array(412121);           //91 : [{]
            
$this->T128[] = array(111143);           //92 : [|]
            
$this->T128[] = array(111341);           //93 : [}]
            
$this->T128[] = array(131141);           //94 : [~]
            
$this->T128[] = array(114113);           //95 : [DEL]
            
$this->T128[] = array(114311);           //96 : [FNC3]
            
$this->T128[] = array(411113);           //97 : [FNC2]
            
$this->T128[] = array(411311);           //98 : [SHIFT]
            
$this->T128[] = array(113141);           //99 : [Cswap]
            
$this->T128[] = array(114131);           //100 : [Bswap]
            
$this->T128[] = array(311141);           //101 : [Aswap]
            
$this->T128[] = array(411131);           //102 : [FNC1]
            
$this->T128[] = array(211412);           //103 : [Astart]
            
$this->T128[] = array(211214);           //104 : [Bstart]
            
$this->T128[] = array(211232);           //105 : [Cstart]
            
$this->T128[] = array(233111);           //106 : [STOP]
            
$this->T128[] = array(21);                       //107 : [END BAR]
            
            
for ($i 32$i <= 95$i++) {                                            // jeux de caractères
                
$this->ABCset .= chr($i);
            }
            
$this->Aset $this->ABCset;
            
$this->Bset $this->ABCset;
            
            for (
$i 0$i <= 31$i++) {
                
$this->ABCset .= chr($i);
                
$this->Aset .= chr($i);
            }
            for (
$i 96$i <= 127$i++) {
                
$this->ABCset .= chr($i);
                
$this->Bset .= chr($i);
            }
            for (
$i 200$i <= 210$i++) {                                           // controle 128
                
$this->ABCset .= chr($i);
                
$this->Aset .= chr($i);
                
$this->Bset .= chr($i);
            }
            
$this->Cset="0123456789".chr(206);
            
            for (
$i=0$i<96$i++) {                                                   // convertisseurs des jeux A & B
                
@$this->SetFrom["A"] .= chr($i);
                @
$this->SetFrom["B"] .= chr($i 32);
                @
$this->SetTo["A"] .= chr(($i 32) ? $i+64 $i-32);
                @
$this->SetTo["B"] .= chr($i);
            }
            for (
$i=96$i<107$i++) {                                                 // contrôle des jeux A & B
                
@$this->SetFrom["A"] .= chr($i 104);
                @
$this->SetFrom["B"] .= chr($i 104);
                @
$this->SetTo["A"] .= chr($i);
                @
$this->SetTo["B"] .= chr($i);
            }
            
        }
        
        function 
i25($xpos$ypos$code$basewidth=0.8$height=8){
        
            
$wide $basewidth;
            
$narrow $basewidth ;
        
            
// wide/narrow codes for the digits
            
$barChar['0'] = 'nnwwn';
            
$barChar['1'] = 'wnnnw';
            
$barChar['2'] = 'nwnnw';
            
$barChar['3'] = 'wwnnn';
            
$barChar['4'] = 'nnwnw';
            
$barChar['5'] = 'wnwnn';
            
$barChar['6'] = 'nwwnn';
            
$barChar['7'] = 'nnnww';
            
$barChar['8'] = 'wnnwn';
            
$barChar['9'] = 'nwnwn';
            
$barChar['A'] = 'nn';
            
$barChar['Z'] = 'wn';
        
            
// add leading zero if code-length is odd
            
if(strlen($code) % != 0){
                
$code '0' $code;
            }
        
            
$this->SetFont('Arial','',10);
            
$this->Text($xpos+10$ypos $height 4$code);
            
$this->SetFillColor(0);
        
            
// add start and stop codes
            
$code 'AA'.strtolower($code).'ZA';
        
            for(
$i=0$i<strlen($code); $i=$i+2){
                
// choose next pair of digits
                
$charBar $code[$i];
                
$charSpace $code[$i+1];
                
// check whether it is a valid digit
                
if(!isset($barChar[$charBar])){
                    
$this->Error('Invalid character in barcode: '.$charBar);
                }
                if(!isset(
$barChar[$charSpace])){
                    
$this->Error('Invalid character in barcode: '.$charSpace);
                }
                
// create a wide/narrow-sequence (first digit=bars, second digit=spaces)
                
$seq '';
                for(
$s=0$s<strlen($barChar[$charBar]); $s++){
                    
$seq .= $barChar[$charBar][$s] . $barChar[$charSpace][$s];
                }
                for(
$bar=0$bar<strlen($seq); $bar++){
                    
// set lineWidth depending on value
                    
if($seq[$bar] == 'n'){
                        
$lineWidth $narrow;
                    }else{
                        
$lineWidth $wide;
                    }
                    
// draw every second value, because the second digit of the pair is represented by the spaces
                    
if($bar == 0){
                        
$this->Rect($xpos$ypos$lineWidth$height'F');
                    }
                    
$xpos += $lineWidth;
                }
            }
        }
        
        public function 
Code128($x$y$code$w$h) {
            
$Aguid "";                                                                      // Création des guides de choix ABC
            
$Bguid "";
            
$Cguid "";
            for (
$i=0$i strlen($code); $i++) {
                
$needle substr($code,$i,1);
                
$Aguid .= ((strpos($this->Aset,$needle)===false) ? "N" "O");
                
$Bguid .= ((strpos($this->Bset,$needle)===false) ? "N" "O");
                
$Cguid .= ((strpos($this->Cset,$needle)===false) ? "N" "O");
            }
        
            
$SminiC "OOOO";
            
$IminiC 4;
        
            
$crypt "";
            while (
$code "") {
                
// BOUCLE PRINCIPALE DE CODAGE
                
$i strpos($Cguid,$SminiC);                                                // forçage du jeu C, si possible
                
if ($i!==false) {
                    
$Aguid [$i] = "N";
                    
$Bguid [$i] = "N";
                }
        
                if (
substr($Cguid,0,$IminiC) == $SminiC) {                                  // jeu C
                    
$crypt .= chr(($crypt "") ? $this->JSwap["C"] : $this->JStart["C"]);  // début Cstart, sinon Cswap
                    
$made strpos($Cguid,"N");                                             // étendu du set C
                    
if ($made === false) {
                        
$made strlen($Cguid);
                    }
                    if (
fmod($made,2)==1) {
                        
$made--;                                                            // seulement un nombre pair
                    
}
                    for (
$i=0$i $made$i += 2) {
                        
$crypt .= chr(strval(substr($code,$i,2)));                          // conversion 2 par 2
                    
}
                    
$jeu "C";
                } else {
                    
$madeA strpos($Aguid,"N");                                            // étendu du set A
                    
if ($madeA === false) {
                        
$madeA strlen($Aguid);
                    }
                    
$madeB strpos($Bguid,"N");                                            // étendu du set B
                    
if ($madeB === false) {
                        
$madeB strlen($Bguid);
                    }
                    
$made = (($madeA $madeB) ? $madeB $madeA );                         // étendu traitée
                    
$jeu = (($madeA $madeB) ? "B" "A" );                                // Jeu en cours
        
                    
$crypt .= chr(($crypt "") ? $this->JSwap[$jeu] : $this->JStart[$jeu]); // début start, sinon swap
        
                    
$crypt .= strtr(substr($code0,$made), $this->SetFrom[$jeu], $this->SetTo[$jeu]); // conversion selon jeu
        
                
}
                
$code substr($code,$made);                                           // raccourcir légende et guides de la zone traitée
                
$Aguid substr($Aguid,$made);
                
$Bguid substr($Bguid,$made);
                
$Cguid substr($Cguid,$made);
            }                                                                          
// FIN BOUCLE PRINCIPALE
        
            
$check ord($crypt[0]);                                                   // calcul de la somme de contrôle
            
for ($i=0$i<strlen($crypt); $i++) {
                
$check += (ord($crypt[$i]) * $i);
            }
            
$check %= 103;
        
            
$crypt .= chr($check) . chr(106) . chr(107);                               // Chaine cryptée complète
        
            
$i = (strlen($crypt) * 11) - 8;                                            // calcul de la largeur du module
            
$modul $w/$i;
        
            for (
$i=0$i<strlen($crypt); $i++) {                                      // BOUCLE D'IMPRESSION
                
$c $this->T128[ord($crypt[$i])];
                for (
$j=0$j<count($c); $j++) {
                    
$this->Rect($x,$y,$c[$j]*$modul,$h,"F");
                    
$x += ($c[$j++]+$c[$j])*$modul;
                }
            }
        }
        
// El encabezado del PDF
        
public function Header(){
            
$this->Cell(85);
            
$this->Ln(9);
            
$this->SetFont('Helvetica','B',8);
            
$this->Cell(108,5,'',0,0,'R');
       }
       
// El pie del pdf
       
public function Footer(){
           
$this->SetY(-15);
          
$this->SetFont('Helvetica''B'12);
    
//       $this->Cell(0,10,'Pagina '.$this->PageNo().'/{nb}',0,0,'C');
      
}
    }
?>;

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ Read-Only ]

:: Make Dir ::
 
[ Read-Only ]
:: Make File ::
 
[ Read-Only ]

:: Go Dir ::
 
:: Go File ::
 

--[ c99shell v. 2.0 [PHP 7 Update] [25.02.2019] maintained by KaizenLouie | C99Shell Github | Generation time: 0.0077 ]--