This commit is contained in:
Rudolf Hangl
2010-03-16 09:54:45 +00:00
parent d83d221940
commit b362c28a81
4 changed files with 140 additions and 83 deletions
+76 -27
View File
@@ -1,5 +1,5 @@
<?php
/* Copyright (C) 2006 Technikum-Wien
/* Copyright (C) 2010 Technikum-Wien
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as
@@ -15,9 +15,9 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
*
* Authors: Christian Paminger < christian.paminger@technikum-wien.at >
* Authors: Christian Paminger < christian.paminger@technikum-wien.at >
* Andreas Oesterreicher < andreas.oesterreicher@technikum-wien.at >
* Rudolf Hangl < rudolf.hangl@technikum-wien.at >
* 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']:'');
@@ -227,6 +227,7 @@ div.css-panes div {
##echo "$work <br>";
//Tabs
switch ($work)
{
case 'standortliste':
@@ -236,6 +237,10 @@ div.css-panes div {
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
@@ -253,7 +258,11 @@ div.css-panes div {
break;
}
echo ($errorstr?'<br>'.$errorstr:'');
echo '<script language="JavaScript1.2" type="text/javascript">
<!--
parent.frames[0].location.reload();
-->
</script>';
?>
</body>
@@ -289,7 +298,7 @@ function getFirmadetail($firma_id,$adresstyp_arr,$user)
$htmlstr.="<input type='hidden' name='firma_id' value='".$firma->firma_id."'>\n";
// Firma Detailanzeige
$htmlstr.="<table class='detail' style='padding-top:10px;'>\n";
$htmlstr.="<tr><td><table><tr>\n";
$htmlstr.="<tr><td><table width='100%'><tr>\n";
$htmlstr.="<td>Typ: </td>";
$htmlstr.="<td><select name='typ'>\n";
@@ -305,18 +314,22 @@ function getFirmadetail($firma_id,$adresstyp_arr,$user)
$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>";
$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
//$htmlstr.="<td>&nbsp;</td>";
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";
$htmlstr.="<td align='center' width='20%'><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.="<td align='center' width='20%'><input type='submit' name='save' value='anlegen'></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></table></td>";
$htmlstr.="</tr>\n";
$htmlstr.="<tr><td><table><tr>\n";
$htmlstr.="<td>Steuernummer: </td>";
@@ -358,6 +371,7 @@ function getFirmadetail($firma_id,$adresstyp_arr,$user)
<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>
@@ -463,11 +477,11 @@ function getStandortliste($firma_id,$adresstyp_arr,$user)
<th>Plz</th>
<th>Ort</th>
<th>Strasse</th>
<th>TYP</th>
<th>Typ</th>
<th><font size="0">Heimatadr.</font></th>
<th><font size="0">Zustelladr.</font></th>
<th>Ext.Id</th>
<td valign="top"><a target="detail_workfirma" href="firma_detailwork.php?showmenue=1&firma_id='.$firma_id.'"><input type="Button" value="Neuanlage" name="work"></a></td>
<td align="center" valign="top"><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=0;
@@ -520,7 +534,7 @@ function getStandortliste($firma_id,$adresstyp_arr,$user)
$htmlstr.= '<td>'.($adresse_obj->heimatadresse?'Ja':'Nein').'</td>';
$htmlstr.= '<td>'.($adresse_obj->zustelladresse?'Ja':'Nein').'</td>';
$htmlstr.= '<td>'.$row->ext_id.'</td>';
$htmlstr.= "<td><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()'>l&ouml;schen <img src='../../skin/images/application_form_delete.png' alt='loeschen' title='loeschen'/></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>';
@@ -544,18 +558,17 @@ function getOrganisationsliste($firma_id,$adresstyp_arr,$user)
// Datenlesen zur Firma
$firma = new firma();
if (!$firma->load_firmaorganisationseinheit($firma_id))
if (!$firma->get_firmaorganisationseinheit($firma_id))
return '<br>Firma ID <b>'.$firma_id.'</b> '.$firma->errormsg;;
## var_dump($firma);
$htmlstr.= '<table class="liste">
<tr>
<th>Kurzbz</th>
<th>TYP</th>
<th>Bezeichnung</th>
<th>Mailverteiler</th>
<th>Aktiv</th>
<td valign="top"><a target="detail_workfirma" href="firma_detailwork.php?work=eingabeOrganisationseinheit&firma_organisationseinheit_id=&oe_kurzbz=&firma_id='.$firma_id.'"><input type="Button" value="Neuanlage" name="work"></a></td>
<th width="30%">Kurzbezeichnung</th>
<th width="15%">Typ</th>
<th width="25%">Bezeichnung</th>
<th width="15%">Kundennummer</th>
<td width="15%" align="center" valign="top"><a target="detail_workfirma" href="firma_detailwork.php?work=eingabeOrganisationseinheit&firma_organisationseinheit_id=&oe_kurzbz=&firma_id='.$firma_id.'"><input type="Button" value="Neuanlage" name="work"></a></td>
</tr>
';
$i=0;
@@ -567,15 +580,51 @@ function getOrganisationsliste($firma_id,$adresstyp_arr,$user)
$htmlstr.= '<td>'.$row->organisationseinheittyp_kurzbz.'</td>';
$htmlstr.= '<td>'.$row->bezeichnung.'</td>';
$htmlstr.= '<td>'.($row->mailverteiler?'Ja':'Nein').'</td>';
$htmlstr.= '<td>'.($row->oe_aktiv?'Ja':'Nein').'</td>';
$htmlstr.= '<td align="center">'.$row->kundennummer.'</td>';
$htmlstr.= "<td><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()'>l&ouml;schen <img src='../../skin/images/application_form_delete.png' alt='loeschen' title='loeschen'/></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>';
}
$htmlstr.= '</table>';
return $htmlstr;
}
// ----------------------------------------------------------------------------------------------------------------------------------
/*
Anmerungen
*/
function getAnmerkungen($firma_id,$user)
{
// Init
$htmlstr='';
// Plausib
if (empty($firma_id) || !is_numeric($firma_id) )
return 'Firma fehlt.';
// Datenlesen zur Firma
$firma = new firma();
if($firma_id!='' && is_numeric($firma_id) )
{
if (!$firma->load($firma_id))
return '<br>Firma mit der ID <b>'.$firma_id.'</b> existiert nicht';
}
else
{
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.="<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');\" name='save' value='speichern'></td>\n";
else
$htmlstr.="<td align='center' width='20%'><input type='submit' name='save' value='anlegen'></td>\n";
$htmlstr.= "</tr><tr><td colspan='2'><textarea cols='40' rows='8' style='width:100%' name='anmerkung'>".$firma->anmerkung."</textarea></td></tr>";
$htmlstr.="</form>\n";
return $htmlstr;
}
?>
+60 -52
View File
@@ -1,5 +1,5 @@
<?php
/* Copyright (C) 2006 Technikum-Wien
/* Copyright (C) 2010 Technikum-Wien
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as
@@ -59,6 +59,7 @@
$adresse_id = (isset($_REQUEST['adresse_id'])?$_REQUEST['adresse_id']:'');
$kontakt_id = (isset($_REQUEST['kontakt_id'])?$_REQUEST['kontakt_id']:'');
$oe_kurzbz= (isset($_REQUEST['oe_kurzbz'])?$_REQUEST['oe_kurzbz']:'');
$oe_parent_kurzbz= (isset($_REQUEST['oe_parent_kurzbz'])?$_REQUEST['oe_parent_kurzbz']:'');
$work = (isset($_REQUEST['work'])?$_REQUEST['work']:(isset($_REQUEST['save'])?$_REQUEST['save']:null));
$showmenue = (isset($_REQUEST['showmenue'])?$_REQUEST['showmenue']:false);
$personfunktionstandort_id = (isset($_REQUEST['personfunktionstandort_id'])?$_REQUEST['personfunktionstandort_id']:'');
@@ -310,19 +311,22 @@ div.css-panes div {
break;
case 'saveFirmaorganisationseinheit':
$firma_organisationseinheit_id=saveFirmaorganisationseinheit($firma_id,$firma_organisationseinheit_id,$oe_kurzbz,$adresstyp_arr,$user,$rechte);
$firma_organisationseinheit_id=saveFirmaorganisationseinheit($firma_id,$firma_organisationseinheit_id,$oe_kurzbz,$oe_parent_kurzbz,$adresstyp_arr,$user,$rechte);
if (!is_numeric($firma_organisationseinheit_id))
{
$htmlcode=$firma_organisationseinheit_id;
$firma_organisationseinheit_id='';
}
$htmlcode.=eingabeOrganisationseinheit($firma_id,$firma_organisationseinheit_id,$oe_kurzbz,$adresstyp_arr,$user,$rechte);
$htmlcode.='<script language="JavaScript1.2" type="text/javascript">
parent.frames[1].location.reload();
</script>';
break;
case 'eingabeOrganisationseinheit':
$htmlcode=eingabeOrganisationseinheit($firma_id,$firma_organisationseinheit_id,$oe_kurzbz,$adresstyp_arr,$user,$rechte);
break;
case 'saveOrganisationseinheit':
$htmlcode=saveOrganisationseinheit($firma_id,$firma_organisationseinheit_id,$oe_kurzbz,$adresstyp_arr,$user,$rechte);
$htmlcode=saveOrganisationseinheit($firma_id,$firma_organisationseinheit_id,$oe_kurzbz,$oe_parent_kurzbz,$adresstyp_arr,$user,$rechte);
break;
@@ -335,7 +339,7 @@ div.css-panes div {
if ($showmenue)
echo '<!-- Tabs -->
<ul class="css-tabsDetail">
<li><a href="firma_detailwork.php?work=standort&firma_id='.$firma_id.'&standort_id='.$standort_id.'&adresse_id='.$adresse_id.'">Standorte</a></li>
<li><a href="firma_detailwork.php?work=standort&firma_id='.$firma_id.'&standort_id='.$standort_id.'&adresse_id='.$adresse_id.'">Standort</a></li>
<li><a href="firma_detailwork.php?work=listPersonenfunktionen&firma_id='.$firma_id.'&standort_id='.$standort_id.'&adresse_id='.$adresse_id.'">Personen/Funktion</a></li>
<li><a href="firma_detailwork.php?work=listKontakte&firma_id='.$firma_id.'&standort_id='.$standort_id.'&adresse_id='.$adresse_id.'">Kontakte</a></li>
</ul>
@@ -358,7 +362,7 @@ div.css-panes div {
/*
Organisation zur Firma
*/
function saveFirmaorganisationseinheit($firma_id,$firma_organisationseinheit_id,$oe_kurzbz,$adresstyp_arr,$user,$rechte)
function saveFirmaorganisationseinheit($firma_id,$firma_organisationseinheit_id,$oe_kurzbz,$oe_parent_kurzbz,$adresstyp_arr,$user,$rechte)
{
// Init
$htmlstr='';
@@ -368,15 +372,16 @@ function saveFirmaorganisationseinheit($firma_id,$firma_organisationseinheit_id,
// Datenlesen zur Firma
$firma = new firma();
if($firma_organisationseinheit_id!='' && is_numeric($firma_organisationseinheit_id) )
{
if($firma->load_firmaorganisationseinheit($firma_id,$oe_kurzbz,$firma_organisationseinheit_id))
if($firma->load_firmaorganisationseinheit($firma_organisationseinheit_id))
{
$firma->new = false;
}
else
{
return 'Kontakt wurde nicht gefunden:'.$kontakt_id;
return 'Firmaorganisationseinheit wurde nicht gefunden: '.$firma_organisationseinheit_id;
}
}
else
@@ -389,10 +394,11 @@ function saveFirmaorganisationseinheit($firma_id,$firma_organisationseinheit_id,
$firma->firma_id=$firma_id;
$oe_kurzbz = (isset($_POST['oe_kurzbz'])?$_POST['oe_kurzbz']:null);
$kundennummer = (isset($_POST['kundennummer'])?$_POST['kundennummer']:null);
$bezeichnung = (isset($_POST['bezeichnung'])?$_POST['bezeichnung']:'');
$ext_id = (isset($_POST['ext_id'])?$_POST['ext_id']:null);
$oe_parent_kurzbz = (isset($_POST['oe_parent_kurzbz'])?$_POST['oe_parent_kurzbz']:'');
$organisationseinheit_obj = new organisationseinheit();
if ($oe_kurzbz)
{
@@ -437,47 +443,50 @@ function eingabeOrganisationseinheit($firma_id,$firma_organisationseinheit_id,$o
// Datenlesen zur Firma
$firma = new firma();
if ($firma_organisationseinheit_id && !$firma->load_firmaorganisationseinheit($firma_id,$oe_kurzbz,$firma_organisationseinheit_id))
return '<br>Fehler Firma ID <b>'.$firma_id.'</b> '.$firma->errormsg;;
if ($firma_organisationseinheit_id && !$firma->get_firmaorganisationseinheit($firma_id,$oe_kurzbz))
return '<br>Fehler Firma ID <b>'.$firma_id.'</b> '.$firma->errormsg;
$htmlstr.= '<table class="liste">
<tr>
<th>Organisation</th>
<th>Bezeichnung</th>
<th colspan="2">Mailverteiler</th>
<th>Aktiv</th>
<th>&nbsp;</th>
<tr>
<th>Bezeichnung Organisationseinheit</th>';
//<th>Kurzbezeichnung</th>
//<th>Bezeichnung</th>
$htmlstr.= '<th>Kundennummer</th>
<th>&nbsp;</th>
</tr>
';
//Kontakttype laden
$organisationseinheit_obj = new organisationseinheit();
$organisationseinheit_obj->getAll();
$i=0;
foreach ($firma->result as $row)
{
$htmlstr.="<form id='addFirmaorganisationseinheit".$i."' name='addFirmaorganisationseinheit".$i."' action='firma_detailwork.php' method='POST'>\n";
$htmlstr.="<tr class='liste". ($i%2) ."'>\n";
$i++;
$htmlstr.= "<td><SELECT name='oe_kurzbz'>";
for ($ii=0;$ii<count($organisationseinheit_obj->result);$ii++)
{
$htmlstr.= "<OPTION value='".$organisationseinheit_obj->result[$ii]->oe_kurzbz."' ".($organisationseinheit_obj->result[$ii]->oe_kurzbz==$row->oe_kurzbz?' selected ':'')." >".$organisationseinheit_obj->result[$ii]->bezeichnung."</OPTION>";
}
$htmlstr.= "</SELECT>
<input type='Hidden' name='firma_organisationseinheit_id' value='".$row->firma_organisationseinheit_id."'>
<input type='Hidden' name='kundennummer' value='".$row->kundennummer."'>
<input type='Hidden' name='firma_id' value='".$firma_id."'>
<input type='Hidden' name='work' value='saveFirmaorganisationseinheit'>
</td>
";
$htmlstr.= '<td>'.$row->organisationseinheittyp_kurzbz.'</td>';
$htmlstr.= '<td>'.$row->bezeichnung.'</td>';
$htmlstr.= '<td>'.($row->mailverteiler?'Ja':'Nein').'</td>';
$htmlstr.= '<td>'.($row->oe_aktiv?'Ja':'Nein').'</td>';
$htmlstr.= '<td><input type="Submit" value="speichern" ></td>';
$htmlstr.= '</tr>';
$htmlstr.="</form>\n";
$htmlstr.="<form id='addFirmaorganisationseinheit".$i."' name='addFirmaorganisationseinheit".$i."' action='firma_detailwork.php' method='POST'>\n";
$htmlstr.="<tr class='liste". ($i%2) ."'>\n";
$i++;
$htmlstr.= "<td><SELECT name='oe_kurzbz'>";
for ($ii=0;$ii<count($organisationseinheit_obj->result);$ii++)
{
$htmlstr.= "<OPTION value='".$organisationseinheit_obj->result[$ii]->oe_kurzbz."' ".($organisationseinheit_obj->result[$ii]->oe_kurzbz==$row->oe_kurzbz?' selected ':'')." >".$organisationseinheit_obj->result[$ii]->bezeichnung."</OPTION>";
}
$htmlstr.= "</SELECT>
<input type='Hidden' name='firma_organisationseinheit_id' value='".$row->firma_organisationseinheit_id."'>
<input type='Hidden' name='oe_parent_kurzbz' value='".$row->oe_parent_kurzbz."'>";
//<input type='Hidden' name='kundennummer' value='".$row->kundennummer."'>
$htmlstr.= "<input type='Hidden' name='firma_id' value='".$firma_id."'>
<input type='Hidden' name='work' value='saveFirmaorganisationseinheit'>
</td>
";
//$htmlstr.= '<td>'.$row->organisationseinheittyp_kurzbz.'</td>';
//$htmlstr.= '<td>'.$row->oe_kurzbz.'</td>';
//$htmlstr.= '<td>'.$row->bezeichnung.'</td>';
$htmlstr.= "<td><input type='text' name='kundennummer' value=".$row->kundennummer."></td>";
$htmlstr.= '<td><input type="Submit" value="speichern" ></td>';
$htmlstr.= '</tr>';
$htmlstr.="</form>\n";
}
if (!$firma_organisationseinheit_id)
{
@@ -497,11 +506,10 @@ function eingabeOrganisationseinheit($firma_id,$firma_organisationseinheit_id,$o
<input type='Hidden' name='work' value='saveFirmaorganisationseinheit'>
</td>
";
$htmlstr.= '<td></td>';
$htmlstr.= '<td></td>';
$htmlstr.= '<td></td>';
$htmlstr.= '<td></td>';
$htmlstr.= '<td><input type="Submit" value="speichern" ></td>';
//$htmlstr.= '<td></td>';
//$htmlstr.= '<td></td>';
$htmlstr.= "<td><input type='text' name='kundennummer'></td>";
$htmlstr.= '<td><input type="Submit" value="speichern" ></td>';
$htmlstr.= '</tr>';
$htmlstr.="</form>\n";
}
@@ -616,7 +624,7 @@ function listKontakte($firma_id,$standort_id,$adresse_id,$kontakt_id,$adresstyp_
<th>Zustellung</th>
<th>Person</th>
<th>Ext.Id</th>
<td valign="top"><a target="detail_workfirma" href="javascript:callUrl(\'detail\',\'work=eingabeKontakt&firma_id='.$firma_id.'&standort_id='.$standort_id.'&kontakt_id=\');"><input type="Button" value="Neuanlage" name="work"></a></td>
<td align="center" valign="top"><a target="detail_workfirma" href="javascript:callUrl(\'detail\',\'work=eingabeKontakt&firma_id='.$firma_id.'&standort_id='.$standort_id.'&kontakt_id=\');"><input type="Button" value="Neuanlage" name="work"></a></td>
</tr>';
$i=0;
@@ -631,7 +639,7 @@ function listKontakte($firma_id,$standort_id,$adresse_id,$kontakt_id,$adresstyp_
$htmlstr.= '<td>'.($row->zustellung?'Ja':'Nein').'</td>';
$htmlstr.= '<td>'.$row->person_id.'</td>';
$htmlstr.= '<td>'.$row->ext_id.'</td>';
$htmlstr.= "<td><a href='".$_SERVER['PHP_SELF']."?deletekontakt=true&firma_id=$firma_id&standort_id=$row->standort_id&kontakt_id=$row->kontakt_id' onclick='return confdel()'>l&ouml;schen <img src='../../skin/images/application_form_delete.png' alt='loeschen' title='loeschen'/></a></td>";
$htmlstr.= "<td align='center'><a href='".$_SERVER['PHP_SELF']."?deletekontakt=true&firma_id=$firma_id&standort_id=$row->standort_id&kontakt_id=$row->kontakt_id' onclick='return confdel()'><img src='../../skin/images/application_form_delete.png' alt='loeschen' title='loeschen'/></a></td>";
$htmlstr.= '</tr>';
}
$htmlstr.= '</table>';
@@ -750,14 +758,14 @@ function savePersonenfunktionen($firma_id,$standort_id,$personfunktionstandort_i
$funktion_kurzbz = (isset($_POST['funktion_kurzbz'])?$_POST['funktion_kurzbz']:'');
// Plausib
if (empty($personfunktionstandort_id) || !is_numeric($personfunktionstandort_id) )
return 'Personfunktionstandort_id fehlt.';
//if (empty($personfunktionstandort_id) || !is_numeric($personfunktionstandort_id) )
// return 'Personfunktionstandort_id fehlt.';
if (empty($firma_id) || !is_numeric($firma_id) )
return 'Firma fehlt.';
if (empty($standort_id) || !is_numeric($standort_id) )
return 'Standort fehlt.';
if (empty($person_id) || !is_numeric($person_id) )
return 'Personen ID fehlt.';
//if (empty($person_id) || !is_numeric($person_id) )
// return 'Personen ID fehlt.';
if (empty($funktion_kurzbz) )
return 'Funktion fehlt.';
@@ -847,7 +855,7 @@ function getlistPersonenfunktionen($firma_id,$standort_id,$personfunktionstandor
<th>Position</th>
<th>Anrede</th>
<th>Person</th>
<td valign="top"><a target="detail_workfirma" href="javascript:callUrl(\'detail\',\'work=eingabePersonenfunktionen&firma_id&firma_id='.$firma_id.'&standort_id='.$standort_id.'&personfunktionstandort_id=\');"><input type="Button" value="Neuanlage" name="work"></a></td>
<td align="center" valign="top"><a target="detail_workfirma" href="javascript:callUrl(\'detail\',\'work=eingabePersonenfunktionen&firma_id&firma_id='.$firma_id.'&standort_id='.$standort_id.'&personfunktionstandort_id=\');"><input type="Button" value="Neuanlage" name="work"></a></td>
</tr>';
$i=0;
foreach ($standort_obj->result as $row)
@@ -866,7 +874,7 @@ function getlistPersonenfunktionen($firma_id,$standort_id,$personfunktionstandor
if (empty($person))
$person=$row->personen_id;
$htmlstr.= '<td>'.$person.'</td>';
$htmlstr.= "<td><a href='".$_SERVER['PHP_SELF']."?deletepersonfunktionstandort=true&standort_id=".$row->standort_id."&personfunktionstandort_id=".$row->personfunktionstandort_id."&firma_id=".$firma_id."' onclick='return confdel()'>l&ouml;schen <img src='../../skin/images/application_form_delete.png' alt='loeschen' title='loeschen'/></a></td>";
$htmlstr.= "<td align='center'><a href='".$_SERVER['PHP_SELF']."?deletepersonfunktionstandort=true&standort_id=".$row->standort_id."&personfunktionstandort_id=".$row->personfunktionstandort_id."&firma_id=".$firma_id."' onclick='return confdel()'><img src='../../skin/images/application_form_delete.png' alt='loeschen' title='loeschen'/></a></td>";
$htmlstr.= '</tr>';
}
$htmlstr.= '</table>';
@@ -1042,7 +1050,7 @@ function getStandort($firma_id,$standort_id,$adresse_id,$adresstyp_arr,$user,$re
{
$adresse_obj->adresse_id=$adresse_id;
$adresse_obj->typ='f';
$adresse_obj->nation='A';
//$adresse_obj->nation='A';
}
$htmlstr.="<form id='addStandort' name='addStandort' action='firma_detailwork.php' method='POST'>\n";
+1 -1
View File
@@ -8,7 +8,7 @@
</head>
<frameset rows="40%,30%,*" border="0" frameborder="0" framespacing="1" >
<frameset rows="35%,35%,*" border="0" frameborder="0" framespacing="1" >
<frame src="firma_uebersicht.php" name="uebersicht_firma" frameborder="0" />
<frame src="firma_details.php" name="detail_firma" frameborder="0" />
+3 -3
View File
@@ -1,5 +1,5 @@
<?php
/* Copyright (C) 2006 Technikum-Wien
/* Copyright (C) 2010 Technikum-Wien
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as
@@ -97,7 +97,7 @@ function creatList($suchen,$filter,$firmentypfilter)
$firmentyp_finanzamt='Finanzamt';
$firma_finanzamt->errormsg='';
$firma_finanzamt->result=array();
if (!is_null($suchen)) // Nur wenn Suchknopf gedrueck wurde
if (!is_null($suchen)) // Nur wenn Suchknopf gedrueckt wurde
$firma_finanzamt->searchFirma($filter,$firmentypfilter);
if($firma_finanzamt->errormsg)
@@ -127,7 +127,7 @@ function creatList($suchen,$filter,$firmentypfilter)
$i = 0;
foreach ($firma_finanzamt->result as $row)
{
// Adresse
// Adresse
$row->adresse_neu=$row->plz.' '.$row->ort;
$htmlstr .= " <tr class='liste". ($i%2) ."'>\n";