Hab mal ne kleine Anleitung wie man User dazu bringt die AGB's bei jeder Änderung zu bestätigen ^^
PHP-Code:
1.SQL ausführen
---------------------------------------------------------------------------------------------------------------
ALTER TABLE `vms_kontodaten` ADD `agb` BOOLEAN NOT NULL DEFAULT '0'
2.lib/header.php öffnen
---------------------------------------------------------------------------------------------------------------
unter : require ( 'lib/extras.lib.php' );
das hier einfügen :
if($_POST['agb_best'] == 'Akzeptieren'){
db_query("UPDATE vms_kontodaten SET agb = 1 WHERE uid = '".$_SESSION['uid']."'");
}
$agb = mysql_fetch_array(db_query("SELECT agb FROM vms_kontodaten WHERE uid = '".$_SESSION['uid']."'"));
if($agb['agb'] == 0 and $_SESSION['login'] == TRUE){$_GET['content'] = '/intern/agbs';}
3.intern/agbs.php öffnen
---------------------------------------------------------------------------------------------------------------
unter : <?=nl2br($inhalt);?>
das hier einfügen :
<?if($agb['agb'] == 0 and $_SESSION['login'] == TRUE){?>
<div style="margin:10px auto 0 auto; text-align:center; width:80px;">
<form action="" method="post">
<input type="submit" name="agb_best" value="Akzeptieren" />
</form>
</div>
<?}?>
4.adminforce/content/texte/agbs.php öffnen
---------------------------------------------------------------------------------------------------------------
unter :
fwrite ($fp, $_POST['text']);
fclose ($fp);
das hier einfügen :
db_query("UPDATE vms_kontodaten SET agb = 0");