!C99Shell v. 2.1 [PHP 8 Update] [02.02.2022]!

Software: Apache/2.4.53 (Unix) OpenSSL/1.1.1o PHP/7.4.29 mod_perl/2.0.12 Perl/v5.34.1. PHP/7.4.29 

uname -a: Linux vps-2738122-x 4.15.0-213-generic #224-Ubuntu SMP Mon Jun 19 13:30:12 UTC 2023 x86_64 

uid=1(daemon) gid=1(daemon) grupos=1(daemon) 

Safe-mode: OFF (not secure)

/opt/apex_tdfonline/php/3ros/impresion/barcode/   drwxr-xr-x
Free 14.73 GB of 61.93 GB (23.78%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


Viewing file:     int25.php (5.48 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php
/* vim: set expandtab tabstop=4 softtabstop=4 shiftwidth=4: */
//
// +----------------------------------------------------------------------+
// | PHP version 4.0                                                      |
// +----------------------------------------------------------------------+
// | Copyright (c) 1997-2001 The PHP Group                                |
// +----------------------------------------------------------------------+
// | This source file is subject to version 3.0 of the PHP license,       |
// | that is bundled with this package in the file LICENSE, and is        |
// | available at through the world-wide-web at                           |
// | http://www.php.net/license/3_0.txt.                                  |
// | If you did not receive a copy of the PHP license and are unable to   |
// | obtain it through the world-wide-web, please send a note to          |
// | license@php.net so we can mail you a copy immediately.               |
// +----------------------------------------------------------------------+
// | Author: Marcelo Subtil Marcal <jason@unleashed.com.br>               |
// +----------------------------------------------------------------------+
//
// $Id: int25.php 361 2004-09-22 21:25:53Z seba $
//


/**
 * Class to create a Interleaved 2 of 5 barcode
 *
 * @author Marcelo Subtil Marcal <jason@conectiva.com.br>
 */

class Image_Barcode_int25
{
    
/**
     * Barcode type
     * @var string
     */
    
var $_type 'int25';

    
/**
     * Barcode height
     *
     * @var integer
     */
    
var $_barcodeheight 50;

    
/**
     * Bar thin width
     *
     * @var integer
     */
    
var $_barthinwidth 1;

    
/**
     * Bar thick width
     *
     * @var integer
     */
    
var $_barthickwidth 3;

    
/**
     * Coding map
     * @var array
     */
    
var $_coding_map = array(
           
'0' => '00110',
           
'1' => '10001',
           
'2' => '01001',
           
'3' => '11000',
           
'4' => '00101',
           
'5' => '10100',
           
'6' => '01100',
           
'7' => '00011',
           
'8' => '10010',
           
'9' => '01010'
        
);

    function 
draw($text$imgtype 'png'$archivo)
    {

        
$text trim($text);

        if (!
preg_match("/[0-9]/",$text)) return;

        
// if odd $text lenght adds a '0' at string beginning
        
$text strlen($text) % '0' $text $text;

        
// Calculate the barcode width
        
$barcodewidth = (strlen($text)) * ($this->_barthinwidth $this->_barthickwidth) +
            (
strlen($text)) * 2.5 +
            (
$this->_barthinwidth $this->_barthickwidth) + 3;

        
// Create the image
        
$img ImageCreate($barcodewidth$this->_barcodeheight);

        
// Alocate the black and white colors
        
$black ImageColorAllocate($img000);
        
$white ImageColorAllocate($img255255255);

        
// Fill image with white color
        
imagefill($img00$white);

        
// Initiate x position
        
$xpos 0;

        
// Draws the leader
        
for ($i=0$i 2$i++) {
            
$elementwidth $this->_barthinwidth;
            
imagefilledrectangle($img$xpos0$xpos $elementwidth 1$this->_barcodeheight$black);
            
$xpos += $elementwidth;
            
$xpos += $this->_barthinwidth;
            
$xpos ++;
        }

        
// Draw $text contents
        
for ($idx 0$idx strlen($text); $idx += 2) {       // Draw 2 chars at a time
            
$oddchar  substr($text$idx1);                 // get odd char
            
$evenchar substr($text$idx 11);             // get even char

            // interleave
            
for ($baridx 0$baridx 5$baridx++) {

                
// Draws odd char corresponding bar (black)
                
$elementwidth = (substr($this->_coding_map[$oddchar], $baridx1)) ?  $this->_barthickwidth $this->_barthinwidth;
                
imagefilledrectangle($img$xpos0$xpos $elementwidth 1$this->_barcodeheight$black);
                
$xpos += $elementwidth;

                
// Left enought space to draw even char (white)
                
$elementwidth = (substr($this->_coding_map[$evenchar], $baridx1)) ?  $this->_barthickwidth $this->_barthinwidth;
                
$xpos += $elementwidth
                
$xpos ++;
            }
        }


        
// Draws the trailer
        
$elementwidth $this->_barthickwidth;
        
imagefilledrectangle($img$xpos0$xpos $elementwidth 1$this->_barcodeheight$black);
        
$xpos += $elementwidth;
        
$xpos += $this->_barthinwidth;
        
$xpos ++;
        
$elementwidth $this->_barthinwidth;
        
imagefilledrectangle($img$xpos0$xpos $elementwidth 1$this->_barcodeheight$black);

        
// Send image to browser
        
switch($imgtype) {

            case 
'gif':
//                header("Content-type: image/gif");
                
imagegif($img$archivo);
                
imagedestroy($img);
            break;

            case 
'jpg':
//                header("Content-type: image/jpg");
                
imagejpeg($img$archivo);
                
imagedestroy($img);
            break;

            default:
//                header("Content-type: image/png");
                
imagepng($img$archivo);
                
imagedestroy($img);
            break;

        }
        return;

    } 
// function create

// class

?>

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ Read-Only ]

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

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

--[ c99shell v. 2.1 [PHP 8 Update] [02.02.2022] maintained byC99Shell Github | Generation time: 0.8298 ]--