VPN-Management-GUI 2.0.3 porting start
This commit is contained in:
137
Site/admin_header.php
Executable file
137
Site/admin_header.php
Executable file
@@ -0,0 +1,137 @@
|
||||
<?php
|
||||
session_start ();
|
||||
if (is_dir('install/'))
|
||||
{
|
||||
die("Your Install Directory Still Exists, Please Remove Immediately!!!!");
|
||||
}
|
||||
|
||||
$moduleurl = $_SERVER["REQUEST_URI"];
|
||||
$urlcut = strpos($moduleurl, "&");
|
||||
if($urlcut > 0)
|
||||
{
|
||||
$moduleurl = substr($moduleurl,0,$urlcut);
|
||||
}
|
||||
else
|
||||
{
|
||||
if(strpos($moduleurl, "?") == 0)
|
||||
{
|
||||
$moduleurl = $_SERVER["REQUEST_URI"]."?site=1";
|
||||
}
|
||||
if($_SERVER["REQUEST_URI"] == "/Admin/" || is_null($_SERVER["REQUEST_URI"]))
|
||||
{
|
||||
$moduleurl = "/Admin/index.php?site=1";
|
||||
}
|
||||
}
|
||||
|
||||
include($_SERVER["DOCUMENT_ROOT"]."/Config/_siteconfig_.php");
|
||||
|
||||
?>
|
||||
<!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" dir="ltr" lang="en-US" xml:lang="en">
|
||||
<head>
|
||||
<script language="JavaScript1.2">
|
||||
/* <![CDATA[ */
|
||||
function Mailto(mail,nameli,nachnameli,domainli,landli)
|
||||
{
|
||||
var mimimail;
|
||||
mimimail = "mailto:" + nameli + "." + nachnameli + "\@" + domainli + "." + landli;
|
||||
mail.href = mimimail;
|
||||
return (1);
|
||||
}
|
||||
|
||||
function my_confirm(msg,go) {
|
||||
var where_to= confirm(msg);
|
||||
if (where_to== true) {
|
||||
window.location=go;
|
||||
}
|
||||
}
|
||||
/* ]]> */
|
||||
</script>
|
||||
|
||||
Designed by Christoph Haas
|
||||
Base template (without user's data) checked by http://validator.w3.org : "This page is valid XHTML 1.0 Transitional"
|
||||
-->
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
|
||||
<title><?php echo $SITE_TITLE; ?> - <?php echo $SITE_SUBTITLE; ?></title>
|
||||
<script type="text/javascript" src="/Site/script.js"></script>
|
||||
<link rel="stylesheet" href="/Themes/<?php echo $SITE_THEME;?>.css" type="text/css" media="screen" />
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<div id="art-page-background-simple-gradient">
|
||||
</div>
|
||||
<div id="art-main">
|
||||
<div class="art-Sheet">
|
||||
<div class="art-Sheet-tl"></div>
|
||||
<div class="art-Sheet-tr"></div>
|
||||
<div class="art-Sheet-bl"></div>
|
||||
<div class="art-Sheet-br"></div>
|
||||
<div class="art-Sheet-tc"></div>
|
||||
<div class="art-Sheet-bc"></div>
|
||||
<div class="art-Sheet-cl"></div>
|
||||
<div class="art-Sheet-cr"></div>
|
||||
<div class="art-Sheet-cc"></div>
|
||||
<div class="art-Sheet-body">
|
||||
<div class="art-Header">
|
||||
<div class="art-Header-jpeg"></div>
|
||||
<?php
|
||||
if(!isset($_SESSION["user_id"]))
|
||||
{
|
||||
echo "<form action=\"Site/login.php\" method=\"post\">
|
||||
<b><font color=\"#FFFFFF\"> Username:</font></b>
|
||||
<input style=\"font-weight: bold; font-size:15px; color: white; background-color: black; opacity: .7;filter: alpha(opacity=70); -moz-opacity: .7;\"
|
||||
type=\"text\" name=\"name\" size=\"20\">
|
||||
<b><font color=\"#FFFFFF\">Passwort:</font></b>
|
||||
<input style=\"font-size:15px; color: white; background-color: black; opacity: .7;filter: alpha(opacity=70); -moz-opacity: .7;\"
|
||||
type=\"password\" name=\"pwd\" size=\"20\">";
|
||||
|
||||
echo "
|
||||
<input type=\"hidden\" name=\"path\" size=\"50\" value=\"".$moduleurl."\">
|
||||
<input type=\"submit\" value=\"Login\">
|
||||
</form>";
|
||||
}
|
||||
?>
|
||||
<div class="art-Logo">
|
||||
<h1 id="name-text" class="art-Logo-name"><a href="index.php"><?php echo $SITE_TITLE; ?></a></h1>
|
||||
<div id="slogan-text" class="art-Logo-text">Administration</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="art-nav">
|
||||
<div class="l"></div>
|
||||
<div class="r"></div>
|
||||
<ul class="art-menu">
|
||||
<?php
|
||||
$moduleid = 0;
|
||||
foreach ($SITE_MODULES_ADMIN as $modul)
|
||||
{
|
||||
$moduleid++;
|
||||
$cut = strpos($modul, "#");
|
||||
$modtitle = substr($modul,0,$cut);
|
||||
echo "
|
||||
<li>
|
||||
<a href=\"/Admin/index.php?site=".$moduleid."&uebergabe=0&uebergabe2=0&uebergabe3=0&uebergabe4=0\"";
|
||||
if($moduleurl == "/Admin/index.php?site=".$moduleid)
|
||||
echo " class=active>";
|
||||
else
|
||||
echo ">";
|
||||
echo " <span class=\"l\"></span>
|
||||
<span class=\"r\"></span>
|
||||
<span class=\"t\">".$modtitle."</span>
|
||||
</a>
|
||||
</li>";
|
||||
}
|
||||
|
||||
if(isset($_SESSION["user_admin"]) && $_SESSION["user_admin"] == "1")
|
||||
{
|
||||
echo "<li><a href=\"/\">";
|
||||
echo "<span class=\"l\"></span><span class=\"r\">";
|
||||
echo "</span><span class=\"t\">Logout</span>";
|
||||
echo "</a>";
|
||||
echo "</li>";
|
||||
}
|
||||
?>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<!-- MAIN CONTENT BEGINN ################################################################################ -->
|
59
Site/checkadmin.php
Executable file
59
Site/checkadmin.php
Executable file
@@ -0,0 +1,59 @@
|
||||
<?php
|
||||
$moduleurl = $_SERVER["REQUEST_URI"];
|
||||
$urlcut = strpos($moduleurl, "&");
|
||||
$moduleurl = substr($moduleurl,0,$urlcut);
|
||||
if (!isset ($_SESSION["user_admin"]) || $_SESSION["user_admin"] != "1")
|
||||
{
|
||||
echo "<font color=red><h2><b>Not authenticated!<b></h2></font>
|
||||
<form action=\"/Site/login.php\" method=\"post\">
|
||||
<br \>
|
||||
<b> You need to be Admin to view this area!</b>
|
||||
<br />
|
||||
<br />
|
||||
<table>
|
||||
<tr>
|
||||
<td>Username:</td>
|
||||
<td><input type=\"text\" name=\"name\" size=\"20\"><td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Passwort:</td>
|
||||
<td><input type=\"password\" name=\"pwd\" size=\"20\"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><input type=\"hidden\" name=\"path\" size=\"50\" value=\"".$moduleurl."\"></td>
|
||||
</tr>
|
||||
</table>
|
||||
<input type=\"submit\" value=\"Login\">
|
||||
</form>
|
||||
<div class=\"cleared\"></div><div class=\"art-Footer\">
|
||||
<div class=\"art-Footer-inner\">
|
||||
<div class=\"art-Footer-text\">
|
||||
<p> ";
|
||||
$moduleid = 0;
|
||||
foreach ($SITE_MODULES_FOOTER as $modul)
|
||||
{
|
||||
$moduleid++;
|
||||
$cut = strpos($modul, "#");
|
||||
$modtitle = substr($modul,0,$cut);
|
||||
echo "| <a href=\"/index.php?bsite=".$moduleid."\">".$modtitle."</a> | ";
|
||||
|
||||
}
|
||||
echo"
|
||||
<br />
|
||||
Copyright © 2009-2010 Christoph Haas . All Rights Reserved.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class=\"art-Footer-background\"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class=\"cleared\"></div>
|
||||
<p class=\"art-page-footer\">VPNManagement Version "; echo db_getconfval("version"); echo "</p>
|
||||
</div>
|
||||
<div style=\"text-align: center; font-size: 0.75em;\"></div></body>
|
||||
</html>
|
||||
";
|
||||
exit;
|
||||
}
|
||||
?>
|
57
Site/checkuser.php
Executable file
57
Site/checkuser.php
Executable file
@@ -0,0 +1,57 @@
|
||||
<?php
|
||||
$moduleurl = $_SERVER["REQUEST_URI"];
|
||||
$urlcut = strpos($moduleurl, "&");
|
||||
$moduleurl = substr($moduleurl,0,$urlcut);
|
||||
|
||||
if (!isset ($_SESSION["user_id"]))
|
||||
{
|
||||
echo "<h2><font color=red><b>Not authenticated!</b></font></h2>
|
||||
<form action=\"/Site/login.php\" method=\"post\">
|
||||
<br />
|
||||
<table>
|
||||
<tr>
|
||||
<td>Username:</td>
|
||||
<td><input type=\"text\" name=\"name\" size=\"20\"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Passwort:</td>
|
||||
<td><input type=\"password\" name=\"pwd\" size=\"20\"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><input type=\"hidden\" name=\"path\" size=\"50\" value=\"".$moduleurl."\"/></td>
|
||||
</tr>
|
||||
</table>
|
||||
<input type=\"submit\" value=\"Login\"/>
|
||||
</form>
|
||||
<div class=\"cleared\"></div><div class=\"art-Footer\">
|
||||
<div class=\"art-Footer-inner\">
|
||||
<div class=\"art-Footer-text\">
|
||||
<p> ";
|
||||
$moduleid = 0;
|
||||
foreach ($SITE_MODULES_FOOTER as $modul)
|
||||
{
|
||||
$moduleid++;
|
||||
$cut = strpos($modul, "#");
|
||||
$modtitle = substr($modul,0,$cut);
|
||||
echo "| <a href=\"/index.php?bsite=".$moduleid."\">".$modtitle."</a> | ";
|
||||
|
||||
}
|
||||
echo"
|
||||
<br />
|
||||
Copyright © 2009-2010 Christoph Haas . All Rights Reserved.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class=\"art-Footer-background\"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class=\"cleared\"></div>
|
||||
<p class=\"art-page-footer\">VPNManagement Version "; echo db_getconfval("version"); echo "</p>
|
||||
</div>
|
||||
<div style=\"text-align: center; font-size: 0.75em;\"></div></body>
|
||||
</html>
|
||||
";
|
||||
exit;
|
||||
}
|
||||
?>
|
30
Site/footer.php
Executable file
30
Site/footer.php
Executable file
@@ -0,0 +1,30 @@
|
||||
<!-- END CONTENT BEGINN ################################################################################# -->
|
||||
<div class="cleared"></div><div class="art-Footer">
|
||||
<div class="art-Footer-inner">
|
||||
<div class="art-Footer-text">
|
||||
<p>
|
||||
<?php
|
||||
$moduleid = 0;
|
||||
foreach ($SITE_MODULES_FOOTER as $modul)
|
||||
{
|
||||
$moduleid++;
|
||||
$cut = strpos($modul, "#");
|
||||
$modtitle = substr($modul,0,$cut);
|
||||
echo "| <a href=\"/index.php?bsite=".$moduleid."\">".$modtitle."</a> | ";
|
||||
|
||||
}
|
||||
?>
|
||||
<br />
|
||||
Copyright © 2009-2010 Christoph Haas . All Rights Reserved.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="art-Footer-background"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="cleared"></div>
|
||||
<p class="art-page-footer">VPNManagement Version <?php echo db_getconfval("version");?> </p>
|
||||
</div>
|
||||
<div style="text-align: center; font-size: 0.75em;"></div></body>
|
||||
</html>
|
145
Site/header.php
Executable file
145
Site/header.php
Executable file
@@ -0,0 +1,145 @@
|
||||
<?php
|
||||
session_start ();
|
||||
if (is_dir('install/'))
|
||||
{
|
||||
die("Your Install Directory Still Exists, Please Remove Immediately!!!!");
|
||||
}
|
||||
|
||||
$moduleurl = $_SERVER["REQUEST_URI"];
|
||||
$urlcut = strpos($moduleurl, "&");
|
||||
if($urlcut > 0)
|
||||
{
|
||||
$moduleurl = substr($moduleurl,0,$urlcut);
|
||||
}
|
||||
else
|
||||
{
|
||||
if(strpos($moduleurl, "?") == 0)
|
||||
{
|
||||
$moduleurl = $_SERVER["REQUEST_URI"]."?site=1";
|
||||
}
|
||||
if($_SERVER["REQUEST_URI"] == "/" || is_null($_SERVER["REQUEST_URI"]))
|
||||
{
|
||||
$moduleurl = "/index.php?site=1";
|
||||
}
|
||||
}
|
||||
|
||||
include($_SERVER["DOCUMENT_ROOT"]."/Config/_siteconfig_.php");
|
||||
|
||||
?>
|
||||
<!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" dir="ltr" lang="en-US" xml:lang="en">
|
||||
<head>
|
||||
<script language="JavaScript1.2" type="text/javascript">
|
||||
/* <![CDATA[ */
|
||||
function Mailto(mail,nameli,nachnameli,domainli,landli)
|
||||
{
|
||||
var mimimail;
|
||||
if(mail == "ab231cb) {
|
||||
mimimail = "mailto:" + nameli + "." + nachnameli + "\@" + domainli + "." + landli;
|
||||
}
|
||||
mail.href = mimimail;
|
||||
return (1);
|
||||
}
|
||||
/* ]]> */
|
||||
</script>
|
||||
|
||||
<!--
|
||||
Designed by Christoph Haas
|
||||
-->
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
|
||||
<title><?php echo $SITE_TITLE; ?> - <?php echo $SITE_SUBTITLE; ?></title>
|
||||
<script type="text/javascript" src="/Site/script.js"></script>
|
||||
<link rel="stylesheet" href="/Themes/<?php echo $SITE_THEME;?>.css" type="text/css" media="screen" />
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<div id="art-page-background-simple-gradient">
|
||||
</div>
|
||||
<div id="art-main">
|
||||
<div class="art-Sheet">
|
||||
<div class="art-Sheet-tl"></div>
|
||||
<div class="art-Sheet-tr"></div>
|
||||
<div class="art-Sheet-bl"></div>
|
||||
<div class="art-Sheet-br"></div>
|
||||
<div class="art-Sheet-tc"></div>
|
||||
<div class="art-Sheet-bc"></div>
|
||||
<div class="art-Sheet-cl"></div>
|
||||
<div class="art-Sheet-cr"></div>
|
||||
<div class="art-Sheet-cc"></div>
|
||||
<div class="art-Sheet-body">
|
||||
<div class="art-Header">
|
||||
<div class="art-Header-jpeg"></div>
|
||||
<?php
|
||||
if(!isset($_SESSION["user_id"]))
|
||||
{
|
||||
echo "<form action=\"Site/login.php\" method=\"post\">
|
||||
<b><font color=\"#FFFFFF\"> Username:</font></b>
|
||||
<input style=\"font-weight: bold; font-size:15px; color: white; background-color: black; opacity: .7;filter: alpha(opacity=70); -moz-opacity: .7;\"
|
||||
type=\"text\" name=\"name\" size=\"20\"/>
|
||||
<b><font color=\"#FFFFFF\">Passwort:</font></b>
|
||||
<input style=\"font-size:15px; color: white; background-color: black; opacity: .7;filter: alpha(opacity=70); -moz-opacity: .7;\"
|
||||
type=\"password\" name=\"pwd\" size=\"20\"/>";
|
||||
|
||||
echo "
|
||||
<input type=\"hidden\" name=\"path\" size=\"50\" value=\"".$moduleurl."\"/>
|
||||
<input type=\"submit\" value=\"Login\"/>
|
||||
</form>";
|
||||
}
|
||||
?>
|
||||
<div class="art-Logo">
|
||||
<h1 id="name-text" class="art-Logo-name"><a href="index.php"><?php echo $SITE_TITLE; ?></a></h1>
|
||||
<div id="slogan-text" class="art-Logo-text"><?php echo $SITE_SUBTITLE; ?>
|
||||
<font color="#8B0000"><b> <marquee> <?php echo $SITE_INFO; ?></marquee></b></font>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="art-nav">
|
||||
<div class="l"></div>
|
||||
<div class="r"></div>
|
||||
<ul class="art-menu">
|
||||
<?php
|
||||
$moduleid = 0;
|
||||
foreach ($SITE_MODULES as $modul)
|
||||
{
|
||||
$moduleid++;
|
||||
$cut = strpos($modul, "#");
|
||||
$modtitle = substr($modul,0,$cut);
|
||||
echo "
|
||||
<li>
|
||||
<a href=\"/index.php?site=".$moduleid."&uebergabe=0&uebergabe2=0&uebergabe3=0&uebergabe4=0\"";
|
||||
if($moduleurl == "/index.php?site=".$moduleid)
|
||||
echo " class=active>";
|
||||
else
|
||||
echo ">";
|
||||
echo " <span class=\"l\"></span>
|
||||
<span class=\"r\"></span>
|
||||
<span class=\"t\">".$modtitle."</span>
|
||||
</a>
|
||||
</li>";
|
||||
}
|
||||
|
||||
if(isset($_SESSION["user_admin"]) && $_SESSION["user_admin"] == "1")
|
||||
{
|
||||
echo "<li><a href=\"Admin/index.php\">";
|
||||
echo "<span class=\"l\"></span><span class=\"r\">";
|
||||
echo "</span><span class=\"t\">Administration</span>";
|
||||
echo "</a>";
|
||||
echo "</li>";
|
||||
}
|
||||
|
||||
if (isset ($_SESSION["user_id"]))
|
||||
{
|
||||
echo "<li><a href=\"Site/logout.php\">";
|
||||
echo "<span class=\"l\"></span><span class=\"r\">";
|
||||
echo "</span><span class=\"t\">Logout</span>";
|
||||
echo "</a>";
|
||||
echo "</li>";
|
||||
}
|
||||
?>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<!-- MAIN CONTENT BEGINN ################################################################################ -->
|
3
Site/index.php
Normal file
3
Site/index.php
Normal file
@@ -0,0 +1,3 @@
|
||||
<?php
|
||||
header ("Location: /index.php");
|
||||
?>
|
50
Site/login.php
Executable file
50
Site/login.php
Executable file
@@ -0,0 +1,50 @@
|
||||
<?php
|
||||
// Session starten
|
||||
session_start();
|
||||
// Datenbankverbindung aufbauen
|
||||
include($_SERVER["DOCUMENT_ROOT"]."/Config/_dbconfig_.php");
|
||||
@$y = mysql_connect($MYSQL_HOST,$MYSQL_USER,$MYSQL_PASS);
|
||||
@$x = mysql_select_db($MYSQL_DATABASE);
|
||||
if (empty($x))
|
||||
{
|
||||
die ("Could not connect to database!");
|
||||
}
|
||||
|
||||
$loginname = mysql_real_escape_string($_REQUEST["name"]);
|
||||
$loginpass = mysql_real_escape_string(md5 ($_REQUEST["pwd"]));
|
||||
|
||||
$sql = "SELECT ".
|
||||
"Id, VPNId, IsAdmin, Nickname, Nachname, Vorname, Email, Avatar, NovLogin, NovPass ".
|
||||
"FROM ".
|
||||
"userdata ".
|
||||
"WHERE ".
|
||||
"(Nickname = '".$loginname."') AND ".
|
||||
"(Kennwort = '".$loginpass."')";
|
||||
|
||||
//echo $sql;
|
||||
$result = mysql_query ($sql);
|
||||
|
||||
if (mysql_num_rows ($result) > 0)
|
||||
{
|
||||
// Benutzerdaten in ein Array auslesen.
|
||||
$data = mysql_fetch_array ($result);
|
||||
mysql_close();
|
||||
// Sessionvariablen erstellen und registrieren
|
||||
$_SESSION["user_id"] = $data["Id"];
|
||||
$_SESSION["user_vpnid"] = $data["VPNId"];
|
||||
$_SESSION["user_admin"] = $data["IsAdmin"];
|
||||
$_SESSION["user_nickname"] = $data["Nickname"];
|
||||
$_SESSION["user_nachname"] = $data["Nachname"];
|
||||
$_SESSION["user_vorname"] = $data["Vorname"];
|
||||
$_SESSION["user_email"] = $data["Email"];
|
||||
$_SESSION["user_avatar"] = $data["Avatar"];
|
||||
$_SESSION["user_novlogin"] = $data["NovLogin"];
|
||||
$_SESSION["user_novpass"] = $data["NovPass"];
|
||||
header ("Location: ".$_REQUEST["path"]."&uebergabe=0&uebergabe2=0&uebergabe3=0&uebergabe4=0");
|
||||
}
|
||||
else
|
||||
{
|
||||
mysql_close();
|
||||
header ("Location: /index.php?site=lf");
|
||||
}
|
||||
?>
|
48
Site/login_formular.php
Executable file
48
Site/login_formular.php
Executable file
@@ -0,0 +1,48 @@
|
||||
<!-- MAIN CONTENT BEGINN ################################################################################ -->
|
||||
<?php
|
||||
$moduleurl = $_SERVER["REQUEST_URI"];
|
||||
$urlcut = strpos($moduleurl, "&");
|
||||
if($urlcut > 0)
|
||||
{
|
||||
$moduleurl = substr($moduleurl,0,$urlcut);
|
||||
}
|
||||
else
|
||||
{
|
||||
if(strpos($moduleurl, "?") == 0)
|
||||
{
|
||||
$moduleurl = $_SERVER["REQUEST_URI"]."?site=1";
|
||||
}
|
||||
if($_SERVER["REQUEST_URI"] == "/" || is_null($_SERVER["REQUEST_URI"]))
|
||||
{
|
||||
$moduleurl = "/index.php?site=1";
|
||||
}
|
||||
if($moduleurl == "/index.php?site=lf")
|
||||
{
|
||||
$moduleurl = "/index.php?site=1";
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
<h2><font color=red><b>Login was incorrect!</b></font></h2>
|
||||
|
||||
<form action="/Site/login.php" method="post">
|
||||
<br />
|
||||
Retry:
|
||||
<table>
|
||||
<tr>
|
||||
<td>Username:</td>
|
||||
<td><input type="text" name="name" size="20"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Passwort:</td>
|
||||
<td><input type="password" name="pwd" size="20"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><input type="hidden" name="path" size="50" value="<?php echo $moduleurl; ?>"/></td>
|
||||
</tr>
|
||||
</table>
|
||||
<input type="submit" value="Login"/>
|
||||
</form>
|
||||
|
||||
<!-- END CONTENT BEGINN ################################################################################# -->
|
||||
|
32
Site/login_formular_admin.php
Executable file
32
Site/login_formular_admin.php
Executable file
@@ -0,0 +1,32 @@
|
||||
<!-- MAIN CONTENT BEGINN ################################################################################ -->
|
||||
<?php
|
||||
$moduleurl = $_SERVER["REQUEST_URI"];
|
||||
$urlcut = strpos($moduleurl, "&");
|
||||
$moduleurl = substr($moduleurl,0,$urlcut);
|
||||
?>
|
||||
<h1><b> Administrator Login </h1></b>
|
||||
<form action="/admin/login.php" method="post">
|
||||
<table>
|
||||
<td>
|
||||
<table>
|
||||
<tr>
|
||||
<td>Username:</td>
|
||||
<td><input type="text" name="name" size="20"><td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Passwort:</td>
|
||||
<td><input type="password" name="pwd" size="20"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><input type="hidden" name="path" size="50" value="<?php echo $moduleurl; ?>"></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
<td>
|
||||
<img src="/Images/tux_root.gif" height="150" width="150">
|
||||
</td>
|
||||
</table>
|
||||
<input type="submit" value="Login">
|
||||
</form>
|
||||
|
||||
<!-- END CONTENT BEGINN ################################################################################# -->
|
11
Site/logout.php
Executable file
11
Site/logout.php
Executable file
@@ -0,0 +1,11 @@
|
||||
<?php
|
||||
// Wird ausgeführt um mit der Ausgabe des Headers zu warten.
|
||||
ob_start ();
|
||||
|
||||
session_start ();
|
||||
session_unset ();
|
||||
session_destroy ();
|
||||
|
||||
header ("Location: /index.php");
|
||||
ob_end_flush ();
|
||||
?>
|
40
Site/mysql.php
Executable file
40
Site/mysql.php
Executable file
@@ -0,0 +1,40 @@
|
||||
<?php
|
||||
|
||||
function db_connect ()
|
||||
{
|
||||
require $_SERVER["DOCUMENT_ROOT"]."/Config/_dbconfig_.php";
|
||||
@$y = mysql_connect($MYSQL_HOST,$MYSQL_USER,$MYSQL_PASS);
|
||||
@$x = mysql_select_db($MYSQL_DATABASE);
|
||||
if (empty($x))
|
||||
{
|
||||
echo "ERROR 0x01, Failed to connect to database!<br>";
|
||||
mysql_close();
|
||||
return $x;
|
||||
}
|
||||
else
|
||||
{
|
||||
// echo $x.",".$y;
|
||||
return array($x,$y);
|
||||
}
|
||||
}
|
||||
|
||||
function db_getconfval ($attribute)
|
||||
{
|
||||
list($db,$conn) = db_connect();
|
||||
if (empty($db))
|
||||
{
|
||||
echo "ERROR 0x01, Failed to connect to database!<br>";
|
||||
return NULL;
|
||||
}
|
||||
else
|
||||
{
|
||||
$sql = "SELECT value FROM config WHERE attr='". mysql_real_escape_string($attribute)."'";
|
||||
$result = mysql_query($sql,$conn);
|
||||
$data = mysql_fetch_array ($result);
|
||||
// echo $result;
|
||||
mysql_close();
|
||||
return $data[0];
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
278
Site/script.js
Executable file
278
Site/script.js
Executable file
@@ -0,0 +1,278 @@
|
||||
/* begin Page */
|
||||
|
||||
/* file checksum is A9B5EF42. */
|
||||
|
||||
var artEventHelper = {
|
||||
'bind': function(obj, evt, fn) {
|
||||
if (obj.addEventListener)
|
||||
obj.addEventListener(evt, fn, false);
|
||||
else if (obj.attachEvent)
|
||||
obj.attachEvent('on' + evt, fn);
|
||||
else
|
||||
obj['on' + evt] = fn;
|
||||
}
|
||||
};
|
||||
|
||||
var userAgent = navigator.userAgent.toLowerCase();
|
||||
var browser = {
|
||||
version: (userAgent.match(/.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/) || [])[1],
|
||||
safari: /webkit/.test(userAgent) && !/chrome/.test(userAgent),
|
||||
chrome: /chrome/.test(userAgent),
|
||||
opera: /opera/.test(userAgent),
|
||||
msie: /msie/.test(userAgent) && !/opera/.test(userAgent),
|
||||
mozilla: /mozilla/.test(userAgent) && !/(compatible|webkit)/.test(userAgent)
|
||||
};
|
||||
|
||||
var artLoadEvent = (function() {
|
||||
|
||||
|
||||
var list = [];
|
||||
|
||||
var done = false;
|
||||
var ready = function() {
|
||||
if (done) return;
|
||||
done = true;
|
||||
for (var i = 0; i < list.length; i++)
|
||||
list[i]();
|
||||
};
|
||||
|
||||
if (document.addEventListener && !browser.opera)
|
||||
document.addEventListener('DOMContentLoaded', ready, false);
|
||||
|
||||
if (browser.msie && window == top) {
|
||||
(function() {
|
||||
try {
|
||||
document.documentElement.doScroll('left');
|
||||
} catch (e) {
|
||||
setTimeout(arguments.callee, 10);
|
||||
return;
|
||||
}
|
||||
ready();
|
||||
})();
|
||||
}
|
||||
|
||||
if (browser.opera) {
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
for (var i = 0; i < document.styleSheets.length; i++) {
|
||||
if (document.styleSheets[i].disabled) {
|
||||
setTimeout(arguments.callee, 10);
|
||||
return;
|
||||
}
|
||||
}
|
||||
ready();
|
||||
}, false);
|
||||
}
|
||||
|
||||
if (browser.safari) {
|
||||
var numStyles;
|
||||
(function() {
|
||||
if (document.readyState != 'loaded' && document.readyState != 'complete') {
|
||||
setTimeout(arguments.callee, 10);
|
||||
return;
|
||||
}
|
||||
if ('undefined' == typeof numStyles) {
|
||||
numStyles = document.getElementsByTagName('style').length;
|
||||
var links = document.getElementsByTagName('link');
|
||||
for (var i = 0; i < links.length; i++) {
|
||||
numStyles += (links[i].getAttribute('rel') == 'stylesheet') ? 1 : 0;
|
||||
}
|
||||
if (document.styleSheets.length != numStyles) {
|
||||
setTimeout(arguments.callee, 0);
|
||||
return;
|
||||
}
|
||||
}
|
||||
ready();
|
||||
})();
|
||||
}
|
||||
|
||||
artEventHelper.bind(window, 'load', ready);
|
||||
|
||||
return ({
|
||||
add: function(f) {
|
||||
list.push(f);
|
||||
}
|
||||
})
|
||||
})();
|
||||
|
||||
(function() {
|
||||
// fix ie blinking
|
||||
var m = document.uniqueID && document.compatMode && !window.XMLHttpRequest && document.execCommand;
|
||||
try { if (!!m) { m('BackgroundImageCache', false, true); } }
|
||||
catch (oh) { };
|
||||
})();
|
||||
|
||||
function xGetElementsByClassName(clsName, parentEle, tagName) {
|
||||
var elements = null;
|
||||
var found = [];
|
||||
var s = String.fromCharCode(92);
|
||||
var re = new RegExp('(?:^|' + s + 's+)' + clsName + '(?:$|' + s + 's+)');
|
||||
if (!parentEle) parentEle = document;
|
||||
if (!tagName) tagName = '*';
|
||||
elements = parentEle.getElementsByTagName(tagName);
|
||||
if (elements) {
|
||||
for (var i = 0; i < elements.length; ++i) {
|
||||
if (elements[i].className.search(re) != -1) {
|
||||
found[found.length] = elements[i];
|
||||
}
|
||||
}
|
||||
}
|
||||
return found;
|
||||
}
|
||||
|
||||
var styleUrlCached = null;
|
||||
function GetStyleUrl() {
|
||||
if (null == styleUrlCached) {
|
||||
var ns;
|
||||
styleUrlCached = '';
|
||||
ns = document.getElementsByTagName('link');
|
||||
for (var i = 0; i < ns.length; i++) {
|
||||
var l = ns[i];
|
||||
if (l.href && /style\.css(\?.*)?$/.test(l.href)) {
|
||||
return styleUrlCached = l.href.replace(/style\.css(\?.*)?$/, '');
|
||||
}
|
||||
}
|
||||
|
||||
ns = document.getElementsByTagName('style');
|
||||
for (var i = 0; i < ns.length; i++) {
|
||||
var matches = new RegExp('import\\s+"([^"]+\\/)style\\.css"').exec(ns[i].innerHTML);
|
||||
if (null != matches && matches.length > 0)
|
||||
return styleUrlCached = matches[1];
|
||||
}
|
||||
}
|
||||
return styleUrlCached;
|
||||
}
|
||||
|
||||
function fixPNG(element) {
|
||||
if (/MSIE (5\.5|6).+Win/.test(navigator.userAgent)) {
|
||||
var src;
|
||||
if (element.tagName == 'IMG') {
|
||||
if (/\.png$/.test(element.src)) {
|
||||
src = element.src;
|
||||
element.src = GetStyleUrl() + 'images/spacer.gif';
|
||||
}
|
||||
}
|
||||
else {
|
||||
src = element.currentStyle.backgroundImage.match(/url\("(.+\.png)"\)/i);
|
||||
if (src) {
|
||||
src = src[1];
|
||||
element.runtimeStyle.backgroundImage = 'none';
|
||||
}
|
||||
}
|
||||
if (src) element.runtimeStyle.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + src + "')";
|
||||
}
|
||||
}
|
||||
|
||||
function artHasClass(el, cls) {
|
||||
return (el && el.className && (' ' + el.className + ' ').indexOf(' ' + cls + ' ') != -1);
|
||||
}/* end Page */
|
||||
|
||||
/* begin Menu */
|
||||
function Insert_Separators() {
|
||||
var menus = xGetElementsByClassName("art-menu", document);
|
||||
for (var i = 0; i < menus.length; i++) {
|
||||
var menu = menus[i];
|
||||
var childs = menu.childNodes;
|
||||
var listItems = [];
|
||||
for (var j = 0; j < childs.length; j++) {
|
||||
var el = childs[j];
|
||||
if (String(el.tagName).toLowerCase() == "li") listItems.push(el);
|
||||
}
|
||||
for (var j = 0; j < listItems.length - 1; j++) {
|
||||
var span = document.createElement('span');
|
||||
span.className = 'art-menu-separator';
|
||||
var li = document.createElement('li');
|
||||
li.appendChild(span);
|
||||
listItems[j].parentNode.insertBefore(li, listItems[j].nextSibling);
|
||||
}
|
||||
}
|
||||
}
|
||||
artLoadEvent.add(Insert_Separators);
|
||||
|
||||
function Menu_IE6Setup() {
|
||||
var isIE6 = navigator.userAgent.toLowerCase().indexOf("msie") != -1
|
||||
&& navigator.userAgent.toLowerCase().indexOf("msie 7") == -1;
|
||||
if (!isIE6) return;
|
||||
var aTmp2, i, j, oLI, aUL, aA;
|
||||
var aTmp = xGetElementsByClassName("art-menu", document, "ul");
|
||||
for (i = 0; i < aTmp.length; i++) {
|
||||
aTmp2 = aTmp[i].getElementsByTagName("li");
|
||||
for (j = 0; j < aTmp2.length; j++) {
|
||||
oLI = aTmp2[j];
|
||||
aUL = oLI.getElementsByTagName("ul");
|
||||
if (aUL && aUL.length) {
|
||||
oLI.UL = aUL[0];
|
||||
aA = oLI.getElementsByTagName("a");
|
||||
if (aA && aA.length)
|
||||
oLI.A = aA[0];
|
||||
oLI.onmouseenter = function() {
|
||||
this.className += " art-menuhover";
|
||||
this.UL.className += " art-menuhoverUL";
|
||||
if (this.A) this.A.className += " art-menuhoverA";
|
||||
};
|
||||
oLI.onmouseleave = function() {
|
||||
this.className = this.className.replace(/art-menuhover/, "");
|
||||
this.UL.className = this.UL.className.replace(/art-menuhoverUL/, "");
|
||||
if (this.A) this.A.className = this.A.className.replace(/art-menuhoverA/, "");
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
artLoadEvent.add(Menu_IE6Setup);
|
||||
/* end Menu */
|
||||
|
||||
/* begin Button */
|
||||
function artButtonsSetupJsHover(className) {
|
||||
var tags = ["input", "a", "button"];
|
||||
for (var j = 0; j < tags.length; j++){
|
||||
var buttons = xGetElementsByClassName(className, document, tags[j]);
|
||||
for (var i = 0; i < buttons.length; i++) {
|
||||
var button = buttons[i];
|
||||
if (!button.tagName || !button.parentNode) return;
|
||||
if (!artHasClass(button.parentNode, 'art-button-wrapper')) {
|
||||
if (!artHasClass(button, 'art-button')) button.className += ' art-button';
|
||||
var wrapper = document.createElement('span');
|
||||
wrapper.className = "art-button-wrapper";
|
||||
if (artHasClass(button, 'active')) wrapper.className += ' active';
|
||||
var spanL = document.createElement('span');
|
||||
spanL.className = "l";
|
||||
spanL.innerHTML = " ";
|
||||
wrapper.appendChild(spanL);
|
||||
var spanR = document.createElement('span');
|
||||
spanR.className = "r";
|
||||
spanR.innerHTML = " ";
|
||||
wrapper.appendChild(spanR);
|
||||
button.parentNode.insertBefore(wrapper, button);
|
||||
wrapper.appendChild(button);
|
||||
}
|
||||
artEventHelper.bind(button, 'mouseover', function(e) {
|
||||
e = e || window.event;
|
||||
wrapper = (e.target || e.srcElement).parentNode;
|
||||
wrapper.className += " hover";
|
||||
});
|
||||
artEventHelper.bind(button, 'mouseout', function(e) {
|
||||
e = e || window.event;
|
||||
button = e.target || e.srcElement;
|
||||
wrapper = button.parentNode;
|
||||
wrapper.className = wrapper.className.replace(/hover/, "");
|
||||
if (!artHasClass(button, 'active')) wrapper.className = wrapper.className.replace(/active/, "");
|
||||
});
|
||||
artEventHelper.bind(button, 'mousedown', function(e) {
|
||||
e = e || window.event;
|
||||
button = e.target || e.srcElement;
|
||||
wrapper = button.parentNode;
|
||||
if (!artHasClass(button, 'active')) wrapper.className += " active";
|
||||
});
|
||||
artEventHelper.bind(button, 'mouseup', function(e) {
|
||||
e = e || window.event;
|
||||
button = e.target || e.srcElement;
|
||||
wrapper = button.parentNode;
|
||||
if (!artHasClass(button, 'active')) wrapper.className = wrapper.className.replace(/active/, "");
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
artLoadEvent.add(function() { artButtonsSetupJsHover("art-button"); });
|
||||
/* end Button */
|
||||
|
||||
|
1458
Site/style.css
Executable file
1458
Site/style.css
Executable file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user