getTimestamp(); $bemerkung = preg_replace("/([^\p{L}\p{P}\p{Z}\p{N}\n]{1,})/ui", '', strip_tags($_REQUEST['Bemerkung'])); $ort = preg_replace("/([^\p{L}\p{P}\p{Z}\p{N}]{1,})/ui", '', strip_tags($_REQUEST['Ort'])); $SQL = "INSERT INTO `Wecken` (`UID`, `Date`, `Ort`, `Bemerkung`) " . "VALUES ('" . $user['UID'] . "', '" . $date . "', '" . $ort . "', " . "'" . $bemerkung . "')"; sql_query($SQL); $html .= success(Get_Text(4)); } else $html .= error("Broken date!"); break; case 'delete' : if (isset ($_REQUEST['id']) && preg_match("/^[0-9]{1,11}$/", $_REQUEST['id'])) $id = $_REQUEST['id']; else return error("Incomplete call, missing wake-up ID."); $wakeup = sql_select("SELECT * FROM `Wecken` WHERE `ID`=" . sql_escape($id) . " LIMIT 1"); if (count($wakeup) > 0 && $wakeup[0]['UID'] == $user['UID']) { sql_query("DELETE FROM `Wecken` WHERE `ID`=" . sql_escape($id) . " LIMIT 1"); $html .= success("Wake-up call deleted."); } else return error("No wake-up found."); break; } } $html .= "
" . Get_Text("Hello") . $user['Nick'] . ",
" . Get_Text("pub_wake_beschreibung") . "
' . Get_Text("pub_wake_Datum") . ' | ' . Get_Text("pub_waeckliste_Nick") . ' | ' . Get_Text("pub_wake_Ort") . ' | ' . Get_Text("pub_wake_Bemerkung") . ' | ||
---|---|---|---|---|---|
' . date("Y-m-d H:i", mysql_result($Erg, $i, "Date")) . ' | '; $html .= '' . UID2Nick(mysql_result($Erg, $i, "UID")) . ' | '; $html .= '' . mysql_result($Erg, $i, "Ort") . ' | '; $html .= '' . mysql_result($Erg, $i, "Bemerkung") . ' | '; if (mysql_result($Erg, $i, "UID") == $user['UID']) $html .= '" . Get_Text("pub_wake_del") . ' | '; else $html .= ''; $html .= ' |