Jump to content

Скрипт удаления не работает (Ошибка)

Featured Replies

Здравствуйте, в моем исходном коде есть следующий раздел

 

Quote

	<script type='text/javascript'>
		var ipsDebug = false;		
	
		var CKEDITOR_BASEPATH = '//domainname.to/applications/core/interface/ckeditor/ckeditor/';
	
		var ipsSettings = {
			
			
			cookie_path: "/",
			
			cookie_prefix: "ips4_",
			
			
			cookie_ssl: true,
			
			upload_imgURL: "",
			message_imgURL: "",
			notification_imgURL: "",
			baseURL: "//domainname.to/",
			jsURL: "//domainname.to/applications/core/interface/js/js.php",
			csrfKey: "8371e0045f25339dc12db1cca5b1e212",
			antiCache: "026d4e282a",
			disableNotificationSounds: false,
			useCompiledFiles: true,
			links_external: true,
			memberID: 0,
			lazyLoadEnabled: true,
			blankImg: "//domainname.to/applications/core/interface/js/spacer.png",
			analyticsProvider: "none",
			viewProfiles: true,
			mapProvider: 'none',
			mapAhurepiKsey: '',
			
		};
	</script>

Я уже нашел этот файл:

 

template_4_62354234bf97617c36aa125473bea_global.234214a.php

  

<?php

return <<<'VALUE'
"namespace IPS\\Theme;\nclass class_core_global_global extends \\IPS\\Theme\\Template\n{\n\tpublic $cache_key = '1b13f0c87faaa5a8ede98694f87298c5';\n\tfunction advertisementImage( $advertisement, $acpLink=NULL ) {\n\t\t$return = '';\n\t\t$return .= <<<CONTENT\n\n\nCONTENT;\n\nif ( \\count( $advertisement->_images ) ):\n$return .= <<<CONTENT\n\n<div class='ips\nCONTENT;\n\n$return .= htmlspecialchars( mb_ucfirst(\\IPS\\SUITE_UNIQUE_KEY), ENT_QUOTES | ENT_DISALLOWED, 'UTF-8', FALSE );\n$return .= <<<CONTENT\n ipsSpacer_both ipsSpacer_half'>\n\t<ul class='ipsList_inline ipsType_center ipsList_reset ipsList_noSpacing'>\n\t\t\nCONTENT;\n\n$hmacKey = hash_hmac( \"sha256\", $advertisement->link, \\IPS\\Settings::i()->site_secret_key . 'a' );\n$return .= <<<CONTENT\n\n\t\t<li class='ips\nCONTENT;\n\n$return .= htmlspecialchars( mb_ucfirst(\\IPS\\SUITE_UNIQUE_KEY), ENT_QUOTES | ENT_DISALLOWED, 'UTF-8', FALSE );\n$return .= <<<CONTENT\n_large ipsResponsive_showDesktop ipsResponsive_inlineBlock ipsAreaBackground_light'>\n\t\t\t\nCONTENT;\n\nif ( $advertisement->link ):\n$return .= <<<CONTENT\n\n\t\t\t\t<a href='\nCONTENT;\n\nif ( $acpLink ):\n$return .= <<<CONTENT\n\nCONTENT;\n$return .= htmlspecialchars( $acpLink->makeSafeForAcp(), ENT_QUOTES | ENT_DISALLOWED, 'UTF-8', FALSE );\n$return .= <<<CONTENT\n\nCONTENT;\n\nelse:\n$return .= <<<CONTENT\n\nCONTENT;\n\n$return .= htmlspecialchars( \\IPS\\Http\\Url::internal( \"app=core&module=system&controller=redirect&do=advertisement&ad={$advertisement->id}&key={$hmacKey}\", \"front\", \"\", array(), 0 ), ENT_QUOTES | ENT_DISALLOWED, 'UTF-8', TRUE );\n$return .= <<<CONTENT\n\nCONTENT;\n\nendif;\n$return .= <<<CONTENT\n' \nCONTENT;\n\nif ( $advertisement->new_window ):\n$return .= <<<CONTENT\ntarget='_blank'\nCONTENT;\n\nendif;\n$return .= <<<CONTENT\n rel='nofollow noopener'>\n\t\t\t\nCONTENT;\n\nendif;\n$return .= <<<CONTENT\n\n\t\t\t\t<img src='\nCONTENT;\n\n$return .= \\IPS\\File::get( $advertisement->storageExtension(), $advertisement->_images['large'] )->url;\n$return .= <<<CONTENT\n' alt=\"\nCONTENT;\n\nif ( $advertisement->image_alt ):\n$return .= <<<CONTENT\n\nCONTENT;\n$return .= htmlspecialchars( $advertisement->image_alt, ENT_QUOTES | ENT_DISALLOWED, 'UTF-8', FALSE );\n$return .= <<<CONTENT\n\nCONTENT;\n\nelse:\n$return .= <<<CONTENT\n\nCONTENT;\n\n$return .= \\IPS\\Member::loggedIn()->language()->addToStack( htmlspecialchars( 'advertisement_alt', ENT_DISALLOWED, 'UTF-8', FALSE ), TRUE, array(  ) );\n$return .= <<<CONTENT\n\nCONTENT;\n\nendif;\n$return .= <<<CONTENT\n\" class='ipsImage ipsContained'>\n\t\t\t\nCONTENT;\n\nif ( $advertisement->link ):\n$return .= <<<CONTENT\n\n\t\t\t\t<\/a>\n\t\t\t\nCONTENT;\n\nendif;\n$return .= <<<CONTENT\n\n\t\t<\/li>\n\t\t\nCONTENT;\n\nif ( !$acpLink  ):\n$return .= <<<CONTENT\n\n\t\t<li class='ips\nCONTENT;\n\n$return .= htmlspecialchars( mb_ucfirst(\\IPS\\SUITE_UNIQUE_KEY), ENT_QUOTES | ENT_DISALLOWED, 'UTF-8', FALSE );\n$return .= <<<CONTENT\n_medium ipsResponsive_showTablet ipsResponsive_inlineBlock ipsAreaBackground_light'>\n\t\t\t\nCONTENT;\n\nif ( $advertisement->link ):\n$return .= <<<CONTENT\n\n\t\t\t\t<a href='\nCONTENT;\n\nif ( $acpLink ):\n$return .= <<<CONTENT\n\nCONTENT;\n$return .= htmlspecialchars( $acpLink->makeSafeForAcp(), ENT_QUOTES | ENT_DISALLOWED, 'UTF-8', FALSE );\n$return .= <<<CONTENT\n\nCONTENT;\n\nelse:\n$return .= <<<CONTENT\n\nCONTENT;\n\n$return .= htmlspecialchars( \\IPS\\Http\\Url::internal( \"app=core&module=system&controller=redirect&do=advertisement&ad={$advertisement->id}&key={$hmacKey}\", \"front\", \"\", array(), 0 ), ENT_QUOTES | ENT_DISALLOWED, 'UTF-8', TRUE );\n$return .= <<<CONTENT\n\nCONTENT;\n\nendif;\n$return .= <<<CONTENT\n' \nCONTENT;\n\nif ( $advertisement->new_window ):\n$return .= <<<CONTENT\ntarget='_blank'\nCONTENT;\n\nendif;\n$return .= <<<CONTENT\n rel='nofollow noopener'>\n\t\t\t\nCONTENT;\n\nendif;\n$return .= <<<CONTENT\n\n\t\t\t\t<img src='\nCONTENT;\n\nif ( !empty( $advertisement->_images['medium'] ) ):\n$return .= <<<CONTENT\n\nCONTENT;\n\n$return .= \\IPS\\File::get( $advertisement->storageExtension(), $advertisement->_images['medium'] )->url;\n$return .= <<<CONTENT\n\nCONTENT;\n\nelse:\n$return .= <<<CONTENT\n\nCONTENT;\n\n$return .= \\IPS\\File::get( $advertisement->storageExtension(), $advertisement->_images['large'] )->url;\n$return .= <<<CONTENT\n\nCONTENT;\n\nendif;\n$return .= <<<CONTENT\n' alt=\"\nCONTENT;\n\nif ( $advertisement->image_alt ):\n$return .= <<<CONTENT\n\nCONTENT;\n$return .= htmlspecialchars( $advertisement->image_alt, ENT_QUOTES | ENT_DISALLOWED, 'UTF-8', FALSE );\n$return .= <<<CONTENT\n\nCONTENT;\n\nelse:\n$return .= <<<CONTENT\n\nCONTENT;\n\n$return .= \\IPS\\Member::loggedIn()->language()->addToStack( htmlspecialchars( 'advertisement_alt', ENT_DISALLOWED, 'UTF-8', FALSE ), TRUE, array(  ) );\n$return .= <<<CONTENT\n\nCONTENT;\n\nendif;\n$return .= <<<CONTENT\n\" class='ipsImage ipsContained'>\n\t\t\t\nCONTENT;\n\nif ( $advertisement->link ):\n$return .= <<<CONTENT\n\n\t\t\t\t<\/a>\n\t\t\t\nCONTENT;\n\nendif;\n$return .= <<<CONTENT\n\n\t\t<\/li>\n\n\t\t<li class='ips\nCONTENT;\n\n$return .= htmlspecialchars( mb_ucfirst(\\IPS\\SUITE_UNIQUE_KEY), ENT_QUOTES | ENT_DISALLOWED, 'UTF-8', FALSE );\n$return .= <<<CONTENT\n_small ipsResponsive_showPhone ipsResponsive_inlineBlock ipsAreaBackground_light'>\n\t\t\t\nCONTENT;\n\nif ( $advertisement->link ):\n$return .= <<<CONTENT\n\n\t\t\t\t<a href='\nCONTENT;\n\nif ( $acpLink ):\n$return .= <<<CONTENT\n\nCONTENT;\n$return .= htmlspecialchars( $acpLink->makeSafeForAcp(), ENT_QUOTES | ENT_DISALLOWED, 'UTF-8', FALSE );\n$return .= <<<CONTENT\n\nCONTENT;\n\nelse:\n$return .= <<<CONTENT\n\nCONTENT;\n\n$return .= htmlspecialchars( \\IPS\\Http\\Url::internal( \"app=core&module=system&controller=redirect&do=advertisement&ad={$advertisement->id}&key={$hmacKey}\", \"front\", \"\", array(), 0 ), ENT_QUOTES | ENT_DISALLOWED, 'UTF-8', TRUE );\n$return .= <<<CONTENT\n\nCONTENT;\n\nendif;\n$return .= <<<CONTENT\n' \nCONTENT;\n\nif ( $advertisement->new_window ):\n$return .= <<<CONTENT\ntarget='_blank'\nCONTENT;\n\nendif;\n$return .= <<<CONTENT\n rel='nofollow noopener'>\n\t\t\t\nCONTENT;\n\nendif;\n$return .= <<<CONTENT\n\n\t\t\t\t<img src='\nCONTENT;\n\nif ( !empty( $advertisement->_images['small'] ) ):\n$return .= <<<CONTENT\n\nCONTENT;\n\n$return .= \\IPS\\File::get( $advertisement->storageExtension(), $advertisement->_images['small'] )->url;\n$return .= <<<CONTENT\n\nCONTENT;\n\nelseif ( !empty( $advertisement->_images['medium'] ) ):\n$return .= <<<CONTENT\n\nCONTENT;\n\n$return .= \\IPS\\File::get( $advertisement->storageExtension(), $advertisement->_images['medium'] )->url;\n$return .= <<<CONTENT\n\nCONTENT;\n\nelse:\n$return .= <<<CONTENT\n\nCONTENT;\n\n$return .= \\IPS\\File::get( $advertisement->storageExtension(), $advertisement->_images['large'] )->url;\n$return .= <<<CONTENT\n\nCONTENT;\n\nendif;\n$return .= <<<CONTENT\n' alt=\"\nCONTENT;\n\nif ( $advertisement->image_alt ):\n$return .= <<<CONTENT\n\nCONTENT;\n$return .= htmlspecialchars( $advertisement->image_alt, ENT_QUOTES | ENT_DISALLOWED, 'UTF-8', FALSE );\n$return .= <<<CONTENT\n\nCONTENT;\n\nelse:\n$return .= <<<CONTENT\n\nCONTENT;\n\n$return .= \\IPS\\Member::loggedIn()->language()->addToStack( htmlspecialchars( 'advertisement_alt', ENT_DISALLOWED, 'UTF-8', FALSE ), TRUE, array(  ) );\n$return .= <<<CONTENT\n\nCONTENT;\n\nendif;\n$return .= <<<CONTENT\n\" class='ipsImage ipsContained'>\n\t\t\t\nCONTENT;\n\nif ( $advertisement->link ):\n$return .= <<<CONTENT\n\n\t\t\t\t<\/a>\n\t\t\t\nCONTENT;\n\nendif;\n$return .= <<<CONTENT\n\n\t\t<\/li>\n\t\t\nCONTENT;\n\nendif;\n$return .= <<<CONTENT\n\n\t<\/ul>\n\t\nCONTENT;\n\nif ( $acpLink ):\n$return .= <<<CONTENT\n\n\t\t<div class=\"ipsType_center ipsType_small\"><a href=\"\nCONTENT;\n$return .= htmlspecialchars( $acpLink->makeSafeForAcp(), ENT_QUOTES | ENT_DISALLOWED, 'UTF-8', FALSE );\n$return .= <<<CONTENT\n\">\nCONTENT;\n$return .= htmlspecialchars( $acpLink, ENT_QUOTES | ENT_DISALLOWED, 'UTF-8', FALSE );\n$return .= <<<CONTENT\n<\/a><\/div>\n\t\nCONTENT;\n\nendif;\n$return .= <<<CONTENT\n\n<\/div>\n\nCONTENT;\n\nendif;\n$return .= <<<CONTENT\n\nCONTENT;\n\n\t\treturn $return;\n}\n\n\tfunction basicUrl( $url, $newWindow=TRUE, $title=NULL, $wordbreak=TRUE, $nofollow=FALSE ) {\n\t\t$return = '';\n\t\t$return .= <<<CONTENT\n\n\nCONTENT;\n\nif ( $wordbreak ):\n$return .= <<<CONTENT\n<div class='ipsType_break ipsContained'>\nCONTENT;\n\nendif;\n$return .= <<<CONTENT\n<a href='\nCONTENT;\n$return .= htmlspecialchars( $url, ENT_QUOTES | ENT_DISALLOWED, 'UTF-8', FALSE );\n$return .= <<<CONTENT\n'\nCONTENT;\n\nif ( $newWindow === TRUE ):\n$return .= <<<CONTENT\n target='_blank' \nCONTENT;\n\nif ( $nofollow === FALSE ):\n$return .= <<<CONTENT\nrel=\"noopener\"\nCONTENT;\n\nendif;\n$return .= <<<CONTENT\n\nCONTENT;\n\nendif;\n$return .= <<<CONTENT\n\nCONTENT;\n\nif ( $nofollow === TRUE ):\n$return .= <<<CONTENT\n rel=\"nofollow\nCONTENT;\n\nif ( $newWindow === TRUE ):\n$return .= <<<CONTENT\n noopener\nCONTENT;\n\nendif;\n$return .= <<<CONTENT\n\"\nCONTENT;\n\nendif;\n$return .= <<<CONTENT\n>\nCONTENT;\n\nif ( $title ):\n$return .= <<<CONTENT\n\nCONTENT;\n$return .= htmlspecialchars( $title, ENT_QUOTES | ENT_DISALLOWED, 'UTF-8', FALSE );\n$return .= <<<CONTENT\n\nCONTENT;\n\nelse:\n$return .= <<<CONTENT\n\nCONTENT;\n$return .= htmlspecialchars( $url, ENT_QUOTES | ENT_DISALLOWED, 'UTF-8', FALSE );\n$return .= <<<CONTENT\n\nCONTENT;\n\nendif;\n$return .= <<<CONTENT\n<\/a>\nCONTENT;\n\nif ( $wordbreak ):\n$return .= <<<CONTENT\n<\/div>\nCONTENT;\n\nendif;\n$return .= <<<CONTENT\n\nCONTENT;\n\n\t\treturn $return;\n}\n\n\tfunction chart( $chart, $type, $options, $format=NULL ) {\n\t\t$return = '';\n\t\t$return .= <<<CONTENT\n\n\nCONTENT;\n\nif ( isset( $chart->errors ) AND \\count( $chart->errors ) ):\n$return .= <<<CONTENT\n\n\t<div class='ipsMessage ipsMessage_error'>\n\t\t\nCONTENT;\n\nforeach ( $chart->errors as $error ):\n$return .= <<<CONTENT\n\n\t\t\t\nCONTENT;\n\nif ( isset($error['sprintf']) ):\n$return .= <<<CONTENT\n\n\t\t\t\t\nCONTENT;\n\n$val = \"{$error['string']}\"; $sprintf = array($error['sprintf']); $return .= \\IPS\\Member::loggedIn()->language()->addToStack( htmlspecialchars( $val, ENT_DISALLOWED, 'UTF-8', FALSE ), FALSE, array( 'sprintf' => $sprintf ) );\n$return .= <<<CONTENT\n\n\t\t\t\nCONTENT;\n\nelse:\n$return .= <<<CONTENT\n\n\t\t\t\t\nCONTENT;\n\n$val = \"{$error['string']}\"; $return .= \\IPS\\Member::loggedIn()->language()->addToStack( htmlspecialchars( $val, ENT_DISALLOWED, 'UTF-8', FALSE ), TRUE, array(  ) );\n$return .= <<<CONTENT\n\n\t\t\t\nCONTENT;\n\nendif;\n$return .= <<<CONTENT\n\n\t\t\nCONTENT;\n\nendforeach;\n$return .= <<<CONTENT\n\n\t<\/div>\n\nCONTENT;\n\nendif;\n$return .= <<<CONTENT\n\n<table class=\"ipsTable\" data-ipsChart data-ipsChart-type=\"\nCONTENT;\n$return .= htmlspecialchars( $type, ENT_QUOTES | ENT_DISALLOWED, 'UTF-8', FALSE );\n$return .= <<<CONTENT\n\" data-ipsChart-extraOptions='{$options}' \nCONTENT;\n\nif ( $format ):\n$return .= <<<CONTENT\ndata-ipsChart-format='\nCONTENT;\n$return .= htmlspecialchars( $format, ENT_QUOTES | ENT_DISALLOWED, 'UTF-8', FALSE );\n$return .= <<<CONTENT\n'\nCONTENT;\n\nendif;\n$return .= <<<CONTENT\n>\n\t<thead>\n\t\t<tr>\n\t\t\t\nCONTENT;\n\nforeach ( $chart->headers as $data ):\n$return .= <<<CONTENT\n\n\t\t\t\t<th data-colType=\"\nCONTENT;\n$return .= htmlspecialchars( $data['type'], ENT_QUOTES | ENT_DISALLOWED, 'UTF-8', FALSE );\n$return .= <<<CONTENT\n\">\nCONTENT;\n$return .= htmlspecialchars( $data['label'], ENT_QUOTES | ENT_DISALLOWED, 'UTF-8', FALSE );\n$return .= <<<CONTENT\n<\/th>\n\t\t\t\nCONTENT;\n\nendforeach;\n$return .= <<<CONTENT\n\n\t\t<\/tr>\n\t<\/thead>\n\t<tbody>\n\t\t\nCONTENT;\n\nforeach ( $chart->rows as $row ):\n$return .= <<<CONTENT\n\n\t\t\t<tr>\n\t\t\t\t\nCONTENT;\n\nforeach ( $row as $value ):\n$return .= <<<CONTENT\n\n\t\t\t\t\t<td>\nCONTENT;\n$return .= htmlspecialchars( $value, ENT_QUOTES | ENT_DISALLOWED, 'UTF-8', FALSE );\n$return .= <<<CONTENT\n<\/td>\n\t\t\t\t\nCONTENT;\n\nendforeach;\n$return .= <<<CONTENT\n\n\t\t\t<\/tr>\n\t\t\nCONTENT;\n\nendforeach;\n$return .= <<<CONTENT\n\n\t<\/tbody>\n<\/table>\n<div><\/div>\nCONTENT;\n\n\t\treturn $return;\n}\n\n\tfunction chartTimezoneInfo( $mysqlTimezone ) {\n\t\t$return = '';\n\t\t$return .= <<<CONTENT\n\n<div class=\"ipsPad\">\n\t\nCONTENT;\n\n$sprintf = array($mysqlTimezone); $return .= \\IPS\\Member::loggedIn()->language()->addToStack( htmlspecialchars( 'dynamic_chart_timezone_explain', ENT_DISALLOWED, 'UTF-8', FALSE ), FALSE, array( 'sprintf' => $sprintf ) );\n$return .= <<<CONTENT\n\n<\/div>\nCONTENT;\n\n\t\treturn $return;\n}\n\n\tfunction dynamicChart( $chart, $html ) {\n\t\t$return = '';\n\t\t$return .= <<<CONTENT\n\n<div class='ipsChart' data-controller='core.admin.core.dynamicChart' data-chart-url='\nCONTENT;\n$return .= htmlspecialchars( $chart->baseURL, ENT_QUOTES | ENT_DISALLOWED, 'UTF-8', FALSE );\n$return .= <<<CONTENT\n' data-chart-identifier='\nCONTENT;\n$return .= htmlspecialchars( $chart->identifier, ENT_QUOTES | ENT_DISALLOWED, 'UTF-8', FALSE );\n$return .= <<<CONTENT\n' data-chart-type=\"\nCONTENT;\n$return .= htmlspecialchars( $chart->type, ENT_QUOTES | ENT_DISALLOWED, 'UTF-8', FALSE );\n$return .= <<<CONTENT\n\" data-chart-timescale=\"\nCONTENT;\n$return .= htmlspecialchars( $chart->timescale, ENT_QUOTES | ENT_DISALLOWED, 'UTF-8', FALSE );\n$return .= <<<CONTENT\n\">\n\t<div class='ipsPad ipsAreaBackground_light ipsClearfix ipsChart_filters'>\n\t\t\nCONTENT;\n\nif ( ( \\IPS\\Request::i()->chartId AND \\IPS\\Request::i()->chartId != '_default' ) OR $chart->title ):\n$return .= <<<CONTENT\n\n\t\t\t<div class='ipsClearfix ipsSpacer_bottom ipsSpacer_half'>\n\t\t\nCONTENT;\n\nendif;\n$return .= <<<CONTENT\n\n\t\t\nCONTENT;\n\nif ( \\IPS\\Request::i()->chartId AND \\IPS\\Request::i()->chartId != '_default' ):\n$return .= <<<CONTENT\n\n\t\t\t<a data-confirm href='\nCONTENT;\n$return .= htmlspecialchars( $chart->baseURL->setQueryString( array( 'deleteChart' => \\IPS\\Request::i()->chartId ) ), ENT_QUOTES | ENT_DISALLOWED, 'UTF-8', FALSE );\n$return .= <<<CONTENT\n' class='ipsPos_right ipsButton_veryVerySmall ipsButton ipsButton_negative'>\nCONTENT;\n\n$return .= \\IPS\\Member::loggedIn()->language()->addToStack( htmlspecialchars( 'delete', ENT_DISALLOWED, 'UTF-8', FALSE ), TRUE, array(  ) );\n$return .= <<<CONTENT\n<\/a>\n\t\t\t<button data-role=\"renameChart\" class='ipsPos_right ipsButton_veryVerySmall ipsButton ipsButton_neutral' data-ipsMenu data-ipsMenu-closeOnClick='false' id='el\nCONTENT;\n$return .= htmlspecialchars( $chart->identifier, ENT_QUOTES | ENT_DISALLOWED, 'UTF-8', FALSE );\n$return .= <<<CONTENT\nFilterRename'>\nCONTENT;\n\n$return .= \\IPS\\Member::loggedIn()->language()->addToStack( htmlspecialchars( 'stream_rename', ENT_DISALLOWED, 'UTF-8', FALSE ), TRUE, array(  ) );\n$return .= <<<CONTENT\n<\/button>\n\t\t\t<ul id='el\nCONTENT;\n$return .= htmlspecialchars( $chart->identifier, ENT_QUOTES | ENT_DISALLOWED, 'UTF-8', FALSE );\n$return .= <<<CONTENT\nFilterRename_menu' class='ipsMenu ipsMenu_auto ipsHide' data-role=\"filterRenameMenu\">\n\t\t\t\t<li class='ipsMenu_item'>{$chart->form->customTemplate( array( \\IPS\\Theme::i()->getTemplate( 'forms', 'core', 'front' ), 'popupTemplate' ) )}<\/li>\n\t\t\t<\/ul>\n\t\t\nCONTENT;\n\nendif;\n$return .= <<<CONTENT\n\n\t\t\nCONTENT;\n\nif ( $chart->title ):\n$return .= <<<CONTENT\n\n\t\t\t<h2 class='ipsType_sectionHead'>\nCONTENT;\n$return .= htmlspecialchars( $chart->title, ENT_QUOTES | ENT_DISALLOWED, 'UTF-8', FALSE );\n$return .= <<<CONTENT\n<\/h2>\n\t\t\nCONTENT;\n\nendif;\n$return .= <<<CONTENT\n\n\t\t\nCONTENT;\n\nif ( ( \\IPS\\Request::i()->chartId AND \\IPS\\Request::i()->chartId != '_default' ) OR $chart->title ):\n$return .= <<<CONTENT\n\n\t\t\t<\/div>\n\t\t\nCONTENT;\n\nendif;\n$return .= <<<CONTENT\n\n\t\t<ul class='ipsList_inline'>\n\t\t\t\nCONTENT;\n\nif ( $chart->showIntervals ):\n$return .= <<<CONTENT\n\n\t\t\t\t<li data-role=\"groupingButtons\">\n\t\t\t\t\t<span class=\"ipsButton_split ipsClearfix\">\n\t\t\t\t\t\t\nCONTENT;\n\nif ( $chart->enableHourly ):\n$return .= <<<CONTENT\n\n\t\t\t\t\t\t\t<a class='ipsButton ipsButton_verySmall \nCONTENT;\n\nif ( $chart->type == 'Table' ):\n$return .= <<<CONTENT\nipsButton_disabled ipsButton_veryLight\nCONTENT;\n\nelse:\n$return .= <<<CONTENT\n\nCONTENT;\n\nif ( $chart->timescale == 'hourly' ):\n$return .= <<<CONTENT\nipsButton_primary\nCONTENT;\n\nelse:\n$return .= <<<CONTENT\nipsButton_veryLight\nCONTENT;\n\nendif;\n$return .= <<<CONTENT\n\nCONTENT;\n\nendif;\n$return .= <<<CONTENT\n' href=\"\nCONTENT;\n$return .= htmlspecialchars( $chart->url->setQueryString( array( 'timescale' => array( $chart->identifier => 'hourly' ), 'noheader' => 1 ) ), ENT_QUOTES | ENT_DISALLOWED, 'UTF-8', FALSE );\n$return .= <<<CONTENT\n\" data-timescale=\"hourly\" \nCONTENT;\n\nif ( $chart->timescale == 'hourly' ):\n$return .= <<<CONTENT\ndata-selected\nCONTENT;\n\nendif;\n$return .= <<<CONTENT\n>\nCONTENT;\n\n$return .= \\IPS\\Member::loggedIn()->language()->addToStack( htmlspecialchars( 'stats_date_group_hourly', ENT_DISALLOWED, 'UTF-8', FALSE ), TRUE, array(  ) );\n$return .= <<<CONTENT\n<\/a>\n\t\t\t\t\t\t\nCONTENT;\n\nendif;\n$return .= <<<CONTENT\n\n\t\t\t\t\t\t\nCONTENT;\n\nforeach ( array( 'daily', 'weekly', 'monthly' ) as $k ):\n$return .= <<<CONTENT\n\n\t\t\t\t\t\t\t<a class='ipsButton ipsButton_verySmall \nCONTENT;\n\nif ( $chart->type == 'Table' ):\n$return .= <<<CONTENT\nipsButton_disabled ipsButton_veryLight\nCONTENT;\n\nelse:\n$return .= <<<CONTENT\n\nCONTENT;\n\nif ( $chart->timescale == $k ):\n$return .= <<<CONTENT\nipsButton_primary\nCONTENT;\n\nelse:\n$return .= <<<CONTENT\nipsButton_veryLight\nCONTENT;\n\nendif;\n$return .= <<<CONTENT\n\nCONTENT;\n\nendif;\n$return .= <<<CONTENT\n' href=\"\nCONTENT;\n$return .= htmlspecialchars( $chart->url->setQueryString( array( 'timescale' => array( $chart->identifier => $k ), 'noheader' => 1 ) ), ENT_QUOTES | ENT_DISALLOWED, 'UTF-8', FALSE );\n$return .= <<<CONTENT\n\" data-timescale=\"\nCONTENT;\n$return .= htmlspecialchars( $k, ENT_QUOTES | ENT_DISALLOWED, 'UTF-8', FALSE );\n$return .= <<<CONTENT\n\" \nCONTENT;\n\nif ( $chart->timescale == $k ):\n$return .= <<<CONTENT\ndata-selected\nCONTENT;\n\nendif;\n$return .= <<<CONTENT\n>\nCONTENT;\n\n$val = \"stats_date_group_$k\"; $return .= \\IPS\\Member::loggedIn()->language()->addToStack( htmlspecialchars( $val, ENT_DISALLOWED, 'UTF-8', FALSE ), TRUE, array(  ) );\n$return .= <<<CONTENT\n<\/a>\n\t\t\t\t\t\t\nCONTENT;\n\nendforeach;\n$return .= <<<CONTENT\n\n\t\t\t\t\t<\/span>\n\t\t\t\t<\/li>\n\t\t\t\nCONTENT;\n\nendif;\n$return .= <<<CONTENT\n\n\t\t\t<li class=\"ipsClearfix\">\n\t\t\t\t<a data-action='chartDate' data-ipsMenu data-ipsMenu-closeOnBlur='false' data-ipsMenu-closeOnClick='false' id='el\nCONTENT;\n$return .= htmlspecialchars( $chart->identifier, ENT_QUOTES | ENT_DISALLOWED, 'UTF-8', FALSE );\n$return .= <<<CONTENT\nDate' href=\"#\" class=\"ipsButton ipsButton_verySmall ipsButton_veryLight\"><i class='fa fa-calendar'><\/i> &nbsp;\nCONTENT;\n\n$return .= \\IPS\\Member::loggedIn()->language()->addToStack( htmlspecialchars( 'stats_date_range', ENT_DISALLOWED, 'UTF-8', FALSE ), TRUE, array(  ) );\n$return .= <<<CONTENT\n <span data-role='dateSummary' class='ipsType_light'>\nCONTENT;\n\nif ( $chart->start AND $chart->end ):\n$return .= <<<CONTENT\n(\nCONTENT;\n\n$sprintf = array($chart->start->localeDate(), $chart->end->localeDate()); $return .= \\IPS\\Member::loggedIn()->language()->addToStack( htmlspecialchars( 'search_betweenXandX', ENT_DISALLOWED, 'UTF-8', FALSE ), FALSE, array( 'sprintf' => $sprintf ) );\n$return .= <<<CONTENT\n)\nCONTENT;\n\nelseif ( $chart->start ):\n$return .= <<<CONTENT\n(\nCONTENT;\n\n$sprintf = array($chart->start->localeDate()); $return .= \\IPS\\Member::loggedIn()->language()->addToStack( htmlspecialchars( 'search_afterX', ENT_DISALLOWED, 'UTF-8', FALSE ), FALSE, array( 'sprintf' => $sprintf ) );\n$return .= <<<CONTENT\n)\nCONTENT;\n\nelseif ( $chart->end ):\n$return .= <<<CONTENT\n(\nCONTENT;\n\n$sprintf = array($chart->end->localeDate()); $return .= \\IPS\\Member::loggedIn()->language()->addToStack( htmlspecialchars( 'search_beforeX', ENT_DISALLOWED, 'UTF-8', FALSE ), FALSE, array( 'sprintf' => $sprintf ) );\n$return .= <<<CONTENT\n)\nCONTENT;\n\nendif;\n$return .= <<<CONTENT\n<\/span> <i class='fa fa-caret-down'><\/i><\/a>\n\t\t\t\t<div id='el\nCONTENT;\n$return .= htmlspecialchars( $chart->identifier, ENT_QUOTES | ENT_DISALLOWED, 'UTF-8', FALSE );\n$return .= <<<CONTENT\nDate_menu' class='ipsMenu ipsMenu_normal ipsHide ipsPad'>\n\t\t\t\t\t<form accept-charset='utf-8' action=\"\nCONTENT;\n$return .= htmlspecialchars( $chart->url, ENT_QUOTES | ENT_DISALLOWED, 'UTF-8', FALSE );\n$return .= <<<CONTENT\n\" method=\"post\" data-role=\"dateForm\" data-ipsForm>\n\t\t\t\t\t\t\nCONTENT;\n\n$return .= \\IPS\\Theme::i()->getTemplate( \"forms\", \"core\", 'global' )->date( 'start', $chart->start ?: NULL, FALSE, NULL, NULL, FALSE, FALSE, NULL, NULL, NULL, array(), TRUE, 'ipsField_fullWidth', \\IPS\\Member::loggedIn()->language()->addToStack('stats_start_date') );\n$return .= <<<CONTENT\n\n\t\t\t\t\t\t<br><br>\n\t\t\t\t\t\t\nCONTENT;\n\n$return .= \\IPS\\Theme::i()->getTemplate( \"forms\", \"core\", 'global' )->date( 'end', $chart->end ?: NULL, FALSE, NULL, NULL, FALSE, FALSE, NULL, NULL, NULL, array(), TRUE, 'ipsField_fullWidth', \\IPS\\Member::loggedIn()->language()->addToStack('stats_end_date') );\n$return .= <<<CONTENT\n\n\t\t\t\t\t\t<br><br>\n\t\t\t\t\t\t<button type=\"submit\" class=\"ipsButton ipsButton_primary ipsButton_fullWidth\" data-role=\"updateDate\">\nCONTENT;\n\n$return .= \\IPS\\Member::loggedIn()->language()->addToStack( htmlspecialchars( 'submit', ENT_DISALLOWED, 'UTF-8', FALSE ), TRUE, array(  ) );\n$return .= <<<CONTENT\n<\/button>\n\t\t\t\t\t<\/form>\n\t\t\t\t<\/div>\n\t\t\t<\/li>\n\t\t\t\nCONTENT;\n\nif ( \\count( $chart->availableFilters ) > 0 ):\n$return .= <<<CONTENT\n\n\t\t\t\t<li>\n\t\t\t\t\t<a data-action=\"chartFilter\" data-ipsMenu data-ipsMenu-selectable data-ipsMenu-closeOnClick='false' id='el\nCONTENT;\n$return .= htmlspecialchars( $chart->identifier, ENT_QUOTES | ENT_DISALLOWED, 'UTF-8', FALSE );\n$return .= <<<CONTENT\nFilter' href=\"#\" class=\"ipsButton ipsButton_verySmall ipsButton_veryLight\"><i class='fa fa-filter'><\/i> &nbsp;\nCONTENT;\n\n$return .= \\IPS\\Member::loggedIn()->language()->addToStack( htmlspecialchars( 'stats_chart_filters', ENT_DISALLOWED, 'UTF-8', FALSE ), TRUE, array(  ) );\n$return .= <<<CONTENT\n <i class='fa fa-caret-down'><\/i><\/a>\n\t\t\t\t\t<ul id='el\nCONTENT;\n$return .= htmlspecialchars( $chart->identifier, ENT_QUOTES | ENT_DISALLOWED, 'UTF-8', FALSE );\n$return .= <<<CONTENT\nFilter_menu' class='ipsMenu ipsMenu_selectable ipsMenu_auto ipsHide' data-role='filterMenu'>\n\t\t\t\t\t\t<li class='ipsMenu_item ipsMenu_itemNonSelect ipsType_center' data-noselect>\n\t\t\t\t\t\t\t<span>\n\t\t\t\t\t\t\t\t<a href='#' data-role='selectAll' class='ipsMenu_itemInline'>\nCONTENT;\n\n$return .= \\IPS\\Member::loggedIn()->language()->addToStack( htmlspecialchars( 'all', ENT_DISALLOWED, 'UTF-8', FALSE ), TRUE, array(  ) );\n$return .= <<<CONTENT\n<\/a>\n\t\t\t\t\t\t\t\t<a href='#' data-role='unselectAll' class='ipsMenu_itemInline'>\nCONTENT;\n\n$return .= \\IPS\\Member::loggedIn()->language()->addToStack( htmlspecialchars( 'none', ENT_DISALLOWED, 'UTF-8', FALSE ), TRUE, array(  ) );\n$return .= <<<CONTENT\n<\/a>\n\t\t\t\t\t\t\t<\/span>\n\t\t\t\t\t\t<\/li>\n\t\t\t\t\t\t\nCONTENT;\n\nforeach ( $chart->availableFilters as $f => $name ):\n$return .= <<<CONTENT\n\n\t\t\t\t\t\t\t<li class='ipsMenu_item \nCONTENT;\n\nif ( \\in_array( $f, $chart->currentFilters ) ):\n$return .= <<<CONTENT\nipsMenu_itemChecked\nCONTENT;\n\nendif;\n$return .= <<<CONTENT\n' data-ipsMenuValue='\nCONTENT;\n$return .= htmlspecialchars( $f, ENT_QUOTES | ENT_DISALLOWED, 'UTF-8', FALSE );\n$return .= <<<CONTENT\n'><a href=\"\nCONTENT;\n$return .= htmlspecialchars( $chart->flipUrlFilter( $f ), ENT_QUOTES | ENT_DISALLOWED, 'UTF-8', FALSE );\n$return .= <<<CONTENT\n\">\nCONTENT;\n$return .= htmlspecialchars( $name, ENT_QUOTES | ENT_DISALLOWED, 'UTF-8', FALSE );\n$return .= <<<CONTENT\n<\/a><\/li>\n\t\t\t\t\t\t\nCONTENT;\n\nendforeach;\n$return .= <<<CONTENT\n\n\t\t\t\t\t\t<li class='ipsMenu_item ipsMenu_itemNonSelect' data-noselect>\n\t\t\t\t\t\t\t<span>\n\t\t\t\t\t\t\t\t<button disabled class='ipsMenu_itemInline ipsButton ipsButton_small ipsButton_primary ipsButton_fullWidth' data-role=\"applyFilters\">\nCONTENT;\n\n$return .= \\IPS\\Member::loggedIn()->language()->addToStack( htmlspecialchars( 'apply_filters', ENT_DISALLOWED, 'UTF-8', FALSE ), TRUE, array(  ) );\n$return .= <<<CONTENT\n<\/button>\n\t\t\t\t\t\t\t<\/span>\n\t\t\t\t\t\t<\/li>\n\t\t\t\t\t<\/ul>\n\t\t\t\t<\/li>\n\t\t\t\t<li>\n\t\t\t\t\t<button class='ipsButton ipsButton_verySmall ipsButton_important ipsHide' data-role='saveReport' \nCONTENT;\n\nif ( !\\IPS\\Request::i()->chartId OR \\IPS\\Request::i()->chartId == '_default' ):\n$return .= <<<CONTENT\ndata-ipsMenu data-ipsMenu-closeOnClick='false'\nCONTENT;\n\nelse:\n$return .= <<<CONTENT\ndata-chartId='\nCONTENT;\n\n$return .= htmlspecialchars( \\IPS\\Request::i()->chartId, ENT_QUOTES | ENT_DISALLOWED, 'UTF-8', FALSE );\n$return .= <<<CONTENT\n'\nCONTENT;\n\nendif;\n$return .= <<<CONTENT\n id='el\nCONTENT;\n$return .= htmlspecialchars( $chart->identifier, ENT_QUOTES | ENT_DISALLOWED, 'UTF-8', FALSE );\n$return .= <<<CONTENT\nFilterSave'>\nCONTENT;\n\n$return .= \\IPS\\Member::loggedIn()->language()->addToStack( htmlspecialchars( 'save', ENT_DISALLOWED, 'UTF-8', FALSE ), TRUE, array(  ) );\n$return .= <<<CONTENT\n<\/button>\n\t\t\t\t\t\nCONTENT;\n\nif ( !\\IPS\\Request::i()->chartId OR \\IPS\\Request::i()->chartId == '_default' ):\n$return .= <<<CONTENT\n\n\t\t\t\t\t\t<ul id='el\nCONTENT;\n$return .= htmlspecialchars( $chart->identifier, ENT_QUOTES | ENT_DISALLOWED, 'UTF-8', FALSE );\n$return .= <<<CONTENT\nFilterSave_menu' class='ipsMenu ipsMenu_auto ipsHide' data-role='filterSaveMenu'>\n\t\t\t\t\t\t\t<li class='ipsMenu_item'>{$chart->form->customTemplate( array( \\IPS\\Theme::i()->getTemplate( 'forms', 'core', 'front' ), 'popupTemplate' ) )}<\/li>\n\t\t\t\t\t\t<\/ul>\n\t\t\t\t\t\nCONTENT;\n\nendif;\n$return .= <<<CONTENT\n\n\t\t\t\t<\/li>\n\t\t\t\nCONTENT;\n\nendif;\n$return .= <<<CONTENT\n\n\t\t\t\nCONTENT;\n\nif ( \\count( $chart->availableTypes ) > 1 ):\n$return .= <<<CONTENT\n\n\t\t\t\t<li class='ipsPos_right'>\n\t\t\t\t\t<span class=\"ipsButton_split ipsClearfix\">\n\t\t\t\t\t\t\nCONTENT;\n\nforeach ( $chart->availableTypes as $t ):\n$return .= <<<CONTENT\n\n\t\t\t\t\t\t\t<a class='ipsButton ipsButton_verySmall \nCONTENT;\n\nif ( $chart->type == $t ):\n$return .= <<<CONTENT\nipsButton_primary\nCONTENT;\n\nelse:\n$return .= <<<CONTENT\nipsButton_veryLight\nCONTENT;\n\nendif;\n$return .= <<<CONTENT\n' href=\"\nCONTENT;\n$return .= htmlspecialchars( $chart->url->setQueryString( array( 'type' => array( $chart->identifier => $t ), 'noheader' => 1 ) ), ENT_QUOTES | ENT_DISALLOWED, 'UTF-8', FALSE );\n$return .= <<<CONTENT\n\" data-ipsTooltip title='\nCONTENT;\n\n$val = \"chart_{$t}\"; $return .= \\IPS\\Member::loggedIn()->language()->addToStack( htmlspecialchars( $val, ENT_DISALLOWED, 'UTF-8', FALSE ), TRUE, array(  ) );\n$return .= <<<CONTENT\n' data-type='\nCONTENT;\n$return .= htmlspecialchars( $t, ENT_QUOTES | ENT_DISALLOWED, 'UTF-8', FALSE );\n$return .= <<<CONTENT\n' \nCONTENT;\n\nif ( $chart->type == $t ):\n$return .= <<<CONTENT\ndata-selected\nCONTENT;\n\nendif;\n$return .= <<<CONTENT\n>\n\t\t\t\t\t\t\t\t\nCONTENT;\n\nif ( $t === 'Table' ):\n$return .= <<<CONTENT\n\n\t\t\t\t\t\t\t\t\t<i class=\"fa fa-table\"><\/i>\n\t\t\t\t\t\t\t\t\nCONTENT;\n\nelseif ( $t === 'LineChart' ):\n$return .= <<<CONTENT\n\n\t\t\t\t\t\t\t\t\t<i class=\"fa fa-line-chart\"><\/i>\n\t\t\t\t\t\t\t\t\nCONTENT;\n\nelseif ( $t == 'AreaChart' ):\n$return .= <<<CONTENT\n\n\t\t\t\t\t\t\t\t\t<i class='fa fa-area-chart'><\/i>\n\t\t\t\t\t\t\t\t\nCONTENT;\n\nelseif ( $t === 'ColumnChart' ):\n$return .= <<<CONTENT\n\n\t\t\t\t\t\t\t\t\t<i class=\"fa fa-bar-chart\"><\/i>\n\t\t\t\t\t\t\t\t\nCONTENT;\n\nelseif ( $t === 'BarChart' ):\n$return .= <<<CONTENT\n\n\t\t\t\t\t\t\t\t\t<i class=\"fa fa-bar-chart fa-rotate-90\"><\/i>\n\t\t\t\t\t\t\t\t\nCONTENT;\n\nelseif ( $t === 'PieChart' ):\n$return .= <<<CONTENT\n\n\t\t\t\t\t\t\t\t\t<i class=\"fa fa-pie-chart\"><\/i>\n\t\t\t\t\t\t\t\t\nCONTENT;\n\nelseif ( $t === 'GeoChart' ):\n$return .= <<<CONTENT\n\n\t\t\t\t\t\t\t\t\t<i class=\"fa fa-globe\"><\/i>\n\t\t\t\t\t\t\t\t\nCONTENT;\n\nendif;\n$return .= <<<CONTENT\n\n\t\t\t\t\t\t\t<\/a>\n\t\t\t\t\t\t\nCONTENT;\n\nendforeach;\n$return .= <<<CONTENT\n\n\t\t\t\t\t<\/span>\n\t\t\t\t<\/li>\n\t\t\t\nCONTENT;\n\nendif;\n$return .= <<<CONTENT\n\n\t\t<\/ul>\n\t\t\n\t<\/div>\n\t<div class='ipsChart_chart ipsPad' data-role=\"chart\">\n\t\t{$html}\n\t<\/div>\n<\/div>\n\nCONTENT;\n\nif ( $chart->timezoneError and \\IPS\\Member::loggedIn()->isAdmin() ):\n$return .= <<<CONTENT\n\n\t<p class=\"ipsType_small ipsType_light ipsPad ipsPad_half\"><i class=\"fa fa-info-circle\"><\/i> \nCONTENT;\n\n$return .= \\IPS\\Member::loggedIn()->language()->addToStack( htmlspecialchars( 'dynamic_chart_timezone_info', ENT_DISALLOWED, 'UTF-8', FALSE ), TRUE, array(  ) );\n$return .= <<<CONTENT\n\nCONTENT;\n\nif ( $chart->hideTimezoneLink === FALSE ):\n$return .= <<<CONTENT\n <a href=\"\nCONTENT;\n\n$return .= htmlspecialchars( \\IPS\\Http\\Url::internal( \"app=core&module=system&controller=ajax&do=chartTimezones\", null, \"\", array(), 0 ), ENT_QUOTES | ENT_DISALLOWED, 'UTF-8', TRUE );\n$return .= <<<CONTENT\n\" data-ipsDialog data-ipsDialog-title=\"\nCONTENT;\n\n$return .= \\IPS\\Member::loggedIn()->language()->addToStack( htmlspecialchars( 'dynamic_chart_timezone_title', ENT_DISALLOWED, 'UTF-8', FALSE ), TRUE, array(  ) );\n$return .= <<<CONTENT\n\">\nCONTENT;\n\n$return .= \\IPS\\Member::loggedIn()->language()->addToStack( htmlspecialchars( 'learn_more', ENT_DISALLOWED, 'UTF-8', FALSE ), TRUE, array(  ) );\n$return .= <<<CONTENT\n<\/a>\nCONTENT;\n\nendif;\n$return .= <<<CONTENT\n<\/p>\n\nCONTENT;\n\nendif;\n$return .= <<<CONTENT\n\n\nCONTENT;\n\n\t\treturn $return;\n}\n\n\tfunction includeCSS(  ) {\n\t\t$return = '';\n\t\t$return .= <<<CONTENT\n\n\nCONTENT;\n\nforeach ( array_unique( \\IPS\\Output::i()->cssFiles, SORT_STRING ) as $file ):\n$return .= <<<CONTENT\n\n\t<link rel='stylesheet' href='\nCONTENT;\n\n$return .= htmlspecialchars( \\IPS\\Http\\Url::external( $file )->setQueryString( 'v', \\IPS\\CACHEBUST_KEY ), ENT_QUOTES | ENT_DISALLOWED, 'UTF-8', FALSE );\n$return .= <<<CONTENT\n' media='all'>\n\nCONTENT;\n\nendforeach;\n$return .= <<<CONTENT\n\n\n\nCONTENT;\n\n$customCss = \\IPS\\Theme::i()->css( 'custom.css', 'core', 'front' );\n$return .= <<<CONTENT\n\n\nCONTENT;\n\nforeach ( $customCss as $css ):\n$return .= <<<CONTENT\n\n<link rel='stylesheet' href='\nCONTENT;\n\n$return .= htmlspecialchars( \\IPS\\Http\\Url::external( $css )->setQueryString( 'v', \\IPS\\CACHEBUST_KEY ), ENT_QUOTES | ENT_DISALLOWED, 'UTF-8', FALSE );\n$return .= <<<CONTENT\n' media='all'>\n\nCONTENT;\n\nendforeach;\n$return .= <<<CONTENT\n\n\n\nCONTENT;\n\nif ( \\IPS\\Output::i()->headCss ):\n$return .= <<<CONTENT\n\n<style type='text\/css'>\n\t\nCONTENT;\n\n$return .= \\IPS\\Output::i()->headCss;\n$return .= <<<CONTENT\n\n<\/style>\n\nCONTENT;\n\nendif;\n$return .= <<<CONTENT\n\nCONTENT;\n\n\t\treturn $return;\n}\n\n\tfunction includeJS(  ) {\n\t\t$return = '';\n\t\t$return .= <<<CONTENT\n\n\nCONTENT;\n\nif ( !\\IPS\\Request::i()->isAjax() ):\n$return .= <<<CONTENT\n\n\t<script type='text\/javascript'>\n\t\tvar ipsDebug = \nCONTENT;\n\nif ( ( \\IPS\\IN_DEV and \\IPS\\DEV_DEBUG_JS ) or \\IPS\\DEBUG_JS ):\n$return .= <<<CONTENT\ntrue\nCONTENT;\n\nelse:\n$return .= <<<CONTENT\nfalse\nCONTENT;\n\nendif;\n$return .= <<<CONTENT\n;\t\t\n\t\nCONTENT;\n\nif ( \\IPS\\IN_DEV ):\n$return .= <<<CONTENT\n\n\t\tvar CKEDITOR_BASEPATH = '\nCONTENT;\n\n$return .= htmlspecialchars( \\IPS\\Http\\Url::internal( \"applications\/core\/dev\/ckeditor\", \"none\", \"\", array(), \\IPS\\Http\\Url::PROTOCOL_RELATIVE ), ENT_QUOTES | ENT_DISALLOWED, 'UTF-8', TRUE );\n$return .= <<<CONTENT\n\/';\n\t\nCONTENT;\n\nelse:\n$return .= <<<CONTENT\n\n\t\tvar CKEDITOR_BASEPATH = '\nCONTENT;\n\n$return .= htmlspecialchars( \\IPS\\Http\\Url::internal( \"applications\/core\/interface\/ckeditor\/ckeditor\", \"none\", \"\", array(), \\IPS\\Http\\Url::PROTOCOL_RELATIVE ), ENT_QUOTES | ENT_DISALLOWED, 'UTF-8', TRUE );\n$return .= <<<CONTENT\n\/';\n\t\nCONTENT;\n\nendif;\n$return .= <<<CONTENT\n\n\t\tvar ipsSettings = {\n\t\t\t\nCONTENT;\n\nif ( \\IPS\\Dispatcher::hasInstance() and \\IPS\\Dispatcher::i()->controllerLocation == 'admin' ):\n$return .= <<<CONTENT\n\n\t\t\tadsess: \"\nCONTENT;\n\n$return .= htmlspecialchars( \\IPS\\Request::i()->adsess, ENT_QUOTES | ENT_DISALLOWED, 'UTF-8', FALSE );\n$return .= <<<CONTENT\n\",\n\t\t\t\nCONTENT;\n\nendif;\n$return .= <<<CONTENT\n\n\t\t\t\nCONTENT;\n\nif ( \\IPS\\COOKIE_DOMAIN !== NULL ):\n$return .= <<<CONTENT\n\n\t\t\tcookie_domain: \"\nCONTENT;\n\n$return .= htmlspecialchars( \\IPS\\COOKIE_DOMAIN, ENT_QUOTES | ENT_DISALLOWED, 'UTF-8', FALSE );\n$return .= <<<CONTENT\n\",\n\t\t\t\nCONTENT;\n\nendif;\n$return .= <<<CONTENT\n\n\t\t\tcookie_path: \"\nCONTENT;\n\n$return .= htmlspecialchars( \\IPS\\Request::getCookiePath(), ENT_QUOTES | ENT_DISALLOWED, 'UTF-8', FALSE );\n$return .= <<<CONTENT\n\",\n\t\t\t\nCONTENT;\n\nif ( \\IPS\\COOKIE_PREFIX !== NULL ):\n$return .= <<<CONTENT\n\n\t\t\tcookie_prefix: \"\nCONTENT;\n\n$return .= htmlspecialchars( \\IPS\\COOKIE_PREFIX, ENT_QUOTES | ENT_DISALLOWED, 'UTF-8', FALSE );\n$return .= <<<CONTENT\n\",\n\t\t\t\nCONTENT;\n\nendif;\n$return .= <<<CONTENT\n\n\t\t\t\nCONTENT;\n\nif ( mb_substr( \\IPS\\Settings::i()->base_url, 0, 5 ) == 'https' AND \\IPS\\COOKIE_BYPASS_SSLONLY !== TRUE ):\n$return .= <<<CONTENT\n\n\t\t\tcookie_ssl: true,\n\t\t\t\nCONTENT;\n\nelse:\n$return .= <<<CONTENT\n\n\t\t\tcookie_ssl: false,\n\t\t\t\nCONTENT;\n\nendif;\n$return .= <<<CONTENT\n\n\t\t\tupload_imgURL: \"\nCONTENT;\n\n$return .= \\IPS\\Theme::i()->resource( \"notifyIcons\/upload.png\", \"\", 'front', false );\n$return .= <<<CONTENT\n\",\n\t\t\tmessage_imgURL: \"\nCONTENT;\n\n$return .= \\IPS\\Theme::i()->resource( \"notifyIcons\/message.png\", \"\", 'front', false );\n$return .= <<<CONTENT\n\",\n\t\t\tnotification_imgURL: \"\nCONTENT;\n\n$return .= \\IPS\\Theme::i()->resource( \"notifyIcons\/notification.png\", \"\", 'front', false );\n$return .= <<<CONTENT\n\",\n\t\t\tbaseURL: \"\nCONTENT;\n\n$return .= htmlspecialchars( \\IPS\\Http\\Url::baseUrl( \\IPS\\Http\\Url::PROTOCOL_RELATIVE ), ENT_QUOTES | ENT_DISALLOWED, 'UTF-8', FALSE );\n$return .= <<<CONTENT\n\",\n\t\t\tjsURL: \"\nCONTENT;\n\n$return .= htmlspecialchars( rtrim( \\IPS\\Http\\Url::baseUrl( \\IPS\\Http\\Url::PROTOCOL_RELATIVE ), '\/' ), ENT_QUOTES | ENT_DISALLOWED, 'UTF-8', FALSE );\n$return .= <<<CONTENT\n\/applications\/core\/interface\/js\/js.php\",\n\t\t\tcsrfKey: \"\nCONTENT;\n\n$return .= htmlspecialchars( \\IPS\\Session::i()->csrfKey, ENT_QUOTES | ENT_DISALLOWED, 'UTF-8', FALSE );\n$return .= <<<CONTENT\n\",\n\t\t\tantiCache: \"\nCONTENT;\n\n$return .= htmlspecialchars( \\IPS\\CACHEBUST_KEY, ENT_QUOTES | ENT_DISALLOWED, 'UTF-8', FALSE );\n$return .= <<<CONTENT\n\",\n\t\t\tdisableNotificationSounds: \nCONTENT;\n\nif ( \\IPS\\Member::loggedIn()->members_bitoptions['disable_notification_sounds'] ):\n$return .= <<<CONTENT\ntrue\nCONTENT;\n\nelse:\n$return .= <<<CONTENT\nfalse\nCONTENT;\n\nendif;\n$return .= <<<CONTENT\n,\n\t\t\tuseCompiledFiles: \nCONTENT;\n\nif ( \\IPS\\IN_DEV ):\n$return .= <<<CONTENT\nfalse\nCONTENT;\n\nelse:\n$return .= <<<CONTENT\ntrue\nCONTENT;\n\nendif;\n$return .= <<<CONTENT\n,\n\t\t\tlinks_external: \nCONTENT;\n\nif ( \\IPS\\Settings::i()->links_external  ):\n$return .= <<<CONTENT\ntrue\nCONTENT;\n\nelse:\n$return .= <<<CONTENT\nfalse\nCONTENT;\n\nendif;\n$return .= <<<CONTENT\n,\n\t\t\tmemberID: \nCONTENT;\n\n$return .= htmlspecialchars( ( \\IPS\\Member::loggedIn()->member_id ) ? \\IPS\\Member::loggedIn()->member_id : 0, ENT_QUOTES | ENT_DISALLOWED, 'UTF-8', FALSE );\n$return .= <<<CONTENT\n,\n\t\t\tlazyLoadEnabled: \nCONTENT;\n\nif ( \\IPS\\Settings::i()->lazy_load_enabled ):\n$return .= <<<CONTENT\ntrue\nCONTENT;\n\nelse:\n$return .= <<<CONTENT\nfalse\nCONTENT;\n\nendif;\n$return .= <<<CONTENT\n,\n\t\t\tblankImg: \"\nCONTENT;\n\n$return .= htmlspecialchars( \\IPS\\Text\\Parser::blankImage(), ENT_QUOTES | ENT_DISALLOWED, 'UTF-8', FALSE );\n$return .= <<<CONTENT\n\",\n\t\t\tanalyticsProvider: \"\nCONTENT;\n\n$return .= htmlspecialchars( \\IPS\\Settings::i()->ipbseo_ga_provider, ENT_QUOTES | ENT_DISALLOWED, 'UTF-8', FALSE );\n$return .= <<<CONTENT\n\",\n\t\t\tviewProfiles: \nCONTENT;\n\nif ( \\IPS\\Member::loggedIn()->canAccessModule( \\IPS\\Application\\Module::get( 'core', 'members' ) ) ):\n$return .= <<<CONTENT\ntrue\nCONTENT;\n\nelse:\n$return .= <<<CONTENT\nfalse\nCONTENT;\n\nendif;\n$return .= <<<CONTENT\n,\n\t\t\tmapProvider: \nCONTENT;\n\nif ( \\IPS\\Settings::i()->googlemaps and \\IPS\\Settings::i()->google_maps_api_key ):\n$return .= <<<CONTENT\n'google'\nCONTENT;\n\nelseif ( \\IPS\\Settings::i()->mapbox and \\IPS\\Settings::i()->mapbox_api_key ):\n$return .= <<<CONTENT\n'mapbox'\nCONTENT;\n\nelse:\n$return .= <<<CONTENT\n'none'\nCONTENT;\n\nendif;\n$return .= <<<CONTENT\n,\n\t\t\tmapAhurepiKsey: \nCONTENT;\n\nif ( \\IPS\\Settings::i()->googlemaps and \\IPS\\Settings::i()->google_maps_api_key ):\n$return .= <<<CONTENT\n\"\nCONTENT;\n\n$return .= htmlspecialchars( \\IPS\\Settings::i()->google_maps_api_key, ENT_QUOTES | ENT_DISALLOWED, 'UTF-8', FALSE );\n$return .= <<<CONTENT\n\"\nCONTENT;\n\nelseif ( \\IPS\\Settings::i()->mapbox and \\IPS\\Settings::i()->mapbox_api_key ):\n$return .= <<<CONTENT\n\"\nCONTENT;\n\n$return .= htmlspecialchars( \\IPS\\Settings::i()->mapbox_api_key, ENT_QUOTES | ENT_DISALLOWED, 'UTF-8', FALSE );\n$return .= <<<CONTENT\n\"\nCONTENT;\n\nelse:\n$return .= <<<CONTENT\n''\nCONTENT;\n\nendif;\n$return .= <<<CONTENT\n,\n\t\t\t\nCONTENT;\n\nif ( \\IPS\\Settings::i()->ipbseo_ga_provider == 'custom' && \\IPS\\Settings::i()->ipbseo_ga_paginatecode ):\n$return .= <<<CONTENT\n\n\t\t\tpaginateCode: function () {\n\t\t\t\t\nCONTENT;\n\n$return .= \\IPS\\Settings::i()->ipbseo_ga_paginatecode;\n$return .= <<<CONTENT\n\n\t\t\t}\n\t\t\t\nCONTENT;\n\nendif;\n$return .= <<<CONTENT\n\n\t\t};\n\t<\/script>\n\nCONTENT;\n\nendif;\n$return .= <<<CONTENT\n\n\nCONTENT;\n\nif ( !\\IPS\\Request::i()->isAjax() and \\IPS\\Dispatcher::hasInstance() and \\IPS\\Dispatcher::i()->controllerLocation == 'front' and \\IPS\\Settings::i()->fb_pixel_enabled and \\IPS\\Settings::i()->fb_pixel_id ):\n$return .= <<<CONTENT\n\n\nCONTENT;\n\n$pixelId = \\IPS\\Settings::i()->fb_pixel_id;\n$return .= <<<CONTENT\n\n<!-- Facebook Pixel Code -->\n<script>\n!function(f,b,e,v,n,t,s){if(f.fbq)return;n=f.fbq=function(){n.callMethod?\nn.callMethod.apply(n,arguments):n.queue.push(arguments)};if(!f._fbq)f._fbq=n;\nn.push=n;n.loaded=!0;n.version='2.0';n.queue=[];t=b.createElement(e);t.async=!0;\nt.src=v;s=b.getElementsByTagName(e)[0];s.parentNode.insertBefore(t,s)}(window,\ndocument,'script','https:\/\/connect.facebook.net\/en_US\/fbevents.js');\nsetTimeout( function() {\n\tfbq('init', '\nCONTENT;\n$return .= htmlspecialchars( $pixelId, ENT_QUOTES | ENT_DISALLOWED, 'UTF-8', FALSE );\n$return .= <<<CONTENT\n');\n\t\nCONTENT;\n\nif ( $pixels = \\IPS\\core\\Facebook\\Pixel::i()->output() ):\n$return .= <<<CONTENT\n\n\t{$pixels}\n\t\nCONTENT;\n\nendif;\n$return .= <<<CONTENT\n\n}, \nCONTENT;\n\n$return .= htmlspecialchars( \\intval( \\IPS\\Settings::i()->fb_pixel_delay * 1000 ), ENT_QUOTES | ENT_DISALLOWED, 'UTF-8', FALSE );\n$return .= <<<CONTENT\n );\n<\/script>\n<!-- End Facebook Pixel Code -->\n\nCONTENT;\n\nendif;\n$return .= <<<CONTENT\n\n\n\nCONTENT;\n\nforeach ( array_unique( array_filter( \\IPS\\Output::i()->jsFiles ), SORT_STRING ) as $js ):\n$return .= <<<CONTENT\n\n\nCONTENT;\n\n$js = \\IPS\\Http\\Url::external( $js );\n$return .= <<<CONTENT\n\n<script type='text\/javascript' src='\nCONTENT;\n\nif ( $js->data['host'] == parse_url( \\IPS\\Settings::i()->base_url, PHP_URL_HOST ) ):\n$return .= <<<CONTENT\n\nCONTENT;\n\n$return .= htmlspecialchars( $js->setQueryString( 'v', \\IPS\\CACHEBUST_KEY ), ENT_QUOTES | ENT_DISALLOWED, 'UTF-8', FALSE );\n$return .= <<<CONTENT\n\nCONTENT;\n\nelse:\n$return .= <<<CONTENT\n\nCONTENT;\n\n$return .= htmlspecialchars( $js, ENT_QUOTES | ENT_DISALLOWED, 'UTF-8', FALSE );\n$return .= <<<CONTENT\n\nCONTENT;\n\nendif;\n$return .= <<<CONTENT\n' data-ips><\/script>\n\nCONTENT;\n\nendforeach;\n$return .= <<<CONTENT\n\n\nCONTENT;\n\nforeach ( array_unique( \\IPS\\Output::i()->jsFilesAsync, SORT_STRING ) as $js ):\n$return .= <<<CONTENT\n\n<script type=\"text\/javascript\" src=\"\nCONTENT;\n\n$return .= htmlspecialchars( \\IPS\\Http\\Url::external( $js )->setQueryString( 'v', \\IPS\\CACHEBUST_KEY ), ENT_QUOTES | ENT_DISALLOWED, 'UTF-8', FALSE );\n$return .= <<<CONTENT\n\" async><\/script>\n\nCONTENT;\n\nendforeach;\n$return .= <<<CONTENT\n\n\nCONTENT;\n\nif ( !\\IPS\\Request::i()->isAjax() and ( \\count( \\IPS\\Output::i()->jsVars ) || \\IPS\\Output::i()->headJs) ):\n$return .= <<<CONTENT\n\n\t<script type='text\/javascript'>\n\t\t\nCONTENT;\n\nforeach ( \\IPS\\Output::i()->jsVars as $k => $v ):\n$return .= <<<CONTENT\n\n\t\t\tips.setSetting( '\nCONTENT;\n$return .= htmlspecialchars( $k, ENT_QUOTES | ENT_DISALLOWED, 'UTF-8', FALSE );\n$return .= <<<CONTENT\n', \nCONTENT;\n\nif ( ! \\is_array( $v ) ):\n$return .= <<<CONTENT\njQuery.parseJSON('\nCONTENT;\n\n$return .= json_encode( $v, JSON_HEX_APOS );\n$return .= <<<CONTENT\n')\nCONTENT;\n\nelse:\n$return .= <<<CONTENT\n\nCONTENT;\n\n$return .= json_encode( $v, JSON_HEX_APOS );\n$return .= <<<CONTENT\n\nCONTENT;\n\nendif;\n$return .= <<<CONTENT\n );\n\t\t\nCONTENT;\n\nendforeach;\n$return .= <<<CONTENT\n\n\t\t\nCONTENT;\n\n$return .= \\IPS\\Output::i()->headJs;\n$return .= <<<CONTENT\n\n\t<\/script>\n\nCONTENT;\n\nendif;\n$return .= <<<CONTENT\n\n\nCONTENT;\n\nif ( \\count( \\IPS\\Output::i()->jsonLd ) ):\n$return .= <<<CONTENT\n\n\nCONTENT;\n\nforeach ( \\IPS\\Output::i()->jsonLd as $object ):\n$return .= <<<CONTENT\n\n<script type='application\/ld+json'>\n\nCONTENT;\n\n$return .= json_encode( $object, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES | JSON_HEX_TAG | JSON_HEX_AMP | JSON_HEX_APOS );\n$return .= <<<CONTENT\n\t\n<\/script>\n\nCONTENT;\n\nendforeach;\n$return .= <<<CONTENT\n\n\nCONTENT;\n\nendif;\n$return .= <<<CONTENT\n\nCONTENT;\n\n\t\treturn $return;\n}\n\n\tfunction includeMeta(  ) {\n\t\t$return = '';\n\t\t$return .= <<<CONTENT\n\n<meta charset=\"utf-8\">\n\nCONTENT;\n\nif ( \\IPS\\Theme::i()->settings['responsive'] ):\n$return .= <<<CONTENT\n\n\t<meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n\nCONTENT;\n\nendif;\n$return .= <<<CONTENT\n\n\nCONTENT;\n\nif ( !isset( \\IPS\\Output::i()->metaTags['og:image'] ) ):\n$return .= <<<CONTENT\n\n\t\nCONTENT;\n\n$shareLogos = \\IPS\\Settings::i()->icons_sharer_logo ? json_decode( \\IPS\\Settings::i()->icons_sharer_logo, true ) : array();\n$return .= <<<CONTENT\n\n\t\nCONTENT;\n\nforeach ( $shareLogos as $logo ):\n$return .= <<<CONTENT\n\n\t\t<meta property=\"og:image\" content=\"\nCONTENT;\n\n$return .= \\IPS\\File::get( \"core_Icons\", $logo )->url->setScheme(\"https\");\n$return .= <<<CONTENT\n\">\n\t\nCONTENT;\n\nendforeach;\n$return .= <<<CONTENT\n\n\nCONTENT;\n\nendif;\n$return .= <<<CONTENT\n\n\nCONTENT;\n\nif ( !isset( \\IPS\\Output::i()->metaTags['og:image'] ) and !\\count( $shareLogos )  ):\n$return .= <<<CONTENT\n\n\t<meta name=\"twitter:card\" content=\"summary\" \/>\n\nCONTENT;\n\nelse:\n$return .= <<<CONTENT\n\n\t<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n\nCONTENT;\n\nendif;\n$return .= <<<CONTENT\n\n\nCONTENT;\n\nif ( \\IPS\\Settings::i()->site_twitter_id ):\n$return .= <<<CONTENT\n\n\t\nCONTENT;\n\nif ( mb_substr( \\IPS\\Settings::i()->site_twitter_id, 0, 1 ) === '@' ):\n$return .= <<<CONTENT\n\n\t\t<meta name=\"twitter:site\" content=\"\nCONTENT;\n\n$return .= \\IPS\\Settings::i()->site_twitter_id;\n$return .= <<<CONTENT\n\" \/>\n\t\nCONTENT;\n\nelse:\n$return .= <<<CONTENT\n\n\t\t<meta name=\"twitter:site\" content=\"@\nCONTENT;\n\n$return .= \\IPS\\Settings::i()->site_twitter_id;\n$return .= <<<CONTENT\n\" \/>\n\t\nCONTENT;\n\nendif;\n$return .= <<<CONTENT\n\n\nCONTENT;\n\nendif;\n$return .= <<<CONTENT\n\n\nCONTENT;\n\nforeach ( \\IPS\\Output::i()->metaTags as $name => $content ):\n$return .= <<<CONTENT\n\n\t\nCONTENT;\n\nif ( $name == 'canonical' ):\n$return .= <<<CONTENT\n\n\t\t<link rel=\"canonical\" href=\"\nCONTENT;\n$return .= htmlspecialchars( $content, ENT_QUOTES | ENT_DISALLOWED, 'UTF-8', FALSE );\n$return .= <<<CONTENT\n\">\n\t\nCONTENT;\n\nelse:\n$return .= <<<CONTENT\n\n\t\t\nCONTENT;\n\nif ( $name != 'title' ):\n$return .= <<<CONTENT\n\n\t\t\t\nCONTENT;\n\nif ( \\is_array( $content )  ):\n$return .= <<<CONTENT\n\n\t\t\t\t\nCONTENT;\n\nforeach ( $content as $_value  ):\n$return .= <<<CONTENT\n\n\t\t\t\t\t<meta \nCONTENT;\n\nif ( mb_substr( $name, 0, 3 ) === 'og:' or mb_substr( $name, 0, 3 ) === 'fb:' ):\n$return .= <<<CONTENT\nproperty\nCONTENT;\n\nelse:\n$return .= <<<CONTENT\nname\nCONTENT;\n\nendif;\n$return .= <<<CONTENT\n=\"\nCONTENT;\n$return .= htmlspecialchars( $name, ENT_QUOTES | ENT_DISALLOWED, 'UTF-8', FALSE );\n$return .= <<<CONTENT\n\" content=\"\nCONTENT;\n$return .= htmlspecialchars( $_value, ENT_QUOTES | ENT_DISALLOWED, 'UTF-8', FALSE );\n$return .= <<<CONTENT\n\">\n\t\t\t\t\nCONTENT;\n\nendforeach;\n$return .= <<<CONTENT\n\n\t\t\t\nCONTENT;\n\nelse:\n$return .= <<<CONTENT\n\n\t\t\t\t<meta \nCONTENT;\n\nif ( mb_substr( $name, 0, 3 ) === 'og:' or mb_substr( $name, 0, 3 ) === 'fb:' ):\n$return .= <<<CONTENT\nproperty\nCONTENT;\n\nelse:\n$return .= <<<CONTENT\nname\nCONTENT;\n\nendif;\n$return .= <<<CONTENT\n=\"\nCONTENT;\n$return .= htmlspecialchars( $name, ENT_QUOTES | ENT_DISALLOWED, 'UTF-8', FALSE );\n$return .= <<<CONTENT\n\" content=\"\nCONTENT;\n$return .= htmlspecialchars( $content, ENT_QUOTES | ENT_DISALLOWED, 'UTF-8', FALSE );\n$return .= <<<CONTENT\n\">\n\t\t\t\nCONTENT;\n\nendif;\n$return .= <<<CONTENT\n\n\t\t\nCONTENT;\n\nendif;\n$return .= <<<CONTENT\n\n\t\nCONTENT;\n\nendif;\n$return .= <<<CONTENT\n\n\nCONTENT;\n\nendforeach;\n$return .= <<<CONTENT\n\n\nCONTENT;\n\nforeach ( \\IPS\\Output::i()->linkTags as $type => $value ):\n$return .= <<<CONTENT\n\n\t\nCONTENT;\n\nif ( \\is_array( $value ) ):\n$return .= <<<CONTENT\n\n\t\t<link \nCONTENT;\n\nforeach ( $value as $k => $v ):\n$return .= <<<CONTENT\n\nCONTENT;\n$return .= htmlspecialchars( $k, ENT_QUOTES | ENT_DISALLOWED, 'UTF-8', FALSE );\n$return .= <<<CONTENT\n=\"\nCONTENT;\n\n$return .= htmlspecialchars( $v, ENT_QUOTES | ENT_DISALLOWED, 'UTF-8', FALSE );\n$return .= <<<CONTENT\n\" \nCONTENT;\n\nendforeach;\n$return .= <<<CONTENT\n\/>\n\t\nCONTENT;\n\nelseif ( $type != 'canonical' OR !isset( \\IPS\\Output::i()->metaTags['canonical'] ) ):\n$return .= <<<CONTENT\n\n\t\t<link rel=\"\nCONTENT;\n$return .= htmlspecialchars( $type, ENT_QUOTES | ENT_DISALLOWED, 'UTF-8', FALSE );\n$return .= <<<CONTENT\n\" href=\"\nCONTENT;\n\n$return .= htmlspecialchars( $value, ENT_QUOTES | ENT_DISALLOWED, 'UTF-8', FALSE );\n$return .= <<<CONTENT\n\" \/>\n\t\nCONTENT;\n\nendif;\n$return .= <<<CONTENT\n\n\nCONTENT;\n\nendforeach;\n$return .= <<<CONTENT\n\n\nCONTENT;\n\nforeach ( \\IPS\\Output::i()->rssFeeds as $title => $url ):\n$return .= <<<CONTENT\n<link rel=\"alternate\" type=\"application\/rss+xml\" title=\"\nCONTENT;\n\n$val = \"{$title}\"; $return .= \\IPS\\Member::loggedIn()->language()->addToStack( htmlspecialchars( $val, ENT_DISALLOWED, 'UTF-8', FALSE ), TRUE, array(  ) );\n$return .= <<<CONTENT\n\" href=\"\nCONTENT;\n$return .= htmlspecialchars( $url, ENT_QUOTES | ENT_DISALLOWED, 'UTF-8', FALSE );\n$return .= <<<CONTENT\n\" \/>\nCONTENT;\n\nendforeach;\n$return .= <<<CONTENT\n\n\nCONTENT;\n\nif ( \\IPS\\Output::i()->base ):\n$return .= <<<CONTENT\n\n\t<base target=\"\nCONTENT;\n\n$return .= htmlspecialchars( \\IPS\\Output::i()->base, ENT_QUOTES | ENT_DISALLOWED, 'UTF-8', FALSE );\n$return .= <<<CONTENT\n\">\n\nCONTENT;\n\nendif;\n$return .= <<<CONTENT\n\n\nCONTENT;\n\n$manifest = json_decode( \\IPS\\Settings::i()->manifest_details, TRUE );\n$return .= <<<CONTENT\n\n<link rel=\"manifest\" href=\"\nCONTENT;\n\n$return .= htmlspecialchars( \\IPS\\Http\\Url::internal( \"app=core&module=system&controller=metatags&do=manifest\", null, \"manifest\", array(), 0 ), ENT_QUOTES | ENT_DISALLOWED, 'UTF-8', TRUE );\n$return .= <<<CONTENT\n\">\n<meta name=\"msapplication-config\" content=\"\nCONTENT;\n\n$return .= htmlspecialchars( \\IPS\\Http\\Url::internal( \"app=core&module=system&controller=metatags&do=iebrowserconfig\", null, \"iebrowserconfig\", array(), 0 ), ENT_QUOTES | ENT_DISALLOWED, 'UTF-8', TRUE );\n$return .= <<<CONTENT\n\">\n<meta name=\"msapplication-starturl\" content=\"\nCONTENT;\n\nif ( isset( $manifest['start_url'] ) ):\n$return .= <<<CONTENT\n\nCONTENT;\n$return .= htmlspecialchars( $manifest['start_url'], ENT_QUOTES | ENT_DISALLOWED, 'UTF-8', FALSE );\n$return .= <<<CONTENT\n\nCONTENT;\n\nelse:\n$return .= <<<CONTENT\n\/\nCONTENT;\n\nendif;\n$return .= <<<CONTENT\n\">\n<meta name=\"application-name\" content=\"\nCONTENT;\n\nif ( isset( $manifest['name'] ) ):\n$return .= <<<CONTENT\n\nCONTENT;\n$return .= htmlspecialchars( $manifest['name'], ENT_QUOTES | ENT_DISALLOWED, 'UTF-8', FALSE );\n$return .= <<<CONTENT\n\nCONTENT;\n\nelse:\n$return .= <<<CONTENT\n\nCONTENT;\n\n$return .= \\IPS\\Settings::i()->board_name;\n$return .= <<<CONTENT\n\nCONTENT;\n\nendif;\n$return .= <<<CONTENT\n\">\n<meta name=\"apple-mobile-web-app-title\" content=\"\nCONTENT;\n\nif ( isset( $manifest['name'] ) ):\n$return .= <<<CONTENT\n\nCONTENT;\n$return .= htmlspecialchars( $manifest['name'], ENT_QUOTES | ENT_DISALLOWED, 'UTF-8', FALSE );\n$return .= <<<CONTENT\n\nCONTENT;\n\nelse:\n$return .= <<<CONTENT\n\nCONTENT;\n\n$return .= \\IPS\\Settings::i()->board_name;\n$return .= <<<CONTENT\n\nCONTENT;\n\nendif;\n$return .= <<<CONTENT\n\">\n\nCONTENT;\n\nif ( isset( $manifest['theme_color'] ) ):\n$return .= <<<CONTENT\n\n\t<meta name=\"theme-color\" content=\"\nCONTENT;\n$return .= htmlspecialchars( $manifest['theme_color'], ENT_QUOTES | ENT_DISALLOWED, 'UTF-8', FALSE );\n$return .= <<<CONTENT\n\">\n\nCONTENT;\n\nelse:\n$return .= <<<CONTENT\n\n\t<meta name=\"theme-color\" content=\"\nCONTENT;\n\n$return .= \\IPS\\Theme::i()->settings['header'];\n$return .= <<<CONTENT\n\">\n\nCONTENT;\n\nendif;\n$return .= <<<CONTENT\n\n\nCONTENT;\n\nif ( isset( $manifest['background_color'] ) ):\n$return .= <<<CONTENT\n\n\t<meta name=\"msapplication-TileColor\" content=\"\nCONTENT;\n$return .= htmlspecialchars( $manifest['background_color'], ENT_QUOTES | ENT_DISALLOWED, 'UTF-8', FALSE );\n$return .= <<<CONTENT\n\">\n\nCONTENT;\n\nendif;\n$return .= <<<CONTENT\n\n\nCONTENT;\n\nif ( \\IPS\\Settings::i()->icons_mask_icon AND \\IPS\\Settings::i()->icons_mask_color ):\n$return .= <<<CONTENT\n\n\t<link rel=\"mask-icon\" href=\"\nCONTENT;\n\n$return .= \\IPS\\File::get( \"core_Icons\", \\IPS\\Settings::i()->icons_mask_icon )->url;\n$return .= <<<CONTENT\n\" color=\"\nCONTENT;\n\n$return .= \\IPS\\Settings::i()->icons_mask_color;\n$return .= <<<CONTENT\n\">\n\nCONTENT;\n\nendif;\n$return .= <<<CONTENT\n\n\n\nCONTENT;\n\n$homeScreen = json_decode( \\IPS\\Settings::i()->icons_homescreen, TRUE ) ?? array();\n$return .= <<<CONTENT\n\n\nCONTENT;\n\nforeach ( $homeScreen as $name => $image ):\n$return .= <<<CONTENT\n\n\t\nCONTENT;\n\nif ( $name != 'original' ):\n$return .= <<<CONTENT\n\n\t\t\nCONTENT;\n\nif ( mb_strpos( $name, 'apple-touch-icon' ) !== FALSE ):\n$return .= <<<CONTENT\n\n\t\t\t\nCONTENT;\n\nif ( $name === 'apple-touch-icon-57x57' ):\n$return .= <<<CONTENT\n\n\t\t\t\t<link rel=\"apple-touch-icon\" href=\"\nCONTENT;\n\n$return .= \\IPS\\File::get( \"core_Icons\", $image['url'] )->url;\n$return .= <<<CONTENT\n\">\n\t\t\t\nCONTENT;\n\nelse:\n$return .= <<<CONTENT\n\n\t\t\t\t<link rel=\"apple-touch-icon\" sizes=\"\nCONTENT;\n$return .= htmlspecialchars( $image['width'], ENT_QUOTES | ENT_DISALLOWED, 'UTF-8', FALSE );\n$return .= <<<CONTENT\nx\nCONTENT;\n$return .= htmlspecialchars( $image['height'], ENT_QUOTES | ENT_DISALLOWED, 'UTF-8', FALSE );\n$return .= <<<CONTENT\n\" href=\"\nCONTENT;\n\n$return .= \\IPS\\File::get( \"core_Icons\", $image['url'] )->url;\n$return .= <<<CONTENT\n\">\n\t\t\t\nCONTENT;\n\nendif;\n$return .= <<<CONTENT\n\n\t\t\nCONTENT;\n\nelseif ( mb_strpos( $name, 'msapplication' ) !== FALSE ):\n$return .= <<<CONTENT\n\n\t\t\t<meta name=\"\nCONTENT;\n$return .= htmlspecialchars( $name, ENT_QUOTES | ENT_DISALLOWED, 'UTF-8', FALSE );\n$return .= <<<CONTENT\n\" content=\"\nCONTENT;\n\n$return .= \\IPS\\File::get( \"core_Icons\", $image['url'] )->url;\n$return .= <<<CONTENT\n\"\/>\n\t\t\nCONTENT;\n\nelse:\n$return .= <<<CONTENT\n\n\t\t\t<link rel=\"icon\" sizes=\"\nCONTENT;\n$return .= htmlspecialchars( $image['width'], ENT_QUOTES | ENT_DISALLOWED, 'UTF-8', FALSE );\n$return .= <<<CONTENT\nx\nCONTENT;\n$return .= htmlspecialchars( $image['height'], ENT_QUOTES | ENT_DISALLOWED, 'UTF-8', FALSE );\n$return .= <<<CONTENT\n\" href=\"\nCONTENT;\n\n$return .= \\IPS\\File::get( \"core_Icons\", $image['url'] )->url;\n$return .= <<<CONTENT\n\">\n\t\t\nCONTENT;\n\nendif;\n$return .= <<<CONTENT\n\n\t\nCONTENT;\n\nendif;\n$return .= <<<CONTENT\n\n\nCONTENT;\n\nendforeach;\n$return .= <<<CONTENT\n\nCONTENT;\n\n\t\treturn $return;\n}\n\n\tfunction message( $message, $type, $debug=NULL, $parse=TRUE ) {\n\t\t$return = '';\n\t\t$return .= <<<CONTENT\n\n\nCONTENT;\n\nif ( $debug !== NULL ):\n$return .= <<<CONTENT\n\n\t<div class=\"ipsMessage ipsMessage_\nCONTENT;\n$return .= htmlspecialchars( $type, ENT_QUOTES | ENT_DISALLOWED, 'UTF-8', FALSE );\n$return .= <<<CONTENT\n\">\n\t\t\nCONTENT;\n\nif ( $parse ):\n$return .= <<<CONTENT\n\n\t\t\t\nCONTENT;\n\n$val = \"{$message}\"; $return .= \\IPS\\Member::loggedIn()->language()->addToStack( htmlspecialchars( $val, ENT_DISALLOWED, 'UTF-8', FALSE ), TRUE, array(  ) );\n$return .= <<<CONTENT\n\n\t\t\nCONTENT;\n\nelse:\n$return .= <<<CONTENT\n\n\t\t\t{$message}\n\t\t\nCONTENT;\n\nendif;\n$return .= <<<CONTENT\n\n\t\t<br><br>\n\t\t<pre>\nCONTENT;\n$return .= htmlspecialchars( $debug, ENT_QUOTES | ENT_DISALLOWED, 'UTF-8', FALSE );\n$return .= <<<CONTENT\n<\/pre>\n\t<\/div>\n\nCONTENT;\n\nelse:\n$return .= <<<CONTENT\n\n\t<p class=\"ipsMessage ipsMessage_\nCONTENT;\n$return .= htmlspecialchars( $type, ENT_QUOTES | ENT_DISALLOWED, 'UTF-8', FALSE );\n$return .= <<<CONTENT\n\">\n\t\t\nCONTENT;\n\nif ( $parse ):\n$return .= <<<CONTENT\n\n\t\t\t\nCONTENT;\n\n$val = \"{$message}\"; $return .= \\IPS\\Member::loggedIn()->language()->addToStack( htmlspecialchars( $val, ENT_DISALLOWED, 'UTF-8', FALSE ), TRUE, array(  ) );\n$return .= <<<CONTENT\n\n\t\t\nCONTENT;\n\nelse:\n$return .= <<<CONTENT\n\n\t\t\t{$message}\n\t\t\nCONTENT;\n\nendif;\n$return .= <<<CONTENT\n\n\t<\/p>\n\nCONTENT;\n\nendif;\n$return .= <<<CONTENT\n\nCONTENT;\n\n\t\treturn $return;\n}\n\n\tfunction miniPagination( $baseUrl, $pages, $activePage=1, $perPage=25, $ajax=FALSE, $pageParam='page' ) {\n\t\t$return = '';\n\t\t$return .= <<<CONTENT\n\n\nCONTENT;\n\nif ( $pages > 1 ):\n$return .= <<<CONTENT\n\n\t<span class='ipsPagination ipsPagination_mini' id='elPagination_\nCONTENT;\n\n$return .= htmlspecialchars( md5($baseUrl), ENT_QUOTES | ENT_DISALLOWED, 'UTF-8', FALSE );\n$return .= <<<CONTENT\n'>\n\t\t\nCONTENT;\n\nforeach ( range( 1, ( 4 > $pages ) ? $pages : 4 ) as $i ):\n$return .= <<<CONTENT\n\n\t\t\t<span class='ipsPagination_page'><a href='\nCONTENT;\n$return .= htmlspecialchars( $baseUrl->setPage( $pageParam, $i ), ENT_QUOTES | ENT_DISALLOWED, 'UTF-8', FALSE );\n$return .= <<<CONTENT\n' data-ipsTooltip title='\nCONTENT;\n\n$sprintf = array($i); $return .= \\IPS\\Member::loggedIn()->language()->addToStack( htmlspecialchars( 'go_to_page_x', ENT_DISALLOWED, 'UTF-8', FALSE ), FALSE, array( 'sprintf' => $sprintf ) );\n$return .= <<<CONTENT\n'>\nCONTENT;\n$return .= htmlspecialchars( $i, ENT_QUOTES | ENT_DISALLOWED, 'UTF-8', FALSE );\n$return .= <<<CONTENT\n<\/a><\/span>\n\t\t\nCONTENT;\n\nendforeach;\n$return .= <<<CONTENT\n\n\t\t\nCONTENT;\n\nif ( $pages > 4 ):\n$return .= <<<CONTENT\n\n\t\t\t<span class='ipsPagination_last'><a href='\nCONTENT;\n$return .= htmlspecialchars( $baseUrl->setPage( $pageParam, $pages ), ENT_QUOTES | ENT_DISALLOWED, 'UTF-8', FALSE );\n$return .= <<<CONTENT\n' data-ipsTooltip title='\nCONTENT;\n\n$return .= \\IPS\\Member::loggedIn()->language()->addToStack( htmlspecialchars( 'last_page', ENT_DISALLOWED, 'UTF-8', FALSE ), TRUE, array(  ) );\n$return .= <<<CONTENT\n'>\nCONTENT;\n$return .= htmlspecialchars( $pages, ENT_QUOTES | ENT_DISALLOWED, 'UTF-8', FALSE );\n$return .= <<<CONTENT\n <i class='fa fa-caret-right'><\/i><\/a><\/span>\n\t\t\nCONTENT;\n\nendif;\n$return .= <<<CONTENT\n\n\t<\/span>\n\nCONTENT;\n\nendif;\n$return .= <<<CONTENT\n\nCONTENT;\n\n\t\treturn $return;\n}\n\n\tfunction multipleRedirect( $url, $mr=NULL, $height=NULL ) {\n\t\t$return = '';\n\t\t$return .= <<<CONTENT\n\n<div class=\"ipsRedirect_manualButton\">\n\t<a href='\nCONTENT;\n$return .= htmlspecialchars( $url->setQueryString( array( 'mr' => '0', '_mrReset' => 1 ) ), ENT_QUOTES | ENT_DISALLOWED, 'UTF-8', FALSE );\n$return .= <<<CONTENT\n' class=\"ipsButton ipsButton_primary\">\nCONTENT;\n\n$return .= \\IPS\\Member::loggedIn()->language()->addToStack( htmlspecialchars( 'start', ENT_DISALLOWED, 'UTF-8', FALSE ), TRUE, array(  ) );\n$return .= <<<CONTENT\n<\/a>\n<\/div>\n<div data-controller=\"core.global.core.multipleRedirect\" data-url=\"\nCONTENT;\n$return .= htmlspecialchars( $url, ENT_QUOTES | ENT_DISALLOWED, 'UTF-8', FALSE );\n$return .= <<<CONTENT\n\">\n\t<div class=\"ipsRedirect ipsHide ipsPad\">\n\t\t<div class=\"ipsLoading ipsRedirect_loading\" data-role=\"loadingIcon\" data-loading-text=\"\" \nCONTENT;\n\nif ( $height ):\n$return .= <<<CONTENT\nstyle=\"height: \nCONTENT;\n$return .= htmlspecialchars( $height, ENT_QUOTES | ENT_DISALLOWED, 'UTF-8', FALSE );\n$return .= <<<CONTENT\npx;\"\nCONTENT;\n\nendif;\n$return .= <<<CONTENT\n>\n\t\t<\/div>\n\t\t<div class=\"ipsHide\" data-role=\"progressBarContainer\">\n\t\t\t<div class=\"ipsRedirect_progress\" data-loading-text=\"\">\n\t\t\t\t<div class=\"ipsProgressBar ipsProgressBar_animated\">\n\t\t\t\t\t<div class=\"ipsProgressBar_progress\" data-role=\"progressBar\"><\/div>\n\t\t\t\t<\/div>\n\t\t\t<\/div>\n\t\t<\/div>\n\t<\/div>\n<\/div>\nCONTENT;\n\n\t\treturn $return;\n}\n\n\tfunction pagination( $baseUrl, $pages, $activePage=1, $perPage=25, $ajax=TRUE, $pageParam='page', $simple=false ) {\n\t\t$return = '';\n\t\t$return .= <<<CONTENT\n\n\nCONTENT;\n\n$firstPage = $baseUrl->setPage( $pageParam );\n$return .= <<<CONTENT\n\n\nCONTENT;\n\nif ( $activePage > 1 || $pages > 1 ):\n$return .= <<<CONTENT\n\n\t\nCONTENT;\n\n$uniqId = mt_rand();\n$return .= <<<CONTENT\n\n\t<ul class='ipsPagination' id='elPagination_\nCONTENT;\n\n$return .= htmlspecialchars( md5($baseUrl), ENT_QUOTES | ENT_DISALLOWED, 'UTF-8', FALSE );\n$return .= <<<CONTENT\n_\nCONTENT;\n$return .= htmlspecialchars( $uniqId, ENT_QUOTES | ENT_DISALLOWED, 'UTF-8', FALSE );\n$return .= <<<CONTENT\n' data-ipsPagination-seoPagination='\nCONTENT;\n\nif ( $firstPage->seoPagination ):\n$return .= <<<CONTENT\ntrue\nCONTENT;\n\nelse:\n$return .= <<<CONTENT\nfalse\nCONTENT;\n\nendif;\n$return .= <<<CONTENT\n' data-pages='\nCONTENT;\n$return .= htmlspecialchars( $pages, ENT_QUOTES | ENT_DISALLOWED, 'UTF-8', FALSE );\n$return .= <<<CONTENT\n' \nCONTENT;\n\nif ( $ajax and ( \\IPS\\Theme::i()->settings['ajax_pagination'] or \\IPS\\Request::i()->isAjax()) ):\n$return .= <<<CONTENT\ndata-ipsPagination \nCONTENT;\n\nif ( $pageParam != 'page' ):\n$return .= <<<CONTENT\ndata-ipsPagination-pageParam='\nCONTENT;\n$return .= htmlspecialchars( $pageParam, ENT_QUOTES | ENT_DISALLOWED, 'UTF-8', FALSE );\n$return .= <<<CONTENT\n'\nCONTENT;\n\nendif;\n$return .= <<<CONTENT\n data-ipsPagination-pages=\"\nCONTENT;\n$return .= htmlspecialchars( $pages, ENT_QUOTES | ENT_DISALLOWED, 'UTF-8', FALSE );\n$return .= <<<CONTENT\n\" data-ipsPagination-perPage='\nCONTENT;\n$return .= htmlspecialchars( $perPage, ENT_QUOTES | ENT_DISALLOWED, 'UTF-8', FALSE );\n$return .= <<<CONTENT\n'\nCONTENT;\n\nendif;\n$return .= <<<CONTENT\n>\n\t\t\nCONTENT;\n\nif ( $simple ):\n$return .= <<<CONTENT\n\n\t\t\t\nCONTENT;\n\nif ( $activePage > 1 ):\n$return .= <<<CONTENT\n\n\t\t\t\t<li class='ipsPagination_prev'><a href='\nCONTENT;\n$return .= htmlspecialchars( $baseUrl->setPage( $pageParam, $activePage - 1 ), ENT_QUOTES | ENT_DISALLOWED, 'UTF-8', FALSE );\n$return .= <<<CONTENT\n' rel=\"prev\" data-page='\nCONTENT;\n\n$return .= htmlspecialchars( $activePage - 1, ENT_QUOTES | ENT_DISALLOWED, 'UTF-8', FALSE );\n$return .= <<<CONTENT\n' data-ipsTooltip title='\nCONTENT;\n\n$return .= \\IPS\\Member::loggedIn()->language()->addToStack( htmlspecialchars( 'prev_page', ENT_DISALLOWED, 'UTF-8', FALSE ), TRUE, array(  ) );\n$return .= <<<CONTENT\n'>\nCONTENT;\n\n$return .= \\IPS\\Member::loggedIn()->language()->addToStack( htmlspecialchars( 'prev', ENT_DISALLOWED, 'UTF-8', FALSE ), TRUE, array(  ) );\n$return .= <<<CONTENT\n<\/a><\/li>\n\t\t\t\nCONTENT;\n\nendif;\n$return .= <<<CONTENT\n\n\t\t\t\nCONTENT;\n\nif ( $activePage < $pages ):\n$return .= <<<CONTENT\n\n\t\t\t\t<li class='ipsPagination_next'><a href='\nCONTENT;\n$return .= htmlspecialchars( $baseUrl->setPage( $pageParam, $activePage + 1 ), ENT_QUOTES | ENT_DISALLOWED, 'UTF-8', FALSE );\n$return .= <<<CONTENT\n' rel=\"next\" data-page='\nCONTENT;\n\n$return .= htmlspecialchars( $activePage + 1, ENT_QUOTES | ENT_DISALLOWED, 'UTF-8', FALSE );\n$return .= <<<CONTENT\n' data-ipsTooltip title='\nCONTENT;\n\n$return .= \\IPS\\Member::loggedIn()->language()->addToStack( htmlspecialchars( 'next_page', ENT_DISALLOWED, 'UTF-8', FALSE ), TRUE, array(  ) );\n$return .= <<<CONTENT\n'>\nCONTENT;\n\n$return .= \\IPS\\Member::loggedIn()->language()->addToStack( htmlspecialchars( 'next', ENT_DISALLOWED, 'UTF-8', FALSE ), TRUE, array(  ) );\n$return .= <<<CONTENT\n<\/a><\/li>\n\t\t\t\nCONTENT;\n\nendif;\n$return .= <<<CONTENT\n\n\t\t\nCONTENT;\n\nelse:\n$return .= <<<CONTENT\n\n\t\t\t\nCONTENT;\n\nif ( $activePage != 1 ):\n$return .= <<<CONTENT\n\n\t\t\t\t<li class='ipsPagination_first'><a href='\nCONTENT;\n$return .= htmlspecialchars( $firstPage, ENT_QUOTES | ENT_DISALLOWED, 'UTF-8', FALSE );\n$return .= <<<CONTENT\n' rel=\"first\" data-page='1' data-ipsTooltip title='\nCONTENT;\n\n$return .= \\IPS\\Member::loggedIn()->language()->addToStack( htmlspecialchars( 'first_page', ENT_DISALLOWED, 'UTF-8', FALSE ), TRUE, array(  ) );\n$return .= <<<CONTENT\n'><i class='fa fa-angle-double-left'><\/i><\/a><\/li>\n\t\t\t\t<li class='ipsPagination_prev'><a href='\nCONTENT;\n$return .= htmlspecialchars( $baseUrl->setPage( $pageParam, $activePage - 1 ), ENT_QUOTES | ENT_DISALLOWED, 'UTF-8', FALSE );\n$return .= <<<CONTENT\n' rel=\"prev\" data-page='\nCONTENT;\n\n$return .= htmlspecialchars( $activePage - 1, ENT_QUOTES | ENT_DISALLOWED, 'UTF-8', FALSE );\n$return .= <<<CONTENT\n' data-ipsTooltip title='\nCONTENT;\n\n$return .= \\IPS\\Member::loggedIn()->language()->addToStack( htmlspecialchars( 'prev_page', ENT_DISALLOWED, 'UTF-8', FALSE ), TRUE, array(  ) );\n$return .= <<<CONTENT\n'>\nCONTENT;\n\n$return .= \\IPS\\Member::loggedIn()->language()->addToStack( htmlspecialchars( 'prev', ENT_DISALLOWED, 'UTF-8', FALSE ), TRUE, array(  ) );\n$return .= <<<CONTENT\n<\/a><\/li>\n\t\t\t\t\nCONTENT;\n\nforeach ( range( ( ( $activePage - 5 ) > 0 ) ? ( $activePage - 5 ) : 1, $activePage - 1 ) as $idx => $i ):\n$return .= <<<CONTENT\n\n\t\t\t\t\t<li class='ipsPagination_page'><a href='\nCONTENT;\n$return .= htmlspecialchars( $baseUrl->setPage( $pageParam, $i ), ENT_QUOTES | ENT_DISALLOWED, 'UTF-8', FALSE );\n$return .= <<<CONTENT\n' data-page='\nCONTENT;\n$return .= htmlspecialchars( $i, ENT_QUOTES | ENT_DISALLOWED, 'UTF-8', FALSE );\n$return .= <<<CONTENT\n'>\nCONTENT;\n$return .= htmlspecialchars( $i, ENT_QUOTES | ENT_DISALLOWED, 'UTF-8', FALSE );\n$return .= <<<CONTENT\n<\/a><\/li>\n\t\t\t\t\nCONTENT;\n\nendforeach;\n$return .= <<<CONTENT\n\n\t\t\t\nCONTENT;\n\nelse:\n$return .= <<<CONTENT\n\n\t\t\t\t<li class='ipsPagination_first ipsPagination_inactive'><a href='\nCONTENT;\n$return .= htmlspecialchars( $firstPage, ENT_QUOTES | ENT_DISALLOWED, 'UTF-8', FALSE );\n$return .= <<<CONTENT\n' rel=\"first\" data-page='1' data-ipsTooltip title='\nCONTENT;\n\n$return .= \\IPS\\Member::loggedIn()->language()->addToStack( htmlspecialchars( 'first_page', ENT_DISALLOWED, 'UTF-8', FALSE ), TRUE, array(  ) );\n$return .= <<<CONTENT\n'><i class='fa fa-angle-double-left'><\/i><\/a><\/li>\n\t\t\t\t<li class='ipsPagination_prev ipsPagination_inactive'><a href='\nCONTENT;\n$return .= htmlspecialchars( $baseUrl->setPage( $pageParam, $activePage - 1 ), ENT_QUOTES | ENT_DISALLOWED, 'UTF-8', FALSE );\n$return .= <<<CONTENT\n' rel=\"prev\" data-page='\nCONTENT;\n\n$return .= htmlspecialchars( $activePage - 1, ENT_QUOTES | ENT_DISALLOWED, 'UTF-8', FALSE );\n$return .= <<<CONTENT\n' data-ipsTooltip title='\nCONTENT;\n\n$return .= \\IPS\\Member::loggedIn()->language()->addToStack( htmlspecialchars( 'prev_page', ENT_DISALLOWED, 'UTF-8', FALSE ), TRUE, array(  ) );\n$return .= <<<CONTENT\n'>\nCONTENT;\n\n$return .= \\IPS\\Member::loggedIn()->language()->addToStack( htmlspecialchars( 'prev', ENT_DISALLOWED, 'UTF-8', FALSE ), TRUE, array(  ) );\n$return .= <<<CONTENT\n<\/a><\/li>\n\t\t\t\nCONTENT;\n\nendif;\n$return .= <<<CONTENT\n\n\t\t\t<li class='ipsPagination_page ipsPagination_active'><a href='\nCONTENT;\n$return .= htmlspecialchars( $baseUrl->setPage( $pageParam, $activePage ), ENT_QUOTES | ENT_DISALLOWED, 'UTF-8', FALSE );\n$return .= <<<CONTENT\n' data-page='\nCONTENT;\n$return .= htmlspecialchars( $activePage, ENT_QUOTES | ENT_DISALLOWED, 'UTF-8', FALSE );\n$return .= <<<CONTENT\n'>\nCONTENT;\n$return .= htmlspecialchars( $activePage, ENT_QUOTES | ENT_DISALLOWED, 'UTF-8', FALSE );\n$return .= <<<CONTENT\n<\/a><\/li>\n\t\t\t\nCONTENT;\n\nif ( $activePage != $pages ):\n$return .= <<<CONTENT\n\n\t\t\t\t\nCONTENT;\n\nforeach ( range( $activePage + 1, ( ( $activePage + 5 ) > $pages ) ? $pages : ( $activePage + 5 ) ) as $idx => $i ):\n$return .= <<<CONTENT\n\n\t\t\t\t\t<li class='ipsPagination_page'><a href='\nCONTENT;\n$return .= htmlspecialchars( $baseUrl->setPage( $pageParam, $i ), ENT_QUOTES | ENT_DISALLOWED, 'UTF-8', FALSE );\n$return .= <<<CONTENT\n' data-page='\nCONTENT;\n$return .= htmlspecialchars( $i, ENT_QUOTES | ENT_DISALLOWED, 'UTF-8', FALSE );\n$return .= <<<CONTENT\n'>\nCONTENT;\n$return .= htmlspecialchars( $i, ENT_QUOTES | ENT_DISALLOWED, 'UTF-8', FALSE );\n$return .= <<<CONTENT\n<\/a><\/li>\n\t\t\t\t\nCONTENT;\n\nendforeach;\n$return .= <<<CONTENT\n\n\t\t\t\t<li class='ipsPagination_next'><a href='\nCONTENT;\n$return .= htmlspecialchars( $baseUrl->setPage( $pageParam, $activePage + 1 ), ENT_QUOTES | ENT_DISALLOWED, 'UTF-8', FALSE );\n$return .= <<<CONTENT\n' rel=\"next\" data-page='\nCONTENT;\n\n$return .= htmlspecialchars( $activePage + 1, ENT_QUOTES | ENT_DISALLOWED, 'UTF-8', FALSE );\n$return .= <<<CONTENT\n' data-ipsTooltip title='\nCONTENT;\n\n$return .= \\IPS\\Member::loggedIn()->language()->addToStack( htmlspecialchars( 'next_page', ENT_DISALLOWED, 'UTF-8', FALSE ), TRUE, array(  ) );\n$return .= <<<CONTENT\n'>\nCONTENT;\n\n$return .= \\IPS\\Member::loggedIn()->language()->addToStack( htmlspecialchars( 'next', ENT_DISALLOWED, 'UTF-8', FALSE ), TRUE, array(  ) );\n$return .= <<<CONTENT\n<\/a><\/li>\n\t\t\t\t<li class='ipsPagination_last'><a href='\nCONTENT;\n$return .= htmlspecialchars( $baseUrl->setPage( $pageParam, $pages ), ENT_QUOTES | ENT_DISALLOWED, 'UTF-8', FALSE );\n$return .= <<<CONTENT\n' rel=\"last\" data-page='\nCONTENT;\n$return .= htmlspecialchars( $pages, ENT_QUOTES | ENT_DISALLOWED, 'UTF-8', FALSE );\n$return .= <<<CONTENT\n' data-ipsTooltip title='\nCONTENT;\n\n$return .= \\IPS\\Member::loggedIn()->language()->addToStack( htmlspecialchars( 'last_page', ENT_DISALLOWED, 'UTF-8', FALSE ), TRUE, array(  ) );\n$return .= <<<CONTENT\n'><i class='fa fa-angle-double-right'><\/i><\/a><\/li>\n\t\t\t\nCONTENT;\n\nelse:\n$return .= <<<CONTENT\n\n\t\t\t\t<li class='ipsPagination_next ipsPagination_inactive'><a href='\nCONTENT;\n$return .= htmlspecialchars( $baseUrl->setPage( $pageParam, ( $activePage + 1 > $pages ) ? $pages : $activePage + 1 ), ENT_QUOTES | ENT_DISALLOWED, 'UTF-8', FALSE );\n$return .= <<<CONTENT\n' rel=\"next\" data-page='\nCONTENT;\n\n$return .= htmlspecialchars( ( $activePage + 1 > $pages ) ? $pages : $activePage + 1, ENT_QUOTES | ENT_DISALLOWED, 'UTF-8', FALSE );\n$return .= <<<CONTENT\n' data-ipsTooltip title='\nCONTENT;\n\n$return .= \\IPS\\Member::loggedIn()->language()->addToStack( htmlspecialchars( 'next_page', ENT_DISALLOWED, 'UTF-8', FALSE ), TRUE, array(  ) );\n$return .= <<<CONTENT\n'>\nCONTENT;\n\n$return .= \\IPS\\Member::loggedIn()->language()->addToStack( htmlspecialchars( 'next', ENT_DISALLOWED, 'UTF-8', FALSE ), TRUE, array(  ) );\n$return .= <<<CONTENT\n<\/a><\/li>\n\t\t\t\t<li class='ipsPagination_last ipsPagination_inactive'><a href='\nCONTENT;\n$return .= htmlspecialchars( $baseUrl->setPage( $pageParam, $pages ), ENT_QUOTES | ENT_DISALLOWED, 'UTF-8', FALSE );\n$return .= <<<CONTENT\n' rel=\"last\" data-page='\nCONTENT;\n$return .= htmlspecialchars( $pages, ENT_QUOTES | ENT_DISALLOWED, 'UTF-8', FALSE );\n$return .= <<<CONTENT\n' data-ipsTooltip title='\nCONTENT;\n\n$return .= \\IPS\\Member::loggedIn()->language()->addToStack( htmlspecialchars( 'last_page', ENT_DISALLOWED, 'UTF-8', FALSE ), TRUE, array(  ) );\n$return .= <<<CONTENT\n'><i class='fa fa-angle-double-right'><\/i><\/a><\/li>\n\t\t\t\nCONTENT;\n\nendif;\n$return .= <<<CONTENT\n\n\t\t\t\nCONTENT;\n\nif ( $pages > 1 ):\n$return .= <<<CONTENT\n\n\t\t\t\t<li class='ipsPagination_pageJump'>\n\t\t\t\t\t<a href='#' data-ipsMenu data-ipsMenu-closeOnClick='false' data-ipsMenu-appendTo='#elPagination_\nCONTENT;\n\n$return .= htmlspecialchars( md5($baseUrl), ENT_QUOTES | ENT_DISALLOWED, 'UTF-8', FALSE );\n$return .= <<<CONTENT\n_\nCONTENT;\n$return .= htmlspecialchars( $uniqId, ENT_QUOTES | ENT_DISALLOWED, 'UTF-8', FALSE );\n$return .= <<<CONTENT\n' id='elPagination_\nCONTENT;\n\n$return .= htmlspecialchars( md5($baseUrl), ENT_QUOTES | ENT_DISALLOWED, 'UTF-8', FALSE );\n$return .= <<<CONTENT\n_\nCONTENT;\n$return .= htmlspecialchars( $uniqId, ENT_QUOTES | ENT_DISALLOWED, 'UTF-8', FALSE );\n$return .= <<<CONTENT\n_jump'>\nCONTENT;\n\n$sprintf = array($activePage, $pages); $return .= \\IPS\\Member::loggedIn()->language()->addToStack( htmlspecialchars( 'pagination', ENT_DISALLOWED, 'UTF-8', FALSE ), FALSE, array( 'sprintf' => $sprintf ) );\n$return .= <<<CONTENT\n &nbsp;<i class='fa fa-caret-down'><\/i><\/a>\n\t\t\t\t\t<div class='ipsMenu ipsMenu_narrow ipsPad ipsHide' id='elPagination_\nCONTENT;\n\n$return .= htmlspecialchars( md5($baseUrl), ENT_QUOTES | ENT_DISALLOWED, 'UTF-8', FALSE );\n$return .= <<<CONTENT\n_\nCONTENT;\n$return .= htmlspecialchars( $uniqId, ENT_QUOTES | ENT_DISALLOWED, 'UTF-8', FALSE );\n$return .= <<<CONTENT\n_jump_menu'>\n\t\t\t\t\t\t<form accept-charset='utf-8' method='post' action='\nCONTENT;\n$return .= htmlspecialchars( $baseUrl->setPage( 'page', NULL ), ENT_QUOTES | ENT_DISALLOWED, 'UTF-8', FALSE );\n$return .= <<<CONTENT\n' data-role=\"pageJump\">\n\t\t\t\t\t\t\t<ul class='ipsForm ipsForm_horizontal'>\n\t\t\t\t\t\t\t\t<li class='ipsFieldRow'>\n\t\t\t\t\t\t\t\t\t<input type='number' min='1' max='\nCONTENT;\n$return .= htmlspecialchars( $pages, ENT_QUOTES | ENT_DISALLOWED, 'UTF-8', FALSE );\n$return .= <<<CONTENT\n' placeholder='\nCONTENT;\n\n$return .= \\IPS\\Member::loggedIn()->language()->addToStack( htmlspecialchars( 'page_number', ENT_DISALLOWED, 'UTF-8', FALSE ), TRUE, array(  ) );\n$return .= <<<CONTENT\n' class='ipsField_fullWidth' name='\nCONTENT;\n$return .= htmlspecialchars( $pageParam, ENT_QUOTES | ENT_DISALLOWED, 'UTF-8', FALSE );\n$return .= <<<CONTENT\n'>\n\t\t\t\t\t\t\t\t<\/li>\n\t\t\t\t\t\t\t\t<li class='ipsFieldRow ipsFieldRow_fullWidth'>\n\t\t\t\t\t\t\t\t\t<input type='submit' class='ipsButton_fullWidth ipsButton ipsButton_verySmall ipsButton_primary' value='\nCONTENT;\n\n$return .= \\IPS\\Member::loggedIn()->language()->addToStack( htmlspecialchars( 'go', ENT_DISALLOWED, 'UTF-8', FALSE ), TRUE, array(  ) );\n$return .= <<<CONTENT\n'>\n\t\t\t\t\t\t\t\t<\/li>\n\t\t\t\t\t\t\t<\/ul>\n\t\t\t\t\t\t<\/form>\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/li>\n\t\t\t\nCONTENT;\n\nendif;\n$return .= <<<CONTENT\n\n\t\t\nCONTENT;\n\nendif;\n$return .= <<<CONTENT\n\n\t<\/ul>\n\nCONTENT;\n\nendif;\n$return .= <<<CONTENT\n\nCONTENT;\n\n\t\treturn $return;\n}\n\n\tfunction poll( $poll, $url ) {\n\t\t$return = '';\n\t\t$return .= <<<CONTENT\n\n\nCONTENT;\n\nif ( !isset( \\IPS\\Request::i()->fetchPoll ) ):\n$return .= <<<CONTENT\n\n<section class='ipsBox' data-controller='core.front.core.poll'>\n\nCONTENT;\n\nendif;\n$return .= <<<CONTENT\n\n\t\nCONTENT;\n\nif ( $poll->canVote() and \\IPS\\Request::i()->_poll != 'results' and ( !$poll->getVote() or \\IPS\\Request::i()->_poll == 'form') and $pollForm = $poll->buildForm() ):\n$return .= <<<CONTENT\n\n\t\t<h2 class='ipsType_sectionTitle ipsType_reset'>\n\t\t\t<span class='ipsType_break ipsContained'>\n\t\t\t\t\nCONTENT;\n$return .= htmlspecialchars( $poll->poll_question, ENT_QUOTES | ENT_DISALLOWED, 'UTF-8', FALSE );\n$return .= <<<CONTENT\n&nbsp;&nbsp;\n\t\t\t\t\nCONTENT;\n\nif ( $poll->votes ):\n$return .= <<<CONTENT\n<p class='ipsType_reset ipsPos_right ipsResponsive_hidePhone ipsType_light'><i class='fa fa-check-square-o'><\/i> \nCONTENT;\n\n$pluralize = array( $poll->votes ); $return .= \\IPS\\Member::loggedIn()->language()->addToStack( htmlspecialchars( 'poll_num_votes', ENT_DISALLOWED, 'UTF-8', FALSE ), FALSE, array( 'pluralize' => $pluralize ) );\n$return .= <<<CONTENT\n<\/p>\nCONTENT;\n\nendif;\n$return .= <<<CONTENT\n\n\t\t\t<\/span>\t\t\t\n\t\t<\/h2>\n\t\t\nCONTENT;\n\nif ( $poll->poll_view_voters ):\n$return .= <<<CONTENT\n\n\t\t\t<div class=\"ipsMessage ipsMessage_information\">\n\t\t\t\t\nCONTENT;\n\n$return .= \\IPS\\Member::loggedIn()->language()->addToStack( htmlspecialchars( 'poll_is_public', ENT_DISALLOWED, 'UTF-8', FALSE ), TRUE, array(  ) );\n$return .= <<<CONTENT\n\n\t\t\t<\/div>\n\t\t\nCONTENT;\n\nendif;\n$return .= <<<CONTENT\n\n\t\t<div class='ipsPad ipsClearfix' data-role='pollContents'>\n\t\t\t{$pollForm->customTemplate( array( \\IPS\\Theme::i()->getTemplate( 'global', 'core', 'global' ), 'pollForm' ), $url, $poll )}\n\t\t<\/div>\n\t\nCONTENT;\n\nelseif ( ( $poll->canViewResults() and !$poll->canVote() ) or $poll->getVote() or ( \\IPS\\Request::i()->_poll == 'results' and $poll->canViewResults() ) ):\n$return .= <<<CONTENT\n\n\t\t<h2 class='ipsType_sectionTitle ipsType_reset'>\n\t\t\t<span class='ipsType_break ipsContained'>\n\t\t\t\t\nCONTENT;\n$return .= htmlspecialchars( $poll->poll_question, ENT_QUOTES | ENT_DISALLOWED, 'UTF-8', FALSE );\n$return .= <<<CONTENT\n&nbsp;&nbsp;\n\t\t\t\t\nCONTENT;\n\nif ( $poll->votes ):\n$return .= <<<CONTENT\n<p class='ipsType_reset ipsPos_right ipsResponsive_hidePhone ipsType_light'><i class='fa fa-check-square-o'><\/i> \nCONTENT;\n\n$pluralize = array( $poll->votes ); $return .= \\IPS\\Member::loggedIn()->language()->addToStack( htmlspecialchars( 'poll_num_votes', ENT_DISALLOWED, 'UTF-8', FALSE ), FALSE, array( 'pluralize' => $pluralize ) );\n$return .= <<<CONTENT\n<\/p>\nCONTENT;\n\nendif;\n$return .= <<<CONTENT\n\n\t\t\t<\/span>\n\t\t<\/h2>\n\t\t<div class='ipsPad ipsClearfix' data-role='pollContents'>\n\t\t\t\nCONTENT;\n\nif ( $poll->poll_closed ):\n$return .= <<<CONTENT\n\n\t\t\t\t<div class=\"ipsMessage ipsMessage_warning ipsSpacer_bottom\">\nCONTENT;\n\n$return .= \\IPS\\Member::loggedIn()->language()->addToStack( htmlspecialchars( 'poll_closed_for_votes', ENT_DISALLOWED, 'UTF-8', FALSE ), TRUE, array(  ) );\n$return .= <<<CONTENT\n<\/div>\n\t\t\t\nCONTENT;\n\nendif;\n$return .= <<<CONTENT\n\n\n\t\t\t<ol class='ipsList_reset cPollList'>\n\t\t\t\t\nCONTENT;\n\n$i = 0;\n$return .= <<<CONTENT\n\n\t\t\t\t\nCONTENT;\n\nforeach ( $poll->choices as $questionId => $question ):\n$return .= <<<CONTENT\n\n\t\t\t\t\t\nCONTENT;\n\n$i++;\n$return .= <<<CONTENT\n\n\t\t\t\t\t<li>\n\t\t\t\t\t\t<h3 class='ipsType_sectionHead'><span class='ipsType_break ipsContained'>\nCONTENT;\n$return .= htmlspecialchars( $i, ENT_QUOTES | ENT_DISALLOWED, 'UTF-8', FALSE );\n$return .= <<<CONTENT\n. \nCONTENT;\n$return .= htmlspecialchars( $question['question'], ENT_QUOTES | ENT_DISALLOWED, 'UTF-8', FALSE );\n$return .= <<<CONTENT\n<\/span><\/h3>\n\t\t\t\t\t\t<ul class='ipsList_reset cPollList_choices'>\n\t\t\t\t\t\t\t\nCONTENT;\n\nforeach ( $question['choice'] as $k => $choice ):\n$return .= <<<CONTENT\n\n\t\t\t\t\t\t\t\t<li class='ipsGrid ipsGrid_collapsePhone'>\n\t\t\t\t\t\t\t\t\t<div class='ipsGrid_span4 ipsType_richText ipsType_break'>\n\t\t\t\t\t\t\t\t\t\t{$choice}\n\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t\t\t\t\t\t<div class='ipsGrid_span7'>\n\t\t\t\t\t\t\t\t\t\t<span class='cPollVoteBar'>\n\t\t\t\t\t\t\t\t\t\t\t<span style='width: \nCONTENT;\n\nif ( array_sum( $question['votes'] ) > 0  ):\n$return .= <<<CONTENT\n\nCONTENT;\n\n$return .= htmlspecialchars( \\intval( ( $question['votes'][ $k ] \/ array_sum( $question['votes'] ) ) * 100 ), ENT_QUOTES | ENT_DISALLOWED, 'UTF-8', FALSE );\n$return .= <<<CONTENT\n\nCONTENT;\n\nelse:\n$return .= <<<CONTENT\n0\nCONTENT;\n\nendif;\n$return .= <<<CONTENT\n%' data-votes='\nCONTENT;\n\nif ( array_sum( $question['votes'] ) > 0 ):\n$return .= <<<CONTENT\n\nCONTENT;\n\n$return .= htmlspecialchars( round( ( $question['votes'][ $k ] \/ array_sum( $question['votes'] ) ) * 100, 2 ), ENT_QUOTES | ENT_DISALLOWED, 'UTF-8', FALSE );\n$return .= <<<CONTENT\n\nCONTENT;\n\nelse:\n$return .= <<<CONTENT\n0\nCONTENT;\n\nendif;\n$return .= <<<CONTENT\n%' \nCONTENT;\n\nif ( array_sum( $question['votes'] ) && \\intval( ( $question['votes'][ $k ] \/ array_sum( $question['votes'] ) ) * 100 ) > 30 ):\n$return .= <<<CONTENT\nclass='cPollVoteBar_inside'\nCONTENT;\n\nendif;\n$return .= <<<CONTENT\n><\/span>\n\t\t\t\t\t\t\t\t\t\t<\/span>\n\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t\t\t\t\t\t<div class='ipsGrid_span1 ipsType_small'>\n\t\t\t\t\t\t\t\t\t\t\nCONTENT;\n\nif ( $poll->canSeeVoters() && $question['votes'][ $k ] > 0 ):\n$return .= <<<CONTENT\n\n\t\t\t\t\t\t\t\t\t\t\t<a href='\nCONTENT;\n\n$return .= htmlspecialchars( \\IPS\\Http\\Url::internal( \"app=core&module=system&controller=poll&do=voters&id={$poll->pid}&question={$questionId}&option={$k}\", null, \"\", array(), 0 ), ENT_QUOTES | ENT_DISALLOWED, 'UTF-8', TRUE );\n$return .= <<<CONTENT\n' title='\nCONTENT;\n\n$return .= \\IPS\\Member::loggedIn()->language()->addToStack( htmlspecialchars( 'view_voters', ENT_DISALLOWED, 'UTF-8', FALSE ), TRUE, array(  ) );\n$return .= <<<CONTENT\n' class='ipsType_blendLinks' data-ipsTooltip data-ipsDialog data-ipsDialog-size=\"narrow\" data-ipsDialog-title=\"\nCONTENT;\n$return .= htmlspecialchars( $choice, ENT_QUOTES | ENT_DISALLOWED, 'UTF-8', FALSE );\n$return .= <<<CONTENT\n\">\n\t\t\t\t\t\t\t\t\t\t\nCONTENT;\n\nelse:\n$return .= <<<CONTENT\n\n\t\t\t\t\t\t\t\t\t\t\t<span class='ipsFaded'>\n\t\t\t\t\t\t\t\t\t\t\nCONTENT;\n\nendif;\n$return .= <<<CONTENT\n\n\t\t\t\t\t\t\t\t\t\t\t<i class='fa fa-user'><\/i> \nCONTENT;\n$return .= htmlspecialchars( $question['votes'][ $k ], ENT_QUOTES | ENT_DISALLOWED, 'UTF-8', FALSE );\n$return .= <<<CONTENT\n\n\t\t\t\t\t\t\t\t\t\t\nCONTENT;\n\nif ( $poll->canSeeVoters() && $question['votes'][ $k ] > 0 ):\n$return .= <<<CONTENT\n\n\t\t\t\t\t\t\t\t\t\t\t<\/a>\n\t\t\t\t\t\t\t\t\t\t\nCONTENT;\n\nelse:\n$return .= <<<CONTENT\n\n\t\t\t\t\t\t\t\t\t\t\t<\/span>\n\t\t\t\t\t\t\t\t\t\t\nCONTENT;\n\nendif;\n$return .= <<<CONTENT\n\n\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t\t\t\t\t<\/li>\n\t\t\t\t\t\t\t\nCONTENT;\n\nendforeach;\n$return .= <<<CONTENT\n\n\t\t\t\t\t\t<\/ul>\n\t\t\t\t\t<\/li>\n\t\t\t\t\nCONTENT;\n\nendforeach;\n$return .= <<<CONTENT\n\n\t\t\t<\/ol>\n\t\t\t\nCONTENT;\n\nif ( $poll->canVote() || !\\IPS\\Member::loggedIn()->member_id || $poll->canClose() || ( ( $poll->poll_close_date instanceof \\IPS\\DateTime ) and !$poll->poll_closed ) || ( ( $poll->poll_close_date instanceof \\IPS\\DateTime ) and $poll->poll_closed ) ):\n$return .= <<<CONTENT\n\n\t\t\t\t<hr class='ipsHr'>\n\t\t\t\t<ul class='ipsToolList ipsToolList_horizontal ipsClearfix cPollButtons'>\n\t\t\t\t\t\nCONTENT;\n\nif ( $poll->canVote() ):\n$return .= <<<CONTENT\n\n\t\t\t\t\t\t<li class='ipsPos_left'>\n\t\t\t\t\t\t\t<a href=\"\nCONTENT;\n$return .= htmlspecialchars( $url->setQueryString( '_poll', 'form' ), ENT_QUOTES | ENT_DISALLOWED, 'UTF-8', FALSE );\n$return .= <<<CONTENT\n\" title='\nCONTENT;\n\n$return .= \\IPS\\Member::loggedIn()->language()->addToStack( htmlspecialchars( 'show_vote_options', ENT_DISALLOWED, 'UTF-8', FALSE ), TRUE, array(  ) );\n$return .= <<<CONTENT\n' class='ipsButton ipsButton_medium ipsButton_light ipsButton_fullWidth' data-action='viewResults'><i class='fa fa-caret-left'><\/i> \nCONTENT;\n\n$return .= \\IPS\\Member::loggedIn()->language()->addToStack( htmlspecialchars( 'show_vote_options', ENT_DISALLOWED, 'UTF-8', FALSE ), TRUE, array(  ) );\n$return .= <<<CONTENT\n<\/a>\n\t\t\t\t\t\t<\/li>\n\t\t\t\t\t\nCONTENT;\n\nendif;\n$return .= <<<CONTENT\n\n\t\t\t\t\t\nCONTENT;\n\nif ( !\\IPS\\Member::loggedIn()->member_id ):\n$return .= <<<CONTENT\n\n\t\t\t\t\t\t<li class='ipsPos_left'>\n\t\t\t\t\t\t\t\nCONTENT;\n\n$sprintf = array(\\IPS\\Http\\Url::internal( 'app=core&module=system&controller=login', 'front', 'login' ), \\IPS\\Http\\Url::internal( 'app=core&module=system&controller=register', 'front', 'register' )); $return .= \\IPS\\Member::loggedIn()->language()->addToStack( htmlspecialchars( 'poll_guest', ENT_DISALLOWED, 'UTF-8', FALSE ), FALSE, array( 'sprintf' => $sprintf ) );\n$return .= <<<CONTENT\n\n\t\t\t\t\t\t<\/li>\n\t\t\t\t\t\nCONTENT;\n\nendif;\n$return .= <<<CONTENT\n\n\t\t\t\t\t\nCONTENT;\n\nif ( $poll->canClose() ):\n$return .= <<<CONTENT\n\n\t\t\t\t\t\t\nCONTENT;\n\nif ( ! $poll->poll_closed ):\n$return .= <<<CONTENT\n\n\t\t\t\t\t\t\t<li class='ipsPos_right'><a class='ipsButton ipsButton_link ipsButton_medium ipsButton_fullWidth' href='\nCONTENT;\n$return .= htmlspecialchars( $url->setQueryString( array( 'do' => 'pollStatus', 'value' => 0 ) )->csrf(), ENT_QUOTES | ENT_DISALLOWED, 'UTF-8', FALSE );\n$return .= <<<CONTENT\n'><i class=\"fa fa-lock\"><\/i> \nCONTENT;\n\n$return .= \\IPS\\Member::loggedIn()->language()->addToStack( htmlspecialchars( 'poll_close', ENT_DISALLOWED, 'UTF-8', FALSE ), TRUE, array(  ) );\n$return .= <<<CONTENT\n<\/a><\/li>\n\t\t\t\t\t\t\nCONTENT;\n\nelse:\n$return .= <<<CONTENT\n\n\t\t\t\t\t\t\t<li class='ipsPos_right'><a class='ipsButton ipsButton_link ipsButton_medium ipsButton_fullWidth' href='\nCONTENT;\n$return .= htmlspecialchars( $url->setQueryString( array( 'do' => 'pollStatus', 'value' => 1 ) )->csrf(), ENT_QUOTES | ENT_DISALLOWED, 'UTF-8', FALSE );\n$return .= <<<CONTENT\n'><i class=\"fa fa-unlock\"><\/i> \nCONTENT;\n\n$return .= \\IPS\\Member::loggedIn()->language()->addToStack( htmlspecialchars( 'poll_open', ENT_DISALLOWED, 'UTF-8', FALSE ), TRUE, array(  ) );\n$return .= <<<CONTENT\n<\/a><\/li>\n\t\t\t\t\t\t\nCONTENT;\n\nendif;\n$return .= <<<CONTENT\n\n\t\t\t\t\t\nCONTENT;\n\nendif;\n$return .= <<<CONTENT\n\n\t\t\t\t\t\nCONTENT;\n\nif ( ( $poll->poll_close_date instanceof \\IPS\\DateTime ) and !$poll->poll_closed ):\n$return .= <<<CONTENT\n\n\t\t\t\t\t\t<li class='ipsPos_right cPollCloseDate'><span class='ipsType_light ipsType_medium'>\nCONTENT;\n\n$sprintf = array($poll->poll_close_date->localeDate(), $poll->poll_close_date->localeTime( FALSE )); $return .= \\IPS\\Member::loggedIn()->language()->addToStack( htmlspecialchars( 'poll_auto_closes_on', ENT_DISALLOWED, 'UTF-8', FALSE ), FALSE, array( 'sprintf' => $sprintf ) );\n$return .= <<<CONTENT\n<\/span><\/li>\n\t\t\t\t\t\nCONTENT;\n\nelseif ( ( $poll->poll_close_date instanceof \\IPS\\DateTime ) and $poll->poll_closed ):\n$return .= <<<CONTENT\n\n\t\t\t\t\t\t<li class='ipsPos_right cPollCloseDate'><span class='ipsType_light ipsType_medium'>\nCONTENT;\n\n$sprintf = array($poll->poll_close_date->localeDate(), $poll->poll_close_date->localeTime( FALSE )); $return .= \\IPS\\Member::loggedIn()->language()->addToStack( htmlspecialchars( 'poll_auto_closed_on', ENT_DISALLOWED, 'UTF-8', FALSE ), FALSE, array( 'sprintf' => $sprintf ) );\n$return .= <<<CONTENT\n<\/span><\/li>\n\t\t\t\t\t\nCONTENT;\n\nendif;\n$return .= <<<CONTENT\n\n\t\t\t\nCONTENT;\n\nendif;\n$return .= <<<CONTENT\n\n\t\t<\/div>\n\t\nCONTENT;\n\nelse:\n$return .= <<<CONTENT\n\n\t\t<h2 class='ipsType_sectionTitle ipsType_reset'>\n\t\t\t<span class='ipsType_break ipsContained'>\n\t\t\t\t\nCONTENT;\n$return .= htmlspecialchars( $poll->poll_question, ENT_QUOTES | ENT_DISALLOWED, 'UTF-8', FALSE );\n$return .= <<<CONTENT\n&nbsp;&nbsp;\n\t\t\t\t\nCONTENT;\n\nif ( $poll->votes ):\n$return .= <<<CONTENT\n<p class='ipsType_reset ipsPos_right ipsResponsive_hidePhone ipsType_light'><i class='fa fa-check-square-o'><\/i> \nCONTENT;\n\n$pluralize = array( $poll->votes ); $return .= \\IPS\\Member::loggedIn()->language()->addToStack( htmlspecialchars( 'poll_num_votes', ENT_DISALLOWED, 'UTF-8', FALSE ), FALSE, array( 'pluralize' => $pluralize ) );\n$return .= <<<CONTENT\n<\/p>\nCONTENT;\n\nendif;\n$return .= <<<CONTENT\n\n\t\t\t<\/span>\t\t\t\n\t\t<\/h2>\n\t\t<div class='ipsPad ipsClearfix' data-role='pollContents'>\n\t\t\t\nCONTENT;\n\n$return .= \\IPS\\Member::loggedIn()->language()->addToStack( htmlspecialchars( 'no_permission_poll', ENT_DISALLOWED, 'UTF-8', FALSE ), TRUE, array(  ) );\n$return .= <<<CONTENT\n\nCONTENT;\n\nif ( !\\IPS\\Member::loggedIn()->member_id ):\n$return .= <<<CONTENT\n \nCONTENT;\n\n$sprintf = array(\\IPS\\Http\\Url::internal( 'app=core&module=system&controller=login', 'front', 'login' ), \\IPS\\Http\\Url::internal( 'app=core&module=system&controller=register', 'front', 'register' )); $return .= \\IPS\\Member::loggedIn()->language()->addToStack( htmlspecialchars( 'poll_guest', ENT_DISALLOWED, 'UTF-8', FALSE ), FALSE, array( 'sprintf' => $sprintf ) );\n$return .= <<<CONTENT\n\nCONTENT;\n\nendif;\n$return .= <<<CONTENT\n\n\n            \nCONTENT;\n\nif ( $poll->canClose() || ( ( $poll->poll_close_date instanceof \\IPS\\DateTime ) and !$poll->poll_closed ) || ( ( $poll->poll_close_date instanceof \\IPS\\DateTime ) and $poll->poll_closed ) ):\n$return .= <<<CONTENT\n\n            <hr class='ipsHr'>\n            <ul class='ipsToolList ipsToolList_horizontal ipsClearfix cPollButtons'>\n                \nCONTENT;\n\nif ( !$poll->poll_closed ):\n$return .= <<<CONTENT\n\n                    <li class='ipsPos_right'><a class='ipsButton ipsButton_link ipsButton_medium ipsButton_fullWidth' href='\nCONTENT;\n$return .= htmlspecialchars( $url->setQueryString( array( 'do' => 'pollStatus', 'value' => 0 ) )->csrf(), ENT_QUOTES | ENT_DISALLOWED, 'UTF-8', FALSE );\n$return .= <<<CONTENT\n'><i class=\"fa fa-lock\"><\/i> \nCONTENT;\n\n$return .= \\IPS\\Member::loggedIn()->language()->addToStack( htmlspecialchars( 'poll_close', ENT_DISALLOWED, 'UTF-8', FALSE ), TRUE, array(  ) );\n$return .= <<<CONTENT\n<\/a><\/li>\n                \nCONTENT;\n\nelse:\n$return .= <<<CONTENT\n\n                    <li class='ipsPos_right'><a class='ipsButton ipsButton_link ipsButton_medium ipsButton_fullWidth' href='\nCONTENT;\n$return .= htmlspecialchars( $url->setQueryString( array( 'do' => 'pollStatus', 'value' => 1 ) )->csrf(), ENT_QUOTES | ENT_DISALLOWED, 'UTF-8', FALSE );\n$return .= <<<CONTENT\n'><i class=\"fa fa-unlock\"><\/i> \nCONTENT;\n\n$return .= \\IPS\\Member::loggedIn()->language()->addToStack( htmlspecialchars( 'poll_open', ENT_DISALLOWED, 'UTF-8', FALSE ), TRUE, array(  ) );\n$return .= <<<CONTENT\n<\/a><\/li>\n                \nCONTENT;\n\nendif;\n$return .= <<<CONTENT\n\n\n                \nCONTENT;\n\nif ( ( $poll->poll_close_date instanceof \\IPS\\DateTime ) and !$poll->poll_closed ):\n$return .= <<<CONTENT\n\n                    <li class='ipsPos_right cPollCloseDate'><span class='ipsType_light ipsType_medium'>\nCONTENT;\n\n$sprintf = array($poll->poll_close_date->localeDate(), $poll->poll_close_date->localeTime( FALSE )); $return .= \\IPS\\Member::loggedIn()->language()->addToStack( htmlspecialchars( 'poll_auto_closes_on', ENT_DISALLOWED, 'UTF-8', FALSE ), FALSE, array( 'sprintf' => $sprintf ) );\n$return .= <<<CONTENT\n<\/span><\/li>\n                \nCONTENT;\n\nelseif ( ( $poll->poll_close_date instanceof \\IPS\\DateTime ) and $poll->poll_closed ):\n$return .= <<<CONTENT\n\n                    <li class='ipsPos_right cPollCloseDate'><span class='ipsType_light ipsType_medium'>\nCONTENT;\n\n$sprintf = array($poll->poll_close_date->localeDate(), $poll->poll_close_date->localeTime( FALSE )); $return .= \\IPS\\Member::loggedIn()->language()->addToStack( htmlspecialchars( 'poll_auto_closed_on', ENT_DISALLOWED, 'UTF-8', FALSE ), FALSE, array( 'sprintf' => $sprintf ) );\n$return .= <<<CONTENT\n<\/span><\/li>\n                \nCONTENT;\n\nendif;\n$return .= <<<CONTENT\n\n            <\/ul>\n            \nCONTENT;\n\nendif;\n$return .= <<<CONTENT\n\n        <\/div>\n\t\nCONTENT;\n\nendif;\n$return .= <<<CONTENT\n\n\nCONTENT;\n\nif ( !isset( \\IPS\\Request::i()->fetchPoll ) ):\n$return .= <<<CONTENT\n\n<\/section>\n\nCONTENT;\n\nendif;\n$return .= <<<CONTENT\n\nCONTENT;\n\n\t\treturn $return;\n}\n\n\tfunction pollForm( $url, $poll, $id, $action, $elements, $hiddenValues, $actionButtons, $uploadField, $class='', $attributes=array(), $sidebar, $form=NULL ) {\n\t\t$return = '';\n\t\t$return .= <<<CONTENT\n\n<form accept-charset='utf-8' class=\"ipsForm \nCONTENT;\n$return .= htmlspecialchars( $class, ENT_QUOTES | ENT_DISALLOWED, 'UTF-8', FALSE );\n$return .= <<<CONTENT\n\" action=\"\nCONTENT;\n$return .= htmlspecialchars( $action, ENT_QUOTES | ENT_DISALLOWED, 'UTF-8', FALSE );\n$return .= <<<CONTENT\n\" method=\"post\" \nCONTENT;\n\nif ( $uploadField ):\n$return .= <<<CONTENT\nenctype=\"multipart\/form-data\"\nCONTENT;\n\nendif;\n$return .= <<<CONTENT\n \nCONTENT;\n\nforeach ( $attributes as $k => $v ):\n$return .= <<<CONTENT\n\nCONTENT;\n$return .= htmlspecialchars( $k, ENT_QUOTES | ENT_DISALLOWED, 'UTF-8', FALSE );\n$return .= <<<CONTENT\n=\"\nCONTENT;\n$return .= htmlspecialchars( $v, ENT_QUOTES | ENT_DISALLOWED, 'UTF-8', FALSE );\n$return .= <<<CONTENT\n\"\nCONTENT;\n\nendforeach;\n$return .= <<<CONTENT\n data-ipsForm>\n\t<input type=\"hidden\" name=\"\nCONTENT;\n$return .= htmlspecialchars( $id, ENT_QUOTES | ENT_DISALLOWED, 'UTF-8', FALSE );\n$return .= <<<CONTENT\n_submitted\" value=\"1\">\n\t\nCONTENT;\n\nforeach ( $hiddenValues as $k => $v ):\n$return .= <<<CONTENT\n\n\t\t<input type=\"hidden\" name=\"\nCONTENT;\n$return .= htmlspecialchars( $k, ENT_QUOTES | ENT_DISALLOWED, 'UTF-8', FALSE );\n$return .= <<<CONTENT\n\" value=\"\nCONTENT;\n$return .= htmlspecialchars( $v, ENT_QUOTES | ENT_DISALLOWED, 'UTF-8', FALSE );\n$return .= <<<CONTENT\n\">\n\t\nCONTENT;\n\nendforeach;\n$return .= <<<CONTENT\n\t\t\n\t\nCONTENT;\n\nforeach ( $elements as $collection ):\n$return .= <<<CONTENT\n\n\t\t<ol class='ipsList_reset cPollList cPollList_questions'>\n\t\t\t\nCONTENT;\n\n$i = 0;\n$return .= <<<CONTENT\n\n\t\t\t\nCONTENT;\n\nforeach ( $collection as $idx => $input ):\n$return .= <<<CONTENT\n\n\t\t\t\t\nCONTENT;\n\n$i++;\n$return .= <<<CONTENT\n\n\t\t\t\t<li class='ipsFieldRow ipsFieldRow_noLabel'>\n\t\t\t\t\t<h3 class='ipsType_sectionHead'><span class='ipsType_break ipsContained'>\nCONTENT;\n$return .= htmlspecialchars( $i, ENT_QUOTES | ENT_DISALLOWED, 'UTF-8', FALSE );\n$return .= <<<CONTENT\n. \nCONTENT;\n$return .= htmlspecialchars( $input->label, ENT_QUOTES | ENT_DISALLOWED, 'UTF-8', FALSE );\n$return .= <<<CONTENT\n<\/span><\/h3>\n\t\t\t\t\t<div class='ipsType_break ipsContained'>\n\t\t\t\t\t\nCONTENT;\n\nif ( !$input->options['multiple'] ):\n$return .= <<<CONTENT\n\n\t\t\t\t\t\t\nCONTENT;\n\n$return .= \\IPS\\Theme::i()->getTemplate( \"forms\", \"core\", 'global' )->radio( $input->name, $input->value, $input->required, $input->options['options'], $input->options['disabled'], '', $input->options['disabled'] );\n$return .= <<<CONTENT\n\n\t\t\t\t\t\nCONTENT;\n\nelse:\n$return .= <<<CONTENT\n\n\t\t\t\t\t\t\nCONTENT;\n\n$return .= \\IPS\\Theme::i()->getTemplate( \"forms\", \"core\", 'global' )->checkboxset( $input->name, $input->value, $input->required, $input->options['options'], $input->options['disabled'], $input->options['toggles'], isset( $input->options['descriptions'] ) ? $input->options['descriptions'] : NULL, $input->options['userSuppliedInput'] );\n$return .= <<<CONTENT\n\n\t\t\t\t\t\nCONTENT;\n\nendif;\n$return .= <<<CONTENT\n\n\t\t\t\t\t<\/div>\n\t\t\t\t\t\nCONTENT;\n\nif ( $input->error ):\n$return .= <<<CONTENT\n\n\t\t\t\t\t\t<br>\n\t\t\t\t\t\t<span class=\"ipsType_warning\">\nCONTENT;\n\n$val = \"{$input->error}\"; $return .= \\IPS\\Member::loggedIn()->language()->addToStack( htmlspecialchars( $val, ENT_DISALLOWED, 'UTF-8', FALSE ), TRUE, array(  ) );\n$return .= <<<CONTENT\n<\/span>\n\t\t\t\t\t\nCONTENT;\n\nendif;\n$return .= <<<CONTENT\n\n\t\t\t\t<\/li>\n\t\t\t\nCONTENT;\n\nendforeach;\n$return .= <<<CONTENT\n\n\t\t<\/ol>\n\t\nCONTENT;\n\nendforeach;\n$return .= <<<CONTENT\n\n\t<hr class='ipsHr'>\n\t\n\t<ul class=\"ipsToolList ipsToolList_horizontal ipsList_reset ipsClearfix cPollButtons\">\n\t\t\nCONTENT;\n\nforeach ( $actionButtons as $button ):\n$return .= <<<CONTENT\n\n\t\t\t<li class='ipsPos_left'>{$button}<\/li>\n\t\t\nCONTENT;\n\nendforeach;\n$return .= <<<CONTENT\n\n        <li class='ipsPos_left'><a class='ipsButton ipsButton_link ipsButton_medium ipsButton_fullWidth' title='\nCONTENT;\n\n$return .= \\IPS\\Member::loggedIn()->language()->addToStack( htmlspecialchars( 'show_results_title', ENT_DISALLOWED, 'UTF-8', FALSE ), TRUE, array(  ) );\n$return .= <<<CONTENT\n' href=\"\nCONTENT;\n$return .= htmlspecialchars( $url->setQueryString( array( '_poll' => 'results', 'nullVote' => 1 ) )->csrf(), ENT_QUOTES | ENT_DISALLOWED, 'UTF-8', FALSE );\n$return .= <<<CONTENT\n\" \nCONTENT;\n\nif ( !\\IPS\\Settings::i()->allow_result_view ):\n$return .= <<<CONTENT\ndata-viewResults-confirm=\"\nCONTENT;\n\n$return .= \\IPS\\Member::loggedIn()->language()->addToStack( htmlspecialchars( 'warn_allow_result_view', ENT_DISALLOWED, 'UTF-8', FALSE ), TRUE, array(  ) );\n$return .= <<<CONTENT\n\"\nCONTENT;\n\nendif;\n$return .= <<<CONTENT\n data-action='viewResults'>\nCONTENT;\n\n$return .= \\IPS\\Member::loggedIn()->language()->addToStack( htmlspecialchars( 'show_results', ENT_DISALLOWED, 'UTF-8', FALSE ), TRUE, array(  ) );\n$return .= <<<CONTENT\n<\/a><\/li>\n        \nCONTENT;\n\nif ( $poll->canClose() ):\n$return .= <<<CONTENT\n\n\t\t\t\nCONTENT;\n\nif ( ! $poll->poll_closed ):\n$return .= <<<CONTENT\n\n\t\t\t\t<li class='ipsPos_right'><a class='ipsButton ipsButton_link ipsButton_medium ipsButton_fullWidth' href='\nCONTENT;\n$return .= htmlspecialchars( $url->setQueryString( array( 'do' => 'pollStatus', 'value' => 0 ) )->csrf(), ENT_QUOTES | ENT_DISALLOWED, 'UTF-8', FALSE );\n$return .= <<<CONTENT\n'><i class=\"fa fa-lock\"><\/i> \nCONTENT;\n\n$return .= \\IPS\\Member::loggedIn()->language()->addToStack( htmlspecialchars( 'poll_close', ENT_DISALLOWED, 'UTF-8', FALSE ), TRUE, array(  ) );\n$return .= <<<CONTENT\n<\/a><\/li>\n\t\t\t\nCONTENT;\n\nelse:\n$return .= <<<CONTENT\n\n\t\t\t\t<li class='ipsPos_right'><a class='ipsButton ipsButton_link ipsButton_medium ipsButton_fullWidth' href='\nCONTENT;\n$return .= htmlspecialchars( $url->setQueryString( array( 'do' => 'pollStatus', 'value' => 1 ) )->csrf(), ENT_QUOTES | ENT_DISALLOWED, 'UTF-8', FALSE );\n$return .= <<<CONTENT\n'><i class=\"fa fa-unlock\"><\/i> \nCONTENT;\n\n$return .= \\IPS\\Member::loggedIn()->language()->addToStack( htmlspecialchars( 'poll_open', ENT_DISALLOWED, 'UTF-8', FALSE ), TRUE, array(  ) );\n$return .= <<<CONTENT\n<\/a><\/li>\n\t\t\t\nCONTENT;\n\nendif;\n$return .= <<<CONTENT\n\n\t\t\nCONTENT;\n\nendif;\n$return .= <<<CONTENT\n\n\t\t\nCONTENT;\n\nif ( ( $poll->poll_close_date instanceof \\IPS\\DateTime ) and !$poll->poll_closed ):\n$return .= <<<CONTENT\n\n\t\t\t<li class='ipsPos_right cPollCloseDate'><span class='ipsType_light ipsType_medium'>\nCONTENT;\n\n$sprintf = array($poll->poll_close_date->localeDate(), $poll->poll_close_date->localeTime( FALSE )); $return .= \\IPS\\Member::loggedIn()->language()->addToStack( htmlspecialchars( 'poll_auto_closes_on', ENT_DISALLOWED, 'UTF-8', FALSE ), FALSE, array( 'sprintf' => $sprintf ) );\n$return .= <<<CONTENT\n<\/span><\/li>\n\t\t\nCONTENT;\n\nelseif ( ( $poll->poll_close_date instanceof \\IPS\\DateTime ) and $poll->poll_closed ):\n$return .= <<<CONTENT\n\n\t\t\t<li class='ipsPos_right cPollCloseDate'><span class='ipsType_light ipsType_medium'>\nCONTENT;\n\n$sprintf = array($poll->poll_close_date->localeDate(), $poll->poll_close_date->localeTime( FALSE )); $return .= \\IPS\\Member::loggedIn()->language()->addToStack( htmlspecialchars( 'poll_auto_closed_on', ENT_DISALLOWED, 'UTF-8', FALSE ), FALSE, array( 'sprintf' => $sprintf ) );\n$return .= <<<CONTENT\n<\/span><\/li>\n\t\t\nCONTENT;\n\nendif;\n$return .= <<<CONTENT\n\n\t<\/ul>\n<\/form>\nCONTENT;\n\n\t\treturn $return;\n}\n\n\tfunction pollVoters( $votes ) {\n\t\t$return = '';\n\t\t$return .= <<<CONTENT\n\n\nCONTENT;\n\nif ( !\\IPS\\Request::i()->isAjax() ):\n$return .= <<<CONTENT\n\n\t<div class='ipsBox_alt'>\n\nCONTENT;\n\nendif;\n$return .= <<<CONTENT\n\n\t\t<ul class=\"ipsGrid ipsGrid_collapsePhone ipsPad\">\n\t\t\t\nCONTENT;\n\nforeach ( $votes as $vote ):\n$return .= <<<CONTENT\n\n\t\t\t\t<li class='ipsGrid_span6 ipsPhotoPanel ipsPhotoPanel_mini'>\n\t\t\t\t\t\nCONTENT;\n\n$return .= \\IPS\\Theme::i()->getTemplate( \"global\", \"core\" )->userPhoto( \\IPS\\Member::load( $vote->member_id ), 'mini' );\n$return .= <<<CONTENT\n\n\t\t\t\t\t<div class='ipsType_break'>\n\t\t\t\t\t\t<h3 class='ipsType_normal ipsType_reset ipsTruncate ipsTruncate_line'>\nCONTENT;\n\n$return .= htmlspecialchars( \\IPS\\Member::load( $vote->member_id )->name, ENT_QUOTES | ENT_DISALLOWED, 'UTF-8', FALSE );\n$return .= <<<CONTENT\n<\/h3>\n\t\t\t\t\t\t<span class=\"ipsType_light ipsType_medium\">\nCONTENT;\n\n$val = ( $vote->vote_date instanceof \\IPS\\DateTime ) ? $vote->vote_date : \\IPS\\DateTime::ts( $vote->vote_date );$return .= $val->html();\n$return .= <<<CONTENT\n<\/span>\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/li>\n\t\t\t\nCONTENT;\n\nendforeach;\n$return .= <<<CONTENT\n\n\t\t<\/ul>\n\nCONTENT;\n\nif ( !\\IPS\\Request::i()->isAjax() ):\n$return .= <<<CONTENT\n\n\t<\/div>\n\nCONTENT;\n\nendif;\n$return .= <<<CONTENT\n\nCONTENT;\n\n\t\treturn $return;\n}\n\n\tfunction prettyprint( $code ) {\n\t\t$return = '';\n\t\t$return .= <<<CONTENT\n\n<pre class='prettyprint'>\nCONTENT;\n$return .= htmlspecialchars( $code, ENT_QUOTES | ENT_DISALLOWED, 'UTF-8', FALSE );\n$return .= <<<CONTENT\n<\/pre>\nCONTENT;\n\n\t\treturn $return;\n}\n\n\tfunction redirect( $url, $message ) {\n\t\t$return = '';\n\t\t$return .= <<<CONTENT\n\n<!DOCTYPE html>\n<html lang=\"\nCONTENT;\n\n$return .= htmlspecialchars( \\IPS\\Member::loggedIn()->language()->bcp47(), ENT_QUOTES | ENT_DISALLOWED, 'UTF-8', FALSE );\n$return .= <<<CONTENT\n\" dir=\"\nCONTENT;\n\nif ( \\IPS\\Member::loggedIn()->language()->isrtl ):\n$return .= <<<CONTENT\nrtl\nCONTENT;\n\nelse:\n$return .= <<<CONTENT\nltr\nCONTENT;\n\nendif;\n$return .= <<<CONTENT\n\">\n\t<head>\n\t\t<title>\nCONTENT;\n\n$return .= \\IPS\\Member::loggedIn()->language()->addToStack( htmlspecialchars( 'redirecting', ENT_DISALLOWED, 'UTF-8', FALSE ), TRUE, array(  ) );\n$return .= <<<CONTENT\n<\/title>\n\t\t<meta http-equiv=\"refresh\" content=\"2; url=\nCONTENT;\n$return .= htmlspecialchars( $url, ENT_QUOTES | ENT_DISALLOWED, 'UTF-8', FALSE );\n$return .= <<<CONTENT\n\">\n\t\t<meta name=\"robots\" content=\"noindex,nofollow\">\n\t\t\nCONTENT;\n\n$return .= \\IPS\\Theme::i()->getTemplate( \"global\", \"core\", 'global' )->includeMeta(  );\n$return .= <<<CONTENT\n\n\t\t\nCONTENT;\n\n$return .= \\IPS\\Theme::i()->getTemplate( \"global\", \"core\", 'global' )->includeCSS(  );\n$return .= <<<CONTENT\n\n\t<\/head>\n\t<body>\n\t\t<p class=\"ipsMessage ipsMessage_info ipsRedirectMessage\">\n\t\t\t<strong>\nCONTENT;\n\n$val = \"{$message}\"; $return .= \\IPS\\Member::loggedIn()->language()->addToStack( htmlspecialchars( $val, ENT_DISALLOWED, 'UTF-8', FALSE ), TRUE, array(  ) );\n$return .= <<<CONTENT\n<\/strong><br>\n\t\t\t<br>\n\t\t\t\nCONTENT;\n\n$return .= \\IPS\\Member::loggedIn()->language()->addToStack( htmlspecialchars( 'redirecting_wait', ENT_DISALLOWED, 'UTF-8', FALSE ), TRUE, array(  ) );\n$return .= <<<CONTENT\n\n\t\t<\/p>\n\t\t\nCONTENT;\n\n$return .= \\IPS\\Theme::i()->getTemplate( \"global\", \"core\", 'global' )->includeJS(  );\n$return .= <<<CONTENT\n\n\t<\/body>\n<\/html>\nCONTENT;\n\n\t\treturn $return;\n}\n\n\tfunction richText( $value, $extraClasses=array(), $extraControllers=array(), $extraAttributes=array() ) {\n\t\t$return = '';\n\t\t$return .= <<<CONTENT\n\n\n\nCONTENT;\n\nif ( \\IPS\\Dispatcher::hasInstance() and \\IPS\\Dispatcher::i()->controllerLocation == 'front' ):\n$return .= <<<CONTENT\n\n\nCONTENT;\n\n$controllers = array_merge( array('core.front.core.lightboxedImages'), $extraControllers );\n$return .= <<<CONTENT\n\n<div class='ipsType_richText \nCONTENT;\n\n$return .= htmlspecialchars( implode(' ', $extraClasses), ENT_QUOTES | ENT_DISALLOWED, 'UTF-8', FALSE );\n$return .= <<<CONTENT\n' data-controller='\nCONTENT;\n\n$return .= htmlspecialchars( implode(',', $controllers), ENT_QUOTES | ENT_DISALLOWED, 'UTF-8', FALSE );\n$return .= <<<CONTENT\n' \nCONTENT;\n\nforeach ( $extraAttributes as $attribute ):\n$return .= <<<CONTENT\n {$attribute}\nCONTENT;\n\nendforeach;\n$return .= <<<CONTENT\n>\n{$value}\n<\/div>\n\nCONTENT;\n\nelse:\n$return .= <<<CONTENT\n\n\nCONTENT;\n\n$controllers = $extraControllers;\n$return .= <<<CONTENT\n\n<div class='ipsType_richText \nCONTENT;\n\n$return .= htmlspecialchars( implode(' ', $extraClasses), ENT_QUOTES | ENT_DISALLOWED, 'UTF-8', FALSE );\n$return .= <<<CONTENT\n' data-ipsLazyLoad \nCONTENT;\n\nif ( \\is_array( $controllers ) AND \\count( $controllers ) ):\n$return .= <<<CONTENT\ndata-controller='\nCONTENT;\n\n$return .= htmlspecialchars( implode(',', $controllers), ENT_QUOTES | ENT_DISALLOWED, 'UTF-8', FALSE );\n$return .= <<<CONTENT\n' \nCONTENT;\n\nendif;\n$return .= <<<CONTENT\n\nCONTENT;\n\nforeach ( $extraAttributes as $attribute ):\n$return .= <<<CONTENT\n {$attribute}\nCONTENT;\n\nendforeach;\n$return .= <<<CONTENT\n>\n{$value}\n<\/div>\n\nCONTENT;\n\nendif;\n$return .= <<<CONTENT\n\nCONTENT;\n\n\t\treturn $return;\n}\n\n\tfunction staticMap( $linkUrl, $imageUrl, $lat=NULL, $long=NULL, $width=NULL, $height=NULL ) {\n\t\t$return = '';\n\t\t$return .= <<<CONTENT\n\n<div\nCONTENT;\n\nif ( \\IPS\\Settings::i()->lazy_load_enabled ):\n$return .= <<<CONTENT\n data-ipsLazyLoad\nCONTENT;\n\nendif;\n$return .= <<<CONTENT\n>\n\nCONTENT;\n\nif ( $lat and $long ):\n$return .= <<<CONTENT\n\n\t<span itemscope itemtype='http:\/\/schema.org\/GeoCoordinates'>\n\t\t<meta itemprop='latitude' content='\nCONTENT;\n$return .= htmlspecialchars( $lat, ENT_QUOTES | ENT_DISALLOWED, 'UTF-8', FALSE );\n$return .= <<<CONTENT\n'>\n\t\t<meta itemprop='longitude' content='\nCONTENT;\n$return .= htmlspecialchars( $long, ENT_QUOTES | ENT_DISALLOWED, 'UTF-8', FALSE );\n$return .= <<<CONTENT\n'>\n\t\t\nCONTENT;\n\nif ( $linkUrl ):\n$return .= <<<CONTENT\n<a href='\nCONTENT;\n$return .= htmlspecialchars( $linkUrl, ENT_QUOTES | ENT_DISALLOWED, 'UTF-8', FALSE );\n$return .= <<<CONTENT\n' target='_blank' rel='noopener'>\nCONTENT;\n\nendif;\n$return .= <<<CONTENT\n<img \nCONTENT;\n\nif ( \\IPS\\Settings::i()->lazy_load_enabled ):\n$return .= <<<CONTENT\nsrc='\nCONTENT;\n\n$return .= htmlspecialchars( \\IPS\\Text\\Parser::blankImage(), ENT_QUOTES | ENT_DISALLOWED, 'UTF-8', FALSE );\n$return .= <<<CONTENT\n' data-\nCONTENT;\n\nendif;\n$return .= <<<CONTENT\nsrc='\nCONTENT;\n$return .= htmlspecialchars( $imageUrl, ENT_QUOTES | ENT_DISALLOWED, 'UTF-8', FALSE );\n$return .= <<<CONTENT\n' alt='' class='ipsImage'\nCONTENT;\n\nif ( $width AND $height ):\n$return .= <<<CONTENT\n width='\nCONTENT;\n$return .= htmlspecialchars( $width, ENT_QUOTES | ENT_DISALLOWED, 'UTF-8', FALSE );\n$return .= <<<CONTENT\n' height='\nCONTENT;\n$return .= htmlspecialchars( $height, ENT_QUOTES | ENT_DISALLOWED, 'UTF-8', FALSE );\n$return .= <<<CONTENT\n'\nCONTENT;\n\nendif;\n$return .= <<<CONTENT\n>\nCONTENT;\n\nif ( $linkUrl ):\n$return .= <<<CONTENT\n<\/a>\nCONTENT;\n\nendif;\n$return .= <<<CONTENT\n\n\t<\/span>\n\nCONTENT;\n\nelse:\n$return .= <<<CONTENT\n\n\nCONTENT;\n\nif ( $linkUrl ):\n$return .= <<<CONTENT\n<a href='\nCONTENT;\n$return .= htmlspecialchars( $linkUrl, ENT_QUOTES | ENT_DISALLOWED, 'UTF-8', FALSE );\n$return .= <<<CONTENT\n' target='_blank' rel='noopener'>\nCONTENT;\n\nendif;\n$return .= <<<CONTENT\n<img \nCONTENT;\n\nif ( \\IPS\\Settings::i()->lazy_load_enabled ):\n$return .= <<<CONTENT\nsrc='\nCONTENT;\n\n$return .= htmlspecialchars( \\IPS\\Text\\Parser::blankImage(), ENT_QUOTES | ENT_DISALLOWED, 'UTF-8', FALSE );\n$return .= <<<CONTENT\n' data-\nCONTENT;\n\nendif;\n$return .= <<<CONTENT\nsrc='\nCONTENT;\n$return .= htmlspecialchars( $imageUrl, ENT_QUOTES | ENT_DISALLOWED, 'UTF-8', FALSE );\n$return .= <<<CONTENT\n' alt='' class='ipsImage'\nCONTENT;\n\nif ( $width AND $height ):\n$return .= <<<CONTENT\n width='\nCONTENT;\n$return .= htmlspecialchars( $width, ENT_QUOTES | ENT_DISALLOWED, 'UTF-8', FALSE );\n$return .= <<<CONTENT\n' height='\nCONTENT;\n$return .= htmlspecialchars( $height, ENT_QUOTES | ENT_DISALLOWED, 'UTF-8', FALSE );\n$return .= <<<CONTENT\n'\nCONTENT;\n\nendif;\n$return .= <<<CONTENT\n>\nCONTENT;\n\nif ( $linkUrl ):\n$return .= <<<CONTENT\n<\/a>\nCONTENT;\n\nendif;\n$return .= <<<CONTENT\n\n\nCONTENT;\n\nendif;\n$return .= <<<CONTENT\n\n<\/div>\nCONTENT;\n\n\t\treturn $return;\n}\n\n\tfunction textBlock( $message ) {\n\t\t$return = '';\n\t\t$return .= <<<CONTENT\n\n<div class='ipsType_normal'>\n\t{$message}\n<\/div>\n<br>\n\n\nCONTENT;\n\n\t\treturn $return;\n}\n\n\tfunction truncatedUrl( $url, $newWindow=TRUE, $length=50 ) {\n\t\t$return = '';\n\t\t$return .= <<<CONTENT\n\n<a href='\nCONTENT;\n$return .= htmlspecialchars( $url, ENT_QUOTES | ENT_DISALLOWED, 'UTF-8', FALSE );\n$return .= <<<CONTENT\n'\nCONTENT;\n\nif ( $newWindow === TRUE ):\n$return .= <<<CONTENT\n target='_blank' rel=\"noopener\"\nCONTENT;\n\nendif;\n$return .= <<<CONTENT\n>\nCONTENT;\n\n$return .= htmlspecialchars( mb_substr( html_entity_decode( $url ), '0', $length ), ENT_QUOTES | ENT_DISALLOWED, 'UTF-8', FALSE ) . ( ( mb_strlen( html_entity_decode( $url ) ) > $length ) ? '&hellip;' : '' );\n$return .= <<<CONTENT\n<\/a>\nCONTENT;\n\n\t\treturn $return;\n}\n\n\tfunction vineEmbed( $url ) {\n\t\t$return = '';\n\t\t$return .= <<<CONTENT\n\n<div class=\"ipsEmbeddedVideo\" contenteditable=\"false\"><div><iframe class=\"vine-embed\" src=\"\nCONTENT;\n$return .= htmlspecialchars( $url, ENT_QUOTES | ENT_DISALLOWED, 'UTF-8', FALSE );\n$return .= <<<CONTENT\n\/embed\/simple\" width=\"600\" height=\"600\"><\/iframe><script async src=\"\/\/platform.vine.co\/static\/scripts\/embed.js\" charset=\"utf-8\"><\/script><\/div><\/div>\nCONTENT;\n\n\t\treturn $return;\n}\n\n\tfunction wizard( $stepNames, $activeStep, $output, $baseUrl, $showSteps ) {\n\t\t$return = '';\n\t\t$return .= <<<CONTENT\n\n<div data-ipsWizard class='ipsWizard'>\n\t\nCONTENT;\n\nif ( $showSteps ):\n$return .= <<<CONTENT\n\n\t\t<ul class=\"ipsStepBar ipsClearFix\" data-role=\"wizardStepbar\">\n\t\t\t\nCONTENT;\n\n$doneSteps = TRUE;\n$return .= <<<CONTENT\n\n\t\t\t\nCONTENT;\n\nforeach ( $stepNames as $step => $name ):\n$return .= <<<CONTENT\n\n\t\t\t\t\nCONTENT;\n\nif ( $activeStep == $name ):\n$return .= <<<CONTENT\n\nCONTENT;\n\n$doneSteps = FALSE;\n$return .= <<<CONTENT\n\nCONTENT;\n\nendif;\n$return .= <<<CONTENT\n\n\t\t\t\t<li class='ipsStep \nCONTENT;\n\nif ( $activeStep == $name ):\n$return .= <<<CONTENT\nipsStep_active\nCONTENT;\n\nendif;\n$return .= <<<CONTENT\n'>\n\t\t\t\t\t\nCONTENT;\n\nif ( $doneSteps ):\n$return .= <<<CONTENT\n\n\t\t\t\t\t\t<a href=\"\nCONTENT;\n$return .= htmlspecialchars( $baseUrl->setQueryString( '_step', $name ), ENT_QUOTES | ENT_DISALLOWED, 'UTF-8', FALSE );\n$return .= <<<CONTENT\n\" data-action=\"wizardLink\">\n\t\t\t\t\t\nCONTENT;\n\nelse:\n$return .= <<<CONTENT\n\n\t\t\t\t\t\t<span>\n\t\t\t\t\t\nCONTENT;\n\nendif;\n$return .= <<<CONTENT\n\n\t\t\t\t\t\t<strong class='ipsStep_title'>\nCONTENT;\n\n$sprintf = array($step + 1); $return .= \\IPS\\Member::loggedIn()->language()->addToStack( htmlspecialchars( 'step_number', ENT_DISALLOWED, 'UTF-8', FALSE ), FALSE, array( 'sprintf' => $sprintf ) );\n$return .= <<<CONTENT\n<\/strong>\n\t\t\t\t\t\t<span class='ipsStep_desc'>\nCONTENT;\n\n$val = \"{$name}\"; $return .= \\IPS\\Member::loggedIn()->language()->addToStack( htmlspecialchars( $val, ENT_DISALLOWED, 'UTF-8', FALSE ), TRUE, array(  ) );\n$return .= <<<CONTENT\n<\/span>\n\t\t\t\t\t\nCONTENT;\n\nif ( $doneSteps ):\n$return .= <<<CONTENT\n\n\t\t\t\t\t\t<\/a>\n\t\t\t\t\t\nCONTENT;\n\nelse:\n$return .= <<<CONTENT\n\n\t\t\t\t\t\t<\/span>\n\t\t\t\t\t\nCONTENT;\n\nendif;\n$return .= <<<CONTENT\n\n\t\t\t\t<\/li>\n\t\t\t\nCONTENT;\n\nendforeach;\n$return .= <<<CONTENT\n\n\t\t<\/ul>\n\t\nCONTENT;\n\nendif;\n$return .= <<<CONTENT\n\n\t<div data-role=\"wizardContent\">\n\t\t{$output}\n\t<\/div>\n<\/div>\nCONTENT;\n\n\t\treturn $return;\n}}"
VALUE;

 

Но когда я пытаюсь удалить раздел, я получаю ошибку, и страница не работает.

Вот пример того, что я вырезал

 

Quote

$return .= <<<CONTENT\n,\n\t\t\tmapAhurepiKsey: \nCONTENT;\n\nif ( \\IPS\\Settings::i()->googlemaps and \\IPS\\Settings::i()->google_maps_api_key ):\n$return .= <<<CONTENT\n\"\nCONTENT;\n\n$return .= htmlspecialchars( \\IPS\\Settings::i()->google_maps_api_key, ENT_QUOTES | ENT_DISALLOWED, 'UTF-8', FALSE );\n$return .= <<<CONTENT\n\"\nCONTENT;\n\nelseif ( \\IPS\\Settings::i()->mapbox and \\IPS\\Settings::i()->mapbox_api_key ):\n

Или я неправильно вырезаю?

Link to comment
https://ipbmafia.ru/topic/24175-skript-udaleniya-ne-rabotaet-oshibka/
Share on other sites

Пожалуйста, оставь кэш файлы в покое 😂

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.


Guest
Ответить в этой теме...

Последние посетители 0

  • No registered users viewing this page.