initial commit
@@ -0,0 +1,6 @@
|
||||
JWT_SECRET=change-me
|
||||
ADMIN_USERNAME=admin
|
||||
ADMIN_EMAIL=admin@example.com
|
||||
ADMIN_PASSWORD=ChangeMe123!
|
||||
ADMIN_NAME=System Admin
|
||||
VITE_API_URL=http://localhost:18080/api
|
||||
@@ -0,0 +1,7 @@
|
||||
node_modules
|
||||
dist
|
||||
.env
|
||||
.DS_Store
|
||||
npm-debug.log*
|
||||
.scratch/runtime
|
||||
|
||||
@@ -0,0 +1,86 @@
|
||||
function Ajax() {
|
||||
//Eigenschaften deklarieren und initialisieren
|
||||
this.url="";
|
||||
this.params="";
|
||||
this.method="GET";
|
||||
this.onSuccess=null;
|
||||
this.onError=function (msg) {
|
||||
alert(msg)
|
||||
}
|
||||
}
|
||||
|
||||
Ajax.prototype.doRequest=function() {
|
||||
//Ueberpruefen der Angaben
|
||||
if (!this.url) {
|
||||
this.onError("Es wurde kein URL angegeben. Der Request wird abgebrochen.");
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!this.method) {
|
||||
this.method="GET";
|
||||
} else {
|
||||
this.method=this.method.toUpperCase();
|
||||
}
|
||||
|
||||
//Zugriff auf Klasse für readyStateHandler ermoeglichen
|
||||
var _this = this;
|
||||
|
||||
//XMLHttpRequest-Objekt erstellen
|
||||
var xmlHttpRequest=getXMLHttpRequest();
|
||||
if (!xmlHttpRequest) {
|
||||
this.onError("Es konnte kein XMLHttpRequest-Objekt erstellt werden.");
|
||||
return false;
|
||||
}
|
||||
|
||||
//Fallunterscheidung nach Uebertragungsmethode
|
||||
switch (this.method) {
|
||||
case "GET": xmlHttpRequest.open(this.method, this.url+"?"+this.params, true);
|
||||
xmlHttpRequest.onreadystatechange = readyStateHandler;
|
||||
xmlHttpRequest.send(null);
|
||||
break;
|
||||
case "POST": xmlHttpRequest.open(this.method, this.url, true);
|
||||
xmlHttpRequest.onreadystatechange = readyStateHandler;
|
||||
xmlHttpRequest.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
|
||||
xmlHttpRequest.send(this.params);
|
||||
break;
|
||||
}
|
||||
|
||||
//Private Methode zur Verarbeitung der erhaltenen Daten
|
||||
function readyStateHandler() {
|
||||
if (xmlHttpRequest.readyState < 4) {
|
||||
return false;
|
||||
}
|
||||
if (xmlHttpRequest.status == 200 || xmlHttpRequest.status==304) {
|
||||
if (_this.onSuccess) {
|
||||
_this.onSuccess(xmlHttpRequest.responseText, xmlHttpRequest.responseXML);
|
||||
}
|
||||
} else {
|
||||
if (_this.onError) {
|
||||
_this.onError("["+xmlHttpRequest.status+" "+xmlHttpRequest.statusText+"] Es trat ein Fehler bei der Datenbertragung auf.");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//Gibt browserunabhaengig ein XMLHttpRequest-Objekt zurueck
|
||||
function getXMLHttpRequest()
|
||||
{
|
||||
if (window.XMLHttpRequest) {
|
||||
//XMLHttpRequest fuer Firefox, Opera, Safari, ...
|
||||
return new XMLHttpRequest();
|
||||
} else
|
||||
if (window.ActiveXObject) {
|
||||
try {
|
||||
//XMLHTTP (neu) fuer Internet Explorer
|
||||
return new ActiveXObject("Msxml2.XMLHTTP");
|
||||
} catch(e) {
|
||||
try {
|
||||
//XMLHTTP (alt) fuer Internet Explorer
|
||||
return new ActiveXObject("Microsoft.XMLHTTP");
|
||||
} catch (e) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
//Instanz der Klasse Ajax erzeugen und mit der Datenuebertragung starten
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
function loadb()
|
||||
{
|
||||
|
||||
var eingabe=document.getElementById("eingabe").value;
|
||||
|
||||
with (new Ajax()){
|
||||
|
||||
url="Suggest/text1.php";
|
||||
method="POST";
|
||||
params="eingabe="+eingabe;
|
||||
onSuccess=successHandler;
|
||||
onError=errorHandler;
|
||||
doRequest();
|
||||
}
|
||||
|
||||
function clear2 () {
|
||||
document.getElementById("text").innerHTML='';
|
||||
}
|
||||
|
||||
//Den Text in die Seite einfuegen
|
||||
function successHandler(txt,xml){
|
||||
document.getElementById("text").innerHTML=txt;
|
||||
|
||||
}
|
||||
|
||||
//Fehler
|
||||
function errorHandler(msg){
|
||||
document.getElementById("text").innerHTML=msg;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,78 @@
|
||||
<?php
|
||||
session_start();
|
||||
header("Content-Type: text/html; charset=utf-8");
|
||||
include("../verbind.php");
|
||||
$eingabe=$_POST["eingabe"];
|
||||
|
||||
if (!get_magic_quotes_gpc())
|
||||
$eingabe = addslashes($eingabe);
|
||||
|
||||
$auswahl = explode(" ", $eingabe);
|
||||
|
||||
$auswahl1 = $auswahl[0];
|
||||
$auswahl2 = $auswahl[1];
|
||||
|
||||
if (!get_magic_quotes_gpc())
|
||||
|
||||
/*
|
||||
{
|
||||
$eintrag = "INSERT INTO jump
|
||||
(tabelle, tabellenid)
|
||||
VALUES ('$auswahl1', '$auswahl2' )";
|
||||
|
||||
|
||||
|
||||
//$eintragen = mysql_query($eintrag);
|
||||
mysql_query($eintrag) OR die("<pre>\n".$sql."</pre>\n".mysql_error());
|
||||
}
|
||||
|
||||
*/
|
||||
|
||||
|
||||
$query1 = "SELECT a.ort, a.plz, b.titel, b.text1, b.text2, b.strasse, b.platz, b.plz, b.link, b.linkpfad, b.art1, b.plz2, b.aindex, b.aktiv
|
||||
FROM geo a
|
||||
INNER JOIN
|
||||
freizeitneu b ON (b.plz = a.plz)
|
||||
WHERE
|
||||
b.aktiv LIKE '%1%' AND
|
||||
(b.titel LIKE '%$suchtext1%' OR b.text1 LIKE '%$suchtext1%' OR b.text2 LIKE '%$suchtext1%' OR a.ort LIKE '%$suchtext1%') AND
|
||||
(b.titel LIKE '%$suchtext2%' OR b.text1 LIKE '%$suchtext2%' OR b.text2 LIKE '%$suchtext2%' OR a.ort LIKE '%$suchtext2%')
|
||||
ORDER BY titel Limit $rest ";
|
||||
|
||||
$frage1 = mysql_query($query1);
|
||||
while ($antwort=mysql_fetch_array($frage1)){
|
||||
|
||||
|
||||
|
||||
|
||||
$liste.= '<div class="suchtext"><a href="../../'.$ortschaft.'/Info-Freizeit/sehenswuerdigkeiten.php?sa='.$antwort["aindex"].' " >'.
|
||||
'Freizeit in '.$antwort["ort"].' - '.$antwort["titel"].'</a></div><br class="clear"/>';
|
||||
}
|
||||
|
||||
|
||||
echo "<br> ";
|
||||
echo " $liste ";
|
||||
echo "geht soweit";
|
||||
echo $eingabe;
|
||||
echo "<br>";
|
||||
?>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,188 @@
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<link rel="stylesheet" href="style.css" media="screen">
|
||||
<link rel="stylesheet" href="tigra_calendar/tcal.css" media="screen">
|
||||
<script type="text/javascript"src="dygraph/dygraph.js"></script>
|
||||
<script type="text/javascript"src="Suggest/ajax.js"></script>
|
||||
<script type="text/javascript"src="Suggest/suggest.js"></script>
|
||||
<script type="text/javascript"src="Suggest/jquery.js"></script>
|
||||
<link rel="stylesheet" src="dygraph/dygraph.css" />
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
|
||||
|
||||
<?php
|
||||
|
||||
|
||||
|
||||
$az= $_GET['az'];
|
||||
$ra= $_GET['ra'];
|
||||
$hd= $_GET['hd'];
|
||||
|
||||
if (empty($az)) {$az=2;}
|
||||
if (empty($ra)) {$ra=2;}
|
||||
if (empty($hd)) {$hd=2;}
|
||||
|
||||
|
||||
|
||||
|
||||
echo "<body>";
|
||||
|
||||
if ($hd==2) {
|
||||
if ($ra==1) {$oo='true';
|
||||
if ($az==1) {$gradi='graphdiv3h'; $line='false';}
|
||||
if ($az==2) {$gradi='graphdiv2h'; $line='true';}
|
||||
}
|
||||
if ($ra==2) {$oo='false';
|
||||
if ($az==1) {$gradi='graphdiv3h'; $line='false';}
|
||||
if ($az==2) {$gradi='graphdiv2h'; $line='true';}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if ($hd==1) {
|
||||
if ($ra==1) {$oo='true';
|
||||
if ($az==1) {$gradi='graphdiv3d'; $line='true';}
|
||||
if ($az==2) {$gradi='graphdiv2d'; $line='false';}
|
||||
}
|
||||
if ($ra==2) {$oo='false';
|
||||
if ($az==1) {$gradi='graphdiv3d'; $line='true';}
|
||||
if ($az==2) {$gradi='graphdiv2d'; $line='false';}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if ($az==1) {
|
||||
|
||||
?>
|
||||
<div class='top'>
|
||||
<div id="legend2""></div>
|
||||
<br class='clear'/>
|
||||
</div>
|
||||
|
||||
<div class='mitte'>
|
||||
|
||||
<div class="dypos">
|
||||
<div id="<?php echo $gradi; ?>">
|
||||
|
||||
</div>
|
||||
<div id='text'></div>
|
||||
<script type="text/javascript">
|
||||
g2 = new Dygraph(
|
||||
document.getElementById("<?php echo $gradi; ?>"),
|
||||
"graph.csv"
|
||||
, // path to CSV file
|
||||
{
|
||||
legend: 'always',
|
||||
labelsDiv: document.getElementById('legend2'),
|
||||
labelsSeparateLines: <?php echo $line; ?>,
|
||||
hideOverlayOnMouseOut: false,
|
||||
|
||||
colorSaturation: ('0.9'),
|
||||
colorValue: ('0.8'),
|
||||
labelsSeparateLines: false,
|
||||
showRangeSelector: <?php echo $oo; ?>,
|
||||
} // options
|
||||
);
|
||||
</script>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<?php
|
||||
}
|
||||
|
||||
if ($az==2) {
|
||||
|
||||
?>
|
||||
|
||||
<div class='mitte2'>
|
||||
<div class='links'>
|
||||
<div id="legend";"></div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="dypos">
|
||||
<div id="<?php echo $gradi; ?>"></div>
|
||||
<div id='text'></div>
|
||||
<script type="text/javascript">
|
||||
g2 = new Dygraph(
|
||||
document.getElementById("<?php echo $gradi; ?>"),
|
||||
"graph.csv"
|
||||
, // path to CSV file
|
||||
{
|
||||
legend: 'always',
|
||||
labelsDiv: document.getElementById('legend'),
|
||||
labelsSeparateLines: true,
|
||||
colorSaturation: ('0.9'),
|
||||
colorValue: ('0.8'),
|
||||
showRangeSelector: <?php echo $oo; ?>,
|
||||
} // options
|
||||
);
|
||||
</script>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class='bottom'>
|
||||
|
||||
<div class='rechtslogo'>
|
||||
<img src='bilder/logo_sm.png' alt='SE'/>
|
||||
</div>
|
||||
<div class='rechtshome'>
|
||||
<a href="index.php" ><?php echo " <span class='blue'><img class='bildbot' usemap= 'Mapi' src='bilder/home.png' alt='SE'/> </span>";?></a>
|
||||
</div>
|
||||
<?php
|
||||
echo "<div class='rechtsmen'>";
|
||||
if($az==1){
|
||||
echo "<a href='anzeige.php?az=2&ra=$ra&hd=$hd'> <span class='blue'><img class='bildbot' usemap= 'Mapi' src='bilder/legende3.png'/> </span></a>";
|
||||
}
|
||||
if($az==2){
|
||||
echo "<a href='anzeige.php?az=1&ra=$ra&hd=$hd'> <span class='blue'><img class='bildbot' usemap= 'Mapi' src='bilder/legende1o.png'/> </span></a>";
|
||||
}
|
||||
echo "</div>";
|
||||
|
||||
|
||||
|
||||
echo "<div class='rechtsmen'>";
|
||||
if($ra==1){
|
||||
echo "<a href='anzeige.php?ra=2&az=$az&hd=$hd'> <span class='blue'><img class='bildbot' usemap= 'Mapi' src='bilder/range1.png'/> </span></a>";
|
||||
}
|
||||
if($ra==2){
|
||||
echo "<a href='anzeige.php?ra=1&az=$az&hd=$hd'> <span class='blue'><img class='bildbot' usemap= 'Mapi' src='bilder/range2.png'/> </span></a>";
|
||||
}
|
||||
echo "</div>";
|
||||
|
||||
|
||||
echo "<div class='rechtsmen'>";
|
||||
if($hd==2){
|
||||
echo "<a href='anzeige.php?hd=1&az=$az&ra=$ra'> <span class='blue'><img class='bildbot' usemap= 'Mapi' src='bilder/bwdu.png'/> </span></a>";
|
||||
}
|
||||
if($hd==1){
|
||||
echo "<a href='anzeige.php?hd=2&az=$az&ra=$ra'> <span class='blue'><img class='bildbot' usemap= 'Mapi' src='bilder/bwhe2.png'/> </span></a>";
|
||||
}
|
||||
echo "</div>";
|
||||
|
||||
|
||||
|
||||
?>
|
||||
|
||||
Copyright © 2019 | SE-Gebäudeautomation AG | Raiffeisenstraße 17 | 73630 Urbach
|
||||
<br class='clear'/>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
After Width: | Height: | Size: 24 KiB |
|
After Width: | Height: | Size: 23 KiB |
|
After Width: | Height: | Size: 3.8 KiB |
|
After Width: | Height: | Size: 1.9 KiB |
|
After Width: | Height: | Size: 2.0 KiB |
|
After Width: | Height: | Size: 3.6 KiB |
|
After Width: | Height: | Size: 3.6 KiB |
|
After Width: | Height: | Size: 3.4 KiB |
|
After Width: | Height: | Size: 3.5 KiB |
|
After Width: | Height: | Size: 3.5 KiB |
|
After Width: | Height: | Size: 3.2 KiB |
|
After Width: | Height: | Size: 3.3 KiB |
|
After Width: | Height: | Size: 820 B |
|
After Width: | Height: | Size: 908 B |
|
After Width: | Height: | Size: 1.1 KiB |
|
After Width: | Height: | Size: 1.8 KiB |
|
After Width: | Height: | Size: 1.0 KiB |
|
After Width: | Height: | Size: 1.8 KiB |
|
After Width: | Height: | Size: 3.4 KiB |
|
After Width: | Height: | Size: 3.5 KiB |
|
After Width: | Height: | Size: 3.5 KiB |
|
After Width: | Height: | Size: 3.4 KiB |
|
After Width: | Height: | Size: 11 KiB |
|
After Width: | Height: | Size: 5.5 KiB |
|
After Width: | Height: | Size: 20 KiB |
|
After Width: | Height: | Size: 4.4 KiB |
|
After Width: | Height: | Size: 5.4 KiB |
|
After Width: | Height: | Size: 5.4 KiB |
|
After Width: | Height: | Size: 1.4 KiB |
|
After Width: | Height: | Size: 3.2 KiB |
|
After Width: | Height: | Size: 3.3 KiB |
|
After Width: | Height: | Size: 3.6 KiB |
|
After Width: | Height: | Size: 8.5 KiB |
@@ -0,0 +1,331 @@
|
||||
<?php
|
||||
session_start();
|
||||
session_destroy();
|
||||
include("verbind.php");
|
||||
error_reporting(0);
|
||||
header("Content-Type: text/html; charset=utf-8");
|
||||
|
||||
|
||||
define("csv_delimeter", ",");
|
||||
$iname= $_GET['inf'];
|
||||
$is= $_GET['is'];
|
||||
$monat= $_GET['mo'];
|
||||
$jahr= $_GET['ja'];
|
||||
// $wl= $_GET['wl'];
|
||||
$abweichung= $_GET['ab'];
|
||||
$anz= $_GET['anz'];
|
||||
$ausw= $_GET['ausw'];
|
||||
$sd= $_GET['sd'];
|
||||
$ed= $_GET['ed'];
|
||||
$st= $_GET['st'];
|
||||
|
||||
|
||||
if (empty($monat)) {$monat = $anz;}
|
||||
|
||||
?>
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<link rel="stylesheet" href="style.css" media="screen">
|
||||
<link rel="stylesheet" href="tigra_calendar/tcal.css" media="screen">
|
||||
<script type="text/javascript"src="dygraph/dygraph.js"></script>
|
||||
<script type="text/javascript"src="Suggest/ajax.js"></script>
|
||||
<script type="text/javascript"src="Suggest/suggest.js"></script>
|
||||
<script type="text/javascript"src="Suggest/jquery.js"></script>
|
||||
<link rel="stylesheet" src="dygraph/dygraph.css" />
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<script type="text/javascript" async>
|
||||
function show(id)
|
||||
{
|
||||
if (document.getElementById(id).style.display=='none')
|
||||
{document.getElementById(id).style.display='block'; }
|
||||
else
|
||||
{ document.getElementById(id).style.display='none'; }
|
||||
}
|
||||
//]]>
|
||||
</script>
|
||||
|
||||
<script type="text/javascript" async>
|
||||
function test() {
|
||||
location.href = 'index.php?op=1';
|
||||
};
|
||||
</script>
|
||||
<script type="text/javascript"src="tigra_calendar/tcal.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<?php
|
||||
echo "<div class='topindex'>";
|
||||
echo "<img class='bild' usemap= 'Mapi' src='bilder/logo.png' alt='SE'/>";
|
||||
?>
|
||||
<a href="index.php" ><?php echo " <span class='rechtsmen'><img class='bildbot' usemap= 'Mapi' src='bilder/home.png' alt='SE'/> </span>";?></a>
|
||||
<?php
|
||||
echo "<div class='titel'>";
|
||||
echo "<div class='titelfett'>CSV-Export</div>";
|
||||
echo "<br>";
|
||||
echo "$name";
|
||||
echo "<br>";
|
||||
echo "$name2";
|
||||
echo "<br>";
|
||||
echo "$text";
|
||||
echo "</div>";
|
||||
echo "</div>";
|
||||
|
||||
|
||||
/*
|
||||
|
||||
|
||||
|
||||
echo "<a href='index.php?ds=0&ausw=0' ><div class='loginbutton'>Startseite</div></a>" ;
|
||||
echo "<a href='index.php?ausw=$ausw&is=$is' ><div class='loginbutton'>Zurück</div></a>";
|
||||
echo "<a href='graph.csv' download= 'CSV-$monat.csv' ><div class='loginbutton'>CSV Export</div></a>";
|
||||
echo "<a href='exportgraph.php?ausw=$ausw&is=$is&ab=0' ><div class='loginbutton'>aktueller Monat</div></a>";
|
||||
|
||||
?>
|
||||
<div class='loginbutton'>
|
||||
<a href="javascript:show('zeige2')" ><?php echo "▼ Andere Zeiten ";?></a>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<?php
|
||||
|
||||
echo "<div id='zeige2' class='zeigezwei' style='display: none;'>";
|
||||
?>
|
||||
<a href="javascript:show('zeige2')" ><?php echo "<img src='bilder/x.jpg' class ='fensterzu' alt='SE'/>";?></a>
|
||||
<?php
|
||||
//echo "<br><br>";
|
||||
echo "Entweder";
|
||||
echo "<form accept-charset='utf-8' action='exportgraph.php?ausw=$ausw&is=$is' method='post'> ";
|
||||
echo "<div class='zeiteingabe'>";
|
||||
echo "<input name='startdatum' value='$zstart' type='text' size='10' maxlength='11' class= 'tcal' placeholder ='Startdatum'required> ";
|
||||
echo "</div>";
|
||||
|
||||
echo "<div class='zeiteingabe'>";
|
||||
echo "<input name='endedatum' value= '$zende' type='text' size='10' maxlength='11' class= 'tcal' placeholder ='Endedatum'required> ";
|
||||
echo "</div>";
|
||||
|
||||
echo "<div class='eintrag'>";
|
||||
echo "<input type='submit' name'submit' value='anzeigen'>";
|
||||
echo "</div>";
|
||||
echo "</form>";
|
||||
|
||||
|
||||
echo "oder";
|
||||
|
||||
|
||||
|
||||
|
||||
echo "<form accept-charset='utf-8' action='exportgraph.php?ausw=$ausw&is=$is' method='post'> ";
|
||||
echo "<div class='zeiteingabe'>";
|
||||
echo "<input name='starttage' type='text' size='4' maxlength='3' required> Tage bis heute";
|
||||
echo "</div>";
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
echo "<div class='eintrag'>";
|
||||
echo "<input type='submit' name'submit' value='anzeigen'>";
|
||||
echo "</div>";
|
||||
echo "</form>";
|
||||
|
||||
echo "</div>";
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
echo "<div class='loginbutton'> ";
|
||||
echo "<select class= 'isp' size='1' name='jumpit' onchange='document.location.href=this.value'> ";
|
||||
|
||||
echo "<option value='index.php?is=$is&ausw=0' >Freie Auswahl</option>";
|
||||
|
||||
|
||||
//if ($is==0){$gwahl= "!= 0 ";} else {$gwahl= "= $is";}
|
||||
|
||||
|
||||
|
||||
$sql = "SELECT ID, name, ddc FROM jumpgruppe WHERE ID>1 ORDER BY ID ";
|
||||
|
||||
foreach ($pdo->query($sql) as $row) {
|
||||
|
||||
if ( $ausw==$row['ID']) {$markiert2= 'selected'; } else {$markiert2='';}
|
||||
|
||||
$auswahl = $row['name'];
|
||||
$ddc = $row['ddc'];
|
||||
$ind = $row['ID'];
|
||||
//$markiert2='';
|
||||
|
||||
|
||||
|
||||
echo "<option value='exportgraph.php?is=$is&ausw=$ind&st=$st&sd=$sd&ed=$ed' $markiert2>$auswahl</option> ";
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
echo "</select></div>";
|
||||
|
||||
*/
|
||||
|
||||
echo "<div class='kasten2'>";
|
||||
|
||||
echo "Langzeitdaten von $iname <br> ";
|
||||
|
||||
$abplus= $abweichung+1;
|
||||
$abminus= $abweichung-1;
|
||||
if (empty($anz)) {
|
||||
echo "<a href='exportgraph.php?ausw=$ausw&is=$is&ab=$abminus' > ◀ </a>";
|
||||
}
|
||||
echo " $monat $jahr ";
|
||||
if (empty($anz)) {
|
||||
echo "<a href='exportgraph.php?ausw=$ausw&is=$is&ab=$abplus' > ▶︎ ︎</a>";
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
echo "<div class='kasteninnen'>";
|
||||
echo "<a href='graphcsv.csv' download= 'CSV-$monat.csv'><Div class='button'>CSV Export</div></a>";
|
||||
echo "</div>";
|
||||
//echo "<a href='index.php?ausw=$ausw&is=$is' ><div class='loginbutton'>Zurück</div></a>";
|
||||
echo "</div>";
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
echo "<div class='kasten3'>";
|
||||
|
||||
echo "<div class='kasteninnen'>";
|
||||
|
||||
|
||||
/*
|
||||
?>
|
||||
|
||||
<style>
|
||||
|
||||
.csvTable{
|
||||
font-size: 10pt;
|
||||
border-top: 1px solid #ccc;
|
||||
border-left: 1px solid #ccc;
|
||||
border-right: 1px solid #ccc;
|
||||
color: #777;
|
||||
}
|
||||
|
||||
.csvTable th{
|
||||
text-align:left;
|
||||
border-bottom: 1px solid #ccc;
|
||||
}
|
||||
|
||||
.csvTable td{
|
||||
border-bottom: 1px solid #ccc;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<?php
|
||||
|
||||
$hasTitle = true;
|
||||
|
||||
echo '<table border="0" cellspacing="0" cellpadding="5" width="auto" class="csvTable">';
|
||||
|
||||
|
||||
$handle = fopen("graph.csv", "r");
|
||||
$start = 0;
|
||||
|
||||
while (($data = fgetcsv($handle, 5000, ";")) !== FALSE)
|
||||
{
|
||||
|
||||
echo '<tr>' . "\n";
|
||||
|
||||
for ( $x = 0; $x < count($data); $x++)
|
||||
{
|
||||
if ($start == 0 && $hasTitle == true)
|
||||
echo '<th>'.$data[$x].'</th>' . "\n";
|
||||
else
|
||||
echo '<td>'.$data[$x].'</td>' . "\n";
|
||||
}
|
||||
|
||||
$start++;
|
||||
|
||||
echo '</tr>' . "\n";
|
||||
|
||||
}
|
||||
|
||||
fclose($handle);
|
||||
|
||||
echo '</table>';
|
||||
*/
|
||||
?>
|
||||
<style>
|
||||
table, th, td {padding:3px;
|
||||
border: 1px solid green;
|
||||
border-collapse: collapse;
|
||||
text-align:center;
|
||||
}
|
||||
</style>
|
||||
<?php
|
||||
echo "Teilansicht der aktuellen CSV mit maximal 6 Spalten und 200 Zeilen";
|
||||
echo "<table>";
|
||||
$zal=0;
|
||||
$handle = fopen ("graphcsv.csv","r");
|
||||
while ($zal<201 && ($data = fgetcsv ($handle, 1000, ",")) !== FALSE ){
|
||||
|
||||
echo "<tr><td><a href=\"".$data[0].".php"."\">".$data[0]."</a></td>" ;
|
||||
echo "<td>".$data[1]."</td>" ;
|
||||
echo "<td>".$data[2]."</td>" ;
|
||||
echo "<td>".$data[3]."</td>" ;
|
||||
echo "<td>".$data[4]."</td>" ;
|
||||
echo "<td>".$data[5]."</td>" ;
|
||||
echo "<td>".$data[6]."</td></tr>" ;
|
||||
|
||||
$zal++;
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
fclose ($handle);
|
||||
|
||||
echo "</table>";
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
echo "</div>";
|
||||
echo "</div>";
|
||||
|
||||
|
||||
echo "</body>";
|
||||
|
||||
?>
|
||||
</html>
|
||||
|
||||
|
||||
@@ -0,0 +1,124 @@
|
||||
/**
|
||||
* Default styles for the dygraphs charting library.
|
||||
*/
|
||||
|
||||
#legend {border:1px solid red;}
|
||||
|
||||
.dygraph-legend {
|
||||
position: float: right;
|
||||
font-size: 14px;
|
||||
z-index: 10;
|
||||
width: auto; /* labelsDivWidth */
|
||||
/*
|
||||
dygraphs determines these based on the presence of chart labels.
|
||||
It might make more sense to create a wrapper div around the chart proper.
|
||||
top: 0px;
|
||||
right: 2px;
|
||||
*/
|
||||
background: black;
|
||||
line-height: normal;
|
||||
text-align: left;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
/* styles for a solid line in the legend */
|
||||
.dygraph-legend-line {
|
||||
display: inline-block;
|
||||
position: relative;
|
||||
bottom: .5ex;
|
||||
padding-left: 1em;
|
||||
height: 1px;
|
||||
border-bottom-width: 2px;
|
||||
border-bottom-style: solid;
|
||||
/* border-bottom-color is set based on the series color */
|
||||
}
|
||||
|
||||
/* styles for a dashed line in the legend, e.g. when strokePattern is set */
|
||||
.dygraph-legend-dash {
|
||||
min-width: 300px;
|
||||
display: inline-block;
|
||||
position: relative;
|
||||
bottom: .5ex;
|
||||
height: 1px;
|
||||
border-bottom-width: 2px;
|
||||
border-bottom-style: solid;
|
||||
/* border-bottom-color is set based on the series color */
|
||||
/* margin-right is set based on the stroke pattern */
|
||||
/* padding-left is set based on the stroke pattern */
|
||||
}
|
||||
|
||||
.dygraph-roller {
|
||||
position: absolute;
|
||||
z-index: 10;
|
||||
}
|
||||
|
||||
/* This class is shared by all annotations, including those with icons */
|
||||
.dygraph-annotation {
|
||||
position: absolute;
|
||||
z-index: 10;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
/* This class only applies to annotations without icons */
|
||||
/* Old class name: .dygraphDefaultAnnotation */
|
||||
.dygraph-default-annotation {
|
||||
border: 1px solid black;
|
||||
background-color: white;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.dygraph-axis-label {
|
||||
/* position: absolute; */
|
||||
/* font-size: 14px; */
|
||||
z-index: 10;
|
||||
line-height: normal;
|
||||
overflow: hidden;
|
||||
color: black; /* replaces old axisLabelColor option */
|
||||
}
|
||||
|
||||
.dygraph-axis-label-x {
|
||||
}
|
||||
|
||||
.dygraph-axis-label-y {
|
||||
}
|
||||
|
||||
.dygraph-axis-label-y2 {
|
||||
}
|
||||
|
||||
.dygraph-title {
|
||||
font-weight: bold;
|
||||
z-index: 10;
|
||||
text-align: center;
|
||||
/* font-size: based on titleHeight option */
|
||||
}
|
||||
|
||||
.dygraph-xlabel {
|
||||
text-align: center;
|
||||
/* font-size: based on xLabelHeight option */
|
||||
}
|
||||
|
||||
/* For y-axis label */
|
||||
.dygraph-label-rotate-left {
|
||||
text-align: center;
|
||||
/* See http://caniuse.com/#feat=transforms2d */
|
||||
transform: rotate(90deg);
|
||||
-webkit-transform: rotate(90deg);
|
||||
-moz-transform: rotate(90deg);
|
||||
-o-transform: rotate(90deg);
|
||||
-ms-transform: rotate(90deg);
|
||||
}
|
||||
|
||||
/* For y2-axis label */
|
||||
.dygraph-label-rotate-right {
|
||||
text-align: center;
|
||||
/* See http://caniuse.com/#feat=transforms2d */
|
||||
transform: rotate(-90deg);
|
||||
-webkit-transform: rotate(-90deg);
|
||||
-moz-transform: rotate(-90deg);
|
||||
-o-transform: rotate(-90deg);
|
||||
-ms-transform: rotate(-90deg);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,54 @@
|
||||
/**
|
||||
* Default styles for the dygraphs charting library.
|
||||
*/
|
||||
body {width:1024px;}
|
||||
.top { height: 120px; font-family: 'Open Sans', sans-serif; font-size:1.8em; color:#123456; border-bottom:4px solid #d0100d;}
|
||||
.top2 {float: left; width: 1000px; margin-left:20px; height: 60px; margin-top:15px;}
|
||||
.button {float: left; width:auto; padding: 6px; margin: 8px; height:15px; background: #f6f6f6; border: 1px solid#000000;border-radius:5px; box-shadow: -2px -2px 4px #999; }
|
||||
.buttonx {float: left; width:200px; padding: 6px; margin: 8px; height:15px; }
|
||||
|
||||
.buttonan {float: left; width:auto; padding: 6px; margin: 8px; height:15px; background: #cdcdcd; border: 1px solid#000000;border-radius:5px; box-shadow: 4px 4px 6px #555 inset;}
|
||||
.buttonlinks {width:auto; padding:4px; margin: 9px 5px; height:15px; background: #eeeeee; border: 1px solid#000000;border-radius:5px}
|
||||
.buttonlinksan {width:auto; padding:4px; margin: 9px 5px; height:15px; background: #a3cc62; border: 1px solid#000000;border-radius:5px}
|
||||
.links {float:left; min-width: 200px; height:600px;}
|
||||
.rechts {float:left; width: 700px; height: 600px; margin-left:30px;}
|
||||
|
||||
.rechtstaste {float:left; width: 220px; height: 600px; margin-left:30px;}
|
||||
.rechtstaste2 {float:left; width: 440px; height: 600px; margin-left:30px;}
|
||||
|
||||
.bild {float:right;}
|
||||
strong {font-family: 'Open Sans', sans-serif; font-size:0.8em; color:#000000;}
|
||||
|
||||
.bottom {float:left; width: 100%; height: auto; font-family: 'Open Sans', sans-serif; font-size:1.2em; color:#123456; border-top:4px solid #333333;}
|
||||
|
||||
.zuordnung {margin-left:250px; padding:5px;}
|
||||
|
||||
a { text-decoration: none; color:#000000; }
|
||||
input[type=text]
|
||||
{
|
||||
font-family: 'Open Sans', sans-serif;
|
||||
font-size:1.0em;
|
||||
padding: 3px;
|
||||
outline: 0;
|
||||
border:0;
|
||||
color:#123456;
|
||||
background: #eeeeee;
|
||||
box-shadow: inset 1px 1px 2px 0 #707070;
|
||||
border-radius:5px;
|
||||
margin-top:3px;
|
||||
}
|
||||
#zeige2 {width: 200px; height: auto; background:#ffffff;margin-left:2px; padding-left:10px; max-height:200px;overflow: auto; }
|
||||
#zeige3 {width: 300px; height: auto; background:#ffffff;margin-left:2px; padding-left:10px; max-height:400px;overflow: auto; }
|
||||
|
||||
|
||||
|
||||
@media screen and (min-width: 1025px) {
|
||||
|
||||
body {width:auto;}
|
||||
.top { height: 80px; font-family: 'Open Sans', sans-serif; font-size:1.8em; color:#123456; border-bottom:4px solid #d0100d;}
|
||||
.top2 {float: left; width: auto; margin-left:20px; height: 60px; margin-top:5px;}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,85 @@
|
||||
/**
|
||||
* Default styles for the dygraphs charting library.
|
||||
*/
|
||||
body {width:auto;}
|
||||
.top { height: 70px; font-family: 'Open Sans', sans-serif; font-size:1.2em; color:#123456; width:100%; background:#eeeeee; margin:0; padding:10px;}
|
||||
.bild {float:right; margin-right:50px;}
|
||||
.firma {float:left;}
|
||||
.topmenu {float:left; margin-left: 240px;}
|
||||
.clear { clear:both;}
|
||||
.isp {padding:8px;font-family: 'Open Sans', sans-serif; font-size:1.0em; background:#c3d7dd; width:170px;}
|
||||
.buttonx { width:200px; padding: 0px; margin: 8px; height:40px; }
|
||||
|
||||
.zeit {position:absolute; width: 100%; margin-left:0px; height: 60px; margin-top:770px;}
|
||||
.button {float: left; width:auto; padding: 6px; margin: 8px; height:15px; background: #f6f6f6; border: 1px solid#000000;border-radius:5px; box-shadow: -2px -2px 4px #999; }
|
||||
.set {margin:20px 5px; Padding:2px; Border: 1px solid #cccccc; font-family: 'Open Sans', sans-serif; font-size:0.7em; Background:#f8f8f8; border-radius:5px;}
|
||||
.set1 {margin:20px 5px; Padding:2px; Border: 1px solid #cccccc; font-family: 'Open Sans', sans-serif; font-size:0.7em; Background:#a2b0d0; border-radius:5px;}
|
||||
.buttonan {float: left; width:auto; padding: 6px; margin: 8px; height:15px; background: #cdcdcd; border: 1px solid#000000;border-radius:5px; box-shadow: 4px 4px 6px #555 inset;}
|
||||
.buttonlinks {width:auto; padding:4px; margin: 9px 5px; height:15px; background: #eeeeee; border: 1px solid#000000;border-radius:5px}
|
||||
.buttonlinksan {width:auto; padding:4px; margin: 9px 5px; height:15px; background: #a3cc62; border: 1px solid#000000;border-radius:5px}
|
||||
.links {position: absolute; width: 180px; height:600px; margin-top:80px; font-family: 'Open Sans', sans-serif; font-size:0.8em;}
|
||||
.rechts {position: absolute; float:left; width: auto; height: 510px; margin-left:160px; margin-top: 100px;}
|
||||
.rechtscsv {position: absolute; width: auto; height: auto; margin-left:300px; margin-top: 100px;}
|
||||
.rechts2csv {position: absolute; width: auto; height: auto; margin-left:750px; margin-top: 100px;}
|
||||
.rechts3csv {position: absolute; width: auto; height: auto; margin-left:950px; margin-top: 100px;}
|
||||
.rechts2einheit {position: absolute; width: 130px; height: auto; margin-left:770px; margin-top: 100px;line-height:27px;}
|
||||
.rechtswerte {position: absolute; float:left; width: auto; height: 510px; margin-left:160px; margin-top: 100px;}
|
||||
|
||||
.rechtstaste {float:left; width: 220px; height: 600px; margin-left:30px;}
|
||||
.rechtstaste2 {float:left; width: 440px; height: 600px; margin-left:30px;}
|
||||
#login {float:right;font-family: 'Open Sans', sans-serif; font-size:0.8em; color:#666666; margin: 0 10px;}
|
||||
.loginbutton {float:right;font-family: 'Open Sans', sans-serif; font-size:0.8em; color:#666666; margin: 0 10px;}
|
||||
strong {font-family: 'Open Sans', sans-serif; font-size:0.8em; color:#000000;}
|
||||
|
||||
.bottom {float:left; width: 100%; height: auto; font-family: 'Open Sans', sans-serif; font-size:1.2em; color:#123456; }
|
||||
.csvtext1 {float:left; margin-left: 4px; font-family: 'Open Sans', sans-serif; font-size:0.8em; border: 1px solid red;}
|
||||
.csvtext2 {float:left; margin-left: 4px; font-family: 'Open Sans', sans-serif; font-size:0.8em;}
|
||||
|
||||
.zuordnung {margin-left:250px; padding:5px;}
|
||||
.taste{Margin: 20px;}
|
||||
a { text-decoration: none; color:#000000; }
|
||||
input[type=text]
|
||||
{
|
||||
font-family: 'Open Sans', sans-serif;
|
||||
font-size:1.0em;
|
||||
padding: 3px;
|
||||
outline: 0;
|
||||
border:0;
|
||||
color:#123456;
|
||||
background: #eeeeee;
|
||||
box-shadow: inset 1px 1px 2px 0 #707070;
|
||||
border-radius:5px;
|
||||
margin-top:3px;
|
||||
}
|
||||
#zeige2 {width: 200px; height: auto; background:#ffffff;margin-left:2px; padding-left:10px; max-height:400px;overflow: auto; font-size:0.8em; border:1px solid #999999;}
|
||||
#zeige2csv {width: 260px; height: auto; background:#ffffff;margin-left:2px; padding-left:10px; max-height:400px;overflow: auto; font-size:0.8em; border:1px solid #999999;}
|
||||
#zeige3 {width: 300px; height: auto; background:#ffffff;margin-left:2px; padding-left:10px; max-height:400px;overflow: auto; }
|
||||
|
||||
#graphdiv2 {float:left; width:650px; height:500px;}
|
||||
#legend {float:left; margin-left: 10px; font-family: 'Open Sans', sans-serif; font-size:0.8em;}
|
||||
|
||||
#text { margin-left:10px; margin-top:10px; display:block;
|
||||
height:auto; z-index:999;
|
||||
font-family: 'Verdana',sans-serif; font-size:0.75em; text-align: left;padding-left:0px;color:#111111; padding-top:0px; padding-bottom:0px;
|
||||
}
|
||||
.platzieren {float:left; min-width:130px; margin: 4px 5px 0 0;}
|
||||
.platzieren1 {float:left; min-width:70px; padding-right:10px; margin-right:10px;}
|
||||
.platzieren1a {float:left; min-width:65px; padding-right:10px; margin: 4px 5px 0 0;}
|
||||
.platzieren1b {float:left; min-width:55px; padding-right:0px; margin: 4px 5px 0 0;}
|
||||
.platzieren2 { margin: 0 10px; padding: 0 10px;}
|
||||
|
||||
|
||||
|
||||
@media screen and (min-width: 1025px) {
|
||||
.links {position: absolute; width: 200px; height:600px; margin-top:100px; font-family: 'Open Sans', sans-serif; font-size:0.8em;}
|
||||
.rechts {position: absolute; float:left; width: auto; height: 510px; margin-left:220px; margin-top: 100px;}
|
||||
.rechtscsv {position: absolute; width: auto; height: auto; margin-left:300px; margin-top: 100px;}
|
||||
#graphdiv2 {float:left; width:800px; height:500px;}
|
||||
}
|
||||
|
||||
@media screen and (min-width: 1280px) {
|
||||
.links {position: absolute; width: 200px; height:600px; margin-top:100px; font-family: 'Open Sans', sans-serif; font-size:0.8em;}
|
||||
.rechts {position: absolute; float:left; width: auto; height: 510px; margin-left:220px; margin-top: 100px;}
|
||||
.rechtscsv {position: absolute; width: auto; height: auto; margin-left:300px; margin-top: 100px;}
|
||||
#graphdiv2 {float:left; width:1000px; height:500px;}
|
||||
}
|
||||
@@ -0,0 +1,276 @@
|
||||
<?php
|
||||
session_start();
|
||||
//session_regenerate_id();
|
||||
include("verbind.php");
|
||||
error_reporting (0);
|
||||
header("Content-Type: text/html; charset=utf-8");
|
||||
|
||||
$is= $_GET['is'];
|
||||
if (empty($is)) {$is=1;}
|
||||
|
||||
|
||||
|
||||
$sql = "SELECT name, name2, text, smtp, absender, sprung, pw FROM sebasis";
|
||||
foreach ($pdo->query($sql) as $row) {
|
||||
$name= $row['name'];
|
||||
$name2= $row['name2'];
|
||||
$text= $row['text'];
|
||||
$smtp= $row['smtp'];
|
||||
$absender= $row['absender'];
|
||||
$sprung= $row['sprung'];
|
||||
$spwdb= $row['pw'];
|
||||
}
|
||||
|
||||
|
||||
|
||||
//202cb962ac59075b964b07152d234b70
|
||||
|
||||
|
||||
|
||||
if(isset($_POST['submit']) AND $_POST['submit']=='ok'){
|
||||
|
||||
if (md5(trim($_POST['Passwort']))=="$spwdb"){
|
||||
$_SESSION['login2'] ='true';
|
||||
echo "<meta http-equiv='refresh' content='0; URL=einstellung.php'>";
|
||||
} else {
|
||||
echo "<meta http-equiv='refresh' content='0; URL=index.php'>";
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
?>
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<link rel="stylesheet" href="style.css" media="screen">
|
||||
<link rel="stylesheet" href="tigra_calendar/tcal.css" media="screen">
|
||||
<script type="text/javascript" async src="Suggest/ajax.js"></script>
|
||||
<script type="text/javascript" async src="Suggest/suggest.js"></script>
|
||||
<script type="text/javascript" src="Suggest/jquery.js"></script>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<script type="text/javascript"
|
||||
src="dygraph.js"></script>
|
||||
<link rel="stylesheet" src="dygraph.css" />
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
</head>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<?php
|
||||
|
||||
echo "<div class='topindex'>";
|
||||
echo "<img class='bild' usemap= 'Mapi' src='bilder/logo.png' alt='SE'/>";
|
||||
?>
|
||||
<a href="index.php" ><?php echo " <span class='rechtsmen'><img class='bildbot' usemap= 'Mapi' src='bilder/home.png' alt='SE'/> </span>";?></a>
|
||||
<?php
|
||||
echo "<div class='titel'>";
|
||||
echo "<div class='titelfett'>EINSTELLUNGEN</div>";
|
||||
echo "<br>";
|
||||
echo "$name";
|
||||
echo "<br>";
|
||||
echo "$name2";
|
||||
echo "<br>";
|
||||
echo "$text";
|
||||
echo "</div>";
|
||||
echo "</div>";
|
||||
|
||||
|
||||
|
||||
if ($_SESSION['login2'] !='true')
|
||||
// if ($_SESSION['login'] =='true')
|
||||
{
|
||||
echo "<br>";
|
||||
echo "Das einegebene Passwort war falsch oder die Anmelde-Zeit ist abgelaufen";
|
||||
echo "<form name= 'senden' method='post' accept-charset='UTF-8' action='$PHP_SELF?i=1'>";
|
||||
|
||||
echo " <span><input type='password' class = 'loginfeldc' name='Passwort'></span>";
|
||||
echo " <span><input type='submit' class = 'loginsende' name='submit' value='ok'></span>";
|
||||
echo "</form>";
|
||||
}else{
|
||||
|
||||
|
||||
|
||||
//---------------------------------------------------Einheit-----------------------------
|
||||
|
||||
|
||||
//---------------------------------------------------Name und Teiler------------------------
|
||||
|
||||
if ($_POST['submit'] =='speichern') {
|
||||
|
||||
$stmt = $pdo->prepare("UPDATE seliste SET
|
||||
klar = :klar
|
||||
WHERE
|
||||
ID = :ind");
|
||||
$stmt->bindParam(':klar', $klar);
|
||||
$stmt->bindParam(':ind', $ind);
|
||||
|
||||
foreach ($_POST['name'] as $item) {
|
||||
$klar= $item['nam'];
|
||||
$ind = $item['id'];
|
||||
|
||||
if (empty($teil)) {$teil=1;}
|
||||
$stmt->execute();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
//---------------------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
?>
|
||||
|
||||
<body>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="top2">
|
||||
<a href='einstellung.php'><div class='buttonan'>Werte zuordnen</div></a>
|
||||
<a href='einstellung2.php'><div class='button'>Voreinstellungen</div></a>
|
||||
<a href='einstellung3.php'><div class='button'>Passwort ändern</div></a>
|
||||
<a href='index.php'><div class='button'>Beenden</div></a>
|
||||
</div>
|
||||
|
||||
<br class='clear'/>
|
||||
<div class="kasten1">
|
||||
|
||||
<?php
|
||||
|
||||
echo "<div class='button6b'> ";
|
||||
echo "<select class= 'isp' size='1' name='jumpit' onchange='document.location.href=this.value'> ";
|
||||
$sql = "SELECT name, db_name, ID FROM sestation WHERE name !='' ORDER BY ID ";
|
||||
|
||||
foreach ($pdo->query($sql) as $row) {
|
||||
//gib den Eintrag aus der DB aus
|
||||
if ( $is==$row[ID]) {$markiert= 'selected'; $wahl= $row[db_name];} else {$markiert='';}
|
||||
echo "<option value='einstellung.php?is=$row[ID]' $markiert>$row[name]</option> ";
|
||||
|
||||
}
|
||||
|
||||
echo "</select>";
|
||||
echo "</div>";
|
||||
|
||||
/*
|
||||
echo "<div class='buttonx'> <select name='ajahr'>";
|
||||
|
||||
|
||||
$sql = "SELECT name, ID FROM sestation ORDER BY ID ";
|
||||
|
||||
// Ergebnis aus der Abfrage wird in der variablen result gespeichert
|
||||
$erg = mysql_query($sql) OR die(mysql_error());
|
||||
|
||||
//solange wie die Anzahl der Einträge aus result sind
|
||||
while($row = mysql_fetch_assoc($erg)) {
|
||||
//gib den Eintrag aus der DB aus
|
||||
|
||||
echo "<option value='se6a.php?is=$row[ID]' >$row[name]</option> ";
|
||||
|
||||
}
|
||||
|
||||
|
||||
echo "</select></div>";
|
||||
*/
|
||||
?>
|
||||
|
||||
|
||||
</div>
|
||||
<div class="kasten2">
|
||||
|
||||
|
||||
Zuordnung <br><br>
|
||||
|
||||
|
||||
|
||||
<?php
|
||||
|
||||
echo "<div class='kasteninnen'>";
|
||||
|
||||
echo "<form accept-charset='utf-8' action=einstellung.php?is=$is method='post'> ";
|
||||
|
||||
$sql = "SELECT kurz, klar, einheit, teiler, ID FROM seliste
|
||||
WHERE isp ='$is'
|
||||
ORDER BY ID
|
||||
";
|
||||
// <input type='checkbox' name='name[$up]['einheit']' value='$row[einheit]'>$row[einheit]
|
||||
$up=0;
|
||||
|
||||
echo "<table>";
|
||||
foreach ($pdo->query($sql) as $row) {
|
||||
echo "<tr>";
|
||||
echo "<td><div class='platzieren1a'>$row[kurz] = </div></td><td><input class='platzieren1' name='name[$up][nam]' type='text' size='33' maxlength='32' value='$row[klar]'></td>";
|
||||
|
||||
echo "</tr>";
|
||||
echo "<input type='Hidden' name='name[$up][id]' value=$row[ID]>";
|
||||
$up++;
|
||||
}
|
||||
echo "</table>";
|
||||
|
||||
|
||||
|
||||
echo "<br>";
|
||||
echo "<input type='submit' name='submit' value='speichern'>";
|
||||
echo "<br><br>";
|
||||
|
||||
|
||||
|
||||
echo "</div>";
|
||||
echo "<div class= 'speicherbut4'><input type='submit' name='submit' value='speichern'></div>";
|
||||
|
||||
echo "</div>";
|
||||
|
||||
|
||||
|
||||
echo "<br><br>";
|
||||
echo "<div class='rechts2einheit'>";
|
||||
echo "";
|
||||
|
||||
|
||||
|
||||
|
||||
echo "</form>";
|
||||
|
||||
echo "</div>";
|
||||
|
||||
?>
|
||||
<div class="textinfo"><br><br>
|
||||
<br><br><br><br><br><br>
|
||||
Bitte ändern Sie nur etwas, wenn Sie sich sicher sind, was Sie tun.
|
||||
<br><br>
|
||||
Der Name kann frei gewählt werden. Maximal 32 Zeichen pro Feld.<br>
|
||||
Je kürzer der Name, desto übersichtlicher sieht das CSV-File und die Darstellung des Graphen aus.<br>
|
||||
Speichern nicht vergessen. <br>(nach unten scrollen)<br>
|
||||
Es kann auch zwischendurch gespeichert werden.
|
||||
Sie bleiben im Eingabefeld.
|
||||
</div>
|
||||
<?php
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
?>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
@@ -0,0 +1,277 @@
|
||||
<?php
|
||||
session_start();
|
||||
//session_regenerate_id();
|
||||
include("verbind.php");
|
||||
error_reporting (0);
|
||||
header("Content-Type: text/html; charset=utf-8");
|
||||
|
||||
$is= $_GET['is'];
|
||||
if (empty($is)) {$is=1;}
|
||||
|
||||
/*
|
||||
if(isset($_POST['submit']) AND $_POST['submit']=='ok'){
|
||||
|
||||
if (md5(trim($_POST['Passwort']))=='814f06ab7f40b2cff77f2c7bdffd3415'){
|
||||
$_SESSION['login2'] ='true';
|
||||
echo "<meta http-equiv='refresh' content='0; URL=einstellung.php'>";
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
//---------------------------------------------------Speichern------------------------
|
||||
|
||||
if ($_POST['submit'] =='speichern') {
|
||||
|
||||
$stmt = $pdo->prepare("UPDATE sebasis SET
|
||||
|
||||
name = :name,
|
||||
name2= :name2,
|
||||
text = :text,
|
||||
tage = :tage,
|
||||
absender = :absender
|
||||
WHERE
|
||||
ID = :ind");
|
||||
|
||||
$stmt->bindParam(':name', $sname);
|
||||
$stmt->bindParam(':name2', $sname2);
|
||||
$stmt->bindParam(':text', $stext);
|
||||
$stmt->bindParam(':tage', $stage);
|
||||
$stmt->bindParam(':absender', $setgr);
|
||||
$stmt->bindParam(':ind', $sind);
|
||||
|
||||
$sname = $_POST['sname'];
|
||||
$sname2 = $_POST['sname2'];
|
||||
$stext = $_POST['stext'];
|
||||
$stage = $_POST['stage'];
|
||||
|
||||
$xfarbe = $_POST['farbe'];
|
||||
$xlegende = $_POST['legende'];
|
||||
$xrange = $_POST['range'];
|
||||
|
||||
$setgr = $xfarbe.'-'.$xlegende.'-'.$xrange;
|
||||
|
||||
|
||||
|
||||
$sind = '1';
|
||||
$stmt->execute();
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
$sql = "SELECT name, name2, text, smtp, absender, sprung, tage FROM sebasis";
|
||||
|
||||
|
||||
foreach ($pdo->query($sql) as $row) {
|
||||
//$sql1 = mysql_query($sql) OR die(mysql_error());
|
||||
//while ($erg = mysql_fetch_object($sql1)) {
|
||||
|
||||
$name= $row['name'];
|
||||
$name2= $row['name2'];
|
||||
$text= $row['text'];
|
||||
$smtp= $row['smtp'];
|
||||
$absender= $row['absender'];
|
||||
$sprung= $row['sprung'];
|
||||
$tagedb= $row['tage'];
|
||||
|
||||
$teilung = explode("-", $absender);
|
||||
|
||||
|
||||
$farbe = $teilung[0];
|
||||
$legende = $teilung[1];
|
||||
$range = $teilung[2];
|
||||
|
||||
|
||||
if ($farbe == '2') {$f1='checked'; $f2='';}else{$f2='checked';$f1='';}
|
||||
if ($legende == '2') {$l1='checked'; $l2='';}else{$l2='checked';$l1='';}
|
||||
if ($range == '2') {$r1='checked'; $r2='';}else{$r2='checked';$r1='';}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
?>
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<link rel="stylesheet" href="style.css" media="screen">
|
||||
<link rel="stylesheet" href="tigra_calendar/tcal.css" media="screen">
|
||||
<script type="text/javascript" async src="Suggest/ajax.js"></script>
|
||||
<script type="text/javascript" async src="Suggest/suggest.js"></script>
|
||||
<script type="text/javascript" src="Suggest/jquery.js"></script>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<script type="text/javascript"
|
||||
src="dygraph.js"></script>
|
||||
<link rel="stylesheet" src="dygraph.css" />
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
</head>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<?php
|
||||
|
||||
echo "<div class='topindex'>";
|
||||
echo "<img class='bild' usemap= 'Mapi' src='bilder/logo.png' alt='SE'/>";
|
||||
?>
|
||||
<a href="index.php" ><?php echo " <span class='rechtsmen'><img class='bildbot' usemap= 'Mapi' src='bilder/home.png' alt='SE'/> </span>";?></a>
|
||||
<?php
|
||||
echo "<div class='titel'>";
|
||||
echo "<div class='titelfett'>EINSTELLUNGEN</div>";
|
||||
echo "<br>";
|
||||
echo "$name";
|
||||
echo "<br>";
|
||||
echo "$name2";
|
||||
echo "<br>";
|
||||
echo "$text";
|
||||
echo "</div>";
|
||||
echo "</div>";
|
||||
|
||||
|
||||
|
||||
if ($_SESSION['login2'] !='true')
|
||||
// if ($_SESSION['login'] =='true')
|
||||
{
|
||||
echo "<br>";
|
||||
echo "Das einegebene Passwort war falsch oder die Anmelde-Zeit ist abgelaufen";
|
||||
echo "<form name= 'senden' method='post' accept-charset='UTF-8' action='$PHP_SELF?i=1'>";
|
||||
|
||||
echo " <span><input type='password' class = 'loginfeldc' name='Passwort'></span>";
|
||||
echo " <span><input type='submit' class = 'loginsende' name='submit' value='ok'></span>";
|
||||
echo "</form>";
|
||||
}else{
|
||||
|
||||
|
||||
|
||||
//---------------------------------------------------Einheit-----------------------------
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
?>
|
||||
|
||||
<body>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="top2">
|
||||
<a href='einstellung.php'><div class='button'>Werte zuordnen</div></a>
|
||||
<a href='einstellung2.php'><div class='buttonan'>Voreinstellungen</div></a>
|
||||
<a href='einstellung3.php'><div class='button'>Passwort ändern</div></a>
|
||||
<a href='index.php'><div class='button'>Beenden</div></a>
|
||||
</div>
|
||||
|
||||
<br class='clear'/>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="kasten2a">
|
||||
|
||||
<br><br>
|
||||
Hier können Sie das Standard-Zeitfenster und die Anzeige Ihrer Firmendaten verändern.
|
||||
<br><br>
|
||||
Beim Start werden in der Regel die letzten 10 Tage als Standardzeit angezeigt.
|
||||
Der Wert kann bis 999 Tage verändert werden. Bedenken Sie bitte, dass die Ladezeiten mit den Tagen ansteigen.
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<div class="kasten2">
|
||||
|
||||
|
||||
|
||||
<br><br> <br>
|
||||
|
||||
|
||||
|
||||
<?php
|
||||
|
||||
echo "<div class='kasteninnen'>";
|
||||
/*
|
||||
$sql = "SELECT name, name2, text, smtp, absender, sprung, tage FROM sebasis";
|
||||
|
||||
//$sql1 = mysql_query($sql) OR die(mysql_error());
|
||||
//while ($erg = mysql_fetch_object($sql1)) {
|
||||
|
||||
|
||||
foreach ($pdo->query($sql) as $row) {
|
||||
$name= $row['name'];
|
||||
$name2= $row['name2'];
|
||||
$text= $row['text'];
|
||||
$smtp= $row['smtp'];
|
||||
$absender= $row['absender'];
|
||||
$sprung= $row['sprung'];
|
||||
$tagedb= $row['tage'];
|
||||
}
|
||||
|
||||
*/
|
||||
echo "<form accept-charset='utf-8' action=einstellung2.php?is=$is method='post'> ";
|
||||
|
||||
echo "<div class='platzieren'>Firmenbez. 1 Zeile: </div><input name='sname' type='text' size='40' maxlength='40' value='$name'> ";
|
||||
echo "<br>";
|
||||
echo "<div class='platzieren'>Firmenbez. 2 Zeile: </div><input name='sname2' type='text' size='40' maxlength='40' value='$name2'> ";
|
||||
echo "<br>";
|
||||
echo "<div class='platzieren'>Firmenbez. 3 Zeile: </div><input name='stext' type='text' size='40' maxlength='80' value='$text'>
|
||||
<br><br>";
|
||||
|
||||
echo "<div class='platzieren'>Standardtage: </div><input name='stage' type='text' size='4' maxlength='3' value='$tagedb'> ";
|
||||
echo "<br>";
|
||||
echo "<div class='platzieren'>Hintergrundfarbe Graph:
|
||||
<input name='farbe' type='radio' value='2' $f1> Weiss<input name='farbe' type='radio' value='1' $f2> Schwarz<br> </div>";
|
||||
|
||||
|
||||
echo "<div class='platzieren'>Legende links oder oben:
|
||||
<input name='legende' type='radio' value='2'$l1> Links <input name='legende' type='radio' value='1' $l2> Oben<br></div>";
|
||||
|
||||
|
||||
echo "<div class='platzieren'>Range Selektor:
|
||||
<input name='range' type='radio' value='2'$r1> Aus <input name='range' type='radio' value='1' $r2> An<br> </div>";
|
||||
echo "<br>";
|
||||
echo "<input type='submit' name='submit' value='speichern'>";
|
||||
echo "<br><br>";
|
||||
echo "</div>";
|
||||
echo "</div>";
|
||||
|
||||
echo "<br><br>";
|
||||
echo "<div class='rechts2einheit'>";
|
||||
echo "";
|
||||
|
||||
|
||||
|
||||
|
||||
echo "</form>";
|
||||
|
||||
echo "</div>";
|
||||
|
||||
|
||||
?>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
@@ -0,0 +1,277 @@
|
||||
<?php
|
||||
session_start();
|
||||
//session_regenerate_id();
|
||||
include("verbind.php");
|
||||
error_reporting (0);
|
||||
header("Content-Type: text/html; charset=utf-8");
|
||||
|
||||
$is= $_GET['is'];
|
||||
if (empty($is)) {$is=1;}
|
||||
|
||||
$pw1 = $_POST['spw1'];
|
||||
$pw2 = $_POST['spw2'];
|
||||
|
||||
$pwmd = md5(trim($pw1));
|
||||
|
||||
/*
|
||||
|
||||
if(isset($_POST['submit']) AND $_POST['submit']=='ok'){
|
||||
|
||||
if (md5(trim($_POST['Passwort']))=='814f06ab7f40b2cff77f2c7bdffd3415'){
|
||||
$_SESSION['login2'] ='true';
|
||||
echo "<meta http-equiv='refresh' content='0; URL=einstellung.php'>";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
$sql = "SELECT name, name2, text, smtp, absender, sprung, tage FROM sebasis";
|
||||
|
||||
|
||||
foreach ($pdo->query($sql) as $row) {
|
||||
//$sql1 = mysql_query($sql) OR die(mysql_error());
|
||||
//while ($erg = mysql_fetch_object($sql1)) {
|
||||
|
||||
$name= $row['name'];
|
||||
$name2= $row['name2'];
|
||||
$text= $row['text'];
|
||||
$smtp= $row['smtp'];
|
||||
$absender= $row['absender'];
|
||||
$sprung= $row['sprung'];
|
||||
$tagedb= $row['tage'];
|
||||
}
|
||||
|
||||
|
||||
|
||||
?>
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<link rel="stylesheet" href="style.css" media="screen">
|
||||
<link rel="stylesheet" href="tigra_calendar/tcal.css" media="screen">
|
||||
<script type="text/javascript" async src="Suggest/ajax.js"></script>
|
||||
<script type="text/javascript" async src="Suggest/suggest.js"></script>
|
||||
<script type="text/javascript" src="Suggest/jquery.js"></script>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<script type="text/javascript"
|
||||
src="dygraph.js"></script>
|
||||
<link rel="stylesheet" src="dygraph.css" />
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
</head>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<?php
|
||||
|
||||
echo "<div class='topindex'>";
|
||||
echo "<img class='bild' usemap= 'Mapi' src='bilder/logo.png' alt='SE'/>";
|
||||
?>
|
||||
<a href="index.php" ><?php echo " <span class='rechtsmen'><img class='bildbot' usemap= 'Mapi' src='bilder/home.png' alt='SE'/> </span>";?></a>
|
||||
<?php
|
||||
echo "<div class='titel'>";
|
||||
echo "<div class='titelfett'>EINSTELLUNGEN</div>";
|
||||
echo "<br>";
|
||||
echo "$name";
|
||||
echo "<br>";
|
||||
echo "$name2";
|
||||
echo "<br>";
|
||||
echo "$text";
|
||||
echo "</div>";
|
||||
echo "</div>";
|
||||
|
||||
|
||||
|
||||
if ($_SESSION['login2'] !='true')
|
||||
// if ($_SESSION['login'] =='true')
|
||||
{
|
||||
echo "<br>";
|
||||
echo "Das einegebene Passwort war falsch";
|
||||
echo "<form name= 'senden' method='post' accept-charset='UTF-8' action='$PHP_SELF?i=1'>";
|
||||
|
||||
echo " <span><input type='password' class = 'loginfeldc' name='Passwort'></span>";
|
||||
echo " <span><input type='submit' class = 'loginsende' name='submit' value='ok'></span>";
|
||||
echo "</form>";
|
||||
}else{
|
||||
|
||||
|
||||
|
||||
//---------------------------------------------------Einheit-----------------------------
|
||||
|
||||
|
||||
if ($pw1==$pw2){
|
||||
|
||||
|
||||
|
||||
|
||||
//---------------------------------------------------Speichern------------------------
|
||||
|
||||
if ($_POST['submit'] =='speichern') {
|
||||
|
||||
$stmt = $pdo->prepare("UPDATE sebasis SET
|
||||
|
||||
pw = :pw
|
||||
WHERE
|
||||
ID = :ind");
|
||||
|
||||
$stmt->bindParam(':pw', $pw);
|
||||
$stmt->bindParam(':ind', $ind);
|
||||
|
||||
|
||||
$ind = '1';
|
||||
$pw = $pwmd;
|
||||
|
||||
$stmt->execute();
|
||||
|
||||
echo " Das neue Passwort wurde gespeichert.";
|
||||
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------
|
||||
}else{
|
||||
|
||||
echo " Das Passwort wurde nicht gespeichert weil die Wiederholung nicht identisch war.";
|
||||
}
|
||||
//---------------------------------------------------------------------------------------------------
|
||||
?>
|
||||
|
||||
<body>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="top2">
|
||||
<a href='einstellung.php'><div class='button'>Werte zuordnen</div></a>
|
||||
<a href='einstellung2.php'><div class='button'>Voreinstellungen</div></a>
|
||||
<a href='einstellung3.php'><div class='buttonan'>Passwort ändern</div></a>
|
||||
<a href='index.php'><div class='button'>Beenden</div></a>
|
||||
</div>
|
||||
|
||||
<br class='clear'/>
|
||||
<div class="kasten1">
|
||||
|
||||
<?php
|
||||
/*
|
||||
echo "<div class='buttonx'> ";
|
||||
echo "<select class= 'isp' size='1' name='jumpit' onchange='document.location.href=this.value'> ";
|
||||
$sql = "SELECT name, db_name, ID FROM sestation WHERE name !='' ORDER BY ID ";
|
||||
|
||||
foreach ($pdo->query($sql) as $row) {
|
||||
//gib den Eintrag aus der DB aus
|
||||
if ( $is==$row[ID]) {$markiert= 'selected'; $wahl= $row[db_name];} else {$markiert='';}
|
||||
echo "<option value='einstellung.php?is=$row[ID]' $markiert>$row[name]</option> ";
|
||||
|
||||
}
|
||||
|
||||
echo "</select>";
|
||||
echo "</div>";
|
||||
*/
|
||||
/*
|
||||
echo "<div class='buttonx'> <select name='ajahr'>";
|
||||
|
||||
|
||||
$sql = "SELECT name, ID FROM sestation ORDER BY ID ";
|
||||
|
||||
// Ergebnis aus der Abfrage wird in der variablen result gespeichert
|
||||
$erg = mysql_query($sql) OR die(mysql_error());
|
||||
|
||||
//solange wie die Anzahl der Einträge aus result sind
|
||||
while($row = mysql_fetch_assoc($erg)) {
|
||||
//gib den Eintrag aus der DB aus
|
||||
|
||||
echo "<option value='se6a.php?is=$row[ID]' >$row[name]</option> ";
|
||||
|
||||
}
|
||||
|
||||
|
||||
echo "</select></div>";
|
||||
*/
|
||||
?>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<br><br>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<div class="kasten2">
|
||||
Das Passwort ist begrenzt auf max 40 Zeichen. Ansonsten existieren keine Rahmenbedingungen.
|
||||
Das Passwort wird beim Eingeben angezeigt.
|
||||
<br>
|
||||
<br><br>
|
||||
|
||||
|
||||
|
||||
<?php
|
||||
|
||||
echo "<div class='kasteninnen'>";
|
||||
/*
|
||||
$sql = "SELECT name, name2, text, smtp, absender, sprung, tage FROM sebasis";
|
||||
|
||||
//$sql1 = mysql_query($sql) OR die(mysql_error());
|
||||
//while ($erg = mysql_fetch_object($sql1)) {
|
||||
|
||||
|
||||
foreach ($pdo->query($sql) as $row) {
|
||||
$name= $row['name'];
|
||||
$name2= $row['name2'];
|
||||
$text= $row['text'];
|
||||
$smtp= $row['smtp'];
|
||||
$absender= $row['absender'];
|
||||
$sprung= $row['sprung'];
|
||||
$tagedb= $row['tage'];
|
||||
}
|
||||
|
||||
*/
|
||||
echo "<form accept-charset='utf-8' action=einstellung3.php?is=$is method='post'> ";
|
||||
|
||||
echo "<div class='platzieren'>Neues PW: </div><input name='spw1' type='text' size='40' maxlength='40'> ";
|
||||
echo "<br>";
|
||||
|
||||
|
||||
echo "<div class='platzieren'>PW wiederholen: </div><input name='spw2' type='text' size='40' maxlength='40'> ";
|
||||
echo "<br>";
|
||||
|
||||
echo "<br>";
|
||||
echo "<input type='submit' name='submit' value='speichern'>";
|
||||
echo "<br><br>";
|
||||
echo "</div>";
|
||||
echo "</div>";
|
||||
|
||||
echo "<br><br>";
|
||||
echo "<div class='rechts2einheit'>";
|
||||
echo "";
|
||||
|
||||
|
||||
|
||||
|
||||
echo "</form>";
|
||||
|
||||
echo "</div>";
|
||||
|
||||
|
||||
|
||||
?>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
@@ -0,0 +1,210 @@
|
||||
<?php
|
||||
include("verbind.php");
|
||||
// Tabellenname
|
||||
define("select_table", "newsletter");
|
||||
// Trennzeichen
|
||||
define("csv_delimeter", ",");
|
||||
error_reporting(0);
|
||||
header("Content-Type: text/html; charset=utf-8");
|
||||
|
||||
|
||||
//------------------------------------- Definitionen ----------------------------------------
|
||||
|
||||
|
||||
$ausw = $_GET['ausw'];
|
||||
// $wl= $_GET['wl'];
|
||||
$is= $_GET['is'];
|
||||
$abweichung= $_GET['ab'];
|
||||
$starttage= $_POST['starttage'];
|
||||
// if (empty($starttage)) {$starttage = $_GET['st'];}
|
||||
$startdatum= $_POST['startdatum'];
|
||||
// if (empty($startdatum)) {$startdatum = $_GET['sd'];}
|
||||
$endedatum= $_POST['endedatum'];
|
||||
$farbe= $_POST['farbe'];
|
||||
$legende= $_POST['legende'];
|
||||
$range= $_POST['range'];
|
||||
|
||||
|
||||
// if (empty($endedatum)) {$endedatum = $_GET['ed'];}
|
||||
$az=$_GET['az'];
|
||||
$anz=$_GET['anz'];
|
||||
|
||||
if (empty($abweichung)) {$abweichung = 0;}
|
||||
|
||||
if (empty($starttage)) {$starttage = $_GET['st'];}
|
||||
if (empty($startdatum)) {$startdatum = $_GET['sd'];}
|
||||
if (empty($endedatum)) {$endedatum = $_GET['ed'];}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// $anfang=$_POST['startdatum'];
|
||||
// $ende=$_POST['endedatum'];
|
||||
|
||||
echo "Daten des Graphen werden geladen<br>";
|
||||
|
||||
echo "Startdatum: $startdatum <br>";
|
||||
echo "Endedatum: $endedatum <br>";
|
||||
echo "Die vergangenen: $starttage Tage<br>";
|
||||
|
||||
//------------------------------------- Zeit aufbereiten ----------------------------------------
|
||||
|
||||
if (empty($starttage)) {
|
||||
|
||||
if (empty($startdatum)) {
|
||||
|
||||
$abwei= $abweichung.' month';
|
||||
$date = date('Y-m-j');
|
||||
$newdate = strtotime ( $abwei , strtotime ( $date ) ) ;
|
||||
$newdate = date ( 'Y-m-j' , $newdate );
|
||||
$sn = explode('-', $newdate);
|
||||
$startnewdate = $sn[0].'-'.$sn[1].'-01';
|
||||
$monatb= $sn[1];
|
||||
$jahr= $sn[0];
|
||||
$anzeigezeit1= $startnewdate;
|
||||
if ($abweichung !=0){$sn = explode('-', $newdate);$newdate = $sn[0].'-'.$sn[1].'-31';}
|
||||
$anzeigezeit2= $newdate;
|
||||
|
||||
|
||||
}else{
|
||||
|
||||
|
||||
$startdat = explode("-", $startdatum);
|
||||
$startdat = array_reverse($startdat);
|
||||
$startdat = implode("-", $startdat);
|
||||
$enddat = explode("-", $endedatum);
|
||||
$enddat = array_reverse($enddat);
|
||||
$enddat = implode("-", $enddat);
|
||||
|
||||
|
||||
|
||||
$anzeigezeit1= $startdat;
|
||||
$anzeigezeit2= $enddat;
|
||||
$anz= $startdatum.' bis '.$endedatum;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}else{
|
||||
|
||||
$tage= '-'.$starttage.' days';
|
||||
$erstdate = date('Y-m-j');
|
||||
$newstart = strtotime ( $tage , strtotime ( $erstdate ) ) ;
|
||||
$anzeigezeit1 = date ( 'Y-m-j' , $newstart );
|
||||
$anzeigezeit2 = date('Y-m-j');
|
||||
$anz= $startdat.' Die vergangenen '.$starttage.' Tage';
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/*
|
||||
echo "<br>";
|
||||
echo $anzeigezeit1;
|
||||
echo "<br>";
|
||||
echo $anzeigezeit2;
|
||||
*/
|
||||
$zeit= "WHERE DATE(datum) BETWEEN '$anzeigezeit1' AND '$anzeigezeit2' ";
|
||||
|
||||
switch ($monatb) {
|
||||
case 1: $monat= "Januar"; break;
|
||||
case 2: $monat= "Februar"; break;
|
||||
case 3: $monat= "März"; break;
|
||||
case 4: $monat= "April"; break;
|
||||
case 5: $monat= "Mai"; break;
|
||||
case 6: $monat= "Juni"; break;
|
||||
case 7: $monat= "Juli"; break;
|
||||
case 8: $monat= "August"; break;
|
||||
case 9: $monat= "September"; break;
|
||||
case 10: $monat= "Oktober"; break;
|
||||
case 11: $monat= "November"; break;
|
||||
case 12: $monat= "Dezember"; break;
|
||||
}
|
||||
|
||||
|
||||
//----------------------------------- Array anlegen und füllen ------------------------------------------
|
||||
|
||||
|
||||
$row_data = array();
|
||||
$row_werte = array();
|
||||
|
||||
//------------------------------------- Titelzeile -------------------------------------
|
||||
// zudem wird da auch die Abfrage für die Tabellendaten erzeugt
|
||||
// dabei wird die Positionierung sowie Teiler und Einheit berücksichtigt
|
||||
$row_data[] .="Datum ";
|
||||
|
||||
$sqlk = "SELECT isp_wert, isp_klar, einheit, teiler, tabelle2, tabelle FROM jumpgraph WHERE wahl=$ausw ORDER BY ID ";
|
||||
foreach ($pdo->query($sqlk) as $keyn) {
|
||||
$key_name= $keyn[isp_klar]."(".$keyn[einheit].")";
|
||||
//$key_name = str_replace(' ','',$key_name);
|
||||
$key_name = rawurlencode($key_name);
|
||||
$weg = array('%0D', '%0A');
|
||||
$key_name = str_replace($weg, '',$key_name);
|
||||
//$key_name = str_replace(array('\r', '\n', '\t', ' '), ' ', $key_name);
|
||||
$key_name = rawurldecode($key_name);
|
||||
$row_data[] .= $key_name ;
|
||||
//$row_werte[] .= round ($keyn[isp_wert]/$keyn[teiler],1);
|
||||
$nteiler = $keyn[teiler];
|
||||
$nwert = $keyn[isp_wert];
|
||||
$row_werte[] .= " round($nwert/$nteiler,1)";
|
||||
|
||||
//$row_werte[] .= $keyn[isp_wert];
|
||||
|
||||
$abfrageisp = $keyn[tabelle2];
|
||||
$ispname = $keyn[tabelle];
|
||||
}
|
||||
$result_row[$index] = implode(csv_delimeter, $row_data);
|
||||
$abfrage = implode(",", $row_werte);
|
||||
unset($row_data);
|
||||
unset($row_werte);
|
||||
|
||||
//------------------------------------- Tabellendaten -------------------------------------
|
||||
|
||||
$sql = "SELECT datum, $abfrage FROM $abfrageisp $zeit";
|
||||
$stmt = $pdo->prepare($sql);
|
||||
$stmt->execute();
|
||||
|
||||
while ($array_result = $stmt->fetch(PDO::FETCH_ASSOC)){
|
||||
|
||||
$row_data = array();
|
||||
$index = count($result_row)-1;
|
||||
foreach ( $array_result as $key => $value )
|
||||
{
|
||||
$row_data[] .= $value ;
|
||||
}
|
||||
$result_row[$index] = implode(csv_delimeter, $row_data);
|
||||
$max2= max($row_data);
|
||||
if ($max2>$max1){$max1=$max2;}
|
||||
$max= ceil($max1);
|
||||
unset($row_data);
|
||||
$up2++;
|
||||
}
|
||||
|
||||
|
||||
|
||||
//------------------------------------- CSV schreiben und anzeigen -------------------------------------
|
||||
|
||||
$inhalt= implode(PHP_EOL, $result_row);
|
||||
|
||||
|
||||
|
||||
$fp = fopen('graph.csv', 'w');
|
||||
fwrite($fp, $inhalt);
|
||||
fclose($fp);
|
||||
echo "Max: $max";
|
||||
echo "<meta http-equiv='refresh' content='2;
|
||||
URL=anzeige.php?inf=$ispname&max=$max&az=$az&is=$is&mo=$monat&ja=$jahr&ab=$abweichung&ausw=$ausw&anz=$anz&sd=$startdatum&ed=$endedatum&st=$starttage&hd=$farbe&az=$legende&ra=$range'>";
|
||||
|
||||
|
||||
|
||||
?>
|
||||
@@ -0,0 +1,210 @@
|
||||
<?php
|
||||
include("verbind.php");
|
||||
// Tabellenname
|
||||
define("select_table", "newsletter");
|
||||
// Trennzeichen
|
||||
define("csv_delimeter", ",");
|
||||
error_reporting(0);
|
||||
header("Content-Type: text/html; charset=utf-8");
|
||||
|
||||
|
||||
//------------------------------------- Definitionen ----------------------------------------
|
||||
|
||||
|
||||
$ausw = $_GET['ausw'];
|
||||
// $wl= $_GET['wl'];
|
||||
$is= $_GET['is'];
|
||||
$abweichung= $_GET['ab'];
|
||||
$starttage= $_POST['starttage'];
|
||||
// if (empty($starttage)) {$starttage = $_GET['st'];}
|
||||
$startdatum= $_POST['startdatum'];
|
||||
// if (empty($startdatum)) {$startdatum = $_GET['sd'];}
|
||||
$endedatum= $_POST['endedatum'];
|
||||
// if (empty($endedatum)) {$endedatum = $_GET['ed'];}
|
||||
|
||||
|
||||
if (empty($abweichung)) {$abweichung = 0;}
|
||||
|
||||
|
||||
|
||||
|
||||
// $anfang=$_POST['startdatum'];
|
||||
// $ende=$_POST['endedatum'];
|
||||
|
||||
echo "Die CSV-Datei wird erzeugt<br>";
|
||||
|
||||
echo "Startdatum: $startdatum <br>";
|
||||
echo "Endedatum: $endedatum <br>";
|
||||
echo "Die vergangenen: $starttage Tage<br>";
|
||||
|
||||
//------------------------------------- Zeit aufbereiten ----------------------------------------
|
||||
/*
|
||||
$datum="2002-02-02";
|
||||
$datum=date('Y-m-d',strtotime($datum." +2 months"));
|
||||
echo $datum;
|
||||
$datum=date('Y-m-d',strtotime($datum." +70 days"));
|
||||
echo $datum;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
$date = date('Y-m-j');
|
||||
$newdate = strtotime ( '+2 month' , strtotime ( $date ) ) ;
|
||||
$newdate = date ( 'Y-m-j' , $newdate );
|
||||
|
||||
echo $newdate;
|
||||
|
||||
|
||||
*/
|
||||
|
||||
|
||||
if (empty($starttage)) {
|
||||
|
||||
if (empty($startdatum)) {
|
||||
|
||||
$abwei= $abweichung.' month';
|
||||
$date = date('Y-m-j');
|
||||
$newdate = strtotime ( $abwei , strtotime ( $date ) ) ;
|
||||
$newdate = date ( 'Y-m-j' , $newdate );
|
||||
$sn = explode('-', $newdate);
|
||||
$startnewdate = $sn[0].'-'.$sn[1].'-01';
|
||||
$monatb= $sn[1];
|
||||
$jahr= $sn[0];
|
||||
$anzeigezeit1= $startnewdate;
|
||||
if ($abweichung !=0){$sn = explode('-', $newdate);$newdate = $sn[0].'-'.$sn[1].'-31';}
|
||||
$anzeigezeit2= $newdate;
|
||||
|
||||
|
||||
}else{
|
||||
|
||||
|
||||
$startdat = explode("-", $startdatum);
|
||||
$startdat = array_reverse($startdat);
|
||||
$startdat = implode("-", $startdat);
|
||||
$enddat = explode("-", $endedatum);
|
||||
$enddat = array_reverse($enddat);
|
||||
$enddat = implode("-", $enddat);
|
||||
|
||||
|
||||
|
||||
$anzeigezeit1= $startdat;
|
||||
$anzeigezeit2= $enddat;
|
||||
$anz= $startdatum.' bis '.$endedatum;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}else{
|
||||
|
||||
$tage= '-'.$starttage.' days';
|
||||
$erstdate = date('Y-m-j');
|
||||
$newstart = strtotime ( $tage , strtotime ( $erstdate ) ) ;
|
||||
$anzeigezeit1 = date ( 'Y-m-j' , $newstart );
|
||||
$anzeigezeit2 = date('Y-m-j');
|
||||
$anz= $startdat.' Die vergangenen '.$starttage.' Tage';
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/*
|
||||
echo "<br>";
|
||||
echo $anzeigezeit1;
|
||||
echo "<br>";
|
||||
echo $anzeigezeit2;
|
||||
*/
|
||||
$zeit= "WHERE DATE(datum) BETWEEN '$anzeigezeit1' AND '$anzeigezeit2' ";
|
||||
|
||||
switch ($monatb) {
|
||||
case 1: $monat= "Januar"; break;
|
||||
case 2: $monat= "Februar"; break;
|
||||
case 3: $monat= "März"; break;
|
||||
case 4: $monat= "April"; break;
|
||||
case 5: $monat= "Mai"; break;
|
||||
case 6: $monat= "Juni"; break;
|
||||
case 7: $monat= "Juli"; break;
|
||||
case 8: $monat= "August"; break;
|
||||
case 9: $monat= "September"; break;
|
||||
case 10: $monat= "Oktober"; break;
|
||||
case 11: $monat= "November"; break;
|
||||
case 12: $monat= "Dezember"; break;
|
||||
}
|
||||
|
||||
|
||||
//----------------------------------- Array befüllen ------------------------------------------
|
||||
|
||||
|
||||
$row_data = array();
|
||||
$row_werte = array();
|
||||
|
||||
//------------------------------------- Titelzeile -------------------------------------
|
||||
// zudem wird da auch die Abfrage für die Tabellendaten erzeugt
|
||||
// dabei wird die Positionierung sowie Teiler und Einheit berücksichtigt
|
||||
$row_data[] .="Datum ";
|
||||
|
||||
$sqlk = "SELECT isp_wert, isp_klar, einheit, teiler, tabelle2, tabelle FROM jumpgraph WHERE wahl=$ausw ORDER BY ID ";
|
||||
foreach ($pdo->query($sqlk) as $keyn) {
|
||||
$key_name= $keyn[isp_klar]."(".$keyn[einheit].")";
|
||||
//$key_name = str_replace(' ','',$key_name);
|
||||
$key_name = rawurlencode($key_name);
|
||||
$weg = array('%0D', '%0A');
|
||||
$key_name = str_replace($weg, '',$key_name);
|
||||
//$key_name = str_replace(array('\r', '\n', '\t', ' '), ' ', $key_name);
|
||||
$key_name = rawurldecode($key_name);
|
||||
$row_data[] .= $key_name ;
|
||||
//$row_werte[] .= round ($keyn[isp_wert]/$keyn[teiler],1);
|
||||
$nteiler = $keyn[teiler];
|
||||
$nwert = $keyn[isp_wert];
|
||||
$row_werte[] .= " round($nwert/$nteiler,1)";
|
||||
|
||||
//$row_werte[] .= $keyn[isp_wert];
|
||||
|
||||
$abfrageisp = $keyn[tabelle2];
|
||||
$ispname = $keyn[tabelle];
|
||||
}
|
||||
$result_row[$index] = implode(csv_delimeter, $row_data);
|
||||
$abfrage = implode(",", $row_werte);
|
||||
unset($row_data);
|
||||
unset($row_werte);
|
||||
|
||||
//------------------------------------- Tabellendaten -------------------------------------
|
||||
|
||||
$sql = "SELECT datum, $abfrage FROM $abfrageisp $zeit";
|
||||
$stmt = $pdo->prepare($sql);
|
||||
$stmt->execute();
|
||||
|
||||
while ($array_result = $stmt->fetch(PDO::FETCH_ASSOC)){
|
||||
|
||||
$row_data = array();
|
||||
$index = count($result_row)-1;
|
||||
foreach ( $array_result as $key => $value )
|
||||
{
|
||||
$row_data[] .= $value ;
|
||||
}
|
||||
$result_row[$index] = implode(csv_delimeter, $row_data);
|
||||
unset($row_data);
|
||||
$up2++;
|
||||
}
|
||||
|
||||
|
||||
|
||||
//------------------------------------- CSV schreiben und anzeigen -------------------------------------
|
||||
|
||||
$inhalt= implode(PHP_EOL, $result_row);
|
||||
|
||||
|
||||
$fp = fopen('graphcsv.csv', 'w');
|
||||
fwrite($fp, $inhalt);
|
||||
fclose($fp);
|
||||
|
||||
echo "<meta http-equiv='refresh' content='2; URL=csvexport.php?inf=$ispname&is=$is&mo=$monat&ja=$jahr&ab=$abweichung&ausw=$ausw&anz=$anz&sd=$startdatum&ed=$endedatum&st=$starttage'>";
|
||||
|
||||
|
||||
|
||||
?>
|
||||
@@ -0,0 +1 @@
|
||||
Datum
|
||||
|
@@ -0,0 +1 @@
|
||||
Datum
|
||||
|
@@ -0,0 +1,699 @@
|
||||
<?php
|
||||
session_start();
|
||||
session_destroy();
|
||||
error_reporting(0);
|
||||
include("verbind.php");
|
||||
|
||||
$in= $_GET['op'];
|
||||
$is= $_GET['is'];
|
||||
$is2= $_GET['is2'];
|
||||
$ds= $_GET['ds'];
|
||||
$ds1= $_GET['ds1'];
|
||||
// $wl=$_GET['wl'];
|
||||
$name1= $_POST['aname'];
|
||||
$ausw= $_GET['ausw'];
|
||||
|
||||
$tage= $_POST['starttage'];
|
||||
$das= $_POST['startdatum'];
|
||||
$dae= $_POST['endedatum'];
|
||||
|
||||
|
||||
|
||||
if (isset($ds)){
|
||||
$sql="DELETE FROM jumpgraph WHERE wahl=0";
|
||||
$pdo->exec($sql);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
if (empty($is)) {$is=1;}
|
||||
if (empty($ausw)) {$ausw=0;}
|
||||
|
||||
|
||||
|
||||
$sqlu = "SELECT db_name, ID, name FROM sestation
|
||||
WHERE ID ='$is' ";
|
||||
foreach ($pdo->query($sqlu) as $row) {
|
||||
$tab2= $row[db_name];
|
||||
$tab= $row[name];
|
||||
}
|
||||
|
||||
|
||||
$set=0;
|
||||
if ($_POST['submit'] =='Markierte hinzufügen') {
|
||||
|
||||
$sql = "INSERT INTO jumpgraph (tabelle, tabelle2, isp_wert, isp_klar, teiler, wahl, einheit, digital ) VALUES (:ta1, :ta2, :val, :kla, :tei, :set, :ein, :dig )";
|
||||
|
||||
|
||||
$stmt = $pdo->prepare($sql);
|
||||
|
||||
|
||||
$stmt->bindParam(':ta1', $tab);
|
||||
$stmt->bindParam(':ta2', $tab2);
|
||||
$stmt->bindParam(':val', $valu);
|
||||
$stmt->bindParam(':kla', $kla);
|
||||
$stmt->bindParam(':tei', $tei);
|
||||
$stmt->bindParam(':set', $set);
|
||||
$stmt->bindParam(':ein', $ein);
|
||||
$stmt->bindParam(':dig', $dig);
|
||||
|
||||
foreach ($_POST['cb1'] as $item) {
|
||||
$valu= $item['kurz'];
|
||||
$kla= $item['klar'];
|
||||
$tei= $item['teil'];
|
||||
$ein= $item['einh'];
|
||||
$dig= $item['dig'];
|
||||
// $set = $item['isp'];
|
||||
|
||||
|
||||
//if (empty($teil)) {$teil=1;}
|
||||
$stmt->execute();
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
if (isset($ds1)){
|
||||
$sql="DELETE FROM jumpgraph WHERE tabelle2='$is2' AND isp_wert='$ds1' ";
|
||||
$pdo->exec($sql);
|
||||
}
|
||||
|
||||
if ($_POST['auswahl'] =='ok') {
|
||||
|
||||
|
||||
//--------------------- auswahl anlegen ------------
|
||||
$sql = "INSERT INTO jumpgruppe (name, ddc ) VALUES (:name1, :ddc1 )";
|
||||
|
||||
$stmt = $pdo->prepare($sql);
|
||||
|
||||
$stmt->bindParam(':name1', $name1);
|
||||
$stmt->bindParam(':ddc1', $is);
|
||||
$stmt->execute();
|
||||
|
||||
// ------------------id der neuen Auswahl holen--------------
|
||||
|
||||
$sqlu = "SELECT ID FROM jumpgruppe
|
||||
WHERE ID >0 ORDER BY ID ";
|
||||
foreach ($pdo->query($sqlu) as $row) { $idjump= $row[ID]; }
|
||||
|
||||
|
||||
// ------------------- Umschreiben ---------------
|
||||
|
||||
$xsql = "UPDATE jumpgraph SET wahl= $idjump WHERE wahl=0";
|
||||
$stmt = $pdo->prepare($xsql);
|
||||
$stmt->execute();
|
||||
}
|
||||
|
||||
if ($_POST['auswahlentf'] =='ok') {
|
||||
|
||||
$sql2="DELETE FROM jumpgruppe WHERE ID=$ausw";
|
||||
$pdo->exec($sql2);
|
||||
}
|
||||
|
||||
|
||||
?>
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<link rel="stylesheet" href="style.css" media="screen">
|
||||
<link rel="stylesheet" href="tigra_calendar/tcal.css" media="screen">
|
||||
<script type="text/javascript" async src="Suggest/ajax.js"></script>
|
||||
<script type="text/javascript" async src="Suggest/suggest.js"></script>
|
||||
<script type="text/javascript" src="Suggest/jquery.js"></script>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
|
||||
|
||||
<script type="text/javascript" async>
|
||||
function show(id)
|
||||
{
|
||||
if (document.getElementById(id).style.display=='none')
|
||||
{document.getElementById(id).style.display='block'; }
|
||||
else
|
||||
{ document.getElementById(id).style.display='none'; }
|
||||
}
|
||||
//]]>
|
||||
</script>
|
||||
|
||||
|
||||
<script type="text/javascript" async>
|
||||
function show1()
|
||||
{
|
||||
if (document.getElementById('zeigeli1').style.display=='none')
|
||||
{document.getElementById('zeigeli1').style.display='block';
|
||||
document.getElementById('zeigeli2').style.display='none';
|
||||
}
|
||||
else
|
||||
{ document.getElementById('zeigeli1').style.display='none'; }
|
||||
}
|
||||
//]]>
|
||||
</script>
|
||||
|
||||
|
||||
<script type="text/javascript" async>
|
||||
function show2()
|
||||
{
|
||||
if (document.getElementById('zeigeli2').style.display=='none')
|
||||
{document.getElementById('zeigeli2').style.display='block';
|
||||
document.getElementById('zeigeli1').style.display='none';
|
||||
}
|
||||
else
|
||||
{ document.getElementById('zeigeli2').style.display='none'; }
|
||||
}
|
||||
//]]>
|
||||
</script>
|
||||
|
||||
<script type="text/javascript" async>
|
||||
function show1()
|
||||
{
|
||||
if (document.getElementById('zeigeli1a').style.display=='none')
|
||||
{document.getElementById('zeigeli1a').style.display='block';
|
||||
document.getElementById('zeigeli2a').style.display='none';
|
||||
}
|
||||
else
|
||||
{ document.getElementById('zeigeli1a').style.display='none'; }
|
||||
}
|
||||
//]]>
|
||||
</script>
|
||||
|
||||
|
||||
<script type="text/javascript" async>
|
||||
function show2()
|
||||
{
|
||||
if (document.getElementById('zeigeli2a').style.display=='none')
|
||||
{document.getElementById('zeigeli2a').style.display='block';
|
||||
document.getElementById('zeigeli1a').style.display='none';
|
||||
}
|
||||
else
|
||||
{ document.getElementById('zeigeli2a').style.display='none'; }
|
||||
}
|
||||
//]]>
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<script type="text/javascript" async>
|
||||
function test() {
|
||||
location.href = 'index.php?op=1';
|
||||
};
|
||||
</script>
|
||||
<script type="text/javascript"src="tigra_calendar/tcal.js"></script>
|
||||
|
||||
|
||||
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
||||
|
||||
<?php
|
||||
$sql = "SELECT name, name2, text, smtp, absender, sprung, tage, alarm FROM sebasis";
|
||||
|
||||
//$sql1 = mysql_query($sql) OR die(mysql_error());
|
||||
//while ($erg = mysql_fetch_object($sql1)) {
|
||||
|
||||
|
||||
foreach ($pdo->query($sql) as $row) {
|
||||
$name= $row['name'];
|
||||
$name2= $row['name2'];
|
||||
$text= $row['text'];
|
||||
$smtp= $row['smtp'];
|
||||
$absender= $row['absender'];
|
||||
$sprung= $row['sprung'];
|
||||
$tagedb= $row['tage'];
|
||||
$alarmmin= $row['alarm'];
|
||||
}
|
||||
|
||||
|
||||
$sqlhi = "SELECT absender FROM sebasis";
|
||||
foreach ($pdo->query($sqlhi) as $rowhi) {
|
||||
$absender= $rowhi['absender'];
|
||||
}
|
||||
$teilung = explode("-", $absender);
|
||||
|
||||
$hdv = $teilung[0];
|
||||
$azv = $teilung[1];
|
||||
$rav = $teilung[2];
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
if (empty($sprung)) {$ende='';}else{
|
||||
$ende = "<a href='http://$sprung' ><img class='bildbot' usemap= 'Mapi' src='bilder/aus30.png' alt='SE'/></a>";
|
||||
}
|
||||
|
||||
if (!empty($tage))
|
||||
{$tagok=$tage;
|
||||
}else
|
||||
{
|
||||
if (!empty($das)) {$dstartok=$das;$dendeok=$dae; $tagok='';}else{$tagok=$tagedb; $taganzeige= '$tagok bis heute';}
|
||||
}
|
||||
|
||||
//------------------------------------------------------
|
||||
|
||||
$alarm= 1;
|
||||
$ala=0;
|
||||
|
||||
$sqlu2 = "SELECT ID, db_name, name FROM sestation WHERE name IS NOT NULL ";
|
||||
foreach ($pdo->query($sqlu2) as $row) {
|
||||
$tab2= $row[db_name];
|
||||
$z1= $row[name];
|
||||
$z2= $row[ID];
|
||||
|
||||
if (empty($z1)) {}else{
|
||||
$sqlu3 = "SELECT datum FROM $tab2 ORDER BY ID DESC LIMIT 1";
|
||||
foreach ($pdo->query($sqlu3) as $row2) {
|
||||
|
||||
$z3= $row2[datum];
|
||||
|
||||
$zs1= strtotime($z3);
|
||||
$zs2= time();
|
||||
|
||||
if ($zs1 < $zs2-60*$alarmmin) {$ala++;}
|
||||
|
||||
}}
|
||||
}
|
||||
|
||||
if ($ala > 0) {$alarm=0;}
|
||||
|
||||
//-------------------------------------------------------
|
||||
echo "<div class='topindex'>";
|
||||
echo "<img class='bild' usemap= 'Mapi' src='bilder/logo.png' alt='SE'/>";
|
||||
|
||||
echo $ende;
|
||||
|
||||
?>
|
||||
<a href="javascript:show1()" ><?php echo " <span class='rechtsmen'><img class='bildbot' usemap= 'Mapi' src='bilder/schloss.png' alt='SE'/> </span>";?></a>
|
||||
<?php
|
||||
?>
|
||||
<a href="javascript:show2()" ><?php echo " <span class='rechtsmen'><img class='bildbot' usemap= 'Mapi' src='bilder/rad.png' alt='SE'/> </span>";?></a>
|
||||
<?php
|
||||
|
||||
|
||||
if ($alarm==0)
|
||||
{
|
||||
echo "<a href='isp.php' ><span class='blue'><img class='rechtsmen' usemap= 'Mapi' src='bilder/isphe30.png' alt='SE'/></span></a>";
|
||||
}else{
|
||||
echo "<a href='isp.php' ><span class='blue'><img class='rechtsmen' usemap= 'Mapi' src='bilder/ispok30.png' alt='SE'/></span></a>";
|
||||
}
|
||||
|
||||
|
||||
echo "<div id='zeigeli1a' style='display: none;'>";
|
||||
// echo "<form name= 'senden' method='post' accept-charset='UTF-8' action='$PHP_SELF?i=1'>";
|
||||
echo "<form name= 'senden' method='post' accept-charset='UTF-8' action='se6.php?i=1'>";
|
||||
echo " <span><input type='password' name='Passwort' placeholder='PW Admin'></span>";
|
||||
echo " <span><input type='submit' class = 'loginsende' name='submit' value='ok'></span>";
|
||||
echo "</form>";
|
||||
echo "</div>";
|
||||
|
||||
|
||||
|
||||
echo "<div id='zeigeli2a' style='display: none;'>";
|
||||
echo "<form name= 'senden' method='post' accept-charset='UTF-8' action='einstellung.php?i=1'>";
|
||||
echo " <span><input type='password' name='Passwort' placeholder='PW Einstellungen'></span>";
|
||||
echo " <span><input type='submit' class = 'loginsende' name='submit' value='ok'></span>";
|
||||
echo "</form>";
|
||||
echo "</div>";
|
||||
|
||||
|
||||
|
||||
//echo "<div class='bild'>$ende2</div>";
|
||||
echo "<div class='titel'>";
|
||||
echo "<div class='titelfett'>TRENDDATENAUFZEICHNUNG</div>";
|
||||
echo "<br>";
|
||||
echo "$name";
|
||||
echo "<br>";
|
||||
echo "$name2";
|
||||
echo "<br>";
|
||||
echo "$text";
|
||||
echo "</div>";
|
||||
echo "</div>";
|
||||
|
||||
|
||||
//------------------------------------------links----------------------------------------------------------
|
||||
|
||||
echo "<div class='kasten'>";
|
||||
|
||||
|
||||
|
||||
//---------- ISP Auswahl - ----------------------
|
||||
|
||||
echo "<div class='buttonx'> ";
|
||||
echo "<select class= 'isp' size='1' name='jumpit' onchange='document.location.href=this.value'> ";
|
||||
|
||||
$sql = "SELECT name, db_name, nummer, ID FROM sestation WHERE name !='' ORDER BY ID ";
|
||||
|
||||
foreach ($pdo->query($sql) as $row) {
|
||||
|
||||
if ( $is==$row['ID']) {
|
||||
$markiert= 'selected';
|
||||
$wahl= $row['db_name'];
|
||||
} else {
|
||||
$markiert='';
|
||||
}
|
||||
$eins= $row['ID'];
|
||||
$zwei= $row['name'];
|
||||
echo "<option value='index.php?is=$eins&ausw=0&ds=1' $markiert>$zwei</option> ";
|
||||
|
||||
echo "eins";
|
||||
echo $eins;
|
||||
echo "eins";
|
||||
echo $zwei;
|
||||
|
||||
}
|
||||
|
||||
echo "</select>";
|
||||
|
||||
echo "</div>";
|
||||
|
||||
|
||||
|
||||
|
||||
// --------------------- Datenpunkte der gewählten ISP anzeigen und sammeln ----------
|
||||
|
||||
//echo "<div id='zeige2csv' class='' style='display: block;'>";
|
||||
|
||||
echo "<form accept-charset='utf-8' action='index.php?is=$is&ausw=0' method='post'> ";
|
||||
echo "<input class='rechtsobenblau' type='submit' name='submit' value='Markierte hinzufügen'>";
|
||||
echo "<div class='kasteninnenindex'>";
|
||||
|
||||
|
||||
|
||||
$sql = "SELECT ID, kurz, klar, einheit, isp, teiler, digital
|
||||
FROM seliste
|
||||
WHERE
|
||||
isp=$is AND klar != '' ";
|
||||
|
||||
$up=0;
|
||||
foreach ($pdo->query($sql) as $row) {
|
||||
echo "<br><input type='checkbox' name='cb1[$up][kurz]' value='$row[kurz]' >$row[klar]";
|
||||
|
||||
echo "<input type='Hidden' name='cb1[$up][isp]' value='$row[isp]'>";
|
||||
echo "<input type='Hidden' name='cb1[$up][klar]' value='$row[klar]'>";
|
||||
echo "<input type='Hidden' name='cb1[$up][teil]' value='$row[teiler]'>";
|
||||
echo "<input type='Hidden' name='cb1[$up][einh]' value='$row[einheit]'>";
|
||||
echo "<input type='Hidden' name='cb1[$up][dig]' value='$row[digital]'>";
|
||||
$up++;
|
||||
}
|
||||
|
||||
echo "<br>";
|
||||
echo "</form>";
|
||||
echo "</div>";
|
||||
|
||||
$markiertex=0;
|
||||
$zahlx=1;
|
||||
|
||||
if (isset($_POST['cb1'])){
|
||||
foreach ($_POST['cb1'] as $valuex) {
|
||||
$annahme = $valuex;
|
||||
$annahme = 'Wert'.$annahme;
|
||||
|
||||
${expo.$zahlx}= $annahme;
|
||||
|
||||
$markiertex++;
|
||||
$zahlx++;
|
||||
}
|
||||
}
|
||||
|
||||
$results = array();
|
||||
|
||||
echo "</div>";
|
||||
|
||||
//--------------------------------------mitte-------------------------------------------------------
|
||||
|
||||
|
||||
echo "<div class='kasten'>";
|
||||
|
||||
|
||||
echo "<div class='buttonx'> ";
|
||||
echo "<select class= 'isp' size='1' name='jumpit' onchange='document.location.href=this.value'> ";
|
||||
|
||||
echo "<option value='index.php?is=$is&ausw=0' >Freie Auswahl</option>";
|
||||
|
||||
$sql = "SELECT ID, name, ddc FROM jumpgruppe WHERE ID>1 ORDER BY ID ";
|
||||
|
||||
foreach ($pdo->query($sql) as $row) {
|
||||
|
||||
if ( $ausw==$row['ID']) {$markiert2= 'selected'; } else {$markiert2='';}
|
||||
/*
|
||||
$set= $row['gruppe'];
|
||||
*/
|
||||
$auswahl = $row['name'];
|
||||
$ddc = $row['ddc'];
|
||||
$ind = $row['ID'];
|
||||
|
||||
echo "<option value='index.php?is=$is&ausw=$ind' $markiert2>$auswahl</option> ";
|
||||
|
||||
}
|
||||
|
||||
echo "</select>";
|
||||
echo "</div>";
|
||||
?>
|
||||
<a href="javascript:show('zeigea')" ><?php echo " <span class='rechtsobenblau'>Menü editieren </span>";?></a>
|
||||
<?php
|
||||
//-----------------------------------------------
|
||||
|
||||
|
||||
|
||||
|
||||
echo "<div id='zeigea' class='' style='display: none;'>";
|
||||
echo "<form accept-charset='utf-8' action='index.php?ausw=$ausw&is=$is' method='post'> ";
|
||||
|
||||
?>
|
||||
<a href="javascript:show('zeigea')" ><?php echo "<img src='bilder/x.jpg' class ='fensterzu' alt='SE'/>";?></a>
|
||||
<?php
|
||||
|
||||
echo "Aktuell gewählte Datenpunkte als Auswahl speichern";
|
||||
|
||||
|
||||
echo "<div class='zeiteingabe'>";
|
||||
echo "<input name='aname' type='text' size='25' maxlength='25' placeholder ='Name der Auswahl'required> ";
|
||||
echo "<div class='eintrag'>";
|
||||
echo "<input type='Hidden' name='auswahl' value='ok'>";
|
||||
echo "<input type='submit' name'awahl' value='speichern'>";
|
||||
echo "</div>";
|
||||
echo "</form>";
|
||||
echo "</div>";
|
||||
|
||||
echo "Aktuell gewählte Auswahl löschen";
|
||||
|
||||
echo "<form accept-charset='utf-8' action='index.php?ausw=$ausw&is=$is&ausw=$ausw' method='post'> ";
|
||||
|
||||
echo "<div class='eintrag'>";
|
||||
echo "<input type='Hidden' name='auswahlentf' value='ok'>";
|
||||
echo "<input type='submit' name'submit' value='löschen'>";
|
||||
echo "</div>";
|
||||
echo "</form>";
|
||||
|
||||
echo "</div>";
|
||||
|
||||
|
||||
|
||||
if (empty($in)){
|
||||
$zeig='none';
|
||||
}else{
|
||||
$zeig='block';
|
||||
}
|
||||
|
||||
echo "<div id='login' class='' style='display: $zeig;'>";
|
||||
// echo "<form name= 'senden' method='post' accept-charset='UTF-8' action='$PHP_SELF?i=1'>";
|
||||
echo "<form name= 'senden' method='post' accept-charset='UTF-8' action='se6.php?i=1'>";
|
||||
echo " <span><input type='password' class = 'loginfeldc' name='Passwort'></span>";
|
||||
echo " <span><input type='submit' class = 'loginsende' name='submit' value='ok'></span>";
|
||||
echo "</form>";
|
||||
echo "</div>";
|
||||
|
||||
//---------------------------------------------
|
||||
|
||||
|
||||
echo "<div class='kasteninnen'>";
|
||||
|
||||
$sql = "SELECT tabelle, tabelle2, wahl, ID, isp_wert, isp_klar
|
||||
FROM jumpgraph
|
||||
WHERE
|
||||
wahl=$ausw
|
||||
ORDER BY ID
|
||||
";
|
||||
|
||||
// $sql1 = mysql_query($query);
|
||||
//while ($erg = mysql_fetch_object($sql1)) {
|
||||
|
||||
if ($ausw == '0') {
|
||||
foreach ($pdo->query($sql) as $row) {
|
||||
echo "<div class='textki' ><a href='index.php?is=$is&ds1=$row[isp_wert]&is2=$row[tabelle2]&ausw=$ausw'><img src='bilder/x.jpg' alt='SE'/></a> $row[tabelle] - $row[isp_klar]</div>";
|
||||
}
|
||||
}else{
|
||||
foreach ($pdo->query($sql) as $row) {
|
||||
echo "<div class='textki' ></a> $row[tabelle] - $row[isp_klar]</div>";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
echo " <br class='clear'/>";
|
||||
echo "</div>";
|
||||
echo "</div>";
|
||||
|
||||
//-----------------------------------------------rechts-----------------------------------------------------------------
|
||||
|
||||
echo "<div class='kasten'>";
|
||||
|
||||
echo "<div class='buttonx'> ";
|
||||
echo "<select class= 'isp' size='1' name='jumpit' onchange='document.location.href=this.value'> ";
|
||||
|
||||
echo "<option value='index.php?is=$is&ausw=0' >Zeitraum & Ausgabe</option>";
|
||||
|
||||
echo "</select>";
|
||||
echo "</div>";
|
||||
|
||||
|
||||
|
||||
?>
|
||||
<a href="javascript:show('zeigez')" ><?php echo " <span class='rechtsobenblau'>Andere Zeiten </span>";?></a>
|
||||
<br>
|
||||
<?php
|
||||
|
||||
|
||||
echo "<div id='zeigez' style='display: none;'>";
|
||||
?>
|
||||
<a href="javascript:show('zeigez')" ><?php echo "<img src='bilder/x.jpg' class ='fensterzu' alt='SE'/>";?></a>
|
||||
<?php
|
||||
//echo "<br><br>";
|
||||
echo "Entweder";
|
||||
echo "<form accept-charset='utf-8' action='index.php?ausw=$ausw&is=$is' method='post'> ";
|
||||
|
||||
echo "<input name='startdatum' value='$zstart' type='text' size='10' maxlength='11' class= 'tcal' placeholder ='Startdatum'required> ";
|
||||
|
||||
|
||||
|
||||
echo "<input name='endedatum' value= '$zende' type='text' size='10' maxlength='11' class= 'tcal' placeholder ='Endedatum'required> ";
|
||||
|
||||
|
||||
|
||||
echo "<input type='submit' name'submit' value='übernehmen'>";
|
||||
|
||||
echo "</form>";
|
||||
|
||||
|
||||
echo "oder";
|
||||
|
||||
echo "<form accept-charset='utf-8' action='index.php?ausw=$ausw&is=$is' method='post'> ";
|
||||
|
||||
echo "<input name='starttage' type='text' size='4' maxlength='3' required> Tage bis heute ";
|
||||
|
||||
|
||||
echo "<input type='submit' name'submit' value='übernehmen'>";
|
||||
|
||||
echo "</form>";
|
||||
|
||||
echo "</div>";
|
||||
|
||||
|
||||
//echo "Zeitraum 10 Tage bis heute";
|
||||
|
||||
|
||||
echo "<div class='kasteninnen'>";
|
||||
|
||||
if (empty($das))
|
||||
{
|
||||
echo "Zeitraum: $tagok Tage bis heute <br><br>";
|
||||
}else{
|
||||
echo "Zeitraum: Von $das bis $dae <br><br>";
|
||||
}
|
||||
|
||||
|
||||
|
||||
echo "<form accept-charset='utf-8' action='exportgraph.php?ausw=$ausw&is=$is' method='post'> ";
|
||||
echo "<input type='Hidden' name='starttage' value='$tagok'> ";
|
||||
echo "<input type='Hidden' name='startdatum' value='$das'> ";
|
||||
echo "<input type='Hidden' name='endedatum' value='$dae'> ";
|
||||
|
||||
|
||||
echo "<input type='Hidden' name='farbe' value='$hdv'> ";
|
||||
echo "<input type='Hidden' name='legende' value='$azv'> ";
|
||||
echo "<input type='Hidden' name='range' value='$rav'> ";
|
||||
|
||||
|
||||
|
||||
|
||||
echo "<input type='submit' class='set' name='csv' value='Graph anzeigen'>";
|
||||
echo "</form>";
|
||||
|
||||
|
||||
echo "<form accept-charset='utf-8' action='exportgraphcsv.php?ausw=$ausw&is=$is' method='post'> ";
|
||||
echo "<input type='Hidden' name='starttage' value='$tagok'> ";
|
||||
echo "<input type='Hidden' name='startdatum' value='$das'> ";
|
||||
echo "<input type='Hidden' name='endedatum' value='$dae'> ";
|
||||
echo "<input type='submit' class='set' name='csv' value='CSV exportieren'>";
|
||||
echo "</form>";
|
||||
|
||||
// echo "<form accept-charset='utf-8' action='exportcsv.php?ti=5&wl=$wl&is=$is' method='post'> ";
|
||||
// echo "<input type='submit' class='set' name='csv' value='CSV erzeugen'>";
|
||||
// echo "</form>";
|
||||
|
||||
echo "</div>";
|
||||
|
||||
echo "</div>";
|
||||
|
||||
|
||||
|
||||
echo "<div class='mitte'>";
|
||||
|
||||
echo " <br class='clear'/>";
|
||||
echo "</div>";
|
||||
|
||||
//----------------------------------------------------------------------------------------------------------------
|
||||
echo "<div class='bottom'>";
|
||||
|
||||
echo $ende;
|
||||
|
||||
|
||||
?>
|
||||
<a href="javascript:show1()" ><?php echo " <span class='rechtsmen'><img class='bildbot' usemap= 'Mapi' src='bilder/schloss.png' alt='SE'/> </span>";?></a>
|
||||
<?php
|
||||
?>
|
||||
<a href="javascript:show2()" ><?php echo " <span class='rechtsmen'><img class='bildbot' usemap= 'Mapi' src='bilder/rad.png' alt='SE'/> </span>";?></a>
|
||||
<?php
|
||||
|
||||
if ($alarm==0)
|
||||
{
|
||||
echo "<a href='isp.php' ><span class='blue'><img class='rechtsmen' usemap= 'Mapi' src='bilder/isphe30.png' alt='SE'/></span></a>";
|
||||
}else{
|
||||
echo "<a href='isp.php' ><span class='blue'><img class='rechtsmen' usemap= 'Mapi' src='bilder/ispok30.png' alt='SE'/></span></a>";
|
||||
}
|
||||
|
||||
|
||||
echo "<div id='zeigeli1' style='display: none;'>";
|
||||
// echo "<form name= 'senden' method='post' accept-charset='UTF-8' action='$PHP_SELF?i=1'>";
|
||||
echo "<form name= 'senden' method='post' accept-charset='UTF-8' action='se6.php?i=1'>";
|
||||
echo " <span><input type='password' name='Passwort' placeholder='PW Admin'></span>";
|
||||
echo " <span><input type='submit' class = 'loginsende' name='submit' value='ok'></span>";
|
||||
echo "</form>";
|
||||
echo "</div>";
|
||||
|
||||
|
||||
|
||||
echo "<div id='zeigeli2' style='display: none;'>";
|
||||
echo "<form name= 'senden' method='post' accept-charset='UTF-8' action='einstellung.php?i=1'>";
|
||||
echo " <span><input type='password' name='Passwort' placeholder='PW Einstellungen'></span>";
|
||||
echo " <span><input type='submit' class = 'loginsende' name='submit' value='ok'></span>";
|
||||
echo "</form>";
|
||||
echo "</div>";
|
||||
|
||||
echo "Copyright © 2019 | SE-Gebäudeautomation AG | Raiffeisenstraße 17 | 73630 Urbach";
|
||||
echo "</div>";
|
||||
|
||||
|
||||
?>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
||||
@@ -0,0 +1,133 @@
|
||||
<?php
|
||||
session_start();
|
||||
session_destroy();
|
||||
include("verbind.php");
|
||||
error_reporting(0);
|
||||
header("Content-Type: text/html; charset=utf-8");
|
||||
|
||||
|
||||
define("csv_delimeter", ",");
|
||||
$iname= $_GET['inf'];
|
||||
$is= $_GET['is'];
|
||||
$monat= $_GET['mo'];
|
||||
$jahr= $_GET['ja'];
|
||||
// $wl= $_GET['wl'];
|
||||
$abweichung= $_GET['ab'];
|
||||
$anz= $_GET['anz'];
|
||||
$ausw= $_GET['ausw'];
|
||||
$sd= $_GET['sd'];
|
||||
$ed= $_GET['ed'];
|
||||
$st= $_GET['st'];
|
||||
|
||||
|
||||
if (empty($monat)) {$monat = $anz;}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
?>
|
||||
|
||||
|
||||
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<link rel="stylesheet" href="style.css" media="screen">
|
||||
<link rel="stylesheet" href="tigra_calendar/tcal.css" media="screen">
|
||||
<script type="text/javascript"src="dygraph/dygraph.js"></script>
|
||||
<script type="text/javascript"src="Suggest/ajax.js"></script>
|
||||
<script type="text/javascript"src="Suggest/suggest.js"></script>
|
||||
<script type="text/javascript"src="Suggest/jquery.js"></script>
|
||||
<link rel="stylesheet" src="dygraph/dygraph.css" />
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<script type="text/javascript" async>
|
||||
function show(id)
|
||||
{
|
||||
if (document.getElementById(id).style.display=='none')
|
||||
{document.getElementById(id).style.display='block'; }
|
||||
else
|
||||
{ document.getElementById(id).style.display='none'; }
|
||||
}
|
||||
//]]>
|
||||
</script>
|
||||
|
||||
<script type="text/javascript" async>
|
||||
function test() {
|
||||
location.href = 'index.php?op=1';
|
||||
};
|
||||
</script>
|
||||
<script type="text/javascript"src="tigra_calendar/tcal.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
||||
<?php
|
||||
|
||||
|
||||
echo "<div class='topindex'>";
|
||||
echo "<img class='bild' usemap= 'Mapi' src='bilder/logo.png' alt='SE'/>";
|
||||
?>
|
||||
<a href="index.php" ><?php echo " <span class='rechtsmen'><img class='bildbot' usemap= 'Mapi' src='bilder/home.png' alt='SE'/> </span>";?></a>
|
||||
<?php
|
||||
|
||||
echo "<div class='titel'>";
|
||||
echo "<div class='titelfett'>DATENSTATUS der ISP</div>";
|
||||
echo "<br>";
|
||||
echo "$name";
|
||||
echo "<br>";
|
||||
echo "$name2";
|
||||
echo "<br>";
|
||||
echo "$text";
|
||||
echo "</div>";
|
||||
echo "</div>";
|
||||
|
||||
?>
|
||||
|
||||
|
||||
|
||||
<div class="kasten1">
|
||||
</div>
|
||||
|
||||
<div class="kasten2">
|
||||
Letzte Übertragungszeiten des jeweiligen ISP
|
||||
<div class='kasteninnen'>
|
||||
<?php
|
||||
|
||||
|
||||
$sqlu2 = "SELECT ID, db_name, name FROM sestation WHERE name IS NOT NULL ";
|
||||
foreach ($pdo->query($sqlu2) as $row) {
|
||||
$tab2= $row[db_name];
|
||||
$z1= $row[name];
|
||||
$z2= $row[ID];
|
||||
|
||||
|
||||
// echo "id: $z2 ---- Name $z1<br>";
|
||||
|
||||
if (empty($z1)) {}else{
|
||||
$sqlu3 = "SELECT datum FROM $tab2 ORDER BY ID DESC LIMIT 1";
|
||||
foreach ($pdo->query($sqlu3) as $row2) {
|
||||
|
||||
$z3= $row2[datum];
|
||||
$zeit2 = date("d.m.Y - H:i:s",strtotime($z3));
|
||||
|
||||
echo " Der Rechner $tab2 hat am $zeit2 zuletzt geschrieben ( $z1 )<br>";
|
||||
}}
|
||||
}
|
||||
echo "<br>";
|
||||
$datum = date("d.m.Y - H:i:s");
|
||||
echo "Aktuell: ";
|
||||
echo $datum;
|
||||
?>
|
||||
<br class='clear'/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
||||
|
||||
@@ -0,0 +1,389 @@
|
||||
<?php
|
||||
session_start();
|
||||
//session_regenerate_id();
|
||||
include("verbind.php");
|
||||
error_reporting (0);
|
||||
header("Content-Type: text/html; charset=utf-8");
|
||||
|
||||
$bild=1;
|
||||
$ok=0;
|
||||
if ($_POST['submit'] =='speichern') {
|
||||
// if(isset($_POST['submit']) AND $_POST['submit']=='speichern'){
|
||||
$ok=1;
|
||||
$bild = $_POST['bild'];
|
||||
if ($bild==1){$bild=0;}else{$bild=1;}
|
||||
|
||||
|
||||
|
||||
$xname = $_POST['tname'];
|
||||
$xname2 = $_POST['tname2'];
|
||||
$xtext = $_POST['ttext'];
|
||||
|
||||
|
||||
$xsmtp = $_POST['tsmtp'];
|
||||
$xabsender = $_POST['tabsender'];
|
||||
|
||||
|
||||
|
||||
$xsprung = $_POST['tsprung'];
|
||||
$stage = $_POST['stage'];
|
||||
$xalarm = $_POST['alarm'];
|
||||
//$xpwneu = $_POST['pwneu'];
|
||||
$xpwneu5 = md5(trim($_POST['pwneu']));
|
||||
|
||||
$xfarbe = $_POST['farbe'];
|
||||
$xlegende = $_POST['legende'];
|
||||
$xrange = $_POST['range'];
|
||||
|
||||
$setgr = $xfarbe.'-'.$xlegende.'-'.$xrange;
|
||||
|
||||
|
||||
|
||||
|
||||
$sql = "UPDATE
|
||||
sebasis
|
||||
SET
|
||||
name = '$xname',
|
||||
name2 = '$xname2',
|
||||
text = '$xtext',
|
||||
smtp = '$xsmtp',
|
||||
absender= '$setgr',
|
||||
tage = '$stage',
|
||||
sprung='$xsprung',
|
||||
alarm='$xalarm',
|
||||
pw='$xpwneu5'
|
||||
WHERE
|
||||
ID = '1'
|
||||
";
|
||||
// mysql_query($sql) OR die("<pre>\n".$sql."</pre>\n".mysql_error());
|
||||
$pdo->exec($sql);
|
||||
|
||||
|
||||
}
|
||||
|
||||
if(isset($_POST['submit']) AND $_POST['submit']=='ok'){
|
||||
|
||||
if (md5(trim($_POST['Passwort']))=='ec57fddd894f991ff1755ff0db17189f'){
|
||||
$_SESSION['login'] ='true';
|
||||
echo "<meta http-equiv='refresh' content='0; URL=se6.php'>";
|
||||
} else {
|
||||
echo "<meta http-equiv='refresh' content='0; URL=index.php'>";
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
?>
|
||||
<html>
|
||||
<head>
|
||||
<link rel="stylesheet" href="style.css" media="screen">
|
||||
|
||||
<script type="text/javascript"
|
||||
src="dygraph.js"></script>
|
||||
<link rel="stylesheet" src="dygraph.css" />
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<?php
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
$sql = "SELECT name, name2, text, smtp, absender, sprung FROM sebasis";
|
||||
|
||||
//$sql1 = mysql_query($sql) OR die(mysql_error());
|
||||
//while ($erg = mysql_fetch_object($sql1)) {
|
||||
|
||||
|
||||
foreach ($pdo->query($sql) as $row) {
|
||||
$name= $row['name'];
|
||||
$name2= $row['name2'];
|
||||
$text= $row['text'];
|
||||
$smtp= $row['smtp'];
|
||||
$absender= $row['absender'];
|
||||
$sprung= $row['sprung'];
|
||||
$alarm= $row['alarm'];
|
||||
|
||||
$teilung = explode("-", $absender);
|
||||
|
||||
|
||||
$farbe = $teilung[0];
|
||||
$legende = $teilung[1];
|
||||
$range = $teilung[2];
|
||||
|
||||
|
||||
if ($farbe == '2') {$f1='checked'; $f2='';}else{$f2='checked';$f1='';}
|
||||
if ($legende == '2') {$l1='checked'; $l2='';}else{$l2='checked';$l1='';}
|
||||
if ($range == '2') {$r1='checked'; $r2='';}else{$r2='checked';$r1='';}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
echo "<div class='topindex'>";
|
||||
echo "<img class='bild' usemap= 'Mapi' src='bilder/logo.png' alt='SE'/>";
|
||||
?>
|
||||
<a href="index.php" ><?php echo " <span class='rechtsmen'><img class='bildbot' usemap= 'Mapi' src='bilder/home.png' alt='SE'/> </span>";?></a>
|
||||
<?php
|
||||
echo "<div class='titel'>";
|
||||
echo "<div class='titelfett'>Administrative Einstellungen</div>";
|
||||
echo "<br>";
|
||||
echo "$name";
|
||||
echo "<br>";
|
||||
echo "$name2";
|
||||
echo "<br>";
|
||||
echo "$text";
|
||||
echo "</div>";
|
||||
if (($ok==1)and($bild==1)){
|
||||
echo "<img class='bildbot' usemap= 'Mapi' src='bilder/ok.gif' alt='SE'/>";
|
||||
}
|
||||
if (($ok==1)and($bild==0)){
|
||||
echo "<img class='bildbot' usemap= 'Mapi' src='bilder/ok2.gif' alt='SE'/>";
|
||||
}
|
||||
echo "</div>";
|
||||
|
||||
|
||||
if ($_SESSION['login'] !='true')
|
||||
// if ($_SESSION['login'] =='true')
|
||||
{
|
||||
|
||||
echo "<form name= 'senden' method='post' accept-charset='UTF-8' action='$PHP_SELF?i=1'>";
|
||||
|
||||
echo " <span><input type='password' class = 'loginfeldc' name='Passwort'></span>";
|
||||
echo " <span><input type='submit' class = 'loginsende' name='submit' value='ok'></span>";
|
||||
echo "</form>";
|
||||
}else{
|
||||
|
||||
|
||||
|
||||
?>
|
||||
|
||||
<div class="top2">
|
||||
<a href='se6.php'><div class='buttonan'>Primärdaten</div></a>
|
||||
<a href='se6a.php'><div class='button'>Stationen einrichten</div></a>
|
||||
<a href='se6b.php'><div class='button'>Namen, Teiler zuordnen</div></a>
|
||||
<a href='se6c.php'><div class='button'>Einheiten zuordnen</div></a>
|
||||
<a href='se6d.php'><div class='button'>Tabelleinhalte löschen</div></a>
|
||||
<a href='index.php'><div class='button'>Beenden</div></a>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="texteingabe">
|
||||
|
||||
<?php
|
||||
|
||||
$sql = "SELECT name, name2, text, smtp, absender, sprung, tage, alarm FROM sebasis";
|
||||
|
||||
//$sql1 = mysql_query($sql) OR die(mysql_error());
|
||||
//while ($erg = mysql_fetch_object($sql1)) {
|
||||
|
||||
|
||||
foreach ($pdo->query($sql) as $row) {
|
||||
$name= $row['name'];
|
||||
$name2= $row['name2'];
|
||||
$text= $row['text'];
|
||||
$smtp= $row['smtp'];
|
||||
$absender= $row['absender'];
|
||||
$sprung= $row['sprung'];
|
||||
$stage= $row['tage'];
|
||||
$alarm= $row['alarm'];
|
||||
}
|
||||
echo "<form accept-charset='utf-8' action=se6.php method='post'> ";
|
||||
|
||||
echo "<div class='platzieren'>Firmenbez. 1 Zeile: </div><input name='tname' type='text' size='40' maxlength='40' value='$name'> ";
|
||||
echo "<br>";
|
||||
echo "<div class='platzieren'>Firmenbez. 2 Zeile: </div><input name='tname2' type='text' size='40' maxlength='40' value='$name2'> ";
|
||||
echo "<br>";
|
||||
echo "<div class='platzieren'>Firmenbez. 3 Zeile: </div><input name='ttext' type='text' size='40' maxlength='80' value='$text'>
|
||||
<br><br>";
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
echo "<div class='platzieren'>Rücksprungadresse: </div><input name='tsprung' type='text' size='40' maxlength='40' value='$sprung'> <br>";
|
||||
echo "<div class='platzieren'>Min bis Alarm(ISP): </div><input name='alarm' type='text' size='4' maxlength='3' value='$alarm'><br> ";
|
||||
echo "<div class='platzieren'>Tage Graph: </div><input name='stage' type='text' size='4' maxlength='3' value='$stage'><br> ";
|
||||
echo "<div class='platzieren'>Neues PW für Einstellungen: </div><input name='pwneu' type='text' size='20' maxlength='20' ><br> ";
|
||||
|
||||
echo "<div class='platzieren'>Hintergrundfarbe Graph:
|
||||
<input name='farbe' type='radio' value='2' $f1> Weiss<input name='farbe' type='radio' value='1' $f2> Schwarz<br> </div>";
|
||||
|
||||
|
||||
echo "<div class='platzieren'>Legende links oder oben:
|
||||
<input name='legende' type='radio' value='2'$l1> Links <input name='legende' type='radio' value='1' $l2> Oben<br></div>";
|
||||
|
||||
|
||||
echo "<div class='platzieren'>Range Selektor:
|
||||
<input name='range' type='radio' value='2'$r1> Aus <input name='range' type='radio' value='1' $r2> An<br> </div>";
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
echo "<input type='Hidden' name='bild' value=$bild> ";
|
||||
echo "<br><br>";
|
||||
echo "<input type='submit' name='submit' value='speichern'>";
|
||||
echo "</form>";
|
||||
echo "<br><br>";
|
||||
|
||||
echo "</div>";
|
||||
|
||||
|
||||
?>
|
||||
|
||||
<div class="textinfo"><br><br>
|
||||
Wenn im Feld Rücksprungadresse eine IP Adresse steht, taucht im Start-Menü der Ende-Button auf
|
||||
und springt dann auf diese Adresse beim Klick.<br><br>
|
||||
Beim Aufruf der Seite werden die letzten Einträge des ISP geprüft. Ist eine der Zeiten länger als die eingetragenen Minuten
|
||||
bei - Min bis Alarm - wird der grüne Button auf der Startseite rot. Ein Klick auf den Button zeigt Details.<br><br>
|
||||
Die bei - Tage Graph - eingetragenen Tage sind der Standardwert für die Zeit des Graphen im Hauptmenü.<br><br>
|
||||
Die hier gewählten Darstellungsformen sind der Standard beim Anzeigen des Graphen.
|
||||
</div>
|
||||
|
||||
|
||||
<?php
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
/*
|
||||
|
||||
//-------------------------------------------------------------------------------------------
|
||||
?>
|
||||
|
||||
<div class="linkstiefer">
|
||||
|
||||
|
||||
|
||||
<br><br>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="rechtstiefer">
|
||||
|
||||
<?php
|
||||
|
||||
echo "$out";
|
||||
|
||||
|
||||
|
||||
if ($_SESSION['login'] !='true')
|
||||
// if ($_SESSION['login'] =='true')
|
||||
{
|
||||
|
||||
echo "<form name= 'senden' method='post' accept-charset='UTF-8' action='$PHP_SELF?i=1'>";
|
||||
|
||||
echo " <span><input type='password' class = 'loginfeldc' name='Passwort'></span>";
|
||||
echo " <span><input type='submit' class = 'loginsende' name='submit' value='ok'></span>";
|
||||
echo "</form>";
|
||||
}else{
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
$sql = "SELECT name, name2, text, smtp, absender, sprung FROM sebasis";
|
||||
|
||||
//$sql1 = mysql_query($sql) OR die(mysql_error());
|
||||
//while ($erg = mysql_fetch_object($sql1)) {
|
||||
|
||||
|
||||
foreach ($pdo->query($sql) as $row) {
|
||||
$name= $row['name'];
|
||||
$name2= $row['name2'];
|
||||
$text= $row['text'];
|
||||
$smtp= $row['smtp'];
|
||||
$absender= $row['absender'];
|
||||
$sprung= $row['sprung'];
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
echo "<form accept-charset='utf-8' action=se6.php method='post'> ";
|
||||
|
||||
|
||||
echo "Konfiguration & Zuordnung (Version 1.1)<br><br> ";
|
||||
echo "<div class='platzieren'>Firmenbez. 1 Zeile: </div><input name='tname' type='text' size='40' maxlength='40' value='$name'> ";
|
||||
echo "<br>";
|
||||
echo "<div class='platzieren'>Firmenbez. 2 Zeile: </div><input name='tname2' type='text' size='40' maxlength='40' value='$name2'> ";
|
||||
echo "<br>";
|
||||
echo "<div class='platzieren'>Firmenbez. 3 Zeile: </div><input name='ttext' type='text' size='80' maxlength='80' value='$text'>
|
||||
<br><br>";
|
||||
|
||||
|
||||
|
||||
|
||||
echo "Noch nicht benutzbar<br> ";
|
||||
echo "<div class='platzieren'>SMTP Server : </div><input name='tsmtp' type='text' size='40' maxlength='40' value='$smtp'> <br>";
|
||||
echo "<div class='platzieren'>Absendename: </div><input name='tabsender' type='text' size='40' maxlength='40' value='$absender'> <br>";
|
||||
echo "<br><br>";
|
||||
echo "Wenn hier eine IP Adresse steht, taucht im Menü -Beenden- auf und springt dann auf diese Adresse beim Klick<br> ";
|
||||
echo "<div class='platzieren'>Rücksprungadresse: </div><input name='tsprung' type='text' size='40' maxlength='40' value='$sprung'> <br>";
|
||||
|
||||
?>
|
||||
|
||||
|
||||
|
||||
<br><br>
|
||||
|
||||
|
||||
|
||||
|
||||
<input type='submit' name='submit' value='speichern'>
|
||||
|
||||
</form>
|
||||
|
||||
|
||||
<br><br>
|
||||
|
||||
</div>
|
||||
|
||||
<?php
|
||||
}
|
||||
|
||||
*/
|
||||
|
||||
?>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
||||
@@ -0,0 +1,255 @@
|
||||
<?php
|
||||
session_start();
|
||||
//session_regenerate_id();
|
||||
include("verbind.php");
|
||||
error_reporting (0);
|
||||
header("Content-Type: text/html; charset=utf-8");
|
||||
|
||||
|
||||
if ($_SESSION['login'] !='true')
|
||||
{
|
||||
|
||||
echo "<form name= 'senden' method='post' accept-charset='UTF-8' action='$PHP_SELF?i=1'>";
|
||||
|
||||
echo " <span><input type='password' class = 'loginfeldc' name='Passwort'></span>";
|
||||
echo " <span><input type='submit' class = 'loginsende' name='submit' value='ok'></span>";
|
||||
echo "</form>";
|
||||
}else{
|
||||
|
||||
|
||||
//--------------------------------------------Speichern------------------------------------------------
|
||||
|
||||
|
||||
|
||||
if(isset($_POST['submit']) AND $_POST['submit']=='ok'){
|
||||
|
||||
if (md5(trim($_POST['Passwort']))=='ec57fddd894f991ff1755ff0db17189f'){
|
||||
$_SESSION['login'] ='true';
|
||||
echo "<meta http-equiv='refresh' content='0; URL=se6.php'>";
|
||||
}
|
||||
|
||||
}
|
||||
$bild=1;
|
||||
$ok=0;
|
||||
if ($_POST['submit'] =='speichern') {
|
||||
$ok=1;
|
||||
$bild = $_POST['bild'];
|
||||
if ($bild==1){$bild=0;}else{$bild=1;}
|
||||
|
||||
|
||||
|
||||
$xname1 = $_POST['name1'];
|
||||
$xname2 = $_POST['name2'];
|
||||
$xname3 = $_POST['name3'];
|
||||
$xname4 = $_POST['name4'];
|
||||
$xname5 = $_POST['name5'];
|
||||
$xname6 = $_POST['name6'];
|
||||
$xname7 = $_POST['name7'];
|
||||
$xname8 = $_POST['name8'];
|
||||
$xname9 = $_POST['name9'];
|
||||
$xname10 = $_POST['name10'];
|
||||
$xname11 = $_POST['name11'];
|
||||
$xname12 = $_POST['name12'];
|
||||
$xname13 = $_POST['name13'];
|
||||
$xname14 = $_POST['name14'];
|
||||
$xname15 = $_POST['name15'];
|
||||
$xname16 = $_POST['name16'];
|
||||
$xname17 = $_POST['name17'];
|
||||
$xname18 = $_POST['name18'];
|
||||
$xname19 = $_POST['name19'];
|
||||
$xname20 = $_POST['name20'];
|
||||
|
||||
$xdbname1 = $_POST['dbname1'];
|
||||
$xdbname2 = $_POST['dbname2'];
|
||||
$xdbname3 = $_POST['dbname3'];
|
||||
$xdbname4 = $_POST['dbname4'];
|
||||
$xdbname5 = $_POST['dbname5'];
|
||||
$xdbname6 = $_POST['dbname6'];
|
||||
$xdbname7 = $_POST['dbname7'];
|
||||
$xdbname8 = $_POST['dbname8'];
|
||||
$xdbname9 = $_POST['dbname9'];
|
||||
$xdbname10 = $_POST['dbname10'];
|
||||
$xdbname11 = $_POST['dbname11'];
|
||||
$xdbname12 = $_POST['dbname12'];
|
||||
$xdbname13 = $_POST['dbname13'];
|
||||
$xdbname14 = $_POST['dbname14'];
|
||||
$xdbname15 = $_POST['dbname15'];
|
||||
$xdbname16 = $_POST['dbname16'];
|
||||
$xdbname17 = $_POST['dbname17'];
|
||||
$xdbname18 = $_POST['dbname18'];
|
||||
$xdbname19 = $_POST['dbname19'];
|
||||
$xdbname20 = $_POST['dbname20'];
|
||||
|
||||
$sql = "UPDATE sestation SET name= '$xname1', db_name = '$xdbname1' WHERE id='1' "; $affected = $pdo->exec($sql);
|
||||
$sql = "UPDATE sestation SET name= '$xname2', db_name = '$xdbname2' WHERE id='2' "; $affected = $pdo->exec($sql);
|
||||
$sql = "UPDATE sestation SET name= '$xname3', db_name = '$xdbname3' WHERE id='3' "; $affected = $pdo->exec($sql);
|
||||
$sql = "UPDATE sestation SET name= '$xname4', db_name = '$xdbname4' WHERE id='4' "; $affected = $pdo->exec($sql);
|
||||
$sql = "UPDATE sestation SET name= '$xname5', db_name = '$xdbname5' WHERE id='5' "; $affected = $pdo->exec($sql);
|
||||
$sql = "UPDATE sestation SET name= '$xname6', db_name = '$xdbname6' WHERE id='6' "; $affected = $pdo->exec($sql);
|
||||
$sql = "UPDATE sestation SET name= '$xname7', db_name = '$xdbname7' WHERE id='7' "; $affected = $pdo->exec($sql);
|
||||
$sql = "UPDATE sestation SET name= '$xname8', db_name = '$xdbname8' WHERE id='8' "; $affected = $pdo->exec($sql);
|
||||
$sql = "UPDATE sestation SET name= '$xname9', db_name = '$xdbname9' WHERE id='9' "; $affected = $pdo->exec($sql);
|
||||
$sql = "UPDATE sestation SET name= '$xname10', db_name = '$xdbname10' WHERE id='10' "; $affected = $pdo->exec($sql);
|
||||
$sql = "UPDATE sestation SET name= '$xname11', db_name = '$xdbname11' WHERE id='11' "; $affected = $pdo->exec($sql);
|
||||
$sql = "UPDATE sestation SET name= '$xname12', db_name = '$xdbname12' WHERE id='12' "; $affected = $pdo->exec($sql);
|
||||
$sql = "UPDATE sestation SET name= '$xname13', db_name = '$xdbname13' WHERE id='13' "; $affected = $pdo->exec($sql);
|
||||
$sql = "UPDATE sestation SET name= '$xname14', db_name = '$xdbname14' WHERE id='14' "; $affected = $pdo->exec($sql);
|
||||
$sql = "UPDATE sestation SET name= '$xname15', db_name = '$xdbname15' WHERE id='15' "; $affected = $pdo->exec($sql);
|
||||
$sql = "UPDATE sestation SET name= '$xname16', db_name = '$xdbname16' WHERE id='16' "; $affected = $pdo->exec($sql);
|
||||
$sql = "UPDATE sestation SET name= '$xname17', db_name = '$xdbname17' WHERE id='17' "; $affected = $pdo->exec($sql);
|
||||
$sql = "UPDATE sestation SET name= '$xname18', db_name = '$xdbname18' WHERE id='18' "; $affected = $pdo->exec($sql);
|
||||
$sql = "UPDATE sestation SET name= '$xname19', db_name = '$xdbname19' WHERE id='19' "; $affected = $pdo->exec($sql);
|
||||
$sql = "UPDATE sestation SET name= '$xname20', db_name = '$xdbname20' WHERE id='20' "; $affected = $pdo->exec($sql);
|
||||
|
||||
|
||||
$sqlx = "SELECT name, ID, db_name FROM sestation WHERE db_name !='' ORDER BY ID";
|
||||
foreach ($pdo->query($sqlx) as $row) {
|
||||
$tabellebauen= $erg->db_name;
|
||||
}
|
||||
}
|
||||
//-----------------------------------------------------------------------------------------------
|
||||
?>
|
||||
<html>
|
||||
<head>
|
||||
<link rel="stylesheet" href="style.css" media="screen">
|
||||
|
||||
<script type="text/javascript"
|
||||
src="dygraph.js"></script>
|
||||
<link rel="stylesheet" src="dygraph.css" />
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<?php
|
||||
$sql = "SELECT name, name2, text, smtp, absender, sprung FROM sebasis";
|
||||
|
||||
|
||||
foreach ($pdo->query($sql) as $row) {
|
||||
//$sql1 = mysql_query($sql) OR die(mysql_error());
|
||||
//while ($erg = mysql_fetch_object($sql1)) {
|
||||
|
||||
$name= $row['name'];
|
||||
$name2= $row['name2'];
|
||||
$text= $row['text'];
|
||||
$smtp= $row['smtp'];
|
||||
$absender= $row['absender'];
|
||||
$sprung= $row['sprung'];
|
||||
}
|
||||
|
||||
|
||||
|
||||
echo "<div class='topindex'>";
|
||||
echo "<img class='bild' usemap= 'Mapi' src='bilder/logo.png' alt='SE'/>";
|
||||
?>
|
||||
<a href="index.php" ><?php echo " <span class='rechtsmen'><img class='bildbot' usemap= 'Mapi' src='bilder/home.png' alt='SE'/> </span>";?></a>
|
||||
<?php
|
||||
|
||||
echo "<div class='titel'>";
|
||||
echo "<div class='titelfett'>Administrative Einstellungen</div>";
|
||||
echo "<br>";
|
||||
echo "$name";
|
||||
echo "<br>";
|
||||
echo "$name2";
|
||||
echo "<br>";
|
||||
echo "$text";
|
||||
echo "</div>";
|
||||
if (($ok==1)and($bild==1)){
|
||||
echo "<img class='bildbot' usemap= 'Mapi' src='bilder/ok.gif' alt='SE'/>";
|
||||
}
|
||||
if (($ok==1)and($bild==0)){
|
||||
echo "<img class='bildbot' usemap= 'Mapi' src='bilder/ok2.gif' alt='SE'/>";
|
||||
}
|
||||
|
||||
echo "</div>";
|
||||
?>
|
||||
|
||||
<div class="top2">
|
||||
<a href='se6.php'><div class='button'>Primärdaten</div></a>
|
||||
<a href='se6a.php'><div class='buttonan'>Stationen einrichten</div></a>
|
||||
<a href='se6b.php'><div class='button'>Namen, Teiler zuordnen</div></a>
|
||||
<a href='se6c.php'><div class='button'>Einheiten zuordnen</div></a>
|
||||
<a href='se6d.php'><div class='button'>Tabelleinhalte löschen</div></a>
|
||||
<a href='index.php'><div class='button'>Beenden</div></a>
|
||||
</div>
|
||||
<br class='clear'/>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="texteingabe">
|
||||
Verknüpfung Tabelle mit selbst erzeugtem Menüname <br><br>
|
||||
<?php
|
||||
|
||||
|
||||
echo "<div class='kasteninnen'>";
|
||||
|
||||
|
||||
$sql = "SELECT name, ID, db_name, nummer FROM sestation ORDER BY ID";
|
||||
echo "<form accept-charset='utf-8' action=se6a.php method='post'> ";
|
||||
echo "<div class= 'speicherbut3'><input type='submit' name='submit' value='speichern'></div>";
|
||||
|
||||
echo "<table>";
|
||||
echo "<tr>";
|
||||
echo "
|
||||
<td> </td> <td> Name im Menü</td>
|
||||
<td> Echter Tabellenname</td>";
|
||||
echo "</tr>";
|
||||
|
||||
|
||||
foreach ($pdo->query($sql) as $row) {
|
||||
echo "<tr>";
|
||||
echo "
|
||||
<td> ID=$row[ID] </td> <td> <input name='name$row[ID]' type='text' size='20' maxlength='20' value='$row[name]'></td>
|
||||
<td><input name='dbname$row[ID]' type='text' size='20' maxlength='20' value='$row[db_name]'></td>";
|
||||
|
||||
echo "</tr>";
|
||||
|
||||
}
|
||||
|
||||
echo "</table>";
|
||||
echo "<input type='Hidden' name='bild' value=$bild> ";
|
||||
|
||||
?>
|
||||
|
||||
<br>
|
||||
<input type='submit' name='submit' value='speichern'>
|
||||
</form>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="textinfo"><br><br>
|
||||
Es gibt 20 feste Plätze die im Menü ausgewählt werden können
|
||||
(ID 1- ID 20).
|
||||
<br><br>
|
||||
Jedem dieser Plätze kann ein Menüname und ein Tabellenname zugeordnet werden.
|
||||
Ein Platz entspricht also einer DDC
|
||||
<br><br>
|
||||
Das Menü zeigt nur die Plätze an, in denen ein Menüname steht. Der Menüname darf Leerzeichen, ä,ü etc. enthalten.<br>
|
||||
Der Menüname darf auch nachträglich noch geändert werden.<br>
|
||||
Der Tabellenname ist der echte Name der Datenbanktabelle, also gleich wie bei der WAGO. Den nicht ändern
|
||||
<br><br>
|
||||
Wenn die Tabelle nicht existiert, wird sie beim Speichern erstellt und kann unter dem benutzten Namen von der WAGO befüllt werden.<br>
|
||||
10 Tabellen sind schon erstellt und können auch so bleiben.(Müssen nicht gelöscht werden)<br>
|
||||
Wir haben uns auf fortlaufende isp01, isp02.. beim Tabellenname geeinigt. Der Menüname ist frei vergebbar.<br>
|
||||
DDC 1 und Heizung stehen nur als mögliche Muster da.
|
||||
<br><br>
|
||||
Info:<br>Daten für die Wago.<br>User: wago<br>PW:3112<br>DB: wago <br>ISP: isp01 oder isp02...<br><br><br>.
|
||||
</div>
|
||||
|
||||
|
||||
<?php
|
||||
|
||||
}
|
||||
|
||||
echo "</body>";
|
||||
|
||||
?>
|
||||
</html>
|
||||
|
||||
|
||||
@@ -0,0 +1,349 @@
|
||||
<?php
|
||||
session_start();
|
||||
//session_regenerate_id();
|
||||
include("verbind.php");
|
||||
error_reporting (0);
|
||||
header("Content-Type: text/html; charset=utf-8");
|
||||
|
||||
$is= $_GET['is'];
|
||||
|
||||
$zeilenwert=1;
|
||||
|
||||
if (empty($is)) {$is=1;}
|
||||
|
||||
if(isset($_POST['submit']) AND $_POST['submit']=='ok'){
|
||||
|
||||
if (md5(trim($_POST['Passwort']))=='ec57fddd894f991ff1755ff0db17189f'){
|
||||
$_SESSION['login'] ='true';
|
||||
echo "<meta http-equiv='refresh' content='0; URL=se6.php'>";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
if ($_SESSION['login'] !='true')
|
||||
// if ($_SESSION['login'] =='true')
|
||||
{
|
||||
|
||||
echo "<form name= 'senden' method='post' accept-charset='UTF-8' action='$PHP_SELF?i=1'>";
|
||||
|
||||
echo " <span><input type='password' class = 'loginfeldc' name='Passwort'></span>";
|
||||
echo " <span><input type='submit' class = 'loginsende' name='submit' value='ok'></span>";
|
||||
echo "</form>";
|
||||
}else{
|
||||
|
||||
|
||||
|
||||
//---------------------------------------------------Name und Teiler------------------------
|
||||
$bild=1;
|
||||
$ok=0;
|
||||
if ($_POST['submit'] =='speichern') {
|
||||
$ok=1;
|
||||
$bild = $_POST['bild'];
|
||||
if ($bild==1){$bild=0;}else{$bild=1;}
|
||||
|
||||
$stmt = $pdo->prepare("UPDATE seliste SET
|
||||
teiler = :teil,
|
||||
klar = :klar,
|
||||
digital = :digi
|
||||
WHERE
|
||||
ID = :ind");
|
||||
$stmt->bindParam(':teil', $teil);
|
||||
$stmt->bindParam(':klar', $klar);
|
||||
$stmt->bindParam(':ind', $ind);
|
||||
$stmt->bindParam(':digi', $digi);
|
||||
|
||||
|
||||
foreach ($_POST['name'] as $item) {
|
||||
$klar= $item['nam'];
|
||||
$teil = $item['teil'];
|
||||
$digi = $item['digital'];
|
||||
$ind = $item['id'];
|
||||
if ($teil==0){$teil=2.22;}
|
||||
if (empty($teil)) {$teil=1;}
|
||||
$stmt->execute();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/*
|
||||
foreach ($_POST['name'] as $item) {
|
||||
$klar= $item['nam'];
|
||||
$teil = $item['teil'];
|
||||
$digi = $item['digital'];
|
||||
$ind = $item['id'];
|
||||
echo "$klar - $ind <br>";
|
||||
}
|
||||
*/
|
||||
|
||||
|
||||
//---------------------------------------------------------------------------------------------------
|
||||
|
||||
if ($_POST['auswahl2'] =='oki') {
|
||||
|
||||
$zeilenwert = $_POST['zeilenwert'];
|
||||
|
||||
|
||||
$ok=1;
|
||||
$bild = $_POST['bild'];
|
||||
if ($bild==1){$bild=0;}else{$bild=1;}
|
||||
|
||||
|
||||
$zeile = explode("\n", trim($_POST['textliste']));
|
||||
$vaz=0;
|
||||
$zv=$zeilenwert;
|
||||
$stmt = $pdo->prepare("UPDATE seliste SET
|
||||
klar = :klar
|
||||
WHERE
|
||||
isp = :is
|
||||
AND kurz = :we ");
|
||||
|
||||
$stmt->bindParam(':klar', $klar);
|
||||
$stmt->bindParam(':is', $is);
|
||||
$stmt->bindParam(':we', $we);
|
||||
|
||||
foreach ($zeile as $item) {
|
||||
$klar= $zeile[$vaz];
|
||||
$stmt->bindParam(':klar', $klar);
|
||||
$we= 'Wert'.$zv;
|
||||
$stmt->execute();
|
||||
$zv++;
|
||||
$vaz++;
|
||||
}
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------
|
||||
?>
|
||||
<html>
|
||||
<head>
|
||||
|
||||
<link rel="stylesheet" href="style.css" media="screen">
|
||||
<link rel="stylesheet" href="kalender/tcal.css" media="screen">
|
||||
<script type="text/javascript" async src="Suggest/ajax.js"></script>
|
||||
<script type="text/javascript" async src="Suggest/suggest.js"></script>
|
||||
<script type="text/javascript" src="Suggest/jquery.js"></script>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
|
||||
|
||||
<script type="text/javascript" async>
|
||||
function show(id)
|
||||
{
|
||||
if (document.getElementById(id).style.display=='none')
|
||||
{document.getElementById(id).style.display='block'; }
|
||||
else
|
||||
{ document.getElementById(id).style.display='none'; }
|
||||
}
|
||||
//]]>
|
||||
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<?php
|
||||
|
||||
|
||||
$sql = "SELECT name, name2, text, smtp, absender, sprung FROM sebasis";
|
||||
|
||||
|
||||
foreach ($pdo->query($sql) as $row) {
|
||||
//$sql1 = mysql_query($sql) OR die(mysql_error());
|
||||
//while ($erg = mysql_fetch_object($sql1)) {
|
||||
|
||||
$name= $row['name'];
|
||||
$name2= $row['name2'];
|
||||
$text= $row['text'];
|
||||
$smtp= $row['smtp'];
|
||||
$absender= $row['absender'];
|
||||
$sprung= $row['sprung'];
|
||||
}
|
||||
|
||||
|
||||
echo "<div class='topindex'>";
|
||||
echo "<img class='bild' usemap= 'Mapi' src='bilder/logo.png' alt='SE'/>";
|
||||
?>
|
||||
<a href="index.php" ><?php echo " <span class='rechtsmen'><img class='bildbot' usemap= 'Mapi' src='bilder/home.png' alt='SE'/> </span>";?></a>
|
||||
<?php
|
||||
|
||||
echo "<div class='titel'>";
|
||||
echo "<div class='titelfett'>Administrative Einstellungen</div>";
|
||||
echo "<br>";
|
||||
echo "$name";
|
||||
echo "<br>";
|
||||
echo "$name2";
|
||||
echo "<br>";
|
||||
echo "$text";
|
||||
echo "</div>";
|
||||
if (($ok==1)and($bild==1)){
|
||||
echo "<img class='bildbot' usemap= 'Mapi' src='bilder/ok.gif' alt='SE'/>";
|
||||
}
|
||||
if (($ok==1)and($bild==0)){
|
||||
echo "<img class='bildbot' usemap= 'Mapi' src='bilder/ok2.gif' alt='SE'/>";
|
||||
}
|
||||
echo "</div>";
|
||||
|
||||
?>
|
||||
|
||||
<div class="top2">
|
||||
<a href='se6.php'><div class='button'>Primärdaten</div></a>
|
||||
<a href='se6a.php'><div class='button'>Stationen einrichten</div></a>
|
||||
<a href='se6b.php'><div class='buttonan'>Namen, Teiler zuordnen</div></a>
|
||||
<a href='se6c.php'><div class='button'>Einheiten zuordnen</div></a>
|
||||
<a href='se6d.php'><div class='button'>Tabelleinhalte löschen</div></a>
|
||||
<a href='index.php'><div class='button'>Beenden</div></a>
|
||||
</div>
|
||||
<br class='clear'/>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="kasten1">
|
||||
<?php
|
||||
|
||||
echo "<div class='button6b'> ";
|
||||
echo "<select class= 'isp' size='1' name='jumpit' onchange='document.location.href=this.value'> ";
|
||||
|
||||
|
||||
$sql = "SELECT name, db_name, ID FROM sestation WHERE name !='' ORDER BY ID ";
|
||||
|
||||
foreach ($pdo->query($sql) as $row) {
|
||||
//gib den Eintrag aus der DB aus
|
||||
if ( $is==$row[ID]) {$markiert= 'selected'; $wahl= $row[db_name];} else {$markiert='';}
|
||||
echo "<option value='se6b.php?is=$row[ID]' $markiert>$row[name]</option> ";
|
||||
|
||||
}
|
||||
echo "</select></div>";
|
||||
?>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
<?php
|
||||
|
||||
echo "<div class='kasten2'>";
|
||||
echo "Benamung, Anpassung der Zahlenwerte und Analog/Digital - Unterscheidung<br><br>";
|
||||
echo "<div class='kasteninnen'>";
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
echo "<form accept-charset='utf-8' action=se6b.php?is=$is method='post'> ";
|
||||
echo "<div class= 'speicherbut4'><input type='submit' name='submit' value='speichern'></div>";
|
||||
$sql = "SELECT kurz, klar, einheit, teiler, digital, ID FROM seliste
|
||||
WHERE isp ='$is'
|
||||
ORDER BY ID
|
||||
";
|
||||
// <input type='checkbox' name='name[$up]['einheit']' value='$row[einheit]'>$row[einheit]
|
||||
$up='1';
|
||||
|
||||
echo "<table>";
|
||||
|
||||
|
||||
foreach ($pdo->query($sql) as $row) {
|
||||
if ($row[digital]=='1') {$digistatus='checked';} else {$digistatus='';}
|
||||
|
||||
|
||||
echo "<tr>";
|
||||
|
||||
echo "<td>$row[kurz]=</td>
|
||||
<td><input name='name[$up][nam]' type='text' size='33' maxlength='32' value='$row[klar]'> </td>
|
||||
<td>Teiler =</td>
|
||||
<td><input name='name[$up][teil]' type='text' size='5' maxlength='5' value='$row[teiler]'></td>
|
||||
<td><input type='checkbox' name='name[$up][digital]' value='1' $digistatus >digital</td>";
|
||||
|
||||
echo "</tr>";
|
||||
|
||||
echo " <input type='Hidden' name='name[$up][id]' value=$row[ID]> ";
|
||||
|
||||
$up++;
|
||||
}
|
||||
|
||||
echo "</table>";
|
||||
echo "<input type='Hidden' name='bild' value=$bild> ";
|
||||
|
||||
echo "<input type='submit' name='submit' value='speichern'>";
|
||||
|
||||
|
||||
echo "</form>";
|
||||
|
||||
echo "</div>";
|
||||
echo "</div>";
|
||||
|
||||
|
||||
|
||||
echo "<div class='texteingabe6b'>";
|
||||
echo "Textlisten einfügen<br><br>";
|
||||
echo "<div class='kasteninnen'>";
|
||||
|
||||
echo "<form accept-charset='utf-8' action='se6b.php?is=$is' method='post'> ";
|
||||
echo "Paste & Copy oder Drag & Drop";
|
||||
echo "<div class='zeiteingabe2'>";
|
||||
//echo "<input name='aname' type='text' size='25' maxlength='25' placeholder ='Name der Auswahl'required> ";
|
||||
echo "<textarea name='textliste' id='myText3' style='width:91%;height:400px' onkeyup='countChars2()'
|
||||
placeholder ='Muster:
|
||||
Ablufttemperatur
|
||||
Fortlufttemperatur
|
||||
AU Kanaltemperatur
|
||||
|
||||
|
||||
Damit das schneller geht, kann eine Liste
|
||||
per Paste & Copy in die Datenbank geschrieben werden.
|
||||
Auch leere Zeilen sind möglich.
|
||||
Die erste Zeile wird Wert1 zugeordnet, die zweite Zeile Wert2....
|
||||
Es werden nur die Zeilen geschrieben die vorhanden sind.
|
||||
Also eine 5 zeilige Liste ändert nur die ersten 5 Werte.
|
||||
|
||||
|
||||
Das gilt dann für die links gewählte ISP und ist nach dem Klick auf eintragen nicht rückgängig zu machen.
|
||||
|
||||
Den Text hier einfügen oder hierher droppen.
|
||||
|
||||
|
||||
...' maxlength='1001'></textarea>";
|
||||
echo "</div>";
|
||||
echo "<div class='eintrag'>";
|
||||
echo "<input type='Hidden' name='bild' value=$bild> ";
|
||||
echo "<input type='Hidden' name='auswahl2' value='oki'>";
|
||||
|
||||
|
||||
echo "<div class='platzieren'>Ab Zeile (Wert): </div><input name='zeilenwert' type='text' size='4' maxlength='3' value='$zeilenwert'> <br>";
|
||||
echo "<input type='submit' name'awahl' value='eintragen'>";
|
||||
echo "</div>";
|
||||
echo "</form>";
|
||||
|
||||
?>
|
||||
|
||||
|
||||
<div ><br><br>
|
||||
Alle Datenpunkte werden von der Wago als Wert1..Wert200 in die jeweilige Tabelle geschrieben.
|
||||
Hier wird dem Wert1...Wert200 eine sinnvolle Bezeichnung zugeordnet. <br>
|
||||
Zudem kann der absolute Zahlenwert durch den Teiler verändert werden.<br><br>
|
||||
Bei digitalen Werten wird der Teiler ignoriert.
|
||||
<br><br>
|
||||
Als Standard ist Teiler=1 und digital=0 <br>(Also analoge Werte) eingetragen<br><br>
|
||||
Zwischenspeichern wird empfohlen.<br><br>
|
||||
Kommastellen als Punkt angeben!<br>
|
||||
Bsp. Anzeige soll in % erfolgen, Maximalwert der Zahlen ist 6580.<br>
|
||||
Eingabe bei Teiler: 65.8
|
||||
</div>
|
||||
|
||||
<?php
|
||||
|
||||
echo "</div>";
|
||||
echo "</div>";
|
||||
|
||||
|
||||
|
||||
//-------------------------------------------------------------------------------------------------
|
||||
|
||||
}
|
||||
?>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
||||
@@ -0,0 +1,334 @@
|
||||
<?php
|
||||
session_start();
|
||||
//session_regenerate_id();
|
||||
include("verbind.php");
|
||||
error_reporting (0);
|
||||
header("Content-Type: text/html; charset=utf-8");
|
||||
|
||||
$is= $_GET['is'];
|
||||
|
||||
|
||||
|
||||
if (empty($is)) {$is=1;}
|
||||
|
||||
if(isset($_POST['submit']) AND $_POST['submit']=='ok'){
|
||||
|
||||
if (md5(trim($_POST['Passwort']))=='ec57fddd894f991ff1755ff0db17189f'){
|
||||
$_SESSION['login'] ='true';
|
||||
echo "<meta http-equiv='refresh' content='0; URL=se6.php'>";
|
||||
}
|
||||
|
||||
}
|
||||
//---------------------------------------------------Einheit-----------------------------
|
||||
$bild=1;
|
||||
$ok=0;
|
||||
if ($_POST['submit'] =='ändern') {
|
||||
$ok=1;
|
||||
$bild = $_POST['bild'];
|
||||
if ($bild==1){$bild=0;}else{$bild=1;}
|
||||
|
||||
|
||||
|
||||
|
||||
$inhalt=$_POST['einheitt'];
|
||||
$stmt = $pdo->prepare("UPDATE seliste SET
|
||||
einheit = :einh
|
||||
WHERE
|
||||
ID = :ind ");
|
||||
$stmt->bindParam(':einh', $einh);
|
||||
$stmt->bindParam(':ind', $inde);
|
||||
|
||||
foreach ($_POST['check'] as $item1) {
|
||||
$einh= $item1['einheit'];
|
||||
$inde= $item1['id'];
|
||||
$schau= $item1['check']['einheit'];
|
||||
if (!empty($einh)) {$einh= $inhalt; $stmt->execute();}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//---------------------------------------------------Name und Teiler------------------------
|
||||
/*
|
||||
if ($_POST['submit'] =='speichern') {
|
||||
|
||||
$stmt = $pdo->prepare("UPDATE seliste SET
|
||||
teiler = :teil,
|
||||
klar = :klar
|
||||
WHERE
|
||||
ID = :ind");
|
||||
$stmt->bindParam(':teil', $teil);
|
||||
$stmt->bindParam(':klar', $klar);
|
||||
$stmt->bindParam(':ind', $ind);
|
||||
|
||||
foreach ($_POST['name'] as $item) {
|
||||
$klar= $item['nam'];
|
||||
$teil = $item['teil'];
|
||||
if ($teil==0){$teil=2.22;}
|
||||
$ind = $item['id'];
|
||||
|
||||
if (empty($teil)) {$teil=1;}
|
||||
$stmt->execute();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
*/
|
||||
//---------------------------------------------------------------------------------------------------
|
||||
if ($_POST['auswahl'] =='ok') {
|
||||
$ok=1;
|
||||
$bild = $_POST['bild'];
|
||||
if ($bild==1){$bild=0;}else{$bild=1;}
|
||||
//$zeile = explode("\n", trim($_POST['textliste']));
|
||||
|
||||
$zeile = explode("\n", trim($_POST['textliste']));
|
||||
|
||||
// $zeile = rawurlencode($zeile);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
$vaz=0;
|
||||
$zv=1;
|
||||
$stmt = $pdo->prepare("UPDATE seliste SET
|
||||
klar = :klar
|
||||
WHERE
|
||||
isp = :is
|
||||
AND kurz = :we ");
|
||||
|
||||
$stmt->bindParam(':klar', $klar);
|
||||
$stmt->bindParam(':is', $is);
|
||||
$stmt->bindParam(':we', $we);
|
||||
|
||||
foreach ($zeile as $item) {
|
||||
$klar= $zeile[$vaz];
|
||||
$stmt->bindParam(':klar', $klar);
|
||||
$we= 'Wert'.$zv;
|
||||
$stmt->execute();
|
||||
$zv++;
|
||||
$vaz++;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------
|
||||
?>
|
||||
<html>
|
||||
<head>
|
||||
|
||||
|
||||
<link rel="stylesheet" href="style.css" media="screen">
|
||||
<link rel="stylesheet" href="kalender/tcal.css" media="screen">
|
||||
<script type="text/javascript" async src="Suggest/ajax.js"></script>
|
||||
<script type="text/javascript" async src="Suggest/suggest.js"></script>
|
||||
<script type="text/javascript" src="Suggest/jquery.js"></script>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<script type="text/javascript" async>
|
||||
function show(id)
|
||||
{
|
||||
if (document.getElementById(id).style.display=='none')
|
||||
{document.getElementById(id).style.display='block'; }
|
||||
else
|
||||
{ document.getElementById(id).style.display='none'; }
|
||||
}
|
||||
//]]>
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<?php
|
||||
|
||||
|
||||
|
||||
|
||||
$sql = "SELECT name, name2, text, smtp, absender, sprung FROM sebasis";
|
||||
|
||||
|
||||
foreach ($pdo->query($sql) as $row) {
|
||||
//$sql1 = mysql_query($sql) OR die(mysql_error());
|
||||
//while ($erg = mysql_fetch_object($sql1)) {
|
||||
|
||||
$name= $row['name'];
|
||||
$name2= $row['name2'];
|
||||
$text= $row['text'];
|
||||
$smtp= $row['smtp'];
|
||||
$absender= $row['absender'];
|
||||
$sprung= $row['sprung'];
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
echo "<div class='topindex'>";
|
||||
echo "<img class='bild' usemap= 'Mapi' src='bilder/logo.png' alt='SE'/>";
|
||||
?>
|
||||
<a href="index.php" ><?php echo " <span class='rechtsmen'><img class='bildbot' usemap= 'Mapi' src='bilder/home.png' alt='SE'/> </span>";?></a>
|
||||
<?php
|
||||
echo "<div class='titel'>";
|
||||
echo "<div class='titelfett'>Administrative Einstellungen</div>";
|
||||
echo "<br>";
|
||||
echo "$name";
|
||||
echo "<br>";
|
||||
echo "$name2";
|
||||
echo "<br>";
|
||||
echo "$text";
|
||||
echo "</div>";
|
||||
if (($ok==1)and($bild==1)){
|
||||
echo "<img class='bildbot' usemap= 'Mapi' src='bilder/ok.gif' alt='SE'/>";
|
||||
}
|
||||
if (($ok==1)and($bild==0)){
|
||||
echo "<img class='bildbot' usemap= 'Mapi' src='bilder/ok2.gif' alt='SE'/>";
|
||||
}
|
||||
echo "</div>";
|
||||
|
||||
?>
|
||||
<div class="top2">
|
||||
<a href='se6.php'><div class='button'>Primärdaten</div></a>
|
||||
<a href='se6a.php'><div class='button'>Stationen einrichten</div></a>
|
||||
<a href='se6b.php'><div class='button'>Namen, Teiler zuordnen</div></a>
|
||||
<a href='se6c.php'><div class='buttonan'>Einheiten zuordnen</div></a>
|
||||
<a href='se6d.php'><div class='button'>Tabelleinhalte löschen</div></a>
|
||||
<a href='index.php'><div class='button'>Beenden</div></a>
|
||||
</div>
|
||||
<br class='clear'/>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<?php
|
||||
|
||||
//echo "$out";
|
||||
|
||||
|
||||
|
||||
if ($_SESSION['login'] !='true')
|
||||
// if ($_SESSION['login'] =='true')
|
||||
{
|
||||
|
||||
echo "<form name= 'senden' method='post' accept-charset='UTF-8' action='$PHP_SELF?i=1'>";
|
||||
|
||||
echo " <span><input type='password' class = 'loginfeldc' name='Passwort'></span>";
|
||||
echo " <span><input type='submit' class = 'loginsende' name='submit' value='ok'></span>";
|
||||
echo "</form>";
|
||||
}else{
|
||||
?>
|
||||
|
||||
|
||||
|
||||
<div class="kasten1">
|
||||
|
||||
<?php
|
||||
|
||||
echo "<div class='button6b'> ";
|
||||
echo "<select class= 'isp' size='1' name='jumpit' onchange='document.location.href=this.value'> ";
|
||||
|
||||
$sql = "SELECT name, db_name, ID FROM sestation WHERE name !='' ORDER BY ID ";
|
||||
|
||||
foreach ($pdo->query($sql) as $row) {
|
||||
//gib den Eintrag aus der DB aus
|
||||
if ( $is==$row[ID]) {$markiert= 'selected'; $wahl= $row[db_name];} else {$markiert='';}
|
||||
echo "<option value='se6c.php?is=$row[ID]' $markiert>$row[name]</option> ";
|
||||
|
||||
}
|
||||
|
||||
echo "</select></div>";
|
||||
|
||||
?>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<?php
|
||||
|
||||
echo "<div class='kasten2'>";
|
||||
echo "Einheiten zuordnen<br><br>";
|
||||
echo "<div class='kasteninnen'>";
|
||||
|
||||
echo "<form accept-charset='utf-8' action=se6c.php?is=$is method='post'> ";
|
||||
|
||||
$sql = "SELECT kurz, klar, teiler, einheit, ID FROM seliste
|
||||
WHERE isp ='$is'
|
||||
ORDER BY ID
|
||||
";
|
||||
|
||||
$up=0;
|
||||
|
||||
echo "<table>";
|
||||
foreach ($pdo->query($sql) as $row) {
|
||||
|
||||
echo "<tr>";
|
||||
echo "<td> $row[kurz] = $row[klar] </td> ";
|
||||
|
||||
echo "<td> <input type='checkbox' name='check[$up][einheit]' value='$row[einheit]'></td><td>$row[einheit]</td>
|
||||
<input type='Hidden' name='check[$up][id]' value=$row[ID]> ";
|
||||
$up++;
|
||||
// echo "<br class='clear'/>";
|
||||
echo "<tr>";
|
||||
}
|
||||
echo "</table>";
|
||||
echo "</div>";
|
||||
echo "</div>";
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
echo "<div class='texteingabe6b'>";
|
||||
echo "Einheiten zuordnen<br><br>";
|
||||
echo "<div class='kasteninnen'>";
|
||||
echo "Alle markierten Einheiten ändern in <br>";
|
||||
echo "<input class='platzieren1' name='einheitt' type='text' size='10' maxlength='10' > ";
|
||||
|
||||
echo "<br><br>";
|
||||
echo "<input type='Hidden' name='bild' value=$bild> ";
|
||||
echo "<input class='taste' type='submit' name='submit' value='ändern'>";
|
||||
echo "</form>";
|
||||
|
||||
|
||||
|
||||
?>
|
||||
<br><br><br class='clear'/>
|
||||
Jedem Wert kann eine eigene Einheit hinzugefügt werden. <br>
|
||||
Diese Einheit wird am Graphen verwendet und bei der CSV-Datei mit ausgegeben.
|
||||
<br><br>
|
||||
Ideale Vorgehensweise ist, z.B. alle Werte die Druck darstellen an dem Kästchen zu markieren.
|
||||
Pascal in das Feld tippen und ändern klicken.
|
||||
Mit % und anderen von °C abweichenden Einheiten so fortfahren.
|
||||
|
||||
<?php
|
||||
|
||||
|
||||
echo "</div>";
|
||||
echo "</div>";
|
||||
}
|
||||
?>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
||||
@@ -0,0 +1,276 @@
|
||||
<?php
|
||||
session_start();
|
||||
//session_regenerate_id();
|
||||
include("verbind.php");
|
||||
error_reporting (0);
|
||||
header("Content-Type: text/html; charset=utf-8");
|
||||
|
||||
$is= $_GET['is'];
|
||||
$del= $_POST['delx'];
|
||||
$auswahl= $_POST['auswahl'];
|
||||
$tage=intval($_POST['tage']);
|
||||
$textausgabe='';
|
||||
if (empty($is)) {$is=1;}
|
||||
|
||||
if(isset($_POST['submit']) AND $_POST['submit']=='ok'){
|
||||
|
||||
if (md5(trim($_POST['Passwort']))=='ec57fddd894f991ff1755ff0db17189f'){
|
||||
$_SESSION['login'] ='true';
|
||||
echo "<meta http-equiv='refresh' content='0; URL=se6.php'>";
|
||||
}
|
||||
|
||||
}
|
||||
//---------------------------------------------------Einheit-----------------------------
|
||||
$bild=1;
|
||||
$ok=0;
|
||||
|
||||
|
||||
if ($_POST['submit'] =='löschen') {
|
||||
$ok=1;
|
||||
$bild = $_POST['bild'];
|
||||
if ($bild==1){$bild=0;}else{$bild=1;}
|
||||
|
||||
if ($del==1){
|
||||
$sql = "TRUNCATE TABLE $auswahl ";
|
||||
$pdo->exec($sql);
|
||||
echo " gelöscht werden alle Daten von $auswahl";
|
||||
}
|
||||
|
||||
|
||||
if ($del==2){
|
||||
if ($tage==0){
|
||||
$textausgabe =' Hallo Zahlenkasper! <br> Entweder war Text oder 0 oder nichts im Eingabefeld<br>
|
||||
Bei 0 bitte Von Anfang bis heute wählen. Das löscht anders und schneller.<br>
|
||||
Bei Text im Tagefeld. Klar haben wir mal probiert. Zur Strafe wurden alle Tabellen gelöscht.';
|
||||
|
||||
}else{
|
||||
$sql = "DELETE FROM $auswahl WHERE DATE(datum) < DATE(NOW() - INTERVAL '$tage' Day)";
|
||||
$pdo->exec($sql);
|
||||
echo " gelöscht werden alle Daten von $auswahl vor $tage tagen";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
?>
|
||||
<html>
|
||||
<head>
|
||||
|
||||
|
||||
<link rel="stylesheet" href="style.css" media="screen">
|
||||
<link rel="stylesheet" href="kalender/tcal.css" media="screen">
|
||||
<script type="text/javascript" async src="Suggest/ajax.js"></script>
|
||||
<script type="text/javascript" async src="Suggest/suggest.js"></script>
|
||||
<script type="text/javascript" src="Suggest/jquery.js"></script>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<script type="text/javascript" async>
|
||||
function show(id)
|
||||
{
|
||||
if (document.getElementById(id).style.display=='none')
|
||||
{document.getElementById(id).style.display='block'; }
|
||||
else
|
||||
{ document.getElementById(id).style.display='none'; }
|
||||
}
|
||||
//]]>
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<?php
|
||||
|
||||
|
||||
|
||||
|
||||
$sql = "SELECT name, name2, text, smtp, absender, sprung FROM sebasis";
|
||||
|
||||
|
||||
foreach ($pdo->query($sql) as $row) {
|
||||
//$sql1 = mysql_query($sql) OR die(mysql_error());
|
||||
//while ($erg = mysql_fetch_object($sql1)) {
|
||||
|
||||
$name= $row['name'];
|
||||
$name2= $row['name2'];
|
||||
$text= $row['text'];
|
||||
$smtp= $row['smtp'];
|
||||
$absender= $row['absender'];
|
||||
$sprung= $row['sprung'];
|
||||
}
|
||||
|
||||
|
||||
|
||||
echo "<div class='topindex'>";
|
||||
echo "<img class='bild' usemap= 'Mapi' src='bilder/logo.png' alt='SE'/>";
|
||||
?>
|
||||
<a href="index.php" ><?php echo " <span class='rechtsmen'><img class='bildbot' usemap= 'Mapi' src='bilder/home.png' alt='SE'/> </span>";?></a>
|
||||
<?php
|
||||
echo "<div class='titel'>";
|
||||
echo "<div class='titelfett'>Administrative Einstellungen</div>";
|
||||
echo "<br>";
|
||||
echo "$name";
|
||||
echo "<br>";
|
||||
echo "$name2";
|
||||
echo "<br>";
|
||||
echo "$text";
|
||||
echo "</div>";
|
||||
if (($ok==1)and($bild==1)){
|
||||
echo "<img class='bildbot' usemap= 'Mapi' src='bilder/ok.gif' alt='SE'/>";
|
||||
}
|
||||
if (($ok==1)and($bild==0)){
|
||||
echo "<img class='bildbot' usemap= 'Mapi' src='bilder/ok2.gif' alt='SE'/>";
|
||||
}
|
||||
echo "</div>";
|
||||
?>
|
||||
|
||||
<div class="top2">
|
||||
<a href='se6.php'><div class='button'>Primärdaten</div></a>
|
||||
<a href='se6a.php'><div class='button'>Stationen einrichten</div></a>
|
||||
<a href='se6b.php'><div class='button'>Namen, Teiler zuordnen</div></a>
|
||||
<a href='se6c.php'><div class='button'>Einheiten zuordnen</div></a>
|
||||
<a href='se6d.php'><div class='buttonan'>Tabelleinhalte löschen</div></a>
|
||||
<a href='index.php'><div class='button'>Beenden</div></a>
|
||||
</div>
|
||||
<br class='clear'/>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<?php
|
||||
|
||||
//echo "$out";
|
||||
|
||||
|
||||
|
||||
if ($_SESSION['login'] !='true')
|
||||
// if ($_SESSION['login'] =='true')
|
||||
{
|
||||
|
||||
echo "<form name= 'senden' method='post' accept-charset='UTF-8' action='$PHP_SELF?i=1'>";
|
||||
|
||||
echo " <span><input type='password' class = 'loginfeldc' name='Passwort'></span>";
|
||||
echo " <span><input type='submit' class = 'loginsende' name='submit' value='ok'></span>";
|
||||
echo "</form>";
|
||||
}else{
|
||||
?>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="kasten1">
|
||||
<?php
|
||||
|
||||
echo "<div class='button6b'> ";
|
||||
echo "<select class= 'isp' size='1' name='jumpit' onchange='document.location.href=this.value'> ";
|
||||
|
||||
$sql = "SELECT name, db_name, ID FROM sestation WHERE name !='' ORDER BY ID ";
|
||||
|
||||
foreach ($pdo->query($sql) as $row) {
|
||||
//gib den Eintrag aus der DB aus
|
||||
if ( $is==$row[ID]) {$markiert= 'selected'; $wahl= $row[db_name];} else {$markiert='';}
|
||||
echo "<option value='se6d.php?is=$row[ID]' $markiert>$row[name]</option> ";
|
||||
|
||||
}
|
||||
|
||||
echo "</select></div>";
|
||||
|
||||
?>
|
||||
|
||||
<br><br><br class='clear'/>
|
||||
|
||||
|
||||
<br><br>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="kasten2">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<?php
|
||||
echo "<div class='kasteninnen'>";
|
||||
$sql4 = "SELECT name, db_name FROM sestation WHERE ID = '$is' ";
|
||||
|
||||
foreach ($pdo->query($sql4) as $row4) {
|
||||
$ispname= $row4['name'];
|
||||
$isptabelle= $row4['db_name'];
|
||||
}
|
||||
|
||||
echo "<form accept-charset='utf-8' action=se6d.php?is=$is method='post'> ";
|
||||
|
||||
echo "Zu löschende Zeitbereiche der ISP: $ispname (Tabelle: $isptabelle )<br><br>";
|
||||
echo "<input type='Hidden' name='auswahl' value= $isptabelle >";
|
||||
echo "<input type='radio' name ='delx' value = '1'> Von Anfang bis heute <br> ";
|
||||
echo "<input type='radio' name ='delx' value = '2'> Von Anfang bis ";
|
||||
echo " <input name='tage' type='text' size='5' maxlength='4' > Tage vor heute ";
|
||||
|
||||
|
||||
echo "<br><br>";
|
||||
echo "Daten werden direkt ohne weitere Abfrage gelöscht";
|
||||
|
||||
//echo " <input name='endestunde' type='text' size='2' maxlength='2' placeholder='Std'>:";
|
||||
//echo " <input name='endeminute' type='text' size='2' maxlength='2' placeholder='00'> Uhr";
|
||||
|
||||
//echo "</form>";
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
echo "<br><br>";
|
||||
|
||||
//echo "<input type='radio' name 'einheitt2' value = '%'>%";
|
||||
//echo "<input type='radio' name 'einheitt2' value = 'Pascal'>Pascal<br>";
|
||||
|
||||
echo "<input type='Hidden' name='bild' value=$bild> ";
|
||||
echo "<input class='taste' type='submit' name='submit' value='löschen'>";
|
||||
echo "</form>";
|
||||
|
||||
echo $textausgabe;
|
||||
echo "</div>";
|
||||
echo "</div>";
|
||||
|
||||
echo "<div class='texteingabe6b'>";
|
||||
|
||||
?>
|
||||
Hier können Inhalte der Datentabellen des über diesem Text angezeigten ISP gelöscht werden, wenn der Speicherplatz knapp wird
|
||||
oder die Anzeigegeschwinigkeit zu langsam geworden ist.<br><br>
|
||||
Bei mehreren ISP sollten Sie den Vorgang für jeden Einzelnen wiederholen.<br><br>
|
||||
Von Anfang bis heute geht schneller, weil die ganze Tabelle gelöscht und neu angelegt wird.<br><br>
|
||||
Dieser Vorgang ist nicht reversibel.<br> Weg ist weg.
|
||||
</div>
|
||||
<?php
|
||||
|
||||
|
||||
|
||||
}
|
||||
?>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
||||
@@ -0,0 +1,114 @@
|
||||
|
||||
html, body {
|
||||
height: 99%
|
||||
}
|
||||
|
||||
|
||||
.top { border:1px solid black; height: 4%; font-family: 'Open Sans', sans-serif;
|
||||
font-size:1.2em; color:#123456; width:98%; background:#ffffff; margin:0 auto; padding:1%;}
|
||||
|
||||
.mitte { border:1px solid black; font-family: 'Open Sans', sans-serif; height:79%;
|
||||
font-size:1.2em; color:#123456; width:98%; background:#c3c3c3; margin:0 auto; padding:1%;}
|
||||
|
||||
.mitte2 { border:1px solid black; font-family: 'Open Sans', sans-serif; height:86%;
|
||||
font-size:1.2em; color:#123456; width:98%; background:#eeeeee; margin:0 auto; padding:1%;}
|
||||
|
||||
.links { background:#ffffff; margin:0 auto;
|
||||
padding:0px; height:auto; float:left; width:220px; margin-right:1%;background:#eeeeee;}
|
||||
|
||||
.rechts { border:1px solid #888888; background:#ffffff; margin:0 auto; padding:10px; min-height:96%; float:left; }
|
||||
|
||||
.rechtsmen { float:right; padding-right:10px; }
|
||||
.rechtslogo { float:right; padding-right:10px; padding-left:10px; }
|
||||
.rechtshome { float:right; padding-right:10px; padding-left:30px; }
|
||||
|
||||
|
||||
.bottom { border:1px solid black; height: 4%; font-family: 'Open Sans', sans-serif;
|
||||
font-size:1.2em; color:#123456; width:98%; background:#c3c3c3; margin:0 auto; padding:1%; }
|
||||
|
||||
|
||||
|
||||
.bildg {float:right; margin-right:30px; max-height:100%;}
|
||||
|
||||
.titel {float:left; font-family: 'Open Sans', sans-serif; font-size:0.8em; color:#000;}
|
||||
.titelfett {float:left; font-family: 'Open Sans', sans-serif; font-size:1.3em; color:#000; font-weight: bold;}
|
||||
|
||||
|
||||
.dypos { float:left; width: auto; height: auto; margin-left:20px; margin-top: 20px;}
|
||||
#legend {font-family: 'Open Sans', sans-serif; font-size:13px; padding:20px;}
|
||||
#legend2 {font-family: 'Open Sans', sans-serif; font-size:14px;}
|
||||
|
||||
/* #graphdiv2 {margin-right:0px; margin-left:0px; height:90%;}*/
|
||||
|
||||
|
||||
#graphdiv2 {position: absolute; inset: 150px 10px 10px 200px; background: #000000; }
|
||||
/* #graphdiv2 {width:140px; height:90%;}*/
|
||||
#graphdiv3 {width:350px; height:90%;}
|
||||
|
||||
@media screen and (min-width: 699px) {
|
||||
#graphdiv2 {width:400px; height:90%;}
|
||||
#graphdiv3 {width:580px; height:90%;}
|
||||
}
|
||||
|
||||
|
||||
@media screen and (min-width: 799px) {
|
||||
#graphdiv2 {width:480px; height:90%;}
|
||||
#graphdiv3 {width:640px; height:90%;}
|
||||
}
|
||||
|
||||
@media screen and (min-width: 850px) {
|
||||
#graphdiv2 {width:530px; height:90%;}
|
||||
#graphdiv3 {width:680px; height:90%;}
|
||||
}
|
||||
|
||||
|
||||
@media screen and (min-width: 899px) {
|
||||
#graphdiv2 {width:570px; height:90%;}
|
||||
#graphdiv3 {width:820px; height:90%;}
|
||||
}
|
||||
|
||||
@media screen and (min-width: 999px) {
|
||||
#graphdiv2 {width:660px; height:90%;}
|
||||
#graphdiv3 {width:910px; height:90%;}
|
||||
}
|
||||
|
||||
@media screen and (min-width: 1099px) {
|
||||
#graphdiv2 {width:780px; height:90%;}
|
||||
#graphdiv3 {width:1020px; height:90%;}
|
||||
}
|
||||
|
||||
@media screen and (min-width: 1199px) {
|
||||
#graphdiv2 {width:880px; height:90%;}
|
||||
#graphdiv3 {width:1120px; height:90%;}
|
||||
}
|
||||
|
||||
@media screen and (min-width: 1299px) {
|
||||
#graphdiv2 {width:960px; height:90%;}
|
||||
#graphdiv3 {width:1200px; height:90%;}
|
||||
}
|
||||
|
||||
@media screen and (min-width: 1399px) {
|
||||
#graphdiv2 {width:1070px; height:90%;}
|
||||
#graphdiv3 {width:1310px; height:90%;}
|
||||
}
|
||||
|
||||
@media screen and (min-width: 1499px) {
|
||||
#graphdiv2 {width:1170px; height:90%;}
|
||||
#graphdiv3 {width:1410px; height:90%;}
|
||||
}
|
||||
|
||||
@media screen and (min-width: 1599px) {
|
||||
#graphdiv2 {width:1260px; height:90%;}
|
||||
#graphdiv3 {width:1490px; height:90%;}
|
||||
}
|
||||
|
||||
@media screen and (min-width: 1699px) {
|
||||
#graphdiv2 {width:1360px; height:90%;}
|
||||
#graphdiv3 {width:1610px; height:90%;}
|
||||
}
|
||||
@media screen and (min-width: 1799px) {
|
||||
#graphdiv2 {width:1460px; height:90%;}
|
||||
#graphdiv3 {width:1700px; height:90%;}
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,219 @@
|
||||
|
||||
html { height: 100%}
|
||||
body { margin: 0; 100%; }
|
||||
|
||||
input[type=submit]
|
||||
{
|
||||
font-family: 'Open Sans', sans-serif;
|
||||
font-size:0.8em;
|
||||
padding: 3px 8px;
|
||||
line-height:18px;
|
||||
text-shadow:none;
|
||||
cursor:pointer;
|
||||
box-shadow: none;
|
||||
|
||||
width: auto;
|
||||
border:0;
|
||||
background: linear-gradient(to bottom, #c8d5e7 , #ffffff 4%, #c8d5e7 );
|
||||
}
|
||||
/*
|
||||
6cb9fa;
|
||||
*/
|
||||
|
||||
input.set[type=submit]
|
||||
{
|
||||
font-family: 'Open Sans', sans-serif;
|
||||
font-size:0.8em;
|
||||
padding: 12px 13px;
|
||||
line-height:18px;
|
||||
text-shadow:none;
|
||||
cursor:pointer;
|
||||
box-shadow: none;
|
||||
|
||||
background: linear-gradient(to bottom, #9aa9bd, #ffffff 2%, #9aa9bd );
|
||||
width: auto;
|
||||
border:0;
|
||||
}
|
||||
|
||||
input[type=text]
|
||||
{
|
||||
font-family: 'Open Sans', sans-serif;
|
||||
font-size:1.0em;
|
||||
padding: 3px;
|
||||
outline: 0;
|
||||
border:0;
|
||||
color:#123456;
|
||||
background: #eeeeee;
|
||||
box-shadow: inset 1px 1px 2px 0 #707070;
|
||||
border-radius:5px;
|
||||
margin-top:3px;
|
||||
}
|
||||
|
||||
.top {background:#eeeeee; height: 40px; font-family: 'Open Sans', sans-serif;
|
||||
border-top:1px solid black; border-right:1px solid black; border-left:1px solid black;
|
||||
font-size:1.2em; color:#123456; width:calc(100% - 30px); margin:0 auto; padding:10px;}
|
||||
|
||||
.mitte { border-right:1px solid black;border-left:1px solid black;
|
||||
font-family: 'Open Sans', sans-serif; height: calc(100% - 180px);
|
||||
font-size:1.2em; color:#123456; width:calc(100% - 10px); background:#eeeeee; margin:0 auto;}
|
||||
|
||||
.mitte2 { border-right:1px solid black; border-left:1px solid black; border-top:1px solid black;
|
||||
font-family: 'Open Sans', sans-serif; height: calc(100% - 120px);
|
||||
font-size:1.2em; color:#123456; width:calc(100% - 10px); background:#eeeeee; margin:0 auto;}
|
||||
|
||||
.links { background:#ffffff; margin:0 auto;
|
||||
padding:0px; height:auto; float:left; width:220px; margin-right:1%;background:#eeeeee;}
|
||||
|
||||
.rechts { border:1px solid #888888; background:#ffffff; margin:0 auto; padding:10px; min-height:96%; float:left; }
|
||||
|
||||
.rechtsmen { float:right; padding-right:10px; }
|
||||
.rechtslogo { float:right; padding-right:10px; padding-left:10px; }
|
||||
.rechtshome { float:right; padding-right:10px; padding-left:30px; }
|
||||
|
||||
|
||||
.bottom { position absolute; border:1px solid black; height: 40px; font-family: 'Open Sans', sans-serif;
|
||||
font-size:0.6em; color:#123456; width:calc(100% - 30px); background:#c3c3c3; margin:0 auto; padding:10px;margin-bottom:5px; }
|
||||
|
||||
|
||||
|
||||
.bildg {float:right; margin-right:30px; max-height:100%;}
|
||||
|
||||
.titel {float:left; font-family: 'Open Sans', sans-serif; font-size:0.8em; color:#000;}
|
||||
.titelfett {float:left; font-family: 'Open Sans', sans-serif; font-size:1.3em; color:#000; font-weight: bold;}
|
||||
|
||||
|
||||
.dypos { float:left; width: auto; height: auto; margin-left:20px; margin-top: 20px;}
|
||||
#legend {font-family: 'Open Sans', sans-serif; font-size:13px; padding:20px;}
|
||||
#legend2 {font-family: 'Open Sans', sans-serif; font-size:14px;}
|
||||
|
||||
/* #graphdiv2 {margin-right:0px; margin-left:0px; height:90%;}*/
|
||||
|
||||
|
||||
#graphdiv2d {height: calc(100% - 150px); position: absolute; margin-left:55px; margin-top:-130px;inset: 150px 10px 10px 200px;
|
||||
background: #000000; margin-right:20px; border:1px solid #999999;}
|
||||
#graphdiv2h {height: calc(100% - 150px); position: absolute; margin-left:55px; margin-top:-130px;inset: 150px 10px 10px 200px;
|
||||
background: #ffffff; margin-right:20px; border:1px solid #999999;}
|
||||
/* #graphdiv2 {width:140px; height:90%;}*/
|
||||
/* #graphdiv3 {width:350px; height:90%;}*/
|
||||
|
||||
#graphdiv3d { height: calc(100% - 210px); position: absolute; margin-left:-175px;
|
||||
margin-top:-70px;inset: 150px 10px 10px 200px; margin-bottom:100px;
|
||||
background: #000000; margin-right:10px; border:1px solid #999999;}
|
||||
|
||||
#graphdiv3h { height: calc(100% - 210px); position: absolute; margin-left:-175px;
|
||||
margin-top:-70px;inset: 150px 10px 10px 200px; margin-bottom:100px;
|
||||
background: #ffffff; margin-right:10px; border:1px solid #999999;}
|
||||
|
||||
|
||||
|
||||
.topindex {background:#eeeeee; height: 80px; font-family: 'Open Sans', sans-serif;
|
||||
border:1px solid black;
|
||||
font-size:1.2em; color:#123456; width:calc(100% - 30px); margin:0 auto; padding:10px;}
|
||||
|
||||
.bild {float:right;}
|
||||
.kasten { float:left; width: 30%; margin-left:2%; height:auto; margin-top:30px;
|
||||
font-family: 'Open Sans', sans-serif; font-size:0.9em;}
|
||||
.kasteninnen {min-width:96%; border:1px solid #999999; padding:2%; overflow: auto;
|
||||
background: linear-gradient(to bottom, #f1f3f6 , #ffffff 2%, #f1f3f6 );}
|
||||
|
||||
.kasteninnenindex {min-width:96%; border:1px solid #999999; padding:2%; overflow:scroll;
|
||||
max-height:calc(100% - 340px);
|
||||
background: linear-gradient(to bottom, #f1f3f6 , #ffffff 2%, #f1f3f6 );}
|
||||
|
||||
|
||||
|
||||
|
||||
.rechtsoben {float:right;}
|
||||
.rechtsobenblaua {float:right; font-family: 'Open Sans', sans-serif;
|
||||
font-size:0.8em;
|
||||
padding: 3px 8px;
|
||||
line-height:18px;
|
||||
text-shadow:none;
|
||||
cursor:pointer;
|
||||
box-shadow: none;
|
||||
border-radius:1px;
|
||||
outline: 0;
|
||||
border:1px solid #888;
|
||||
background: #abc4d9;
|
||||
width: auto;}
|
||||
|
||||
.rechtsobenblau {float:right; font-family: 'Open Sans', sans-serif;
|
||||
font-size:0.8em;
|
||||
padding: 3px 8px;
|
||||
line-height:18px;
|
||||
text-shadow:none;
|
||||
cursor:pointer;
|
||||
box-shadow: none;
|
||||
border-radius:0px;
|
||||
outline: 0;
|
||||
background: linear-gradient(to bottom, #c8d5e7 , #ffffff 4%, #c8d5e7 );
|
||||
|
||||
width: auto;}
|
||||
|
||||
.buttonx {float:left; width:100%; padding: 0px; height:50px; margin-top:20px;
|
||||
font-family: 'Open Sans', sans-serif; font-size:1.1em; }
|
||||
|
||||
.isp {padding:10px; font-family: 'Open Sans', sans-serif; font-size:1.0em;
|
||||
background:#dddddd; width:60%; color:#000;border: none; border:1px solid #999;}
|
||||
|
||||
.button { font-size:0.4em;float: left; width:auto; padding: 2px; margin: 2px; height:15px; background: #f6f6f6; border: 1px solid#000000;border-radius:5px; box-shadow: -2px -2px 4px #999; }
|
||||
.set {margin:20px 5px; Padding:2px; Border: 1px solid #cccccc;
|
||||
font-family: 'Open Sans', sans-serif; font-size:0.7em; Background:#b2e1c3; border-radius:3px;}
|
||||
.set1 {margin:20px 5px; Padding:2px; Border: 1px solid #cccccc; font-family: 'Open Sans', sans-serif; font-size:0.7em; Background:#a2b0d0; border-radius:5px;}
|
||||
.buttonan {font-size:0.4em; float: left; width:auto; padding: 2px; margin: 2px; height:15px; background: #cdcdcd; border: 1px solid#000000;border-radius:5px; box-shadow: 4px 4px 6px #555 inset;}
|
||||
|
||||
.textinfo {height: auto; width:300px; margin:0 auto; padding:30px; float:left;}
|
||||
|
||||
.texteingabe {height: auto; width:auto; margin:0 auto; padding:10px; border:1px solid #999999;margin-left:30px;float:left;}
|
||||
|
||||
.platzieren { min-width:100px; margin: 4px 5px 0 0; padding-top:3px;}
|
||||
.top2 {padding-left: 25px;padding-top:10px; width:100%; height: 55px;}
|
||||
|
||||
#zeigeli1 {float:right; width: 200px; height: 20px; margin-right:10px; padding:0; font-size:0.9em; background-color:#fff;z-index: 100;}
|
||||
#zeigeli2 {float:right; width: 200px; height: 20px; margin-right:10px; padding:0; font-size:0.9em; background-color:#fff;z-index: 100;}
|
||||
#zeigeli1a {float:right; width: 200px; height: 20px; margin-right:10px; padding:0; font-size:0.9em; background-color:#c3c3c3;z-index: 100;}
|
||||
#zeigeli2a {float:right; width: 200px; height: 20px; margin-right:10px; padding:0; font-size:0.9em; background-color:#c3c3c3;z-index: 100;}
|
||||
|
||||
|
||||
.kasten1 { float:left; width: 100%; height:60px; margin-top:30px; font-family: 'Open Sans', sans-serif; font-size:0.9em;}
|
||||
.kasten2 { float:left; width: 60%; margin-left:2%; height:40%; margin-top:30px; font-family: 'Open Sans', sans-serif; font-size:0.9em;}
|
||||
.kasten2a { float:left; width: 60%; padding:2%; height:45px; margin-top:5px; font-family: 'Open Sans', sans-serif; font-size:0.9em;}
|
||||
|
||||
.button6b { margin:0 auto; padding: 20px; height:50px; margin-top:0px; font-family: 'Open Sans', sans-serif; font-size:1.1em; }
|
||||
.texteingabe6b {height: auto; width:200px; margin:0 auto; padding:10px; border:1px solid #999999;margin-left:30px;float:left;}
|
||||
.speicherbut4 {position:fixed; margin-top:10px; margin-left:52%;}
|
||||
|
||||
|
||||
|
||||
@media screen and (min-width: 600px) {
|
||||
|
||||
.bottom { position absolute; border:1px solid black; height: 40px; font-family: 'Open Sans', sans-serif;
|
||||
font-size:0.8em; color:#123456; width:calc(100% - 30px); background:#c3c3c3; margin:0 auto; padding:10px;margin-bottom:5px; }
|
||||
.button { font-size:0.7em; float: left; width:auto; padding: 3px; margin: 5px; height:15px; background: #f6f6f6; border: 1px solid#000000;border-radius:5px; box-shadow: -2px -2px 4px #999; }
|
||||
.buttonan {font-size:0.7em; float: left; width:auto; padding: 3px; margin: 5px; height:15px; background: #cdcdcd; border: 1px solid#000000;border-radius:5px; box-shadow: 4px 4px 6px #555 inset;}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@media screen and (min-width: 1000px) {
|
||||
|
||||
.bottom { position absolute; border:1px solid black; height: 40px; font-family: 'Open Sans', sans-serif;
|
||||
font-size:1.2em; color:#123456; width:calc(100% - 30px); background:#c3c3c3; margin:0 auto; padding:10px;margin-bottom:5px; }
|
||||
.button { font-size:1em; float: left; width:auto; padding: 6px; margin: 8px; height:15px; background: #f6f6f6; border: 1px solid#000000;border-radius:5px; box-shadow: -2px -2px 4px #999; }
|
||||
.buttonan {font-size:1em; float: left; width:auto; padding: 6px; margin: 8px; height:15px; background: #cdcdcd; border: 1px solid#000000;border-radius:5px; box-shadow: 4px 4px 6px #555 inset;}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
After Width: | Height: | Size: 125 B |
|
After Width: | Height: | Size: 60 B |
|
After Width: | Height: | Size: 70 B |
|
After Width: | Height: | Size: 138 B |
|
After Width: | Height: | Size: 59 B |
|
After Width: | Height: | Size: 69 B |
@@ -0,0 +1,17 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="application/xhtml+xml; charset=utf-8" />
|
||||
<title>Simple Tigra Calendar</title>
|
||||
|
||||
<!-- link calendar resources -->
|
||||
<link rel="stylesheet" type="text/css" href="tcal.css" />
|
||||
<script type="text/javascript" src="tcal.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<form action="#">
|
||||
<!-- add class="tcal" to your input field -->
|
||||
<div><input type="text" name="date" class="tcal" value="" /></div>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,100 @@
|
||||
/*
|
||||
Stylesheet for Tigra Calendar v5.0
|
||||
Product is Public Domain (Free for any kind of applicaiton, customization and derivative works are allowed)
|
||||
URL: http://www.softcomplex.com/products/tigra_calendar/
|
||||
|
||||
- all image paths are relative to path of stylesheet
|
||||
- the styles below can be moved into the document or in existing stylesheet
|
||||
|
||||
*/
|
||||
|
||||
/* input box in default state */
|
||||
.tcalInput {
|
||||
background: url('img/cal.gif') 100% 50% no-repeat;
|
||||
padding-right: 20px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
/* additional properties for input boxe in activated state, above still applies unless in conflict */
|
||||
.tcalActive {
|
||||
background-image: url('img/no_cal.gif');
|
||||
}
|
||||
/* container of calendar's pop-up */
|
||||
#tcal {
|
||||
position: absolute;
|
||||
visibility: hidden;
|
||||
z-index: 100;
|
||||
width: 170px;
|
||||
background-color: white;
|
||||
margin-top: 2px;
|
||||
padding: 0 2px 2px 2px;
|
||||
border: 1px solid silver;
|
||||
|
||||
-moz-box-shadow: 3px 3px 4px silver;
|
||||
-webkit-box-shadow: 3px 3px 4px silver;
|
||||
box-shadow: 3px 3px 4px silver;
|
||||
-ms-filter: "progid:DXImageTransform.Microsoft.Shadow(Strength=4, Direction=135, Color='silver')";
|
||||
filter: progid:DXImageTransform.Microsoft.Shadow(Strength=4, Direction=135, Color='silver');
|
||||
}
|
||||
|
||||
/* table containing navigation and current month */
|
||||
#tcalControls {
|
||||
border-collapse: collapse;
|
||||
border: 0;
|
||||
width: 100%;
|
||||
}
|
||||
#tcalControls td {
|
||||
border-collapse: collapse;
|
||||
border: 0;
|
||||
padding: 0;
|
||||
width: 16px;
|
||||
background-position: 50% 50%;
|
||||
background-repeat: no-repeat;
|
||||
cursor: pointer;
|
||||
}
|
||||
#tcalControls th {
|
||||
border-collapse: collapse;
|
||||
border: 0;
|
||||
padding: 0;
|
||||
line-height: 25px;
|
||||
font-size: 10px;
|
||||
text-align: center;
|
||||
font-family: Tahoma, Geneva, sans-serif;
|
||||
font-weight: bold;
|
||||
white-space: nowrap;
|
||||
}
|
||||
#tcalPrevYear { background-image: url('img/prev_year.gif'); }
|
||||
#tcalPrevMonth { background-image: url('img/prev_mon.gif'); }
|
||||
#tcalNextMonth { background-image: url('img/next_mon.gif'); }
|
||||
#tcalNextYear { background-image: url('img/next_year.gif'); }
|
||||
|
||||
/* table containing week days header and calendar grid */
|
||||
#tcalGrid {
|
||||
border-collapse: collapse;
|
||||
border: 1px solid silver;
|
||||
width: 100%;
|
||||
}
|
||||
#tcalGrid th {
|
||||
border: 1px solid silver;
|
||||
border-collapse: collapse;
|
||||
padding: 3px 0;
|
||||
text-align: center;
|
||||
font-family: Tahoma, Geneva, sans-serif;
|
||||
font-size: 10px;
|
||||
background-color: gray;
|
||||
color: white;
|
||||
}
|
||||
#tcalGrid td {
|
||||
border: 0;
|
||||
border-collapse: collapse;
|
||||
padding: 2px 0;
|
||||
text-align: center;
|
||||
font-family: Tahoma, Geneva, sans-serif;
|
||||
width: 14%;
|
||||
font-size: 11px;
|
||||
cursor: pointer;
|
||||
}
|
||||
#tcalGrid td.tcalOtherMonth { color: silver; }
|
||||
#tcalGrid td.tcalWeekend { background-color: #ACD6F5; }
|
||||
#tcalGrid td.tcalToday { border: 1px solid red; }
|
||||
#tcalGrid td.tcalSelected { background-color: #FFB3BE; }
|
||||
@@ -0,0 +1,349 @@
|
||||
// Tigra Calendar v5.2 (11/20/2011)
|
||||
// http://www.softcomplex.com/products/tigra_calendar/
|
||||
// License: Public Domain... You're welcome.
|
||||
|
||||
// default settins - this structure can be moved in separate file in multilangual applications
|
||||
var A_TCALCONF = {
|
||||
'cssprefix' : 'tcal',
|
||||
'months' : ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'],
|
||||
'weekdays' : ['Su', 'Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa'],
|
||||
'longwdays' : ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'],
|
||||
'yearscroll' : true, // show year scroller
|
||||
'weekstart' : 0, // first day of week: 0-Su or 1-Mo
|
||||
'prevyear' : 'Previous Year',
|
||||
'nextyear' : 'Next Year',
|
||||
'prevmonth' : 'Previous Month',
|
||||
'nextmonth' : 'Next Month',
|
||||
'format' : 'm/d/Y' // 'd-m-Y', Y-m-d', 'l, F jS Y'
|
||||
};
|
||||
|
||||
var A_TCALTOKENS = [
|
||||
// A full numeric representation of a year, 4 digits
|
||||
{'t': 'Y', 'r': '19\\d{2}|20\\d{2}', 'p': function (d_date, n_value) { d_date.setFullYear(Number(n_value)); return d_date; }, 'g': function (d_date) { var n_year = d_date.getFullYear(); return n_year; }},
|
||||
// Numeric representation of a month, with leading zeros
|
||||
{'t': 'm', 'r': '0?[1-9]|1[0-2]', 'p': function (d_date, n_value) { d_date.setMonth(Number(n_value) - 1); return d_date; }, 'g': function (d_date) { var n_month = d_date.getMonth() + 1; return (n_month < 10 ? '0' : '') + n_month }},
|
||||
// A full textual representation of a month, such as January or March
|
||||
{'t': 'F', 'r': A_TCALCONF.months.join('|'), 'p': function (d_date, s_value) { for (var m = 0; m < 12; m++) if (A_TCALCONF.months[m] == s_value) { d_date.setMonth(m); return d_date; }}, 'g': function (d_date) { return A_TCALCONF.months[d_date.getMonth()]; }},
|
||||
// Day of the month, 2 digits with leading zeros
|
||||
{'t': 'd', 'r': '0?[1-9]|[12][0-9]|3[01]', 'p': function (d_date, n_value) { d_date.setDate(Number(n_value)); if (d_date.getDate() != n_value) d_date.setDate(0); return d_date }, 'g': function (d_date) { var n_date = d_date.getDate(); return (n_date < 10 ? '0' : '') + n_date; }},
|
||||
// Day of the month without leading zeros
|
||||
{'t': 'j', 'r': '0?[1-9]|[12][0-9]|3[01]', 'p': function (d_date, n_value) { d_date.setDate(Number(n_value)); if (d_date.getDate() != n_value) d_date.setDate(0); return d_date }, 'g': function (d_date) { var n_date = d_date.getDate(); return n_date; }},
|
||||
// A full textual representation of the day of the week
|
||||
{'t': 'l', 'r': A_TCALCONF.longwdays.join('|'), 'p': function (d_date, s_value) { return d_date }, 'g': function (d_date) { return A_TCALCONF.longwdays[d_date.getDay()]; }},
|
||||
// English ordinal suffix for the day of the month, 2 characters
|
||||
{'t': 'S', 'r': 'st|nd|rd|th', 'p': function (d_date, s_value) { return d_date }, 'g': function (d_date) { n_date = d_date.getDate(); if (n_date % 10 == 1 && n_date != 11) return 'st'; if (n_date % 10 == 2 && n_date != 12) return 'nd'; if (n_date % 10 == 3 && n_date != 13) return 'rd'; return 'th'; }}
|
||||
|
||||
];
|
||||
|
||||
function f_tcalGetHTML (d_date) {
|
||||
|
||||
var e_input = f_tcalGetInputs(true);
|
||||
if (!e_input) return;
|
||||
|
||||
var s_pfx = A_TCALCONF.cssprefix,
|
||||
s_format = A_TCALCONF.format;
|
||||
|
||||
// today from config or client date
|
||||
var d_today = f_tcalParseDate(A_TCALCONF.today, A_TCALCONF.format);
|
||||
if (!d_today)
|
||||
d_today = f_tcalResetTime(new Date());
|
||||
|
||||
// selected date from input or config or today
|
||||
var d_selected = f_tcalParseDate(e_input.value, s_format);
|
||||
if (!d_selected)
|
||||
d_selected = f_tcalParseDate(A_TCALCONF.selected, A_TCALCONF.format);
|
||||
if (!d_selected)
|
||||
d_selected = new Date(d_today);
|
||||
|
||||
// show calendar for passed or selected date
|
||||
d_date = d_date ? f_tcalResetTime(d_date) : new Date(d_selected);
|
||||
|
||||
var d_firstDay = new Date(d_date);
|
||||
d_firstDay.setDate(1);
|
||||
d_firstDay.setDate(1 - (7 + d_firstDay.getDay() - A_TCALCONF.weekstart) % 7);
|
||||
|
||||
var a_class, s_html = '<table id="' + s_pfx + 'Controls"><tbody><tr>'
|
||||
+ (A_TCALCONF.yearscroll ? '<td id="' + s_pfx + 'PrevYear" ' + f_tcalRelDate(d_date, -1, 'y') + ' title="' + A_TCALCONF.prevyear + '"></td>' : '')
|
||||
+ '<td id="' + s_pfx + 'PrevMonth"' + f_tcalRelDate(d_date, -1) + ' title="' + A_TCALCONF.prevmonth + '"></td><th>'
|
||||
+ A_TCALCONF.months[d_date.getMonth()] + ' ' + d_date.getFullYear()
|
||||
+ '</th><td id="' + s_pfx + 'NextMonth"' + f_tcalRelDate(d_date, 1) + ' title="' + A_TCALCONF.nextmonth + '"></td>'
|
||||
+ (A_TCALCONF.yearscroll ? '<td id="' + s_pfx + 'NextYear"' + f_tcalRelDate(d_date, 1, 'y') + ' title="' + A_TCALCONF.nextyear + '"></td>' : '')
|
||||
+ '</tr></tbody></table><table id="' + s_pfx + 'Grid"><tbody><tr>';
|
||||
|
||||
// print weekdays titles
|
||||
for (var i = 0; i < 7; i++)
|
||||
s_html += '<th>' + A_TCALCONF.weekdays[(A_TCALCONF.weekstart + i) % 7] + '</th>';
|
||||
s_html += '</tr>' ;
|
||||
|
||||
// print calendar table
|
||||
var n_date, n_month, d_current = new Date(d_firstDay);
|
||||
while (d_current.getMonth() == d_date.getMonth() ||
|
||||
d_current.getMonth() == d_firstDay.getMonth()) {
|
||||
|
||||
s_html +='<tr>';
|
||||
for (var n_wday = 0; n_wday < 7; n_wday++) {
|
||||
|
||||
a_class = [];
|
||||
n_date = d_current.getDate();
|
||||
n_month = d_current.getMonth();
|
||||
|
||||
if (d_current.getMonth() != d_date.getMonth())
|
||||
a_class[a_class.length] = s_pfx + 'OtherMonth';
|
||||
if (d_current.getDay() == 0 || d_current.getDay() == 6)
|
||||
a_class[a_class.length] = s_pfx + 'Weekend';
|
||||
if (d_current.valueOf() == d_today.valueOf())
|
||||
a_class[a_class.length] = s_pfx + 'Today';
|
||||
if (d_current.valueOf() == d_selected.valueOf())
|
||||
a_class[a_class.length] = s_pfx + 'Selected';
|
||||
|
||||
s_html += '<td' + f_tcalRelDate(d_current) + (a_class.length ? ' class="' + a_class.join(' ') + '">' : '>') + n_date + '</td>';
|
||||
d_current.setDate(++n_date);
|
||||
}
|
||||
s_html +='</tr>';
|
||||
}
|
||||
s_html +='</tbody></table>';
|
||||
|
||||
return s_html;
|
||||
}
|
||||
|
||||
function f_tcalRelDate (d_date, d_diff, s_units) {
|
||||
|
||||
var s_units = (s_units == 'y' ? 'FullYear' : 'Month');
|
||||
var d_result = new Date(d_date);
|
||||
if (d_diff) {
|
||||
d_result['set' + s_units](d_date['get' + s_units]() + d_diff);
|
||||
if (d_result.getDate() != d_date.getDate())
|
||||
d_result.setDate(0);
|
||||
}
|
||||
return ' onclick="f_tcalUpdate(' + d_result.valueOf() + (d_diff ? ',1' : '') + ')"';
|
||||
}
|
||||
|
||||
function f_tcalResetTime (d_date) {
|
||||
d_date.setMilliseconds(0);
|
||||
d_date.setSeconds(0);
|
||||
d_date.setMinutes(0);
|
||||
d_date.setHours(12);
|
||||
return d_date;
|
||||
}
|
||||
|
||||
// closes calendar and returns all inputs to default state
|
||||
function f_tcalCancel () {
|
||||
|
||||
var s_pfx = A_TCALCONF.cssprefix;
|
||||
var e_cal = document.getElementById(s_pfx);
|
||||
if (e_cal)
|
||||
e_cal.style.visibility = '';
|
||||
var a_inputs = f_tcalGetInputs();
|
||||
for (var n = 0; n < a_inputs.length; n++)
|
||||
f_tcalRemoveClass(a_inputs[n], s_pfx + 'Active');
|
||||
}
|
||||
|
||||
function f_tcalUpdate (n_date, b_keepOpen) {
|
||||
|
||||
var e_input = f_tcalGetInputs(true);
|
||||
if (!e_input) return;
|
||||
|
||||
d_date = new Date(n_date);
|
||||
var s_pfx = A_TCALCONF.cssprefix;
|
||||
|
||||
if (b_keepOpen) {
|
||||
var e_cal = document.getElementById(s_pfx);
|
||||
if (!e_cal || e_cal.style.visibility != 'visible') return;
|
||||
e_cal.innerHTML = f_tcalGetHTML(d_date, e_input);
|
||||
}
|
||||
else {
|
||||
e_input.value = f_tcalGenerateDate(d_date, A_TCALCONF.format);
|
||||
f_tcalCancel();
|
||||
}
|
||||
}
|
||||
|
||||
function f_tcalOnClick () {
|
||||
|
||||
// see if already opened
|
||||
var s_pfx = A_TCALCONF.cssprefix;
|
||||
var s_activeClass = s_pfx + 'Active';
|
||||
var b_close = f_tcalHasClass(this, s_activeClass);
|
||||
|
||||
// close all clalendars
|
||||
f_tcalCancel();
|
||||
if (b_close) return;
|
||||
|
||||
// get position of input
|
||||
f_tcalAddClass(this, s_activeClass);
|
||||
|
||||
var n_left = f_getPosition (this, 'Left'),
|
||||
n_top = f_getPosition (this, 'Top') + this.offsetHeight;
|
||||
|
||||
var e_cal = document.getElementById(s_pfx);
|
||||
if (!e_cal) {
|
||||
e_cal = document.createElement('div');
|
||||
e_cal.onselectstart = function () { return false };
|
||||
e_cal.id = s_pfx;
|
||||
document.getElementsByTagName("body").item(0).appendChild(e_cal);
|
||||
}
|
||||
e_cal.innerHTML = f_tcalGetHTML(null);
|
||||
e_cal.style.top = n_top + 'px';
|
||||
e_cal.style.left = (n_left + this.offsetWidth - e_cal.offsetWidth) + 'px';
|
||||
e_cal.style.visibility = 'visible';
|
||||
}
|
||||
|
||||
function f_tcalParseDate (s_date, s_format) {
|
||||
|
||||
if (!s_date) return;
|
||||
|
||||
var s_char, s_regexp = '^', a_tokens = {}, a_options, n_token = 0;
|
||||
for (var n = 0; n < s_format.length; n++) {
|
||||
s_char = s_format.charAt(n);
|
||||
if (A_TCALTOKENS_IDX[s_char]) {
|
||||
a_tokens[s_char] = ++n_token;
|
||||
s_regexp += '(' + A_TCALTOKENS_IDX[s_char]['r'] + ')';
|
||||
}
|
||||
else if (s_char == ' ')
|
||||
s_regexp += '\\s';
|
||||
else
|
||||
s_regexp += (s_char.match(/[\w\d]/) ? '' : '\\') + s_char;
|
||||
}
|
||||
var r_date = new RegExp(s_regexp + '$');
|
||||
if (!s_date.match(r_date)) return;
|
||||
|
||||
var s_val, d_date = f_tcalResetTime(new Date());
|
||||
d_date.setDate(1);
|
||||
|
||||
for (n = 0; n < A_TCALTOKENS.length; n++) {
|
||||
s_char = A_TCALTOKENS[n]['t'];
|
||||
if (!a_tokens[s_char])
|
||||
continue;
|
||||
s_val = RegExp['$' + a_tokens[s_char]];
|
||||
d_date = A_TCALTOKENS[n]['p'](d_date, s_val);
|
||||
}
|
||||
|
||||
return d_date;
|
||||
}
|
||||
|
||||
function f_tcalGenerateDate (d_date, s_format) {
|
||||
|
||||
var s_char, s_date = '';
|
||||
for (var n = 0; n < s_format.length; n++) {
|
||||
s_char = s_format.charAt(n);
|
||||
s_date += A_TCALTOKENS_IDX[s_char] ? A_TCALTOKENS_IDX[s_char]['g'](d_date) : s_char;
|
||||
}
|
||||
return s_date;
|
||||
}
|
||||
|
||||
function f_tcalGetInputs (b_active) {
|
||||
|
||||
var a_inputs = document.getElementsByTagName('input'),
|
||||
e_input, s_rel, a_result = [];
|
||||
|
||||
for (n = 0; n < a_inputs.length; n++) {
|
||||
|
||||
e_input = a_inputs[n];
|
||||
if (!e_input.type || e_input.type != 'text')
|
||||
continue;
|
||||
|
||||
if (!f_tcalHasClass(e_input, 'tcal'))
|
||||
continue;
|
||||
|
||||
if (b_active && f_tcalHasClass(e_input, A_TCALCONF.cssprefix + 'Active'))
|
||||
return e_input;
|
||||
|
||||
a_result[a_result.length] = e_input;
|
||||
}
|
||||
return b_active ? null : a_result;
|
||||
}
|
||||
|
||||
function f_tcalHasClass (e_elem, s_class) {
|
||||
var s_classes = e_elem.className;
|
||||
if (!s_classes)
|
||||
return false;
|
||||
var a_classes = s_classes.split(' ');
|
||||
for (var n = 0; n < a_classes.length; n++)
|
||||
if (a_classes[n] == s_class)
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
function f_tcalAddClass (e_elem, s_class) {
|
||||
if (f_tcalHasClass (e_elem, s_class))
|
||||
return;
|
||||
|
||||
var s_classes = e_elem.className;
|
||||
e_elem.className = (s_classes ? s_classes + ' ' : '') + s_class;
|
||||
}
|
||||
|
||||
function f_tcalRemoveClass (e_elem, s_class) {
|
||||
var s_classes = e_elem.className;
|
||||
if (!s_classes || s_classes.indexOf(s_class) == -1)
|
||||
return false;
|
||||
|
||||
var a_classes = s_classes.split(' '),
|
||||
a_newClasses = [];
|
||||
|
||||
for (var n = 0; n < a_classes.length; n++) {
|
||||
if (a_classes[n] == s_class)
|
||||
continue;
|
||||
a_newClasses[a_newClasses.length] = a_classes[n];
|
||||
}
|
||||
e_elem.className = a_newClasses.join(' ');
|
||||
return true;
|
||||
}
|
||||
|
||||
function f_getPosition (e_elemRef, s_coord) {
|
||||
var n_pos = 0, n_offset,
|
||||
e_elem = e_elemRef;
|
||||
|
||||
while (e_elem) {
|
||||
n_offset = e_elem["offset" + s_coord];
|
||||
n_pos += n_offset;
|
||||
e_elem = e_elem.offsetParent;
|
||||
}
|
||||
|
||||
e_elem = e_elemRef;
|
||||
while (e_elem != document.body) {
|
||||
n_offset = e_elem["scroll" + s_coord];
|
||||
if (n_offset && e_elem.style.overflow == 'scroll')
|
||||
n_pos -= n_offset;
|
||||
e_elem = e_elem.parentNode;
|
||||
}
|
||||
return n_pos;
|
||||
}
|
||||
|
||||
function f_tcalInit () {
|
||||
|
||||
if (!document.getElementsByTagName)
|
||||
return;
|
||||
|
||||
var e_input, a_inputs = f_tcalGetInputs();
|
||||
for (var n = 0; n < a_inputs.length; n++) {
|
||||
e_input = a_inputs[n];
|
||||
e_input.onclick = f_tcalOnClick;
|
||||
f_tcalAddClass(e_input, A_TCALCONF.cssprefix + 'Input');
|
||||
}
|
||||
|
||||
window.A_TCALTOKENS_IDX = {};
|
||||
for (n = 0; n < A_TCALTOKENS.length; n++)
|
||||
A_TCALTOKENS_IDX[A_TCALTOKENS[n]['t']] = A_TCALTOKENS[n];
|
||||
}
|
||||
|
||||
function f_tcalAddOnload (f_func) {
|
||||
if (document.addEventListener) {
|
||||
window.addEventListener('load', f_func, false);
|
||||
}
|
||||
else if (window.attachEvent) {
|
||||
window.attachEvent('onload', f_func);
|
||||
}
|
||||
else {
|
||||
var f_onLoad = window.onload;
|
||||
if (typeof window.onload != 'function') {
|
||||
window.onload = f_func;
|
||||
}
|
||||
else {
|
||||
window.onload = function() {
|
||||
f_onLoad();
|
||||
f_func();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
f_tcalAddOnload (f_tcalInit);
|
||||
|
After Width: | Height: | Size: 125 B |
|
After Width: | Height: | Size: 60 B |
|
After Width: | Height: | Size: 70 B |
|
After Width: | Height: | Size: 138 B |
|
After Width: | Height: | Size: 59 B |
|
After Width: | Height: | Size: 69 B |
|
After Width: | Height: | Size: 26 KiB |
@@ -0,0 +1,38 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="application/xhtml+xml; charset=utf-8" />
|
||||
<title>Customized Calendar</title>
|
||||
<style type="text/css">
|
||||
form { margin: 50px 0 0 50px; }
|
||||
.red-text { color: red; width: 200px; }
|
||||
</style>
|
||||
|
||||
<!-- link calendar resources -->
|
||||
<link rel="stylesheet" type="text/css" href="tcal.css" />
|
||||
<script type="text/javascript" src="language.js"></script>
|
||||
<script type="text/javascript" src="tcal.js"></script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<form action="#">
|
||||
<!-- add class="tcal" to your input field -->
|
||||
<div><input type="text" name="date1" class="tcal" value="Thirsday, September 22nd 2011" /></div>
|
||||
<div><input type="text" name="date2" class="tcal red-text" value="" /></div>
|
||||
<div><input type="text" name="no-date" value="Regular Text" /></div>
|
||||
</form>
|
||||
|
||||
<h1>Customizations</h1>
|
||||
<ul>
|
||||
<li>Multiple calendars</li>
|
||||
<li>Calendar preset to specific date</li>
|
||||
<li>Calendar settings in separate file, can be generated dynamically on server or client side</li>
|
||||
<li>Custom CSS class applied to input without conflict with calendar's code</li>
|
||||
<li>Date format, week start and year scrolling is different from first demo</li>
|
||||
<li>Customized CSS prefix</li>
|
||||
<li>Customized styles: font size, background etc</li>
|
||||
<li>Invisible dates in other months</li>
|
||||
</ul>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,14 @@
|
||||
// default settins - this structure can be moved in separate file in multilangual applications
|
||||
var A_TCALCONF = {
|
||||
'cssprefix' : 'tc',
|
||||
'months' : ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'],
|
||||
'weekdays' : ['Su', 'Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa'],
|
||||
'longwdays' : ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'],
|
||||
'yearscroll' : false, // show year scroller
|
||||
'weekstart' : 1, // first day of week: 0-Su or 1-Mo
|
||||
'prevyear' : 'Previous Year',
|
||||
'nextyear' : 'Next Year',
|
||||
'prevmonth' : 'Previous Month',
|
||||
'nextmonth' : 'Next Month',
|
||||
'format' : 'l, F jS Y' // 'd-m-Y', Y-m-d', 'l, F jS Y'
|
||||
};
|
||||
@@ -0,0 +1,99 @@
|
||||
/*
|
||||
Stylesheet for Tigra Calendar v5.0
|
||||
Product is Public Domain (Free for any kind of applicaiton, customization and derivative works are allowed)
|
||||
URL: http://www.softcomplex.com/products/tigra_calendar/
|
||||
|
||||
- all image paths are relative to path of stylesheet
|
||||
- the styles below can be moved into the document or in existing stylesheet
|
||||
|
||||
*/
|
||||
|
||||
/* input box in default state */
|
||||
.tcInput {
|
||||
background: url('img/cal.gif') 100% 50% no-repeat;
|
||||
padding-right: 20px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
/* additional properties for input boxe in activated state, above still applies unless in conflict */
|
||||
.tcActive {
|
||||
background-image: url('img/no_cal.gif');
|
||||
}
|
||||
/* container of calendar's pop-up */
|
||||
#tc {
|
||||
position: absolute;
|
||||
visibility: hidden;
|
||||
z-index: 100;
|
||||
width: 200px;
|
||||
background: url('img/texture.jpg');
|
||||
margin-top: 2px;
|
||||
padding: 0 2px 2px 2px;
|
||||
border: 1px solid silver;
|
||||
|
||||
-moz-box-shadow: 3px 3px 4px silver;
|
||||
-webkit-box-shadow: 3px 3px 4px silver;
|
||||
box-shadow: 3px 3px 4px silver;
|
||||
-ms-filter: "progid:DXImageTransform.Microsoft.Shadow(Strength=4, Direction=135, Color='silver')";
|
||||
filter: progid:DXImageTransform.Microsoft.Shadow(Strength=4, Direction=135, Color='silver');
|
||||
}
|
||||
/* table containing navigation and current month */
|
||||
#tcControls {
|
||||
border-collapse: collapse;
|
||||
border: 0;
|
||||
width: 100%;
|
||||
}
|
||||
#tcControls td {
|
||||
border-collapse: collapse;
|
||||
border: 0;
|
||||
padding: 0;
|
||||
width: 16px;
|
||||
background-position: 50% 50%;
|
||||
background-repeat: no-repeat;
|
||||
cursor: pointer;
|
||||
}
|
||||
#tcControls th {
|
||||
border-collapse: collapse;
|
||||
border: 0;
|
||||
padding: 0;
|
||||
line-height: 25px;
|
||||
font-size: 14px;
|
||||
text-align: center;
|
||||
font-family: Georgia, 'Times New Roman', Times, serif;
|
||||
font-weight: bold;
|
||||
white-space: nowrap;
|
||||
}
|
||||
#tcPrevYear { background-image: url('img/prev_year.gif'); }
|
||||
#tcPrevMonth { background-image: url('img/prev_mon.gif'); }
|
||||
#tcNextMonth { background-image: url('img/next_mon.gif'); }
|
||||
#tcNextYear { background-image: url('img/next_year.gif'); }
|
||||
|
||||
/* table containing week days header and calendar grid */
|
||||
#tcGrid {
|
||||
border-collapse: collapse;
|
||||
border: 1px solid silver;
|
||||
width: 100%;
|
||||
}
|
||||
#tcGrid th {
|
||||
border: 1px solid silver;
|
||||
border-collapse: collapse;
|
||||
padding: 3px 0;
|
||||
text-align: center;
|
||||
font-family: Georgia, 'Times New Roman', Times, serif;
|
||||
font-size: 12px;
|
||||
background-color: gray;
|
||||
color: white;
|
||||
}
|
||||
#tcGrid td {
|
||||
border: 0;
|
||||
border-collapse: collapse;
|
||||
padding: 2px 0;
|
||||
text-align: center;
|
||||
font-family: Georgia, 'Times New Roman', Times, serif;
|
||||
width: 14%;
|
||||
font-size: 14px;
|
||||
cursor: pointer;
|
||||
}
|
||||
#tcGrid td.tcOtherMonth { color: transparent; }
|
||||
#tcGrid td.tcWeekend { background-color: #0C0; font-weight: bold; }
|
||||
#tcGrid td.tcToday { border: 1px solid orange; }
|
||||
#tcGrid td.tcSelected { background-color: yellow; }
|
||||
@@ -0,0 +1,349 @@
|
||||
// Tigra Calendar v5.2 (11/20/2011)
|
||||
// http://www.softcomplex.com/products/tigra_calendar/
|
||||
// License: Public Domain... You're welcome.
|
||||
|
||||
// default settins - this structure can be moved in separate file in multilangual applications
|
||||
var A_TCALCONF = {
|
||||
'cssprefix' : 'tcal',
|
||||
'months' : ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'],
|
||||
'weekdays' : ['Su', 'Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa'],
|
||||
'longwdays' : ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'],
|
||||
'yearscroll' : true, // show year scroller
|
||||
'weekstart' : 0, // first day of week: 0-Su or 1-Mo
|
||||
'prevyear' : 'Previous Year',
|
||||
'nextyear' : 'Next Year',
|
||||
'prevmonth' : 'Previous Month',
|
||||
'nextmonth' : 'Next Month',
|
||||
'format' : 'm/d/Y' // 'd-m-Y', Y-m-d', 'l, F jS Y'
|
||||
};
|
||||
|
||||
var A_TCALTOKENS = [
|
||||
// A full numeric representation of a year, 4 digits
|
||||
{'t': 'Y', 'r': '19\\d{2}|20\\d{2}', 'p': function (d_date, n_value) { d_date.setFullYear(Number(n_value)); return d_date; }, 'g': function (d_date) { var n_year = d_date.getFullYear(); return n_year; }},
|
||||
// Numeric representation of a month, with leading zeros
|
||||
{'t': 'm', 'r': '0?[1-9]|1[0-2]', 'p': function (d_date, n_value) { d_date.setMonth(Number(n_value) - 1); return d_date; }, 'g': function (d_date) { var n_month = d_date.getMonth() + 1; return (n_month < 10 ? '0' : '') + n_month }},
|
||||
// A full textual representation of a month, such as January or March
|
||||
{'t': 'F', 'r': A_TCALCONF.months.join('|'), 'p': function (d_date, s_value) { for (var m = 0; m < 12; m++) if (A_TCALCONF.months[m] == s_value) { d_date.setMonth(m); return d_date; }}, 'g': function (d_date) { return A_TCALCONF.months[d_date.getMonth()]; }},
|
||||
// Day of the month, 2 digits with leading zeros
|
||||
{'t': 'd', 'r': '0?[1-9]|[12][0-9]|3[01]', 'p': function (d_date, n_value) { d_date.setDate(Number(n_value)); if (d_date.getDate() != n_value) d_date.setDate(0); return d_date }, 'g': function (d_date) { var n_date = d_date.getDate(); return (n_date < 10 ? '0' : '') + n_date; }},
|
||||
// Day of the month without leading zeros
|
||||
{'t': 'j', 'r': '0?[1-9]|[12][0-9]|3[01]', 'p': function (d_date, n_value) { d_date.setDate(Number(n_value)); if (d_date.getDate() != n_value) d_date.setDate(0); return d_date }, 'g': function (d_date) { var n_date = d_date.getDate(); return n_date; }},
|
||||
// A full textual representation of the day of the week
|
||||
{'t': 'l', 'r': A_TCALCONF.longwdays.join('|'), 'p': function (d_date, s_value) { return d_date }, 'g': function (d_date) { return A_TCALCONF.longwdays[d_date.getDay()]; }},
|
||||
// English ordinal suffix for the day of the month, 2 characters
|
||||
{'t': 'S', 'r': 'st|nd|rd|th', 'p': function (d_date, s_value) { return d_date }, 'g': function (d_date) { n_date = d_date.getDate(); if (n_date % 10 == 1 && n_date != 11) return 'st'; if (n_date % 10 == 2 && n_date != 12) return 'nd'; if (n_date % 10 == 3 && n_date != 13) return 'rd'; return 'th'; }}
|
||||
|
||||
];
|
||||
|
||||
function f_tcalGetHTML (d_date) {
|
||||
|
||||
var e_input = f_tcalGetInputs(true);
|
||||
if (!e_input) return;
|
||||
|
||||
var s_pfx = A_TCALCONF.cssprefix,
|
||||
s_format = A_TCALCONF.format;
|
||||
|
||||
// today from config or client date
|
||||
var d_today = f_tcalParseDate(A_TCALCONF.today, A_TCALCONF.format);
|
||||
if (!d_today)
|
||||
d_today = f_tcalResetTime(new Date());
|
||||
|
||||
// selected date from input or config or today
|
||||
var d_selected = f_tcalParseDate(e_input.value, s_format);
|
||||
if (!d_selected)
|
||||
d_selected = f_tcalParseDate(A_TCALCONF.selected, A_TCALCONF.format);
|
||||
if (!d_selected)
|
||||
d_selected = new Date(d_today);
|
||||
|
||||
// show calendar for passed or selected date
|
||||
d_date = d_date ? f_tcalResetTime(d_date) : new Date(d_selected);
|
||||
|
||||
var d_firstDay = new Date(d_date);
|
||||
d_firstDay.setDate(1);
|
||||
d_firstDay.setDate(1 - (7 + d_firstDay.getDay() - A_TCALCONF.weekstart) % 7);
|
||||
|
||||
var a_class, s_html = '<table id="' + s_pfx + 'Controls"><tbody><tr>'
|
||||
+ (A_TCALCONF.yearscroll ? '<td id="' + s_pfx + 'PrevYear" ' + f_tcalRelDate(d_date, -1, 'y') + ' title="' + A_TCALCONF.prevyear + '"></td>' : '')
|
||||
+ '<td id="' + s_pfx + 'PrevMonth"' + f_tcalRelDate(d_date, -1) + ' title="' + A_TCALCONF.prevmonth + '"></td><th>'
|
||||
+ A_TCALCONF.months[d_date.getMonth()] + ' ' + d_date.getFullYear()
|
||||
+ '</th><td id="' + s_pfx + 'NextMonth"' + f_tcalRelDate(d_date, 1) + ' title="' + A_TCALCONF.nextmonth + '"></td>'
|
||||
+ (A_TCALCONF.yearscroll ? '<td id="' + s_pfx + 'NextYear"' + f_tcalRelDate(d_date, 1, 'y') + ' title="' + A_TCALCONF.nextyear + '"></td>' : '')
|
||||
+ '</tr></tbody></table><table id="' + s_pfx + 'Grid"><tbody><tr>';
|
||||
|
||||
// print weekdays titles
|
||||
for (var i = 0; i < 7; i++)
|
||||
s_html += '<th>' + A_TCALCONF.weekdays[(A_TCALCONF.weekstart + i) % 7] + '</th>';
|
||||
s_html += '</tr>' ;
|
||||
|
||||
// print calendar table
|
||||
var n_date, n_month, d_current = new Date(d_firstDay);
|
||||
while (d_current.getMonth() == d_date.getMonth() ||
|
||||
d_current.getMonth() == d_firstDay.getMonth()) {
|
||||
|
||||
s_html +='<tr>';
|
||||
for (var n_wday = 0; n_wday < 7; n_wday++) {
|
||||
|
||||
a_class = [];
|
||||
n_date = d_current.getDate();
|
||||
n_month = d_current.getMonth();
|
||||
|
||||
if (d_current.getMonth() != d_date.getMonth())
|
||||
a_class[a_class.length] = s_pfx + 'OtherMonth';
|
||||
if (d_current.getDay() == 0 || d_current.getDay() == 6)
|
||||
a_class[a_class.length] = s_pfx + 'Weekend';
|
||||
if (d_current.valueOf() == d_today.valueOf())
|
||||
a_class[a_class.length] = s_pfx + 'Today';
|
||||
if (d_current.valueOf() == d_selected.valueOf())
|
||||
a_class[a_class.length] = s_pfx + 'Selected';
|
||||
|
||||
s_html += '<td' + f_tcalRelDate(d_current) + (a_class.length ? ' class="' + a_class.join(' ') + '">' : '>') + n_date + '</td>';
|
||||
d_current.setDate(++n_date);
|
||||
}
|
||||
s_html +='</tr>';
|
||||
}
|
||||
s_html +='</tbody></table>';
|
||||
|
||||
return s_html;
|
||||
}
|
||||
|
||||
function f_tcalRelDate (d_date, d_diff, s_units) {
|
||||
|
||||
var s_units = (s_units == 'y' ? 'FullYear' : 'Month');
|
||||
var d_result = new Date(d_date);
|
||||
if (d_diff) {
|
||||
d_result['set' + s_units](d_date['get' + s_units]() + d_diff);
|
||||
if (d_result.getDate() != d_date.getDate())
|
||||
d_result.setDate(0);
|
||||
}
|
||||
return ' onclick="f_tcalUpdate(' + d_result.valueOf() + (d_diff ? ',1' : '') + ')"';
|
||||
}
|
||||
|
||||
function f_tcalResetTime (d_date) {
|
||||
d_date.setMilliseconds(0);
|
||||
d_date.setSeconds(0);
|
||||
d_date.setMinutes(0);
|
||||
d_date.setHours(12);
|
||||
return d_date;
|
||||
}
|
||||
|
||||
// closes calendar and returns all inputs to default state
|
||||
function f_tcalCancel () {
|
||||
|
||||
var s_pfx = A_TCALCONF.cssprefix;
|
||||
var e_cal = document.getElementById(s_pfx);
|
||||
if (e_cal)
|
||||
e_cal.style.visibility = '';
|
||||
var a_inputs = f_tcalGetInputs();
|
||||
for (var n = 0; n < a_inputs.length; n++)
|
||||
f_tcalRemoveClass(a_inputs[n], s_pfx + 'Active');
|
||||
}
|
||||
|
||||
function f_tcalUpdate (n_date, b_keepOpen) {
|
||||
|
||||
var e_input = f_tcalGetInputs(true);
|
||||
if (!e_input) return;
|
||||
|
||||
d_date = new Date(n_date);
|
||||
var s_pfx = A_TCALCONF.cssprefix;
|
||||
|
||||
if (b_keepOpen) {
|
||||
var e_cal = document.getElementById(s_pfx);
|
||||
if (!e_cal || e_cal.style.visibility != 'visible') return;
|
||||
e_cal.innerHTML = f_tcalGetHTML(d_date, e_input);
|
||||
}
|
||||
else {
|
||||
e_input.value = f_tcalGenerateDate(d_date, A_TCALCONF.format);
|
||||
f_tcalCancel();
|
||||
}
|
||||
}
|
||||
|
||||
function f_tcalOnClick () {
|
||||
|
||||
// see if already opened
|
||||
var s_pfx = A_TCALCONF.cssprefix;
|
||||
var s_activeClass = s_pfx + 'Active';
|
||||
var b_close = f_tcalHasClass(this, s_activeClass);
|
||||
|
||||
// close all clalendars
|
||||
f_tcalCancel();
|
||||
if (b_close) return;
|
||||
|
||||
// get position of input
|
||||
f_tcalAddClass(this, s_activeClass);
|
||||
|
||||
var n_left = f_getPosition (this, 'Left'),
|
||||
n_top = f_getPosition (this, 'Top') + this.offsetHeight;
|
||||
|
||||
var e_cal = document.getElementById(s_pfx);
|
||||
if (!e_cal) {
|
||||
e_cal = document.createElement('div');
|
||||
e_cal.onselectstart = function () { return false };
|
||||
e_cal.id = s_pfx;
|
||||
document.getElementsByTagName("body").item(0).appendChild(e_cal);
|
||||
}
|
||||
e_cal.innerHTML = f_tcalGetHTML(null);
|
||||
e_cal.style.top = n_top + 'px';
|
||||
e_cal.style.left = (n_left + this.offsetWidth - e_cal.offsetWidth) + 'px';
|
||||
e_cal.style.visibility = 'visible';
|
||||
}
|
||||
|
||||
function f_tcalParseDate (s_date, s_format) {
|
||||
|
||||
if (!s_date) return;
|
||||
|
||||
var s_char, s_regexp = '^', a_tokens = {}, a_options, n_token = 0;
|
||||
for (var n = 0; n < s_format.length; n++) {
|
||||
s_char = s_format.charAt(n);
|
||||
if (A_TCALTOKENS_IDX[s_char]) {
|
||||
a_tokens[s_char] = ++n_token;
|
||||
s_regexp += '(' + A_TCALTOKENS_IDX[s_char]['r'] + ')';
|
||||
}
|
||||
else if (s_char == ' ')
|
||||
s_regexp += '\\s';
|
||||
else
|
||||
s_regexp += (s_char.match(/[\w\d]/) ? '' : '\\') + s_char;
|
||||
}
|
||||
var r_date = new RegExp(s_regexp + '$');
|
||||
if (!s_date.match(r_date)) return;
|
||||
|
||||
var s_val, d_date = f_tcalResetTime(new Date());
|
||||
d_date.setDate(1);
|
||||
|
||||
for (n = 0; n < A_TCALTOKENS.length; n++) {
|
||||
s_char = A_TCALTOKENS[n]['t'];
|
||||
if (!a_tokens[s_char])
|
||||
continue;
|
||||
s_val = RegExp['$' + a_tokens[s_char]];
|
||||
d_date = A_TCALTOKENS[n]['p'](d_date, s_val);
|
||||
}
|
||||
|
||||
return d_date;
|
||||
}
|
||||
|
||||
function f_tcalGenerateDate (d_date, s_format) {
|
||||
|
||||
var s_char, s_date = '';
|
||||
for (var n = 0; n < s_format.length; n++) {
|
||||
s_char = s_format.charAt(n);
|
||||
s_date += A_TCALTOKENS_IDX[s_char] ? A_TCALTOKENS_IDX[s_char]['g'](d_date) : s_char;
|
||||
}
|
||||
return s_date;
|
||||
}
|
||||
|
||||
function f_tcalGetInputs (b_active) {
|
||||
|
||||
var a_inputs = document.getElementsByTagName('input'),
|
||||
e_input, s_rel, a_result = [];
|
||||
|
||||
for (n = 0; n < a_inputs.length; n++) {
|
||||
|
||||
e_input = a_inputs[n];
|
||||
if (!e_input.type || e_input.type != 'text')
|
||||
continue;
|
||||
|
||||
if (!f_tcalHasClass(e_input, 'tcal'))
|
||||
continue;
|
||||
|
||||
if (b_active && f_tcalHasClass(e_input, A_TCALCONF.cssprefix + 'Active'))
|
||||
return e_input;
|
||||
|
||||
a_result[a_result.length] = e_input;
|
||||
}
|
||||
return b_active ? null : a_result;
|
||||
}
|
||||
|
||||
function f_tcalHasClass (e_elem, s_class) {
|
||||
var s_classes = e_elem.className;
|
||||
if (!s_classes)
|
||||
return false;
|
||||
var a_classes = s_classes.split(' ');
|
||||
for (var n = 0; n < a_classes.length; n++)
|
||||
if (a_classes[n] == s_class)
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
function f_tcalAddClass (e_elem, s_class) {
|
||||
if (f_tcalHasClass (e_elem, s_class))
|
||||
return;
|
||||
|
||||
var s_classes = e_elem.className;
|
||||
e_elem.className = (s_classes ? s_classes + ' ' : '') + s_class;
|
||||
}
|
||||
|
||||
function f_tcalRemoveClass (e_elem, s_class) {
|
||||
var s_classes = e_elem.className;
|
||||
if (!s_classes || s_classes.indexOf(s_class) == -1)
|
||||
return false;
|
||||
|
||||
var a_classes = s_classes.split(' '),
|
||||
a_newClasses = [];
|
||||
|
||||
for (var n = 0; n < a_classes.length; n++) {
|
||||
if (a_classes[n] == s_class)
|
||||
continue;
|
||||
a_newClasses[a_newClasses.length] = a_classes[n];
|
||||
}
|
||||
e_elem.className = a_newClasses.join(' ');
|
||||
return true;
|
||||
}
|
||||
|
||||
function f_getPosition (e_elemRef, s_coord) {
|
||||
var n_pos = 0, n_offset,
|
||||
e_elem = e_elemRef;
|
||||
|
||||
while (e_elem) {
|
||||
n_offset = e_elem["offset" + s_coord];
|
||||
n_pos += n_offset;
|
||||
e_elem = e_elem.offsetParent;
|
||||
}
|
||||
|
||||
e_elem = e_elemRef;
|
||||
while (e_elem != document.body) {
|
||||
n_offset = e_elem["scroll" + s_coord];
|
||||
if (n_offset && e_elem.style.overflow == 'scroll')
|
||||
n_pos -= n_offset;
|
||||
e_elem = e_elem.parentNode;
|
||||
}
|
||||
return n_pos;
|
||||
}
|
||||
|
||||
function f_tcalInit () {
|
||||
|
||||
if (!document.getElementsByTagName)
|
||||
return;
|
||||
|
||||
var e_input, a_inputs = f_tcalGetInputs();
|
||||
for (var n = 0; n < a_inputs.length; n++) {
|
||||
e_input = a_inputs[n];
|
||||
e_input.onclick = f_tcalOnClick;
|
||||
f_tcalAddClass(e_input, A_TCALCONF.cssprefix + 'Input');
|
||||
}
|
||||
|
||||
window.A_TCALTOKENS_IDX = {};
|
||||
for (n = 0; n < A_TCALTOKENS.length; n++)
|
||||
A_TCALTOKENS_IDX[A_TCALTOKENS[n]['t']] = A_TCALTOKENS[n];
|
||||
}
|
||||
|
||||
function f_tcalAddOnload (f_func) {
|
||||
if (document.addEventListener) {
|
||||
window.addEventListener('load', f_func, false);
|
||||
}
|
||||
else if (window.attachEvent) {
|
||||
window.attachEvent('onload', f_func);
|
||||
}
|
||||
else {
|
||||
var f_onLoad = window.onload;
|
||||
if (typeof window.onload != 'function') {
|
||||
window.onload = f_func;
|
||||
}
|
||||
else {
|
||||
window.onload = function() {
|
||||
f_onLoad();
|
||||
f_func();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
f_tcalAddOnload (f_tcalInit);
|
||||
|
After Width: | Height: | Size: 125 B |
|
After Width: | Height: | Size: 60 B |
|
After Width: | Height: | Size: 70 B |
|
After Width: | Height: | Size: 138 B |
|
After Width: | Height: | Size: 59 B |
|
After Width: | Height: | Size: 69 B |
@@ -0,0 +1,50 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="application/xhtml+xml; charset=utf-8" />
|
||||
<title>Dynamilcally Created Calendars</title>
|
||||
|
||||
<!-- link calendar resources -->
|
||||
<link rel="stylesheet" type="text/css" href="tcal.css" />
|
||||
<script type="text/javascript" src="tcal.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<script type="text/javascript">
|
||||
//<![CDATA[
|
||||
function f_createCalendars(n_number) {
|
||||
|
||||
var e_container = document.getElementById('container');
|
||||
|
||||
if (isNaN(n_number) || !e_container) return;
|
||||
|
||||
f_tcalCancel();
|
||||
var s_html = '';
|
||||
|
||||
for (var i = 1; i <= n_number; i++)
|
||||
s_html += '<div>' + i + '. <input type="text" name="date' + i + '" class="tcal" /></div>';
|
||||
|
||||
e_container.innerHTML = s_html;
|
||||
|
||||
// all you need is call this after your inputs are added
|
||||
f_tcalInit();
|
||||
}
|
||||
//]]>
|
||||
</script>
|
||||
<form action="#">
|
||||
<div>
|
||||
<label for="cal-number">Create calendars:</label>
|
||||
<select id="cal-number" onchange="f_createCalendars(this.options[this.selectedIndex].value)">
|
||||
<option value="0">none</option>
|
||||
<option value="1">1</option>
|
||||
<option value="2">2</option>
|
||||
<option value="3">3</option>
|
||||
<option value="4">4</option>
|
||||
<option value="5">5</option>
|
||||
</select>
|
||||
</div>
|
||||
<div id="container"></div>
|
||||
</form>
|
||||
|
||||
<p>This sample demonstrates how to use Tigra Calendar with input boxes created dynamically after page's initialization.</p>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,100 @@
|
||||
/*
|
||||
Stylesheet for Tigra Calendar v5.0
|
||||
Product is Public Domain (Free for any kind of applicaiton, customization and derivative works are allowed)
|
||||
URL: http://www.softcomplex.com/products/tigra_calendar/
|
||||
|
||||
- all image paths are relative to path of stylesheet
|
||||
- the styles below can be moved into the document or in existing stylesheet
|
||||
|
||||
*/
|
||||
|
||||
/* input box in default state */
|
||||
.tcalInput {
|
||||
background: url('img/cal.gif') 100% 50% no-repeat;
|
||||
padding-right: 20px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
/* additional properties for input boxe in activated state, above still applies unless in conflict */
|
||||
.tcalActive {
|
||||
background-image: url('img/no_cal.gif');
|
||||
}
|
||||
/* container of calendar's pop-up */
|
||||
#tcal {
|
||||
position: absolute;
|
||||
visibility: hidden;
|
||||
z-index: 100;
|
||||
width: 170px;
|
||||
background-color: white;
|
||||
margin-top: 2px;
|
||||
padding: 0 2px 2px 2px;
|
||||
border: 1px solid silver;
|
||||
|
||||
-moz-box-shadow: 3px 3px 4px silver;
|
||||
-webkit-box-shadow: 3px 3px 4px silver;
|
||||
box-shadow: 3px 3px 4px silver;
|
||||
-ms-filter: "progid:DXImageTransform.Microsoft.Shadow(Strength=4, Direction=135, Color='silver')";
|
||||
filter: progid:DXImageTransform.Microsoft.Shadow(Strength=4, Direction=135, Color='silver');
|
||||
}
|
||||
|
||||
/* table containing navigation and current month */
|
||||
#tcalControls {
|
||||
border-collapse: collapse;
|
||||
border: 0;
|
||||
width: 100%;
|
||||
}
|
||||
#tcalControls td {
|
||||
border-collapse: collapse;
|
||||
border: 0;
|
||||
padding: 0;
|
||||
width: 16px;
|
||||
background-position: 50% 50%;
|
||||
background-repeat: no-repeat;
|
||||
cursor: pointer;
|
||||
}
|
||||
#tcalControls th {
|
||||
border-collapse: collapse;
|
||||
border: 0;
|
||||
padding: 0;
|
||||
line-height: 25px;
|
||||
font-size: 10px;
|
||||
text-align: center;
|
||||
font-family: Tahoma, Geneva, sans-serif;
|
||||
font-weight: bold;
|
||||
white-space: nowrap;
|
||||
}
|
||||
#tcalPrevYear { background-image: url('img/prev_year.gif'); }
|
||||
#tcalPrevMonth { background-image: url('img/prev_mon.gif'); }
|
||||
#tcalNextMonth { background-image: url('img/next_mon.gif'); }
|
||||
#tcalNextYear { background-image: url('img/next_year.gif'); }
|
||||
|
||||
/* table containing week days header and calendar grid */
|
||||
#tcalGrid {
|
||||
border-collapse: collapse;
|
||||
border: 1px solid silver;
|
||||
width: 100%;
|
||||
}
|
||||
#tcalGrid th {
|
||||
border: 1px solid silver;
|
||||
border-collapse: collapse;
|
||||
padding: 3px 0;
|
||||
text-align: center;
|
||||
font-family: Tahoma, Geneva, sans-serif;
|
||||
font-size: 10px;
|
||||
background-color: gray;
|
||||
color: white;
|
||||
}
|
||||
#tcalGrid td {
|
||||
border: 0;
|
||||
border-collapse: collapse;
|
||||
padding: 2px 0;
|
||||
text-align: center;
|
||||
font-family: Tahoma, Geneva, sans-serif;
|
||||
width: 14%;
|
||||
font-size: 11px;
|
||||
cursor: pointer;
|
||||
}
|
||||
#tcalGrid td.tcalOtherMonth { color: silver; }
|
||||
#tcalGrid td.tcalWeekend { background-color: #ACD6F5; }
|
||||
#tcalGrid td.tcalToday { border: 1px solid red; }
|
||||
#tcalGrid td.tcalSelected { background-color: #FFB3BE; }
|
||||
@@ -0,0 +1,349 @@
|
||||
// Tigra Calendar v5.2 (11/20/2011)
|
||||
// http://www.softcomplex.com/products/tigra_calendar/
|
||||
// License: Public Domain... You're welcome.
|
||||
|
||||
// default settins - this structure can be moved in separate file in multilangual applications
|
||||
var A_TCALCONF = {
|
||||
'cssprefix' : 'tcal',
|
||||
'months' : ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'],
|
||||
'weekdays' : ['Su', 'Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa'],
|
||||
'longwdays' : ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'],
|
||||
'yearscroll' : true, // show year scroller
|
||||
'weekstart' : 0, // first day of week: 0-Su or 1-Mo
|
||||
'prevyear' : 'Previous Year',
|
||||
'nextyear' : 'Next Year',
|
||||
'prevmonth' : 'Previous Month',
|
||||
'nextmonth' : 'Next Month',
|
||||
'format' : 'm/d/Y' // 'd-m-Y', Y-m-d', 'l, F jS Y'
|
||||
};
|
||||
|
||||
var A_TCALTOKENS = [
|
||||
// A full numeric representation of a year, 4 digits
|
||||
{'t': 'Y', 'r': '19\\d{2}|20\\d{2}', 'p': function (d_date, n_value) { d_date.setFullYear(Number(n_value)); return d_date; }, 'g': function (d_date) { var n_year = d_date.getFullYear(); return n_year; }},
|
||||
// Numeric representation of a month, with leading zeros
|
||||
{'t': 'm', 'r': '0?[1-9]|1[0-2]', 'p': function (d_date, n_value) { d_date.setMonth(Number(n_value) - 1); return d_date; }, 'g': function (d_date) { var n_month = d_date.getMonth() + 1; return (n_month < 10 ? '0' : '') + n_month }},
|
||||
// A full textual representation of a month, such as January or March
|
||||
{'t': 'F', 'r': A_TCALCONF.months.join('|'), 'p': function (d_date, s_value) { for (var m = 0; m < 12; m++) if (A_TCALCONF.months[m] == s_value) { d_date.setMonth(m); return d_date; }}, 'g': function (d_date) { return A_TCALCONF.months[d_date.getMonth()]; }},
|
||||
// Day of the month, 2 digits with leading zeros
|
||||
{'t': 'd', 'r': '0?[1-9]|[12][0-9]|3[01]', 'p': function (d_date, n_value) { d_date.setDate(Number(n_value)); if (d_date.getDate() != n_value) d_date.setDate(0); return d_date }, 'g': function (d_date) { var n_date = d_date.getDate(); return (n_date < 10 ? '0' : '') + n_date; }},
|
||||
// Day of the month without leading zeros
|
||||
{'t': 'j', 'r': '0?[1-9]|[12][0-9]|3[01]', 'p': function (d_date, n_value) { d_date.setDate(Number(n_value)); if (d_date.getDate() != n_value) d_date.setDate(0); return d_date }, 'g': function (d_date) { var n_date = d_date.getDate(); return n_date; }},
|
||||
// A full textual representation of the day of the week
|
||||
{'t': 'l', 'r': A_TCALCONF.longwdays.join('|'), 'p': function (d_date, s_value) { return d_date }, 'g': function (d_date) { return A_TCALCONF.longwdays[d_date.getDay()]; }},
|
||||
// English ordinal suffix for the day of the month, 2 characters
|
||||
{'t': 'S', 'r': 'st|nd|rd|th', 'p': function (d_date, s_value) { return d_date }, 'g': function (d_date) { n_date = d_date.getDate(); if (n_date % 10 == 1 && n_date != 11) return 'st'; if (n_date % 10 == 2 && n_date != 12) return 'nd'; if (n_date % 10 == 3 && n_date != 13) return 'rd'; return 'th'; }}
|
||||
|
||||
];
|
||||
|
||||
function f_tcalGetHTML (d_date) {
|
||||
|
||||
var e_input = f_tcalGetInputs(true);
|
||||
if (!e_input) return;
|
||||
|
||||
var s_pfx = A_TCALCONF.cssprefix,
|
||||
s_format = A_TCALCONF.format;
|
||||
|
||||
// today from config or client date
|
||||
var d_today = f_tcalParseDate(A_TCALCONF.today, A_TCALCONF.format);
|
||||
if (!d_today)
|
||||
d_today = f_tcalResetTime(new Date());
|
||||
|
||||
// selected date from input or config or today
|
||||
var d_selected = f_tcalParseDate(e_input.value, s_format);
|
||||
if (!d_selected)
|
||||
d_selected = f_tcalParseDate(A_TCALCONF.selected, A_TCALCONF.format);
|
||||
if (!d_selected)
|
||||
d_selected = new Date(d_today);
|
||||
|
||||
// show calendar for passed or selected date
|
||||
d_date = d_date ? f_tcalResetTime(d_date) : new Date(d_selected);
|
||||
|
||||
var d_firstDay = new Date(d_date);
|
||||
d_firstDay.setDate(1);
|
||||
d_firstDay.setDate(1 - (7 + d_firstDay.getDay() - A_TCALCONF.weekstart) % 7);
|
||||
|
||||
var a_class, s_html = '<table id="' + s_pfx + 'Controls"><tbody><tr>'
|
||||
+ (A_TCALCONF.yearscroll ? '<td id="' + s_pfx + 'PrevYear" ' + f_tcalRelDate(d_date, -1, 'y') + ' title="' + A_TCALCONF.prevyear + '"></td>' : '')
|
||||
+ '<td id="' + s_pfx + 'PrevMonth"' + f_tcalRelDate(d_date, -1) + ' title="' + A_TCALCONF.prevmonth + '"></td><th>'
|
||||
+ A_TCALCONF.months[d_date.getMonth()] + ' ' + d_date.getFullYear()
|
||||
+ '</th><td id="' + s_pfx + 'NextMonth"' + f_tcalRelDate(d_date, 1) + ' title="' + A_TCALCONF.nextmonth + '"></td>'
|
||||
+ (A_TCALCONF.yearscroll ? '<td id="' + s_pfx + 'NextYear"' + f_tcalRelDate(d_date, 1, 'y') + ' title="' + A_TCALCONF.nextyear + '"></td>' : '')
|
||||
+ '</tr></tbody></table><table id="' + s_pfx + 'Grid"><tbody><tr>';
|
||||
|
||||
// print weekdays titles
|
||||
for (var i = 0; i < 7; i++)
|
||||
s_html += '<th>' + A_TCALCONF.weekdays[(A_TCALCONF.weekstart + i) % 7] + '</th>';
|
||||
s_html += '</tr>' ;
|
||||
|
||||
// print calendar table
|
||||
var n_date, n_month, d_current = new Date(d_firstDay);
|
||||
while (d_current.getMonth() == d_date.getMonth() ||
|
||||
d_current.getMonth() == d_firstDay.getMonth()) {
|
||||
|
||||
s_html +='<tr>';
|
||||
for (var n_wday = 0; n_wday < 7; n_wday++) {
|
||||
|
||||
a_class = [];
|
||||
n_date = d_current.getDate();
|
||||
n_month = d_current.getMonth();
|
||||
|
||||
if (d_current.getMonth() != d_date.getMonth())
|
||||
a_class[a_class.length] = s_pfx + 'OtherMonth';
|
||||
if (d_current.getDay() == 0 || d_current.getDay() == 6)
|
||||
a_class[a_class.length] = s_pfx + 'Weekend';
|
||||
if (d_current.valueOf() == d_today.valueOf())
|
||||
a_class[a_class.length] = s_pfx + 'Today';
|
||||
if (d_current.valueOf() == d_selected.valueOf())
|
||||
a_class[a_class.length] = s_pfx + 'Selected';
|
||||
|
||||
s_html += '<td' + f_tcalRelDate(d_current) + (a_class.length ? ' class="' + a_class.join(' ') + '">' : '>') + n_date + '</td>';
|
||||
d_current.setDate(++n_date);
|
||||
}
|
||||
s_html +='</tr>';
|
||||
}
|
||||
s_html +='</tbody></table>';
|
||||
|
||||
return s_html;
|
||||
}
|
||||
|
||||
function f_tcalRelDate (d_date, d_diff, s_units) {
|
||||
|
||||
var s_units = (s_units == 'y' ? 'FullYear' : 'Month');
|
||||
var d_result = new Date(d_date);
|
||||
if (d_diff) {
|
||||
d_result['set' + s_units](d_date['get' + s_units]() + d_diff);
|
||||
if (d_result.getDate() != d_date.getDate())
|
||||
d_result.setDate(0);
|
||||
}
|
||||
return ' onclick="f_tcalUpdate(' + d_result.valueOf() + (d_diff ? ',1' : '') + ')"';
|
||||
}
|
||||
|
||||
function f_tcalResetTime (d_date) {
|
||||
d_date.setMilliseconds(0);
|
||||
d_date.setSeconds(0);
|
||||
d_date.setMinutes(0);
|
||||
d_date.setHours(12);
|
||||
return d_date;
|
||||
}
|
||||
|
||||
// closes calendar and returns all inputs to default state
|
||||
function f_tcalCancel () {
|
||||
|
||||
var s_pfx = A_TCALCONF.cssprefix;
|
||||
var e_cal = document.getElementById(s_pfx);
|
||||
if (e_cal)
|
||||
e_cal.style.visibility = '';
|
||||
var a_inputs = f_tcalGetInputs();
|
||||
for (var n = 0; n < a_inputs.length; n++)
|
||||
f_tcalRemoveClass(a_inputs[n], s_pfx + 'Active');
|
||||
}
|
||||
|
||||
function f_tcalUpdate (n_date, b_keepOpen) {
|
||||
|
||||
var e_input = f_tcalGetInputs(true);
|
||||
if (!e_input) return;
|
||||
|
||||
d_date = new Date(n_date);
|
||||
var s_pfx = A_TCALCONF.cssprefix;
|
||||
|
||||
if (b_keepOpen) {
|
||||
var e_cal = document.getElementById(s_pfx);
|
||||
if (!e_cal || e_cal.style.visibility != 'visible') return;
|
||||
e_cal.innerHTML = f_tcalGetHTML(d_date, e_input);
|
||||
}
|
||||
else {
|
||||
e_input.value = f_tcalGenerateDate(d_date, A_TCALCONF.format);
|
||||
f_tcalCancel();
|
||||
}
|
||||
}
|
||||
|
||||
function f_tcalOnClick () {
|
||||
|
||||
// see if already opened
|
||||
var s_pfx = A_TCALCONF.cssprefix;
|
||||
var s_activeClass = s_pfx + 'Active';
|
||||
var b_close = f_tcalHasClass(this, s_activeClass);
|
||||
|
||||
// close all clalendars
|
||||
f_tcalCancel();
|
||||
if (b_close) return;
|
||||
|
||||
// get position of input
|
||||
f_tcalAddClass(this, s_activeClass);
|
||||
|
||||
var n_left = f_getPosition (this, 'Left'),
|
||||
n_top = f_getPosition (this, 'Top') + this.offsetHeight;
|
||||
|
||||
var e_cal = document.getElementById(s_pfx);
|
||||
if (!e_cal) {
|
||||
e_cal = document.createElement('div');
|
||||
e_cal.onselectstart = function () { return false };
|
||||
e_cal.id = s_pfx;
|
||||
document.getElementsByTagName("body").item(0).appendChild(e_cal);
|
||||
}
|
||||
e_cal.innerHTML = f_tcalGetHTML(null);
|
||||
e_cal.style.top = n_top + 'px';
|
||||
e_cal.style.left = (n_left + this.offsetWidth - e_cal.offsetWidth) + 'px';
|
||||
e_cal.style.visibility = 'visible';
|
||||
}
|
||||
|
||||
function f_tcalParseDate (s_date, s_format) {
|
||||
|
||||
if (!s_date) return;
|
||||
|
||||
var s_char, s_regexp = '^', a_tokens = {}, a_options, n_token = 0;
|
||||
for (var n = 0; n < s_format.length; n++) {
|
||||
s_char = s_format.charAt(n);
|
||||
if (A_TCALTOKENS_IDX[s_char]) {
|
||||
a_tokens[s_char] = ++n_token;
|
||||
s_regexp += '(' + A_TCALTOKENS_IDX[s_char]['r'] + ')';
|
||||
}
|
||||
else if (s_char == ' ')
|
||||
s_regexp += '\\s';
|
||||
else
|
||||
s_regexp += (s_char.match(/[\w\d]/) ? '' : '\\') + s_char;
|
||||
}
|
||||
var r_date = new RegExp(s_regexp + '$');
|
||||
if (!s_date.match(r_date)) return;
|
||||
|
||||
var s_val, d_date = f_tcalResetTime(new Date());
|
||||
d_date.setDate(1);
|
||||
|
||||
for (n = 0; n < A_TCALTOKENS.length; n++) {
|
||||
s_char = A_TCALTOKENS[n]['t'];
|
||||
if (!a_tokens[s_char])
|
||||
continue;
|
||||
s_val = RegExp['$' + a_tokens[s_char]];
|
||||
d_date = A_TCALTOKENS[n]['p'](d_date, s_val);
|
||||
}
|
||||
|
||||
return d_date;
|
||||
}
|
||||
|
||||
function f_tcalGenerateDate (d_date, s_format) {
|
||||
|
||||
var s_char, s_date = '';
|
||||
for (var n = 0; n < s_format.length; n++) {
|
||||
s_char = s_format.charAt(n);
|
||||
s_date += A_TCALTOKENS_IDX[s_char] ? A_TCALTOKENS_IDX[s_char]['g'](d_date) : s_char;
|
||||
}
|
||||
return s_date;
|
||||
}
|
||||
|
||||
function f_tcalGetInputs (b_active) {
|
||||
|
||||
var a_inputs = document.getElementsByTagName('input'),
|
||||
e_input, s_rel, a_result = [];
|
||||
|
||||
for (n = 0; n < a_inputs.length; n++) {
|
||||
|
||||
e_input = a_inputs[n];
|
||||
if (!e_input.type || e_input.type != 'text')
|
||||
continue;
|
||||
|
||||
if (!f_tcalHasClass(e_input, 'tcal'))
|
||||
continue;
|
||||
|
||||
if (b_active && f_tcalHasClass(e_input, A_TCALCONF.cssprefix + 'Active'))
|
||||
return e_input;
|
||||
|
||||
a_result[a_result.length] = e_input;
|
||||
}
|
||||
return b_active ? null : a_result;
|
||||
}
|
||||
|
||||
function f_tcalHasClass (e_elem, s_class) {
|
||||
var s_classes = e_elem.className;
|
||||
if (!s_classes)
|
||||
return false;
|
||||
var a_classes = s_classes.split(' ');
|
||||
for (var n = 0; n < a_classes.length; n++)
|
||||
if (a_classes[n] == s_class)
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
function f_tcalAddClass (e_elem, s_class) {
|
||||
if (f_tcalHasClass (e_elem, s_class))
|
||||
return;
|
||||
|
||||
var s_classes = e_elem.className;
|
||||
e_elem.className = (s_classes ? s_classes + ' ' : '') + s_class;
|
||||
}
|
||||
|
||||
function f_tcalRemoveClass (e_elem, s_class) {
|
||||
var s_classes = e_elem.className;
|
||||
if (!s_classes || s_classes.indexOf(s_class) == -1)
|
||||
return false;
|
||||
|
||||
var a_classes = s_classes.split(' '),
|
||||
a_newClasses = [];
|
||||
|
||||
for (var n = 0; n < a_classes.length; n++) {
|
||||
if (a_classes[n] == s_class)
|
||||
continue;
|
||||
a_newClasses[a_newClasses.length] = a_classes[n];
|
||||
}
|
||||
e_elem.className = a_newClasses.join(' ');
|
||||
return true;
|
||||
}
|
||||
|
||||
function f_getPosition (e_elemRef, s_coord) {
|
||||
var n_pos = 0, n_offset,
|
||||
e_elem = e_elemRef;
|
||||
|
||||
while (e_elem) {
|
||||
n_offset = e_elem["offset" + s_coord];
|
||||
n_pos += n_offset;
|
||||
e_elem = e_elem.offsetParent;
|
||||
}
|
||||
|
||||
e_elem = e_elemRef;
|
||||
while (e_elem != document.body) {
|
||||
n_offset = e_elem["scroll" + s_coord];
|
||||
if (n_offset && e_elem.style.overflow == 'scroll')
|
||||
n_pos -= n_offset;
|
||||
e_elem = e_elem.parentNode;
|
||||
}
|
||||
return n_pos;
|
||||
}
|
||||
|
||||
function f_tcalInit () {
|
||||
|
||||
if (!document.getElementsByTagName)
|
||||
return;
|
||||
|
||||
var e_input, a_inputs = f_tcalGetInputs();
|
||||
for (var n = 0; n < a_inputs.length; n++) {
|
||||
e_input = a_inputs[n];
|
||||
e_input.onclick = f_tcalOnClick;
|
||||
f_tcalAddClass(e_input, A_TCALCONF.cssprefix + 'Input');
|
||||
}
|
||||
|
||||
window.A_TCALTOKENS_IDX = {};
|
||||
for (n = 0; n < A_TCALTOKENS.length; n++)
|
||||
A_TCALTOKENS_IDX[A_TCALTOKENS[n]['t']] = A_TCALTOKENS[n];
|
||||
}
|
||||
|
||||
function f_tcalAddOnload (f_func) {
|
||||
if (document.addEventListener) {
|
||||
window.addEventListener('load', f_func, false);
|
||||
}
|
||||
else if (window.attachEvent) {
|
||||
window.attachEvent('onload', f_func);
|
||||
}
|
||||
else {
|
||||
var f_onLoad = window.onload;
|
||||
if (typeof window.onload != 'function') {
|
||||
window.onload = f_func;
|
||||
}
|
||||
else {
|
||||
window.onload = function() {
|
||||
f_onLoad();
|
||||
f_func();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
f_tcalAddOnload (f_tcalInit);
|
||||
@@ -0,0 +1,22 @@
|
||||
This is free and unencumbered software released into the public domain.
|
||||
|
||||
Anyone is free to copy, modify, publish, use, compile, sell, or
|
||||
distribute this software, either in source code form or as a compiled
|
||||
binary, for any purpose, commercial or non-commercial, and by any
|
||||
means.
|
||||
|
||||
In jurisdictions that recognize copyright laws, the author or authors
|
||||
of this software dedicate any and all copyright interest in the
|
||||
software to the public domain. We make this dedication for the benefit
|
||||
of the public at large and to the detriment of our heirs and
|
||||
successors. We intend this dedication to be an overt act of
|
||||
relinquishment in perpetuity of all present and future rights to this
|
||||
software under copyright law.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
|
||||
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
||||
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||
OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
After Width: | Height: | Size: 125 B |
|
After Width: | Height: | Size: 60 B |
|
After Width: | Height: | Size: 70 B |
|
After Width: | Height: | Size: 138 B |
|
After Width: | Height: | Size: 59 B |