This commit is contained in:
Andreas Österreicher
2010-04-06 10:51:46 +00:00
parent 0dcc5ecf5b
commit f5ea02110a
7 changed files with 1121 additions and 746 deletions
+1
View File
@@ -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();
+103 -11
View File
@@ -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;
+478
View File
@@ -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}*/; }
+264 -297
View File
@@ -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 '
<script language="JavaScript1.2" type="text/javascript">
parent.frames[0].location.reload();
</script>
<?php
</script>';
}
//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';
}
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>Firma - Details</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" href="../../skin/vilesci.css" type="text/css">
<script src="../../include/js/mailcheck.js"></script>
<script src="../../include/js/datecheck.js"></script>
<script src="../../include/js/jquery.js" type="text/javascript"></script>
<script src="../../include/js/jquery-ui.js" type="text/javascript"></script>
<script src="../../include/js/jquery.tools.min.js" type="text/javascript"></script>
<script src="../../include/js/jquery.autocomplete.js" type="text/javascript"></script>
<script src="../../include/js/jquery.autocomplete.min.js" type="text/javascript"></script>
<title>Firma - Details</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" href="../../skin/vilesci.css" type="text/css">
<link rel="stylesheet" href="../../skin/styles/jquery.css" type="text/css">
<link rel="stylesheet" href="../../skin/styles/jquery-ui.css" type="text/css">
<script src="../../include/js/mailcheck.js" type="text/javascript"></script>
<script src="../../include/js/datecheck.js" type="text/javascript"></script>
<script src="../../include/js/jquery.js" type="text/javascript"></script>
<script src="../../include/js/jquery-ui.js" type="text/javascript"></script>
<script src="../../include/js/jquery.autocomplete.min.js" type="text/javascript"></script>
<script type="text/javascript" language="JavaScript1.2">
function confdel()
{
if(confirm("Diesen Datensatz wirklich loeschen?"))
return true;
return false;
}
function workFirmaDetail(wohin,welches)
{
$('.selector').tabs('option', 'selected', welches);
$("div##"+wohin).show("slow"); // div# langsam oeffnen
$("div#"+wohin).html('<img src="../../skin/images/spinner.gif" alt="warten" title="warten" >');
var formdata = $('form#addFirma').serialize();
//alert(formdata);
$.ajax
(
{
type: "POST", timeout: 3500,dataType: 'html',url: 'firma_details.php',data: formdata+'&ajax=1',
error: function()
{
$("div#"+wohin).html("error ");
return;
},
success: function(phpData)
{
$("div#"+wohin).html(phpData);
}
}
);
return;
}
$(function()
{
$("ul.css-tabs").tabs("div.css-panes > div", {effect: 'ajax'}).history();
$('.selector').tabs('option', 'selected', <?php echo $tabselect ?>)
});
}
</script>
<style type="text/css">
<!--
/* root element for tabs */
ul.css-tabs {
margin:0 !important;
padding:0;
height:30px;
border-bottom:1px solid #666;
}
/* single tab */
ul.css-tabs li {
float:left;
padding:0;
margin:0;
list-style-type:none;
}
/* link inside the tab. uses a background image */
ul.css-tabs a {
float:left;
font-size:13px;
display:block;
padding:5px 30px;
text-decoration:none;
border:1px solid #666;
border-bottom:0px;
height:18px;
background-color:#efefef;
color:#777;
margin-right:2px;
-moz-border-radius-topleft: 4px;
-moz-border-radius-topright:4px;
position:relative;
top:1px;
}
ul.css-tabs a:hover {
background-color:#F7F7F7;
color:#333;
}
/* selected tab */
ul.css-tabs a.current {
background-color:#ddd;
border-bottom:2px solid #ddd;
color:#000;
cursor:default;
}
/* tab pane */
div.css-panes div {
display:none;
border:1px solid #666;
border-width:0 1px 1px 1px;
min-height:150px;
padding:15px 20px;
background-color:#ddd;
}
-->
</style>
</head>
<body style="background-color:#eeeeee;">
<?php
/*if (empty($firma_id))
exit('ka firma');*/
##echo "$work <br>";
//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?'<br>'.$errorstr:'');
/*Führt zu "Rückkopplung" im Frame 0 - große Suchkriterien werden nicht angenommen
echo '<script language="JavaScript1.2" type="text/javascript">
<!--
parent.frames[0].location.reload();
-->
</script>';*/
?>
?>
<script language="Javascript">
$(document).ready(function() {
$("#tabs").tabs();
$( "#tabs" ).tabs( "option", "selected", <?php echo $tabselect;?> );
})
</script>
</body>
</html>
<?php
/*
Firmenliste - lt. Suchekriterien
*/
/**
* Firmenliste - lt. Suchekriterien
*/
function getFirmadetail($firma_id, $adresstyp_arr, $user, $neu)
{
global $rechte;
if($firma_id!='' || $neu=='true')
{
if (!$db = new basis_db())
@@ -324,22 +249,10 @@ function getFirmadetail($firma_id, $adresstyp_arr, $user, $neu)
$htmlstr.="<td>&nbsp;</td>";
$htmlstr.="<td>Name: </td>";
$htmlstr.="<td><input type='text' name='name' value='".$firma->name."' size='80' maxlength='128' /></td>\n";
//$htmlstr.="<td>&nbsp;</td>";
if($firma_id!='' && is_numeric($firma_id) )
$htmlstr.="<td align='center' width='20%'><input type='Button' onclick=\"workFirmaDetail('addFirmaInfo', 0);\" name='save' value='speichern'></td>\n";
else
$htmlstr.="<td align='center' width='20%'><input type='submit' name='save' value='anlegen'></td>\n";
$htmlstr.="<td align='center' width='20%'><input type='submit' name='save' value='speichern'></td>\n";
$htmlstr.="</tr></table></td>";
//$htmlstr.="<td rowspan='2'><table><tr>\n";
//$htmlstr.="<td valign='top'>Anmerkung: </td>";
//$htmlstr.="<td><textarea cols='40' style='width:100%' name='anmerkung'/>".$firma->anmerkung."</textarea></td>\n";
// Unterscheiden der Wartung - Neuanlage = Submit, Aendern = Ajax
//if($firma_id!='' && is_numeric($firma_id) )
// $htmlstr.="<td>&nbsp;</td><td valign='bottom'><input type='Button' onclick=\"workFirmaDetail('addFirmaInfo');\" name='save' value='speichern'></td>\n";
//else
// $htmlstr.="<td>&nbsp;</td><td valign='bottom'><input type='submit' name='save' value='anlegen'></td>\n";
//$htmlstr.="</tr></table></td>";
$htmlstr.="</tr>\n";
$htmlstr.="<tr><td><table><tr>\n";
$htmlstr.="<td>Steuernummer: </td>";
@@ -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.="<td><select name='finanzamt'>";
$htmlstr.="<option value=''>-- keine Auswahl --</option>";
foreach ($firma_finanzamt->result as $row_finanzamt)
@@ -368,42 +281,70 @@ function getFirmadetail($firma_id, $adresstyp_arr, $user, $neu)
$htmlstr.="<td>&nbsp;</td>\n";
$htmlstr.="<td>Gesperrt: </td>";
$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.="<td><input ".($firma->gesperrt?' style="background-color: #FFF4F4;" ':' style="background-color: #E3FDEE;" ')." type='checkbox' name='gesperrt' ".($firma->gesperrt?'checked':'')."></td>\n";
}
else
{
$htmlstr.="<td><input ".($firma->gesperrt?' style="background-color: #FFF4F4;" ':' style="background-color: #E3FDEE;" ')." type='checkbox' name='gesperrt' ".($firma->gesperrt?'checked':'')." disabled></td>\n";
$disabled='';
}
$htmlstr.="<td><input type='checkbox' name='gesperrt' ".($firma->gesperrt?'checked':'')." $disabled></td>\n";
$htmlstr.="<td>&nbsp;</td>\n";
$htmlstr.="<td>Schule:</td>";
$htmlstr.="<td><input ".($firma->schule?' style="background-color: #E3FDEE;" ':' style="background-color: #FFF4F4;" ')." type='checkbox' name='schule' ".($firma->schule?'checked':'')."> </td>";
$htmlstr.="<td>&nbsp;</td>";
$htmlstr.="</tr>";
$htmlstr.="<tr>";
$htmlstr.="<td title='Trennung mehrerer Tags durch ;'>Tags:</td><td><input type='text' id='tags' name='tags' size='32'>";
$htmlstr.="<script type='text/javascript' language='JavaScript1.2'>
$('#tags').autocomplete('stammdaten_autocomplete.php',
{
minChars:1,
matchSubset:1,matchContains:1,
width:400,
multiple: true,
multipleSeparator: '; ',
extraParams:{'work':'tags'}
});
</script>";
$htmlstr.="</td>";
$htmlstr.="<td>&nbsp;</td>";
$htmlstr.="</tr></table></td>";
$htmlstr.="<td colspan='9'>";
foreach($firma->tags as $tag)
{
$htmlstr.= '&nbsp;'.$tag.'<a href="firma_details.php?firma_id='.$firma->firma_id.'&deletetag=true&tag='.urlencode($tag).'" title="entfernen"> <img src="../../skin/images/DeleteIcon.png" /></a>';
}
$htmlstr.="</td></tr></table></td>";
$htmlstr.="</tr>\n";
$htmlstr.=" </table>\n";
$htmlstr.="</form>\n";
$htmlstr.='<div id="addFirmaInfo"></div>';
$htmlstr.='
<!-- Tabs -->
<ul class="css-tabs">
<li><a href="firma_details.php?work=standortliste&firma_id='.$firma_id.'">Standorte</a></li>
<li><a href="firma_details.php?work=organisationliste&firma_id='.$firma_id.'">Organisationseinheit</a></li>
<li><a href="firma_details.php?work=anmerkungsfeld&firma_id='.$firma_id.'">Anmerkungen</a></li>
</ul>
<div class="css-panes">
<div style="display:block"></div>
</div>
<div id="tabs" style="font-size:80%;">
<ul class="css-tabs">
<li><a href="#standort">Standorte</a></li>
<li><a href="#organisationseinheit">Organisationseinheit</a></li>
<li><a href="#anmerkung">Anmerkungen</a></li>
</ul>
<div id="standort">
'.getStandortliste($firma_id,$adresstyp_arr,$user).'
</div>
<div id="organisationseinheit">
'.getOrganisationsliste($firma_id, $adresstyp_arr, $user).'
</div>
<div id="anmerkung">
'.getAnmerkungen($firma_id, $user).'
</div>
</div>
<div id="detailstandort"> </div>
';
@@ -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.= '<table class="liste">
<tr>
<th>Kurzbz</th>
@@ -515,84 +463,81 @@ function getStandortliste($firma_id,$adresstyp_arr,$user)
<td align="center" valign="top" colspan="2"><a target="detail_workfirma" href="firma_detailwork.php?showmenue=1&firma_id='.$firma_id.'"><input type="Button" value="Neuanlage" name="work"></a></td>
</tr>';
#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 .= "<tr id='standort".$i."' class='liste". ($i%2) ."'>\n";
$i++;
//getDetailStandort(wohin,prameter)
$adresse_id=$row->adresse_id;
$adresse_obj = new adresse();
if ($adresse_obj->load($adresse_id))
{
$htmlstr.= '<td><a target="detail_workfirma" href="firma_detailwork.php?showmenue=1&firma_id='.$firma_id.'&standort_id='.$row->standort_id.'&adresse_id='.$adresse_obj->adresse_id.'">'.$row->kurzbz.'</a></td>';
$htmlstr.= "<td title='Nation ".$adresse_obj->nation."'>".(isset($nation_arr[$adresse_obj->nation])?$nation_arr[$adresse_obj->nation]:$adresse_obj->nation)."</td>";
$htmlstr.= '<td>'.$adresse_obj->gemeinde.'</td>';
$htmlstr.= '<td>'.$adresse_obj->plz.'</td>';
$htmlstr.= '<td>'.$adresse_obj->ort.'</td>';
$htmlstr.= '<td>'.$adresse_obj->strasse.'</td>';
$htmlstr.= '<td>'.$adresstyp_arr[$adresse_obj->typ].'</td>';
//$htmlstr.= '<td align="center">'.($adresse_obj->heimatadresse?'Ja':'Nein').'</td>';
$htmlstr.= '<td align="center">'.($adresse_obj->zustelladresse?'Ja':'Nein').'</td>';
//$htmlstr.= '<td align="center">'.$row->ext_id.'</td>';
$htmlstr.= '<td align="center"><a target="detail_workfirma" href="firma_detailwork.php?showmenue=1&firma_id='.$firma_id.'&standort_id='.$row->standort_id.'&adresse_id='.$adresse_obj->adresse_id.'"><img src="../../skin/images/application_form_edit.png" alt="editieren" title="edit"/></a></td>';
$htmlstr.= "<td align='center'><a href='".$_SERVER['PHP_SELF']."?deleteadresse=true&standort_id=$row->standort_id&adresse_id=$adresse_obj->adresse_id&firma_id=$firma_id' onclick='return confdel()'><img src='../../skin/images/application_form_delete.png' alt='loeschen' title='loeschen'/></a></td>";
}
else
$htmlstr.= '<td><a target="detail_workfirma" href="firma_detailwork.php?showmenue=1&firma_id='.$firma_id.'&standort_id='.$row->standort_id.'&adresse_id='.$row->adresse_id.'">'.$row->kurzbz.'</a></td>';
$htmlstr.= '<td colspan="10">'.$adresse_obj->errormsg.'</td>';
$adresse_id=$row->adresse_id;
$adresse_obj = new adresse();
if ($adresse_obj->load($adresse_id))
{
$htmlstr.= '<td><a target="detail_workfirma" href="firma_detailwork.php?showmenue=1&firma_id='.$firma_id.'&standort_id='.$row->standort_id.'&adresse_id='.$adresse_obj->adresse_id.'">'.$row->kurzbz.'</a></td>';
$htmlstr.= "<td title='Nation ".$adresse_obj->nation."'>".(isset($nation_arr[$adresse_obj->nation])?$nation_arr[$adresse_obj->nation]:$adresse_obj->nation)."</td>";
$htmlstr.= '<td>'.$adresse_obj->gemeinde.'</td>';
$htmlstr.= '<td>'.$adresse_obj->plz.'</td>';
$htmlstr.= '<td>'.$adresse_obj->ort.'</td>';
$htmlstr.= '<td>'.$adresse_obj->strasse.'</td>';
$htmlstr.= '<td>'.$adresstyp_arr[$adresse_obj->typ].'</td>';
$htmlstr.= '<td align="center">'.($adresse_obj->zustelladresse?'Ja':'Nein').'</td>';
$htmlstr.= '<td align="center"><a target="detail_workfirma" href="firma_detailwork.php?showmenue=1&firma_id='.$firma_id.'&standort_id='.$row->standort_id.'&adresse_id='.$adresse_obj->adresse_id.'"><img src="../../skin/images/application_form_edit.png" alt="editieren" title="edit"/></a></td>';
$htmlstr.= "<td align='center'><a href='".$_SERVER['PHP_SELF']."?deleteadresse=true&standort_id=$row->standort_id&adresse_id=$adresse_obj->adresse_id&firma_id=$firma_id' onclick='return confdel()'><img src='../../skin/images/application_form_delete.png' alt='loeschen' title='loeschen'/></a></td>";
}
else
{
$htmlstr.= '<td><a target="detail_workfirma" href="firma_detailwork.php?showmenue=1&firma_id='.$firma_id.'&standort_id='.$row->standort_id.'&adresse_id='.$row->adresse_id.'">'.$row->kurzbz.'</a></td>';
$htmlstr.= '<td colspan="10">'.$adresse_obj->errormsg.'</td>';
}
$htmlstr.= '</tr>';
}
$htmlstr.= '</table>';
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.= '<table class="liste">
<tr>
<th width="30%">Organisationseinheit</th>
@@ -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.'</table>';
$i=0;
foreach ($firma->result as $row)
{
$htmlstr .= "<tr id='standort".$i."' class='liste". ($i%2) ."'>\n";
$i++;
$htmlstr.= '<td><a target="detail_workfirma" href="firma_detailwork.php?work=eingabeOrganisationseinheit&firma_organisationseinheit_id='.$row->firma_organisationseinheit_id.'&oe_kurzbz='.$row->oe_kurzbz.'&firma_id='.$firma_id.'">'.$row->organisationseinheittyp_kurzbz.' '.$row->bezeichnung.'</a></td>';
$htmlstr.= '<td>'.$row->fobezeichnung.'</td>';
$htmlstr.= '<td align="center">'.$row->kundennummer.'</td>';
$htmlstr.= '<td align="center"><a target="detail_workfirma" href="firma_detailwork.php?work=eingabeOrganisationseinheit&firma_organisationseinheit_id='.$row->firma_organisationseinheit_id.'&oe_kurzbz='.$row->oe_kurzbz.'&firma_id='.$firma_id.'"><img src="../../skin/images/application_form_edit.png" alt="editieren" title="edit"/></a></td>';
$htmlstr.= "<td align='center'><a href='".$_SERVER['PHP_SELF']."?deleteorganisationseinheit=true&firma_organisationseinheit_id=".$row->firma_organisationseinheit_id."&oe_kurzbz=".$row->oe_kurzbz."&firma_id=".$firma_id."' onclick='return confdel()'><img src='../../skin/images/application_form_delete.png' alt='loeschen' title='loeschen'/></a></td>";
$htmlstr.= '<td><a target="detail_workfirma" href="firma_detailwork.php?work=eingabeOrganisationseinheit&firma_organisationseinheit_id='.$row->firma_organisationseinheit_id.'&oe_kurzbz='.$row->oe_kurzbz.'&firma_id='.$firma_id.'">'.$row->organisationseinheittyp_kurzbz.' '.$row->bezeichnung.'</a></td>';
$htmlstr.= '<td>'.$row->fobezeichnung.'</td>';
$htmlstr.= '<td align="center">'.$row->kundennummer.'</td>';
$htmlstr.= '<td align="center"><a target="detail_workfirma" href="firma_detailwork.php?work=eingabeOrganisationseinheit&firma_organisationseinheit_id='.$row->firma_organisationseinheit_id.'&oe_kurzbz='.$row->oe_kurzbz.'&firma_id='.$firma_id.'"><img src="../../skin/images/application_form_edit.png" alt="editieren" title="edit"/></a></td>';
$htmlstr.= "<td align='center'><a href='".$_SERVER['PHP_SELF']."?deleteorganisationseinheit=true&firma_organisationseinheit_id=".$row->firma_organisationseinheit_id."&oe_kurzbz=".$row->oe_kurzbz."&firma_id=".$firma_id."' onclick='return confdel()'><img src='../../skin/images/application_form_delete.png' alt='loeschen' title='loeschen'/></a></td>";
$htmlstr.= '</tr>';
}
@@ -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.="<form id='addFirma' name='addAnmerkung' action='firma_details.php' method='POST'>\n";
$htmlstr.="<input type='hidden' name='work' value='saveFirma'>\n";
$htmlstr.="<form id='addAnmerkungen' name='addAnmerkung' action='firma_details.php' method='POST'>\n";
$htmlstr.="<input type='hidden' name='work' value='saveAnmerkungen'>\n";
$htmlstr.="<input type='hidden' name='firma_id' value='".$firma->firma_id."'>\n";
$htmlstr.= "<table class='liste'>";
$htmlstr.= "<tr>";
$htmlstr.= "<td>Anmerkungen:</td>";
if($firma_id!='' && is_numeric($firma_id) )
$htmlstr.="<td align='center' width='20%'><input type='Button' onclick=\"workFirmaDetail('addFirmaInfo', 2);\" name='save' value='speichern'></td>\n";
else
$htmlstr.="<td align='center' width='20%'><input type='submit' name='save' value='anlegen'></td>\n";
$htmlstr.="<td align='center' width='20%'><input type='submit' name='save' value='speichern'></td>\n";
$htmlstr.= "</tr><tr><td colspan='2'><textarea cols='40' rows='6' style='width:100%' name='anmerkung'>".$firma->anmerkung."</textarea></td></tr>";
$htmlstr.="</form>\n";
$htmlstr.="</table></form>\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!';
}
?>
File diff suppressed because it is too large Load Diff
+6 -7
View File
@@ -44,14 +44,14 @@ $firmentypfilter = (isset($_GET['firmentypfilter'])?$_GET['firmentypfilter']:'')
?>
<html>
<head>
<title>Firma Uebersicht</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" href="../../skin/vilesci.css" type="text/css">
<link rel="stylesheet" href="../../include/js/tablesort/table.css" type="text/css">
<script src="../../include/js/tablesort/table.js" type="text/javascript"></script>
<title>Firma Uebersicht</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" href="../../skin/vilesci.css" type="text/css">
<link rel="stylesheet" href="../../include/js/tablesort/table.css" type="text/css">
<script src="../../include/js/tablesort/table.js" type="text/javascript"></script>
</head>
<body class="background_main">
<h2>Firmen - &Uuml;bersicht</h2>
<h2>Firmen - &Uuml;bersicht</h2>
<?php
echo '<table width="100%" border="0" cellpadding="0" cellspacing="0"><tr>';
//Suche
@@ -80,7 +80,6 @@ echo '<table width="100%" border="0" cellpadding="0" cellspacing="0"><tr>';
?>
</body>
</html>
<?php
function creatList($suchen,$filter,$firmentypfilter)
+27 -15
View File
@@ -64,8 +64,6 @@
$work=trim(isset($_REQUEST['work'])?$_REQUEST['work']:(isset($_REQUEST['ajax'])?$_REQUEST['ajax']:false));
$work=strtolower($work);
## $work='plz';
// ------------------------------------------------------------------------------------------
// Datenlesen
@@ -176,8 +174,6 @@ cellSeparator (default value: "|")
case 'position':
$position=trim((isset($_REQUEST['q']) ? $_REQUEST['q']:''));
## if (is_null($position) || $position=='')
# exit();
$matchcode=mb_strtoupper(addslashes(str_replace(array('*','%',',',';',"'",'"',' '),'%',trim($position))));
$pWhere=" upper(position) like '%".addslashes($matchcode)."%' ".($funktion_kurzbz?" and funktion_kurzbz='".addslashes($funktion_kurzbz)."'":'');
@@ -194,7 +190,7 @@ cellSeparator (default value: "|")
$pWhere='';
$pOrder='';
$pLimit='';
##echo '<br>'.$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;$i<count($result);$i++)
echo html_entity_decode($result[$i]->tag)."\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
{