Initial commit
This commit is contained in:
commit
43ad32700c
7085 changed files with 447606 additions and 0 deletions
47
modules/search/.svn/all-wcprops
Normal file
47
modules/search/.svn/all-wcprops
Normal file
|
@ -0,0 +1,47 @@
|
|||
K 25
|
||||
svn:wc:ra_dav:version-url
|
||||
V 37
|
||||
/astat/!svn/ver/28/trunk/modules/text
|
||||
END
|
||||
editcategory.apnl.php
|
||||
K 25
|
||||
svn:wc:ra_dav:version-url
|
||||
V 59
|
||||
/astat/!svn/ver/28/trunk/modules/text/editcategory.apnl.php
|
||||
END
|
||||
edit.apnl.php
|
||||
K 25
|
||||
svn:wc:ra_dav:version-url
|
||||
V 50
|
||||
/astat/!svn/ver/1/trunk/modules/text/edit.apnl.php
|
||||
END
|
||||
addcategory.apnl.php
|
||||
K 25
|
||||
svn:wc:ra_dav:version-url
|
||||
V 58
|
||||
/astat/!svn/ver/27/trunk/modules/text/addcategory.apnl.php
|
||||
END
|
||||
add.apnl.php
|
||||
K 25
|
||||
svn:wc:ra_dav:version-url
|
||||
V 49
|
||||
/astat/!svn/ver/1/trunk/modules/text/add.apnl.php
|
||||
END
|
||||
text.output.php
|
||||
K 25
|
||||
svn:wc:ra_dav:version-url
|
||||
V 52
|
||||
/astat/!svn/ver/1/trunk/modules/text/text.output.php
|
||||
END
|
||||
text.ajax.php
|
||||
K 25
|
||||
svn:wc:ra_dav:version-url
|
||||
V 50
|
||||
/astat/!svn/ver/1/trunk/modules/text/text.ajax.php
|
||||
END
|
||||
text.module.php
|
||||
K 25
|
||||
svn:wc:ra_dav:version-url
|
||||
V 53
|
||||
/astat/!svn/ver/14/trunk/modules/text/text.module.php
|
||||
END
|
269
modules/search/.svn/entries
Normal file
269
modules/search/.svn/entries
Normal file
|
@ -0,0 +1,269 @@
|
|||
9
|
||||
|
||||
dir
|
||||
34
|
||||
http://svn.astat.org/astat/trunk/modules/text
|
||||
http://svn.astat.org/astat
|
||||
|
||||
|
||||
|
||||
2009-06-20T20:39:41.844643Z
|
||||
28
|
||||
genuineparts
|
||||
|
||||
|
||||
svn:special svn:externals svn:needs-lock
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
bb7ccd2a-c66b-0410-9765-967ca6f03dfc
|
||||
|
||||
editcategory.apnl.php
|
||||
file
|
||||
|
||||
|
||||
|
||||
|
||||
2009-06-20T20:39:42.000000Z
|
||||
fe76118b69f026ad0e11bf0962a28509
|
||||
2009-06-20T20:39:41.844643Z
|
||||
28
|
||||
genuineparts
|
||||
has-props
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
8846
|
||||
|
||||
edit.apnl.php
|
||||
file
|
||||
|
||||
|
||||
|
||||
|
||||
2009-06-08T19:44:32.000000Z
|
||||
c832b3308d21ca740c67b7baee200e12
|
||||
2009-06-07T19:12:55.973801Z
|
||||
1
|
||||
genuineparts
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
10791
|
||||
|
||||
addcategory.apnl.php
|
||||
file
|
||||
|
||||
|
||||
|
||||
|
||||
2009-06-20T20:39:21.000000Z
|
||||
73a64ebaff6e7fb2dc2252f08f91608c
|
||||
2009-06-20T20:39:21.011042Z
|
||||
27
|
||||
genuineparts
|
||||
has-props
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
3709
|
||||
|
||||
add.apnl.php
|
||||
file
|
||||
|
||||
|
||||
|
||||
|
||||
2009-06-08T19:44:32.000000Z
|
||||
e8e3153d6e8680aa9bc95e4f099e3ce6
|
||||
2009-06-07T19:12:55.973801Z
|
||||
1
|
||||
genuineparts
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
6229
|
||||
|
||||
text.output.php
|
||||
file
|
||||
|
||||
|
||||
|
||||
|
||||
2009-06-08T19:44:32.000000Z
|
||||
eb277605efa0f24bce022a4e6c372821
|
||||
2009-06-07T19:12:55.973801Z
|
||||
1
|
||||
genuineparts
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
2738
|
||||
|
||||
text.ajax.php
|
||||
file
|
||||
|
||||
|
||||
|
||||
|
||||
2009-06-08T19:44:32.000000Z
|
||||
d4baa8363fa76449a5ef3e0f94eb97bf
|
||||
2009-06-07T19:12:55.973801Z
|
||||
1
|
||||
genuineparts
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
730
|
||||
|
||||
templates
|
||||
dir
|
||||
|
||||
text.module.php
|
||||
file
|
||||
|
||||
|
||||
|
||||
|
||||
2009-06-09T18:33:52.000000Z
|
||||
f294c7363dde71fedbe4e927cc34c61d
|
||||
2009-06-09T19:52:12.605069Z
|
||||
14
|
||||
genuineparts
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
2771
|
||||
|
1
modules/search/.svn/format
Normal file
1
modules/search/.svn/format
Normal file
|
@ -0,0 +1 @@
|
|||
9
|
|
@ -0,0 +1,5 @@
|
|||
K 12
|
||||
svn:keywords
|
||||
V 6
|
||||
Id URL
|
||||
END
|
|
@ -0,0 +1,5 @@
|
|||
K 12
|
||||
svn:keywords
|
||||
V 6
|
||||
Id URL
|
||||
END
|
160
modules/search/.svn/text-base/add.apnl.php.svn-base
Normal file
160
modules/search/.svn/text-base/add.apnl.php.svn-base
Normal file
|
@ -0,0 +1,160 @@
|
|||
<?php
|
||||
If (!defined("in_BL_ADMIN")) {
|
||||
die("Dieses Script kann nicht ausserhalb des Frameworks laufen!");
|
||||
}
|
||||
$session->page_begin("add Text", True);
|
||||
|
||||
class add_text_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['url'])&& $_POST['url']!=""||isset($_POST['title'])&& $_POST['title']!=""){
|
||||
$url=$db->escape($_POST['url']);
|
||||
$title=$db->escape($_POST['title']);
|
||||
$mid=intval($_POST['menue']);
|
||||
$result = $db->query("SELECT count(id) as count FROM `" . $config["prefix"] . "article` WHERE `url`='".$url."'");
|
||||
$row = $db->fetch_array($result);
|
||||
if($row["count"]==0){
|
||||
$db->query("BEGIN");
|
||||
$db->query("INSERT INTO `" . $config["prefix"] . "article` (`text`,`date`,`author`,`menue`,`title`,`url`,`active`) VALUES ('".$_POST["text"]."','".time()."','".$session->userdata["uid"]."','".$mid."','".$title."','".$url."','".$_POST["active"]."')");
|
||||
$aid=$db->last_id();
|
||||
if($_POST["cats"]!=""){
|
||||
foreach($_POST["cats"] as $nid){
|
||||
$db->query("INSERT INTO `" . $config["prefix"] . "article_category` (`a_id`,`c_id`) VALUES ('".$aid."','".$nid."')");
|
||||
}
|
||||
}
|
||||
$db->query("COMMIT");
|
||||
$panel->admin_message("Danke", "Der Artikel wurde erfolgreich eingetragen!.",TRUE,"add_text");
|
||||
}else{
|
||||
$fail="<span style=\"text-align: center; color: red;\">Diese URL ist vergeben!</span>";
|
||||
}
|
||||
}else{
|
||||
$fail="<span style=\"text-align: center; color: red;\">Du musst alle Felder ausfüllen!</span>";
|
||||
}
|
||||
}elseif(!isset($_POST['send']) || $fail){
|
||||
$panel->title="Text hinzufügen";
|
||||
$panel->form(array("action"=>$config["path"]."/admin/index.php?panel=add_text"));
|
||||
if($fail){
|
||||
$panel->content.=$fail;
|
||||
}
|
||||
$panel->content.="<h3>Titel:</h3>";
|
||||
$panel->field(array("name"=>"title","typ"=>"text","value"=>$_POST["title"]));
|
||||
$panel->content.="<h3>Url:</h3>";
|
||||
$panel->field(array("name"=>"url","typ"=>"text","value"=>$_POST["url"]),"id=\"url\"");
|
||||
$panel->content.=".html";
|
||||
$panel->content.=" <span id=\"msgbox\" style=\"display:none\"></span><br />";
|
||||
$resultc=$db->query("SELECT `id`,`name` FROM `" . $config["prefix"] . "article_menue`") or die($db->error());
|
||||
$karray["Keines"]="";
|
||||
while($row=$db->fetch_array($resultc)){
|
||||
$karray[$row["name"]]=$row["id"];
|
||||
}
|
||||
$panel->content.="<h3>Menü:</h3>";
|
||||
$panel->select($karray,$_POST["menue"],"menue");
|
||||
$panel->content.="<br />";
|
||||
$panel->content.="<h3>Kategorien:</h3>
|
||||
<table width=\"100%\">
|
||||
<tr>";
|
||||
$resultk=$db->query("SELECT `id`,`categoryname` FROM `" . $config["prefix"] . "article_categorys` WHERE `active`='true'") or die($db->error());
|
||||
while($row=$db->fetch_array($resultk)){
|
||||
$navs[]=$row;
|
||||
}
|
||||
$i=0;
|
||||
if(is_array($navs)){
|
||||
foreach($navs as $n){
|
||||
if($i % 5==0){
|
||||
$panel->content.="</tr><tr>";
|
||||
}
|
||||
$panel->checkbox(array("name"=>"cats[]","value"=>$n["id"]));
|
||||
$panel->content.=$n["categoryname"];
|
||||
$i++;
|
||||
}
|
||||
}else{
|
||||
$panel->content.="Keine Kategorien angelegt.";
|
||||
}
|
||||
$panel->content.="</tr>
|
||||
</table></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();
|
||||
$panel->parse_page();
|
||||
}
|
||||
}
|
||||
|
||||
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(\"".$config["path"]."/ajax.php\",{ task:'text',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;
|
||||
}
|
||||
}
|
||||
?>
|
82
modules/search/.svn/text-base/addcategory.apnl.php.svn-base
Normal file
82
modules/search/.svn/text-base/addcategory.apnl.php.svn-base
Normal file
|
@ -0,0 +1,82 @@
|
|||
<?php
|
||||
/**
|
||||
* Project: astat - simple site engine
|
||||
* File: /modules/text/addcategrory.apnl.php
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
* @link http://www.astat.org SVN: $URL$
|
||||
* @copyright 2009 becast.at
|
||||
* @author Bernhard Jaud <bernhard at becast dot at>
|
||||
* @package astat core
|
||||
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
|
||||
* @version $Id$
|
||||
*/
|
||||
|
||||
If (!defined("in_BL_ADMIN")) {
|
||||
die("Dieses Script kann nicht ausserhalb des Frameworks laufen!");
|
||||
}
|
||||
$session->page_begin("add Category", True);
|
||||
|
||||
class addcategory_text_panel extends admin_module{
|
||||
|
||||
function output(){
|
||||
global $config, $db,$panel, $root, $core, $session;
|
||||
$fail=FALSE;
|
||||
if(isset($_POST['send'])&& $_POST['send']==1){
|
||||
if(isset($_POST['categoryname'])&& $_POST['categoryname']!=""){
|
||||
$userfile_name = $_FILES['picture']['name'];
|
||||
$userfile_tmp = $_FILES['picture']['tmp_name'];
|
||||
$userfile_size = $_FILES['picture']['size'];
|
||||
$userfile_type = $_FILES['picture']['type'];
|
||||
$filedir = $root.'/catimages/';
|
||||
$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_text");
|
||||
}
|
||||
}
|
||||
$categoryname=$db->escape($_POST['categoryname']);
|
||||
$active=$db->escape($_POST['active']);
|
||||
$db->query("INSERT INTO `" . $config["prefix"]. "article_categorys` (`categoryname`,`picture`,`active`) VALUES ('".$categoryname."','".$userfile_name."','".$active."')") or die ($db->error());
|
||||
$panel->admin_message("Danke", "Die Kategorie wurde erfolgreich eingetragen!.",TRUE,"addcategory_text");
|
||||
}else{
|
||||
$fail="<span style=\"text-align: center; color: red;\">Der Kategoriename muss angegeben werden!</span>";
|
||||
}
|
||||
}elseif(!isset($_POST['send']) || $fail){
|
||||
$panel->title="Kategorie hinzufügen";
|
||||
$panel->form(array("action"=>$config["path"]."/admin/index.php?panel=addcategory_text"),FALSE,"enctype=\"multipart/form-data\"");
|
||||
if($fail){
|
||||
$panel->content.=$fail;
|
||||
}
|
||||
$panel->content.="<h3>Kategoriename:</h3>";
|
||||
$panel->field(array("name"=>"categoryname","typ"=>"text","value"=>$_POST["categoryname"]));
|
||||
$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();
|
||||
$panel->parse_page();
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
261
modules/search/.svn/text-base/edit.apnl.php.svn-base
Normal file
261
modules/search/.svn/text-base/edit.apnl.php.svn-base
Normal file
|
@ -0,0 +1,261 @@
|
|||
<?php
|
||||
If (!defined("in_BL_ADMIN")) {
|
||||
die("Dieses Script kann nicht ausserhalb des Frameworks laufen!");
|
||||
}
|
||||
$session->page_begin("edit Text", True);
|
||||
|
||||
class edit_text_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['url'])&& $_POST['url']!=""||isset($_POST['title'])&& $_POST['title']!=""){
|
||||
$id=intval($_POST['id']);
|
||||
$url=$db->escape($_POST['url']);
|
||||
$title=$db->escape($_POST['title']);
|
||||
$mid=intval($_POST['menue']);
|
||||
$result = $db->query("SELECT count(`id`) as `count` FROM `" . $config["prefix"] . "article` WHERE `url`='".$url."' AND `id`<>'".$id."'");
|
||||
$row = $db->fetch_array($result);
|
||||
|
||||
if($row["count"]==0){
|
||||
$db->query("UPDATE `" . $config["prefix"] . "article` SET `text`='".$_POST["text"]."',`menue`='".$mid."',`title`='".$title."',`url`='".$url."',`rightnavi`='".$_POST["rightnavi"]."',`active`='".$_POST["active"]."',`eid`='".$session->userdata["uid"]."',`edittime`='".time()."' WHERE `id`='".$id."'");
|
||||
$db->query("DELETE FROM `" . $config["prefix"] . "article_category` where `a_id`='".$id."'");
|
||||
if($_POST["cats"]!=""){
|
||||
foreach($_POST["cats"] as $nid){
|
||||
$db->query("INSERT INTO `" . $config["prefix"] . "article_category` (`a_id`,`c_id`) VALUES ('".$id."','".$nid."')");
|
||||
}
|
||||
}
|
||||
$panel->admin_message("Danke", "Artikel erfolgreich geändert!",TRUE,"edit_text");
|
||||
}else{
|
||||
$fail="<span style=\"text-align: center; color: red;\">Diese URL ist vergeben!</span>";
|
||||
}
|
||||
}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"] . "article 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="Text editieren";
|
||||
$panel->form(array("action"=>$config["path"]."/admin/index.php?panel=edit_text"));
|
||||
if($fail){
|
||||
$panel->content.=$fail;
|
||||
}
|
||||
$panel->content.="<h3>Titel:</h3>";
|
||||
$panel->field(array("name"=>"title","typ"=>"text","value"=>$_POST["title"]));
|
||||
$panel->content.="<h3>Url:</h3>";
|
||||
$panel->field(array("name"=>"url","typ"=>"text","value"=>$_POST["url"]));
|
||||
$panel->content.=".html";
|
||||
$resultc=$db->query("SELECT `id`,`name` FROM `" . $config["prefix"] . "article_menue`") or die($db->error());
|
||||
$karray["Keines"]="";
|
||||
while($row=$db->fetch_array($resultc)){
|
||||
$karray[$row["name"]]=$row["id"];
|
||||
}
|
||||
$panel->content.="<h3>Menü:</h3>";
|
||||
$panel->select($karray,$_POST["menue"],"menue");
|
||||
$panel->content.="<br />";
|
||||
$panel->content.="<h3>Kategorien:</h3>
|
||||
<table width=\"100%\">
|
||||
<tr>";
|
||||
$resultn = $db->query("SELECT `c_id` FROM `" . $config["prefix"] . "article_category` WHERE `a_id`='".intval($_GET['id'])."'");
|
||||
while($rowa=$db->fetch_array($resultn)){
|
||||
$cat[$rowa["c_id"]]=TRUE;
|
||||
}
|
||||
$resultk=$db->query("SELECT `id`,`categoryname` FROM `" . $config["prefix"] . "article_categorys` WHERE `active`='true'");
|
||||
while($row=$db->fetch_array($resultk)){
|
||||
if($cat[$row["id"]]==TRUE){
|
||||
$row["checked"]="checked=\"checked\"";
|
||||
}
|
||||
$navs[]=$row;
|
||||
}
|
||||
$i=0;
|
||||
foreach($navs as $n){
|
||||
if($i % 5==0){
|
||||
$panel->content.="</tr><tr>";
|
||||
}
|
||||
$panel->checkbox(array("name"=>"cats[]","value"=>$n["id"]),$n["checked"]);
|
||||
$panel->content.=$n["categoryname"];
|
||||
$i++;
|
||||
}
|
||||
|
||||
$panel->content.="</tr>
|
||||
</table></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->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"]){
|
||||
$db->query("DELETE FROM `" . $config["prefix"] . "article` WHERE `id`='".intval($_GET["id"])."'");
|
||||
$db->query("DELETE FROM `" . $config["prefix"] . "article_menue` where `a_id`='".$id."'");
|
||||
$panel->admin_message("Artikel gelöscht!","Der Artikel wurde erfolgreich gelöscht.",True,"edit_text",3);
|
||||
}
|
||||
|
||||
}else{
|
||||
$result = $db->query("SELECT a.title,a.id,a.active,a.date,a.url,u.username FROM `" . $config["prefix"] . "article` a LEFT JOIN `" . $config["prefix"] . "users` u on a.`author`=u.`uid`");
|
||||
while($row=$db->fetch_array($result, MYSQL_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"]."'");
|
||||
while($crow=$db->fetch_array($cresult, MYSQL_ASSOC)){
|
||||
if(!$row["categoryname"]){
|
||||
$row["categoryname"]=$crow["categoryname"];
|
||||
}else{
|
||||
$row["categoryname"].="<br />".$crow["categoryname"];
|
||||
}
|
||||
}
|
||||
$row["dates"]=date("d.m.Y",$row["date"]);
|
||||
$articles[]=$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\">URL</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($articles)){
|
||||
foreach($articles 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["url"]."</td>
|
||||
<td align=\"center\">".$u["categoryname"]."</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 Artikel ".$u["title"]." löschen? ')\" href=\"".$config["path"]."/admin/index.php?panel=edit_text&action=delete&id=".$u["id"]."\"><img src=\"".$config["path"]."/admin/images/icons/delete.png\" /></a> <a href=\"".$config["path"]."/admin/index.php?panel=edit_text&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 Artikel vorhanden.</td>
|
||||
</tr>";
|
||||
}
|
||||
$panel->content.="</table><br />";
|
||||
$panel->parse_page();
|
||||
}
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
}
|
||||
?>
|
191
modules/search/.svn/text-base/editcategory.apnl.php.svn-base
Normal file
191
modules/search/.svn/text-base/editcategory.apnl.php.svn-base
Normal file
|
@ -0,0 +1,191 @@
|
|||
<?php
|
||||
/**
|
||||
* Project: astat - simple site engine
|
||||
* File: /modules/text/editcategrory.apnl.php
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
* @link http://www.astat.org SVN: $URL$
|
||||
* @copyright 2009 becast.at
|
||||
* @author Bernhard Jaud <bernhard at becast dot at>
|
||||
* @package astat core
|
||||
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
|
||||
* @version $Id$
|
||||
*/
|
||||
|
||||
If (!defined("in_BL_ADMIN")) {
|
||||
die("Dieses Script kann nicht ausserhalb des Frameworks laufen!");
|
||||
}
|
||||
$session->page_begin("edit category", True);
|
||||
|
||||
class editcategory_text_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['categoryname'])&& $_POST['categoryname']!=""){
|
||||
$userfile_name = $_FILES['picture']['name'];
|
||||
$userfile_tmp = $_FILES['picture']['tmp_name'];
|
||||
$userfile_size = $_FILES['picture']['size'];
|
||||
$userfile_type = $_FILES['picture']['type'];
|
||||
$filedir = $root.'/catimages/';
|
||||
$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_text");
|
||||
}
|
||||
$result=$db->query("SELECT `picture` FROM `" . $config["prefix"]. "article_categorys` WHERE `id`='".intval($_POST["id"])."' LIMIT 1");
|
||||
$file=$db->fetch_array($result);
|
||||
@unlink($filedir.$file['picture']);
|
||||
$db->query("UPDATE `" . $config["prefix"]. "article_categorys` SET `picture`='".$userfile_name."' WHERE `id`='".intval($_POST["id"])."'");
|
||||
}elseif($_POST["delimg"]==1){
|
||||
$result=$db->query("SELECT `picture` FROM `" . $config["prefix"]. "article_categorys` WHERE `id`='".intval($_POST["id"])."' LIMIT 1");
|
||||
$file=$db->fetch_array($result);
|
||||
@unlink($filedir.$file['picture']);
|
||||
$db->query("UPDATE `" . $config["prefix"]. "article_categorys` SET `picture`='' WHERE `id`='".intval($_POST["id"])."'") or die($db->error());
|
||||
}
|
||||
|
||||
$categoryname=$db->escape($_POST['categoryname']);
|
||||
$active=$db->escape($_POST['active']);
|
||||
$db->query("UPDATE `" . $config["prefix"]. "article_categorys` SET `categoryname`='".$categoryname."', `active`='".$active."' WHERE `id`='".intval($_POST["id"])."'") or die($db->error());
|
||||
$panel->admin_message("Danke", "Die Kategorie wurde erfolgreich editiert!.",TRUE,"editcategory_text");
|
||||
}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"] . "article_categorys` 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_text"),FALSE,"enctype=\"multipart/form-data\"");
|
||||
if($fail){
|
||||
$panel->content.=$fail;
|
||||
}
|
||||
$panel->content.="<h3>Kategoriename:</h3>";
|
||||
$panel->field(array("name"=>"categoryname","typ"=>"text","value"=>$_POST["categoryname"]));
|
||||
if($_POST["picture"]!=""){
|
||||
$panel->content.="<h3>aktuelles Kategoriebild:</h3>";
|
||||
$panel->content.="<img src=\"".$config["path"]."/catimages/".$_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"] . "article_categorys` where `id`='".intval($_GET["id"])."'");
|
||||
$row = $db->fetch_array($result);
|
||||
@unlink($root.'/catimages/'.$row["picture"]);
|
||||
$db->query("DELETE FROM `" . $config["prefix"] . "article_categorys` WHERE `id`='".intval($_GET["id"])."'");
|
||||
$panel->admin_message("Kategorie gelöscht!","Die Kategorie wurde erfolgreich gelöscht.",True,"editcategory_text",3);
|
||||
}
|
||||
|
||||
}else{
|
||||
$result = $db->query("SELECT * FROM `" . $config["prefix"] . "article_categorys`");
|
||||
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["categoryname"]."</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_text&action=delete&id=".$u["id"]."\"><img src=\"".$config["path"]."/admin/images/icons/delete.png\" /></a> <a href=\"".$config["path"]."/admin/index.php?panel=editcategory_text&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 />";
|
||||
$panel->parse_page();
|
||||
}
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
}
|
||||
?>
|
29
modules/search/.svn/text-base/text.ajax.php.svn-base
Normal file
29
modules/search/.svn/text-base/text.ajax.php.svn-base
Normal file
|
@ -0,0 +1,29 @@
|
|||
<?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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
?>
|
92
modules/search/.svn/text-base/text.module.php.svn-base
Normal file
92
modules/search/.svn/text-base/text.module.php.svn-base
Normal file
|
@ -0,0 +1,92 @@
|
|||
<?php
|
||||
|
||||
class module_text extends admin_module{
|
||||
|
||||
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 $panels;
|
||||
}
|
||||
|
||||
function get_info(){
|
||||
$info["name"]="Textverwaltung";
|
||||
$info["file"]="text";
|
||||
$info["author"]="astat";
|
||||
$info["version"]="1.0.0";
|
||||
$info["url"]="http://www.astat.org";
|
||||
return $info;
|
||||
}
|
||||
|
||||
function install(){
|
||||
global $config, $db;
|
||||
$db->query("CREATE TABLE IF NOT EXISTS `" . $config["prefix"] . "article` (
|
||||
`id` int(11) NOT NULL auto_increment,
|
||||
`text` text NOT NULL,
|
||||
`date` int(11) NOT NULL default '0',
|
||||
`author` int(11) NOT NULL default '0',
|
||||
`eid` int(11) NOT NULL,
|
||||
`edittime` int(11) NOT NULL,
|
||||
`menue` int(11) NOT NULL default '0',
|
||||
`title` varchar(80) NOT NULL default '',
|
||||
`url` varchar(120) NOT NULL,
|
||||
`rightnavi` enum('false','true') NOT NULL,
|
||||
`active` enum('true','false') NOT NULL,
|
||||
PRIMARY KEY (`id`),
|
||||
KEY `author` (`author`),
|
||||
KEY `menue` (`menue`),
|
||||
KEY `eid` (`eid`)
|
||||
) ENGINE=MyISAM");
|
||||
|
||||
$db->query("CREATE TABLE IF NOT EXISTS `" . $config["prefix"] . "article_categorys` (
|
||||
`id` int(11) NOT NULL auto_increment,
|
||||
`categoryname` varchar(80) NOT NULL default '',
|
||||
`picture` varchar(80) NOT NULL default '',
|
||||
`active` enum('true','false') NOT NULL,
|
||||
PRIMARY KEY (`id`),
|
||||
KEY `active` (`active`)
|
||||
) ENGINE=MyISAM");
|
||||
|
||||
|
||||
$db->query("CREATE TABLE `" . $config["prefix"] . "article_category` (
|
||||
`a_id` int(11) NOT NULL,
|
||||
`c_id` int(11) NOT NULL,
|
||||
KEY `a_id` (`a_id`),
|
||||
KEY `c_id` (`c_id`)
|
||||
) ENGINE=MyISAM");
|
||||
|
||||
$db->query("CREATE TABLE `" . $config["prefix"] . "article_menue` (
|
||||
`id` int(11) NOT NULL auto_increment,
|
||||
`sort` int(11) NOT NULL,
|
||||
`name` text NOT NULL,
|
||||
PRIMARY KEY (`id`),
|
||||
KEY `sort` (`sort`)
|
||||
) ENGINE=MyISAM");
|
||||
|
||||
mkdir ($_SERVER["DOCUMENT_ROOT"]."/catimages", 0777);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
function uninstall(){
|
||||
global $config, $db;
|
||||
$db->query("DROP TABLE `" . $config["prefix"] . "article`");
|
||||
$db->query("DROP TABLE `" . $config["prefix"] . "article_categorys`");
|
||||
$db->query("DROP TABLE `" . $config["prefix"] . "article_category`");
|
||||
$db->query("DROP TABLE `" . $config["prefix"] . "article_menue`");
|
||||
@$this->recursive($_SERVER["DOCUMENT_ROOT"]."/catimages");
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
function recursive($dest){
|
||||
$list = array_diff(scandir($dest), array('.', '..'));
|
||||
foreach ($list as $value) {
|
||||
$file = $dest.'/'.$value;
|
||||
if (is_dir($file)) {
|
||||
recursive($file);
|
||||
}else{
|
||||
unlink($file);
|
||||
}
|
||||
}
|
||||
return rmdir($dest);
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
68
modules/search/.svn/text-base/text.output.php.svn-base
Normal file
68
modules/search/.svn/text-base/text.output.php.svn-base
Normal file
|
@ -0,0 +1,68 @@
|
|||
<?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 module{
|
||||
|
||||
function output(){
|
||||
global $module,$config,$db,$tpl,$log,$error;
|
||||
$textid=0;
|
||||
$url="";
|
||||
if(Isset($this->get["textid"]) || Isset($this->post["textid"])){
|
||||
if(Isset($this->get["textid"])){
|
||||
$textid = intval($this->get["textid"]);
|
||||
}else{
|
||||
$textid = intval($this->post["textid"]);
|
||||
}
|
||||
$result = $db->query("SELECT a.`id`, a.`rightnavi`, a.`text`, a.`title`, u.`username`, eu.`username` as edituser, a.`date`, a.`edittime`, a.`eid` FROM `" . $config["prefix"] . "article` a LEFT JOIN `".$config["prefix"]."users` eu on a.`eid` = eu.`uid` LEFT JOIN `".$config["prefix"]."users` u on a.`author` = u.`uid` WHERE a.`id`='".$textid."' AND a.`active`='true'") or die($db->error());
|
||||
}elseif(Isset($this->get["url"]) || Isset($this->post["url"])){
|
||||
If(Isset($this->get["url"])){
|
||||
$url=preg_replace( '/\.html($|\?)/i', "$1", $this->get["url"] );
|
||||
}else{
|
||||
$url=preg_replace( '/\.html($|\?)/i', "$1", $db->escape_string($this->post["url"]));
|
||||
}
|
||||
$result = $db->query("SELECT a.`id`, a.`rightnavi`, a.`text`, a.`title`, u.`username`, eu.`username` as edituser, a.`date`, a.`edittime`, a.`eid` FROM `" . $config["prefix"] . "article` a LEFT JOIN `".$config["prefix"]."users` eu on a.`eid` = eu.`uid` LEFT JOIN `".$config["prefix"]."users` u on a.`author` = u.`uid` WHERE a.url='".$url."' AND a.`active`='true'");
|
||||
|
||||
|
||||
}else{
|
||||
return $error->http_error("404");
|
||||
}
|
||||
$fid="";
|
||||
$fid.=$textid;
|
||||
$fid.=$url;
|
||||
if($db->num_rows($result) > 0){
|
||||
if(!$this->tpl->is_cached('textview.tpl',"textview".$fid)) {
|
||||
$row = $db->fetch_array($result);
|
||||
$cresult = $db->query("SELECT * FROM `" . $config["prefix"] . "article_categorys` c LEFT JOIN `" . $config["prefix"] . "article_category` s ON c.`id`=s.`c_id` WHERE s.`a_id`='".$row["id"]."'");
|
||||
while($c=$db->fetch_array($cresult)){
|
||||
if(!$cat){
|
||||
$cat=$c["categoryname"];
|
||||
}else{
|
||||
$cat.=", ".$c["categoryname"];
|
||||
}
|
||||
}
|
||||
|
||||
$editdate = date("d.m.Y, H:i", $row["edittime"]);
|
||||
$date = date("d.m.Y, H:i", $row["date"]);
|
||||
$rightnavi=$row["rightnavi"];
|
||||
$this->tpl->assign('article', $row);
|
||||
$this->tpl->assign('cat', $cat);
|
||||
$this->tpl->assign('editdate', $editdate);
|
||||
$this->tpl->assign('date', $date);
|
||||
$subnav_item="<a>".$articletitle."</a>";
|
||||
}
|
||||
$this->titleaddon=$articletitle;
|
||||
return $this->tpl->fetch('textview.tpl',"textview".$fid);
|
||||
}else{
|
||||
return $error->http_error("404");
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
?>
|
78
modules/search/search.module.php
Normal file
78
modules/search/search.module.php
Normal file
|
@ -0,0 +1,78 @@
|
|||
<?php
|
||||
|
||||
class module_search extends admin_module{
|
||||
|
||||
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 $panels;
|
||||
}
|
||||
|
||||
function get_info(){
|
||||
$info["name"]="Review Search";
|
||||
$info["file"]="search";
|
||||
$info["author"]="astat";
|
||||
$info["version"]="1.0.0";
|
||||
$info["url"]="http://www.astat.org";
|
||||
$info["depends"]='reviews';
|
||||
return $info;
|
||||
}
|
||||
|
||||
function install(){
|
||||
global $config, $db;
|
||||
|
||||
|
||||
/*$db->query("CREATE TABLE IF NOT EXISTS `" . $config["prefix"] . "article` (
|
||||
`id` int(11) NOT NULL auto_increment,
|
||||
`text` text NOT NULL,
|
||||
`date` int(11) NOT NULL default '0',
|
||||
`author` int(11) NOT NULL default '0',
|
||||
`eid` int(11) NOT NULL,
|
||||
`edittime` int(11) NOT NULL,
|
||||
`menue` int(11) NOT NULL default '0',
|
||||
`title` varchar(80) NOT NULL default '',
|
||||
`url` varchar(120) NOT NULL,
|
||||
`rightnavi` enum('false','true') NOT NULL,
|
||||
`active` enum('true','false') NOT NULL,
|
||||
PRIMARY KEY (`id`),
|
||||
KEY `author` (`author`),
|
||||
KEY `menue` (`menue`),
|
||||
KEY `eid` (`eid`)
|
||||
) ENGINE=MyISAM");
|
||||
|
||||
$db->query("CREATE TABLE IF NOT EXISTS `" . $config["prefix"] . "article_categorys` (
|
||||
`id` int(11) NOT NULL auto_increment,
|
||||
`categoryname` varchar(80) NOT NULL default '',
|
||||
`picture` varchar(80) NOT NULL default '',
|
||||
`active` enum('true','false') NOT NULL,
|
||||
PRIMARY KEY (`id`),
|
||||
KEY `active` (`active`)
|
||||
) ENGINE=MyISAM");
|
||||
|
||||
|
||||
$db->query("CREATE TABLE `" . $config["prefix"] . "article_category` (
|
||||
`a_id` int(11) NOT NULL,
|
||||
`c_id` int(11) NOT NULL,
|
||||
KEY `a_id` (`a_id`),
|
||||
KEY `c_id` (`c_id`)
|
||||
) ENGINE=MyISAM");
|
||||
|
||||
$db->query("CREATE TABLE `" . $config["prefix"] . "article_menue` (
|
||||
`id` int(11) NOT NULL auto_increment,
|
||||
`sort` int(11) NOT NULL,
|
||||
`name` text NOT NULL,
|
||||
PRIMARY KEY (`id`),
|
||||
KEY `sort` (`sort`)
|
||||
) ENGINE=MyISAM");
|
||||
|
||||
mkdir ($_SERVER["DOCUMENT_ROOT"]."/catimages", 0777);*/
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
function uninstall(){
|
||||
global $config, $db;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
?>
|
212
modules/search/search.output.php
Normal file
212
modules/search/search.output.php
Normal file
|
@ -0,0 +1,212 @@
|
|||
<?php
|
||||
If (!defined("in_astat")) {
|
||||
die("Dieses Script kann nicht ausserhalb des Frameworks laufen!");
|
||||
}
|
||||
|
||||
$session->page_begin("search", FALSE);
|
||||
|
||||
class search extends module{
|
||||
|
||||
function output(){
|
||||
global $session,$config,$db,$tpl,$core,$plugin;
|
||||
|
||||
if ($_POST['search']!='' || $_GET['websearch']==1 || $_GET['searchid']!='') {
|
||||
|
||||
$wh[]='r.`appr`=\'1\'';
|
||||
$count=20;
|
||||
|
||||
if($_GET['websearch']=="1"){
|
||||
$data=$_GET;
|
||||
}else{
|
||||
$data=$_POST;
|
||||
}
|
||||
|
||||
$search=$db->escape($data['search']);
|
||||
$sexact=$db->escape($data['sexact']);
|
||||
$wh[]=' r.`typ`<>\'2\'';
|
||||
switch($data['art']){
|
||||
case 'book':
|
||||
$wh[]=' r.`typ`=\'1\'';
|
||||
break;
|
||||
|
||||
/*case 'cd':
|
||||
$wh[]=' r.`typ`=\'2\'';
|
||||
break;*/
|
||||
|
||||
case 'dvd':
|
||||
$wh[]=' r.`typ`=\'3\'';
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
|
||||
}
|
||||
|
||||
if($sexact==""){
|
||||
$sexact="0";
|
||||
}
|
||||
|
||||
if($data['styp']==""){
|
||||
if($sexact==0){
|
||||
$wh[]="(`interpret` LIKE '%".$search."%' OR `title` LIKE '%".$search."%' OR `isbn` LIKE '%".$search."%' OR `review` LIKE '%".$search."%' OR `description` LIKE '%".$search."%' OR `publisher` LIKE '%".$search."%' OR `author` LIKE '%".$search."%')";
|
||||
}else{
|
||||
$wh[]="(`interpret` LIKE '".$search."' OR `title` LIKE '".$search."' OR `isbn` LIKE '".$search."' OR `review` LIKE '".$search."' OR `description` LIKE '".$search."' OR `publisher` LIKE '".$search."' OR `author` LIKE '".$search."')";
|
||||
}
|
||||
}else{
|
||||
foreach($data['styp'] as $key){
|
||||
if($sexact==0){
|
||||
$wo[]='`'.$key.'` LIKE \'%'.$search.'%\'';
|
||||
}else{
|
||||
$wo[]='`'.$key.'` LIKE \''.$search.'\'';
|
||||
}
|
||||
}
|
||||
if(is_array($wo))
|
||||
$wh[]='('.Join(" OR ",$wo).')';
|
||||
}
|
||||
|
||||
if(is_array($wh))
|
||||
$WS=Join(" AND ",$wh);
|
||||
if(!$_GET['searchid']){
|
||||
$resultc = $db->query("SELECT r.`id` FROM `".$config['prefix']."reviews` r WHERE ".$WS." ORDER BY r.`timestamp` DESC") or die($db->error());
|
||||
$numrows = $db->num_rows($resultc);
|
||||
$pages=ceil($numrows/$count);
|
||||
|
||||
if(!$_GET['page'] || $_GET['page']=="first"){
|
||||
$start=0;
|
||||
}elseif($_GET['page']=="last"){
|
||||
$page=$pages-1;
|
||||
}elseif($_GET['page']>=1){
|
||||
$page=$_GET['page']-1;
|
||||
}
|
||||
$start=$page*$count;
|
||||
if($pages>1){
|
||||
while($res=$db->fetch_array($resultc)){
|
||||
$ids[]=$res['id'];
|
||||
}
|
||||
$sid=$session->generate_Key(10);
|
||||
$db->query("INSERT INTO`".$config['prefix']."searches` (`sid`,`term`,`results`,`time`) VALUES('".$sid."','".$search."','".serialize($ids)."','".time()."')");
|
||||
$add='/'.$sid;
|
||||
}
|
||||
$sql="SELECT r.`id`,r.`title`,r.`interpret`,r.`author`,r.`result`,r.`review`,r.`typ`, r.`pyear`,sum(v.`vote`) AS `voteresult` FROM `".$config['prefix']."reviews` r LEFT JOIN `".$config['prefix']."votes` v ON v.`rid`=r.`id` WHERE ".$WS." GROUP BY r.`id` ORDER BY r.`timestamp` DESC LIMIT ".$start.", ".$count;
|
||||
}else{
|
||||
$resultc = $db->query("SELECT `results` FROM `".$config['prefix']."searches` s WHERE `sid`='".$db->escape($_GET['searchid'])."'");
|
||||
while($res=$db->fetch_array($resultc)){
|
||||
$rs=unserialize($res['results']);
|
||||
}
|
||||
if(!$rs){
|
||||
$core->message("Fehler.", "Diese Suchanfrage ist ungültig oder nicht mehr aktuell",TRUE,"/");
|
||||
}
|
||||
$pages=ceil(count($rs)/$count);
|
||||
|
||||
if(!$_GET['page'] || $_GET['page']=="first"){
|
||||
$start=0;
|
||||
}elseif($_GET['page']=="last"){
|
||||
$page=$pages-1;
|
||||
}elseif($_GET['page']>=1){
|
||||
$page=$_GET['page']-1;
|
||||
}
|
||||
$start=$page*$count;
|
||||
$ru=array_slice($rs,$start,$count);
|
||||
foreach($ru as $key=>$val){
|
||||
if(!$rids)
|
||||
$rids='\''.$val.'\'';
|
||||
else
|
||||
$rids.=',\''.$val.'\'';
|
||||
}
|
||||
$add='/'.$_GET['searchid'];
|
||||
$sql="SELECT r.`id`,r.`title`,r.`interpret`,r.`author`,r.`result`,r.`review`,r.`typ`, r.`pyear`,sum(v.`vote`) AS `voteresult` FROM `".$config['prefix']."reviews` r LEFT JOIN `".$config['prefix']."votes` v ON v.`rid`=r.`id` WHERE r.`id` in(".$rids.") GROUP BY r.`id` ORDER BY r.`timestamp` DESC";
|
||||
}
|
||||
|
||||
$resultr = $db->query($sql);
|
||||
$i=1;
|
||||
while($row=$db->fetch_array($resultr)){
|
||||
$row["nr"]=$i+$start;
|
||||
if($row['voteresult']==""){
|
||||
$row['voteresult']=0;
|
||||
}
|
||||
if($row["typ"]==1){
|
||||
$row["img"]="book.png";
|
||||
$row["imgalt"]="Buchreview";
|
||||
$row["art"]="books";
|
||||
}elseif($row["typ"]==2){
|
||||
$row["img"]="cd.gif";
|
||||
$row["imgalt"]="CD Review";
|
||||
$row["art"]="cd";
|
||||
}else{
|
||||
$row["img"]="dvd.png";
|
||||
$row["imgalt"]="DVD Review";
|
||||
$row["art"]="dvd";
|
||||
}
|
||||
$row['urlname']=urlencode($row['title']);
|
||||
if($row["review"]!=""){
|
||||
$row["hasreviewimg"]="review.png";
|
||||
$row["hasreviewimgalt"]="Review vorhanden";
|
||||
}else{
|
||||
$row["hasreviewimg"]="noreview.png";
|
||||
$row["hasreviewimgalt"]="Kein Review vorhanden";
|
||||
}
|
||||
|
||||
$reviews[]=$row;
|
||||
$i++;
|
||||
}
|
||||
if($page>4){
|
||||
$from=$page-4;
|
||||
}else{
|
||||
$from=1;
|
||||
}
|
||||
|
||||
if($page == $pages)
|
||||
{
|
||||
$to = $pages;
|
||||
}
|
||||
elseif($page == $pages-1)
|
||||
{
|
||||
$to = $page+1;
|
||||
}
|
||||
elseif($page == $pages-2)
|
||||
{
|
||||
$to = $page+2;
|
||||
}
|
||||
elseif($page == $pages-3)
|
||||
{
|
||||
$to = $page+3;
|
||||
}
|
||||
else
|
||||
{
|
||||
$to = $page+4;
|
||||
}
|
||||
|
||||
if($pages > 1){
|
||||
if($page > 0){
|
||||
$pagination=$pagination.' <a href="'.$add.'/first.html"><< Erste</a>';
|
||||
$pagination=$pagination. ' <a href="'.$add.'/' . $page . '.html">< Zurück</a> ';
|
||||
}else{
|
||||
$pagination=$pagination.' <a style="color:orange;"><< Erste</a>';
|
||||
$pagination=$pagination. ' <a style="color:orange;">< Zurück</a> ';
|
||||
}
|
||||
|
||||
for($i = $from; $i <= $to; $i++){
|
||||
If($i==$page+1){
|
||||
$pagination=$pagination.' '.'<a style="color:orange;">'.$i.'</a>';
|
||||
}else{
|
||||
$pagination=$pagination.' <a href="'.$add.'/' . $i .'.html">'.$i.'</a>';
|
||||
}
|
||||
}
|
||||
|
||||
if($to > $page+1){
|
||||
$pagination=$pagination.' <a href="'.$add.'/' . ($page + 2) .'.html">Weiter ></a> ';
|
||||
$pagination=$pagination.' <a href="'.$add.'/last.html">Letzte >></a><br />';
|
||||
}else{
|
||||
$pagination=$pagination.' <a style="color:orange;">Weiter ></a> ';
|
||||
$pagination=$pagination.' <a style="color:orange;">Letzte >></a><br />';
|
||||
}
|
||||
}
|
||||
$this->tpl->assign('reviews',$reviews);
|
||||
$this->tpl->assign('pagination',$pagination);
|
||||
return $this->tpl->fetch('listsearch.tpl', 'listsearch');
|
||||
}else{
|
||||
return $this->tpl->fetch('search.tpl', 'seach');
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
94
modules/search/search.php
Normal file
94
modules/search/search.php
Normal file
|
@ -0,0 +1,94 @@
|
|||
<?php
|
||||
If (!defined("in_BL")) {
|
||||
die("Dieses Script kann nicht ausserhalb des Frameworks laufen!");
|
||||
}
|
||||
page_begin("Search", False);
|
||||
$rightnavi=FALSE;
|
||||
$topnav_home="<li><a href=\"/index.php\">Home</a></li>";
|
||||
$topnav_module=" <li>Suchergebnisse</li>";
|
||||
|
||||
If ($_POST['search']!="" || $_GET['websearch']=="1") {
|
||||
|
||||
If(isset($_GET['start'])){
|
||||
$start=intval($_GET['start']);
|
||||
} else {
|
||||
$start=0;
|
||||
}
|
||||
|
||||
if($_GET['websearch']=="1"){
|
||||
$search=$db->escape_string(htmlentities($_GET['search'],ENT_NOQUOTES, CHARSET));
|
||||
$stype=$db->escape_string($_GET['styp']);
|
||||
$sexact=$db->escape_string($_GET['sexact']);
|
||||
}else{
|
||||
$search=$db->escape_string(htmlentities($_POST['search'],ENT_NOQUOTES, CHARSET));
|
||||
$stype=$db->escape_string($_POST['styp']);
|
||||
$sexact=$db->escape_string($_POST['sexact']);
|
||||
}
|
||||
If($sexact==""){
|
||||
$sexact="0";
|
||||
}
|
||||
|
||||
If($stype==""){
|
||||
$stype="all";
|
||||
}
|
||||
|
||||
If(isset($search) && $search!=""){
|
||||
If($stype=="all"){
|
||||
|
||||
If($sexact=="1"){
|
||||
$resultr = $db->query("SELECT * FROM ".TABLE_PREFIX."reviews WHERE `interpret` LIKE '$search' OR `title` LIKE '$search' OR `isbn` LIKE '$search' OR `review` LIKE '$search' OR `description` LIKE '$search' OR `publisher` LIKE '$search' OR `author` LIKE '$search' AND appr='1' ORDER BY timestamp DESC") or die(mysqli_error());
|
||||
//$resultc = $db->query("SELECT * FROM ".TABLE_PREFIX."reviews WHERE `interpret` LIKE '$search' OR `title` LIKE '$search' OR `isbn` LIKE '$search' OR `review` LIKE '$search' OR `description` LIKE '$search' OR `publisher` LIKE '$search' OR `author` LIKE '$search' AND appr='1' ORDER BY timestamp") or die(mysqli_error());
|
||||
} else {
|
||||
$resultr = $db->query("SELECT * FROM ".TABLE_PREFIX."reviews WHERE `interpret` LIKE '%$search%' OR `title` LIKE '%$search%' OR `isbn` LIKE '%$search%' OR `review` LIKE '%$search%' OR `description` LIKE '%$search%' OR `publisher` LIKE '%$search%' OR `author` LIKE '%$search%' AND appr='1' ORDER BY timestamp DESC") or die(mysqli_error());
|
||||
//$resultc = $db->query("SELECT * FROM ".TABLE_PREFIX."reviews WHERE `interpret` LIKE '%$search%' OR `title` LIKE '%$search%' OR `isbn` LIKE '%$search%' OR `review` LIKE '%$search%' OR `description` LIKE '%$search%' OR `publisher` LIKE '%$search%' OR `author` LIKE '%$search%' AND appr='1' ORDER BY timestamp") or die(mysqli_error());
|
||||
}
|
||||
|
||||
}else{
|
||||
|
||||
if($sexact=="1"){
|
||||
$resultr = $db->query("SELECT * FROM ".TABLE_PREFIX."reviews WHERE `". $stype ."` LIKE '$search' AND appr='1' ORDER BY timestamp") or die(mysqli_error());
|
||||
//$resultc = $db->query("SELECT * FROM ".TABLE_PREFIX."reviews WHERE `". $stype ."` LIKE '$search' AND appr='1' ORDER BY timestamp") or die(mysqli_error());
|
||||
} else {
|
||||
$resultr = $db->query("SELECT * FROM ".TABLE_PREFIX."reviews WHERE `". $stype ."` LIKE '%$search%' AND appr='1' ORDER BY timestamp") or die(mysqli_error());
|
||||
//$resultc = $db->query("SELECT * FROM ".TABLE_PREFIX."reviews WHERE `". $stype ."` LIKE '%$search%' AND appr='1' ORDER BY timestamp") or die(mysqli_error());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
//$numrows = $db->num_rows($resultc);
|
||||
//var_dump($numrows);
|
||||
$pages=ceil($numrows/20);
|
||||
$i=1;
|
||||
if($numrows > 20){
|
||||
if($start > 0){
|
||||
$thispage=($start+20)/1;
|
||||
$footage="<a href=\"/index.php?task=reviews&start=" . ($start -20) .$add."\"><< Zurück</a>";
|
||||
}else{
|
||||
$footage="<a><< Zurück</a>";
|
||||
$thispage=1;
|
||||
}
|
||||
while($i<=$pages){
|
||||
If(20*$i==$start+20){
|
||||
$footage=$footage." "."<a>".$i."</a>";
|
||||
}else{
|
||||
$footage=$footage." <a href=\"/index.php?task=reviews&start=" . (($i-1)*20) .$add. "\">".$i."</a>";
|
||||
}
|
||||
$i++;
|
||||
}
|
||||
if($numrows > ($start + 20)){
|
||||
$footage=$footage." <a href=\"/index.php?task=reviews&start=" . ($start + 20) .$add ."\">Weiter >></a><br />\n";
|
||||
}else{
|
||||
$footage=$footage." <a>Weiter >></a><br />\n";
|
||||
}
|
||||
}
|
||||
|
||||
$reviews=overview($resultr,$start);
|
||||
$tpl -> assign('link',$link);
|
||||
$tpl -> assign('reviews',$reviews);
|
||||
$tpl -> assign('footage',$footage);
|
||||
$content=$tpl -> fetch('listsearch.tpl');
|
||||
}else{
|
||||
$content=$tpl -> fetch('search.tpl');
|
||||
}
|
||||
?>
|
5
modules/search/templates/.svn/all-wcprops
Normal file
5
modules/search/templates/.svn/all-wcprops
Normal file
|
@ -0,0 +1,5 @@
|
|||
K 25
|
||||
svn:wc:ra_dav:version-url
|
||||
V 46
|
||||
/astat/!svn/ver/1/trunk/modules/text/templates
|
||||
END
|
31
modules/search/templates/.svn/entries
Normal file
31
modules/search/templates/.svn/entries
Normal file
|
@ -0,0 +1,31 @@
|
|||
9
|
||||
|
||||
dir
|
||||
34
|
||||
http://svn.astat.org/astat/trunk/modules/text/templates
|
||||
http://svn.astat.org/astat
|
||||
|
||||
|
||||
|
||||
2009-06-07T19:12:55.973801Z
|
||||
1
|
||||
genuineparts
|
||||
|
||||
|
||||
svn:special svn:externals svn:needs-lock
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
bb7ccd2a-c66b-0410-9765-967ca6f03dfc
|
||||
|
||||
default
|
||||
dir
|
||||
|
1
modules/search/templates/.svn/format
Normal file
1
modules/search/templates/.svn/format
Normal file
|
@ -0,0 +1 @@
|
|||
9
|
11
modules/search/templates/default/.svn/all-wcprops
Normal file
11
modules/search/templates/default/.svn/all-wcprops
Normal file
|
@ -0,0 +1,11 @@
|
|||
K 25
|
||||
svn:wc:ra_dav:version-url
|
||||
V 54
|
||||
/astat/!svn/ver/1/trunk/modules/text/templates/default
|
||||
END
|
||||
textview.tpl
|
||||
K 25
|
||||
svn:wc:ra_dav:version-url
|
||||
V 67
|
||||
/astat/!svn/ver/1/trunk/modules/text/templates/default/textview.tpl
|
||||
END
|
62
modules/search/templates/default/.svn/entries
Normal file
62
modules/search/templates/default/.svn/entries
Normal file
|
@ -0,0 +1,62 @@
|
|||
9
|
||||
|
||||
dir
|
||||
34
|
||||
http://svn.astat.org/astat/trunk/modules/text/templates/default
|
||||
http://svn.astat.org/astat
|
||||
|
||||
|
||||
|
||||
2009-06-07T19:12:55.973801Z
|
||||
1
|
||||
genuineparts
|
||||
|
||||
|
||||
svn:special svn:externals svn:needs-lock
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
bb7ccd2a-c66b-0410-9765-967ca6f03dfc
|
||||
|
||||
textview.tpl
|
||||
file
|
||||
|
||||
|
||||
|
||||
|
||||
2009-06-08T19:44:32.000000Z
|
||||
c9914ec8546b33d929da6e52c51919ed
|
||||
2009-06-07T19:12:55.973801Z
|
||||
1
|
||||
genuineparts
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
331
|
||||
|
1
modules/search/templates/default/.svn/format
Normal file
1
modules/search/templates/default/.svn/format
Normal file
|
@ -0,0 +1 @@
|
|||
9
|
|
@ -0,0 +1,6 @@
|
|||
<h1>{$article.title}</h1>
<p>
{$article.text}
|
||||
{if $article.edituser!=""}<br /><font size="1pt">(zuletzt editiert am {$editdate}, von {$article.edituser})</font><br />{/if}
|
||||
</p>
|
||||
<p class="meta"><span class="date">{$date} </span> Geschrieben von {$article.username} | Abgelegt in: {if $cat!=""}{$cat}{else}nirgendwo{/if} </p>
|
||||
|
||||
|
23
modules/search/templates/default/chat.tpl
Normal file
23
modules/search/templates/default/chat.tpl
Normal file
|
@ -0,0 +1,23 @@
|
|||
<div id="maincol_top_invisible">
|
||||
</div>
|
||||
<div class="maincol_box_header">
|
||||
<h2><span>Einstiegsraum:</span></h2><br />
|
||||
</div>
|
||||
<div class="maincol_box_empty">
|
||||
<div class="content_page">
|
||||
|
||||
<form name="form" action="#" method="post">
|
||||
<select name="room">
|
||||
{foreach from=$options item=options}
|
||||
<option value="{$options.room}" {$options.selected}>{$options.room}</option>
|
||||
{/foreach}
|
||||
</select><br />
|
||||
<a href="http://chat.recensio.org/online.html" target="_blank">Es {$befinden} sich {$usercount} User im Chat.</a><br />Bitte beachte unbedingt unsere <a href="http://forum.recensio.org/help-9.html" target="_blank">Chattiquette</a>. Danke.<br /><br />
<input type="submit" value="Eintreten" /><br />
|
||||
<br /><br />
|
||||
{foreach from=$data item=data}
|
||||
<strong>Raum:</strong> {$data.room}<br /><hr />
|
||||
{$data.users}<br /><br />
|
||||
{/foreach}
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
6
modules/search/templates/default/chatin.tpl
Normal file
6
modules/search/templates/default/chatin.tpl
Normal file
|
@ -0,0 +1,6 @@
|
|||
<h1 class="block">{$messagetitle}</h1>
|
||||
|
||||
<div class="review-column1-unit">
<a href="http://forum.recensio.org/help-8.html" target="_blank" onclick="return popup('http://forum.recensio.org/help-8.html','width=800, height=400, resizeable,scrollbars=yes');">Hilfe</a> | <a href="http://forum.recensio.org/misc.php?action=smilies&popup=true" target="_blank" onclick="return popup('http://forum.recensio.org/misc.php?action=smilies&popup=true','width=600, height=400, resizeable,scrollbars=yes');">Smilieliste</a> | <span id="Uhrzeit"></span>
|
||||
<iframe name="output" src="http://www.recensio.org:8080/out?yacsid={$cookie}" scrolling="auto" noresize frameborder="0" framespacing="0" height="500" width="95%" ></iframe>
|
||||
<iframe name="input" src="/modules/input.php?cookie={$cookie}&iss={$iss}" scrolling="no" noresize frameborder="0" framespacing="0" width="95%" height="60"></iframe>
|
||||
</div>
|
47
modules/search/templates/default/listsearch.tpl
Normal file
47
modules/search/templates/default/listsearch.tpl
Normal file
|
@ -0,0 +1,47 @@
|
|||
<div id="maincol_top_invisible">
|
||||
</div>
|
||||
<div class="maincol_review_header">
|
||||
<h2><span>Reviews</span></h2><br />
|
||||
</div>
|
||||
<div class="maincol_box_empty">
|
||||
<div class="content_page">
|
||||
{if $link!=""}
|
||||
{$link.all} | {$link.buch} | {$link.cd} | {$link.dvd}
|
||||
<br />
|
||||
{/if}
|
||||
{if $link.needreview!=""}
|
||||
{$link.needreview} | {$link.notneedreview}
|
||||
<br />
|
||||
{/if}
|
||||
{if $reviews==""}
|
||||
Noch keine Reviews.
|
||||
{else}
|
||||
<table>
|
||||
{foreach from=$reviews item=review}
|
||||
<tr>
|
||||
<td width="6%">{$review.nr}.)</td>
|
||||
<td width="7%">
|
||||
<img style="border:none;" src="{$path}modules/reviews/images/{$review.hasreviewimg}" border="0" alt="{$review.hasreviewimgalt}"/></a></td>
|
||||
<td><a href="http://{$review.art}.recensio.org/review/{$review.urlname}-{$review.id}.html">{$review.title}</a><br />{if $review.typ==3} mit {else} von {/if} {$review.interpret} ({$review.pyear}) {$review.topimage}</td>
|
||||
<td width="7%">
|
||||
<!--<a href="/reviews/art/{$review.art}">--><img style="border:none;" src="{$path}modules/reviews/images/{$review.img}" border="0" alt="{$review.imgalt}"/><!--</a>--></td>
|
||||
<td width="21%">{$review.result} von 10 Punkten</td>
|
||||
<td width="13%">Userwertung: {$review.voteresult}</td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
</table>
|
||||
{/if}
|
||||
</div>
|
||||
{if $pagination!=""}
|
||||
<div align="center">{$pagination}</div>
|
||||
{/if}
|
||||
<h4>Legende:</h4>
|
||||
<img src="/modules/reviews/images/review.png" border="0" alt="Review vorhanden"/> - Für diesen Titel ist ein Review vorhanden
|
||||
<img src="/modules/reviews/images/noreview.png" border="0" alt="Kein Review vorhanden"/> - Für diesen Titel ist kein Review vorhanden <br/>
|
||||
<!--<img src="/images/top.gif" border="0" alt="Spitze"/> - Super (> 9 Punkte)
|
||||
<img src="/images/good.gif" border="0" alt="Gut"/> - Gut (> 8 Punkte)
|
||||
<img src="/images/ok.gif" border="0" alt="OK"/> - OK (> 7 Punkte)
|
||||
<img src="/images/bad.gif" border="0" alt="Schlecht"/> - Schlecht (< 2 Punkte)<br />
|
||||
<span style="font-size:x-small;"> <a href="/forum/misc.php?action=help&hid=8" target="_blank" onclick="return popup('/forum/misc.php?action=help&hid=10','width=800, height=400, resizeable,scrollbars=yes');">(Warum werden die Sterne nicht angezeigt?)</a></span>--><br />
|
||||
<hr class="clear-contentunit" />
|
||||
</div>
|
9
modules/search/templates/default/online.tpl
Normal file
9
modules/search/templates/default/online.tpl
Normal file
|
@ -0,0 +1,9 @@
|
|||
<h1 class="block">User im Chat</h1>
|
||||
<div class="online">
|
||||
{foreach from=$data item=data}
|
||||
<strong>Raum:</strong> {$data.room}<br /><hr />
|
||||
{$data.users}<br /><br />
|
||||
{foreachelse}
|
||||
Keine User online :(
|
||||
{/foreach}
|
||||
</div>
|
31
modules/search/templates/default/search.tpl
Normal file
31
modules/search/templates/default/search.tpl
Normal file
|
@ -0,0 +1,31 @@
|
|||
<div id="maincol_top_invisible">
|
||||
</div>
|
||||
<div class="maincol_review_header">
|
||||
<h2><span>Suche</span></h2><br />
|
||||
</div>
|
||||
<div class="maincol_box_empty">
|
||||
<div class="content_page">
|
||||
<form name="form" action="/search.html" method="post">
|
||||
<label for="search" class="left">Suchbegriff:</label>
|
||||
<input id="search" name="search" size="38" /><br /><br />
|
||||
<label for="art" class="left">Art:</label>
|
||||
<select id="art" style="margin-left: 44px;" name="art">
|
||||
<option value="all">alle</option>
|
||||
<option value="dvd">DVD</option>
|
||||
<option value="book">Buch</option>
|
||||
</select><br /><br />
|
||||
<label for="styp" class="left">Suche in:</label>
|
||||
<select id="styp" size="7" style="margin-left: 15px;" multiple="multiple" name="styp[]">
|
||||
<option value="interpret">Author</option>
|
||||
<option value="author">Reviewauthor</option>
|
||||
<option value="title">Titel</option>
|
||||
<option value="description">Beschreibung</option>
|
||||
<option value="review">Review</option>
|
||||
</select><br /><span style="font-size: 95%;">Leer lassen um überall zu suchen.</span><br /><br />
|
||||
<label for="sexact" class="left">Exakter Suchbegriff:</label>
|
||||
<input type="checkbox" id="sexact" name="sexact" value="1" /><br /><br />
|
||||
<input type="hidden" name="send" value="1" />
|
||||
<input type="submit" class="button" value="Absenden" /><input type="reset" class="button" value="Löschen" />
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
Loading…
Add table
Add a link
Reference in a new issue