Updated to latest version of CMS
This commit is contained in:
parent
ccdf8fbb81
commit
edf41b1198
76 changed files with 465 additions and 1162 deletions
8
.idea/.gitignore
generated
vendored
Normal file
8
.idea/.gitignore
generated
vendored
Normal 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
10
.idea/funchat.iml
generated
Normal 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
8
.idea/modules.xml
generated
Normal 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
22
.idea/php.xml
generated
Normal 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
6
.idea/vcs.xml
generated
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="VcsDirectoryMappings">
|
||||||
|
<mapping directory="" vcs="Git" />
|
||||||
|
</component>
|
||||||
|
</project>
|
|
@ -1,6 +1,6 @@
|
||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* Project: astat - simple site engine
|
* Project: BeCast WebEngine - simple site engine
|
||||||
* File: /admin/addgroup.apnl.php
|
* File: /admin/addgroup.apnl.php
|
||||||
*
|
*
|
||||||
* This library is free software; you can redistribute it and/or
|
* 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
|
* License along with this library; if not, write to the Free Software
|
||||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
* 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 $
|
* @link http://www.becast.at
|
||||||
* @copyright 2009 becast.at
|
* @copyright 2009-2025 becast.at
|
||||||
* @author Bernhard Jaud <bernhard at becast dot 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
|
* @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!");
|
die("Dieses Script kann nicht ausserhalb des Frameworks laufen!");
|
||||||
}
|
}
|
||||||
$addnav["right"]=FALSE;
|
$addnav["right"]=FALSE;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<?php
|
<?php global $session;
|
||||||
/**
|
/**
|
||||||
* Project: BeCast WebEngine - simple site engine
|
* Project: BeCast WebEngine - simple site engine
|
||||||
* File: /admin/addusers.apnl.php
|
* File: /admin/addusers.apnl.php
|
||||||
|
@ -24,7 +24,7 @@
|
||||||
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
|
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
|
||||||
* @version $Id$
|
* @version $Id$
|
||||||
*/
|
*/
|
||||||
If (!defined("in_BL_ADMIN")) {
|
If (!defined("IN_BCWE_ADMIN")) {
|
||||||
die("Dieses Script kann nicht ausserhalb des Frameworks laufen!");
|
die("Dieses Script kann nicht ausserhalb des Frameworks laufen!");
|
||||||
}
|
}
|
||||||
$addnav["right"]=FALSE;
|
$addnav["right"]=FALSE;
|
||||||
|
@ -51,35 +51,34 @@ class adduser_panel extends admin_module{
|
||||||
}
|
}
|
||||||
|
|
||||||
}else{
|
}else{
|
||||||
|
|
||||||
$panel->title=$lang->_('ADDUSER');
|
$panel->title=$lang->_('ADDUSER');
|
||||||
$panel->content=$lang->_('ADDUSERTEXT');
|
$panel->content=$lang->_('ADDUSERTEXT');
|
||||||
$panel->form(array("action"=>$config["path"]."/admin/index.php?panel=adduser"));
|
$panel->form(array("action"=>$config["path"]."/admin/index.php?panel=adduser"));
|
||||||
$panel->content.="<h3>".$lang->_('USERNAME').":</h3>";
|
$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->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->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->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->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->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->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->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>";
|
$panel->content.="<h3>".$lang->_('ROLE').":</h3>";
|
||||||
$result=$db->query("SELECT `id`,`role_name` FROM `" . $config["prefix"] . "role`");
|
$result=$db->query("SELECT `id`,`role_name` FROM `" . $config["prefix"] . "role`");
|
||||||
while($rdata = $db->fetch_array($result)){
|
while($rdata = $db->fetch_array($result)){
|
||||||
$dd[$rdata["role_name"]]=$rdata["id"];
|
$dd[$rdata["role_name"]]=$rdata["id"];
|
||||||
}
|
}
|
||||||
$panel->select($dd,$data["role"],"role");
|
$panel->select($dd,"","role");
|
||||||
$panel->content.="<br />";
|
$panel->content.="<br />";
|
||||||
$panel->content.="<h3>".$lang->_('STATUS').":</h3>";
|
$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->field(array("name"=>"send","typ"=>"hidden","value"=>"1"));
|
||||||
$panel->content.="<br />";
|
$panel->content.="<br />";
|
||||||
$panel->content.="<br />";
|
$panel->content.="<br />";
|
||||||
|
|
|
@ -24,7 +24,7 @@
|
||||||
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
|
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
|
||||||
* @version $Id$
|
* @version $Id$
|
||||||
*/
|
*/
|
||||||
If (!defined("in_BL_ADMIN")) {
|
If (!defined("IN_BCWE_ADMIN")) {
|
||||||
die("Dieses Script kann nicht ausserhalb des Frameworks laufen!");
|
die("Dieses Script kann nicht ausserhalb des Frameworks laufen!");
|
||||||
}
|
}
|
||||||
$addnav["right"]=FALSE;
|
$addnav["right"]=FALSE;
|
||||||
|
|
|
@ -1,5 +1,30 @@
|
||||||
<?php
|
<?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!");
|
die("Dieses Script kann nicht ausserhalb des Frameworks laufen!");
|
||||||
}
|
}
|
||||||
$addnav["right"]=FALSE;
|
$addnav["right"]=FALSE;
|
||||||
|
@ -24,7 +49,7 @@ class config_panel extends admin_module{
|
||||||
$config[$row["name"]] = $row["value"];
|
$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)){
|
while ($row = $db->fetch_array($result)){
|
||||||
$data[$row["categoryname"]][]=$row;
|
$data[$row["categoryname"]][]=$row;
|
||||||
}
|
}
|
||||||
|
|
|
@ -24,7 +24,7 @@
|
||||||
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
|
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
|
||||||
* @version $Id$
|
* @version $Id$
|
||||||
*/
|
*/
|
||||||
If (!defined("in_BL_ADMIN")) {
|
If (!defined("IN_BCWE_ADMIN")) {
|
||||||
die("Dieses Script kann nicht ausserhalb des Frameworks laufen!");
|
die("Dieses Script kann nicht ausserhalb des Frameworks laufen!");
|
||||||
}
|
}
|
||||||
$addnav["right"]=FALSE;
|
$addnav["right"]=FALSE;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<?php
|
<?php global $session;
|
||||||
/**
|
/**
|
||||||
* Project: BeCast WebEngine - simple site engine
|
* Project: BeCast WebEngine - simple site engine
|
||||||
* File: /admin/editusers.apnl.php
|
* File: /admin/editusers.apnl.php
|
||||||
|
@ -24,7 +24,7 @@
|
||||||
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
|
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
|
||||||
* @version $Id$
|
* @version $Id$
|
||||||
*/
|
*/
|
||||||
If (!defined("in_BL_ADMIN")) {
|
If (!defined("IN_BCWE_ADMIN")) {
|
||||||
die("Dieses Script kann nicht ausserhalb des Frameworks laufen!");
|
die("Dieses Script kann nicht ausserhalb des Frameworks laufen!");
|
||||||
}
|
}
|
||||||
$addnav["right"]=FALSE;
|
$addnav["right"]=FALSE;
|
||||||
|
@ -90,7 +90,7 @@ class editusers_panel extends admin_module{
|
||||||
$panel->formClose();
|
$panel->formClose();
|
||||||
$panel->parse_page();
|
$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"])."'");
|
$result=$db->query("SELECT * FROM `" . $config["prefix"] . "users` WHERE `uid`='".intval($_GET["user"])."'");
|
||||||
$data = $db->fetch_array($result);
|
$data = $db->fetch_array($result);
|
||||||
$plugin->run_hook('admin_user_before_delete',array('data'=>$data));
|
$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\">
|
$panel->content.="<table id=\"users\" width=\"90%\" cellspacing=\"2\">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th align=\"center\">".$lang->_('ID')."</th>
|
<th style=\"text-align='center';\">".$lang->_('ID')."</th>
|
||||||
<th align=\"center\">".$lang->_('USERNAME')."</th>
|
<th style=\"text-align='center';\">".$lang->_('USERNAME')."</th>
|
||||||
<th align=\"center\">".$lang->_('REALNAME')."</th>
|
<th style=\"text-align='center';\">".$lang->_('REALNAME')."</th>
|
||||||
<th align=\"center\">".$lang->_('ROLE')."</th>
|
<th style=\"text-align='center';\">".$lang->_('ROLE')."</th>
|
||||||
<th align=\"center\">".$lang->_('STATUS')."</th>
|
<th style=\"text-align='center';\">".$lang->_('STATUS')."</th>
|
||||||
<th align=\"center\">".$lang->_('ACTION')."</th>
|
<th style=\"text-align='center';\">".$lang->_('ACTION')."</th>
|
||||||
</tr></thead><tbody>";
|
</tr></thead><tbody>";
|
||||||
if(!empty($user)){
|
if(!empty($user)){
|
||||||
foreach($user as $u){
|
foreach($user as $u){
|
||||||
|
@ -131,22 +131,22 @@ class editusers_panel extends admin_module{
|
||||||
$u['activestyle']='style="font-style:italic;"';
|
$u['activestyle']='style="font-style:italic;"';
|
||||||
}
|
}
|
||||||
$panel->content.="<tr ".$u['activestyle'].">
|
$panel->content.="<tr ".$u['activestyle'].">
|
||||||
<td align=\"center\">".$u["uid"]."</td>
|
<td style=\"text-align='center';\">".$u["uid"]."</td>
|
||||||
<td align=\"center\">".$u["username"]."</td>
|
<td style=\"text-align='center';\">".$u["username"]."</td>
|
||||||
<td align=\"center\">".$u["realname"]."</td>
|
<td style=\"text-align='center';\">".$u["realname"]."</td>
|
||||||
<td align=\"center\">".$u["role_name"]."</td>
|
<td style=\"text-align='center';\">".$u["role_name"]."</td>
|
||||||
<td align=\"center\">".$u['activetext']."</td>";
|
<td style=\"text-align='center';\">".$u['activetext']."</td>";
|
||||||
if($u["uid"]==$session->userdata["uid"]){
|
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&action=delete&user=".$u["uid"]."\"><img src=\"".$config["path"]."/admin/images/icons/delete.png\" /></a> <a href=\"".$config["path"]."/admin/index.php?panel=editusers&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&action=delete&user=".$u["uid"]."\"><img src=\"".$config["path"]."/admin/images/icons/delete.png\" /></a> <a href=\"".$config["path"]."/admin/index.php?panel=editusers&edituser=".$u["uid"]."\"><img src=\"".$config["path"]."/admin/images/icons/wrench.png\" /></a></td>
|
||||||
</tr>";
|
</tr>";
|
||||||
}else{
|
}else{
|
||||||
$panel->content.="<td align=\"center\"><a onclick=\"return confirmLink(this, '".sprintf($lang->_('DELETEUSER'),$u["username"])."')\" href=\"".$config["path"]."/admin/index.php?panel=editusers&action=delete&user=".$u["uid"]."\"><img src=\"".$config["path"]."/admin/images/icons/delete.png\" /></a> <a href=\"".$config["path"]."/admin/index.php?panel=editusers&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&action=delete&user=".$u["uid"]."\"><img src=\"".$config["path"]."/admin/images/icons/delete.png\" /></a> <a href=\"".$config["path"]."/admin/index.php?panel=editusers&edituser=".$u["uid"]."\"><img src=\"".$config["path"]."/admin/images/icons/wrench.png\" /></a></td>
|
||||||
</tr>";
|
</tr>";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
$panel->content.="<tr>
|
$panel->content.="<tr>
|
||||||
<td align=\"center\" colspan=\"5\">".$lang->_('NOUSERS')."</td>
|
<td style=\"text-align='center';\" colspan=\"5\">".$lang->_('NOUSERS')."</td>
|
||||||
</tr>";
|
</tr>";
|
||||||
}
|
}
|
||||||
$panel->content.="</tbody></table><br />";
|
$panel->content.="</tbody></table><br />";
|
||||||
|
|
|
@ -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
|
* File: /admin/index.php
|
||||||
*
|
*
|
||||||
* This library is free software; you can redistribute it and/or
|
* 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
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
*
|
*
|
||||||
* @link http://www.BeCast.at
|
* @link http://www.BeCast.at
|
||||||
* @copyright 2009 becast.at
|
* @copyright 2009-2025 becast.at
|
||||||
* @author Bernhard Jaud <bernhard at becast dot at>
|
* @author Bernhard Jaud <bernhard at becast dot at>
|
||||||
* @package BeCast Webengine core
|
* @package BeCast Webengine core
|
||||||
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
|
* @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);
|
ERROR_REPORTING(E_ALL ^E_NOTICE);
|
||||||
$basepath="";
|
$basepath="";
|
||||||
$nav_include="../";
|
$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);
|
$session->page_begin("Admincenter", True);
|
||||||
define("in_BL_ADMIN",TRUE);
|
define("IN_BCWE_ADMIN",TRUE);
|
||||||
|
|
||||||
function size_format($num, $prec = 2)
|
function size_format($num, $prec = 2)
|
||||||
{
|
{
|
||||||
|
@ -41,7 +41,6 @@ function size_format($num, $prec = 2)
|
||||||
return $num . ' bytes';
|
return $num . ' bytes';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(isset($session->userdata['uid']) && $session->userdata['uid']!=0 && ($session->userdata["admin_cp"] && $session->userdata["is_admin"])){
|
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/admin.class.php';
|
||||||
require_once dirname(dirname(__FILE__)).'/inc/panel.class.php';
|
require_once dirname(dirname(__FILE__)).'/inc/panel.class.php';
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<?php
|
<?php global $session;
|
||||||
/**
|
/**
|
||||||
* Project: astat - simple site engine
|
* Project: BeCast WebEngine - simple site engine
|
||||||
* File: /admin/module.apnl.php
|
* File: /admin/module.apnl.php
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or
|
* 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
|
* License along with this library; if not, write to the Free Software
|
||||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
* 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 $
|
* @link http://www.becast.at
|
||||||
* @copyright 2009 becast.at
|
* @copyright 2009-2025 becast.at
|
||||||
* @author Bernhard Jaud <bernhard at becast dot 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
|
* @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!");
|
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 />
|
$panel->content.="<h2>Installierte Module</h2><br />
|
||||||
<table width=\"90%\" cellspacing=\"2\">
|
<table width=\"90%\" cellspacing=\"2\">
|
||||||
<tr>
|
<tr>
|
||||||
<th align=\"center\">Modul</th>
|
<th style=\"text-align='center';\">Modul</th>
|
||||||
<th align=\"center\">Version</th>
|
<th style=\"text-align='center';\">Version</th>
|
||||||
<th align=\"center\">Autor</th>
|
<th style=\"text-align='center';\">Autor</th>
|
||||||
<th align=\"center\">Homepage</th>
|
<th style=\"text-align='center';\">Homepage</th>
|
||||||
<th align=\"center\">Aktion</th>
|
<th style=\"text-align='center';\">Aktion</th>
|
||||||
</tr>";
|
</tr>";
|
||||||
if(!empty($core->mod_)){
|
if(!empty($core->mod_)){
|
||||||
foreach($core->mod_ as $mod){
|
foreach($core->mod_ as $mod){
|
||||||
If($mod["depends"]!=""){
|
|
||||||
|
|
||||||
$depends="";
|
$depends="";
|
||||||
|
if(isset($mod["depends"]) && $mod["depends"]!=""){
|
||||||
$dependands=unserialize($mod["depends"]);
|
$dependands=unserialize($mod["depends"]);
|
||||||
foreach($dependands as $dep){
|
foreach($dependands as $dep){
|
||||||
if(!$deps){
|
if(!$deps){
|
||||||
|
@ -89,11 +88,11 @@ class module_panel extends admin_module{
|
||||||
$depends.='<br /><span style="font-size: xx-small;">hängt ab von: '.$deps;
|
$depends.='<br /><span style="font-size: xx-small;">hängt ab von: '.$deps;
|
||||||
}
|
}
|
||||||
$panel->content.="<tr>
|
$panel->content.="<tr>
|
||||||
<td align=\"center\">".$mod["name"].$depends."</td>
|
<td style=\"text-align='center';\">".$mod["name"].$depends."</td>
|
||||||
<td align=\"center\">".$mod["version"]."</td>
|
<td style=\"text-align='center';\">".$mod["version"]."</td>
|
||||||
<td align=\"center\">".$mod["author"]."</td>
|
<td style=\"text-align='center';\">".$mod["author"]."</td>
|
||||||
<td align=\"center\"><a href=\"".$mod["url"]."\">".$mod["url"]."</a></td>
|
<td style=\"text-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öscht!')\" href=\"".$config["path"]."/admin/index.php?panel=module&action=uninstall&module=".$mod["file"]."\">Deinstallieren</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öscht!')\" href=\"".$config["path"]."/admin/index.php?panel=module&action=uninstall&module=".$mod["file"]."\">Deinstallieren</a></td>
|
||||||
</tr>";
|
</tr>";
|
||||||
unset($deps);
|
unset($deps);
|
||||||
unset($depends);
|
unset($depends);
|
||||||
|
@ -109,19 +108,18 @@ class module_panel extends admin_module{
|
||||||
$panel->content.="<h2>Nicht Installierte Module</h2><br />";
|
$panel->content.="<h2>Nicht Installierte Module</h2><br />";
|
||||||
$panel->content.="<table width=\"90%\" cellspacing=\"2\">
|
$panel->content.="<table width=\"90%\" cellspacing=\"2\">
|
||||||
<tr>
|
<tr>
|
||||||
<th align=\"center\">Modul</th>
|
<th style=\"text-align='center';\">Modul</th>
|
||||||
<th align=\"center\">Version</th>
|
<th style=\"text-align='center';\">Version</th>
|
||||||
<th align=\"center\">Autor</th>
|
<th style=\"text-align='center';\">Autor</th>
|
||||||
<th align=\"center\">Homepage</th>
|
<th style=\"text-align='center';\">Homepage</th>
|
||||||
<th align=\"center\">Aktion</th>
|
<th style=\"text-align='center';\">Aktion</th>
|
||||||
</tr>";
|
</tr>";
|
||||||
|
|
||||||
$modules=$this->avaiable_modules();
|
$modules=$this->avaiable_modules();
|
||||||
if(is_array($modules)){
|
if(is_array($modules)){
|
||||||
foreach($modules as $mod){
|
foreach($modules as $mod){
|
||||||
If($mod["depends"]!=""){
|
|
||||||
|
|
||||||
$depends="";
|
$depends="";
|
||||||
|
if(isset($mod["depends"]) && $mod["depends"]!=""){
|
||||||
$dependands=explode(",",$mod["depends"]);
|
$dependands=explode(",",$mod["depends"]);
|
||||||
foreach($dependands as $dep){
|
foreach($dependands as $dep){
|
||||||
if(!$deps){
|
if(!$deps){
|
||||||
|
@ -133,11 +131,11 @@ class module_panel extends admin_module{
|
||||||
$depends.='<br /><span style="font-size: xx-small;">hängt ab von: '.$deps;
|
$depends.='<br /><span style="font-size: xx-small;">hängt ab von: '.$deps;
|
||||||
}
|
}
|
||||||
$panel->content.="<tr>
|
$panel->content.="<tr>
|
||||||
<td align=\"center\">".$mod["name"].$depends."</td>
|
<td style=\"text-align='center';\">".$mod["name"].$depends."</td>
|
||||||
<td align=\"center\">".$mod["version"]."</td>
|
<td style=\"text-align='center';\">".$mod["version"]."</td>
|
||||||
<td align=\"center\">".$mod["author"]."</td>
|
<td style=\"text-align='center';\">".$mod["author"]."</td>
|
||||||
<td align=\"center\"><a href=\"".$mod["url"]."\">".$mod["url"]."</a></td>
|
<td style=\"text-align='center';\"><a href=\"".$mod["url"]."\">".$mod["url"]."</a></td>
|
||||||
<td align=\"center\"><a href=\"".$config["path"]."/admin/index.php?panel=module&action=install&module=".$mod["file"]."\">Installieren</a></td>
|
<td style=\"text-align='center';\"><a href=\"".$config["path"]."/admin/index.php?panel=module&action=install&module=".$mod["file"]."\">Installieren</a></td>
|
||||||
</tr>";
|
</tr>";
|
||||||
unset($deps);
|
unset($deps);
|
||||||
unset($depends);
|
unset($depends);
|
||||||
|
|
|
@ -24,7 +24,7 @@
|
||||||
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
|
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
|
||||||
* @version $Id$
|
* @version $Id$
|
||||||
*/
|
*/
|
||||||
If (!defined("in_BL_ADMIN")) {
|
If (!defined("IN_BCWE_ADMIN")) {
|
||||||
die("Dieses Script kann nicht ausserhalb des Frameworks laufen!");
|
die("Dieses Script kann nicht ausserhalb des Frameworks laufen!");
|
||||||
}
|
}
|
||||||
$addnav["right"]=FALSE;
|
$addnav["right"]=FALSE;
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* Project: BeFramed - simple site engine
|
* Project: BeCast WebEngine - simple site engine
|
||||||
* File: /admin/versions.apnl.php
|
* File: /admin/versions.apnl.php
|
||||||
*
|
*
|
||||||
* This library is free software; you can redistribute it and/or
|
* 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
|
* License along with this library; if not, write to the Free Software
|
||||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
*
|
*
|
||||||
* @link http://www.jaud.be
|
* @link http://www.becast.at
|
||||||
* @copyright 2025 becast.at
|
* @copyright 2009-2025 becast.at
|
||||||
* @author Bernhard Jaud <bernhard at becast dot 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
|
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
|
||||||
* @version $Id$
|
* @version $Id$
|
||||||
*/
|
*/
|
||||||
If (!defined("in_BL_ADMIN")) {
|
If (!defined("IN_BCWE_ADMIN")) {
|
||||||
die("Dieses Script kann nicht ausserhalb des Frameworks laufen!");
|
die("Dieses Script kann nicht ausserhalb des Frameworks laufen!");
|
||||||
}
|
}
|
||||||
$addnav["right"]=FALSE;
|
$addnav["right"]=FALSE;
|
||||||
|
|
|
@ -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
|
* File: init_core.inc.php
|
||||||
*
|
*
|
||||||
* This library is free software; you can redistribute it and/or
|
* 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
|
* License along with this library; if not, write to the Free Software
|
||||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
* 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 $
|
* @link http://www.becast.at
|
||||||
* @copyright 2009 becast.at
|
* @copyright 2009-2025 becast.at
|
||||||
* @author Bernhard Jaud <bernhard at becast dot 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
|
* @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 = explode( ' ', microtime() );
|
||||||
$timer = $timer[1] + $timer[0];
|
return $timer[1] . $timer[0];
|
||||||
return $timer;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$start = getTime();
|
$start = getTime();
|
||||||
/**
|
/**
|
||||||
* Configuration
|
* 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
|
* Smarty
|
||||||
*/
|
*/
|
||||||
|
@ -53,42 +56,37 @@ require $basepath.'database/'.$config['db_class'].'.class.php';
|
||||||
/**
|
/**
|
||||||
* Functions
|
* Functions
|
||||||
*/
|
*/
|
||||||
include dirname(dirname(__FILE__)).'/inc/functions.class.php';
|
include dirname(__FILE__, 2) .'/inc/functions.class.php';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Logger
|
* Logger
|
||||||
*/
|
*/
|
||||||
require dirname(dirname(__FILE__)).'/inc/logger.class.php';
|
require dirname(__FILE__, 2) .'/inc/logger.class.php';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Logger
|
* Logger
|
||||||
*/
|
*/
|
||||||
require dirname(dirname(__FILE__)).'/inc/datacache.class.php';
|
require dirname(__FILE__, 2) .'/inc/datacache.class.php';
|
||||||
|
|
||||||
/**
|
|
||||||
* Cache
|
|
||||||
*/
|
|
||||||
require dirname(dirname(__FILE__)).'/inc/cache.class.php';
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Errors
|
* Errors
|
||||||
*/
|
*/
|
||||||
include dirname(dirname(__FILE__)).'/inc/error.class.php';
|
include dirname(__FILE__, 2) .'/inc/error.class.php';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Plugins
|
* Plugins
|
||||||
*/
|
*/
|
||||||
include dirname(dirname(__FILE__)).'/inc/plugin.class.php';
|
include dirname(__FILE__, 2) .'/inc/plugin.class.php';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Mail
|
* Mail
|
||||||
*/
|
*/
|
||||||
include dirname(dirname(__FILE__)).'/inc/mail.class.php';
|
include dirname(__FILE__, 2) .'/inc/mail.class.php';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Captcha
|
* Captcha
|
||||||
*/
|
*/
|
||||||
include dirname(dirname(__FILE__)).'/inc/captcha.class.php';
|
include dirname(__FILE__, 2) .'/inc/captcha.class.php';
|
||||||
$plugin=new plugins();
|
$plugin=new plugins();
|
||||||
|
|
||||||
$db= new db($config['host'], $config['user'], $config['pass'], $config['db'],'utf8', true);
|
$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
|
* 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)){
|
while ($row = $db->fetch_array($result)){
|
||||||
$config[$row['name']] = $row['value'];
|
$config[$row['name']] = $row['value'];
|
||||||
}
|
}
|
||||||
|
@ -116,10 +114,16 @@ if($config['LCLANG']){
|
||||||
$cache=new datacache();
|
$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?
|
||||||
*/
|
*/
|
||||||
$ccache=new cache();
|
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.
|
* 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);
|
$last = array_pop($path);
|
||||||
$path = str_replace('/' . $last, '', $_SERVER['SCRIPT_NAME']);
|
$path = str_replace('/' . $last, '', $_SERVER['SCRIPT_NAME']);
|
||||||
$config['path'] = $path;
|
$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)");
|
( 'path', '".$path."', 'Pfad', 'Der Pfad auf ihrem Webserver z.b. /cms', 'text', 1)");
|
||||||
}else{
|
}else{
|
||||||
$path=$config['path'];
|
$path=$config['path'];
|
||||||
|
@ -140,7 +144,7 @@ if(!isset($config['path'])){
|
||||||
* Start Logger
|
* 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();
|
$tpl = new Smarty();
|
||||||
$error = new errorhandler();
|
$error = new errorhandler();
|
||||||
$functions = new functions();
|
$functions = new functions();
|
||||||
|
@ -150,10 +154,9 @@ $root = $_SERVER['DOCUMENT_ROOT'] . $config['path'];
|
||||||
* Start Language
|
* Start Language
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
require dirname(dirname(__FILE__)).'/inc/lang.class.php';
|
require dirname(__FILE__, 2) .'/inc/lang.class.php';
|
||||||
$lang=new lang();
|
$lang=new lang();
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Check if we have a Theme variable and the Theme exists
|
* Check if we have a Theme variable and the Theme exists
|
||||||
* @TODO Theme Management
|
* @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->setCompileDir($root . '/core/template/templates_c');
|
||||||
$tpl->setCacheDir($root . '/core/template/cache');
|
$tpl->setCacheDir($root . '/core/template/cache');
|
||||||
$tpl->setConfigDir($root . '/core/template/config');
|
$tpl->setConfigDir($root . '/core/template/config');
|
||||||
$tpl->loadFilter(\Smarty\Smarty::FILTER_OUTPUT,'trimwhitespace');
|
try {
|
||||||
$tpl->registerFilter("output", "lang");
|
$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());
|
//var_dump($tpl -> getAutoloadFilters());
|
||||||
/**
|
/**
|
||||||
* Well... This should vanish with Thememanagement
|
* Well... This should vanish with Thememanagement
|
||||||
|
@ -186,7 +193,7 @@ $addnav['left'] = TRUE;
|
||||||
* Start Sessions
|
* Start Sessions
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
require dirname(dirname(__FILE__)).'/inc/sessions.class.php';
|
require dirname(__FILE__, 2) .'/inc/sessions.class.php';
|
||||||
$session=new session();
|
$session=new session();
|
||||||
|
|
||||||
|
|
||||||
|
@ -194,12 +201,14 @@ $session=new session();
|
||||||
* Initiate Core Class
|
* 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);
|
$core=new core($db, $log, $tpl);
|
||||||
|
|
||||||
if(defined('INSTALLED')){
|
if(defined('INSTALLED')){
|
||||||
if(is_dir(dirname(dirname(__FILE__)).'/install')){
|
if(is_dir(dirname(__FILE__, 2) .'/install')){
|
||||||
return $core->message($lang->_('DELINSTALLDIR'), $lang->_('DELINSTALLDIRTEXT'),FALSE);
|
$session->page_begin("Maintenance", FALSE);
|
||||||
|
$core->message($lang->_('DELINSTALLDIR'), $lang->_('DELINSTALLDIRTEXT'),FALSE);
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
header("Location: install/install.php");
|
header("Location: install/install.php");
|
||||||
|
@ -211,7 +220,7 @@ $captcha = new captcha();
|
||||||
* OpenID
|
* OpenID
|
||||||
*/
|
*/
|
||||||
if($config['use_openid']==1){
|
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
|
* Get all *.plugin.php files from the Modules and register the Pluginhooks
|
||||||
|
@ -250,7 +259,7 @@ function langstr($treffer)
|
||||||
* Its useful but "undocumented".
|
* Its useful but "undocumented".
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
$moduledir = dirname(dirname(__FILE__)).'/core/modules';
|
$moduledir = dirname(__FILE__, 2) .'/core/modules';
|
||||||
$modules = opendir($moduledir);
|
$modules = opendir($moduledir);
|
||||||
while ($mods = readdir($modules)) {
|
while ($mods = readdir($modules)) {
|
||||||
if (preg_match('/^.*?\.class.php$/', $mods)) {
|
if (preg_match('/^.*?\.class.php$/', $mods)) {
|
||||||
|
@ -258,5 +267,3 @@ while ($mods = readdir($modules)) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@closedir($modules);
|
@closedir($modules);
|
||||||
|
|
||||||
?>
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* Project: astat - simple site engine
|
* Project: BeCast WebEngine - simple site engine
|
||||||
* File: /inc/admin.class.php
|
* File: /inc/admin.class.php
|
||||||
*
|
*
|
||||||
* This library is free software; you can redistribute it and/or
|
* 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
|
* License along with this library; if not, write to the Free Software
|
||||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
* 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 $
|
* @link http://www.becast.at
|
||||||
* @copyright 2009 becast.at
|
* @copyright 2009-2025 becast.at
|
||||||
* @author Bernhard Jaud <bernhard at becast dot 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
|
* @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"]["name"]="Admin Class";
|
||||||
$module["admin"]["ver"]="0.2.4";
|
$module["admin"]["ver"]="0.2.5";
|
||||||
class admin {
|
class admin {
|
||||||
|
|
||||||
var $module_=array();
|
var $module_=array();
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
<?php
|
<?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
|
* File: /inc/cache.class.php
|
||||||
*
|
*
|
||||||
* This library is free software; you can redistribute it and/or
|
* This library is free software; you can redistribute it and/or
|
||||||
|
@ -17,13 +19,13 @@
|
||||||
* License along with this library; if not, write to the Free Software
|
* License along with this library; if not, write to the Free Software
|
||||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
*
|
*
|
||||||
* @link http://www.jaud.be
|
* @link http://www.becast.at
|
||||||
* @copyright 2025 becast.at
|
* @copyright 2009-2025 becast.at
|
||||||
* @author Bernhard Jaud <bernhard at becast dot 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
|
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
|
||||||
* @version $Id$
|
* @version $Id$
|
||||||
*/
|
*/
|
||||||
/*
|
/*
|
||||||
Already defined by PHP. I'll leave it here for Info
|
Already defined by PHP. I'll leave it here for Info
|
||||||
define("LOG_EMERG", 0);
|
define("LOG_EMERG", 0);
|
||||||
|
@ -34,8 +36,7 @@ define("LOG_WARNING", 4);
|
||||||
define("LOG_INFO", 6);
|
define("LOG_INFO", 6);
|
||||||
define("LOG_DEBUG", 7);
|
define("LOG_DEBUG", 7);
|
||||||
*/
|
*/
|
||||||
$module["cache"]["name"]="Cache Class";
|
|
||||||
$module["cache"]["ver"]="0.9.10";
|
|
||||||
class cache {
|
class cache {
|
||||||
var $server;
|
var $server;
|
||||||
var $prefix;
|
var $prefix;
|
||||||
|
@ -85,9 +86,12 @@ class cache {
|
||||||
$this->obj->quit();
|
$this->obj->quit();
|
||||||
}
|
}
|
||||||
|
|
||||||
function set($key,$var,$expiration=null){
|
function set($key,$var,$exp=null): void
|
||||||
if($expriation=null){
|
{
|
||||||
$expriation=$this->exp;
|
if($exp==null){
|
||||||
|
$expiration = $this->exp;
|
||||||
|
}else{
|
||||||
|
$expiration = $exp;
|
||||||
}
|
}
|
||||||
$this->obj->set($this->prefix.$key,$var,$expiration);
|
$this->obj->set($this->prefix.$key,$var,$expiration);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* Project: astat - simple site engine
|
* Project: BeCast WebEngine - simple site engine
|
||||||
* File: /inc/core.class.php
|
* File: /inc/core.class.php
|
||||||
*
|
*
|
||||||
* This library is free software; you can redistribute it and/or
|
* 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
|
* License along with this library; if not, write to the Free Software
|
||||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
* 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 $
|
* @link http://www.becast.at
|
||||||
* @copyright 2025 becast.at
|
* @copyright 2009 - 2025 becast.at
|
||||||
* @author Bernhard Jaud <bernhard at becast dot 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
|
* @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']['name']='Core Class';
|
||||||
$module['core']['ver']='0.9.81';
|
$module['core']['ver']='1.0.0';
|
||||||
|
|
||||||
class Core{
|
class Core{
|
||||||
|
|
||||||
|
@ -84,7 +84,7 @@ class Core{
|
||||||
*
|
*
|
||||||
* @var string
|
* @var string
|
||||||
*/
|
*/
|
||||||
var $ver_minor='0';
|
var $ver_minor='1';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
@ -100,7 +100,7 @@ class Core{
|
||||||
*
|
*
|
||||||
* @var string
|
* @var string
|
||||||
*/
|
*/
|
||||||
var $ver_codename='Antiochos';
|
var $ver_codename='Tim';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
@ -516,7 +516,7 @@ class Core{
|
||||||
* Renders the Page
|
* Renders the Page
|
||||||
*
|
*
|
||||||
* @param string $content The content for 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 $minimal_tpl Custom minimal template
|
||||||
* @param string $header_tpl Custom header template
|
* @param string $header_tpl Custom header template
|
||||||
* @param string $footer_tpl Custom footer template
|
* @param string $footer_tpl Custom footer template
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
$module["datacache"]["name"]="Datacache Module";
|
$module["datacache"]["name"]="Datacache Module";
|
||||||
$module["datacache"]["ver"]="0.1.0";
|
$module["datacache"]["ver"]="0.1.0";
|
||||||
/**
|
/**
|
||||||
* Project: astat - simple site engine
|
* Project: BeCast WebEngine - simple site engine
|
||||||
* File: /inc/datacache.class.php
|
* File: /inc/datacache.class.php
|
||||||
*
|
*
|
||||||
* This library is free software; you can redistribute it and/or
|
* This library is free software; you can redistribute it and/or
|
||||||
|
@ -19,13 +19,13 @@ $module["datacache"]["ver"]="0.1.0";
|
||||||
* License along with this library; if not, write to the Free Software
|
* License along with this library; if not, write to the Free Software
|
||||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
*
|
*
|
||||||
* @link http://www.astat.org SVN: $URL$
|
* @link http://www.becast.at
|
||||||
* @copyright 2010 becast.at
|
* @copyright 2009-2025 becast.at
|
||||||
* @author Bernhard Jaud <bernhard at becast dot 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
|
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
|
||||||
* @version $Id$
|
* @version $Id$
|
||||||
*/
|
*/
|
||||||
class datacache {
|
class datacache {
|
||||||
|
|
||||||
var $data = array();
|
var $data = array();
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
<?php
|
<?php
|
||||||
$module["functions"]["name"]="Functions Module";
|
$module["functions"]["name"]="Functions Module";
|
||||||
$module["functions"]["ver"]="1.0.0";
|
$module["functions"]["ver"]="1.0.1";
|
||||||
/**
|
/**
|
||||||
* Project: astat - simple site engine
|
* Project: BeCast WebEngine - simple site engine
|
||||||
* File: /inc/sessions.class.php
|
* File: /inc/functions.class.php
|
||||||
*
|
*
|
||||||
* This library is free software; you can redistribute it and/or
|
* This library is free software; you can redistribute it and/or
|
||||||
* modify it under the terms of the GNU Lesser General Public
|
* 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
|
* License along with this library; if not, write to the Free Software
|
||||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
* 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 $
|
* @link http://www.becast.at
|
||||||
* @copyright 2010 becast.at
|
* @copyright 2010-2025 becast.at
|
||||||
* @author Bernhard Jaud <bernhard at becast dot 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
|
* @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 {
|
class functions {
|
||||||
|
|
||||||
|
@ -120,7 +120,9 @@ class functions {
|
||||||
function get_ip(){
|
function get_ip(){
|
||||||
global $config;
|
global $config;
|
||||||
$ip = strtolower($_SERVER['REMOTE_ADDR']);
|
$ip = strtolower($_SERVER['REMOTE_ADDR']);
|
||||||
|
if(empty($config['ip_forwarded_check'])){
|
||||||
|
$config['ip_forwarded_check'] = false;
|
||||||
|
}
|
||||||
if($config['ip_forwarded_check'])
|
if($config['ip_forwarded_check'])
|
||||||
{
|
{
|
||||||
$addresses = array();
|
$addresses = array();
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
<?php
|
<?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
|
* File: /inc/lang.class.php
|
||||||
*
|
*
|
||||||
* This library is free software; you can redistribute it and/or
|
* 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
|
* License along with this library; if not, write to the Free Software
|
||||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
*
|
*
|
||||||
* @link http://www.astat.org SVN: $URL: $
|
* @link http://www.becast.at
|
||||||
* @copyright 2025 becast.at
|
* @copyright 2009-2025 becast.at
|
||||||
* @author Bernhard Jaud <bernhard at becast dot 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
|
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
|
||||||
* @version $Id$
|
* @version $Id$
|
||||||
*/
|
*/
|
||||||
$module["lang"]["name"]="Language Class";
|
|
||||||
$module["lang"]["ver"]="0.1.1";
|
|
||||||
|
|
||||||
class lang{
|
class lang{
|
||||||
var $langname=array('de'=>'Deutsch','en'=>'English');
|
var $langname=array('de'=>'Deutsch','en'=>'English');
|
||||||
var $language;
|
var $language;
|
||||||
var $languagedir;
|
var $languagedir;
|
||||||
var $lf;
|
var array $langdata;
|
||||||
|
|
||||||
function __construct($languagedir='/languages/'){
|
function __construct($languagedir='/languages/'){
|
||||||
$this->languagedir = dirname(dirname(__FILE__)).'/languages/';
|
$this->languagedir = dirname(dirname(__FILE__)).'/languages/';
|
||||||
}
|
}
|
||||||
|
|
||||||
function setlang($language){
|
function setlang($language): void
|
||||||
global $config, $error, $db, $log, $core, $plugin, $lang;
|
{
|
||||||
|
global $config;
|
||||||
unset($this->language);
|
unset($this->language);
|
||||||
unset($this->lf);
|
unset($this->langdata);
|
||||||
if(!$language || $language==''){
|
if(!$language || $language==''){
|
||||||
$language=$config['lang'];
|
$language=$config['lang'];
|
||||||
if(!$language){
|
if(!$language){
|
||||||
|
@ -51,8 +53,10 @@ class lang{
|
||||||
}else{
|
}else{
|
||||||
$this->language=$language;
|
$this->language=$language;
|
||||||
}
|
}
|
||||||
include_once $this->languagedir.$this->language.'.lang.php';
|
require_once $this->languagedir.$this->language.'.lang.php';
|
||||||
$this->lf=$lf;
|
if (isset($lf)) {
|
||||||
|
$this->langdata = $lf;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function getlanguages(){
|
function getlanguages(){
|
||||||
|
@ -71,8 +75,8 @@ class lang{
|
||||||
}
|
}
|
||||||
|
|
||||||
function _($string){
|
function _($string){
|
||||||
if(isset($this->lf[$string])){
|
if(isset($this->langdata[$string])){
|
||||||
return($this->lf[$string]);
|
return($this->langdata[$string]);
|
||||||
}else{
|
}else{
|
||||||
return($string);
|
return($string);
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,31 +18,31 @@
|
||||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
*
|
*
|
||||||
* @link http://www.becast.at
|
* @link http://www.becast.at
|
||||||
* @copyright 2009 becast.at
|
* @copyright 2009-2025 becast.at
|
||||||
* @author Bernhard Jaud <bernhard at becast dot 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
|
* @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"]["name"]="Panel Class";
|
||||||
$module["panel"]["ver"]="0.3.4";
|
$module["panel"]["ver"]="0.3.6";
|
||||||
class panel {
|
class panel {
|
||||||
var $sidebar="";
|
var string $sidebar="";
|
||||||
var $page="";
|
var string $page="";
|
||||||
var $bodyext="";
|
var string $bodyext="";
|
||||||
var $title="";
|
var string $title="";
|
||||||
var $content="";
|
var string $content="";
|
||||||
var $meta="";
|
var string $meta="";
|
||||||
var $form="";
|
var string $form="";
|
||||||
var $foot="";
|
var string $foot="";
|
||||||
var $head="";
|
var string $head="";
|
||||||
var $menu_items ="";
|
var string $menu_items ="";
|
||||||
|
|
||||||
function page($additional_title="",$meta=""){
|
function page($additional_title="",$meta=""){
|
||||||
global $config,$db,$core;
|
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">
|
return '<!DOCTYPE html>
|
||||||
<html>
|
<html lang="de">
|
||||||
<head>
|
<head>
|
||||||
<title>'.$config['sitetitle'].'</title>
|
<title>'.$config['sitetitle'].'</title>
|
||||||
<link rel="stylesheet" type="text/css" href="admin.css" />
|
<link rel="stylesheet" type="text/css" href="admin.css" />
|
||||||
|
@ -77,24 +77,26 @@ class panel {
|
||||||
exit();
|
exit();
|
||||||
}
|
}
|
||||||
|
|
||||||
function menu_item($panel,$text, $img=""){
|
function menu_item($panel,$text, $img=""): void
|
||||||
|
{
|
||||||
global $config, $userdata, $userinfo, $session, $meta;
|
global $config, $userdata, $userinfo, $session, $meta;
|
||||||
if($panel=="group_only"){
|
if($panel=="group_only"){
|
||||||
$this->menu_items.="<li><strong>".$text."</strong></li>";
|
$this->menu_items.="<li><strong>".$text."</strong></li>";
|
||||||
}elseif($panel=="admin_home"){
|
}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"){
|
}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{
|
}else{
|
||||||
if($img!=""){
|
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{
|
}else{
|
||||||
$this->menu_items.="<li><a href=\"".$config["path"]."/admin/index.php?panel=".$panel."\">".$text."</a></li>";
|
$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;
|
global $config,$session,$lang;
|
||||||
$session->page_begin("Admin Message", True);
|
$session->page_begin("Admin Message", True);
|
||||||
if($panel!="" && $redirect){
|
if($panel!="" && $redirect){
|
||||||
|
@ -111,7 +113,8 @@ class panel {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function menu(){
|
function menu(): string
|
||||||
|
{
|
||||||
|
|
||||||
return '<div id="menu">
|
return '<div id="menu">
|
||||||
<ul>'.$this->menu_items.'</ul></div>';
|
<ul>'.$this->menu_items.'</ul></div>';
|
||||||
|
@ -120,8 +123,8 @@ class panel {
|
||||||
|
|
||||||
function form ($args = array(),$return=FALSE,$extra=""){
|
function form ($args = array(),$return=FALSE,$extra=""){
|
||||||
|
|
||||||
$method = $args["method"] ? $args["method"] : 'post';
|
$method = $args["method"] ?? 'POST';
|
||||||
$action = $args["action"] ? $args["action"] : $_SERVER['PHP_SELF'];
|
$action = $args["action"] ?? $_SERVER['PHP_SELF'];
|
||||||
$form = '<form action="' .$action. '" method="' .$method. '"' .$extra. '>';
|
$form = '<form action="' .$action. '" method="' .$method. '"' .$extra. '>';
|
||||||
if(!$return){
|
if(!$return){
|
||||||
$this->content .= $form;
|
$this->content .= $form;
|
||||||
|
@ -129,7 +132,7 @@ class panel {
|
||||||
return $form;
|
return $form;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
function formClose ()
|
function formClose ($return=FALSE)
|
||||||
{
|
{
|
||||||
|
|
||||||
$form = '</form>';
|
$form = '</form>';
|
||||||
|
@ -200,7 +203,7 @@ class panel {
|
||||||
}
|
}
|
||||||
function submit ($args=array(),$extra="",$return=FALSE)
|
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
|
$fld = '<input type="submit" name="'.$name.'" ' .$extra. ' />'; // html: form submit button
|
||||||
if(!$return){
|
if(!$return){
|
||||||
$this->content .= $fld;
|
$this->content .= $fld;
|
||||||
|
@ -214,10 +217,10 @@ class panel {
|
||||||
*/
|
*/
|
||||||
function textarea ($args = array(),$extra="",$return=FALSE)
|
function textarea ($args = array(),$extra="",$return=FALSE)
|
||||||
{
|
{
|
||||||
$name = $args["name"] ? $args["name"] : 'field';
|
$name = $args["name"] ?? 'field';
|
||||||
$rows = $args["rows"] ? $args["rows"] : '3';
|
$rows = $args["rows"] ?? '3';
|
||||||
$cols = $args["cols"] ? $args["cols"] : '30';
|
$cols = $args["cols"] ?? '30';
|
||||||
$text = $args["value"] ? $args["value"] : '';
|
$text = $args["value"] ?? '';
|
||||||
|
|
||||||
$fld = '<textarea name="' .$name. '" rows="' .$rows. '" cols="' .$cols. '"' .$extra. '>' .$text. '</textarea>';
|
$fld = '<textarea name="' .$name. '" rows="' .$rows. '" cols="' .$cols. '"' .$extra. '>' .$text. '</textarea>';
|
||||||
if(!$return){
|
if(!$return){
|
||||||
|
|
|
@ -25,9 +25,9 @@ $module["module"]["name"]="Plugin Class";
|
||||||
$module["module"]["ver"]="0.1.1";
|
$module["module"]["ver"]="0.1.1";
|
||||||
class plugins{
|
class plugins{
|
||||||
|
|
||||||
var $hooks;
|
var array $hooks;
|
||||||
var $current_hook;
|
var string $current_hook;
|
||||||
var $plugin_=array();
|
var array $plugin_=array();
|
||||||
|
|
||||||
function load_plugins($region='G'){
|
function load_plugins($region='G'){
|
||||||
global $config, $db;
|
global $config, $db;
|
||||||
|
@ -63,6 +63,9 @@ class plugins{
|
||||||
|
|
||||||
|
|
||||||
function run_hook($name,$variables=array()) {
|
function run_hook($name,$variables=array()) {
|
||||||
|
if(empty($this->hooks)){
|
||||||
|
return false;
|
||||||
|
}
|
||||||
if(array_key_exists($name,$this->hooks)){
|
if(array_key_exists($name,$this->hooks)){
|
||||||
if(!is_array($this->hooks[$name]))
|
if(!is_array($this->hooks[$name]))
|
||||||
{
|
{
|
||||||
|
@ -92,6 +95,7 @@ class plugins{
|
||||||
$this->current_hook = '';
|
$this->current_hook = '';
|
||||||
return $return;
|
return $return;
|
||||||
}
|
}
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
<?php
|
<?php
|
||||||
$module["session"]["name"]="Sessionmanagement Module";
|
$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
|
* File: /inc/sessions.class.php
|
||||||
*
|
*
|
||||||
* This library is free software; you can redistribute it and/or
|
* This library is free software; you can redistribute it and/or
|
||||||
|
@ -19,13 +19,13 @@ $module["session"]["ver"]="0.9.1";
|
||||||
* License along with this library; if not, write to the Free Software
|
* License along with this library; if not, write to the Free Software
|
||||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
* 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 $
|
* @link http://www.becast.at
|
||||||
* @copyright 2010 becast.at
|
* @copyright 2009-2025 becast.at
|
||||||
* @author Bernhard Jaud <bernhard at becast dot 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
|
* @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 {
|
class session {
|
||||||
|
|
||||||
var $sid = 0;
|
var $sid = 0;
|
||||||
|
@ -38,7 +38,7 @@ class session {
|
||||||
function page_begin($page = "UNDEFINED", $needlogin = TRUE){
|
function page_begin($page = "UNDEFINED", $needlogin = TRUE){
|
||||||
global $config, $db, $log, $core, $lang, $plugin, $functions;
|
global $config, $db, $log, $core, $lang, $plugin, $functions;
|
||||||
$plugin->run_hook('page_begin_start',array('page'=>$page,'needlogin'=>$needlogin));
|
$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->ip = $functions->get_ip();
|
||||||
$this->packip = $functions->my_inet_pton($this->ip);
|
$this->packip = $functions->my_inet_pton($this->ip);
|
||||||
$this->useragent = $_SERVER["HTTP_USER_AGENT"];
|
$this->useragent = $_SERVER["HTTP_USER_AGENT"];
|
||||||
|
|
10
index.php
10
index.php
|
@ -1,6 +1,6 @@
|
||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* Project: astat - simple site engine
|
* Project: BeCast WebEngine - simple site engine
|
||||||
* File: index.php
|
* File: index.php
|
||||||
*
|
*
|
||||||
* This library is free software; you can redistribute it and/or
|
* 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
|
* License along with this library; if not, write to the Free Software
|
||||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
* 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 $
|
* @link http://www.becast.at
|
||||||
* @copyright 2009 becast.at
|
* @copyright 2009-2025 becast.at
|
||||||
* @author Bernhard Jaud <bernhard at becast dot 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
|
* @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);
|
ini_set('display_errors', 1);
|
||||||
|
|
|
@ -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ü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;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
?>
|
|
|
@ -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ü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();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
?>
|
|
|
@ -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ändert!',TRUE,'edit_news');
|
|
||||||
}else{
|
|
||||||
$fail='<span style="text-align: center; color: red;">Du musst alle Felder ausfü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öscht!','Die News wurden erfolgreich gelö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öschen? ")" href="'.$config['path'].'/admin/index.php?panel=edit_news&action=delete&id='.$u['id'].'"><img src="'.$config['path'].'/admin/images/icons/delete.png" /></a> <a href="'.$config['path'].'/admin/index.php?panel=edit_news&action=edit&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;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
?>
|
|
|
@ -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ö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öscht!","Die Kategorie wurde erfolgreich gelö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öschen? ')\" href=\"".$config["path"]."/admin/index.php?panel=editcategory_news&action=delete&id=".$u["id"]."\"><img src=\"".$config["path"]."/admin/images/icons/delete.png\" /></a> <a href=\"".$config["path"]."/admin/index.php?panel=editcategory_news&action=edit&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;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
?>
|
|
|
@ -1,5 +1,6 @@
|
||||||
<?php
|
<?php
|
||||||
If (!defined("in_astat")) {
|
global $session;
|
||||||
|
If (!defined("INBCWE")) {
|
||||||
die("Dieses Script kann nicht ausserhalb des Frameworks laufen!");
|
die("Dieses Script kann nicht ausserhalb des Frameworks laufen!");
|
||||||
}
|
}
|
||||||
$session->page_begin("PM Module", FALSE);
|
$session->page_begin("PM Module", FALSE);
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
class module_ajaxpm extends admin_module{
|
class module_ajaxpm extends admin_module{
|
||||||
|
|
||||||
function admin_panels(){
|
function admin_panels(){
|
||||||
return "";
|
return array();
|
||||||
}
|
}
|
||||||
|
|
||||||
function get_info(){
|
function get_info(){
|
||||||
|
@ -12,6 +12,7 @@ class module_ajaxpm extends admin_module{
|
||||||
$info["author"]="BeCast";
|
$info["author"]="BeCast";
|
||||||
$info["version"]="1.0.1";
|
$info["version"]="1.0.1";
|
||||||
$info["url"]="http://www.becast.at";
|
$info["url"]="http://www.becast.at";
|
||||||
|
$info["depends"]='mybb_bridge';
|
||||||
return $info;
|
return $info;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<?php
|
<?php
|
||||||
If (!defined("in_astat")) {
|
If (!defined("INBCWE")) {
|
||||||
die("Dieses Script kann nicht ausserhalb des Frameworks laufen!");
|
die("Dieses Script kann nicht ausserhalb des Frameworks laufen!");
|
||||||
}
|
}
|
||||||
class plugins_ajaxpm{
|
class plugins_ajaxpm{
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<?php
|
<?php global $session;
|
||||||
/**
|
/**
|
||||||
* Project: astat - simple site engine
|
* Project: BeCast WebEngine - simple site engine
|
||||||
* File: /modules/mybb/admin.apnl.php
|
* File: /modules/chat/manage.apnl.php
|
||||||
*
|
*
|
||||||
* This library is free software; you can redistribute it and/or
|
* This library is free software; you can redistribute it and/or
|
||||||
* modify it under the terms of the GNU Lesser General Public
|
* 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
|
* License along with this library; if not, write to the Free Software
|
||||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
*
|
*
|
||||||
* @link http://www.astat.org SVN: $URL$
|
* @link http://www.becast.at
|
||||||
* @copyright 2010 becast.at
|
* @copyright 2010-2025 becast.at
|
||||||
* @author Bernhard Jaud <bernhard at becast dot 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
|
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
|
||||||
* @version $Id$
|
* @version $Id$
|
||||||
*/
|
*/
|
||||||
If (!defined("in_BL_ADMIN")) {
|
If (!defined("IN_BCWE_ADMIN")) {
|
||||||
die("Dieses Script kann nicht ausserhalb des Frameworks laufen!");
|
die("Dieses Script kann nicht ausserhalb des Frameworks laufen!");
|
||||||
}
|
}
|
||||||
$session->page_begin("chat_admin", True);
|
$session->page_begin("chat_admin", True);
|
||||||
|
|
|
@ -1,9 +1,10 @@
|
||||||
<?php
|
<?php
|
||||||
If (!defined("in_astat")) {
|
global $session;
|
||||||
|
If (!defined("INBCWE")) {
|
||||||
die("Dieses Script kann nicht ausserhalb des Frameworks laufen!");
|
die("Dieses Script kann nicht ausserhalb des Frameworks laufen!");
|
||||||
}
|
}
|
||||||
$addnav["right"]=FALSE;
|
$addnav["right"]=FALSE;
|
||||||
$session->page_begin("Text Module", FALSE);
|
$session->page_begin("Chat Module", FALSE);
|
||||||
|
|
||||||
class chat extends ajax_module{
|
class chat extends ajax_module{
|
||||||
|
|
||||||
|
|
|
@ -39,7 +39,7 @@ class module_chat extends admin_module{
|
||||||
$cid=$db->last_id();
|
$cid=$db->last_id();
|
||||||
$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
|
||||||
('LOGINKEY', 'zuzfshgw8qitr813841492', 'Loginkey', 'Der Secure Key des Chats.', 'text', ".$cid."),
|
('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."),
|
('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.");");
|
('SMILIES_URL', 'http://forum.recensio.org/', 'Smilieurl', 'Die Url zu den Smiliebildern', 'text', ".$cid.");");
|
||||||
|
|
||||||
|
@ -88,5 +88,3 @@ class module_chat extends admin_module{
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
<?php
|
<?php
|
||||||
If (!defined("in_astat")) {
|
global $session;
|
||||||
|
If (!defined("INBCWE")) {
|
||||||
die("Dieses Script kann nicht ausserhalb des Frameworks laufen!");
|
die("Dieses Script kann nicht ausserhalb des Frameworks laufen!");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<?php
|
<?php
|
||||||
If (!defined("in_astat")) {
|
If (!defined("INBCWE")) {
|
||||||
die("Dieses Script kann nicht ausserhalb des Frameworks laufen!");
|
die("Dieses Script kann nicht ausserhalb des Frameworks laufen!");
|
||||||
}
|
}
|
||||||
include dirname(__FILE__).'/chatfunctions.inc.php';
|
include dirname(__FILE__).'/chatfunctions.inc.php';
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<?php
|
<?php
|
||||||
If (!defined("in_astat")) {
|
If (!defined("INBCWE")) {
|
||||||
die("Dieses Script kann nicht ausserhalb des Frameworks laufen!");
|
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_HEADER, false);
|
||||||
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
|
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
|
||||||
curl_setopt($ch, CURLOPT_TIMEOUT, 30);
|
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);
|
$fh=curl_exec($ch);
|
||||||
$httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
|
$httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
|
||||||
//var_dump(curl_getinfo($ch));
|
//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);
|
curl_close($ch);
|
||||||
|
|
||||||
if($httpCode >= 200 && $httpCode < 300){
|
if($httpCode >= 200 && $httpCode < 300){
|
||||||
|
@ -87,7 +87,7 @@ function get_user_room($username) {
|
||||||
curl_setopt($ch, CURLOPT_HEADER, false);
|
curl_setopt($ch, CURLOPT_HEADER, false);
|
||||||
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
|
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
|
||||||
curl_setopt($ch, CURLOPT_TIMEOUT, 30);
|
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);
|
$fh=curl_exec($ch);
|
||||||
$httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
|
$httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
|
||||||
curl_close($ch);
|
curl_close($ch);
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<?php
|
<?php
|
||||||
If (!defined("in_astat")) {
|
If (!defined("INBCWE")) {
|
||||||
die("Dieses Script kann nicht ausserhalb des Frameworks laufen!");
|
die("Dieses Script kann nicht ausserhalb des Frameworks laufen!");
|
||||||
}
|
}
|
||||||
$session->page_begin("Chatusers Module", FALSE);
|
$session->page_begin("Chatusers Module", FALSE);
|
||||||
|
|
|
@ -9,9 +9,9 @@ class module_chatusers extends admin_module{
|
||||||
function get_info(){
|
function get_info(){
|
||||||
$info["name"]="Chatusers AJAX";
|
$info["name"]="Chatusers AJAX";
|
||||||
$info["file"]="chatusers";
|
$info["file"]="chatusers";
|
||||||
$info["author"]="genuineparts";
|
$info["author"]="BeCast";
|
||||||
$info["version"]="1.0.0";
|
$info["version"]="1.0.0";
|
||||||
$info["url"]="http://www.ponytopia.net";
|
$info["url"]="http://www.becast.at";
|
||||||
$info["depends"]='chat';
|
$info["depends"]='chat';
|
||||||
return $info;
|
return $info;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<?php
|
<?php
|
||||||
If (!defined("in_astat")) {
|
If (!defined("INBCWE")) {
|
||||||
die("Dieses Script kann nicht ausserhalb des Frameworks laufen!");
|
die("Dieses Script kann nicht ausserhalb des Frameworks laufen!");
|
||||||
}
|
}
|
||||||
class plugins_chatusers{
|
class plugins_chatusers{
|
||||||
|
|
|
@ -3,22 +3,21 @@
|
||||||
class module_contact extends admin_module{
|
class module_contact extends admin_module{
|
||||||
|
|
||||||
function admin_panels(){
|
function admin_panels(){
|
||||||
#$panels=array(array("add_text","Text hinzufügen","page_add"),array("edit_text","Text editieren","page_edit"),array("group_only","Textkategorien"),array("addcategory_text","Kategorie hinzufügen","tag_blue_add"),array("editcategory_text","Kategorie editieren","tag_blue_edit"));
|
return array();
|
||||||
return $panels;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function get_info(){
|
function get_info(){
|
||||||
$info["name"]="Kontaktformular";
|
$info["name"]="Kontaktformular";
|
||||||
$info["file"]="contact";
|
$info["file"]="contact";
|
||||||
$info["author"]="astat";
|
$info["author"]="BeCast";
|
||||||
$info["version"]="1.0.0";
|
$info["version"]="1.0.1";
|
||||||
$info["url"]="http://www.astat.org";
|
$info["url"]="http://www.becast.at";
|
||||||
return $info;
|
return $info;
|
||||||
}
|
}
|
||||||
|
|
||||||
function install(){
|
function install(){
|
||||||
global $config, $db;
|
global $config, $db;
|
||||||
$db->query("INSERT INTO `" . $config["prefix"] . "config_categorys` (
|
$db->query("INSERT INTO `" . $config["prefix"] . "config_categories` (
|
||||||
`cid` ,
|
`cid` ,
|
||||||
`categoryname`
|
`categoryname`
|
||||||
)
|
)
|
||||||
|
|
|
@ -24,7 +24,7 @@
|
||||||
* @version $Id$
|
* @version $Id$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
If (!defined("in_astat")) {
|
If (!defined("INBCWE")) {
|
||||||
die("Dieses Script kann nicht ausserhalb des Frameworks laufen!");
|
die("Dieses Script kann nicht ausserhalb des Frameworks laufen!");
|
||||||
}
|
}
|
||||||
$session->page_begin("Contactform", FALSE);
|
$session->page_begin("Contactform", FALSE);
|
||||||
|
|
|
@ -24,7 +24,7 @@
|
||||||
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
|
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
|
||||||
* @version $Id$
|
* @version $Id$
|
||||||
*/
|
*/
|
||||||
If (!defined("in_astat")) {
|
If (!defined("INBCWE")) {
|
||||||
die("Dieses Script kann nicht ausserhalb des Frameworks laufen!");
|
die("Dieses Script kann nicht ausserhalb des Frameworks laufen!");
|
||||||
}
|
}
|
||||||
class plugins_mybb {
|
class plugins_mybb {
|
||||||
|
|
|
@ -7,7 +7,7 @@ class module_mybbnews extends admin_module{
|
||||||
$info["file"]="mybbnews";
|
$info["file"]="mybbnews";
|
||||||
$info["author"]="genuineparts";
|
$info["author"]="genuineparts";
|
||||||
$info["version"]="1.0.2";
|
$info["version"]="1.0.2";
|
||||||
$info["url"]="http://www.becast.ar";
|
$info["url"]="http://www.becast.at";
|
||||||
return $info;
|
return $info;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<?php
|
<?php
|
||||||
If (!defined("in_astat")) {
|
If (!defined("INBCWE")) {
|
||||||
die("Dieses Script kann nicht ausserhalb des Frameworks laufen!");
|
die("Dieses Script kann nicht ausserhalb des Frameworks laufen!");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* Project: astat - simple site engine
|
* Project: BeCast WebEngine - simple site engine
|
||||||
* File: /modules/news/add.apnl.php
|
* File: /modules/news/add.apnl.php
|
||||||
*
|
*
|
||||||
* This library is free software; you can redistribute it and/or
|
* 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
|
* License along with this library; if not, write to the Free Software
|
||||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
* 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 $
|
* @link http://www.becast.at
|
||||||
* @copyright 2009 becast.at
|
* @copyright 2009 - 2025 becast.at
|
||||||
* @author Bernhard Jaud <bernhard at becast dot 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
|
* @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!");
|
die("Dieses Script kann nicht ausserhalb des Frameworks laufen!");
|
||||||
}
|
}
|
||||||
$session->page_begin("add News", True);
|
$session->page_begin("add News", True);
|
||||||
|
|
|
@ -25,7 +25,7 @@
|
||||||
* @version $Id: addcategory.apnl.php 96 2010-02-17 21:56:41Z genuineparts $
|
* @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!");
|
die("Dieses Script kann nicht ausserhalb des Frameworks laufen!");
|
||||||
}
|
}
|
||||||
$session->page_begin("add news Category", True);
|
$session->page_begin("add news Category", True);
|
||||||
|
|
|
@ -24,7 +24,7 @@
|
||||||
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
|
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
|
||||||
* @version $Id: edit.apnl.php 96 2010-02-17 21:56:41Z genuineparts $
|
* @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!');
|
die('Dieses Script kann nicht ausserhalb des Frameworks laufen!');
|
||||||
}
|
}
|
||||||
$session->page_begin('edit News', True);
|
$session->page_begin('edit News', True);
|
||||||
|
|
|
@ -25,7 +25,7 @@
|
||||||
* @version $Id: editcategory.apnl.php 96 2010-02-17 21:56:41Z genuineparts $
|
* @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!");
|
die("Dieses Script kann nicht ausserhalb des Frameworks laufen!");
|
||||||
}
|
}
|
||||||
$session->page_begin("edit news category", True);
|
$session->page_begin("edit news category", True);
|
||||||
|
|
|
@ -10,9 +10,9 @@ class module_news extends admin_module{
|
||||||
function get_info(){
|
function get_info(){
|
||||||
$info["name"]="Newsmodul";
|
$info["name"]="Newsmodul";
|
||||||
$info["file"]="news";
|
$info["file"]="news";
|
||||||
$info["author"]="astat";
|
$info["author"]="BeCast";
|
||||||
$info["version"]="1.0.0";
|
$info["version"]="1.0.1";
|
||||||
$info["url"]="http://www.astat.org";
|
$info["url"]="http://www.becast.at";
|
||||||
return $info;
|
return $info;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<?php
|
<?php
|
||||||
If (!defined("in_astat")) {
|
If (!defined("INBCWE")) {
|
||||||
die("Dieses Script kann nicht ausserhalb des Frameworks laufen!");
|
die("Dieses Script kann nicht ausserhalb des Frameworks laufen!");
|
||||||
}
|
}
|
||||||
class plugins_mybbnews{
|
class plugins_mybbnews{
|
||||||
|
|
|
@ -10,9 +10,9 @@ class module_nickpage extends admin_module{
|
||||||
function get_info(){
|
function get_info(){
|
||||||
$info["name"]="Nickpages";
|
$info["name"]="Nickpages";
|
||||||
$info["file"]="nickpage";
|
$info["file"]="nickpage";
|
||||||
$info["author"]="astat";
|
$info["author"]="BeCast";
|
||||||
$info["version"]="1.0.0";
|
$info["version"]="1.0.1";
|
||||||
$info["url"]="http://www.astat.org";
|
$info["url"]="http://www.becast.at";
|
||||||
return $info;
|
return $info;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<?php
|
<?php global $session;
|
||||||
/**
|
/**
|
||||||
* Project: BeCast WebEngine - simple site engine
|
* Project: BeCast WebEngine - simple site engine
|
||||||
* File: /modules/nickpage/nickpage.output.php
|
* File: /modules/nickpage/nickpage.output.php
|
||||||
|
@ -24,7 +24,7 @@
|
||||||
* @version $Id$
|
* @version $Id$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
If (!defined("in_astat")) {
|
If (!defined("INBCWE")) {
|
||||||
die("Dieses Script kann nicht ausserhalb des Frameworks laufen!");
|
die("Dieses Script kann nicht ausserhalb des Frameworks laufen!");
|
||||||
}
|
}
|
||||||
$session->page_begin("Nickpage", FALSE);
|
$session->page_begin("Nickpage", FALSE);
|
||||||
|
@ -232,7 +232,7 @@ class nickpage extends module{
|
||||||
$filedir = $root.'/np_images/';
|
$filedir = $root.'/np_images/';
|
||||||
$size = 200;
|
$size = 200;
|
||||||
if(($userfile_size/1024)>250){
|
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){
|
if (isset($_FILES['np_picture']['name']) && $_FILES['np_picture']['name']!="" && !$err){
|
||||||
$prod_img = $filedir.$userfile_name;
|
$prod_img = $filedir.$userfile_name;
|
||||||
|
|
|
@ -24,7 +24,7 @@
|
||||||
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
|
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
|
||||||
* @version $Id$
|
* @version $Id$
|
||||||
*/
|
*/
|
||||||
If (!defined("in_astat")) {
|
If (!defined("INBCWE")) {
|
||||||
die("Dieses Script kann nicht ausserhalb des Frameworks laufen!");
|
die("Dieses Script kann nicht ausserhalb des Frameworks laufen!");
|
||||||
}
|
}
|
||||||
class plugins_nickpage{
|
class plugins_nickpage{
|
||||||
|
|
|
@ -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;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
?>
|
|
|
@ -3,16 +3,15 @@
|
||||||
class module_search extends admin_module{
|
class module_search extends admin_module{
|
||||||
|
|
||||||
function admin_panels(){
|
function admin_panels(){
|
||||||
//$panels=array(array("add_text","Text hinzufügen","page_add"),array("edit_text","Text editieren","page_edit"),array("group_only","Textkategorien"),array("addcategory_text","Kategorie hinzufügen","tag_blue_add"),array("editcategory_text","Kategorie editieren","tag_blue_edit"));
|
return array();
|
||||||
return $panels;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function get_info(){
|
function get_info(){
|
||||||
$info["name"]="Review Search";
|
$info["name"]="Review Search";
|
||||||
$info["file"]="search";
|
$info["file"]="search";
|
||||||
$info["author"]="astat";
|
$info["author"]="BeCast";
|
||||||
$info["version"]="1.0.0";
|
$info["version"]="1.0.1";
|
||||||
$info["url"]="http://www.astat.org";
|
$info["url"]="http://www.becast.at";
|
||||||
$info["depends"]='reviews';
|
$info["depends"]='reviews';
|
||||||
return $info;
|
return $info;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
<?php
|
<?php
|
||||||
If (!defined("in_astat")) {
|
global $session;
|
||||||
|
If (!defined("INBCWE")) {
|
||||||
die("Dieses Script kann nicht ausserhalb des Frameworks laufen!");
|
die("Dieses Script kann nicht ausserhalb des Frameworks laufen!");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<?php
|
<?php
|
||||||
If (!defined("in_BL")) {
|
If (!defined("INBCWE")) {
|
||||||
die("Dieses Script kann nicht ausserhalb des Frameworks laufen!");
|
die("Dieses Script kann nicht ausserhalb des Frameworks laufen!");
|
||||||
}
|
}
|
||||||
page_begin("Search", False);
|
page_begin("Search", False);
|
||||||
|
|
|
@ -24,7 +24,7 @@
|
||||||
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
|
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
|
||||||
* @version $Id$
|
* @version $Id$
|
||||||
*/
|
*/
|
||||||
If (!defined("in_BL_ADMIN")) {
|
If (!defined("IN_BCWE_ADMIN")) {
|
||||||
die("Dieses Script kann nicht ausserhalb des Frameworks laufen!");
|
die("Dieses Script kann nicht ausserhalb des Frameworks laufen!");
|
||||||
}
|
}
|
||||||
$session->page_begin("add Text", True);
|
$session->page_begin("add Text", True);
|
||||||
|
@ -81,7 +81,7 @@ class add_text_panel extends admin_module{
|
||||||
$panel->content.="<h3>Kategorien:</h3>
|
$panel->content.="<h3>Kategorien:</h3>
|
||||||
<table width=\"100%\">
|
<table width=\"100%\">
|
||||||
<tr>";
|
<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)){
|
while($row=$db->fetch_array($resultk)){
|
||||||
$navs[]=$row;
|
$navs[]=$row;
|
||||||
}
|
}
|
||||||
|
|
|
@ -25,7 +25,7 @@
|
||||||
* @version $Id$
|
* @version $Id$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
If (!defined("in_BL_ADMIN")) {
|
If (!defined("IN_BCWE_ADMIN")) {
|
||||||
die("Dieses Script kann nicht ausserhalb des Frameworks laufen!");
|
die("Dieses Script kann nicht ausserhalb des Frameworks laufen!");
|
||||||
}
|
}
|
||||||
$session->page_begin("add Category", True);
|
$session->page_begin("add Category", True);
|
||||||
|
@ -52,7 +52,7 @@ class addcategory_text_panel extends admin_module{
|
||||||
}
|
}
|
||||||
$categoryname=$db->escape($_POST['categoryname']);
|
$categoryname=$db->escape($_POST['categoryname']);
|
||||||
$active=$db->escape($_POST['active']);
|
$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");
|
$panel->admin_message("Danke", "Die Kategorie wurde erfolgreich eingetragen!.",TRUE,"addcategory_text");
|
||||||
}else{
|
}else{
|
||||||
$fail="<span style=\"text-align: center; color: red;\">Der Kategoriename muss angegeben werden!</span>";
|
$fail="<span style=\"text-align: center; color: red;\">Der Kategoriename muss angegeben werden!</span>";
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<?php
|
<?php global $session;
|
||||||
/**
|
/**
|
||||||
* Project: astat - simple site engine
|
* Project: astat - simple site engine
|
||||||
* File: /modules/text/edit.apnl.php
|
* File: /modules/text/edit.apnl.php
|
||||||
|
@ -24,7 +24,7 @@
|
||||||
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
|
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
|
||||||
* @version $Id$
|
* @version $Id$
|
||||||
*/
|
*/
|
||||||
If (!defined("in_BL_ADMIN")) {
|
If (!defined("IN_BCWE_ADMIN")) {
|
||||||
die("Dieses Script kann nicht ausserhalb des Frameworks laufen!");
|
die("Dieses Script kann nicht ausserhalb des Frameworks laufen!");
|
||||||
}
|
}
|
||||||
$session->page_begin("edit Text", True);
|
$session->page_begin("edit Text", True);
|
||||||
|
@ -91,7 +91,7 @@ class edit_text_panel extends admin_module{
|
||||||
while($rowa=$db->fetch_array($resultn)){
|
while($rowa=$db->fetch_array($resultn)){
|
||||||
$cat[$rowa["c_id"]]=TRUE;
|
$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)){
|
while($row=$db->fetch_array($resultk)){
|
||||||
if($cat[$row["id"]]==TRUE){
|
if($cat[$row["id"]]==TRUE){
|
||||||
$row["checked"]="checked=\"checked\"";
|
$row["checked"]="checked=\"checked\"";
|
||||||
|
@ -132,7 +132,7 @@ class edit_text_panel extends admin_module{
|
||||||
}else{
|
}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`");
|
$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)){
|
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)){
|
while($crow=$db->fetch_array($cresult, $db->ASSOC)){
|
||||||
if(!$row["categoryname"]){
|
if(!$row["categoryname"]){
|
||||||
$row["categoryname"]=$crow["categoryname"];
|
$row["categoryname"]=$crow["categoryname"];
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<?php
|
<?php global $session;
|
||||||
/**
|
/**
|
||||||
* Project: BeCast WebEngine - simple site engine
|
* Project: BeCast WebEngine - simple site engine
|
||||||
* File: /modules/text/editcategory.apnl.php
|
* File: /modules/text/editcategory.apnl.php
|
||||||
|
@ -25,7 +25,7 @@
|
||||||
* @version $Id$
|
* @version $Id$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
If (!defined("in_BL_ADMIN")) {
|
If (!defined("IN_BCWE_ADMIN")) {
|
||||||
die("Dieses Script kann nicht ausserhalb des Frameworks laufen!");
|
die("Dieses Script kann nicht ausserhalb des Frameworks laufen!");
|
||||||
}
|
}
|
||||||
$session->page_begin("edit category", True);
|
$session->page_begin("edit category", True);
|
||||||
|
@ -50,12 +50,12 @@ class editcategory_text_panel extends admin_module{
|
||||||
if($ret!==TRUE){
|
if($ret!==TRUE){
|
||||||
$panel->admin_message("Fehler", "Das Bild konnte nicht hochgeladen wrden <br /> Der Fehler war: ". $ret,TRUE,"editcategory_text");
|
$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);
|
$file=$db->fetch_array($result);
|
||||||
@unlink($filedir.$file['picture']);
|
@unlink($filedir.$file['picture']);
|
||||||
$db->query("UPDATE `" . $config["prefix"]. "article_categorys` SET `picture`='".$userfile_name."' WHERE `id`='".intval($_POST["id"])."'");
|
$db->query("UPDATE `" . $config["prefix"]. "article_categorys` SET `picture`='".$userfile_name."' WHERE `id`='".intval($_POST["id"])."'");
|
||||||
}elseif($_POST["delimg"]==1){
|
}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);
|
$file=$db->fetch_array($result);
|
||||||
@unlink($filedir.$file['picture']);
|
@unlink($filedir.$file['picture']);
|
||||||
$db->query("UPDATE `" . $config["prefix"]. "article_categorys` SET `picture`='' WHERE `id`='".intval($_POST["id"])."'") or die($db->error());
|
$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']!=""){
|
}elseif(isset($_GET['id'])&& $_GET['id']!=""){
|
||||||
if($_GET['action']=="edit"){
|
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);
|
$_POST=$db->fetch_array($result);
|
||||||
/*$resultna=$db->query("SELECT id,name FROM " . $config["prefix"] . "menue");
|
/*$resultna=$db->query("SELECT id,name FROM " . $config["prefix"] . "menue");
|
||||||
while($rowa=$db->fetch_array($resultna)){
|
while($rowa=$db->fetch_array($resultna)){
|
||||||
|
@ -112,15 +112,15 @@ class editcategory_text_panel extends admin_module{
|
||||||
$panel->parse_page();
|
$panel->parse_page();
|
||||||
|
|
||||||
}elseif($_GET["action"]=="delete" && $_GET["id"]){
|
}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);
|
$row = $db->fetch_array($result);
|
||||||
@unlink($root.'/catimages/'.$row["picture"]);
|
@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öscht!","Die Kategorie wurde erfolgreich gelöscht.",True,"editcategory_text",3);
|
$panel->admin_message("Kategorie gelöscht!","Die Kategorie wurde erfolgreich gelöscht.",True,"editcategory_text",3);
|
||||||
}
|
}
|
||||||
|
|
||||||
}else{
|
}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)){
|
while($row=$db->fetch_array($result, $db->ASSOC)){
|
||||||
$articles[]=$row;
|
$articles[]=$row;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<?php
|
<?php
|
||||||
If (!defined("in_astat")) {
|
If (!defined("INBCWE")) {
|
||||||
die("Dieses Script kann nicht ausserhalb des Frameworks laufen!");
|
die("Dieses Script kann nicht ausserhalb des Frameworks laufen!");
|
||||||
}
|
}
|
||||||
$addnav["right"]=FALSE;
|
$addnav["right"]=FALSE;
|
||||||
|
|
|
@ -10,9 +10,9 @@ class module_text extends admin_module{
|
||||||
function get_info(){
|
function get_info(){
|
||||||
$info["name"]="Textverwaltung";
|
$info["name"]="Textverwaltung";
|
||||||
$info["file"]="text";
|
$info["file"]="text";
|
||||||
$info["author"]="astat";
|
$info["author"]="BeCast";
|
||||||
$info["version"]="1.0.1";
|
$info["version"]="1.0.1";
|
||||||
$info["url"]="http://www.astat.org";
|
$info["url"]="http://www.becast.at";
|
||||||
return $info;
|
return $info;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -36,7 +36,7 @@ class module_text extends admin_module{
|
||||||
KEY `eid` (`eid`)
|
KEY `eid` (`eid`)
|
||||||
) ENGINE=MyISAM");
|
) 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,
|
`id` int(11) NOT NULL auto_increment,
|
||||||
`categoryname` varchar(80) NOT NULL default '',
|
`categoryname` varchar(80) NOT NULL default '',
|
||||||
`picture` varchar(80) NOT NULL default '',
|
`picture` varchar(80) NOT NULL default '',
|
||||||
|
@ -68,7 +68,7 @@ class module_text extends admin_module{
|
||||||
function uninstall(){
|
function uninstall(){
|
||||||
global $config, $db;
|
global $config, $db;
|
||||||
$db->query("DROP TABLE `" . $config["prefix"] . "article`");
|
$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_category`");
|
||||||
$db->query("DROP TABLE `" . $config["prefix"] . "article_menue`");
|
$db->query("DROP TABLE `" . $config["prefix"] . "article_menue`");
|
||||||
@$this->recursive($_SERVER["DOCUMENT_ROOT"]."/catimages");
|
@$this->recursive($_SERVER["DOCUMENT_ROOT"]."/catimages");
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* Project: astat - simple site engine
|
* Project: BeCast WebEngine - simple site engine
|
||||||
* File: /modules/text/text.output.php
|
* File: /modules/text/text.output.php
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* 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
|
* License along with this library; if not, write to the Free Software
|
||||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
*
|
*
|
||||||
* @link http://www.astat.org SVN: $URL$
|
* @link http://www.becast.at
|
||||||
* @copyright 2009 becast.at
|
* @copyright 2010-2025 becast.at
|
||||||
* @author Bernhard Jaud <bernhard at becast dot 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
|
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
|
||||||
* @version $Id$
|
* @version $Id$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
If (!defined("in_astat")) {
|
If (!defined("INBCWE")) {
|
||||||
die("Dieses Script kann nicht ausserhalb des Frameworks laufen!");
|
die("Dieses Script kann nicht ausserhalb des Frameworks laufen!");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<?php
|
<?php
|
||||||
If (!defined("in_astat")) {
|
If (!defined("INBCWE")) {
|
||||||
die("Dieses Script kann nicht ausserhalb des Frameworks laufen!");
|
die("Dieses Script kann nicht ausserhalb des Frameworks laufen!");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<?php
|
<?php
|
||||||
If (!defined("in_BL")) {
|
If (!defined("INBCWE")) {
|
||||||
die("Dieses Script kann nicht ausserhalb des Frameworks laufen!");
|
die("Dieses Script kann nicht ausserhalb des Frameworks laufen!");
|
||||||
}
|
}
|
||||||
// Anzahl der Themen
|
// Anzahl der Themen
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<?php
|
<?php
|
||||||
If (!defined("in_astat")) {
|
If (!defined("INBCWE")) {
|
||||||
die("Dieses Script kann nicht ausserhalb des Frameworks laufen!");
|
die("Dieses Script kann nicht ausserhalb des Frameworks laufen!");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<?php
|
<?php
|
||||||
If (!defined("in_astat")) {
|
If (!defined("INBCWE")) {
|
||||||
die("Dieses Script kann nicht ausserhalb des Frameworks laufen!");
|
die("Dieses Script kann nicht ausserhalb des Frameworks laufen!");
|
||||||
}
|
}
|
||||||
$navtpl->assign('navtitle', "Suche");
|
$navtpl->assign('navtitle', "Suche");
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<?php
|
<?php
|
||||||
If (!defined("in_astat")) {
|
If (!defined("INBCWE")) {
|
||||||
die("Dieses Script kann nicht ausserhalb des Frameworks laufen!");
|
die("Dieses Script kann nicht ausserhalb des Frameworks laufen!");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -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');
|
|
||||||
|
|
||||||
?>
|
|
|
@ -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');
|
|
||||||
|
|
||||||
?>
|
|
78
test.php
78
test.php
|
@ -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>';
|
|
||||||
}*/
|
|
||||||
?>
|
|
Loading…
Add table
Add a link
Reference in a new issue