Untitled Python (7-Aug @ 18:46)

Syntax Highlighted Code

  1. if self.extra_class:
  2.   templatevars["search"]["extra_class"] = "nodefaultsearch"
  3.  

Plain Code

if self.extra_class:
  templatevars["search"]["extra_class"] = "nodefaultsearch"

Untitled JavaScript (7-Aug @ 16:02)

Syntax Highlighted Code

  1. $("input.all").click(function(){
  2.  
  3.     var t = $(this);
  4.     var c = $(':checked', t).length;
  5. [5 more lines...]

Plain Code

$("input.all").click(function(){

    var t = $(this);
    var c = $(':checked', t).length;

    if (c == 1) {
        console.log("checked");
    }

});

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 JavaScript (6-Aug @ 18:45)

Syntax Highlighted Code

  1. $(document).ready(function(){
  2.         $('#video_box').hide();
  3.         $('a.video-link', this).click(function(){
  4.             $(this).next('#video_box').slideToggle();
  5. [8 more lines...]

Plain Code

$(document).ready(function(){
        $('#video_box').hide();
        $('a.video-link', this).click(function(){
            $(this).next('#video_box').slideToggle();
            return false;
        });
        $('a.video-close', this).click(function(){
            $(this).parent('#video_box').hide();
            return false;
        }, function(){
            $(this).siblings('#video_frame').empty();
        })
    });

Untitled HTML (6-Aug @ 15:00)

Syntax Highlighted Code

  1. dsfg

Plain Code

dsfg

Untitled JavaScript (6-Aug @ 14:33)

Syntax Highlighted Code

  1. /*
  2. Author : Vipul Limbachiya
  3. FileName : jQuery.presentation
  4. Reqires : jQuery.js,jQuery.init.js,jQuery-ui-personalized-1.5.2.js
  5. [802 more lines...]

Plain Code

/* 
Author : Vipul Limbachiya
FileName : jQuery.presentation
Reqires : jQuery.js,jQuery.init.js,jQuery-ui-personalized-1.5.2.js
*/


function Elem(elemId){return document.getElementById(elemId);}

jQuery.preloadImages = function()
{  
  for(var i = 0; i<arguments.length; i++)
  {
    jQuery("<img>").attr("src", arguments[i]);
  }
}

// Properties for handler classes and ID so later on we can change if required
var Properties = {
    currentDayBoxClass: ".calDayCur",
    calendarBoxId: "#clndrEvent",    
    eventContainerBoxId: "#events",
    eventBoxClass: ".calEvent",
    eventBoxClassOnDrag: ".calEventDrag"    
};


// This class manages all AJAX requests and response, its integrated with Presentation class
var EventCallBack=
{     
    // This method is being called on drop of event box on day, 
    // Calls async page and retrives details of selected template and date. 
    // And generates form of event using presentation class
    retriveEventTemplateDetais : function(eventBoxId,templateId,selDate)
    {   
        Presentation.appendMessage(eventBoxId,
                                   "Wait...");
        
        $.ajax({type:"POST",
                url: "asyncHandler/handlerEvents.ashx",
                data: "act=getEventTemplateDetails&tempId=" + templateId + "&selDate=" + selDate,
                success:function(serverResponseData)
                            {
                                EventCallBack.retriveEventTemplateDetaisSuccess(serverResponseData,selDate,eventBoxId);
                            },
                error: function(reqObject,typeofError,exceptionObj)
                            {
                                EventCallBack.retriveEventTemplateDetaisFailure(eventBoxId);
                            },
                complete: function()
                            {
                                Presentation.removeMessage(eventBoxId);
                            }
                });
    },    
    // Being called on success of method : retriveEventTemplateDetais
    retriveEventTemplateDetaisSuccess:function(responseText,selDate,eventBoxId)
    {  
       Presentation.refreshEventPanel();
       
       data = eval("(" + responseText + ")");
                     
       if(parseInt(data.response.error)===0)
       {          
          Presentation.generateMyReminderPanel(data.response.table,
                                                selDate,
                                                eventBoxId);
       }
       else
       {
          Presentation.alertMessage(data.response.message);          
          Presentation.resetEventBoxIdPosition(eventBoxId,"");
       }
    },
    
    // Being called on failure of method : retriveEventTemplateDetais
    retriveEventTemplateDetaisFailure:function(eventBoxId)
    { 
        Presentation.alertMessage("Error occored while processing request on server!");
        Presentation.resetEventBoxIdPosition(eventBoxId,"");
    },
    
    // Submits selected option and data of event form
    submitEventData : function(eventBoxId)
    {        
        if($("#myReminderPanel_isActive").val()=="yes")
        {
            Presentation.appendMessage("myReminderFormPanel",
                                    "Please Wait...");
                                    
            var frequencyOption = "";            
            $("#myReminderPanel_EventFreq_Panel > select option:selected").each(function () {
                if(frequencyOption.length>0)
                {
                    frequencyOption += $(this).text() + ",";
                }
                else
                {
                    frequencyOption = $(this).text();
                }
              });
              
            var reminderOption = "";            
            $("#myReminderPanel_EventReminder_Panel > select option:selected").each(function () {
                if(reminderOption.length>0)
                {
                    reminderOption += $(this).text() + ",";
                }
                else
                {
                    reminderOption = $(this).text();
                }
              });
             
            var SelectedDate = $("#myReminderPanel_EventDate").val();
            
            var disableEmailReminder = false;
            
            if(Elem("myReminderPanel_EventDisableEmailReminder"))
            {
                disableEmailReminder = Elem("myReminderPanel_EventDisableEmailReminder").checked;
            }
            
            var disableSMSReminder = false;
            
            if(Elem("myReminderPanel_EventDisableSMSReminder"))
            {
                disableSMSReminder = Elem("myReminderPanel_EventDisableSMSReminder").checked;
            }
                                    
            $.ajax({type:"POST",
                url: "asyncHandler/handlerEvents.ashx",
                data: "act=add"
                         + "&tempId=" + $("#myReminderPanel_EventTemplateId").val() 
                         + "&eventTitle=" + $("#myReminderPanel_EventTitle").val()
                         + "&eventDate=" + SelectedDate
                         + "&eventFreq=" + frequencyOption
                         + "&eventReminder=" + reminderOption
                         + "&disableEmailReminder=" + disableEmailReminder
                         + "&disableSMSReminder=" + disableSMSReminder
                         + "&eventAltEmail=" + $("#myReminderPanel_EventAltEmail").val()
                         + "&eventAltMobile=" + $("#myReminderPanel_EventAltMobile").val(),
                success:function(serverResponseData)
                            {
                                EventCallBack.submitEventDataSuccess(serverResponseData,SelectedDate);
                            },
                error: function(reqObject,typeofError,exceptionObj)
                            {
                                EventCallBack.submitEventDataFailure(SelectedDate);
                            },
                complete: function()
                            {
                                Presentation.removeMessage("myReminderFormPanel");
                            }
                });
        }  
    },
    
    // Being called on success of method : submitEventData
    submitEventDataSuccess:function(responseText,selDate)
    {
        data = eval("(" + responseText + ")");
        
        if(data.response.error==0)
        {
            var newEventId = data.response.newEvent[0].event_id;
             
            var strEventBoxId = Presentation.currentEventBoxId();   
                              
            Presentation.resetEventBoxIdPosition(strEventBoxId,selDate);
            
            var eventElem = $("#"+strEventBoxId);
            
            eventElem.effect("highlight", {}, 2000);            
            
            eventElem.removeAttr("id");
            
            eventElem.attr("id","UserEvent_"+newEventId);                        
            
            Presentation.alertMessage(data.response.message);
        }
        else
        {
            Presentation.alertMessage(data.response.message);
            Presentation.resetEventBoxIdPosition(Presentation.currentEventBoxId(),"");       
        }        
        Presentation.showHideMyReminderPanel(false);
    },
    
    // Being called on failure of method : submitEventData
    submitEventDataFailure:function()
    {
        Presentation.alertMessage("Error Occured!");
        Presentation.resetEventBoxIdPosition(Presentation.currentEventBoxId(),"");
    },
    
    
    // Retrive event data async call
    retriveEventDetails: function(eventBoxId,eventId,selDate)
    {
        Presentation.appendMessage(eventBoxId,
                                   "Wait...");
        
        $.ajax({type:"POST",
                url: "asyncHandler/handlerEvents.ashx",
                data: "act=getEventDetails&eventId=" + eventId,
                success:function(serverResponseData)
                            {
                                EventCallBack.retriveEventDetailsSuccess(serverResponseData,selDate,eventBoxId);
                            },
                error: function(reqObject,typeofError,exceptionObj)
                            {
                                EventCallBack.retriveEventDetailsFailure(eventBoxId);
                            },
                complete: function()
                            {
                                Presentation.removeMessage(eventBoxId);
                            }
                });
    },
    
    // Being called on success of method : retriveEventDetails
    retriveEventDetailsSuccess:function(responseText,selDate,eventBoxId)
    {
        data = eval("(" + responseText + ")");
        
        if(data.response.error==0)
        {   
            Presentation.generateMyReminderPanelForEdit(data.response.table,
                                                selDate,
                                                eventBoxId);
        }
        else
        {
            Presentation.showHideMyReminderPanel(false);
            Presentation.alertMessage(data.response.message);
            var selDate = $("#"+eventBoxId).attr("currentdate") || "";
            Presentation.resetEventBoxIdPosition(eventBoxId,selDate);
        }
    },
    
    // Being called on failure of method : retriveEventDetails
    retriveEventDetailsFailure:function(eventBoxId)
    { 
        Presentation.alertMessage("Error occored while processing request on server!");
    },
    
    // Update event async call
    updateEvent: function(eventBoxId,templateId,selDate)
    {
        if($("#myReminderPanel_isActive").val()=="yes")
        {
            Presentation.appendMessage("myReminderFormPanel",
                                       "Please Wait...");            
                                    
            var frequencyOption = "";            
            $("#myReminderPanel_EventFreq_Panel > select option:selected").each(function () {
                if(frequencyOption.length>0)
                {
                    frequencyOption += $(this).text() + ",";
                }
                else
                {
                    frequencyOption = $(this).text();
                }  
              });
              
            var reminderOption = "";            
            $("#myReminderPanel_EventReminder_Panel > select option:selected").each(function () {                
                if(reminderOption.length>0)
                {
                    reminderOption += $(this).text() + ",";
                }
                else
                {
                    reminderOption = $(this).text();
                }
              });
             
            var SelectedDate = $("#myReminderPanel_EventDate").val();
            
            var disableEmailReminder = false;
            
            if(Elem("myReminderPanel_EventDisableEmailReminder"))
            {
                disableEmailReminder = Elem("myReminderPanel_EventDisableEmailReminder").checked;
            }
            
            var disableSMSReminder = false;
            
            if(Elem("myReminderPanel_EventDisableSMSReminder"))
            {
                disableSMSReminder = Elem("myReminderPanel_EventDisableSMSReminder").checked;
            }
                                    
            $.ajax({type:"POST",
                url: "asyncHandler/handlerEvents.ashx",
                data: "act=updateEvent"
                         + "&eventId=" + $("#myReminderPanel_EditEventId").val() 
                         + "&tempId=" + $("#myReminderPanel_EventTemplateId").val() 
                         + "&eventTitle=" + $("#myReminderPanel_EventTitle").val()
                         + "&eventDate=" + SelectedDate
                         + "&eventFreq=" + frequencyOption
                         + "&eventReminder=" + reminderOption
                         + "&disableEmailReminder=" + disableEmailReminder
                         + "&disableSMSReminder=" + disableSMSReminder
                         + "&eventAltEmail=" + $("#myReminderPanel_EventAltEmail").val()
                         + "&eventAltMobile=" + $("#myReminderPanel_EventAltMobile").val(),
                success:function(serverResponseData)
                            {
                                EventCallBack.updateEventSuccess(serverResponseData,SelectedDate,eventBoxId);
                            },
                error: function(reqObject,typeofError,exceptionObj)
                            {
                                EventCallBack.updateEventFailure(eventBoxId);
                            },
                complete: function()
                            {
                                Presentation.removeMessage("myReminderFormPanel");
                            }
                });
        }  
    },
    
    // Being called on success of method : updateEvent
    updateEventSuccess:function(responseText,selDate,eventBoxId)
    {
        data = eval("(" + responseText + ")");
        
        var strEventBoxId = Presentation.currentEventBoxId();
        
        if(data.response.error==0)
        {   
            $("#"+strEventBoxId).attr("currentdate",selDate);
            
            Presentation.resetEventBoxIdPosition(strEventBoxId,selDate);
                        
            $("#"+strEventBoxId).effect("highlight", {}, 2000);
            
            Presentation.alertMessage(data.response.message);
        }
        else
        {
            Presentation.alertMessage(data.response.message);
            var boxselDate = $("#"+strEventBoxId).attr("currentdate") || "";            
            Presentation.resetEventBoxIdPosition(strEventBoxId,boxselDate);
        }   
        Presentation.showHideMyReminderPanel(false);     
    },
    
    // Being called on failure of method : updateEvent
    updateEventFailure:function(eventBoxId)
    { 
        Presentation.alertMessage("Error Occured!");
        var selDate = $("#"+eventBoxId).attr("currentdate") || "";
        Presentation.resetEventBoxIdPosition(eventBoxId,selDate);
    }  
}


// This class manages presentation of calendar.
// Drag drop and initilization of dragdrop is handled by init function
var Presentation = {

    // Initializes events and drag drop
    init:function()
    {
    
        $.preloadImages("Images/throbber.gif");
        
        Presentation.initDragDrop();   
        
        $("#myReminderPanel_Close").bind("click",
                                            Presentation.cancleAction);    
                                        
        $("#eventCalendar").after("<div id=\"alertMessage\" class=\"alertMessage\" style=\"width:350px;display:none;\"></div>");
        
        $(".calEvent").bind("click",
                            function(){
                            if($(this).attr("currentdate"))
                            {
                                if($("#myReminderPanel_isActive").val()!="yes")
                                {
                                    Presentation.onDropFunction(this.id,
                                                            "dv"+$(this).attr("currentdate"),
                                                            true);
                                }
                            }
                            });
                     
    },    
    alertMessage:function(msg)
    {
        var alertMessageDiv=$("#alertMessage");
        if(alertMessageDiv)
        {
            alertMessageDiv.text(msg);
        }        
        alertMessageDiv.fadeIn(1000).fadeOut(3000)
    },
    refreshEventBox:function(idOfDroppedElement)
    {
        var eventBoxId = Presentation.currentEventBoxId(); 
        
        if(eventBoxId!="" && eventBoxId!=idOfDroppedElement)
        {
            if(Presentation.isEditEvent())
            {                 
                var selDate = $("#"+eventBoxId).attr("currentdate");     
                                            
                Presentation.resetEventBoxIdPosition(eventBoxId,
                                                    selDate);                                                
             
            }
            else
            {
                Presentation.resetEventBoxIdPosition(eventBoxId,
                                                    "");
            }
        }
    },    
    cancleAction: function()
    {        
        Presentation.refreshEventBox();
        Presentation.refreshEventPanel();
        Presentation.showHideMyReminderPanel(false);
    },
    
    // Fuction being called on drop of event box
    onDropFunction:function(droppedElement,idOfDateElement,flag)
    {   
       var idOfDroppedElement = "";
       
       if(flag)
       {
            idOfDroppedElement = droppedElement;
       }
       else
       {
            idOfDroppedElement = droppedElement[0].id;   
       }
       
       //Not required, because drag is disabled when add/edit form is open
       //Presentation.refreshEventBox(idOfDroppedElement);       
       
       if ("#"+idOfDateElement != Properties.eventContainerBoxId) 
        {
            if(idOfDroppedElement.indexOf('EventTemplateId_')>=0) // Add event
            {                
                EventCallBack.retriveEventTemplateDetais(idOfDroppedElement,
                                  idOfDroppedElement.replace('EventTemplateId_',''),
                                  idOfDateElement.replace('dv',''));
                                  
                Presentation.refreshEventPanel();
            }
            else // Edit Event
            {
                EventCallBack.retriveEventDetails(idOfDroppedElement,
                                  idOfDroppedElement.replace('UserEvent_',''),
                                  idOfDateElement.replace('dv',''));
            }
        }
        else
        {             
            Presentation.showHideMyReminderPanel(false);
        }
    },
    
    // Init funciton for dragdrop
    initDragDrop: function() {
    
         $(Properties.currentDayBoxClass).droppable({
                    accept: Properties.eventBoxClass,
                    drop: function(ev, ui) {                        
                        $(this).append($(ui.draggable));
                        Presentation.onDropFunction($(ui.draggable),this.id);                        
                    }
                });
                
        $(Properties.eventContainerBoxId).droppable({
                    accept: Properties.eventBoxClass,
                    drop: function(ev, ui) {            
                        $(this).append($(ui.draggable));
                        Presentation.onDropFunction($(ui.draggable),this.id);
                    }
                });
       
        $(Properties.eventBoxClass).draggable({
                                    helper:'clone',
                                    opacity:0.5
                                    });                                    
        
    },
     
    // Removes previously created message box
    removeMessage: function(targetElementId,postfix) 
    {
           postfix = postfix || "msg";           
           $("#"+targetElementId+"_" + postfix).remove();
    },
    
    // Appends message box to given element by id and with options
    appendMessage: function(targetElementId,text,msgDivPostfix,containerClass,messageElementClass) 
    {         
        msgDivPostfix = msgDivPostfix || "msg";
        containerClass = containerClass || "loaderContainer";
        messageElementClass = messageElementClass || "waitMessage";
        
        if($("#"+targetElementId+"_"+msgDivPostfix).length>0)
        {
            Presentation.removeMessage(targetElementId,
                                        msgDivPostfix);
        }        
        $("#"+targetElementId).prepend("<div title=\""+text+"\" class=\""+containerClass+"\" id=\""+ targetElementId + "_" + msgDivPostfix +"\"><span class=\""+messageElementClass+"\">"+text+"</span></div>");        
    },
    
    // Refreshes event panle, to check whether more events available or not
    refreshEventPanel:function()
    {         
        if($("#events div").length==0)
        {
            if($("#dvNoEventAvailableMessage").length==0)
            {
                $("#events").append("<div id=\"dvNoEventAvailableMessage\" class=\"alertMessage\" title=\"No more events..!\">No more events available</div>")
            }
        }
        else
        {
            $("#dvNoEventAvailableMessage").remove();
        }
    },
    
    // Sets visibility of event form
    showHideMyReminderPanel :function(show)
    {   
        if(show)
        { 
            $("#myReminderPanel").show();
            $("#myReminderPanel_isActive").val("yes");
            $(Properties.eventBoxClass).draggable("disable");
            $(Properties.eventBoxClass).css({cursor:"text"});
        }
        else
        {
            $("#myReminderPanel").hide();
            $("#myReminderPanel_isActive").val("no");
            $(Properties.eventBoxClass).draggable("enable");
            $(Properties.eventBoxClass).css({cursor:"move"});
        }
    },
    
    // Generates Event's form using json data retrived from server
    generateMyReminderPanel :function(templateData,dateOfEvent,eventBoxId)
    {   
        if(templateData)
        {        
            if(templateData.length>0)
            {   
                var currentTemplate = templateData[0];
                
                Presentation.showHideMyReminderPanel(true);
                
                Presentation.switchSubmitButtonActionForEdit(false);
                
                $("#myReminderPanel_Header").html("Event details");
                $("#myReminderPanel_Submit").val("Save");
                
                Presentation.currentEventBoxId(eventBoxId);
                
                $("#myReminderPanel_EventDate").val(dateOfEvent);
                
                $("#myReminderPanel_EventFreq").val(currentTemplate.event_template_frequency);
                $("#myReminderPanel_EventReminder").val(currentTemplate.event_template_reminder);
                
                $("#myReminderPanel_EventFreq_Panel > select option:first-child").attr("selected","true");
                $("#myReminderPanel_EventReminder_Panel > select option:first-child").attr("selected","true");
                
                if(Elem("myReminderPanel_EventDisableEmailReminder"))
                {
                    Elem("myReminderPanel_EventDisableEmailReminder").checked=(currentTemplate.event_template_email=="y");
                }                
                
                if(Elem("myReminderPanel_EventDisableSMSReminder"))
                {
                    Elem("myReminderPanel_EventDisableSMSReminder").checked=(currentTemplate.event_template_sms=="y");
                }
                
                $("#myReminderPanel_EventTitle").val(currentTemplate.event_template_name);
                
                $("#myReminderPanel_EventTemplateId").val(currentTemplate.event_template_id);                
                
                
                if(currentTemplate.event_template_account_def_time!="y")
                {
                    $("#myReminderPanel_EventReminder_Panel").hide();
                }
                else
                {
                    $("#myReminderPanel_EventReminder_Panel").show();
                }
                                                
                if(currentTemplate.event_template_email!="y")
                {
                   $("#myReminderPanel_EventDisableEmailReminder_Panel").hide();
                }
                else
                {
                    $("#myReminderPanel_EventDisableEmailReminder_Panel").show();
                }
                
                if(currentTemplate.event_template_sms!="y")
                {
                    $("#myReminderPanel_EventDisableSMSReminder_Panel").hide();
                }
                else
                {
                    $("#myReminderPanel_EventDisableSMSReminder_Panel").show();
                }
                
                if(currentTemplate.event_template_alt_email!="y")
                {
                    $("#myReminderPanel_EventAltEmail_Panel").hide();
                }
                else
                {
                    $("myReminderPanel_EventAltEmail_Panel").show();
                }
                
                if(currentTemplate.event_template_alt_mobile!="y")
                {
                    $("#myReminderPanel_EventAltMobile_Panel").hide();
                }
                else
                {
                    $("#myReminderPanel_EventAltMobile_Panel").show();
                }        
                
                $("#myReminderPanel_EventTitle").focus();       
                
            }
        }
    },
    
    isEditEvent:function()
    {
        return  $("#myReminderPanel_EditEventId").val()!="";
    },
      
    currentEventBoxId:function(value)
    { 
        if(value)
        {
            $("#myReminderPanel_currentEventBoxId").val(value);
        }       
        
        return $("#myReminderPanel_currentEventBoxId").val();
    },
      
    switchSubmitButtonActionForEdit:function(flag,eventId)
    {
        eventId = eventId || "";
        
        $("#myReminderPanel_Submit").unbind("click",
                                            EventCallBack.updateEvent);
                                            
        $("#myReminderPanel_Submit").unbind("click",
                                            EventCallBack.submitEventData); 
        
        $("#myReminderPanel_EditEventId").val(eventId);
                
        if(flag)
        {
            $("#myReminderPanel_EventDate_Panel_Edit").show();
            
            $("#myReminderPanel_Submit").bind("click",
                                                EventCallBack.updateEvent);            
        }
        else
        {            
            $("#myReminderPanel_EventDate_Panel_Edit").hide();
            
            $("#myReminderPanel_Submit").bind("click",
                                                EventCallBack.submitEventData); 
        }
    },
    
     // Generates Event's form for edit using json data retrived from server
    generateMyReminderPanelForEdit : function(eventData,dateOfEvent,eventBoxId)
    {           
        if(eventData)
        {        
            if(eventData.length>0)
            {   
                var currentEvent = eventData[0];
                
                Presentation.showHideMyReminderPanel(true);
                
                Presentation.switchSubmitButtonActionForEdit(true,
                                                            eventBoxId.replace('UserEvent_',''));                
                
                $("#myReminderPanel_Header").html("Edit Event details");
                
                $("#myReminderPanel_Submit").val("Update");
                
                Presentation.currentEventBoxId(eventBoxId);
                                              
                $("#myReminderPanel_EventDate").val(dateOfEvent);                
                
                $("#myReminderPanel_EventDateEdit").html(currentEvent.converteddate);
                                
                $("#myReminderPanel_EventFreq").val(currentEvent.event_frequency);
                
                $("#myReminderPanel_EventReminder").val(currentEvent.event_reminder);
                
                $("#myReminderPanel_EventFreq_Panel > select option").each(function(){
                    if($(this).attr("value")==currentEvent.event_frequency)
                    {
                        $(this).attr("selected","true");
                    }
                });
                
                $("#myReminderPanel_EventReminder_Panel > select option").each(function(){
                    if($(this).attr("value")==currentEvent.event_reminder)
                    {
                        $(this).attr("selected","true");
                    }
                });                
                               
                
                if(Elem("myReminderPanel_EventDisableEmailReminder"))
                {
                    Elem("myReminderPanel_EventDisableEmailReminder").checked=(currentEvent.event_email=="y");
                }                
                
                if(Elem("myReminderPanel_EventDisableSMSReminder"))
                {
                    Elem("myReminderPanel_EventDisableSMSReminder").checked=(currentEvent.event_sms=="y");
                }
                
                $("#myReminderPanel_EventTitle").val(currentEvent.event_title);
                
                $("#myReminderPanel_EventTemplateId").val(currentEvent.event_template_id);     
                
                $("#myReminderPanel_EventTitle").focus();          
                
                $("#myReminderPanel_EventReminder_Panel").show();
            
                $("#myReminderPanel_EventDisableEmailReminder_Panel").show();
            
                $("#myReminderPanel_EventDisableSMSReminder_Panel").show();
                       
                $("#myReminderPanel_EventAltEmail_Panel").show();
            
                $("#myReminderPanel_EventAltMobile_Panel").show();
            }
        }
    },
    
    resetEventBoxIdPosition:function(eventBoxId,selDate)
    {
        if(selDate=="")
        {
            if(Elem(eventBoxId))
            {   
                var selDate = $("#"+eventBoxId).attr("currentdate") || "";
                
                if(selDate.length==0)
                {
                    Elem("events").appendChild(Elem(eventBoxId));
                    
                    Presentation.currentEventBoxId("");
                    $("#myReminderPanel_EditEventId").val("");
                }
            }
        }
        else        
        {
            var currentDateId = $("#"+eventBoxId).parent().get(0).id;                                
            
            if(currentDateId != "dv" + selDate)
            {
                if(Elem("dv" + selDate))
                {
                    if(Elem(eventBoxId))
                    {
                        Elem("dv" + selDate).appendChild(Elem(eventBoxId));
                        Presentation.currentEventBoxId("");
                        $("#myReminderPanel_EditEventId").val("");
                    }
                }
                else
                {
                    if(selDate==undefined)
                    {
                        Presentation.alertMessage("error occured, Selected date not valid")
                    }
                    else
                    {
                        Presentation.alertMessage("Event is saved. Date selected is not in current month so it will not be visible")
                        Elem(eventBoxId).parentNode.removeChild(Elem(eventBoxId));
                    }
                }
            }
        }
    }
}

Untitled ActionScript (6-Aug @ 13:02)

Syntax Highlighted Code

  1. ef

Plain Code

ef

Untitled JavaScript (6-Aug @ 09:59)

Syntax Highlighted Code

  1. hello there {
  2. can you read me();
  3. }

Plain Code

hello there {
can you read me();
}

Untitled PHP (6-Aug @ 04:42)

Syntax Highlighted Code

  1. test

Plain Code

test

Untitled JavaScript (6-Aug @ 02:13)

Syntax Highlighted Code

  1. http://remysharp.com/visual-jquery/

Plain Code

http://remysharp.com/visual-jquery/

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

Untitled SQL (5-Aug @ 20:28)

Syntax Highlighted Code

  1. SELECT * FROM tbtexto

Plain Code

select * from tbtexto

Untitled JavaScript (5-Aug @ 07:50)

Syntax Highlighted Code

  1. (function () {
  2.  
  3. var blank_iframe = '/index-blank.html';
  4. var example_jquery = 'http://ajax.googleapis.com/ajax/libs/jquery/1.2.6/jquery.min.js'; // latest from google
  5. [386 more lines...]

Plain Code

(function () {

var blank_iframe = '/index-blank.html';
var example_jquery = 'http://ajax.googleapis.com/ajax/libs/jquery/1.2.6/jquery.min.js'; // latest from google

var re_opt = /options/i;

if (!window.jquerydocs) window.jquerydocs = {};
if (!window.xmldoc) window.xmldoc = null;

window.loadDocs = function(data) {
    $(document).trigger('api-loading');
    
    if (!xmldoc && typeof data != "undefined") {
        jquerydocs = data;
        attachFind(jquerydocs);
        $(document).trigger('api-load-success');
        $(document).trigger('api-load-complete');
    } else {
        // parser
        $.ajax({
            url: xmldoc || 'jquery-docs.xml', // generated from jquery source: /tools/wikiapi2xml/createjQueryXMLDocs.py
            dataType: 'xml',
            success: parse,
            error: function () {
                $(document).trigger('api-load-error');
            },
            complete: function () {
                $(document).trigger('api-load-complete');
            }
        });
    }
};

function parse(xml) {
    var docinfo = $('docs', xml);
    var guid = 0; // TODO upgrade guid to a combo of fn name and params - like Jorn's browser

    jquerydocs.version = docinfo.attr('version');
    jquerydocs.timestamp = docinfo.attr('timestamp');
    jquerydocs.startdoc = docinfo.attr('startdoc');
    
    var letters = []; // holder before sorting and inserting
    jquerydocs.letters = [];

    jquerydocs.data = {};
    jquerydocs.searchNames = [];
    jquerydocs.categories = [];

    // loop through all types collecting data
    $('cat', xml).each(function (i) {
        var catName = this.getAttribute('value');
        var category = {};
        category.name = catName;
        category.subcategories = [];
        
        $('subcat', this).each(function (i) {
            var subcatName = this.getAttribute('value');
            category.subcategories.push(subcatName);
            
            $('function,property,selector', this).each(function () {
                var data = {};
                guid++;
                
                // some function names have spaces around them - so trim
                var name = this.getAttribute('name').replace( /^\s+|\s+$/g, '');
                
                var searchName = name.toLowerCase().replace(/^jquery\./, '');
                letters.push(name.toLowerCase().substr(0,1));

                name = name.replace(/^jquery\./i, '$.');
                
                jquerydocs.searchNames.push(searchName + guid);
                
                data['id'] = guid;
                data['searchname'] = searchName;
                data['name'] = name;
                data['type'] = this.nodeName.toLowerCase();
                data['category'] = this.getAttribute('cat');
                data['subcategory'] = subcatName;
                data['return'] = escapeHTML(this.getAttribute('return'));
                data['added'] = $('added', this).text();
                data['sample'] = $('> sample', this).text();
                data['desc'] = $('> desc', this).text();
                data['longdesc'] = deWikify($('> longdesc', this).text());
                
                // silly hack because of conversion issue from wiki to text (the .ready function 
                // has HTML in the description), but also includes HTML that should be printed, 
                // in particular the body tag :-(
                data.longdesc = data.longdesc.replace(/<body>/, '&lt;body&gt;');
                
                // some descs are in HTML format, some aren't
                if (!(/<p>/).test(data.longdesc)) {
                    data.longdesc = '<p>' + data.longdesc.split(/\n\n/).join('</p><p>') + '</p>';
                }

                // strip our empty p tag if there was no description
                if (data.longdesc == '<p></p>') {
                    data.longdesc = '';
                }
                
                /** params - we'll also search for Options to decide whether we need to parse */
                var readOptions = false;
                data.params = [];
                $('params', this).each(function (i) {
                    var type = escapeHTML(this.getAttribute('type'));
                    var name = this.getAttribute('name');
                    var opt = this.getAttribute('optional') || "";
                    var desc = $('desc', this).text();
                    
                    if (re_opt.test(type)) {
                        readOptions = true;
                    }
                    
                    data.params.push({
                        optional : (/true/i).test(opt), // bool
                        name : name,
                        type : type,
                        desc : desc
                    });
                });
                
                if (readOptions) {
                    data.options = [];
                    $('option', this).each(function () {
                        var option = {};
                        option['name'] = this.getAttribute('name');
                        option['default'] = this.getAttribute('default') || '';
                        option['type'] = escapeHTML(this.getAttribute('type'));
                        option['desc'] = deWikify($('desc', this).text());

                        data.options.push(option);
                    });
                }

                data.examples = [];
                /** examples */
                $('example', this).each(function (i) {
                    var iframe = '', exampleId = '';
                    var example = {};

                    example['code'] = $('code', this).text();
                    example['htmlCode'] = escapeHTML(example.code);
                    example['desc'] = deWikify(escapeHTML($('desc', this).text()));
                    example['css']  = $('css', this).text() || '';
                    example['inhead'] = $('inhead', this).text() || '';
                    example['html'] = $('html', this).text() || '';

                    exampleId = guid + 'iframeExample' + i;
                    example['exampleId'] = exampleId;
                    
                    if (example.html) {

                        iframe = '<iframe id="' + exampleId + '" class="example" src="' + blank_iframe + '"></iframe>';

                        // we're storing the example iframe source to insert in to 
                        // the iframe only once it's inserted in to the DOM.
                        example['runCode'] = iframeTemplate().replace(/%([a-z]*)%/ig, function (m, l) {
                            return example[l] || "";
                        });
                    } else {
                        example.runCode = '';
                    }

                    data.examples.push(example);
                });

                jquerydocs.data[searchName + data.id] = data;
            });
        });

        jquerydocs.categories.push(category); // FIXME should I warn if this exists?
    });

    jquerydocs.letters = unique($.map(letters.sort(), function (i) {
        return i.substr(0,1);
    }));
    
    // attachFind(jquerydocs);

    $(document).trigger('api-load-success');
}

// helpers

function attachFind(o) {
    o.find = function (s, by) {
        var found = [], 
            tmp = {}, 
            tmpNames = [], 
            lettersLK = {}, 
            letters = [],
            catsLK = {},
            cats = [],
            catPointer = 0,
            subLK = {},
            sub = [],
            data = {};
            
        var i = 0;
        s = s.toLowerCase();
        by = (by || 'searchname').toLowerCase();
        
        if (by == 'name') by = 'searchname'; // search without the $.
        
        for (i = 0; i < jquerydocs.searchNames.length; i++) {
            if (jquerydocs.data[jquerydocs.searchNames[i]][by] && jquerydocs.data[jquerydocs.searchNames[i]][by].toLowerCase().indexOf(s) == 0) {
                data = tmp[jquerydocs.searchNames[i]] = jquerydocs.data[jquerydocs.searchNames[i]];
                tmpNames.push(jquerydocs.searchNames[i]);
                
                if (!lettersLK[jquerydocs.searchNames[i].substr(0, 1)]) {
                    lettersLK[jquerydocs.searchNames[i].substr(0, 1)] = true;
                    letters.push(jquerydocs.searchNames[i].substr(0, 1));
                }
                
                if (typeof catsLK[data.category] == 'undefined') {
                    catsLK[data.category] = catPointer;
                    cats.push({ name : data.category, subcategories : [] });
                    catPointer++;
                }
                
                if (!subLK[data.subcategory]) {
                    subLK[data.subcategory] = true;
                    
                    cats[catsLK[data.category]].subcategories.push(data.subcategory);
                }
            }
        }
        
        tmpNames = tmpNames.sort().reverse(); // never sure if this is faster with the reverse
        i = tmpNames.length;
        while (i--) {
            found.push(tmp[tmpNames[i]]);
        }
        
        // this is kind of noddy, but returns the same object as we queried - which is cool!
        found.letters = letters;
        found.categories = cats;
        found.data = tmp;
        found.searchNames = tmpNames;
        attachFind(found);
        
        return found;
    };
}

function fieldMap() {
    return {
        
    }
}

function unique(a) {
    var ret = [], done = {};

    try {
        for ( var i = 0, length = a.length; i < length; i++ ) {
            var id = a[ i ] ;

            if ( !done[ id ] ) {
                done[ id ] = true;
                ret.push( a[ i ] );
            }
        }

    } catch( e ) {
        ret = a;
    }

    return ret;
}

function iframeTemplate() {
    // array so that we maintain some formatting
    return [
        '<!' + 'DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"', 
        '    "http://www.w3.org/TR/html4/loose.dtd">', 
        '<' + 'html>', 
        '<' + 'head>', 
        '<base href="http://docs.jquery.com" />', 
        '<' + 'script src="' + example_jquery + '"><' + '/script>', 
        '%inhead%', 
        '<' + 'script>', 
        '$(document).ready(function(){', '%code%', '  });', 
        '<' + '/script>', 
        '<' + 'style>', 
        '%css%', 
        '<' + '/style>', 
        '<' + '/head>', 
        '<' + 'body>', 
        '%html%', 
        '<' + '/body>', 
        '<' + '/html>'
    ].join("\n");
}



/** public utility functions */

window.escapeHTML = function (s) {
    // converts null to string
    return (s+"").replace(/[<>]/g, function (m) {
        if (m == '<') return '&lt;';
        else if (m == '>') return '&gt;';
    });
};

window.cleanSelector = function(s) {
    return (s+"").replace(/[\$\.]/g, function (m) {
        // handle escaping characters that break the selector engine
        if (m == '$') {
            return '\\$';
        } else if (m == '.') {
            return '\\.';
        }
    });
};

window.linkifyTypes = function(type) {
    // cheeky way to avoid doing a massive if (m == x || m == y || m == etc) - we just do an .indexOf()
    var nodocs = '|jQuery|XMLHttpRequest|Plugins|Validator|Validation|undefined|or|Any|DOM|Map|top|left|lt|gt|\(s\)||'; // note we purposely include an empty match

    return type ? $.map(type.replace(/DOMElement/g, 'DOM Element').split(/, /), function (n) {
        // match words and linkify, then italic to the optionals
        return n.replace(/boolean/, 'Boolean').replace(/\b[a-z]*\b/gi, function (m, l) {
            // special case
            if (m == 'Elements') {
                return '<a href="http://docs.jquery.com/Types#Element">Element</a>s';
            // no specific documentation for these types
            } else if (nodocs.indexOf('|' + m + '|') !== -1) {
                return m;
            } else {
                return '<a href="http://docs.jquery.com/Types#' + m + '">' + m + '</a>';
            }
        });
    }).join(', ') : "";
};

window.deWikify = function (s) {
    return (""+s).replace(/'''.*?'''/g, function (m) {
        return '<strong>' + m.replace(/'''/g, '') + '</strong>';
    }).replace(/''.*?''/g, function (m) {
        return '<em>' + m.replace(/''/g, '') + '</em>';
    }).replace(/\[http.*?\]/, function (m) {
        var p = m.replace(/^\[/, '').replace(/\]$/, '').split(/ /);
        return '<a href="' + p[0] + '">' + (p.length == 2 ? p[1] : p[0]) + '</a>';
    }).replace(/(((^|\n)(\*|[0-9]+.).*)+)/g, function (m) {
        var type = 'ol';
        // strip leading new line
        m = m.replace( /^\s+|\s+$/g, "" );
        if (m.match(/^\*/)) type = 'ul';
        return '<' + type + '><li>' + m.replace(/\*?/g, '').split(/\n/).join("</li><li>") + '</li></' + type + '>';
    });
};

window.runExample = function(data) {
    if (!data.examples || data.examples.length == 0) return;
    
    var i, win, example;

    for (i = 0; i < data.examples.length; i++) {
        example = data.examples[i];
        
        win = $('#' + cleanSelector(example.exampleId)).get(0);
        if (win) {
            win = win.contentDocument || win.contentWindow.document;

            // from docs.jquery.com
            win.write(example.runCode.replace("$(document).ready(function(){", "window.onload = (function(){try{")
                .replace(/}\);\s*<\/sc/, "}catch(e){}});</sc")
                .replace("</head>", "<style>html,body{border:0; margin:0; padding:0;}</style></head>")
            );

            win.close();
        }
    }
};

window.fixLinks = function (context) {
    // since the source comes from the wiki, we need to adjust some of the links
    $('a', context).each(function () {
        var href = this.getAttribute('href');
        if (href && !href.match(/http/) && !href.match(/^#/) && this.className != 'fnName') {
            this.host = 'docs.jquery.com';
            this.pathname = this.pathname.replace(window.location.pathname, '');
        }
    });
};

})();

Untitled Java (4-Aug @ 16:33)

Syntax Highlighted Code

  1. import

Plain Code

import 

Untitled ActionScript (3-Aug @ 19:24)

Syntax Highlighted Code

  1. function aa() {
  2. trace("aa");
  3. }

Plain Code

function aa() {
trace("aa");
}

Untitled ActionScript (3-Aug @ 07:13)

Syntax Highlighted Code

  1. XZCZCXZX

Plain Code

XZCZCXZX

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

kanuj

Syntax Highlighted Code

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

Plain Code

<?
echo 'Hello World';
?>

Untitled ASP (2-Aug @ 18:08)

Syntax Highlighted Code

  1. jk

Plain Code

jk

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 JavaScript (2-Aug @ 12:57)

Syntax Highlighted Code

  1.  
  2.        // Keep track of the direction of the drag for use during onDragOver
  3.        var y = Event.getPageY(e);
  4.  
  5. [7 more lines...]

Plain Code


       // Keep track of the direction of the drag for use during onDragOver
       var y = Event.getPageY(e);

       if (y < this.lastY) {
           this.goingUp = true;
       } else if (y > this.lastY) {
           this.goingUp = false;
       }

       this.lastY = y;

Untitled JavaScript (2-Aug @ 01:38)

Syntax Highlighted Code

  1. alert("stuff");

Plain Code

alert("stuff");