HEX
Server: Microsoft-IIS/8.5
System: Windows NT YDAWBH120 6.3 build 9600 (Windows Server 2012 R2 Standard Edition) AMD64
User: tentjecom_web (0)
PHP: 7.4.14
Disabled: NONE
Upload Files
File: D:/HostingSpaces/PvdBoogaard/indoorski.nl/backup/oude-site/cms/admin/templates/layout.logo.form.tpl
<script type="text/javascript">

var TextArray = {$logoTextList};
var HideLogoMessage = false;

function UpdateLogoImage(){
	var sendData = {};

	$('.ExtraText').each(function(i){
		sendData['ExtraText_' + i] = this.value;
	});

	$.post('remote.php?section=layout&action=updatelogo', sendData,
		function(xml) {
			if($('status', xml).text() == "success"){
				$('#currentLogoPreview').html(' ');
				$('#CurrentLogoContainer').html(' ');

				var img = $('<img />').attr('src', "{$config.siteURL}/images/"+$('logofile', xml).text()+'?'+Math.floor(Math.random()*1001));
				if($('bgimg', xml).text() != 'none'){
					$(img).css('background-image','url("'+$('bgimg', xml).text()+'")').css('padding','5px');
				}
				$(img).appendTo('#currentLogoPreview');

				$('#CurrentLogoContainer').html($('#currentLogoPreview').html());
				if(!HideLogoMessage){
					$('#MainMessage').successMessage('{$lang.layoutLogoUpdatedSuccess|iwp_js}');
				}

			}else{
				if(!HideLogoMessage){
					$('#MainMessage').errorMessage('Error: '+$('message', xml).text());
				}
			}
			HideLogoMessage = false;
		}, 'xml'
	);
}

function UpdateLogoOptionNone(){
	var sendData = {};

	if($('#UseAlternateTitle').attr('checked') == true){
		sendData['UseAlternateTitle'] = 'yes';
	}else{
		sendData['UseAlternateTitle'] = 'no';
	}

	sendData['AlternateText'] = $('#AlternateTitle').val();

	$.post('remote.php?section=layout&action=updatetitle', sendData,
		function(xml) {
			if($('status', xml).text() == "success"){
				ToggleLogoFields('none');
				$('#CurrentLogoContainer').html(' ');
				$('<img />').attr('src', '{$config.siteURL}/admin/images/nologo.gif').appendTo('#CurrentLogoContainer');
				$('#MainMessage').successMessage('{$lang.LogoOptionsSaved} <a href="{$config.siteURL}" target="_blank">{$lang.ViewSite}</a>');
			}else{
				$('#MainMessage').errorMessage('Error: '+$('message', xml).text());
			}
		}, 'xml'
	);
}

function ToggleLogoFields(option){
	//alert(option);
	if (option == 'create') {

		$('#LogoImageOptions').show();
		$('#LogoTextOptionsDiv').show();
		$('#CurrentSiteLogo').show();
		$('#LogoUpload').hide();
		$('#LogoText').hide();
		$('#ButtonTable').show();
		$('#LogoTextOptions').show();
		RefreshPreviewImage();

	} else if(option == 'upload') {
		$('#LogoImageOptions').hide();
		$('#LogoTextOptionsDiv').hide();
		$('#LogoTextOptions').hide();
		$('#ButtonTable').hide();
		$('#LogoTextOptions').hide();
		$('#LogoUpload').show();
		$('#LogoText').hide();
		$('#CurrentSiteLogo').show();

	} else if(option == 'none') {
		$('#LogoImageOptions').hide();
		$('#LogoTextOptionsDiv').hide();
		$('#LogoTextOptions').hide();
		$('#ButtonTable').hide();
		$('#LogoTextOptions').hide();
		$('#LogoUpload').hide();
		$('#LogoText').show();
		$('#CurrentSiteLogo').hide();
	}

}


function SetupTextFields(numTextFields){
	var html = '';
	var thisText = '';
	var refreshImage = false;
	html = '';

	for(i=0;i<numTextFields;i++){
		if(typeof TextArray[i] == 'undefined'){
			thisText = 'Example' + (i+1);
		}else{
			thisText = TextArray[i];
			refreshImage = true;
		}

		html += '<tr><td align="left" width="200" style="padding:5px 5px 5px 10px;">Text '+(i+1)+':</td>					<td align="left" valign="top"  style="padding:5px 5px 5px 10px;">						<input type="text" name="ExtraText'+i+'" id="ExtraText'+i+'" class="Field300 ExtraText" value="'+thisText+'">					</td>				</tr>';
	}

	$('#LogoTextOptionsDiv').html('<table class="Panel" style=" display: " id="LogoTextOptions">'+html+'</table>');
}


function RefreshPreviewImage(){
	var sendData = {};

	$('.ExtraText').each(function(i){
		sendData['ExtraText_' + i] = this.value;
	});

	$.post('remote.php?section=layout&action=refreshlogo', sendData,
		function(xml) {
			if($('status', xml).text() == "success"){
				$('#currentLogoPreview').html(' ');
				var img = $('<img />').attr('src', "{$config.siteURL}/tmp/"+$('logofile', xml).text()+'?'+Math.floor(Math.random()*1001));
				if($('bgimg', xml).text() != 'none'){
					$(img).css('background-image','url("'+$('bgimg', xml).text()+'")').css('padding','5px');
				}
				$(img).appendTo('#currentLogoPreview');

			}else{
				$('#MainMessage').errorMessage('Error: '+$('message', xml).text());
			}
		}, 'xml'
	);
}

function CheckAlternateTitle(showBox){

	if(showBox){
		$('#AlternateTitle').attr('disabled', !showBox);
		$('#AlternateTextArea').show();
	}else{
		$('#AlternateTitle').attr('disabled', !showBox);
		$('#AlternateTextArea').hide();
	}
}

$(document).ready(function() {
	SetupTextFields({$numTextFields});
	ToggleLogoFields('{$LogoImageSelected}');
	$('#LogoOption{$LogoImageSelected}').attr('checked', 'checked');
	CheckAlternateTitle($('#UseAlternateTitle').attr('checked'));


	if({$hasCurrentLogo}){
		var img = $('<img />').attr('src', '{$config.siteURL}/images/{$CurrentLogo}');

		if({$hasBgImg}){
			$(img).css('background-image','url("{$displayBgImg}")').css('padding','5px');
		}
		$(img).appendTo('#CurrentLogoContainer');

		if('{$CurrentLogo}' == 'websitelogo.png'){
			$('#currentLogoPreview').html(' ');
			$(img).clone().appendTo('#currentLogoPreview');
		}
	}else{
		$('<img />').attr('src', '{$config.siteURL}/admin/images/nologo.gif').appendTo('#CurrentLogoContainer');
	}
});


function UploadLogoImage()
{
	$.ajaxFileUpload
	(
		{
			url:'remote.php?section=layout&action=uploadlogo',
			secureuri:false,
			fileElementId:'LogoFile',
			dataType: 'xml',
			beforeSend: function (){ },
			success: function (xml, status)
			{
				if($('status', xml).text() == "success"){
					$('#CurrentLogoContainer').html(' ');
					$('<img />').attr('src', '{$config.siteURL}/images/'+$('logofile', xml).text()).appendTo('#CurrentLogoContainer');
					$('#loadingUploadLogoSpan').remove();
					$('#MainMessage').successMessage({$lang.LogoUploadSuccess|iwp_FilterJavascriptString});
				}else{
					$('#MainMessage').errorMessage($('message', xml).text());
				}

			},
			error: function (data, status, e)
			{
				if (window.console && window.console.log) {
					console.log('Error ' + $('status', xml).text() + $('message', xml).text());
					console.log(e);
				}
			}
		}
	)
	return false;
}

</script>

					<div class="Text">{$lang.LogoIntro}</div>

			<table class="Panel" style="">
				<tr>
				  <td class="Heading2" colspan='2'>{$lang.LogoSettings}</td>
				</tr>
				<tr>
					<td align="left" width="200" style="padding:5px 5px 5px 10px;" valign="top">
{$lang.IWantToLogo}:
					</td>
					<td align="left" valign="top"  style="padding:5px 5px 5px 10px;">
					<table cellpadding="0" cellspacing="2" border="0" >
					<tr>
						<td><input type="radio" name="LogoOption" value="create" id="LogoOptioncreate" onClick="ToggleLogoFields(this.value);"></td>
						<td><label for="LogoOptioncreate">{$lang.LogoOptionGenerate}</label></td>
					</tr>
					<tr>
						<td><input type="radio" name="LogoOption" value="upload" id="LogoOptionupload" onClick="ToggleLogoFields(this.value);"></td>
						<td><label for="LogoOptionupload">{$lang.LogoOptionUpload}</label></td>
					</tr>
					<tr>
						<td><input type="radio" name="LogoOption" value="none" id="LogoOptionnone" onClick="ToggleLogoFields(this.value);"></td>
						<td><label for="LogoOptionnone">{$lang.LogoOptionText}</label></td>
					</tr>
					</table>


					</td>
				</tr>
			 </table>

			 <table class="Panel" style=" display:" id="CurrentSiteLogo">
				<tr>
				  <td class="Heading2" colspan='2'>{$lang.CurrentSiteLogo}</td>
				</tr>
				<tr id="CurrentLogoRow" style="display:">
					<td align="left" width="200" valign="top"  style="padding:5px 5px 5px 10px;">
						{$lang.CurrentSiteLogo}:
					</td>
					<td align="left" valign="top"  style="padding:5px 5px 5px 10px;" id="CurrentLogoContainer">

					</td>
				</tr>
			</table>
			<table class="Panel" style=" display: " id="LogoImageOptions">
				<tr>
				  <td class="Heading2" colspan='2'>{$lang.LogoOptions}</td>
				</tr>
			<tr>
				<td align="left" width="200" style="padding:5px 5px 15px 10px;" valign="top" >{$lang.LogoPreview}:</td>
				<td align="left" valign="top"  style="padding:5px 5px 15px 10px;" id="currentLogoPreview"></td>
			</tr>
</table>

<input type="hidden" name="SelectedLogo" id="SelectedLogo" value="none">

<div id="LogoTextOptionsDiv">
<table class="Panel" style="" id="LogoTextOptions">
</table>
</div>

<table class="Panel" style=" display: none" id="ButtonTable">
					<tr>
					<td align="left" width="200" style="padding:5px 5px 15px 10px;">

					</td>
					<td align="left" valign="top"  style="padding:5px 5px 15px 10px;">
					<input type="button" value="{$lang.RefreshLogoImage}" class="Button" onClick="RefreshPreviewImage();">
					<input type="button" value="{$lang.Save}" class="Button" onClick="UpdateLogoImage();">
					</td>
				</tr>
			</table>



			<table class="Panel" style=" display: " id="LogoUpload">
				<tr>
					<td class="Heading2" colspan='2'>{$lang.LogoUpload}</td>
				</tr>
				<tr>
					<td align="left" width="200" valign="top" style="padding:5px 5px 5px 10px;">
						{$lang.SelectLogoUpload}:
					</td>
					<td align="left" valign="top"  style="padding:5px 5px 5px 10px;">
						<input type="file" name="LogoFile" id="LogoFile" class="Field300" value=""><br />
						<div style="margin-top:5px; color:gray">{$LogoRecommendations}</div>

					</td>
				</tr>
					<tr>
					<td align="left" width="200" style="padding:5px 5px 15px 10px;">

					</td>
					<td align="left" valign="top"  style="padding:5px 5px 15px 10px;">
					<input type="button" value="{$lang.logoUpdateImage}" class="Button"  onclick="return UploadLogoImage();">
					</td>
				</tr>
			</table>

			<table class="Panel" style=" display: " id="LogoText">
				<tr>
					<td class="Heading2" colspan='2' >{$lang.LogoText}</td>
				</tr>
				<tr>
					<td align="left" width="200" valign="top"  style="padding:5px 5px 5px 10px;" valign="top">
						{$lang.IWantToLogo}:
					</td>
					<td align="left" valign="top"  style="padding:5px 5px 5px 10px;">

						<input type="radio" name="UseAlternateTitle" value="no" id="UseWebsiteTitle" onClick="CheckAlternateTitle(false);" {$AlternateNotChecked}> <label for="UseWebsiteTitle">{$lang.LogoUseTitle|strreplace,'%websiteTitle%',$config.siteName}</label><br/>

						<input type="radio" name="UseAlternateTitle" value="yes" id="UseAlternateTitle" onClick="CheckAlternateTitle(true);" {$AlternateChecked}> <label for="UseAlternateTitle">{$lang.LogoUseAlternate}</label><br/>
						<div id="AlternateTextArea" style="display: none"><img src="images/nodejoin.gif" width="20" height="20" align="absmiddle"> <input type="text" name="AlternateTitle" id="AlternateTitle" class="Field250" value="{$AlternateTitleText}"></div>

					</td>
				</tr>
				<tr>
					<td align="left" width="200" style="padding:5px 5px 15px 10px;">
					</td>
					<td align="left" valign="top"  style="padding:5px 5px 15px 10px;">
					<input type="button" value="Save" id="LogoUpdateButton" style="width: 80px;" class="Button" onClick="UpdateLogoOptionNone();">
					</td>
				</tr>
			</table>
			<br>