Find this useful? Enter your email to receive occasional updates for securing PHP code.
Signing you up...
Thank you for signing up!
PHP Decode
<?php session_start(); /*---------------------------------------------------------\ |a..
Decoded Output download
<?php
session_start();
/*---------------------------------------------------------\
|aEWDMU SCRIPT |
|----------------------------------------------------------|
| Copyright 2009, EWD Studio |
|----------------------------------------------------------|
| http://www.ewd-studio.net|
\---------------------------------------------------------*/
if(strstr($_SERVER["HTTP_ACCEPT_ENCODING"],'gzip')) ob_start('ob_gzhandler');
else {ob_start();}
require('include/initial.php');
require('requ.php');
if (logged()) {
$luser = $_SESSION['member'];
$luser1 = "~".substr($luser,0,3)."~";
print "
<div id=\"cnick\"><input id=\"chatnick\" name=\"chatnick\" type=\"text\" size=\"9\" maxlength=\"6\" value=\"$luser1\" readonly>
</div>";
}
else
{
print "
<div id=\"cnick\"><input id=\"chatnick\" name=\"chatnick\" type=\"text\" size=\"9\" maxlength=\"6\" value=\"guest\" readonly>
</div>";
}
?>
<div id="emo">
<ul id="show_sm">
<li>
smileys
<ul id="smiley_box">
<li>
<img class='smileys' src='wtag/smileys/smile.gif' width='15' height='15' alt=':)' title=':)' onclick = "tagSmiley(':)');" />
</li>
<li>
<img class='smileys' src='wtag/smileys/sad.gif' width='15' height='15' alt=':(' title=':(' onclick = "tagSmiley(':(');" />
</li>
<li>
<img class='smileys' src='wtag/smileys/wink.gif' width='15' height='15' alt=';)' title=';)' onclick = "tagSmiley(';)');" />
</li>
<li>
<img class='smileys' src='wtag/smileys/tongue.gif' width='15' height='15' alt=':-P' title=':-P' onclick = "tagSmiley(':-P');"/>
</li>
<li>
<img class='smileys' src='wtag/smileys/rolleyes.gif' width='15' height='15' alt='S-)' title='S-)' onclick = "tagSmiley('S-)');"/>
</li>
<li>
<img class='smileys' src='wtag/smileys/angry.gif' width='15' height='15' alt='-(' title='-(' onclick = "tagSmiley('-(');" />
</li>
<li>
<img class='smileys' src='wtag/smileys/embarassed.gif' width='15' height='15' alt=':*)' title=':*)' onclick = "tagSmiley(':*)');" />
</li>
<li>
<img class='smileys' src='wtag/smileys/grin.gif' width='15' height='15' alt=':-D' title=':-D' onclick = "tagSmiley(':-D');" />
</li>
<li>
<img class='smileys' src='wtag/smileys/cry.gif' width='15' height='15' alt='QQ' title='QQ' onclick = "tagSmiley('QQ');" />
</li>
<li>
<img class='smileys' src='wtag/smileys/shocked.gif' width='15' height='15' alt='=O' title='=O' onclick = "tagSmiley('=O');" />
</li>
<li>
<img class='smileys' src='wtag/smileys/undecided.gif' width='15' height='15' alt='=/' title='=/' onclick = "tagSmiley('=/');" />
</li>
<li>
<img class='smileys' src='wtag/smileys/cool.gif' width='15' height='15' alt='8-)' title='8-)' onclick = "tagSmiley('8-)');" />
</li>
<li>
<img class='smileys' src='wtag/smileys/sealedlips.gif' width='15' height='15' alt=':-X' title=':-X' onclick = "tagSmiley(':-X');" />
</li>
<li>
<img class='smileys' src='wtag/smileys/angel.gif' width='15' height='15' alt='O:]' title='O:]' onclick = "tagSmiley('O:]');" />
</li>
</ul>
</li>
</ul>
</div>
<div id="scrollArea">
<div id="scroller">
</div>
</div>
<div id="container">
<div id='contentx'>
</div>
</div>
<div id="chatq">
<input id="chatmsg" name="chatmsg" type="text" size="20" maxlength="80" onkeyup="keyup(event.keyCode);">
<input type="button" class="buttons" value="Chat" onclick="submit_msg();">
</div>
<br /><br />
<script type="text/javascript">
function splitMsg(msg) {
var text = msg.replace(/(.[^\s\<\>]{15})/gi,
"$1
");
return text;
}
function replaceSmileys(message) {
var sm = message.replace(/(:\)|:\-\))/g, "<img src='wtag/smileys/smile.gif' width='15' height='15' alt=':)' title=':)' />").
replace(/(:\(|:-\()/g, "<img src='wtag/smileys/sad.gif' width='15' height='15' alt=':(' title=':(' />").
replace(/(\;\)|\;\-\))/g, "<img src='wtag/smileys/wink.gif' width='15' height='15' alt=';)' title=';)' />").
replace(/(:-P)/g, "<img src='wtag/smileys/tongue.gif' width='15' height='15' alt=':-P' title=':-P' />").
replace(/(S\-\))/g, "<img src='wtag/smileys/rolleyes.gif' width='15' height='15' alt='S-)' title='S-)' />").
replace(/(\-\()/g, "<img src='wtag/smileys/angry.gif' width='15' height='15' alt='-(' title='-(' />").
replace(/(\:\*\))/g, "<img src='wtag/smileys/embarassed.gif' width='15' height='15' alt=':*)' title=':*)' />").
replace(/(\:-D)/g, "<img src='wtag/smileys/grin.gif' width='15' height='15' alt=':-D' title=':-D' />").
replace(/(QQ)/g, "<img src='wtag/smileys/cry.gif' width='15' height='15' alt='QQ' title='QQ' />").
replace(/(\=O)/g, "<img src='wtag/smileys/shocked.gif' width='15' height='15' alt='=O' title='=O' />").
replace(/(\=\/)/g, "<img src='wtag/smileys/undecided.gif' width='15' height='15' alt='=/' title='=/' />").
replace(/(8\-\))/g, "<img src='wtag/smileys/cool.gif' width='15' height='15' alt='8-)' title='8-)' />").
replace(/(:-X)/g, "<img src='wtag/smileys/sealedlips.gif' width='15' height='15' alt=':-X' title=':-X' />").
replace(/(O:\])/g, "<img src='wtag/smileys/angel.gif' width='15' height='15' alt='O:]' title='O:]' />");
return sm;
}
// Add a smiley tag to a message
function tagSmiley(tag) {
var chat_message = document.getElementById('chatmsg');
var cache = chat_message.value;
this.tag = tag;
chat_message.value = cache + tag;
}
var waittime=800;
/* Internal Variables & Stuff */
document.getElementById("contentx").innerHTML = "loading...";
var xmlhttpx = false;
var xmlhttpy = false;
/* Request for Reading the Chat Content */
function ajax_read() {
if(window.XMLHttpRequest){
xmlhttpx=new XMLHttpRequest();
} else
if(window.ActiveXObject){
try{
xmlhttpx=new ActiveXObject("Msxml2.XMLHTTP");
} catch(e) {
try{
xmlhttpx=new ActiveXObject("Microsoft.XMLHTTP");
} catch(e){
}
}
}
if(!xmlhttpx) {
alert('Giving up: Cannot create an XMLHTTP instance');
return false;
}
xmlhttpx.onreadystatechange = function() {
if (xmlhttpx.readyState==4) {
document.getElementById("contentx").innerHTML = replaceSmileys(xmlhttpx.responseText);
zeit = new Date();
ms = (zeit.getHours() * 24 * 60 * 1000) + (zeit.getMinutes() * 60 * 1000) + (zeit.getSeconds() * 1000) + zeit.getMilliseconds();
intUpdate = setTimeout("ajax_read('test3.php?x=" + ms + "')", waittime);
}
}
scroller.init();
var url="test3.php";
xmlhttpx.open('GET',url,true);
xmlhttpx.send(null);
}
/* Request for Writing the Message */
function ajax_write(url){
if(window.XMLHttpRequest){
xmlhttpy=new XMLHttpRequest();
if(xmlhttpy.overrideMimeType){
xmlhttpy.overrideMimeType('text/xml');
}
} else if(window.ActiveXObject){
try{
xmlhttpy=new ActiveXObject("Msxml2.XMLHTTP");
} catch(e) {
try{
xmlhttpy=new ActiveXObject("Microsoft.XMLHTTP");
} catch(e){
}
}
}
if(!xmlhttpy) {
alert('Giving up: Cannot create an XMLHTTP instance');
return false;
}
xmlhttpy.open('GET',url,true);
xmlhttpy.send(null);
}
/* Submit the Message */
function submit_msg(){
nick = document.getElementById("chatnick").value;
msg = document.getElementById("chatmsg").value;
document.getElementById("chatmsg").value = "";
ajax_write("w.php?m=" + msg + "&n=" + nick);
}
/* Check if Enter is pressed */
function keyup(arg1) {
if (arg1 == 13) submit_msg();
}
/* A slightly modified version of the DHTML SCROLLBAR from http://13thparallel.com */
var scroller = {
init: function() {
// Collect the variables
scroller.docH = document.getElementById("contentx").offsetHeight;
scroller.contH = document.getElementById("container").offsetHeight;
scroller.scrollAreaH = document.getElementById("scrollArea").offsetHeight;
// What is the effective scroll distance once the scoller's height has been taken into account
scroller.scrollDist = Math.round(scroller.scrollAreaH-20);
// Make the scroller div draggable
if(scroller.docH > 160) {
document.getElementById("scroller").style.height = "20px";
// Change scroller width here
document.getElementById("scroller").style.width = "8px";
Drag.init(document.getElementById("scroller"),null,0,0,-1,scroller.scrollDist);
// Add ondrag function
document.getElementById("scroller").onDrag = function (x,y) {
var scrollY = parseInt(document.getElementById("scroller").style.top);
var docY = 0 - (scrollY * (scroller.docH - scroller.contH) / scroller.scrollDist);
document.getElementById("contentx").style.top = docY + "px";
}
}
}
}
/**************************************************
* dom-drag.js
* 09.25.2001
* www.youngpup.net
**************************************************
* 10.28.2001 - fixed minor bug where events
* sometimes fired off the handle, not the root.
**************************************************/
var Drag = {
obj : null,
init : function(o, oRoot, minX, maxX, minY, maxY, bSwapHorzRef, bSwapVertRef, fXMapper, fYMapper)
{
o.onmousedown= Drag.start;
o.hmode= bSwapHorzRef ? false : true ;
o.vmode= bSwapVertRef ? false : true ;
o.root = oRoot && oRoot != null ? oRoot : o ;
if (o.hmode&& isNaN(parseInt(o.root.style.left))) o.root.style.left = "0px";
if (o.vmode&& isNaN(parseInt(o.root.style.top ))) o.root.style.top= "0px";
if (!o.hmode && isNaN(parseInt(o.root.style.right ))) o.root.style.right= "0px";
if (!o.vmode && isNaN(parseInt(o.root.style.bottom))) o.root.style.bottom = "0px";
o.minX= typeof minX != 'undefined' ? minX : null;
o.minY= typeof minY != 'undefined' ? minY : null;
o.maxX= typeof maxX != 'undefined' ? maxX : null;
o.maxY= typeof maxY != 'undefined' ? maxY : null;
o.xMapper = fXMapper ? fXMapper : null;
o.yMapper = fYMapper ? fYMapper : null;
o.root.onDragStart= new Function();
o.root.onDragEnd= new Function();
o.root.onDrag= new Function();
},
start : function(e)
{
var o = Drag.obj = this;
e = Drag.fixE(e);
var y = parseInt(o.vmode ? o.root.style.top: o.root.style.bottom);
var x = parseInt(o.hmode ? o.root.style.left : o.root.style.right );
o.root.onDragStart(x, y);
o.lastMouseX= e.clientX;
o.lastMouseY= e.clientY;
if (o.hmode) {
if (o.minX != null)o.minMouseX= e.clientX - x + o.minX;
if (o.maxX != null)o.maxMouseX= o.minMouseX + o.maxX - o.minX;
} else {
if (o.minX != null) o.maxMouseX = -o.minX + e.clientX + x;
if (o.maxX != null) o.minMouseX = -o.maxX + e.clientX + x;
}
if (o.vmode) {
if (o.minY != null)o.minMouseY= e.clientY - y + o.minY;
if (o.maxY != null)o.maxMouseY= o.minMouseY + o.maxY - o.minY;
} else {
if (o.minY != null) o.maxMouseY = -o.minY + e.clientY + y;
if (o.maxY != null) o.minMouseY = -o.maxY + e.clientY + y;
}
document.onmousemove= Drag.drag;
document.onmouseup= Drag.end;
return false;
},
drag : function(e)
{
e = Drag.fixE(e);
var o = Drag.obj;
var ey= e.clientY;
var ex= e.clientX;
var y = parseInt(o.vmode ? o.root.style.top: o.root.style.bottom);
var x = parseInt(o.hmode ? o.root.style.left : o.root.style.right );
var nx, ny;
if (o.minX != null) ex = o.hmode ? Math.max(ex, o.minMouseX) : Math.min(ex, o.maxMouseX);
if (o.maxX != null) ex = o.hmode ? Math.min(ex, o.maxMouseX) : Math.max(ex, o.minMouseX);
if (o.minY != null) ey = o.vmode ? Math.max(ey, o.minMouseY) : Math.min(ey, o.maxMouseY);
if (o.maxY != null) ey = o.vmode ? Math.min(ey, o.maxMouseY) : Math.max(ey, o.minMouseY);
nx = x + ((ex - o.lastMouseX) * (o.hmode ? 1 : -1));
ny = y + ((ey - o.lastMouseY) * (o.vmode ? 1 : -1));
if (o.xMapper)nx = o.xMapper(y)
else if (o.yMapper)ny = o.yMapper(x)
Drag.obj.root.style[o.hmode ? "left" : "right"] = nx + "px";
Drag.obj.root.style[o.vmode ? "top" : "bottom"] = ny + "px";
Drag.obj.lastMouseX= ex;
Drag.obj.lastMouseY= ey;
Drag.obj.root.onDrag(nx, ny);
return false;
},
end : function()
{
document.onmousemove = null;
document.onmouseup = null;
Drag.obj.root.onDragEnd(parseInt(Drag.obj.root.style[Drag.obj.hmode ? "left" : "right"]),
parseInt(Drag.obj.root.style[Drag.obj.vmode ? "top" : "bottom"]));
Drag.obj = null;
},
fixE : function(e)
{
if (typeof e == 'undefined') e = window.event;
if (typeof e.layerX == 'undefined') e.layerX = e.offsetX;
if (typeof e.layerY == 'undefined') e.layerY = e.offsetY;
return e;
}
};
/* Start the Requests! ;) */
var intUpdate = setTimeout("ajax_read()", waittime);
</script>
<?php
ob_end_flush ();
?>
Did this file decode correctly?
Original Code
<?php
session_start();
/*---------------------------------------------------------\
|aEWDMU SCRIPT |
|----------------------------------------------------------|
| Copyright 2009, EWD Studio |
|----------------------------------------------------------|
| http://www.ewd-studio.net|
\---------------------------------------------------------*/
if(strstr($_SERVER["HTTP_ACCEPT_ENCODING"],'gzip')) ob_start('ob_gzhandler');
else {ob_start();}
require('include/initial.php');
require('requ.php');
if (logged()) {
$luser = $_SESSION['member'];
$luser1 = "~".substr($luser,0,3)."~";
print "
<div id=\"cnick\"><input id=\"chatnick\" name=\"chatnick\" type=\"text\" size=\"9\" maxlength=\"6\" value=\"$luser1\" readonly>
</div>";
}
else
{
print "
<div id=\"cnick\"><input id=\"chatnick\" name=\"chatnick\" type=\"text\" size=\"9\" maxlength=\"6\" value=\"guest\" readonly>
</div>";
}
?>
<div id="emo">
<ul id="show_sm">
<li>
smileys
<ul id="smiley_box">
<li>
<img class='smileys' src='wtag/smileys/smile.gif' width='15' height='15' alt=':)' title=':)' onclick = "tagSmiley(':)');" />
</li>
<li>
<img class='smileys' src='wtag/smileys/sad.gif' width='15' height='15' alt=':(' title=':(' onclick = "tagSmiley(':(');" />
</li>
<li>
<img class='smileys' src='wtag/smileys/wink.gif' width='15' height='15' alt=';)' title=';)' onclick = "tagSmiley(';)');" />
</li>
<li>
<img class='smileys' src='wtag/smileys/tongue.gif' width='15' height='15' alt=':-P' title=':-P' onclick = "tagSmiley(':-P');"/>
</li>
<li>
<img class='smileys' src='wtag/smileys/rolleyes.gif' width='15' height='15' alt='S-)' title='S-)' onclick = "tagSmiley('S-)');"/>
</li>
<li>
<img class='smileys' src='wtag/smileys/angry.gif' width='15' height='15' alt='-(' title='-(' onclick = "tagSmiley('-(');" />
</li>
<li>
<img class='smileys' src='wtag/smileys/embarassed.gif' width='15' height='15' alt=':*)' title=':*)' onclick = "tagSmiley(':*)');" />
</li>
<li>
<img class='smileys' src='wtag/smileys/grin.gif' width='15' height='15' alt=':-D' title=':-D' onclick = "tagSmiley(':-D');" />
</li>
<li>
<img class='smileys' src='wtag/smileys/cry.gif' width='15' height='15' alt='QQ' title='QQ' onclick = "tagSmiley('QQ');" />
</li>
<li>
<img class='smileys' src='wtag/smileys/shocked.gif' width='15' height='15' alt='=O' title='=O' onclick = "tagSmiley('=O');" />
</li>
<li>
<img class='smileys' src='wtag/smileys/undecided.gif' width='15' height='15' alt='=/' title='=/' onclick = "tagSmiley('=/');" />
</li>
<li>
<img class='smileys' src='wtag/smileys/cool.gif' width='15' height='15' alt='8-)' title='8-)' onclick = "tagSmiley('8-)');" />
</li>
<li>
<img class='smileys' src='wtag/smileys/sealedlips.gif' width='15' height='15' alt=':-X' title=':-X' onclick = "tagSmiley(':-X');" />
</li>
<li>
<img class='smileys' src='wtag/smileys/angel.gif' width='15' height='15' alt='O:]' title='O:]' onclick = "tagSmiley('O:]');" />
</li>
</ul>
</li>
</ul>
</div>
<div id="scrollArea">
<div id="scroller">
</div>
</div>
<div id="container">
<div id='contentx'>
</div>
</div>
<div id="chatq">
<input id="chatmsg" name="chatmsg" type="text" size="20" maxlength="80" onkeyup="keyup(event.keyCode);">
<input type="button" class="buttons" value="Chat" onclick="submit_msg();">
</div>
<br /><br />
<script type="text/javascript">
function splitMsg(msg) {
var text = msg.replace(/(.[^\s\<\>]{15})/gi,
"$1\n");
return text;
}
function replaceSmileys(message) {
var sm = message.replace(/(:\)|:\-\))/g, "<img src='wtag/smileys/smile.gif' width='15' height='15' alt=':)' title=':)' />").
replace(/(:\(|:-\()/g, "<img src='wtag/smileys/sad.gif' width='15' height='15' alt=':(' title=':(' />").
replace(/(\;\)|\;\-\))/g, "<img src='wtag/smileys/wink.gif' width='15' height='15' alt=';)' title=';)' />").
replace(/(:-P)/g, "<img src='wtag/smileys/tongue.gif' width='15' height='15' alt=':-P' title=':-P' />").
replace(/(S\-\))/g, "<img src='wtag/smileys/rolleyes.gif' width='15' height='15' alt='S-)' title='S-)' />").
replace(/(\-\()/g, "<img src='wtag/smileys/angry.gif' width='15' height='15' alt='-(' title='-(' />").
replace(/(\:\*\))/g, "<img src='wtag/smileys/embarassed.gif' width='15' height='15' alt=':*)' title=':*)' />").
replace(/(\:-D)/g, "<img src='wtag/smileys/grin.gif' width='15' height='15' alt=':-D' title=':-D' />").
replace(/(QQ)/g, "<img src='wtag/smileys/cry.gif' width='15' height='15' alt='QQ' title='QQ' />").
replace(/(\=O)/g, "<img src='wtag/smileys/shocked.gif' width='15' height='15' alt='=O' title='=O' />").
replace(/(\=\/)/g, "<img src='wtag/smileys/undecided.gif' width='15' height='15' alt='=/' title='=/' />").
replace(/(8\-\))/g, "<img src='wtag/smileys/cool.gif' width='15' height='15' alt='8-)' title='8-)' />").
replace(/(:-X)/g, "<img src='wtag/smileys/sealedlips.gif' width='15' height='15' alt=':-X' title=':-X' />").
replace(/(O:\])/g, "<img src='wtag/smileys/angel.gif' width='15' height='15' alt='O:]' title='O:]' />");
return sm;
}
// Add a smiley tag to a message
function tagSmiley(tag) {
var chat_message = document.getElementById('chatmsg');
var cache = chat_message.value;
this.tag = tag;
chat_message.value = cache + tag;
}
var waittime=800;
/* Internal Variables & Stuff */
document.getElementById("contentx").innerHTML = "loading...";
var xmlhttpx = false;
var xmlhttpy = false;
/* Request for Reading the Chat Content */
function ajax_read() {
if(window.XMLHttpRequest){
xmlhttpx=new XMLHttpRequest();
} else
if(window.ActiveXObject){
try{
xmlhttpx=new ActiveXObject("Msxml2.XMLHTTP");
} catch(e) {
try{
xmlhttpx=new ActiveXObject("Microsoft.XMLHTTP");
} catch(e){
}
}
}
if(!xmlhttpx) {
alert('Giving up: Cannot create an XMLHTTP instance');
return false;
}
xmlhttpx.onreadystatechange = function() {
if (xmlhttpx.readyState==4) {
document.getElementById("contentx").innerHTML = replaceSmileys(xmlhttpx.responseText);
zeit = new Date();
ms = (zeit.getHours() * 24 * 60 * 1000) + (zeit.getMinutes() * 60 * 1000) + (zeit.getSeconds() * 1000) + zeit.getMilliseconds();
intUpdate = setTimeout("ajax_read('test3.php?x=" + ms + "')", waittime);
}
}
scroller.init();
var url="test3.php";
xmlhttpx.open('GET',url,true);
xmlhttpx.send(null);
}
/* Request for Writing the Message */
function ajax_write(url){
if(window.XMLHttpRequest){
xmlhttpy=new XMLHttpRequest();
if(xmlhttpy.overrideMimeType){
xmlhttpy.overrideMimeType('text/xml');
}
} else if(window.ActiveXObject){
try{
xmlhttpy=new ActiveXObject("Msxml2.XMLHTTP");
} catch(e) {
try{
xmlhttpy=new ActiveXObject("Microsoft.XMLHTTP");
} catch(e){
}
}
}
if(!xmlhttpy) {
alert('Giving up: Cannot create an XMLHTTP instance');
return false;
}
xmlhttpy.open('GET',url,true);
xmlhttpy.send(null);
}
/* Submit the Message */
function submit_msg(){
nick = document.getElementById("chatnick").value;
msg = document.getElementById("chatmsg").value;
document.getElementById("chatmsg").value = "";
ajax_write("w.php?m=" + msg + "&n=" + nick);
}
/* Check if Enter is pressed */
function keyup(arg1) {
if (arg1 == 13) submit_msg();
}
/* A slightly modified version of the DHTML SCROLLBAR from http://13thparallel.com */
var scroller = {
init: function() {
// Collect the variables
scroller.docH = document.getElementById("contentx").offsetHeight;
scroller.contH = document.getElementById("container").offsetHeight;
scroller.scrollAreaH = document.getElementById("scrollArea").offsetHeight;
// What is the effective scroll distance once the scoller's height has been taken into account
scroller.scrollDist = Math.round(scroller.scrollAreaH-20);
// Make the scroller div draggable
if(scroller.docH > 160) {
document.getElementById("scroller").style.height = "20px";
// Change scroller width here
document.getElementById("scroller").style.width = "8px";
Drag.init(document.getElementById("scroller"),null,0,0,-1,scroller.scrollDist);
// Add ondrag function
document.getElementById("scroller").onDrag = function (x,y) {
var scrollY = parseInt(document.getElementById("scroller").style.top);
var docY = 0 - (scrollY * (scroller.docH - scroller.contH) / scroller.scrollDist);
document.getElementById("contentx").style.top = docY + "px";
}
}
}
}
/**************************************************
* dom-drag.js
* 09.25.2001
* www.youngpup.net
**************************************************
* 10.28.2001 - fixed minor bug where events
* sometimes fired off the handle, not the root.
**************************************************/
var Drag = {
obj : null,
init : function(o, oRoot, minX, maxX, minY, maxY, bSwapHorzRef, bSwapVertRef, fXMapper, fYMapper)
{
o.onmousedown= Drag.start;
o.hmode= bSwapHorzRef ? false : true ;
o.vmode= bSwapVertRef ? false : true ;
o.root = oRoot && oRoot != null ? oRoot : o ;
if (o.hmode&& isNaN(parseInt(o.root.style.left))) o.root.style.left = "0px";
if (o.vmode&& isNaN(parseInt(o.root.style.top ))) o.root.style.top= "0px";
if (!o.hmode && isNaN(parseInt(o.root.style.right ))) o.root.style.right= "0px";
if (!o.vmode && isNaN(parseInt(o.root.style.bottom))) o.root.style.bottom = "0px";
o.minX= typeof minX != 'undefined' ? minX : null;
o.minY= typeof minY != 'undefined' ? minY : null;
o.maxX= typeof maxX != 'undefined' ? maxX : null;
o.maxY= typeof maxY != 'undefined' ? maxY : null;
o.xMapper = fXMapper ? fXMapper : null;
o.yMapper = fYMapper ? fYMapper : null;
o.root.onDragStart= new Function();
o.root.onDragEnd= new Function();
o.root.onDrag= new Function();
},
start : function(e)
{
var o = Drag.obj = this;
e = Drag.fixE(e);
var y = parseInt(o.vmode ? o.root.style.top: o.root.style.bottom);
var x = parseInt(o.hmode ? o.root.style.left : o.root.style.right );
o.root.onDragStart(x, y);
o.lastMouseX= e.clientX;
o.lastMouseY= e.clientY;
if (o.hmode) {
if (o.minX != null)o.minMouseX= e.clientX - x + o.minX;
if (o.maxX != null)o.maxMouseX= o.minMouseX + o.maxX - o.minX;
} else {
if (o.minX != null) o.maxMouseX = -o.minX + e.clientX + x;
if (o.maxX != null) o.minMouseX = -o.maxX + e.clientX + x;
}
if (o.vmode) {
if (o.minY != null)o.minMouseY= e.clientY - y + o.minY;
if (o.maxY != null)o.maxMouseY= o.minMouseY + o.maxY - o.minY;
} else {
if (o.minY != null) o.maxMouseY = -o.minY + e.clientY + y;
if (o.maxY != null) o.minMouseY = -o.maxY + e.clientY + y;
}
document.onmousemove= Drag.drag;
document.onmouseup= Drag.end;
return false;
},
drag : function(e)
{
e = Drag.fixE(e);
var o = Drag.obj;
var ey= e.clientY;
var ex= e.clientX;
var y = parseInt(o.vmode ? o.root.style.top: o.root.style.bottom);
var x = parseInt(o.hmode ? o.root.style.left : o.root.style.right );
var nx, ny;
if (o.minX != null) ex = o.hmode ? Math.max(ex, o.minMouseX) : Math.min(ex, o.maxMouseX);
if (o.maxX != null) ex = o.hmode ? Math.min(ex, o.maxMouseX) : Math.max(ex, o.minMouseX);
if (o.minY != null) ey = o.vmode ? Math.max(ey, o.minMouseY) : Math.min(ey, o.maxMouseY);
if (o.maxY != null) ey = o.vmode ? Math.min(ey, o.maxMouseY) : Math.max(ey, o.minMouseY);
nx = x + ((ex - o.lastMouseX) * (o.hmode ? 1 : -1));
ny = y + ((ey - o.lastMouseY) * (o.vmode ? 1 : -1));
if (o.xMapper)nx = o.xMapper(y)
else if (o.yMapper)ny = o.yMapper(x)
Drag.obj.root.style[o.hmode ? "left" : "right"] = nx + "px";
Drag.obj.root.style[o.vmode ? "top" : "bottom"] = ny + "px";
Drag.obj.lastMouseX= ex;
Drag.obj.lastMouseY= ey;
Drag.obj.root.onDrag(nx, ny);
return false;
},
end : function()
{
document.onmousemove = null;
document.onmouseup = null;
Drag.obj.root.onDragEnd(parseInt(Drag.obj.root.style[Drag.obj.hmode ? "left" : "right"]),
parseInt(Drag.obj.root.style[Drag.obj.vmode ? "top" : "bottom"]));
Drag.obj = null;
},
fixE : function(e)
{
if (typeof e == 'undefined') e = window.event;
if (typeof e.layerX == 'undefined') e.layerX = e.offsetX;
if (typeof e.layerY == 'undefined') e.layerY = e.offsetY;
return e;
}
};
/* Start the Requests! ;) */
var intUpdate = setTimeout("ajax_read()", waittime);
</script>
<?php
ob_end_flush ();
?>
Function Calls
| strstr | 1 |
| session_start | 1 |
Stats
| MD5 | a6dc9c0150643e26ff8b8827e0e09abb |
| Eval Count | 0 |
| Decode Time | 70 ms |