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

8
.idea/.gitignore generated vendored Normal file
View file

@ -0,0 +1,8 @@
# Default ignored files
/shelf/
/workspace.xml
# Editor-based HTTP Client requests
/httpRequests/
# Datasource local storage ignored files
/dataSources/
/dataSources.local.xml

10
.idea/funchat.iml generated Normal file
View file

@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="WEB_MODULE" version="4">
<component name="NewModuleRootManager">
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/core/template/src" isTestSource="false" packagePrefix="Smarty" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>

8
.idea/modules.xml generated Normal file
View file

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/.idea/funchat.iml" filepath="$PROJECT_DIR$/.idea/funchat.iml" />
</modules>
</component>
</project>

22
.idea/php.xml generated Normal file
View file

@ -0,0 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="MessDetectorOptionsConfiguration">
<option name="transferred" value="true" />
</component>
<component name="PHPCSFixerOptionsConfiguration">
<option name="transferred" value="true" />
</component>
<component name="PHPCodeSnifferOptionsConfiguration">
<option name="highlightLevel" value="WARNING" />
<option name="transferred" value="true" />
</component>
<component name="PhpProjectSharedConfiguration" php_language_level="8.2">
<option name="suggestChangeDefaultLanguageLevel" value="false" />
</component>
<component name="PhpStanOptionsConfiguration">
<option name="transferred" value="true" />
</component>
<component name="PsalmOptionsConfiguration">
<option name="transferred" value="true" />
</component>
</project>

6
.idea/vcs.xml generated Normal file
View file

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="" vcs="Git" />
</component>
</project>

View file

@ -1,6 +1,6 @@
<?php
/**
* Project: astat - simple site engine
* Project: BeCast WebEngine - simple site engine
* File: /admin/addgroup.apnl.php
*
* This library is free software; you can redistribute it and/or
@ -17,14 +17,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: http://svn.astat.org/astat/trunk/admin/addgroup.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: addgroup.apnl.php 41 2009-06-21 19:24:29Z genuineparts $
* @version $Id$
*/
If (!defined("in_BL_ADMIN")) {
If (!defined("IN_BCWE_ADMIN")) {
die("Dieses Script kann nicht ausserhalb des Frameworks laufen!");
}
$addnav["right"]=FALSE;

View file

@ -1,4 +1,4 @@
<?php
<?php global $session;
/**
* Project: BeCast WebEngine - simple site engine
* File: /admin/addusers.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!");
}
$addnav["right"]=FALSE;
@ -51,35 +51,34 @@ class adduser_panel extends admin_module{
}
}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->field(array("name"=>"name","typ"=>"text","value"=>""));
$panel->content.="<h3>".$lang->_('REALNAME').":</h3>";
$panel->field(array("name"=>"realname","typ"=>"text","value"=>$data["realname"]));
$panel->field(array("name"=>"realname","typ"=>"text","value"=>""));
$panel->content.="<h3>".$lang->_('MAIL').":</h3>";
$panel->field(array("name"=>"email","value"=>$data["email"],"typ"=>"text"));
$panel->field(array("name"=>"email","value"=>"","typ"=>"text"));
$panel->content.="<h3>".$lang->_('PASSWORD').":</h3>";
$panel->field(array("name"=>"password","value"=>$data["password"],"typ"=>"password"));
$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->field(array("name"=>"from","value"=>"","typ"=>"text"));
$panel->content.="<h3>".$lang->_('GENDER').":</h3>";
$panel->select(array($lang->_('DIV')=>"u", $lang->_('FEMALE')=>"f",$lang->_('MALE')=>"m"),$data["gender"],"gender");
$panel->select(array($lang->_('DIV')=>"u", $lang->_('FEMALE')=>"f",$lang->_('MALE')=>"m"),"","gender");
$panel->content.="<h3>".$lang->_('HOMEPAGE').":</h3>";
$panel->field(array("name"=>"homepage","value"=>$data["homepage"],"typ"=>"text"));
$panel->field(array("name"=>"homepage","value"=>"","typ"=>"text"));
$panel->content.="<h3>".$lang->_('BANREASON').":</h3>";
$panel->textarea(array("name"=>"bio","value"=>$data["bio"],"typ"=>"text"));
$panel->textarea(array("name"=>"bio","value"=>"","typ"=>"text"));
$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->select($dd,"","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->select(array($lang->_('ACTIVE')=>1,$lang->_('INACTIVE')=>0,$lang->_('BANNED')=>2),"","active");
$panel->field(array("name"=>"send","typ"=>"hidden","value"=>"1"));
$panel->content.="<br />";
$panel->content.="<br />";

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!");
}
$addnav["right"]=FALSE;

View file

@ -1,5 +1,30 @@
<?php
If (!defined("in_BL_ADMIN")) {
/**
* Project: BeCast WebEngine - simple site engine
* File: /admin/config.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.becast.at
* @copyright 2009-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_BCWE_ADMIN")) {
die("Dieses Script kann nicht ausserhalb des Frameworks laufen!");
}
$addnav["right"]=FALSE;
@ -24,7 +49,7 @@ class config_panel extends admin_module{
$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`");
$result = $db->query("SELECT * FROM `" . $config["prefix"] . "config` v LEFT JOIN `" . $config["prefix"] . "config_categories` c ON v.`category`=c.`cid`");
while ($row = $db->fetch_array($result)){
$data[$row["categoryname"]][]=$row;
}

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!");
}
$addnav["right"]=FALSE;

View file

@ -1,4 +1,4 @@
<?php
<?php global $session;
/**
* Project: BeCast WebEngine - simple site engine
* File: /admin/editusers.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!");
}
$addnav["right"]=FALSE;
@ -90,7 +90,7 @@ class editusers_panel extends admin_module{
$panel->formClose();
$panel->parse_page();
}
}elseif($_GET["action"]=="delete" && $_GET["user"]){
}elseif(isset($_GET["action"]) && $_GET["action"]=="delete" && isset($_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));
@ -111,12 +111,12 @@ class editusers_panel extends admin_module{
$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>
<th style=\"text-align='center';\">".$lang->_('ID')."</th>
<th style=\"text-align='center';\">".$lang->_('USERNAME')."</th>
<th style=\"text-align='center';\">".$lang->_('REALNAME')."</th>
<th style=\"text-align='center';\">".$lang->_('ROLE')."</th>
<th style=\"text-align='center';\">".$lang->_('STATUS')."</th>
<th style=\"text-align='center';\">".$lang->_('ACTION')."</th>
</tr></thead><tbody>";
if(!empty($user)){
foreach($user as $u){
@ -131,22 +131,22 @@ class editusers_panel extends admin_module{
$u['activestyle']='style="font-style:italic;"';
}
$panel->content.="<tr ".$u['activestyle'].">
<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>";
<td style=\"text-align='center';\">".$u["uid"]."</td>
<td style=\"text-align='center';\">".$u["username"]."</td>
<td style=\"text-align='center';\">".$u["realname"]."</td>
<td style=\"text-align='center';\">".$u["role_name"]."</td>
<td style=\"text-align='center';\">".$u['activetext']."</td>";
if($u["uid"]==$session->userdata["uid"]){
$panel->content.="<td align=\"center\"><a onclick=\"return confirmLink(this,'".$lang->_('BADIDEA')."')\" 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>
$panel->content.="<td style=\"text-align='center';\"><a onclick=\"return confirmLink(this,'".$lang->_('BADIDEA')."')\" 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, '".sprintf($lang->_('DELETEUSER'),$u["username"])."')\" 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>
$panel->content.="<td style=\"text-align='center';\"><a onclick=\"return confirmLink(this, '".sprintf($lang->_('DELETEUSER'),$u["username"])."')\" 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\">".$lang->_('NOUSERS')."</td>
<td style=\"text-align='center';\" colspan=\"5\">".$lang->_('NOUSERS')."</td>
</tr>";
}
$panel->content.="</tbody></table><br />";

View file

@ -1,6 +1,6 @@
<?php
<?php global $lang, $session, $db, $error;
/**
* Project: BeCast Webengine - simple site engine
* Project: BeCast WebEngine - simple site engine
* File: /admin/index.php
*
* This library is free software; you can redistribute it and/or
@ -18,18 +18,18 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* @link http://www.BeCast.at
* @copyright 2009 becast.at
* @copyright 2009-2025 becast.at
* @author Bernhard Jaud <bernhard at becast dot at>
* @package BeCast Webengine core
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
* @version $Id: index.php 100 2010-02-20 14:42:30Z genuineparts $
* @version $Id$
*/
ERROR_REPORTING(E_ALL ^E_NOTICE);
$basepath="";
$nav_include="../";
require_once dirname(dirname(__FILE__)).'/core/init_core.inc.php';
require_once dirname(__FILE__, 2) .'/core/init_core.inc.php';
$session->page_begin("Admincenter", True);
define("in_BL_ADMIN",TRUE);
define("IN_BCWE_ADMIN",TRUE);
function size_format($num, $prec = 2)
{
@ -41,7 +41,6 @@ function size_format($num, $prec = 2)
return $num . ' bytes';
}
}
if(isset($session->userdata['uid']) && $session->userdata['uid']!=0 && ($session->userdata["admin_cp"] && $session->userdata["is_admin"])){
require_once dirname(dirname(__FILE__)).'/inc/admin.class.php';
require_once dirname(dirname(__FILE__)).'/inc/panel.class.php';

View file

@ -1,6 +1,6 @@
<?php
<?php global $session;
/**
* Project: astat - simple site engine
* Project: BeCast WebEngine - simple site engine
* File: /admin/module.apnl.php
*
* This program is free software; you can redistribute it and/or
@ -17,15 +17,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: http://svn.astat.org/astat/trunk/admin/module.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: module.apnl.php 64 2009-07-24 22:07:55Z genuineparts $
* @version $Id$
*/
If (!defined("in_BL_ADMIN")) {
If (!defined("IN_BCWE_ADMIN")) {
die("Dieses Script kann nicht ausserhalb des Frameworks laufen!");
}
@ -67,17 +67,16 @@ class module_panel extends admin_module{
$panel->content.="<h2>Installierte Module</h2><br />
<table width=\"90%\" cellspacing=\"2\">
<tr>
<th align=\"center\">Modul</th>
<th align=\"center\">Version</th>
<th align=\"center\">Autor</th>
<th align=\"center\">Homepage</th>
<th align=\"center\">Aktion</th>
<th style=\"text-align='center';\">Modul</th>
<th style=\"text-align='center';\">Version</th>
<th style=\"text-align='center';\">Autor</th>
<th style=\"text-align='center';\">Homepage</th>
<th style=\"text-align='center';\">Aktion</th>
</tr>";
if(!empty($core->mod_)){
foreach($core->mod_ as $mod){
If($mod["depends"]!=""){
$depends="";
if(isset($mod["depends"]) && $mod["depends"]!=""){
$dependands=unserialize($mod["depends"]);
foreach($dependands as $dep){
if(!$deps){
@ -89,11 +88,11 @@ class module_panel extends admin_module{
$depends.='<br /><span style="font-size: xx-small;">h&auml;ngt ab von: '.$deps;
}
$panel->content.="<tr>
<td align=\"center\">".$mod["name"].$depends."</td>
<td align=\"center\">".$mod["version"]."</td>
<td align=\"center\">".$mod["author"]."</td>
<td align=\"center\"><a href=\"".$mod["url"]."\">".$mod["url"]."</a></td>
<td align=\"center\"><a onclick=\"return confirmLink(this, 'Willst du wirklich das Modul ".$mod["name"]." deinstallieren? Alle Daten diese Plugins werden gel&ouml;scht!')\" href=\"".$config["path"]."/admin/index.php?panel=module&amp;action=uninstall&amp;module=".$mod["file"]."\">Deinstallieren</a></td>
<td style=\"text-align='center';\">".$mod["name"].$depends."</td>
<td style=\"text-align='center';\">".$mod["version"]."</td>
<td style=\"text-align='center';\">".$mod["author"]."</td>
<td style=\"text-align='center';\"><a href=\"".$mod["url"]."\">".$mod["url"]."</a></td>
<td style=\"text-align='center';\"><a onclick=\"return confirmLink(this, 'Willst du wirklich das Modul ".$mod["name"]." deinstallieren? Alle Daten diese Plugins werden gel&ouml;scht!')\" href=\"".$config["path"]."/admin/index.php?panel=module&amp;action=uninstall&amp;module=".$mod["file"]."\">Deinstallieren</a></td>
</tr>";
unset($deps);
unset($depends);
@ -109,19 +108,18 @@ class module_panel extends admin_module{
$panel->content.="<h2>Nicht Installierte Module</h2><br />";
$panel->content.="<table width=\"90%\" cellspacing=\"2\">
<tr>
<th align=\"center\">Modul</th>
<th align=\"center\">Version</th>
<th align=\"center\">Autor</th>
<th align=\"center\">Homepage</th>
<th align=\"center\">Aktion</th>
<th style=\"text-align='center';\">Modul</th>
<th style=\"text-align='center';\">Version</th>
<th style=\"text-align='center';\">Autor</th>
<th style=\"text-align='center';\">Homepage</th>
<th style=\"text-align='center';\">Aktion</th>
</tr>";
$modules=$this->avaiable_modules();
if(is_array($modules)){
foreach($modules as $mod){
If($mod["depends"]!=""){
$depends="";
if(isset($mod["depends"]) && $mod["depends"]!=""){
$dependands=explode(",",$mod["depends"]);
foreach($dependands as $dep){
if(!$deps){
@ -133,11 +131,11 @@ class module_panel extends admin_module{
$depends.='<br /><span style="font-size: xx-small;">h&auml;ngt ab von: '.$deps;
}
$panel->content.="<tr>
<td align=\"center\">".$mod["name"].$depends."</td>
<td align=\"center\">".$mod["version"]."</td>
<td align=\"center\">".$mod["author"]."</td>
<td align=\"center\"><a href=\"".$mod["url"]."\">".$mod["url"]."</a></td>
<td align=\"center\"><a href=\"".$config["path"]."/admin/index.php?panel=module&amp;action=install&amp;module=".$mod["file"]."\">Installieren</a></td>
<td style=\"text-align='center';\">".$mod["name"].$depends."</td>
<td style=\"text-align='center';\">".$mod["version"]."</td>
<td style=\"text-align='center';\">".$mod["author"]."</td>
<td style=\"text-align='center';\"><a href=\"".$mod["url"]."\">".$mod["url"]."</a></td>
<td style=\"text-align='center';\"><a href=\"".$config["path"]."/admin/index.php?panel=module&amp;action=install&amp;module=".$mod["file"]."\">Installieren</a></td>
</tr>";
unset($deps);
unset($depends);

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!");
}
$addnav["right"]=FALSE;

View file

@ -1,6 +1,6 @@
<?php
/**
* Project: BeFramed - simple site engine
* Project: BeCast WebEngine - simple site engine
* File: /admin/versions.apnl.php
*
* This library is free software; you can redistribute it and/or
@ -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.jaud.be
* @copyright 2025 becast.at
* @link http://www.becast.at
* @copyright 2009-2025 becast.at
* @author Bernhard Jaud <bernhard at becast dot at>
* @package BeFramed core
* @package BcWe core
* @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!");
}
$addnav["right"]=FALSE;

View file

@ -1,6 +1,6 @@
<?php
<?php global $basepath, $config;
/**
* Project: astat - simple site engine
* Project: BeCast WebEngine - simple site engine
* File: init_core.inc.php
*
* This library is free software; you can redistribute it and/or
@ -17,28 +17,31 @@
* 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.becast.at/astat/trunk/core/init_core.inc.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: init_core.inc.php 148 2012-03-27 19:48:30Z genuineparts $
* @version $Id$
*/
define('in_astat', true);
define("INBCWE", true);
function getTime() {
function getTime(): string
{
$timer = explode( ' ', microtime() );
$timer = $timer[1] + $timer[0];
return $timer;
return $timer[1] . $timer[0];
}
$start = getTime();
/**
* Configuration
*/
require dirname(dirname(__FILE__)).'/inc/config.inc.php';
if(!is_file(dirname(__FILE__, 2) .'/inc/config.inc.php')){
header("Location: install/install.php");
} else {
require dirname(__FILE__, 2) . '/inc/config.inc.php';
}
/**
* Smarty
*/
@ -53,42 +56,37 @@ require $basepath.'database/'.$config['db_class'].'.class.php';
/**
* Functions
*/
include dirname(dirname(__FILE__)).'/inc/functions.class.php';
include dirname(__FILE__, 2) .'/inc/functions.class.php';
/**
* Logger
*/
require dirname(dirname(__FILE__)).'/inc/logger.class.php';
require dirname(__FILE__, 2) .'/inc/logger.class.php';
/**
* Logger
*/
require dirname(dirname(__FILE__)).'/inc/datacache.class.php';
/**
* Cache
*/
require dirname(dirname(__FILE__)).'/inc/cache.class.php';
require dirname(__FILE__, 2) .'/inc/datacache.class.php';
/**
* Errors
*/
include dirname(dirname(__FILE__)).'/inc/error.class.php';
include dirname(__FILE__, 2) .'/inc/error.class.php';
/**
* Plugins
*/
include dirname(dirname(__FILE__)).'/inc/plugin.class.php';
include dirname(__FILE__, 2) .'/inc/plugin.class.php';
/**
* Mail
*/
include dirname(dirname(__FILE__)).'/inc/mail.class.php';
include dirname(__FILE__, 2) .'/inc/mail.class.php';
/**
* Captcha
*/
include dirname(dirname(__FILE__)).'/inc/captcha.class.php';
include dirname(__FILE__, 2) .'/inc/captcha.class.php';
$plugin=new plugins();
$db= new db($config['host'], $config['user'], $config['pass'], $config['db'],'utf8', true);
@ -97,7 +95,7 @@ $db= new db($config['host'], $config['user'], $config['pass'], $config['db'],'ut
* Select $config vars form Database
*
*/
$result = $db->query("SELECT `name`, `value` FROM " . $config['prefix'] . "config");
$result = $db->query("SELECT `name`, `value` FROM `" . $config['prefix'] . "config`");
while ($row = $db->fetch_array($result)){
$config[$row['name']] = $row['value'];
}
@ -116,10 +114,16 @@ if($config['LCLANG']){
$cache=new datacache();
/**
* Start Datacache
*
* Start Cache
* I think this is vestigial and can be deleted. Hesitant to remove it because some instance in the wild may use this?
*/
if(isset($config['MEMCACHE_SERVER'])) {
/**
* Cache
*/
require dirname(__FILE__, 2) .'/inc/cache.class.php';
$ccache = new cache();
}
/**
* Look if we have a path Variable and try to autoset if not.
@ -130,7 +134,7 @@ if(!isset($config['path'])){
$last = array_pop($path);
$path = str_replace('/' . $last, '', $_SERVER['SCRIPT_NAME']);
$config['path'] = $path;
$db->query("INSERT INTO " . $config['prefix'] . "config (`name`, `value`, `title`, `description`, `option`, `category`) VALUES
$db->query("INSERT INTO `" . $config['prefix'] . "config` (`name`, `value`, `title`, `description`, `option`, `category`) VALUES
( 'path', '".$path."', 'Pfad', 'Der Pfad auf ihrem Webserver z.b. /cms', 'text', 1)");
}else{
$path=$config['path'];
@ -140,7 +144,7 @@ if(!isset($config['path'])){
* Start Logger
*
*/
$log=new logger($config['logtype'],dirname(dirname(__FILE__)).'/logs/'.$config['logfile'],$config['loglevel']);
$log=new logger($config['logtype'], dirname(__FILE__, 2) .'/logs/'.$config['logfile'],$config['loglevel']);
$tpl = new Smarty();
$error = new errorhandler();
$functions = new functions();
@ -150,10 +154,9 @@ $root = $_SERVER['DOCUMENT_ROOT'] . $config['path'];
* Start Language
*
*/
require dirname(dirname(__FILE__)).'/inc/lang.class.php';
require dirname(__FILE__, 2) .'/inc/lang.class.php';
$lang=new lang();
/**
* Check if we have a Theme variable and the Theme exists
* @TODO Theme Management
@ -171,8 +174,12 @@ if(isset($config['theme']) && $config['theme']!='' && is_dir($root . '/themes/'.
$tpl->setCompileDir($root . '/core/template/templates_c');
$tpl->setCacheDir($root . '/core/template/cache');
$tpl->setConfigDir($root . '/core/template/config');
$tpl->loadFilter(\Smarty\Smarty::FILTER_OUTPUT,'trimwhitespace');
$tpl->registerFilter("output", "lang");
try {
$tpl->registerFilter(\Smarty\Smarty::FILTER_OUTPUT, 'trimwhitespace');
$tpl->registerFilter(\Smarty\Smarty::FILTER_OUTPUT, "lang");
} catch (\Smarty\Exception $e) {
$log->write("Smarty Register Filter error", $e->getMessage());
}
//var_dump($tpl -> getAutoloadFilters());
/**
* Well... This should vanish with Thememanagement
@ -186,7 +193,7 @@ $addnav['left'] = TRUE;
* Start Sessions
*
*/
require dirname(dirname(__FILE__)).'/inc/sessions.class.php';
require dirname(__FILE__, 2) .'/inc/sessions.class.php';
$session=new session();
@ -194,12 +201,14 @@ $session=new session();
* Initiate Core Class
*
*/
require dirname(dirname(__FILE__)).'/inc/core.class.php';
require dirname(__FILE__, 2) .'/inc/core.class.php';
$core=new core($db, $log, $tpl);
if(defined('INSTALLED')){
if(is_dir(dirname(dirname(__FILE__)).'/install')){
return $core->message($lang->_('DELINSTALLDIR'), $lang->_('DELINSTALLDIRTEXT'),FALSE);
if(is_dir(dirname(__FILE__, 2) .'/install')){
$session->page_begin("Maintenance", FALSE);
$core->message($lang->_('DELINSTALLDIR'), $lang->_('DELINSTALLDIRTEXT'),FALSE);
return;
}
}else{
header("Location: install/install.php");
@ -211,7 +220,7 @@ $captcha = new captcha();
* OpenID
*/
if($config['use_openid']==1){
include dirname(dirname(__FILE__)).'/inc/SimpleOpenID.class.php';
include dirname(__FILE__, 2) .'/inc/SimpleOpenID.class.php';
}
/**
* Get all *.plugin.php files from the Modules and register the Pluginhooks
@ -250,7 +259,7 @@ function langstr($treffer)
* Its useful but "undocumented".
*
*/
$moduledir = dirname(dirname(__FILE__)).'/core/modules';
$moduledir = dirname(__FILE__, 2) .'/core/modules';
$modules = opendir($moduledir);
while ($mods = readdir($modules)) {
if (preg_match('/^.*?\.class.php$/', $mods)) {
@ -258,5 +267,3 @@ while ($mods = readdir($modules)) {
}
}
@closedir($modules);
?>

View file

@ -1,6 +1,6 @@
<?php
/**
* Project: astat - simple site engine
* Project: BeCast WebEngine - simple site engine
* File: /inc/admin.class.php
*
* This library is free software; you can redistribute it and/or
@ -17,16 +17,16 @@
* 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/inc/admin.class.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: admin.class.php 57 2009-07-10 19:34:56Z genuineparts $
* @version $Id$
*/
$module["admin"]["name"]="Admin Class";
$module["admin"]["ver"]="0.2.4";
$module["admin"]["ver"]="0.2.5";
class admin {
var $module_=array();

View file

@ -1,6 +1,8 @@
<?php
$module["cache"]["name"]="Cache Class";
$module["cache"]["ver"]="0.9.10";
/**
* Project: beFramed
* Project: BeCast WebEngine - simple site engine
* File: /inc/cache.class.php
*
* This library is free software; you can redistribute it and/or
@ -17,10 +19,10 @@
* 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.jaud.be
* @copyright 2025 becast.at
* @link http://www.becast.at
* @copyright 2009-2025 becast.at
* @author Bernhard Jaud <bernhard at becast dot at>
* @package beFramed Core
* @package BcWe core
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
* @version $Id$
*/
@ -34,8 +36,7 @@ define("LOG_WARNING", 4);
define("LOG_INFO", 6);
define("LOG_DEBUG", 7);
*/
$module["cache"]["name"]="Cache Class";
$module["cache"]["ver"]="0.9.10";
class cache {
var $server;
var $prefix;
@ -85,9 +86,12 @@ class cache {
$this->obj->quit();
}
function set($key,$var,$expiration=null){
if($expriation=null){
$expriation=$this->exp;
function set($key,$var,$exp=null): void
{
if($exp==null){
$expiration = $this->exp;
}else{
$expiration = $exp;
}
$this->obj->set($this->prefix.$key,$var,$expiration);
}

View file

@ -1,6 +1,6 @@
<?php
/**
* Project: astat - simple site engine
* Project: BeCast WebEngine - simple site engine
* File: /inc/core.class.php
*
* This library is free software; you can redistribute it and/or
@ -17,16 +17,16 @@
* 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.becast.at/astat/trunk/inc/core.class.php $
* @copyright 2025 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: core.class.php 154 2012-03-27 21:50:46Z genuineparts $
* @version $Id$
*/
$module['core']['name']='Core Class';
$module['core']['ver']='0.9.81';
$module['core']['ver']='1.0.0';
class Core{
@ -84,7 +84,7 @@ class Core{
*
* @var string
*/
var $ver_minor='0';
var $ver_minor='1';
/**
*
@ -100,7 +100,7 @@ class Core{
*
* @var string
*/
var $ver_codename='Antiochos';
var $ver_codename='Tim';
/**
*
@ -516,7 +516,7 @@ class Core{
* Renders the Page
*
* @param string $content The content for the page
* @param bool $minimal Render the Page in a minaml mode (e.g. for redirect)
* @param bool $minimal Render the Page in a minmal mode (e.g. for redirect)
* @param string $minimal_tpl Custom minimal template
* @param string $header_tpl Custom header template
* @param string $footer_tpl Custom footer template

View file

@ -2,7 +2,7 @@
$module["datacache"]["name"]="Datacache Module";
$module["datacache"]["ver"]="0.1.0";
/**
* Project: astat - simple site engine
* Project: BeCast WebEngine - simple site engine
* File: /inc/datacache.class.php
*
* This library is free software; you can redistribute it and/or
@ -19,10 +19,10 @@ $module["datacache"]["ver"]="0.1.0";
* 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 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$
*/

View file

@ -1,9 +1,9 @@
<?php
$module["functions"]["name"]="Functions Module";
$module["functions"]["ver"]="1.0.0";
$module["functions"]["ver"]="1.0.1";
/**
* Project: astat - simple site engine
* File: /inc/sessions.class.php
* Project: BeCast WebEngine - simple site engine
* File: /inc/functions.class.php
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@ -19,12 +19,12 @@ $module["functions"]["ver"]="1.0.0";
* 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/inc/sessions.class.php $
* @copyright 2010 becast.at
* @link http://www.becast.at
* @copyright 2010-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: sessions.class.php 129 2010-02-21 22:04:51Z genuineparts $
* @version $Id$
*/
class functions {
@ -120,7 +120,9 @@ class functions {
function get_ip(){
global $config;
$ip = strtolower($_SERVER['REMOTE_ADDR']);
if(empty($config['ip_forwarded_check'])){
$config['ip_forwarded_check'] = false;
}
if($config['ip_forwarded_check'])
{
$addresses = array();

View file

@ -1,6 +1,8 @@
<?php
$module["lang"]["name"]="Language Class";
$module["lang"]["ver"]="0.1.2";
/**
* Project: astat - simple site engine
* Project: BeCast WebEngine - simple site engine
* File: /inc/lang.class.php
*
* This library is free software; you can redistribute it and/or
@ -17,30 +19,30 @@
* 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 2025 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$
*/
$module["lang"]["name"]="Language Class";
$module["lang"]["ver"]="0.1.1";
class lang{
var $langname=array('de'=>'Deutsch','en'=>'English');
var $language;
var $languagedir;
var $lf;
var array $langdata;
function __construct($languagedir='/languages/'){
$this->languagedir = dirname(dirname(__FILE__)).'/languages/';
}
function setlang($language){
global $config, $error, $db, $log, $core, $plugin, $lang;
function setlang($language): void
{
global $config;
unset($this->language);
unset($this->lf);
unset($this->langdata);
if(!$language || $language==''){
$language=$config['lang'];
if(!$language){
@ -51,8 +53,10 @@ class lang{
}else{
$this->language=$language;
}
include_once $this->languagedir.$this->language.'.lang.php';
$this->lf=$lf;
require_once $this->languagedir.$this->language.'.lang.php';
if (isset($lf)) {
$this->langdata = $lf;
}
}
function getlanguages(){
@ -71,8 +75,8 @@ class lang{
}
function _($string){
if(isset($this->lf[$string])){
return($this->lf[$string]);
if(isset($this->langdata[$string])){
return($this->langdata[$string]);
}else{
return($string);
}

View file

@ -18,31 +18,31 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* @link http://www.becast.at
* @copyright 2009 becast.at
* @copyright 2009-2025 becast.at
* @author Bernhard Jaud <bernhard at becast dot at>
* @package BeCast Webengine core
* @package BcWe core
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
* @version $Id: panel.class.php 128 2010-02-21 22:03:37Z genuineparts $
* @version $Id$
*/
$module["panel"]["name"]="Panel Class";
$module["panel"]["ver"]="0.3.4";
$module["panel"]["ver"]="0.3.6";
class panel {
var $sidebar="";
var $page="";
var $bodyext="";
var $title="";
var $content="";
var $meta="";
var $form="";
var $foot="";
var $head="";
var $menu_items ="";
var string $sidebar="";
var string $page="";
var string $bodyext="";
var string $title="";
var string $content="";
var string $meta="";
var string $form="";
var string $foot="";
var string $head="";
var string $menu_items ="";
function page($additional_title="",$meta=""){
global $config,$db,$core;
return '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
return '<!DOCTYPE html>
<html lang="de">
<head>
<title>'.$config['sitetitle'].'</title>
<link rel="stylesheet" type="text/css" href="admin.css" />
@ -77,24 +77,26 @@ class panel {
exit();
}
function menu_item($panel,$text, $img=""){
function menu_item($panel,$text, $img=""): void
{
global $config, $userdata, $userinfo, $session, $meta;
if($panel=="group_only"){
$this->menu_items.="<li><strong>".$text."</strong></li>";
}elseif($panel=="admin_home"){
$this->menu_items.="<li><a href=\"".$config["path"]."/admin/index.php\"><img src=\"".$config["path"]."/admin/images/icons/".$img.".png\" /> ".$text."</a></li>";
$this->menu_items.="<li><a href=\"".$config["path"]."/admin/index.php\"><img src=\"".$config["path"]."/admin/images/icons/".$img.".png\" alt='".$img."'> ".$text."</a></li>";
}elseif($panel=="page_home"){
$this->menu_items.="<li><a href=\"".$config["path"]."/index.php\"><img src=\"".$config["path"]."/admin/images/icons/".$img.".png\" /> ".$text."</a></li>";
$this->menu_items.="<li><a href=\"".$config["path"]."/index.php\"><img src=\"".$config["path"]."/admin/images/icons/".$img.".png\" alt='".$img."'> ".$text."</a></li>";
}else{
if($img!=""){
$this->menu_items.="<li><a href=\"".$config["path"]."/admin/index.php?panel=".$panel."\"><img src=\"".$config["path"]."/admin/images/icons/".$img.".png\" /> ".$text."</a></li>";
$this->menu_items.="<li><a href=\"".$config["path"]."/admin/index.php?panel=".$panel."\"><img src=\"".$config["path"]."/admin/images/icons/".$img.".png\" alt='".$img."'> ".$text."</a></li>";
}else{
$this->menu_items.="<li><a href=\"".$config["path"]."/admin/index.php?panel=".$panel."\">".$text."</a></li>";
}
}
}
function admin_message($title,$message,$redirect=FALSE,$panel="",$time="4"){
function admin_message($title,$message,$redirect=FALSE,$panel="",$time="4"): void
{
global $config,$session,$lang;
$session->page_begin("Admin Message", True);
if($panel!="" && $redirect){
@ -111,7 +113,8 @@ class panel {
}
function menu(){
function menu(): string
{
return '<div id="menu">
<ul>'.$this->menu_items.'</ul></div>';
@ -120,8 +123,8 @@ class panel {
function form ($args = array(),$return=FALSE,$extra=""){
$method = $args["method"] ? $args["method"] : 'post';
$action = $args["action"] ? $args["action"] : $_SERVER['PHP_SELF'];
$method = $args["method"] ?? 'POST';
$action = $args["action"] ?? $_SERVER['PHP_SELF'];
$form = '<form action="' .$action. '" method="' .$method. '"' .$extra. '>';
if(!$return){
$this->content .= $form;
@ -129,7 +132,7 @@ class panel {
return $form;
}
}
function formClose ()
function formClose ($return=FALSE)
{
$form = '</form>';
@ -200,7 +203,7 @@ class panel {
}
function submit ($args=array(),$extra="",$return=FALSE)
{
$name = $args["name"] ? $args["name"] : 'submit';
$name = $args["name"] ?? 'submit';
$fld = '<input type="submit" name="'.$name.'" ' .$extra. ' />'; // html: form submit button
if(!$return){
$this->content .= $fld;
@ -214,10 +217,10 @@ class panel {
*/
function textarea ($args = array(),$extra="",$return=FALSE)
{
$name = $args["name"] ? $args["name"] : 'field';
$rows = $args["rows"] ? $args["rows"] : '3';
$cols = $args["cols"] ? $args["cols"] : '30';
$text = $args["value"] ? $args["value"] : '';
$name = $args["name"] ?? 'field';
$rows = $args["rows"] ?? '3';
$cols = $args["cols"] ?? '30';
$text = $args["value"] ?? '';
$fld = '<textarea name="' .$name. '" rows="' .$rows. '" cols="' .$cols. '"' .$extra. '>' .$text. '</textarea>';
if(!$return){

View file

@ -25,9 +25,9 @@ $module["module"]["name"]="Plugin Class";
$module["module"]["ver"]="0.1.1";
class plugins{
var $hooks;
var $current_hook;
var $plugin_=array();
var array $hooks;
var string $current_hook;
var array $plugin_=array();
function load_plugins($region='G'){
global $config, $db;
@ -63,6 +63,9 @@ class plugins{
function run_hook($name,$variables=array()) {
if(empty($this->hooks)){
return false;
}
if(array_key_exists($name,$this->hooks)){
if(!is_array($this->hooks[$name]))
{
@ -92,6 +95,7 @@ class plugins{
$this->current_hook = '';
return $return;
}
return false;
}

View file

@ -1,8 +1,8 @@
<?php
$module["session"]["name"]="Sessionmanagement Module";
$module["session"]["ver"]="0.9.1";
$module["session"]["ver"]="0.9.2";
/**
* Project: astat - simple site engine
* Project: BeCast WebEngine - simple site engine
* File: /inc/sessions.class.php
*
* This library is free software; you can redistribute it and/or
@ -19,12 +19,12 @@ $module["session"]["ver"]="0.9.1";
* 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/inc/sessions.class.php $
* @copyright 2010 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: sessions.class.php 129 2010-02-21 22:04:51Z genuineparts $
* @version $Id$
*/
class session {
@ -38,7 +38,7 @@ class session {
function page_begin($page = "UNDEFINED", $needlogin = TRUE){
global $config, $db, $log, $core, $lang, $plugin, $functions;
$plugin->run_hook('page_begin_start',array('page'=>$page,'needlogin'=>$needlogin));
if($this->userdata['uid']==0 || !$this->userdata['uid']){
if(!isset($this->userdata['uid']) || $this->userdata['uid']==0){
$this->ip = $functions->get_ip();
$this->packip = $functions->my_inet_pton($this->ip);
$this->useragent = $_SERVER["HTTP_USER_AGENT"];

View file

@ -1,6 +1,6 @@
<?php
/**
* Project: astat - simple site engine
* Project: BeCast WebEngine - simple site engine
* File: index.php
*
* This library is free software; you can redistribute it and/or
@ -17,12 +17,12 @@
* 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/index.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: index.php 100 2010-02-20 14:42:30Z genuineparts $
* @version $Id$
*/
ini_set('display_errors', 1);

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.");");
@ -88,5 +88,3 @@ class module_chat extends admin_module{
}
}
?>

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,6 +1,6 @@
<?php
/**
* Project: astat - simple site engine
* Project: BeCast WebEngine - simple site engine
* File: /modules/news/add.apnl.php
*
* This library is free software; you can redistribute it and/or
@ -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 $
* @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 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,6 +1,6 @@
<?php
/**
* Project: astat - simple site engine
* Project: BeCast WebEngine - simple site engine
* File: /modules/text/text.output.php
*
* This program is free software; you can redistribute it and/or modify
@ -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
* @link http://www.becast.at
* @copyright 2010-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$
*/
If (!defined("in_astat")) {
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!");
}

View file

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

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,5 +1,5 @@
<?php
If (!defined("in_astat")) {
If (!defined("INBCWE")) {
die("Dieses Script kann nicht ausserhalb des Frameworks laufen!");
}
$navtpl->assign('navtitle', "Suche");

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,27 +0,0 @@
<?php
If (!defined("in_astat")) {
die("Dieses Script kann nicht ausserhalb des Frameworks laufen!");
}
include 'thirdparty/twitter/twitter.class.php';
//define('MAGPIE_CACHE_DIR', '/var/www/virtual/recensio.org/phptmp/magpie_cache');
try{
$twitter = new Twitter('uVApPPv2zWXu8dWBwkbLw', 'kNHU7pia5ikY22No8gHU8ucXLd0z3IpnOUn0MA5SvQ', '563736788-UhHJUIJXlSdu3iFPaaqZQDmI9FExJOBW1e7ceZpM', 'FTHmLz1Gwa0pkgH5riN5mui4v3m83BaVVpXju4Bqlc');
$channel = $twitter->load(Twitter::ME,5);
foreach ($channel as $status){
$stat['screenname'] = $status->user->screen_name;
$stat['image'] = htmlspecialchars($status->user->profile_image_url);
$stat['user'] = htmlspecialchars($status->user->name);
$stat['text'] = Twitter::clickable($status);
$stat['date'] = date("d.m.Y H:i",strtotime($status->created_at));
$stats[]=$stat;
}
}catch(Exception $e){
$stats="Twitter down :,(";
}
$navtpl-> assign("status",$stats);
$navrow .= $navtpl->fetch('nav_twitter.tpl');
?>

View file

@ -1,24 +0,0 @@
<?php
If (!defined("in_astat")) {
die("Dieses Script kann nicht ausserhalb des Frameworks laufen!");
}
include 'thirdparty/twitter/twitter.class.php';
//define('MAGPIE_CACHE_DIR', '/var/www/virtual/recensio.org/phptmp/magpie_cache');
$twitter = new Twitter('uVApPPv2zWXu8dWBwkbLw', 'kNHU7pia5ikY22No8gHU8ucXLd0z3IpnOUn0MA5SvQ', '563736788-UhHJUIJXlSdu3iFPaaqZQDmI9FExJOBW1e7ceZpM', 'FTHmLz1Gwa0pkgH5riN5mui4v3m83BaVVpXju4Bqlc');
$channel = $twitter->load(Twitter::ME,5);
foreach($channel->status as $status){
$stat['screenname'] = $status->user->screen_name;
$stat['image'] = htmlspecialchars($status->user->profile_image_url);
$stat['user'] = htmlspecialchars($status->user->name);
$stat['text'] = Twitter::clickable($status->text);
$stat['date'] = date("d.m.Y H:i",strtotime($status->created_at));
$stats[]=$stat;
}
$navtpl-> assign("status",$stats);
$navrow .= $navtpl->fetch('nav_twitter.tpl');
?>

View file

@ -1,78 +0,0 @@
<?php
echo file_exists('/var/www/virtual/ponytopia.net/htdocs/modules/rp/images/1.small');
/* $command->cmd = "[yt]0gfniCDbbzg[/yt]";
echo 'message before parse: '.$command->cmd.'<br />';
$command->cmd = preg_replace_callback("|\[yt\](.*?)\[\/yt\]|", 'yt', $command->cmd);
//$command->cmd = preg_replace_callback("|\[yt (.*?)=(.*?) (.*?)=(.*?)\](.*?)\[\/yt\]|", 'yt', $command->cmd);
function get_tiny_url($url) {
$ch = curl_init();
$timeout = 5;
curl_setopt($ch,CURLOPT_URL,'http://tinyurl.com/api-create.php?url='.$url);
curl_setopt($ch,CURLOPT_RETURNTRANSFER,1);
curl_setopt($ch,CURLOPT_CONNECTTIMEOUT,$timeout);
$data = curl_exec($ch);
curl_close($ch);
return $data;
}
function getTitle($Url){
echo "parse";
$ustr = parse_url($Url);
echo "file";
$ctx = stream_context_create(array(
'http' => array(
'timeout' => 10
)
)
);
$str = file_get_contents($Url, 0, $ctx);
echo "rest";
if(strlen($str)>0){
if(strpos($ustr['host'],'youtu')===FALSE){
preg_match("/\<title\>(.*)\<\/title\>/",$str,$title);
}else{
preg_match('/\<meta property="og\:title" content="(.*)"\>/',$str,$title);
}
if($title[1]!=""){
unset($Url);
unset($ustr);
return $title[1];
}else{
unset($ustr);
return basename($Url);
}
}
}
function url($matches) {
echo getTitle($matches[0]);
$url = get_tiny_url($matches[0]);
return '<a href="'.$url.'" target="_blank">'.$url.'</a>';
}
echo 'message after parse: '.$command->cmd.'<br />';
function yt($matches) {
global $session,$config,$db,$tpl,$log,$core;
var_dump($matches);
if($matches[1]=='h'){
$height=$matches[2];
$width=$matches[4];
$url=$matches[5];
}elseif($matches[1]=='w'){
$height=$matches[4];
$width=$matches[2];
$url=$matches[5];
}elseif($matches[2]==''){
$height=315;
$width=560;
$url=$matches[1];
}else{
return $matches[0];
}
return '<iframe width="'.$width.'" height="'.$height.'" src="http://www.youtube.com/embed/'.$url.'" frameborder="0" allowfullscreen></iframe>';
}*/
?>