<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<style type="text/css">
body, td, input, select {font-family: Tahoma, Arial, Helvetica, bold; font-size: 11px; color: #0099ff;}
body {background : #000000}
</style>
<style type="text/css">
}
h1{
line-height:130%;
}
a{
color: #D60808;
text-decoration:none;
font-weight:bold;
}
a:hover{
border-bottom:1px dotted #000000;
color: #307082;
}
#dhtmlgoodies_tooltip{
background-color:#191919;
border:1px solid #aaaaaa;
position:absolute;
display:none;
z-index:20000;
padding:2px;
font-size:0.9em;
-moz-border-radius:6px; /* Rounded edges in Firefox */
font-family: "Trebuchet MS", "Lucida Sans Unicode", Arial, sans-serif;
}
#dhtmlgoodies_tooltipShadow{
position:absolute;
background-color:#383838;
display:none;
z-index:10000;
opacity:0.7;
filter:alpha(opacity=70);
-khtml-opacity: 0.7;
-moz-opacity: 0.7;
-moz-border-radius:6px; /* Rounded edges in Firefox */
}
</style>
<SCRIPT type="text/javascript">
var dhtmlgoodies_tooltip = false;
var dhtmlgoodies_tooltipShadow = false;
var dhtmlgoodies_shadowSize = 4;
var dhtmlgoodies_tooltipMaxWidth = 200;
var dhtmlgoodies_tooltipMinWidth = 100;
var dhtmlgoodies_iframe = false;
var tooltip_is_msie = (navigator.userAgent.indexOf('MSIE')>=0 && navigator.userAgent.indexOf('opera')==-1 && document.all)?true:false;
function showTooltip(e,tooltipTxt)
{
var bodyWidth = Math.max(document.body.clientWidth,document.documentElement.clientWidth) - 20;
if(!dhtmlgoodies_tooltip){
dhtmlgoodies_tooltip = document.createElement('DIV');
dhtmlgoodies_tooltip.id = 'dhtmlgoodies_tooltip';
dhtmlgoodies_tooltipShadow = document.createElement('DIV');
dhtmlgoodies_tooltipShadow.id = 'dhtmlgoodies_tooltipShadow';
document.body.appendChild(dhtmlgoodies_tooltip);
document.body.appendChild(dhtmlgoodies_tooltipShadow);
if(tooltip_is_msie){
dhtmlgoodies_iframe = document.createElement('IFRAME');
dhtmlgoodies_iframe.frameborder='5';
dhtmlgoodies_iframe.style.backgroundColor='#FFFFFF';
dhtmlgoodies_iframe.src = '#';
dhtmlgoodies_iframe.style.zIndex = 100;
dhtmlgoodies_iframe.style.position = 'absolute';
document.body.appendChild(dhtmlgoodies_iframe);
}
}
dhtmlgoodies_tooltip.style.display='block';
dhtmlgoodies_tooltipShadow.style.display='block';
if(tooltip_is_msie)dhtmlgoodies_iframe.style.display='block';
var st = Math.max(document.body.scrollTop,document.documentElement.scrollTop);
if(navigator.userAgent.toLowerCase().indexOf('safari')>=0)st=0;
var leftPos = e.clientX + 20;
dhtmlgoodies_tooltip.style.width = null; // Reset style width if it's set
dhtmlgoodies_tooltip.innerHTML = tooltipTxt;
dhtmlgoodies_tooltip.style.left = leftPos + 'px';
dhtmlgoodies_tooltip.style.top = e.clientY + 10 + st + 'px';
dhtmlgoodies_tooltipShadow.style.left = leftPos + dhtmlgoodies_shadowSize + 'px';
dhtmlgoodies_tooltipShadow.style.top = e.clientY + 10 + st + dhtmlgoodies_shadowSize + 'px';
if(dhtmlgoodies_tooltip.offsetWidth>dhtmlgoodies_tooltipMaxWidth){ /* Exceeding max width of tooltip ? */
dhtmlgoodies_tooltip.style.width = dhtmlgoodies_tooltipMaxWidth + 'px';
}
var tooltipWidth = dhtmlgoodies_tooltip.offsetWidth;
if(tooltipWidth<dhtmlgoodies_tooltipMinWidth)tooltipWidth = dhtmlgoodies_tooltipMinWidth;
dhtmlgoodies_tooltip.style.width = tooltipWidth + 'px';
dhtmlgoodies_tooltipShadow.style.width = dhtmlgoodies_tooltip.offsetWidth + 'px';
dhtmlgoodies_tooltipShadow.style.height = dhtmlgoodies_tooltip.offsetHeight + 'px';
if((leftPos + tooltipWidth)>bodyWidth){
dhtmlgoodies_tooltip.style.left = (dhtmlgoodies_tooltipShadow.style.left.replace('px','') - ((leftPos + tooltipWidth)-bodyWidth)) + 'px';
dhtmlgoodies_tooltipShadow.style.left = (dhtmlgoodies_tooltipShadow.style.left.replace('px','') - ((leftPos + tooltipWidth)-bodyWidth) + dhtmlgoodies_shadowSize) + 'px';
}
if(tooltip_is_msie){
dhtmlgoodies_iframe.style.left = dhtmlgoodies_tooltip.style.left;
dhtmlgoodies_iframe.style.top = dhtmlgoodies_tooltip.style.top;
dhtmlgoodies_iframe.style.width = dhtmlgoodies_tooltip.offsetWidth + 'px';
dhtmlgoodies_iframe.style.height = dhtmlgoodies_tooltip.offsetHeight + 'px';
}
}
function hideTooltip()
{
dhtmlgoodies_tooltip.style.display='none';
dhtmlgoodies_tooltipShadow.style.display='none';
if(tooltip_is_msie)dhtmlgoodies_iframe.style.display='none';
}
</SCRIPT>
<?PHP
$link = require("../sql.connect.php");
if (isset ($_GET['id1']) && isset($_GET['action'])){
$action = $_GET['action'];
$id1 = $_GET['id1'];
$row1 = $_GET['row1'];
$newtext = $_GET['newtext'];
if ($newtext == ""){
$newtext = "EMPTY";}
else {
$newtext = $newtext;}
if($action=="del"){
$sql = "DELETE FROM dates WHERE ID = '$id1' LIMIT 1";
$result = mysql_query($sql) OR
die("Query: <pre>".$sql."</pre>\n".
"Antwoertchen: ".mysql_error());
}
if($action=="save"){
$sql = "UPDATE dates SET $row1= _utf8 '$newtext' WHERE ID = '$id1' LIMIT 1";
$result = mysql_query($sql) OR
die("Query: <pre>".$sql."</pre>\n".
"Antwoertchen: ".mysql_error());
}
if($action=="inactive"){
$sql = "UPDATE dates SET active='active' WHERE ID = '$id1' LIMIT 1";
$result = mysql_query($sql) OR
die("Query: <pre>".$sql."</pre>\n".
"Antwoertchen: ".mysql_error());
}
if($action=="active"){
$sql = "UPDATE dates SET active='inactive' WHERE ID = '$id1' LIMIT 1";
$result = mysql_query($sql) OR
die("Query: <pre>".$sql."</pre>\n".
"Antwoertchen: ".mysql_error());
}}
?>
<?php
$link = require("../sql.connect.php");
$query = "
SELECT *
FROM dates
ORDER BY date ASC
";
$result = mysql_query("SET NAMES utf8") or die ("Anfrage fehlgeschlagen: ". mysql_error());
$result = mysql_query($query) or die ("Anfrage fehlgeschlagen: ". mysql_error());
echo '<div style="width:600px; height:205px; overflow:auto;">';
echo '<table>';
echo "<br>";
echo "<tr>
<td><font color='#0075bc'><b>ID</b></font></td>
<td><font color='#0075bc'><b>event</b></font></td>
<td><font color='#0075bc'><b>date</b></font></td>
<td><font color='#0075bc'><b>time</b></font></td>
<td><font color='#0075bc'><b>info</b></font></td>
<td><font color='#0075bc'><b>Ort</b></font></td>
<td><font color='#0075bc'><b>Aktiv</b></font></td>
<td><font color='#0075bc'><b>Löschen</b></font></td></tr>";
while ($row=mysql_fetch_assoc($result)) {
$id = $row['ID'];
$event = $row['event'];
$date = $row['date'];
$time = $row['time'];
$info = $row['info'];
$active = $row['active'];
$location = $row['location'];
$bea = $_GET['bea'];
$outputsize = 7;
$outputsizel = 18;
if (strlen($info) > $outputsize){
$infok = ''.substr($info, 0, $outputsize).'...';
}
else {
$infok = $info;
}
if (strlen($location) > $outputsize){
$locationk = ''.substr($location, 0, $outputsize).'...';
}
else {
$locationk = $location;
}
if (strlen($event) > $outputsizel){
$eventk = ''.substr($event, 0, $outputsizel).'...';
}
else {
$eventk = $event;
}
echo '<tr><td>'.$id." </td> \n";
?>
<td>
<a href="<?=$_SERVER['PHP_SELF'];?>?id1=<?=$row['ID'];?>&bea=<? echo $event; ?>&row=event"
style = "font-family: Tahoma, font-size: 13px; color: #ffffff; text-decoration: none;"
onmouseout="hideTooltip()"
onmouseover="showTooltip(event,'<?PHP echo $event; ?>');return false">
<?PHP echo $eventk; ?>
</a>
</td>
<?
?>
<td>
<a href="<?=$_SERVER['PHP_SELF'];?>?id1=<?=$row['ID'];?>&bea=<? echo $date; ?>&row=date"
style = "font-family: Tahoma, font-size: 13px; color: #ffffff; text-decoration: none;">
<?PHP echo $date; ?>
</a>
</td>
<?
?>
<td>
<a href="<?=$_SERVER['PHP_SELF'];?>?id1=<?=$row['ID'];?>&bea=<? echo $time; ?>&row=time"
style = "font-family: Tahoma, font-size: 13px; color: #ffffff; text-decoration: none;">
<?PHP echo $time; ?>
</a>
</td>
<?
?>
<td>
<a href="<?=$_SERVER['PHP_SELF'];?>?id1=<?=$row['ID'];?>&bea=<? echo $info; ?>&row=info"
style = "font-family: Tahoma, font-size: 13px; color: #ffffff; text-decoration: none;"
onmouseout="hideTooltip()"
onmouseover="showTooltip(event,'<?PHP echo $info; ?>');return false">
<?PHP echo $infok; ?>
</a>
</td>
<?
?>
<td>
<a href="<?=$_SERVER['PHP_SELF'];?>?id1=<?=$row['ID'];?>&bea=<? echo $location; ?>&row=location"
style = "font-family: Tahoma, font-size: 13px; color: #ffffff; text-decoration: none;"
onmouseout="hideTooltip()"
onmouseover="showTooltip(event,'<?PHP echo $location; ?>');return false">
<?PHP echo $locationk; ?>
</a>
</td>
<?
?>
<td><center><a href="<?=$_SERVER['PHP_SELF'];?>?id1=<?=$row['ID'];?>&action=<?=$row['active'];?>"><img border=0 height=20px src=img/<? echo $active; ?>.png></a></center></td>
<td><center><a onClick="conf('<?echo $row['name'];?> wirklich löschen?'); return docresult" href="<?=$_SERVER['PHP_SELF'];?>?id1=<?=$row['ID'];?>&action=del"><img border=0 height=20px src=img/delete.png></a></center></td>
<script type='text/javascript'>
function conf(text)
{
if(confirm(text))
{
document.docresult=true;
}
else
{
document.docresult=false;
}
}
</script>
<?
}
echo '</table>';
echo '</div>';
?>
<div style="width:600px;">
<table>
<form id="form" method="POST" action="<?=$_SERVER['PHP_SELF'];?>?id1=<? echo $_GET['id1'];?>&row1=<? echo $_GET['row'];?>&newtext=<? echo $_POST['sqledit'];?>&action=save";">
<tr>
<td>
<textarea cols="50" rows="6" style="color: #ffffff; background-color: #000000;" name="sqledit" ><? echo $bea; ?></textarea>
</td>
<td>
<table>
<tr>
<td>
<input type="image" src="img/save.png" alt="Speichern">
</td>
<td>
<a href="<?=$_SERVER['PHP_SELF'];?>" onclick="document.getElementById( 'form' ).submit(); return;" />Speichern</a></td>
<tr>
</tr>
<td>
<a href="<?=$_SERVER['PHP_SELF'];?>?id1=<?=$row['ID'];?>&action=stop"><img border=0 height=30px alt="Abbrechen" src=img/delete.png></a>
</td>
<td>
<a href="<?=$_SERVER['PHP_SELF'];?>">Abbrechen</a>
</td>
</table>
</tr>
</form>
</table>
</div>
<?
mysql_free_result($result);
?>