mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-06-07 23:29:28 +00:00
Merge remote-tracking branch 'origin/master'
This commit is contained in:
@@ -98,7 +98,7 @@ $autoload['helper'] = array('url', 'language');
|
||||
| config files. Otherwise, leave it blank.
|
||||
|
|
||||
*/
|
||||
$autoload['config'] = array('fhcomplete');
|
||||
$autoload['config'] = array();
|
||||
|
||||
/*
|
||||
| -------------------------------------------------------------------
|
||||
|
||||
@@ -502,16 +502,3 @@ $config['rewrite_short_tags'] = FALSE;
|
||||
| Array: array('10.0.1.200', '192.168.5.0/24')
|
||||
*/
|
||||
$config['proxy_ips'] = '';
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Autoload Custom Controllers
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| It's working, so don't delete this :D
|
||||
*/
|
||||
spl_autoload_register(function ($class) {
|
||||
if (substr($class,0,3) !== 'CI_' && substr($class,0,4) !== 'FHC_')
|
||||
if (file_exists($file = APPPATH . 'core/' . $class . '.php'))
|
||||
require_once $file;
|
||||
});
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
<?php
|
||||
|
||||
if (! defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
/**
|
||||
* Autoload custom controllers, models, etc that are present in the application/core directory
|
||||
*/
|
||||
spl_autoload_register(function ($class) {
|
||||
if (substr($class, 0, 3) !== 'CI_' && substr($class, 0, 4) !== 'FHC_')
|
||||
if (file_exists($file = APPPATH.'core/'.$class.'.php'))
|
||||
require_once $file;
|
||||
});
|
||||
@@ -1,9 +0,0 @@
|
||||
<?php
|
||||
|
||||
if (! defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
$config['fhc_version'] = '3.3';
|
||||
|
||||
$config['addons_aufnahme_url'] = array();
|
||||
$config['addons_aufnahme_url']['fallback'] = 'https://localhost/fhcomplete/index.ci.php/ViewMessage/writeReply/';
|
||||
$config['addons_aufnahme_url']['OE_ROOT'] = 'https://SERVER-NAME/addons/aufnahme/OE_ROOT/cis/index.php';
|
||||
@@ -14,6 +14,10 @@ $config['message_html_view_url'] = '/ViewMessage/toHTML/';
|
||||
$config['message_server'] = site_url();
|
||||
$config['assistent_function'] = 'ass';
|
||||
|
||||
$config['message_redirect_url'] = array();
|
||||
$config['message_redirect_url']['fallback'] = site_url('ViewMessage/writeReply');
|
||||
// $config['message_redirect_url']['OE_ROOT'] = 'https://SERVER-NAME/addons/aufnahme/OE_ROOT/cis/index.php';
|
||||
|
||||
define('EMAIL_KONTAKT_TYPE', 'email'); // Email kontakt type
|
||||
define('SENT_INFO_NEWLINE', '\n'); // tbl_msg_recipient->sentInfo separator
|
||||
|
||||
|
||||
@@ -58,7 +58,7 @@ class Redirect extends FHC_Controller
|
||||
show_error('No organisation unit present in the message');
|
||||
}
|
||||
|
||||
$addonAufnahmeUrls = $this->config->item('addons_aufnahme_url');
|
||||
$addonAufnahmeUrls = $this->config->item('message_redirect_url');
|
||||
if(!isset($addonAufnahmeUrls[$organisationRoot]))
|
||||
$organisationRoot = 'fallback';
|
||||
|
||||
@@ -73,7 +73,7 @@ class Redirect extends FHC_Controller
|
||||
}
|
||||
else
|
||||
{
|
||||
$addonAufnahmeUrls = $this->config->item('addons_aufnahme_url');
|
||||
$addonAufnahmeUrls = $this->config->item('message_redirect_url');
|
||||
if (isset($token)
|
||||
&& hasData($msg)
|
||||
&& is_array($addonAufnahmeUrls)
|
||||
|
||||
@@ -14,7 +14,7 @@ class Test extends REST_Controller
|
||||
parent::__construct();
|
||||
|
||||
// Loads helper message to manage returning messages
|
||||
$this->load->helper('fhc_message');
|
||||
$this->load->helper('hlp_message');
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -44,7 +44,7 @@ class AmpelMail extends FHC_Controller
|
||||
$this->load->model('person/Person_model', 'PersonModel');
|
||||
|
||||
// Load helpers
|
||||
$this->load->helper('fhc_sancho');
|
||||
$this->load->helper('hlp_sancho');
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -12,10 +12,10 @@ class APIv1_Controller extends REST_Controller
|
||||
parent::__construct();
|
||||
|
||||
// Loads helper message to manage returning messages
|
||||
$this->load->helper('fhc_message');
|
||||
$this->load->helper('hlp_message');
|
||||
|
||||
// Loads helper with generic utility function
|
||||
$this->load->helper('fhc_common');
|
||||
$this->load->helper('hlp_common');
|
||||
|
||||
// Loads permission lib
|
||||
$this->load->library('PermissionLib');
|
||||
|
||||
@@ -12,7 +12,7 @@ class Auth_Controller extends FHC_Controller
|
||||
parent::__construct();
|
||||
|
||||
// Loads authentication helper
|
||||
$this->load->helper('fhc_authentication');
|
||||
$this->load->helper('hlp_authentication');
|
||||
|
||||
// Checks if the caller is allowed to access to this content
|
||||
$this->_isAllowed($requiredPermissions);
|
||||
|
||||
@@ -21,19 +21,19 @@ class FHC_Controller extends CI_Controller
|
||||
$this->_controllerId = null; // set _controllerId as null by default
|
||||
|
||||
// Loads helper message to manage returning messages
|
||||
$this->load->helper('fhc_message');
|
||||
$this->load->helper('hlp_message');
|
||||
|
||||
// Loads helper with generic utility function
|
||||
$this->load->helper('fhc_common');
|
||||
$this->load->helper('hlp_common');
|
||||
|
||||
// Loads helper session to manage the php session
|
||||
$this->load->helper('fhc_session');
|
||||
$this->load->helper('hlp_session');
|
||||
|
||||
// Loads language helper
|
||||
$this->load->helper('fhc_language');
|
||||
$this->load->helper('hlp_language');
|
||||
|
||||
// Loads header helper
|
||||
$this->load->helper('fhc_header');
|
||||
$this->load->helper('hlp_header');
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -87,7 +87,7 @@ class FiltersLib
|
||||
$this->_ci =& get_instance(); // get code igniter instance
|
||||
|
||||
// Loads authentication helper
|
||||
$this->_ci->load->helper('fhc_authentication'); // NOTE: needed to load custom filters do not remove!
|
||||
$this->_ci->load->helper('hlp_authentication'); // NOTE: needed to load custom filters do not remove!
|
||||
|
||||
$this->_filterUniqueId = $this->_getFilterUniqueId($params); // sets the id for the related filter widget
|
||||
}
|
||||
|
||||
@@ -18,7 +18,7 @@ class MessageToken_model extends CI_Model
|
||||
$this->config->load('message');
|
||||
|
||||
// Load return message helper
|
||||
$this->load->helper('fhc_message');
|
||||
$this->load->helper('hlp_message');
|
||||
|
||||
// Loads the database object
|
||||
$this->load->database();
|
||||
|
||||
@@ -306,5 +306,8 @@ require_once 'config/vilesci.config.inc.php';
|
||||
// ... and the vendor autoload
|
||||
include_once 'vendor/autoload.php';
|
||||
|
||||
// Autoload custom controllers, models, etc that are present in the application/core directory
|
||||
require_once 'application/config/core_includes.php';
|
||||
|
||||
// Now the bootstrap file
|
||||
require_once BASEPATH.'core/CodeIgniter.php';
|
||||
|
||||
@@ -36,6 +36,7 @@
|
||||
|
||||
.navbar-header {
|
||||
padding-top: 15px;
|
||||
padding-left: 15px;
|
||||
height: 50px;
|
||||
}
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@ require_once('../../include/benutzerberechtigung.class.php');
|
||||
require_once('../../include/mitarbeiter.class.php');
|
||||
require_once('../../include/ort.class.php');
|
||||
require_once('../../include/organisationseinheit.class.php');
|
||||
require_once('../../include/person.class.php');
|
||||
require_once('../../include/person.class.php');
|
||||
require_once('../../include/betriebsmittel.class.php');
|
||||
require_once('../../include/betriebsmittelperson.class.php');
|
||||
require_once('../../include/betriebsmitteltyp.class.php');
|
||||
@@ -38,6 +38,11 @@ require_once('../../include/Excel/excel.php');
|
||||
|
||||
if (!$uid = get_uid())
|
||||
die('Keine UID gefunden ! <a href="javascript:history.back()">Zurück</a>');
|
||||
$rechte = new benutzerberechtigung();
|
||||
$rechte->getBerechtigungen($uid);
|
||||
|
||||
if(!$rechte->isBerechtigt('wawi/inventar:begrenzt'))
|
||||
die($rechte->errormsg);
|
||||
|
||||
$inventarnummer=trim((isset($_REQUEST['inventarnummer']) ? $_REQUEST['inventarnummer']:''));
|
||||
$seriennummer=trim((isset($_REQUEST['seriennummer']) ? $_REQUEST['seriennummer']:''));
|
||||
@@ -67,7 +72,7 @@ $default_status_vorhanden='vorhanden';
|
||||
|
||||
$oBetriebsmittelstatus = new betriebsmittelstatus();
|
||||
$oBetriebsmittelstatus->result=array();
|
||||
|
||||
|
||||
$resultBetriebsmittelstatus=$oBetriebsmittelstatus->result;
|
||||
|
||||
$oBetriebsmittel = new betriebsmittel();
|
||||
@@ -104,7 +109,7 @@ $format_right->setAlign('right');
|
||||
|
||||
$spalte=0;
|
||||
$zeile=0;
|
||||
|
||||
|
||||
if (is_null($resultBetriebsmittel) || !is_array($resultBetriebsmittel) || count($resultBetriebsmittel)<1)
|
||||
return false;
|
||||
|
||||
@@ -132,6 +137,8 @@ $worksheet->write($zeile,++$spalte,'Anschaffungsdatum',$format_bold);
|
||||
$maxlength[$spalte]=17;
|
||||
$worksheet->write($zeile,++$spalte,'Anschaffungswert',$format_bold);
|
||||
$maxlength[$spalte]=16;
|
||||
$worksheet->write($zeile,++$spalte,'Status',$format_bold);
|
||||
$maxlength[$spalte]=16;
|
||||
$worksheet->write($zeile,++$spalte,'Person',$format_bold);
|
||||
$maxlength[$spalte]=20;
|
||||
|
||||
@@ -139,7 +146,7 @@ for ($pos=0;$pos<count($resultBetriebsmittel);$pos++)
|
||||
{
|
||||
$zeile++;
|
||||
$spalte=0;
|
||||
// Pruefen ob OE vorhanden ist - ansonst suchen ob ein Benutzer vorhanden ist
|
||||
// Pruefen ob OE vorhanden ist - ansonst suchen ob ein Benutzer vorhanden ist
|
||||
$resultBetriebsmittel[$pos]->oe_kurzbz=trim($resultBetriebsmittel[$pos]->oe_kurzbz);
|
||||
if (empty($resultBetriebsmittel[$pos]->oe_kurzbz))
|
||||
{
|
||||
@@ -147,11 +154,11 @@ for ($pos=0;$pos<count($resultBetriebsmittel);$pos++)
|
||||
$oBetriebsmittelOrganisationseinheit = new betriebsmittel();
|
||||
if ($oBetriebsmittelOrganisationseinheit->load_betriebsmittel_oe($resultBetriebsmittel[$pos]->betriebsmittel_id))
|
||||
$resultBetriebsmittel[$pos]->oe_kurzbz=$oBetriebsmittelOrganisationseinheit->oe_kurzbz;
|
||||
else if ($oBetriebsmittelOrganisationseinheit->errormsg)
|
||||
else if ($oBetriebsmittelOrganisationseinheit->errormsg)
|
||||
$resultBetriebsmittel[$pos]->oe_kurzbz=$oBetriebsmittelOrganisationseinheit->errormsg;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
$oOrganisationseinheit = new organisationseinheit($resultBetriebsmittel[$pos]->oe_kurzbz);
|
||||
//$oOrganisationseinheit->bezeichnung='';
|
||||
// String - Daten Leerzeichen am Ende entfernen
|
||||
@@ -163,7 +170,7 @@ for ($pos=0;$pos<count($resultBetriebsmittel);$pos++)
|
||||
$resultBetriebsmittel[$pos]->firma_id=trim($resultBetriebsmittel[$pos]->firma_id);
|
||||
$resultBetriebsmittel[$pos]->firmenname=trim($resultBetriebsmittel[$pos]->firmenname);
|
||||
|
||||
|
||||
|
||||
InsertCell($zeile,$spalte,$resultBetriebsmittel[$pos]->inventarnummer);
|
||||
InsertCell($zeile,++$spalte,mb_str_replace("\r\n"," ",$resultBetriebsmittel[$pos]->beschreibung));
|
||||
InsertCell($zeile,++$spalte,mb_str_replace("\r\n"," ",$resultBetriebsmittel[$pos]->verwendung));
|
||||
@@ -174,9 +181,10 @@ for ($pos=0;$pos<count($resultBetriebsmittel);$pos++)
|
||||
InsertCell($zeile,++$spalte,$datum_obj->formatDatum($resultBetriebsmittel[$pos]->betriebsmittelstatus_datum,'d.m.Y'),$format_date);
|
||||
InsertCell($zeile,++$spalte,$datum_obj->formatDatum($resultBetriebsmittel[$pos]->inventuramum,'d.m.Y'),$format_date);
|
||||
InsertCell($zeile,++$spalte,$datum_obj->formatDatum($resultBetriebsmittel[$pos]->leasing_bis,'d.m.Y'),$format_date);
|
||||
|
||||
|
||||
InsertCell($zeile,++$spalte,$datum_obj->formatDatum($resultBetriebsmittel[$pos]->anschaffungsdatum,'d.m.Y'),$format_date);
|
||||
InsertCell($zeile,++$spalte,$resultBetriebsmittel[$pos]->anschaffungswert, $format_number);
|
||||
InsertCell($zeile,++$spalte,$resultBetriebsmittel[$pos]->betriebsmittelstatus_kurzbz);
|
||||
|
||||
$bmp = new betriebsmittelperson();
|
||||
$bmp->load_betriebsmittelpersonen($resultBetriebsmittel[$pos]->betriebsmittel_id);
|
||||
@@ -190,12 +198,12 @@ $maxlength[2]=30;
|
||||
foreach($maxlength as $i=>$breite)
|
||||
$worksheet->setColumn(0, $i, $breite+2);
|
||||
$workbook->close();
|
||||
|
||||
|
||||
|
||||
function InsertCell($zeile, $spalte, $value, $format=null)
|
||||
{
|
||||
global $maxlength, $worksheet;
|
||||
|
||||
|
||||
if(!is_null($format))
|
||||
{
|
||||
if($format=='string')
|
||||
@@ -205,7 +213,7 @@ function InsertCell($zeile, $spalte, $value, $format=null)
|
||||
}
|
||||
else
|
||||
$worksheet->write($zeile,$spalte,$value);
|
||||
|
||||
|
||||
if(mb_strlen($value)>$maxlength[$spalte])
|
||||
$maxlength[$spalte]=mb_strlen($value);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user