45 lines
1.5 KiB
PHP
45 lines
1.5 KiB
PHP
|
<?php
|
||
|
|
||
|
class module_contact 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"]="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;
|
||
|
}
|
||
|
|
||
|
}
|
||
|
|
||
|
?>
|