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/09005/admin/guestbook.php
<?php
require_once("header.php");

$id = isset($_GET['id']) ? $_GET['id'] : "";

// If there's only one guestbook just show it and don't ask for more
if ($id == "" && count($imSettings['guestbooks']) < 2)
{
	$keys = array_keys($imSettings['guestbooks']);
	$id = $imSettings['guestbooks'][$keys[0]]['id'];
}
?>
<div id="imAdminPage">
	<div id="imBody">
		<div class="imContent">
			 <?php if (count($imSettings['guestbooks']) > 1): // Select a guestbook?>
 				<script type="text/javascript">
 					function showGb( obj ) {
 						var val = $( obj ).val();
 						if (val !== "")
 							window.top.location.href = "guestbook.php?id=" + val;
 						else
 							window.top.location.href = "guestbook.php";
 					}
 				</script>
				<select onchange="showGb(this)" style="width: 100%;">
					<option value="">Select a guestbook</option>
<?php foreach($imSettings['guestbooks'] as $gbid => $gb): ?>
					<option value="<?php echo $gbid?>"<?php echo ($gbid == $id ? " selected" : "") ?>><?php echo $gb['pagetitle'] . " - " . $gbid ?></option>
<?php endforeach; ?>
				</select>
<?php endif; 
if ($id != ""):
// Show the comments of a guestbook ?>
  			<div class="imBlogPostComment">
 <?php
				$data = $imSettings['guestbooks'][$id];
				$gb = new ImTopic($id, "../");
				$gb->setPostUrl('guestbook.php?id=' . $id);
				switch($data['sendmode'])
				{
					case "file":
						$gb->loadXML($data['folder']);
					break;
				}
				if (count($gb->comments->getAll()))
				{
					$gb->showSummary($data['rating'], TRUE);
				}
				$gb->showAdminComments($data['rating'], $data['order']);
endif; ?>
			</div>
		</div>
	</div>
</div>
<?php require_once("footer.php"); ?>