diff --git a/include/basis_db.class.php b/include/basis_db.class.php index 2e52877f0..f4faf0d26 100644 --- a/include/basis_db.class.php +++ b/include/basis_db.class.php @@ -98,6 +98,7 @@ abstract class db extends basis $sql.=($limit?' limit '.trim($limit).' ':''); } } + if (!$results=$this->db_query($sql)) { $this->errormsg=$this->db_last_error(); diff --git a/include/firma.class.php b/include/firma.class.php index 452e84236..60e5492cc 100644 --- a/include/firma.class.php +++ b/include/firma.class.php @@ -42,7 +42,6 @@ class firma extends basis_db public $updatevon; // bigint public $firmentyp_kurzbz; public $schule; // boolean - // Neu in Rel. 2.0 public $steuernummer; // string public $gesperrt; // boolean public $aktiv; // boolean @@ -58,6 +57,7 @@ class firma extends basis_db public $kundennummer; // integer public $oe_aktiv; // boolean public $mailverteiler; // string + public $tags = array(); /** @@ -101,12 +101,19 @@ class firma extends basis_db $this->insertvon = $row->insertvon; $this->ext_id = $row->ext_id; $this->schule = ($row->schule=='t'?true:false); - // Neu in Rel. 2.0 $this->steuernummer = $row->steuernummer; $this->gesperrt = ($row->gesperrt=='t'?true:false); $this->aktiv = ($row->aktiv=='t'?true:false); $this->finanzamt = $row->finanzamt; + $qry = "SELECT tag FROM public.tbl_firmatag WHERE firma_id='$firma_id'"; + if($resulttag = $this->db_query($qry)) + { + while($rowtag = $this->db_fetch_object($resulttag)) + { + $this->tags[]=$rowtag->tag; + } + } return true; } else @@ -237,6 +244,98 @@ class firma extends basis_db return $this->firma_id; } + /** + * Speichert die Tags in $tags zur Firma + * + */ + public function savetags() + { + if(!is_numeric($this->firma_id) || $this->firma_id=='') + { + $this->errormsg = 'FirmaID ist ungueltig'; + return false; + } + + foreach($this->tags as $tag) + { + if($tag!='') + { + $qry = " + SELECT + (SELECT true FROM public.tbl_firmatag WHERE tag='".addslashes($tag)."' AND firma_id='$this->firma_id') as zugewiesen, + (SELECT true FROM public.tbl_tag WHERE tag='".addslashes($tag)."') as vorhanden"; + if($result = $this->db_query($qry)) + { + if($row = $this->db_fetch_object($result)) + { + if($row->vorhanden!='t') + { + //Tag neu anlegen + $qry = "INSERT INTO public.tbl_tag(tag) VALUES('".addslashes($tag)."');"; + if(!$this->db_query($qry)) + { + $this->errormsg='Fehler beim Anlegen des Tags'; + return false; + } + } + + if($row->zugewiesen!='t') + { + //Tag zuweisen + $qry = "INSERT INTO public.tbl_firmatag(firma_id, tag, insertamum, insertvon) + VALUES(".$this->addslashes($this->firma_id).",". + $this->addslashes($tag).",". + $this->addslashes($this->insertamum).",". + $this->addslashes($this->insertvon).");"; + if(!$this->db_query($qry)) + { + $this->errormsg='Fehler beim Anlegen des Tags'; + return false; + } + } + } + else + { + $this->errormsg='Fehler beim Laden der Tags'; + return false; + } + } + else + { + $this->errormsg='Fehler beim Laden der Tags'; + return false; + } + } + } + return true; + } + + /** + * Loescht die Tag-Zuordnung zur Firma + * + * @param $firma_id + * @param $tag + * @return boolean + */ + public function deletetag($firma_id, $tag) + { + if(!is_numeric($firma_id) || $firma_id=='') + { + $this->errormsg = 'FirmaID ist ungueltig'; + return false; + } + + $qry = "DELETE FROM public.tbl_firmatag WHERE firma_id='".addslashes($firma_id)."' AND tag='".addslashes($tag)."'"; + + if($this->db_query($qry)) + return true; + else + { + $this->errormsg = 'Fehler beim Löschen des Tags'; + return false; + } + } + /** * Loescht den Datenensatz mit der ID die uebergeben wird * @param $firma_id ID die geloescht werden soll @@ -290,7 +389,6 @@ class firma extends basis_db $fa->insertvon = $row->insertvon; $fa->ext_id = $row->ext_id; $fa->schule = ($row->schule=='t'?true:false); - // Neu in Rel. 2.0 $fa->steuernummer = $row->steuernummer; $fa->gesperrt = ($row->gesperrt=='t'?true:false); $fa->aktiv = ($row->aktiv=='t'?true:false); @@ -362,7 +460,6 @@ class firma extends basis_db $fa->insertvon = $row->insertvon; $fa->ext_id = $row->ext_id; $fa->schule = ($row->schule=='t'?true:false); - // Neu in Rel. 2.0 $fa->steuernummer = $row->steuernummer; $fa->gesperrt = ($row->gesperrt=='t'?true:false); $fa->aktiv = ($row->aktiv=='t'?true:false); @@ -410,6 +507,8 @@ class firma extends basis_db OR lower(bezeichnung) like lower('%$filter%') OR lower(anmerkung) like lower('%$filter%') ".(is_numeric($filter)?" OR tbl_firma.firma_id='$filter'":'')." + OR tbl_firma.firma_id IN (SELECT firma_id FROM public.tbl_firmatag + WHERE firma_id=tbl_firma.firma_id AND lower(tag) like lower('%$filter%')) ) "; if($firmentyp_kurzbz!='') @@ -435,18 +534,14 @@ class firma extends basis_db $fa->insertvon = $row->insertvon; $fa->ext_id = $row->ext_id; $fa->schule = ($row->schule=='t'?true:false); - // Neu in Rel. 2.0 $fa->steuernummer = $row->steuernummer; $fa->gesperrt = ($row->gesperrt=='t'?true:false); $fa->aktiv = ($row->aktiv=='t'?true:false); $fa->finanzamt = $row->finanzamt; - - // Standort $fa->kurzbz = $row->kurzbz; $fa->adresse_id = $row->adresse_id; $fa->standort_id = $row->standort_id; $fa->bezeichnung = $row->bezeichnung; - // Adresse $fa->person_id = $row->person_id; $fa->adresse_id = $row->adresse_id; $fa->strasse = $row->strasse; @@ -517,14 +612,11 @@ class firma extends basis_db $fa->insertvon = $row->insertvon; $fa->ext_id = $row->ext_id; $fa->schule = ($row->schule=='t'?true:false); - // Neu in Rel. 2.0 $fa->steuernummer = $row->steuernummer; $fa->gesperrt = ($row->gesperrt=='t'?true:false); $fa->aktiv = ($row->aktiv=='t'?true:false); $fa->finanzamt = $row->finanzamt; - // firma_organisationseinheit $fa->oe_kurzbz = $row->oe_kurzbz; - // organisationseinheit $fa->firma_organisationseinheit_id = $row->firma_organisationseinheit_id; $fa->oe_parent_kurzbz = $row->oe_parent_kurzbz; $fa->organisationseinheittyp_kurzbz = $row->organisationseinheittyp_kurzbz; diff --git a/skin/styles/jquery-ui.css b/skin/styles/jquery-ui.css new file mode 100644 index 000000000..ab960fcbb --- /dev/null +++ b/skin/styles/jquery-ui.css @@ -0,0 +1,478 @@ +/* +* jQuery UI CSS Framework +* Copyright (c) 2010 AUTHORS.txt (http://jqueryui.com/about) +* Dual licensed under the MIT (MIT-LICENSE.txt) and GPL (GPL-LICENSE.txt) licenses. +*/ + +/* Layout helpers +----------------------------------*/ +.ui-helper-hidden { display: none; } +.ui-helper-hidden-accessible { position: absolute; left: -99999999px; } +.ui-helper-reset { margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none; } +.ui-helper-clearfix:after { content: "."; display: block; height: 0; clear: both; visibility: hidden; } +.ui-helper-clearfix { display: inline-block; } +/* required comment for clearfix to work in Opera \*/ +* html .ui-helper-clearfix { height:1%; } +.ui-helper-clearfix { display:block; } +/* end clearfix */ +.ui-helper-zfix { width: 100%; height: 100%; top: 0; left: 0; position: absolute; opacity: 0; filter:Alpha(Opacity=0); } + + +/* Interaction Cues +----------------------------------*/ +.ui-state-disabled { cursor: default !important; } + + +/* Icons +----------------------------------*/ + +/* states and images */ +.ui-icon { display: block; text-indent: -99999px; overflow: hidden; background-repeat: no-repeat; } + + +/* Misc visuals +----------------------------------*/ + +/* Overlays */ +.ui-widget-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; } +/* Accordion +----------------------------------*/ +.ui-accordion .ui-accordion-header { cursor: pointer; position: relative; margin-top: 1px; zoom: 1; } +.ui-accordion .ui-accordion-li-fix { display: inline; } +.ui-accordion .ui-accordion-header-active { border-bottom: 0 !important; } +.ui-accordion .ui-accordion-header a { display: block; font-size: 1em; padding: .5em .5em .5em .7em; } +.ui-accordion-icons .ui-accordion-header a { padding-left: 2.2em; } +.ui-accordion .ui-accordion-header .ui-icon { position: absolute; left: .5em; top: 50%; margin-top: -8px; } +.ui-accordion .ui-accordion-content { padding: 1em 2.2em; border-top: 0; margin-top: -2px; position: relative; top: 1px; margin-bottom: 2px; overflow: auto; display: none; zoom: 1; } +.ui-accordion .ui-accordion-content-active { display: block; }/* Autocomplete +----------------------------------*/ +.ui-autocomplete { position: absolute; cursor: default; } +.ui-autocomplete-loading { background: white url('images/ui-anim_basic_16x16.gif') right center no-repeat; } + +/* workarounds */ +* html .ui-autocomplete { width:1px; } /* without this, the menu expands to 100% in IE6 */ + +/* Menu +----------------------------------*/ +.ui-menu { + list-style:none; + padding: 2px; + margin: 0; + display:block; +} +.ui-menu .ui-menu { + margin-top: -3px; +} +.ui-menu .ui-menu-item { + margin:0; + padding: 0; + width: 100%; +} +.ui-menu .ui-menu-item a { + text-decoration:none; + display:block; + padding:.2em .4em; + line-height:1.5; + zoom:1; +} +.ui-menu .ui-menu-item a.ui-state-hover, +.ui-menu .ui-menu-item a.ui-state-active { + margin: -1px; +} +/* Button +----------------------------------*/ + +.ui-button { display: inline-block; position: relative; padding: 0; margin-right: .1em; text-decoration: none !important; cursor: pointer; text-align: center; zoom: 1; overflow: visible; } /* the overflow property removes extra width in IE */ +.ui-button-icon-only { width: 2.2em; } /* to make room for the icon, a width needs to be set here */ +button.ui-button-icon-only { width: 2.4em; } /* button elements seem to need a little more width */ +.ui-button-icons-only { width: 3.4em; } +button.ui-button-icons-only { width: 3.7em; } + +/*button text element */ +.ui-button .ui-button-text { display: block; line-height: 1.4; } +.ui-button-text-only .ui-button-text { padding: .4em 1em; } +.ui-button-icon-only .ui-button-text, .ui-button-icons-only .ui-button-text { padding: .4em; text-indent: -9999999px; } +.ui-button-text-icon .ui-button-text, .ui-button-text-icons .ui-button-text { padding: .4em 1em .4em 2.1em; } +.ui-button-text-icons .ui-button-text { padding-left: 2.1em; padding-right: 2.1em; } +/* no icon support for input elements, provide padding by default */ +input.ui-button { padding: .4em 1em; } + +/*button icon element(s) */ +.ui-button-icon-only .ui-icon, .ui-button-text-icon .ui-icon, .ui-button-text-icons .ui-icon, .ui-button-icons-only .ui-icon { position: absolute; top: 50%; margin-top: -8px; } +.ui-button-icon-only .ui-icon { left: 50%; margin-left: -8px; } +.ui-button-text-icon .ui-button-icon-primary, .ui-button-text-icons .ui-button-icon-primary, .ui-button-icons-only .ui-button-icon-primary { left: .5em; } +.ui-button-text-icons .ui-button-icon-secondary, .ui-button-icons-only .ui-button-icon-secondary { right: .5em; } + +/*button sets*/ +.ui-buttonset { margin-right: 7px; } +.ui-buttonset .ui-button { margin-left: 0; margin-right: -.3em; } + +/* workarounds */ +button.ui-button::-moz-focus-inner { border: 0; padding: 0; } /* reset extra padding in Firefox */ + + + + + +/* Datepicker +----------------------------------*/ +.ui-datepicker { width: 17em; padding: .2em .2em 0; } +.ui-datepicker .ui-datepicker-header { position:relative; padding:.2em 0; } +.ui-datepicker .ui-datepicker-prev, .ui-datepicker .ui-datepicker-next { position:absolute; top: 2px; width: 1.8em; height: 1.8em; } +.ui-datepicker .ui-datepicker-prev-hover, .ui-datepicker .ui-datepicker-next-hover { top: 1px; } +.ui-datepicker .ui-datepicker-prev { left:2px; } +.ui-datepicker .ui-datepicker-next { right:2px; } +.ui-datepicker .ui-datepicker-prev-hover { left:1px; } +.ui-datepicker .ui-datepicker-next-hover { right:1px; } +.ui-datepicker .ui-datepicker-prev span, .ui-datepicker .ui-datepicker-next span { display: block; position: absolute; left: 50%; margin-left: -8px; top: 50%; margin-top: -8px; } +.ui-datepicker .ui-datepicker-title { margin: 0 2.3em; line-height: 1.8em; text-align: center; } +.ui-datepicker .ui-datepicker-title select { font-size:1em; margin:1px 0; } +.ui-datepicker select.ui-datepicker-month-year {width: 100%;} +.ui-datepicker select.ui-datepicker-month, +.ui-datepicker select.ui-datepicker-year { width: 49%;} +.ui-datepicker table {width: 100%; font-size: .9em; border-collapse: collapse; margin:0 0 .4em; } +.ui-datepicker th { padding: .7em .3em; text-align: center; font-weight: bold; border: 0; } +.ui-datepicker td { border: 0; padding: 1px; } +.ui-datepicker td span, .ui-datepicker td a { display: block; padding: .2em; text-align: right; text-decoration: none; } +.ui-datepicker .ui-datepicker-buttonpane { background-image: none; margin: .7em 0 0 0; padding:0 .2em; border-left: 0; border-right: 0; border-bottom: 0; } +.ui-datepicker .ui-datepicker-buttonpane button { float: right; margin: .5em .2em .4em; cursor: pointer; padding: .2em .6em .3em .6em; width:auto; overflow:visible; } +.ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current { float:left; } + +/* with multiple calendars */ +.ui-datepicker.ui-datepicker-multi { width:auto; } +.ui-datepicker-multi .ui-datepicker-group { float:left; } +.ui-datepicker-multi .ui-datepicker-group table { width:95%; margin:0 auto .4em; } +.ui-datepicker-multi-2 .ui-datepicker-group { width:50%; } +.ui-datepicker-multi-3 .ui-datepicker-group { width:33.3%; } +.ui-datepicker-multi-4 .ui-datepicker-group { width:25%; } +.ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header { border-left-width:0; } +.ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header { border-left-width:0; } +.ui-datepicker-multi .ui-datepicker-buttonpane { clear:left; } +.ui-datepicker-row-break { clear:both; width:100%; } + +/* RTL support */ +.ui-datepicker-rtl { direction: rtl; } +.ui-datepicker-rtl .ui-datepicker-prev { right: 2px; left: auto; } +.ui-datepicker-rtl .ui-datepicker-next { left: 2px; right: auto; } +.ui-datepicker-rtl .ui-datepicker-prev:hover { right: 1px; left: auto; } +.ui-datepicker-rtl .ui-datepicker-next:hover { left: 1px; right: auto; } +.ui-datepicker-rtl .ui-datepicker-buttonpane { clear:right; } +.ui-datepicker-rtl .ui-datepicker-buttonpane button { float: left; } +.ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current { float:right; } +.ui-datepicker-rtl .ui-datepicker-group { float:right; } +.ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header { border-right-width:0; border-left-width:1px; } +.ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header { border-right-width:0; border-left-width:1px; } + +/* IE6 IFRAME FIX (taken from datepicker 1.5.3 */ +.ui-datepicker-cover { + display: none; /*sorry for IE5*/ + display/**/: block; /*sorry for IE5*/ + position: absolute; /*must have*/ + z-index: -1; /*must have*/ + filter: mask(); /*must have*/ + top: -4px; /*must have*/ + left: -4px; /*must have*/ + width: 200px; /*must have*/ + height: 200px; /*must have*/ +}/* Dialog +----------------------------------*/ +.ui-dialog { position: absolute; padding: .2em; width: 300px; overflow: hidden; } +.ui-dialog .ui-dialog-titlebar { padding: .5em 1em .3em; position: relative; } +.ui-dialog .ui-dialog-title { float: left; margin: .1em 16px .2em 0; } +.ui-dialog .ui-dialog-titlebar-close { position: absolute; right: .3em; top: 50%; width: 19px; margin: -10px 0 0 0; padding: 1px; height: 18px; } +.ui-dialog .ui-dialog-titlebar-close span { display: block; margin: 1px; } +.ui-dialog .ui-dialog-titlebar-close:hover, .ui-dialog .ui-dialog-titlebar-close:focus { padding: 0; } +.ui-dialog .ui-dialog-content { border: 0; padding: .5em 1em; background: none; overflow: auto; zoom: 1; } +.ui-dialog .ui-dialog-buttonpane { text-align: left; border-width: 1px 0 0 0; background-image: none; margin: .5em 0 0 0; padding: .3em 1em .5em .4em; } +.ui-dialog .ui-dialog-buttonpane button { float: right; margin: .5em .4em .5em 0; cursor: pointer; padding: .2em .6em .3em .6em; line-height: 1.4em; width:auto; overflow:visible; } +.ui-dialog .ui-resizable-se { width: 14px; height: 14px; right: 3px; bottom: 3px; } +.ui-draggable .ui-dialog-titlebar { cursor: move; } +/* Progressbar +----------------------------------*/ +.ui-progressbar { height:2em; text-align: left; } +.ui-progressbar .ui-progressbar-value {margin: -1px; height:100%; }/* Resizable +----------------------------------*/ +.ui-resizable { position: relative;} +.ui-resizable-handle { position: absolute;font-size: 0.1px;z-index: 99999; display: block;} +.ui-resizable-disabled .ui-resizable-handle, .ui-resizable-autohide .ui-resizable-handle { display: none; } +.ui-resizable-n { cursor: n-resize; height: 7px; width: 100%; top: -5px; left: 0; } +.ui-resizable-s { cursor: s-resize; height: 7px; width: 100%; bottom: -5px; left: 0; } +.ui-resizable-e { cursor: e-resize; width: 7px; right: -5px; top: 0; height: 100%; } +.ui-resizable-w { cursor: w-resize; width: 7px; left: -5px; top: 0; height: 100%; } +.ui-resizable-se { cursor: se-resize; width: 12px; height: 12px; right: 1px; bottom: 1px; } +.ui-resizable-sw { cursor: sw-resize; width: 9px; height: 9px; left: -5px; bottom: -5px; } +.ui-resizable-nw { cursor: nw-resize; width: 9px; height: 9px; left: -5px; top: -5px; } +.ui-resizable-ne { cursor: ne-resize; width: 9px; height: 9px; right: -5px; top: -5px;}/* Slider +----------------------------------*/ +.ui-slider { position: relative; text-align: left; } +.ui-slider .ui-slider-handle { position: absolute; z-index: 2; width: 1.2em; height: 1.2em; cursor: default; } +.ui-slider .ui-slider-range { position: absolute; z-index: 1; font-size: .7em; display: block; border: 0; background-position: 0 0; } + +.ui-slider-horizontal { height: .8em; } +.ui-slider-horizontal .ui-slider-handle { top: -.3em; margin-left: -.6em; } +.ui-slider-horizontal .ui-slider-range { top: 0; height: 100%; } +.ui-slider-horizontal .ui-slider-range-min { left: 0; } +.ui-slider-horizontal .ui-slider-range-max { right: 0; } + +.ui-slider-vertical { width: .8em; height: 100px; } +.ui-slider-vertical .ui-slider-handle { left: -.3em; margin-left: 0; margin-bottom: -.6em; } +.ui-slider-vertical .ui-slider-range { left: 0; width: 100%; } +.ui-slider-vertical .ui-slider-range-min { bottom: 0; } +.ui-slider-vertical .ui-slider-range-max { top: 0; }/* Tabs +----------------------------------*/ +.ui-tabs { position: relative; padding: .2em; zoom: 1; } /* position: relative prevents IE scroll bug (element with position: relative inside container with overflow: auto appear as "fixed") */ +.ui-tabs .ui-tabs-nav { margin: 0; padding: .2em .2em 0; } +.ui-tabs .ui-tabs-nav li { list-style: none; float: left; position: relative; top: 1px; margin: 0 .2em 1px 0; border-bottom: 0 !important; padding: 0; white-space: nowrap; } +.ui-tabs .ui-tabs-nav li a { float: left; padding: .5em 1em; text-decoration: none; } +.ui-tabs .ui-tabs-nav li.ui-tabs-selected { margin-bottom: 0; padding-bottom: 1px; } +.ui-tabs .ui-tabs-nav li.ui-tabs-selected a, .ui-tabs .ui-tabs-nav li.ui-state-disabled a, .ui-tabs .ui-tabs-nav li.ui-state-processing a { cursor: text; } +.ui-tabs .ui-tabs-nav li a, .ui-tabs.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-selected a { cursor: pointer; } /* first selector in group seems obsolete, but required to overcome bug in Opera applying cursor: text overall if defined elsewhere... */ +.ui-tabs .ui-tabs-panel { display: block; border: 0; padding: 1em 1.4em; background: none; } +.ui-tabs .ui-tabs-hide { display: none !important; } +/* +* jQuery UI CSS Framework +* Copyright (c) 2010 AUTHORS.txt (http://jqueryui.com/about) +* Dual licensed under the MIT (MIT-LICENSE.txt) and GPL (GPL-LICENSE.txt) licenses. +* To view and modify this theme, visit http://jqueryui.com/themeroller/ +*/ + + +/* Component containers +----------------------------------*/ +.ui-widget { font-family: Verdana,Arial,sans-serif/*{ffDefault}*/; font-size: 1.1em/*{fsDefault}*/; } +.ui-widget .ui-widget { font-size: 1em; } +.ui-widget input, .ui-widget select, .ui-widget textarea, .ui-widget button { font-family: Verdana,Arial,sans-serif/*{ffDefault}*/; font-size: 1em; } +.ui-widget-content { border: 1px solid #aaaaaa/*{borderColorContent}*/; background: #ddd/*{bgColorContent}*/ url(images/ui-bg_flat_75_ffffff_40x100.png)/*{bgImgUrlContent}*/ 50%/*{bgContentXPos}*/ 50%/*{bgContentYPos}*/ repeat-x/*{bgContentRepeat}*/; color: #222222/*{fcContent}*/; } +.ui-widget-content a { color: #222222/*{fcContent}*/; } +.ui-widget-header { border: 1px solid #aaaaaa/*{borderColorHeader}*/; background: #eee/*{bgColorHeader}*/ url(images/ui-bg_highlight-soft_75_cccccc_1x100.png)/*{bgImgUrlHeader}*/ 50%/*{bgHeaderXPos}*/ 50%/*{bgHeaderYPos}*/ repeat-x/*{bgHeaderRepeat}*/; color: #222222/*{fcHeader}*/; font-weight: bold; } +.ui-widget-header a { color: #222222/*{fcHeader}*/; } + +/* Interaction states +----------------------------------*/ +.ui-state-default, .ui-widget-content .ui-state-default { border: 1px solid #d3d3d3/*{borderColorDefault}*/; background: #e6e6e6/*{bgColorDefault}*/ url(images/ui-bg_glass_75_e6e6e6_1x400.png)/*{bgImgUrlDefault}*/ 50%/*{bgDefaultXPos}*/ 50%/*{bgDefaultYPos}*/ repeat-x/*{bgDefaultRepeat}*/; font-weight: normal/*{fwDefault}*/; color: #555555/*{fcDefault}*/; } +.ui-state-default a, .ui-state-default a:link, .ui-state-default a:visited { color: #555555/*{fcDefault}*/; text-decoration: none; } +.ui-state-hover, .ui-widget-content .ui-state-hover, .ui-state-focus, .ui-widget-content .ui-state-focus { border: 1px solid #999999/*{borderColorHover}*/; background: #dadada/*{bgColorHover}*/ url(images/ui-bg_glass_75_dadada_1x400.png)/*{bgImgUrlHover}*/ 50%/*{bgHoverXPos}*/ 50%/*{bgHoverYPos}*/ repeat-x/*{bgHoverRepeat}*/; font-weight: normal/*{fwDefault}*/; color: #212121/*{fcHover}*/; } +.ui-state-hover a, .ui-state-hover a:hover { color: #212121/*{fcHover}*/; text-decoration: none; } +.ui-state-active, .ui-widget-content .ui-state-active { border: 1px solid #aaaaaa/*{borderColorActive}*/; background: #ddd/*{bgColorActive}*/ url(images/ui-bg_glass_65_ffffff_1x400.png)/*{bgImgUrlActive}*/ 50%/*{bgActiveXPos}*/ 50%/*{bgActiveYPos}*/ repeat-x/*{bgActiveRepeat}*/; font-weight: normal/*{fwDefault}*/; color: #212121/*{fcActive}*/; } +.ui-state-active a, .ui-state-active a:link, .ui-state-active a:visited { color: #212121/*{fcActive}*/; text-decoration: none; } +.ui-widget :active { outline: none; } + +/* Interaction Cues +----------------------------------*/ +.ui-state-highlight, .ui-widget-content .ui-state-highlight {border: 1px solid #fcefa1/*{borderColorHighlight}*/; background: #fbf9ee/*{bgColorHighlight}*/ url(images/ui-bg_glass_55_fbf9ee_1x400.png)/*{bgImgUrlHighlight}*/ 50%/*{bgHighlightXPos}*/ 50%/*{bgHighlightYPos}*/ repeat-x/*{bgHighlightRepeat}*/; color: #363636/*{fcHighlight}*/; } +.ui-state-highlight a, .ui-widget-content .ui-state-highlight a { color: #363636/*{fcHighlight}*/; } +.ui-state-error, .ui-widget-content .ui-state-error {border: 1px solid #cd0a0a/*{borderColorError}*/; background: #fef1ec/*{bgColorError}*/ url(images/ui-bg_glass_95_fef1ec_1x400.png)/*{bgImgUrlError}*/ 50%/*{bgErrorXPos}*/ 50%/*{bgErrorYPos}*/ repeat-x/*{bgErrorRepeat}*/; color: #cd0a0a/*{fcError}*/; } +.ui-state-error a, .ui-widget-content .ui-state-error a { color: #cd0a0a/*{fcError}*/; } +.ui-state-error-text, .ui-widget-content .ui-state-error-text { color: #cd0a0a/*{fcError}*/; } +.ui-priority-primary, .ui-widget-content .ui-priority-primary { font-weight: bold; } +.ui-priority-secondary, .ui-widget-content .ui-priority-secondary { opacity: .7; filter:Alpha(Opacity=70); font-weight: normal; } +.ui-state-disabled, .ui-widget-content .ui-state-disabled { opacity: .35; filter:Alpha(Opacity=35); background-image: none; } + +/* Icons +----------------------------------*/ + +/* states and images */ +.ui-icon { width: 16px; height: 16px; background-image: url(images/ui-icons_222222_256x240.png)/*{iconsContent}*/; } +.ui-widget-content .ui-icon {background-image: url(images/ui-icons_222222_256x240.png)/*{iconsContent}*/; } +.ui-widget-header .ui-icon {background-image: url(images/ui-icons_222222_256x240.png)/*{iconsHeader}*/; } +.ui-state-default .ui-icon { background-image: url(images/ui-icons_888888_256x240.png)/*{iconsDefault}*/; } +.ui-state-hover .ui-icon, .ui-state-focus .ui-icon {background-image: url(images/ui-icons_454545_256x240.png)/*{iconsHover}*/; } +.ui-state-active .ui-icon {background-image: url(images/ui-icons_454545_256x240.png)/*{iconsActive}*/; } +.ui-state-highlight .ui-icon {background-image: url(images/ui-icons_2e83ff_256x240.png)/*{iconsHighlight}*/; } +.ui-state-error .ui-icon, .ui-state-error-text .ui-icon {background-image: url(images/ui-icons_cd0a0a_256x240.png)/*{iconsError}*/; } + +/* positioning */ +.ui-icon-carat-1-n { background-position: 0 0; } +.ui-icon-carat-1-ne { background-position: -16px 0; } +.ui-icon-carat-1-e { background-position: -32px 0; } +.ui-icon-carat-1-se { background-position: -48px 0; } +.ui-icon-carat-1-s { background-position: -64px 0; } +.ui-icon-carat-1-sw { background-position: -80px 0; } +.ui-icon-carat-1-w { background-position: -96px 0; } +.ui-icon-carat-1-nw { background-position: -112px 0; } +.ui-icon-carat-2-n-s { background-position: -128px 0; } +.ui-icon-carat-2-e-w { background-position: -144px 0; } +.ui-icon-triangle-1-n { background-position: 0 -16px; } +.ui-icon-triangle-1-ne { background-position: -16px -16px; } +.ui-icon-triangle-1-e { background-position: -32px -16px; } +.ui-icon-triangle-1-se { background-position: -48px -16px; } +.ui-icon-triangle-1-s { background-position: -64px -16px; } +.ui-icon-triangle-1-sw { background-position: -80px -16px; } +.ui-icon-triangle-1-w { background-position: -96px -16px; } +.ui-icon-triangle-1-nw { background-position: -112px -16px; } +.ui-icon-triangle-2-n-s { background-position: -128px -16px; } +.ui-icon-triangle-2-e-w { background-position: -144px -16px; } +.ui-icon-arrow-1-n { background-position: 0 -32px; } +.ui-icon-arrow-1-ne { background-position: -16px -32px; } +.ui-icon-arrow-1-e { background-position: -32px -32px; } +.ui-icon-arrow-1-se { background-position: -48px -32px; } +.ui-icon-arrow-1-s { background-position: -64px -32px; } +.ui-icon-arrow-1-sw { background-position: -80px -32px; } +.ui-icon-arrow-1-w { background-position: -96px -32px; } +.ui-icon-arrow-1-nw { background-position: -112px -32px; } +.ui-icon-arrow-2-n-s { background-position: -128px -32px; } +.ui-icon-arrow-2-ne-sw { background-position: -144px -32px; } +.ui-icon-arrow-2-e-w { background-position: -160px -32px; } +.ui-icon-arrow-2-se-nw { background-position: -176px -32px; } +.ui-icon-arrowstop-1-n { background-position: -192px -32px; } +.ui-icon-arrowstop-1-e { background-position: -208px -32px; } +.ui-icon-arrowstop-1-s { background-position: -224px -32px; } +.ui-icon-arrowstop-1-w { background-position: -240px -32px; } +.ui-icon-arrowthick-1-n { background-position: 0 -48px; } +.ui-icon-arrowthick-1-ne { background-position: -16px -48px; } +.ui-icon-arrowthick-1-e { background-position: -32px -48px; } +.ui-icon-arrowthick-1-se { background-position: -48px -48px; } +.ui-icon-arrowthick-1-s { background-position: -64px -48px; } +.ui-icon-arrowthick-1-sw { background-position: -80px -48px; } +.ui-icon-arrowthick-1-w { background-position: -96px -48px; } +.ui-icon-arrowthick-1-nw { background-position: -112px -48px; } +.ui-icon-arrowthick-2-n-s { background-position: -128px -48px; } +.ui-icon-arrowthick-2-ne-sw { background-position: -144px -48px; } +.ui-icon-arrowthick-2-e-w { background-position: -160px -48px; } +.ui-icon-arrowthick-2-se-nw { background-position: -176px -48px; } +.ui-icon-arrowthickstop-1-n { background-position: -192px -48px; } +.ui-icon-arrowthickstop-1-e { background-position: -208px -48px; } +.ui-icon-arrowthickstop-1-s { background-position: -224px -48px; } +.ui-icon-arrowthickstop-1-w { background-position: -240px -48px; } +.ui-icon-arrowreturnthick-1-w { background-position: 0 -64px; } +.ui-icon-arrowreturnthick-1-n { background-position: -16px -64px; } +.ui-icon-arrowreturnthick-1-e { background-position: -32px -64px; } +.ui-icon-arrowreturnthick-1-s { background-position: -48px -64px; } +.ui-icon-arrowreturn-1-w { background-position: -64px -64px; } +.ui-icon-arrowreturn-1-n { background-position: -80px -64px; } +.ui-icon-arrowreturn-1-e { background-position: -96px -64px; } +.ui-icon-arrowreturn-1-s { background-position: -112px -64px; } +.ui-icon-arrowrefresh-1-w { background-position: -128px -64px; } +.ui-icon-arrowrefresh-1-n { background-position: -144px -64px; } +.ui-icon-arrowrefresh-1-e { background-position: -160px -64px; } +.ui-icon-arrowrefresh-1-s { background-position: -176px -64px; } +.ui-icon-arrow-4 { background-position: 0 -80px; } +.ui-icon-arrow-4-diag { background-position: -16px -80px; } +.ui-icon-extlink { background-position: -32px -80px; } +.ui-icon-newwin { background-position: -48px -80px; } +.ui-icon-refresh { background-position: -64px -80px; } +.ui-icon-shuffle { background-position: -80px -80px; } +.ui-icon-transfer-e-w { background-position: -96px -80px; } +.ui-icon-transferthick-e-w { background-position: -112px -80px; } +.ui-icon-folder-collapsed { background-position: 0 -96px; } +.ui-icon-folder-open { background-position: -16px -96px; } +.ui-icon-document { background-position: -32px -96px; } +.ui-icon-document-b { background-position: -48px -96px; } +.ui-icon-note { background-position: -64px -96px; } +.ui-icon-mail-closed { background-position: -80px -96px; } +.ui-icon-mail-open { background-position: -96px -96px; } +.ui-icon-suitcase { background-position: -112px -96px; } +.ui-icon-comment { background-position: -128px -96px; } +.ui-icon-person { background-position: -144px -96px; } +.ui-icon-print { background-position: -160px -96px; } +.ui-icon-trash { background-position: -176px -96px; } +.ui-icon-locked { background-position: -192px -96px; } +.ui-icon-unlocked { background-position: -208px -96px; } +.ui-icon-bookmark { background-position: -224px -96px; } +.ui-icon-tag { background-position: -240px -96px; } +.ui-icon-home { background-position: 0 -112px; } +.ui-icon-flag { background-position: -16px -112px; } +.ui-icon-calendar { background-position: -32px -112px; } +.ui-icon-cart { background-position: -48px -112px; } +.ui-icon-pencil { background-position: -64px -112px; } +.ui-icon-clock { background-position: -80px -112px; } +.ui-icon-disk { background-position: -96px -112px; } +.ui-icon-calculator { background-position: -112px -112px; } +.ui-icon-zoomin { background-position: -128px -112px; } +.ui-icon-zoomout { background-position: -144px -112px; } +.ui-icon-search { background-position: -160px -112px; } +.ui-icon-wrench { background-position: -176px -112px; } +.ui-icon-gear { background-position: -192px -112px; } +.ui-icon-heart { background-position: -208px -112px; } +.ui-icon-star { background-position: -224px -112px; } +.ui-icon-link { background-position: -240px -112px; } +.ui-icon-cancel { background-position: 0 -128px; } +.ui-icon-plus { background-position: -16px -128px; } +.ui-icon-plusthick { background-position: -32px -128px; } +.ui-icon-minus { background-position: -48px -128px; } +.ui-icon-minusthick { background-position: -64px -128px; } +.ui-icon-close { background-position: -80px -128px; } +.ui-icon-closethick { background-position: -96px -128px; } +.ui-icon-key { background-position: -112px -128px; } +.ui-icon-lightbulb { background-position: -128px -128px; } +.ui-icon-scissors { background-position: -144px -128px; } +.ui-icon-clipboard { background-position: -160px -128px; } +.ui-icon-copy { background-position: -176px -128px; } +.ui-icon-contact { background-position: -192px -128px; } +.ui-icon-image { background-position: -208px -128px; } +.ui-icon-video { background-position: -224px -128px; } +.ui-icon-script { background-position: -240px -128px; } +.ui-icon-alert { background-position: 0 -144px; } +.ui-icon-info { background-position: -16px -144px; } +.ui-icon-notice { background-position: -32px -144px; } +.ui-icon-help { background-position: -48px -144px; } +.ui-icon-check { background-position: -64px -144px; } +.ui-icon-bullet { background-position: -80px -144px; } +.ui-icon-radio-off { background-position: -96px -144px; } +.ui-icon-radio-on { background-position: -112px -144px; } +.ui-icon-pin-w { background-position: -128px -144px; } +.ui-icon-pin-s { background-position: -144px -144px; } +.ui-icon-play { background-position: 0 -160px; } +.ui-icon-pause { background-position: -16px -160px; } +.ui-icon-seek-next { background-position: -32px -160px; } +.ui-icon-seek-prev { background-position: -48px -160px; } +.ui-icon-seek-end { background-position: -64px -160px; } +.ui-icon-seek-start { background-position: -80px -160px; } +/* ui-icon-seek-first is deprecated, use ui-icon-seek-start instead */ +.ui-icon-seek-first { background-position: -80px -160px; } +.ui-icon-stop { background-position: -96px -160px; } +.ui-icon-eject { background-position: -112px -160px; } +.ui-icon-volume-off { background-position: -128px -160px; } +.ui-icon-volume-on { background-position: -144px -160px; } +.ui-icon-power { background-position: 0 -176px; } +.ui-icon-signal-diag { background-position: -16px -176px; } +.ui-icon-signal { background-position: -32px -176px; } +.ui-icon-battery-0 { background-position: -48px -176px; } +.ui-icon-battery-1 { background-position: -64px -176px; } +.ui-icon-battery-2 { background-position: -80px -176px; } +.ui-icon-battery-3 { background-position: -96px -176px; } +.ui-icon-circle-plus { background-position: 0 -192px; } +.ui-icon-circle-minus { background-position: -16px -192px; } +.ui-icon-circle-close { background-position: -32px -192px; } +.ui-icon-circle-triangle-e { background-position: -48px -192px; } +.ui-icon-circle-triangle-s { background-position: -64px -192px; } +.ui-icon-circle-triangle-w { background-position: -80px -192px; } +.ui-icon-circle-triangle-n { background-position: -96px -192px; } +.ui-icon-circle-arrow-e { background-position: -112px -192px; } +.ui-icon-circle-arrow-s { background-position: -128px -192px; } +.ui-icon-circle-arrow-w { background-position: -144px -192px; } +.ui-icon-circle-arrow-n { background-position: -160px -192px; } +.ui-icon-circle-zoomin { background-position: -176px -192px; } +.ui-icon-circle-zoomout { background-position: -192px -192px; } +.ui-icon-circle-check { background-position: -208px -192px; } +.ui-icon-circlesmall-plus { background-position: 0 -208px; } +.ui-icon-circlesmall-minus { background-position: -16px -208px; } +.ui-icon-circlesmall-close { background-position: -32px -208px; } +.ui-icon-squaresmall-plus { background-position: -48px -208px; } +.ui-icon-squaresmall-minus { background-position: -64px -208px; } +.ui-icon-squaresmall-close { background-position: -80px -208px; } +.ui-icon-grip-dotted-vertical { background-position: 0 -224px; } +.ui-icon-grip-dotted-horizontal { background-position: -16px -224px; } +.ui-icon-grip-solid-vertical { background-position: -32px -224px; } +.ui-icon-grip-solid-horizontal { background-position: -48px -224px; } +.ui-icon-gripsmall-diagonal-se { background-position: -64px -224px; } +.ui-icon-grip-diagonal-se { background-position: -80px -224px; } + + +/* Misc visuals +----------------------------------*/ + +/* Corner radius */ +.ui-corner-tl { -moz-border-radius-topleft: 4px/*{cornerRadius}*/; -webkit-border-top-left-radius: 4px/*{cornerRadius}*/; border-top-left-radius: 4px/*{cornerRadius}*/; } +.ui-corner-tr { -moz-border-radius-topright: 4px/*{cornerRadius}*/; -webkit-border-top-right-radius: 4px/*{cornerRadius}*/; border-top-right-radius: 4px/*{cornerRadius}*/; } +.ui-corner-bl { -moz-border-radius-bottomleft: 4px/*{cornerRadius}*/; -webkit-border-bottom-left-radius: 4px/*{cornerRadius}*/; border-bottom-left-radius: 4px/*{cornerRadius}*/; } +.ui-corner-br { -moz-border-radius-bottomright: 4px/*{cornerRadius}*/; -webkit-border-bottom-right-radius: 4px/*{cornerRadius}*/; border-bottom-right-radius: 4px/*{cornerRadius}*/; } +.ui-corner-top { -moz-border-radius-topleft: 4px/*{cornerRadius}*/; -webkit-border-top-left-radius: 4px/*{cornerRadius}*/; border-top-left-radius: 4px/*{cornerRadius}*/; -moz-border-radius-topright: 4px/*{cornerRadius}*/; -webkit-border-top-right-radius: 4px/*{cornerRadius}*/; border-top-right-radius: 4px/*{cornerRadius}*/; } +.ui-corner-bottom { -moz-border-radius-bottomleft: 4px/*{cornerRadius}*/; -webkit-border-bottom-left-radius: 4px/*{cornerRadius}*/; border-bottom-left-radius: 4px/*{cornerRadius}*/; -moz-border-radius-bottomright: 4px/*{cornerRadius}*/; -webkit-border-bottom-right-radius: 4px/*{cornerRadius}*/; border-bottom-right-radius: 4px/*{cornerRadius}*/; } +.ui-corner-right { -moz-border-radius-topright: 4px/*{cornerRadius}*/; -webkit-border-top-right-radius: 4px/*{cornerRadius}*/; border-top-right-radius: 4px/*{cornerRadius}*/; -moz-border-radius-bottomright: 4px/*{cornerRadius}*/; -webkit-border-bottom-right-radius: 4px/*{cornerRadius}*/; border-bottom-right-radius: 4px/*{cornerRadius}*/; } +.ui-corner-left { -moz-border-radius-topleft: 4px/*{cornerRadius}*/; -webkit-border-top-left-radius: 4px/*{cornerRadius}*/; border-top-left-radius: 4px/*{cornerRadius}*/; -moz-border-radius-bottomleft: 4px/*{cornerRadius}*/; -webkit-border-bottom-left-radius: 4px/*{cornerRadius}*/; border-bottom-left-radius: 4px/*{cornerRadius}*/; } +.ui-corner-all { -moz-border-radius: 4px/*{cornerRadius}*/; -webkit-border-radius: 4px/*{cornerRadius}*/; border-radius: 4px/*{cornerRadius}*/; } + +/* Overlays */ +.ui-widget-overlay { background: #aaaaaa/*{bgColorOverlay}*/ url(images/ui-bg_flat_0_aaaaaa_40x100.png)/*{bgImgUrlOverlay}*/ 50%/*{bgOverlayXPos}*/ 50%/*{bgOverlayYPos}*/ repeat-x/*{bgOverlayRepeat}*/; opacity: .3;filter:Alpha(Opacity=30)/*{opacityOverlay}*/; } +.ui-widget-shadow { margin: -8px/*{offsetTopShadow}*/ 0 0 -8px/*{offsetLeftShadow}*/; padding: 8px/*{thicknessShadow}*/; background: #aaaaaa/*{bgColorShadow}*/ url(images/ui-bg_flat_0_aaaaaa_40x100.png)/*{bgImgUrlShadow}*/ 50%/*{bgShadowXPos}*/ 50%/*{bgShadowYPos}*/ repeat-x/*{bgShadowRepeat}*/; opacity: .3;filter:Alpha(Opacity=30)/*{opacityShadow}*/; -moz-border-radius: 8px/*{cornerRadiusShadow}*/; -webkit-border-radius: 8px/*{cornerRadiusShadow}*/; border-radius: 8px/*{cornerRadiusShadow}*/; } \ No newline at end of file diff --git a/vilesci/stammdaten/firma_details.php b/vilesci/stammdaten/firma_details.php index abd08c944..e4aadc81a 100644 --- a/vilesci/stammdaten/firma_details.php +++ b/vilesci/stammdaten/firma_details.php @@ -20,8 +20,6 @@ * Rudolf Hangl < rudolf.hangl@technikum-wien.at > * Gerald Simane-Sequens < gerald.simane-sequens@technikum-wien.at > */ -$firma_id = (isset($_REQUEST["firma_id"])?$_REQUEST['firma_id']:''); - require_once('../../config/vilesci.config.inc.php'); require_once('../../include/functions.inc.php'); require_once('../../include/firma.class.php'); @@ -30,9 +28,9 @@ require_once('../../include/adresse.class.php'); require_once('../../include/nation.class.php'); require_once('../../include/benutzerberechtigung.class.php'); - if (!$db = new basis_db()) die('Es konnte keine Verbindung zum Server aufgebaut werden.'); + // ******* INIT ******** $user = get_uid(); //Zugriffsrechte pruefen @@ -42,10 +40,13 @@ if(!$rechte->isBerechtigt('basis/firma:begrenzt')) die('Sie haben keine Berechtigung für diese Seite'); // Parameter einlesen +$tabselect = (isset($_GET['tabselect'])?$_GET['tabselect']:0); +$firma_id = (isset($_REQUEST['firma_id'])?$_REQUEST['firma_id']:''); $adresse_id = (isset($_REQUEST['adresse_id'])?$_REQUEST['adresse_id']:''); $standort_id = (isset($_REQUEST['standort_id'])?$_REQUEST['standort_id']:''); $oe_kurzbz = (isset($_REQUEST['oe_kurzbz'])?$_REQUEST['oe_kurzbz']:''); $firma_organisationseinheit_id = (isset($_REQUEST['firma_organisationseinheit_id'])?$_REQUEST['firma_organisationseinheit_id']:''); +$tag = (isset($_REQUEST['tag'])?$_REQUEST['tag']:''); $save = (isset($_REQUEST['save'])?$_REQUEST['save']:null); $work = (isset($_REQUEST['work'])?$_REQUEST['work']:(isset($_REQUEST['save'])?$_REQUEST['save']:null)); @@ -56,7 +57,6 @@ $neu = (isset($_REQUEST['neu'])?$_REQUEST['neu']:null); // Defaultwerte $adresstyp_arr = array('h'=>'Hauptwohnsitz','n'=>'Nebenwohnsitz','f'=>'Firma',''=>''); $errorstr=''; -$tabselect=0; //Loeschen einer Adresse if(isset($_GET['deleteadresse'])) @@ -79,208 +79,133 @@ if(isset($_GET['deleteadresse'])) $errorstr=($errorstr?$errorstr.', ':'').'Fehler beim Loeschen der Firma/Adresse:'.$adresse_obj->errormsg; } } -?> + echo ' -'; } - //Loeschen einer Organisationseinheit - if(isset($_GET['deleteorganisationseinheit'])) - { - if(!$rechte->isBerechtigt('basis/firma:begrenzt',null, 'suid')) - die('Sie haben keine Berechtigung fuer diese Aktion'); - if(!empty($firma_organisationseinheit_id)) - { - $firma = new firma(); - if(!$firma->deleteorganisationseinheit($firma_organisationseinheit_id)) - { - $errorstr=($errorstr?$errorstr.', ':'').'Fehler beim Loeschen Firma/Organisation:'.$firma->errormsg; - } - } - else - $errorstr=($errorstr?$errorstr.', ':'').'Fehler beim Loeschen Firma/Organisation : ID fehlt'; - $tabselect=1; - } - -?> +//Loeschen einer Organisationseinheit +if(isset($_GET['deleteorganisationseinheit'])) +{ + if(!$rechte->isBerechtigt('basis/firma:begrenzt',null, 'suid')) + die('Sie haben keine Berechtigung fuer diese Aktion'); + if(!empty($firma_organisationseinheit_id)) + { + $firma = new firma(); + if(!$firma->deleteorganisationseinheit($firma_organisationseinheit_id)) + { + $errorstr=($errorstr?$errorstr.', ':'').'Fehler beim Loeschen Firma/Organisation:'.$firma->errormsg; + } + } + else + $errorstr=($errorstr?$errorstr.', ':'').'Fehler beim Loeschen Firma/Organisation : ID fehlt'; + $tabselect=1; +} + +//Loeschen eines Tags +if(isset($_GET['deletetag'])) +{ + if(!$rechte->isBerechtigt('basis/firma:begrenzt',null, 'suid')) + die('Sie haben keine Berechtigung fuer diese Aktion'); + if(!empty($tag)) + { + $firma = new firma(); + if(!$firma->deletetag($firma_id, $tag)) + { + $errorstr=($errorstr?$errorstr.', ':'').'Fehler beim Loeschen des Tags:'.$firma->errormsg; + } + } + else + $errorstr=($errorstr?$errorstr.', ':'').'Fehler beim Loeschen des Tags : Tag fehlt'; +} + +?> -Firma - Details - - - - - - - - - - - - - + Firma - Details + + + + + + + + + + + + - - - "; +//Tabs +switch ($work) +{ + case 'standortliste': + echo getStandortliste($firma_id,$adresstyp_arr,$user); + break; - //Tabs - switch ($work) - { - case 'standortliste': - echo getStandortliste($firma_id,$adresstyp_arr,$user); - break; + case 'organisationliste': + echo getOrganisationsliste($firma_id,$adresstyp_arr,$user); + break; + + case 'anmerkungsfeld': + echo getAnmerkungen($firma_id,$user); + break; + case 'saveAnmerkungen': + $status = saveAnmerkungen($firma_id,$user, $rechte); + echo getFirmadetail($firma_id,$adresstyp_arr,$user,$neu); + echo $status; + $tabselect=2; + break; + + case 'saveFirma': + $status=saveFirma($user,$rechte); // Postdaten werden in der Funktion verarbeitet + if (is_numeric($status)) + $firma_id=$status; + if (!$ajax) + echo getFirmadetail($firma_id,$adresstyp_arr,$user,$neu); + else if (is_numeric($status)) + echo "Daten erfolgreich gespeichert"; + if (!is_numeric($status)) + echo $status; + break; + default: + echo getFirmadetail($firma_id,$adresstyp_arr,$user,$neu); + break; +} - case 'organisationliste': - echo getOrganisationsliste($firma_id,$adresstyp_arr,$user); - break; - - case 'anmerkungsfeld': - echo getAnmerkungen($firma_id,$user); - break; - - case 'saveFirma': - $status=saveFirma($user,$rechte); // Postdaten werden in der Funktion verarbeitet - if (is_numeric($status)) - $firma_id=$status; - if (!$ajax) - echo getFirmadetail($firma_id,$adresstyp_arr,$user,$neu); - else if (is_numeric($status)) - echo "Daten erfolgreich gespeichert"; - if (!is_numeric($status)) - echo $status; - break; - default: - echo getFirmadetail($firma_id,$adresstyp_arr,$user,$neu); - break; - } echo ($errorstr?'
'.$errorstr:''); -/*Führt zu "Rückkopplung" im Frame 0 - große Suchkriterien werden nicht angenommen - echo '';*/ -?> + +?> +  "; $htmlstr.="Name: "; $htmlstr.="\n"; - //$htmlstr.=" "; - if($firma_id!='' && is_numeric($firma_id) ) - $htmlstr.="\n"; - else - $htmlstr.="\n"; + + $htmlstr.="\n"; $htmlstr.=""; - //$htmlstr.="\n"; - //$htmlstr.=""; - //$htmlstr.="\n"; - // Unterscheiden der Wartung - Neuanlage = Submit, Aendern = Ajax - //if($firma_id!='' && is_numeric($firma_id) ) - // $htmlstr.="\n"; - //else - // $htmlstr.="\n"; - - //$htmlstr.="
Anmerkung:   
"; + $htmlstr.="\n"; $htmlstr.="\n"; $htmlstr.=""; @@ -350,7 +263,7 @@ function getFirmadetail($firma_id, $adresstyp_arr, $user, $neu) $firma_finanzamt = new firma(); $firmentyp_finanzamt='Finanzamt'; $firma_finanzamt->searchFirma('',$firmentyp_finanzamt, true); - #var_dump($firma_finanzamt); + $htmlstr.="\n"; $htmlstr.=""; - $user = get_uid(); - //Zugriffsrechte pruefen - $rechte = new benutzerberechtigung(); - $rechte->getBerechtigungen($user); + + $disabled='disabled=true'; + //Gesperrt Hackerl darf nur gesetzt werden wenn die Berechtigung vorhanden ist if($rechte->isBerechtigt('basis/firma',null, 'suid')) { - $htmlstr.="\n"; - } - else - { - $htmlstr.="\n"; + $disabled=''; } + + $htmlstr.="\n"; + $htmlstr.="\n"; $htmlstr.=""; $htmlstr.=""; + $htmlstr.=""; + + $htmlstr.=""; + $htmlstr.=""; + $htmlstr.=""; $htmlstr.=""; - - $htmlstr.="
Steuernummer:  Gesperrt: gesperrt?' style="background-color: #FFF4F4;" ':' style="background-color: #E3FDEE;" ')." type='checkbox' name='gesperrt' ".($firma->gesperrt?'checked':'').">gesperrt?' style="background-color: #FFF4F4;" ':' style="background-color: #E3FDEE;" ')." type='checkbox' name='gesperrt' ".($firma->gesperrt?'checked':'')." disabled>gesperrt?'checked':'')." $disabled> Schule:schule?' style="background-color: #E3FDEE;" ':' style="background-color: #FFF4F4;" ')." type='checkbox' name='schule' ".($firma->schule?'checked':'').">  
Tags:"; + $htmlstr.=""; + $htmlstr.=" 
"; + $htmlstr.=""; + + foreach($firma->tags as $tag) + { + $htmlstr.= ' '.$tag.' '; + } + $htmlstr.=""; $htmlstr.="\n"; $htmlstr.=" \n"; $htmlstr.="\n"; $htmlstr.='
'; - $htmlstr.=' - -
-
-
+
+ +
+ '.getStandortliste($firma_id,$adresstyp_arr,$user).' +
+
+ '.getOrganisationsliste($firma_id, $adresstyp_arr, $user).' +
+
+ '.getAnmerkungen($firma_id, $user).' +
+
+
'; @@ -411,12 +352,12 @@ function getFirmadetail($firma_id, $adresstyp_arr, $user, $neu) } } // ---------------------------------------------------------------------------------------------------------------------------------- -/* - FirmenDatenspeichern POST ( Ajax ) - Param $user Objekt vom Aktivenbenutzer - Param $recht Objekt der Rechte des Aktivenbenutzer - Return firma_id oder Fehlertext -*/ +/** + * FirmenDatenspeichern POST ( Ajax ) + * Param $user Objekt vom Aktivenbenutzer + * Param $recht Objekt der Rechte des Aktivenbenutzer + * Return firma_id oder Fehlertext + */ function saveFirma($user,$rechte) { // Speichern der Firmendaten @@ -439,32 +380,40 @@ function saveFirma($user,$rechte) $firma->new = true; } $firma->name = (isset($_POST['name'])?$_POST['name']:''); - $firma->anmerkung = (isset($_REQUEST['anmerkung'])?$_REQUEST['anmerkung']:''); $firma->firmentyp_kurzbz = (isset($_POST['typ'])?$_POST['typ']:''); $firma->updateamum = date('Y-m-d H:i:s'); $firma->updatevon = $user; $firma->schule = isset($_POST['schule']); - // Neu in Rel. 2.0 $firma->steuernummer = (isset($_POST['steuernummer'])?$_POST['steuernummer']:''); $firma->gesperrt = (isset($_POST['gesperrt'])?true:false); $firma->aktiv = (isset($_POST['aktiv'])?true:false); $firma->finanzamt = (isset($_POST['finanzamt'])?$_POST['finanzamt']:''); + $tags = (isset($_POST['tags'])?$_POST['tags']:''); + if($firma->save()) { if ($firma->new) $firma_id=$firma->firma_id; + + if($tags!='') + { + $firma->tags = explode('; ',$tags); + $firma->insertvon=$user; + $firma->insertamum=date('Y-m-d H:i:s'); + $firma->savetags(); + } } else { return 'Datensatz konnte nicht gespeichert werden: '.$firma->errormsg; } -## var_dump($firma); + return $firma_id; } // ---------------------------------------------------------------------------------------------------------------------------------- -/* - Standortliste -*/ +/** + * Standortliste + */ function getStandortliste($firma_id,$adresstyp_arr,$user) { // Init @@ -501,7 +450,6 @@ function getStandortliste($firma_id,$adresstyp_arr,$user) $standort_obj->load_firma($firma_id); } -#var_dump($standort_obj); $htmlstr.= ' @@ -515,84 +463,81 @@ function getStandortliste($firma_id,$adresstyp_arr,$user) '; -#var_dump($standort_obj); + $i=1; foreach ($standort_obj->result as $row) { if ($firma_id && $row->standort_id && !$row->adresse_id) { - $adresse_obj = new adresse(); - $adresse_obj->new = true; - $adresse_obj->insertamum = date('Y-m-d H:i:s'); - $adresse_obj->insertvon = $user; - $adresse_obj->person_id=null; - $adresse_obj->strasse = ''; - $adresse_obj->plz = ''; - $adresse_obj->ort = ''; - $adresse_obj->gemeinde = ''; - $adresse_obj->nation = ''; - $adresse_obj->typ = ''; - $adresse_obj->heimatadresse = false; - $adresse_obj->zustelladresse = false; - $adresse_obj->firma_id = null; - $adresse_obj->updateamum = date('Y-m-d H:i:s'); - $adresse_obj->updatvon = $user; - if(!$adresse_obj->save()) - return 'Fehler Adresse '.$adresse_obj->errormsg; - - $standort_obj = new standort($row->standort_id); - $standort_obj->updatevon=$user; - $standort_obj->adresse_id=$adresse_obj->adresse_id; - if (!$standort_obj->save()) - return 'Fehler Standort - Adresse '.$standort_obj->errormsg; - $row->adresse_id=$adresse_obj->adresse_id; + $adresse_obj = new adresse(); + $adresse_obj->new = true; + $adresse_obj->insertamum = date('Y-m-d H:i:s'); + $adresse_obj->insertvon = $user; + $adresse_obj->person_id=null; + $adresse_obj->strasse = ''; + $adresse_obj->plz = ''; + $adresse_obj->ort = ''; + $adresse_obj->gemeinde = ''; + $adresse_obj->nation = ''; + $adresse_obj->typ = ''; + $adresse_obj->heimatadresse = false; + $adresse_obj->zustelladresse = false; + $adresse_obj->firma_id = null; + $adresse_obj->updateamum = date('Y-m-d H:i:s'); + $adresse_obj->updatvon = $user; + if(!$adresse_obj->save()) + return 'Fehler Adresse '.$adresse_obj->errormsg; + + $standort_obj = new standort($row->standort_id); + $standort_obj->updatevon=$user; + $standort_obj->adresse_id=$adresse_obj->adresse_id; + if (!$standort_obj->save()) + return 'Fehler Standort - Adresse '.$standort_obj->errormsg; + $row->adresse_id=$adresse_obj->adresse_id; } $htmlstr .= "\n"; $i++; - //getDetailStandort(wohin,prameter) - $adresse_id=$row->adresse_id; - $adresse_obj = new adresse(); - if ($adresse_obj->load($adresse_id)) - { - $htmlstr.= ''; - $htmlstr.= ""; - $htmlstr.= ''; - $htmlstr.= ''; - $htmlstr.= ''; - $htmlstr.= ''; - $htmlstr.= ''; - //$htmlstr.= ''; - $htmlstr.= ''; - //$htmlstr.= ''; - $htmlstr.= ''; - $htmlstr.= ""; - } - else - $htmlstr.= ''; - $htmlstr.= ''; + + $adresse_id=$row->adresse_id; + $adresse_obj = new adresse(); + if ($adresse_obj->load($adresse_id)) + { + $htmlstr.= ''; + $htmlstr.= ""; + $htmlstr.= ''; + $htmlstr.= ''; + $htmlstr.= ''; + $htmlstr.= ''; + $htmlstr.= ''; + $htmlstr.= ''; + + $htmlstr.= ''; + $htmlstr.= ""; + } + else + { + $htmlstr.= ''; + $htmlstr.= ''; + } $htmlstr.= ''; } $htmlstr.= '
Kurzbz
'.$row->kurzbz.'".(isset($nation_arr[$adresse_obj->nation])?$nation_arr[$adresse_obj->nation]:$adresse_obj->nation)."'.$adresse_obj->gemeinde.''.$adresse_obj->plz.''.$adresse_obj->ort.''.$adresse_obj->strasse.''.$adresstyp_arr[$adresse_obj->typ].''.($adresse_obj->heimatadresse?'Ja':'Nein').''.($adresse_obj->zustelladresse?'Ja':'Nein').''.$row->ext_id.'editierenstandort_id&adresse_id=$adresse_obj->adresse_id&firma_id=$firma_id' onclick='return confdel()'>loeschen'.$row->kurzbz.''.$adresse_obj->errormsg.''.$row->kurzbz.'".(isset($nation_arr[$adresse_obj->nation])?$nation_arr[$adresse_obj->nation]:$adresse_obj->nation)."'.$adresse_obj->gemeinde.''.$adresse_obj->plz.''.$adresse_obj->ort.''.$adresse_obj->strasse.''.$adresstyp_arr[$adresse_obj->typ].''.($adresse_obj->zustelladresse?'Ja':'Nein').'editierenstandort_id&adresse_id=$adresse_obj->adresse_id&firma_id=$firma_id' onclick='return confdel()'>loeschen'.$row->kurzbz.''.$adresse_obj->errormsg.'
'; return $htmlstr; } // ---------------------------------------------------------------------------------------------------------------------------------- -/* - Organisationsliste -*/ +/** + * Organisationsliste + */ function getOrganisationsliste($firma_id,$adresstyp_arr,$user) { - // Init $htmlstr=''; // Plausib if (empty($firma_id) || !is_numeric($firma_id) ) return 'Firma fehlt.'; - - -## var_dump($firma); $htmlstr.= ' @@ -606,17 +551,17 @@ function getOrganisationsliste($firma_id,$adresstyp_arr,$user) // Datenlesen zur Firma $firma = new firma(); if (!$firma->get_firmaorganisationseinheit($firma_id)) - return $htmlstr; + return $htmlstr.'
Organisationseinheit
'; $i=0; foreach ($firma->result as $row) { $htmlstr .= "\n"; $i++; - $htmlstr.= ''.$row->organisationseinheittyp_kurzbz.' '.$row->bezeichnung.''; - $htmlstr.= ''.$row->fobezeichnung.''; - $htmlstr.= ''.$row->kundennummer.''; - $htmlstr.= 'editieren'; - $htmlstr.= "firma_organisationseinheit_id."&oe_kurzbz=".$row->oe_kurzbz."&firma_id=".$firma_id."' onclick='return confdel()'>loeschen"; + $htmlstr.= ''.$row->organisationseinheittyp_kurzbz.' '.$row->bezeichnung.''; + $htmlstr.= ''.$row->fobezeichnung.''; + $htmlstr.= ''.$row->kundennummer.''; + $htmlstr.= 'editieren'; + $htmlstr.= "firma_organisationseinheit_id."&oe_kurzbz=".$row->oe_kurzbz."&firma_id=".$firma_id."' onclick='return confdel()'>loeschen"; $htmlstr.= ''; } @@ -624,9 +569,9 @@ function getOrganisationsliste($firma_id,$adresstyp_arr,$user) return $htmlstr; } // ---------------------------------------------------------------------------------------------------------------------------------- -/* - Anmerkungen -*/ +/** + * Anmerkungen + */ function getAnmerkungen($firma_id,$user) { // Init @@ -646,19 +591,41 @@ function getAnmerkungen($firma_id,$user) { return false; } - $htmlstr.="
\n"; - $htmlstr.="\n"; + $htmlstr.="\n"; + $htmlstr.="\n"; $htmlstr.="\n"; $htmlstr.= ""; $htmlstr.= ""; $htmlstr.= ""; - if($firma_id!='' && is_numeric($firma_id) ) - $htmlstr.="\n"; - else - $htmlstr.="\n"; + + $htmlstr.="\n"; + $htmlstr.= ""; - $htmlstr.="\n"; + $htmlstr.="
Anmerkungen:
\n"; return $htmlstr; } +/** + * Anmerkungen + */ +function saveAnmerkungen($firma_id,$user, $rechte) +{ + if(!$rechte->isBerechtigt('basis/firma:begrenzt',null, 'suid')) + return 'Sie haben keine Berechtigung'; + + $firma_obj = new firma(); + if(!$firma_obj->load($firma_id)) + return 'Firma konnte nicht geladen werden'; + + if(!isset($_REQUEST['anmerkung'])) + return 'Anmerkung muss uebergeben werden'; + + $firma_obj->anmerkung = $_REQUEST['anmerkung']; + + if(!$firma_obj->save()) + return 'Fehler beim Speichern:'.$firma_obj->errormsg; + else + return 'Anmerkung gespeichert!'; + +} ?> diff --git a/vilesci/stammdaten/firma_detailwork.php b/vilesci/stammdaten/firma_detailwork.php index a755faf85..acdb08bdd 100644 --- a/vilesci/stammdaten/firma_detailwork.php +++ b/vilesci/stammdaten/firma_detailwork.php @@ -45,9 +45,9 @@ if(!$rechte->isBerechtigt('basis/firma:begrenzt')) // Parameter einlesen $errorstr=''; -$tabselect=0; -$firma_id = (isset($_REQUEST["firma_id"])?$_REQUEST['firma_id']:''); +$tabselect = (isset($_GET['tabselect'])?$_GET['tabselect']:0); +$firma_id = (isset($_REQUEST['firma_id'])?$_REQUEST['firma_id']:''); $standort_id = (isset($_REQUEST['standort_id'])?$_REQUEST['standort_id']:''); $adresse_id = (isset($_REQUEST['adresse_id'])?$_REQUEST['adresse_id']:''); $kontakt_id = (isset($_REQUEST['kontakt_id'])?$_REQUEST['kontakt_id']:''); @@ -57,7 +57,7 @@ $work = (isset($_REQUEST['work'])?$_REQUEST['work']:(isset($_REQUEST['save'])?$_ $showmenue = (isset($_REQUEST['showmenue'])?$_REQUEST['showmenue']:false); $personfunktionstandort_id = (isset($_REQUEST['personfunktionstandort_id'])?$_REQUEST['personfunktionstandort_id']:''); $firma_organisationseinheit_id = (isset($_REQUEST['firma_organisationseinheit_id'])?$_REQUEST['firma_organisationseinheit_id']:''); -if(isset($_REQUEST['nation']) && $_REQUEST['nation']=="A" && isset($_REQUEST['gemeinde_combo']) && isset($_REQUEST['ort_combo'])) +if(isset($_REQUEST['nation']) && $_REQUEST['nation']=='A' && isset($_REQUEST['gemeinde_combo']) && isset($_REQUEST['ort_combo'])) { $_REQUEST['gemeinde']=$_REQUEST['gemeinde_combo']; $_REQUEST['ort']=$_REQUEST['ort_combo']; @@ -150,13 +150,12 @@ if(isset($_GET['type']) && $_GET['type']=='getortcontent' && isset($_GET['plz']) // Defaultwerte $adresstyp_arr = array('h'=>'Hauptwohnsitz','n'=>'Nebenwohnsitz','f'=>'Firma',''=>''); -## var_dump($_REQUEST); - //Loeschen einer Adresse if(isset($_GET['deleteadresse'])) { $showmenue=1; - if( !$rechte->isBerechtigt('admin',null,'suid') && !$rechte->isBerechtigt('basis/firma:begrenzt',null, 'suid')) + $tabselect=1; + if(!$rechte->isBerechtigt('basis/firma:begrenzt',null, 'suid')) die('Sie haben keine Berechtigung fuer diese Aktion'); if(is_numeric($standort_id)) @@ -171,8 +170,8 @@ if(isset($_GET['type']) && $_GET['type']=='getortcontent' && isset($_GET['plz']) { $errorstr=($errorstr?$errorstr.', ':'').'Fehler beim Loeschen Person Funktion Standort:'.$standort_obj->errormsg; } - } + if(is_numeric($adresse_id)) { $adresse_obj = new adresse(); @@ -185,7 +184,8 @@ if(isset($_GET['type']) && $_GET['type']=='getortcontent' && isset($_GET['plz']) if(isset($_GET['deletekontakt'])) { - $showmenue=1; + $showmenue=1; + $tabselect=2; if(!$rechte->isBerechtigt('basis/firma:begrenzt',null, 'suid')) die('Sie haben keine Berechtigung fuer diese Aktion'); @@ -202,6 +202,7 @@ if(isset($_GET['type']) && $_GET['type']=='getortcontent' && isset($_GET['plz']) if(isset($_GET['deletepersonfunktionstandort'])) { $showmenue=1; + $tabselect=1; if(!$rechte->isBerechtigt('basis/firma:begrenzt',null, 'suid')) die('Sie haben keine Berechtigung fuer diese Aktion'); @@ -223,21 +224,15 @@ if(isset($_GET['type']) && $_GET['type']=='getortcontent' && isset($_GET['plz']) - - - - - + + + + - - - - - - - - - - parent.frames[1].location.reload(); + parent.frames[1].location.href=\'firma_details.php?firma_id='.$firma_id.'&tabselect=1\'; '; break; case 'eingabeOrganisationseinheit': @@ -544,7 +447,6 @@ div.css-panes div div{ $htmlcode=saveOrganisationseinheit($firma_id,$firma_organisationseinheit_id,$oe_kurzbz,$oe_parent_kurzbz,$adresstyp_arr,$user,$rechte); break; - default: if (!$showmenue) $htmlcode=getStandort($firma_id,$standort_id,$adresse_id,$adresstyp_arr,$user,$rechte); @@ -553,13 +455,21 @@ div.css-panes div div{ if ($showmenue) echo ' - -
-
'.$htmlcode.'
+
+ +
+ '.getStandort($firma_id,$standort_id,$adresse_id,$adresstyp_arr,$user,$rechte).' +
+
+ '.getlistPersonenfunktionen($firma_id,$standort_id,$personfunktionstandort_id,$adresstyp_arr,$user,$rechte).' +
+
+ '.listKontakte($firma_id,$standort_id,$adresse_id,$kontakt_id,$adresstyp_arr,$user,$rechte).' +

@@ -569,15 +479,20 @@ div.css-panes div div{ echo ($errorstr?'
'.$errorstr:''); ?> + load($oe_kurzbz)) { - echo 'Organisation fehler '.$organisationseinheit_obj->errormsg; - return false; + return 'Organisation fehler '.$organisationseinheit_obj->errormsg; } //$bezeichnung=($bezeichnung?$bezeichnung:$organisationseinheit_obj->bezeichnung); } @@ -639,23 +553,20 @@ function saveFirmaorganisationseinheit($firma_id,$firma_organisationseinheit_id, $firma->kundennummer=$kundennummer; $firma->ext_id=$ext_id; - if($firma->get_firmaorganisationseinheit($firma->firma_id, $firma->oe_kurzbz) && $firma_organisationseinheit_id=='') + if($firma_organisationseinheit_id=='' && $firma->get_firmaorganisationseinheit($firma->firma_id, $firma->oe_kurzbz)) { - echo "Organisationseinheit ".$firma->oe_kurzbz." ist bereits zugeteilt!"; - return false; + return "Organisationseinheit ".$firma->oe_kurzbz." ist bereits zugeteilt!"; } if (!$firma->saveorganisationseinheit()) echo $firma->errormsg; return $firma->firma_organisationseinheit_id; } #-------------------------------------------------------------------------------------------------------------------------------------------------------------# -/* - Organisation zur Firma -*/ +/** + * Organisation zur Firma + */ function eingabeOrganisationseinheit($firma_id,$firma_organisationseinheit_id,$oe_kurzbz,$adresstyp_arr,$user,$rechte) { - ##var_dump($_REQUEST); - // Init $htmlstr=''; // Plausib @@ -685,28 +596,26 @@ function eingabeOrganisationseinheit($firma_id,$firma_organisationseinheit_id,$o foreach ($firma->result as $row) { $htmlstr.="
\n"; - $htmlstr.="\n"; - $i++; - $htmlstr.= " - - "; - // - $htmlstr.= " - - - "; + $htmlstr.="\n"; + $i++; + $htmlstr.= " + + "; + // + $htmlstr.= " + + + "; - //$htmlstr.= ''.$row->organisationseinheittyp_kurzbz.''; - //$htmlstr.= ''.$row->oe_kurzbz.''; - $htmlstr.= ""; - $htmlstr.= ""; - $htmlstr.= ''; - $htmlstr.= ''; + $htmlstr.= ""; + $htmlstr.= ""; + $htmlstr.= ''; + $htmlstr.= ''; $htmlstr.="
\n"; } if (!$firma_organisationseinheit_id) @@ -740,9 +649,9 @@ function eingabeOrganisationseinheit($firma_id,$firma_organisationseinheit_id,$o } #-------------------------------------------------------------------------------------------------------------------------------------------------------------# -/* - Kontakte zu Firmen,Standorte in Listenform -*/ +/** + * Kontakte zu Firmen,Standorte in Listenform + */ function saveKontakt($firma_id,$standort_id,$adresse_id,$kontakt_id,$adresstyp_arr,$user,$rechte) { if( !$rechte->isBerechtigt('admin',null,'suid') && !$rechte->isBerechtigt('basis/firma:begrenzt',null, 'suid')) @@ -765,9 +674,6 @@ function saveKontakt($firma_id,$standort_id,$adresse_id,$kontakt_id,$adresstyp_a $zustellung = (isset($_POST['zustellung'])?true:false); $ext_id = (isset($_POST['ext_id'])?$_POST['ext_id']:''); - if (strstr($kontakttyp,'mail') && (!strstr($kontakt,'@') || !strstr($kontakt,'.')) ) - return 'Kontakt (Typ '.$kontakttyp .') bitte prüfen'; - //---------------------------------------- // ADRESSEN Neuanlage - Aenderung //---------------------------------------- @@ -803,20 +709,14 @@ function saveKontakt($firma_id,$standort_id,$adresse_id,$kontakt_id,$adresstyp_a return 'Fehler beim Speichern des Kontakt '.$kontakttyp .' '.$kontakt.' ID '. $kontakt_id.' :'.$kontakt_obj->errormsg; if ($kontakt_obj->new) $kontakt_id=$kontakt_obj->kontakt_id; - - //frame reloaden, um wieder zur liste zu kommen - echo ''; + return 'Kontakt: '.$kontakttyp .' '.$kontakt.' ID '. $kontakt_id.' gespeichert'; } #-------------------------------------------------------------------------------------------------------------------------------------------------------------# -/* - Kontakte zu Firmen, Standorte in Listenform -*/ +/** + * Kontakte zu Firmen, Standorte in Listenform + */ function listKontakte($firma_id,$standort_id,$adresse_id,$kontakt_id,$adresstyp_arr,$user,$rechte) { // Plausib @@ -841,8 +741,6 @@ function listKontakte($firma_id,$standort_id,$adresse_id,$kontakt_id,$adresstyp_ return eingabeKontakt($firma_id,$standort_id,$adresse_id,$kontakt_id,$adresstyp_arr,$user,$rechte); } } -##var_dump($kontakt_obj); - $htmlstr.= ' @@ -850,7 +748,7 @@ function listKontakte($firma_id,$standort_id,$adresse_id,$kontakt_id,$adresstyp_ - + '; $i=0; @@ -858,16 +756,14 @@ function listKontakte($firma_id,$standort_id,$adresse_id,$kontakt_id,$adresstyp_ { $htmlstr .= "\n"; $i++; - $htmlstr.= ''; - $htmlstr.= ''; - $htmlstr.= ''; - $htmlstr.= ''; - $htmlstr.= ''; - //$htmlstr.= ''; - //$htmlstr.= ''; + $htmlstr.= ''; + $htmlstr.= ''; + $htmlstr.= ''; + $htmlstr.= ''; + $htmlstr.= ''; - $htmlstr.= ''; - $htmlstr.= ""; + $htmlstr.= ''; + $htmlstr.= ""; $htmlstr.= ''; } $htmlstr.= '
IDKontakt Anmerkung Zustellung
'.$row->kontakt_id.''.$row->kontakttyp.''.$row->kontakt.''.$row->anmerkung.''.($row->zustellung?'Ja':'Nein').''.$row->person_id.''.$row->ext_id.''.$row->kontakt_id.''.$row->kontakttyp.''.$row->kontakt.''.$row->anmerkung.''.($row->zustellung?'Ja':'Nein').'editierenstandort_id&kontakt_id=$row->kontakt_id' onclick='return confdel()'>loescheneditierenstandort_id&kontakt_id=$row->kontakt_id' onclick='return confdel()'>loeschen
'; @@ -876,9 +772,9 @@ function listKontakte($firma_id,$standort_id,$adresse_id,$kontakt_id,$adresstyp_ #-------------------------------------------------------------------------------------------------------------------------------------------------------------# -/* - Kontakte zu Firmen,Standorte in Listenform -*/ +/** + * Kontakte zu Firmen,Standorte in Listenform + */ function eingabeKontakt($firma_id,$standort_id,$adresse_id,$kontakt_id,$adresstyp_arr,$user,$rechte) { // Plausib @@ -901,18 +797,17 @@ function eingabeKontakt($firma_id,$standort_id,$adresse_id,$kontakt_id,$adressty } else { -## $kontakt_obj->firma_id=$firma_id; $kontakt_obj->standort_id=$standort_id; } $htmlstr.="
\n"; - $htmlstr.="\n"; - $htmlstr.="\n"; - $htmlstr.="\n"; - $htmlstr.="\n"; - $htmlstr.="\n"; - $htmlstr.="\n"; - $htmlstr.="\n"; - + $htmlstr.="\n"; + $htmlstr.="\n"; + $htmlstr.="\n"; + $htmlstr.="\n"; + $htmlstr.="\n"; + $htmlstr.="\n"; + $htmlstr.="\n"; + $htmlstr.="\n"; $htmlstr.=""; + + $htmlstr.=""; + + $htmlstr.=""; + $htmlstr.="\n"; + $htmlstr.="\n"; + + + $htmlstr.="
\n"; @@ -926,41 +821,41 @@ function eingabeKontakt($firma_id,$standort_id,$adresse_id,$kontakt_id,$adressty else $kontakttyp_obj->result=array(); } -# var_dump($kontakttyp_obj); - $htmlstr.=""; - $htmlstr.= ""; - $htmlstr.=""; - $htmlstr.=""; - $htmlstr.="\n"; - - - $htmlstr.=""; - $htmlstr.=""; - $htmlstr.="\n"; + $htmlstr.=""; + $htmlstr.= ""; - - $htmlstr.=""; - - $htmlstr.=""; - $htmlstr.="\n"; - $htmlstr.="\n"; + $htmlstr.=""; + $htmlstr.=""; + $htmlstr.="\n"; + + $htmlstr.=""; + $htmlstr.=""; + $htmlstr.="\n"; - $htmlstr.="
Typ:  Kontakt:  Anmerkung: Typ:   Zustellung: zustellung?' style="background-color: #FFF4F4;" ':' style="background-color: #E3FDEE;" ')." type='checkbox' name='zustellung' ".($kontakt_obj->zustellung?'checked':'').">  Kontakt:  Anmerkung:
  Zustellung: zustellung?' style="background-color: #FFF4F4;" ':' style="background-color: #E3FDEE;" ')." type='checkbox' name='zustellung' ".($kontakt_obj->zustellung?'checked':'')."> 
"; $htmlstr.="\n"; // Submit-Knopf Zeile $htmlstr.="\n"; - $htmlstr.=''; - $htmlstr.=""; - $htmlstr.=''; - $htmlstr.="
    
"; + $htmlstr.=''; + $htmlstr.="    "; + $htmlstr.=''; + $htmlstr.=""; $htmlstr.="\n"; $htmlstr.=" \n"; @@ -969,9 +864,9 @@ function eingabeKontakt($firma_id,$standort_id,$adresse_id,$kontakt_id,$adressty } #-------------------------------------------------------------------------------------------------------------------------------------------------------------# -/* - Kontakte zu Firmen,Standorte in Listenform -*/ +/** + * Kontakte zu Firmen,Standorte in Listenform + */ function savePersonenfunktionen($firma_id,$standort_id,$personfunktionstandort_id,$adresstyp_arr,$user,$rechte) { if( !$rechte->isBerechtigt('admin',null,'suid') && !$rechte->isBerechtigt('basis/firma:begrenzt',null, 'suid')) @@ -1034,17 +929,13 @@ function savePersonenfunktionen($firma_id,$standort_id,$personfunktionstandort_i if ($standort_obj->new) $personfunktionstandort_id=$standort_obj->personfunktionstandort_id; - echo ''; + return 'Funktion der Person am Standort : '.$funktion_kurzbz .' '.$position.' ID '. $personfunktionstandort_id.' gespeichert'; } #-------------------------------------------------------------------------------------------------------------------------------------------------------------# -/* - Firmen,Standorte Funktionen/Personen -*/ +/** + * Ansprechpartner + */ function getlistPersonenfunktionen($firma_id,$standort_id,$personfunktionstandort_id,$adresstyp_arr,$user,$rechte) { // Plausib @@ -1080,7 +971,7 @@ function getlistPersonenfunktionen($firma_id,$standort_id,$personfunktionstandor for ($i=0;$iresult);$i++) $funktionen[$funktion_obj->result[$i]->funktion_kurzbz]=$funktion_obj->result[$i]->beschreibung; } -#var_dump($standort_obj); + $htmlstr.= ' @@ -1088,7 +979,7 @@ function getlistPersonenfunktionen($firma_id,$standort_id,$personfunktionstandor - + '; $i=0; foreach ($standort_obj->result as $row) @@ -1097,7 +988,7 @@ function getlistPersonenfunktionen($firma_id,$standort_id,$personfunktionstandor $htmlstr .= "\n"; $i++; - $htmlstr.= ''; + $htmlstr.= ''; $htmlstr.= ''; $htmlstr.= ''; @@ -1106,7 +997,7 @@ function getlistPersonenfunktionen($firma_id,$standort_id,$personfunktionstandor $person=($row->person_anrede?$row->person_anrede.' ':'').($row->titelpre?$row->titelpre.' ':'').($row->vorname?$row->vorname.' ':'').($row->nachname?$row->nachname.' ':''); $htmlstr.= ''; - $htmlstr.= ''; + $htmlstr.= ''; $htmlstr.= ""; $htmlstr.= ""; $htmlstr.= ''; @@ -1116,9 +1007,9 @@ function getlistPersonenfunktionen($firma_id,$standort_id,$personfunktionstandor } #-------------------------------------------------------------------------------------------------------------------------------------------------------------# -/* - Firmenliste - lt. Suchekriterien -*/ +/** + * Firmenliste - lt. Suchekriterien + */ function eingabePersonenfunktionen($firma_id,$standort_id,$personfunktionstandort_id,$adresstyp_arr,$user,$rechte) { // Plausib @@ -1129,7 +1020,7 @@ function eingabePersonenfunktionen($firma_id,$standort_id,$personfunktionstandor // Init $htmlstr=''; $standort_obj = new standort(); -#echo $personfunktionstandort_id; + if($personfunktionstandort_id!='' && is_numeric($personfunktionstandort_id) ) { $standort_obj->result=array(); @@ -1142,13 +1033,12 @@ function eingabePersonenfunktionen($firma_id,$standort_id,$personfunktionstandor { $standort_obj->standort_id=$standort_id; } -## var_dump($standort_obj); -# exit; + $htmlstr.="\n"; - $htmlstr.="\n"; - $htmlstr.="\n"; - $htmlstr.="\n"; - $htmlstr.="\n"; + $htmlstr.="\n"; + $htmlstr.="\n"; + $htmlstr.="\n"; + $htmlstr.="\n"; $htmlstr.="
IDPosition Anrede Person
'. $row->personfunktionstandort_id.''. $row->personfunktionstandort_id.''.(isset($funktionen[$row->funktion_kurzbz])?$funktionen[$row->funktion_kurzbz]:$row->funktion_kurzbz).''.$row->position.''.$person.'Funktion editierenFunktion editierenKontaktdaten editierenstandort_id."&personfunktionstandort_id=".$row->personfunktionstandort_id."&firma_id=".$firma_id."' onclick='return confdel()'>Funktion loeschen
\n"; $htmlstr.=""; + + "; + //$htmlstr.'
'; + //$htmlstr.='?
'; + $htmlstr.=""; + $person=($standort_obj->person_anrede?$standort_obj->person_anrede.' ':'').($standort_obj->titelpre?$standort_obj->titelpre.' ':'').($standort_obj->vorname?$standort_obj->vorname.' ':'').($standort_obj->nachname?$standort_obj->nachname.' ':''); + $htmlstr.=($person?'':'')."
\n"; @@ -1163,90 +1053,70 @@ function eingabePersonenfunktionen($firma_id,$standort_id,$personfunktionstandor else $funktion_obj->result=array(); } -# var_dump($kontakttyp_obj); - $htmlstr.=""; - - $htmlstr.= ""; - $htmlstr.=""; - $htmlstr.=""; - $htmlstr.="\n"; - /* - $htmlstr.=" - "; - */ - $htmlstr.=""; - $htmlstr.=""; - $htmlstr.="\n"; - $htmlstr.=""; - $htmlstr.=""; - $htmlstr.="'; - $htmlstr.=""; - $person=($standort_obj->person_anrede?$standort_obj->person_anrede.' ':'').($standort_obj->titelpre?$standort_obj->titelpre.' ':'').($standort_obj->vorname?$standort_obj->vorname.' ':'').($standort_obj->nachname?$standort_obj->nachname.' ':''); - $htmlstr.=($person?'':'')."
Funktion:  Position:  Anrede:  
Person: \n"; - $htmlstr.=" - "; - //$htmlstr.'
'; - //$htmlstr.='?
 '.$person.'
 '.$person.'
"; $htmlstr.="\n"; - + // Submit-Knopf Zeile $tabselect=1; $htmlstr.="\n"; - $htmlstr.=''; - $htmlstr.=""; - $htmlstr.=''; - $htmlstr.=""; - $htmlstr.=""; - $htmlstr.="
        
"; + $htmlstr.=''; + $htmlstr.="    "; + $htmlstr.=''; + $htmlstr.="    "; + $htmlstr.=""; + $htmlstr.=""; $htmlstr.="\n"; - + $htmlstr.=" \n"; $htmlstr.="\n"; return $htmlstr; } - - #-------------------------------------------------------------------------------------------------------------------------------------------------------------# -/* - Firmenliste - lt. Suchekriterien -*/ +/** + * Firmenliste - lt. Suchekriterien + */ function getStandort($firma_id,$standort_id,$adresse_id,$adresstyp_arr,$user,$rechte) { // Plausib @@ -1271,65 +1141,39 @@ function getStandort($firma_id,$standort_id,$adresse_id,$adresstyp_arr,$user,$re $standort_obj->standort_id=$standort_id; $standort_obj->adresse_id=$adresse_id; } -# var_dump($standort_obj); -#echo $adresse_id; $adresse_obj = new adresse(); if ($adresse_id!='' && !$adresse_obj->load($adresse_id)) { - return $adresse_obj->errormsg; + return $adresse_obj->errormsg; } else { $adresse_obj->adresse_id=$adresse_id; $adresse_obj->typ='f'; - //$adresse_obj->nation='A'; } $htmlstr.="
\n"; - $htmlstr.="\n"; - $htmlstr.="\n"; - $htmlstr.="\n"; - $htmlstr.="\n"; - $htmlstr.="\n"; - $htmlstr.="\n"; - + $htmlstr.="\n"; + $htmlstr.="\n"; + $htmlstr.="\n"; + $htmlstr.="\n"; + $htmlstr.="\n"; $htmlstr.=""; - $htmlstr.="\n"; - - $htmlstr.=""; + $htmlstr.="
\n"; - $htmlstr.=""; - $htmlstr.= ""; + $htmlstr.=""; + $htmlstr.="\n"; + $htmlstr.=""; + $htmlstr.=""; + $htmlstr.="\n"; - $htmlstr.=""; - $htmlstr.="\n"; - $htmlstr.=""; - $htmlstr.=""; - $htmlstr.="\n"; + $htmlstr.=""; + $htmlstr.=""; + $htmlstr.=""; + $htmlstr.=""; - $htmlstr.=""; - $htmlstr.=""; - /* - $htmlstr.=""; - $htmlstr.="\n"; - $htmlstr.="\n"; - */ - $htmlstr.=""; - $htmlstr.=""; - $htmlstr.=""; - $htmlstr.=""; - - $htmlstr.="
Typ:  Kurzbz:  Bezeichnung: Kurzbz:  Bezeichnung:  Zustelladresse:zustelladresse?'checked':'').">    Heimatadresse: heimatadresse?' style="background-color: #FFF4F4;" ':' style="background-color: #E3FDEE;" ')." type='checkbox' name='heimatadresse' ".($adresse_obj->heimatadresse?'checked':'').">  Zustelladresse:zustelladresse?' style="background-color: #E3FDEE;" ':' style="background-color: #FFF4F4;" ')." type='checkbox' name='zustelladresse' ".($adresse_obj->zustelladresse?'checked':'').">  
\n"; - $htmlstr.=""; - $htmlstr.="\n"; - $htmlstr.="
Name:
"; $htmlstr.="\n"; //Nationen laden @@ -1337,7 +1181,7 @@ function getStandort($firma_id,$standort_id,$adresse_id,$adresstyp_arr,$user,$re $nation = new nation(); $nation->getAll(); foreach($nation->nation as $row) - $nation_arr[$row->code]=$row->kurztext; + $nation_arr[$row->code]=$row->kurztext; //Auswahl Nation $htmlstr.="\n"; @@ -1345,9 +1189,9 @@ function getStandort($firma_id,$standort_id,$adresse_id,$adresstyp_arr,$user,$re $htmlstr.= ""; //Posleitzahl @@ -1369,7 +1213,6 @@ function getStandort($firma_id,$standort_id,$adresse_id,$adresstyp_arr,$user,$re } $htmlstr.=""; $htmlstr.="\n"; - //Ort $htmlstr.=""; @@ -1386,23 +1229,20 @@ function getStandort($firma_id,$standort_id,$adresse_id,$adresstyp_arr,$user,$re $htmlstr.=""; $htmlstr.="\n"; - - $htmlstr.="
Ort:
"; -##var_dump($adresse_obj); + $htmlstr.=""; + $htmlstr.="\n"; - $htmlstr.=""; - $htmlstr.="\n"; - $htmlstr.=""; - $htmlstr.="
Strasse: 
"; + $htmlstr.="Strasse:"; + $htmlstr.="\n"; + $htmlstr.=" "; + $htmlstr.=""; $htmlstr.="\n"; - - - - $htmlstr.=""; + + $htmlstr.=""; $htmlstr.="\n"; $htmlstr.="\n"; - $htmlstr.=''; + $htmlstr.=''; $htmlstr.="
"; $htmlstr.="\n"; $htmlstr.=" \n"; @@ -1410,9 +1250,9 @@ function getStandort($firma_id,$standort_id,$adresse_id,$adresstyp_arr,$user,$re return $htmlstr; } // ---------------------------------------------------------------------------------------------------------------------------------- -/* - Standortwartung - Adressen,Personen,Kontakte -*/ +/** + * Standortwartung - Adressen,Personen,Kontakte + */ function saveStandort($firma_id,$standort_id,$adresse_id,$adresstyp_arr,$user,$rechte) { @@ -1430,13 +1270,7 @@ function saveStandort($firma_id,$standort_id,$adresse_id,$adresstyp_arr,$user,$r $name = (isset($_POST['name'])?$_POST['name']:''); $gemeinde = (isset($_REQUEST['gemeinde'])?$_REQUEST['gemeinde']:''); $nation = (isset($_POST['nation'])?$_POST['nation']:''); - //$heimatadresse = (isset($_POST['heimatadresse'])?true:false); $zustelladresse = (isset($_POST['zustelladresse'])?true:false); - - $ext_id = (isset($_POST['ext_id'])?$_POST['ext_id']:''); - $ext_id_adr = (isset($_POST['ext_id_adr'])?$_POST['ext_id_adr']:''); - - //---------------------------------------- // ADRESSEN Neuanlage - Aenderung @@ -1460,26 +1294,22 @@ function saveStandort($firma_id,$standort_id,$adresse_id,$adresstyp_arr,$user,$r $adresse_obj->insertvon = $user; } - $adresse_obj->person_id=null; $adresse_obj->name=$name; $adresse_obj->strasse = $strasse; $adresse_obj->nation = $nation; $adresse_obj->plz = $plz; $adresse_obj->ort = $ort; $adresse_obj->gemeinde = $gemeinde; - $adresse_obj->typ = $adresstyp; - $adresse_obj->heimatadresse = $heimatadresse; + $adresse_obj->typ = 'f'; + $adresse_obj->heimatadresse = false; $adresse_obj->zustelladresse = $zustelladresse; - $adresse_obj->firma_id = null; $adresse_obj->updateamum = date('Y-m-d H:i:s'); $adresse_obj->updatvon = $user; - $adresse_obj->ext_id=($ext_id_adr?$ext_id_adr:null); if(!$adresse_obj->save()) return 'Fehler beim Speichern der Adresse:'.$adresse_obj->errormsg; if ($adresse_obj->new) $adresse_id=$adresse_obj->adresse_id; - $standort_obj = new standort(); if(is_numeric($standort_id)) @@ -1505,37 +1335,33 @@ function saveStandort($firma_id,$standort_id,$adresse_id,$adresstyp_arr,$user,$r else $standort_obj->adresse_id=null; - $standort_obj->kurzbz=$kurzbz; - $standort_obj->bezeichnung=$bezeichnung; - $standort_obj->ext_id=($ext_id?$ext_id:null); + $standort_obj->kurzbz=$kurzbz; + $standort_obj->bezeichnung=$bezeichnung; - $standort_obj->firma_id=$firma_id; - $standort_obj->updatevon=$user; - $standort_obj->updateamum = date('Y-m-d H:i:s'); - //var_dump($standort_obj); - if(!$standort_obj->save()) - { - if ($standort_obj->new) - $adresse_obj->delete($adresse_id); - return 'Fehler beim Speichern des Standort:'.$standort_obj->errormsg; - } + $standort_obj->firma_id=$firma_id; + $standort_obj->updatevon=$user; + $standort_obj->updateamum = date('Y-m-d H:i:s'); + if(!$standort_obj->save()) + { if ($standort_obj->new) - $standort_id=$standort_obj->standort_id; - if (empty($standort_id)) - return 'Abbruch nach Standort verarbeitung! ID Fehlt '; -##var_dump($standort_obj); -#exit; -?> + $adresse_obj->delete($adresse_id); + return 'Fehler beim Speichern des Standort:'.$standort_obj->errormsg; + } + + if ($standort_obj->new) + $standort_id=$standort_obj->standort_id; + if (empty($standort_id)) + return 'Abbruch nach Standort Verarbeitung! ID Fehlt '; + + echo ' -kurzbz.' wurden erfolgreich gespeichert '; + return 'Standort wurde erfolgreich gespeichert '; } -#-------------------------------------------------------------------------------------------------------------------------------------------------------------# -?> +?> \ No newline at end of file diff --git a/vilesci/stammdaten/firma_uebersicht.php b/vilesci/stammdaten/firma_uebersicht.php index 05f5d9d2b..d71223c2c 100644 --- a/vilesci/stammdaten/firma_uebersicht.php +++ b/vilesci/stammdaten/firma_uebersicht.php @@ -44,14 +44,14 @@ $firmentypfilter = (isset($_GET['firmentypfilter'])?$_GET['firmentypfilter']:'') ?> -Firma Uebersicht - - - - + Firma Uebersicht + + + + -

Firmen - Übersicht

+

Firmen - Übersicht

'; //Suche @@ -80,7 +80,6 @@ echo ''; ?> - '.$pSql; + if (!$oRresult=$db->SQL($pArt,$pDistinct,$pFields,$pTable,$pWhere,$pOrder,$pLimit,$pSql)) { if (empty($funktion_kurzbz)) @@ -206,7 +202,7 @@ cellSeparator (default value: "|") FROM public.tbl_personfunktionstandort where ". $pWhere ." ORDER BY funktion_kurzbz,position "; - ## echo $pSql; + if (!$oRresult=$db->SQL($pArt,$pDistinct,$pFields,$pTable,$pWhere,$pOrder,$pLimit,$pSql)) exit(' |'.$db->errormsg."\n"); } @@ -216,15 +212,12 @@ cellSeparator (default value: "|") case 'work_firmen_search': $json=array(); - $berechtigung_kurzbz = 'basis/firma'; + $berechtigung_kurzbz = 'basis/firma:begrenzt'; if(!$rechte->isBerechtigt($berechtigung_kurzbz)) exit(json_encode(array_push($json, array ('oFirma_id' => '','oName' =>'keine Berechtigung')))); $filter = (isset($_REQUEST['filter'])?$_REQUEST['filter']:''); $firmentyp_kurzbz = (isset($_REQUEST['firmentyp_kurzbz'])?$_REQUEST['firmentyp_kurzbz']:''); - -// $qry.=" ,tbl_standort.kurzbz,tbl_standort.adresse_id,tbl_standort.standort_id,tbl_standort.bezeichnung "; -// $qry.=" ,person_id, tbl_adresse.name as adress_name, strasse, plz, ort, gemeinde,nation,typ,heimatadresse,zustelladresse "; $qry =" select distinct tbl_firma.firma_id,tbl_firma.name "; $qry.=" FROM public.tbl_firma, public.tbl_standort "; @@ -247,8 +240,6 @@ cellSeparator (default value: "|") // Datenbremse fallse keine Kriterien gesetzt sind if($filter=='' && $firmentyp_kurzbz=='') $qry.=" limit 350 "; -//Debug -// array_push($json, array ('oFirma_id' => $filter,'oName' => $firmentyp_kurzbz )); $pArt=''; $pDistinct=false; @@ -277,8 +268,30 @@ cellSeparator (default value: "|") echo json_encode($json); break; + case 'tags': + $tag=trim((isset($_REQUEST['q']) ? $_REQUEST['q']:'')); -// Person - FH Technikum suche + $pWhere=" upper(tag) like upper('%".addslashes($tag)."%')"; + + $pArt='select'; + $pDistinct=false; + $pFields='tag'; + $pTable='public.tbl_tag'; + $matchcode=''; + $pOrder='tag'; + $pLimit=''; + $pSql=''; + if (!$result=$db->SQL($pArt,$pDistinct,$pFields,$pTable,$pWhere,$pOrder,$pLimit,$pSql)) + exit(' |'.$db->errormsg."\n"); + + if(is_array($result)) + { + for ($i=0;$itag)."\n"; + } + break; + + // Person - FH Technikum suche case 'person': $person_id=trim((isset($_REQUEST['q']) ? $_REQUEST['q']:'')); if (is_null($person_id) || $person_id=='') @@ -323,8 +336,7 @@ cellSeparator (default value: "|") $pWhere=''; $pOrder=''; $pLimit=''; -## echo $pSql; - + } else {