/usr/share/knowledgeroot/admin/index.php is in knowledgeroot 0.9.9.5-6.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 | <?php
/**
* Admin Interface for Knowledgeroot
*
* @package Knowledgeroot
* @author Frank Habermann
* @version $Id: index.php 632 2009-02-12 23:01:21Z lordlamer $
*/
if(!is_file("/etc/knowledgeroot/config.inc.php") || !is_file("/etc/knowledgeroot/admin_config.inc.php")) {
echo "<html><body>No configuration file found! Please make a <a href=\"../install.php\">install</a>!</body></html>";
exit();
}
// load requiered files
require_once("/etc/knowledgeroot/config.inc.php");
require_once("/etc/knowledgeroot/admin_config.inc.php");
require_once("../include/init_admin.php");
echo '<?xml version="1.0" encoding="utf-8"?>';
?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<link rel="stylesheet" href="admin.css" type="text/css" />
<?php
$CLASS['kr_header']->show_header();
?>
</head>
<body>
<?php
// show login?
if (isset ($_POST['login']) and $_POST['login'] == "true") {
if(md5($_POST['user'] . $_POST['pass']) == $CLASS['admin_vars']['loginhash']) {
$_SESSION['passhash'] = md5($_POST['user'] . $_POST['pass']);
}
}
if($CLASS['admin_vars']['loginhash'] == "" || !isset ($_SESSION['passhash']) or $_SESSION['passhash'] == "" || $_SESSION['passhash'] != $CLASS['admin_vars']['loginhash']) {
?>
<!-- show login -->
<table width="800" border="0" cellpadding="0" cellspacing="0">
<tr><td id="logincontent">
<form action="index.php" method="post" name="loginformular">
<input type="hidden" name="login" value="true" />
<div id="loginform">
<div id="loginlogo"><img src="../images/knowledgeroot.jpg" /></div>
<div id="loginadminlogo"><img src="../images/adminlogo.jpg" /></div>
<div id="loginuser">Username:</div><div id="loginuserfield"><input class="input" type="text" name="user" value="" /></div>
<div id="loginpass">Password:</div><div id="loginpassfield"><input class="input" type="password" name="pass" value="" /></div>
<div id="loginsubmit"><input class="button" type="submit" name="submit" value="login" /></div>
<?php
if (isset ($_POST['login']) and $_POST['login'] == "true" && $_POST['user'] != "" && $_POST['pass'] != "") {
echo "<div id=\"loginhash\">loginhash: ".md5($_POST['user'] . $_POST['pass'])."</div>\n";
}
?>
</div>
</form>
</td></tr></table>
<script type="text/javascript">
<!--
document.loginformular.user.focus();
//-->
</script>
<?php
} else {
?>
<!-- show content -->
<div id="headerrow">
<div id="logo"><img src="../images/knowledgeroot.jpg" /></div>
<div id="header">Admin Interface</div>
</div>
<div id="page">
<div id="menu">
<?php
$CLASS['kr_extension']->show_admin_menu("admin");
?>
<!--
<div class="menuitem">menu1</div>
<div class="menuitem">menu2</div>
<div class="menuitem"><a href="">menu3</a></div>
<div class="submenu">
<div class="submenuitem"><a href="">menu3.1</a></div>
<div class="submenuitem">menu3.2</div>
<div class="submenuitem">menu3.3</div>
</div>
<div class="menuitem">menu4</div>
-->
</div>
<div id="content">
<?php
$CLASS['kr_extension']->show_ext_content();
?>
</div>
</div>
<?php
}
?>
</body>
</html>
|