}
 if (!$student->load($preoutgoing->uid)) {
     die('Konnte Student nicht laden!');
 }
 $projektarbeittitel = $preoutgoing->projektarbeittitel;
 $studiengang->load($student->studiengang_kz);
 $preoutgoingFirma = new preoutgoing();
 $preoutgoingFirma->loadAuswahl($preoutgoing_id);
 $preoutgoing_firma = $preoutgoingFirma->firma_id;
 $prestudent->getLastStatus($student->prestudent_id);
 $firma = new firma();
 $nation = new nation();
 if ($preoutgoing_firma != '') {
     $standort = new standort();
     $adresse = new adresse();
     $firma->load($preoutgoing_firma);
     $standort->load_firma($firma->firma_id);
     $adresse->load($standort->adresse_id);
     $nation->load($adresse->nation);
 }
 $preoutgoingLv = new preoutgoing();
 $preoutgoingLv->loadLvs($preoutgoing_id);
 echo '<?xml version="1.0" encoding="UTF-8" standalone="yes"?> ';
 echo '<learningagreement_outgoing>';
 echo '  <outgoing>';
 echo '      <vorname><![CDATA[' . $benutzer->vorname . ']]></vorname>';
 echo '      <nachname><![CDATA[' . $benutzer->nachname . ']]></nachname>';
 echo '      <titel_pre><![CDATA[' . $benutzer->titelpre . ']]></titel_pre>';
 echo '      <titel_post><![CDATA[' . $benutzer->titelpost . ']]></titel_post>';
 echo '      <email><![CDATA[' . $benutzer->uid . '@' . DOMAIN . ']]></email>';
 echo '      <sending_institution>FH Technikum Wien</sending_institution>';
Ejemplo n.º 2
0
/**
 * 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!';
    }
}
echo "</SELECT></td>";
//Absagedatum
echo "<td>Absage</td><td><input type='checkbox' " . ($preinteressent->absagedatum != '' ? 'checked' : '') . " name='absagedatum'></td>";
echo '</tr><tr>';
//Erfassungsdatum
echo "<td>Erfassungsdatum:</td><td> <input type='text' size='10' maxlength='10' name='erfassungsdatum' value='" . $datum_obj->formatDatum($preinteressent->erfassungsdatum, 'd.m.Y') . "'> (31.12.2008)</td>";
//Infozusendung
echo "<td>Infozusendung am</td><td><input type='text' name='infozusendung' size='10' maxlength='10' value='" . $datum_obj->formatDatum($preinteressent->infozusendung, 'd.m.Y') . "'></td>";
//Maturajahr
echo "<td>Maturajahr</td><td><input type='text' name='maturajahr' size='4' maxlength='4' value='{$preinteressent->maturajahr}'></td>";
//Einverstaendnis
echo "<td>Einverst&auml;ndnis:</td><td><input type='checkbox' " . ($preinteressent->einverstaendnis ? 'checked' : '') . " name='einverstaendnis'></td>";
echo '</tr><tr>';
$schule = new firma();
if ($preinteressent->firma_id != '') {
    $schule->load($preinteressent->firma_id);
}
echo '<td>Schule ID:</td><td><input type="text" size="3" name="schule_id" id="schule_id" value="' . $preinteressent->firma_id . '" onkeyup="checkschulid(this.value)"></td>';
//SCHULE
echo "<td>Schule:</td><td colspan='5'> <SELECT id='firma' name='firma' onchange='document.getElementById(\"schule_id\").value=this.value'>";
$qry = "SELECT plz, ort, strasse, tbl_firma.name, tbl_firma.firma_id \n\t\tFROM public.tbl_firma JOIN public.tbl_standort USING(firma_id) LEFT JOIN public.tbl_adresse USING(adresse_id) \n\t\tWHERE schule ORDER BY plz, name";
echo "<option value='' >-- keine Angabe --</option>";
function shortname($name)
{
    if (strlen($name) > 40) {
        return mb_substr($name, 0, 20) . ' ... ' . mb_substr($name, mb_strlen($name) - 20, mb_strlen($name));
    } else {
        return $name;
    }
}
if ($result = $db->db_query($qry)) {
Ejemplo n.º 4
0
            die('RechnungID ist ungueltig');
        }
        if (!$rechnung->load($rechnung_id)) {
            die('Rechnung wurde nicht gefunden');
        }
        if (!$bestellung->load($rechnung->bestellung_id)) {
            die('Diese Rechnung ist keiner gueltigen Bestellung zugeordnet');
        }
        $bestellung_id = $bestellung->bestellung_id;
        if (!$kostenstelle->load($bestellung->kostenstelle_id)) {
            die('Die Rechnung bzw Bestellung ist keiner gueltigen Kostenstelle zugeordnet');
        }
        if (!$konto->load($bestellung->konto_id)) {
            echo 'Die Rechnung bzw Bestellung ist keinem gueltigen Konto zugeordnet!';
        }
        if (!$firma->load($bestellung->firma_id)) {
            echo 'Die Rechnung bzw Bestellung ist keiner gueltigen Firma zugeordnet!';
        }
        $kostenstelle_id = $bestellung->kostenstelle_id;
        echo '<table>
			<tr>
				<td><b>Kostenstelle:</b></td>
				<td>' . $kostenstelle->bezeichnung . '</td>
			</tr>
			<tr>
				<td><b>Konto:</b></td>
				<td>' . $konto->kurzbz . '</td>
			</tr>
			<tr>
				<td><b>Firma:</b></td>
				<td>' . $firma->name . '</td>
$preinteressent->loadFreigegebene($studiengang_kz);
foreach ($preinteressent->result as $row) {
    echo '<tr>';
    $person = new person();
    $person->load($row->person_id);
    echo "<td><input type='checkbox' name='chk_{$row->preinteressent_id}' checked></td>";
    echo "<td>{$person->nachname}</td>";
    echo "<td>{$person->vorname}</td>";
    echo "<td>{$person->gebdatum}</td>";
    echo "<td>{$row->studiensemester_kurzbz}</td>";
    echo "<td>{$row->anmerkung}";
    if ($row->firma_id != '') {
        $plz = '';
        $ort = '';
        $firma = new firma();
        $firma->load($row->firma_id);
        $adresse = new adresse();
        $adresse->load_firma($row->firma_id);
        if (isset($adresse->result[0])) {
            $plz = $adresse->result[0]->plz;
            $ort = $adresse->result[0]->ort;
        }
        echo '<br /><b>Schule:</b>' . $plz . ' ' . $ort . ' ' . $firma->name . " ({$firma->firmentyp_kurzbz})";
    }
    echo "</td>";
    echo "<td>";
    //Suchen ob diese Person schon existiert
    $qry = "SELECT distinct * FROM public.tbl_prestudent JOIN public.tbl_person USING(person_id) WHERE \n\t\t\t\tstudiengang_kz='{$studiengang_kz}' AND (\n\t\t\t\t(vorname='{$person->vorname}' AND nachname='{$person->nachname}') ";
    if ($person->gebdatum != '') {
        $qry .= " OR (nachname='{$person->nachname}' AND gebdatum='{$person->gebdatum}')";
    }
/**
 * Erimtteln der Firmen.- Standortdaten
 *
 * @param $firma_id_geloescht
 * @param $firma_id_bleibt
 */
function getFirmaUndStandorte($firma_id_geloescht, $firma_id_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++) {
            // 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();
            if (!isset($geloescht->personen[$i])) {
                $geloescht->personen[$i] = new stdclass();
            }
            $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->get_firmaorganisationseinheit($geloescht->firma_id)) {
        $geloescht->firmaorganisationseinheit = array();
    }
    if ($firmaorganisationseinheit_obj->result) {
        $geloescht->firmaorganisationseinheit = $firmaorganisationseinheit_obj->result;
    }
    // - 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++) {
            // 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)) {
                if (!isset($bleibt->standorte[$i])) {
                    $bleibt->standorte[$i] = new stdClass();
                }
                $bleibt->standorte[$i]->kontakt = $kontakt_obj;
            }
            // Personen zum Standort
            $personfunktion_obj = new person();
            if (!isset($bleibt->personen[$i])) {
                $bleibt->personen[$i] = new stdClass();
            }
            $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->get_firmaorganisationseinheit($bleibt->firma_id)) {
        $bleibt->firmaorganisationseinheit = array();
    }
    if ($firmaorganisationseinheit_obj->result) {
        $bleibt->firmaorganisationseinheit = $firmaorganisationseinheit_obj->result;
    }
    return $standort = array("geloescht" => $geloescht, "bleibt" => $bleibt);
}
Ejemplo n.º 7
0
                <td valign="top">
                    
                    <table width="100%" style="border: thin solid black; border-spacing:5px; background-color: lightgray; margin-top:5px;" >
                        <tr><td><b> <?php 
    echo $p->t('incoming/auswahlUniversitaeten');
    ?>
: </b></td></tr>
                        
                        <?php 
    $outgoingFirma = new preoutgoing();
    $outgoingFirma->loadAuswahlFirmen($outgoing->preoutgoing_id);
    $disabledSpeichern = $outgoing->checkStatus($outgoing->preoutgoing_id, 'freigabe') ? 'disabled' : '';
    $i = 1;
    foreach ($outgoingFirma->firmen as $fi) {
        $firmaAuswahl = new firma();
        $firmaAuswahl->load($fi->firma_id);
        $style = '';
        $link = '';
        if ($fi->auswahl == true) {
            $style = 'style="color:red"';
        }
        $mobilitätsprogramm = new mobilitaetsprogramm();
        $mobilitätsprogramm->load($fi->mobilitaetsprogramm_code);
        if ($mobilitätsprogramm->kurzbz == '') {
            $mobprogramm = 'SUMMERSCHOOL';
        } else {
            $mobprogramm = $mobilitätsprogramm->kurzbz;
        }
        if ($fi->name == '') {
            if (!$outgoing->checkStatus($outgoing->preoutgoing_id, 'freigabe')) {
                $link = "<a href='" . $_SERVER['PHP_SELF'] . "?method=deleteFirma&outgoingFirma_id=" . $fi->preoutgoing_firma_id . "&ansicht=auswahl'>delete</a>";
Ejemplo n.º 8
0
/**
 * Schickt ein Status-Mail an die Kontaktperson der Bestellung
 * 
 * @param $bestellung Bestellung Object der Bestellung
 * @param $status Art der Statusaenderung (bestellt|geliefert|freigabe|storno)
 */
function sendBestellerMail($bestellung, $status)
{
    global $date;
    $tags = new tags();
    $tags->GetTagsByBestellung($bestellung->bestellung_id);
    $tagsAusgabe = '';
    foreach ($tags->result as $res) {
        if ($tagsAusgabe != '') {
            $tagsAusgabe .= ', ';
        }
        $tagsAusgabe .= $res->tag;
    }
    $msg = '';
    $kst_mail = new wawi_kostenstelle();
    $kst_mail->load($bestellung->kostenstelle_id);
    $firma_mail = new firma();
    $firma_mail->load($bestellung->firma_id);
    $konto_mail = new wawi_konto();
    $konto_mail->load($bestellung->konto_id);
    // E-Mail an Kostenstellenverantwortliche senden
    $email = "Dies ist eine automatisch generierte E-Mail.<br><br>";
    switch ($status) {
        case 'bestellt':
            $email .= " <b>Ihre Bestellung wurde bestellt</b>";
            break;
        case 'geliefert':
            $email .= " <b>Ihre Bestellung wurde geliefert</b><br>Hinweis: Nach erfolgter Lieferung werden Waren ab einem Wert von EUR 250,-- pro Einzelposition inventarisiert. <br>";
            break;
        case 'freigabe':
            $email .= " <b>Ihre Bestellung wurde freigegeben</b>";
            break;
        case 'storno':
            $email .= " <b>Ihre Bestellung wurde storniert</b>";
            break;
    }
    $email .= "<br>";
    $email .= "Kostenstelle: " . $kst_mail->bezeichnung . "<br>";
    $email .= "Bestellnummer: " . $bestellung->bestell_nr . "<br>";
    $email .= "Titel: " . $bestellung->titel . "<br>";
    $email .= "Firma: " . $firma_mail->name . "<br>";
    $email .= "Erstellt am: " . $date->formatDatum($bestellung->insertamum, 'd.m.Y') . "<br>";
    $email .= "Kostenstelle: " . $kst_mail->bezeichnung . "<br>Konto: " . $konto_mail->kurzbz . "<br>";
    $email .= "Tags: " . $tagsAusgabe . "<br>";
    $email .= "Link: <a href='" . APP_ROOT . "index.php?content=bestellung.php&method=update&id={$bestellung->bestellung_id}'>zur Bestellung </a>";
    $mail = new mail($bestellung->besteller_uid . '@' . DOMAIN, 'no-reply', 'Bestellung ' . $bestellung->bestell_nr, 'Bitte sehen Sie sich die Nachricht in HTML Sicht an, um den Link vollständig darzustellen.');
    $mail->setHTMLContent($email);
    if (!$mail->send()) {
        $msg .= '<span class="error">Fehler beim Senden des Mails</span><br />';
    } else {
        $msg .= ' Mail verschickt an ' . $bestellung->besteller_uid . '@' . DOMAIN . '!<br>';
    }
    return $msg;
}
Ejemplo n.º 9
0
function sendMailAssistenz($uid)
{
    $student = new student();
    $student->load($uid);
    $studiengang = new studiengang();
    $studiengang->load($student->studiengang_kz);
    $out = new preoutgoing();
    $out->loadUid($uid);
    $out_auswahl = new preoutgoing();
    $out_auswahl->loadAuswahl($out->preoutgoing_id);
    $mob = new mobilitaetsprogramm();
    $mob->load($out_auswahl->mobilitaetsprogramm_code);
    $firm = new firma();
    $firm->load($out_auswahl->firma_id);
    $emailtext = "Dies ist eine automatisch generierte E-Mail.<br><br>";
    $emailtext .= "Ein Student ist für den Aufenthalt im Ausland gemeldet.<br>";
    $emailtext .= "Uid: " . $student->uid . "<br>";
    $emailtext .= "Name: " . $student->vorname . " " . $student->nachname . "<br>";
    $emailtext .= "Zeitraum-Von: " . $out->dauer_von . "<br>";
    $emailtext .= "Zeitraum-Bis: " . $out->dauer_bis . "<br>";
    $emailtext .= "Mobilitätsprogramm: " . $mob->kurzbz . "<br>";
    $emailtext .= "Universität: " . $firm->name . "<br>";
    $mail = new mail($studiengang->email, 'no-reply', 'New Outgoing', 'Bitte sehen Sie sich die Nachricht in HTML Sicht an, um den Link vollständig darzustellen.');
    $mail->setHTMLContent($emailtext);
    $mail->send();
}
Ejemplo n.º 10
0
   <RDF:Seq about="' . $rdf_url . '/liste">
';
if (isset($_GET['optional']) && $_GET['optional'] == 'true') {
    echo '
      <RDF:li>
         <RDF:Description  id=""  about="" >
            <FIRMA:firma_id><![CDATA[]]></FIRMA:firma_id>
            <FIRMA:name><![CDATA[-- keine Auswahl --]]></FIRMA:name>
            <FIRMA:anmerkung><![CDATA[]]></FIRMA:anmerkung>
            <FIRMA:firmentyp_kurzbz><![CDATA[]]></FIRMA:firmentyp_kurzbz>
         </RDF:Description>
      </RDF:li>
      ';
}
if ($firma_id != '') {
    $firma->load($firma_id);
    draw_rdf($firma);
} elseif ($firmentyp_kurzbz != '' || $filter != '') {
    $firma->searchFirma($filter, $firmentyp_kurzbz);
    foreach ($firma->result as $row) {
        draw_rdf($row);
    }
} else {
    //$firma->getAll($firma_id);
    //foreach ($firma->result as $row)
    //	draw_rdf($row);
}
function draw_rdf($row)
{
    global $rdf_url;
    echo '
Ejemplo n.º 11
0
 $telefon_id = '';
 $anmerkung = '';
 $kundennummer_erhalter = '';
 $kundennummer_erhalter_id = '';
 $kundennummer_gmbh = '';
 $kundennummer_gmbh_id = '';
 if ($method == 'new') {
     echo '<h1>Neue Firma</h1>';
 } else {
     echo '<h1>Firma Bearbeiten</h1>';
     if (!is_numeric($id)) {
         die('ID ist ungueltig');
     }
     //Firma Laden
     $firma = new firma();
     if (!$firma->load($id)) {
         die('Firma konnte nicht geladen werden');
     }
     $name = $firma->name;
     $anmerkung = $firma->anmerkung;
     $firma_id = $firma->firma_id;
     $firma_oe = new firma();
     $firma_oe->get_firmaorganisationseinheit($firma_id, 'etw');
     if (isset($firma_oe->result[0])) {
         $kundennummer_erhalter = $firma_oe->result[0]->kundennummer;
         $kundennummer_erhalter_id = $firma_oe->result[0]->firma_organisationseinheit_id;
     }
     $firma_oe = new firma();
     $firma_oe->get_firmaorganisationseinheit($firma_id, 'gmbh');
     if (isset($firma_oe->result[0])) {
         $kundennummer_gmbh = $firma_oe->result[0]->kundennummer;
Ejemplo n.º 12
0
    if ($kurzbz == $kontakttyp) {
        $selected = 'selected';
    } else {
        $selected = '';
    }
    echo "<OPTION value='{$kurzbz}' {$selected}>{$kurzbz}</OPTION>";
}
echo "</SELECT></td>";
echo "<td><input type='text' name='kontakt' value='" . $kontakt . "' /></td>";
echo "<td><input type='checkbox' name='zustellung' " . ($zustellung ? 'checked' : '') . " /></td>";
echo "<td><input type='text' name='anmerkung' value='" . $anmerkung . "' /></td>";
$standort = new standort();
$firma_obj = new firma();
if ($standort_id != '') {
    $standort->load($standort_id);
    $firma_obj->load($standort->firma_id);
}
echo '<td><input type="text" id="firma_kontakt_ac" name="firma_kotankt_ac" value="' . $firma_obj->name . '" /><input type="hidden" id="firma_kontakt" name="firma" value="" />
	<SELECT id="standort_kontakt" name="standort_id">';
if ($standort_id != '') {
    $standort->load_firma($standort->firma_id);
    echo "<OPTION value='' >-- keine Auswahl --</OPTION>";
    foreach ($standort->result as $row) {
        if ($row->standort_id == $standort_id) {
            $selected = 'selected="true"';
        } else {
            $selected = '';
        }
        echo '<OPTION value="' . $row->standort_id . '" ' . $selected . '>' . $row->kurzbz . '</OPTION>';
    }
}