//-------------------------------------MySQL------------------------------------------------------
$MySQL_Host="localhost"; //Hostname des SQL Servers
$MySQL_User="vcsportiva"; //User Name für den SQL Servers
$MySQL_Passw="vcsportiva97531"; //Passwort für den SQL Servers
$dblk=connect();
$db="vcsportiva"; //Datenbank Name
/* Funktionen*/
function connect(){
global $MySQL_Host, $MySQL_User, $MySQL_Passw;
if (! $linkid=mysql_connect("$MySQL_Host","$MySQL_User","$MySQL_Passw")) {
echo "Die Verbindung zu ",$MySQL_Host," konnte nicht hergestellt werden ";
exit;
}
return $linkid;
}
//Binde templates system ein
require('Smarty-2.6.18/Smarty.class.php');
$smarty = new Smarty;
$smarty->template_dir = 'Templates/guestbook/';
$smarty->compile_dir = 'templates_c/';
$smarty->config_dir = 'configs/';
$smarty->cache_dir = 'cache/';
if($_GET['action']=='send' and $_POST['spam']>5)
{
$res=mysql_db_query($db, "INSERT INTO guestbook(titel, datum, email, www, text, ip) VALUES ('".$_POST['titel']."', now(), '".$_POST['email']."','".$_POST['www']."','".$_POST['text']."','".$_SERVER['REMOTE_ADDR']."')");
header('Location: guestbook.php?action=ende');
}
?>