* Andreas Oesterreicher < andreas.oesterreicher@technikum-wien.at > * Rudolf Hangl < rudolf.hangl@technikum-wien.at > * Gerald Simane-Sequens < gerald.simane-sequens@technikum-wien.at > */ header( 'Expires: -1' ); header( 'Last-Modified: ' . gmdate( 'D, d M Y H:i:s' ) . ' GMT' ); header( 'Cache-Control: no-store, no-cache, must-revalidate' ); header( 'Pragma: no-cache' ); header('Content-Type: text/html;charset=UTF-8'); require_once('../../config/vilesci.config.inc.php'); require_once('../../include/functions.inc.php'); require_once('../../include/benutzerberechtigung.class.php'); require_once('../../include/benutzer.class.php'); require_once('../../include/person.class.php'); require_once('../../include/mitarbeiter.class.php'); require_once('../../include/ort.class.php'); require_once('../../include/studiengang.class.php'); require_once('../../include/organisationseinheit.class.php'); require_once('../../include/wawi.class.php'); require_once('../../include/betriebsmittel.class.php'); require_once('../../include/betriebsmittelperson.class.php'); require_once('../../include/betriebsmitteltyp.class.php'); require_once('../../include/betriebsmittelstatus.class.php'); require_once('../../include/betriebsmittel_betriebsmittelstatus.class.php'); if (!$uid = get_uid()) die('Keine UID gefunden ! Zurück'); if (!$db = new basis_db()) die('Datenbank kann nicht geoeffnet werden. Zurück'); $rechte = new benutzerberechtigung(); if(!$rechte->getBerechtigungen($uid)) die('Sie haben keine Berechtigung fuer diese Seite'); if(!$rechte->isBerechtigt('wawi/inventar:begrenzt', null, 's')) die('Sie haben keine Berechtigung fuer diese Seite'); // ------------------------------------------------------------------------------------------ // Initialisierung // ------------------------------------------------------------------------------------------ $errormsg=array(); $default_status_vorhanden='vorhanden'; // ------------------------------------------------------------------------------------------ // Parameter Aufruf uebernehmen // ------------------------------------------------------------------------------------------ $nummer=trim((isset($_REQUEST['nummer']) ? $_REQUEST['nummer']:'')); $seriennummer=trim((isset($_REQUEST['seriennummer']) ? $_REQUEST['seriennummer']:'')); $ort_kurzbz=trim((isset($_REQUEST['ort_kurzbz']) ? $_REQUEST['ort_kurzbz']:'')); $oe_kurzbz=trim((isset($_REQUEST['oe_kurzbz']) ? $_REQUEST['oe_kurzbz']:'')); $person_id=trim((isset($_REQUEST['person_id']) ? $_REQUEST['person_id']:'')); $beschreibung=trim((isset($_REQUEST['beschreibung']) ? $_REQUEST['beschreibung']:'')); $betriebsmitteltyp=trim((isset($_REQUEST['betriebsmitteltyp']) ? $_REQUEST['betriebsmitteltyp']:'')); $betriebsmittelstatus_kurzbz=trim((isset($_REQUEST['betriebsmittelstatus_kurzbz']) ? $_REQUEST['betriebsmittelstatus_kurzbz']:'')); $firma_id=trim(isset($_REQUEST['firma_id'])?$_REQUEST['firma_id']:''); $bestellnr=trim(isset($_REQUEST['bestellnr'])?$_REQUEST['bestellnr']:''); $bestellung_id=trim(isset($_REQUEST['bestellung_id'])?$_REQUEST['bestellung_id']:''); $bestelldetail_id=trim(isset($_REQUEST['bestelldetail_id'])?$_REQUEST['bestelldetail_id']:''); $kostenstelle_id=trim(isset($_REQUEST['kostenstelle_id'])?$_REQUEST['kostenstelle_id']:''); $hersteller=trim((isset($_REQUEST['hersteller']) ? $_REQUEST['hersteller']:'')); $jahr_monat=trim(isset($_REQUEST['jahr_monat']) ? $_REQUEST['jahr_monat']:''); $afa=trim(isset($_REQUEST['afa']) ? $_REQUEST['afa']:''); $inventur_jahr=trim(isset($_REQUEST['inventur_jahr']) ? $_REQUEST['inventur_jahr']:''); $aktiv=trim(isset($_REQUEST['aktiv']) ? $_REQUEST['aktiv']:false); $debug=trim(isset($_REQUEST['debug']) ? $_REQUEST['debug']:false); $work=trim(isset($_REQUEST['work'])?$_REQUEST['work']:(isset($_REQUEST['ajax'])?$_REQUEST['ajax']:false)); $work=strtolower($work); // ------------------------------------------------------------------------------------------ // Datenbankanbindung // ------------------------------------------------------------------------------------------ // Class - Datenbank $oBetriebsmittel = new betriebsmittel(); $oBetriebsmittel->result=array(); $oBetriebsmittel->debug=$debug; $oWawi = new wawi(); $oWawi->result=array(); $oWawi->debug=$debug; $oWawi->errormsg=''; $oPerson = new person(); $oPerson->result=array(); $oPerson->errormsg=''; $oOrganisationseinheit = new organisationseinheit(); $oOrganisationseinheit->result=array(); // ------------------------------------------------------------------------------------------ // Datenlesen // ------------------------------------------------------------------------------------------ /* jQuery autocomplete lineSeparator = (default value: "\n") The character that separates lines in the results from the backend. cellSeparator (default value: "|") The character that separates cells in the results from the backend. */ switch ($work) { // SerienNummer - Inventarnummern suche case 'seriennummer': $seriennummer=trim((isset($_REQUEST['q']) ? $_REQUEST['q']:'')); if (is_null($seriennummer) || $seriennummer=='') exit(); $pArt='select'; $pDistinct=true; $pFields='seriennummer,beschreibung'; $pTable='wawi.tbl_betriebsmittel'; $matchcode=addslashes(str_replace(array('*','%',',',';',"'",'"',' '),'%',trim($seriennummer))); $pWhere=" upper(trim(seriennummer)) like upper(trim('".$matchcode."%'))"; $pOrder='seriennummer'; $pLimit='100'; $pSql=''; if (!$oRresult=$db->SQL($pArt,$pDistinct,$pFields,$pTable,$pWhere,$pOrder,$pLimit,$pSql)) exit(' |'.$db->errormsg."\n"); for ($i=0;$iseriennummer).'|'. (is_null($oRresult[$i]->beschreibung) || empty($oRresult[$i]->beschreibung) || $oRresult[$i]->beschreibung=='NULL' || $oRresult[$i]->beschreibung=='null'?'':html_entity_decode($oRresult[$i]->beschreibung))."\n"; break; // Hersteller case 'hersteller': $hersteller=trim((isset($_REQUEST['q']) ? $_REQUEST['q']:'')); if (is_null($hersteller) || $hersteller=='') exit(); $pArt='select'; $pDistinct=true; $pFields='hersteller'; $pTable='wawi.tbl_betriebsmittel'; $matchcode=addslashes(str_replace(array('*','%',',',';',"'",'"',' '),'%',trim($hersteller))); $pWhere=" upper(trim(hersteller)) like upper(trim('".$matchcode."%'))"; $pOrder='hersteller'; $pLimit='100'; $pSql=''; if (!$oRresult=$db->SQL($pArt,$pDistinct,$pFields,$pTable,$pWhere,$pOrder,$pLimit,$pSql)) exit(' |'.$db->errormsg."\n"); for ($i=0;$ihersteller).'|'. ''."\n"; break; // Bestellung case 'bestellung_id': $bestellung_id=trim((isset($_REQUEST['q']) ? $_REQUEST['q']:'')); if (is_null($bestellung_id) || $bestellung_id=='') exit(); $pArt='select'; $pDistinct=true; $pFields='nummer,beschreibung'; $pTable='wawi.tbl_betriebsmittel'; $matchcode=addslashes(str_replace(array('*','%',',',';',"'",'"',' '),'%',trim($nummer))); $pWhere=" upper(trim(bestellung_id)) like upper(trim('".$matchcode."%'))"; $pOrder='bestellung_id'; $pLimit='100'; $pSql=''; if (!$oRresult=$db->SQL($pArt,$pDistinct,$pFields,$pTable,$pWhere,$pOrder,$pLimit,$pSql)) exit(' |'.$db->errormsg."\n"); for ($i=0;$iseriennummer).'|'. (is_null($oRresult[$i]->beschreibung) || empty($oRresult[$i]->beschreibung) || $oRresult[$i]->beschreibung=='NULL' || $oRresult[$i]->beschreibung=='null'?'':html_entity_decode($oRresult[$i]->beschreibung))."\n"; break; // Betriebsmittel Inventarnummer case 'inventarnummer': $inventarnummer=trim((isset($_REQUEST['q']) ? $_REQUEST['q']:'')); if (is_null($inventarnummer) || $inventarnummer=='') exit(); $pArt='select'; $pDistinct=true; $pFields='inventarnummer,beschreibung'; $pTable='wawi.tbl_betriebsmittel'; $matchcode=addslashes(str_replace(array('*','%',',',';',"'",'"',' '),'%',trim($inventarnummer))); $pWhere=" upper(trim(inventarnummer)) like upper(trim('".$matchcode."%'))"; $pOrder='inventarnummer'; $pLimit='100'; $pSql=''; if (!$oRresult=$db->SQL($pArt,$pDistinct,$pFields,$pTable,$pWhere,$pOrder,$pLimit,$pSql)) exit(' |'.$db->errormsg."\n"); for ($i=0;$iinventarnummer).'|'. (is_null($oRresult[$i]->beschreibung) || empty($oRresult[$i]->beschreibung) || $oRresult[$i]->beschreibung=='NULL' || $oRresult[$i]->beschreibung=='null'?'':html_entity_decode($oRresult[$i]->beschreibung))."\n"; break; // Ort - Inventarorte suche case 'inventar_ort': $ort_kurzbz=trim((isset($_REQUEST['q']) ? $_REQUEST['q']:'')); if (is_null($ort_kurzbz) || $ort_kurzbz=='') exit(); $pArt='select'; $pDistinct=true; $pFields='tbl_betriebsmittel.ort_kurzbz,tbl_ort.bezeichnung,tbl_ort.aktiv'; $pTable='wawi.tbl_betriebsmittel left outer join public.tbl_ort on (tbl_ort.ort_kurzbz=tbl_betriebsmittel.ort_kurzbz) '; $matchcode=addslashes(str_replace(array('*','%',',',';',"'",'"',' '),'%',trim($ort_kurzbz))); $pWhere=" upper(trim(tbl_betriebsmittel.ort_kurzbz)) like upper(trim('%".$matchcode."%')) or upper(trim(tbl_ort.bezeichnung)) like upper(trim('%".$matchcode."%'))"; $pOrder='tbl_betriebsmittel.ort_kurzbz'; $pLimit='100'; $pSql=''; if (!$oRresult=$db->SQL($pArt,$pDistinct,$pFields,$pTable,$pWhere,$pOrder,$pLimit,$pSql)) exit(' |'.$db->errormsg."\n"); for ($i=0;$iort_kurzbz).'|' .(is_null($oRresult[$i]->bezeichnung) || empty($oRresult[$i]->bezeichnung) || $oRresult[$i]->bezeichnung=='NULL' || $oRresult[$i]->bezeichnung=='null'?'':html_entity_decode($oRresult[$i]->bezeichnung)) .($oRresult[$i]->aktiv==true || $oRresult[$i]->aktiv=='t'?' aktiv':' nicht aktiv') ."\n"; } break; // Ort - FH Technikum suche case 'ort': $ort_kurzbz=trim((isset($_REQUEST['q']) ? $_REQUEST['q']:'')); if (is_null($ort_kurzbz) || $ort_kurzbz=='') exit(); $pArt='select'; $pDistinct=true; $pFields='tbl_ort.ort_kurzbz,tbl_ort.bezeichnung,tbl_ort.aktiv'; $pTable=' public.tbl_ort '; $matchcode=addslashes(str_replace(array('*','%',',',';',"'",'"',' '),'%',trim($ort_kurzbz))); $pWhere=" tbl_ort.aktiv and ( upper(trim(tbl_ort.ort_kurzbz)) like upper(trim('%".$matchcode."%')) or upper(trim(tbl_ort.bezeichnung)) like upper(trim('%".$matchcode."%')) )"; $pOrder='tbl_ort.ort_kurzbz'; $pLimit='100'; $pSql=''; if (!$oRresult=$db->SQL($pArt,$pDistinct,$pFields,$pTable,$pWhere,$pOrder,$pLimit,$pSql)) exit(' |'.$db->errormsg."\n"); for ($i=0;$iort_kurzbz).'|' .(is_null($oRresult[$i]->bezeichnung) || empty($oRresult[$i]->bezeichnung) || $oRresult[$i]->bezeichnung=='NULL' || $oRresult[$i]->bezeichnung=='null'?'':html_entity_decode($oRresult[$i]->bezeichnung) ) .($oRresult[$i]->aktiv==true || $oRresult[$i]->aktiv=='t'?' aktiv':' nicht aktiv') ."\n"; } break; // Person - FH Technikum suche case 'person': $person_id=trim((isset($_REQUEST['q']) ? $_REQUEST['q']:'')); if (is_null($person_id) || $person_id=='') exit(); $matchcode=mb_strtoupper(addslashes(str_replace(array('*','%',',',';',"'",'"',' '),'%',trim($person_id)))); //$pWhere=" aktiv "; $pWhere=' 1=1 '; if ($person_id) { $pWhere.=" and (UPPER(trim(uid)) like '%".$matchcode."%' "; $pWhere.=" or UPPER(trim(to_char(person_id,'999999999'))) like '%".$matchcode."%' "; $pWhere.=" or UPPER(trim(nachname)) like '%".addslashes($matchcode)."%' "; $pWhere.=" or UPPER(trim(vorname)) like '%".addslashes($matchcode)."%' "; $pWhere.=" or UPPER(trim(nachname || ' ' || vorname)) like '%".addslashes($matchcode)."%' "; $pWhere.=" or UPPER(trim(vorname || ' ' || nachname)) like '%".addslashes($matchcode)."%' ) "; } if (!empty($oe_kurzbz)) { $pSql="SELECT vw_benutzer.uid,vw_benutzer.person_id,vw_benutzer.aktiv,uid,person_id,titelpre,anrede,vorname,nachname,vornamen,titelpost,funktion_kurzbz FROM public.tbl_benutzerfunktion JOIN campus.vw_benutzer USING(uid) where ". $pWhere ." and (funktion_kurzbz='oezuordnung') and oe_kurzbz IN( WITH RECURSIVE oes(oe_kurzbz, oe_parent_kurzbz) as ( SELECT oe_kurzbz, oe_parent_kurzbz FROM public.tbl_organisationseinheit WHERE upper(trim(oe_kurzbz))=upper(trim('".addslashes($oe_kurzbz)."')) UNION ALL SELECT o.oe_kurzbz, o.oe_parent_kurzbz FROM public.tbl_organisationseinheit o, oes WHERE o.oe_parent_kurzbz=oes.oe_kurzbz ) SELECT oe_kurzbz FROM oes GROUP BY oe_kurzbz limit 1) ORDER BY nachname, vorname, funktion_kurzbz "; $pArt=''; $pDistinct=true; $pFields=''; $pTable=''; $matchcode=''; $pWhere=''; $pOrder=''; $pLimit=''; } else { $pArt='select'; $pDistinct=true; $pFields='uid,person_id,titelpre,anrede,vorname,nachname,vornamen,aktiv,\'\' as funktion_kurzbz'; $pTable=' campus.vw_benutzer '; $matchcode=mb_strtoupper(addslashes(str_replace(array('*','%',',',';',"'",'"',' '),'%',trim($person_id)))); $pOrder='nachname'; $pLimit='100'; $pSql=''; } if (!$oRresult=$db->SQL($pArt,$pDistinct,$pFields,$pTable,$pWhere,$pOrder,$pLimit,$pSql)) exit(' |'.$db->errormsg."\n"); for ($i=0;$iperson_id).'|' .trim($oRresult[$i]->anrede).' '.($oRresult[$i]->titelpre?html_entity_decode($oRresult[$i]->titelpre).' ':'') .html_entity_decode($oRresult[$i]->vorname).' '.html_entity_decode($oRresult[$i]->nachname).($oRresult[$i]->funktion_kurzbz?html_entity_decode($oRresult[$i]->funktion_kurzbz).' ':'') .($oRresult[$i]->aktiv=='t'?' aktiv':' nicht aktiv') ."\n"; } break; // Organisation - suche case 'organisationseinheit': $oe_kurzbz=trim((isset($_REQUEST['q']) ? $_REQUEST['q']:'')); if (is_null($oe_kurzbz) || $oe_kurzbz=='') exit(); $oOrganisationseinheit->result=array(); if (!$oOrganisationseinheit->getAll()) exit($oOrganisationseinheit->errormsg."\n"); for ($i=0;$iresult);$i++) { if ($aktiv && ($oOrganisationseinheit->result[$i]->aktiv==false || $oOrganisationseinheit->result[$i]->aktiv=='f')) break; if (!$oe_kurzbz || stristr($oOrganisationseinheit->result[$i]->oe_kurzbz,$oe_kurzbz) || stristr($oOrganisationseinheit->result[$i]->bezeichnung,$oe_kurzbz) || stristr($oOrganisationseinheit->result[$i]->oe_parent_kurzbz,$oe_kurzbz) || stristr($oOrganisationseinheit->result[$i]->organisationseinheittyp_kurzbz,$oe_kurzbz) ) echo html_entity_decode($oOrganisationseinheit->result[$i]->oe_kurzbz).'|' .' ' .(is_null($oOrganisationseinheit->result[$i]->bezeichnung) || empty($oOrganisationseinheit->result[$i]->bezeichnung) || $oOrganisationseinheit->result[$i]->bezeichnung=='NULL' || $oOrganisationseinheit->result[$i]->bezeichnung=='null'?'':html_entity_decode($oOrganisationseinheit->result[$i]->bezeichnung) ) .' ' .(is_null($oOrganisationseinheit->result[$i]->organisationseinheittyp_kurzbz) || empty($oOrganisationseinheit->result[$i]->organisationseinheittyp_kurzbz) || $oOrganisationseinheit->result[$i]->organisationseinheittyp_kurzbz=='NULL' || $oOrganisationseinheit->result[$i]->organisationseinheittyp_kurzbz=='null'?'':html_entity_decode($oOrganisationseinheit->result[$i]->organisationseinheittyp_kurzbz) ) .($oOrganisationseinheit->result[$i]->aktiv==true || $oOrganisationseinheit->result[$i]->aktiv=='t'?' aktiv':' nicht aktiv') ."\n"; } break; // Suche case 'wawi_search': $search=trim((isset($_REQUEST['q']) ? $_REQUEST['q']:'')); if (is_null($search) || $search=='') exit(); $oWawi->result=array(); if ($oWawi->bestellpositionen("$search")) { for ($i=0;$iresult);$i++) echo html_entity_decode($oWawi->result[$i]->bestellung_id).'|'.', '.html_entity_decode($oWawi->result[$i]->jahr_monat_tag).', '.html_entity_decode($oWawi->result[$i]->bestellnr).', '.html_entity_decode($oWawi->result[$i]->firmenname).', '.($oWawi->result[$i]->titel?html_entity_decode($oWawi->result[$i]->titel):'').' '.($oWawi->result[$i]->bemerkungen?html_entity_decode($oWawi->result[$i]->bemerkungen):'').($oWawi->result[$i]->beschreibung?"\n".' -- '.html_entity_decode($oWawi->result[$i]->beschreibung):'')."\n"; } break; // Bestellung case 'wawi_bestellnr': $bestellnr=trim((isset($_REQUEST['q']) ? $_REQUEST['q']:'')); if (is_null($bestellnr) || $bestellnr=='') exit(); if (!$oWawi->bestellung(null,$jahr_monat,null,"$bestellnr")) exit($oWawi->errormsg."\n"); for ($i=0;$iresult);$i++) echo html_entity_decode($oWawi->result[$i]->bestellnr).'|'.', '.html_entity_decode($oWawi->result[$i]->jahr_monat_tag).', '.html_entity_decode($oWawi->result[$i]->bestellung_id).', '.html_entity_decode($oWawi->result[$i]->firmenname).', '.html_entity_decode($oWawi->result[$i]->titel).' '.html_entity_decode($oWawi->result[$i]->bemerkungen)."\n"; if ($oWawi->errormsg) exit($oWawi->errormsg."\n"); echo "| *** Bestell ID *** \n"; $oWawi->result=array(); if ($oWawi->bestellung(null,$jahr_monat,"$bestellnr*")) { for ($i=0;$iresult);$i++) echo html_entity_decode($oWawi->result[$i]->bestellnr).'|'.', '.html_entity_decode($oWawi->result[$i]->jahr_monat_tag).', '.html_entity_decode($oWawi->result[$i]->bestellung_id).', '.html_entity_decode($oWawi->result[$i]->firmenname).', '.html_entity_decode($oWawi->result[$i]->titel).' '.html_entity_decode($oWawi->result[$i]->bemerkungen)."\n"; } break; // Bestellung ID case 'wawi_bestellung_id': $bestellung_id=trim((isset($_REQUEST['q']) ? $_REQUEST['q']:'')); if (is_null($bestellung_id) || $bestellung_id=='') exit(); if ($oWawi->bestellung(null,$jahr_monat,"$bestellung_id*")) { for ($i=0;$iresult);$i++) echo html_entity_decode($oWawi->result[$i]->bestellung_id).'|'.', '.html_entity_decode($oWawi->result[$i]->jahr_monat_tag).', '.html_entity_decode($oWawi->result[$i]->bestellnr).', '.html_entity_decode($oWawi->result[$i]->firmenname).', '.html_entity_decode($oWawi->result[$i]->titel).' '.html_entity_decode($oWawi->result[$i]->bemerkungen)."\n"; } if ($oWawi->errormsg) exit($oWawi->errormsg."\n"); $oWawi->result=array(); if (!$oWawi->bestellung(null,$jahr_monat,null,"$bestellung_id%")) exit($oWawi->errormsg."\n"); echo "| *** Bestellnr *** \n"; for ($i=0;$iresult);$i++) echo html_entity_decode($oWawi->result[$i]->bestellung_id).'|'.', '.html_entity_decode($oWawi->result[$i]->jahr_monat_tag).', '.html_entity_decode($oWawi->result[$i]->bestellnr).', '.html_entity_decode($oWawi->result[$i]->firmenname).', '.html_entity_decode($oWawi->result[$i]->titel).' '.html_entity_decode($oWawi->result[$i]->bemerkungen)."\n"; break; // Bestelldetail ID case 'wawi_bestelldetail_id': $bestelldetail_id=trim((isset($_REQUEST['q']) ? $_REQUEST['q']:'')); if (is_null($bestellung_id) || $bestellung_id=='' || is_null($bestelldetail_id) || $bestelldetail_id=='') exit(); if ($oWawi->bestellpositionen($bestellung_id,null,"%$bestelldetail_id")) { for ($i=0;$iresult);$i++) echo html_entity_decode($oWawi->result[$i]->bestelldetail_id).'|'.', '.html_entity_decode($oWawi->result[$i]->beschreibung).', '.html_entity_decode($oWawi->result[$i]->artikelnr).' Preis VE '.html_entity_decode(number_format($oWawi->result[$i]->preisve,2)).', Menge '.html_entity_decode($oWawi->result[$i]->menge).', Pos.summe '.html_entity_decode(number_format($oWawi->result[$i]->summe,2))."\n"; } if ($oWawi->errormsg) exit($oWawi->errormsg."\n"); if (!$oWawi->bestellpositionen($bestellung_id,null,null,null)) exit($oWawi->errormsg."\n"); echo "| *** alle Positionen *** \n"; for ($i=0;$iresult);$i++) echo html_entity_decode($oWawi->result[$i]->bestelldetail_id).'|'.', '.html_entity_decode($oWawi->result[$i]->beschreibung).', '.html_entity_decode($oWawi->result[$i]->artikelnr).' Preis VE '.html_entity_decode(number_format($oWawi->result[$i]->preisve,2)).', Menge '.html_entity_decode($oWawi->result[$i]->menge).', Pos.summe '.html_entity_decode(number_format($oWawi->result[$i]->summe,2))."\n"; break; // Firmen ID case 'wawi_firma_id': $firma_id=trim((isset($_REQUEST['q']) ? $_REQUEST['q']:'')); if (is_null($firma_id) ||$firma_id=='') exit(); $oWawi = new wawi(); $oWawi->result=array(); $oWawi->debug=$debug; if (!$oWawi->firma("$firma_id%",null)) exit($oWawi->errormsg."\n"); for ($i=0;$iresult);$i++) echo html_entity_decode($oWawi->result[$i]->firma_id).'|'.', '.html_entity_decode($oWawi->result[$i]->firmenname).', '.html_entity_decode($oWawi->result[$i]->strasse).' '.html_entity_decode($oWawi->result[$i]->plz).' '.html_entity_decode($oWawi->result[$i]->ort)."\n"; break; // Firmen Search case 'wawi_firma_search': $firma_search=trim((isset($_REQUEST['q']) ? $_REQUEST['q']:'')); if (is_null($firma_search) ||$firma_search=='') exit(); if (!$oWawi->firma(null,"$firma_search")) exit($oWawi->errormsg."\n"); for ($i=0;$iresult);$i++) echo html_entity_decode($oWawi->result[$i]->firma_id).'|'.', '.html_entity_decode($oWawi->result[$i]->firmenname).', '.html_entity_decode($oWawi->result[$i]->strasse).' '.html_entity_decode($oWawi->result[$i]->plz).' '.html_entity_decode($oWawi->result[$i]->ort)."\n"; break; // Kostenstelle ID case 'wawi_kostenstelle_id': $kostenstelle_id=trim((isset($_REQUEST['q']) ? $_REQUEST['q']:'')); if (is_null($kostenstelle_id) || $kostenstelle_id=='') exit(); if (!$oWawi->kostenstelle("$kostenstelle_id%",null)) exit($oWawi->errormsg."\n"); for ($i=0;$iresult);$i++) { echo html_entity_decode($oWawi->result[$i]->kostenstelle_id).'|'.', Nr :'.html_entity_decode($oWawi->result[$i]->kostenstelle_nr).', '.html_entity_decode($oWawi->result[$i]->bezeichnung).', Stg.:'.html_entity_decode($oWawi->result[$i]->stg_kurzzeichen).' '.html_entity_decode($oWawi->result[$i]->stg_bez).' ' .' '.($oWawi->result[$i]->stg_aktiv==true || $oWawi->result[$i]->stg_aktiv=='t'?' aktiv':' nicht aktiv') ."\n"; } break; // Kostenstelle Nr case 'wawi_kostenstelle_nr': $kostenstelle_nr=trim((isset($_REQUEST['q']) ? $_REQUEST['q']:'')); if (is_null($kostenstelle_nr) || $kostenstelle_nr=='') exit(); if (!$oWawi->kostenstelle(null,null,null,null,"$kostenstelle_nr%")) exit($oWawi->errormsg."\n"); for ($i=0;$iresult);$i++) { echo html_entity_decode($oWawi->result[$i]->kostenstelle_nr).'|'.', ID :'.html_entity_decode($oWawi->result[$i]->kostenstelle_id).', '.html_entity_decode($oWawi->result[$i]->bezeichnung).', Stg.:'.html_entity_decode($oWawi->result[$i]->stg_kurzzeichen).' '.html_entity_decode($oWawi->result[$i]->stg_bez).' ' .' '.($oWawi->result[$i]->stg_aktiv==true || $oWawi->result[$i]->stg_aktiv=='t'?' aktiv':' nicht aktiv') ."\n"; } break; // Kostenstelle Serch case 'wawi_kostenstelle_search': $kostenstelle_search=trim((isset($_REQUEST['q']) ? $_REQUEST['q']:'')); if (is_null($kostenstelle_search) || $kostenstelle_search=='') exit(); if (!$oWawi->kostenstelle(null,$kostenstelle_search)) exit($oWawi->errormsg."\n"); for ($i=0;$iresult);$i++) { echo html_entity_decode($oWawi->result[$i]->kostenstelle_nr).'|' .', '. html_entity_decode($oWawi->result[$i]->bezeichnung).' , ID :'.html_entity_decode($oWawi->result[$i]->kostenstelle_id).', Nr.:'.html_entity_decode($oWawi->result[$i]->kostenstelle_nr).', Stg.:'.html_entity_decode($oWawi->result[$i]->stg_kurzzeichen).' '.html_entity_decode($oWawi->result[$i]->stg_bez).' ' .' '.($oWawi->result[$i]->stg_aktiv==true || $oWawi->result[$i]->stg_aktiv=='t'?' aktiv':' nicht aktiv') ."\n"; } break; // Konto ID case 'wawi_konto_id': $konto_id=trim((isset($_REQUEST['q']) ? $_REQUEST['q']:'')); if (is_null($konto_id) || $konto_id=='') exit(); if (!$oWawi->konto("$konto_id")) exit($oWawi->errormsg."\n"); for ($i=0;$iresult);$i++) { echo html_entity_decode($oWawi->result[$i]->konto).'|'.', '.html_entity_decode($oWawi->result[$i]->beschreibung) ."\n"; } break; // Konto ID case 'wawi_konto_search': $konto_search=trim((isset($_REQUEST['q']) ? $_REQUEST['q']:'')); if (is_null($konto_search) || $konto_search=='') exit(); if (!$oWawi->konto(null,null,"$konto_search")) exit($oWawi->errormsg."\n"); for ($i=0;$iresult);$i++) { echo html_entity_decode($oWawi->result[$i]->konto).'|'.', '.html_entity_decode($oWawi->result[$i]->beschreibung) ."\n"; } break; // Studiengang ID case 'wawi_studiengang_id': $studiengang_id=trim((isset($_REQUEST['q']) ? $_REQUEST['q']:'')); if (is_null($studiengang_id) || $studiengang_id=='') exit(); if ($kostenstelle_id && !$oWawi->studiengang_kostenstelle("$studiengang_id%",null,null,$kostenstelle_id)) exit($oWawi->errormsg."\n"); elseif (!$kostenstelle_id && !$oWawi->studiengang("$studiengang_id%",null,null)) exit($oWawi->errormsg."\n"); for ($i=0;$iresult);$i++) { echo html_entity_decode($oWawi->result[$i]->studiengang_id).'|'.', '.html_entity_decode($oWawi->result[$i]->kurzzeichen) .' '.html_entity_decode($oWawi->result[$i]->bezeichnung) .' '.($oWawi->result[$i]->aktiv==true || $oWawi->result[$i]->aktiv=='t'?' aktiv':' nicht aktiv') ."\n"; } break; // Studiengang Suche case 'wawi_studiengang_search': $studiengang_search=trim((isset($_REQUEST['q']) ? $_REQUEST['q']:'')); if (is_null($studiengang_search) || $studiengang_search=='') exit(); if ($kostenstelle_id && !$oWawi->studiengang_kostenstelle(null,null,"$studiengang_id%",$kostenstelle_id)) exit($oWawi->errormsg."\n"); else if (!$oWawi->studiengang(null,null,$studiengang_search)) exit($oWawi->errormsg."\n"); for ($i=0;$iresult);$i++) { echo html_entity_decode($oWawi->result[$i]->studiengang_id).'|'.', '.html_entity_decode($oWawi->result[$i]->kurzzeichen) .' '.html_entity_decode($oWawi->result[$i]->bezeichnung) .' '.($oWawi->result[$i]->aktiv==true || $oWawi->result[$i]->aktiv=='t'?' aktiv':' nicht aktiv') ."\n"; } break; default: echo " Funktion $work fehlt! "; break; } exit(); ?>