Vanilla 1 is no longer supported or maintained. If you need a copy, you can get it here.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
PHP Issue with FileBrowser
Comment at the bottom
echo("<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">
<html xmlns=\"http://www.w3.org/1999/xhtml\" xml:lang=\"en-us\">
<head>
<title>".$Config->PageTitle."</title>
<link rel=\"stylesheet\" type=\"text/css\" href=\"".$Config->StyleUrl."\" />
<script type=\"text/javascript\" src=\"_prototype.js\"></script>
<script language=\"Javascript\" type=\"text/javascript\">
//<![CDATA[
var BodyLoaded = 0;
if (document.all && !document.getElementById) {
document.getElementById = function(id) {
return document.all[id];
}
}
function copy(inElement) {
if (inElement.createTextRange) {
var range = inElement.createTextRange();
if (range && BodyLoaded==1) range.execCommand('Copy');
} else {
var flashcopier = 'flashcopier';
if(!document.getElementById(flashcopier)) {
var divholder = document.createElement('div');
divholder.id = flashcopier;
document.body.appendChild(divholder);
}
document.getElementById(flashcopier).innerHTML = '';
var divinfo = '<embed src=\"_clipboard.swf\" FlashVars=\"clipboard='+escape(inElement.value)+'\" width=\"0\" height=\"0\" type=\"application/x-shockwave-flash\"></embed>';
document.getElementById(flashcopier).innerHTML = divinfo;
}
}
function writeImage(imageName, imageWidth, imageHeight, imageID) {
//var windowWidth = getWindowWidth();
var windowWidth = document.getElementsByClassName('DisplayItemImage')[0].offsetWidth;
if (windowWidth < imageWidth) {
var newWidth = windowWidth;
var newHeight = Math.round((newWidth*imageHeight)/(imageWidth+40));
document.write('<span id=\"sm'+imageID+'\">'
+'<div class=\"Notice\">Note: this image has been shrunk to fit on your screen. <a href=\"Javascript:resizeImage('+imageID+');\">Click here to view the image at actual size.</a></div>'
+'<img src=\"'+imageName+'\" height=\"'+newHeight+'\" width=\"'+newWidth+'\" />'
+'</span>'
+'<span id=\"lg'+imageID+'\" style=\"display: none;\">'
+'<div class=\"Notice\">Note: this image does not fit on your screen. <a href=\"Javascript:resizeImage('+imageID+');\">Click here to fit the image to your screen.</a></div>'
+'<img src=\"'+imageName+'\" height=\"'+imageHeight+'\" width=\"'+imageWidth+'\" />'
+'</span>');
} else {
document.write('<img src=\"'+imageName+'\" height=\"'+imageHeight+'\" width=\"'+imageWidth+'\" />');
}
}
function getWindowWidth() {
var myWidth = 0;
if( typeof( window.innerWidth ) == 'number' ) {
myWidth = window.innerWidth - 20;
} else if (document.documentElement && document.documentElement.clientWidth) {
myWidth = document.documentElement.clientWidth;
} else if (document.body && document.body.clientWidth) {
myWidth = document.body.clientWidth;
} else {
myWidth = screen.width;
}
return myWidth;
}
function resizeImage(imageID, link) {
var lg = document.getElementById('lg'+imageID);
var sm = document.getElementById('sm'+imageID);
if (lg && sm) {
switchVisibility(lg);
switchVisibility(sm);
}
}
function switchVisibility(object) {
if (object.style.display == 'none') {
object.style.display = 'block';
} else {
object.style.display = 'none';
}
}
//]]>
</script>
</head>
<body onload=\"BodyLoaded=1\">");
Is there a quote missing here? It's driving me nuts. On PHP 5.1, it displays the code in the browser broke
document.write('<span id="sm'+imageID+'">'
+'<div class="Notice">Note: this image h
0
This discussion has been closed.
Comments