403Webshell
Server IP : 10.200.247.200  /  Your IP : 216.73.217.19
Web Server : Apache
System : Linux synergy-usa-sites 6.8.0-138-generic #138-Ubuntu SMP PREEMPT_DYNAMIC Fri Jul 31 22:41:49 UTC 2026 x86_64
User : jeremy ( 1001)
PHP Version : 8.4.25
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : OFF
Directory :  /var/www/church_sites/southgatestake.com_manzanita/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/church_sites/southgatestake.com_manzanita//index.php
<?php
require_once($_SERVER['DOCUMENT_ROOT'].'/includes/mysql.php');
$res = $db->get_results("SELECT youtube_url,twitch_id,private_server FROM church_livestream.southgate_stake WHERE domain='".str_replace('www.','',$db->clean($_SERVER['HTTP_HOST']))."'");
//if(empty($res[0]->private_server)) {
	if( !isset($_SERVER['HTTPS'] ) ) {
		$url = 'https://'.$_SERVER['SERVER_NAME'];
		header("Location: {$url}");
		exit(0);
	}
/*} else {
	if( isset($_SERVER['HTTPS'] ) ) {
		$url = 'http://'.$_SERVER['SERVER_NAME'];
		header("Location: {$url}");
		exit(0);
	}
}*/

//check if the status is off
$camera_turned_on = '0';
$res = $db->get_results("SELECT camera_turned_on,redirect_to_main_site
						FROM church_livestream.southgate_stake
						WHERE domain='".$db->clean($_SERVER['HTTP_HOST'])."'");
if(!empty($res)) {
	$camera_turned_on = (empty($res[0]->camera_turned_on)) ? '0' : '1';
}

if(!empty($_POST['check_for_camera_status'])) {
	die($camera_turned_on);
}

if(!empty($res)) {
	if(!empty($res[0]->redirect_to_main_site)) {
		header("Location: http://southgatestake.com/");
		exit(0);
	}
}

ob_start();

include 'includes/autoload.php';
$page = 'Manzanita';
$popup_title = 'Manzanita Live';

?>
<style>
.videoWrapper {
  position: relative;
  padding-bottom: 56.25%; /* 16:9 */
  height: 0;
  z-index:2;
}
.videoWrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index:3;
}
#twitch_blocked_out {
	width:85px;
	height:50px;
	position:absolute;
	bottom:0px;
	right:0px;
	background:#9a8758 url(/img/hearhimsmall.jpg) center center no-repeat;
	z-index:10;
}
#twitch_blocked_out2 {
	width:274px;
	height:156px;
	position:absolute;
	top:0px;
	left:0px;
	background:transparent;
	z-index:10;
}
.feedback_form_holder {
	position:relative;
	z-index:1;
	margin-top:-100px;
}
.feedback_form_holder iframe {
	position:relative;
	z-index:1;
}
</style>
<script type="text/javascript">
	var camera_turned_on = '<?= $camera_turned_on;?>';
	function check_is_camera_turned_on() {
		var str = 'check_for_camera_status=1';
		$.ajax({
			url:"index.php",
			cache: false,
			type: "POST",
			data: str,
			success: function(results) {
				if(results!=camera_turned_on) {
					window.location.reload();
				} else {
					window.setTimeout(function() { check_is_camera_turned_on(); },3000);
				}
			},
			error: function(jqXHR, textStatus, errorThrown) {
			}
		});
	}
	window.setTimeout(function() { check_is_camera_turned_on(); },3000);
</script>
<center style="margin-bottom:10px;">
	<p><i>To hear the audio, click the "unmute" button in the bottom left-hand corner of this screen.  If the connection times out, please refresh your browser.</i></p>
	<div class="videoWrapper">
		<?php
		$user_id = 0;
		$password_right = false;
		if(!empty($_COOKIE['password_right'])) {
			$password_right = true;
		}
		if(!empty($_COOKIE['user_id'])) {
			$user_id = $_COOKIE['user_id'];
		}
		if(!$password_right) {
			if(!empty($_GET['password'])) {
				$res = $db->get_results("SELECT id FROM church_livestream.southgate_stake_email_list WHERE current_password='".$db->clean($_GET['password'])."'");
				if(!empty($res)) {
					$password_right = true;
					setcookie('password_right', true,  time()+(86400*2)); // 2 day
					setcookie('user_id', $res[0]->id,  time()+(86400*2)); // 2 day
					$user_id = $res[0]->id;
				} else {
					//Try the master passwords
					$res = $db->get_results("SELECT id FROM church_livestream.southgate_stake_passwords WHERE CURDATE() BETWEEN date_start AND date_end AND pword='".$db->clean($_GET['password'])."'");
					if(!empty($res)) {
						$password_right = true;
						setcookie('password_right', true,  time()+(86400*2)); // 2 day
						setcookie('user_id', 0,  time()+(86400*2)); // 2 day
						$user_id = 0;
					}
				}
			}
		}
		if($password_right) {
			//add tracking
			$db->query("INSERT INTO church_livestream.southgate_stake_tracking
						(
							site
							,ip_address
							,ts
							,user_id
						) VALUES (
							'manzanita'
							,'".$db->clean($_SERVER['REMOTE_ADDR'])."'
							,NOW()
							,'".$db->clean($user_id)."'
						)");
			
			$res = $db->get_results("SELECT youtube_url,twitch_id,private_server FROM church_livestream.southgate_stake WHERE domain='".str_replace('www.','',$db->clean($_SERVER['HTTP_HOST']))."'");
			if(!empty($res)) {
				if($camera_turned_on=='1') {
					if(!empty($res[0]->youtube_url)) {
						?>
						<iframe width="424" height="240" src="<?= $res[0]->youtube_url;?>" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
						<?php
					} elseif(!empty($res[0]->twitch_id)) {
						?>
						<div id="twitch-embed"></div>
						<script src="https://embed.twitch.tv/embed/v1.js"></script>
						<script type="text/javascript">
							var player = null;
							var embed = new Twitch.Embed("twitch-embed", { width: 854, height: 480, channel: "<?= $res[0]->twitch_id;?>", layout: "video", theme: "dark" });
							embed.addEventListener(Twitch.Embed.VIDEO_READY, () => {
								player = embed.getPlayer();
								player.play();
							});
						</script>
						<div id="twitch_blocked_out" onclick="if(player!=null) { player.play(); }"></div>
						<div id="twitch_blocked_out2" onclick="if(player!=null) { player.play(); }"></div>
						<?php
					} elseif(!empty($res[0]->private_server)) {
						if($res[0]->private_server=='castr_manzanita') {
							?>
							<iframe src="https://player.castr.com/live_97d302d0ed5b11efb94f430b9af73333" width="100%" style="aspect-ratio: 16/9; min-height: 340px;" frameborder="0" scrolling="0" allow="autoplay" allowfullscreen></iframe>
							<?php
						} elseif($res[0]->private_server=='castr_southgate') {
							?>
							<iframe src="https://player.castr.com/live_0a87e520ed6611efb94f430b9af73333" width="100%" style="aspect-ratio: 16/9; min-height: 340px;" frameborder="0" scrolling="0" allow="autoplay" allowfullscreen></iframe>
							<?php
						} elseif($res[0]->private_server=='castr_mulberry') {
							?>
							<iframe src="https://player.castr.com/live_c82a5010f3ae11efa602d36d13f8831b" width="100%" style="aspect-ratio: 16/9; min-height: 340px;" frameborder="0" scrolling="0" allow="autoplay" allowfullscreen></iframe>
							<?php
						} else {
							//check if it's off
							$is_off = 0;
							$context = stream_context_create(['http' => ['ignore_errors' => true,'timeout' => 3]]);
							$result = file_get_contents("https://easyrtps.com:8888/".$res[0]->private_server, false, $context);
							foreach($http_response_header as $r) {
								if($r=='HTTP/1.0 404 Not Found') {
									$is_off = 1;
								}
							}
							if($is_off) {
								?><p>It looks like the camera is not turned on yet. Please refresh the page in a few minutes.</p><?php
							} else {
								?>
								<iframe src="https://easyrtps.com:8888/<?= $res[0]->private_server;?>" scrolling="no"></iframe>
								<?php
							}
						}
					}
				} else {
					?>
					<div style="font-size:18px;">The Live Stream will resume after the Sacrament</div>
					<div><img src="/img/sacrament.jpg" style="max-width:80%;" /></div>
					<?php
				}
			}
		} else { ?>
		<center>
			<form method="GET" action="index.php">
				<div>
					<label>Password: <input type="text" name="password" value="<?= $_GET['password'];?>" /></label>
					<input type="submit" name="submit" value="Submit" />
				</div>
				<div style="font-size:18px;">Following the guidance from the Area 70, the sacrament meeting stream will only be available to the home bound members.<br />If you need a password for the stream, please contact your bishop.</div>
			</form>
		</center>
		<?php } ?>
	</div>
	<?php if($camera_turned_on && !$is_off) { ?>
	<p>If you are having problems with the live stream, try pausing it for 20-30 seconds and then push play. Also, try changing the playback speed to 1x.</p>
	<?php } ?>
	<script src="https://form.jotform.com/s/umd/latest/for-cardform-feedback-embed.js"></script>
	<script>
		new JF_FeedbackEmbedButton({
		  
	  buttonIcon: "default",
	  buttonFontColor: "#FFFFFF",
	  buttonBackgroundColor: "#007FEF",
	  formId: 202625549848971
	  ,
		  buttonText: "Troubleshooting",
		  buttonSide: "Bottom",
		  buttonAlign: "Right",
		  base: "https://form.jotform.com/",
		});
	  </script>
	  <script type="text/javascript">
		var ifr = document.getElementById("lightbox-202625549848971");
		if (ifr) {
		  var src = ifr.src;
		  var iframeParams = [];
		  if (window.location.href && window.location.href.indexOf("?") > -1) {
			iframeParams = iframeParams.concat(window.location.href.substr(window.location.href.indexOf("?") + 1).split('&'));
		  }
		  if (src && src.indexOf("?") > -1) {
			iframeParams = iframeParams.concat(src.substr(src.indexOf("?") + 1).split("&"));
			src = src.substr(0, src.indexOf("?"))
		  }
		  iframeParams.push("isIframeEmbed=1");
		  ifr.src = src + "?" + iframeParams.join('&');
		}
		window.handleIFrameMessage = function(e) {
		  if (typeof e.data === 'object') { return; }
		  var args = e.data.split(":");
		  if (args.length > 2) { iframe = document.getElementById("lightbox-" + args[(args.length - 1)]); } else { iframe = document.getElementById("lightbox"); }
		  if (!iframe) { return; }
		  switch (args[0]) {
			case "scrollIntoView":
			  iframe.scrollIntoView();
			  break;
			case "setHeight":
			  iframe.style.height = args[1] + "px";
			  if (!isNaN(args[1]) && parseInt(iframe.style.minHeight) > parseInt(args[1])) {
				iframe.style.minHeight = args[1] + "px";
			  }
			  break;
			case "collapseErrorPage":
			  if (iframe.clientHeight > window.innerHeight) {
				iframe.style.height = window.innerHeight + "px";
			  }
			  break;
			case "reloadPage":
			  window.location.reload();
			  break;
			case "loadScript":
			  if( !window.isPermitted(e.origin, ['jotform.com', 'jotform.pro']) ) { break; }
			  var src = args[1];
			  if (args.length > 3) {
				  src = args[1] + ':' + args[2];
			  }
			  var script = document.createElement('script');
			  script.src = src;
			  script.type = 'text/javascript';
			  document.body.appendChild(script);
			  break;
			case "exitFullscreen":
			  if      (window.document.exitFullscreen)        window.document.exitFullscreen();
			  else if (window.document.mozCancelFullScreen)   window.document.mozCancelFullScreen();
			  else if (window.document.mozCancelFullscreen)   window.document.mozCancelFullScreen();
			  else if (window.document.webkitExitFullscreen)  window.document.webkitExitFullscreen();
			  else if (window.document.msExitFullscreen)      window.document.msExitFullscreen();
			  break;
		  }
		  var isJotForm = (e.origin.indexOf("jotform") > -1) ? true : false;
		  if(isJotForm && "contentWindow" in iframe && "postMessage" in iframe.contentWindow) {
			var urls = {"docurl":encodeURIComponent(document.URL),"referrer":encodeURIComponent(document.referrer)};
			iframe.contentWindow.postMessage(JSON.stringify({"type":"urls","value":urls}), "*");
		  }
		};
		window.isPermitted = function(originUrl, whitelisted_domains) {
		  var url = document.createElement('a');
		  url.href = originUrl;
		  var hostname = url.hostname;
		  var result = false;
		  if( typeof hostname !== 'undefined' ) {
			whitelisted_domains.forEach(function(element) {
				if( hostname.slice((-1 * element.length - 1)) === '.'.concat(element) ||  hostname === element ) {
					result = true;
				}
			});
			return result;
		  }
		};
		if (window.addEventListener) {
		  window.addEventListener("message", handleIFrameMessage, false);
		} else if (window.attachEvent) {
		  window.attachEvent("onmessage", handleIFrameMessage);
		}
		</script>
</center>
<?php

$pageHtml = ob_get_clean();

include 'includes/layout.php';

Youez - 2016 - github.com/yon3zu
LinuXploit