query($query) or die("Cannot execute query");
while ($row = $result->fetch_array()) {
if($row['case_sensitive'] == 'N'){
$sensitive = 'Nein';
}else{
$sensitive = 'Ja';
}
$row['sensitive'] = $sensitive;
$table_data[] = $row;
}
$smarty->assign('table_data', $table_data);
}
if ($action == 'save') {
$stichwort = $_POST['stichwort'];
$sensitive = $_POST['sensitive'];
$stichwort = htmlentities($stichwort);
$stichwort = htmlclean($stichwort, $db);
$eid = $_SESSION["eid"];
if ($sensitive == '' or $sensitive == NULL){
$sensitive = 'N';
}else{
$sensitive = 'Y';
}
$sql1 = $db->query("insert into lue_stichworte (eid, stichwort, case_sensitive) VALUES('$eid', '$stichwort', '$sensitive')");
echo "";
}
if ($action == 'del') {
$luesid = $_GET['luesid'];
$eid = $_SESSION["eid"];
$sql1 = $db->query("DELETE FROM lue_stichworte WHERE luesid=$luesid");
echo "";
}
$smarty->assign('action', "$action");
$smarty->display("$template/$templatename");
?>