!C99Shell v. 1.0 pre-release build #13!

Software: Apache. PHP/5.5.15 

uname -a: Windows NT SVR-DMZ 6.1 build 7600 (Windows Server 2008 R2 Enterprise Edition) i586 

SYSTEM 

Safe-mode: OFF (not secure)

C:\dmz\php\pear\Image\Barcode\   drwxrwxrwx
Free 4.13 GB of 39.52 GB (10.45%)
Detected drives: [ a ] [ c ] [ d ] [ e ] [ f ]
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.11 KB)      -rw-rw-rw-
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php
/* vim: set expandtab tabstop=4 softtabstop=4 shiftwidth=4: */

/**
 * Image_Barcode_int25 class
 *
 * Renders Interleaved 2 of 5 barcodes
 *
 * PHP versions 4
 *
 * LICENSE: This source file is subject to version 3.0 of the PHP license
 * that is available through the world-wide-web at the following URI:
 * 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 web, please
 * send a note to license@php.net so we can mail you a copy immediately.
 *
 * @category   Image
 * @package    Image_Barcode
 * @author     Marcelo Subtil Marcal <msmarcal@php.net>
 * @copyright  2005 The PHP Group
 * @license    http://www.php.net/license/3_0.txt  PHP License 3.0
 * @version    CVS: $Id$
 * @link       http://pear.php.net/package/Image_Barcode
 */

require_once "PEAR.php";
require_once 
"Image/Barcode.php";


/**
 * Image_Barcode_int25 class
 *
 * Package which provides a method to create Interleaved 2 of 5 barcode using GD library.
 *
 * @category   Image
 * @package    Image_Barcode
 * @author     Marcelo Subtil Marcal <msmarcal@php.net>
 * @copyright  2005 The PHP Group
 * @license    http://www.php.net/license/3_0.txt  PHP License 3.0
 * @version    Release: @package_version@
 * @link       http://pear.php.net/package/Image_Barcode
 */
class Image_Barcode_int25 extends Image_Barcode
{
    
/**
     * 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'
        
);

    
/**
     * Draws a Interleaved 2 of 5 image barcode
     *
     * @param  string $text     A text that should be in the image barcode
     * @param  string $imgtype  The image type that will be generated
     *
     * @return image            The corresponding Interleaved 2 of 5 image barcode
     *
     * @access public
     *
     * @author Marcelo Subtil Marcal <msmarcal@php.net>
     * @since  Image_Barcode 0.3
     */

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

        
$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);

        return 
$img;
    } 
// function create

// class
?>

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ ok ]

:: Make Dir ::
 
[ ok ]
:: Make File ::
 
[ ok ]

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

--[ c99shell v. 1.0 pre-release build #13 powered by Captain Crunch Security Team | http://ccteam.ru | Generation time: 0.0156 ]--