!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\Text\Wiki\Render\   drwxrwxrwx
Free 4.11 GB of 39.52 GB (10.39%)
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:     Latex.php (2.37 KB)      -rw-rw-rw-
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php

/**

* Formats parsed Text_Wiki for LaTeX rendering.

* $Id: Latex.php 169211 2004-09-25 19:05:14Z pmjones $

* @author Jeremy Cowgar <jeremy@cowgar.com>

* @package Text_Wiki

* @todo [http://google.com] becomes 1 with a LaTeX footnote in subscript.
*       This should be a normal LaTeX footnote associated with the
*       previous word?

* @todo parse "..." to be ``...''

* @todo parse '...' to be `...'

* @todo move escape_latex to a static function, move escaping to the
*       individual .php files they are associated with

* @todo allow the user to add conf items to do things like
*       + A custom document header
*       + Custom page headings
*       + Include packages
*       + Set Title, Author, Date
*       + Include a title page
*       + Not output Document Head/Foot (maybe combinding many pages?)

*/

class Text_Wiki_Render_Latex extends Text_Wiki_Render {
    function 
escape_latex ($txt) {
        
$txt str_replace("\\""\\\\"$txt);
        
$txt str_replace('#''\#'$txt);
        
$txt str_replace('$''\$'$txt);
        
$txt str_replace('%''\%'$txt);
        
$txt str_replace('^''\^'$txt);
        
$txt str_replace('&''\&'$txt);
        
$txt str_replace('_''\_'$txt);
        
$txt str_replace('{''\{'$txt);
        
$txt str_replace('}''\}'$txt);
        
        
// Typeset things a bit prettier than normas
        
$txt str_replace('~',   '$\sim$'$txt);
        
$txt str_replace('...''\ldots'$txt);

        return 
$txt;
    }

    function 
escape($tok$ele) {
        if (isset(
$tok[$ele])) {
            
$tok[$ele] = $this->escape_latex($tok[$ele]);
        }

        return 
$tok;
    }
    
    function 
pre()
    {
        foreach (
$this->wiki->tokens as $k => $tok) {
            if (
$tok[0] == 'Code') {
                continue;
            }

            
$tok[1] = $this->escape($tok[1], 'text');
            
$tok[1] = $this->escape($tok[1], 'page');
            
$tok[1] = $this->escape($tok[1], 'href');
            
            
$this->wiki->tokens[$k] = $tok;
        }

        
$this->wiki->source $this->escape_latex($this->wiki->source);

        return
            
"\\documentclass{article}\n".
            
"\\usepackage{ulem}\n".
            
"\\pagestyle{headings}\n".
            
"\\begin{document}\n";
    }
    
    function 
post()
    {
        return 
"\\end{document}\n";
    }
    
}
?>

:: 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 ]--