HEX
Server: Apache/2.4.25 (Debian)
System: Linux server17 4.9.0-19-amd64 #1 SMP Debian 4.9.320-2 (2022-06-30) x86_64
User: web37 (1062)
PHP: 7.4.30
Disabled: show_source, highlight_file, apache_child_terminate, apache_get_modules, apache_note, apache_setenv, virtual, dl, disk_total_space, posix_getpwnam, posix_getpwuid, posix_mkfifo, posix_mknod, posix_setpgid, posix_setsid, posix_setuid, posix_uname, proc_nice, openlog, syslog, pfsockopen
Upload Files
File: /var/www/web37/htdocs/domina-imperium/admin/blog.php
<?php
	require_once("header.php");
	@include_once("../res/blog.inc.php");
?>
<div id="imAdminPage">
	<div id="imBody">
		<div class="imContent">
			<!-- Show the available categories -->
			<script>
			function showCategory( obj ) {
				var cat = $( obj ).val();
				if ( cat !== "" )
					window.top.location.href = '<?php echo basename($_SERVER['PHP_SELF']) ?>?category=' + cat;
				else
					window.top.location.href = '<?php echo basename($_SERVER['PHP_SELF']) ?>';
			}

			function showPost( obj, objcat ) {
				var post = $( obj ).val(),
					cat = $( objcat ).val();
				if ( post !== "" && cat !== "" )
					window.top.location.href = '<?php echo basename($_SERVER['PHP_SELF']) ?>?category=' + cat + '&post=' + post;
				else
					window.top.location.href = '<?php echo basename($_SERVER['PHP_SELF']) ?>';	
			}
			</script>
			<select name="category" id="category" onchange="showCategory(this)">
				<option value="">Select a category</option>
<?php foreach($imSettings['blog']['posts_cat'] as $category => $posts): ?>
				<option value="<?php echo $category ?>"<?php echo $category == @$_GET['category'] ? " selected" : "" ?>><?php echo str_replace("_", " ", $category) ?></option>
<?php endforeach; ?>
			</select>
<?php if (isset($_GET['category'])): ?>
			<select name="post" id="post" onchange="showPost(this, '#category')">
				<option value="">Select a post</option>
<?php foreach($imSettings['blog']['posts_cat'][$_GET['category']] as $post): ?>
				<option value="<?php echo $post ?>"<?php echo $post == @$_GET['post'] ? " selected" : "" ?>><?php echo $imSettings['blog']['posts'][$post]['title'] ?></option>
<?php endforeach; ?>
			</select>
<?php endif; ?>
<?php 
	if (isset($_GET['category']) && isset($_GET['post']))
	{
		$data = $imSettings['blog'];
		$topic = new ImTopic($data['file_prefix'] . 'pc' . $_GET['post'], "../");
		$topic->setPostUrl('blog.php?category=' . $_GET['category'] . '&post=' . $_GET['post']);
		switch($data['sendmode'])
		{
			case "file":
				$topic->loadXML($data['folder']);
			break;
		}
		if (count($topic->comments->getAll()))
		{
			$topic->showSummary($data['comment_type'] != "comment", TRUE);
		}
		$topic->showAdminComments($data['comment_type'] != "comment", $data['comments_order']);
	}
?>
		</div>
	</div>
</div>
<?php require_once("footer.php"); ?>