Initialer Commit: Kundenverwaltung (PHP/Smarty)
Bestehende Codebasis als Ausgangsstand aufgenommen. - .gitignore: Kundendaten (uploads_*), Smarty-Compile-Cache (templates_c), Laufzeit-Temp und Datenbank-Dumps ausgeschlossen; Verzeichnisstruktur ueber .gitkeep erhalten - .gitattributes: Zeilenenden normalisiert (LF im Repo), Binaerformate markiert - db-backup.php: MySQL-Zugangsdaten kommen jetzt wie im Rest der Anwendung aus der externen Konfiguration statt hartkodiert aus der Datei; Passwort wird ueber eine temporaere Optionsdatei statt per Kommandozeile uebergeben, Fehler von mysqldump/gzip werden gemeldet, Aufraeumen aelterer Backups berechnet Jahr und Monat konsistent Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,73 @@
|
||||
<?php
|
||||
require_once("../incs/connectmysql.php");
|
||||
require('../smarty/libs/Smarty.class.php');
|
||||
|
||||
$smarty = new Smarty;
|
||||
|
||||
|
||||
if(isset($_GET["function"]) && !$err)
|
||||
{
|
||||
|
||||
if($_GET["function"] == "newart" && isset($_GET["artnr"]))
|
||||
{
|
||||
$qry=mysqli_query($dbconn, "SELECT id,bezeichn FROM artikeltyp");
|
||||
while($res=mysqli_fetch_assoc($qry))
|
||||
{
|
||||
$typids[] = $res["id"];
|
||||
$typnames[] = $res["bezeichn"];
|
||||
}
|
||||
$smarty->assign("typids",$typids);
|
||||
$smarty->assign("typs",$typnames);
|
||||
|
||||
$typids=array();
|
||||
$typnames=array();
|
||||
$qry=mysqli_query($dbconn, "SELECT id,einheit FROM einheit");
|
||||
while($res=mysqli_fetch_assoc($qry))
|
||||
{
|
||||
$typids[] = $res["id"];
|
||||
$typnames[] = $res["einheit"];
|
||||
}
|
||||
$smarty->assign("einhids",$typids);
|
||||
$smarty->assign("einhs",$typnames);
|
||||
$typids=array();
|
||||
$typnames=array();
|
||||
$qry=mysqli_query($dbconn, "SELECT id,mwst FROM mwst");
|
||||
while($res=mysqli_fetch_assoc($qry))
|
||||
{
|
||||
if($res["mwst"] != "999")
|
||||
{
|
||||
$typids[] = $res["id"];
|
||||
$typnames[] = $res["mwst"]." %";
|
||||
}
|
||||
else
|
||||
{
|
||||
$typids[] = $res["id"];
|
||||
$typnames[] = "Normal";
|
||||
}
|
||||
}
|
||||
$smarty->assign("artmwstids",$typids);
|
||||
$smarty->assign("artmwsts",$typnames);
|
||||
|
||||
$smarty->assign("type",$_GET["type"]);
|
||||
$smarty->assign("nr",($_GET["artnr"]+1));
|
||||
$smarty->display("artblock.tpl");
|
||||
}
|
||||
elseif($_GET["function"] == "neweig" && isset($_GET["artnr"]))
|
||||
{
|
||||
$qry=mysqli_query($dbconn, "SELECT id,einheit FROM einheit");
|
||||
while($res=mysqli_fetch_assoc($qry))
|
||||
{
|
||||
$typids[] = $res["id"];
|
||||
$typnames[] = $res["einheit"];
|
||||
}
|
||||
$smarty->assign("einhids",$typids);
|
||||
$smarty->assign("einhs",$typnames);
|
||||
|
||||
$smarty->assign("type",$_GET["type"]);
|
||||
$smarty->assign("artnr",$_GET["artnr"]);
|
||||
$smarty->assign("eignr",($_GET["eignr"]+1));
|
||||
$smarty->display("eigblock.tpl");
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
@@ -0,0 +1,50 @@
|
||||
<?php
|
||||
|
||||
require_once("./connectmysql.php");
|
||||
|
||||
if(!$err)
|
||||
{
|
||||
if($_GET["term"])
|
||||
{
|
||||
$qry = mysqli_query($dbconn,"SELECT MAX(artikel.id) AS id FROM artikel
|
||||
JOIN artikeltyp ON typ_id = artikeltyp.id
|
||||
WHERE artikel.bezeichn LIKE '".$_GET["term"]."%' AND dropdown = 1 AND YEAR(artikel.datetime) >= YEAR(NOW())-1 GROUP BY artikel.bezeichn") or die(mysqli_error($dbconn));
|
||||
if($tmpres=mysqli_fetch_array($qry))
|
||||
{
|
||||
$innerqry = mysqli_query($dbconn,"SELECT artikel.bezeichn, artikel.typ_id, artikel.einheit_id, artikel.id, artikel_rechn.preis, artikel_rechn.rech_id, artikel_rechn.posnr FROM artikel
|
||||
JOIN artikeltyp ON typ_id = artikeltyp.id
|
||||
JOIN artikel_rechn ON artikel.id = art_id
|
||||
WHERE artikel.id = ".$tmpres["id"]." ORDER BY artikel_rechn.art_id DESC LIMIT 1") or die(mysqli_error($dbconn));
|
||||
$res = mysqli_fetch_array($innerqry);
|
||||
echo "[ ";
|
||||
echo '{"value": "'.$res[0].'","typ": "'.$res[1].'","einh": "'.$res[2].'","preis": "'.number_format($res[4],2,",","").'","eig":[';
|
||||
$qry2 = mysqli_query($dbconn,"SELECT bezeichn, wert, einheit_id FROM eigensch
|
||||
JOIN artikel_eigensch ON eig_id = eigensch.id
|
||||
WHERE art_id='".$res[3]."' AND rech_id='".$res[5]."' AND artposnr = '".$res[6]."' ORDER BY posnr ASC");
|
||||
if($res2 = mysqli_fetch_array($qry2))
|
||||
echo '{"des":"'.$res2[0].'","val":"'.$res2[1].'", "einh":"'.$res2[2].'"}';
|
||||
while($res2=mysqli_fetch_array($qry2))
|
||||
echo ',{"des":"'.$res2[0].'","val":"'.$res2[1].'", "einh":"'.$res2[2].'"}';
|
||||
echo ']}';
|
||||
while($tmpres=mysqli_fetch_array($qry))
|
||||
{
|
||||
$innerqry = mysqli_query($dbconn,"SELECT artikel.bezeichn, artikel.typ_id, artikel.einheit_id, artikel.id, artikel_rechn.preis, artikel_rechn.rech_id, artikel_rechn.posnr FROM artikel
|
||||
JOIN artikeltyp ON typ_id = artikeltyp.id
|
||||
JOIN artikel_rechn ON artikel.id = art_id
|
||||
WHERE artikel.id = ".$tmpres["id"]." ORDER BY artikel_rechn.art_id DESC LIMIT 1") or die(mysqli_error($dbconn));
|
||||
$res = mysqli_fetch_array($innerqry);
|
||||
echo ',{"value": "'.$res[0].'","typ": "'.$res[1].'","einh": "'.$res[2].'","preis": "'.number_format($res[4],2,",","").'","eig":[';
|
||||
$qry2 = mysqli_query($dbconn,"SELECT bezeichn, wert, einheit_id FROM eigensch
|
||||
JOIN artikel_eigensch ON eig_id = eigensch.id
|
||||
WHERE art_id='".$res[0]."' AND rech_id='".$res[5]."' AND artposnr = '".$res[6]."' ORDER BY posnr ASC");
|
||||
if($res2 = mysqli_fetch_array($qry2))
|
||||
echo '{"des":"'.$res2[0].'","val":"'.$res2[1].'", "einh":"'.$res2[2].'"}';
|
||||
while($res2=mysqli_fetch_array($qry2))
|
||||
echo ',{"des":"'.$res2[0].'","val":"'.$res2[1].'", "einh":"'.$res2[2].'"}';
|
||||
echo ']}';
|
||||
}
|
||||
echo "]";
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
@@ -0,0 +1,22 @@
|
||||
<?php
|
||||
require_once("./connectmysql.php");
|
||||
if(!$err)
|
||||
{
|
||||
|
||||
if($_GET["term"])
|
||||
{
|
||||
$qry = mysqli_query($dbconn,"SELECT bank,blz FROM bank WHERE bank LIKE '".mysql_escape_string($_GET["term"])."%' GROUP BY bank ORDER BY bank ASC") or die(mysqli_error($dbconn));
|
||||
if($res=mysqli_fetch_array($qry))
|
||||
{
|
||||
echo "[ ";
|
||||
|
||||
echo '{"value": "'.$res[0].'","blz":"'.$res[1].'"}';
|
||||
while($res=mysqli_fetch_array($qry))
|
||||
{
|
||||
echo ',{"value":"'.$res[0].'","blz":"'.$res[1].'"}';
|
||||
}
|
||||
echo "]";
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
@@ -0,0 +1,20 @@
|
||||
<?php
|
||||
require_once("./connectmysql.php");
|
||||
if(!$err)
|
||||
{
|
||||
if($_GET["term"])
|
||||
{
|
||||
$qry = mysqli_query($dbconn,"SELECT blz,bank FROM bank WHERE blz LIKE '".mysql_escape_string($_GET["term"])."%' GROUP BY blz ORDER BY blz ASC") or die(mysqli_error($dbconn));
|
||||
if($res=mysqli_fetch_array($qry))
|
||||
{
|
||||
echo "[ ";
|
||||
echo '{"value": "'.$res[0].'","bank":"'.$res[1].'"}';
|
||||
while($res=mysqli_fetch_array($qry))
|
||||
{
|
||||
echo ',{"value":"'.$res[0].'","bank":"'.$res[1].'"}';
|
||||
}
|
||||
echo "]";
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
@@ -0,0 +1,15 @@
|
||||
<?php
|
||||
require_once("../../incs/constants.php");
|
||||
session_name(SESSION_NAME);
|
||||
session_start();
|
||||
require_once("../../incs/settings.php");
|
||||
$settings=readsettings();
|
||||
if($settings == "valid")
|
||||
{
|
||||
|
||||
$dbconn = mysqli_connect($mysql_server, $mysql_user, $mysql_pw);
|
||||
mysqli_select_db($dbconn,$mysql_db);
|
||||
}
|
||||
else
|
||||
$err = 1;
|
||||
?>
|
||||
@@ -0,0 +1,22 @@
|
||||
<?php
|
||||
require_once("./connectmysql.php");
|
||||
|
||||
if(!$err)
|
||||
{
|
||||
|
||||
if($_GET["term"])
|
||||
{
|
||||
$qry = mysqli_query($dbconn,"SELECT land FROM land WHERE land LIKE '".mysql_escape_string($_GET["term"])."%' ORDER BY land ASC") or die(mysqli_error($dbconn));
|
||||
if($res=mysqli_fetch_array($qry))
|
||||
{
|
||||
echo "[ ";
|
||||
echo '{"value": "'.$res[0].'"}';
|
||||
while($res=mysqli_fetch_array($qry))
|
||||
{
|
||||
echo ',{"value":"'.$res[0].'"}';
|
||||
}
|
||||
echo "]";
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
@@ -0,0 +1,22 @@
|
||||
<?php
|
||||
require_once("./connectmysql.php");
|
||||
|
||||
if(!$err)
|
||||
{
|
||||
|
||||
if($_GET["term"])
|
||||
{
|
||||
$qry = mysqli_query($dbconn,"SELECT ort, plz, land, vwahl FROM ort JOIN land ON land.id = ort.land_id WHERE ort LIKE '".mysql_escape_string($_GET["term"])."%' GROUP BY ort ORDER BY ort ASC") or die(mysqli_error($dbconn));
|
||||
if($res=mysqli_fetch_array($qry))
|
||||
{
|
||||
echo "[ ";
|
||||
echo '{"value": "'.$res[0].'","plz":"'.$res[1].'","lnd":"'.$res[2].'","vwl":"'.$res[3].'"}';
|
||||
while($res=mysqli_fetch_array($qry))
|
||||
{
|
||||
echo ',{"value":"'.$res[0].'","plz":"'.$res[1].'","lnd":"'.$res[2].'","vwl":"'.$res[3].'"}';
|
||||
}
|
||||
echo "]";
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
require_once("./connectmysql.php");
|
||||
|
||||
if(!$err)
|
||||
{
|
||||
|
||||
if($_GET["term"])
|
||||
{
|
||||
$qry = mysqli_query($dbconn,"SELECT ortsteil, plz, ort, land, vwahl FROM ort JOIN land ON land.id = ort.land_id WHERE ortsteil LIKE '".mysql_escape_string($_GET["term"])."%' GROUP BY ortsteil ORDER BY ort ASC") or die(mysqli_error($dbconn));
|
||||
if($res=mysqli_fetch_array($qry))
|
||||
{
|
||||
echo "[ ";
|
||||
|
||||
echo '{"value": "'.$res[0].'","plz":"'.$res[1].'","ort":"'.$res[2].',"lnd":"'.$res[3].'","vwl":"'.$res[3].'"}';
|
||||
while($res=mysqli_fetch_array($qry))
|
||||
{
|
||||
echo ',{"value":"'.$res[0].'","plz":"'.$res[1].'","ort":"'.$res[2].',"lnd":"'.$res[3].'","vwl":"'.$res[3].'"}';
|
||||
}
|
||||
echo "]";
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
require_once("./connectmysql.php");
|
||||
|
||||
if(!$err)
|
||||
{
|
||||
|
||||
if($_GET["term"])
|
||||
{
|
||||
$qry = mysqli_query($dbconn,"SELECT plz, ort, land FROM ort JOIN land ON land.id = ort.land_id WHERE plz LIKE '".mysql_escape_string($_GET["term"])."%' GROUP BY plz ORDER BY plz ASC") or die(mysqli_error($dbconn));
|
||||
if($res=mysqli_fetch_array($qry))
|
||||
{
|
||||
echo "[ ";
|
||||
|
||||
echo '{"value": "'.$res[0].'","ort":"'.$res[1].'","lnd":"'.$res[2].'","vwl":"'.$res[3].'"}';
|
||||
while($res=mysqli_fetch_array($qry))
|
||||
{
|
||||
echo ',{"value":"'.$res[0].'","ort":"'.$res[1].'","lnd":"'.$res[2].'","vwl":"'.$res[3].'"}';
|
||||
}
|
||||
echo "]";
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
require_once("./connectmysql.php");
|
||||
|
||||
if(!$err)
|
||||
{
|
||||
|
||||
if($_GET["term"])
|
||||
{
|
||||
$qry = mysqli_query($dbconn,"SELECT str, plz, ort, land FROM strasse JOIN ort ON ort.id = strasse.ort_id JOIN land ON land.id = ort.land_id WHERE str LIKE '".mysql_escape_string($_GET["term"])."%' GROUP BY str ORDER BY str ASC") or die(mysqli_error($dbconn));
|
||||
if($res=mysqli_fetch_array($qry))
|
||||
{
|
||||
echo "[ ";
|
||||
|
||||
echo '{"value": "'.$res[0].'","plz":"'.$res[1].'","ort":"'.$res[2].'","lnd":"'.$res[3].'"}';
|
||||
while($res=mysqli_fetch_array($qry))
|
||||
{
|
||||
echo ',{"value": "'.$res[0].'","plz":"'.$res[1].'","ort":"'.$res[2].'","lnd":"'.$res[3].'"}';
|
||||
}
|
||||
echo "]";
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
@@ -0,0 +1,22 @@
|
||||
<?php
|
||||
require_once("./connectmysql.php");
|
||||
|
||||
if(!$err)
|
||||
{
|
||||
|
||||
if($_GET["term"])
|
||||
{
|
||||
$qry = mysqli_query($dbconn,"SELECT vwahl, plz, ort, ortsteil, land FROM ort JOIN land ON land.id = ort.land_id WHERE vwahl LIKE '".mysql_escape_string($_GET["term"])."%' GROUP BY vwahl ORDER BY vwahl ASC") or die(mysqli_error($dbconn));
|
||||
if($res=mysqli_fetch_array($qry))
|
||||
{
|
||||
echo "[ ";
|
||||
echo '{"value": "'.$res[0].'","plz":"'.$res[1].'","ort":"'.$res[2].'","otl":"'.$res[3].'","lnd":"'.$res[4].'"}';
|
||||
while($res=mysqli_fetch_array($qry))
|
||||
{
|
||||
echo ',{"value": "'.$res[0].'","plz":"'.$res[1].'","ort":"'.$res[2].'","otl":"'.$res[3].'","lnd":"'.$res[4].'"}';
|
||||
}
|
||||
echo "]";
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
@@ -0,0 +1,210 @@
|
||||
<?php
|
||||
require_once("../incs/connectmysql.php");
|
||||
require_once("../incs/funcs.php");
|
||||
require_once("../incs/listfuncs.php");
|
||||
require_once ("../incs/rechnung.php");
|
||||
require('../smarty/libs/Smarty.class.php');
|
||||
|
||||
|
||||
$smarty = new Smarty;
|
||||
|
||||
|
||||
|
||||
if(!isset($err))
|
||||
{
|
||||
$show = "";
|
||||
if(isset($_POST["show_firmaanr"]))
|
||||
$show .= str_pad($_POST["show_firmaanr"],1,"0");
|
||||
else
|
||||
$show .= "0";
|
||||
if(isset($_POST["show_firma"]))
|
||||
$show .= str_pad($_POST["show_firma"],1,"0");
|
||||
else
|
||||
$show .= "0";
|
||||
if(isset($_POST["show_anr"]))
|
||||
$show .= str_pad($_POST["show_anr"],1,"0");
|
||||
else
|
||||
$show .= "0";
|
||||
if( isset($_POST["show_titel"]))
|
||||
$show .= str_pad($_POST["show_titel"],1,"0");
|
||||
else
|
||||
$show .= "0";
|
||||
if(isset($_POST["show_name"]))
|
||||
$show .= str_pad($_POST["show_name"],1,"0");
|
||||
else
|
||||
$show .= "0";
|
||||
if(isset($_POST["show_anr2"]))
|
||||
$show .= str_pad($_POST["show_anr2"],1,"0");
|
||||
else
|
||||
$show .= "0";
|
||||
if(isset($_POST["show_titel2"]))
|
||||
$show .= str_pad($_POST["show_titel2"],1,"0");
|
||||
else
|
||||
$show .= "0";
|
||||
if(isset($_POST["show_name2"]))
|
||||
$show .= str_pad($_POST["show_name2"],1,"0");
|
||||
else
|
||||
$show .= "0";
|
||||
if(isset($_POST["show_str"]))
|
||||
$show .= str_pad($_POST["show_str"],1,"0");
|
||||
else
|
||||
$show .= "0";
|
||||
if(isset($_POST["show_ort"]))
|
||||
$show .= str_pad($_POST["show_ort"],1,"0");
|
||||
else
|
||||
$show .= "0";
|
||||
if(isset($_POST["show_land"]))
|
||||
$show .= str_pad($_POST["show_land"],1,"0");
|
||||
else
|
||||
$show .= "0";
|
||||
if(isset($_POST["show_zusatz"]))
|
||||
$show .= str_pad($_POST["show_zusatz"],1,"0");
|
||||
else
|
||||
$show .= "0";
|
||||
|
||||
if(isset($_POST["anr1"]))
|
||||
$anr1 = trim($_POST["anr1"]);
|
||||
else
|
||||
$anr1 = "";
|
||||
if(isset($_POST["anr2"]))
|
||||
$anr2 = trim($_POST["anr2"]);
|
||||
else
|
||||
$anr2 = "";
|
||||
if(isset($_POST["intro"]))
|
||||
$intro = trim($_POST["intro"]);
|
||||
else
|
||||
$intro = "";
|
||||
|
||||
$adrerw = trim($_POST["adresserweiterung"]);
|
||||
$outro = trim($_POST["outro"]);
|
||||
$type = $_POST["type"];
|
||||
$adressid = $_POST["adressid"];
|
||||
$partnerid = $_POST["partnerid"];
|
||||
$mwst = $_POST["mwst"];
|
||||
$zahlziel = $_POST["zahlziel"];
|
||||
$wahrung = $_POST["wahrung"];
|
||||
if(isset($_POST["sub_mwst"]))
|
||||
$sub_mwst = $_POST["sub_mwst"];
|
||||
else
|
||||
$sub_mwst = "";
|
||||
$rabatt = $_POST["rabatt"];
|
||||
$rabattdesc = $_POST["rabattdesc"];
|
||||
$lieferdatum = $_POST["lieferdatum"];
|
||||
$buchKto = $_POST["buchKto"];
|
||||
|
||||
$qry = mysqli_query($dbconn, "SELECT id FROM tmp_rechnung WHERE user_id = '".$_SESSION["user"]."' AND typ_id = '$type'") or $err=error("Fehler beim ermitteln der Rechnung <br />".mysqli_error($dbconn));
|
||||
$progressid = mysqli_fetch_array($qry);
|
||||
$progressid = $progressid[0];
|
||||
if(!$progressid)
|
||||
{
|
||||
|
||||
$qry = mysqli_query($dbconn, "INSERT INTO tmp_rechnung SET
|
||||
user_id = '".$_SESSION["user"]."',
|
||||
adressfields='$show',
|
||||
anrede1='$anr1',
|
||||
anrede2='$anr2',
|
||||
intro='$intro',
|
||||
outro='$outro',
|
||||
typ_id = '$type',
|
||||
adresse_id='$adressid',
|
||||
partner_id='$partnerid',
|
||||
mwst_id = '$mwst',
|
||||
zahlziel_id = '$zahlziel',
|
||||
wahrung_id='$wahrung',
|
||||
sub_mwst='$sub_mwst',
|
||||
rabatt='$rabatt',
|
||||
rabattdesc='$rabattdesc',
|
||||
adresserweiterung='$adrerw',
|
||||
lieferdatum='$lieferdatum',
|
||||
buchungsKto_id = '$buchKto',
|
||||
datetime=NOW()") or $err=error("[autosave.js] Fehler beim erstellen der Rechnung <br />".mysqli_error($dbconn));
|
||||
$progressid = mysqli_insert_id($dbconn);
|
||||
}
|
||||
else
|
||||
{
|
||||
$qry = mysqli_query($dbconn, "UPDATE tmp_rechnung SET
|
||||
user_id = '".$_SESSION["user"]."',
|
||||
adressfields='$show',
|
||||
anrede1='$anr1',
|
||||
anrede2='$anr2',
|
||||
intro='$intro',
|
||||
outro='$outro',
|
||||
typ_id = '$type',
|
||||
adresse_id='$adressid',
|
||||
partner_id='$partnerid',
|
||||
mwst_id = '$mwst',
|
||||
zahlziel_id = '$zahlziel',
|
||||
wahrung_id='$wahrung',
|
||||
sub_mwst='$sub_mwst',
|
||||
rabatt='$rabatt',
|
||||
rabattdesc='$rabattdesc',
|
||||
lieferdatum='$lieferdatum',
|
||||
adresserweiterung='$adrerw',
|
||||
buchungsKto_id = '$buchKto',
|
||||
datetime=NOW() WHERE id='$progressid'") or $err=error("Fehler beim aktualisieren der Rechnung <br />".mysqli_error($dbconn));
|
||||
$qry = mysqli_query($dbconn, "DELETE FROM tmp_rechnung WHERE user_id = '".$_SESSION["user"]."' AND typ_id = '$type' AND id != '$progressid' LIMIT 1") or $err=error("Fehler beim löschen alter tmp Rechnungen <br />".mysqli_error($dbconn));
|
||||
}
|
||||
|
||||
$qry= mysqli_query($dbconn, "SELECT id FROM tmp_artikel WHERE rech_id = '".$progressid."'");
|
||||
while($res=mysqli_fetch_assoc($qry))
|
||||
{
|
||||
mysqli_query($dbconn, "DELETE FROM tmp_eigensch WHERE art_id = '".$res["id"]."'") or $err=error("Fehler beim löschen der eigenschaften <br />".mysqli_error($dbconn));
|
||||
}
|
||||
|
||||
$qry = mysqli_query($dbconn, "DELETE FROM tmp_artikel WHERE rech_id = '".$progressid."'") or $err=error("Fehler beim löschen der Artikel <br />".mysqli_error($dbconn));
|
||||
if(!isset($err))
|
||||
{
|
||||
$i = 1;
|
||||
while($_POST["arthead".$i] && !isset($err))
|
||||
{
|
||||
$angtyp = trim($_POST["angtyp".$i]);
|
||||
$arttyp = trim($_POST["arttyp".$i]);
|
||||
$arthead = trim($_POST["arthead".$i]);
|
||||
$artpr = str_replace(",",".",trim($_POST["artpr".$i]));
|
||||
$artmen = str_replace(",",".",trim($_POST["artmen".$i]));
|
||||
$artrab = trim($_POST["artrab".$i]);
|
||||
if(!isset($_POST["artrabtyp".$i]))
|
||||
$_POST["artrabtyp".$i] = "";
|
||||
$artrabtyp = trim($_POST["artrabtyp".$i]);
|
||||
$artmeneinh = trim($_POST["artmeneinh".$i]);
|
||||
$artwa = trim($_POST["artwa".$i]);
|
||||
$artmwst = trim($_POST["artmwst".$i]);
|
||||
$pagebreak = trim($_POST["pagebreak".$i]);
|
||||
|
||||
|
||||
$qry = mysqli_query($dbconn, "INSERT INTO tmp_artikel SET bezeichn='$arthead', preis='$artpr', mwst_id='$artmwst', pagebreak='$pagebreak', einheit_id='$artmeneinh', typ_id='$arttyp', datetime=NOW(), wanr='$artwa', rech_id='$progressid',posnr='$i',rabatt='$artrab',rabatttyp='$artrabtyp',menge='$artmen',angtyp='$angtyp'") or $err=error("Fehler beim anlegen der Artikel <br />".mysqli_error($dbconn));
|
||||
$artid=mysqli_insert_id($dbconn);
|
||||
$ii = 1;
|
||||
while($_POST["arteig".$i."_".$ii] && !isset($err))
|
||||
{
|
||||
$arteig = trim($_POST["arteig".$i."_".$ii]);
|
||||
$artval = trim($_POST["artval".$i."_".$ii]);
|
||||
$arteinh = trim($_POST["arteinh".$i."_".$ii]);
|
||||
$qry = mysqli_query($dbconn, "INSERT INTO tmp_eigensch SET bezeichn='$arteig', wert='$artval', einheit_id='$arteinh', datetime=NOW(), posnr='$ii', art_id='$artid'") or $err=error("Fehler beim anlegen der Eigenschaften <br />".mysqli_error($dbconn));
|
||||
$eigid=mysqli_insert_id($dbconn);
|
||||
$ii++;
|
||||
}
|
||||
$i++;
|
||||
}
|
||||
}
|
||||
if(!isset($err))
|
||||
{
|
||||
$adresse = makeadressblock($dbconn,$progressid,1);
|
||||
$rechnung = makerechnungsarray($dbconn,$progressid,1);
|
||||
$artikel = makeartikelarray($dbconn,$progressid,1);
|
||||
if($adresse["lines"]>6)
|
||||
error("Die Adresse hat zu viele Zeilen!<br />Bitte wählen Sie einige Elemente ab.");
|
||||
if(!$_POST["show_ort"] || !$_POST["show_str"])
|
||||
error("Die Adresse erscheint nicht vollständig auf der Rechnung!<br />Falls die Rechnung über den Postweg zugestellt werden soll muss die Adresse vervollständigt werden!");
|
||||
if($rechnung["rabatt"] && !$rechnung["rabattdesc"])
|
||||
warning("Ein Rabatt wird von der Gesamtsumme abgezogen, jedoch ist die Rabattbeschreibung leer!<br />Bitte geben Sie eine Rabattbeschreibung ein (z.B.: Sonderrabatt, Winterrabatt, etc.).");
|
||||
if(!$artikel[0] && $type != 5)
|
||||
warning("Es sind noch keine Artikel vorhanden. Bitte Fügen Sie Artikel durch eintragen einer Artikelbeschreibung ein.");
|
||||
if(!is_file("../".UPLOADS_PATH."signs/".$_SESSION["user"].".png"))
|
||||
error("Für Ihren Benutzer wurde noch keine Unterschrift hinterlegt. Bitte vergessen Sie nicht zu unterschreiben.<br />("."./".UPLOADS_PATH."signs/".$_SESSION["user"].".png");
|
||||
|
||||
ok("<img src='' id='saveimg' class='saveimg' /><br />Dokument wurde um ".date("H:i:s")." Uhr gespeichert!");
|
||||
}
|
||||
|
||||
}
|
||||
?>
|
||||
@@ -0,0 +1,81 @@
|
||||
<?php
|
||||
require_once("../incs/connectmysql.php");
|
||||
require_once("../incs/funcs.php");
|
||||
require_once("../incs/listfuncs.php");
|
||||
require('../smarty/libs/Smarty.class.php');
|
||||
|
||||
|
||||
$smarty = new Smarty;
|
||||
|
||||
|
||||
$pagesize = 25;
|
||||
|
||||
|
||||
if(!$err)
|
||||
{
|
||||
$usercolors = array("rgba(255,0,0,0.5)","rgba(0,204,0,0.5)","rgba(255,255,0,0.5)","rgba(153,0,204,0.5)","rgba(0,187,187,0.5)","rgba(0,102,102,0.5)","rgba(0,153,255,0.5)","rgba(255,102,0,0.5)","rgba(0,0,255,0.5)","rgba(255,0,153,0.5)");
|
||||
|
||||
$fulltag = utf8_encode($_GET["search"]);
|
||||
$src = explode(" ",$fulltag);
|
||||
$combiner = mysql_escape_string($_GET["link"]);
|
||||
if($combiner != "AND" && $combiner != "OR")
|
||||
{
|
||||
$combiner = "AND";
|
||||
}
|
||||
$page = $_GET["page"];
|
||||
$user = $_GET["fromuser"];
|
||||
|
||||
$queries = createMsgQry($page,$pagesize,$src,$combiner,$user);
|
||||
$qry = mysqli_query($dbconn,$queries["all"])
|
||||
or die("Datenbank fehler: ".mysqli_error($dbconn));
|
||||
$numres = mysqli_num_rows($qry);
|
||||
$lastpage = ceil($numres / $pagesize);
|
||||
$qrypage = $lastpage - $page - 1;
|
||||
$queries = createMsgQry($qrypage,$pagesize,$src,$combiner,$user);
|
||||
if($numres)
|
||||
{
|
||||
|
||||
$lastdisplay = ($page+1)*$pagesize;
|
||||
if($numres < $lastdisplay)
|
||||
$lastdisplay = $numres;
|
||||
|
||||
displayPages($pagesize,$page,$numres,"ajax_displaymsgs",",".$user);
|
||||
|
||||
$qry = mysqli_query($dbconn,$queries["limited"])
|
||||
or die("Datenbank fehler: ".mysqli_error($dbconn));
|
||||
while($res=mysqli_fetch_assoc($qry))
|
||||
{
|
||||
if($res)
|
||||
{
|
||||
if($prevmsg != $res["send_id"])
|
||||
{
|
||||
if($prevmsg != 0)
|
||||
echo "</div>";
|
||||
if($res["send_id"] == $_SESSION["user"])
|
||||
{
|
||||
echo "<div class='msg_me' style='background-color: ".$usercolors[$SESSION["user"]]."'>";
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "<div class='msg_foreign' style='background-color: ".$usercolors[$res["send_id"]]."'>";
|
||||
}
|
||||
echo "<span class='msg_head'>".$res["sendvname"]." ".$res["sendnname"]." ".$res["datetime"]."</span>";
|
||||
echo "<p>".$res["msg"]."</p>";
|
||||
}
|
||||
else
|
||||
{
|
||||
if(substr($prevtime,0,-5) != substr($res["datetime"],0,-5))
|
||||
echo "<span class='msg_head'>".$res["sendvname"]." ".$res["sendnname"]." ".$res["datetime"]."</span>";
|
||||
echo "<p>".$res["msg"]."</p>";
|
||||
}
|
||||
$prevmsg=$res["send_id"];
|
||||
$prevtime=$res["datetime"];
|
||||
}
|
||||
|
||||
}
|
||||
echo "</div>";
|
||||
displayPages($pagesize,$page,$numres,"ajax_displaymsgs",",".$user);
|
||||
$qry=mysqli_query($dbconn,"UPDATE message SET rd = 1 WHERE send_id = $user AND rec_id = '".mysqli_escape_string($dbconn,$_SESSION["user"])."'");
|
||||
}
|
||||
}
|
||||
?>
|
||||
@@ -0,0 +1,22 @@
|
||||
<?php
|
||||
require_once("../incs/connectmysql.php");
|
||||
|
||||
if(isset($_GET["function"]) && !$err)
|
||||
{
|
||||
if($_GET["function"] == "getNew")
|
||||
{
|
||||
$qry = mysqli_query($dbconn, "SELECT id FROM message WHERE rec_id = '".mysql_escape_string($_SESSION["user"])."' AND rd = 0") or die(mysqli_error($dbconn));
|
||||
|
||||
if(mysqli_num_rows($qry))
|
||||
{
|
||||
$_SESSION["newmail"] = "-new";
|
||||
echo "-new";
|
||||
}
|
||||
else
|
||||
{
|
||||
$_SESSION["newmail"] = "";
|
||||
echo "";
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
require_once("../incs/connectmysql.php");
|
||||
|
||||
if(isset($_GET["function"]) && !$err)
|
||||
{
|
||||
|
||||
if($_GET["function"] == "savePrivate" && isset($_GET["note"]))
|
||||
{
|
||||
|
||||
$_SESSION["privateNotes"] = utf8_encode(urldecode($_GET["note"]));
|
||||
if($_SESSION["login"] == "valid")
|
||||
{
|
||||
updateUserSetting($dbconn,"privnotes", $_SESSION["privateNotes"], $_SESSION["user"]);
|
||||
}
|
||||
}
|
||||
else if($_GET["function"] == "saveGlobal" && isset($_GET["note"]))
|
||||
{
|
||||
$_SESSION["globalNotes"] = utf8_encode(urldecode($_GET["note"]));
|
||||
if($_SESSION["login"] == "valid")
|
||||
{
|
||||
updateUserSetting($dbconn,"globnotes", $_SESSION["globalNotes"], 0);
|
||||
}
|
||||
}
|
||||
else if($_GET["function"] == "getGlobal")
|
||||
{
|
||||
$_SESSION["globalNotes"] = getUserSetting($dbconn, "globnotes", 0, $_SESSION["globalNotes"]);
|
||||
|
||||
echo $_SESSION["globalNotes"];
|
||||
}
|
||||
}
|
||||
?>
|
||||
@@ -0,0 +1,222 @@
|
||||
<?php
|
||||
require_once("../incs/connectmysql.php");
|
||||
require_once("../incs/funcs.php");
|
||||
require_once("../incs/listfuncs.php");
|
||||
require_once ("../incs/rechnung.php");
|
||||
require_once("../incs/makepdf.php");
|
||||
require('../smarty/libs/Smarty.class.php');
|
||||
|
||||
|
||||
$smarty = new Smarty;
|
||||
|
||||
|
||||
|
||||
if(!isset($err))
|
||||
{
|
||||
$show = "";
|
||||
if(isset($_POST["show_firmaanr"]))
|
||||
$show .= str_pad($_POST["show_firmaanr"],1,"0");
|
||||
else
|
||||
$show .= "0";
|
||||
if(isset($_POST["show_firma"]))
|
||||
$show .= str_pad($_POST["show_firma"],1,"0");
|
||||
else
|
||||
$show .= "0";
|
||||
if(isset($_POST["show_anr"]))
|
||||
$show .= str_pad($_POST["show_anr"],1,"0");
|
||||
else
|
||||
$show .= "0";
|
||||
if( isset($_POST["show_titel"]))
|
||||
$show .= str_pad($_POST["show_titel"],1,"0");
|
||||
else
|
||||
$show .= "0";
|
||||
if(isset($_POST["show_name"]))
|
||||
$show .= str_pad($_POST["show_name"],1,"0");
|
||||
else
|
||||
$show .= "0";
|
||||
if(isset($_POST["show_anr2"]))
|
||||
$show .= str_pad($_POST["show_anr2"],1,"0");
|
||||
else
|
||||
$show .= "0";
|
||||
if(isset($_POST["show_titel2"]))
|
||||
$show .= str_pad($_POST["show_titel2"],1,"0");
|
||||
else
|
||||
$show .= "0";
|
||||
if(isset($_POST["show_name2"]))
|
||||
$show .= str_pad($_POST["show_name2"],1,"0");
|
||||
else
|
||||
$show .= "0";
|
||||
if(isset($_POST["show_str"]))
|
||||
$show .= str_pad($_POST["show_str"],1,"0");
|
||||
else
|
||||
$show .= "0";
|
||||
if(isset($_POST["show_ort"]))
|
||||
$show .= str_pad($_POST["show_ort"],1,"0");
|
||||
else
|
||||
$show .= "0";
|
||||
if(isset($_POST["show_land"]))
|
||||
$show .= str_pad($_POST["show_land"],1,"0");
|
||||
else
|
||||
$show .= "0";
|
||||
if(isset($_POST["show_zusatz"]))
|
||||
$show .= str_pad($_POST["show_zusatz"],1,"0");
|
||||
else
|
||||
$show .= "0";
|
||||
|
||||
if(isset($_POST["anr1"]))
|
||||
$anr1 = trim($_POST["anr1"]);
|
||||
else
|
||||
$anr1 = "";
|
||||
if(isset($_POST["anr2"]))
|
||||
$anr2 = trim($_POST["anr2"]);
|
||||
else
|
||||
$anr2 = "";
|
||||
if(isset($_POST["intro"]))
|
||||
$intro = trim($_POST["intro"]);
|
||||
else
|
||||
$intro = "";
|
||||
$adrerw = trim($_POST["adresserweiterung"]);
|
||||
$outro = trim($_POST["outro"]);
|
||||
$type = $_POST["type"];
|
||||
$adressid = $_POST["adressid"];
|
||||
$partnerid = $_POST["partnerid"];
|
||||
$mwst = $_POST["mwst"];
|
||||
$zahlziel = $_POST["zahlziel"];
|
||||
$wahrung = $_POST["wahrung"];
|
||||
if(!isset($_POST["sub_mwst"]))
|
||||
$_POST["sub_mwst"] = "";
|
||||
$sub_mwst = $_POST["sub_mwst"];
|
||||
$rabatt = $_POST["rabatt"];
|
||||
$rabattdesc = $_POST["rabattdesc"];
|
||||
$buchKto = $_POST["buchKto"];
|
||||
$lieferdatum = $_POST["lieferdatum"];
|
||||
$qry = mysqli_query($dbconn, "SELECT id FROM tmp_rechnung WHERE user_id = '".$_SESSION["user"]."' AND typ_id = '$type' LIMIT 1") or $err=error("Fehler beim ermitteln der Rechnung <br />".mysqli_error($dbconn));
|
||||
$progressid = mysqli_fetch_array($qry);
|
||||
$progressid = $progressid[0];
|
||||
if(!$progressid)
|
||||
{
|
||||
|
||||
$qry = mysqli_query($dbconn, "INSERT INTO tmp_rechnung SET
|
||||
user_id = '".$_SESSION["user"]."',
|
||||
adressfields='$show',
|
||||
anrede1='$anr1',
|
||||
anrede2='$anr2',
|
||||
intro='$intro',
|
||||
outro='$outro',
|
||||
typ_id = '$type',
|
||||
adresse_id='$adressid',
|
||||
partner_id='$partnerid',
|
||||
mwst_id = '$mwst',
|
||||
zahlziel_id = '$zahlziel',
|
||||
wahrung_id='$wahrung',
|
||||
sub_mwst='$sub_mwst',
|
||||
rabatt='$rabatt',
|
||||
adresserweiterung='$adrerw',
|
||||
rabattdesc='$rabattdesc',
|
||||
buchungsKto_id = '$buchKto',
|
||||
lieferdatum='$lieferdatum',
|
||||
datetime=NOW()") or $err=error("Fehler beim erstellen der Rechnung <br />".mysqli_error($dbconn));
|
||||
$progressid = mysqli_insert_id($dbconn);
|
||||
}
|
||||
else
|
||||
{
|
||||
$qry = mysqli_query($dbconn, "UPDATE tmp_rechnung SET
|
||||
user_id = '".$_SESSION["user"]."',
|
||||
adressfields='$show',
|
||||
anrede1='$anr1',
|
||||
anrede2='$anr2',
|
||||
intro='$intro',
|
||||
outro='$outro',
|
||||
typ_id = '$type',
|
||||
adresse_id='$adressid',
|
||||
partner_id='$partnerid',
|
||||
mwst_id = '$mwst',
|
||||
zahlziel_id = '$zahlziel',
|
||||
wahrung_id='$wahrung',
|
||||
sub_mwst='$sub_mwst',
|
||||
rabatt='$rabatt',
|
||||
adresserweiterung='$adrerw',
|
||||
rabattdesc='$rabattdesc',
|
||||
buchungsKto_id = '$buchKto',
|
||||
lieferdatum='$lieferdatum',
|
||||
datetime=NOW() WHERE id='$progressid'") or $err=error("Fehler beim aktualisieren der Rechnung <br />".mysqli_error($dbconn));
|
||||
$qry = mysqli_query($dbconn, "DELETE FROM tmp_rechnung WHERE user_id = '".$_SESSION["user"]."' AND typ_id = '$type' AND id != '$progressid' LIMIT 1") or $err=error("Fehler beim löschen alter tmp Rechnungen <br />".mysqli_error($dbconn));
|
||||
}
|
||||
$qry= mysqli_query($dbconn, "SELECT id FROM tmp_artikel WHERE rech_id = '".$progressid."'");
|
||||
while($res=mysqli_fetch_assoc($qry))
|
||||
{
|
||||
mysqli_query($dbconn, "DELETE FROM tmp_eigensch WHERE art_id = '".$res["id"]."'") or $err=error("Fehler beim löschen der eigenschaften <br />".mysqli_error($dbconn));
|
||||
}
|
||||
|
||||
$qry = mysqli_query($dbconn, "DELETE FROM tmp_artikel WHERE rech_id = '".$progressid."'") or $err=error("Fehler beim löschen der Artikel <br />".mysqli_error($dbconn));
|
||||
if(!isset($err))
|
||||
{
|
||||
$i = 1;
|
||||
while($_POST["arthead".$i] && !isset($err))
|
||||
{
|
||||
if($_POST["artact".$i])
|
||||
{
|
||||
$angtyp = trim($_POST["angtyp".$i]);
|
||||
$arttyp = trim($_POST["arttyp".$i]);
|
||||
$arthead = trim($_POST["arthead".$i]);
|
||||
$artpr = str_replace(",",".",trim($_POST["artpr".$i]));
|
||||
$artmen = str_replace(",",".",trim($_POST["artmen".$i]));
|
||||
$artrab = trim($_POST["artrab".$i]);
|
||||
if(!isset($_POST["artrabtyp".$i]))
|
||||
$_POST["artrabtyp".$i] = "";
|
||||
$artrabtyp = trim($_POST["artrabtyp".$i]);
|
||||
$artmeneinh = trim($_POST["artmeneinh".$i]);
|
||||
$artwa = trim($_POST["artwa".$i]);
|
||||
$artmwst = trim($_POST["artmwst".$i]);
|
||||
$pagebreak = trim($_POST["pagebreak".$i]);
|
||||
|
||||
|
||||
$qry = mysqli_query($dbconn, "INSERT INTO tmp_artikel SET bezeichn='$arthead', preis='$artpr', mwst_id='$artmwst', pagebreak='$pagebreak', einheit_id='$artmeneinh', typ_id='$arttyp', datetime=NOW(), wanr='$artwa', rech_id='$progressid',posnr='$i',rabatt='$artrab',rabatttyp='$artrabtyp',menge='$artmen',angtyp='$angtyp'") or $err=error("Fehler beim anlegen der Artikel <br />".mysqli_error($dbconn));
|
||||
$artid=mysqli_insert_id($dbconn);
|
||||
$ii = 1;
|
||||
while($_POST["arteig".$i."_".$ii] && !isset($err))
|
||||
{
|
||||
$arteig = trim($_POST["arteig".$i."_".$ii]);
|
||||
$artval = trim($_POST["artval".$i."_".$ii]);
|
||||
$arteinh = trim($_POST["arteinh".$i."_".$ii]);
|
||||
$qry = mysqli_query($dbconn, "INSERT INTO tmp_eigensch SET bezeichn='$arteig', wert='$artval', einheit_id='$arteinh', datetime=NOW(), posnr='$ii', art_id='$artid'") or $err=error("Fehler beim anlegen der Eigenschaften <br />".mysqli_error($dbconn));
|
||||
$eigid=mysqli_insert_id($dbconn);
|
||||
$ii++;
|
||||
}
|
||||
}
|
||||
$i++;
|
||||
}
|
||||
}
|
||||
if(!isset($err))
|
||||
{
|
||||
$adresse = makeadressblock($dbconn,$progressid,1);
|
||||
$rechnung = makerechnungsarray($dbconn,$progressid,1);
|
||||
$artikel = makeartikelarray($dbconn,$progressid,1);
|
||||
/*
|
||||
if($adresse["lines"]>6)
|
||||
error("Die Adresse hat zu viele Zeilen!<br />Bitte wählen Sie einige Elemente ab.");
|
||||
if(!$_POST["show_ort"] || !$_POST["show_str"])
|
||||
error("Die Adresse erscheint nicht vollständig auf der Rechnung!<br />Falls die Rechnung über den Postweg zugestellt werden soll muss die Adresse vervollständigt werden!");
|
||||
if($rechnung["rabatt"] && !$rechnung["rabattdesc"])
|
||||
warning("Ein Rabatt wird von der Gesamtsumme abgezogen, jedoch ist die Rabattbeschreibung leer!<br />Bitte geben Sie eine Rabattbeschreibung ein (z.B.: Sonderrabatt, Winterrabatt, etc.).");
|
||||
if(!$artikel[0] && $type != 5)
|
||||
warning("Es sind noch keine Artikel vorhanden. Bitte Fügen Sie Artikel durch eintragen einer Artikelbeschreibung ein.");
|
||||
if(!is_file("../pics/users/".$_SESSION["user"].".png"))
|
||||
error("Für Ihren Benutzer wurde noch keine Unterschrift hinterlegt. Bitte vergessen Sie nicht zu unterschreiben.");
|
||||
*/
|
||||
$pdf = makerawPDF(1);
|
||||
|
||||
makefirstpage($pdf,$adresse["adresse"],$rechnung,1);
|
||||
if(count($artikel))
|
||||
{
|
||||
$gesamtpreis = maketable($pdf,$artikel,$rechnung,1);
|
||||
}
|
||||
makeEndPage($pdf,$rechnung,$gesamtpreis,1);
|
||||
|
||||
$tmppdfname = str_replace(array(" ","."),array("_","_"),microtime());
|
||||
savePDF($pdf,"../temp/pdfpreview/$tmppdfname.pdf");
|
||||
echo makeImageFromPDF("../temp/pdfpreview/$tmppdfname.pdf");
|
||||
}
|
||||
|
||||
}
|
||||
?>
|
||||
@@ -0,0 +1,19 @@
|
||||
<?php
|
||||
require_once("../incs/connectmysql.php");
|
||||
|
||||
if(!$err)
|
||||
{
|
||||
|
||||
$qry = mysqli_query("SELECT bezeichn FROM artikel
|
||||
JOIN artikeltyp ON typ_id = artikeltyp.id
|
||||
JOIN artikel_eigensch ON art_id = artikel.id
|
||||
JOIN eigensch ON eig_id = eigensch.id
|
||||
WHERE dropdown = 1 AND bezeichn LIKE '".$_GET["term"]."%' ORDER BY rech_id DESC LIMIT 1");
|
||||
$res = mysqli_fetch_assoc($qry);
|
||||
if($_GET["term"])
|
||||
{
|
||||
echo "[{\"value\": \"".$_GET["term"]."1\", \"id\": \"rt1\", \"desc\": \"Biiig description bla blabla asdfafd\"}, ";
|
||||
echo "{\"value\": \"".$_GET["term"]."222\", \"id\": \"rt2\", \"desc\": \"Biiig descrseflrjweörjhweafökj hawkfjehwfffffffiption bla blabla asdfafd\"}]";
|
||||
}
|
||||
}
|
||||
?>
|
||||
@@ -0,0 +1,71 @@
|
||||
<?php
|
||||
require_once("../incs/connectmysql.php");
|
||||
require_once("../incs/funcs.php");
|
||||
require_once("../incs/listfuncs.php");
|
||||
require('../smarty/libs/Smarty.class.php');
|
||||
|
||||
|
||||
$smarty = new Smarty;
|
||||
|
||||
|
||||
$pagesize = 50;
|
||||
|
||||
|
||||
if(!$err)
|
||||
{
|
||||
$speciallines=array();
|
||||
|
||||
$fulltag = utf8_encode($_GET["search"]);
|
||||
$src = explode(" ",$fulltag);
|
||||
$combiner = mysql_escape_string($_GET["link"]);
|
||||
if($combiner != "AND" && $combiner != "OR")
|
||||
{
|
||||
$combiner = "AND";
|
||||
}
|
||||
$page = $_GET["page"];
|
||||
|
||||
$queries = createAdressQry($page,$pagesize,$src,$combiner,$_GET["field"],0,1);
|
||||
$qry = mysqli_query($dbconn,$queries["all"])
|
||||
or die("Datenbank fehler: ".mysqli_error($dbconn));
|
||||
$numres = mysqli_num_rows($qry);
|
||||
if(!$numres)
|
||||
{
|
||||
$queries = createAdressQry($page,$pagesize,$src,$combiner,$_GET["field"],1,1);
|
||||
$qry = mysqli_query($dbconn,$queries["all"])
|
||||
or die("Datenbank fehler: ".mysqli_error($dbconn));
|
||||
$numres = mysqli_num_rows($qry);
|
||||
message("veraltete Datensätze wurden in die Suche einbezogen");
|
||||
}
|
||||
if($numres)
|
||||
{
|
||||
$qry = mysqli_query($dbconn,$queries["limited"])
|
||||
or die("Datenbank fehler: ".mysqli_error($dbconn));
|
||||
while($res=mysqli_fetch_assoc($qry))
|
||||
{
|
||||
$name = $res["vname"]." ".$res["nname"];
|
||||
if($res["firma"])
|
||||
$name .= " <i><u>".$res["firma"]."</u></i>";
|
||||
if($res["vwahl"])
|
||||
$res["tel"] = $res["vwahl"]."/".$res["tel"];
|
||||
if(!$res["updated_by"])
|
||||
$listlines[] = array("<a href='?action=rechnungadd&id=".$_GET["rechid"]."&".$_GET["subact"]."=1&adrid=".$res["adrid"]."'><span class='check' title='Diese Adresse verwenden'></span></a> ".$res["kdnr"]."",$name,$res["plz"]." ".$res["ort"], $res["str"]." ".$res["hnr"], $res["tel"]);
|
||||
else
|
||||
$speciallines[] = array("<a href='?action=rechnungadd&id=".$_GET["rechid"]."&".$_GET["subact"]."=1&adrid=".$res["adrid"]."'><span class='check' title='Diese Adresse verwenden'></span></a> ".$res["kdnr"]."",$name,$res["plz"]." ".$res["ort"], $res["str"]." ".$res["hnr"], $res["tel"]);
|
||||
}
|
||||
$headings = array("Kd.Nr.","Name/<i><u>Firma</u></i>","Ort","Straße","Telefon");
|
||||
$lastdisplay = ($page+1)*$pagesize;
|
||||
if($numres < $lastdisplay)
|
||||
$lastdisplay = $numres;
|
||||
if($fulltag)
|
||||
ok("Die Suche nach ".htmlspecialchars($fulltag)." ergab ".$numres." Ergebnisse.<br /> Ergebnis ".($page*$pagesize+1)." bis ".$lastdisplay);
|
||||
else
|
||||
ok($numres." Adressen sind insgesamt gespeichert.");
|
||||
|
||||
displayPages($pagesize,$page,$numres,"ajax_searchadress");
|
||||
displayList($headings,$listlines,$speciallines);
|
||||
displayPages($pagesize,$page,$numres,"ajax_searchadress");
|
||||
}
|
||||
else
|
||||
ok("Die Suche nach ".htmlspecialchars($fulltag)." ergab keine Ergebnisse.");
|
||||
}
|
||||
?>
|
||||
@@ -0,0 +1,109 @@
|
||||
<?php
|
||||
require_once("../incs/connectmysql.php");
|
||||
require_once("../incs/funcs.php");
|
||||
require_once("../incs/listfuncs.php");
|
||||
require('../smarty/libs/Smarty.class.php');
|
||||
|
||||
|
||||
$smarty = new Smarty;
|
||||
|
||||
|
||||
$pagesize = 20;
|
||||
|
||||
|
||||
if(!$err)
|
||||
{
|
||||
|
||||
$fulltag = utf8_encode($_GET["search"]);
|
||||
$src = explode(" ",$fulltag);
|
||||
$combiner = mysql_escape_string($_GET["link"]);
|
||||
if($combiner != "AND" && $combiner != "OR")
|
||||
{
|
||||
$combiner = "AND";
|
||||
}
|
||||
$page = $_GET["page"];
|
||||
$skspage = $_GET["skspage"];
|
||||
$typ = $_GET["typ"];
|
||||
$id = $_GET["kdnid"];
|
||||
$queries = createKdnProjectQry($page,$pagesize,$src,$combiner,$id);
|
||||
$qry = mysqli_query($dbconn,$queries["all"])
|
||||
or die("Datenbank fehler: ".mysqli_error($dbconn));
|
||||
$numres = mysqli_num_rows($qry);
|
||||
/*
|
||||
if(!$numres)
|
||||
{
|
||||
$queries = createKdnRechQry($page,$pagesize,$src,$combiner,1);
|
||||
$qry = mysqli_query($dbconn,$queries["all"])
|
||||
or die("Datenbank fehler: ".mysqli_error($dbconn));
|
||||
$numres = mysqli_num_rows($qry);
|
||||
message("veraltete Datensätze wurden in die Suche einbezogen");
|
||||
}
|
||||
*/
|
||||
if($numres)
|
||||
{
|
||||
$listlines=array();
|
||||
$qry = mysqli_query($dbconn,$queries["limited"])
|
||||
or die("Datenbank fehler: ".mysqli_error($dbconn));
|
||||
while($res=mysqli_fetch_assoc($qry))
|
||||
{
|
||||
$actions = "<span class='del' title='löschen' onClick='askdel(\"Möchten Sie das Projekt ".$res["name"]."<br />wirklich <b>unwiederruflich</b> löschen?\",\"?action=projectadd&id=".$res["id"]."&del=1\")'></span>";
|
||||
$actions .= "<a href='?action=projectadd&id=".$res["id"]."'><span class='edit' title='Projekt ändern'></span></a>";
|
||||
//$actions .= "<a href='?action=projectadd&id=".$res["id"]."©=1'><span class='copy' title='Projekt kopieren'></span></a>";
|
||||
//$tmpqry = mysqli_query($dbconn,"SELECT id FROM kontakt WHERE partner_id = '$id' AND typ_id = 1");
|
||||
//if(mysqli_fetch_array($tmpqry))
|
||||
// $actions .= "<a href='?action=rechnungadd&id=".$res["id"]."&adressid=".$res["adresse_id"]."&mail=1'><span class='mail' title='Dokument per E-Mail versenden'></span></a>";
|
||||
/*
|
||||
$res["drechnr"] = substr($res["rechnr"],0,4)."-".substr($res["rechnr"],4,2)."-".substr($res["rechnr"],6,2).".".substr($res["rechnr"],8,2);
|
||||
switch($res["typ_id"])
|
||||
{
|
||||
case 1:
|
||||
$res["drechnr"] = "R".$res["drechnr"];
|
||||
$actions .= "<a href='?action=rechnungadd&id=".$res["id"]."&adressid=".$res["adresse_id"]."&newtype=2'><span class='gutschradd' title='Gutschrift aus dieser Rechnung erstellen'></span></a>";
|
||||
$actions .= "<a href='?action=rechnungadd&id=".$res["id"]."&adressid=".$res["adresse_id"]."&newtype=6'><span class='mahnadd' title='Mahnung aus dieser Rechnung erstellen'></span></a>";
|
||||
break;
|
||||
case 2:
|
||||
$res["drechnr"] = "G".$res["drechnr"];
|
||||
break;
|
||||
case 3:
|
||||
$actions .= "<a href='?action=rechnungadd&id=".$res["id"]."&adressid=".$res["adresse_id"]."&newtype=1'><span class='rechnadd' title='Rechnung aus diesem Angebot erstellen'></span></a>";
|
||||
$actions .= "<a href='?action=rechnungadd&id=".$res["id"]."&adressid=".$res["adresse_id"]."&newtype=4'><span class='bestadd' title='Auftragsbestätigung aus diesem Angebot erstellen'></span></a>";
|
||||
$res["drechnr"] = "A".$res["drechnr"];
|
||||
break;
|
||||
case 4:
|
||||
$actions .= "<a href='?action=rechnungadd&id=".$res["id"]."&adressid=".$res["adresse_id"]."&newtype=1'><span class='rechnadd' title='Rechnung aus dieser Auftragsbestätigung erstellen'></span></a>";
|
||||
$res["drechnr"] = "B".$res["drechnr"];
|
||||
break;
|
||||
}
|
||||
if(!$res["drechnr"])
|
||||
$res["drechnr"] = $res["drechnr"];
|
||||
*/
|
||||
$listlines[] = array("<a href='?action=projectshow&id=".$res["id"]."'>".$res["name"]."</a>",
|
||||
$res["date"],
|
||||
$res["work"],
|
||||
$actions
|
||||
);
|
||||
}
|
||||
|
||||
$headings = array("Name","Datum","Unberechnete<br />Stunden","Aktionen");
|
||||
$lastdisplay = ($page+1)*$pagesize;
|
||||
if($numres < $lastdisplay)
|
||||
$lastdisplay = $numres;
|
||||
if($fulltag)
|
||||
ok("Die Suche nach ".htmlspecialchars($fulltag)." ergab ".$numres." Ergebnisse.<br /> Ergebnis ".($page*$pagesize+1)." bis ".$lastdisplay);
|
||||
else
|
||||
ok($numres." Projekte sind insgesamt gespeichert.");
|
||||
|
||||
displaySplitPages($pagesize,$page,$skspage,0,$numres,"ajax_searchkdnprojects",",$typ,$id");
|
||||
displayList($headings,$listlines,$speciallines);
|
||||
displaySplitPages($pagesize,$page,$skspage,0,$numres,"ajax_searchkdnprojects",",$typ,$id");
|
||||
}
|
||||
else
|
||||
{
|
||||
if($fulltag)
|
||||
ok("Die Suche nach ".htmlspecialchars($fulltag)." ergab keine Ergebnisse.");
|
||||
else
|
||||
ok("Keine Einträge.");
|
||||
}
|
||||
|
||||
}
|
||||
?>
|
||||
@@ -0,0 +1,177 @@
|
||||
<?php
|
||||
require_once("../incs/connectmysql.php");
|
||||
require_once("../incs/funcs.php");
|
||||
require_once("../incs/listfuncs.php");
|
||||
require('../smarty/libs/Smarty.class.php');
|
||||
|
||||
|
||||
$smarty = new Smarty;
|
||||
|
||||
|
||||
$pagesize = 20;
|
||||
|
||||
|
||||
if(!isset($err))
|
||||
{
|
||||
if(!isset($_GET["link"])){
|
||||
$_GET["link"] ="";
|
||||
}
|
||||
$fulltag = utf8_encode($_GET["search"]);
|
||||
$src = explode(" ",$fulltag);
|
||||
$combiner = mysql_escape_string($_GET["link"]);
|
||||
if($combiner != "AND" && $combiner != "OR")
|
||||
{
|
||||
$combiner = "AND";
|
||||
}
|
||||
$page = $_GET["page"];
|
||||
$skspage = $_GET["skspage"];
|
||||
$typ = $_GET["typ"];
|
||||
$id = $_GET["kdnid"];
|
||||
$queries = createKdnRechQry($page,$pagesize,$src,$combiner,$id,$typ,0);
|
||||
$qry = mysqli_query($dbconn,$queries["all"])
|
||||
or die("Datenbank fehler: ".mysqli_error($dbconn));
|
||||
$numres = mysqli_num_rows($qry);
|
||||
/*
|
||||
if(!$numres)
|
||||
{
|
||||
$queries = createKdnRechQry($page,$pagesize,$src,$combiner,1);
|
||||
$qry = mysqli_query($dbconn,$queries["all"])
|
||||
or die("Datenbank fehler: ".mysqli_error($dbconn));
|
||||
$numres = mysqli_num_rows($qry);
|
||||
message("veraltete Datensätze wurden in die Suche einbezogen");
|
||||
}
|
||||
*/
|
||||
if($numres)
|
||||
{
|
||||
$listlines=array();
|
||||
$qry = mysqli_query($dbconn,$queries["limited"])
|
||||
or die("Datenbank fehler: ".mysqli_error($dbconn));
|
||||
while($res=mysqli_fetch_assoc($qry))
|
||||
{
|
||||
$res["drechnr"] = substr($res["rechnr"],0,4)."-".substr($res["rechnr"],4,2)."-".substr($res["rechnr"],6,2).".".substr($res["rechnr"],8,2);
|
||||
$actions = "<span class='del' title='löschen' onClick='askdel(\"Möchten Sie das Dokument ".$res["drechnr"]."<br />wirklich <b>unwiederruflich</b> löschen?\",\"?action=rechnungadd&id=".$res["id"]."&del=1\")'></span>";
|
||||
$actions .= "<a href='?action=rechnungadd&id=".$res["id"]."&adressid=".$res["adresse_id"]."'><span class='edit' title='Dokument ändern'></span></a>";
|
||||
$actions .= "<a href='?action=rechnungadd&id=".$res["id"]."&adressid=".$res["adresse_id"]."&changeadr=1'><span class='changeadr' title='Adresse ändern'></span></a>";
|
||||
$actions .= "<a href='?action=rechnungadd&id=".$res["id"]."&adressid=".$res["adresse_id"]."©=1'><span class='copy' title='Dokument kopieren'></span></a>";
|
||||
$tmpqry = mysqli_query($dbconn,"SELECT id FROM kontakt WHERE partner_id = '$id' AND typ_id = 1");
|
||||
if(mysqli_fetch_array($tmpqry))
|
||||
$actions .= "<a href='?action=rechnungadd&id=".$res["id"]."&adressid=".$res["adresse_id"]."&mail=1'><span class='mail' title='Dokument per E-Mail versenden'></span></a>";
|
||||
|
||||
switch($res["typ_id"])
|
||||
{
|
||||
case 1:
|
||||
$res["drechnr"] = "R".$res["drechnr"];
|
||||
$actions .= "<a href='?action=rechnungadd&id=".$res["id"]."&adressid=".$res["adresse_id"]."&newtype=2'><span class='gutschradd' title='Gutschrift aus dieser Rechnung erstellen'></span></a>";
|
||||
$actions .= "<a href='?action=rechnungadd&id=".$res["id"]."&adressid=".$res["adresse_id"]."&newtype=6'><span class='mahnadd' title='Mahnung aus dieser Rechnung erstellen'></span></a>";
|
||||
if($res["storno"] == 1)
|
||||
$actions .= "<span class='rechnnostorn' title='STORNIERT'></span>";
|
||||
else
|
||||
$actions .= "<a href='?action=rechnungadd&id=".$res["id"]."&adressid=".$res["adresse_id"]."&storno=YES'><span class='rechnstorn' title='Stornieren'></span></a>";
|
||||
break;
|
||||
case 2:
|
||||
$res["drechnr"] = "G".$res["drechnr"];
|
||||
break;
|
||||
case 3:
|
||||
$actions .= "<a href='?action=rechnungadd&id=".$res["id"]."&adressid=".$res["adresse_id"]."&newtype=4'><span class='bestadd' title='Auftragsbestätigung aus diesem Angebot erstellen'></span></a>";
|
||||
$actions .= "<a href='?action=rechnungadd&id=".$res["id"]."&adressid=".$res["adresse_id"]."&newtype=1'><span class='rechnadd' title='Rechnung aus diesem Angebot erstellen'></span></a>";
|
||||
$res["drechnr"] = "A".$res["drechnr"];
|
||||
break;
|
||||
case 4:
|
||||
$actions .= "<a href='?action=rechnungadd&id=".$res["id"]."&adressid=".$res["adresse_id"]."&newtype=1'><span class='rechnadd' title='Rechnung aus dieser Auftragsbestätigung erstellen'></span></a>";
|
||||
$res["drechnr"] = "B".$res["drechnr"];
|
||||
break;
|
||||
}
|
||||
if(!$res["drechnr"])
|
||||
$res["drechnr"] = $res["drechnr"];
|
||||
|
||||
if($res["storno"] == 1){
|
||||
$listlines[] = array("<a href='?action=rechshow&id=".$res["id"]."'><font color='#FF0000'>".$res["drechnr"]."</font></a>",
|
||||
$res["date"],
|
||||
$res["artikel"],
|
||||
$actions
|
||||
);
|
||||
}
|
||||
else{
|
||||
$listlines[] = array("<a href='?action=rechshow&id=".$res["id"]."'>".$res["drechnr"]."</a>",
|
||||
$res["date"],
|
||||
$res["artikel"],
|
||||
$actions
|
||||
);
|
||||
}
|
||||
}
|
||||
$headings = array("Nummer","Datum","Artikel","Aktionen");
|
||||
$lastdisplay = ($page+1)*$pagesize;
|
||||
if($numres < $lastdisplay)
|
||||
$lastdisplay = $numres;
|
||||
if($fulltag)
|
||||
ok("Die Suche nach ".htmlspecialchars($fulltag)." ergab ".$numres." Ergebnisse.<br /> Ergebnis ".($page*$pagesize+1)." bis ".$lastdisplay);
|
||||
else
|
||||
ok($numres." Dokumente sind insgesamt gespeichert.");
|
||||
$speciallines = Array();
|
||||
displaySplitPages($pagesize,$page,$skspage,0,$numres,"ajax_searchkdnrech",",$typ,$id");
|
||||
displayList($headings,$listlines,$speciallines);
|
||||
displaySplitPages($pagesize,$page,$skspage,0,$numres,"ajax_searchkdnrech",",$typ,$id");
|
||||
}
|
||||
else
|
||||
{
|
||||
if($fulltag)
|
||||
ok("Die Suche nach ".htmlspecialchars($fulltag)." ergab keine Ergebnisse.");
|
||||
else
|
||||
ok("Keine Einträge.");
|
||||
}
|
||||
|
||||
|
||||
//OLD SKS RECHNUNGEN!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
|
||||
if(getUserSetting($dbconn,"show_sks", mysql_escape_string($_SESSION["user"]), 1)) //show sks rechnungen????
|
||||
{
|
||||
echo "<h3>SKS Dokumente:</h3><div class='line'></div>";
|
||||
$queries="";
|
||||
$queries = createKdnRechQry($skspage,$pagesize,$src,$combiner,$id,$typ,1);
|
||||
$qry = mysqli_query($dbconn,$queries["all"])
|
||||
or die("Datenbank fehler: ".mysqli_error($dbconn));
|
||||
$numres = mysqli_num_rows($qry);
|
||||
/*
|
||||
if(!$numres)
|
||||
{
|
||||
$queries = createKdnRechQry($page,$pagesize,$src,$combiner,1);
|
||||
$qry = mysqli_query($dbconn,$queries["all"])
|
||||
or die("Datenbank fehler: ".mysqli_error($dbconn));
|
||||
$numres = mysqli_num_rows($qry);
|
||||
message("veraltete Datensätze wurden in die Suche einbezogen");
|
||||
}
|
||||
*/
|
||||
if($numres)
|
||||
{
|
||||
$speciallines[]=array();
|
||||
$listlines[]=array();
|
||||
$qry = mysqli_query($dbconn,$queries["limited"])
|
||||
or die("Datenbank fehler: ".mysqli_error($dbconn));
|
||||
while($res=mysqli_fetch_assoc($qry))
|
||||
{
|
||||
$speciallines[] = array("<a href='?action=rechshow&id=".$res["id"]."'>".$res["rechnr"]."</a>",
|
||||
$res["date"],
|
||||
$res["artikel"],
|
||||
"<span class='del' title='löschen' onClick='askdel(\"Möchten Sie das Dokument ".$res["rechnr"]."<br />wirklich <b>unwiederruflich</b> löschen?\",\"?action=rechadd&rechid=".$res["id"]."&del=1\")'></span>");
|
||||
}
|
||||
$headings = array("Nummer","Datum","Artikel","Aktion");
|
||||
|
||||
if($fulltag)
|
||||
ok("Die Suche nach ".htmlspecialchars($fulltag)." ergab ".$numres." Ergebnisse");
|
||||
else
|
||||
ok($numres." Dokumente sind von SKS vorhanden.");
|
||||
|
||||
displaySplitPages($pagesize,$page,$skspage,1,$numres,"ajax_searchkdnrech",",$typ,$id");
|
||||
displayList($headings,array(),$speciallines);
|
||||
displaySplitPages($pagesize,$page,$skspage,1,$numres,"ajax_searchkdnrech",",$typ,$id");
|
||||
}
|
||||
else
|
||||
{
|
||||
if($fulltag)
|
||||
ok("Die Suche nach ".htmlspecialchars($fulltag)." ergab keine Ergebnisse.");
|
||||
else
|
||||
ok("Keine Einträge.");
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
@@ -0,0 +1,86 @@
|
||||
<?php
|
||||
require_once("../incs/connectmysql.php");
|
||||
require_once("../incs/funcs.php");
|
||||
require_once("../incs/listfuncs.php");
|
||||
require('../smarty/libs/Smarty.class.php');
|
||||
|
||||
|
||||
$smarty = new Smarty;
|
||||
|
||||
|
||||
$pagesize = 50;
|
||||
|
||||
|
||||
if(!$err)
|
||||
{
|
||||
$fulltag = utf8_encode($_GET["search"]);
|
||||
$src = explode(" ",$fulltag);
|
||||
$combiner = mysql_escape_string($_GET["link"]);
|
||||
if($combiner != "AND" && $combiner != "OR")
|
||||
{
|
||||
$combiner = "AND";
|
||||
}
|
||||
$page = $_GET["page"];
|
||||
$id = $_GET["kdnid"];
|
||||
$queries = createKommQry($page,$pagesize,$src,$combiner,$id,$typ,0);
|
||||
$qry = mysqli_query($dbconn,$queries["all"])
|
||||
or die("Datenbank fehler: ".mysqli_error($dbconn));
|
||||
$numres = mysqli_num_rows($qry);
|
||||
/*
|
||||
if(!$numres)
|
||||
{
|
||||
$queries = createKdnRechQry($page,$pagesize,$src,$combiner,1);
|
||||
$qry = mysqli_query($dbconn,$queries["all"])
|
||||
or die("Datenbank fehler: ".mysqli_error($dbconn));
|
||||
$numres = mysqli_num_rows($qry);
|
||||
message("veraltete Datensätze wurden in die Suche einbezogen");
|
||||
}
|
||||
*/
|
||||
if($numres)
|
||||
{
|
||||
$listlines=array();
|
||||
$qry = mysqli_query($dbconn,$queries["limited"])
|
||||
or die("Datenbank fehler: ".mysqli_error($dbconn));
|
||||
while($res=mysqli_fetch_assoc($qry))
|
||||
{
|
||||
$actions = " <a href='?action=kundenchange&do=adress&adressid=".$res["id"]."&kunde=$id'><span class='edit' title='Adresse ändern'></span></a>";
|
||||
$actions .= " <span class='del' title='Adresse löschen' onClick='askdel(\"Möchten Sie diese Adresse<br /><b>UND ALLE ZUGEHÖRIGEN RECHNUNGEN</b><br />wirklich unwiederruflich löschen?\",\"?action=kundenchange&do=adress&adressid=".$res["id"]."&del=1\")'></span>";
|
||||
$actions .= " <a href='http://maps.google.com?q=".$res["plz"]."+".$res["ort"]."+".$res["str"]."+".$res["hnr"]."' class='noloading' target='_blank'><span class='map' title='Auf Karte zeigen'></span></a>";
|
||||
$actions .= " <a href='?action=terminadd&adressid=".$res["id"]."'><span class='termadd' title='Termin anlegen'></span></a><br />";
|
||||
$actions .= " <a href='?action=rechnungadd&type=1&adressid=".$res["id"]."'><span class='rechnadd' title='Rechnung anlegen'></span></a>";
|
||||
$actions .= " <a href='?action=rechnungadd&type=1&adressid=".$res["id"]."'><span class='gutschradd' title='Gutschrift anlegen'></span></a>";
|
||||
$actions .= " <a href='?action=rechnungadd&type=3&adressid=".$res["id"]."'><span class='angadd' title='Angebot anlegen'></span></a>";
|
||||
$actions .= " <a href='?action=rechnungadd&type=5&adressid=".$res["id"]."'><span class='letteradd' title='Brief anlegen'></span></a><br />";
|
||||
$tmpqry = mysqli_query($dbconn,"SELECT id FROM kontakt WHERE partner_id = '$id' AND typ_id = 1");
|
||||
if(mysqli_fetch_array($tmpqry))
|
||||
$actions .= "<a href='?action=rechnungadd&id=".$res["id"]."&adressid=".$res["adresse_id"]."&mail=1'><span class='mail' title='Dokument per E-Mail versenden'></span></a>";
|
||||
$name=makenameline($res);
|
||||
$adresse=makeadressline($res);
|
||||
$listlines[] = array($name,
|
||||
$adresse["ort"], $adresse["str"],
|
||||
maketelline($res),
|
||||
$actions
|
||||
);
|
||||
}
|
||||
$headings = array("Name","Ort","Straße","Tel","Aktionen");
|
||||
$lastdisplay = ($page+1)*$pagesize;
|
||||
if($numres < $lastdisplay)
|
||||
$lastdisplay = $numres;
|
||||
if($fulltag)
|
||||
ok("Die Suche nach ".htmlspecialchars($fulltag)." ergab ".$numres." Ergebnisse.<br /> Ergebnis ".($page*$pagesize+1)." bis ".$lastdisplay);
|
||||
else
|
||||
ok($numres." Kommissionen sind insgesamt gespeichert.");
|
||||
|
||||
displaySplitPages($pagesize,$page,$skspage,0,$numres,"ajax_searchkomm",",$id");
|
||||
displayList($headings,$listlines,$speciallines);
|
||||
displaySplitPages($pagesize,$page,$skspage,0,$numres,"ajax_searchkomm",",$id");
|
||||
}
|
||||
else
|
||||
{
|
||||
if($fulltag)
|
||||
ok("Die Suche nach ".htmlspecialchars($fulltag)." ergab keine Ergebnisse.");
|
||||
else
|
||||
ok("Keine Einträge.");
|
||||
}
|
||||
}
|
||||
?>
|
||||
@@ -0,0 +1,85 @@
|
||||
<?php
|
||||
require_once("../incs/connectmysql.php");
|
||||
require_once("../incs/funcs.php");
|
||||
require_once("../incs/listfuncs.php");
|
||||
require('../smarty/libs/Smarty.class.php');
|
||||
|
||||
|
||||
$smarty = new Smarty;
|
||||
|
||||
|
||||
$pagesize = 50;
|
||||
if(!isset($err)){
|
||||
$err="";
|
||||
}
|
||||
|
||||
if(!$err)
|
||||
{
|
||||
if(!isset($_GET["link"])){
|
||||
$_GET["link"] = "";
|
||||
}
|
||||
if(!isset($_GET["field"])){
|
||||
$_GET["field"] = "";
|
||||
}
|
||||
|
||||
$_SESSION["search"] = $_GET["search"];
|
||||
$_SESSION["link"] = $_GET["link"];
|
||||
$_SESSION["field"] = $_GET["field"];
|
||||
$_SESSION["page"] = $_GET["page"];
|
||||
$speciallines=array();
|
||||
|
||||
$fulltag = utf8_encode($_GET["search"]);
|
||||
$src = explode(" ",$fulltag);
|
||||
$combiner = mysql_escape_string($_GET["link"]);
|
||||
if($combiner != "AND" && $combiner != "OR")
|
||||
{
|
||||
$combiner = "AND";
|
||||
}
|
||||
$page = $_GET["page"];
|
||||
|
||||
$queries = createPartQry($page,$pagesize,$src,$combiner,$_GET["field"],0,1);
|
||||
$qry = mysqli_query($dbconn,$queries["all"])
|
||||
or die("Datenbank fehler: ".mysqli_error($dbconn));
|
||||
$numres = mysqli_num_rows($qry);
|
||||
if(!$numres)
|
||||
{
|
||||
$queries = createPartQry($page,$pagesize,$src,$combiner,$_GET["field"],1,1);
|
||||
$qry = mysqli_query($dbconn,$queries["all"])
|
||||
or die("Datenbank fehler: ".mysqli_error($dbconn));
|
||||
$numres = mysqli_num_rows($qry);
|
||||
message("veraltete Datensätze wurden in die Suche einbezogen");
|
||||
}
|
||||
if($numres)
|
||||
{
|
||||
$qry = mysqli_query($dbconn,$queries["limited"])
|
||||
or die("Datenbank fehler: ".mysqli_error($dbconn));
|
||||
while($res=mysqli_fetch_assoc($qry))
|
||||
{
|
||||
$name = $res["vname"]." ".$res["nname"];
|
||||
if(isset($res["firma"]))
|
||||
$name .= " <i><u>".$res["firma"]."</u></i>";
|
||||
if(isset($res["vwahl"]))
|
||||
$res["tel"] = $res["vwahl"]."/".$res["tel"];
|
||||
$adresse=makeadressline($res);
|
||||
if(!isset($res["updated_by"]))
|
||||
$listlines[] = array("<a href='?action=kundenshow&id=".$res["kdnr"]."'>".$res["kdnr"]."</a>",makenameline($res),$adresse["ort"], $adresse["str"], maketelline($res),"<span class='del' title='Kunde löschen' onClick='askdel(\"Möchten Sie den Kunden ".$res["kdnr"]." und<br />ALLE ZUGEHÖRIGEN DATEN<br />wirklich <b>unwiederruflich</b> löschen?\",\"?action=kundenadd&kundeid=".$res["kdnr"]."&del=1\")'></span><a href='?action=projectlist&kundeid=".$res["kdnr"]."'><span class='projects' title='Projekte dieses Kunden auflisten'></span></a>");
|
||||
else
|
||||
$speciallines[] = array("<a href='?action=kundenshow&id=".$res["kdnr"]."'>".$res["kdnr"]."</a>",makenameline($res),$adresse["ort"], $adresse["str"], maketelline($res),"<span class='del' title='Kunde löschen' onClick='askdel(\"Möchten Sie den Kunden ".$res["kdnr"]." und<br />ALLE ZUGEHÖRIGEN DATEN<br />wirklich <b>unwiederruflich</b> löschen?\",\"?action=kundenadd&kundeid=".$res["kdnr"]."&del=1\")'></span><a href='?action=projectlist&kundeid=".$res["kdnr"]."'><span class='projects' title='Projekte dieses Kunden auflisten'></span></a>");
|
||||
}
|
||||
$headings = array("Kd.Nr.","Name/<i><u>Firma</u></i>","Ort","Straße","Telefon","Löschen");
|
||||
$lastdisplay = (intval($page)+1)*$pagesize;
|
||||
if($numres < $lastdisplay)
|
||||
$lastdisplay = $numres;
|
||||
if($fulltag)
|
||||
ok("Die Suche nach ".htmlspecialchars($fulltag)." ergab ".$numres." Ergebnisse.<br /> Ergebnis ".($page*$pagesize+1)." bis ".$lastdisplay);
|
||||
else
|
||||
ok($numres." Kunden sind insgesamt gespeichert.");
|
||||
|
||||
displayPages($pagesize,$page,$numres,"ajax_searchkunden");
|
||||
displayList($headings,$listlines,$speciallines);
|
||||
displayPages($pagesize,$page,$numres,"ajax_searchkunden");
|
||||
}
|
||||
else
|
||||
ok("Die Suche nach ".htmlspecialchars($fulltag)." ergab keine Ergebnisse.");
|
||||
}
|
||||
?>
|
||||
@@ -0,0 +1,75 @@
|
||||
<?php
|
||||
require_once("../incs/connectmysql.php");
|
||||
require_once("../incs/funcs.php");
|
||||
require_once("../incs/listfuncs.php");
|
||||
require('../smarty/libs/Smarty.class.php');
|
||||
|
||||
|
||||
$smarty = new Smarty;
|
||||
|
||||
$pagesize = 50;
|
||||
|
||||
|
||||
if(!isset($err))
|
||||
{
|
||||
|
||||
if(!isset($_GET["link"])){
|
||||
$_GET["link"]="";
|
||||
}
|
||||
|
||||
$fulltag = utf8_encode($_GET["search"]);
|
||||
$src = explode(" ",$fulltag);
|
||||
$combiner = mysql_escape_string($_GET["link"]);
|
||||
if($combiner != "AND" && $combiner != "OR")
|
||||
{
|
||||
$combiner = "AND";
|
||||
}
|
||||
$page = $_GET["page"];
|
||||
|
||||
$queries = createPartQry($page,$pagesize,$src,$combiner,$_GET["field"],0,2);
|
||||
$qry = mysqli_query($dbconn,$queries["all"])
|
||||
or die("Datenbank fehler: ".mysqli_error($dbconn));
|
||||
$numres = mysqli_num_rows($qry);
|
||||
if(!$numres)
|
||||
{
|
||||
$queries = createPartQry($page,$pagesize,$src,$combiner,$_GET["field"],1,2);
|
||||
$qry = mysqli_query($dbconn,$queries["all"])
|
||||
or die("Datenbank fehler: ".mysqli_error($dbconn));
|
||||
$numres = mysqli_num_rows($qry);
|
||||
message("veraltete Datensätze wurden in die Suche einbezogen");
|
||||
}
|
||||
if($numres)
|
||||
{
|
||||
$qry = mysqli_query($dbconn,$queries["limited"])
|
||||
or die("Datenbank fehler: ".mysqli_error($dbconn));
|
||||
while($res=mysqli_fetch_assoc($qry))
|
||||
{
|
||||
if(!isset($res["nname"]))
|
||||
$name = $res["firma"];
|
||||
else
|
||||
$name = $res["vname"]." ".$res["nname"];
|
||||
if(isset($res["vwahl"]))
|
||||
$res["tel"] = $res["vwahl"]."/".$res["tel"];
|
||||
if(!isset($res["updated_by"]))
|
||||
$listlines[] = array("<a href='?action=liefershow&id=".$res["kdnr"]."'>".$res["kdnr"]."</a>",$name,$res["plz"]." ".$res["ort"], $res["str"]." ".$res["hnr"], $res["tel"],"<span class='del' title='Kunde löschen' onClick='askdel(\"Möchten Sie den Kunden ".$res["kdnr"]." und<br />ALLE ZUGEHÖRIGEN DATEN<br />wirklich <b>unwiederruflich</b> löschen?\",\"?action=kundenadd&kundeid=".$res["kdnr"]."&del=1\")'></span>");
|
||||
else
|
||||
$speciallines[] = array("<a href='?action=liefershow&id=".$res["kdnr"]."'>".$res["kdnr"]."</a>",$name,$res["plz"]." ".$res["ort"], $res["str"]." ".$res["hnr"], $res["tel"],"<span class='del' title='Kunde löschen' onClick='askdel(\"Möchten Sie den Kunden ".$res["kdnr"]." und<br />ALLE ZUGEHÖRIGEN DATEN<br />wirklich <b>unwiederruflich</b> löschen?\",\"?action=kundenadd&kundeid=".$res["kdnr"]."&del=1\")'></span>");
|
||||
}
|
||||
$headings = array("Kd.Nr.","Name/Firma","Ort","Straße","Telefon","Löschen");
|
||||
$lastdisplay = ($page+1)*$pagesize;
|
||||
if($numres < $lastdisplay)
|
||||
$lastdisplay = $numres;
|
||||
if($fulltag)
|
||||
ok("Die Suche nach ".htmlspecialchars($fulltag)." ergab ".$numres." Ergebnisse.<br /> Ergebnis ".($page*$pagesize+1)." bis ".$lastdisplay);
|
||||
else
|
||||
ok($numres." Lieferanten sind insgesamt gespeichert.");
|
||||
|
||||
$speciallines = Array();
|
||||
displayPages($pagesize,$page,$numres,"ajax_searchkunden");
|
||||
displayList($headings,$listlines,$speciallines);
|
||||
displayPages($pagesize,$page,$numres,"ajax_searchkunden");
|
||||
}
|
||||
else
|
||||
ok("Die Suche nach ".htmlspecialchars($fulltag)." ergab keine Ergebnisse.");
|
||||
}
|
||||
?>
|
||||
@@ -0,0 +1,167 @@
|
||||
<?php
|
||||
require_once("../incs/connectmysql.php");
|
||||
require_once("../incs/funcs.php");
|
||||
require_once("../incs/listfuncs.php");
|
||||
require('../smarty/libs/Smarty.class.php');
|
||||
|
||||
|
||||
$smarty = new Smarty;
|
||||
|
||||
|
||||
$pagesize = 25;
|
||||
|
||||
|
||||
if(!isset($err))
|
||||
{
|
||||
if(!isset($_GET["link"])){
|
||||
$_GET["link"]="";
|
||||
}
|
||||
if(!isset($_GET["typ"])){
|
||||
$_GET["typ"]="";
|
||||
}
|
||||
if(!isset($_GET["kdnid"])){
|
||||
$_GET["kdnid"]="";
|
||||
}
|
||||
$fulltag = utf8_encode($_GET["search"]);
|
||||
$src = explode(" ",$fulltag);
|
||||
$combiner = mysql_escape_string($_GET["link"]);
|
||||
if($combiner != "AND" && $combiner != "OR")
|
||||
{
|
||||
$combiner = "AND";
|
||||
}
|
||||
$page = $_GET["page"];
|
||||
$skspage = $_GET["skspage"];
|
||||
$typ = $_GET["typ"];
|
||||
$id = $_GET["kdnid"];
|
||||
$queries = createRechQry($page,$pagesize,$src,$combiner,0);
|
||||
$qry = mysqli_query($dbconn,$queries["all"])
|
||||
or die("Datenbank fehler: ".mysqli_error($dbconn));
|
||||
$numres = mysqli_num_rows($qry);
|
||||
/*
|
||||
if(!$numres)
|
||||
{
|
||||
$queries = createKdnRechQry($page,$pagesize,$src,$combiner,1);
|
||||
$qry = mysqli_query($dbconn,$queries["all"])
|
||||
or die("Datenbank fehler: ".mysqli_error($dbconn));
|
||||
$numres = mysqli_num_rows($qry);
|
||||
message("veraltete Datensätze wurden in die Suche einbezogen");
|
||||
}
|
||||
*/
|
||||
if($numres)
|
||||
{
|
||||
$qry = mysqli_query($dbconn,$queries["limited"])
|
||||
or die("Datenbank fehler: ".mysqli_error($dbconn));
|
||||
while($res=mysqli_fetch_assoc($qry))
|
||||
{
|
||||
$actions = "<span class='del' title='löschen' onClick='askdel(\"Möchten Sie das Dokument ".$res["drechnr"]."<br />wirklich <b>unwiederruflich</b> löschen?\",\"?action=rechnungadd&id=".$res["id"]."&del=1\")'></span>";
|
||||
$actions .= "<a href='?action=rechnungadd&id=".$res["id"]."&adressid=".$res["adresse_id"]."'><span class='edit' title='Dokument ändern'></span></a>";
|
||||
$actions .= "<a href='?action=rechnungadd&id=".$res["id"]."&adressid=".$res["adresse_id"]."&changeadr=1'><span class='changeadr' title='Adresse ändern'></span></a>";
|
||||
$actions .= "<a href='?action=rechnungadd&id=".$res["id"]."&adressid=".$res["adresse_id"]."©=1'><span class='copy' title='Dokument kopieren'></span></a>";
|
||||
switch($res["typ_id"])
|
||||
{
|
||||
case 1:
|
||||
//$res["drechnr"] = "R".$res["rechnr"];
|
||||
if($res["storno"] == 1)
|
||||
$actions .= "<span class='rechnnostorn' title='STORNIERT'></span>";
|
||||
else
|
||||
$actions .= "<a href='?action=rechnungadd&id=".$res["id"]."&adressid=".$res["adresse_id"]."&storno=YES'><span class='rechnstorn' title='Stornieren'></span></a>";
|
||||
break;
|
||||
case 2:
|
||||
//$res["drechnr"] = "G".$res["rechnr"];
|
||||
break;
|
||||
case 3:
|
||||
$actions .= "<a href='?action=rechnungadd&id=".$res["id"]."&adressid=".$res["adresse_id"]."&newtype=1'><span class='rechnadd' title='Rechnung aus diesem Angebot erstellen'></span></a>";
|
||||
$actions .= "<a href='?action=rechnungadd&id=".$res["id"]."&adressid=".$res["adresse_id"]."&newtype=4'><span class='bestadd' title='Auftragsbestätigung aus diesem Angebot erstellen'></span></a>";
|
||||
//$res["drechnr"] = "A".$res["rechnr"];
|
||||
break;
|
||||
case 4:
|
||||
$actions .= "<a href='?action=rechnungadd&id=".$res["id"]."&adressid=".$res["adresse_id"]."&newtype=1'><span class='rechnadd' title='Rechnung aus dieser Auftragsbestätigung erstellen'></span></a>";
|
||||
//$res["drechnr"] = "B".$res["rechnr"];
|
||||
break;
|
||||
}
|
||||
if($res["storno"] == 1){
|
||||
$listlines[] = array("<a href='?action=rechshow&id=".$res["id"]."'><font color='#FF0000'>".$res["drechnr"]."</font></a>",
|
||||
$res["date"],
|
||||
$res["artikel"],
|
||||
$actions
|
||||
);
|
||||
}
|
||||
else{
|
||||
$listlines[] = array("<a href='?action=rechshow&id=".$res["id"]."'>".$res["drechnr"]."</a>",
|
||||
$res["date"],
|
||||
$res["artikel"],
|
||||
$actions
|
||||
);
|
||||
}
|
||||
}
|
||||
$headings = array("Nummer","Datum","Artikel","Aktionen");
|
||||
$lastdisplay = ($page+1)*$pagesize;
|
||||
if($numres < $lastdisplay)
|
||||
$lastdisplay = $numres;
|
||||
if($fulltag)
|
||||
ok("Die Suche nach ".htmlspecialchars($fulltag)." ergab ".$numres." Ergebnisse.<br /> Ergebnis ".($page*$pagesize+1)." bis ".$lastdisplay);
|
||||
else
|
||||
ok($numres." Dokumente sind insgesamt gespeichert.");
|
||||
$speciallines = Array();
|
||||
displaySplitPages($pagesize,$page,$skspage,0,$numres,"ajax_searchrech");
|
||||
displayList($headings,$listlines,$speciallines);
|
||||
displaySplitPages($pagesize,$page,$skspage,0,$numres,"ajax_searchrech");
|
||||
}
|
||||
else
|
||||
{
|
||||
if($fulltag)
|
||||
ok("Die Suche nach ".htmlspecialchars($fulltag)." ergab keine Ergebnisse.");
|
||||
else
|
||||
ok("Keine Einträge.");
|
||||
}
|
||||
|
||||
|
||||
//OLD SKS RECHNUNGEN!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
|
||||
if(getUserSetting($dbconn,"show_sks", mysql_escape_string($_SESSION["user"]), 1)) //show sks rechnungen????
|
||||
{
|
||||
echo "<h3>SKS Dokumente:</h3><div class='line'></div>";
|
||||
$queries = createRechQry($skspage,$pagesize,$src,$combiner,1);
|
||||
$qry = mysqli_query($dbconn,$queries["all"])
|
||||
or die("Datenbank fehler: ".mysqli_error($dbconn));
|
||||
$numres = mysqli_num_rows($qry);
|
||||
/*
|
||||
if(!$numres)
|
||||
{
|
||||
$queries = createKdnRechQry($page,$pagesize,$src,$combiner,1);
|
||||
$qry = mysqli_query($dbconn,$queries["all"])
|
||||
or die("Datenbank fehler: ".mysqli_error($dbconn));
|
||||
$numres = mysqli_num_rows($qry);
|
||||
message("veraltete Datensätze wurden in die Suche einbezogen");
|
||||
}
|
||||
*/
|
||||
if($numres)
|
||||
{
|
||||
$qry = mysqli_query($dbconn,$queries["limited"]);
|
||||
while($res=mysqli_fetch_assoc($qry))
|
||||
{
|
||||
$speciallines[] = array("<a href='?action=rechshow&id=".$res["id"]."'>".$res["rechnr"]."</a>",
|
||||
$res["date"],
|
||||
$res["artikel"],
|
||||
"<span class='del' title='löschen' onClick='askdel(\"Möchten Sie das Dokument ".$res["rechnr"]."<br />wirklich <b>unwiederruflich</b> löschen?\",\"?action=rechadd&rechid=".$res["id"]."&del=1\")'></span>");
|
||||
}
|
||||
$headings = array("Nummer","Datum","Artikel","Aktion");
|
||||
|
||||
if($fulltag)
|
||||
ok("Die Suche nach ".htmlspecialchars($fulltag)." ergab ".$numres." Ergebnisse");
|
||||
else
|
||||
ok($numres." Dokumente sind von SKS vorhanden.");
|
||||
displaySplitPages($pagesize,$page,$skspage,1,$numres,"ajax_searchrech");
|
||||
displayList($headings,array(),$speciallines);
|
||||
displaySplitPages($pagesize,$page,$skspage,1,$numres,"ajax_searchrech");
|
||||
}
|
||||
else
|
||||
{
|
||||
if($fulltag)
|
||||
ok("Die Suche nach ".htmlspecialchars($fulltag)." ergab keine Ergebnisse.");
|
||||
else
|
||||
ok("Keine Einträge.");
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
@@ -0,0 +1,194 @@
|
||||
<?php
|
||||
require_once("../incs/connectmysql.php");
|
||||
require_once("../incs/funcs.php");
|
||||
require_once("../incs/listfuncs.php");
|
||||
require('../smarty/libs/Smarty.class.php');
|
||||
|
||||
|
||||
$smarty = new Smarty;
|
||||
|
||||
|
||||
$pagesize = 25;
|
||||
|
||||
|
||||
if(!isset($err))
|
||||
{
|
||||
$usercolors = array("#f00","#0c0","#ff0","#90c","#0bb","#066","#09f","#f60","#00f","#f09");
|
||||
|
||||
$fulltag = utf8_encode($_GET["search"]);
|
||||
$src = explode(" ",$fulltag);
|
||||
if(isset($_GET["link"])){
|
||||
$combiner = mysql_escape_string($_GET["link"]);
|
||||
}else{
|
||||
$combiner = "";
|
||||
}
|
||||
if($combiner != "AND" && $combiner != "OR")
|
||||
{
|
||||
$combiner = "AND";
|
||||
}
|
||||
$page = $_GET["page"];
|
||||
$termtyp = $_GET["termtyp"];
|
||||
$_SESSION["termtyp"] = $termtyp;
|
||||
$queries = createTermQry($page,$pagesize,$src,$combiner,$termtyp);
|
||||
$qry = mysqli_query($dbconn,$queries["all"])
|
||||
or die("Datenbank fehler: ".mysqli_error($dbconn));
|
||||
$numres = mysqli_num_rows($qry);
|
||||
if($numres)
|
||||
{
|
||||
$qry = mysqli_query($dbconn,$queries["limited"])
|
||||
or die("Datenbank fehler: ".mysqli_error($dbconn));
|
||||
$counter = 0;
|
||||
while($res=mysqli_fetch_assoc($qry))
|
||||
{
|
||||
$counter = $counter+1;
|
||||
$termdauer = "";
|
||||
$termtime ="";
|
||||
$telqry = mysqli_query($dbconn,"SELECT GROUP_CONCAT(nr SEPARATOR ', ') AS nr from tel WHERE partner_id = '".$res["partner_id"]."' AND RIGHT(nr,1) <> '-' GROUP BY partner_id")or $err=error("Fehler beim Listen der Termine <br />".mysqli_error($dbconn));
|
||||
$telres=mysqli_fetch_assoc($telqry);
|
||||
//Normale Termine anzeigen
|
||||
if($res)
|
||||
{
|
||||
$actions = "<span class='del' title='löschen' onClick='askdel(\"Möchten Sie den Termiiin ".htmlspecialchars($res["head"],ENT_QUOTES)."<br />wirklich <b>unwiederruflich</b> löschen?\",\"?action=terminadd&id=".$res["id"]."&del=1\")'></span>";
|
||||
$actions .= "<a href='?action=terminadd&id=".$res["id"]."&adressid=".$res["adresse_id"]."'><span class='edit' title='Termin ändern'></span></a>";
|
||||
$actions .= "<a href='?action=kundenshow&id=".$res["partner_id"]."'><span class='partner' title='Kunden anzeigen'></span></a>";
|
||||
$actions .= "<a href='?action=terminshow&id=".$res["id"]."'><span class='print' title='Termin drucken'></span></a>";
|
||||
if(!$res["done"])
|
||||
$actions .= "<span class='check' title='Termin als erledigt markieren' onClick='askbranch(\"Möchten Sie einen Folgetermin vormerken?\",\"?action=terminadd&id=".$res["id"]."\",\"?action=terminadd&id=".$res["id"]."&done=yes\")'></span>";
|
||||
else
|
||||
$actions .= "<a href='?action=terminadd&id=".$res["id"]."&done=no'><span class='cross' title='Termin als nicht erledigt markieren'></span></a>";
|
||||
$split_termdauer = explode(":",$res["termdauer"]);
|
||||
|
||||
if($res["termtime"] == "0000-00-00 00:00:00")
|
||||
$termtime = "N/A";
|
||||
else if($split_termdauer[0] > 23)
|
||||
{
|
||||
if($split_termdauer[0]/24 > 1)
|
||||
{
|
||||
$termtime = date("d.m.Y - ",strtotime($res["termtime"]));
|
||||
$termtime .= date("d.m",strtotime("+".(($split_termdauer[0]/24)-1)." day",strtotime($res["termtime"])));
|
||||
}
|
||||
else
|
||||
{
|
||||
$termtime = date("d.m.Y",strtotime($res["termtime"]));
|
||||
}
|
||||
}
|
||||
else
|
||||
$termtime = date("d.m.Y H:i ",strtotime($res["termtime"]))."Uhr";
|
||||
|
||||
if($split_termdauer[0] > 23)
|
||||
{
|
||||
if($split_termdauer[0]/24 > 1)
|
||||
$termdauer = ($split_termdauer[0]/24)." Tage";
|
||||
else
|
||||
$termdauer = ($split_termdauer[0]/24)." Tag";
|
||||
}
|
||||
else if($split_termdauer[0] > 0)
|
||||
$termdauer = ltrim(substr($res["termdauer"],0,2),"0")." Std";
|
||||
if($split_termdauer[0] > 0 && $split_termdauer[1] > 0)
|
||||
$termdauer .= " - ";
|
||||
if($split_termdauer[1] > 0)
|
||||
$termdauer .= ltrim(substr($res["termdauer"],3,2),"0")." Min";
|
||||
|
||||
$adresse = "<b>".$res["plz"]." ".$res["ort"];
|
||||
if($res["ortsteil"])
|
||||
$adresse .= "-".$res["ortsteil"];
|
||||
$adresse .= "</b><br />".$res["str"]." ".$res["hnr"];
|
||||
if(isset($telres)){
|
||||
if($res["vname"])
|
||||
$adresse .= "<br />Tel: ".$telres["nr"]."<br />(".$res["vname"]." ".$res["nname"].")";
|
||||
else if($res["nname"])
|
||||
$adresse .= "<br />Tel: ".$telres["nr"]."<br />(".$res["nname"].")";
|
||||
else if($res["firma"])
|
||||
$adresse .= "<br />Tel: ".$telres["nr"]."<br />(".$res["firma"].")";
|
||||
else
|
||||
$adresse .= "<br />Tel: ".$telres["nr"];
|
||||
}
|
||||
$namelist = $res["uservname"]." ".substr($res["usernname"],0,1);
|
||||
if($res["user2"])
|
||||
$namelist .= ", ".$res["uservname2"]." ".substr($res["usernname2"],0,1);
|
||||
if($res["user3"])
|
||||
$namelist .= ", ".$res["uservname3"]." ".substr($res["usernname3"],0,1);
|
||||
if($res["user4"])
|
||||
$namelist .= ", ".$res["uservname4"]." ".substr($res["usernname4"],0,1);
|
||||
if($termtyp == 1){
|
||||
$checkbox = "<input type='checkbox' value='".$res["id"]."' id='erl".$counter."' name='erl".$counter."'></input>";
|
||||
|
||||
$listlines[] = array("<a href='?action=terminshow&id=".$res["id"]."'><b>".$res["typ"]."</b></a><br />".$namelist,
|
||||
"<a href='?action=terminshow&id=".$res["id"]."'>".$res["head"]."</a>",
|
||||
$termtime,
|
||||
$termdauer,
|
||||
$adresse,
|
||||
$actions,
|
||||
$checkbox
|
||||
);
|
||||
}
|
||||
else if($termtyp == 3){
|
||||
$checkbox = "<input type='checkbox' value='".$res["id"]."' id='del".$counter."' name='del".$counter."'></input>";
|
||||
|
||||
$listlines[] = array("<a href='?action=terminshow&id=".$res["id"]."'><b>".$res["typ"]."</b></a><br />".$namelist,
|
||||
"<a href='?action=terminshow&id=".$res["id"]."'>".$res["head"]."</a>",
|
||||
$termtime,
|
||||
$termdauer,
|
||||
$adresse,
|
||||
$actions,
|
||||
$checkbox
|
||||
);
|
||||
}
|
||||
else{
|
||||
$listlines[] = array("<a href='?action=terminshow&id=".$res["id"]."'><b>".$res["typ"]."</b></a><br />".$namelist,
|
||||
"<a href='?action=terminshow&id=".$res["id"]."'>".$res["head"]."</a>",
|
||||
$termtime,
|
||||
$termdauer,
|
||||
$adresse,
|
||||
$actions
|
||||
);
|
||||
}
|
||||
if($res["user2"] || $res["user3"] || $res["user4"])
|
||||
$colors[] = "#fff";
|
||||
else if($res["color"])
|
||||
$colors[] = $res["color"];
|
||||
else
|
||||
$colors[] = "#fff";
|
||||
|
||||
}
|
||||
}
|
||||
if($termtyp == 1){
|
||||
$headings = array("Typ","Beschreibung","Datum","Dauer","Ort","Aktionen"," Erledigt ");
|
||||
}
|
||||
else if($termtyp == 3){
|
||||
$headings = array("Typ","Beschreibung","Datum","Dauer","Ort","Aktionen"," Löschen ");
|
||||
}
|
||||
else{
|
||||
$headings = array("Typ","Beschreibung","Datum","Dauer","Ort","Aktionen");
|
||||
}
|
||||
$lastdisplay = ($page+1)*$pagesize;
|
||||
if($numres < $lastdisplay)
|
||||
$lastdisplay = $numres;
|
||||
if($fulltag)
|
||||
ok("Die Suche nach ".htmlspecialchars($fulltag)." ergab ".$numres." Ergebnisse.<br /> Ergebnis ".($page*$pagesize+1)." bis ".$lastdisplay);
|
||||
else
|
||||
ok($numres." Termine sind insgesamt gespeichert.");
|
||||
|
||||
displayPages($pagesize,$page,$numres,"ajax_searchterm",",$termtyp");
|
||||
if($termtyp == 1){
|
||||
echo "<form action='?action=terminadd&id=multi&done=yes' method='post'><input type='hidden' name='pagesize' value='".$pagesize."'></input>";
|
||||
}
|
||||
else if($termtyp == 3){
|
||||
echo "<form action='?action=terminadd&id=multi&del=1' method='post'><input type='hidden' name='pagesize' value='".$pagesize."'></input>";
|
||||
}
|
||||
displayList($headings,$listlines,Array(),$colors);
|
||||
if($termtyp == 1 || $termtyp == 3){
|
||||
echo "<input type='submit' value='Mehrfachänderung ausführen'></input></form><br />";
|
||||
}
|
||||
displayPages($pagesize,$page,$numres,"ajax_searchterm",",$termtyp");
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
if($fulltag)
|
||||
ok("Die Suche nach ".htmlspecialchars($fulltag)." ergab keine Ergebnisse.");
|
||||
else
|
||||
ok("Keine Einträge.");
|
||||
}
|
||||
}
|
||||
?>
|
||||
@@ -0,0 +1,102 @@
|
||||
<?php
|
||||
require_once("../incs/connectmysql.php");
|
||||
require_once("../incs/funcs.php");
|
||||
require_once("../incs/listfuncs.php");
|
||||
require('../smarty/libs/Smarty.class.php');
|
||||
|
||||
|
||||
$smarty = new Smarty;
|
||||
|
||||
|
||||
$pagesize = 50;
|
||||
|
||||
|
||||
if(!isset($err))
|
||||
{
|
||||
if(!isset($_GET["link"])){
|
||||
$_GET["link"] = "";
|
||||
}
|
||||
$_SESSION["search"] = $_GET["search"];
|
||||
$_SESSION["link"] = $_GET["link"];
|
||||
$_SESSION["page"] = $_GET["page"];
|
||||
$_SESSION["user"] = $_GET["user"];
|
||||
$speciallines=array();
|
||||
|
||||
$fulltag = utf8_encode($_GET["search"]);
|
||||
$src = explode(" ",$fulltag);
|
||||
$combiner = mysql_escape_string($_GET["link"]);
|
||||
if($combiner != "AND" && $combiner != "OR")
|
||||
{
|
||||
$combiner = "AND";
|
||||
}
|
||||
$page = $_GET["page"];
|
||||
$user = $_GET["user"];
|
||||
$queries = createZeitQry($page,$pagesize,$src,$combiner,$user);
|
||||
$qry = mysqli_query($dbconn,$queries["all"])
|
||||
or die("Datenbank fehler: ".mysqli_error($dbconn));
|
||||
$numres = mysqli_num_rows($qry);
|
||||
echo "<a href='?action=zeitenadd&userid=".$_GET["user"]."'><span class='addcenter' title='Arbeitszeit eintragen'></span></a><br />";
|
||||
if($numres)
|
||||
{
|
||||
$qry = mysqli_query($dbconn,$queries["limited"])
|
||||
or die("Datenbank fehler: ".mysqli_error($dbconn));
|
||||
while($res=mysqli_fetch_assoc($qry))
|
||||
{
|
||||
$termdauer = "";
|
||||
$termtime ="";
|
||||
|
||||
//Normale Termine anzeigen
|
||||
if($res)
|
||||
{
|
||||
|
||||
if($res["gehen"] == $res["kommen"]){
|
||||
$res["dauer"] = "N/A";
|
||||
$res["gehen"] = "N/A";
|
||||
$res["pause_mins"] = "N/A";
|
||||
}
|
||||
else{
|
||||
$res["dauer_str"] = str_pad(floor($res["dauer_mins"]/60),2,'0',STR_PAD_LEFT)."h, ".str_pad($res["dauer_mins"]%60,2,'0',STR_PAD_LEFT)."min";
|
||||
if($res["early_mins"] < 0)
|
||||
$res["dauer_str"] .= " ( incl. ".ceil(-$res["early_mins"])."min. Abzug)";
|
||||
$res["pause_str"] = str_pad(floor($res["pause_mins"]/60),2,'0',STR_PAD_LEFT)."h, ".str_pad($res["pause_mins"]%60,2,'0',STR_PAD_LEFT)."min";
|
||||
}
|
||||
if($res["early_mins"] < 0)
|
||||
$res["dauer_mins"] = $res["dauer_mins"] + $res["early_mins"];
|
||||
|
||||
if($res["dauer_mins"] >= $res["sollDayMins"]){
|
||||
$durcolor= "#00AA00";
|
||||
}
|
||||
else{
|
||||
$durcolor= "#AA0000";
|
||||
}
|
||||
$listlines[] = array("<a href='?action=zeitenadd&id=".$res["id"]."&userid=".$user."'><b>".$res["kommen"]."</b></a><br />",
|
||||
"<a href='?action=zeitenadd&id=".$res["id"]."&userid=".$user."'>".$res["gehen"]."</a>",
|
||||
$res["pause_str"],
|
||||
"<font color='".$durcolor."'>".$res["dauer_str"]."</font>"
|
||||
);
|
||||
}
|
||||
}
|
||||
$headings = array("Kommen","Gehen","Pause","Dauer");
|
||||
$lastdisplay = ($page+1)*$pagesize;
|
||||
if($numres < $lastdisplay)
|
||||
$lastdisplay = $numres;
|
||||
if($fulltag)
|
||||
ok("Die Suche nach ".htmlspecialchars($fulltag)." ergab ".$numres." Ergebnisse.<br /> Ergebnis ".($page*$pagesize+1)." bis ".$lastdisplay);
|
||||
else
|
||||
ok($numres." Zeiten sind insgesamt gespeichert.");
|
||||
|
||||
displayPages($pagesize,$page,$numres,"ajax_searchzeit",",".$user);
|
||||
$colors=Array();
|
||||
displayList($headings,$listlines,$speciallines,$colors);
|
||||
displayPages($pagesize,$page,$numres,"ajax_searchzeit",",".$user);
|
||||
}
|
||||
else
|
||||
{
|
||||
if($fulltag)
|
||||
ok("Die Suche nach ".htmlspecialchars($fulltag)." ergab keine Ergebnisse.");
|
||||
else
|
||||
ok("Keine Einträge.");
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
@@ -0,0 +1,12 @@
|
||||
<?php
|
||||
require_once("../incs/connectmysql.php");
|
||||
|
||||
if(isset($_GET["touser"]) && !$err)
|
||||
{
|
||||
if($_GET["msg"])
|
||||
{
|
||||
$msg = utf8_encode($_GET["msg"]);
|
||||
$qry=mysqli_query($dbconn,"INSERT INTO message SET rec_id='".mysqli_escape_string($dbconn,$_GET["touser"])."', msg='".mysqli_escape_string($dbconn,$msg)."', datetime = NOW(), rd = 0, send_id='".mysql_escape_string($_SESSION["user"])."'");
|
||||
}
|
||||
}
|
||||
?>
|
||||
@@ -0,0 +1,81 @@
|
||||
<tr {if $nr%2==0}bgcolor='#dddddd'{/if} id='artrow{$nr|escape}'>
|
||||
<td>
|
||||
<button type="button" class='swart' onclick="swart({$nr|escape});"></button>
|
||||
{if $type == 3}
|
||||
<label class='artlabel'><input type="radio" class="artcheck" name="angtyp{$nr|escape}" id="1angtyp{$nr|escape}" value="1" checked="checked" />Normal</label><br />
|
||||
<label class='artlabel'><input type="radio" class="artcheck" name="angtyp{$nr|escape}" id="2angtyp{$nr|escape}" value="2" />Optional</label><br />
|
||||
<label class='artlabel'><input type="radio" class="artcheck" name="angtyp{$nr|escape}" id="3angtyp{$nr|escape}" value="3" />Alternativ</label><br />
|
||||
{else}
|
||||
<input type="hidden" name="angtyp{$nr|escape}" id="1angtyp{$nr|escape}" value="1" />
|
||||
<input type="hidden" id="2angtyp{$nr|escape}" value="1" />
|
||||
<input type="hidden" id="3angtyp{$nr|escape}" value="1" />
|
||||
{/if}
|
||||
</td>
|
||||
<td>
|
||||
<button type="button" class='nopagebreak' id='pagebreakimg{$nr|escape}' onclick="togglePageBreak({$nr|escape});" title='<b>Automatischer Seitenumbruch</b><br />Durch klick wird eine neue Seite an dieser Stelle Erzwungen''></button>
|
||||
<input type='hidden' id='pagebreak{$nr|escape}' name='pagebreak{$nr|escape}' value='' />
|
||||
<label class='checktext'><input type="checkbox" class="artcheck" name="artact{$nr}" id="artact{$nr}" value="1" checked="checked" onclick="artactivate({$nr|escape})" title='Ohne Haken wird dieser Artikel nicht angezeigt und nicht gespeichert' />Aktiv</label><br />
|
||||
<label class='artlabel'>Artikeltyp:</label><select class='artselect' name='arttyp{$nr|escape}' id='arttyp{$nr|escape}'>
|
||||
{html_options values=$typids output=$typs selected="{$typ}"}
|
||||
</select><br />
|
||||
<label class='artlabel'>Artikelbeschreibung:</label><br />
|
||||
<input class='art' value='' id='arthead{$nr|escape}' maxlength='50' name='arthead{$nr|escape}' onInput='addArtBlock({$type|escape},{$nr|escape});' /><br />
|
||||
<div id='arteig{$nr|escape}'>
|
||||
<div class="sweig_spacer"></div>
|
||||
<input class='arteig' value='' id='arteig{$nr|escape}_1' maxlength='100' name='arteig{$nr|escape}_1' onChange='addEigBlock({$nr|escape},1);' />
|
||||
<input class='artval' value='' id='artval{$nr|escape}_1' maxlength='50' name='artval{$nr|escape}_1' />
|
||||
<select name='arteinh{$nr|escape}_1' id='arteinh{$nr|escape}_1' class='arteinh'>
|
||||
{html_options values=$einhids output=$einhs selected="{$einh}"}
|
||||
</select>
|
||||
</div>
|
||||
<p>
|
||||
<label class='artlabel'>Bestellnummer (WA-Nr.):</label><br />
|
||||
<input class='artwa' value='' id='artwa{$nr|escape}' maxlength='50' name='artwa{$nr|escape}' />
|
||||
<label>Mwst:</label>
|
||||
<select name='artmwst{$nr|escape}' id='artmwst{$nr|escape}' class='arteinh'>
|
||||
{html_options values=$artmwstids output=$artmwsts selected="{$art.art.mwst_id|default:1}"}
|
||||
</select>
|
||||
</p>
|
||||
</td>
|
||||
<td class="pricetd">
|
||||
<label class='artlabel'>Menge:</label><br />
|
||||
<input class='artmen' value='' id='artmen{$nr|escape}' maxlength='7' pattern="\d{ldelim}0,3{rdelim}+(,\d{ldelim}0,3{rdelim})?" name='artmen{$nr|escape}' />
|
||||
<select name='artmeneinh{$nr|escape}' id='artmeneinh{$nr|escape}' class='artmeneinh'>
|
||||
{html_options values=$einhids output=$einhs selected="5"}
|
||||
</select><br />
|
||||
<label class='artlabel'>Preis:</label><br />
|
||||
<input class='artpr' value='' id='artpr{$nr|escape}' pattern="-?\d+(,\d{ldelim}2{rdelim})?" name='artpr{$nr|escape}' /><br />
|
||||
<label class='artlabel'>Rabatt:</label><br />
|
||||
<input class='artpr' value='' id='artrab{$nr|escape}' maxlength='3' pattern="[0-9]*" name='artrab{$nr|escape}' /><b>%</b>
|
||||
<br /><label class='checktext'><input type="checkbox" name="artrabtyp{$nr|escape}" id="artrabtyp{$nr|escape}" value="1" />Winterrabatt</label>
|
||||
</td>
|
||||
</tr>
|
||||
<script>
|
||||
$(function() {
|
||||
$( "#arthead"+{$nr|escape} ).autocomplete({
|
||||
source: "ajax/auto/art.php",
|
||||
minLength: 2,
|
||||
select: function( event, ui ) {
|
||||
i=0;
|
||||
$("#arthead{$nr}").val(ui.item.value);
|
||||
$("#artpr{$nr|escape}").val(ui.item.preis);
|
||||
$("#arttyp{$nr|escape}").val(ui.item.typ);
|
||||
$("#artmeneinh{$nr|escape}").val(ui.item.einh);
|
||||
cleareig({$nr});
|
||||
i=0;
|
||||
if(ui.item.eig)
|
||||
{
|
||||
$.each(ui.item.eig, function(index, value)
|
||||
{
|
||||
i++;
|
||||
addEigBlock({$nr|escape},i);
|
||||
$("#arteig"+{$nr|escape}+"_"+i).val(value.des);
|
||||
$("#artval"+{$nr|escape}+"_"+i).val(value.val);
|
||||
$("#arteinh"+{$nr|escape}+"_"+i).val(value.einh);
|
||||
});
|
||||
}
|
||||
return false;
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
@@ -0,0 +1,7 @@
|
||||
<br />
|
||||
<button type="button" class='sweig' onclick="sweig({$artnr|escape},{$eignr|escape});"></button>
|
||||
<input class='arteig' value='' id='arteig{$artnr|escape}_{$eignr|escape}' maxlength='100' name='arteig{$artnr|escape}_{$eignr|escape}' onChange='addEigBlock({$artnr|escape},{$eignr|escape});' />
|
||||
<input class='artval' value='' id='artval{$artnr|escape}_{$eignr|escape}' maxlength='50' name='artval{$artnr|escape}_{$eignr|escape}' />
|
||||
<select name='arteinh{$artnr|escape}_{$eignr|escape}' id='arteinh{$artnr|escape}_{$eignr|escape}' class='arteinh'>
|
||||
{html_options values=$einhids output=$einhs selected="{$einh}"}
|
||||
</select>
|
||||
@@ -0,0 +1 @@
|
||||
<div class="{$msgtype|escape|default:'message'}">{$message|default:'default message box'}</div>
|
||||
@@ -0,0 +1,17 @@
|
||||
<tr id='artrow{$worknr|escape}' {if $worknr%2==0}bgcolor='#dddddd'{/if}>
|
||||
<td>
|
||||
<label class='checktext'><input type='checkbox' class='' value='1' {if $workline.rechn == 1}checked='checked'{/if} id='workrechn{$worknr}' name='workrechn{$worknr}' onChange='checkPrevWork({$worknr});' />Berechnet</label><br />
|
||||
</td>
|
||||
<td>
|
||||
<label class='artlabel'>Arbeit:</label><br />
|
||||
<input class='work' value='' id='workhead{$worknr}' maxlength='150' name='workhead{$worknr}' onInput='addWorkBlock({$worknr});' />
|
||||
</td>
|
||||
<td>
|
||||
<label class='artlabel'>Stunden:</label><br />
|
||||
<input class='workstd' value='' id='workstd{$worknr}' maxlength='7' pattern="\d{ldelim}0,3{rdelim}(,\d{ldelim}0,3{rdelim})?" name='workstd{$worknr}' />
|
||||
</td>
|
||||
<td>
|
||||
<label class='artlabel'>Datum:</label><br />
|
||||
<input class='workdate' value='{$date}' id='workdate{$worknr}' maxlength='8' pattern="(0[1-9]|1[0-9]|2[0-9]|3[01]).(0[1-9]|1[012]).[0-9]{ldelim}2{rdelim}" name='workdate{$worknr}' />
|
||||
</td>
|
||||
</tr>
|
||||
@@ -0,0 +1,26 @@
|
||||
<?php
|
||||
require_once("../incs/connectmysql.php");
|
||||
require_once("../incs/funcs.php");
|
||||
require_once("../incs/listfuncs.php");
|
||||
require_once ("../incs/rechnung.php");
|
||||
require_once("../incs/makepdf.php");
|
||||
require('../smarty/libs/Smarty.class.php');
|
||||
|
||||
|
||||
$smarty = new Smarty;
|
||||
|
||||
$show = str_pad($_POST["show_firmaanr"],1,"0").str_pad($_POST["show_firma"],1,"0");
|
||||
$show .= str_pad($_POST["show_anr"],1,"0").str_pad($_POST["show_titel"],1,"0");
|
||||
$show .= str_pad($_POST["show_name"],1,"0");
|
||||
$show .= str_pad($_POST["show_anr2"],1,"0").str_pad($_POST["show_titel2"],1,"0");
|
||||
$show .= str_pad($_POST["show_name2"],1,"0").str_pad($_POST["show_str"],1,"0");
|
||||
$show .= str_pad($_POST["show_ort"],1,"0").str_pad($_POST["show_land"],1,"0");
|
||||
$show .= str_pad($_POST["show_zusatz"],1,"0");
|
||||
|
||||
$adresse = makeadressblockUmschlag($dbconn,$_POST["adressid"],$show,$_POST["adresserweiterung"]);
|
||||
$pdf = makeumschlagAddress(1,$adresse);
|
||||
$tmppdfname = str_replace(array(" ","."),array("_","_"),microtime());
|
||||
savePDF($pdf,"../temp/pdfpreview/$tmppdfname.pdf");
|
||||
echo "<iframe style='display: block; float: left; margin: 1em;' src='/kunden/temp/pdfpreview/$tmppdfname.pdf' width='98%' height='350px'></iframe>";
|
||||
//echo makeImageFromPDF("../temp/pdfpreview/$tmppdfname.pdf");
|
||||
?>
|
||||
@@ -0,0 +1,19 @@
|
||||
<?php
|
||||
require_once("../incs/connectmysql.php");
|
||||
require('../smarty/libs/Smarty.class.php');
|
||||
|
||||
$smarty = new Smarty;
|
||||
|
||||
|
||||
if(isset($_GET["function"]) && !$err)
|
||||
{
|
||||
|
||||
if($_GET["function"] == "newwork" && isset($_GET["worknr"]))
|
||||
{
|
||||
$smarty->assign("worknr",($_GET["worknr"]+1));
|
||||
$smarty->assign("date",date("d.m.y"));
|
||||
$smarty->display("workblock.tpl");
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
@@ -0,0 +1,14 @@
|
||||
<?php
|
||||
require_once("../incs/connectmysql.php");
|
||||
|
||||
if(isset($_GET["function"]) && !$err)
|
||||
{
|
||||
|
||||
|
||||
if($_GET["function"] == "saveZoomLevel" && isset($_GET["level"]))
|
||||
{
|
||||
$_SESSION["zoom"] = $_GET["level"];
|
||||
updateUserSetting($dbconn,"zoom", $_SESSION["zoom"], $_SESSION["user"]);
|
||||
}
|
||||
}
|
||||
?>
|
||||
Reference in New Issue
Block a user