Initial checkin

This commit is contained in:
genuineparts 2025-06-20 19:10:23 +02:00
commit d75eb444fc
4304 changed files with 369634 additions and 0 deletions

151
admin/addgroup.apnl.php Normal file
View file

@ -0,0 +1,151 @@
<?php
/**
* Project: astat - simple site engine
* File: /admin/addgroup.apnl.php
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* @link http://www.astat.org SVN: $URL: http://svn.astat.org/astat/trunk/admin/addgroup.apnl.php $
* @copyright 2009 becast.at
* @author Bernhard Jaud <bernhard at becast dot at>
* @package astat core
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
* @version $Id: addgroup.apnl.php 41 2009-06-21 19:24:29Z genuineparts $
*/
If (!defined("in_BL_ADMIN")) {
die("Dieses Script kann nicht ausserhalb des Frameworks laufen!");
}
$addnav["right"]=FALSE;
$session->page_begin("addgroup", True);
class addgroup_panel extends admin_module{
function output(){
global $session,$config,$db,$panel,$admin,$module,$root,$firephp,$log;
if(isset($_POST["send"])){
if(!empty($_POST["name"])){
$db->query("BEGIN");
$db->query("INSERT INTO `" . $config["prefix"] . "role` (`role_name`) VALUES ('".$db->escape($_POST["name"])."')");
$role_id=$db->last_id();
unset($_POST["name"]);
unset($_POST["submit"]);
unset($_POST["send"]);
foreach($_POST as $key=>$value){
$db->query("INSERT INTO `" . $config["prefix"] . "roleset` (`role_id`,`role_value_id`,`value`) VALUES ('".intval($role_id)."','".intval($key)."','".$db->escape($value)."')");
}
$db->query("COMMIT");
$panel->admin_message("Daten &uuml;bernommen!","Die Daten wurden erfolgreich &uuml;bernommen.",True,"addgroup",3);
}else{
$panel->admin_message("Fehler!","Der Rollenname muss ausgef&uuml;llt werden.",True,"addgroup",3);
}
}else{
$result = $db->query("SELECT * FROM " . $config["prefix"] . "role_values");
$panel->title="Gruppe anlegen";
$panel->content='Hier kann man Benutzergruppen anlegen.';
$panel->form(array("action"=>$config["path"]."/admin/index.php?panel=addgroup"));
$panel->content.="<h3>Gruppename:</h3>";
$panel->field(array("name"=>"name","typ"=>"text","value"=>$data["name"]));
$panel->content.="<br /><br />";
$panel->content.="<table width=\"90%\" cellspacing=\"2\">
<tr>
<th><strong>Rechte</strong></th>
</tr>";
while ($row = $db->fetch_array($result)){
$panel->content.="<tr><td><strong>".$row["text"].":</strong><br />".$this->get_option($row["type"],$row["id"])."</td></tr>";
}
$panel->content.="</table><br />";
$panel->field(array("name"=>"send","typ"=>"hidden","value"=>"1"));
$panel->content.="<br />";
$panel->submit();
$panel->formClose();
}
}
function get_option($option,$name) {
global $config,$db,$panel,$userinfo,$admin,$root,$firephp;
if($option=="yesno"){
$checked["yes"]="";
$checked["no"]="";
$yn=$panel->radio(array("name"=>$name,"value"=>"1"),NULL,TRUE);
$yn.="Ja";
$yn.=$panel->radio(array("name"=>$name,"value"=>"0"),NULL,TRUE);
$yn.="Nein";
return $yn;
}
if($option=="onoff"){
$checked["on"]="";
$checked["off"]="";
$yn=$panel->radio(array("name"=>$name,"value"=>"1"),NULL,TRUE);
$yn.="An";
$yn.=$panel->radio(array("name"=>$name,"value"=>"0"),NULL,TRUE);
$yn.="Aus";
return $yn;
}
if($option=="text"){
$text=$panel->field(array("name"=>$name,"typ"=>"text"),"",TRUE);
return $text;
}
if(strstr($option,"wysiwyg")){
$string=str_replace("wysiwyg(","",substr($option, 0, -1));
$sarr=explode(";",$string);
foreach($sarr as $str){
$substr=explode("|",$str);
$a_name[]=$substr[0];
$value[]=$substr[1];
}
if(is_array($sarr)){
$text=$panel->textarea(array("name"=>$name, $a_name[0]=>$value[0],$a_name[1]=>$value[1]),"class=\"mceEditor\"",TRUE);
}else{
$text=$panel->textarea(array("name"=>$name),"class=\"mceEditor\"",TRUE);
}
return $text;
}
if(strstr($option,"textarea")){
$string=str_replace("textarea(","",substr($option, 0, -1));
$sarr=explode(";",$string);
foreach($sarr as $str){
$substr=explode("|",$str);
$a_name[]=$substr[0];
$value[]=$substr[1];
}
if(is_array($sarr)){
$text=$panel->textarea(array("name"=>$name, $a_name[0]=>$value[0],$a_name[1]=>$value[1]),"",TRUE);
}else{
$text=$panel->textarea(array("name"=>$name),"",TRUE);
}
return $text;
}
if(strstr($option,"select")){
//$text=$panel->field("text",$name,"value=\"".$config[$name]."\"",TRUE);
$string=str_replace("select(","",substr($option, 0, -1));
$sarr=explode(";",$string);
foreach($sarr as $str){
$substr=explode("|",$str);
$values[$substr[0]]=$substr[1];
}
$select=$panel->select($values,NULL,$name,"",TRUE);
return $select;
}
}
}
?>

75
admin/adduser.apnl.php Normal file
View file

@ -0,0 +1,75 @@
<?php
If (!defined("in_BL_ADMIN")) {
die("Dieses Script kann nicht ausserhalb des Frameworks laufen!");
}
$addnav["right"]=FALSE;
$session->page_begin("adduser", True);
class adduser_panel extends admin_module{
function output(){
global $plugin,$session,$config,$db,$panel,$admin,$module,$root,$firephp,$log,$lang;
if(isset($_POST["send"])){
if($_POST['role']==2 && $session->userdata['role']!=2){
$panel->admin_message("Error","You cannot assign a role higher then yours!",True,"editusers",3);
}
if(!empty($_POST["name"]) && !empty($_POST["password"])){
$key=$session->generate_key(50);
$plugin->run_hook('admin_user_before_create',array('data'=>$_POST,'key'=>$key,'user_fid'=>$session->userdata['fuid']));
$db->query("INSERT INTO `" . $config["prefix"] . "users` (`username`,`realname`,`password`,`loginkey`,`role`,`email`,`active`) VALUES ('".$db->escape($_POST["name"])."','".$db->escape($_POST["realname"])."','".hash("sha256",$db->escape($_POST["password"]))."','".$key."','".$db->escape($_POST["role"])."','".$db->escape($_POST["email"])."','".$_POST["active"]."')");
$_POST['uid']=$db->last_id();
$plugin->run_hook('admin_user_after_create',array('data'=>$_POST));
$panel->admin_message("Daten &uuml;bernommen!","Die Daten wurden erfolgreich &uuml;bernommen.",True,"adduser",3);
}else{
$panel->admin_message("Fehler!","Der Name und das Passwort m&uuml;ssen ausgef&uuml;lt werden.",True,"adduser",3);
}
}else{
$panel->title=$lang->_('ADDUSER');
$panel->content=$lang->_('ADDUSERTEXT');
$panel->form(array("action"=>$config["path"]."/admin/index.php?panel=adduser"));
$panel->content.="<h3>".$lang->_('USERNAME').":</h3>";
$panel->field(array("name"=>"name","typ"=>"text","value"=>$data["name"]));
$panel->content.="<h3>".$lang->_('REALNAME').":</h3>";
$panel->field(array("name"=>"realname","typ"=>"text","value"=>$data["realname"]));
$panel->content.="<h3>".$lang->_('MAIL').":</h3>";
$panel->field(array("name"=>"email","value"=>$data["email"],"typ"=>"text"));
$panel->content.="<h3>".$lang->_('PASSWORD').":</h3>";
$panel->field(array("name"=>"password","value"=>$data["password"],"typ"=>"password"));
$panel->content.="<h3>".$lang->_('LOCATION').":</h3>";
$panel->field(array("name"=>"from","value"=>$data["from"],"typ"=>"text"));
$panel->content.="<h3>".$lang->_('GENDER').":</h3>";
$panel->select(array("N/A"=>"u", "weiblich"=>"f","m&auml;nnlich"=>"m"),$data["gender"],"gender");
$panel->content.="<h3>".$lang->_('BANREASON').":</h3>";
$panel->textarea(array("name"=>"bio","value"=>$data["bio"],"typ"=>"text"));
$panel->content.="<h3>".$lang->_('HOMEPAGE').":</h3>";
$panel->field(array("name"=>"homepage","value"=>$data["homepage"],"typ"=>"text"));
$panel->content.="<h3>ICQ:</h3>";
$panel->field(array("name"=>"icq","value"=>$data["icq"],"typ"=>"text"));
$panel->content.="<h3>AIM:</h3>";
$panel->field(array("name"=>"aim","value"=>$data["aim"],"typ"=>"text"));
$panel->content.="<h3>Skype:</h3>";
$panel->field(array("name"=>"skype","value"=>$data["skype"],"typ"=>"text"));
$panel->content.="<h3>".$lang->_('ROLE').":</h3>";
$result=$db->query("SELECT `id`,`role_name` FROM `" . $config["prefix"] . "role`");
while($data = $db->fetch_array($result)){
$dd[$data["role_name"]]=$data["id"];
}
$panel->select($dd,"1","role");
$panel->content.="<h3>".$lang->_('ACTIVE').":</h3>";
$panel->select(array($lang->_('YES')=>1,$lang->_('NO')=>0),"0","active");
$panel->field(array("name"=>"send","typ"=>"hidden","value"=>"1"));
$panel->content.="<br />";
$panel->content.="<br />";
$panel->submit();
$panel->formClose();
}
}
}
?>

287
admin/admin.css Normal file
View file

@ -0,0 +1,287 @@
body{
font: normal 12px/24px Verdana, Arial, Helvetica, sans-serif;
margin: 0;
padding: 0;
text-align: center;
}
a{
color: #6699FF;
}
a:hover{
color: #cccccc;
}
img{
border:0px;
}
#sitetitle{
width: 875px;
margin: 0 auto;
padding: 5px;
text-align: left;
border-right: 1px solid #d1d1d1;
border-left: 1px solid #d1d1d1;
border-bottom:1px solid #D1D1D1;
background-color: #fcfcfc;
}
table {
background:#E6E6E6;
border:2px solid #D1D1D1;
border-collapse:collapse;
border-spacing:1px;
color:#333333;
}
table td {
border:1px inset white;
padding:3px;
}
table th {
font-variant: small-caps;
border:1px inset white;
padding:3px;
}
#container{
width: 1024px;
margin: 0 auto;
padding: 5px;
text-align: left;
border-right: 1px solid #d1d1d1;
border-left: 1px solid #d1d1d1;
border-bottom:1px solid #D1D1D1;
background-color: #fcfcfc;
}
#menu{
float: left;
width: 190px;
margin: 0;
}
.menuitem_green{
width: 175px;
height: 50px;
text-align: right;
background-image: url("images/green.gif");
}
.menuitem_blue{
width: 175px;
height: 50px;
text-align: right;
background-image: url("images/blue.gif");
}
.menuitem_yellow{
width: 175px;
height: 50px;
text-align: right;
background-image: url("images/yellow.gif");
}
.menuitem_text{
font-size:15px;
font-weight:bold;
text-decoration: bold;
font-variant:small-caps;
color: #FFFFFF;
padding:20px 12px 0 0;
}
#menu ul{
list-style-type: none;
border-top: 1px solid #d1d1d1;
margin-top:5px;
padding: 0;
}
#menu li{
text-indent: 1em;
border-right: 1px solid #cccccc;
border-bottom:1px solid #D1D1D1;
border-left: 1px solid #d1d1d1
}
#menu li a{
color: #6699ff;
display: block;
padding: 2px 0 0 2px;
text-decoration: none;
}
#menu li a:hover{
background-color: #CCCCCC;
text-decoration: underline;
}
#left p{
margin: 1px;
padding-left: 1em;
}
#left form{
padding: 1em 0 0 0;
margin: 0;
}
#left form input{
margin: 0.2em 0;
background-color: #f3f3f3;
border: 1px solid #333333;
width: 125px;
font: 11px/22px Arial, Helvetica, sans-serif;
padding: 0.2em;
}
#left form .button{
width: 75px;
background-color: #6699FF;
padding: 0;
margin: 0;
}
#content{
border: 1px solid #d1d1d1;
float:left;
margin-bottom:5px;
margin-left:5px;
margin-top:5px;
min-height:300px;
padding-left:1em;
padding-right:1em;
padding-top:5px;
width:800px;
}
#minimal_content{
float:left;
margin-left:-1px;
margin-right:-1px;
margin-top:-5px;
min-height:100px;
padding-left:1em;
padding-right:1em;
padding-top:5px;
width:800px;
}
#minimal_content h2{
background-color: #B2EA6A;
text-indent: 1em;
font-size: 12px;
font-variant: small-caps;
color: #ffffff;
margin: 0;
}
#minimal_content h1{
background-color:#B2EA6A;
color:#FFFFFF;
font-size:25px;
font-variant:small-caps;
height:25px;
margin:0;
text-indent:15px;
}
#minimal_content p{
margin: 0;
padding: 1em;
}
#content h2{
background-color: #B2EA6A;
text-indent: 1em;
font-size: 12px;
font-variant: small-caps;
color: #ffffff;
margin: 0;
}
#content h1{
background-color:#B2EA6A;
color:#FFFFFF;
font-size:25px;
font-variant:small-caps;
height:25px;
margin:0;
text-indent:15px;
}
#content p{
margin: 0;
padding: 1em;
} #content form label{
background-position:0 5px;
background-repeat:no-repeat;
clear:both;
margin-bottom:2px;
margin-right:3px;
padding-left:0.5em;
cursor:pointer;
padding:0.5em 0.5em 0.5em 20px;
}
.messageboxerror {
color: #ffffff;
background-color:#ff0000;
border: 1px solid #cc0000;
}
.unchecked {
background-image:url("images/chk_off.png");
}
.checked {
background-image:url("images/chk_on.png");
}
.unselected {
background-image:url("images/rdo_off.png");
}
.selected {
background-image:url("images/rdo_on.png");
}
.sortcol {
cursor: pointer;
padding-right: 20px;
background-repeat: no-repeat;
background-position: right center;
}
.sortasc {
background-color: #DDFFAC;
background-image: url("images/up.gif");
}
.sortdesc {
background-color: #B9DDFF;
background-image: url("images/down.gif");
}
.nosort {
cursor: default;
}
#footer{
clear: both;
text-align: center;
margin: 0;
padding: 0;
background-color: #f9f9f9;
border: 1px solid #cccccc;
}
.accordion_toggle {
display: block;
height: 30px;
width: 680px;
background: url(images/icons/arrow_left.png) no-repeat center left #a9d06a;
padding: 0 10px 0 10px;
line-height: 30px;
color: #ffffff;
font-weight: normal;
text-decoration: none;
outline: none;
font-size: 12px;
color: #000000;
border-bottom: 1px solid #cde99f;
cursor: pointer;
margin: 0 0 0 0;
}
.accordion_toggle_active {
background: url(images/icons/arrow_down.png) no-repeat center left #e0542f;
color: #ffffff;
border-bottom: 1px solid #cde99f;
}
.accordion_content {
background-color: #ffffff;
color: #444444;
overflow: hidden;
}
.accordion_content h2 {
margin: 15px 0 5px 10px;
color: #0099FF;
}
.accordion_content p {
line-height: 150%;
padding: 5px 10px 15px 10px;
}

190
admin/banips.apnl.php Normal file
View file

@ -0,0 +1,190 @@
<?php
/**
* Project: astat - simple site engine
* File: /admin/editusers.apnl.php
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* @link http://www.astat.org SVN: $URL$
* @copyright 2009 becast.at
* @author Bernhard Jaud <bernhard at becast dot at>
* @package astat core
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
* @version $Id$
*/
If (!defined("in_BL_ADMIN")) {
die("Dieses Script kann nicht ausserhalb des Frameworks laufen!");
}
$addnav["right"]=FALSE;
$session->page_begin("edituser", True);
class banips_panel extends admin_module{
function output(){
global $plugin,$session,$config,$db,$panel,$admin,$module,$root,$firephp,$lang;
if(isset($_GET['action']) && $_GET['action']=='add'){
if(isset($_POST['send']) && !empty($_POST['ip'])){
$db->query("INSERT INTO `" . $config["prefix"] . "banned_ips` (`ip`,`date`,`reason`) VALUES ('".$db->escape($_POST['ip'])."','".time()."','".$db->escape($_POST["reason"])."')");
$panel->admin_message($lang->_('SUCCESS'),$lang->_('DATASAVED'),True,"banips",3);
}
}elseif($_GET["action"]=='delete' && $_GET['id']){
$db->query("DELETE FROM `" . $config["prefix"] . "banned_ips` WHERE `id`='".intval($_GET['id'])."'");
$panel->admin_message("Ban lifted","The ban was lifted.",True,"banips",3);
}else{
$left="";
$right="";
$asmodule="";
$mainmodule="";
$result=$db->query("SELECT * FROM `" . $config["prefix"] . "banned_ips`");
while ($row = $db->fetch_array($result)){
$ips[]=$row;
}
$panel->title=$lang->_('BANNEDIPS');
$panel->content.="<table class=\"sortable\" width=\"90%\" cellspacing=\"2\">
<tr>
<th align=\"center\">".$lang->_('ID')."</th>
<th class=\"sortable-text\" align=\"center\">".$lang->_('IP')."</th>
<th align=\"center\">".$lang->_('DATE')."</th>
<th align=\"center\">".$lang->_('REASON')."</th>
<th class=\"nosort\" align=\"center\">".$lang->_('ACTION')."</th>
</tr>";
if(!empty($ips)){
foreach($ips as $i){
$panel->content.="<tr>
<td align=\"center\">".$i['id']."</td>
<td align=\"center\">".$i['ip']."</td>
<td align=\"center\">".date('d.m.Y, H:i',$i['date'])."</td>
<td align=\"center\">".$i['reason']."</td>";
$panel->content.="<td align=\"center\"><a onclick=\"return confirmLink(this, 'Delete this ban?')\" href=\"".$config["path"]."/admin/index.php?panel=banips&amp;action=delete&amp;id=".$i["id"]."\"><img src=\"".$config["path"]."/admin/images/icons/delete.png\" /></a></td>
</tr>";
}
}else{
$panel->content.="<tr>
<td align=\"center\" colspan=\"5\">".$lang->_('NOBANNEDIPS')."</td>
</tr>";
}
$panel->content.="</table><br />";
$panel->form(array("action"=>$config["path"]."/admin/index.php?panel=banips&action=add"));
$panel->content.="<h3>".$lang->_('IP').":</h3>";
$panel->field(array("name"=>"ip","typ"=>"text"));
$panel->content.="<h3>".$lang->_('REASON')."</h3>";
$panel->textarea(array("name"=>"reason","typ"=>"text"));
$panel->content.="<br />";
$panel->field(array("name"=>"send","typ"=>"hidden","value"=>"1"));
$panel->content.="<br />";
$panel->submit();
$panel->formClose();
$panel->parse_page();
}
}
function meta() {
global $module,$config,$db,$panel,$userinfo,$admin,$root;
$meta='<script type="text/javascript" src="'.$config["path"].'/js/scriptaculous/prototype.js"></script>
<script src="'.$config["path"].'/js/fastinit.js" type="text/javascript">
</script>
<script src="'.$config["path"].'/js/tablesort.js" type="text/javascript">
</script>
<script type="text/javascript">
function deleteItem(item) {
if(confirmLink(this, "Willst du wirklich dieses Modul deinstallieren? Alle Daten diese Moduls werden gel&ouml;scht!")==true){
name="id_"+item;
Effect.SwitchOff(name);
new Ajax.Request(\'index.php?panel=navigation\' , {
method: "post",
parameters: {delete:name}});
}
return false;
}
</script>
<style type="text/css">
.loadlayer {
position: absolute;
padding: 15px;
width: 250px;
background: #ffffff;
border: 3px solid #c90000;
text-align: center;
margin-top: 60px;
left: 50%;
margin-left: -150px;
margin-top: 100px;
font-weight: bold;
z-index:5;
}
div.section,div#createNew {
border: 1px solid #CCCCCC;
margin: 30px 5px;
padding: 0px 0px 10px 0px;
background-color: #EFEFEF;
}
div#createNew input { margin-left: 5px; }
div#createNew h3, div.section h3{
font-size: 14px;
padding: 2px 5px;
margin: 0 0 10px 0;
background-color: #CCCCCC;
display: block;
}
div.section h3 {
cursor: move;
}
div.lineitem {
margin: 3px 10px;
padding: 2px;
background-color: #FFFFFF;
cursor: move;
}
h1 {
margin-bottom: 0;
font-size: 18px;
}
</style>
<script type="text/javascript">
function confirmLink(theLink, text)
{
// Confirmation is not required in the configuration file
// or browser is Opera (crappy js implementation)
if (typeof(window.opera) != \'undefined\') {
return true;
}
var is_confirmed = confirm(text);
if (is_confirmed) {
if ( typeof(theLink.href) != \'undefined\' ) {
theLink.href += \'&is_js_confirmed=1\';
} else if ( typeof(theLink.form) != \'undefined\' ) {
theLink.form.action += \'?is_js_confirmed=1\';
}
}
return is_confirmed;
}
</script>';
return $meta;
}
}
?>

187
admin/config.apnl.php Normal file
View file

@ -0,0 +1,187 @@
<?php
If (!defined("in_BL_ADMIN")) {
die("Dieses Script kann nicht ausserhalb des Frameworks laufen!");
}
$addnav["right"]=FALSE;
$session->page_begin("config", True);
class config_panel extends admin_module{
function output(){
global $module,$config,$db,$panel,$admin,$module,$root,$firephp,$log,$lang;
if(isset($_POST["send"]) && $_POST["send"]==1){
foreach($_POST as $post=>$value){
if($post!="send" and $config[$post]!=$value){
$field=$db->escape($post);
$update=$db->escape($value);
$db->query("UPDATE " . $config["prefix"] . "config SET `value`='".$update."' WHERE `name`='".$field."'");
}
}
$result = $db->query("SELECT name, value FROM " . $config["prefix"] . "config");
while ($row = $db->fetch_array($result)){
$config[$row["name"]] = $row["value"];
}
}
$result = $db->query("SELECT * FROM `" . $config["prefix"] . "config` v LEFT JOIN `" . $config["prefix"] . "config_categorys` c ON v.`category`=c.`cid`");
while ($row = $db->fetch_array($result)){
$data[$row["categoryname"]][]=$row;
}
$panel->title="Konfiguration";
$panel->form(array("action"=>$config["path"]."/admin/index.php?panel=config"));
$panel->content.="<div id=\"vertical_container\">";
foreach($data as $key=>$val){
$panel->content.="<h2 class=\"accordion_toggle\">".$key."</h2>
<div class=\"accordion_content\"><table width=\"700px\">";
foreach($val as $v){
$panel->content.="<tr><td><strong>".$v["title"]."</strong><br /><span style=\"font-size:small;\">".$v["description"]."</span><br />".$this->get_option($v["option"],$v["name"])."</td></tr>";
}
$panel->content.="</table></div>";
}
$panel->content.="</div><br /><br />";
$panel->field(array("typ"=>"hidden","name"=>"send","value"=>1));
$panel->submit();
$panel->formClose();
$panel->foot.='<script type="text/javascript">
var bottomAccordion = new accordion(\'vertical_container\');
//bottomAccordion.activate($$(\'vertical_container .accordion_toggle\')[0]);
</script>';
}
function get_option($option,$name) {
global $config,$db,$panel,$userinfo,$admin,$root,$firephp,$lang;
if($option=="yesno"){
$checked["yes"]="";
$checked["no"]="";
if($config[$name]==1||$config[$name]==True||$config[$name]=="yes"){
$checked["yes"]='checked="checked"';
}else{
$checked["no"]='checked="checked"';
}
$yn=$panel->radio(array("name"=>$name,"value"=>"1"),$checked["yes"],TRUE);
$yn.="Ja";
$yn.=$panel->radio(array("name"=>$name,"value"=>"0"),$checked["no"],TRUE);
$yn.="Nein";
return $yn;
}
if($option=="onoff"){
$checked["on"]="";
$checked["off"]="";
if($config[$name]==1||$config[$name]==True||$config[$name]=="on"){
$checked["on"]='checked="checked"';
}else{
$checked["off"]='checked="checked"';
}
$yn=$panel->radio(array("name"=>$name,"value"=>"1"),$checked["on"],TRUE);
$yn.="An";
$yn.=$panel->radio(array("name"=>$name,"value"=>"0"),$checked["off"],TRUE);
$yn.="Aus";
return $yn;
}
if($option=="language"){
$langs=$lang->getlanguages();
foreach($langs as $lang){
$values[$lang['name']]=$lang['short'];
}
$select=$panel->select($values,$config[$name],$name,"",TRUE);
return $select;
}
if($option=="text"){
$text=$panel->field(array("name"=>$name,"typ"=>"text","value"=>$config[$name]),"",TRUE);
return $text;
}
if(strstr($option,"wysiwyg")){
$string=str_replace("wysiwyg(","",substr($option, 0, -1));
$sarr=explode(";",$string);
foreach($sarr as $str){
$substr=explode("|",$str);
$a_name[]=$substr[0];
$value[]=$substr[1];
}
if(is_array($sarr)){
$text=$panel->textarea(array("name"=>$name,"value"=>$config[$name], $a_name[0]=>$value[0],$a_name[1]=>$value[1]),"class=\"mceEditor\"",TRUE);
}else{
$text=$panel->textarea(array("name"=>$name,"value"=>$config[$name]),"class=\"mceEditor\"",TRUE);
}
return $text;
}
if(strstr($option,"textarea")){
$string=str_replace("textarea(","",substr($option, 0, -1));
$sarr=explode(";",$string);
foreach($sarr as $str){
$substr=explode("|",$str);
$a_name[]=$substr[0];
$value[]=$substr[1];
}
if(is_array($sarr)){
$text=$panel->textarea(array("name"=>$name,"value"=>$config[$name], $a_name[0]=>$value[0],$a_name[1]=>$value[1]),"",TRUE);
}else{
$text=$panel->textarea(array("name"=>$name,"value"=>$config[$name]),"",TRUE);
}
return $text;
}
if(strstr($option,"select")){
//$text=$panel->field("text",$name,"value=\"".$config[$name]."\"",TRUE);
$string=str_replace("select(","",substr($option, 0, -1));
$sarr=explode(";",$string);
foreach($sarr as $str){
$substr=explode("|",$str);
$values[$substr[0]]=$substr[1];
}
$select=$panel->select($values,$config[$name],$name,"",TRUE);
return $select;
}
}
function meta() {
global $module,$config,$db,$panel,$userinfo,$admin,$root;
$meta='<script type="text/javascript" src="/thirdparty/tiny/tiny_mce_gzip.js"></script>
<script type="text/javascript">
tinyMCE_GZ.init({
theme : "advanced",
mode : "textareas",
language : "de",
plugins : "table,advhr,advimage,advlink,insertdatetime,searchreplace",
disk_cache : true,
debug : false
});
</script>
<script type="text/javascript" src="/thirdparty/tiny/tiny_mce.js"></script>
<script type="text/javascript">
tinyMCE.init({
theme : "advanced",
mode : "textareas",
language : "de",
plugins : "table,advhr,advimage,advlink,insertdatetime,searchreplace",
theme_advanced_disable : "styleselect,formatselect ",
theme_advanced_buttons1_add : "fontselect,fontsizeselect",
theme_advanced_buttons2_add : "seperator,forecolor,removeformat,advhr",
theme_advanced_buttons3 : "tablecontrols,seperator",
theme_advanced_toolbar_location : "top",
theme_advanced_toolbar_align : "center",
remove_linebreaks : false,
convert_urls : false,
editor_selector : "mceEditor",
editor_deselector : "mceNoEditor"
});
</script>
<script type="text/javascript" src="'.$config["path"].'/js/scriptaculous/prototype.js"></script>
<script type="text/javascript" src="'.$config["path"].'/js/scriptaculous/effects.js"></script>
<script type="text/javascript" src="'.$config["path"].'/js/scriptaculous/accordion.js"></script>';
return $meta;
}
}
?>

304
admin/editgroup.apnl.php Normal file
View file

@ -0,0 +1,304 @@
<?php
/**
* Project: astat - simple site engine
* File: /admin/editgroup.apnl.php
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* @link http://www.astat.org SVN: $URL$
* @copyright 2009 becast.at
* @author Bernhard Jaud <bernhard at becast dot at>
* @package astat core
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
* @version $Id$
*/
If (!defined("in_BL_ADMIN")) {
die("Dieses Script kann nicht ausserhalb des Frameworks laufen!");
}
$addnav["right"]=FALSE;
$session->page_begin("editgroup", True);
class editgroup_panel extends admin_module{
function output(){
global $session,$config,$db,$panel,$admin,$module,$root,$firephp,$log;
if(isset($_GET["editgroup"]) && $_GET["editgroup"]!=""){
if(isset($_POST["send"]) && !empty($_POST["name"]) && !empty($_POST["group"])){
if(!empty($_POST["name"])){
$id=intval($_POST["group"]);
$db->query("UPDATE `" . $config["prefix"] . "role` SET `role_name`='".$db->escape($_POST["name"])."' WHERE id='".$id."'");
unset($_POST["name"]);
unset($_POST["submit"]);
unset($_POST["send"]);
unset($_POST["group"]);
$db->query("DELETE FROM `" . $config["prefix"] . "roleset` WHERE `role_id`='".$id."'");
foreach($_POST as $key=>$value){
$db->query("INSERT INTO `" . $config["prefix"] . "roleset` (`role_id`,`role_value_id`,`value`) VALUES ('".$id."','".intval($key)."','".$db->escape($value)."')");
}
$panel->admin_message("Daten &uuml;bernommen!","Die Daten wurden erfolgreich &uuml;bernommen.",True,"editgroup",3);
}else{
$panel->admin_message("Fehler!","Der Rollenname muss ausgef&uuml;llt werden.",True,"editgroup",3);
}
}else{
$result = $db->query("SELECT * FROM `" . $config["prefix"] . "role` WHERE id='".intval($_GET["editgroup"])."'");
$data = $db->fetch_array($result);
$panel->title="Gruppe editieren";
$panel->content='Hier kann man Benutzergruppen bearbeiten.';
$panel->form(array("action"=>$config["path"]."/admin/index.php?panel=editgroup&amp;editgroup=".$data["id"]));
$panel->content.="<h3>Gruppename:</h3>";
$panel->field(array("name"=>"name","typ"=>"text","value"=>$data["role_name"]));
$panel->content.="<br /><br />";
$panel->content.="<table width=\"90%\" cellspacing=\"2\">
<tr>
<th><strong>Rechte</strong></th>
</tr>";
$result = $db->query("SELECT * FROM " . $config["prefix"] . "role_values");
while ($row = $db->fetch_array($result)){
$rval =$db->fetch_array($db->query("SELECT value FROM `" . $config["prefix"] . "roleset` WHERE role_value_id='".$row["id"]."' AND role_id='".$data["id"]."'"));
$row["value"]=$rval["value"];
$rdata[]=$row;
}
foreach ($rdata as $d){
$panel->content.="<tr><td><strong>".$d["text"].":</strong><br />".$this->get_option($d["type"],$d["id"],$d["value"])."</td></tr>";
}
$panel->content.="</table><br />";
$panel->field(array("name"=>"send","typ"=>"hidden","value"=>"1"));
$panel->field(array("name"=>"group","typ"=>"hidden","value"=>$data["id"]));
$panel->content.="<br />";
$panel->submit();
$panel->formClose();
$panel->parse_page();
}
}elseif($_GET["action"]=="delete" && $_GET["group"]){
$result=$db->query("SELECT id FROM `" . $config["prefix"] . "role` where `role_name`='User' LIMIT 1");
$row = $db->fetch_array($result);
$db->query("UPDATE `" . $config["prefix"] . "users` SET `role`='".$row["id"]."' WHERE `role`='".intval($_GET["group"])."'");
$db->query("DELETE FROM `" . $config["prefix"] . "role` WHERE id='".intval($_GET["group"])."'");
$db->query("DELETE FROM `" . $config["prefix"] . "roleset` WHERE role_id='".intval($_GET["group"])."'");
$panel->admin_message("Usergruppe gel&ouml;scht!","Die Gruppe wurde erfolgreich gel&ouml;scht.",True,"editgroup",3);
}else{
$result=$db->query("SELECT * FROM `" . $config["prefix"] . "role`");
while ($row = $db->fetch_array($result)){
$role[]=$row;
}
$panel->title="Vorhandene Rollen";
$panel->content.="<table class=\"sortable\" width=\"90%\" cellspacing=\"2\">
<tr>
<th align=\"center\">ID</th>
<th align=\"center\">Name</th>
<th class=\"nosort sortcol\" align=\"center\" width=\"18%\">Aktionen</th>
</tr>";
if(!empty($role)){
foreach($role as $u){
$panel->content.="<tr>
<td align=\"center\">".$u["id"]."</td>
<td align=\"center\">".$u["role_name"]."</td>";
if(!$u["special_group"]){
$panel->content.="<td align=\"center\"><a onclick=\"return confirmLink(this, 'Willst du wirklich die Gruppe ".$u["role_name"]." l&ouml;schen? Alle Mitglieder dieser Gruppe werden der Gruppe User zugeordnet')\" href=\"".$config["path"]."/admin/index.php?panel=editgroup&amp;action=delete&amp;group=".$u["id"]."\"><img src=\"".$config["path"]."/admin/images/icons/delete.png\" /></a> <a href=\"".$config["path"]."/admin/index.php?panel=editgroup&amp;editgroup=".$u["id"]."\"><img src=\"".$config["path"]."/admin/images/icons/wrench.png\" /></a></td>
</tr>";
}else{
$panel->content.="<td align=\"center\"><a href=\"".$config["path"]."/admin/index.php?panel=editgroup&amp;editgroup=".$u["id"]."\"><img src=\"".$config["path"]."/admin/images/icons/wrench.png\" /></a></td></td>
</tr>";
}
}
}else{
$panel->content.="<tr>
<td align=\"center\" colspan=\"5\">Keine Rollen vorhanden.</td>
</tr>";
}
$panel->content.="</table><br />";
}
}
function get_option($option,$name,$value) {
global $config,$db,$panel,$userinfo,$admin,$root,$firephp;
if($option=="yesno"){
$checked["yes"]="";
$checked["no"]="";
if($value==1||$value==True||$value=="yes"){
$checked["yes"]='checked="checked"';
}else{
$checked["no"]='checked="checked"';
}
$yn=$panel->radio(array("name"=>$name,"value"=>"1"),$checked["yes"],TRUE);
$yn.="Ja";
$yn.=$panel->radio(array("name"=>$name,"value"=>"0"),$checked["no"],TRUE);
$yn.="Nein";
return $yn;
}
if($option=="onoff"){
$checked["on"]="";
$checked["off"]="";
if($value==1||$value==True||$value=="on"){
$checked["on"]='checked="checked"';
}else{
$checked["off"]='checked="checked"';
}
$yn=$panel->radio(array("name"=>$name,"value"=>"1"),$checked["on"],TRUE);
$yn.="An";
$yn.=$panel->radio(array("name"=>$name,"value"=>"0"),$checked["off"],TRUE);
$yn.="Aus";
return $yn;
}
if($option=="text"){
$text=$panel->field(array("name"=>$name,"typ"=>"text","value"=>$value),"",TRUE);
return $text;
}
if(strstr($option,"wysiwyg")){
$string=str_replace("wysiwyg(","",substr($option, 0, -1));
$sarr=explode(";",$string);
foreach($sarr as $str){
$substr=explode("|",$str);
$a_name[]=$substr[0];
$value[]=$substr[1];
}
if(is_array($sarr)){
$text=$panel->textarea(array("name"=>$name,"value"=>$value, $a_name[0]=>$value[0],$a_name[1]=>$value[1]),"class=\"mceEditor\"",TRUE);
}else{
$text=$panel->textarea(array("name"=>$name,"value"=>$value),"class=\"mceEditor\"",TRUE);
}
return $text;
}
if(strstr($option,"textarea")){
$string=str_replace("textarea(","",substr($option, 0, -1));
$sarr=explode(";",$string);
foreach($sarr as $str){
$substr=explode("|",$str);
$a_name[]=$substr[0];
$value[]=$substr[1];
}
if(is_array($sarr)){
$text=$panel->textarea(array("name"=>$name,"value"=>$value, $a_name[0]=>$value[0],$a_name[1]=>$value[1]),"",TRUE);
}else{
$text=$panel->textarea(array("name"=>$name,"value"=>$value),"",TRUE);
}
return $text;
}
if(strstr($option,"select")){
//$text=$panel->field("text",$name,"value=\"".$config[$name]."\"",TRUE);
$string=str_replace("select(","",substr($option, 0, -1));
$sarr=explode(";",$string);
foreach($sarr as $str){
$substr=explode("|",$str);
$values[$substr[0]]=$substr[1];
}
$select=$panel->select($values,$value,$name,"",TRUE);
return $select;
}
}
function meta() {
global $module,$config,$db,$panel,$userinfo,$admin,$root;
$meta='<script type="text/javascript" src="'.$config["path"].'/js/scriptaculous/prototype.js"></script>
<script src="'.$config["path"].'/js/fastinit.js" type="text/javascript">
</script>
<script src="'.$config["path"].'/js/tablesort.js" type="text/javascript">
</script>
<script type="text/javascript">
function deleteItem(item) {
if(confirmLink(this, "Willst du wirklich dieses Modul deinstallieren? Alle Daten diese Moduls werden gel&ouml;scht!")==true){
name="id_"+item;
Effect.SwitchOff(name);
new Ajax.Request(\'index.php?panel=navigation\' , {
method: "post",
parameters: {delete:name}});
}
return false;
}
</script>
<style type="text/css">
.loadlayer {
position: absolute;
padding: 15px;
width: 250px;
background: #ffffff;
border: 3px solid #c90000;
text-align: center;
margin-top: 60px;
left: 50%;
margin-left: -150px;
margin-top: 100px;
font-weight: bold;
z-index:5;
}
div.section,div#createNew {
border: 1px solid #CCCCCC;
margin: 30px 5px;
padding: 0px 0px 10px 0px;
background-color: #EFEFEF;
}
div#createNew input { margin-left: 5px; }
div#createNew h3, div.section h3{
font-size: 14px;
padding: 2px 5px;
margin: 0 0 10px 0;
background-color: #CCCCCC;
display: block;
}
div.section h3 {
cursor: move;
}
div.lineitem {
margin: 3px 10px;
padding: 2px;
background-color: #FFFFFF;
cursor: move;
}
h1 {
margin-bottom: 0;
font-size: 18px;
}
</style>
<script type="text/javascript">
function confirmLink(theLink, text)
{
// Confirmation is not required in the configuration file
// or browser is Opera (crappy js implementation)
if (typeof(window.opera) != \'undefined\') {
return true;
}
var is_confirmed = confirm(text);
if (is_confirmed) {
if ( typeof(theLink.href) != \'undefined\' ) {
theLink.href += \'&is_js_confirmed=1\';
} else if ( typeof(theLink.form) != \'undefined\' ) {
theLink.form.action += \'?is_js_confirmed=1\';
}
}
return is_confirmed;
}
</script>';
return $meta;
}
}
?>

260
admin/editusers.apnl.php Normal file
View file

@ -0,0 +1,260 @@
<?php
/**
* Project: astat - simple site engine
* File: /admin/editusers.apnl.php
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* @link http://www.astat.org SVN: $URL$
* @copyright 2009 becast.at
* @author Bernhard Jaud <bernhard at becast dot at>
* @package astat core
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
* @version $Id$
*/
If (!defined("in_BL_ADMIN")) {
die("Dieses Script kann nicht ausserhalb des Frameworks laufen!");
}
$addnav["right"]=FALSE;
$session->page_begin("edituser", True);
class editusers_panel extends admin_module{
function output(){
global $plugin,$session,$config,$db,$panel,$admin,$module,$root,$firephp,$lang;
if(isset($_GET["edituser"]) && $_GET["edituser"]!=""){
if(isset($_POST["send"]) && !empty($_POST["name"]) && !empty($_POST["uid"])){
$pwd="";
if($_POST['role']==2 && $session->userdata['role']!=2){
$panel->admin_message("Error","You cannot assign a role higher then yours!",True,"editusers",3);
}
$_POST['key']=$session->generate_key(50);
if($_POST["password"]!=""){
$pwd=", `password`='".hash("sha256",$db->escape($_POST["password"]))."', `loginkey`='".$_POST['key']."'";
}
$plugin->run_hook('admin_user_before_update',array('data'=>$_POST,'key'=>$key,'user_fid'=>$session->userdata['fuid']));
$db->query("UPDATE `" . $config["prefix"] . "users` SET `username`='".$db->escape($_POST["name"])."',`realname`='".$db->escape($_POST["realname"])."',`email`='".$db->escape($_POST["email"])."',`from`='".$db->escape($_POST["from"])."',`gender`='".$db->escape($_POST["gender"])."',`bio`='".$db->escape($_POST["bio"])."',`homepage`='".$db->escape($_POST["homepage"])."',`icq`='".$db->escape($_POST["icq"])."',`aim`='".$db->escape($_POST["aim"])."',`skype`='".$db->escape($_POST["skype"])."',`role`='".$db->escape($_POST["role"])."',`active`='".$db->escape($_POST["active"])."',`char_suspended`='".$db->escape($_POST["char_suspended"])."'".$pwd." WHERE `uid`='".intval($_POST["uid"])."'");
$_POST['user_fid']=$session->userdata['fuid'];
$plugin->run_hook('admin_user_after_update',array('data'=>$_POST));
$panel->admin_message($lang->_('SUCCESS'),$lang->_('DATASAVED'),True,"editusers",3);
}else{
$panel->title=$lang->_('EDITUSER');
$panel->form(array("action"=>$config["path"]."/admin/index.php?panel=editusers&edituser=".$_GET["edituser"]));
$result=$db->query("SELECT * FROM `" . $config["prefix"] . "users` WHERE uid='".intval($_GET["edituser"])."'");
$data = $db->fetch_array($result);
$panel->content.="<h3>".$lang->_('USERNAME').":</h3>";
$panel->field(array("name"=>"name","typ"=>"text","value"=>$data["username"]));
$panel->content.="<h3>".$lang->_('REALNAME').":</h3>";
$panel->field(array("name"=>"realname","typ"=>"text","value"=>$data["realname"]));
$panel->content.="<h3>".$lang->_('MAIL').":</h3>";
$panel->field(array("name"=>"email","value"=>$data["email"],"typ"=>"text"));
$panel->content.="<h3>".$lang->_('PASSWORD').":</h3>";
$panel->field(array("name"=>"password","value"=>"","typ"=>"password"));
$panel->content.="<h3>".$lang->_('LOCATION').":</h3>";
$panel->field(array("name"=>"from","value"=>$data["from"],"typ"=>"text"));
$panel->content.="<h3>".$lang->_('GENDER').":</h3>";
$panel->select(array($lang->_('N/A')=>"u", $lang->_('FEMALE')=>"f",$lang->_('MALE')=>"m"),$data["gender"],"gender");
$panel->content.="<h3>".$lang->_('HOMEPAGE').":</h3>";
$panel->field(array("name"=>"homepage","value"=>$data["homepage"],"typ"=>"text"));
$panel->content.="<h3>".$lang->_('ICQ').":</h3>";
$panel->field(array("name"=>"icq","value"=>$data["icq"],"typ"=>"text"));
$panel->content.="<h3>".$lang->_('AIM').":</h3>";
$panel->field(array("name"=>"aim","value"=>$data["aim"],"typ"=>"text"));
$panel->content.="<h3>".$lang->_('SKYPE').":</h3>";
$panel->field(array("name"=>"skype","value"=>$data["skype"],"typ"=>"text"));
$panel->content.="<h3>".$lang->_('BANREASON').":</h3>";
$panel->textarea(array("name"=>"bio","value"=>$data["bio"],"typ"=>"text"));
$panel->content.="<br />";
$panel->content.="<h3>".$lang->_('ROLE').":</h3>";
$result=$db->query("SELECT `id`,`role_name` FROM `" . $config["prefix"] . "role`");
while($rdata = $db->fetch_array($result)){
$dd[$rdata["role_name"]]=$rdata["id"];
}
$panel->select($dd,$data["role"],"role");
$panel->content.="<br />";
$panel->content.="<h3>".$lang->_('STATUS').":</h3>";
$panel->select(array($lang->_('ACTIVE')=>1,$lang->_('INACTIVE')=>0,$lang->_('BANNED')=>2),$data["active"],"active");
$panel->content.="<br />";
$panel->content.="<h3>Char Creation supended?</h3>";
$panel->select(array($lang->_('YES')=>1,$lang->_('NO')=>0),$data["char_suspended"],"char_suspended");
$panel->field(array("name"=>"send","typ"=>"hidden","value"=>"1"));
$panel->field(array("name"=>"uid","typ"=>"hidden","value"=>$data["uid"]));
$panel->content.="<br />";
$panel->submit();
$panel->formClose();
$panel->parse_page();
}
}elseif($_GET["action"]=="delete" && $_GET["user"]){
$result=$db->query("SELECT * FROM `" . $config["prefix"] . "users` WHERE `uid`='".intval($_GET["user"])."'");
$data = $db->fetch_array($result);
$plugin->run_hook('admin_user_before_delete',array('data'=>$data));
$db->query("DELETE FROM `" . $config["prefix"] . "users` WHERE `uid`='".intval($_GET["user"])."'");
$plugin->run_hook('admin_user_after_delete',array('data'=>$data));
$panel->admin_message("User gel&ouml;scht!","Der User wurde erfolgreich gel&ouml;scht.",True,"editusers",3);
}else{
$left="";
$right="";
$asmodule="";
$mainmodule="";
$result=$db->query("SELECT * FROM `" . $config["prefix"] . "users` u LEFT JOIN `" . $config["prefix"] . "role` r ON r.id=u.role ORDER BY u.`uid`");
while ($row = $db->fetch_array($result)){
$user[]=$row;
}
$panel->title=$lang->_('USERS');
$panel->content.="<table id=\"users\" width=\"90%\" cellspacing=\"2\">
<thead>
<tr>
<th align=\"center\">".$lang->_('ID')."</th>
<th align=\"center\">".$lang->_('USERNAME')."</th>
<th align=\"center\">".$lang->_('REALNAME')."</th>
<th align=\"center\">".$lang->_('ROLE')."</th>
<th align=\"center\">".$lang->_('STATUS')."</th>
<th align=\"center\">".$lang->_('ACTION')."</th>
</tr></thead><tbody>";
if(!empty($user)){
foreach($user as $u){
if($u['active']==1){
$u['activetext']=$lang->_('ACTIVE');
}elseif($u['active']==2){
$u['activetext']=$lang->_('BANNED');
}else{
$u['activetext']=$lang->_('INACTIVE');
}
$panel->content.="<tr>
<td align=\"center\">".$u["uid"]."</td>
<td align=\"center\">".$u["username"]."</td>
<td align=\"center\">".$u["realname"]."</td>
<td align=\"center\">".$u["role_name"]."</td>
<td align=\"center\">".$u['activetext']."</td>";
if($u["uid"]==$session->userdata["uid"]){
$panel->content.="<td align=\"center\"><a onclick=\"return confirmLink(this,'Das bist du selbst. Und das ist in 99% aller Fälle eine sehr dumme Idee. Wirklich sicher? Du wirst dann sofort ausgeloggt!')\" href=\"".$config["path"]."/admin/index.php?panel=editusers&amp;action=delete&amp;user=".$u["uid"]."\"><img src=\"".$config["path"]."/admin/images/icons/delete.png\" /></a> <a href=\"".$config["path"]."/admin/index.php?panel=editusers&amp;edituser=".$u["uid"]."\"><img src=\"".$config["path"]."/admin/images/icons/wrench.png\" /></a></td>
</tr>";
}else{
$panel->content.="<td align=\"center\"><a onclick=\"return confirmLink(this, 'Willst du wirklich den User ".$u["username"]." l&ouml;schen? Alle Daten diese Users werden gel&ouml;scht!')\" href=\"".$config["path"]."/admin/index.php?panel=editusers&amp;action=delete&amp;user=".$u["uid"]."\"><img src=\"".$config["path"]."/admin/images/icons/delete.png\" /></a> <a href=\"".$config["path"]."/admin/index.php?panel=editusers&amp;edituser=".$u["uid"]."\"><img src=\"".$config["path"]."/admin/images/icons/wrench.png\" /></a></td>
</tr>";
}
}
}else{
$panel->content.="<tr>
<td align=\"center\" colspan=\"5\">Keine User verf&uuml;gbar.</td>
</tr>";
}
$panel->content.="</tbody></table><br />";
}
}
function meta() {
global $module,$config,$db,$panel,$userinfo,$admin,$root;
$meta='<script src="'.$config["path"].'/js/jquery/jquery.min.js" type="text/javascript">
</script>
<script src="'.$config["path"].'/js/datatables/js/jquery.dataTables.min.js" type="text/javascript">
</script>
<link type="text/css" rel="stylesheet" media="screen" href="'.$config["path"].'/js/datatables/css/jquery.dataTables.css" />
<script type="text/javascript">
function deleteItem(item) {
if(confirmLink(this, "Willst du wirklich dieses Modul deinstallieren? Alle Daten diese Moduls werden gel&ouml;scht!")==true){
name="id_"+item;
Effect.SwitchOff(name);
new Ajax.Request(\'index.php?panel=navigation\' , {
method: "post",
parameters: {delete:name}});
}
return false;
}
</script>
<style type="text/css">
.loadlayer {
position: absolute;
padding: 15px;
width: 250px;
background: #ffffff;
border: 3px solid #c90000;
text-align: center;
margin-top: 60px;
left: 50%;
margin-left: -150px;
margin-top: 100px;
font-weight: bold;
z-index:5;
}
div.section,div#createNew {
border: 1px solid #CCCCCC;
margin: 30px 5px;
padding: 0px 0px 10px 0px;
background-color: #EFEFEF;
}
div#createNew input { margin-left: 5px; }
div#createNew h3, div.section h3{
font-size: 14px;
padding: 2px 5px;
margin: 0 0 10px 0;
background-color: #CCCCCC;
display: block;
}
div.section h3 {
cursor: move;
}
div.lineitem {
margin: 3px 10px;
padding: 2px;
background-color: #FFFFFF;
cursor: move;
}
h1 {
margin-bottom: 0;
font-size: 18px;
}
</style>
<script type="text/javascript">
function confirmLink(theLink, text)
{
// Confirmation is not required in the configuration file
// or browser is Opera (crappy js implementation)
if (typeof(window.opera) != \'undefined\') {
return true;
}
var is_confirmed = confirm(text);
if (is_confirmed) {
if ( typeof(theLink.href) != \'undefined\' ) {
theLink.href += \'&is_js_confirmed=1\';
} else if ( typeof(theLink.form) != \'undefined\' ) {
theLink.form.action += \'?is_js_confirmed=1\';
}
}
return is_confirmed;
}
</script>
<script type="text/javascript">
$(document).ready(function() {
$(\'#users\').dataTable();
} );
</script>';
return $meta;
}
}
?>

BIN
admin/images/down.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 57 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 781 B

BIN
admin/images/icons/add.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 733 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 523 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 464 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 619 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 524 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 610 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 533 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 703 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 656 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 467 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 592 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 605 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 714 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 612 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 581 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 634 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 685 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 670 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 656 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 701 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 487 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 525 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 585 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 478 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 547 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 581 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 510 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 483 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 520 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 432 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 492 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 493 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 576 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 555 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 476 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 473 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 465 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 426 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 507 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 582 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 677 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 379 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 600 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 551 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 626 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 345 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 484 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 594 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 625 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 685 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 506 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 349 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 608 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 602 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 683 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 516 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 489 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 631 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 372 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 760 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 743 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 391 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 853 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 733 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 755 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 754 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 849 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 753 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 770 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 781 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 714 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 734 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 738 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 669 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 752 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 773 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 811 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 794 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 777 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 733 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 738 B

BIN
admin/images/icons/bell.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 789 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 816 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 824 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 813 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 836 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 850 B

BIN
admin/images/icons/bin.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 476 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 363 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 475 B

BIN
admin/images/icons/bomb.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 793 B

Some files were not shown because too many files have changed in this diff Show more