Updated to latest version of CMS

This commit is contained in:
genuineparts 2025-06-23 20:45:15 +02:00
parent ccdf8fbb81
commit edf41b1198
76 changed files with 465 additions and 1162 deletions

View file

@ -1,142 +0,0 @@
<?php
/**
* Project: astat - simple site engine
* File: /modules/news/add.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: file:///var/local/svn/astat/trunk/modules/news/admin/add.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: add.apnl.php 96 2010-02-17 21:56:41Z genuineparts $
*/
If (!defined("in_BL_ADMIN")) {
die("Dieses Script kann nicht ausserhalb des Frameworks laufen!");
}
$session->page_begin("add News", True);
class add_news_panel extends admin_module{
function output(){
global $config, $db,$panel, $session;
$fail=FALSE;
if(isset($_POST['send'])&& $_POST['send']==1){
if(isset($_POST['text'])&& $_POST['text']!=""||isset($_POST['title'])&& $_POST['title']!=""){
$title=$db->escape($_POST['title']);
$db->query("INSERT INTO `" . $config["prefix"] . "news` (`text`,`date`,`author`,`category`,`title`,`active`) VALUES ('".$db->escape($_POST["text"])."','".time()."','".$session->userdata["uid"]."','".intval($_POST["category"])."','".$title."','".$_POST["active"]."')");
$panel->admin_message("Danke", "Die News wurden erfolgreich eingetragen!.",TRUE,"add_news");
}else{
$fail="<span style=\"text-align: center; color: red;\">Du musst alle Felder ausf&uuml;llen!</span>";
}
}elseif(!isset($_POST['send']) || $fail){
$panel->title="News schreiben";
$panel->form(array("action"=>$config["path"]."/admin/index.php?panel=add_news"));
if($fail){
$panel->content.=$fail;
}
$panel->content.="<h3>Titel:</h3>";
$panel->field(array("name"=>"title","typ"=>"text","value"=>$_POST["title"]));
$resultc=$db->query("SELECT `id`,`name` FROM `" . $config["prefix"] . "news_category` WHERE `active`='true'");
$karray["Keine"]="";
while($row=$db->fetch_array($resultc)){
$karray[$row["name"]]=$row["id"];
}
$panel->content.="<h3>Kategorie:</h3>";
$panel->select($karray,$_POST["category"],"category");
$panel->content.="<br />";
$panel->content.="<h3>Text:</h3>";
$panel->textarea(array("name"=>"text","value"=>$_POST["text"],"rows"=>"30","cols"=>"80"),"class=\"mceEditor\"");
$panel->content.="<h3>Aktiv:</h3>";
$panel->select(array("Nein"=>"false","Ja"=>"true"),$_POST["active"],"active");
$panel->content.="<br />";
$panel->field(array("name"=>"send","typ"=>"hidden","value"=>"1"));
$panel->content.="<br />";
$panel->submit();
$panel->formClose();
}
}
function meta(){
global $config;
$meta="<script type=\"text/javascript\" src=\"".$config["path"]."/js/jquery/jquery.min.js\"></script>
<script type=\"text/javascript\">
$(document).ready(function()
{
$(\"#url\").blur(function()
{
//remove all the class add the messagebox classes and start fading
$(\"#msgbox\").removeClass().addClass('messagebox').text('Warten...').fadeIn(\"slow\");
//check the username exists or not from ajax
$.post(\"ajax.php\",{ call:'url',url:$(this).val() } ,function(data)
{
if(data==1) //if username not avaiable
{
$(\"#msgbox\").fadeTo(200,0.1,function() //start fading the messagebox
{
//add message and change the class of the box and start fading
$(this).html('Url vergeben').addClass('messageboxerror').fadeTo(900,1);
});
}
else
{
$(\"#msgbox\").fadeTo(200,0.1,function() //start fading the messagebox
{
//add message and change the class of the box and start fading
$(this).html('').removeClass().fadeTo(900,1);
});
}
});
});
});
</script>";
$meta.='<script type="text/javascript" src="'.$config["path"].'/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="'.$config["path"].'/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>';
return $meta;
}
}
?>

View file

@ -1,81 +0,0 @@
<?php
/**
* Project: astat - simple site engine
* File: /modules/news/addcategory.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: file:///var/local/svn/astat/trunk/modules/news/admin/addcategory.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: addcategory.apnl.php 96 2010-02-17 21:56:41Z genuineparts $
*/
If (!defined("in_BL_ADMIN")) {
die("Dieses Script kann nicht ausserhalb des Frameworks laufen!");
}
$session->page_begin("add news Category", True);
class addcategory_news_panel extends admin_module{
function output(){
global $config, $db,$panel, $root, $session, $core;
$fail=FALSE;
if(isset($_POST['send'])&& $_POST['send']==1){
if(isset($_POST['name'])&& $_POST['name']!=""){
$userfile_name = $_FILES['picture']['name'];
$userfile_tmp = $_FILES['picture']['tmp_name'];
$userfile_size = $_FILES['picture']['size'];
$userfile_type = $_FILES['picture']['type'];
$filedir = $root.'/newsimages/';
$size = 120;
if (isset($_FILES['picture']['name']) && $_FILES['picture']['name']!=""){
$prod_img = $filedir.$userfile_name;
$ret=$core->upload_file($prod_img, $userfile_tmp, $size, $size, TRUE, TRUE);
if($ret!==TRUE){
$panel->admin_message("Fehler", "Das Bild konnte nicht hochgeladen wrden <br /> Der Fehler war: ". $ret,TRUE,"addcategory_news");
}
}
$name=$db->escape($_POST['name']);
$active=$db->escape($_POST['active']);
$db->query("INSERT INTO `" . $config["prefix"]. "news_category` (`name`,`picture`,`active`) VALUES ('".$name."','".$userfile_name."','".$active."')");
$panel->admin_message("Danke", "Die Kategorie wurde erfolgreich eingetragen!.",TRUE,"addcategory_news");
}else{
$fail="<span style=\"text-align: center; color: red;\">Der Kategoriename muss angegeben werden!</span>";
}
}elseif(!isset($_POST['send']) || $fail){
$panel->title="Kategorie hinzuf&uuml;gen";
$panel->form(array("action"=>$config["path"]."/admin/index.php?panel=addcategory_news"),FALSE,"enctype=\"multipart/form-data\"");
if($fail){
$panel->content.=$fail;
}
$panel->content.="<h3>Kategoriename:</h3>";
$panel->field(array("name"=>"name","typ"=>"text","value"=>$_POST["name"]));
$panel->content.="<h3>Kategoriebild:</h3>";
$panel->field(array("name"=>"picture","typ"=>"file","value"=>$_POST["picture"]));
$panel->content.="<br />";
$panel->content.="<h3>Aktiv:</h3>";
$panel->select(array("Nein"=>"false","Ja"=>"true"),$_POST["active"],"active");
$panel->content.="<br />";
$panel->field(array("name"=>"send","typ"=>"hidden","value"=>"1"));
$panel->content.="<br />";
$panel->submit();
$panel->formClose();
}
}
}
?>

View file

@ -1,227 +0,0 @@
<?php
/**
* Project: astat - simple site engine
* File: /modules/news/edit.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: file:///var/local/svn/astat/trunk/modules/news/admin/edit.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: edit.apnl.php 96 2010-02-17 21:56:41Z genuineparts $
*/
If (!defined('in_BL_ADMIN')) {
die('Dieses Script kann nicht ausserhalb des Frameworks laufen!');
}
$session->page_begin('edit News', True);
class edit_news_panel extends admin_module{
function output(){
global $config, $db,$panel, $session, $admin;
$fail=FALSE;
if(isset($_POST['send'])&& $_POST['send']==1){
if(isset($_POST['id'])&& $_POST['id']!=''||isset($_POST['text'])&& $_POST['text']!=''||isset($_POST['title'])&& $_POST['title']!=''){
$id=intval($_POST['id']);
$title=$db->escape($_POST['title']);
$db->query("UPDATE `" . $config['prefix'] . "news` SET `text`='".$db->escape($_POST['text'])."',`category`='".intval($_POST['category'])."',`title`='".$title."',`active`='".$_POST['active']."' WHERE `id`='".$id."'");
$panel->admin_message('Danke', 'News erfolgreich ge&auml;ndert!',TRUE,'edit_news');
}else{
$fail='<span style="text-align: center; color: red;">Du musst alle Felder ausf&uuml;llen!</span>';
}
}elseif(isset($_GET['id'])&& $_GET['id']!=''){
if($_GET['action']=='edit'){
$result = $db->query("SELECT * FROM " . $config['prefix'] . "news WHERE id='".intval($_GET['id'])."'");
$_POST=$db->fetch_array($result);
/*$resultna=$db->query("SELECT id,name FROM " . $config["prefix"] . "menue");
while($rowa=$db->fetch_array($resultna)){
$resultn = $db->query("SELECT m_id FROM " . $config["prefix"] . "article_menue WHERE a_id='".intval($_GET['id'])."' and m_id='".$rowa["id"]."'");
if($db->num_rows($resultn) >= 1){
$rowa["checked"]="checked=\"checked\"";
}
$navs[]=$rowa;
}*/
$panel->title='News editieren';
$panel->form(array('action'=>$config['path'].'/admin/index.php?panel=edit_news'));
if($fail){
$panel->content.=$fail;
}
$panel->content.='<h3>Titel:</h3>';
$panel->field(array('name'=>'title','typ'=>'text','value'=>$_POST['title']));
$panel->content.='<h3>Kategorie:</h3>';
$resultc=$db->query("SELECT `id`,`name` FROM `" . $config['prefix'] . "news_category` WHERE `active`='true'");
$karray['Keine']='';
while($row=$db->fetch_array($resultc)){
$karray[$row['name']]=$row['id'];
}
$panel->select($karray,$_POST['category'],'category');
$panel->content.='<h3>Text:</h3>';
$panel->textarea(array('name'=>'text','value'=>$_POST['text'],'rows'=>'30','cols'=>'80'),'class="mceEditor"');
$panel->content.='<h3>Aktiv:</h3>';
$panel->select(array('Nein'=>'false','Ja'=>'true'),$_POST['active'],'active');
$panel->content.='<br />';
$panel->field(array('name'=>'send','typ'=>'hidden','value'=>'1'));
$panel->field(array('name'=>'id','typ'=>'hidden','value'=>$_GET['id']));
$panel->content.='<br />';
$panel->submit();
$panel->formClose();
}elseif($_GET['action']=='delete' && $_GET['id']){
$db->query("DELETE FROM `" . $config['prefix'] . "news` WHERE `id`='".intval($_GET['id'])."'");
$panel->admin_message('News gel&ouml;scht!','Die News wurden erfolgreich gel&ouml;scht.',True,'edit_news',3);
}
}else{
$result = $db->query("SELECT a.`title`,a.`id`,a.`active`,a.`date`,c.`name`,u.`username` FROM `" . $config['prefix'] . "news` a LEFT JOIN `" . $config['prefix'] . "news_category` c ON a.`category`=c.`id` LEFT JOIN `" . $config['prefix'] . "users` u on a.`author`=u.`uid`") or die($db->error());
while($row=$db->fetch_array($result, MYSQL_ASSOC)){
$row['dates']=date('d.m.Y',$row['date']);
$news[]=$row;
}
$panel->title='Vorhandene Artikel';
$panel->content.='<table class="sortable" width="90%" cellspacing="2">
<tr>
<th align="center">ID</th>
<th align="center">Name</th>
<th align="center">Kategorien</th>
<th align="center">Aktiv</th>
<th align="center">User</th>
<th class="nosort sortcol" align="center" width="18%">Aktionen</th>
</tr>';
if(!empty($news)){
foreach($news as $u){
if($u['active']=='true'){
$u['a']='Ja';
}else{
$u['a']='Nein';
}
$panel->content.='<tr>
<td align="center">'.$u['id'].'</td>
<td align="center">'.$u['title'].'</td>
<td align="center">'.$u['name'].'</td>
<td align="center">'.$u['a'].'</td>
<td align="center">'.$u['username'].'</td>';
$panel->content.='<td align="center"><a onclick="return confirmLink(this, "Willst du wirklich den News '.$u['title'].' l&ouml;schen? ")" href="'.$config['path'].'/admin/index.php?panel=edit_news&amp;action=delete&amp;id='.$u['id'].'"><img src="'.$config['path'].'/admin/images/icons/delete.png" /></a> <a href="'.$config['path'].'/admin/index.php?panel=edit_news&amp;action=edit&amp;id='.$u['id'].'"><img src="'.$config['path'].'/admin/images/icons/wrench.png" /></a></td>
</tr>';
}
}else{
$panel->content.='<tr>
<td align="center" colspan="7">Keine News vorhanden.</td>
</tr>';
}
$panel->content.='</table><br />';
}
}
function meta(){
global $config;
$meta="<script type=\"text/javascript\" src=\"".$config["path"]."/js/jquery/jquery.min.js\"></script>
<script type=\"text/javascript\">
$(document).ready(function()
{
$(\"#url\").blur(function()
{
//remove all the class add the messagebox classes and start fading
$(\"#msgbox\").removeClass().addClass('messagebox').text('Warten...').fadeIn(\"slow\");
//check the username exists or not from ajax
$.post(\"ajax.php\",{ call:'url',url:$(this).val() } ,function(data)
{
if(data==1) //if username not avaiable
{
$(\"#msgbox\").fadeTo(200,0.1,function() //start fading the messagebox
{
//add message and change the class of the box and start fading
$(this).html('Url vergeben').addClass('messageboxerror').fadeTo(900,1);
});
}
else
{
$(\"#msgbox\").fadeTo(200,0.1,function() //start fading the messagebox
{
//add message and change the class of the box and start fading
$(this).html('').removeClass().fadeTo(900,1);
});
}
});
});
});
</script>";
$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>';
$meta.='<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>';
$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>';
return $meta;
}
}
?>

View file

@ -1,190 +0,0 @@
<?php
/**
* Project: astat - simple site engine
* File: /modules/news/editcategory.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: file:///var/local/svn/astat/trunk/modules/news/admin/editcategory.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: editcategory.apnl.php 96 2010-02-17 21:56:41Z genuineparts $
*/
If (!defined("in_BL_ADMIN")) {
die("Dieses Script kann nicht ausserhalb des Frameworks laufen!");
}
$session->page_begin("edit news category", True);
class editcategory_news_panel extends admin_module{
function output(){
global $config, $db,$panel, $session, $root, $core, $admin;
$fail=FALSE;
if(isset($_POST['send'])&& $_POST['send']==1){
if(isset($_POST['name'])&& $_POST['name']!=""){
$userfile_name = $_FILES['picture']['name'];
$userfile_tmp = $_FILES['picture']['tmp_name'];
$userfile_size = $_FILES['picture']['size'];
$userfile_type = $_FILES['picture']['type'];
$filedir = $root.'/newsimages/';
$size = 120;
if (isset($_FILES['picture']['name']) && $_FILES['picture']['name']!=""){
$prod_img = $filedir.$userfile_name;
$ret=$core->upload_file($prod_img, $userfile_tmp, $size, $size, TRUE, TRUE);
if($ret!==TRUE){
$panel->admin_message("Fehler", "Das Bild konnte nicht hochgeladen wrden <br /> Der Fehler war: ". $ret,TRUE,"editcategory_news");
}
$result=$db->query("SELECT `picture` FROM `" . $config["prefix"]. "news_category` WHERE `id`='".intval($_POST["id"])."' LIMIT 1");
$file=$db->fetch_array($result);
@unlink($filedir.$file['picture']);
$db->query("UPDATE `" . $config["prefix"]. "news_category` SET `picture`='".$userfile_name."' WHERE `id`='".intval($_POST["id"])."'");
}elseif($_POST["delimg"]==1){
$result=$db->query("SELECT `picture` FROM `" . $config["prefix"]. "news_category` WHERE `id`='".intval($_POST["id"])."' LIMIT 1");
$file=$db->fetch_array($result);
@unlink($filedir.$file['picture']);
$db->query("UPDATE `" . $config["prefix"]. "news_category` SET `picture`='' WHERE `id`='".intval($_POST["id"])."'");
}
$name=$db->escape($_POST['name']);
$active=$db->escape($_POST['active']);
$db->query("UPDATE `" . $config["prefix"]. "news_category` SET `name`='".$name."', `active`='".$active."' WHERE `id`='".intval($_POST["id"])."'") or die($db->error());
$panel->admin_message("Danke", "Die Kategorie wurde erfolgreich editiert!.",TRUE,"editcategory_news");
}else{
$fail="<span style=\"text-align: center; color: red;\">Der Kategoriename muss angegeben werden!</span>";
}
}elseif(isset($_GET['id'])&& $_GET['id']!=""){
if($_GET['action']=="edit"){
$result = $db->query("SELECT * FROM `" . $config["prefix"] . "news_category` WHERE `id`='".intval($_GET['id'])."'");
$_POST=$db->fetch_array($result);
/*$resultna=$db->query("SELECT id,name FROM " . $config["prefix"] . "menue");
while($rowa=$db->fetch_array($resultna)){
$resultn = $db->query("SELECT m_id FROM " . $config["prefix"] . "article_menue WHERE a_id='".intval($_GET['id'])."' and m_id='".$rowa["id"]."'");
if($db->num_rows($resultn) >= 1){
$rowa["checked"]="checked=\"checked\"";
}
$navs[]=$rowa;
}*/
$panel->title="Kategorie editieren";
$panel->form(array("action"=>$config["path"]."/admin/index.php?panel=editcategory_news"),FALSE,"enctype=\"multipart/form-data\"");
if($fail){
$panel->content.=$fail;
}
$panel->content.="<h3>Kategoriename:</h3>";
$panel->field(array("name"=>"name","typ"=>"text","value"=>$_POST["name"]));
if($_POST["picture"]!=""){
$panel->content.="<h3>aktuelles Kategoriebild:</h3>";
$panel->content.="<img src=\"".$config["path"]."/newsimages/".$_POST["picture"]."\" alt=\"Kategoriebild\" />";
$panel->content.="<br />";
$panel->checkbox(array("name"=>"delimg","value"=>"1"));
$panel->content.=" Bild l&ouml;schen?";
$panel->content.="<br />";
}
$panel->content.="<h3>neues Kategoriebild:</h3>";
$panel->field(array("name"=>"picture","typ"=>"file"));
$panel->content.="<br />";
$panel->content.="<h3>Aktiv:</h3>";
$panel->select(array("Nein"=>"false","Ja"=>"true"),$_POST["active"],"active");
$panel->content.="<br />";
$panel->field(array("name"=>"send","typ"=>"hidden","value"=>"1"));
$panel->field(array("name"=>"id","typ"=>"hidden","value"=>$_GET['id']));
$panel->content.="<br />";
$panel->submit();
$panel->formClose();
$panel->parse_page();
}elseif($_GET["action"]=="delete" && $_GET["id"]){
$result=$db->query("SELECT `picture` FROM `" . $config["prefix"] . "news_category` where `id`='".intval($_GET["id"])."'");
$row = $db->fetch_array($result);
@unlink($root.'/catimages/'.$row["picture"]);
$db->query("DELETE FROM `" . $config["prefix"] . "news_category` WHERE `id`='".intval($_GET["id"])."'");
$panel->admin_message("Kategorie gel&ouml;scht!","Die Kategorie wurde erfolgreich gel&ouml;scht.",True,"editcategory_news",3);
}
}else{
$result = $db->query("SELECT * FROM `" . $config["prefix"] . "news_category`");
while($row=$db->fetch_array($result, MYSQL_ASSOC)){
$articles[]=$row;
}
$panel->title="Vorhandene Kategorien";
$panel->content.="<table class=\"sortable\" width=\"90%\" cellspacing=\"2\">
<tr>
<th align=\"center\">ID</th>
<th align=\"center\">Name</th>
<th align=\"center\">Bild</th>
<th align=\"center\">Aktiv</th>
<th class=\"nosort sortcol\" align=\"center\" width=\"18%\">Aktionen</th>
</tr>";
if(!empty($articles)){
foreach($articles as $u){
$panel->content.="<tr>
<td align=\"center\">".$u["id"]."</td>
<td align=\"center\">".$u["name"]."</td>
<td align=\"center\">".$u["picture"]."</td>";
if($u["active"]=="true"){
$panel->content.="<td align=\"center\">Ja</td>";
}else{
$panel->content.="<td align=\"center\">Nein</td>";
}
$panel->content.="<td align=\"center\"><a onclick=\"return confirmLink(this, 'Willst du wirklich die Kategorie ".$u["categoryname"]." l&ouml;schen? ')\" href=\"".$config["path"]."/admin/index.php?panel=editcategory_news&amp;action=delete&amp;id=".$u["id"]."\"><img src=\"".$config["path"]."/admin/images/icons/delete.png\" /></a> <a href=\"".$config["path"]."/admin/index.php?panel=editcategory_news&amp;action=edit&amp;id=".$u["id"]."\"><img src=\"".$config["path"]."/admin/images/icons/wrench.png\" /></a></td>
</tr>";
}
}else{
$panel->content.="<tr>
<td align=\"center\" colspan=\"5\">Keine Kategorien vorhanden.</td>
</tr>";
}
$panel->content.="</table><br />";
}
}
function meta(){
$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>';
$meta.='<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;
}
}
?>

View file

@ -1,5 +1,6 @@
<?php
If (!defined("in_astat")) {
global $session;
If (!defined("INBCWE")) {
die("Dieses Script kann nicht ausserhalb des Frameworks laufen!");
}
$session->page_begin("PM Module", FALSE);

View file

@ -3,7 +3,7 @@
class module_ajaxpm extends admin_module{
function admin_panels(){
return "";
return array();
}
function get_info(){
@ -12,6 +12,7 @@ class module_ajaxpm extends admin_module{
$info["author"]="BeCast";
$info["version"]="1.0.1";
$info["url"]="http://www.becast.at";
$info["depends"]='mybb_bridge';
return $info;
}

View file

@ -1,5 +1,5 @@
<?php
If (!defined("in_astat")) {
If (!defined("INBCWE")) {
die("Dieses Script kann nicht ausserhalb des Frameworks laufen!");
}
class plugins_ajaxpm{

View file

@ -1,7 +1,7 @@
<?php
<?php global $session;
/**
* Project: astat - simple site engine
* File: /modules/mybb/admin.apnl.php
* Project: BeCast WebEngine - simple site engine
* File: /modules/chat/manage.apnl.php
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@ -17,14 +17,14 @@
* 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 2010 becast.at
* @link http://www.becast.at
* @copyright 2010-2025 becast.at
* @author Bernhard Jaud <bernhard at becast dot at>
* @package astat module
* @package BcWe module
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
* @version $Id$
*/
If (!defined("in_BL_ADMIN")) {
*/
If (!defined("IN_BCWE_ADMIN")) {
die("Dieses Script kann nicht ausserhalb des Frameworks laufen!");
}
$session->page_begin("chat_admin", True);

View file

@ -1,9 +1,10 @@
<?php
If (!defined("in_astat")) {
global $session;
If (!defined("INBCWE")) {
die("Dieses Script kann nicht ausserhalb des Frameworks laufen!");
}
$addnav["right"]=FALSE;
$session->page_begin("Text Module", FALSE);
$session->page_begin("Chat Module", FALSE);
class chat extends ajax_module{

View file

@ -39,7 +39,7 @@ class module_chat extends admin_module{
$cid=$db->last_id();
$db->query("INSERT INTO `" . $config["prefix"] . "config` (`name`, `value`, `title`, `description`, `option`, `category`) VALUES
('LOGINKEY', 'zuzfshgw8qitr813841492', 'Loginkey', 'Der Secure Key des Chats.', 'text', ".$cid."),
('SOCK_PORT', '8090', 'Chatport', 'Der Port auf dem der Server läuft.', 'text', ".$cid."),
('SOCK_PORT', '8090', 'Chatport', 'Der Port auf dem der Server l<EFBFBD>uft.', 'text', ".$cid."),
('ENABLE_WATCHSERVER', '', 'Watchserver einschalten', 'Soll der Watchserver aktiviert werden?.', 'select(Ja|true;Nein|false)', ".$cid."),
('SMILIES_URL', 'http://forum.recensio.org/', 'Smilieurl', 'Die Url zu den Smiliebildern', 'text', ".$cid.");");
@ -87,6 +87,4 @@ class module_chat extends admin_module{
return TRUE;
}
}
?>
}

View file

@ -1,5 +1,6 @@
<?php
If (!defined("in_astat")) {
global $session;
If (!defined("INBCWE")) {
die("Dieses Script kann nicht ausserhalb des Frameworks laufen!");
}

View file

@ -1,5 +1,5 @@
<?php
If (!defined("in_astat")) {
If (!defined("INBCWE")) {
die("Dieses Script kann nicht ausserhalb des Frameworks laufen!");
}
include dirname(__FILE__).'/chatfunctions.inc.php';

View file

@ -1,5 +1,5 @@
<?php
If (!defined("in_astat")) {
If (!defined("INBCWE")) {
die("Dieses Script kann nicht ausserhalb des Frameworks laufen!");
}
@ -40,12 +40,12 @@ function get_user_list() {
curl_setopt($ch, CURLOPT_HEADER, false);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_TIMEOUT, 30);
// führe die Aktion aus und gebe die Daten an den Browser weiter
// f<EFBFBD>hre die Aktion aus und gebe die Daten an den Browser weiter
$fh=curl_exec($ch);
$httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
//var_dump(curl_getinfo($ch));
// schließe den cURL-Handle und gebe die Systemresourcen frei
// schlie<EFBFBD>e den cURL-Handle und gebe die Systemresourcen frei
curl_close($ch);
if($httpCode >= 200 && $httpCode < 300){
@ -87,7 +87,7 @@ function get_user_room($username) {
curl_setopt($ch, CURLOPT_HEADER, false);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_TIMEOUT, 30);
// führe die Aktion aus und gebe die Daten an den Browser weiter
// f<EFBFBD>hre die Aktion aus und gebe die Daten an den Browser weiter
$fh=curl_exec($ch);
$httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);

View file

@ -1,5 +1,5 @@
<?php
If (!defined("in_astat")) {
If (!defined("INBCWE")) {
die("Dieses Script kann nicht ausserhalb des Frameworks laufen!");
}
$session->page_begin("Chatusers Module", FALSE);

View file

@ -9,9 +9,9 @@ class module_chatusers extends admin_module{
function get_info(){
$info["name"]="Chatusers AJAX";
$info["file"]="chatusers";
$info["author"]="genuineparts";
$info["author"]="BeCast";
$info["version"]="1.0.0";
$info["url"]="http://www.ponytopia.net";
$info["url"]="http://www.becast.at";
$info["depends"]='chat';
return $info;
}

View file

@ -1,5 +1,5 @@
<?php
If (!defined("in_astat")) {
If (!defined("INBCWE")) {
die("Dieses Script kann nicht ausserhalb des Frameworks laufen!");
}
class plugins_chatusers{

View file

@ -3,22 +3,21 @@
class module_contact extends admin_module{
function admin_panels(){
#$panels=array(array("add_text","Text hinzuf&uuml;gen","page_add"),array("edit_text","Text editieren","page_edit"),array("group_only","Textkategorien"),array("addcategory_text","Kategorie hinzuf&uuml;gen","tag_blue_add"),array("editcategory_text","Kategorie editieren","tag_blue_edit"));
return $panels;
return array();
}
function get_info(){
$info["name"]="Kontaktformular";
$info["file"]="contact";
$info["author"]="astat";
$info["version"]="1.0.0";
$info["url"]="http://www.astat.org";
$info["author"]="BeCast";
$info["version"]="1.0.1";
$info["url"]="http://www.becast.at";
return $info;
}
function install(){
global $config, $db;
$db->query("INSERT INTO `" . $config["prefix"] . "config_categorys` (
$db->query("INSERT INTO `" . $config["prefix"] . "config_categories` (
`cid` ,
`categoryname`
)

View file

@ -24,7 +24,7 @@
* @version $Id$
*/
If (!defined("in_astat")) {
If (!defined("INBCWE")) {
die("Dieses Script kann nicht ausserhalb des Frameworks laufen!");
}
$session->page_begin("Contactform", FALSE);

View file

@ -24,7 +24,7 @@
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
* @version $Id$
*/
If (!defined("in_astat")) {
If (!defined("INBCWE")) {
die("Dieses Script kann nicht ausserhalb des Frameworks laufen!");
}
class plugins_mybb {

View file

@ -7,7 +7,7 @@ class module_mybbnews extends admin_module{
$info["file"]="mybbnews";
$info["author"]="genuineparts";
$info["version"]="1.0.2";
$info["url"]="http://www.becast.ar";
$info["url"]="http://www.becast.at";
return $info;
}

View file

@ -1,5 +1,5 @@
<?php
If (!defined("in_astat")) {
If (!defined("INBCWE")) {
die("Dieses Script kann nicht ausserhalb des Frameworks laufen!");
}

View file

@ -1,7 +1,7 @@
<?php
/**
* Project: astat - simple site engine
* File: /modules/news/add.apnl.php
* Project: BeCast WebEngine - simple site engine
* File: /modules/news/add.apnl.php
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@ -17,14 +17,14 @@
* 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: file:///var/local/svn/astat/trunk/modules/news/admin/add.apnl.php $
* @copyright 2009 becast.at
* @link http://www.becast.at
* @copyright 2009 - 2025 becast.at
* @author Bernhard Jaud <bernhard at becast dot at>
* @package astat core
* @package BcWe core
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
* @version $Id: add.apnl.php 96 2010-02-17 21:56:41Z genuineparts $
*/
If (!defined("in_BL_ADMIN")) {
* @version $Id$
*/
If (!defined("IN_BCWE_ADMIN")) {
die("Dieses Script kann nicht ausserhalb des Frameworks laufen!");
}
$session->page_begin("add News", True);

View file

@ -25,7 +25,7 @@
* @version $Id: addcategory.apnl.php 96 2010-02-17 21:56:41Z genuineparts $
*/
If (!defined("in_BL_ADMIN")) {
If (!defined("IN_BCWE_ADMIN")) {
die("Dieses Script kann nicht ausserhalb des Frameworks laufen!");
}
$session->page_begin("add news Category", True);

View file

@ -24,7 +24,7 @@
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
* @version $Id: edit.apnl.php 96 2010-02-17 21:56:41Z genuineparts $
*/
If (!defined('in_BL_ADMIN')) {
If (!defined('IN_BCWE_ADMIN')) {
die('Dieses Script kann nicht ausserhalb des Frameworks laufen!');
}
$session->page_begin('edit News', True);

View file

@ -25,7 +25,7 @@
* @version $Id: editcategory.apnl.php 96 2010-02-17 21:56:41Z genuineparts $
*/
If (!defined("in_BL_ADMIN")) {
If (!defined("IN_BCWE_ADMIN")) {
die("Dieses Script kann nicht ausserhalb des Frameworks laufen!");
}
$session->page_begin("edit news category", True);

View file

@ -10,9 +10,9 @@ class module_news extends admin_module{
function get_info(){
$info["name"]="Newsmodul";
$info["file"]="news";
$info["author"]="astat";
$info["version"]="1.0.0";
$info["url"]="http://www.astat.org";
$info["author"]="BeCast";
$info["version"]="1.0.1";
$info["url"]="http://www.becast.at";
return $info;
}

View file

@ -1,5 +1,5 @@
<?php
If (!defined("in_astat")) {
If (!defined("INBCWE")) {
die("Dieses Script kann nicht ausserhalb des Frameworks laufen!");
}
class plugins_mybbnews{

View file

@ -10,9 +10,9 @@ class module_nickpage extends admin_module{
function get_info(){
$info["name"]="Nickpages";
$info["file"]="nickpage";
$info["author"]="astat";
$info["version"]="1.0.0";
$info["url"]="http://www.astat.org";
$info["author"]="BeCast";
$info["version"]="1.0.1";
$info["url"]="http://www.becast.at";
return $info;
}

View file

@ -1,4 +1,4 @@
<?php
<?php global $session;
/**
* Project: BeCast WebEngine - simple site engine
* File: /modules/nickpage/nickpage.output.php
@ -24,7 +24,7 @@
* @version $Id$
*/
If (!defined("in_astat")) {
If (!defined("INBCWE")) {
die("Dieses Script kann nicht ausserhalb des Frameworks laufen!");
}
$session->page_begin("Nickpage", FALSE);
@ -232,7 +232,7 @@ class nickpage extends module{
$filedir = $root.'/np_images/';
$size = 200;
if(($userfile_size/1024)>250){
$err='<span style="font-color:red;">Das Bild darf nicht grösser als 250kb sein.</span>';
$err='<span style="font-color:red;">Das Bild darf nicht gr<EFBFBD>sser als 250kb sein.</span>';
}
if (isset($_FILES['np_picture']['name']) && $_FILES['np_picture']['name']!="" && !$err){
$prod_img = $filedir.$userfile_name;

View file

@ -24,7 +24,7 @@
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
* @version $Id$
*/
If (!defined("in_astat")) {
If (!defined("INBCWE")) {
die("Dieses Script kann nicht ausserhalb des Frameworks laufen!");
}
class plugins_nickpage{

View file

@ -1,29 +0,0 @@
<?php
If (!defined("in_astat")) {
die("Dieses Script kann nicht ausserhalb des Frameworks laufen!");
}
$addnav["right"]=FALSE;
$session->page_begin("Text Module", FALSE);
$topnav_home="<li><a href=\"/index.php\">Home</a></li>";
class text extends ajax_module{
function ajax(){
global $module,$config,$db,$tpl,$log,$error;
if($_POST['call']=="url"){
if(isset($_POST['url'])&& $_POST['url']!=""){
$url=$db->escape($_POST['url']);
$result = $db->query("SELECT count(`id`) as `count` FROM `" . $config["prefix"] . "article` WHERE `url`='".$url."'");
$row = $db->fetch_array($result, MYSQL_ASSOC);
if($row["count"]==0){
echo 0;
}else{
echo 1;
}
}
}
}
}
?>

View file

@ -3,16 +3,15 @@
class module_search extends admin_module{
function admin_panels(){
//$panels=array(array("add_text","Text hinzuf&uuml;gen","page_add"),array("edit_text","Text editieren","page_edit"),array("group_only","Textkategorien"),array("addcategory_text","Kategorie hinzuf&uuml;gen","tag_blue_add"),array("editcategory_text","Kategorie editieren","tag_blue_edit"));
return $panels;
return array();
}
function get_info(){
$info["name"]="Review Search";
$info["file"]="search";
$info["author"]="astat";
$info["version"]="1.0.0";
$info["url"]="http://www.astat.org";
$info["author"]="BeCast";
$info["version"]="1.0.1";
$info["url"]="http://www.becast.at";
$info["depends"]='reviews';
return $info;
}

View file

@ -1,5 +1,6 @@
<?php
If (!defined("in_astat")) {
global $session;
If (!defined("INBCWE")) {
die("Dieses Script kann nicht ausserhalb des Frameworks laufen!");
}

View file

@ -1,5 +1,5 @@
<?php
If (!defined("in_BL")) {
If (!defined("INBCWE")) {
die("Dieses Script kann nicht ausserhalb des Frameworks laufen!");
}
page_begin("Search", False);

View file

@ -24,7 +24,7 @@
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
* @version $Id$
*/
If (!defined("in_BL_ADMIN")) {
If (!defined("IN_BCWE_ADMIN")) {
die("Dieses Script kann nicht ausserhalb des Frameworks laufen!");
}
$session->page_begin("add Text", True);
@ -81,7 +81,7 @@ class add_text_panel extends admin_module{
$panel->content.="<h3>Kategorien:</h3>
<table width=\"100%\">
<tr>";
$resultk=$db->query("SELECT `id`,`categoryname` FROM `" . $config["prefix"] . "article_categorys` WHERE `active`='true'") or die($db->error());
$resultk=$db->query("SELECT `id`,`categoryname` FROM `" . $config["prefix"] . "article_categories` WHERE `active`='true'") or die($db->error());
while($row=$db->fetch_array($resultk)){
$navs[]=$row;
}

View file

@ -25,7 +25,7 @@
* @version $Id$
*/
If (!defined("in_BL_ADMIN")) {
If (!defined("IN_BCWE_ADMIN")) {
die("Dieses Script kann nicht ausserhalb des Frameworks laufen!");
}
$session->page_begin("add Category", True);
@ -52,7 +52,7 @@ class addcategory_text_panel extends admin_module{
}
$categoryname=$db->escape($_POST['categoryname']);
$active=$db->escape($_POST['active']);
$db->query("INSERT INTO `" . $config["prefix"]. "article_categorys` (`categoryname`,`picture`,`active`) VALUES ('".$categoryname."','".$userfile_name."','".$active."')") or die ($db->error());
$db->query("INSERT INTO `" . $config["prefix"]. "article_categories` (`categoryname`,`picture`,`active`) VALUES ('".$categoryname."','".$userfile_name."','".$active."')") or die ($db->error());
$panel->admin_message("Danke", "Die Kategorie wurde erfolgreich eingetragen!.",TRUE,"addcategory_text");
}else{
$fail="<span style=\"text-align: center; color: red;\">Der Kategoriename muss angegeben werden!</span>";

View file

@ -1,4 +1,4 @@
<?php
<?php global $session;
/**
* Project: astat - simple site engine
* File: /modules/text/edit.apnl.php
@ -24,7 +24,7 @@
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
* @version $Id$
*/
If (!defined("in_BL_ADMIN")) {
If (!defined("IN_BCWE_ADMIN")) {
die("Dieses Script kann nicht ausserhalb des Frameworks laufen!");
}
$session->page_begin("edit Text", True);
@ -91,7 +91,7 @@ class edit_text_panel extends admin_module{
while($rowa=$db->fetch_array($resultn)){
$cat[$rowa["c_id"]]=TRUE;
}
$resultk=$db->query("SELECT `id`,`categoryname` FROM `" . $config["prefix"] . "article_categorys` WHERE `active`='true'");
$resultk=$db->query("SELECT `id`,`categoryname` FROM `" . $config["prefix"] . "article_categories` WHERE `active`='true'");
while($row=$db->fetch_array($resultk)){
if($cat[$row["id"]]==TRUE){
$row["checked"]="checked=\"checked\"";
@ -132,7 +132,7 @@ class edit_text_panel extends admin_module{
}else{
$result = $db->query("SELECT a.title,a.id,a.active,a.date,a.url,u.username FROM `" . $config["prefix"] . "article` a LEFT JOIN `" . $config["prefix"] . "users` u on a.`author`=u.`uid`");
while($row=$db->fetch_array($result, $db->ASSOC)){
$cresult=$db->query("SELECT a.`categoryname` FROM `" . $config["prefix"] . "article_categorys` a LEFT JOIN `" . $config["prefix"] . "article_category` c on a.`id`=c.`c_id` WHERE c.`a_id`='".$row["id"]."'");
$cresult=$db->query("SELECT a.`categoryname` FROM `" . $config["prefix"] . "article_categories` a LEFT JOIN `" . $config["prefix"] . "article_category` c on a.`id`=c.`c_id` WHERE c.`a_id`='".$row["id"]."'");
while($crow=$db->fetch_array($cresult, $db->ASSOC)){
if(!$row["categoryname"]){
$row["categoryname"]=$crow["categoryname"];

View file

@ -1,4 +1,4 @@
<?php
<?php global $session;
/**
* Project: BeCast WebEngine - simple site engine
* File: /modules/text/editcategory.apnl.php
@ -25,7 +25,7 @@
* @version $Id$
*/
If (!defined("in_BL_ADMIN")) {
If (!defined("IN_BCWE_ADMIN")) {
die("Dieses Script kann nicht ausserhalb des Frameworks laufen!");
}
$session->page_begin("edit category", True);
@ -50,12 +50,12 @@ class editcategory_text_panel extends admin_module{
if($ret!==TRUE){
$panel->admin_message("Fehler", "Das Bild konnte nicht hochgeladen wrden <br /> Der Fehler war: ". $ret,TRUE,"editcategory_text");
}
$result=$db->query("SELECT `picture` FROM `" . $config["prefix"]. "article_categorys` WHERE `id`='".intval($_POST["id"])."' LIMIT 1");
$result=$db->query("SELECT `picture` FROM `" . $config["prefix"]. "article_categories` WHERE `id`='".intval($_POST["id"])."' LIMIT 1");
$file=$db->fetch_array($result);
@unlink($filedir.$file['picture']);
$db->query("UPDATE `" . $config["prefix"]. "article_categorys` SET `picture`='".$userfile_name."' WHERE `id`='".intval($_POST["id"])."'");
}elseif($_POST["delimg"]==1){
$result=$db->query("SELECT `picture` FROM `" . $config["prefix"]. "article_categorys` WHERE `id`='".intval($_POST["id"])."' LIMIT 1");
$result=$db->query("SELECT `picture` FROM `" . $config["prefix"]. "article_categories` WHERE `id`='".intval($_POST["id"])."' LIMIT 1");
$file=$db->fetch_array($result);
@unlink($filedir.$file['picture']);
$db->query("UPDATE `" . $config["prefix"]. "article_categorys` SET `picture`='' WHERE `id`='".intval($_POST["id"])."'") or die($db->error());
@ -71,7 +71,7 @@ class editcategory_text_panel extends admin_module{
}elseif(isset($_GET['id'])&& $_GET['id']!=""){
if($_GET['action']=="edit"){
$result = $db->query("SELECT * FROM `" . $config["prefix"] . "article_categorys` WHERE `id`='".intval($_GET['id'])."'");
$result = $db->query("SELECT * FROM `" . $config["prefix"] . "article_categories` WHERE `id`='".intval($_GET['id'])."'");
$_POST=$db->fetch_array($result);
/*$resultna=$db->query("SELECT id,name FROM " . $config["prefix"] . "menue");
while($rowa=$db->fetch_array($resultna)){
@ -112,15 +112,15 @@ class editcategory_text_panel extends admin_module{
$panel->parse_page();
}elseif($_GET["action"]=="delete" && $_GET["id"]){
$result=$db->query("SELECT `picture` FROM `" . $config["prefix"] . "article_categorys` where `id`='".intval($_GET["id"])."'");
$result=$db->query("SELECT `picture` FROM `" . $config["prefix"] . "article_categories` where `id`='".intval($_GET["id"])."'");
$row = $db->fetch_array($result);
@unlink($root.'/catimages/'.$row["picture"]);
$db->query("DELETE FROM `" . $config["prefix"] . "article_categorys` WHERE `id`='".intval($_GET["id"])."'");
$db->query("DELETE FROM `" . $config["prefix"] . "article_categories` WHERE `id`='".intval($_GET["id"])."'");
$panel->admin_message("Kategorie gel&ouml;scht!","Die Kategorie wurde erfolgreich gel&ouml;scht.",True,"editcategory_text",3);
}
}else{
$result = $db->query("SELECT * FROM `" . $config["prefix"] . "article_categorys`");
$result = $db->query("SELECT * FROM `" . $config["prefix"] . "article_categories`");
while($row=$db->fetch_array($result, $db->ASSOC)){
$articles[]=$row;
}

View file

@ -1,5 +1,5 @@
<?php
If (!defined("in_astat")) {
If (!defined("INBCWE")) {
die("Dieses Script kann nicht ausserhalb des Frameworks laufen!");
}
$addnav["right"]=FALSE;

View file

@ -10,9 +10,9 @@ class module_text extends admin_module{
function get_info(){
$info["name"]="Textverwaltung";
$info["file"]="text";
$info["author"]="astat";
$info["author"]="BeCast";
$info["version"]="1.0.1";
$info["url"]="http://www.astat.org";
$info["url"]="http://www.becast.at";
return $info;
}
@ -36,7 +36,7 @@ class module_text extends admin_module{
KEY `eid` (`eid`)
) ENGINE=MyISAM");
$db->query("CREATE TABLE IF NOT EXISTS `" . $config["prefix"] . "article_categorys` (
$db->query("CREATE TABLE IF NOT EXISTS `" . $config["prefix"] . "article_categories` (
`id` int(11) NOT NULL auto_increment,
`categoryname` varchar(80) NOT NULL default '',
`picture` varchar(80) NOT NULL default '',
@ -68,7 +68,7 @@ class module_text extends admin_module{
function uninstall(){
global $config, $db;
$db->query("DROP TABLE `" . $config["prefix"] . "article`");
$db->query("DROP TABLE `" . $config["prefix"] . "article_categorys`");
$db->query("DROP TABLE `" . $config["prefix"] . "article_categories`");
$db->query("DROP TABLE `" . $config["prefix"] . "article_category`");
$db->query("DROP TABLE `" . $config["prefix"] . "article_menue`");
@$this->recursive($_SERVER["DOCUMENT_ROOT"]."/catimages");

View file

@ -1,7 +1,7 @@
<?php
/**
* Project: astat - simple site engine
* File: /modules/text/text.output.php
* Project: BeCast WebEngine - simple site engine
* File: /modules/text/text.output.php
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -16,15 +16,15 @@
* 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$
*/
* @link http://www.becast.at
* @copyright 2010-2025 becast.at
* @author Bernhard Jaud <bernhard at becast dot at>
* @package BcWe core
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
* @version $Id$
*/
If (!defined("in_astat")) {
If (!defined("INBCWE")) {
die("Dieses Script kann nicht ausserhalb des Frameworks laufen!");
}