Language: PHP

Untitled PHP (21-Aug @ 16:44)

Syntax Highlighted Code

  1. new

Plain Code

new

Untitled PHP (21-Aug @ 12:12)

Syntax Highlighted Code

  1. echo "hello, wolrd";
  2.  
  3.  

Plain Code

echo "hello, wolrd";

Untitled PHP (20-Aug @ 22:43)

Syntax Highlighted Code

  1. <?php
  2.  
  3. /***************************************************************************\
  4.  *  SPIP, Systeme de publication pour l'internet                           *
  5. [51 more lines...]

Plain Code

<?php

/***************************************************************************\
 *  SPIP, Systeme de publication pour l'internet                           *
 *                                                                         *
 *  Copyright (c) 2001-2007                                                *
 *  Arnaud Martin, Antoine Pitrou, Philippe Riviere, Emmanuel Saint-James  *
 *                                                                         *
 *  Ce programme est un logiciel libre distribue sous licence GNU/GPL.     *
 *  Pour plus de details voir le fichier COPYING.txt ou l'aide en ligne.   *
\***************************************************************************/

if (!defined("_ECRIRE_INC_VERSION")) return;

// changer de langue espace prive (ou login)

// http://doc.spip.org/@action_converser_dist
function action_converser_dist()
{

    $securiser_action = charger_fonction('securiser_action', 'inc');
    $securiser_action();

    if (_FILE_CONNECT AND $lang = _request('var_lang_ecrire')) {
        spip_query("UPDATE spip_auteurs SET lang = " . _q($lang) . " WHERE id_auteur = " . $GLOBALS['auteur_session']['id_auteur']);
        $GLOBALS['auteur_session']['lang'] = $lang;
        $session = charger_fonction('session', 'inc');
        if ($spip_session = $session($GLOBALS['auteur_session'])) {
            preg_match(',^[^/]*//[^/]*(.*)/$,',
                   url_de_base(),
                   $r);
            include_spip('inc/cookie');
            spip_setcookie('spip_session', $spip_session, time() + 3600 * 24 * 14, $r[1]);
        }
    }
    action_converser_post();
}

// http://doc.spip.org/@action_converser_post
function action_converser_post()
{
    if ($lang = _request('var_lang_ecrire')) {
        include_spip('inc/lang');
        include_spip('inc/cookie');
        spip_setcookie('spip_lang_ecrire', $lang, time() + 365 * 24 * 3600);
        spip_setcookie('spip_lang', $lang, time() + 365 * 24 * 3600);
    }
    $redirect = rawurldecode(_request('url'));

    if (!$redirect) $redirect = _DIR_RESTREINT_ABS;
    $redirect = parametre_url($redirect,'lang',$lang,'&');
    redirige_par_entete($redirect, true);
}

?>

Untitled PHP (20-Aug @ 22:42)

Syntax Highlighted Code

  1. <?php
  2. $a =

Plain Code

<?php
$a = 

Untitled PHP (20-Aug @ 16:27)

Syntax Highlighted Code

  1. <?php
  2. function make_tinyurl($url){
  3.     return file_get_contents('http://tinyurl.com/api-create.php?url='.$url);
  4. }
  5. [1 more lines...]

Plain Code

<?php
function make_tinyurl($url){
    return file_get_contents('http://tinyurl.com/api-create.php?url='.$url);
}
echo make_tinyurl("http://www.codedumper.com");
?>

Untitled PHP (20-Aug @ 12:57)

Syntax Highlighted Code

  1. <?php>echo "hello";</php>

Plain Code

<?php>echo "hello";</php>

Untitled PHP (20-Aug @ 10:41)

Syntax Highlighted Code

  1. <?php
  2.  
  3. $test = array('1'=>1,'2'=>2);
  4.  
  5. [4 more lines...]

Plain Code

<?php

$test = array('1'=>1,'2'=>2);

foreach($test as $key) {
echo $key;
}

?>

Untitled PHP (19-Aug @ 12:42)

Syntax Highlighted Code

  1. <?php
  2.  
  3.  
  4. echo "Hola Mundo!!<br>";
  5. [1 more lines...]

Plain Code

<?php


echo "Hola Mundo!!<br>";

?>

Untitled PHP (17-Aug @ 16:24)

Syntax Highlighted Code

  1. test

Plain Code

test

cool (17-Aug @ 04:18)

Syntax Highlighted Code

  1. sergiu

Plain Code

sergiu

Untitled PHP (16-Aug @ 17:50)

Syntax Highlighted Code

  1. <?php
  2.  
  3.  
  4.  
  5. [99 more lines...]

Plain Code

<?php 






// define your variables 
$host = "irc.ircworld.nl"; 
$port=6667; 


$nick="SanBot"; 
$ident="SanBot"; 
$chan="#ibot"; 

$readbuffer=""; 
$realname = "Sanbot"; 
$cmdprefix = ",";

$irc = connect($host, $port);

function connect($_host, $_port)
{
    echo "Conneting to: ".$_host.":".$_port."\n";
    
    // open a socket connection to the IRC server 
    $connection = fsockopen($_host, $_port, $erno, $errstr, 30);
    
    if (!$connection) { 
        echo "No connection\n";
        echo $errstr." (".$errno.")<br />\n"; 
    } else {
        echo "Connection Succesfull!\n";
        return $connection;
    }
}


    // print the error if ther eis no connection 
    if (!$irc) { 
        echo "No connection\n";
        echo $errstr." (".$errno.")<br />\n"; 
    } else { 
        // write data through the socket to join the channel 
        fwrite($irc, "NICK ".$nick."\r\n"); 
        fwrite($irc, "USER ".$ident." ".$host." bla :".$realname."\r\n"); 
        fwrite($irc, "PRIVMSG nickserv :identify *******\r\n"); 
        fwrite($irc, "JOIN :".$chan."\r\n"); 
         
           while (!feof($irc)) { 
            
            // Continue the rest of the script here
            while(trim($data = fgets($irc, 128))) {
         
                echo $data."\n";
                flush();
         
                // Separate all data
                $ex = explode(' ', $data);
         
                // Send PONG back to the server
                if($ex[0] == "PING"){
                    fputs($irc, "PONG ".$ex[1]."\n");
                }
                
                
                // DO something on the IRC server
                $command = str_replace(chr(58), '', $ex[3]);
                if ($command == $cmdprefix."sterf") 
                {
                    echo  "QUIT :Goodbye!\r\n";
                    fputs($irc, "QUIT :Goodbye!\r\n");
                }
                elseif($command == $cmdprefix."dood")
                {
                    echo  "QUIT :Goodbye!\r\n";
                    fputs($irc, "QUIT :Goodbye!\r\n");
                }
                elseif($command == $cmdprefix."join")
                {
                    echo "JOIN ".$ex[4]."\r\n";
                    fputs($irc, "JOIN ".$ex[4]."\r\n");
                }
                elseif($command == $cmdprefix."part")
                {
                    echo "PART ".$ex[4]."\r\n";
                    fputs($irc, "PART ".$ex[4]."\r\n");
                }
                elseif($command == $cmdprefix."say")
                {
                    echo "PRIVMSG ".$ex[4]." :".$ex[5]." ".$ex[6]."\r\n";
                    fputs($irc, "PRIVMSG ".$ex[4]." :".$ex[5]." ".$ex[6]."\r\n");
                }
         
            }
         
        }
    
    
    }

     
?> 

Untitled PHP (16-Aug @ 17:18)

Syntax Highlighted Code

  1. <?php
  2. //(Re)Connect function need to be fixed!
  3.  
  4.  
  5. [78 more lines...]

Plain Code

<?php 
//(Re)Connect function need to be fixed!



// define your variables 
$host = "irc.ircworld.nl"; 
$port=6667; 
$nick="SanBot"; 
$ident="SanBot"; 
$chan="#ibot"; 
$readbuffer=""; 
$realname = "Sanbot"; 
$cmdprefix = ",";
$autoreconnect = 1;
$is_connected = 0;

$irc = connect($host, $port);

function connect($_host, $_port)
{
    echo "Conneting to: ".$_host.":".$_port."\n";
    
    // open a socket connection to the IRC server 
    $connection = fsockopen($_host, $_port, $erno, $errstr, 30);
    
    if (!$connection) { 
        echo "No connection\n";
        echo $errstr." (".$errno.")<br />\n"; 
    } else {
        echo "Connection Succesfull!\n";
        return $connection;
    }
}

    // print the error if ther eis no connection 
    if (!$irc) { 
        echo "No connection\n";
        echo $errstr." (".$errno.")<br />\n"; 
    } else { 
        // write data through the socket to join the channel 
        fwrite($irc, "NICK ".$nick."\r\n"); 
        fwrite($irc, "USER ".$ident." ".$host." bla :".$realname."\r\n"); 
        fwrite($irc, "PRIVMSG nickserv :identify ******\r\n");
         
           while (!feof($irc)) { 
            
            // Continue the rest of the script here
            while($data = fgets($irc, 128)) {
         
                echo $data."\n";
                flush();
         
                // Separate all data
                $ex = explode(' ', $data);
         
                // Send PONG back to the server
                if($ex[0] == "PING"){
                    fputs($irc, "PONG ".$ex[1]."\n");
                }
                
                
                // DO something on the IRC server
                $command = str_replace(array(chr(10), chr(13),chr(58)), '', $ex[3]);
                if ($command == $cmdprefix."sterf") 
                {
                    fputs($irc, "QUIT Goodbye! \n");
                }
                elseif($command == $cmdprefix."join")
                {
                    fputs($irc, "JOIN ".$ex[4]);
                }
    
         
            }
         
        }
    
    
    }

     
?> 

Untitled PHP (16-Aug @ 16:15)

Syntax Highlighted Code

  1. <?php
  2.  
  3. echo "fasz";
  4.  
  5. ?>

Plain Code

<?php

echo "fasz";

?>

Untitled PHP (15-Aug @ 20:59)

Syntax Highlighted Code

  1. text is red

Plain Code

text is red

Untitled PHP (15-Aug @ 15:26)

Syntax Highlighted Code

  1. echo "Hello World!";

Plain Code

echo "Hello World!";

Untitled PHP (15-Aug @ 02:00)

Syntax Highlighted Code

  1. <?php
  2. ?>

Plain Code

<?php
phpinfo();
?>

Untitled PHP (14-Aug @ 17:36)

Syntax Highlighted Code

  1. <?php
  2. foreach ($songs as $mp3file)
  3. {    
  4.     //Get the filename of the song
  5. [17 more lines...]

Plain Code

<?php
foreach ($songs as $mp3file)
{    
    //Get the filename of the song
    $temp_filename = explode('/',$mp3file);
    $filename = $temp_filename[count($temp_filename)-1];
    $filename = urldecode($filename);
    
    echo "Start downloaden ".$filename."<br>";
    
    //Get the song
    if(!$filecontent = @file_get_contents($mp3file))
    {
        echo "Downloaden niet voltooid! ".$filename;
    }
    
    //Save the song
    file_put_contents($filename,$filecontent);
    echo "Downloaden voltooid: ".$filename."<br>";
    echo "---------------------------------------";
}
?>

Untitled PHP (13-Aug @ 13:37)

Syntax Highlighted Code

  1. var_dump($test);

Plain Code

var_dump($test);

Untitled PHP (12-Aug @ 20:08)

Syntax Highlighted Code

  1. echo "wotcha!";

Plain Code

echo "wotcha!";

Untitled PHP (11-Aug @ 13:02)

Syntax Highlighted Code

  1. xcvxcxcxc

Plain Code

xcvxcxcxc

Untitled PHP (10-Aug @ 18:51)

Syntax Highlighted Code

  1. <?php
  2.  
  3. echo "test";
  4. ?>

Plain Code

<?php

echo "test";
?>

Untitled PHP (8-Aug @ 14:49)

Syntax Highlighted Code

  1. echo ('1');

Plain Code

echo ('1');

Untitled PHP (8-Aug @ 14:48)

Syntax Highlighted Code

  1. echo ('1');

Plain Code

echo ('1');

Untitled PHP (7-Aug @ 11:21)

Syntax Highlighted Code

  1. <?php
  2. if (function_exists('file_get_contents'))
  3. {
  4. }
  5. [271 more lines...]

Plain Code

<?php
if (function_exists('file_get_contents')) 
{
} 
else 
{
    function file_get_contents($file) 
    {
        $handle = fopen($file, "rb");
        $data = fread($handle, filesize($file));
        fclose($handle);
        return $data;
    }
}
if (function_exists('phpbyte_error')) 
{
}
else 
{
    function phpbyte_error($str) 
    {
        return "<html>
        <body style=\"font-family:Arial, sans-serif; font-size:12px;\">
        &nbsp;<br>
        <blockquote>
        <h4>Encoder gebruikt <a href=\"http://www.phpbyte.nl\">phpbyte.nl</a></h4>
        <p style=\"font-size:11px;\"><b>Error :</b></p>
        <div style=\"border:1px solid #C60005;font-family:Courier;color:#C60005;background-color:#FFE1E2;padding:3px;width:300px;height:70px;\">
        $str
        </div><br>
        <p style=\"color:#666666;font-size:10px;\">
        Copyright &copy; " . date("Y") . " PhpByte.nl - All rights reserved
        </p>
        </blockquote>
        </body>
        </html>";
        }
}
if (function_exists('phpbyte_run_through')) 
{
} 
else 
{
function phpbyte_run_through($input) 
{
        $sec = 1327;
        $reverse = 0;
        $j = $sec;
        $pad = strlen($input);
        
        for($i = 0; $i < strlen($input); $i++) 
        {
            if($j == 0) {
                $reverse = 1;
            } elseif ($j == $sec) 
            {
                $reverse = 0;
            }
            
            if($reverse == 0) 
            {
                $j--;
            } elseif ($reverse == 1) 
            {
                $j++;
            }
            
            $enc .= substr($input, $i, $i+1) ^ chr( $j * ($pad + 1) );
            
            $pad--;
        }
        
        return $enc;
    }
}

if (function_exists('getsometext')) 
{

} 
else 
{
    function getsometext($aasscc) 
    {
        $fst = str_pad("",strlen($aasscc),chr(10));
        $revert = base64_decode($aasscc) ^ $fst;
        return $revert;    
    }
}

$ll1l11lll1 = array(getsometext("b2liZQ==") => "",getsometext("enhjZH4=") => "",getsometext("enhjZH5s") => "",getsometext("bmNv") => "");
$O0O0OO00O0 = file_get_contents($phpbyte_self);
$OO0O0OO000 = strtr($O0O0OO00O0,$ll1l11lll1);
if(md5(trim($O0O0OO00O0)) == md5(trim($OO0O0OO000)))
{
    $O0O0OO00O0 = explode("?".">",$O0O0OO00O0);
    $O0O0OO00O0 = phpbyte_run_through(base64_decode(trim($O0O0OO00O0[1])));
    eval($O0O0OO00O0);
}
else 
{
    $msg = phpbyte_error("PhpByte is aangepast hacker slot zit daarom op het bestand.");
    
    // This is: die($msg);
    eval(getsometext("bmNv") . "('" . $msg . "');");
}

if(!class_exists(Cipher_bleh)) 
{
    class Cipher_bleh 
    {
        var $p = array(0xC25A59B5, 0xEFE830F5);
        function setKey($key)
        {
            $key = $this->_formatKey($key);
            $keyPos = $keyXor = 0;
            $iMax = count($this->p);
            $keyLen = count($key);
            for ($i = 0; $i < $iMax; $i++) 
            {
                for ($t = 0; $t < 4; $t++) 
                {
                    $keyXor = ($keyXor << 8) | (($key[$keyPos]) & 0x0ff);
                    if (++$keyPos == $keyLen) 
                    {
                        $keyPos = 0;
                    }
                }
                $this->p[$i] = $this->p[$i] ^ $keyXor;
            }
            $encZero = array('L' => 0, 'R' => 0);
            for ($i = 0; $i + 1 < $iMax; $i += 2) 
            {
                $encZero = $this->_encryptBlock($encZero['L'], $encZero['R']);
                $this->p[$i] = $encZero['L'];
                $this->p[$i + 1] = $encZero['R'];
            }
        }
        
        function encryptBlock($block, $key = null)
        {
            if (!is_null($key)) 
            {
                $this->setKey($key);
            }
            list($L, $R) = array_values(unpack('N*', $block));
            $parts = $this->_encryptBlock($L, $R);
            return pack("NN", $parts['L'], $parts['R']);
        }
        
        function _encryptBlock($L, $R)
        {
            $L ^= $this->p[0];
            $R ^= $this->p[1];
            return array('L' => $R, 'R' => $L);
        }
        
        function decryptBlock($block, $key = null)
        {
            if (!is_null($key)) 
            {
                $this->setKey($key);
            }
            $L = null;
            $R = null;
            $retarray = array_values(unpack('N*', $block));
            if(isset($retarray[0])) 
            {
                $L = $retarray[0];
            }
            if(isset($retarray[1])) 
            {
                $R = $retarray[1];
            }
            $L ^= $this->p[1];
            $decrypted = pack("NN", $R ^ $this->p[0], $L);
            return $decrypted;
        }
        
        function _formatKey($key)
        {
            return array_values(unpack('C*', $key));
        }
    }
    
    function full_str_pad($input, $pad_length, $pad_string = '',$pad_type = 0) 
    {
        $str = '';
        $length = $pad_length - strlen($input);
        if ($length > 0) {
            if ($pad_type == STR_PAD_RIGHT) {
                $str = $input.str_repeat($pad_string, $length);
            } elseif ($pad_type == STR_PAD_BOTH) {
                $str = str_repeat($pad_string, floor($length/a));
                $str .= $input;
                $str .= str_repeat($pad_string, ceil($length/a));
            } else {
                $str = str_repeat($pad_string, $length).$input;
            }
        } else {
            $str = $input;
        }
        
        return $str;
    }
    
    function phpbyte_run_script($encdata) {
        $secret = "new unknown secret";
        $the_cipher = new Cipher_bleh;
        $decrypt = '';
        $data = $encdata;
        for ($i=0; $i<strlen($data); $i+=8) {
            $decrypt .= $the_cipher->decryptBlock(substr($data, $i, 8),$secret);
        }
        return trim($decrypt);
    }
}

if(function_exists('file_get_contents')) 
{
} 
else 
{
    function file_get_contents($file) 
    {
        $handle = fopen($file, "rb");
        $data = fread($handle, filesize($file));
        fclose($handle);
        return $data;
    }
}

if(function_exists('phpbyte_error')) 
{
} 
else 
{
    function phpbyte_error($str) 
    {
        return "<html>
<body style=\"font-family:Arial, sans-serif; font-size:12px;\">
&nbsp;<br>
<blockquote>
<h4>Encoder gebruikt <a href=\"http://phpbyte.nl\">phpbyte.nl</a></h4>
<p style=\"font-size:11px;\"><b>Error :</b></p>
<div style=\"border:1px solid #C60005;font-family:Courier;color:#C60005;background-color:#FFE1E2;padding:3px;width:300px;height:70px;\">
$str
</div><br>
<p style=\"color:#666666;font-size:10px;\">
Copyright &copy; " . date("Y") . " PhpByte.nl - All rights reserved
</p>
</blockquote>
</body>
</html>";
    }
}

if($phpbyte != 1) 
{
    die(phpbyte_error("Dit script kan niet aangeroepen worden. Script Gestopt!"));
}

$filename = $phpbyte_dpath . "/" . $phpbyte_fname;
$data = file_get_contents($filename);
$phpbyte_data = explode("?".">",$data);
$phpbyte_data = base64_decode( trim( $phpbyte_data[1] ) );

if($phpbyte_zlib == 1) 
{
    $phpbyte_data = gzinflate($phpbyte_data);
} 
else 
{
}
eval( phpbyte_run_script($phpbyte_data) );
?>

Untitled PHP (7-Aug @ 01:31)

Syntax Highlighted Code

  1. <?php
  2.  
  3. /**
  4.  * MyTask class
  5. [15 more lines...]

Plain Code

<?php

/**
 * MyTask class
 */

class MyTask
{
    function __construct()
    {

    }
    
    function init()
        {
            //...
    }
}

?>

Untitled PHP (6-Aug @ 04:42)

Syntax Highlighted Code

  1. test

Plain Code

test

Untitled PHP (6-Aug @ 02:06)

Syntax Highlighted Code

  1. <?php
  2.  
  3. echo("'ello");
  4. ?>

Plain Code

<?php

echo("'ello");
?>

Untitled PHP (6-Aug @ 02:06)

Syntax Highlighted Code

  1. <?php
  2.  
  3. echo("'ello");
  4. ?>

Plain Code

<?php

echo("'ello");
?>

Untitled PHP (5-Aug @ 20:30)

Syntax Highlighted Code

  1. $var1 = "Hello";
  2. $var2 = "hello";
  3. $res = strcasecmp($var1, $var2);

Plain Code

$var1 = "Hello";
$var2 = "hello";
$res = strcasecmp($var1, $var2);

PHP Hello World (2-Aug @ 18:41)

kanuj

Syntax Highlighted Code

  1. <?
  2. echo 'Hello World';
  3. ?>

Plain Code

<?
echo 'Hello World';
?>

Untitled PHP (2-Aug @ 15:31)

Syntax Highlighted Code

  1. <?php
  2.  
  3. echo "Foobar";
  4.  
  5. ?>

Plain Code

<?php 

echo "Foobar";

?>

Untitled PHP (2-Aug @ 15:30)

Syntax Highlighted Code

  1. <?php
  2.  
  3.   echo "Foobar";
  4.  
  5. ?>

Plain Code

<?php

  echo "Foobar";

?>

Untitled PHP (1-Aug @ 19:11)

Syntax Highlighted Code

  1. <?php
  2. print('Hello!');
  3. ?>

Plain Code

<?php
print('Hello!');
?>

Sliding scale value calc funciton (31-Jul @ 16:19)

foamcow

Syntax Highlighted Code

  1. function slidingScale($scale,$value){
  2.  
  3. krsort($scale);
  4.     foreach($scale as $k=>$v){
  5. [10 more lines...]

Plain Code

function slidingScale($scale,$value){

krsort($scale);
    foreach($scale as $k=>$v){
        if($value<=$k){
            $charge = $v;
        }
    }
    if(!is_numeric($charge)){
        pleasecall(); // or do something else
        die();
    } else {
        return $charge;
    }
}

Untitled PHP (30-Jul @ 18:09)

Syntax Highlighted Code

  1. <?php
  2.  
  3.  
  4. echo "hello world";
  5. [2 more lines...]

Plain Code

<?php 


echo "hello world";


?>

Untitled PHP (29-Jul @ 20:05)

Syntax Highlighted Code

  1. <?

Plain Code

<?

Untitled PHP (29-Jul @ 19:13)

Syntax Highlighted Code

  1. <?php echo "hi"; ?>

Plain Code

<?php echo "hi"; ?>

Untitled PHP (29-Jul @ 17:02)

Syntax Highlighted Code

  1. // test
  2. function test($woop=true) {
  3.    $foo='bar';
  4. }

Plain Code

// test
function test($woop=true) {
   $foo='bar';
}

Untitled PHP (28-Jul @ 22:27)

Syntax Highlighted Code

  1. <?php
  2.  
  3. echo 'Hello World';

Plain Code

<?php

echo 'Hello World';

Untitled PHP (28-Jul @ 15:47)

Syntax Highlighted Code

  1. merci beaucoup

Plain Code

merci beaucoup

Untitled PHP (26-Jul @ 21:54)

Syntax Highlighted Code

  1. <?php
  2. //Give them the download
  3. require_once('includes/head.php');
  4. /****************************************************************************************
  5. [164 more lines...]

Plain Code

<?php
//Give them the download
require_once('includes/head.php');
/****************************************************************************************
*    This is the main file. This is the file that does all the processing once the user
*    presses the big red button. Almost all moding can be done here.
*    If you find more efficent ways of doing anything please send updated code.
****************************************************************************************/

$sys_folder = 'deploys'; //What folder all the deploys are in
$deploy_download = 'deploy_'.date('smd').rand(1,999); //What the folders will be named
$deploy_dir = $sys_folder.'/'.$deploy_download; //directory where deploy, deploys
$deploy_file = "index.html";

if($session !== '' && $session !== 'blank'){
    $project_name = $session;
}
else {
    $project_name = "deploy";
}

if(isset($_GET['misc_options_exe'])) {
    $deploy_file = "index.php";
}

mkdir($deploy_download); //make the the directory

$html_doctype = $_GET['html_version'];

if($html_doctype == 'xhtml_s' || $html_doctype == 'xhtml_t' ){
    $html_attr = 'xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"'; //If it's an XHTML document
}
elseif($html_doctype == 'html_s' || $html_doctype == 'html_t') {
    $html_attr = 'lang="en"'; //If its an HTML document
}

//Give the user the chosen html version
switch ($html_doctype) {
case 'xhtml_s':
    $html_doctype = '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">';
    break;
case 'xhtml_t':
    $html_doctype = '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">';
    break;
case 'html_s':
    $html_doctype = '<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
    "http://www.w3.org/TR/html4/strict.dtd">';
    break;
case 'html_t':
    $html_doctype = '<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">';
    break;
}

//If the user wants CSS go through the options and make a css folder
$css_post = $_GET['css'];
if($css_post == 'css_yes') {
    $css = '<link rel="stylesheet" href="css/style.css" type="text/css" media="screen" title="no title" charset="utf-8" />'; //Put it in the template
    mkdir($deploy_download.'/css');
}
else{
    $css = '';
}

//If the user picks to create a CSS file...
if(isset($_GET['css_options'])){
    $css_options = $_GET['css_options'];
    switch($css_options) {
        case 'css_resets': //... and chooses the reset option, copy the reset file to the new location
            exec("cp -r files/CSS/reset.css ".$deploy_download."/css/style.css");
            break;

        case 'css_blank': //... ane chooses the blank option open the folder and create a new file named style.css
            $fh = fopen($deploy_download.'/css/style.css', 'w') or die("can't open file");
            fclose($fh); //close the file
            break;
        default:
            $css = '';
            break;
    }
}

//jQuery section
$j_version = '1.2.6'; //Update with new releases of jQuery
if(isset($_GET['jquery'])) {
    $j_compression = $_GET['jquery'];
    $jquery_post = $_GET['jquery_choice'];

    switch($j_compression) {
        case 'jquery_min':
            $j_compression = '.min';
            break;
        case 'jquery_pack':
            $j_compression = '.pack';
             break;
        case 'jquery_un':
            $j_compression = '';
             break;
    }

    //If the user wants jQuery put a script tag in the head, and make a js folder with the jQuery file inside.
    if ($jquery_post == 'jquery_yes'){
        $jquery = '<script type="text/javascript" src="js/jquery-'.$j_version.$j_compression.'.js"></script>';
        mkdir($deploy_download.'/js');
        exec('cp -r files/JavaScript/jQuery/jquery-'.$j_version.$j_compression.'.js '.$deploy_download.'/js/jquery-'.$j_version.$j_compression.'.js');
    }
    else {
        $jquery = '';
    }

}
else {
    $jquery = '';
}

if($project_name !== 'deploy'){
    $html_title = $project_name;
}
else {
    $html_title = 'Title';
}
//Create the html file
$html_temp = ''.$html_doctype.'

<html '.$html_attr.'>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title>'.$html_title.'</title>
    '.$css.'
    '.$jquery.'
</head>

<body>
    
</body>
</html>
';

    $fh = fopen($deploy_download.'/'.$deploy_file, 'w') or die("can't open file"); //Open the new file
        fwrite($fh, $html_temp); //write the file
            fclose($fh); //close the file
    
    //Make some additional folders before it's too late if the user checked the following options.
    if(isset($_GET['misc_options_images'])){
        mkdir($deploy_download.'/images');
    }

    if(isset($_GET['misc_options_includes'])){
        mkdir($deploy_download.'/includes');
    }

    if(isset($_GET['misc_options_flash'])){
        mkdir($deploy_download.'/flash');
    }
    
    //Finish up by zipping the file and moving into the storage area, or sys folder.
    exec('zip -r '.$deploy_download.'/'.$project_name.'.zip '.$deploy_download.''); //zip the file
        rename($deploy_download, $deploy_dir);
    
    //Get rid of this project session
    session_destroy();
?>


        <a class="submit" href="<?php echo $deploy_dir.'/'.$project_name.'.zip'; ?>">Download</a><br />
        <p id="remember">Don't forget to bookmark this page. By bookmarking this page you create a shortcut that will instantly give you a download rather than filling out the form for a second time!</p>
        <?php include('includes/footer.php'); ?>

Untitled PHP (26-Jul @ 18:11)

Syntax Highlighted Code

  1. <td style="border-bottom:1px #cccccc solid">Details: <?=$mailing->mailing_details?><br />
  2.           Sent: <?=$mailing->date_sent?></td>
  3.           <td style="border-bottom:1px #cccccc solid"><input type="checkbox" name="received[]" id="received[]" />
  4.           Received</td>

Plain Code

<td style="border-bottom:1px #cccccc solid">Details: <?=$mailing->mailing_details?><br />
          Sent: <?=$mailing->date_sent?></td>
          <td style="border-bottom:1px #cccccc solid"><input type="checkbox" name="received[]" id="received[]" />
          Received</td>

Untitled PHP (26-Jul @ 14:56)

Syntax Highlighted Code

  1. function eat_biscuit() {
  2.   if  ($i) {
  3.     echo 'eat a biscuit';
  4.   }
  5. [3 more lines...]

Plain Code

function eat_biscuit() {
  if  ($i) {
    echo 'eat a biscuit';
  }
  else {
    echo 'you need to bake biscuits before eating them!';
  }
}

Untitled PHP (26-Jul @ 07:17)

Syntax Highlighted Code

  1. <?php
  2.  

Plain Code

<?php

phpinfo();

Untitled PHP (25-Jul @ 17:24)

Syntax Highlighted Code

  1. <?php
  2.  
  3. echo "Hello World";
  4.  
  5. ?>

Plain Code

<?php

echo "Hello World";

?>

Untitled PHP (23-Jul @ 17:53)

Syntax Highlighted Code

  1. public function executeRefresh()
  2. {
  3.   $output = '[["title", "My basic letter"], ["name", "Mr Brown"]]';
  4.   $this->getResponse()->setHttpHeader("X-JSON", '('.$output.')');
  5. [4 more lines...]

Plain Code

public function executeRefresh()
{
  $output = '[["title", "My basic letter"], ["name", "Mr Brown"]]';
  $this->getResponse()->setHttpHeader("X-JSON", '('.$output.')');

  return sfView::HEADER_ONLY;
}

Untitled PHP (23-Jul @ 17:17)

Syntax Highlighted Code

  1. <?php
  2. echo $doc;
  3. ?>

Plain Code

<?php 
echo $doc;
?>

Untitled PHP (23-Jul @ 12:22)

Syntax Highlighted Code

  1. function posudko_name($id,$inf=69)
  2. {
  3.     $el=CIBlockElement::GetList(Array("SORT"=>"ASC"), Array("IBLOCK_ID"=>$inf));
  4.     while($arRes = $el->Fetch()){
  5. [12 more lines...]

Plain Code

function posudko_name($id,$inf=69)
{
    $el=CIBlockElement::GetList(Array("SORT"=>"ASC"), Array("IBLOCK_ID"=>$inf));
    while($arRes = $el->Fetch()){
        if($arRes['ID']==$id){
            $temp = explode("  ",$arRes['NAME']);
            $pr=CIBlockElement::GetProperty(69,$arRes['ID']); // берем свойства
                while($arPr = $pr->Fetch()){ // цикл просмотра свойств
                    switch($arPr['CODE'])
                    {
                        case 'opis': $i_posudo_name[0]=$temp[0]; $i_posudo_name[1]=$arPr['VALUE']; break;
                    }
                }
        }
    }
return $i_posudo_name;
}

Untitled PHP (23-Jul @ 10:25)

Syntax Highlighted Code

  1. <?
  2. echo 'Hi World';
  3. ?>

Plain Code

<?
echo 'Hi World';
?>

Untitled PHP (23-Jul @ 00:32)

Syntax Highlighted Code

  1. public function ajaxBaeControlAction()
  2.     {
  3.         $url = $this->view->url(array('controller'=>'cart', 'action'=>'ajax-bae-form'));
  4.        
  5. [13 more lines...]

Plain Code

public function ajaxBaeControlAction()
    {
        $url = $this->view->url(array('controller'=>'cart', 'action'=>'ajax-bae-form'));
        
        // $this->ajaxBaeFormAction();
        
        foreach ($this->cart_session->items as $item_id => $bae_data)
        {
            if (is_array($bae_data))
            {
                jQuery::jQuery('p#bae_' . $item_id)->html('<a href="#" onclick="javascript:$.php(\'' . $url . $this->view->get_requests_string . '\');return false;">Estimate Built, click to edit</a>');
            }
            else
            {
                jQuery::jQuery('p#bae_' . $item_id)->html('<a href="#" onclick="javascript:$.php(\'' . $url . $this->view->get_requests_string . '\');return false;">+ Build-An-Estimate</a>');
            }
        }
    }

fcgdfgdf (22-Jul @ 19:37)

Syntax Highlighted Code

  1. echo "ddd";
  2. $d = 12;
  3.  

Plain Code

echo "ddd";
$d = 12;

Untitled PHP (22-Jul @ 15:28)

Syntax Highlighted Code

  1. <?php
  2.  
  3.  
  4. echo "hello";
  5. ?>

Plain Code

<?php


echo "hello";
?>

Untitled PHP (21-Jul @ 19:18)

Syntax Highlighted Code

  1. <?php
  2.     echo 'test';
  3. ?>

Plain Code

<?php
    echo 'test';
?>

Untitled PHP (20-Jul @ 15:17)

Syntax Highlighted Code

  1. <?php
  2. echo ('this is a test');
  3. ?>

Plain Code

<?php
echo ('this is a test');
?>

Untitled PHP (19-Jul @ 08:38)

Syntax Highlighted Code

  1. <?php
  2. echo "δ½ ζ˜―δΈ€ιš»θ±¬";
  3. ?>

Plain Code

<?php
echo "你是一隻豬";
?>

Untitled PHP (18-Jul @ 02:47)

Syntax Highlighted Code

  1. <?php
  2. ?>

Plain Code

<?php
phpinfo();
?>

demo (17-Jul @ 07:32)

Syntax Highlighted Code

  1. <?php
  2.  
  3. echo 'sarbesh' ;
  4.  
  5. ?>

Plain Code

<?php

echo 'sarbesh' ;

?>

Untitled PHP (17-Jul @ 05:41)

Syntax Highlighted Code

Plain Code

phpinfo();

Untitled PHP (16-Jul @ 21:52)

Syntax Highlighted Code

  1. <?php
  2. ?>

Plain Code

<?php
phpinfo();
?>

Untitled PHP (16-Jul @ 17:15)

Syntax Highlighted Code

  1. <?php
  2.  
  3. class foo
  4. {
  5. [7 more lines...]

Plain Code

<?php

class foo
{

    public function __construct ()
    {
        echo "test";
    }
}

?>

Untitled PHP (15-Jul @ 08:23)

Syntax Highlighted Code

  1. http://ejohn.org/apps/rss2json/?url=http://ejohn.org/index.rdf

Plain Code

http://ejohn.org/apps/rss2json/?url=http://ejohn.org/index.rdf

Untitled PHP (14-Jul @ 08:08)

Syntax Highlighted Code

  1. asasa

Plain Code

asasa

Untitled PHP (14-Jul @ 03:23)

Syntax Highlighted Code

  1. dDDF

Plain Code

dDDF

Untitled PHP (12-Jul @ 21:29)

Syntax Highlighted Code

  1. <?php
  2. echo "bonjour"
  3. ?>

Plain Code

<?php
echo "bonjour"
?>

Untitled PHP (12-Jul @ 12:12)

Syntax Highlighted Code

  1. <?php
  2. if (empty($_POST))
  3. {
  4.     $form_ok = true;
  5. [5 more lines...]

Plain Code

<?php
if (empty($_POST))
{
    $form_ok = true;
    if (isset($_REQUEST['test']) && !empty(isset($_REQUEST['test']))
    {
        //do stuff
    }
}
?>

Untitled PHP (12-Jul @ 08:27)

Syntax Highlighted Code

  1. echo "Nice work";

Plain Code

echo "Nice work";

Untitled PHP (11-Jul @ 12:32)

Syntax Highlighted Code

  1. <?php
  2.  
  3. prwemrpwemr
  4.  
  5. ?>

Plain Code

<?php

prwemrpwemr

?>

Untitled PHP (11-Jul @ 09:58)

Syntax Highlighted Code

  1. <?php
  2.  
  3. echo "Hello World!";
  4.  
  5. ?>

Plain Code

<?php

echo "Hello World!";

?>

Untitled PHP (10-Jul @ 23:04)

Syntax Highlighted Code

  1. <?PHP echo "Hellp"; ?>

Plain Code

<?PHP echo "Hellp"; ?>

Untitled PHP (10-Jul @ 23:04)

Syntax Highlighted Code

  1. <?php echp Hello ?>

Plain Code

<?php echp Hello ?>

Untitled PHP (10-Jul @ 09:01)

Syntax Highlighted Code

  1. <?php
  2. echo "Hello world";
  3. // comment goes here..
  4. ?>

Plain Code

<?php 
echo "Hello world";
// comment goes here..
?>

Untitled PHP (10-Jul @ 07:43)

Syntax Highlighted Code

  1. fasd

Plain Code

fasd

Untitled PHP (10-Jul @ 07:43)

Syntax Highlighted Code

  1. <?
  2.  
  3. if(empty($_GET['pagina']))
  4.     header("location: ../../index.php?pagina=nieuws/lezen");
  5. [180 more lines...]

Plain Code

<?

if(empty($_GET['pagina']))
    header("location: ../../index.php?pagina=nieuws/lezen");

$select = "SELECT * FROM nieuws_berichten WHERE id = '".$_GET['id']."'";
$query = mysql_query($select)or die(mysql_error());
$list = mysql_fetch_object($query);

if(mysql_num_rows($query) == 0)
{
    echo "<div class=\"titel\">Fout</div>";
    echo "<div class=\"bericht\">Dit bericht bestaat niet... <a href=\"javascript:history.go(-1)\">Ga terug</a></div>";
}
else
{
    $bericht = ubbvervangen($list->bericht);
    $bericht = smiliesvervangen($bericht);
    $bericht = wordwrap($bericht, 100);

    $onderwerp = $list->onderwerp;
    $onderwerp = htmlspecialchars($onderwerp);
    $onderwerp = ucwords($onderwerp);

    $select2 = "SELECT * FROM leden_gegevens WHERE id = '".$list->lidid."'";
    $query2 = mysql_query($select2)or die(mysql_error());
    $list2 = mysql_fetch_object($query2);

    $select5 = "SELECT * FROM nieuws_reacties WHERE nieuwsid = '".$list->id."'";
    $query5 = mysql_query($select5)or die(mysql_error());

    $gebruikersnaam = $list2->gebruikersnaam;
    $gebruikersnaam = strip_tags($gebruikersnaam);
    $gebruikersnaam = ucwords($gebruikersnaam);

    if ($list2->status == "Beheerder")
        $status = "<font color=\"#FF0000\">Beheerder</font>";
    elseif ($list2->status == "SuperModerator")
        $status = "<font color=\"#000080\">SuperModerator</font>";
    elseif ($list2->status == "Moderator")
        $status = "<font color=\"#0000FF\">Moderator</font>";
    elseif ($list2->status == "Verbannen")
        $status = "<font color=\"#008000\">Verbannen</font>";
    else
        $status = "Lid";

    if (file_exists("paginas/leden/avatar/".$list2->id.".jpg"))
        $avatar = "<img src=\"paginas/leden/avatar/".$list2->id.".jpg\" border=\"0\">";
    else
        $avatar = "";

    $select4 = "SELECT * FROM leden_gegevens WHERE gebruikersnaam = '".$_COOKIE['gebruikersnaam']."'";
    $query4 = mysql_query($select4)or die(mysql_error());
    $list4 = mysql_fetch_object($query4);


    if(empty($_COOKIE['gebruikersnaam']))
        $menu = "";
    elseif ($list4->status == "Beheerder" || $list4->status == "Moderator" || $list4->status == "SuperModerator")
        $menu = "<a href=\"index.php?pagina=nieuws/reageren&id=".$list->id."\"><img alt=\"Reageren\" src=\"afbeeldingen/icons/icon_reageren.gif\"></a> <a href=\"index.php?pagina=nieuws/bewerken&id=".$list->id."\"><img alt=\"Bewerken\" src=\"afbeeldingen/icons/icon_bewerk.gif\"></a> <a href=\"javascript:beheer('Weet je zeker dat je dit bericht wilt verwijderen?','index.php?pagina=nieuws/verwijderen&id=".$list->id."');\"><img alt=\"Verwijderen\" src=\"afbeeldingen/icons/icon_verwijder.gif\"></a>";
    else
        $menu = "<a href=\"index.php?pagina=nieuws/reageren&id=".$list->id."\"><img alt=\"Reageren\" src=\"afbeeldingen/icons/icon_reageren.gif\"></a>";

    echo "<h3  class=\"onderwerp\">".$onderwerp."</h3>";
    echo "<table cellpadding=\"0\" cellspacing=\"0\" border=\"0\" width=\"98%\">";
    echo "<td width=\"100%\" valign=\"top\">";
    echo "<div class=\"nieuwsbericht\">Door: <a href=\"index.php?pagina=leden/profiel&id=".$list3->id."\">".$gebruikersnaam."</a> | Datum: ".$list->datum."<br><br></div>";
    echo "".$bericht."<br><br>";
    echo "<div class=\"vorige\"><a href=\"#\" onclick=\"history.go(-1)\">« Ga terug</a></div>";
    echo "<div class=\"opties\">".$menu."</div>";
    echo "</table>";
    echo "<hr>";

        echo "<h3 class=\"reacties\"><b>Reacties (".mysql_num_rows($query5).")</b></h3>";


    $select2 = "SELECT * FROM nieuws_reacties WHERE nieuwsid = '".$list->id."'";
    $query2 = mysql_query($select2)or die(mysql_error());

    $aantalpagina = ceil(mysql_num_rows($query2) / 20);

    if($aantalpagina == 1)
    {
        $vorige = "&#171; Vorige";
        $volgende = "Volgende &#187;";
        $begin = "0";
    }
    elseif(empty($_GET['p']) || $_GET['p'] == "1")
    {
        $vorige = "&#171; Vorige";
        $volgende = "<a href=\"index.php?pagina=nieuws/lezen&id=".$_GET['id']."&p=2\">Volgende</a> &#187;";
        $begin = "0";
    }
    elseif($_GET['p'] == $aantalpagina)
    {
        $vorige = "&#171; <a href=\"index.php?pagina=nieuws/lezen&id=".$_GET['id']."&p=".($aantalpagina -1)."\">Vorige</a>";
        $volgende = "Volgende &#187;";
        $begin = $website['leden'] * ($aantalpagina -1);
    }
    else
    {
        $vorige = "&#171; <a href=\"index.php?pagina=nieuws/lezen&id=".$_GET['id']."&p=".($_GET['p'] -1)."\">Vorige</a>";
        $volgende = "<a href=\"index.php?pagina=nieuws/lezen&id=".$_GET['id']."&p=".($_GET['p'] +1)."\">Volgende</a> &#187;";
        $begin = 20 * ($_GET['p'] -1);
    }

    for($i = 1; $i <= $aantalpagina; $i++)
    {
        if($aantalpagina == "1")
            $paginas .= "1 | ";
        else
            if($_GET['p'] == $i)
                $paginas .= "".$i." | ";
            else
                $paginas .= "<a href=\"index.php?pagina=nieuws/lezen&id=".$_GET['id']."&p=".$i."\">".$i."</a> | ";
    }

    $navigatie = "".$vorige." | ".$paginas." ".$volgende."";

    $select2 = "SELECT * FROM nieuws_reacties WHERE nieuwsid = '".$list->id."' ORDER BY id ASC LIMIT ".$begin.", 20";
    $query2 = mysql_query($select2)or die(mysql_error());


    while ($list2 = mysql_fetch_object($query2))
    {
        $bericht = ubbvervangen($list2->bericht);
        $bericht = smiliesvervangen($bericht);
        $bericht = wordwrap($bericht, 100);

        $select3 = "SELECT * FROM leden_gegevens WHERE id = '".$list2->lidid."'";
        $query3 = mysql_query($select3)or die(mysql_error());
        $list3 = mysql_fetch_object($query3);

        $gebruikersnaam = $list3->gebruikersnaam;

        if ($list3->status == "Beheerder")
            $gebruikersnaam = "<font color=\"#FF0000\">".$gebruikersnaam."</font>";
        elseif ($list3->status == "SuperModerator")
            $status = "<font color=\"#000080\">SuperModerator</font>";
        elseif ($list3->status == "Moderator")
            $status = "<font color=\"#0000FF\">Moderator</font>";
        elseif ($list3->status == "Verbannen")
            $status = "<font color=\"#008000\">Verbannen</font>";
        else
            $status = "Lid";


        $select5 = "SELECT * FROM leden_gegevens WHERE gebruikersnaam = '".$_COOKIE['gebrui