This commit is contained in:
Rudolf Hangl
2010-03-24 16:44:52 +00:00
parent 9d8aa837be
commit f4fce3016d
5 changed files with 417 additions and 310 deletions
+4 -7
View File
@@ -361,7 +361,7 @@ function getFirmadetail($firma_id,$adresstyp_arr,$user)
//Zugriffsrechte pruefen
$rechte = new benutzerberechtigung();
$rechte->getBerechtigungen($user);
if(!$rechte->isBerechtigt('basis/firma',null, 'suid'))
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";
}
@@ -581,8 +581,7 @@ function getOrganisationsliste($firma_id,$adresstyp_arr,$user)
## var_dump($firma);
$htmlstr.= '<table class="liste">
<tr>
<th width="30%">Kurzbezeichnung</th>
<th width="15%">Typ</th>
<th width="30%">Organisationseinheit</th>
<th width="25%">Bezeichnung</th>
<th width="15%">Kundennummer</th>
<td width="15%" align="center" valign="top" colspan="2"><a target="detail_workfirma"
@@ -595,10 +594,8 @@ function getOrganisationsliste($firma_id,$adresstyp_arr,$user)
{
$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->oe_kurzbz.'</a></td>';
$htmlstr.= '<td>'.$row->organisationseinheittyp_kurzbz.'</td>';
$htmlstr.= '<td>'.$row->bezeichnung.'</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>";
+27 -16
View File
@@ -232,20 +232,23 @@ if(isset($_GET['type']) && $_GET['type']=='getortcontent' && isset($_GET['plz'])
<link rel="stylesheet" href="../../skin/vilesci.css" type="text/css">
<link rel="stylesheet" href="../../include/js/jquery.css" rel="stylesheet" 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.autocomplete.js" type="text/javascript"></script>
<script src="../../include/js/jquery.autocomplete.min.js" type="text/javascript"></script>
<script src="../../include/js/jquery.tools.min.js" type="text/javascript"></script>
<script type="text/javascript" language="JavaScript1.2">
<script type="text/javascript" language="JavaScript1.2">
@@ -433,6 +436,7 @@ function setOrtData()
</script>
<style type="text/css">
<!--
/* root element for tabs */
@@ -501,6 +505,7 @@ div.css-panes div div{
-->
</style>
</head>
<body style="background-color:#eeeeee;">
<?php
@@ -641,7 +646,7 @@ function saveFirmaorganisationseinheit($firma_id,$firma_organisationseinheit_id,
echo 'Organisation fehler '.$organisationseinheit_obj->errormsg;
return false;
}
$bezeichnung=($bezeichnung?$bezeichnung:$organisationseinheit_obj->bezeichnung);
//$bezeichnung=($bezeichnung?$bezeichnung:$organisationseinheit_obj->bezeichnung);
}
else
{
@@ -657,6 +662,11 @@ function saveFirmaorganisationseinheit($firma_id,$firma_organisationseinheit_id,
$firma->kundennummer=$kundennummer;
$firma->ext_id=$ext_id;
if($firma->get_firmaorganisationseinheit($firma->firma_id, $firma->oe_kurzbz))
{
echo "Organisationseinheit ".$firma->oe_kurzbz." ist bereits zugeteilt!";
return false;
}
if (!$firma->saveorganisationseinheit())
echo $firma->errormsg;
return $firma->firma_organisationseinheit_id;
@@ -684,8 +694,8 @@ function eingabeOrganisationseinheit($firma_id,$firma_organisationseinheit_id,$o
<tr>
<th>Bezeichnung Organisationseinheit</th>';
//<th>Kurzbezeichnung</th>
//<th>Bezeichnung</th>
$htmlstr.= '<th>Kundennummer</th>
$htmlstr.= '<th>Bezeichnung</th>
<th>Kundennummer</th>
<th>&nbsp;</th>
</tr>
';
@@ -716,8 +726,8 @@ function eingabeOrganisationseinheit($firma_id,$firma_organisationseinheit_id,$o
//$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='text' name='bezeichnung' value='".$row->fobezeichnung."' size='50' maxlength='256'></td>";
$htmlstr.= "<td><input type='text' name='kundennummer' value='".$row->kundennummer."' size='20' maxlength='128'></td>";
$htmlstr.= '<td><input type="Submit" value="speichern" ></td>';
$htmlstr.= '</tr>';
$htmlstr.="</form>\n";
@@ -734,15 +744,15 @@ function eingabeOrganisationseinheit($firma_id,$firma_organisationseinheit_id,$o
$htmlstr.= "<OPTION value='".$organisationseinheit_obj->result[$ii]->oe_kurzbz."' ".($organisationseinheit_obj->result[$ii]->oe_kurzbz==''?' selected ':'')." >".$organisationseinheit_obj->result[$ii]->bezeichnung."</OPTION>";
}
$htmlstr.= "</SELECT>
<input type='Hidden' name='firma_organisationseinheit_id' value=''>
<input type='Hidden' name='kundennummer' value=''>
<input type='Hidden' name='firma_id' value='".$firma_id."'>
<input type='Hidden' name='firma_organisationseinheit_id' value=''>";
//<input type='Hidden' name='kundennummer' value=''>
$htmlstr.= "<input type='Hidden' name='firma_id' value='".$firma_id."'>
<input type='Hidden' name='work' value='saveFirmaorganisationseinheit'>
</td>
";
//$htmlstr.= '<td></td>';
//$htmlstr.= '<td></td>';
$htmlstr.= "<td><input type='text' name='kundennummer'></td>";
$htmlstr.= "<td><input type='text' name='bezeichnung' size='50' maxlength='256'></td>";
$htmlstr.= "<td><input type='text' name='kundennummer' size='20' maxlength='128'></td>";
$htmlstr.= '<td><input type="Submit" value="speichern" ></td>';
$htmlstr.= '</tr>';
$htmlstr.="</form>\n";
@@ -1212,9 +1222,9 @@ function eingabePersonenfunktionen($firma_id,$standort_id,$personfunktionstandor
$htmlstr.="<td>&nbsp;</td>";
$htmlstr.="<td>Anrede: </td>";
$htmlstr.="<td><input type='text' name='anrede' value='".$standort_obj->anrede."' size='50' maxlength='128' /></td>\n";
$htmlstr.="<td>&nbsp;</td></tr>";
$htmlstr.="<td>&nbsp;</td></tr>";
$htmlstr.="<tr><td>Person: </td>";
$htmlstr.="<td><input type='text' id='person_id' name='person_id' value='".$standort_obj->person_id."' size='20' maxlength='20' /></td>\n";
$htmlstr.="<td><input type='text' id='person_id' name='person_id' value='".$standort_obj->person_id."' size='20' maxlength='20' />\n";
$htmlstr.="<script type='text/javascript' language='JavaScript1.2'>
function formatItem(row)
{
@@ -1231,7 +1241,8 @@ function eingabePersonenfunktionen($firma_id,$standort_id,$personfunktionstandor
</script>
";
//$htmlstr.'<div id="contentPad">';
//$htmlstr.='<span class="formInfo"><a href="ansprechpartner_person_tt.htm?width=475" class="jTip" id="one" name="Personensuche">?</a></div></span></td>';
$htmlstr.="<td>&nbsp;</td>";
$person=($standort_obj->person_anrede?$standort_obj->person_anrede.' ':'').($standort_obj->titelpre?$standort_obj->titelpre.' ':'').($standort_obj->vorname?$standort_obj->vorname.' ':'').($standort_obj->nachname?$standort_obj->nachname.' ':'');
$htmlstr.=($person?'<td colspan="2"></td><td id="person" colspan="9" align="right">'.$person.'</td></tr>':'')."</table></td>";
@@ -1244,7 +1255,7 @@ function eingabePersonenfunktionen($firma_id,$standort_id,$personfunktionstandor
$htmlstr.="<td>&nbsp;&nbsp;&nbsp;&nbsp;</td>";
$htmlstr.='<td><input onclick="workDetailRecord(\'detailworkinfodiv\',\'addPersonenfunktionen\');" type="Button" value="speichern"></td>';
$htmlstr.="<td>&nbsp;&nbsp;&nbsp;&nbsp;</td>";
$htmlstr.="<td><a href='../personen/personen_anlegen.php' target='_blank'><input type='button' value='Person anlegen'></a></td>";
$htmlstr.="<td><input type='button' value='Person anlegen' onClick=\"window.open('../personen/personen_anlegen.php')\"></td>";
$htmlstr.="</tr></table></td>";
$htmlstr.="</tr>\n";
+1 -1
View File
@@ -8,7 +8,7 @@
</head>
<frameset rows="25%,40%,*" border="0" frameborder="0" framespacing="1" >
<frameset rows="25%,40%,*">
<frame src="firma_uebersicht.php" name="uebersicht_firma" frameborder="0" />
<frame src="firma_details.php" name="detail_firma" frameborder="0" />
+359 -277
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,122 +15,137 @@
* 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 >
*/
require_once('../../config/vilesci.config.inc.php');
require_once('../../include/functions.inc.php');
require_once('../../include/firma.class.php');
require_once('../../include/standort.class.php');
require_once('../../include/adresse.class.php');
require_once('../../include/kontakt.class.php');
require_once('../../include/person.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.');
// Benutzerinformation
$user=get_uid();
// Zugriffsrechte pruefen
$rechte = new benutzerberechtigung();
$rechte->getBerechtigungen($user);
if(!$rechte->isBerechtigt('admin') && !$rechte->isBerechtigt('basis/firma',null,'suid'))
die('Sie haben keine Berechtigung für diese Seite');
// Parameter
$firma_id_geloescht = (isset($_REQUEST['firma_id_geloescht'])?$_REQUEST['firma_id_geloescht']:'');
if (empty($firma_id_geloescht))
exit('Es fehlt welche Firma gel&ouml;scht werden soll !');
$firma_id_bleibt = (isset($_REQUEST['firma_id_bleibt'])?$_REQUEST['firma_id_bleibt']:'');
if (empty($firma_id_bleibt))
exit('Es fehlt welche Firma bleibt !');
if ($firma_id_geloescht==$firma_id_bleibt)
exit('Zusammenlegen nicht m&ouml;glich ! Firmendaten sind gleich ');
$work = (isset($_REQUEST['work'])?$_REQUEST['work']:'');
require_once('../../config/vilesci.config.inc.php');
require_once('../../include/functions.inc.php');
require_once('../../include/firma.class.php');
require_once('../../include/standort.class.php');
require_once('../../include/adresse.class.php');
require_once('../../include/kontakt.class.php');
require_once('../../include/person.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.');
// Benutzerinformation
$user=get_uid();
// Zugriffsrechte pruefen
$rechte = new benutzerberechtigung();
$rechte->getBerechtigungen($user);
if(!$rechte->isBerechtigt('admin') && !$rechte->isBerechtigt('basis/firma:begrenzt',null,'suid'))
die('Sie haben keine Berechtigung für diese Seite');
// Parameter
$firma_id_geloescht = (isset($_REQUEST['firma_id_geloescht'])?$_REQUEST['firma_id_geloescht']:'');
if (empty($firma_id_geloescht))
exit('Es fehlt welche Firma gel&ouml;scht werden soll !');
$firma_id_bleibt = (isset($_REQUEST['firma_id_bleibt'])?$_REQUEST['firma_id_bleibt']:'');
if (empty($firma_id_bleibt))
exit('Es fehlt welche Firma bleibt !');
if ($firma_id_geloescht==$firma_id_bleibt)
exit('Zusammenlegen nicht m&ouml;glich ! Firmendaten sind gleich ');
$work = (isset($_REQUEST['work'])?$_REQUEST['work']:'');
//----------------------------------------------------------------------------------------
// wenn Work ok (Voranzeige) PopUp Anzeige , und Ende / Funktion am Ende
//----------------------------------------------------------------------------------------
if (empty($work) )
{
if (!$standort=getFirmaUndStandorte($firma_id_geloescht,$firma_id_bleibt))
exit("Fehler beim Ermitteln der Daten! Firma $firma_id_geloescht die geloescht werden soll, und Firma $firma_id_bleibt die bleibt.");
$geloescht=$standort['geloescht'];
$bleibt=$standort['bleibt'];
if (empty($work) )
{
if (!$standort=getFirmaUndStandorte($firma_id_geloescht,$firma_id_bleibt))
exit("Fehler beim Ermitteln der Daten! Firma $firma_id_geloescht die geloescht werden soll, und Firma $firma_id_bleibt die bleibt.");
$geloescht=$standort['geloescht'];
$bleibt=$standort['bleibt'];
}
}
?>
<html>
<head>
<title>Firmen zusammenlegen</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<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>
<script src="../../include/js/jquery.js" type="text/javascript"></script>
<script src="../../include/js/jquery-ui.js" type="text/javascript"></script>
<script type="text/javascript" language="JavaScript1.2">
function show_firma_bleibt(work)
{
<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>
<script src="../../include/js/jquery.js" type="text/javascript"></script>
<script src="../../include/js/jquery-ui.js" type="text/javascript"></script>
<script type="text/javascript" language="JavaScript1.2">
function show_firma_bleibt(work)
var wohin='detailInfoAnzeigeZusammenlegen';
$("div#detailInfoZusammenlegen").show("slow"); // div# langsam oeffnen
$("div#"+wohin).html('<img src="../../skin/images/spinner.gif" alt="warten" title="warten" >');
var formdata = $('form#firmaform').serialize();
$.ajax
(
{
var wohin='detailInfoAnzeigeZusammenlegen';
$("div#detailInfoZusammenlegen").show("slow"); // div# langsam oeffnen
$("div#"+wohin).html('<img src="../../skin/images/spinner.gif" alt="warten" title="warten" >');
var formdata = $('form#firmaform').serialize();
//alert(formdata);
$.ajax
(
{
type: "POST", timeout: 3500,
dataType: 'html',
url: 'firma_zusammen_details.php',
data: formdata+'&work='+work,
error: function()
{
$("div#"+wohin).html("error ");
return;
},
success: function(phpData)
{
$("div#"+wohin).html(phpData);
}
}
);
// if (work=='save')
// {
// $('input[@type=checkbox]:checked').each(function()
// {
// $(this).parent().parent().css('background-color','#C0C0C0');
// });
// }
return;
type: "POST", timeout: 3500,
dataType: 'html',
url: 'firma_zusammen_details.php',
data: formdata+'&work='+work,
error: function()
{
$("div#"+wohin).html("error ");
return;
},
success: function(phpData)
{
$("div#"+wohin).html(phpData);
}
}
);
// if (work=='save')
// {
// $('input[@type=checkbox]:checked').each(function()
// {
// $(this).parent().parent().css('background-color','#C0C0C0');
// });
// }
return;
}
// $(function()
// {
// $("#detailInfoZusammenlegen").resizable();
// });
-->
</script>
<style type="text/css">
<!--
div.detailInfoZusammenlegen {width:90%;display:none;padding: 5px 5px 5px 5px;border: 1px solid Black;empty-cells : hide;text-align:center;vertical-align: top;z-index: 99;background-color: white; position:absolute;}
div.detailInfoCloseZusammenlegen {border: 7px outset #008381;padding: 0px 10px 0px 10px;}
div.detailInfoAnzeigeZusammenlegen {font-size:medium;text-align:left;background-color: #F5F5F5;padding: 15px 15px 15px 15px;}
/*function my_array_unique($old)
{
$new = array();
foreach( $old AS $key => $val )
{
if(in_array($val, $new) === false)
{
$new[$key] = $val;
}
}
return $new;
}*/
-->
</style>
</script>
<style type="text/css">
<!--
div.detailInfoZusammenlegen {width:90%;display:none;padding: 5px 5px 5px 5px;border: 1px solid Black;empty-cells : hide;text-align:center;vertical-align: top;z-index: 99;background-color: white; position:absolute;}
div.detailInfoCloseZusammenlegen {border: 7px outset #008381;padding: 0px 10px 0px 10px;}
div.detailInfoAnzeigeZusammenlegen {font-size:medium;text-align:left;background-color: #F5F5F5;padding: 15px 15px 15px 15px;}
-->
</style>
</head>
<body>
@@ -154,7 +169,7 @@
<input type="button" name="Voranzeigen" value="voranzeigen zusammenlegen" onclick="show_firma_bleibt('ok');">
<input type="button" name="Zusammenlegen" value="start zusammenlegen" onclick="show_firma_bleibt('save');">
<div id="detailInfoZusammenlegen" class="detailInfoZusammenlegen">
<div style="text-align:right;color:#000;cursor:hand;" onclick="document.getElementById('detailInfoZusammenlegen').style.display = 'none';">
<div style="text-align:right;color:#000; cursor: pointer; cursor: hand;" onclick="document.getElementById('detailInfoZusammenlegen').style.display = 'none';">
<b id="detailInfoCloseZusammenlegen">schliessen <img border="0" src="../../skin/images/cross.png" title="schliessen">&nbsp;</b></div>
<br>
<div id="detailInfoAnzeigeZusammenlegen" class="detailInfoAnzeigeZusammenlegen">&nbsp;</div>
@@ -174,10 +189,10 @@
<!-- TEIL LINKS das wird geloescht -->
<td width="50%" valign="top">
<fieldset>
<legend><?php echo $geloescht->firma_id.' '.$geloescht->firmentyp_kurzbz.' '.$geloescht->name ;?> wird gel&ouml;scht</legend>
<fieldset>
<legend>Standorte</legend>
<fieldset style="background-color:#ff978f;">
<legend style="background-color:#ff978f;"><?php echo $geloescht->firma_id.' '.$geloescht->firmentyp_kurzbz.' '.$geloescht->name ;?> wird gel&ouml;scht</legend>
<fieldset style="background-color:#ffeac9;">
<legend style="background-color:#ffeac9;">Standorte</legend>
<table>
<?php
if ($geloescht->standorte)
@@ -185,34 +200,35 @@
foreach ($geloescht->standorte as $standort)
{
echo '<tr><td colspan="2"><fieldset><legend>'.$standort->standort_id.' '.$standort->bezeichnung.'</legend><table>';
echo '<tr><td><input checked class="checkbox" value="'.$standort->standort_id.'" id="standort" name="standort[]" type="checkbox" ></td><td>'.$standort->bezeichnung.'</td></tr>';
echo '<tr><td colspan="2"><fieldset><legend>Adressen zu '.$standort->kurzbz.'</legend><table>';
if ($standort->adresse)
{
echo '<tr><td valign="top">'.$standort->adresse->strasse.'<br>'.$standort->adresse->plz.' '.$standort->adresse->ort.'</td></tr>';
}
echo '</table></fieldset></td></tr>';
echo '<tr><td colspan="2"><fieldset style="background-color:#ffdab9;"><legend style="background-color:#ffdab9;">'.$standort->standort_id.' '.($standort->bezeichnung==NULL?$standort->kurzbz:$standort->bezeichnung).'</legend><table>';
echo '<tr><td><input checked class="checkbox" value="'.$standort->standort_id.'" id="standort" name="standort[]" type="checkbox" ></td><td>'.(($standort->bezeichnung==NULL||$standort->bezeichnung=="")?$standort->kurzbz:$standort->bezeichnung).'</td></tr>';
echo '<tr><td colspan="2"><fieldset style="background-color:#ffe4e1;"><legend style="background-color:#ffe4e1;">Adressen zu '.$standort->kurzbz.'</legend><table>';
if ($standort->adresse)
{
echo '<tr><td valign="top">'.$standort->adresse->strasse.'<br>'.$standort->adresse->plz.' '.$standort->adresse->ort.'</td></tr>';
}
echo '</table></fieldset></td></tr>';
echo '<tr><td colspan="2"><fieldset><legend>Direktekontakte zu '.$standort->kurzbz.'</legend><table>';
if ($standort->kontakt->result)
{
foreach ($standort->kontakt->result as $kontakt)
{
echo '<tr><td valign="top"><input checked title="'.$kontakt->kontakt_id.'" value="'.$kontakt->kontakt_id.'" id="kontakt_'.$kontakt->kontakt_id.'" name="kontakt['.$standort->standort_id.'][]" type="Checkbox" ></td><td valign="top">'.$kontakt->kontakttyp.' '.$kontakt->kontakt.'<br>'.$kontakt->anmerkung.'</td></tr>';
}
}
echo '</table></fieldset></td></tr>';
echo '<tr><td colspan="2"><fieldset><legend>Personenkontakte zu '.$standort->kurzbz.'</legend><table>';
if ($standort->personfunktion->result)
{
foreach ($standort->personfunktion->result as $personfunktion)
{
echo '<tr><td valign="top"><input checked value="'.$personfunktion->personfunktionstandort_id.'" id="personfunktionstandort_'.$personfunktion->personfunktionstandort_id.'" name="personfunktionstandort['.$standort->standort_id.'][]" type="Checkbox" ></td><td valign="top">'.$personfunktion->funktion_kurzbz.'<br>'.$personfunktion->position.'<br>'.$personfunktion->anrede.'</td></tr>';
}
}
echo '</table></fieldset></td></tr>';
echo '<tr><td colspan="2"><fieldset style="background-color:#ffe4e1;"><legend style="background-color:#ffe4e1;">Direktekontakte zu '.$standort->kurzbz.'</legend><table>';
//if ($standort->kontakt->result)
if ($standort->kontakt)
{
foreach ($standort->kontakt->result as $kontakt)
{
echo '<tr><td valign="top"><input checked title="'.$kontakt->kontakt_id.'" value="'.$kontakt->kontakt_id.'" id="kontakt_'.$kontakt->kontakt_id.'" name="kontakt['.$standort->standort_id.'][]" type="Checkbox" ></td><td valign="top">'.$kontakt->kontakttyp.' '.$kontakt->kontakt.'<br>'.$kontakt->anmerkung.'</td></tr>';
}
}
echo '</table></fieldset></td></tr>';
echo '<tr><td colspan="2"><fieldset style="background-color:#ffe4e1;"><legend style="background-color:#ffe4e1;">Personenkontakte zu '.$standort->kurzbz.'</legend><table>';
if ($standort->personfunktion->result)
{
foreach ($standort->personfunktion->result as $personfunktion)
{
echo '<tr><td valign="top"><input checked value="'.$personfunktion->personfunktionstandort_id.'" id="personfunktionstandort_'.$personfunktion->personfunktionstandort_id.'" name="personfunktionstandort['.$standort->standort_id.'][]" type="Checkbox" ></td><td valign="top">'.$personfunktion->funktion_kurzbz.'<br>'.$personfunktion->position.'<br>'.$personfunktion->anrede.'</td></tr>';
}
}
echo '</table></fieldset></td></tr>';
echo '</table></fieldset></td></tr>';
@@ -225,39 +241,43 @@
</fieldset>
</fieldset>
<fieldset>
<legend>Organisation</legend>
<fieldset style="background-color:#ff978f;">
<legend style="background-color:#ff978f;">Organisation</legend>
<table>
<?php
if ($geloescht->firmaorganisationseinheit)
{
foreach ($geloescht->firmaorganisationseinheit as $firmaorganisationseinheit)
{
echo '<tr><td><input checked="checked" value="'.$firmaorganisationseinheit->firma_organisationseinheit_id.'" id="firmaorganisationseinheit" name="firmaorganisationseinheit[]" type="Checkbox" ></td><td>'.$firmaorganisationseinheit->bezeichnung.'</td></tr>';
//var_dump($firmaorganisationseinheit);
echo '<tr><td><input checked="checked" value="'.$firmaorganisationseinheit->firma_organisationseinheit_id.'" id="firmaorganisationseinheit" name="firmaorganisationseinheit[]" type="Checkbox" ></td><td>'.$firmaorganisationseinheit->bezeichnung.'</td></tr>';
echo '<tr><td></td><td>'.$firmaorganisationseinheit->fobezeichnung.'</td></tr>';
echo '<tr><td></td><td>KNr.: '.$firmaorganisationseinheit->kundennummer.'</td></tr>';
}
}
?>
?>
<tr><td>&nbsp;</td></tr>
</table>
</fieldset>
</td>
<!-- TEIL RECHTS das blebt -->
<!-- TEIL RECHTS das bleibt -->
<td width="50%" valign="top">
<fieldset>
<legend><?php echo $bleibt->firma_id.' '.$bleibt->firmentyp_kurzbz.' '.$bleibt->name ;?> bleibt</legend>
<fieldset style="background-color:#B6ffAf;">
<legend style="background-color:#B6ffAf;"><?php echo $bleibt->firma_id.' '.$bleibt->firmentyp_kurzbz.' '.$bleibt->name ;?> bleibt</legend>
<fieldset>
<legend>Standorte</legend>
<fieldset style="background-color:#c9ffd0;">
<legend style="background-color:#c9ffd0;">Standorte</legend>
<table>
<?php
if ($bleibt->standorte)
{
foreach ($bleibt->standorte as $standort)
{
echo '<tr><td colspan="2"><fieldset><legend>'.$standort->standort_id.' '.$standort->bezeichnung.'</legend><table>';
echo '<tr><td colspan="2"><fieldset style="background-color:#c3ffb9;"><legend style="background-color:#c3ffb9;">'.$standort->standort_id.' '.$standort->bezeichnung.'</legend><table>';
echo '<tr><td><input checked="checked" value="'.$standort->standort_id.'" id="standort" name="standort[]" type="Checkbox" ></td><td>'.$standort->bezeichnung.'</td></tr>';
echo '<tr><td colspan="2"><fieldset><legend>Adressen zu '.$standort->kurzbz.'</legend><table>';
echo '<tr><td colspan="2"><fieldset style="background-color:#e3ffe1;"><legend style="background-color:#e3ffe1;">Adressen zu '.$standort->kurzbz.'</legend><table>';
if ($standort->adresse)
{
echo '<tr><td valign="top">'.$standort->adresse->strasse.'<br>'.$standort->adresse->plz.' '.$standort->adresse->ort.'</td></tr>';
@@ -265,8 +285,9 @@
echo '</table></fieldset></td></tr>';
echo '<tr><td colspan="2"><fieldset><legend>Direktekontakte zu '.$standort->kurzbz.'</legend><table>';
if ($standort->kontakt->result)
echo '<tr><td colspan="2"><fieldset style="background-color:#e3ffe1;"><legend style="background-color:#e3ffe1;">Direktekontakte zu '.$standort->kurzbz.'</legend><table>';
//if ($standort->kontakt->result)
if ($standort->kontakt)
{
foreach ($standort->kontakt->result as $kontakt)
{
@@ -278,12 +299,13 @@
echo '</table></fieldset></td></tr>';
echo '<tr><td colspan="2"><fieldset><legend>Personenkontakte zu '.$standort->kurzbz.'</legend><table>';
echo '<tr><td colspan="2"><fieldset style="background-color:#e3ffe1;"><legend style="background-color:#e3ffe1;">Personenkontakte zu '.$standort->kurzbz.'</legend><table>';
if ($standort->personfunktion->result)
{
{
//var_dump($standort->personfunktion);
foreach ($standort->personfunktion->result as $personfunktion)
{
echo '<tr><td valign="top"><input checked="checked" value="'.$personfunktion->personfunktionstandort_id.'" id="personfunktionstandort_'.$personfunktion->personfunktionstandort_id.'" name="personfunktionstandort['.$standort->standort_id.'][]" type="Checkbox" ></td><td valign="top">'.$personfunktion->funktion_kurzbz.'<br>'.$personfunktion->position.'<br>'.$personfunktion->anrede.'</td></tr>';
echo '<tr><td valign="top"><input checked="checked" value="'.$personfunktion->personfunktionstandort_id.'" id="personfunktionstandort_'.$personfunktion->personfunktionstandort_id.'" name="personfunktionstandort['.$standort->standort_id.'][]" type="Checkbox" ></td><td valign="top">'.$personfunktion->funktion_kurzbz.'<br>'.$personfunktion->position.'<br>Anrede: '.$personfunktion->anrede.'<br>'.trim($personfunktion->titelpre.' '.$personfunktion->vorname.' '.$personfunktion->nachname.' '.$personfunktion->titelpost).'</td></tr>';
}
}
echo '</table></fieldset></td></tr>';
@@ -298,8 +320,8 @@
</fieldset>
</fieldset>
<fieldset>
<legend>Organisation</legend>
<fieldset style="background-color:#B6ffAf;">
<legend style="background-color:#B6ffAf;">Organisation</legend>
<table>
<?php
if ($bleibt->firmaorganisationseinheit)
@@ -307,6 +329,8 @@
foreach ($bleibt->firmaorganisationseinheit as $firmaorganisationseinheit)
{
echo '<tr><td><input checked="checked" value="'.$firmaorganisationseinheit->firma_organisationseinheit_id.'" id="firmaorganisationseinheit" name="firmaorganisationseinheit[]" type="Checkbox" ></td><td>'.$firmaorganisationseinheit->bezeichnung.'</td></tr>';
echo '<tr><td></td><td>'.$firmaorganisationseinheit->fobezeichnung.'</td></tr>';
echo '<tr><td></td><td>KNr.: '.$firmaorganisationseinheit->kundennummer.'</td></tr>';
}
}
?>
@@ -335,6 +359,24 @@
$personfunktionstandort = (isset($firmendaten['personfunktionstandort'])?$firmendaten['personfunktionstandort']:array());
$firmaorganisationseinheit = (isset($firmendaten['firmaorganisationseinheit'])?$firmendaten['firmaorganisationseinheit']:array());
//Überprüfung auf doppelte Organisationseinheiten
$firmaorganisationseinheit_check=array();
for ($i=0;$i<count($firmaorganisationseinheit);$i++)
{
$firmaorganisationseinheit_obj->result[$i] = new firma();
if($firmaorganisationseinheit_obj->result[$i]->load_firmaorganisationseinheit($firmaorganisationseinheit[$i]))
{
if (isset($firmaorganisationseinheit_obj->result[$i]))
{
if(array_key_exists($firmaorganisationseinheit_obj->result[$i]->oe_kurzbz,$firmaorganisationseinheit_check))
{
exit("<b style='color:red'>Es wurden Zuordnungen von Organisationseiheiten mehrfach ausgewählt!<br>Bitte Auswahl korrigieren.</b>");
}
$firmaorganisationseinheit_check[$firmaorganisationseinheit_obj->result[$i]->oe_kurzbz]=$firmaorganisationseinheit[$i];
}
}
}
if (is_array($standort) && count($standort))
{
// Array mit Standort als Key fuer Kontrolle der Adressen ob der Standort noch gueltig ist oder neu zugeordnet wird
@@ -395,23 +437,33 @@
{
// Array mit Standort als Key fuer Kontrolle der Adressen ob der Standort noch gueltig ist oder neu zugeordnet wird
$firmaorganisationseinheit_check=array();
$firmaorganisationseinheit_ok=array();
for ($i=0;$i<count($firmaorganisationseinheit);$i++)
{
$firmaorganisationseinheit_obj = new firma();
$firmaorganisationseinheit_check=array();
$firmaorganisationseinheit_ok=array();
if($firmaorganisationseinheit_obj->load_firmaorganisationseinheit('','',$firmaorganisationseinheit[$i]))
$firmaorganisationseinheit_obj->result[$i] = new firma();
if($firmaorganisationseinheit_obj->result[$i]->load_firmaorganisationseinheit($firmaorganisationseinheit[$i]))
{
if (isset($firmaorganisationseinheit_obj->result[0]))
$firmaorganisationseinheit_check[$firmaorganisationseinheit_obj->result[0]->oe_kurzbz]=$firmaorganisationseinheit[$i];
if (isset($firmaorganisationseinheit_obj->result[$i]))
{
if(!array_key_exists($firmaorganisationseinheit_obj->result[$i]->oe_kurzbz,$firmaorganisationseinheit_check))
{
$firmaorganisationseinheit_check[$firmaorganisationseinheit_obj->result[$i]->oe_kurzbz]=$firmaorganisationseinheit[$i];
//echo $firmaorganisationseinheit_obj->result[$i]->oe_kurzbz." ".$firmaorganisationseinheit_check[$firmaorganisationseinheit_obj->result[$i]->oe_kurzbz]."<br>";
}
}
}
else
echo "<br>".$firmaorganisationseinheit_obj->errormsg;
echo "<br>".$firmaorganisationseinheit_obj->errormsg;
}
//var_dump($firmaorganisationseinheit_check);
foreach ($firmaorganisationseinheit_check as $key => $val)
{
$firmaorganisationseinheit_ok[]=$val;
}
$firmaorganisationseinheit=$firmaorganisationseinheit_ok;
$firmaorganisationseinheit_ok=null;
$firmaorganisationseinheit_check=null;
@@ -419,14 +471,14 @@
$firma = new firma();
if(!$firma->load($firma_id_bleibt))
exit('Welche Firma bleibt fehler :'.$firma->errormsg);
exit('Welche Firma bleibt Fehler :'.$firma->errormsg);
?>
<fieldset>
<legend>Informationen nach der Zusammenlegung</legend>
<legend>Informationen nach der Zusammenlegung </legend>
<fieldset>
<legend>Firma <?php echo $firma->firma_id; ?></legend>
<legend>Firma <?php echo $firma->firma_id; ?> </legend>
<?php
echo '<table>';
echo '<tr><td>'.$firma->firmentyp_kurzbz.' '.$firma->name
@@ -456,7 +508,7 @@
{
?>
<fieldset>
<legend>Standort <?php echo $key .' der Firma '. $firma->name; ?></legend>
<legend>Standort <?php echo $key .' der Firma '. $firma->name; ?> </legend>
<?php
$standort_obj = new standort();
$standort_obj->result=array();
@@ -468,7 +520,7 @@
// Kontakt zum Standort
if (!isset($kontakt[$key]) || !is_array($kontakt[$key]) || !count($kontakt[$key]))
{
echo '<font color="red">Keinen Kontakte zum Standort !</font><br>';
echo '<font color="red">Keine Kontakte zum Standort !</font><br>';
}
else
{
@@ -477,7 +529,7 @@
// Kontakte zum Standort
$kontakt_obj = new kontakt();
if($kontakt_obj->load($vals))
echo 'Kontakt '
echo '<b>Kontakt</b> '
."&nbsp;Zustellung:<input disabled ".($kontakt_obj->zustellung?' style="background-color: #E3FDEE;" ':' style="background-color: #FFF4F4;" ')." type='checkbox' name='schule' ".($kontakt_obj->zustellung?'checked':'').">&nbsp;"
. $vals.' '.$kontakt_obj->kontakttyp.' '.$kontakt_obj->kontakt
.'&nbsp;'.$kontakt_obj->beschreibung
@@ -490,20 +542,25 @@
// Personfunktionstandort zum Standort
if (!isset($personfunktionstandort[$key]) || !is_array($personfunktionstandort[$key]) || !count($personfunktionstandort[$key]))
{
echo '<font color="red">Keinen Personen mit Funktionen zum Standort !</font><br>';
echo '<font color="red">Keine Personen mit Funktionen zum Standort !</font><br>';
}
else
{
foreach ($personfunktionstandort[$key] as $keys => $vals)
{
// Personfunktion zum Standort
$personfunktion_obj = new person();
if($personfunktion_obj->load_personfunktion('','','','',$vals))
echo 'Personen und Funktion '
. $vals.' '.$personfunktion_obj->funktion_kurzbz.' '.$personfunktion_obj->position.' '.$personfunktion_obj->anrede
.'<br>';
else
echo $personfunktion_obj->errormsg.'<br>';
// Personfunktion zum Standort
$personfunktion_obj = new person();
if($personfunktion_obj->load_personfunktion('','','','',$vals))
{
//var_dump($personfunktion_obj);
echo '<b>Personen und Funktion</b> '
. $vals.' '.$personfunktion_obj->result[0]->funktion_kurzbz.' '.$personfunktion_obj->result[0]->position.' '.$personfunktion_obj->result[0]->anrede.'<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'.trim($personfunktion_obj->result[0]->titelpre.' '.$personfunktion_obj->result[0]->vorname.' '.$personfunktion_obj->result[0]->nachname.' '.$personfunktion_obj->result[0]->titelpost)
.'<br>';
}
else
{
echo $personfunktion_obj->errormsg.'<br>';
}
}
}
?>
@@ -514,29 +571,33 @@
<?php } ?>
<fieldset>
<legend>Organisationseinheit zur Firma <?php $firma->name; ?></legend>
<?php
<legend>Organisationseinheit zur Firma <?php echo $firma->name; ?> </legend>
<?php
if (isset($firmaorganisationseinheit) && is_array($firmaorganisationseinheit) && count($firmaorganisationseinheit) )
{
$i=0;
foreach ($firmaorganisationseinheit as $key => $val)
{
$firmaorganisationseinheit_obj = new firma();
$firmaorganisationseinheit_obj->result[$i] = new firma();
$bleibt->firmaorganisationseinheit=array();
if(!$firmaorganisationseinheit_obj->load_firmaorganisationseinheit('','',$val))
if(!$firmaorganisationseinheit_obj->result[$i]->load_firmaorganisationseinheit($val))
{
echo $firmaorganisationseinheit_obj->errormsg.'<br>';
}
else if ($firmaorganisationseinheit_obj->result)
else if ($firmaorganisationseinheit_obj->result[$i])
{
foreach ($firmaorganisationseinheit_obj->result as $keys => $vals)
echo $vals->firma_organisationseinheit_id.' '.$vals->name.', '. $vals->organisationseinheittyp_kurzbz.' '.$vals->bezeichnung.'<br>';
}
//var_dump($firmaorganisationseinheit_obj->result[$i]);
echo $firmaorganisationseinheit_obj->result[$i]->firma_organisationseinheit_id.' <b>'.$firmaorganisationseinheit_obj->result[$i]->oe_kurzbz.'</b><br>'.$firmaorganisationseinheit_obj->result[$i]->bezeichnung.', KNr.: '.$firmaorganisationseinheit_obj->result[$i]->kundennummer.'<br>';
}
$i++;
}
}
else
{
echo '<font color="red">Keine Organisationseinheit zur Firma !</font><br>';
}
}
?>
</fieldset>
@@ -565,6 +626,25 @@
$personfunktionstandort = (isset($firmendaten['personfunktionstandort'])?$firmendaten['personfunktionstandort']:array());
$firmaorganisationseinheit = (isset($firmendaten['firmaorganisationseinheit'])?$firmendaten['firmaorganisationseinheit']:array());
//Überprüfung auf doppelte Organisationseinheiten
$firmaorganisationseinheit_check=array();
for ($i=0;$i<count($firmaorganisationseinheit);$i++)
{
$firmaorganisationseinheit_obj->result[$i] = new firma();
if($firmaorganisationseinheit_obj->result[$i]->load_firmaorganisationseinheit($firmaorganisationseinheit[$i]))
{
if (isset($firmaorganisationseinheit_obj->result[$i]))
{
if(array_key_exists($firmaorganisationseinheit_obj->result[$i]->oe_kurzbz,$firmaorganisationseinheit_check))
{
exit("<b style='color:red'>Es wurden Zuordnungen von Organisationseiheiten mehrfach ausgewählt!<br>Bitte Auswahl korrigieren.</b>");
}
$firmaorganisationseinheit_check[$firmaorganisationseinheit_obj->result[$i]->oe_kurzbz]=$firmaorganisationseinheit[$i];
}
}
}
// Ermitteln der Standorte zu den Firmen - geloescht und bleibt. Wichtiger Teil zum ermitteln welche Standorte entfernt werden sollen
$standorte_vorhanden=array();
$standort_obj = new standort();
@@ -723,7 +803,7 @@
foreach ($firmaorganisationseinheit as $key => $firma_organisationseinheit_id)
{
$firmaorganisationseinheit_obj = new firma();
if(!$firmaorganisationseinheit_obj->load_firmaorganisationseinheit('','',$firma_organisationseinheit_id))
if(!$firmaorganisationseinheit_obj->load_firmaorganisationseinheit($firma_organisationseinheit_id))
{
echo 'Firma - Organisationseinheit: '.$firmaorganisationseinheit_obj->errormsg.'<br>';
}
@@ -760,7 +840,7 @@
$firmaorganisationseinheit_check[$vals]=$vals;
$firmaorganisationseinheit_obj = new firma();
if($firmaorganisationseinheit_obj->load_firmaorganisationseinheit($firma_id_bleibt))
if($firmaorganisationseinheit_obj->get_firmaorganisationseinheit($firma_id_bleibt))
{
if (is_array($firmaorganisationseinheit_obj->result) && count($firmaorganisationseinheit_obj->result) )
{
@@ -800,115 +880,117 @@
function getFirmaUndStandorte($firma_id_geloescht,$firma_id_bleibt)
{
//----------------------------------------------------------------------------------------
// zwei Teileanzeigen a) wird geloescht b) bleibt
//----------------------------------------------------------------------------------------
//----------------------------------------------------------------------------------------
// zwei Teileanzeigen a) wird geloescht b) bleibt
//----------------------------------------------------------------------------------------
// -------------------------------------------------------------------------
// Firmenstammdaten holen
// -------------------------------------------------------------------------
$firma = new firma();
if(!$firma->load($firma_id_geloescht))
exit('Firma wird gel&ouml;scht fehler :'.$firma->errormsg);
$geloescht=$firma;
$firma = new firma();
if(!$firma->load($firma_id_bleibt))
exit('Welche Firma bleibt fehler :'.$firma->errormsg);
$bleibt=$firma;
// -------------------------------------------------------------------------
// Standorte je Firmenstammdaten holen
// -------------------------------------------------------------------------
// - wird geloescht
$standort_obj = new standort();
$standort_obj->result=array();
$standort_obj->load_firma($geloescht->firma_id);
$geloescht->standorte=array();
if ($standort_obj->result)
{
$geloescht->standorte=$standort_obj->result;
for ($i=0;$i<count($geloescht->standorte);$i++)
// -------------------------------------------------------------------------
// Firmenstammdaten holen
// -------------------------------------------------------------------------
$firma = new firma();
if(!$firma->load($firma_id_geloescht))
exit('Firma wird gel&ouml;scht Fehler :'.$firma->errormsg);
$geloescht=$firma;
$firma = new firma();
if(!$firma->load($firma_id_bleibt))
exit('Welche Firma bleibt Fehler :'.$firma->errormsg);
$bleibt=$firma;
// -------------------------------------------------------------------------
// Standorte je Firmenstammdaten holen
// -------------------------------------------------------------------------
// - wird geloescht
$standort_obj = new standort();
$standort_obj->result=array();
$standort_obj->load_firma($geloescht->firma_id);
$geloescht->standorte=array();
if ($standort_obj->result)
{
// Adresse zum Standort
$adresse_obj = new adresse();
$geloescht->standorte[$i]->adresse=array();
if($geloescht->standorte[$i]->adresse_id && $adresse_obj->load($geloescht->standorte[$i]->adresse_id))
$geloescht->standorte=$standort_obj->result;
for ($i=0;$i<count($geloescht->standorte);$i++)
{
$geloescht->standorte[$i]->adresse=$adresse_obj;
}
// Kontakte zum Standort
$kontakt_obj = new kontakt();
$geloescht->standorte[$i]->kontakt=array();
if($geloescht->standorte[$i]->standort_id && $kontakt_obj->load_standort($geloescht->standorte[$i]->standort_id))
{
$geloescht->standorte[$i]->kontakt=$kontakt_obj;
}
// Personen zum Standort
$personfunktion_obj = new person();
$geloescht->personen[$i]->personfunktion=array();
if($geloescht->standorte[$i]->standort_id && $personfunktion_obj->load_personfunktion($geloescht->standorte[$i]->standort_id,'',$geloescht->firma_id))
{
$geloescht->standorte[$i]->personfunktion=$personfunktion_obj;
}
}
}
$firmaorganisationseinheit_obj = new firma();
$geloescht->firmaorganisationseinheit=array();
if(!$firmaorganisationseinheit_obj->load_firmaorganisationseinheit($geloescht->firma_id))
$geloescht->firmaorganisationseinheit=array();
if ($firmaorganisationseinheit_obj->result)
{
$geloescht->firmaorganisationseinheit=$firmaorganisationseinheit_obj->result;
}
// Adresse zum Standort
$adresse_obj = new adresse();
$geloescht->standorte[$i]->adresse=array();
if($geloescht->standorte[$i]->adresse_id && $adresse_obj->load($geloescht->standorte[$i]->adresse_id))
{
$geloescht->standorte[$i]->adresse=$adresse_obj;
}
// Kontakte zum Standort
$kontakt_obj = new kontakt();
$geloescht->standorte[$i]->kontakt=array();
if($geloescht->standorte[$i]->standort_id && $kontakt_obj->load_standort($geloescht->standorte[$i]->standort_id))
{
$geloescht->standorte[$i]->kontakt=$kontakt_obj;
}
// Personen zum Standort
$personfunktion_obj = new person();
$geloescht->personen[$i]->personfunktion=array();
if($geloescht->standorte[$i]->standort_id && $personfunktion_obj->load_personfunktion($geloescht->standorte[$i]->standort_id,'',$geloescht->firma_id))
{
$geloescht->standorte[$i]->personfunktion=$personfunktion_obj;
}
}
}
// - bleibt
$standort_obj = new standort();
$standort_obj->result=array();
$standort_obj->load_firma($bleibt->firma_id);
$bleibt->standorte=array();
if ($standort_obj->result)
{
$bleibt->standorte=$standort_obj->result;
for ($i=0;$i<count($bleibt->standorte);$i++)
$firmaorganisationseinheit_obj = new firma();
$geloescht->firmaorganisationseinheit=array();
if(!$firmaorganisationseinheit_obj->get_firmaorganisationseinheit($geloescht->firma_id))
{
// Adresse zum Standort
$adresse_obj = new adresse();
$bleibt->standorte[$i]->adresse=array();
if($bleibt->standorte[$i]->adresse_id && $adresse_obj->load($bleibt->standorte[$i]->adresse_id))
{
$bleibt->standorte[$i]->adresse=$adresse_obj;
}
// Kontakte zum Standort
$kontakt_obj = new kontakt();
$bleibt->standorte[$i]->kontakt=array();
if($bleibt->standorte[$i]->standort_id && $kontakt_obj->load_standort($bleibt->standorte[$i]->standort_id))
{
$bleibt->standorte[$i]->kontakt=$kontakt_obj;
}
$geloescht->firmaorganisationseinheit=array();
}
if ($firmaorganisationseinheit_obj->result)
{
$geloescht->firmaorganisationseinheit=$firmaorganisationseinheit_obj->result;
}
// Personen zum Standort
$personfunktion_obj = new person();
$bleibt->personen[$i]->personfunktion=array();
if($bleibt->standorte[$i]->standort_id && $personfunktion_obj->load_personfunktion($bleibt->standorte[$i]->standort_id,'',$bleibt->firma_id))
// - bleibt
$standort_obj = new standort();
$standort_obj->result=array();
$standort_obj->load_firma($bleibt->firma_id);
$bleibt->standorte=array();
if ($standort_obj->result)
{
$bleibt->standorte=$standort_obj->result;
for ($i=0;$i<count($bleibt->standorte);$i++)
{
$bleibt->standorte[$i]->personfunktion=$personfunktion_obj;
}
}
}
$firmaorganisationseinheit_obj = new firma();
$bleibt->firmaorganisationseinheit=array();
if(!$firmaorganisationseinheit_obj->load_firmaorganisationseinheit($bleibt->firma_id))
// Adresse zum Standort
$adresse_obj = new adresse();
$bleibt->standorte[$i]->adresse=array();
if($bleibt->standorte[$i]->adresse_id && $adresse_obj->load($bleibt->standorte[$i]->adresse_id))
{
$bleibt->standorte[$i]->adresse=$adresse_obj;
}
// Kontakte zum Standort
$kontakt_obj = new kontakt();
$bleibt->standorte[$i]->kontakt=array();
if($bleibt->standorte[$i]->standort_id && $kontakt_obj->load_standort($bleibt->standorte[$i]->standort_id))
{
$bleibt->standorte[$i]->kontakt=$kontakt_obj;
}
// Personen zum Standort
$personfunktion_obj = new person();
$bleibt->personen[$i]->personfunktion=array();
if($bleibt->standorte[$i]->standort_id && $personfunktion_obj->load_personfunktion($bleibt->standorte[$i]->standort_id,'',$bleibt->firma_id))
{
$bleibt->standorte[$i]->personfunktion=$personfunktion_obj;
}
}
}
$firmaorganisationseinheit_obj = new firma();
$bleibt->firmaorganisationseinheit=array();
if ($firmaorganisationseinheit_obj->result)
{
$bleibt->firmaorganisationseinheit=$firmaorganisationseinheit_obj->result;
}
return $standort=array("geloescht"=>$geloescht,"bleibt"=>$bleibt);
}
if(!$firmaorganisationseinheit_obj->get_firmaorganisationseinheit($bleibt->firma_id))
$bleibt->firmaorganisationseinheit=array();
if ($firmaorganisationseinheit_obj->result)
{
$bleibt->firmaorganisationseinheit=$firmaorganisationseinheit_obj->result;
}
//var_dump($geloescht);
return $standort=array("geloescht"=>$geloescht,"bleibt"=>$bleibt);
}
?>
@@ -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 >
*/
require_once('../../config/vilesci.config.inc.php');
@@ -73,7 +73,24 @@
<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.js" type="text/javascript"></script>
<script src="../../include/js/jquery.autocomplete.min.js" type="text/javascript"></script>
<script src="../../include/js/jquery.autocomplete.min.js" type="text/javascript"></script>
<style type="text/css">
<!--
/* define the table content to be scrollable */
/* set TBODY element to have block level attributes. All other non-IE browsers */
/* this enables overflow to work on TBODY element. All other non-IE, non-Mozilla browsers */
/* induced side effect is that child TDs no longer accept width: auto */
html>body tbody.scrollContent
{
display: block;
height: 500px;
overflow: auto;
width: 100%
}
-->
</style>
<script type="text/javascript" language="JavaScript1.2">
<!--
function set_firmen_search_rechts(wohin,filter,firmentypkurzbz)
@@ -131,8 +148,8 @@
var output = '';
output += '<table cellpadding="1" cellspacing="1">';
output += '<tr class="liste"><td>&nbsp;</td><td>Firma</td><td>Name</td></tr>\n';
output += '<table cellpadding="1" cellspacing="1" width="100%" class="scrollTable">';
output += '<tbody class="scrollContent"><tr class="liste"><td>&nbsp;</td><td width="10%">Firma</td><td width="84%">Name</td></tr>\n';
var classen='liste1';
for (p in json)
@@ -145,9 +162,9 @@
if (json[p].oFirma_id=='')
output += '<tr class="'+classen+'"><td colspan="3">' + json[p].oName + '</td></tr>\n';
else
output += '<tr class="'+classen+'"><td><input name="firma_id_'+wohin+'" type="Radio" value="' + json[p].oFirma_id + '">&nbsp;</td><td>' + json[p].oFirma_id + '&nbsp;</td><td>' + json[p].oName + '&nbsp;</td></tr>\n';
output += '<tr class="'+classen+'"><td><input name="firma_id_'+wohin+'" type="Radio" value="' + json[p].oFirma_id + '">&nbsp;</td><td align="right">' + json[p].oFirma_id + '&nbsp;</td><td>' + json[p].oName + '&nbsp;</td></tr>\n';
}
output += '</table>';
output += '</tbody></table>';
return output;
}
@@ -236,7 +253,7 @@
<div id="info" class="info">
<div id="infodaten" class="infodaten">
<div style="text-align:right;color:#000;cursor: hand;"><b id="info_close">schliessen <img border="0" src="../../skin/images/cross.png" title="schliessen">&nbsp;</b></div>
<div style="text-align:right;color:#000; cursor: pointer; cursor: hand;"><b id="info_close">schliessen <img border="0" src="../../skin/images/cross.png" title="schliessen">&nbsp;</b></div>
<script type="text/javascript">
$(document).ready(function()
{