Initial checkin

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

View file

@ -0,0 +1,17 @@
K 25
svn:wc:ra_dav:version-url
V 40
/astat/!svn/ver/69/trunk/modules/contact
END
contact.output.php
K 25
svn:wc:ra_dav:version-url
V 59
/astat/!svn/ver/69/trunk/modules/contact/contact.output.php
END
contact.module.php
K 25
svn:wc:ra_dav:version-url
V 59
/astat/!svn/ver/69/trunk/modules/contact/contact.module.php
END

View file

@ -0,0 +1,106 @@
9
dir
69
http://svn.astat.org/astat/trunk/modules/contact
http://svn.astat.org/astat
2009-10-10T17:35:03.895480Z
69
genuineparts
svn:special svn:externals svn:needs-lock
0
contact.output.php
file
2009-10-10T17:32:51.000000Z
4e9c64ab0cff2c58d91082a33ac83851
2009-10-10T17:35:03.895480Z
69
genuineparts
3382
contact.module.php
file
2009-10-10T17:14:15.000000Z
cd8f1c2ddfb4b2ccd79c0a24bca98c87
2009-10-10T17:35:03.895480Z
69
genuineparts
1585
templates
dir

View file

@ -0,0 +1 @@
9

View file

@ -0,0 +1,44 @@
<?php
class module_contact extends admin_module{
function admin_panels(){
#$panels=array(array("add_text","Text hinzuf&uuml;gen","page_add"),array("edit_text","Text editieren","page_edit"),array("group_only","Textkategorien"),array("addcategory_text","Kategorie hinzuf&uuml;gen","tag_blue_add"),array("editcategory_text","Kategorie editieren","tag_blue_edit"));
return $panels;
}
function get_info(){
$info["name"]="Kontaktformular";
$info["file"]="contact";
$info["author"]="astat";
$info["version"]="1.0.0";
$info["url"]="http://www.astat.org";
return $info;
}
function install(){
global $config, $db;
$db->query("INSERT INTO `" . $config["prefix"] . "config_categorys` (
`cid` ,
`categoryname`
)
VALUES (
NULL , 'Kontaktformular'
);");
$cid=$db->last_id();
$db->query("INSERT INTO `" . $config["prefix"] . "config` (`name`, `value`, `title`, `description`, `option`, `category`) VALUES
('contact_email', 'contact@example.com', 'E-Mailadresse', 'Die E-Mailadresse(n) an die Kontaktanfragen gesendet werden sollen (meherer Adressen mit Komma trennen).', 'text', ".$cid."),
('contact_captcha', '1', 'Captcha verwenden?', 'Soll bei der Kontaktaufnahme ein Captcha angezeigt werden?', 'yesno', ".$cid.");");
return TRUE;
}
function uninstall(){
global $config, $db;
$db->query("DELETE FROM `" . $config["prefix"] . "config_categorys` WHERE categoryname='Kontaktformular'");
$db->query("DELETE FROM `" . $config["prefix"] . "config` WHERE name in ('contact_email','contact_captcha')");
return TRUE;
}
}
?>

View file

@ -0,0 +1,76 @@
<?php
/**
* Project: astat - simple site engine
* File: /modules/contact/contact.output.php
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; version 2 of the License.
*
* This program 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 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_astat")) {
die("Dieses Script kann nicht ausserhalb des Frameworks laufen!");
}
$session->page_begin("Contactform", FALSE);
class contact extends module{
function output(){
global $module,$config,$db,$log,$core,$error;
$emsg=FALSE;
if(isset($_POST['submit'])){
if(!isset($_POST['name']) || $_POST['name']==""){
$emsg.='<span style="color:red; font-weight:bold">Du musst deinen Namen eingeben!</span><br />';
}elseif(!isset($_POST['email']) || $_POST['email']==""){
$emsg.='<span style="color:red; font-weight:bold">Du musst deine E-Mailadresse eingeben!</span><br />';
}elseif(!isset($_POST['subject']) || $_POST['subject']==""){
$emsg.='<span style="color:red; font-weight:bold">Du musst einen Betreff eingeben!</span><br />';
}elseif(!isset($_POST['message']) || $_POST['message']==""){
$emsg.='<span style="color:red; font-weight:bold">Du musst eine Nachricht eingeben!</span><br />';
}
if(!preg_match("/^[_a-zA-Z0-9-]+(\.[_a-zA-Z0-9-]+)*@[a-zA-Z0-9-]+(\.[a-zA-Z0-9-]+)*\.(([0-9]{1,3})|([a-zA-Z]{2,3})|(aero|coop|info|museum|name))$/",$_POST['email'])){
$emsg.='<span style="color:red; font-weight:bold">Deine E-Mail ist ung&uuml;ltig!</span><br />';
}
if($config['contact_captcha']==1){
include ('thirdparty/securimage/securimage.php');
$img = new Securimage();
if(!$img->check($_POST['captcha'])){
$emsg.='<span style="color:red; font-weight:bold">Das CAPTCHA ist ung&uuml;ltig!</span><br />';
}
}
if(!$emsg){
$mail=new mail();
$mail->set_header("From",$config["sitetitle"]." <".$config["siteemail"].">");
$this->tpl->assign('post',$_POST);
$this->tpl->assign("sitename",$config["sitetitle"]);
$mailbody=$this->tpl->fetch('contact_mail.tpl');
$mail->bodytext($mailbody);
$mail->sendmail($config["contact_email"],"Kontakt von ".$_POST["name"]);
$core->message("Danke","Deine Nachricht wurde versendet.<br />Wir werden so schnell wie m&ouml;glich Kontakt mit Dir aufnehmen.",TRUE,$config["path"]."/index.php",3);
}
}
$this->tpl->assign('post',$_POST);
$this->tpl->assign('emsg',$emsg);
$this->tpl->assign('captcha',$config['contact_captcha']);
$this->tpl->assign('sid',md5(uniqid(time())));
return $this->tpl->fetch('contactform.tpl', 'contactform');
}
}
?>

View file

@ -0,0 +1,44 @@
<?php
class module_contact extends admin_module{
function admin_panels(){
#$panels=array(array("add_text","Text hinzuf&uuml;gen","page_add"),array("edit_text","Text editieren","page_edit"),array("group_only","Textkategorien"),array("addcategory_text","Kategorie hinzuf&uuml;gen","tag_blue_add"),array("editcategory_text","Kategorie editieren","tag_blue_edit"));
return $panels;
}
function get_info(){
$info["name"]="Kontaktformular";
$info["file"]="contact";
$info["author"]="astat";
$info["version"]="1.0.0";
$info["url"]="http://www.astat.org";
return $info;
}
function install(){
global $config, $db;
$db->query("INSERT INTO `" . $config["prefix"] . "config_categorys` (
`cid` ,
`categoryname`
)
VALUES (
NULL , 'Kontaktformular'
);");
$cid=$db->last_id();
$db->query("INSERT INTO `" . $config["prefix"] . "config` (`name`, `value`, `title`, `description`, `option`, `category`) VALUES
('contact_email', 'contact@example.com', 'E-Mailadresse', 'Die E-Mailadresse(n) an die Kontaktanfragen gesendet werden sollen (meherer Adressen mit Komma trennen).', 'text', ".$cid."),
('contact_captcha', '1', 'Captcha verwenden?', 'Soll bei der Kontaktaufnahme ein Captcha angezeigt werden?', 'yesno', ".$cid.");");
return TRUE;
}
function uninstall(){
global $config, $db;
$db->query("DELETE FROM `" . $config["prefix"] . "config_categorys` WHERE categoryname='Kontaktformular'");
$db->query("DELETE FROM `" . $config["prefix"] . "config` WHERE name in ('contact_email','contact_captcha')");
return TRUE;
}
}
?>

View file

@ -0,0 +1,76 @@
<?php
/**
* Project: astat - simple site engine
* File: /modules/contact/contact.output.php
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; version 2 of the License.
*
* This program 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 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_astat")) {
die("Dieses Script kann nicht ausserhalb des Frameworks laufen!");
}
$session->page_begin("Contactform", FALSE);
class contact extends module{
function output(){
global $module,$config,$db,$log,$core,$error;
$emsg=FALSE;
if(isset($_POST['submit'])){
if(!isset($_POST['name']) || $_POST['name']==""){
$emsg.='<span style="color:red; font-weight:bold">Du musst deinen Namen eingeben!</span><br />';
}elseif(!isset($_POST['email']) || $_POST['email']==""){
$emsg.='<span style="color:red; font-weight:bold">Du musst deine E-Mailadresse eingeben!</span><br />';
}elseif(!isset($_POST['subject']) || $_POST['subject']==""){
$emsg.='<span style="color:red; font-weight:bold">Du musst einen Betreff eingeben!</span><br />';
}elseif(!isset($_POST['message']) || $_POST['message']==""){
$emsg.='<span style="color:red; font-weight:bold">Du musst eine Nachricht eingeben!</span><br />';
}
if(!preg_match("/^[_a-zA-Z0-9-]+(\.[_a-zA-Z0-9-]+)*@[a-zA-Z0-9-]+(\.[a-zA-Z0-9-]+)*\.(([0-9]{1,3})|([a-zA-Z]{2,3})|(aero|coop|info|museum|name))$/",$_POST['email'])){
$emsg.='<span style="color:red; font-weight:bold">Deine E-Mail ist ung&uuml;ltig!</span><br />';
}
if($config['contact_captcha']==1){
include ('thirdparty/securimage/securimage.php');
$img = new Securimage();
if(!$img->check($_POST['captcha'])){
$emsg.='<span style="color:red; font-weight:bold">Das CAPTCHA ist ung&uuml;ltig!</span><br />';
}
}
if(!$emsg){
$mail=new mail();
$mail->set_header("From",$config["sitetitle"]." <".$config["siteemail"].">");
$this->tpl->assign('post',$_POST);
$this->tpl->assign("sitename",$config["sitetitle"]);
$mailbody=$this->tpl->fetch('contact_mail.tpl');
$mail->bodytext($mailbody);
$mail->sendmail($config["contact_email"],"Kontakt von ".$_POST["name"]);
$core->message("Danke","Deine Nachricht wurde versendet.<br />Wir werden so schnell wie m&ouml;glich Kontakt mit Dir aufnehmen.",TRUE,$config["path"]."/index.php",3);
}
}
$this->tpl->assign('post',$_POST);
$this->tpl->assign('emsg',$emsg);
$this->tpl->assign('captcha',$config['contact_captcha']);
$this->tpl->assign('sid',md5(uniqid(time())));
return $this->tpl->fetch('contactform.tpl', 'contactform');
}
}
?>

View file

@ -0,0 +1,5 @@
K 25
svn:wc:ra_dav:version-url
V 50
/astat/!svn/ver/69/trunk/modules/contact/templates
END

View file

@ -0,0 +1,38 @@
9
dir
69
http://svn.astat.org/astat/trunk/modules/contact/templates
http://svn.astat.org/astat
2009-10-10T17:35:03.895480Z
69
genuineparts
svn:special svn:externals svn:needs-lock
0
default
dir

View file

@ -0,0 +1 @@
9

View file

@ -0,0 +1,17 @@
K 25
svn:wc:ra_dav:version-url
V 58
/astat/!svn/ver/69/trunk/modules/contact/templates/default
END
contact_mail.tpl
K 25
svn:wc:ra_dav:version-url
V 75
/astat/!svn/ver/69/trunk/modules/contact/templates/default/contact_mail.tpl
END
contactform.tpl
K 25
svn:wc:ra_dav:version-url
V 74
/astat/!svn/ver/69/trunk/modules/contact/templates/default/contactform.tpl
END

View file

@ -0,0 +1,103 @@
9
dir
69
http://svn.astat.org/astat/trunk/modules/contact/templates/default
http://svn.astat.org/astat
2009-10-10T17:35:03.895480Z
69
genuineparts
svn:special svn:externals svn:needs-lock
0
contact_mail.tpl
file
2009-10-10T17:29:38.000000Z
86f998db070b9b0b66eb88fe226d05fe
2009-10-10T17:35:03.895480Z
69
genuineparts
164
contactform.tpl
file
2009-10-10T17:26:12.000000Z
cfefcc99aa476b7778f8c5722d29ea4a
2009-10-10T17:35:03.895480Z
69
genuineparts
2084

View file

@ -0,0 +1 @@
9

View file

@ -0,0 +1,8 @@
Jemand hat Kontakt über das {$sitename}-Kontaktformular aufgenommen.
Name: {$post.name}
E-Mail: {$post.email}
Betreff: {$post.subject}
Nachricht:
{$post.message}

View file

@ -0,0 +1,38 @@
<h1>Kontaktformular</h1>
{$emsg} <form action="/index.php?task=contact" method="post">
<table border="0" align="center" width="450">
<tr>
<td align="left">Name:</td>
<td align="right"><input type="text" value="{$post.name}" name="name" size="35" /></td>
</tr>
<tr>
<td align="left">Email:</td>
<td align="right"><input type="text" value="{$post.email}" name="email" size="35" /></td>
</tr>
<tr>
<td align="left">Betreff:</td>
<td align="right"><input type="text" value="{$post.subject}" name="subject" size="35" /></td>
</tr>
<tr>
<td align="left" valign="top">Nachricht:</td>
<td align="right"><textarea name="message" cols="40" rows="12">{$post.message}</textarea></td>
</tr>
{if $captcha==1}
<tr>
<td align="left" valign="top">Captcha:</td>
<td align="right"><img src="{$path}thirdparty/securimage/securimage_show.php?sid={$sid}" id="image" align="absmiddle" /><br /><a href="#" onclick="document.getElementById('image').src = '{$path}thirdparty/securimage/securimage_show.php?sid=' + Math.random(); return false"><img src="{$path}themes/default/images/icons/arrow_refresh.png" alt="Refresh" /></a>&nbsp;<a href="{$path}thirdparty/securimage/securimage_play.php" style="font-size: 13px"><img src="{$path}themes/default/images/icons/sound.png" alt="Sound" /></a></td>
</tr>
<tr>
<td align="left" valign="top">Captcha eingeben:</td>
<td align="right"><input type="text" name="captcha" size="15" maxlength="15" /></td>
</tr>
{/if}
<tr>
<td align="center" colspan="2">
<input type="submit" name="submit" value="Senden" /> &nbsp;
<input type="reset" value="L&ouml;schen" /><br />
Alle Felder sind Pflichtfelder!
</td>
</tr>
</table>
</form>

View file

@ -0,0 +1,8 @@
Jemand hat Kontakt über das {$sitename}-Kontaktformular aufgenommen.
Name: {$post.name}
E-Mail: {$post.email}
Betreff: {$post.subject}
Nachricht:
{$post.message}

View file

@ -0,0 +1,32 @@
<div id="maincol_top_invisible">
</div>
<div class="maincol_review_header">
<h2><span>Kontaktformular</span></h2><br />
</div>
<div class="maincol_box_empty">
<div class="content_page">
{$emsg} <form action="/index.php?task=contact" method="post">
<label for="name" class="left">* Name:</label><br />
<input name="name" id="name" value="{$post.name}" size="38" /><br /><br />
<label for="email" class="left">* E-mail:</label><br />
<input name="email" id="email" value="{$post.email}" size="38" /><br /><br />
<label for="subject" class="left">* Betreff:</label><br />
<input name="subject" id="subject" value="{$post.subject}" size="38" /><br /><br />
<label for="subject" class="left">* Nachricht:</label><br />
<textarea name="message" cols="40" rows="12">{$post.message}</textarea><br /><br />
{if $captcha==1}
<label for="subject" class="left">* Captcha:</label><br />
<img src="{$path}thirdparty/securimage/securimage_show.php?sid={$sid}" id="image" align="absmiddle" /><br /><a href="#" onclick="document.getElementById('image').src = '{$path}thirdparty/securimage/securimage_show.php?sid=' + Math.random(); return false"><img src="{$path}themes/default/images/icons/arrow_refresh.png" alt="Refresh" /></a>&nbsp;<a href="{$path}thirdparty/securimage/securimage_play.php" style="font-size: 13px"><img src="{$path}themes/default/images/icons/sound.png" alt="Sound" /></a><br /><br />
<input type="text" name="captcha" size="15" maxlength="15" /><br /><br />
{/if}
Alle Felder mit * sind Pflichtfelder!<br /><br />
<input class="button" align="right" type="submit" value="Absenden" /><input class="button" align="right" type="reset" value="L&ouml;schen" />
</form>
</div>
</div>