43 lines
1.3 KiB
PHP
43 lines
1.3 KiB
PHP
<?php
|
|
|
|
class module_contact extends admin_module{
|
|
|
|
function admin_panels(){
|
|
return array();
|
|
}
|
|
|
|
function get_info(){
|
|
$info["name"]="Kontaktformular";
|
|
$info["file"]="contact";
|
|
$info["author"]="BeCast";
|
|
$info["version"]="1.0.1";
|
|
$info["url"]="https://www.becast.at";
|
|
return $info;
|
|
}
|
|
|
|
function install(){
|
|
global $config, $db;
|
|
$db->query("INSERT INTO `" . $config["prefix"] . "config_categories` (
|
|
`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 (mehrere 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;
|
|
}
|
|
|
|
}
|
|
|
|
?>
|