mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-18 15:32:17 +00:00
Merge remote-tracking branch 'origin/master'
This commit is contained in:
@@ -7,8 +7,8 @@ $config['send_immediately'] = false;
|
||||
|
||||
$config['msg_delivery'] = true; // Default true
|
||||
$config['system_person_id'] = 1; // Dummy sender, used for sending messages from the system
|
||||
$config['redirect_view_message_url'] = 'index.ci.php/Redirect/redirectByToken/'; //
|
||||
$config['message_html_view_url'] = 'index.ci.php/ViewMessage/toHTML/';
|
||||
$config['redirect_view_message_url'] = site_url('Redirect/redirectByToken/'); //
|
||||
$config['message_html_view_url'] = site_url('ViewMessage/toHTML/');
|
||||
$config['message_server'] = 'http://www.fhcomplete.org/';
|
||||
$config['assistent_function'] = 'ass';
|
||||
|
||||
@@ -65,4 +65,4 @@ define('MSG_ERR_INVALID_RECIPIENTS', 105);
|
||||
define('MSG_ERR_INVALID_RECEIVER_ID', 106);
|
||||
define('MSG_ERR_INVALID_OU', 107);
|
||||
define('MSG_ERR_INVALID_TEMPLATE', 108);
|
||||
define('MSG_ERR_INVALID_TOKEN', 109);
|
||||
define('MSG_ERR_INVALID_TOKEN', 109);
|
||||
|
||||
@@ -1,81 +1,103 @@
|
||||
<?php
|
||||
|
||||
// --------------------------------------------------------------------------------------------------------------------
|
||||
// Header menu
|
||||
|
||||
$config['navigation_header'] = array(
|
||||
'*' => array(
|
||||
'FH-Complete' => site_url(''),
|
||||
'Vilesci' => base_url('/vilesci'),
|
||||
'CIS' => CIS_ROOT
|
||||
'fhcomplete' => array(
|
||||
'link' => site_url(''),
|
||||
'icon' => '',
|
||||
'description' => 'FH-Complete',
|
||||
'sort' => 1
|
||||
),
|
||||
'vilesci' => array(
|
||||
'link' => base_url('vilesci'),
|
||||
'icon' => '',
|
||||
'description' => 'Vilesci',
|
||||
'sort' => 2
|
||||
),
|
||||
'cis' => array(
|
||||
'link' => CIS_ROOT,
|
||||
'icon' => '',
|
||||
'description' => 'CIS',
|
||||
'sort' => 3
|
||||
)
|
||||
)
|
||||
);
|
||||
|
||||
// --------------------------------------------------------------------------------------------------------------------
|
||||
// Left side menu
|
||||
|
||||
$config['navigation_menu'] = array();
|
||||
|
||||
$config['navigation_menu']['Vilesci/index'] = array(
|
||||
'Dashboard' => array(
|
||||
'dashboard' => array(
|
||||
'link' => '#',
|
||||
'description' => 'Dashboard',
|
||||
'icon' => 'dashboard'
|
||||
'icon' => 'dashboard',
|
||||
'sort' => 1
|
||||
),
|
||||
'Lehre' => array(
|
||||
'lehre' => array(
|
||||
'link' => '#',
|
||||
'icon' => 'graduation-cap',
|
||||
'description' => 'Lehre',
|
||||
'expand' => true,
|
||||
'sort' => 2,
|
||||
'children'=> array(
|
||||
'CIS' => array(
|
||||
'cis' => array(
|
||||
'link' => CIS_ROOT,
|
||||
'icon' => '',
|
||||
'description' => 'CIS',
|
||||
'expand' => true
|
||||
'expand' => true,
|
||||
'sort' => 1
|
||||
),
|
||||
'Infocenter' => array(
|
||||
'link' => site_url('/system/infocenter/InfoCenter'),
|
||||
'infocenter' => array(
|
||||
'link' => site_url('system/infocenter/InfoCenter'),
|
||||
'icon' => 'info',
|
||||
'description' => 'Infocenter',
|
||||
'expand' => true
|
||||
'expand' => true,
|
||||
'sort' => 2
|
||||
),
|
||||
)
|
||||
),
|
||||
'Administration' => array(
|
||||
'administration' => array(
|
||||
'link' => '#',
|
||||
'icon' => 'gear',
|
||||
'description' => 'Administration',
|
||||
'expand' => false,
|
||||
'sort' => 3,
|
||||
'children'=> array(
|
||||
'Vilesci' => array(
|
||||
'link' => base_url('vilesci/'),
|
||||
'vilesci' => array(
|
||||
'link' => base_url('vilesci'),
|
||||
'icon' => '',
|
||||
'description' => 'Vilesci',
|
||||
'expand' => true
|
||||
'expand' => true,
|
||||
'sort' => 1
|
||||
),
|
||||
'Extensions' => array(
|
||||
'link' => site_url('/system/extensions/Manager'),
|
||||
'extensions' => array(
|
||||
'link' => site_url('system/extensions/Manager'),
|
||||
'icon' => 'cubes',
|
||||
'description' => 'Extensions Manager',
|
||||
'expand' => true
|
||||
'expand' => true,
|
||||
'sort' => 2
|
||||
)
|
||||
)
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
$config['navigation_menu']['system/infocenter/InfoCenter/index'] = array(
|
||||
'Freigegeben' => array(
|
||||
'link' => base_url('index.ci.php/system/infocenter/InfoCenter/infocenterFreigegeben'),
|
||||
'freigegeben' => array(
|
||||
'link' => site_url('system/infocenter/InfoCenter/freigegeben'),
|
||||
'description' => 'Freigegeben',
|
||||
'icon' => 'thumbs-up'
|
||||
));
|
||||
)
|
||||
);
|
||||
|
||||
$config['navigation_menu']['system/infocenter/InfoCenter/showDetails'] = array(
|
||||
'Freigegeben' => array(
|
||||
'link' => base_url('index.ci.php/system/infocenter/InfoCenter/infocenterFreigegeben'),
|
||||
'description' => 'Freigegeben',
|
||||
'icon' => 'thumbs-up'
|
||||
));
|
||||
|
||||
$config['navigation_menu']['system/infocenter/InfoCenter/infocenterFreigegeben'] = array(
|
||||
'Zurück' => array(
|
||||
'link' => base_url('index.ci.php/system/infocenter/InfoCenter/index'),
|
||||
'description' => 'Zurück',
|
||||
$config['navigation_menu']['system/infocenter/InfoCenter/freigegeben'] = array(
|
||||
'back' => array(
|
||||
'link' => site_url('system/infocenter/InfoCenter/index'),
|
||||
'description' => 'Home',
|
||||
'icon' => 'angle-left'
|
||||
));
|
||||
)
|
||||
);
|
||||
|
||||
@@ -0,0 +1,214 @@
|
||||
<?php
|
||||
/**
|
||||
* FH-Complete
|
||||
*
|
||||
* @package FHC-API
|
||||
* @author FHC-Team
|
||||
* @copyright Copyright (c) 2016, fhcomplete.org
|
||||
* @license GPLv3
|
||||
* @link http://fhcomplete.org
|
||||
* @since Version 1.0
|
||||
* @filesource
|
||||
*/
|
||||
|
||||
if (! defined('BASEPATH'))
|
||||
exit('No direct script access allowed');
|
||||
|
||||
class AmpelMail extends FHC_Controller
|
||||
{
|
||||
const CIS_AMPELVERWALTUNG_URL =
|
||||
CIS_ROOT. "cis/index.php?menu=".
|
||||
CIS_ROOT. "cis/menu.php?content_id=&content=".
|
||||
CIS_ROOT. "cis/private/tools/ampelverwaltung.php";
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
|
||||
// Allow script execution only from CLI
|
||||
if ($this->input->is_cli_request())
|
||||
{
|
||||
$cli = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->output->set_status_header(403, 'Jobs must be run from the CLI');
|
||||
echo "Jobs must be run from the CLI";
|
||||
exit;
|
||||
}
|
||||
|
||||
// Load models
|
||||
$this->load->model('content/Ampel_model', 'AmpelModel');
|
||||
$this->load->model('person/Person_model', 'PersonModel');
|
||||
|
||||
// Load helpers
|
||||
$this->load->helper('sancho');
|
||||
}
|
||||
|
||||
/**
|
||||
* Main function index as help
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
$result = "The following are the available command line interface commands\n\n";
|
||||
$result .= "php index.ci.php jobs/AmpelMail generateAmpelMail";
|
||||
|
||||
echo $result. PHP_EOL;
|
||||
}
|
||||
|
||||
/**
|
||||
* Generates mail content for new and overdue Ampeln, which
|
||||
* 1. are not confirmed by the user yet and
|
||||
* 2. are marked to be sent by email
|
||||
* Ampel is new when inserted within the last 7 days before the cronjob runs (as cronjob runs weekly)
|
||||
* Ampel is overdue when the cronjob runs after the deadline date.
|
||||
* @return void
|
||||
*/
|
||||
public function generateAmpelMail()
|
||||
{
|
||||
// Get all notifications, that are not expired, not before vorlaufzeit AND email is true
|
||||
$result_active_ampeln = $this->AmpelModel->active(true);
|
||||
|
||||
// Stores users, description, deadline and system-link of notifications
|
||||
$new_ampel_data_arr = array(); // data of new notifications that are not confirmed
|
||||
$overdue_ampel_data_arr = array(); // data of overdue notifications that are not confirmed
|
||||
|
||||
if (hasData($result_active_ampeln))
|
||||
{
|
||||
$ampel_arr = $result_active_ampeln->retval;
|
||||
|
||||
// Loop through ampeln
|
||||
foreach ($ampel_arr as $ampel)
|
||||
{
|
||||
$ampel_id = $ampel->ampel_id;
|
||||
$now = date_create(date('Y-m-d'));
|
||||
$deadline = date_create($ampel->deadline);
|
||||
$insert_date = date_create($ampel->insertamum);
|
||||
$qry_all_ampel_user = $ampel->benutzer_select; // sql select to get all user who get this ampel
|
||||
$new = false;
|
||||
$overdue = false;
|
||||
|
||||
// get all user, who get this ampel
|
||||
$result_ampel_user = $this->AmpelModel->execBenutzerSelect($qry_all_ampel_user);
|
||||
|
||||
if (hasData($result_ampel_user))
|
||||
{
|
||||
$ampel_user_arr = $result_ampel_user->retval;
|
||||
|
||||
// loop through all user, who get this ampel
|
||||
foreach ($ampel_user_arr as $ampel_user)
|
||||
{
|
||||
$uid = $ampel_user->uid;
|
||||
|
||||
// break if ampel was almost confirmed by the user
|
||||
if($this->AmpelModel->isConfirmed($ampel_id, $uid)) break;
|
||||
|
||||
// check if ampel is new (inserted within last week, as cronjob will run every week)
|
||||
if ($now->diff($insert_date)->days <= 7) $new = true;
|
||||
|
||||
//check if ampel is overdue
|
||||
if ($now > $deadline) $overdue = true;
|
||||
|
||||
// if ampel is new
|
||||
if ($new)
|
||||
{
|
||||
$html_text = '<p><strong>'. strtoupper($ampel->kurzbz). '</strong></p><br>';
|
||||
|
||||
// create template-specific data array of new notifications
|
||||
// if uid already exists in the array, only the html text will be added to the existing html text
|
||||
$new_ampel_data_arr =
|
||||
$this->_getAmpelContentData($uid, $html_text, $new_ampel_data_arr);
|
||||
}
|
||||
|
||||
// if ampel is overdue
|
||||
if ($overdue)
|
||||
{
|
||||
$html_text = '
|
||||
<p><strong>'. strtoupper($ampel->kurzbz). '</strong><br>
|
||||
<small>
|
||||
<i style="color: #65696E;">Die Deadline für die Bestätigung war am
|
||||
<span style="color: #FF0000;">'. date_format($deadline, 'Y-m-d'). '</span>
|
||||
</i>
|
||||
</small></p><br>';
|
||||
|
||||
// create template-specific data array of overdue notifications
|
||||
// if uid already exists in the array, only the html text will be added to the existing html text
|
||||
$overdue_ampel_data_arr =
|
||||
$this->_getAmpelContentData($uid, $html_text, $overdue_ampel_data_arr);
|
||||
}
|
||||
}
|
||||
}
|
||||
elseif (isError($result_ampel_user))
|
||||
{
|
||||
show_error($result_ampel_user->error);
|
||||
}
|
||||
}
|
||||
}
|
||||
elseif (isError($result_active_ampeln))
|
||||
{
|
||||
show_error($result_active_ampeln->error);
|
||||
}
|
||||
|
||||
// Send mails for new ampeln merged by user
|
||||
foreach ($new_ampel_data_arr as $new_ampel_data)
|
||||
{
|
||||
sendMail(
|
||||
'Sancho_Content_AmpelNeu',
|
||||
$new_ampel_data,
|
||||
$new_ampel_data['uid']. '@'. DOMAIN,
|
||||
'Du hast eine neue Ampel!',
|
||||
'sancho_header_neue_nachrichten_in_ampelsystem.jpg'
|
||||
);
|
||||
};
|
||||
// Send mails for overdue ampeln merged by user
|
||||
foreach ($overdue_ampel_data_arr as $overdue_ampel_data)
|
||||
{
|
||||
sendMail(
|
||||
'Sancho_Content_AmpelUeberfaellig',
|
||||
$overdue_ampel_data,
|
||||
$overdue_ampel_data['uid']. '@'. DOMAIN,
|
||||
'Bestätige bitte Deine Ampel!',
|
||||
'sancho_header_ampel_overdue.jpg'
|
||||
);
|
||||
};
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------
|
||||
// Private methods
|
||||
/**
|
||||
* Returns associative array with data as needed in the ampel content templates.
|
||||
* @param string $uid UID, needed to merge user.
|
||||
* @param string $html_text Specific HTML Content to be set initially for a user or to add if user exists.
|
||||
* @param array $ampel_data_arr Array with ampeln.
|
||||
* @return array
|
||||
*/
|
||||
private function _getAmpelContentData($uid, $html_text, $ampel_data_arr)
|
||||
{
|
||||
$firstName = $this->PersonModel->getByUid($uid)->retval[0]->vorname;
|
||||
|
||||
// check if user already exists in the array
|
||||
$key_position = array_search($uid, array_column($ampel_data_arr, 'uid'));
|
||||
|
||||
// If user already exists in the array, add only new ampel data to users ampel list
|
||||
if ($key_position !== false)
|
||||
{
|
||||
$ampel_data_arr[$key_position]['ampel_list'] .= $html_text;
|
||||
}
|
||||
// If user does not exist, create new user and push all data needed
|
||||
else
|
||||
{
|
||||
$ampel_data_arr[] = array(
|
||||
'uid' => $uid,
|
||||
'firstName' => $firstName,
|
||||
'ampel_list' => $html_text,
|
||||
'link' => self::CIS_AMPELVERWALTUNG_URL
|
||||
);
|
||||
}
|
||||
return $ampel_data_arr;
|
||||
}
|
||||
}
|
||||
@@ -39,7 +39,7 @@ class Prestudentstatus extends FHC_Controller
|
||||
public function index()
|
||||
{
|
||||
$result = "The following are the available command line interface commands\n\n";
|
||||
$result .= "php index.ci.php jobs/Prestudentstatus CorrectStudienplan";
|
||||
$result .= "php ".$this->config->item('index_page')." jobs/Prestudentstatus CorrectStudienplan";
|
||||
|
||||
echo $result.PHP_EOL;
|
||||
}
|
||||
|
||||
@@ -3,178 +3,82 @@
|
||||
if (! defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
/**
|
||||
*
|
||||
* This controller operates between (interface) the JS (GUI) and the NavigationLib (back-end)
|
||||
* Provides data to the ajax get calls about the filter
|
||||
* This controller works with JSON calls on the HTTP GET or POST and the output is always JSON
|
||||
*/
|
||||
class Navigation extends VileSci_Controller
|
||||
class Navigation extends FHC_Controller
|
||||
{
|
||||
const SESSION_NAME = 'NAVIGATION_MENU';
|
||||
const NAVIGATION_PAGE_PARAM = 'navigation_page'; // Navigation page parameter name
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
* Loads the NavigationLib where the used logic lies
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
parent::__construct(); // parents constructor
|
||||
|
||||
$this->config->load('navigation');
|
||||
|
||||
// Load session library
|
||||
$this->load->library('session');
|
||||
$this->load->library('ExtensionsLib');
|
||||
$this->_loadNavigationLib(); // Loads the NavigationLib with parameters
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------------------------------------------
|
||||
// Public methods
|
||||
|
||||
/**
|
||||
* This function creates the left Menu for each Page
|
||||
* @param navigation_widget_called GET Parameter witch holds the currently called Page
|
||||
* @param NAVIGATION_PAGE_PARAM GET Parameter witch holds the currently called Page
|
||||
* @return JSON object with the Menu Entries
|
||||
*/
|
||||
public function menu()
|
||||
{
|
||||
$navigation_widget_called = $this->input->get('navigation_widget_called');
|
||||
$json = array();
|
||||
$menuArray = $this->navigationlib->getMenuArray($this->input->get(self::NAVIGATION_PAGE_PARAM));
|
||||
|
||||
if (isset($navigation_widget_called))
|
||||
{
|
||||
// Get Menu Entries of the Core
|
||||
$navigationMenuArray = $this->config->item('navigation_menu');
|
||||
$json = $this->wildcardsearch($navigationMenuArray, $navigation_widget_called);
|
||||
|
||||
// Load Menu Entries of Extensions
|
||||
$extensions = $this->extensionslib->getInstalledExtensions();
|
||||
if(hasData($extensions))
|
||||
{
|
||||
$json_extension = array();
|
||||
foreach($extensions->retval as $ext)
|
||||
{
|
||||
$filename = APPPATH.'config/'.ExtensionsLib::EXTENSIONS_DIR_NAME.'/'.$ext->name.'/navigation.php';
|
||||
if (file_exists($filename))
|
||||
{
|
||||
unset($config);
|
||||
include($filename);
|
||||
if(isset($config['navigation_menu']) && is_array($config['navigation_menu']))
|
||||
{
|
||||
$json_extension = array_merge_recursive($json_extension, $this->wildcardsearch($config['navigation_menu'], $navigation_widget_called));
|
||||
}
|
||||
}
|
||||
}
|
||||
// Merge Extension Menuentries with the Core Entries
|
||||
$json = array_merge_recursive($json, $json_extension);
|
||||
}
|
||||
|
||||
// Load dynamic Menu Entries from Session
|
||||
if (isset($_SESSION['navigation_menu']))
|
||||
{
|
||||
$navigationMenuSessionArray = $_SESSION['navigation_menu'];
|
||||
|
||||
if (isset($navigationMenuSessionArray) && is_array($navigationMenuSessionArray))
|
||||
{
|
||||
if (isset($navigationMenuSessionArray[$navigation_widget_called]))
|
||||
{
|
||||
$json = array_merge_recursive($json, $navigationMenuSessionArray[$navigation_widget_called]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$this->output->set_content_type('application/json')->set_output(json_encode($json));
|
||||
$this->outputJsonSuccess($menuArray);
|
||||
}
|
||||
|
||||
/**
|
||||
* This function creates the Top Menu for each Page
|
||||
* @param navigation_widget_called GET Parameter witch holds the currently called Page
|
||||
* @param NAVIGATION_PAGE_PARAM GET Parameter witch holds the currently called Page
|
||||
* @return JSON object with the Menu Entries
|
||||
*/
|
||||
public function header()
|
||||
{
|
||||
$navigation_widget_called = $this->input->get('navigation_widget_called');
|
||||
$json = array();
|
||||
$headerArray = $this->navigationlib->getHeaderArray($this->input->get(self::NAVIGATION_PAGE_PARAM));
|
||||
|
||||
if (isset($navigation_widget_called))
|
||||
{
|
||||
// Load Header Entries of Core
|
||||
$navigationHeaderArray = $this->config->item('navigation_header');
|
||||
$json = $this->wildcardsearch($navigationHeaderArray, $navigation_widget_called);
|
||||
|
||||
// Load Header Entries of Extensions
|
||||
$extensions = $this->extensionslib->getInstalledExtensions();
|
||||
if(hasData($extensions))
|
||||
{
|
||||
$json_extension = array();
|
||||
foreach($extensions->retval as $ext)
|
||||
{
|
||||
$filename = APPPATH.'config/'.ExtensionsLib::EXTENSIONS_DIR_NAME.'/'.$ext->name.'/navigation.php';
|
||||
if (file_exists($filename))
|
||||
{
|
||||
unset($config);
|
||||
include($filename);
|
||||
if(isset($config['navigation_header']) && is_array($config['navigation_header']))
|
||||
{
|
||||
$json_extension = array_merge_recursive($json_extension, $this->wildcardsearch($config['navigation_header'], $navigation_widget_called));
|
||||
}
|
||||
}
|
||||
}
|
||||
$json = array_merge_recursive($json, $json_extension);
|
||||
}
|
||||
|
||||
// Load dynamic Header Entries from Session
|
||||
if (isset($_SESSION['navigation_header']))
|
||||
{
|
||||
$navigationHeaderSessionArray = $_SESSION['navigation_header'];
|
||||
|
||||
if (isset($navigationHeaderSessionArray) && is_array($navigationHeaderSessionArray))
|
||||
{
|
||||
if (isset($navigationHeaderSessionArray[$navigation_widget_called]))
|
||||
{
|
||||
$jsontmp = $this->wildcardsearch($navigationHeaderSessionArray, $navigation_widget_called);
|
||||
$json = array_merge_recursive($json, $jsontmp);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$this->output->set_content_type('application/json')->set_output(json_encode($json));
|
||||
$this->outputJsonSuccess($headerArray);
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------------------------------------------
|
||||
// Private methods
|
||||
|
||||
/**
|
||||
* Searches a Menuentry. If there is no exact entry it searches for Wildcard Entries with a Star
|
||||
* Example:
|
||||
* Searching for /system/foo/index will Match the following Menuentries:
|
||||
* /system/foo/index
|
||||
* /system/foo/*
|
||||
* /system/*
|
||||
* *
|
||||
*
|
||||
* @param $navigationArray Array to Search in.
|
||||
* @param $navigation_widget_called Navigation to search for.
|
||||
* @return Navigation Array if found, empty array otherwise
|
||||
* Loads the FiltersLib with the NAVIGATION_PAGE_PARAM parameter
|
||||
* If the parameter NAVIGATION_PAGE_PARAM is not given then the execution of the controller is terminated and
|
||||
* an error message is printed
|
||||
*/
|
||||
private function wildcardsearch($navigationArray, $navigation_widget_called)
|
||||
private function _loadNavigationLib()
|
||||
{
|
||||
// Sort Navigation to have them in correct order
|
||||
krsort($navigationArray);
|
||||
|
||||
// 100% match found
|
||||
if(isset($navigationArray[$navigation_widget_called]))
|
||||
// If the parameter NAVIGATION_PAGE_PARAM is present in the HTTP GET or POST
|
||||
if (isset($_GET[self::NAVIGATION_PAGE_PARAM]) || isset($_POST[self::NAVIGATION_PAGE_PARAM]))
|
||||
{
|
||||
return $navigationArray[$navigation_widget_called];
|
||||
}
|
||||
else
|
||||
{
|
||||
foreach($navigationArray as $key=>$row)
|
||||
// If it is present in the HTTP GET
|
||||
if (isset($_GET[self::NAVIGATION_PAGE_PARAM]))
|
||||
{
|
||||
// Search for * Entries
|
||||
if(mb_strpos($key, '*') === 0 || mb_strpos($key, '*') === mb_strlen($key) - 1)
|
||||
{
|
||||
// Take * Entry if Matches
|
||||
$search = mb_substr($key, 0, -1);
|
||||
if($search == '' || mb_strpos($navigation_widget_called, $search) === 0)
|
||||
{
|
||||
return $row;
|
||||
}
|
||||
}
|
||||
$navigationPage = $this->input->get(self::NAVIGATION_PAGE_PARAM); // is retrived from the HTTP GET
|
||||
}
|
||||
elseif (isset($_POST[self::NAVIGATION_PAGE_PARAM])) // Else if it is present in the HTTP POST
|
||||
{
|
||||
$navigationPage = $this->input->post(self::NAVIGATION_PAGE_PARAM); // is retrived from the HTTP POST
|
||||
}
|
||||
}
|
||||
|
||||
return array();
|
||||
// Loads the FiltersLib that contains all the used logic
|
||||
$this->load->library('NavigationLib', array(self::NAVIGATION_PAGE_PARAM => $navigationPage));
|
||||
}
|
||||
else // Otherwise an error will be written in the output
|
||||
{
|
||||
// NOTE: Used echo to speed up the output before the exit otherwise it's not shown
|
||||
echo 'Parameter "'.self::NAVIGATION_PAGE_PARAM.'" not provided!';
|
||||
exit;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
if (! defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
/**
|
||||
* Also shows infocenter-related data for a person and its prestudents, enables document and zgv checks,
|
||||
* Shows infocenter-related data for a person and its prestudents, enables document and zgv checks,
|
||||
* displays and saves Notizen for a person, logs infocenter-related actions for a person
|
||||
*/
|
||||
class InfoCenter extends FHC_Controller
|
||||
@@ -11,13 +11,19 @@ class InfoCenter extends FHC_Controller
|
||||
// App and Verarbeitungstaetigkeit name for logging
|
||||
const APP = 'infocenter';
|
||||
const TAETIGKEIT = 'bewerbung';
|
||||
const FILTER_ID = 'filter_id';
|
||||
|
||||
// URL prefix for this controller
|
||||
const URL_PREFIX = '/system/infocenter/InfoCenter';
|
||||
const INFOCENTER_URI = 'system/infocenter/InfoCenter'; // URL prefix for this controller
|
||||
const INDEX_PAGE = 'index';
|
||||
const FREIGEGEBEN_PAGE = 'freigegeben';
|
||||
const SHOW_DETAILS_PAGE = 'showDetails';
|
||||
|
||||
const NAVIGATION_PAGE = 'navigation_page';
|
||||
const ORIGIN_PAGE = 'origin_page';
|
||||
|
||||
private $_uid; // contains the UID of the logged user
|
||||
|
||||
// Used to log with PersonLogLib
|
||||
private $logparams = array(
|
||||
private $_logparams = array(
|
||||
'saveformalgep' => array(
|
||||
'logtype' => 'Action',
|
||||
'name' => 'Document formally checked',
|
||||
@@ -53,7 +59,6 @@ class InfoCenter extends FHC_Controller
|
||||
'success' => null
|
||||
)
|
||||
);
|
||||
private $uid; // contains the UID of the logged user
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
@@ -74,7 +79,6 @@ class InfoCenter extends FHC_Controller
|
||||
$this->load->model('system/personLock_model', 'PersonLockModel');
|
||||
|
||||
// Loads libraries
|
||||
$this->load->library('DmsLib');
|
||||
$this->load->library('PersonLogLib');
|
||||
$this->load->library('WidgetLib');
|
||||
|
||||
@@ -96,34 +100,42 @@ class InfoCenter extends FHC_Controller
|
||||
show_error('You have no Permission! You need Infocenter Role');
|
||||
|
||||
$this->setControllerId(); // sets the controller id
|
||||
|
||||
$this->fhc_controller_id = $this->getControllerId();
|
||||
|
||||
$this->setNavigationMenuArray(); // sets property navigationMenuArray
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------------------------------------------
|
||||
// Public methods
|
||||
|
||||
/**
|
||||
* Default
|
||||
* Main page of the InfoCenter tool
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
$this->load->view('system/infocenter/infocenter.php', array('fhc_controller_id' => $this->fhc_controller_id));
|
||||
}
|
||||
$this->_setNavigationMenuIndex(); // define the navigation menu for this page
|
||||
|
||||
public function infocenterFreigegeben()
|
||||
{
|
||||
$this->load->view('system/infocenter/infocenterFreigegeben.php', array('fhc_controller_id' => $this->fhc_controller_id));
|
||||
$this->load->view('system/infocenter/infocenter.php');
|
||||
}
|
||||
|
||||
/**
|
||||
* Freigegeben page of the InfoCenter tool
|
||||
*/
|
||||
public function freigegeben()
|
||||
{
|
||||
$this->_setNavigationMenuFreigegeben(); // define the navigation menu for this page
|
||||
|
||||
$this->load->view('system/infocenter/infocenterFreigegeben.php');
|
||||
}
|
||||
|
||||
/**
|
||||
* Personal details page of the InfoCenter tool
|
||||
* Initialization function, gets person and prestudent data and loads the view with the data
|
||||
* @param $person_id
|
||||
*/
|
||||
public function showDetails($person_id)
|
||||
public function showDetails()
|
||||
{
|
||||
$this->_setNavigationMenuShowDetails();
|
||||
|
||||
$person_id = $this->input->get('person_id');
|
||||
|
||||
if (!is_numeric($person_id))
|
||||
show_error('person id is not numeric!');
|
||||
|
||||
@@ -135,13 +147,11 @@ class InfoCenter extends FHC_Controller
|
||||
if (empty($personexists->retval))
|
||||
show_error('person does not exist!');
|
||||
|
||||
$show_lock_link_get = $this->input->get('show_lock_link');
|
||||
$show_lock_link = !isset($show_lock_link_get) || $show_lock_link_get === '1';
|
||||
|
||||
if ($show_lock_link)
|
||||
$origin_page = $this->input->get(self::ORIGIN_PAGE);
|
||||
if ($origin_page == self::INDEX_PAGE)
|
||||
{
|
||||
//mark person as locked for editing
|
||||
$result = $this->PersonLockModel->lockPerson($person_id, $this->uid, self::APP);
|
||||
// mark person as locked for editing
|
||||
$result = $this->PersonLockModel->lockPerson($person_id, $this->_uid, self::APP);
|
||||
|
||||
if (isError($result))
|
||||
show_error($result->retval);
|
||||
@@ -152,11 +162,11 @@ class InfoCenter extends FHC_Controller
|
||||
|
||||
$data = array_merge(
|
||||
$persondata,
|
||||
$prestudentdata,
|
||||
array('show_lock_link' => $show_lock_link)
|
||||
$prestudentdata
|
||||
);
|
||||
|
||||
$data['fhc_controller_id'] = $this->fhc_controller_id;
|
||||
$data[self::FHC_CONTROLLER_ID] = $this->getControllerId();
|
||||
$data[self::ORIGIN_PAGE] = $origin_page;
|
||||
|
||||
$this->load->view('system/infocenter/infocenterDetails.php', $data);
|
||||
}
|
||||
@@ -172,7 +182,7 @@ class InfoCenter extends FHC_Controller
|
||||
if (isError($result))
|
||||
show_error($result->retval);
|
||||
|
||||
redirect(self::URL_PREFIX.'?fhc_controller_id='.$this->fhc_controller_id);
|
||||
redirect('/'.self::INFOCENTER_URI.'?'.self::FHC_CONTROLLER_ID.'='.$this->getControllerId());
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -211,9 +221,7 @@ class InfoCenter extends FHC_Controller
|
||||
}
|
||||
}
|
||||
|
||||
$this->output
|
||||
->set_content_type('application/json')
|
||||
->set_output(json_encode($json));
|
||||
$this->output->set_content_type('application/json')->set_output(json_encode($json));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -224,9 +232,7 @@ class InfoCenter extends FHC_Controller
|
||||
{
|
||||
$prestudent = $this->PrestudentModel->getLastPrestudent($person_id, true);
|
||||
|
||||
$this->output
|
||||
->set_content_type('application/json')
|
||||
->set_output(json_encode($prestudent));
|
||||
$this->output->set_content_type('application/json')->set_output(json_encode($prestudent));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -305,9 +311,7 @@ class InfoCenter extends FHC_Controller
|
||||
$this->_log($logdata['person_id'], 'savezgv', array($logdata['studiengang_kurzbz'], $prestudent_id));
|
||||
}
|
||||
}
|
||||
$this->output
|
||||
->set_content_type('application/json')
|
||||
->set_output(json_encode($result));
|
||||
$this->output->set_content_type('application/json')->set_output(json_encode($result));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -318,7 +322,6 @@ class InfoCenter extends FHC_Controller
|
||||
public function saveAbsage($prestudent_id)
|
||||
{
|
||||
$statusgrund = $this->input->post('statusgrund');
|
||||
$this->fhc_controller_id = $this->input->post('fhc_controller_id');
|
||||
|
||||
$lastStatus = $this->PrestudentstatusModel->getLastStatus($prestudent_id);
|
||||
|
||||
@@ -340,7 +343,7 @@ class InfoCenter extends FHC_Controller
|
||||
'studienplan_id' => $lastStatus->retval[0]->studienplan_id,
|
||||
'status_kurzbz' => 'Abgewiesener',
|
||||
'statusgrund_id' => $statusgrund,
|
||||
'insertvon' => $this->uid,
|
||||
'insertvon' => $this->_uid,
|
||||
'insertamum' => date('Y-m-d H:i:s')
|
||||
)
|
||||
);
|
||||
@@ -396,9 +399,9 @@ class InfoCenter extends FHC_Controller
|
||||
'ausbildungssemester' => $lastStatus->ausbildungssemester
|
||||
),
|
||||
array(
|
||||
'bestaetigtvon' => $this->uid,
|
||||
'bestaetigtvon' => $this->_uid,
|
||||
'bestaetigtam' => date('Y-m-d'),
|
||||
'updatevon' => $this->uid,
|
||||
'updatevon' => $this->_uid,
|
||||
'updateamum' => date('Y-m-d H:i:s')
|
||||
)
|
||||
);
|
||||
@@ -454,16 +457,14 @@ class InfoCenter extends FHC_Controller
|
||||
$text = $this->input->post('notiz');
|
||||
$erledigt = false;
|
||||
|
||||
$result = $this->NotizModel->addNotizForPerson($person_id, $titel, $text, $erledigt, $this->uid);
|
||||
$result = $this->NotizModel->addNotizForPerson($person_id, $titel, $text, $erledigt, $this->_uid);
|
||||
|
||||
if (isSuccess($result))
|
||||
{
|
||||
$this->_log($person_id, 'savenotiz', array($titel));
|
||||
}
|
||||
|
||||
$this->output
|
||||
->set_content_type('application/json')
|
||||
->set_output(json_encode($result));
|
||||
$this->output->set_content_type('application/json')->set_output(json_encode($result));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -482,9 +483,9 @@ class InfoCenter extends FHC_Controller
|
||||
array(
|
||||
'titel' => $titel,
|
||||
'text' => $text,
|
||||
'verfasser_uid' => $this->uid,
|
||||
'verfasser_uid' => $this->_uid,
|
||||
"updateamum" => 'NOW()',
|
||||
"updatevon" => $this->uid
|
||||
"updatevon" => $this->_uid
|
||||
)
|
||||
);
|
||||
|
||||
@@ -494,9 +495,7 @@ class InfoCenter extends FHC_Controller
|
||||
$this->_log($person_id, 'updatenotiz', array($titel));
|
||||
}
|
||||
|
||||
$this->output
|
||||
->set_content_type('application/json')
|
||||
->set_output(json_encode($result));
|
||||
$this->output->set_content_type('application/json')->set_output(json_encode($result));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -531,6 +530,8 @@ class InfoCenter extends FHC_Controller
|
||||
*/
|
||||
public function outputAkteContent($akte_id)
|
||||
{
|
||||
$this->load->library('DmsLib');
|
||||
|
||||
$akte = $this->AkteModel->load($akte_id);
|
||||
|
||||
if (isError($akte))
|
||||
@@ -561,9 +562,7 @@ class InfoCenter extends FHC_Controller
|
||||
{
|
||||
$result = $this->personloglib->getParkedDate($person_id);
|
||||
|
||||
$this->output
|
||||
->set_content_type('application/json')
|
||||
->set_output(json_encode($result));
|
||||
$this->output->set_content_type('application/json')->set_output(json_encode($result));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -574,11 +573,9 @@ class InfoCenter extends FHC_Controller
|
||||
$person_id = $this->input->post('person_id');
|
||||
$date = $this->input->post('parkdate');
|
||||
|
||||
$result = $this->personloglib->park($person_id, date_format(date_create($date), 'Y-m-d'), self::TAETIGKEIT, self::APP, null, $this->uid);
|
||||
$result = $this->personloglib->park($person_id, date_format(date_create($date), 'Y-m-d'), self::TAETIGKEIT, self::APP, null, $this->_uid);
|
||||
|
||||
$this->output
|
||||
->set_content_type('application/json')
|
||||
->set_output(json_encode($result));
|
||||
$this->output->set_content_type('application/json')->set_output(json_encode($result));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -590,9 +587,7 @@ class InfoCenter extends FHC_Controller
|
||||
|
||||
$result = $this->personloglib->unPark($person_id);
|
||||
|
||||
$this->output
|
||||
->set_content_type('application/json')
|
||||
->set_output(json_encode($result));
|
||||
$this->output->set_content_type('application/json')->set_output(json_encode($result));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -611,9 +606,26 @@ class InfoCenter extends FHC_Controller
|
||||
$json = $result->retval[0]->ende;
|
||||
}
|
||||
|
||||
$this->output
|
||||
->set_content_type('application/json')
|
||||
->set_output(json_encode($json));
|
||||
$this->output->set_content_type('application/json')->set_output(json_encode($json));
|
||||
}
|
||||
|
||||
/**
|
||||
* Wrapper for setNavigationMenu, returns JSON message
|
||||
*/
|
||||
public function setNavigationMenuArrayJson()
|
||||
{
|
||||
$navigation_page = $this->input->get(self::NAVIGATION_PAGE);
|
||||
|
||||
if (strpos($navigation_page, self::INDEX_PAGE) !== false)
|
||||
{
|
||||
$this->_setNavigationMenuIndex();
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->_setNavigationMenuFreigegeben();
|
||||
}
|
||||
|
||||
$this->outputJsonSuccess('success');
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------------------------------------------
|
||||
@@ -624,18 +636,21 @@ class InfoCenter extends FHC_Controller
|
||||
*/
|
||||
private function _setAuthUID()
|
||||
{
|
||||
$this->uid = getAuthUID();
|
||||
$this->_uid = getAuthUID();
|
||||
|
||||
if (!$this->uid) show_error('User authentification failed');
|
||||
if (!$this->_uid) show_error('User authentification failed');
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Define the navigation menu for the index page
|
||||
*/
|
||||
public function setNavigationMenuArray()
|
||||
private function _setNavigationMenuIndex()
|
||||
{
|
||||
$this->load->library('NavigationLib', array(self::NAVIGATION_PAGE => self::INFOCENTER_URI.'/'.self::INDEX_PAGE));
|
||||
|
||||
$listFiltersSent = array();
|
||||
$listFiltersNotSent = array();
|
||||
$listCustomFilters = array();
|
||||
|
||||
$filtersSent = $this->FiltersModel->getFilterList('infocenter', 'PersonActions', '%InfoCenterSentApplication%');
|
||||
if (hasData($filtersSent))
|
||||
@@ -659,7 +674,7 @@ class InfoCenter extends FHC_Controller
|
||||
}
|
||||
}
|
||||
|
||||
$customFilters = $this->FiltersModel->getCustomFiltersList('infocenter', 'PersonActions', $this->uid);
|
||||
$customFilters = $this->FiltersModel->getCustomFiltersList('infocenter', 'PersonActions', $this->_uid);
|
||||
if (hasData($customFilters))
|
||||
{
|
||||
for ($filtersCounter = 0; $filtersCounter < count($customFilters->retval); $filtersCounter++)
|
||||
@@ -670,95 +685,203 @@ class InfoCenter extends FHC_Controller
|
||||
}
|
||||
}
|
||||
|
||||
$filtersarray = array(
|
||||
'abgeschickt' => array(
|
||||
'link' => '#',
|
||||
'description' => ucfirst($this->p->t('global', 'abgeschickt')),
|
||||
'expand' => true,
|
||||
'children' => array()
|
||||
),
|
||||
'nichtabgeschickt' => array(
|
||||
'link' => '#',
|
||||
'description' => ucfirst($this->p->t('global', 'nichtAbgeschickt')),
|
||||
'expand' => true,
|
||||
'children' => array()
|
||||
)
|
||||
$filtersArray = array();
|
||||
|
||||
$filtersArray['abgeschickt'] = $this->navigationlib->oneLevel(
|
||||
ucfirst($this->p->t('global', 'abgeschickt')), // description
|
||||
'#', // link
|
||||
array(), // children
|
||||
'', // icon
|
||||
true // expand
|
||||
);
|
||||
|
||||
$this->_fillFilters($listFiltersSent, $filtersarray['abgeschickt']);
|
||||
$this->_fillFilters($listFiltersNotSent, $filtersarray['nichtabgeschickt']);
|
||||
$filtersArray['nichtabgeschickt'] = $this->navigationlib->oneLevel(
|
||||
ucfirst($this->p->t('global', 'nichtAbgeschickt')), // description
|
||||
'#', // link
|
||||
array(), // children
|
||||
'', // icon
|
||||
true // expand
|
||||
);
|
||||
|
||||
if (isset($listCustomFilters) && is_array($listCustomFilters) && count($listCustomFilters) > 0)
|
||||
$this->_fillFilters($listFiltersSent, $filtersArray['abgeschickt']);
|
||||
$this->_fillFilters($listFiltersNotSent, $filtersArray['nichtabgeschickt']);
|
||||
|
||||
if (count($listCustomFilters) > 0)
|
||||
{
|
||||
$filtersarray['personal'] = array(
|
||||
'link' => '#',
|
||||
'description' => 'Personal filters',
|
||||
'expand' => true,
|
||||
'children' => array()
|
||||
$filtersArray['personal'] = $this->navigationlib->oneLevel(
|
||||
'Personal filters', // description
|
||||
'#', // link
|
||||
array(), // children
|
||||
'', // icon
|
||||
true // expand
|
||||
);
|
||||
|
||||
$this->_fillCustomFilters($listCustomFilters, $filtersarray['personal']);
|
||||
$this->_fillCustomFilters($listCustomFilters, $filtersArray['personal']);
|
||||
}
|
||||
|
||||
if (!isset($_SESSION['navigation_menu']))
|
||||
{
|
||||
$_SESSION['navigation_menu'] = array();
|
||||
}
|
||||
|
||||
$_SESSION['navigation_menu']['system/infocenter/InfoCenter/index'] = array(
|
||||
'filters' => array(
|
||||
'link' => '#',
|
||||
'description' => 'Filter',
|
||||
'icon' => 'filter',
|
||||
'expand' => true,
|
||||
'children' => $filtersarray
|
||||
)
|
||||
);
|
||||
|
||||
$_SESSION['navigation_menu']['system/infocenter/InfoCenter/showDetails'] = array(
|
||||
'filters' => array(
|
||||
'link' => '#',
|
||||
'description' => 'Filter',
|
||||
'icon' => 'filter',
|
||||
'expand' => true,
|
||||
'children' => $filtersarray
|
||||
$this->navigationlib->setSessionMenu(
|
||||
array(
|
||||
'filters' => $this->navigationlib->oneLevel(
|
||||
'Filter', // description
|
||||
'#', // link
|
||||
$filtersArray, // children
|
||||
'', // icon
|
||||
true // expand
|
||||
)
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Wrapper for setNavigationMenu, returns JSON message
|
||||
* Define the navigation menu for the showDetails page
|
||||
*/
|
||||
public function setNavigationMenuArrayJson()
|
||||
private function _setNavigationMenuShowDetails()
|
||||
{
|
||||
$this->setNavigationMenuArray();
|
||||
$this->load->library('NavigationLib', array(self::NAVIGATION_PAGE => self::INFOCENTER_URI.'/'.self::SHOW_DETAILS_PAGE));
|
||||
|
||||
$this->output
|
||||
->set_content_type('application/json')
|
||||
->set_output(json_encode(success('success')));
|
||||
$origin_page = $this->input->get(self::ORIGIN_PAGE);
|
||||
|
||||
$link = site_url(self::INFOCENTER_URI.'/'.self::INDEX_PAGE);
|
||||
if ($origin_page == self::FREIGEGEBEN_PAGE)
|
||||
{
|
||||
$link = site_url(self::INFOCENTER_URI.'/'.self::FREIGEGEBEN_PAGE);
|
||||
}
|
||||
|
||||
$this->navigationlib->setSessionMenu(
|
||||
array(
|
||||
'back' => $this->navigationlib->oneLevel(
|
||||
'<< Züruck', // description
|
||||
$link, // link
|
||||
array(), // children
|
||||
'', // icon
|
||||
true // expand
|
||||
)
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Define the navigation menu for the freigegeben page
|
||||
*/
|
||||
private function _setNavigationMenuFreigegeben()
|
||||
{
|
||||
$this->load->library('NavigationLib', array(self::NAVIGATION_PAGE => self::INFOCENTER_URI.'/'.self::FREIGEGEBEN_PAGE));
|
||||
|
||||
$listFilters = array();
|
||||
$listCustomFilters = array();
|
||||
|
||||
$filters = $this->FiltersModel->getFilterList('infocenter', 'PersonActions', '%InfoCenterFreigegeben%');
|
||||
if (hasData($filters))
|
||||
{
|
||||
for ($filtersCounter = 0; $filtersCounter < count($filters->retval); $filtersCounter++)
|
||||
{
|
||||
$filter = $filters->retval[$filtersCounter];
|
||||
|
||||
$listFilters[$filter->filter_id] = $filter->description[0];
|
||||
}
|
||||
}
|
||||
|
||||
$customFilters = $this->FiltersModel->getCustomFiltersList('infocenter', 'PersonActions', $this->_uid);
|
||||
if (hasData($customFilters))
|
||||
{
|
||||
for ($filtersCounter = 0; $filtersCounter < count($customFilters->retval); $filtersCounter++)
|
||||
{
|
||||
$filter = $customFilters->retval[$filtersCounter];
|
||||
|
||||
$listCustomFilters[$filter->filter_id] = $filter->description[0];
|
||||
}
|
||||
}
|
||||
|
||||
$filtersArray = array();
|
||||
$filtersArray['children'] = array();
|
||||
|
||||
$this->_fillFiltersFreigegeben($listFilters, $filtersArray);
|
||||
|
||||
if (count($listCustomFilters) > 0)
|
||||
{
|
||||
$filtersArray['children']['personal'] = $this->navigationlib->oneLevel(
|
||||
'Personal filters', // description
|
||||
'#', // link
|
||||
array(), // children
|
||||
'', // icon
|
||||
true // expand
|
||||
);
|
||||
|
||||
$this->_fillCustomFilters($listCustomFilters, $filtersArray['children']['personal']);
|
||||
}
|
||||
|
||||
$this->navigationlib->setSessionMenu(
|
||||
array(
|
||||
'filters' => $this->navigationlib->oneLevel(
|
||||
'Filter', // description
|
||||
'#', // link
|
||||
$filtersArray['children'], // children
|
||||
'', // icon
|
||||
true // expand
|
||||
)
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Utility method used to fill elements of the InfoCenter left menu of the main InfoCenter page
|
||||
*/
|
||||
private function _fillFilters($filters, &$tofill)
|
||||
{
|
||||
$toPrint = "%s?%s=%s&%s=%s";
|
||||
|
||||
foreach ($filters as $filterId => $description)
|
||||
{
|
||||
$toPrint = "%s?%s=%s";
|
||||
|
||||
$tofill['children'][] = array(
|
||||
'link' => sprintf($toPrint, site_url('system/infocenter/InfoCenter'), 'filter_id', $filterId),
|
||||
'link' => sprintf(
|
||||
$toPrint,
|
||||
site_url(self::INFOCENTER_URI), 'filter_id', $filterId,
|
||||
FHC_Controller::FHC_CONTROLLER_ID,
|
||||
$this->getControllerId()
|
||||
),
|
||||
'description' => $description
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
private function _fillCustomFilters($filters, &$tofill)
|
||||
/**
|
||||
* Utility method used to fill elements of the InfoCenter left menu of the freigegeben InfoCenter page
|
||||
*/
|
||||
private function _fillFiltersFreigegeben($filters, &$tofill)
|
||||
{
|
||||
$toPrint = "%s?%s=%s&%s=%s";
|
||||
|
||||
foreach ($filters as $filterId => $description)
|
||||
{
|
||||
$toPrint = "%s?%s=%s";
|
||||
|
||||
$tofill['children'][] = array(
|
||||
'link' => sprintf($toPrint, site_url('system/infocenter/InfoCenter'), 'filter_id', $filterId),
|
||||
'link' => sprintf(
|
||||
$toPrint,
|
||||
site_url(self::INFOCENTER_URI.'/'.self::FREIGEGEBEN_PAGE), 'filter_id', $filterId,
|
||||
FHC_Controller::FHC_CONTROLLER_ID,
|
||||
$this->getControllerId()
|
||||
),
|
||||
'description' => $description
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Utility method used to fill elements of the InfoCenter left menu
|
||||
* with the list of the custom filter of the authenticated user
|
||||
*/
|
||||
private function _fillCustomFilters($filters, &$tofill)
|
||||
{
|
||||
$toPrint = "%s?%s=%s&%s=%s";
|
||||
|
||||
foreach ($filters as $filterId => $description)
|
||||
{
|
||||
$tofill['children'][] = array(
|
||||
'link' => sprintf(
|
||||
$toPrint,
|
||||
site_url(self::INFOCENTER_URI), 'filter_id', $filterId,
|
||||
FHC_Controller::FHC_CONTROLLER_ID,
|
||||
$this->getControllerId()
|
||||
),
|
||||
'description' => $description,
|
||||
'subscriptDescription' => 'Remove',
|
||||
'subscriptLinkClass' => 'remove-custom-filter',
|
||||
@@ -789,7 +912,7 @@ class InfoCenter extends FHC_Controller
|
||||
if (isset($locked->retval[0]->uid))
|
||||
{
|
||||
$lockedby = $locked->retval[0]->uid;
|
||||
if ($lockedby !== $this->uid)
|
||||
if ($lockedby !== $this->_uid)
|
||||
$lockedbyother = true;
|
||||
}
|
||||
|
||||
@@ -840,7 +963,7 @@ class InfoCenter extends FHC_Controller
|
||||
show_error($notizen_bewerbung->retval);
|
||||
}
|
||||
|
||||
$user_person = $this->PersonModel->getByUid($this->uid);
|
||||
$user_person = $this->PersonModel->getByUid($this->_uid);
|
||||
|
||||
if (isError($user_person))
|
||||
{
|
||||
@@ -949,7 +1072,18 @@ class InfoCenter extends FHC_Controller
|
||||
$this->PrestudentModel->addSelect('person_id');
|
||||
$person_id = $this->PrestudentModel->load($prestudent_id)->retval[0]->person_id;
|
||||
|
||||
redirect(self::URL_PREFIX.'/showDetails/'.$person_id.'?fhc_controller_id='.$this->fhc_controller_id.'#'.$section);
|
||||
redirect(
|
||||
sprintf(
|
||||
'/%s/%s?%s=%s&%s=%s#%s',
|
||||
self::INFOCENTER_URI,
|
||||
self::SHOW_DETAILS_PAGE,
|
||||
'person_id',
|
||||
$person_id,
|
||||
self::FHC_CONTROLLER_ID,
|
||||
$this->getControllerId(),
|
||||
$section
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -981,7 +1115,7 @@ class InfoCenter extends FHC_Controller
|
||||
*/
|
||||
private function _log($person_id, $logname, $messageparams)
|
||||
{
|
||||
$logdata = $this->logparams[$logname];
|
||||
$logdata = $this->_logparams[$logname];
|
||||
|
||||
$datatolog = array(
|
||||
'name' => $logdata['name']
|
||||
@@ -1000,7 +1134,7 @@ class InfoCenter extends FHC_Controller
|
||||
self::TAETIGKEIT,
|
||||
self::APP,
|
||||
null,
|
||||
$this->uid
|
||||
$this->_uid
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
* @license GPLv3
|
||||
* @since Version 1.0.0
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* Message Helper
|
||||
*
|
||||
@@ -35,7 +35,7 @@ function success($retval, $code = null, $msg_indx_prefix = 'fhc_')
|
||||
$success->fhcCode = $code;
|
||||
if (!is_null($code)) $success->msg = lang($msg_indx_prefix . $code);
|
||||
$success->retval = $retval;
|
||||
|
||||
|
||||
return $success;
|
||||
}
|
||||
|
||||
@@ -51,7 +51,7 @@ function error($retval = '', $code = null, $msg_indx_prefix = 'fhc_')
|
||||
$error->fhcCode = $code;
|
||||
if (!is_null($code)) $error->msg = lang($msg_indx_prefix . $code);
|
||||
$error->retval = $retval;
|
||||
|
||||
|
||||
return $error;
|
||||
}
|
||||
|
||||
@@ -64,7 +64,7 @@ function isSuccess($result)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -78,15 +78,16 @@ function hasData($result)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if the result represents an error
|
||||
* Wrapper function of isSuccess, more readable code
|
||||
* Bob Dylan: ...there's no success like failure. And that failure's no success at all.
|
||||
*/
|
||||
function isError($result)
|
||||
{
|
||||
return !isSuccess($result);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,93 @@
|
||||
<?php
|
||||
/**
|
||||
* FH-Complete
|
||||
*
|
||||
* @package FHC-Helper
|
||||
* @author FHC-Team
|
||||
* @copyright Copyright (c) 2016 fhcomplete.org
|
||||
* @license GPLv3
|
||||
* @since Version 1.0.0
|
||||
*/
|
||||
|
||||
/**
|
||||
* FHC Helper
|
||||
*
|
||||
* @subpackage Helpers
|
||||
* @category Helpers
|
||||
*/
|
||||
|
||||
if (! defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
const DEFAULT_SANCHO_HEADER_IMG = 'sancho_header_du_hast_neue_nachrichten.jpg';
|
||||
|
||||
/**
|
||||
* Send single Mail with Sancho Design and Layout.
|
||||
* @param string $vorlage_kurzbz Name of the template for specific mail content.
|
||||
* @param array $vorlage_data Associative array with specific mail content varibales
|
||||
* to be replaced in the content template.
|
||||
* @param string $to Email-adress.
|
||||
* @param string $subject Subject of mail.
|
||||
* @param string $headerImg Filename of the specific Sancho header image.
|
||||
* @return void
|
||||
*/
|
||||
function sendMail($vorlage_kurzbz, $vorlage_data, $to, $subject, $headerImg = DEFAULT_SANCHO_HEADER_IMG)
|
||||
{
|
||||
$ci =& get_instance();
|
||||
$ci->load->library('email');
|
||||
$ci->load->library('MailLib');
|
||||
|
||||
$sanchoHeader_img = 'skin/images/sancho/'. $headerImg;
|
||||
$sanchoFooter_img = 'skin/images/sancho/sancho_footer.jpg';
|
||||
|
||||
// Embed sancho header and footer image
|
||||
// reset important to ensure embedding of images when called in a loop
|
||||
$ci->email->clear(true); // clear vars and attachments
|
||||
$ci->email->attach($sanchoHeader_img);
|
||||
$ci->email->attach($sanchoFooter_img);
|
||||
$cid_header = $ci->email->attachment_cid($sanchoHeader_img); // sets unique content id for embedding
|
||||
$cid_footer = $ci->email->attachment_cid($sanchoFooter_img); // sets unique content id for embedding
|
||||
|
||||
// Set specific mail content into specific content template
|
||||
$content = _parseMailContent($vorlage_kurzbz, $vorlage_data);
|
||||
|
||||
// overall main content data array
|
||||
$layout = array(
|
||||
'CID_header' => $cid_header,
|
||||
'CID_footer' => $cid_footer,
|
||||
'content' => $content
|
||||
);
|
||||
|
||||
// Set overall main content into the sancho mail template
|
||||
$body = _parseMailContent('Sancho_Mail_Template', $layout);
|
||||
|
||||
// Send mail
|
||||
$ci->maillib->send('sancho@'. DOMAIN, $to, $subject, $body);
|
||||
}
|
||||
|
||||
/**
|
||||
* Replace variables in the mail content template with specific mail content data.
|
||||
* @param string $vorlage_kurzbz Name of the template for specific mail content.
|
||||
* @param array $vorlage_data Associative array with specific mail content varibales
|
||||
* to be replaced in the content template.
|
||||
* @return string
|
||||
*/
|
||||
function _parseMailContent($vorlage_kurzbz, $vorlage_data)
|
||||
{
|
||||
$ci =& get_instance();
|
||||
$ci->load->library('VorlageLib');
|
||||
|
||||
$result = $ci->vorlagelib->getVorlagetextByVorlage($vorlage_kurzbz);
|
||||
|
||||
if (isSuccess($result))
|
||||
{
|
||||
// If the text and the subject of the template are not empty
|
||||
if (is_array($result->retval) && count($result->retval) > 0 &&
|
||||
!empty($result->retval[0]->text))
|
||||
{
|
||||
// Parses template text
|
||||
$parsedText = $ci->vorlagelib->parseVorlagetext($result->retval[0]->text, $vorlage_data);
|
||||
|
||||
return $parsedText;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,88 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* FH-Complete
|
||||
*
|
||||
* @package FHC-Helper
|
||||
* @author FHC-Team
|
||||
* @copyright Copyright (c) 2016 fhcomplete.org
|
||||
* @license GPLv3
|
||||
* @since Version 1.0.0
|
||||
*/
|
||||
|
||||
/**
|
||||
* Message Helper
|
||||
*
|
||||
* @subpackage Helpers
|
||||
* @category Helpers
|
||||
*/
|
||||
|
||||
if (! defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
// -------------------------------------------------------------------------------------------------------
|
||||
// Collection of functions to handle comfortably the php session.
|
||||
// It works keeping a different session name for each functionality (ex. FilterWidget and NavigationWidget)
|
||||
// -------------------------------------------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
* Returns the whole session by its name given as parameter
|
||||
* If it's not present the a null value is returned
|
||||
*/
|
||||
function getSession($sessionName)
|
||||
{
|
||||
$session = null;
|
||||
|
||||
// If it is present a session for this filter
|
||||
if (isset($_SESSION[$sessionName]))
|
||||
{
|
||||
$session = $_SESSION[$sessionName];
|
||||
}
|
||||
|
||||
return $session;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns one element specified by the paraemter name, from the session specified by the parameters sessionName
|
||||
* If it's not present the a null value is returned
|
||||
*/
|
||||
function getElementSession($sessionName, $name)
|
||||
{
|
||||
$session = getSession($sessionName); // get the whole session for this filter
|
||||
|
||||
if (isset($session[$name]))
|
||||
{
|
||||
return $session[$name];
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the whole session specified by the parameters sessionName
|
||||
*/
|
||||
function setSession($sessionName, $data)
|
||||
{
|
||||
// If is NOT already present into the session
|
||||
if (!isset($_SESSION[$sessionName])
|
||||
|| (isset($_SESSION[$sessionName]) && !is_array($_SESSION[$sessionName])))
|
||||
{
|
||||
$_SESSION[$sessionName] = array(); // then create it
|
||||
}
|
||||
|
||||
$_SESSION[$sessionName] = $data; // stores data
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets one element of the session specified by the parameters sessionName
|
||||
*/
|
||||
function setElementSession($sessionName, $name, $value)
|
||||
{
|
||||
// If is NOT already present into the session
|
||||
if (!isset($_SESSION[$sessionName])
|
||||
|| (isset($_SESSION[$sessionName]) && !is_array($_SESSION[$sessionName])))
|
||||
{
|
||||
$_SESSION[$sessionName] = array(); // then create it
|
||||
}
|
||||
|
||||
$_SESSION[$sessionName][$name] = $value; // stores the single value
|
||||
}
|
||||
@@ -68,7 +68,7 @@ class FiltersLib
|
||||
|
||||
const FILTER_PHRASES_CATEGORY = 'FilterWidget'; // The category used to store phrases for the FilterWidget
|
||||
|
||||
const FILTER_PAGE_PARAM = 'filter_page'; // Filter page parameter used to overwrite the page URI
|
||||
const FILTER_PAGE_PARAM = 'filter_page'; // Filter page parameter name
|
||||
|
||||
private $_ci; // Code igniter instance
|
||||
private $_filterUniqueId; // unique id for this filter widget
|
||||
@@ -78,10 +78,12 @@ class FiltersLib
|
||||
*/
|
||||
public function __construct($params = null)
|
||||
{
|
||||
$this->_ci =& get_instance();
|
||||
$this->_ci =& get_instance(); // get code igniter instance
|
||||
|
||||
// Loads helper message to manage returning messages
|
||||
$this->_ci->load->helper('message');
|
||||
// Loads helper session to manage the php session
|
||||
$this->_ci->load->helper('session');
|
||||
|
||||
$this->_filterUniqueId = $this->_getFilterUniqueId($params); // sets the id for the related filter widget
|
||||
}
|
||||
@@ -90,27 +92,19 @@ class FiltersLib
|
||||
// Public methods
|
||||
|
||||
/**
|
||||
* Returns the whole session for this filter widget if found, otherwise null
|
||||
* Wrapper method to the session helper funtions to retrive the whole session for this filter
|
||||
*/
|
||||
public function getSession()
|
||||
{
|
||||
$session = null;
|
||||
|
||||
// If it is present a session for this filter
|
||||
if (isset($_SESSION[self::SESSION_NAME]) && isset($_SESSION[self::SESSION_NAME][$this->_filterUniqueId]))
|
||||
{
|
||||
$session = $_SESSION[self::SESSION_NAME][$this->_filterUniqueId];
|
||||
}
|
||||
|
||||
return $session;
|
||||
return getElementSession(self::SESSION_NAME, $this->_filterUniqueId);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns one element from the session of this filter widget, otherwise null
|
||||
* Wrapper method to the session helper funtions to retrive one element from the session of this filter
|
||||
*/
|
||||
public function getElementSession($name)
|
||||
{
|
||||
$session = $this->getSession(); // get the whole session for this filter
|
||||
$session = getElementSession(self::SESSION_NAME, $this->_filterUniqueId);
|
||||
|
||||
if (isset($session[$name]))
|
||||
{
|
||||
@@ -121,41 +115,23 @@ class FiltersLib
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the whole session for this filter widget
|
||||
* Wrapper method to the session helper funtions to set the whole session for this filter
|
||||
*/
|
||||
public function setSession($data)
|
||||
{
|
||||
// If is NOT already present into the session
|
||||
if (!isset($_SESSION[self::SESSION_NAME])
|
||||
|| (isset($_SESSION[self::SESSION_NAME]) && !is_array($_SESSION[self::SESSION_NAME])))
|
||||
{
|
||||
$_SESSION[self::SESSION_NAME] = array(); // then create it
|
||||
}
|
||||
|
||||
$_SESSION[self::SESSION_NAME][$this->_filterUniqueId] = $data; // stores data
|
||||
setElementSession(self::SESSION_NAME, $this->_filterUniqueId, $data);
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets one element of the session of this filter widget
|
||||
* Wrapper method to the session helper funtions to set one element in the session for this filter
|
||||
*/
|
||||
public function setElementSession($name, $value)
|
||||
{
|
||||
// If is NOT already present into the session
|
||||
if (!isset($_SESSION[self::SESSION_NAME])
|
||||
|| (isset($_SESSION[self::SESSION_NAME]) && !is_array($_SESSION[self::SESSION_NAME])))
|
||||
{
|
||||
$_SESSION[self::SESSION_NAME] = array(); // then create it
|
||||
}
|
||||
$session = getElementSession(self::SESSION_NAME, $this->_filterUniqueId);
|
||||
|
||||
// If the session for this filter is NOT already present into the session
|
||||
if (!isset($_SESSION[self::SESSION_NAME][$this->_filterUniqueId])
|
||||
|| (isset($_SESSION[self::SESSION_NAME][$this->_filterUniqueId])
|
||||
&& !is_array($_SESSION[self::SESSION_NAME][$this->_filterUniqueId])))
|
||||
{
|
||||
$_SESSION[self::SESSION_NAME][$this->_filterUniqueId] = array(); // then create it
|
||||
}
|
||||
$session[$name] = $value;
|
||||
|
||||
$_SESSION[self::SESSION_NAME][$this->_filterUniqueId][$name] = $value; // stores the single value
|
||||
setElementSession(self::SESSION_NAME, $this->_filterUniqueId, $session); // stores the single value
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -264,7 +240,7 @@ class FiltersLib
|
||||
*/
|
||||
public function generateDatasetQuery($query, $filters)
|
||||
{
|
||||
$datasetQuery = null;
|
||||
$datasetQuery = 'SELECT * FROM ('.$query.') '.self::DATASET_TABLE_ALIAS;
|
||||
|
||||
// If the given query is valid and the parameter filters is an array
|
||||
if (!empty(trim($query)) && $filters != null && is_array($filters))
|
||||
@@ -287,7 +263,7 @@ class FiltersLib
|
||||
|
||||
if ($where != '') // if the SQL where clause was built
|
||||
{
|
||||
$datasetQuery = 'SELECT * FROM ('.$query.') '.self::DATASET_TABLE_ALIAS.' WHERE '.$where;
|
||||
$datasetQuery .= ' WHERE '.$where;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,390 @@
|
||||
<?php
|
||||
|
||||
if (! defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
/**
|
||||
* NavigationWidget logic
|
||||
*/
|
||||
class NavigationLib
|
||||
{
|
||||
// Session parameters names
|
||||
const SESSION_NAME = 'FHC_NAVIGATION_WIDGET'; // Navigation session name
|
||||
const SESSION_MENU_NAME = 'navigation_menu';
|
||||
const SESSION_HEADER_NAME = 'navigation_header';
|
||||
|
||||
// Configuration names
|
||||
const CONFIG_MENU_NAME = 'navigation_menu';
|
||||
const CONFIG_HEADER_NAME = 'navigation_header';
|
||||
const CONFIG_NAVIGATION_FILENAME = 'navigation.php';
|
||||
|
||||
const NAVIGATION_PAGE_PARAM = 'navigation_page'; // Navigation page parameter name
|
||||
|
||||
private $_ci; // Code igniter instance
|
||||
private $_navigationPage; // unique id for this navigation widget
|
||||
|
||||
/**
|
||||
* Gets the CI instance and loads message helper
|
||||
*/
|
||||
public function __construct($params = null)
|
||||
{
|
||||
$this->_ci =& get_instance(); // get code igniter instance
|
||||
|
||||
// Loads navigation configs
|
||||
$this->_ci->config->load('navigation');
|
||||
|
||||
// Loads helper message to manage returning messages
|
||||
$this->_ci->load->helper('message');
|
||||
// Loads helper session to manage the php session
|
||||
$this->_ci->load->helper('session');
|
||||
|
||||
// Loads library ExtensionsLib
|
||||
$this->_ci->load->library('ExtensionsLib');
|
||||
|
||||
$this->_navigationPage = $this->_getNavigationtPage($params); // sets the id for the related navigation widget
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------------------------------------------
|
||||
// Public methods
|
||||
|
||||
/**
|
||||
* Creates the left Menu for each Page
|
||||
* @param navigation_widget_called GET Parameter witch holds the currently called Page
|
||||
* @return array with the Menu Entries
|
||||
*/
|
||||
public function getMenuArray($navigationPage)
|
||||
{
|
||||
$menuArray = array();
|
||||
|
||||
if (isset($navigationPage))
|
||||
{
|
||||
// Get Menu Entries of the Core
|
||||
$navigationMenuArray = $this->_ci->config->item(self::CONFIG_MENU_NAME);
|
||||
$menuArray = $this->_wildcardsearch($navigationMenuArray, $navigationPage);
|
||||
|
||||
// Load Menu Entries of Extensions
|
||||
$extensions = $this->_ci->extensionslib->getInstalledExtensions();
|
||||
if(hasData($extensions))
|
||||
{
|
||||
$json_extension = array();
|
||||
foreach($extensions->retval as $ext)
|
||||
{
|
||||
$filename = APPPATH.'config/'.ExtensionsLib::EXTENSIONS_DIR_NAME.'/'.$ext->name.'/'.self::CONFIG_NAVIGATION_FILENAME;
|
||||
if (file_exists($filename))
|
||||
{
|
||||
unset($config);
|
||||
include($filename);
|
||||
if(isset($config[self::CONFIG_MENU_NAME]) && is_array($config[self::CONFIG_MENU_NAME]))
|
||||
{
|
||||
$json_extension = array_merge_recursive(
|
||||
$json_extension,
|
||||
$this->_wildcardsearch($config[self::CONFIG_MENU_NAME],
|
||||
$navigationPage)
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
// Merge Extension Menuentries with the Core Entries
|
||||
$menuArray = array_merge_recursive($menuArray, $json_extension);
|
||||
}
|
||||
|
||||
// Load dynamic Menu Entries from Session
|
||||
if (($navigationMenuSessionArray = $this->getSessionMenu()) != null)
|
||||
{
|
||||
if (isset($navigationMenuSessionArray) && is_array($navigationMenuSessionArray))
|
||||
{
|
||||
$menuArray = array_merge_recursive($menuArray, $navigationMenuSessionArray);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$this->_sortArray($menuArray);
|
||||
|
||||
return $menuArray;
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates the Top Menu for each Page
|
||||
* @param navigation_widget_called GET Parameter witch holds the currently called Page
|
||||
* @return array with the Menu Entries
|
||||
*/
|
||||
public function getHeaderArray($navigationPage)
|
||||
{
|
||||
$headerArray = array();
|
||||
|
||||
if (isset($navigationPage))
|
||||
{
|
||||
// Load Header Entries of Core
|
||||
$navigationHeaderArray = $this->_ci->config->item(self::CONFIG_HEADER_NAME);
|
||||
$headerArray = $this->_wildcardsearch($navigationHeaderArray, $navigationPage);
|
||||
|
||||
// Load Header Entries of Extensions
|
||||
$extensions = $this->_ci->extensionslib->getInstalledExtensions();
|
||||
if(hasData($extensions))
|
||||
{
|
||||
$headerArray_extension = array();
|
||||
foreach($extensions->retval as $ext)
|
||||
{
|
||||
$filename = APPPATH.'config/'.ExtensionsLib::EXTENSIONS_DIR_NAME.'/'.$ext->name.'/'.self::CONFIG_NAVIGATION_FILENAME;
|
||||
if (file_exists($filename))
|
||||
{
|
||||
unset($config);
|
||||
include($filename);
|
||||
if(isset($config[self::CONFIG_HEADER_NAME]) && is_array($config[self::CONFIG_HEADER_NAME]))
|
||||
{
|
||||
$headerArray_extension = array_merge_recursive(
|
||||
$json_extension,
|
||||
$this->_wildcardsearch($config[self::CONFIG_HEADER_NAME],
|
||||
$navigationPage)
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
$headerArray = array_merge_recursive($headerArray, $headerArray_extension);
|
||||
}
|
||||
|
||||
// Load dynamic Header Entries from Session
|
||||
if (($navigationHeaderSessionArray = $this->getSessionHeader()) != null)
|
||||
{
|
||||
if (isset($navigationHeaderSessionArray) && is_array($navigationHeaderSessionArray))
|
||||
{
|
||||
$headerArray = array_merge_recursive($headerArray, $navigationHeaderSessionArray);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$this->_sortArray($headerArray);
|
||||
|
||||
return $headerArray;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the structure for one level of the menu
|
||||
*/
|
||||
public function oneLevel(
|
||||
$description, $link = '#', $children = null, $icon = '', $expand = false,
|
||||
$subscriptDescription = null, $subscriptLinkClass = null, $subscriptLinkValue = null, $target = '',
|
||||
$sort = null)
|
||||
{
|
||||
return array(
|
||||
'description' => $description,
|
||||
'link' => $link,
|
||||
'target' => $target,
|
||||
'children'=> $children,
|
||||
'icon' => $icon,
|
||||
'expand' => $expand,
|
||||
'subscriptDescription' => $subscriptDescription,
|
||||
'subscriptLinkClass' => $subscriptLinkClass,
|
||||
'subscriptLinkValue' => $subscriptLinkValue,
|
||||
'sort' => $sort
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Wrapper method to the session helper funtions to retrive the whole session for this navigation widget
|
||||
*/
|
||||
public function getSessionMenu()
|
||||
{
|
||||
$session = getElementSession(self::SESSION_NAME, self::SESSION_MENU_NAME);
|
||||
|
||||
if (isset($session[$this->_navigationPage]))
|
||||
{
|
||||
return $session[$this->_navigationPage];
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Wrapper method to the session helper funtions to retrive the whole session for this navigation widget
|
||||
*/
|
||||
public function getSessionHeader()
|
||||
{
|
||||
$session = getElementSession(self::SESSION_NAME, self::SESSION_HEADER_NAME);
|
||||
|
||||
if (isset($session[$this->_navigationPage]))
|
||||
{
|
||||
return $session[$this->_navigationPage];
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Wrapper method to the session helper funtions to retrive one element from the session of this navigation widget
|
||||
*/
|
||||
public function getElementSessionMenu($name)
|
||||
{
|
||||
$session = $this->getSessionMenu();
|
||||
|
||||
if (isset($session[$name]))
|
||||
{
|
||||
return $session[$name];
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Wrapper method to the session helper funtions to retrive one element from the session of this navigation widget
|
||||
*/
|
||||
public function getElementSessionHeader($name)
|
||||
{
|
||||
$session = $this->getSessionHeader();
|
||||
|
||||
if (isset($session[$name]))
|
||||
{
|
||||
return $session[$name];
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Wrapper method to the session helper funtions to set the whole session for this navigation widget
|
||||
*/
|
||||
public function setSessionMenu($data)
|
||||
{
|
||||
setElementSession(self::SESSION_NAME, self::SESSION_MENU_NAME, array($this->_navigationPage => $data));
|
||||
}
|
||||
|
||||
/**
|
||||
* Wrapper method to the session helper funtions to set the whole session for this navigation widget
|
||||
*/
|
||||
public function setSessionHeader($data)
|
||||
{
|
||||
setElementSession(self::SESSION_NAME, self::SESSION_HEADER_NAME, array($this->_navigationPage => $data));
|
||||
}
|
||||
|
||||
/**
|
||||
* Wrapper method to the session helper funtions to set one element in the session for this navigation widget
|
||||
*/
|
||||
public function setElementSessionMenu($name, $value)
|
||||
{
|
||||
$session = $this->getSessionMenu();
|
||||
|
||||
if (!isset($session[$this->_navigationPage]))
|
||||
{
|
||||
$session[$this->_navigationPage] = array();
|
||||
}
|
||||
|
||||
$session[$this->_navigationPage][$name] = $value;
|
||||
|
||||
setElementSession(self::SESSION_NAME, self::SESSION_MENU_NAME, $session); // stores the single value
|
||||
}
|
||||
|
||||
/**
|
||||
* Wrapper method to the session helper funtions to set one element in the session for this navigation widget
|
||||
*/
|
||||
public function setElementSessionHeader($name, $value)
|
||||
{
|
||||
$session = $this->getSessionHeader();
|
||||
|
||||
if (!isset($session[$this->_navigationPage]))
|
||||
{
|
||||
$session[$this->_navigationPage] = array();
|
||||
}
|
||||
|
||||
$session[$this->_navigationPage][$name] = $value;
|
||||
|
||||
setElementSession(self::SESSION_NAME, self::SESSION_HEADER_NAME, $session); // stores the single value
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------------------------------------------
|
||||
// Private methods
|
||||
|
||||
/**
|
||||
* Searches a Menuentry. If there is no exact entry it searches for Wildcard Entries with a Star
|
||||
* Example:
|
||||
* Searching for /system/foo/index will Match the following Menuentries:
|
||||
* /system/foo/index
|
||||
* /system/foo/*
|
||||
* /system/*
|
||||
* *
|
||||
*
|
||||
* @param $navigationArray Array to Search in.
|
||||
* @param $navigationPage Navigation to search for.
|
||||
* @return Navigation Array if found, empty array otherwise
|
||||
*/
|
||||
private function _wildcardsearch($navigationArray, $navigationPage)
|
||||
{
|
||||
// Sort Navigation to have them in correct order
|
||||
krsort($navigationArray);
|
||||
|
||||
// 100% match found
|
||||
if(isset($navigationArray[$navigationPage]))
|
||||
{
|
||||
return $navigationArray[$navigationPage];
|
||||
}
|
||||
else
|
||||
{
|
||||
foreach($navigationArray as $key=>$row)
|
||||
{
|
||||
// Search for * Entries
|
||||
if(mb_strpos($key, '*') === 0 || mb_strpos($key, '*') === mb_strlen($key) - 1)
|
||||
{
|
||||
// Take * Entry if Matches
|
||||
$search = mb_substr($key, 0, -1);
|
||||
if($search == '' || mb_strpos($navigationPage, $search) === 0)
|
||||
{
|
||||
return $row;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return array();
|
||||
}
|
||||
|
||||
/**
|
||||
* Return an unique string that identify this navigation widget
|
||||
* NOTE: The default value is the URI where the NavigationWidget is called
|
||||
*/
|
||||
private function _getNavigationtPage($params)
|
||||
{
|
||||
//
|
||||
if ($params != null
|
||||
&& is_array($params)
|
||||
&& isset($params[self::NAVIGATION_PAGE_PARAM])
|
||||
&& !empty(trim($params[self::NAVIGATION_PAGE_PARAM])))
|
||||
{
|
||||
$navigationPage = $params[self::NAVIGATION_PAGE_PARAM];
|
||||
}
|
||||
else
|
||||
{
|
||||
// Gets the current page URI
|
||||
$navigationPage = $this->_ci->router->directory.$this->_ci->router->class.'/'.$this->_ci->router->method;
|
||||
}
|
||||
|
||||
return $navigationPage;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sorts using the sort element present in the array
|
||||
*/
|
||||
private function _sortArray(&$array)
|
||||
{
|
||||
uasort($array, function($a, $b) {
|
||||
|
||||
// If the element sort is not present then the default value is 999
|
||||
$sortA = 999;
|
||||
if (isset($a['sort'])) $sortA = $a['sort'];
|
||||
|
||||
// If the element sort is not present then the default value is 999
|
||||
$sortB = 999;
|
||||
if (isset($b['sort'])) $sortB = $b['sort'];
|
||||
|
||||
return $sortA - $sortB; // < 0 => lt, == 0 => equal, > 0 => gt
|
||||
});
|
||||
|
||||
// Sort also the children
|
||||
foreach ($array as $key => $value)
|
||||
{
|
||||
if (isset($value['children']) && is_array($value['children']) && count($value['children']) > 0)
|
||||
{
|
||||
// NOTE: keep this way to give the element by reference, $value has a different reference!
|
||||
// otherwise the children will not be sorted
|
||||
$this->_sortArray($array[$key]['children']); // recursive call
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,7 +1,6 @@
|
||||
<?php
|
||||
class Ampel_model extends DB_Model
|
||||
{
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*/
|
||||
@@ -11,4 +10,84 @@ class Ampel_model extends DB_Model
|
||||
$this->dbTable = 'public.tbl_ampel';
|
||||
$this->pk = 'ampel_id';
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns all active Ampeln, that are actually:
|
||||
* 1. not after the deadline date
|
||||
* 2. not before the vorlaufszeit
|
||||
* @param bool $email If true, then only ampeln are retrieved that are marked to be sent by mail.
|
||||
* @return array Returns array of objects.
|
||||
*/
|
||||
public function active($email = false)
|
||||
{
|
||||
$parametersArray = null;
|
||||
$query = '
|
||||
SELECT *
|
||||
FROM public.tbl_ampel
|
||||
WHERE';
|
||||
|
||||
if ($email === true)
|
||||
{
|
||||
$parametersArray['email'] = $email;
|
||||
$query .= ' email = ? AND';
|
||||
}
|
||||
|
||||
$query .= '
|
||||
(NOW()<(deadline+(COALESCE(verfallszeit,0) || \' days\')::interval)::date)
|
||||
OR (verfallszeit IS NULL)
|
||||
AND (NOW()>(deadline-(COALESCE(vorlaufzeit,0) || \' days\')::interval)::date)
|
||||
OR (vorlaufzeit IS NULL AND NOW() < deadline)';
|
||||
|
||||
$query .= ' ORDER BY deadline DESC';
|
||||
|
||||
return $this->execQuery($query, $parametersArray);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns all Ampel-receiver of a specific Ampel.
|
||||
* @param string $benutzer_select SQL Statement which defines the Ampel-receiver.
|
||||
* @return array Returns array of objects with property 'uid'.
|
||||
*/
|
||||
public function execBenutzerSelect($benutzer_select)
|
||||
{
|
||||
if (isset($benutzer_select) && !empty(trim($benutzer_select)))
|
||||
{
|
||||
return $this->execQuery($benutzer_select);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if Ampel was confirmed by the user.
|
||||
* @param int $ampel_id Ampel-ID
|
||||
* @param string $uid UID
|
||||
* @return bool
|
||||
*/
|
||||
public function isConfirmed($ampel_id, $uid)
|
||||
{
|
||||
$result = null;
|
||||
$query = '
|
||||
SELECT 1
|
||||
FROM public.tbl_ampel_benutzer_bestaetigt
|
||||
WHERE ampel_id = ?
|
||||
AND uid = ?';
|
||||
|
||||
if (isset($ampel_id, $uid))
|
||||
{
|
||||
$result = $this->execQuery($query, array($ampel_id, $uid));
|
||||
}
|
||||
|
||||
if ($result)
|
||||
{
|
||||
if (count($result->retval) > 0)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
else
|
||||
return $result; //will contain the error-msg from execQuery
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13,7 +13,7 @@ class Filters_model extends DB_Model
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Loads a filter by its app, dataset_name and filter_kurzbz
|
||||
*/
|
||||
public function getFilterList($app, $dataset_name, $filter_kurzbz)
|
||||
{
|
||||
@@ -24,7 +24,6 @@ class Filters_model extends DB_Model
|
||||
'app' => $app,
|
||||
'dataset_name' => $dataset_name,
|
||||
'person_id' => null,
|
||||
'default_filter' => false,
|
||||
'array_length(description, 1) >' => 0,
|
||||
'filter_kurzbz ILIKE' => $filter_kurzbz
|
||||
);
|
||||
@@ -33,7 +32,7 @@ class Filters_model extends DB_Model
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Loads a custom filter by its app, dataset_name and the uid of the owner
|
||||
*/
|
||||
public function getCustomFiltersList($app, $dataset_name, $uid)
|
||||
{
|
||||
@@ -50,12 +49,4 @@ class Filters_model extends DB_Model
|
||||
|
||||
return $this->loadWhere($filterParametersArray);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public function deleteCustomFilter($filter_id)
|
||||
{
|
||||
return $this->delete($filter_id);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<div class="row">
|
||||
<div class="span4">
|
||||
<h2>Statusgrund: <?php echo $sg->status_kurzbz; ?></h2>
|
||||
<form method="post" action="<?php echo APP_ROOT . "index.ci.php/crm/Statusgrund/saveGrund";?>">
|
||||
<form method="post" action="<?php echo site_url("crm/Statusgrund/saveGrund"); ?>">
|
||||
<table>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
@@ -104,4 +104,4 @@
|
||||
}
|
||||
?>
|
||||
|
||||
</html>
|
||||
</html>
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<div class="row">
|
||||
<div class="span4">
|
||||
<h2>Neuer Statusgrund</h2>
|
||||
<form method="post" action="<?php echo APP_ROOT . "index.ci.php/crm/Statusgrund/insGrund";?>">
|
||||
<form method="post" action="<?php echo site_url("crm/Statusgrund/insGrund"); ?>">
|
||||
<table>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
|
||||
@@ -7,7 +7,7 @@ $this->load->view('templates/header', array('title' => 'StudienjahrEdit', 'jquer
|
||||
<div class="row">
|
||||
<div class="span4">
|
||||
<h2>Studienjahr bearbeiten: <?php echo $jahr->studienjahr_kurzbz; ?></h2>
|
||||
<form method="post" action="<?php echo APP_ROOT."index.ci.php/organisation/studienjahr/saveStudienjahr" ?>">
|
||||
<form method="post" action="<?php echo site_url("organisation/studienjahr/saveStudienjahr"); ?>">
|
||||
|
||||
<table>
|
||||
<?php include('studienjahrForm.php'); ?>
|
||||
@@ -17,4 +17,4 @@ $this->load->view('templates/header', array('title' => 'StudienjahrEdit', 'jquer
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
</html>
|
||||
|
||||
@@ -8,7 +8,7 @@ $this->load->view('templates/header', array('title' => 'StudienjahrNew', 'jquery
|
||||
<div class="span4">
|
||||
<h2>Neues Studienjahr anlegen</h2>
|
||||
<form method="post"
|
||||
action="<?php echo APP_ROOT."index.ci.php/organisation/studienjahr/insStudienjahr"; ?>"
|
||||
action="<?php echo site_url("organisation/studienjahr/insStudienjahr"); ?>"
|
||||
id="newStudienjahrForm">
|
||||
<table>
|
||||
<tr>
|
||||
|
||||
@@ -8,7 +8,7 @@ $this->load->view('templates/header', array('title' => 'StudiensemesterEdit', 'd
|
||||
<div class="span4">
|
||||
<h2>Studiensemester bearbeiten: <?php echo $sem->studiensemester_kurzbz; ?></h2>
|
||||
<form method="post"
|
||||
action="<?php echo APP_ROOT."index.ci.php/organisation/studiensemester/saveStudiensemester" ?>">
|
||||
action="<?php echo site_url("organisation/studiensemester/saveStudiensemester") ?>">
|
||||
<table>
|
||||
<?php include('studiensemesterForm.php'); ?>
|
||||
<input type="hidden" name="semkurzbz" value="<?php echo $sem->studiensemester_kurzbz; ?>"/>
|
||||
|
||||
@@ -7,9 +7,7 @@ $this->load->view('templates/header', array('title' => 'StudiensemesterNew', 'jq
|
||||
<div class="row">
|
||||
<div class="span4">
|
||||
<h2>Neues Studiensemester anlegen</h2>
|
||||
<form method="post"
|
||||
action="<?php echo APP_ROOT."index.ci.php/organisation/studiensemester/insStudiensemester"; ?>"
|
||||
id="newSemesterForm">
|
||||
<form method="post" action="<?php echo site_url("organisation/studiensemester/insStudiensemester"); ?>" id="newSemesterForm">
|
||||
<table>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
?>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="../outputAkteContent/<?php echo $dokument->akte_id ?>"><?php echo empty($dokument->titel) ? $dokument->bezeichnung : $dokument->titel ?></a>
|
||||
<a href="outputAkteContent/<?php echo $dokument->akte_id ?>"><?php echo empty($dokument->titel) ? $dokument->bezeichnung : $dokument->titel ?></a>
|
||||
</td>
|
||||
<td><?php echo $dokument->dokument_bezeichnung ?></td>
|
||||
<td><?php echo date_format(date_create($dokument->erstelltam), 'd.m.Y') ?></td>
|
||||
@@ -64,4 +64,4 @@
|
||||
<?php endforeach ?>
|
||||
</tbody>
|
||||
</table>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
|
||||
@@ -5,18 +5,18 @@
|
||||
'title' => 'Info Center',
|
||||
'jquery' => true,
|
||||
'jqueryui' => true,
|
||||
'ajaxlib' => true,
|
||||
'bootstrap' => true,
|
||||
'fontawesome' => true,
|
||||
'sbadmintemplate' => true,
|
||||
'tablesorter' => true,
|
||||
'ajaxlib' => true,
|
||||
'filterwidget' => true,
|
||||
'navigationwidget' => true,
|
||||
'phrases' => array(
|
||||
'person' => array('vorname', 'nachname'),
|
||||
'global' => array('mailAnXversandt'),
|
||||
'ui' => array('bitteEintragWaehlen')
|
||||
),
|
||||
'navigationwidget' => true,
|
||||
'customCSSs' => 'public/css/sbadmin2/tablesort_bootstrap.css',
|
||||
'customJSs' => array('public/js/bootstrapper.js', 'public/js/infocenter/infocenterPersonDataset.js')
|
||||
)
|
||||
@@ -32,18 +32,13 @@
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<h3 class="page-header">Infocenter
|
||||
<?php echo ucfirst($this->p->t('global', 'uebersicht')); ?>
|
||||
<h3 class="page-header">
|
||||
Infocenter <?php echo ucfirst($this->p->t('global', 'uebersicht')); ?>
|
||||
</h3>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<?php
|
||||
$this->load->view(
|
||||
'system/infocenter/infocenterData.php',
|
||||
array('fhc_controller_id' => $fhc_controller_id)
|
||||
);
|
||||
?>
|
||||
<?php $this->load->view('system/infocenter/infocenterData.php'); ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
$APP = 'infocenter';
|
||||
$NOTBEFORE = '2018-03-01 18:00:00';
|
||||
|
||||
$filterWidgetArray = array(
|
||||
'query' => '
|
||||
SELECT
|
||||
@@ -218,10 +219,11 @@
|
||||
'formatRow' => function($datasetRaw) {
|
||||
|
||||
$datasetRaw->{'Details'} = sprintf(
|
||||
'<a href="%s/%s?fhc_controller_id=%s">Details</a>',
|
||||
'<a href="%s?person_id=%s&origin_page=%s&fhc_controller_id=%s">Details</a>',
|
||||
site_url('system/infocenter/InfoCenter/showDetails'),
|
||||
$datasetRaw->{'PersonId'},
|
||||
(isset($_GET['fhc_controller_id'])?$_GET['fhc_controller_id']:'')
|
||||
$this->router->method,
|
||||
$this->input->get('fhc_controller_id')
|
||||
);
|
||||
|
||||
if ($datasetRaw->{'SendDate'} == null)
|
||||
@@ -266,14 +268,17 @@
|
||||
{
|
||||
$datasetRaw->{'StgAbgeschickt'} = '-';
|
||||
}
|
||||
|
||||
if ($datasetRaw->{'StgNichtAbgeschickt'} == null)
|
||||
{
|
||||
$datasetRaw->{'StgNichtAbgeschickt'} = '-';
|
||||
}
|
||||
|
||||
if ($datasetRaw->{'StgAktiv'} == null)
|
||||
{
|
||||
$datasetRaw->{'StgAktiv'} = '-';
|
||||
}
|
||||
|
||||
if ($datasetRaw->{'Nation'} == null)
|
||||
{
|
||||
$datasetRaw->{'Nation'} = '-';
|
||||
@@ -290,9 +295,9 @@
|
||||
$mark = FilterWidget::DEFAULT_MARK_ROW_CLASS;
|
||||
}
|
||||
|
||||
// Parking has priority over locking
|
||||
if ($datasetRaw->ParkDate != null)
|
||||
{
|
||||
// Parking has priority over locking
|
||||
$mark = "text-info";
|
||||
}
|
||||
|
||||
@@ -300,9 +305,10 @@
|
||||
}
|
||||
);
|
||||
|
||||
$filterWidgetArray[InfoCenter::FILTER_ID] = $this->input->get(InfoCenter::FILTER_ID);
|
||||
$filterWidgetArray['app'] = $APP;
|
||||
$filterWidgetArray['datasetName'] = 'PersonActions';
|
||||
$filterWidgetArray['filterKurzbz'] = 'InfoCenterSentApplicationAll';
|
||||
$filterWidgetArray['filter_id'] = $this->input->get('filter_id');
|
||||
|
||||
echo $this->widgetlib->widget('FilterWidget', $filterWidgetArray);
|
||||
?>
|
||||
|
||||
@@ -13,41 +13,35 @@
|
||||
'sbadmintemplate' => true,
|
||||
'addons' => true,
|
||||
'navigationwidget' => true,
|
||||
'customCSSs' =>
|
||||
array(
|
||||
'public/css/sbadmin2/admintemplate.css',
|
||||
'public/css/sbadmin2/tablesort_bootstrap.css'
|
||||
'customCSSs' => array(
|
||||
'public/css/sbadmin2/admintemplate.css',
|
||||
'public/css/sbadmin2/tablesort_bootstrap.css'
|
||||
),
|
||||
'customJSs' => array(
|
||||
'public/js/bootstrapper.js',
|
||||
'public/js/tablesort/tablesort.js',
|
||||
'public/js/infocenter/infocenterDetails.js'
|
||||
),
|
||||
'phrases' => array(
|
||||
'infocenter' => array(
|
||||
'notizHinzufuegen',
|
||||
'notizAendern',
|
||||
'bewerberParken',
|
||||
'bewerberAusparken',
|
||||
'nichtsZumAusparken',
|
||||
'fehlerBeimAusparken',
|
||||
'fehlerBeimParken',
|
||||
'bewerberGeparktBis'
|
||||
),
|
||||
'customJSs' =>
|
||||
array(
|
||||
'public/js/bootstrapper.js',
|
||||
'public/js/tablesort/tablesort.js',
|
||||
'public/js/infocenter/infocenterDetails.js'
|
||||
'ui' => array(
|
||||
'gespeichert',
|
||||
'fehlerBeimSpeichern'
|
||||
),
|
||||
'phrases' =>
|
||||
array(
|
||||
'infocenter' =>
|
||||
array(
|
||||
'notizHinzufuegen',
|
||||
'notizAendern',
|
||||
'bewerberParken',
|
||||
'bewerberAusparken',
|
||||
'nichtsZumAusparken',
|
||||
'fehlerBeimAusparken',
|
||||
'fehlerBeimParken',
|
||||
'bewerberGeparktBis'
|
||||
),
|
||||
'ui' =>
|
||||
array(
|
||||
'gespeichert',
|
||||
'fehlerBeimSpeichern'
|
||||
),
|
||||
'global' =>
|
||||
array(
|
||||
'bis',
|
||||
'zeilen'
|
||||
)
|
||||
'global' => array(
|
||||
'bis',
|
||||
'zeilen'
|
||||
)
|
||||
)
|
||||
)
|
||||
);
|
||||
?>
|
||||
@@ -69,12 +63,12 @@
|
||||
<div class="headerright text-right">
|
||||
<?php
|
||||
if (isset($lockedby)):
|
||||
echo $this->p->t('global', 'wirdBearbeitetVon') . ': ';
|
||||
echo $this->p->t('global', 'wirdBearbeitetVon').': ';
|
||||
echo $lockedby;
|
||||
if (!isset($show_lock_link) || $show_lock_link === true): ?>
|
||||
if ($origin_page == 'index'): ?>
|
||||
|
||||
<a href="../unlockPerson/<?php echo $stammdaten->person_id; ?>?fhc_controller_id=<?php echo $fhc_controller_id; ?>">
|
||||
<i class="fa fa-sign-out"></i> <?php echo ucfirst($this->p->t('ui', 'freigeben')) ?>
|
||||
<a href="unlockPerson/<?php echo $stammdaten->person_id; ?>?fhc_controller_id=<?php echo $fhc_controller_id; ?>">
|
||||
<i class="fa fa-sign-out"></i> <?php echo ucfirst($this->p->t('ui', 'freigeben')) ?>
|
||||
</a>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
@@ -103,7 +97,9 @@
|
||||
<div class="panel panel-primary">
|
||||
<a name="DokPruef"></a><!-- anchor for jumping to the section -->
|
||||
<div class="panel-heading text-center">
|
||||
<h4><?php echo ucfirst($this->p->t('infocenter', 'dokumentenpruefung')) ?></h4>
|
||||
<h4>
|
||||
<?php echo ucfirst($this->p->t('infocenter', 'dokumentenpruefung')) ?>
|
||||
</h4>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<?php $this->load->view('system/infocenter/dokpruefung.php'); ?>
|
||||
@@ -118,8 +114,9 @@
|
||||
<div class="panel panel-primary">
|
||||
<div class="panel-heading text-center">
|
||||
<a name="ZgvPruef"></a>
|
||||
<h4><?php echo $this->p->t('infocenter', 'zgv'). ' - '.
|
||||
ucfirst($this->p->t('lehre', 'pruefung'))?></h4>
|
||||
<h4>
|
||||
<?php echo $this->p->t('infocenter', 'zgv').' - '.ucfirst($this->p->t('lehre', 'pruefung'))?>
|
||||
</h4>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<?php $this->load->view('system/infocenter/zgvpruefungen.php'); ?><!-- /.panel-group -->
|
||||
@@ -134,7 +131,9 @@
|
||||
<div class="panel panel-primary">
|
||||
<div class="panel-heading text-center">
|
||||
<a name="Nachrichten"></a>
|
||||
<h4 class="text-center"><?php echo ucfirst($this->p->t('global', 'nachrichten')) ?></h4>
|
||||
<h4 class="text-center">
|
||||
<?php echo ucfirst($this->p->t('global', 'nachrichten')) ?>
|
||||
</h4>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<div class="row">
|
||||
@@ -153,8 +152,9 @@
|
||||
<div class="panel panel-primary">
|
||||
<div class="panel-heading text-center">
|
||||
<a name="NotizAkt"></a>
|
||||
<h4 class="text-center"><?php echo ucfirst($this->p->t('global', 'notizen')). ' & '.
|
||||
ucfirst($this->p->t('global', 'aktivitaeten')) ?></h4>
|
||||
<h4 class="text-center">
|
||||
<?php echo ucfirst($this->p->t('global', 'notizen')).' & '.ucfirst($this->p->t('global', 'aktivitaeten')) ?>
|
||||
</h4>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<div class="row">
|
||||
|
||||
@@ -12,6 +12,11 @@
|
||||
'ajaxlib' => true,
|
||||
'filterwidget' => true,
|
||||
'navigationwidget' => true,
|
||||
'phrases' => array(
|
||||
'person' => array('vorname', 'nachname'),
|
||||
'global' => array('mailAnXversandt'),
|
||||
'ui' => array('bitteEintragWaehlen')
|
||||
),
|
||||
'customCSSs' => 'public/css/sbadmin2/tablesort_bootstrap.css',
|
||||
'customJSs' => array('public/js/bootstrapper.js', 'public/js/infocenter/infocenterPersonDataset.js')
|
||||
)
|
||||
@@ -27,228 +32,13 @@
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<h3 class="page-header">Freigegebene Interessenten</h3>
|
||||
<h3 class="page-header">
|
||||
Freigegebene Interessenten
|
||||
</h3>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<?php
|
||||
|
||||
$APP = 'infocenter';
|
||||
$NOTBEFORE = '2018-03-01 18:00:00';
|
||||
$filterWidgetArray = array(
|
||||
'query' => '
|
||||
SELECT
|
||||
p.person_id AS "PersonId",
|
||||
p.vorname AS "Vorname",
|
||||
p.nachname AS "Nachname",
|
||||
p.gebdatum AS "Gebdatum",
|
||||
p.staatsbuergerschaft AS "Nation",
|
||||
(
|
||||
SELECT zeitpunkt
|
||||
FROM system.tbl_log
|
||||
WHERE taetigkeit_kurzbz IN(\'bewerbung\',\'kommunikation\')
|
||||
AND logdata->>\'name\' NOT IN (\'Login with code\', \'New application\')
|
||||
AND person_id = p.person_id
|
||||
ORDER BY zeitpunkt DESC
|
||||
LIMIT 1
|
||||
) AS "LastAction",
|
||||
(
|
||||
SELECT insertvon
|
||||
FROM system.tbl_log
|
||||
WHERE taetigkeit_kurzbz IN(\'bewerbung\',\'kommunikation\')
|
||||
AND logdata->>\'name\' NOT IN (\'Login with code\', \'New application\')
|
||||
AND person_id = p.person_id
|
||||
ORDER BY zeitpunkt DESC
|
||||
LIMIT 1
|
||||
) AS "User/Operator",
|
||||
(
|
||||
SELECT
|
||||
pss.studiensemester_kurzbz
|
||||
FROM
|
||||
public.tbl_prestudentstatus pss
|
||||
INNER JOIN public.tbl_prestudent ps USING(prestudent_id)
|
||||
JOIN public.tbl_studiengang USING(studiengang_kz)
|
||||
WHERE pss.status_kurzbz = \'Interessent\'
|
||||
AND ps.person_id = p.person_id
|
||||
AND tbl_studiengang.typ in(\'b\')
|
||||
AND studiensemester_kurzbz IN (
|
||||
SELECT studiensemester_kurzbz
|
||||
FROM public.tbl_studiensemester
|
||||
WHERE ende >= NOW()
|
||||
)
|
||||
ORDER BY pss.datum DESC, pss.insertamum DESC, pss.ext_id DESC
|
||||
LIMIT 1
|
||||
) AS "Studiensemester",
|
||||
(
|
||||
SELECT pss.bewerbung_abgeschicktamum
|
||||
FROM
|
||||
public.tbl_prestudentstatus pss
|
||||
INNER JOIN public.tbl_prestudent ps USING(prestudent_id)
|
||||
JOIN public.tbl_studiengang USING(studiengang_kz)
|
||||
WHERE pss.status_kurzbz = \'Interessent\'
|
||||
AND (pss.bewerbung_abgeschicktamum IS NOT NULL AND pss.bewerbung_abgeschicktamum>=\''.$NOTBEFORE.'\')
|
||||
AND ps.person_id = p.person_id
|
||||
AND tbl_studiengang.typ in(\'b\')
|
||||
AND studiensemester_kurzbz IN (
|
||||
SELECT studiensemester_kurzbz
|
||||
FROM public.tbl_studiensemester
|
||||
WHERE ende >= NOW()
|
||||
)
|
||||
ORDER BY pss.datum DESC, pss.insertamum DESC, pss.ext_id DESC
|
||||
LIMIT 1
|
||||
) AS "SendDate",
|
||||
(
|
||||
SELECT count(*)
|
||||
FROM
|
||||
public.tbl_prestudentstatus pss
|
||||
INNER JOIN public.tbl_prestudent ps USING(prestudent_id)
|
||||
JOIN public.tbl_studiengang USING(studiengang_kz)
|
||||
WHERE pss.status_kurzbz = \'Interessent\'
|
||||
AND (pss.bewerbung_abgeschicktamum IS NOT NULL AND pss.bewerbung_abgeschicktamum>=\''.$NOTBEFORE.'\')
|
||||
AND ps.person_id = p.person_id
|
||||
AND tbl_studiengang.typ in(\'b\')
|
||||
AND studiensemester_kurzbz IN (
|
||||
SELECT studiensemester_kurzbz
|
||||
FROM public.tbl_studiensemester
|
||||
WHERE ende >= NOW()
|
||||
)
|
||||
LIMIT 1
|
||||
) AS "AnzahlAbgeschickt",
|
||||
array_to_string(
|
||||
(
|
||||
SELECT array_agg(distinct UPPER(tbl_studiengang.typ || tbl_studiengang.kurzbz))
|
||||
FROM
|
||||
public.tbl_prestudentstatus pss
|
||||
INNER JOIN public.tbl_prestudent ps USING(prestudent_id)
|
||||
JOIN public.tbl_studiengang USING(studiengang_kz)
|
||||
WHERE pss.status_kurzbz = \'Interessent\'
|
||||
AND (pss.bewerbung_abgeschicktamum IS NOT NULL AND pss.bewerbung_abgeschicktamum>=\''.$NOTBEFORE.'\')
|
||||
AND ps.person_id = p.person_id
|
||||
AND tbl_studiengang.typ in(\'b\')
|
||||
AND studiensemester_kurzbz IN (
|
||||
SELECT studiensemester_kurzbz
|
||||
FROM public.tbl_studiensemester
|
||||
WHERE ende >= NOW()
|
||||
)
|
||||
LIMIT 1
|
||||
),\', \'
|
||||
) AS "StgAbgeschickt",
|
||||
pl.zeitpunkt AS "LockDate",
|
||||
pl.lockuser as "LockUser"
|
||||
FROM public.tbl_person p
|
||||
LEFT JOIN (SELECT person_id, zeitpunkt, uid as lockuser FROM system.tbl_person_lock WHERE app = \''.$APP.'\') pl USING(person_id)
|
||||
WHERE
|
||||
EXISTS(
|
||||
SELECT 1
|
||||
FROM
|
||||
public.tbl_prestudent
|
||||
JOIN public.tbl_studiengang USING(studiengang_kz)
|
||||
WHERE
|
||||
person_id=p.person_id
|
||||
AND tbl_studiengang.typ in(\'b\')
|
||||
|
||||
AND EXISTS (
|
||||
SELECT
|
||||
1
|
||||
FROM
|
||||
public.tbl_prestudentstatus
|
||||
WHERE
|
||||
prestudent_id = tbl_prestudent.prestudent_id
|
||||
AND status_kurzbz = \'Interessent\'
|
||||
AND (bestaetigtam IS NOT NULL AND bewerbung_abgeschicktamum >= \''.$NOTBEFORE.'\')
|
||||
AND studiensemester_kurzbz IN (
|
||||
SELECT studiensemester_kurzbz
|
||||
FROM public.tbl_studiensemester
|
||||
WHERE ende >= NOW()
|
||||
)
|
||||
)
|
||||
)
|
||||
ORDER BY "LastAction" DESC
|
||||
',
|
||||
'checkboxes' => 'PersonId',
|
||||
'additionalColumns' => array('Details'),
|
||||
'columnsAliases' => array('PersonID','Vorname','Nachname','GebDatum','Nation','Letzte Aktion','Letzter Bearbeiter',
|
||||
'StSem','GesendetAm','NumAbgeschickt','Studiengänge','Sperrdatum','GesperrtVon'),
|
||||
'formatRow' => function($datasetRaw) {
|
||||
|
||||
$datasetRaw->{'Details'} = sprintf(
|
||||
'<a href="%s/%s?show_lock_link=0&fhc_controller_id=%s">Details</a>',
|
||||
site_url('system/infocenter/InfoCenter/showDetails'),
|
||||
$datasetRaw->{'PersonId'},
|
||||
(isset($_GET['fhc_controller_id'])?$_GET['fhc_controller_id']:'')
|
||||
);
|
||||
|
||||
if ($datasetRaw->{'SendDate'} == null)
|
||||
{
|
||||
$datasetRaw->{'SendDate'} = 'Not sent';
|
||||
}
|
||||
else
|
||||
{
|
||||
$datasetRaw->{'SendDate'} = date_format(date_create($datasetRaw->{'SendDate'}),'Y-m-d H:i');
|
||||
}
|
||||
|
||||
if ($datasetRaw->{'LastAction'} == null)
|
||||
{
|
||||
$datasetRaw->{'LastAction'} = '-';
|
||||
}
|
||||
else
|
||||
{
|
||||
$datasetRaw->{'LastAction'} = date_format(date_create($datasetRaw->{'LastAction'}),'Y-m-d H:i');
|
||||
}
|
||||
|
||||
if ($datasetRaw->{'User/Operator'} == '')
|
||||
{
|
||||
$datasetRaw->{'User/Operator'} = 'NA';
|
||||
}
|
||||
|
||||
if ($datasetRaw->{'LockDate'} == null)
|
||||
{
|
||||
$datasetRaw->{'LockDate'} = '-';
|
||||
}
|
||||
|
||||
if ($datasetRaw->{'LockUser'} == null)
|
||||
{
|
||||
$datasetRaw->{'LockUser'} = '-';
|
||||
}
|
||||
|
||||
if ($datasetRaw->{'StgAbgeschickt'} == null)
|
||||
{
|
||||
$datasetRaw->{'StgAbgeschickt'} = 'N/A';
|
||||
}
|
||||
|
||||
if ($datasetRaw->{'Nation'} == null)
|
||||
{
|
||||
$datasetRaw->{'Nation'} = '-';
|
||||
}
|
||||
|
||||
return $datasetRaw;
|
||||
},
|
||||
'markRow' => function($datasetRaw) {
|
||||
|
||||
if ($datasetRaw->LockDate != null)
|
||||
{
|
||||
return FilterWidget::DEFAULT_MARK_ROW_CLASS;
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
$filterId = isset($_GET[InfoCenter::FILTER_ID]) ? $_GET[InfoCenter::FILTER_ID] : null;
|
||||
|
||||
if (isset($filterId) && is_numeric($filterId))
|
||||
{
|
||||
$filterWidgetArray[InfoCenter::FILTER_ID] = $filterId;
|
||||
}
|
||||
else
|
||||
{
|
||||
$filterWidgetArray['app'] = $APP;
|
||||
$filterWidgetArray['datasetName'] = 'PersonActions';
|
||||
$filterWidgetArray['filterKurzbz'] = 'InfoCenterNotSentApplicationAll';
|
||||
}
|
||||
|
||||
echo $this->widgetlib->widget('FilterWidget', $filterWidgetArray);
|
||||
?>
|
||||
|
||||
<?php $this->load->view('system/infocenter/infocenterFreigegebenData.php'); ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -0,0 +1,223 @@
|
||||
<?php
|
||||
|
||||
$APP = 'infocenter';
|
||||
$NOTBEFORE = '2018-03-01 18:00:00';
|
||||
|
||||
$filterWidgetArray = array(
|
||||
'query' => '
|
||||
SELECT
|
||||
p.person_id AS "PersonId",
|
||||
p.vorname AS "Vorname",
|
||||
p.nachname AS "Nachname",
|
||||
p.gebdatum AS "Gebdatum",
|
||||
p.staatsbuergerschaft AS "Nation",
|
||||
(
|
||||
SELECT zeitpunkt
|
||||
FROM system.tbl_log
|
||||
WHERE taetigkeit_kurzbz IN(\'bewerbung\',\'kommunikation\')
|
||||
AND logdata->>\'name\' NOT IN (\'Login with code\', \'New application\')
|
||||
AND person_id = p.person_id
|
||||
ORDER BY zeitpunkt DESC
|
||||
LIMIT 1
|
||||
) AS "LastAction",
|
||||
(
|
||||
SELECT insertvon
|
||||
FROM system.tbl_log
|
||||
WHERE taetigkeit_kurzbz IN(\'bewerbung\',\'kommunikation\')
|
||||
AND logdata->>\'name\' NOT IN (\'Login with code\', \'New application\')
|
||||
AND person_id = p.person_id
|
||||
ORDER BY zeitpunkt DESC
|
||||
LIMIT 1
|
||||
) AS "User/Operator",
|
||||
(
|
||||
SELECT
|
||||
pss.studiensemester_kurzbz
|
||||
FROM
|
||||
public.tbl_prestudentstatus pss
|
||||
INNER JOIN public.tbl_prestudent ps USING(prestudent_id)
|
||||
JOIN public.tbl_studiengang USING(studiengang_kz)
|
||||
WHERE pss.status_kurzbz = \'Interessent\'
|
||||
AND ps.person_id = p.person_id
|
||||
AND tbl_studiengang.typ in(\'b\')
|
||||
AND studiensemester_kurzbz IN (
|
||||
SELECT studiensemester_kurzbz
|
||||
FROM public.tbl_studiensemester
|
||||
WHERE ende >= NOW()
|
||||
)
|
||||
ORDER BY pss.datum DESC, pss.insertamum DESC, pss.ext_id DESC
|
||||
LIMIT 1
|
||||
) AS "Studiensemester",
|
||||
(
|
||||
SELECT pss.bewerbung_abgeschicktamum
|
||||
FROM
|
||||
public.tbl_prestudentstatus pss
|
||||
INNER JOIN public.tbl_prestudent ps USING(prestudent_id)
|
||||
JOIN public.tbl_studiengang USING(studiengang_kz)
|
||||
WHERE pss.status_kurzbz = \'Interessent\'
|
||||
AND (pss.bewerbung_abgeschicktamum IS NOT NULL AND pss.bewerbung_abgeschicktamum>=\''.$NOTBEFORE.'\')
|
||||
AND ps.person_id = p.person_id
|
||||
AND tbl_studiengang.typ in(\'b\')
|
||||
AND studiensemester_kurzbz IN (
|
||||
SELECT studiensemester_kurzbz
|
||||
FROM public.tbl_studiensemester
|
||||
WHERE ende >= NOW()
|
||||
)
|
||||
ORDER BY pss.datum DESC, pss.insertamum DESC, pss.ext_id DESC
|
||||
LIMIT 1
|
||||
) AS "SendDate",
|
||||
(
|
||||
SELECT count(*)
|
||||
FROM
|
||||
public.tbl_prestudentstatus pss
|
||||
INNER JOIN public.tbl_prestudent ps USING(prestudent_id)
|
||||
JOIN public.tbl_studiengang USING(studiengang_kz)
|
||||
WHERE pss.status_kurzbz = \'Interessent\'
|
||||
AND (pss.bewerbung_abgeschicktamum IS NOT NULL AND pss.bewerbung_abgeschicktamum>=\''.$NOTBEFORE.'\')
|
||||
AND ps.person_id = p.person_id
|
||||
AND tbl_studiengang.typ in(\'b\')
|
||||
AND studiensemester_kurzbz IN (
|
||||
SELECT studiensemester_kurzbz
|
||||
FROM public.tbl_studiensemester
|
||||
WHERE ende >= NOW()
|
||||
)
|
||||
LIMIT 1
|
||||
) AS "AnzahlAbgeschickt",
|
||||
array_to_string(
|
||||
(
|
||||
SELECT array_agg(distinct UPPER(tbl_studiengang.typ || tbl_studiengang.kurzbz))
|
||||
FROM
|
||||
public.tbl_prestudentstatus pss
|
||||
INNER JOIN public.tbl_prestudent ps USING(prestudent_id)
|
||||
JOIN public.tbl_studiengang USING(studiengang_kz)
|
||||
WHERE pss.status_kurzbz = \'Interessent\'
|
||||
AND (pss.bewerbung_abgeschicktamum IS NOT NULL AND pss.bewerbung_abgeschicktamum>=\''.$NOTBEFORE.'\')
|
||||
AND ps.person_id = p.person_id
|
||||
AND tbl_studiengang.typ in(\'b\')
|
||||
AND studiensemester_kurzbz IN (
|
||||
SELECT studiensemester_kurzbz
|
||||
FROM public.tbl_studiensemester
|
||||
WHERE ende >= NOW()
|
||||
)
|
||||
LIMIT 1
|
||||
),\', \'
|
||||
) AS "StgAbgeschickt",
|
||||
pl.zeitpunkt AS "LockDate",
|
||||
pl.lockuser as "LockUser"
|
||||
FROM public.tbl_person p
|
||||
LEFT JOIN (SELECT person_id, zeitpunkt, uid as lockuser FROM system.tbl_person_lock WHERE app = \''.$APP.'\') pl USING(person_id)
|
||||
WHERE
|
||||
EXISTS(
|
||||
SELECT 1
|
||||
FROM
|
||||
public.tbl_prestudent
|
||||
JOIN public.tbl_studiengang USING(studiengang_kz)
|
||||
WHERE
|
||||
person_id=p.person_id
|
||||
AND tbl_studiengang.typ in(\'b\')
|
||||
|
||||
AND EXISTS (
|
||||
SELECT
|
||||
1
|
||||
FROM
|
||||
public.tbl_prestudentstatus
|
||||
WHERE
|
||||
prestudent_id = tbl_prestudent.prestudent_id
|
||||
AND status_kurzbz = \'Interessent\'
|
||||
AND (bestaetigtam IS NOT NULL AND bewerbung_abgeschicktamum >= \''.$NOTBEFORE.'\')
|
||||
AND studiensemester_kurzbz IN (
|
||||
SELECT studiensemester_kurzbz
|
||||
FROM public.tbl_studiensemester
|
||||
WHERE ende >= NOW()
|
||||
)
|
||||
)
|
||||
)
|
||||
ORDER BY "LastAction" DESC
|
||||
',
|
||||
'checkboxes' => 'PersonId',
|
||||
'additionalColumns' => array('Details'),
|
||||
'columnsAliases' => array(
|
||||
'PersonID',
|
||||
'Vorname',
|
||||
'Nachname',
|
||||
'GebDatum',
|
||||
'Nation',
|
||||
'Letzte Aktion',
|
||||
'Letzter Bearbeiter',
|
||||
'StSem',
|
||||
'GesendetAm',
|
||||
'NumAbgeschickt',
|
||||
'Studiengänge',
|
||||
'Sperrdatum',
|
||||
'GesperrtVon'
|
||||
),
|
||||
'formatRow' => function($datasetRaw) {
|
||||
|
||||
$datasetRaw->{'Details'} = sprintf(
|
||||
'<a href="%s?person_id=%s&origin_page=%s&fhc_controller_id=%s">Details</a>',
|
||||
site_url('system/infocenter/InfoCenter/showDetails'),
|
||||
$datasetRaw->{'PersonId'},
|
||||
$this->router->method,
|
||||
$this->input->get('fhc_controller_id')
|
||||
);
|
||||
|
||||
if ($datasetRaw->{'SendDate'} == null)
|
||||
{
|
||||
$datasetRaw->{'SendDate'} = 'Not sent';
|
||||
}
|
||||
else
|
||||
{
|
||||
$datasetRaw->{'SendDate'} = date_format(date_create($datasetRaw->{'SendDate'}),'Y-m-d H:i');
|
||||
}
|
||||
|
||||
if ($datasetRaw->{'LastAction'} == null)
|
||||
{
|
||||
$datasetRaw->{'LastAction'} = '-';
|
||||
}
|
||||
else
|
||||
{
|
||||
$datasetRaw->{'LastAction'} = date_format(date_create($datasetRaw->{'LastAction'}),'Y-m-d H:i');
|
||||
}
|
||||
|
||||
if ($datasetRaw->{'User/Operator'} == '')
|
||||
{
|
||||
$datasetRaw->{'User/Operator'} = 'NA';
|
||||
}
|
||||
|
||||
if ($datasetRaw->{'LockDate'} == null)
|
||||
{
|
||||
$datasetRaw->{'LockDate'} = '-';
|
||||
}
|
||||
|
||||
if ($datasetRaw->{'LockUser'} == null)
|
||||
{
|
||||
$datasetRaw->{'LockUser'} = '-';
|
||||
}
|
||||
|
||||
if ($datasetRaw->{'StgAbgeschickt'} == null)
|
||||
{
|
||||
$datasetRaw->{'StgAbgeschickt'} = 'N/A';
|
||||
}
|
||||
|
||||
if ($datasetRaw->{'Nation'} == null)
|
||||
{
|
||||
$datasetRaw->{'Nation'} = '-';
|
||||
}
|
||||
|
||||
return $datasetRaw;
|
||||
},
|
||||
'markRow' => function($datasetRaw) {
|
||||
|
||||
if ($datasetRaw->LockDate != null)
|
||||
{
|
||||
return FilterWidget::DEFAULT_MARK_ROW_CLASS;
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
$filterWidgetArray['app'] = $APP;
|
||||
$filterWidgetArray['datasetName'] = 'PersonActions';
|
||||
$filterWidgetArray['filterKurzbz'] = 'InfoCenterFreigegeben5days';
|
||||
$filterWidgetArray['filter_id'] = $this->input->get('filter_id');
|
||||
|
||||
echo $this->widgetlib->widget('FilterWidget', $filterWidgetArray);
|
||||
?>
|
||||
@@ -241,8 +241,7 @@
|
||||
<div class="row">
|
||||
<div class="col-lg-6 text-left">
|
||||
<div class="form-inline">
|
||||
<form method="post"
|
||||
action="../saveAbsage/<?php echo $zgvpruefung->prestudent_id ?>">
|
||||
<form method="post" action="saveAbsage/<?php echo $zgvpruefung->prestudent_id ?>">
|
||||
<input type="hidden" name="fhc_controller_id" value="<?php echo $fhc_controller_id; ?>">
|
||||
<div class="input-group" id="statusgrselect_<?php echo $zgvpruefung->prestudent_id ?>">
|
||||
<select name="statusgrund"
|
||||
@@ -304,14 +303,14 @@
|
||||
</div>
|
||||
</div><!-- /.column-absage -->
|
||||
<div class="col-lg-6 text-right">
|
||||
<?php
|
||||
<?php
|
||||
$disabled = $disabledTxt = '';
|
||||
if (empty($zgvpruefung->prestudentstatus->bewerbung_abgeschicktamum))
|
||||
{
|
||||
$disabled = 'disabled';
|
||||
$disabledTxt = 'Die Bewerbung muss erst abgeschickt worden sein.';
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if ($zgvpruefung->studiengangtyp !== 'b')
|
||||
{
|
||||
$disabled = 'disabled';
|
||||
@@ -319,7 +318,7 @@
|
||||
}
|
||||
?>
|
||||
<div>
|
||||
<button type="button" class="btn btn-default" <?php echo $disabled ?>
|
||||
<button type="button" class="btn btn-default" <?php echo $disabled ?>
|
||||
data-toggle="modal"
|
||||
data-target="#freigabeModal_<?php echo $zgvpruefung->prestudent_id ?>"
|
||||
data-toggle="tooltip" title="<?php echo $disabledTxt ?>">
|
||||
@@ -350,7 +349,7 @@
|
||||
class="btn btn-default"
|
||||
data-dismiss="modal"><?php echo $this->p->t('ui', 'abbrechen') ?>
|
||||
</button>
|
||||
<a href="../saveFreigabe/<?php echo $zgvpruefung->prestudent_id ?>?fhc_controller_id=<?php echo $fhc_controller_id; ?>">
|
||||
<a href="saveFreigabe/<?php echo $zgvpruefung->prestudent_id ?>?fhc_controller_id=<?php echo $fhc_controller_id; ?>">
|
||||
<button type="button"
|
||||
class="btn btn-primary">
|
||||
<?php echo $this->p->t('infocenter', 'interessentFreigeben') ?>
|
||||
@@ -376,4 +375,4 @@
|
||||
</div><!-- /.div collapse -->
|
||||
</div><!-- /.panel -->
|
||||
<?php endforeach; // end foreach zgvpruefungen?>
|
||||
</div><!-- /.panel-group -->
|
||||
</div><!-- /.panel-group -->
|
||||
|
||||
@@ -84,7 +84,7 @@ $widthColumn = $msgExists === true ? 8 : 12;
|
||||
$.ajax(
|
||||
{
|
||||
dataType: "json",
|
||||
url: "<?php echo base_url("/index.ci.php/system/Messages/getMessageFromIds/") ?>" + msgid + "/" + recid,
|
||||
url: "<?php echo site_url("system/Messages/getMessageFromIds/") ?>" + msgid + "/" + recid,
|
||||
success: function (data, textStatus, jqXHR)
|
||||
{
|
||||
$("#msgsubject").text(data[0].subject);
|
||||
@@ -97,4 +97,4 @@ $widthColumn = $msgExists === true ? 8 : 12;
|
||||
}
|
||||
)
|
||||
}
|
||||
</script>
|
||||
</script>
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
}
|
||||
}
|
||||
?>
|
||||
<form action="<?php echo APP_ROOT; ?>index.ci.php/system/UDF/saveUDF" method="POST">
|
||||
<form action="<?php echo site_url('system/UDF/saveUDF'); ?>" method="POST">
|
||||
|
||||
<div class="div-table">
|
||||
<div class="div-row">
|
||||
|
||||
@@ -2,8 +2,9 @@
|
||||
|
||||
if (! defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
// Retrives the URL path of the called controller + called controller method
|
||||
// Retrives the name of the index page, the URL path of the called controller and the called controller
|
||||
// NOTE: placed here because it doesn't work inside functions
|
||||
$indexPage = $this->config->item('index_page');
|
||||
$calledPath = $this->router->directory.$this->router->class;
|
||||
$calledMethod = $this->router->method;
|
||||
|
||||
@@ -67,14 +68,14 @@ function _generateCSSsInclude($CSSs)
|
||||
/**
|
||||
* Generates global JS-Object to pass parms to other javascripts
|
||||
*/
|
||||
function _generateJSDataStorageObject($calledPath, $calledMethod)
|
||||
function _generateJSDataStorageObject($indexPage, $calledPath, $calledMethod)
|
||||
{
|
||||
$toPrint = "\n";
|
||||
$toPrint .= '<script type="text/javascript">';
|
||||
$toPrint .= '
|
||||
var FHC_JS_DATA_STORAGE_OBJECT = {
|
||||
app_root: "'.APP_ROOT.'",
|
||||
ci_router: "index.ci.php",
|
||||
ci_router: "'.$indexPage.'",
|
||||
called_path: "'.$calledPath.'",
|
||||
called_method: "'.$calledMethod.'"
|
||||
};';
|
||||
@@ -202,7 +203,7 @@ function _generateAddonsJSsInclude($calledFrom)
|
||||
|
||||
// Generates the global object to pass useful parameters to other javascripts
|
||||
// NOTE: must be called before any other JS include
|
||||
_generateJSDataStorageObject($calledPath, $calledMethod);
|
||||
_generateJSDataStorageObject($indexPage, $calledPath, $calledMethod);
|
||||
|
||||
// Generates the global object to pass phrases to javascripts
|
||||
// NOTE: must be called before including the PhrasesLib.js
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
*
|
||||
* Renders the header menu
|
||||
*/
|
||||
class NavigationHeaderWidget extends Widget
|
||||
{
|
||||
/**
|
||||
*
|
||||
* Renders the header menu
|
||||
*/
|
||||
public function display($widgetData)
|
||||
{
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
*
|
||||
* Renders the left side menu
|
||||
*/
|
||||
class NavigationMenuWidget extends Widget
|
||||
{
|
||||
/**
|
||||
*
|
||||
* Renders the left side menu
|
||||
*/
|
||||
public function display($widgetData)
|
||||
{
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
*
|
||||
* Renders the navigation widget making use of the NavigationMenuWidget and the NavigationHeaderWidget
|
||||
*/
|
||||
class NavigationWidget extends Widget
|
||||
{
|
||||
/**
|
||||
*
|
||||
* Renders the entire widget
|
||||
*/
|
||||
public function display($widgetData)
|
||||
{
|
||||
|
||||
+30
-30
@@ -24,75 +24,75 @@ function hide_ampel_div()
|
||||
if(is_user_logged_in())
|
||||
{
|
||||
$user = get_uid();
|
||||
|
||||
|
||||
$ampel = new ampel();
|
||||
$ampel->loadUserAmpel($user);
|
||||
$rot=0;
|
||||
$gelb = 0;
|
||||
$gelb = 0;
|
||||
$gruen = 0;
|
||||
$verpflichtend = false;
|
||||
$cnt_verpflichtend = 0;
|
||||
$cnt_abgelaufen = 0;
|
||||
$cnt_verpflichtend = 0;
|
||||
$cnt_abgelaufen = 0;
|
||||
$cnt_notConf_notOverdue = 0; //counts mandatory, not confirmed && not overdued ampeln (for popup)
|
||||
|
||||
|
||||
$datum = new datum();
|
||||
$now = $datum->mktime_fromdate(date('Y-m-d'));
|
||||
foreach($ampel->result as $row)
|
||||
{
|
||||
{
|
||||
$deadline =$datum->mktime_fromdate($row->deadline);
|
||||
$vorlaufzeit = $row->vorlaufzeit;
|
||||
$verfallszeit = $row->verfallszeit;
|
||||
$bestaetigt = $ampel->isBestaetigt($user, $row->ampel_id);
|
||||
$verpflichtend = $row->verpflichtend;
|
||||
$abgelaufen = false;
|
||||
|
||||
|
||||
$datum_liegt_vor_vorlaufzeit = false;
|
||||
$datum_liegt_nach_verfallszeit = false;
|
||||
|
||||
|
||||
if (!is_null($vorlaufzeit))
|
||||
$datum_liegt_vor_vorlaufzeit = $now < strtotime('-' . $vorlaufzeit . ' day', $deadline);
|
||||
|
||||
$datum_liegt_vor_vorlaufzeit = $now < strtotime('-' . $vorlaufzeit . ' day', $deadline);
|
||||
|
||||
if (!is_null($verfallszeit))
|
||||
$datum_liegt_nach_verfallszeit = $now > strtotime('+' . $verfallszeit . ' day', $deadline);
|
||||
|
||||
|
||||
//count mandatory
|
||||
if($verpflichtend == 't')
|
||||
$cnt_verpflichtend++;
|
||||
|
||||
|
||||
//count overdue
|
||||
if ($datum_liegt_nach_verfallszeit)
|
||||
$cnt_abgelaufen++;
|
||||
|
||||
//set status
|
||||
if ($bestaetigt)
|
||||
$gruen++;
|
||||
else if ($now >= $deadline && !$datum_liegt_nach_verfallszeit && !$bestaetigt)
|
||||
$gruen++;
|
||||
else if ($now >= $deadline && !$datum_liegt_nach_verfallszeit && !$bestaetigt)
|
||||
$rot++;
|
||||
else if (!$datum_liegt_nach_verfallszeit && !$datum_liegt_vor_vorlaufzeit)
|
||||
$gelb++;
|
||||
|
||||
$gelb++;
|
||||
|
||||
//count mandatory ampeln that are not confirmed and not overdue (for popup)
|
||||
if ($verpflichtend == 't' && !$bestaetigt && !$datum_liegt_nach_verfallszeit && !$datum_liegt_vor_vorlaufzeit)
|
||||
$cnt_notConf_notOverdue++;
|
||||
$cnt_notConf_notOverdue++;
|
||||
}
|
||||
|
||||
|
||||
|
||||
//if at least ONE mandatory notification, which is not overdue -> trigger notification-POPUP
|
||||
if ($cnt_notConf_notOverdue > 0)
|
||||
{
|
||||
{
|
||||
echo ' <script>
|
||||
$(document).ready(function()
|
||||
{
|
||||
function resizeIframe(obj)
|
||||
{
|
||||
function resizeIframe(obj)
|
||||
{
|
||||
obj.style.height = obj.contentWindow.document.body.scrollHeight + \'px\';
|
||||
}
|
||||
|
||||
var html_content = \'<iframe src="'.APP_ROOT.'cis/private/tools/ampelverwaltung.php?verpflichtend=true" name="ampel" frameborder="0" width="100%" height="100% onload="resizeIframe(this) id="ampel_frame"></iframe><button id="close_button" onclick="hide_ampel_div()">Close</button>\';
|
||||
|
||||
var html_content = \'<iframe src="'.APP_ROOT.'cis/private/tools/ampelverwaltung.php?verpflichtend=true" name="ampel" frameborder="0" width="100%" height="100% onload="resizeIframe(this) id="ampel_frame"></iframe><button id="close_button" class="btn btn-default" onclick="hide_ampel_div()">'.$p->t('tools/ampelClose').'</button>\';
|
||||
$("#ampel_div").html(html_content);
|
||||
});
|
||||
</script>';
|
||||
|
||||
|
||||
echo ' <style type="text/css">
|
||||
#ampel_div
|
||||
{
|
||||
@@ -107,8 +107,8 @@ if(is_user_logged_in())
|
||||
background-color: #fefefe;
|
||||
margin: auto;
|
||||
text-align: center;
|
||||
padding-top: 20px;
|
||||
border: 3px solid black;
|
||||
/*padding-top: 20px;*/
|
||||
/*border: 3px solid black;*/
|
||||
-webkit-box-shadow: 0px 0px 0px 2000px rgba(0,0,0,0.47);
|
||||
-moz-box-shadow: 0px 0px 0px 2000px rgba(0,0,0,0.47);
|
||||
box-shadow: 0px 0px 0px 2000px rgba(0,0,0,0.47);
|
||||
@@ -120,24 +120,24 @@ if(is_user_logged_in())
|
||||
#close_button
|
||||
{
|
||||
position: relative;
|
||||
top: 5px;
|
||||
top: 0px;
|
||||
font-size: 150%;
|
||||
height: 50px;
|
||||
width: 100%;
|
||||
}
|
||||
</style>';
|
||||
}
|
||||
|
||||
|
||||
//show & color header ampel-link
|
||||
if($rot > 0)
|
||||
echo '<a href="private/tools/ampelverwaltung.php" target="content" title="'.$p->t("tools/ampelsystem").'"><span style="color: red;">'.$p->t("tools/ampelsystem").'</span></a> <span style="color: #A5AFB6">|</span> ';
|
||||
elseif($gelb > 0)
|
||||
echo '<a href="private/tools/ampelverwaltung.php" target="content" title="'.$p->t("tools/ampelsystem").'"><span style="color: orange;">'.$p->t("tools/ampelsystem").'</span></a> <span style="color: #A5AFB6">|</span> ';
|
||||
elseif($rot==0 || $rot <= $cnt_abgelaufen && $gelb==0)
|
||||
echo '<a href="private/tools/ampelverwaltung.php" target="content" title="'.$p->t("tools/ampelsystem").'"><span style="color: #A5AFB6">'.$p->t("tools/ampelsystem").'</span></a> <span style="color: #A5AFB6">|</span> ';
|
||||
echo '<a href="private/tools/ampelverwaltung.php" target="content" title="'.$p->t("tools/ampelsystem").'"><span style="color: #A5AFB6">'.$p->t("tools/ampelsystem").'</span></a> <span style="color: #A5AFB6">|</span> ';
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "<script>window.setTimeout('loadampel()',1000);</script>";
|
||||
}
|
||||
?>
|
||||
?>
|
||||
|
||||
+6
-5
@@ -165,11 +165,12 @@ $db = new basis_db();
|
||||
<link rel="stylesheet" href="../skin/jquery.css" type="text/css">
|
||||
<link href="../skin/style.css.php" rel="stylesheet" type="text/css">
|
||||
<link rel="stylesheet" type="text/css" href="../skin/jquery-ui-1.9.2.custom.min.css">
|
||||
<script type="text/javascript" src="../vendor/jquery/jqueryV1/jquery-1.12.4.min.js"></script>
|
||||
<script type="text/javascript" src="../vendor/christianbach/tablesorter/jquery.tablesorter.min.js"></script>
|
||||
<script type="text/javascript" src="../vendor/components/jqueryui/jquery-ui.min.js"></script>
|
||||
<script type="text/javascript" src="../include/js/jquery.ui.datepicker.translation.js"></script>
|
||||
<script type="text/javascript" src="../vendor/jquery/sizzle/sizzle.js"></script>
|
||||
<script type="text/javascript" src="../vendor/jquery/jqueryV1/jquery-1.12.4.min.js"></script>
|
||||
<script type="text/javascript" src="../vendor/christianbach/tablesorter/jquery.tablesorter.min.js"></script>
|
||||
<script type="text/javascript" src="../vendor/components/jqueryui/jquery-ui.min.js"></script>
|
||||
<script type="text/javascript" src="../include/js/jquery.ui.datepicker.translation.js"></script>
|
||||
<script type="text/javascript" src="../vendor/jquery/sizzle/sizzle.js"></script>
|
||||
<link rel="stylesheet" type="text/css" href="../vendor/twbs/bootstrap/dist/css/bootstrap.min.css">
|
||||
</head>
|
||||
<script type="text/javascript">
|
||||
function changeSprache(sprache)
|
||||
|
||||
+493
-473
@@ -1,473 +1,493 @@
|
||||
<?php
|
||||
/* Copyright (C) 2006 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
|
||||
* published by the Free Software Foundation; either version 2 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* 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>,
|
||||
* Andreas Oesterreicher <andreas.oesterreicher@technikum-wien.at> and
|
||||
* Rudolf Hangl <rudolf.hangl@technikum-wien.at>.
|
||||
*/
|
||||
|
||||
require_once('../config/vilesci.config.inc.php');
|
||||
require_once('../include/functions.inc.php');
|
||||
require_once('../include/studiengang.class.php');
|
||||
|
||||
$user = get_uid();
|
||||
loadVariables($user);
|
||||
|
||||
?>
|
||||
// ********** GLOBALE VARIABLEN ********** //
|
||||
var FunktionenTreeDatasource=''; // Datasource des Adressen Trees
|
||||
var FunktionenSelectID='';
|
||||
var FunktionenUID=null;
|
||||
var FunktionBezeichnungChanged=false;
|
||||
|
||||
<?php
|
||||
|
||||
// JS-Variable anlegen mit einer Uebersetzungstabellle
|
||||
// Studiengang zu Organisationseinheit
|
||||
$stg_obj = new studiengang();
|
||||
$stg_obj->getAll();
|
||||
|
||||
echo 'var organisationseinheit = {';
|
||||
$content = '';
|
||||
foreach ($stg_obj->result as $stg)
|
||||
$content .= '"'.$stg->studiengang_kz.'":"'.$stg->oe_kurzbz.'",';
|
||||
echo substr($content, 0, mb_strlen($content)-1).'};';
|
||||
|
||||
?>
|
||||
// ********** LISTENER UND OBSERVER ********** //
|
||||
|
||||
// ****
|
||||
// * Observer fuer Adressen Tree
|
||||
// * startet Rebuild nachdem das Refresh
|
||||
// * der Datasource fertig ist
|
||||
// ****
|
||||
var FunktionenTreeSinkObserver =
|
||||
{
|
||||
onBeginLoad : function(pSink) {},
|
||||
onInterrupt : function(pSink) {},
|
||||
onResume : function(pSink) {},
|
||||
onError : function(pSink, pStatus, pError) {},
|
||||
onEndLoad : function(pSink)
|
||||
{
|
||||
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
|
||||
document.getElementById('funktion-tree').builder.rebuild();
|
||||
}
|
||||
};
|
||||
|
||||
// ****
|
||||
// * Nach dem Rebuild wird der Eintrag wieder
|
||||
// * markiert
|
||||
// ****
|
||||
var FunktionenTreeListener =
|
||||
{
|
||||
willRebuild : function(builder) { },
|
||||
didRebuild : function(builder)
|
||||
{
|
||||
//timeout nur bei Mozilla notwendig da sonst die rows
|
||||
//noch keine values haben. Ab Seamonkey funktionierts auch
|
||||
//ohne dem setTimeout
|
||||
window.setTimeout(FunktionenTreeSelectID,10);
|
||||
}
|
||||
};
|
||||
|
||||
// ********** FUNKTIONEN ********** //
|
||||
|
||||
// ****
|
||||
// * Laedt die Trees
|
||||
// ****
|
||||
function loadFunktionen(uid)
|
||||
{
|
||||
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
|
||||
|
||||
FunktionenUID = uid;
|
||||
|
||||
//Adressen laden
|
||||
url = "<?php echo APP_ROOT; ?>rdf/benutzerfunktion.rdf.php?uid="+uid+"&"+gettimestamp();
|
||||
var tree=document.getElementById('funktion-tree');
|
||||
|
||||
try
|
||||
{
|
||||
FunktionenTreeDatasource.removeXMLSinkObserver(FunktionenTreeSinkObserver);
|
||||
tree.builder.removeListener(FunktionenTreeListener);
|
||||
}
|
||||
catch(e)
|
||||
{}
|
||||
|
||||
//Alte DS entfernen
|
||||
var oldDatasources = tree.database.GetDataSources();
|
||||
while(oldDatasources.hasMoreElements())
|
||||
{
|
||||
tree.database.RemoveDataSource(oldDatasources.getNext());
|
||||
}
|
||||
|
||||
var rdfService = Components.classes["@mozilla.org/rdf/rdf-service;1"].getService(Components.interfaces.nsIRDFService);
|
||||
FunktionenTreeDatasource = rdfService.GetDataSource(url);
|
||||
FunktionenTreeDatasource.QueryInterface(Components.interfaces.nsIRDFRemoteDataSource);
|
||||
FunktionenTreeDatasource.QueryInterface(Components.interfaces.nsIRDFXMLSink);
|
||||
tree.database.AddDataSource(FunktionenTreeDatasource);
|
||||
FunktionenTreeDatasource.addXMLSinkObserver(FunktionenTreeSinkObserver);
|
||||
tree.builder.addListener(FunktionenTreeListener);
|
||||
FunktionDisableFields(false);
|
||||
|
||||
}
|
||||
|
||||
// ****
|
||||
// * Selectiert eine Funktion nachdem der Tree
|
||||
// * rebuildet wurde.
|
||||
// ****
|
||||
function FunktionenTreeSelectID()
|
||||
{
|
||||
var tree=document.getElementById('funktion-tree');
|
||||
var items = tree.view.rowCount; //Anzahl der Zeilen ermitteln
|
||||
|
||||
//In der globalen Variable ist die zu selektierende Adresse gespeichert
|
||||
if(FunktionenSelectID!=null)
|
||||
{
|
||||
for(var i=0;i<items;i++)
|
||||
{
|
||||
//ID der row holen
|
||||
col = tree.columns ? tree.columns["funktion-treecol-benutzerfunktion_id"] : "funktion-treecol-benutzerfunktion_id";
|
||||
id=tree.view.getCellText(i,col);
|
||||
|
||||
if(id == FunktionenSelectID)
|
||||
{
|
||||
//Zeile markieren
|
||||
tree.view.selection.select(i);
|
||||
//Sicherstellen, dass die Zeile im sichtbaren Bereich liegt
|
||||
tree.treeBoxObject.ensureRowIsVisible(i);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
FunktionenSelectID=null;
|
||||
}
|
||||
}
|
||||
|
||||
// ****
|
||||
// * Deaktiviert die Felder und setzt den Neu status
|
||||
// ****
|
||||
function FunktionNeu()
|
||||
{
|
||||
FunktionDetailResetFields();
|
||||
FunktionDetailDisableFields(false);
|
||||
document.getElementById('funktion-checkbox-neu').checked=true;
|
||||
document.getElementById('funktion-textbox-benutzerfunktion_id').value='';
|
||||
|
||||
//Wenn die aktuelle Person ein Student ist,
|
||||
//dann wird Studiengang und 'Studentenvertreter' vorausgewaehlt
|
||||
if(window.parent.document.getElementById('main-content-tabs').selectedItem==window.parent.document.getElementById('tab-mitarbeiter'))
|
||||
oe_kurzbz='';
|
||||
else
|
||||
oe_kurzbz = organisationseinheit[ window.parent.document.getElementById('student-prestudent-menulist-studiengang_kz').value ];
|
||||
|
||||
if(oe_kurzbz!='')
|
||||
{
|
||||
document.getElementById('funktion-menulist-oe_kurzbz').value=oe_kurzbz;
|
||||
document.getElementById('funktion-menulist-funktion').value='stdv';
|
||||
}
|
||||
|
||||
var Datum = new Date()
|
||||
var Jahr = Datum.getFullYear()
|
||||
var Tag = Datum.getDate()
|
||||
var Monat = Datum.getMonth()+1
|
||||
|
||||
document.getElementById('funktion-box-datum_von').value=Tag+'.'+Monat+'.'+Jahr;
|
||||
document.getElementById('funktion-box-datum_bis').value='';
|
||||
document.getElementById('funktion-textbox-bezeichnung').value='';
|
||||
document.getElementById('funktion-textbox-wochenstunden').value='';
|
||||
FunktionToggleFachbereich();
|
||||
}
|
||||
|
||||
// ****
|
||||
// * Loescht eine Funktion
|
||||
// ****
|
||||
function FunktionDelete()
|
||||
{
|
||||
tree = document.getElementById('funktion-tree');
|
||||
|
||||
if (tree.currentIndex==-1)
|
||||
{
|
||||
alert('Bitte zuerst eine Funktion auswaehlen');
|
||||
return;
|
||||
}
|
||||
|
||||
//Ausgewaehlte ID holen
|
||||
var col = tree.columns ? tree.columns["funktion-treecol-benutzerfunktion_id"] : "funktion-treecol-benutzerfunktion_id";
|
||||
var benutzerfunktion_id=tree.view.getCellText(tree.currentIndex,col);
|
||||
|
||||
//Bei Mitarbeitern wird kein Studiengang mitgeschickt
|
||||
if(window.parent.document.getElementById('main-content-tabs').selectedItem==window.parent.document.getElementById('tab-mitarbeiter'))
|
||||
studiengang_kz='';
|
||||
else
|
||||
studiengang_kz = window.parent.document.getElementById('student-prestudent-menulist-studiengang_kz').value;
|
||||
|
||||
if(confirm('Soll diese Funktion wirklich geloescht werden?'))
|
||||
{
|
||||
var url = '<?php echo APP_ROOT ?>content/fasDBDML.php';
|
||||
var req = new phpRequest(url,'','');
|
||||
|
||||
req.add('type', 'funktiondelete');
|
||||
|
||||
req.add('benutzerfunktion_id', benutzerfunktion_id);
|
||||
req.add('studiengang_kz', studiengang_kz);
|
||||
|
||||
var response = req.executePOST();
|
||||
|
||||
var val = new ParseReturnValue(response)
|
||||
|
||||
if (!val.dbdml_return)
|
||||
{
|
||||
if(val.dbdml_errormsg=='')
|
||||
alert(response)
|
||||
else
|
||||
alert(val.dbdml_errormsg)
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
|
||||
FunktionenTreeDatasource.Refresh(false);
|
||||
FunktionDetailResetFields();
|
||||
FunktionDetailDisableFields(true);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// ****
|
||||
// * Speichert die Daten
|
||||
// ****
|
||||
function FunktionDetailSpeichern()
|
||||
{
|
||||
var funktion_kurzbz = document.getElementById('funktion-menulist-funktion').value;
|
||||
var oe_kurzbz = document.getElementById('funktion-menulist-oe_kurzbz').value;
|
||||
var semester = document.getElementById('funktion-menulist-semester').value;
|
||||
var fachbereich_kurzbz = document.getElementById('funktion-menulist-fachbereich').value;
|
||||
var neu = document.getElementById('funktion-checkbox-neu').checked;
|
||||
var benutzerfunktion_id = document.getElementById('funktion-textbox-benutzerfunktion_id').value;
|
||||
var datum_von = document.getElementById('funktion-box-datum_von').value;
|
||||
var datum_bis = document.getElementById('funktion-box-datum_bis').value;
|
||||
var bezeichnung = document.getElementById('funktion-textbox-bezeichnung').value;
|
||||
var wochenstunden = document.getElementById('funktion-textbox-wochenstunden').value;
|
||||
|
||||
//Bei Mitarbeitern wird kein Studiengang mitgeschickt
|
||||
if(window.parent.document.getElementById('main-content-tabs').selectedItem==window.parent.document.getElementById('tab-mitarbeiter'))
|
||||
studiengang_kz_berecht='';
|
||||
else
|
||||
studiengang_kz_berecht = window.parent.document.getElementById('student-prestudent-menulist-studiengang_kz').value;
|
||||
|
||||
var url = '<?php echo APP_ROOT ?>content/fasDBDML.php';
|
||||
var req = new phpRequest(url,'','');
|
||||
|
||||
//Wenn Fachbereich ausgeblendet ist, dann sicherheitshalber auf '' setzen
|
||||
if(document.getElementById('funktion-menulist-fachbereich').hidden==true)
|
||||
fachbereich_kurzbz='';
|
||||
|
||||
req.add('type', 'funktionsave');
|
||||
|
||||
req.add('funktion_kurzbz', funktion_kurzbz);
|
||||
req.add('oe_kurzbz', oe_kurzbz);
|
||||
req.add('semester', semester);
|
||||
req.add('studiengang_kz_berecht', studiengang_kz_berecht);
|
||||
req.add('fachbereich_kurzbz', fachbereich_kurzbz);
|
||||
req.add('uid', FunktionenUID);
|
||||
req.add('neu', neu);
|
||||
req.add('benutzerfunktion_id', benutzerfunktion_id);
|
||||
req.add('datum_von', ConvertDateToISO(datum_von));
|
||||
req.add('datum_bis', ConvertDateToISO(datum_bis));
|
||||
req.add('bezeichnung', bezeichnung);
|
||||
req.add('wochenstunden', wochenstunden);
|
||||
|
||||
var response = req.executePOST();
|
||||
|
||||
var val = new ParseReturnValue(response)
|
||||
|
||||
if (!val.dbdml_return)
|
||||
{
|
||||
if(val.dbdml_errormsg=='')
|
||||
alert(response)
|
||||
else
|
||||
alert(val.dbdml_errormsg)
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
FunktionBezeichnungChanged=false;
|
||||
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
|
||||
FunktionenSelectID=val.dbdml_data;
|
||||
FunktionenTreeDatasource.Refresh(false);
|
||||
document.getElementById('funktion-checkbox-neu').checked=false;
|
||||
document.getElementById('funktion-textbox-benutzerfunktion_id').value=FunktionenSelectID;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
// ****
|
||||
// * Daten zum Bearbeiten laden
|
||||
// ****
|
||||
function FunktionBearbeiten()
|
||||
{
|
||||
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
|
||||
|
||||
tree = document.getElementById('funktion-tree');
|
||||
|
||||
if (tree.currentIndex==-1)
|
||||
return;
|
||||
|
||||
//Ausgewaehlte Nr holen
|
||||
var col = tree.columns ? tree.columns["funktion-treecol-benutzerfunktion_id"] : "funktion-treecol-benutzerfunktion_id";
|
||||
var benutzerfunktion_id=tree.view.getCellText(tree.currentIndex,col);
|
||||
|
||||
//Daten holen
|
||||
var url = '<?php echo APP_ROOT ?>rdf/benutzerfunktion.rdf.php?benutzerfunktion_id='+benutzerfunktion_id+'&'+gettimestamp();
|
||||
|
||||
var rdfService = Components.classes["@mozilla.org/rdf/rdf-service;1"].
|
||||
getService(Components.interfaces.nsIRDFService);
|
||||
|
||||
var dsource = rdfService.GetDataSourceBlocking(url);
|
||||
|
||||
var subject = rdfService.GetResource("http://www.technikum-wien.at/bnfunktion/"+benutzerfunktion_id);
|
||||
|
||||
var predicateNS = "http://www.technikum-wien.at/bnfunktion/rdf";
|
||||
|
||||
//Daten holen
|
||||
var fachbereich_kurzbz = getTargetHelper(dsource,subject,rdfService.GetResource( predicateNS + "#fachbereich_kurzbz" ));
|
||||
var uid = getTargetHelper(dsource,subject,rdfService.GetResource( predicateNS + "#uid" ));
|
||||
var oe_kurzbz = getTargetHelper(dsource,subject,rdfService.GetResource( predicateNS + "#oe_kurzbz" ));
|
||||
var semester = getTargetHelper(dsource,subject,rdfService.GetResource( predicateNS + "#semester" ));
|
||||
var funktion_kurzbz = getTargetHelper(dsource,subject,rdfService.GetResource( predicateNS + "#funktion_kurzbz" ));
|
||||
var datum_von = getTargetHelper(dsource,subject,rdfService.GetResource( predicateNS + "#datum_von" ));
|
||||
var datum_bis = getTargetHelper(dsource,subject,rdfService.GetResource( predicateNS + "#datum_bis" ));
|
||||
var bezeichnung = getTargetHelper(dsource,subject,rdfService.GetResource( predicateNS + "#bezeichnung" ));
|
||||
var wochenstunden = getTargetHelper(dsource,subject,rdfService.GetResource( predicateNS + "#wochenstunden" ));
|
||||
|
||||
document.getElementById('funktion-menulist-fachbereich').value=fachbereich_kurzbz;
|
||||
document.getElementById('funktion-menulist-oe_kurzbz').value=oe_kurzbz;
|
||||
document.getElementById('funktion-menulist-semester').value=semester;
|
||||
document.getElementById('funktion-menulist-funktion').value=funktion_kurzbz;
|
||||
document.getElementById('funktion-textbox-benutzerfunktion_id').value=benutzerfunktion_id;
|
||||
document.getElementById('funktion-checkbox-neu').checked = false;
|
||||
document.getElementById('funktion-box-datum_von').value=datum_von;
|
||||
document.getElementById('funktion-box-datum_bis').value=datum_bis;
|
||||
document.getElementById('funktion-textbox-bezeichnung').value=bezeichnung;
|
||||
document.getElementById('funktion-textbox-wochenstunden').value=wochenstunden;
|
||||
|
||||
FunktionBezeichnungChanged=true;
|
||||
FunktionDetailDisableFields(false);
|
||||
FunktionToggleFachbereich();
|
||||
}
|
||||
|
||||
// ****
|
||||
// * De-/Aktiviert die Buttons
|
||||
// ****
|
||||
function FunktionDisableFields(val)
|
||||
{
|
||||
document.getElementById('funktion-button-neu').disabled=val;
|
||||
document.getElementById('funktion-button-loeschen').disabled=val;
|
||||
|
||||
if(val)
|
||||
FunktionDetailDisableFields(val);
|
||||
}
|
||||
|
||||
// ****
|
||||
// * De-/Aktiviert die DetailFelder
|
||||
// ****
|
||||
function FunktionDetailDisableFields(val)
|
||||
{
|
||||
document.getElementById('funktion-menulist-fachbereich').disabled=val;
|
||||
document.getElementById('funktion-menulist-oe_kurzbz').disabled=val;
|
||||
document.getElementById('funktion-menulist-semester').disabled=val;
|
||||
document.getElementById('funktion-menulist-funktion').disabled=val;
|
||||
document.getElementById('funktion-button-speichern').disabled=val;
|
||||
document.getElementById('funktion-box-datum_von').disabled=val;
|
||||
document.getElementById('funktion-box-datum_bis').disabled=val;
|
||||
document.getElementById('funktion-textbox-bezeichnung').disabled=val;
|
||||
document.getElementById('funktion-textbox-wochenstunden').disabled=val;
|
||||
}
|
||||
|
||||
// ****
|
||||
// * Setzt Defaultwerte fuer die Felder
|
||||
// ****
|
||||
function FunktionDetailResetFields()
|
||||
{
|
||||
document.getElementById('funktion-menulist-fachbereich').value='';
|
||||
document.getElementById('funktion-menulist-oe_kurzbz').selectedIndex=0;
|
||||
document.getElementById('funktion-menulist-semester').value='';
|
||||
document.getElementById('funktion-menulist-funktion').value='ass';
|
||||
|
||||
var Datum = new Date();
|
||||
var Jahr = Datum.getFullYear();
|
||||
var Tag = Datum.getDate();
|
||||
var Monat = Datum.getMonth()+1;
|
||||
|
||||
document.getElementById('funktion-box-datum_von').value=Tag+'.'+Monat+'.'+Jahr;
|
||||
document.getElementById('funktion-box-datum_bis').value='';
|
||||
document.getElementById('funktion-textbox-bezeichnung').value='';
|
||||
document.getElementById('funktion-textbox-wochenstunden').value='';
|
||||
FunktionBezeichnungChanged=false;
|
||||
}
|
||||
|
||||
// ****
|
||||
// * Fachbereichs und Semester DropDown nur Anzeigen, wenn die entsprechenden Attribute
|
||||
// * der Funktion auf true gesetzt sind
|
||||
// ****
|
||||
function FunktionToggleFachbereich()
|
||||
{
|
||||
var menulist = document.getElementById('funktion-menulist-funktion');
|
||||
|
||||
//ersten selektierten Eintrag holen
|
||||
var children = menulist.getElementsByAttribute('selected','true');
|
||||
children = children[0];
|
||||
|
||||
//Attribute semester und fachbereich auslesen
|
||||
var semester = children.getAttribute('semester');
|
||||
var fachbereich = children.getAttribute('fachbereich');
|
||||
var bezeichnung = children.label;
|
||||
|
||||
//wenn in der Bezeichung noch nichts drinnen steht, dann die Funktion in die Bezeichnung schreiben
|
||||
var tbbezeichnung = document.getElementById('funktion-textbox-bezeichnung')
|
||||
|
||||
if(!FunktionBezeichnungChanged)
|
||||
{
|
||||
tbbezeichnung.value=bezeichnung;
|
||||
}
|
||||
|
||||
//Felder sichtbar/unsichtbar setzen
|
||||
var semesterhidden=false;
|
||||
var fachbereichhidden=false;
|
||||
|
||||
if(semester=='true')
|
||||
semesterhidden=false;
|
||||
else
|
||||
semesterhidden=true;
|
||||
|
||||
if(fachbereich=='true')
|
||||
fachbereichhidden=false;
|
||||
else
|
||||
fachbereichhidden=true;
|
||||
|
||||
document.getElementById('funktion-menulist-fachbereich').hidden=fachbereichhidden;
|
||||
document.getElementById('funktion-label-fachbereich').hidden=fachbereichhidden;
|
||||
|
||||
document.getElementById('funktion-menulist-semester').hidden=semesterhidden;
|
||||
document.getElementById('funktion-label-semester').hidden=semesterhidden;
|
||||
|
||||
}
|
||||
|
||||
function FunktionBezeichnungChange()
|
||||
{
|
||||
FunktionBezeichnungChanged=true;
|
||||
}
|
||||
<?php
|
||||
/* Copyright (C) 2006 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
|
||||
* published by the Free Software Foundation; either version 2 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* 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>,
|
||||
* Andreas Oesterreicher <andreas.oesterreicher@technikum-wien.at> and
|
||||
* Rudolf Hangl <rudolf.hangl@technikum-wien.at>.
|
||||
*/
|
||||
|
||||
require_once('../config/vilesci.config.inc.php');
|
||||
require_once('../include/functions.inc.php');
|
||||
require_once('../include/studiengang.class.php');
|
||||
|
||||
$user = get_uid();
|
||||
loadVariables($user);
|
||||
|
||||
?>
|
||||
// ********** GLOBALE VARIABLEN ********** //
|
||||
var FunktionenTreeDatasource=''; // Datasource des Adressen Trees
|
||||
var FunktionenSelectID='';
|
||||
var FunktionenUID=null;
|
||||
var FunktionBezeichnungChanged=false;
|
||||
<?php
|
||||
|
||||
// JS-Variable anlegen mit einer Uebersetzungstabellle
|
||||
// Studiengang zu Organisationseinheit
|
||||
$stg_obj = new studiengang();
|
||||
$stg_obj->getAll();
|
||||
|
||||
echo 'var organisationseinheit = {';
|
||||
$content = '';
|
||||
foreach ($stg_obj->result as $stg)
|
||||
$content .= '"'.$stg->studiengang_kz.'":"'.$stg->oe_kurzbz.'",';
|
||||
echo substr($content, 0, mb_strlen($content)-1).'};';
|
||||
|
||||
?>
|
||||
// ********** LISTENER UND OBSERVER ********** //
|
||||
|
||||
// ****
|
||||
// * Observer fuer Adressen Tree
|
||||
// * startet Rebuild nachdem das Refresh
|
||||
// * der Datasource fertig ist
|
||||
// ****
|
||||
var FunktionenTreeSinkObserver =
|
||||
{
|
||||
onBeginLoad : function(pSink) {},
|
||||
onInterrupt : function(pSink) {},
|
||||
onResume : function(pSink) {},
|
||||
onError : function(pSink, pStatus, pError) {},
|
||||
onEndLoad : function(pSink)
|
||||
{
|
||||
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
|
||||
document.getElementById('funktion-tree').builder.rebuild();
|
||||
}
|
||||
};
|
||||
|
||||
// ****
|
||||
// * Nach dem Rebuild wird der Eintrag wieder
|
||||
// * markiert
|
||||
// ****
|
||||
var FunktionenTreeListener =
|
||||
{
|
||||
willRebuild : function(builder) { },
|
||||
didRebuild : function(builder)
|
||||
{
|
||||
//timeout nur bei Mozilla notwendig da sonst die rows
|
||||
//noch keine values haben. Ab Seamonkey funktionierts auch
|
||||
//ohne dem setTimeout
|
||||
window.setTimeout(FunktionenTreeSelectID,10);
|
||||
}
|
||||
};
|
||||
|
||||
// ********** FUNKTIONEN ********** //
|
||||
function FunktionFilter()
|
||||
{
|
||||
var filter = document.getElementById('funktionen-button-filter')
|
||||
var state = document.getElementById('funktionen-filter-state')
|
||||
if(state.value == 'alle')
|
||||
{
|
||||
state.value = 'offene';
|
||||
loadFunktionen(FunktionenUID);
|
||||
filter.label = 'Alle anzeigen';
|
||||
setVariable('fasfunktionfilter', 'offene');
|
||||
}
|
||||
else
|
||||
{
|
||||
state.value = 'alle';
|
||||
loadFunktionen(FunktionenUID);
|
||||
filter.label = 'Nur aktuelle anzeigen';
|
||||
setVariable('fasfunktionfilter', 'alle')
|
||||
}
|
||||
}
|
||||
|
||||
// ****
|
||||
// * Laedt die Trees
|
||||
// ****
|
||||
function loadFunktionen(uid)
|
||||
{
|
||||
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
|
||||
|
||||
FunktionenUID = uid;
|
||||
var filter = document.getElementById('funktionen-filter-state');
|
||||
|
||||
//Adressen laden
|
||||
url = "<?php echo APP_ROOT; ?>rdf/benutzerfunktion.rdf.php?uid="+uid+"&filter="+filter.value+"&"+gettimestamp();
|
||||
|
||||
var tree=document.getElementById('funktion-tree');
|
||||
|
||||
try
|
||||
{
|
||||
FunktionenTreeDatasource.removeXMLSinkObserver(FunktionenTreeSinkObserver);
|
||||
tree.builder.removeListener(FunktionenTreeListener);
|
||||
}
|
||||
catch(e)
|
||||
{}
|
||||
|
||||
//Alte DS entfernen
|
||||
var oldDatasources = tree.database.GetDataSources();
|
||||
while(oldDatasources.hasMoreElements())
|
||||
{
|
||||
tree.database.RemoveDataSource(oldDatasources.getNext());
|
||||
}
|
||||
|
||||
var rdfService = Components.classes["@mozilla.org/rdf/rdf-service;1"].getService(Components.interfaces.nsIRDFService);
|
||||
FunktionenTreeDatasource = rdfService.GetDataSource(url);
|
||||
FunktionenTreeDatasource.QueryInterface(Components.interfaces.nsIRDFRemoteDataSource);
|
||||
FunktionenTreeDatasource.QueryInterface(Components.interfaces.nsIRDFXMLSink);
|
||||
tree.database.AddDataSource(FunktionenTreeDatasource);
|
||||
FunktionenTreeDatasource.addXMLSinkObserver(FunktionenTreeSinkObserver);
|
||||
tree.builder.addListener(FunktionenTreeListener);
|
||||
FunktionDisableFields(false);
|
||||
|
||||
}
|
||||
|
||||
// ****
|
||||
// * Selectiert eine Funktion nachdem der Tree
|
||||
// * rebuildet wurde.
|
||||
// ****
|
||||
function FunktionenTreeSelectID()
|
||||
{
|
||||
var tree=document.getElementById('funktion-tree');
|
||||
var items = tree.view.rowCount; //Anzahl der Zeilen ermitteln
|
||||
|
||||
//In der globalen Variable ist die zu selektierende Adresse gespeichert
|
||||
if(FunktionenSelectID!=null)
|
||||
{
|
||||
for(var i=0;i<items;i++)
|
||||
{
|
||||
//ID der row holen
|
||||
col = tree.columns ? tree.columns["funktion-treecol-benutzerfunktion_id"] : "funktion-treecol-benutzerfunktion_id";
|
||||
id=tree.view.getCellText(i,col);
|
||||
|
||||
if(id == FunktionenSelectID)
|
||||
{
|
||||
//Zeile markieren
|
||||
tree.view.selection.select(i);
|
||||
//Sicherstellen, dass die Zeile im sichtbaren Bereich liegt
|
||||
tree.treeBoxObject.ensureRowIsVisible(i);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
FunktionenSelectID=null;
|
||||
}
|
||||
}
|
||||
|
||||
// ****
|
||||
// * Deaktiviert die Felder und setzt den Neu status
|
||||
// ****
|
||||
function FunktionNeu()
|
||||
{
|
||||
FunktionDetailResetFields();
|
||||
FunktionDetailDisableFields(false);
|
||||
document.getElementById('funktion-checkbox-neu').checked=true;
|
||||
document.getElementById('funktion-textbox-benutzerfunktion_id').value='';
|
||||
|
||||
//Wenn die aktuelle Person ein Student ist,
|
||||
//dann wird Studiengang und 'Studentenvertreter' vorausgewaehlt
|
||||
if(window.parent.document.getElementById('main-content-tabs').selectedItem==window.parent.document.getElementById('tab-mitarbeiter'))
|
||||
oe_kurzbz='';
|
||||
else
|
||||
oe_kurzbz = organisationseinheit[ window.parent.document.getElementById('student-prestudent-menulist-studiengang_kz').value ];
|
||||
|
||||
if(oe_kurzbz!='')
|
||||
{
|
||||
document.getElementById('funktion-menulist-oe_kurzbz').value=oe_kurzbz;
|
||||
document.getElementById('funktion-menulist-funktion').value='stdv';
|
||||
}
|
||||
|
||||
var Datum = new Date()
|
||||
var Jahr = Datum.getFullYear()
|
||||
var Tag = Datum.getDate()
|
||||
var Monat = Datum.getMonth()+1
|
||||
|
||||
document.getElementById('funktion-box-datum_von').value=Tag+'.'+Monat+'.'+Jahr;
|
||||
document.getElementById('funktion-box-datum_bis').value='';
|
||||
document.getElementById('funktion-textbox-bezeichnung').value='';
|
||||
document.getElementById('funktion-textbox-wochenstunden').value='';
|
||||
FunktionToggleFachbereich();
|
||||
}
|
||||
|
||||
// ****
|
||||
// * Loescht eine Funktion
|
||||
// ****
|
||||
function FunktionDelete()
|
||||
{
|
||||
tree = document.getElementById('funktion-tree');
|
||||
|
||||
if (tree.currentIndex==-1)
|
||||
{
|
||||
alert('Bitte zuerst eine Funktion auswaehlen');
|
||||
return;
|
||||
}
|
||||
|
||||
//Ausgewaehlte ID holen
|
||||
var col = tree.columns ? tree.columns["funktion-treecol-benutzerfunktion_id"] : "funktion-treecol-benutzerfunktion_id";
|
||||
var benutzerfunktion_id=tree.view.getCellText(tree.currentIndex,col);
|
||||
|
||||
//Bei Mitarbeitern wird kein Studiengang mitgeschickt
|
||||
if(window.parent.document.getElementById('main-content-tabs').selectedItem==window.parent.document.getElementById('tab-mitarbeiter'))
|
||||
studiengang_kz='';
|
||||
else
|
||||
studiengang_kz = window.parent.document.getElementById('student-prestudent-menulist-studiengang_kz').value;
|
||||
|
||||
if(confirm('Soll diese Funktion wirklich geloescht werden?'))
|
||||
{
|
||||
var url = '<?php echo APP_ROOT ?>content/fasDBDML.php';
|
||||
var req = new phpRequest(url,'','');
|
||||
|
||||
req.add('type', 'funktiondelete');
|
||||
|
||||
req.add('benutzerfunktion_id', benutzerfunktion_id);
|
||||
req.add('studiengang_kz', studiengang_kz);
|
||||
|
||||
var response = req.executePOST();
|
||||
|
||||
var val = new ParseReturnValue(response)
|
||||
|
||||
if (!val.dbdml_return)
|
||||
{
|
||||
if(val.dbdml_errormsg=='')
|
||||
alert(response)
|
||||
else
|
||||
alert(val.dbdml_errormsg)
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
|
||||
FunktionenTreeDatasource.Refresh(false);
|
||||
FunktionDetailResetFields();
|
||||
FunktionDetailDisableFields(true);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// ****
|
||||
// * Speichert die Daten
|
||||
// ****
|
||||
function FunktionDetailSpeichern()
|
||||
{
|
||||
var funktion_kurzbz = document.getElementById('funktion-menulist-funktion').value;
|
||||
var oe_kurzbz = document.getElementById('funktion-menulist-oe_kurzbz').value;
|
||||
var semester = document.getElementById('funktion-menulist-semester').value;
|
||||
var fachbereich_kurzbz = document.getElementById('funktion-menulist-fachbereich').value;
|
||||
var neu = document.getElementById('funktion-checkbox-neu').checked;
|
||||
var benutzerfunktion_id = document.getElementById('funktion-textbox-benutzerfunktion_id').value;
|
||||
var datum_von = document.getElementById('funktion-box-datum_von').value;
|
||||
var datum_bis = document.getElementById('funktion-box-datum_bis').value;
|
||||
var bezeichnung = document.getElementById('funktion-textbox-bezeichnung').value;
|
||||
var wochenstunden = document.getElementById('funktion-textbox-wochenstunden').value;
|
||||
|
||||
//Bei Mitarbeitern wird kein Studiengang mitgeschickt
|
||||
if(window.parent.document.getElementById('main-content-tabs').selectedItem==window.parent.document.getElementById('tab-mitarbeiter'))
|
||||
studiengang_kz_berecht='';
|
||||
else
|
||||
studiengang_kz_berecht = window.parent.document.getElementById('student-prestudent-menulist-studiengang_kz').value;
|
||||
|
||||
var url = '<?php echo APP_ROOT ?>content/fasDBDML.php';
|
||||
var req = new phpRequest(url,'','');
|
||||
|
||||
//Wenn Fachbereich ausgeblendet ist, dann sicherheitshalber auf '' setzen
|
||||
if(document.getElementById('funktion-menulist-fachbereich').hidden==true)
|
||||
fachbereich_kurzbz='';
|
||||
|
||||
req.add('type', 'funktionsave');
|
||||
|
||||
req.add('funktion_kurzbz', funktion_kurzbz);
|
||||
req.add('oe_kurzbz', oe_kurzbz);
|
||||
req.add('semester', semester);
|
||||
req.add('studiengang_kz_berecht', studiengang_kz_berecht);
|
||||
req.add('fachbereich_kurzbz', fachbereich_kurzbz);
|
||||
req.add('uid', FunktionenUID);
|
||||
req.add('neu', neu);
|
||||
req.add('benutzerfunktion_id', benutzerfunktion_id);
|
||||
req.add('datum_von', ConvertDateToISO(datum_von));
|
||||
req.add('datum_bis', ConvertDateToISO(datum_bis));
|
||||
req.add('bezeichnung', bezeichnung);
|
||||
req.add('wochenstunden', wochenstunden);
|
||||
|
||||
var response = req.executePOST();
|
||||
|
||||
var val = new ParseReturnValue(response)
|
||||
|
||||
if (!val.dbdml_return)
|
||||
{
|
||||
if(val.dbdml_errormsg=='')
|
||||
alert(response)
|
||||
else
|
||||
alert(val.dbdml_errormsg)
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
FunktionBezeichnungChanged=false;
|
||||
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
|
||||
FunktionenSelectID=val.dbdml_data;
|
||||
FunktionenTreeDatasource.Refresh(false);
|
||||
document.getElementById('funktion-checkbox-neu').checked=false;
|
||||
document.getElementById('funktion-textbox-benutzerfunktion_id').value=FunktionenSelectID;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
// ****
|
||||
// * Daten zum Bearbeiten laden
|
||||
// ****
|
||||
function FunktionBearbeiten()
|
||||
{
|
||||
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
|
||||
|
||||
tree = document.getElementById('funktion-tree');
|
||||
|
||||
if (tree.currentIndex==-1)
|
||||
return;
|
||||
|
||||
//Ausgewaehlte Nr holen
|
||||
var col = tree.columns ? tree.columns["funktion-treecol-benutzerfunktion_id"] : "funktion-treecol-benutzerfunktion_id";
|
||||
var benutzerfunktion_id=tree.view.getCellText(tree.currentIndex,col);
|
||||
|
||||
//Daten holen
|
||||
var url = '<?php echo APP_ROOT ?>rdf/benutzerfunktion.rdf.php?benutzerfunktion_id='+benutzerfunktion_id+'&'+gettimestamp();
|
||||
|
||||
var rdfService = Components.classes["@mozilla.org/rdf/rdf-service;1"].
|
||||
getService(Components.interfaces.nsIRDFService);
|
||||
|
||||
var dsource = rdfService.GetDataSourceBlocking(url);
|
||||
|
||||
var subject = rdfService.GetResource("http://www.technikum-wien.at/bnfunktion/"+benutzerfunktion_id);
|
||||
|
||||
var predicateNS = "http://www.technikum-wien.at/bnfunktion/rdf";
|
||||
|
||||
//Daten holen
|
||||
var fachbereich_kurzbz = getTargetHelper(dsource,subject,rdfService.GetResource( predicateNS + "#fachbereich_kurzbz" ));
|
||||
var uid = getTargetHelper(dsource,subject,rdfService.GetResource( predicateNS + "#uid" ));
|
||||
var oe_kurzbz = getTargetHelper(dsource,subject,rdfService.GetResource( predicateNS + "#oe_kurzbz" ));
|
||||
var semester = getTargetHelper(dsource,subject,rdfService.GetResource( predicateNS + "#semester" ));
|
||||
var funktion_kurzbz = getTargetHelper(dsource,subject,rdfService.GetResource( predicateNS + "#funktion_kurzbz" ));
|
||||
var datum_von = getTargetHelper(dsource,subject,rdfService.GetResource( predicateNS + "#datum_von" ));
|
||||
var datum_bis = getTargetHelper(dsource,subject,rdfService.GetResource( predicateNS + "#datum_bis" ));
|
||||
var bezeichnung = getTargetHelper(dsource,subject,rdfService.GetResource( predicateNS + "#bezeichnung" ));
|
||||
var wochenstunden = getTargetHelper(dsource,subject,rdfService.GetResource( predicateNS + "#wochenstunden" ));
|
||||
|
||||
document.getElementById('funktion-menulist-fachbereich').value=fachbereich_kurzbz;
|
||||
document.getElementById('funktion-menulist-oe_kurzbz').value=oe_kurzbz;
|
||||
document.getElementById('funktion-menulist-semester').value=semester;
|
||||
document.getElementById('funktion-menulist-funktion').value=funktion_kurzbz;
|
||||
document.getElementById('funktion-textbox-benutzerfunktion_id').value=benutzerfunktion_id;
|
||||
document.getElementById('funktion-checkbox-neu').checked = false;
|
||||
document.getElementById('funktion-box-datum_von').value=datum_von;
|
||||
document.getElementById('funktion-box-datum_bis').value=datum_bis;
|
||||
document.getElementById('funktion-textbox-bezeichnung').value=bezeichnung;
|
||||
document.getElementById('funktion-textbox-wochenstunden').value=wochenstunden;
|
||||
|
||||
FunktionBezeichnungChanged=true;
|
||||
FunktionDetailDisableFields(false);
|
||||
FunktionToggleFachbereich();
|
||||
}
|
||||
|
||||
// ****
|
||||
// * De-/Aktiviert die Buttons
|
||||
// ****
|
||||
function FunktionDisableFields(val)
|
||||
{
|
||||
document.getElementById('funktion-button-neu').disabled=val;
|
||||
document.getElementById('funktion-button-loeschen').disabled=val;
|
||||
|
||||
if(val)
|
||||
FunktionDetailDisableFields(val);
|
||||
}
|
||||
|
||||
// ****
|
||||
// * De-/Aktiviert die DetailFelder
|
||||
// ****
|
||||
function FunktionDetailDisableFields(val)
|
||||
{
|
||||
document.getElementById('funktion-menulist-fachbereich').disabled=val;
|
||||
document.getElementById('funktion-menulist-oe_kurzbz').disabled=val;
|
||||
document.getElementById('funktion-menulist-semester').disabled=val;
|
||||
document.getElementById('funktion-menulist-funktion').disabled=val;
|
||||
document.getElementById('funktion-button-speichern').disabled=val;
|
||||
document.getElementById('funktion-box-datum_von').disabled=val;
|
||||
document.getElementById('funktion-box-datum_bis').disabled=val;
|
||||
document.getElementById('funktion-textbox-bezeichnung').disabled=val;
|
||||
document.getElementById('funktion-textbox-wochenstunden').disabled=val;
|
||||
}
|
||||
|
||||
// ****
|
||||
// * Setzt Defaultwerte fuer die Felder
|
||||
// ****
|
||||
function FunktionDetailResetFields()
|
||||
{
|
||||
document.getElementById('funktion-menulist-fachbereich').value='';
|
||||
document.getElementById('funktion-menulist-oe_kurzbz').selectedIndex=0;
|
||||
document.getElementById('funktion-menulist-semester').value='';
|
||||
document.getElementById('funktion-menulist-funktion').value='ass';
|
||||
|
||||
var Datum = new Date();
|
||||
var Jahr = Datum.getFullYear();
|
||||
var Tag = Datum.getDate();
|
||||
var Monat = Datum.getMonth()+1;
|
||||
|
||||
document.getElementById('funktion-box-datum_von').value=Tag+'.'+Monat+'.'+Jahr;
|
||||
document.getElementById('funktion-box-datum_bis').value='';
|
||||
document.getElementById('funktion-textbox-bezeichnung').value='';
|
||||
document.getElementById('funktion-textbox-wochenstunden').value='';
|
||||
FunktionBezeichnungChanged=false;
|
||||
}
|
||||
|
||||
// ****
|
||||
// * Fachbereichs und Semester DropDown nur Anzeigen, wenn die entsprechenden Attribute
|
||||
// * der Funktion auf true gesetzt sind
|
||||
// ****
|
||||
function FunktionToggleFachbereich()
|
||||
{
|
||||
var menulist = document.getElementById('funktion-menulist-funktion');
|
||||
|
||||
//ersten selektierten Eintrag holen
|
||||
var children = menulist.getElementsByAttribute('selected','true');
|
||||
children = children[0];
|
||||
|
||||
//Attribute semester und fachbereich auslesen
|
||||
var semester = children.getAttribute('semester');
|
||||
var fachbereich = children.getAttribute('fachbereich');
|
||||
var bezeichnung = children.label;
|
||||
|
||||
//wenn in der Bezeichung noch nichts drinnen steht, dann die Funktion in die Bezeichnung schreiben
|
||||
var tbbezeichnung = document.getElementById('funktion-textbox-bezeichnung')
|
||||
|
||||
if(!FunktionBezeichnungChanged)
|
||||
{
|
||||
tbbezeichnung.value=bezeichnung;
|
||||
}
|
||||
|
||||
//Felder sichtbar/unsichtbar setzen
|
||||
var semesterhidden=false;
|
||||
var fachbereichhidden=false;
|
||||
|
||||
if(semester=='true')
|
||||
semesterhidden=false;
|
||||
else
|
||||
semesterhidden=true;
|
||||
|
||||
if(fachbereich=='true')
|
||||
fachbereichhidden=false;
|
||||
else
|
||||
fachbereichhidden=true;
|
||||
|
||||
document.getElementById('funktion-menulist-fachbereich').hidden=fachbereichhidden;
|
||||
document.getElementById('funktion-label-fachbereich').hidden=fachbereichhidden;
|
||||
|
||||
document.getElementById('funktion-menulist-semester').hidden=semesterhidden;
|
||||
document.getElementById('funktion-label-semester').hidden=semesterhidden;
|
||||
|
||||
}
|
||||
|
||||
function FunktionBezeichnungChange()
|
||||
{
|
||||
FunktionBezeichnungChanged=true;
|
||||
}
|
||||
|
||||
+298
-272
@@ -1,272 +1,298 @@
|
||||
<?php
|
||||
/* Copyright (C) 2006 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
|
||||
* published by the Free Software Foundation; either version 2 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* 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>,
|
||||
* Andreas Oesterreicher <andreas.oesterreicher@technikum-wien.at> and
|
||||
* Rudolf Hangl <rudolf.hangl@technikum-wien.at>.
|
||||
*/
|
||||
|
||||
header("Cache-Control: no-cache");
|
||||
header("Cache-Control: post-check=0, pre-check=0",false);
|
||||
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
|
||||
header("Pragma: no-cache");
|
||||
header("Content-type: application/vnd.mozilla.xul+xml");
|
||||
|
||||
include('../config/vilesci.config.inc.php');
|
||||
echo '<?xml version="1.0" encoding="UTF-8"?>'."\n";
|
||||
|
||||
echo '<?xml-stylesheet href="'.APP_ROOT.'skin/tempus.css" type="text/css"?>';
|
||||
echo '<?xml-stylesheet href="'.APP_ROOT.'content/bindings.css" type="text/css"?>';
|
||||
echo '<?xml-stylesheet href="'.APP_ROOT.'content/datepicker/datepicker.css" type="text/css"?>';
|
||||
|
||||
if(isset($_GET['uid']))
|
||||
$uid = $_GET['uid'];
|
||||
else
|
||||
die('Parameter uid muss uebergeben werden');
|
||||
|
||||
?>
|
||||
|
||||
<window id="funktionen-window" title="Funktionen"
|
||||
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
||||
onload="loadFunktionen('<?php echo $uid; ?>');"
|
||||
>
|
||||
|
||||
<script type="application/x-javascript" src="<?php echo APP_ROOT; ?>content/funktionen.js.php" />
|
||||
<script type="application/x-javascript" src="<?php echo APP_ROOT; ?>content/functions.js.php" />
|
||||
<script type="application/x-javascript" src="<?php echo APP_ROOT; ?>content/fasoverlay.js.php" />
|
||||
<script type="application/x-javascript" src="<?php echo APP_ROOT; ?>content/phpRequest.js.php" />
|
||||
|
||||
<hbox flex="1">
|
||||
<!-- FUNKTIONEN -->
|
||||
<tree id="funktion-tree" seltype="single" hidecolumnpicker="false" flex="2"
|
||||
datasources="rdf:null" ref="http://www.technikum-wien.at/bnfunktion/liste"
|
||||
onclick="FunktionBearbeiten()"
|
||||
flags="dont-build-content"
|
||||
enableColumnDrag="true"
|
||||
style="margin-left:10px;margin-right:10px;margin-bottom:5px;" height="100"
|
||||
persist="hidden, height"
|
||||
>
|
||||
<treecols>
|
||||
<treecol id="funktion-treecol-funktion" label="Funktion" flex="2" hidden="false"
|
||||
class="sortDirectionIndicator"
|
||||
sort="rdf:http://www.technikum-wien.at/bnfunktion/rdf#funktion" onclick="FunktionTreeSort()"/>
|
||||
<splitter class="tree-splitter"/>
|
||||
<treecol id="funktion-treecol-oe_kurzbz" label="Organisationseinheit" flex="1" hidden="false"
|
||||
class="sortDirectionIndicator"
|
||||
sort="rdf:http://www.technikum-wien.at/bnfunktion/rdf#studiengang" onclick="FunktionTreeSort()"/>
|
||||
<splitter class="tree-splitter"/>
|
||||
<treecol id="funktion-treecol-semester" label="Semester" flex="1" hidden="false"
|
||||
class="sortDirectionIndicator"
|
||||
sort="rdf:http://www.technikum-wien.at/bnfunktion/rdf#semester" onclick="FunktionTreeSort()"/>
|
||||
<splitter class="tree-splitter"/>
|
||||
<treecol id="funktion-treecol-bezeichnung" label="Bezeichnung" flex="1" hidden="false"
|
||||
class="sortDirectionIndicator"
|
||||
sort="rdf:http://www.technikum-wien.at/bnfunktion/rdf#bezeichnung" onclick="FunktionTreeSort()"/>
|
||||
<splitter class="tree-splitter"/>
|
||||
<treecol id="funktion-treecol-fachbereich" label="Institut" flex="1" hidden="false"
|
||||
class="sortDirectionIndicator"
|
||||
sort="rdf:http://www.technikum-wien.at/bnfunktion/rdf#fachbereich_kurzbz" onclick="FunktionTreeSort()"/>
|
||||
<splitter class="tree-splitter"/>
|
||||
<treecol id="funktion-treecol-uid" label="uid" flex="1" hidden="true"
|
||||
class="sortDirectionIndicator"
|
||||
sort="rdf:http://www.technikum-wien.at/bnfunktion/rdf#uid" onclick="FunktionTreeSort()"/>
|
||||
<splitter class="tree-splitter"/>
|
||||
<treecol id="funktion-treecol-benutzerfunktion_id" label="BenutzerfunktionID" flex="1" hidden="true"
|
||||
class="sortDirectionIndicator"
|
||||
sort="rdf:http://www.technikum-wien.at/bnfunktion/rdf#benutzerfunktion_id" onclick="FunktionTreeSort()"/>
|
||||
<splitter class="tree-splitter"/>
|
||||
<treecol id="funktion-treecol-studiengang_kz" label="StudiengangKZ" flex="1" hidden="true"
|
||||
class="sortDirectionIndicator"
|
||||
sort="rdf:http://www.technikum-wien.at/bnfunktion/rdf#studiengang_kz" onclick="FunktionTreeSort()"/>
|
||||
<splitter class="tree-splitter"/>
|
||||
<treecol id="funktion-treecol-funktion_kurzbz" label="FunktionKurzBz" flex="1" hidden="true"
|
||||
class="sortDirectionIndicator"
|
||||
sort="rdf:http://www.technikum-wien.at/bnfunktion/rdf#funktion_kurzbz" onclick="FunktionTreeSort()"/>
|
||||
<splitter class="tree-splitter"/>
|
||||
<treecol id="funktion-treecol-datum_von" label="GueltigVon" flex="1" hidden="false"
|
||||
class="sortDirectionIndicator"
|
||||
sort="rdf:http://www.technikum-wien.at/bnfunktion/rdf#datum_von_iso" onclick="FunktionTreeSort()"/>
|
||||
<splitter class="tree-splitter"/>
|
||||
<treecol id="funktion-treecol-datum_bis" label="GueltigBis" flex="1" hidden="false"
|
||||
class="sortDirectionIndicator"
|
||||
sort="rdf:http://www.technikum-wien.at/bnfunktion/rdf#datum_bis_iso" onclick="FunktionTreeSort()"/>
|
||||
<splitter class="tree-splitter"/>
|
||||
<treecol id="funktion-treecol-wochenstunden" label="Wochenstunden" flex="1" hidden="false"
|
||||
class="sortDirectionIndicator"
|
||||
sort="rdf:http://www.technikum-wien.at/bnfunktion/rdf#wochenstunden" onclick="FunktionTreeSort()"/>
|
||||
<splitter class="tree-splitter"/>
|
||||
</treecols>
|
||||
|
||||
<template>
|
||||
<rule>
|
||||
<treechildren>
|
||||
<treeitem uri="rdf:*">
|
||||
<treerow>
|
||||
<treecell label="rdf:http://www.technikum-wien.at/bnfunktion/rdf#funktion" />
|
||||
<treecell label="rdf:http://www.technikum-wien.at/bnfunktion/rdf#organisationseinheit" />
|
||||
<treecell label="rdf:http://www.technikum-wien.at/bnfunktion/rdf#semester" />
|
||||
<treecell label="rdf:http://www.technikum-wien.at/bnfunktion/rdf#bezeichnung" />
|
||||
<treecell label="rdf:http://www.technikum-wien.at/bnfunktion/rdf#fachbereich_kurzbz" />
|
||||
<treecell label="rdf:http://www.technikum-wien.at/bnfunktion/rdf#uid" />
|
||||
<treecell label="rdf:http://www.technikum-wien.at/bnfunktion/rdf#benutzerfunktion_id" />
|
||||
<treecell label="rdf:http://www.technikum-wien.at/bnfunktion/rdf#studiengang_kz" />
|
||||
<treecell label="rdf:http://www.technikum-wien.at/bnfunktion/rdf#funktion_kurzbz" />
|
||||
<treecell label="rdf:http://www.technikum-wien.at/bnfunktion/rdf#datum_von" />
|
||||
<treecell label="rdf:http://www.technikum-wien.at/bnfunktion/rdf#datum_bis" />
|
||||
<treecell label="rdf:http://www.technikum-wien.at/bnfunktion/rdf#wochenstunden" />
|
||||
</treerow>
|
||||
</treeitem>
|
||||
</treechildren>
|
||||
</rule>
|
||||
</template>
|
||||
</tree>
|
||||
|
||||
<vbox flex="1">
|
||||
<hbox>
|
||||
<button id="funktion-button-neu" label="Neu" oncommand="FunktionNeu();" disabled="true"/>
|
||||
<button id="funktion-button-loeschen" label="Loeschen" oncommand="FunktionDelete();" disabled="true"/>
|
||||
</hbox>
|
||||
<vbox hidden="true">
|
||||
<label value="benutzerfunktion_id" control="funktion-textbox-benutzerfunktion_id"/>
|
||||
<textbox id="funktion-textbox-benutzerfunktion_id" disabled="true"/>
|
||||
<label value="Neu" control="funktion-checkbox-neu"/>
|
||||
<checkbox id="funktion-checkbox-neu" disabled="true" checked="false"/>
|
||||
</vbox>
|
||||
<groupbox id="funktion-groupbox" >
|
||||
<caption label="Details"/>
|
||||
<grid id="funktion-grid-detail" style="overflow:auto;margin:4px;" flex="1">
|
||||
<columns >
|
||||
<column flex="1"/>
|
||||
<column flex="5"/>
|
||||
</columns>
|
||||
<rows>
|
||||
<row>
|
||||
<label value="Funktion" control="funktion-menulist-funktion"/>
|
||||
<menulist id="funktion-menulist-funktion" disabled="true"
|
||||
datasources="<?php echo APP_ROOT.'rdf/funktion.rdf.php'; ?>" flex="1"
|
||||
ref="http://www.technikum-wien.at/funktion/liste"
|
||||
oncommand="FunktionToggleFachbereich()">
|
||||
<template>
|
||||
<menupopup>
|
||||
<menuitem value="rdf:http://www.technikum-wien.at/funktion/rdf#funktion_kurzbz"
|
||||
label="rdf:http://www.technikum-wien.at/funktion/rdf#beschreibung"
|
||||
fachbereich="rdf:http://www.technikum-wien.at/funktion/rdf#fachbereich"
|
||||
semester="rdf:http://www.technikum-wien.at/funktion/rdf#semester"
|
||||
uri="rdf:*"/>
|
||||
</menupopup>
|
||||
</template>
|
||||
</menulist>
|
||||
</row>
|
||||
<row>
|
||||
<label value="Organisationseinheit" control="funktion-menulist-oe_kurzbz"/>
|
||||
<menulist id="funktion-menulist-oe_kurzbz" disabled="true"
|
||||
xmlns:ORGANISATIONSEINHEIT="http://www.technikum-wien.at/organisationseinheit/rdf#"
|
||||
datasources="<?php echo APP_ROOT;?>rdf/organisationseinheit.rdf.php" flex="1"
|
||||
ref="http://www.technikum-wien.at/organisationseinheit/liste" >
|
||||
<template>
|
||||
<rule ORGANISATIONSEINHEIT:aktiv='false'>
|
||||
<menupopup>
|
||||
<menuitem value="rdf:http://www.technikum-wien.at/organisationseinheit/rdf#oe_kurzbz"
|
||||
label="rdf:http://www.technikum-wien.at/organisationseinheit/rdf#organisationseinheittyp_kurzbz rdf:http://www.technikum-wien.at/organisationseinheit/rdf#bezeichnung"
|
||||
uri="rdf:*" style="text-decoration:line-through;"/>
|
||||
</menupopup>
|
||||
</rule>
|
||||
<rule>
|
||||
<menupopup>
|
||||
<menuitem value="rdf:http://www.technikum-wien.at/organisationseinheit/rdf#oe_kurzbz"
|
||||
label="rdf:http://www.technikum-wien.at/organisationseinheit/rdf#organisationseinheittyp_kurzbz rdf:http://www.technikum-wien.at/organisationseinheit/rdf#bezeichnung"
|
||||
uri="rdf:*"/>
|
||||
</menupopup>
|
||||
</rule>
|
||||
</template>
|
||||
</menulist>
|
||||
</row>
|
||||
<row>
|
||||
<label id="funktion-label-semester" value="Semester" control="funktion-menulist-semester"/>
|
||||
<menulist id="funktion-menulist-semester" disabled="true">
|
||||
<menupopup>
|
||||
<menuitem value="" label="-- Keine Auswahl --"/>
|
||||
<menuitem value="1" label="1"/>
|
||||
<menuitem value="2" label="2"/>
|
||||
<menuitem value="3" label="3"/>
|
||||
<menuitem value="4" label="4"/>
|
||||
<menuitem value="5" label="5"/>
|
||||
<menuitem value="6" label="6"/>
|
||||
<menuitem value="7" label="7"/>
|
||||
<menuitem value="8" label="8"/>
|
||||
<menuitem value="9" label="9"/>
|
||||
</menupopup>
|
||||
</menulist>
|
||||
</row>
|
||||
<row>
|
||||
<label value="Institut" id="funktion-label-fachbereich" control="funktion-menulist-fachbereich"/>
|
||||
<menulist id="funktion-menulist-fachbereich" disabled="true"
|
||||
xmlns:FACHBEREICH="http://www.technikum-wien.at/fachbereich/rdf#"
|
||||
datasources="<?php echo APP_ROOT;?>/rdf/fachbereich.rdf.php?optional=true" flex="1"
|
||||
ref="http://www.technikum-wien.at/fachbereich/liste" >
|
||||
<template>
|
||||
<rule FACHBEREICH:aktiv="false">
|
||||
<menupopup>
|
||||
<menuitem value="rdf:http://www.technikum-wien.at/fachbereich/rdf#kurzbz"
|
||||
label="rdf:http://www.technikum-wien.at/fachbereich/rdf#bezeichnung"
|
||||
uri="rdf:*" style="text-decoration:line-through;"/>
|
||||
</menupopup>
|
||||
</rule>
|
||||
<rule>
|
||||
<menupopup>
|
||||
<menuitem value="rdf:http://www.technikum-wien.at/fachbereich/rdf#kurzbz"
|
||||
label="rdf:http://www.technikum-wien.at/fachbereich/rdf#bezeichnung"
|
||||
uri="rdf:*"/>
|
||||
</menupopup>
|
||||
</rule>
|
||||
</template>
|
||||
</menulist>
|
||||
</row>
|
||||
<row>
|
||||
<label value="Bezeichnung" control="funktion-textbox-bezeichnung"/>
|
||||
<textbox id="funktion-textbox-bezeichnung" disabled="true" maxlength="64" onchange="FunktionBezeichnungChange()"/>
|
||||
</row>
|
||||
<row>
|
||||
<label value="Wochenstunden" control="funktion-textbox-wochenstunden"/>
|
||||
<hbox>
|
||||
<textbox id="funktion-textbox-wochenstunden" disabled="true" maxlength="6" size="6"/>
|
||||
<spacer flex="1" />
|
||||
</hbox>
|
||||
</row>
|
||||
<row>
|
||||
<label value="Gültig von" control="funktion-box-datum_von"/>
|
||||
<hbox>
|
||||
<box class="Datum" id="funktion-box-datum_von" disabled="true"/>
|
||||
</hbox>
|
||||
</row>
|
||||
<row>
|
||||
<label value="Gültig bis" control="funktion-box-datum_bis"/>
|
||||
<hbox>
|
||||
<box class="Datum" id="funktion-box-datum_bis" disabled="true"/>
|
||||
</hbox>
|
||||
</row>
|
||||
</rows>
|
||||
</grid>
|
||||
<hbox>
|
||||
<spacer flex="1" />
|
||||
<button id="funktion-button-speichern" oncommand="FunktionDetailSpeichern()" label="Speichern" disabled="true"/>
|
||||
</hbox>
|
||||
</groupbox>
|
||||
<spacer/>
|
||||
</vbox>
|
||||
</hbox>
|
||||
</window>
|
||||
<?php
|
||||
/* Copyright (C) 2006 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
|
||||
* published by the Free Software Foundation; either version 2 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* 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>,
|
||||
* Andreas Oesterreicher <andreas.oesterreicher@technikum-wien.at> and
|
||||
* Rudolf Hangl <rudolf.hangl@technikum-wien.at>.
|
||||
*/
|
||||
|
||||
header("Cache-Control: no-cache");
|
||||
header("Cache-Control: post-check=0, pre-check=0",false);
|
||||
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
|
||||
header("Pragma: no-cache");
|
||||
header("Content-type: application/vnd.mozilla.xul+xml");
|
||||
|
||||
include('../config/vilesci.config.inc.php');
|
||||
include('../include/functions.inc.php');
|
||||
include('../include/variable.class.php');
|
||||
|
||||
echo '<?xml version="1.0" encoding="UTF-8"?>'."\n";
|
||||
|
||||
echo '<?xml-stylesheet href="'.APP_ROOT.'skin/tempus.css" type="text/css"?>';
|
||||
echo '<?xml-stylesheet href="'.APP_ROOT.'content/bindings.css" type="text/css"?>';
|
||||
echo '<?xml-stylesheet href="'.APP_ROOT.'content/datepicker/datepicker.css" type="text/css"?>';
|
||||
|
||||
if(isset($_GET['uid']))
|
||||
$uid = $_GET['uid'];
|
||||
else
|
||||
die('Parameter uid muss uebergeben werden');
|
||||
|
||||
$user = get_uid();
|
||||
$variable = new variable();
|
||||
$variable->loadVariables($user);
|
||||
|
||||
if ($variable->variable->fasfunktionfilter == 'alle')
|
||||
$filtertext = 'Nur aktuelle anzeigen';
|
||||
else
|
||||
$filtertext = 'Alle anzeigen';
|
||||
?>
|
||||
|
||||
<window id="funktionen-window" title="Funktionen"
|
||||
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
||||
onload="loadFunktionen('<?php echo $uid; ?>');"
|
||||
>
|
||||
<script type="application/x-javascript" src="<?php echo APP_ROOT; ?>content/funktionen.js.php" />
|
||||
<script type="application/x-javascript" src="<?php echo APP_ROOT; ?>content/functions.js.php" />
|
||||
<script type="application/x-javascript" src="<?php echo APP_ROOT; ?>content/fasoverlay.js.php" />
|
||||
<script type="application/x-javascript" src="<?php echo APP_ROOT; ?>content/phpRequest.js.php" />
|
||||
|
||||
<hbox flex="1">
|
||||
<!-- FUNKTIONEN -->
|
||||
<vbox flex="4">
|
||||
<hbox>
|
||||
<button id="funktionen-button-filter" oncommand="FunktionFilter()" label="<?php echo $filtertext;?>"/>
|
||||
<textbox hidden="true" id="funktionen-filter-state" value="<?php echo $variable->variable->fasfunktionfilter; ?>" />
|
||||
<spacer flex="1" />
|
||||
</hbox>
|
||||
<tree id="funktion-tree" seltype="single" hidecolumnpicker="false" flex="2"
|
||||
datasources="rdf:null" ref="http://www.technikum-wien.at/bnfunktion/liste"
|
||||
onselect="FunktionBearbeiten()"
|
||||
flags="dont-build-content"
|
||||
enableColumnDrag="true"
|
||||
style="margin-left:10px;margin-right:10px;margin-bottom:5px;" height="100"
|
||||
persist="hidden, height"
|
||||
>
|
||||
<treecols>
|
||||
<treecol id="funktion-treecol-funktion" label="Funktion" flex="1" hidden="false"
|
||||
class="sortDirectionIndicator"
|
||||
sort="rdf:http://www.technikum-wien.at/bnfunktion/rdf#funktion"/>
|
||||
<splitter class="tree-splitter"/>
|
||||
<treecol id="funktion-treecol-oe_kurzbz" label="Organisationseinheit" flex="1" hidden="false"
|
||||
class="sortDirectionIndicator"
|
||||
sort="rdf:http://www.technikum-wien.at/bnfunktion/rdf#organisationseinheit"/>
|
||||
<splitter class="tree-splitter"/>
|
||||
<treecol id="funktion-treecol-semester" label="Semester" flex="1" hidden="false"
|
||||
class="sortDirectionIndicator"
|
||||
sort="rdf:http://www.technikum-wien.at/bnfunktion/rdf#semester"/>
|
||||
<splitter class="tree-splitter"/>
|
||||
<treecol id="funktion-treecol-bezeichnung" label="Bezeichnung" flex="1" hidden="false"
|
||||
class="sortDirectionIndicator"
|
||||
sort="rdf:http://www.technikum-wien.at/bnfunktion/rdf#bezeichnung"/>
|
||||
<splitter class="tree-splitter"/>
|
||||
<treecol id="funktion-treecol-fachbereich" label="Institut" flex="1" hidden="false"
|
||||
class="sortDirectionIndicator"
|
||||
sort="rdf:http://www.technikum-wien.at/bnfunktion/rdf#fachbereich_kurzbz"/>
|
||||
<splitter class="tree-splitter"/>
|
||||
<treecol id="funktion-treecol-uid" label="uid" flex="1" hidden="true"
|
||||
class="sortDirectionIndicator"
|
||||
sort="rdf:http://www.technikum-wien.at/bnfunktion/rdf#uid"/>
|
||||
<splitter class="tree-splitter"/>
|
||||
<treecol id="funktion-treecol-benutzerfunktion_id" label="BenutzerfunktionID" flex="1" hidden="true"
|
||||
class="sortDirectionIndicator"
|
||||
sort="rdf:http://www.technikum-wien.at/bnfunktion/rdf#benutzerfunktion_id"/>
|
||||
<splitter class="tree-splitter"/>
|
||||
<treecol id="funktion-treecol-studiengang_kz" label="StudiengangKZ" flex="1" hidden="true"
|
||||
class="sortDirectionIndicator"
|
||||
sort="rdf:http://www.technikum-wien.at/bnfunktion/rdf#studiengang_kz"/>
|
||||
<splitter class="tree-splitter"/>
|
||||
<treecol id="funktion-treecol-funktion_kurzbz" label="FunktionKurzBz" flex="1" hidden="true"
|
||||
class="sortDirectionIndicator"
|
||||
sort="rdf:http://www.technikum-wien.at/bnfunktion/rdf#funktion_kurzbz"/>
|
||||
<splitter class="tree-splitter"/>
|
||||
<treecol id="funktion-treecol-datum_von" label="GueltigVon" flex="1" hidden="false"
|
||||
class="sortDirectionIndicator"
|
||||
sort="rdf:http://www.technikum-wien.at/bnfunktion/rdf#datum_von_iso"/>
|
||||
<splitter class="tree-splitter"/>
|
||||
<treecol id="funktion-treecol-datum_bis" label="GueltigBis" flex="1" hidden="false"
|
||||
class="sortDirectionIndicator"
|
||||
sort="rdf:http://www.technikum-wien.at/bnfunktion/rdf#datum_bis_iso"/>
|
||||
<splitter class="tree-splitter"/>
|
||||
<treecol id="funktion-treecol-wochenstunden" label="Wochenstunden" flex="1" hidden="true"
|
||||
class="sortDirectionIndicator"
|
||||
sort="rdf:http://www.technikum-wien.at/bnfunktion/rdf#wochenstunden"/>
|
||||
<splitter class="tree-splitter"/>
|
||||
<treecol id="funktion-treecol-datum_von_iso" label="GueltigVonISO" flex="1" hidden="true"
|
||||
class="sortDirectionIndicator"
|
||||
sort="rdf:http://www.technikum-wien.at/bnfunktion/rdf#datum_von_iso"/>
|
||||
<splitter class="tree-splitter"/>
|
||||
<treecol id="funktion-treecol-datum_bis_iso" label="GueltigBisISO" flex="1" hidden="true"
|
||||
class="sortDirectionIndicator"
|
||||
sort="rdf:http://www.technikum-wien.at/bnfunktion/rdf#datum_bis_iso"/>
|
||||
<splitter class="tree-splitter"/>
|
||||
</treecols>
|
||||
|
||||
<template>
|
||||
<rule>
|
||||
<treechildren>
|
||||
<treeitem uri="rdf:*">
|
||||
<treerow>
|
||||
<treecell label="rdf:http://www.technikum-wien.at/bnfunktion/rdf#funktion" />
|
||||
<treecell label="rdf:http://www.technikum-wien.at/bnfunktion/rdf#organisationseinheit" />
|
||||
<treecell label="rdf:http://www.technikum-wien.at/bnfunktion/rdf#semester" />
|
||||
<treecell label="rdf:http://www.technikum-wien.at/bnfunktion/rdf#bezeichnung" />
|
||||
<treecell label="rdf:http://www.technikum-wien.at/bnfunktion/rdf#fachbereich_kurzbz" />
|
||||
<treecell label="rdf:http://www.technikum-wien.at/bnfunktion/rdf#uid" />
|
||||
<treecell label="rdf:http://www.technikum-wien.at/bnfunktion/rdf#benutzerfunktion_id" />
|
||||
<treecell label="rdf:http://www.technikum-wien.at/bnfunktion/rdf#studiengang_kz" />
|
||||
<treecell label="rdf:http://www.technikum-wien.at/bnfunktion/rdf#funktion_kurzbz" />
|
||||
<treecell label="rdf:http://www.technikum-wien.at/bnfunktion/rdf#datum_von" />
|
||||
<treecell label="rdf:http://www.technikum-wien.at/bnfunktion/rdf#datum_bis" />
|
||||
<treecell label="rdf:http://www.technikum-wien.at/bnfunktion/rdf#wochenstunden" />
|
||||
<treecell label="rdf:http://www.technikum-wien.at/bnfunktion/rdf#datum_von_iso" />
|
||||
<treecell label="rdf:http://www.technikum-wien.at/bnfunktion/rdf#datum_bis_iso" />
|
||||
</treerow>
|
||||
</treeitem>
|
||||
</treechildren>
|
||||
</rule>
|
||||
</template>
|
||||
</tree>
|
||||
</vbox>
|
||||
<vbox flex="1">
|
||||
<hbox>
|
||||
<button id="funktion-button-neu" label="Neu" oncommand="FunktionNeu();" disabled="true"/>
|
||||
<button id="funktion-button-loeschen" label="Loeschen" oncommand="FunktionDelete();" disabled="true"/>
|
||||
</hbox>
|
||||
<vbox hidden="true">
|
||||
<label value="benutzerfunktion_id" control="funktion-textbox-benutzerfunktion_id"/>
|
||||
<textbox id="funktion-textbox-benutzerfunktion_id" disabled="true"/>
|
||||
<label value="Neu" control="funktion-checkbox-neu"/>
|
||||
<checkbox id="funktion-checkbox-neu" disabled="true" checked="false"/>
|
||||
</vbox>
|
||||
<groupbox id="funktion-groupbox" >
|
||||
<caption label="Details"/>
|
||||
<grid id="funktion-grid-detail" style="overflow:auto;margin:4px;" flex="1">
|
||||
<columns >
|
||||
<column flex="1"/>
|
||||
<column flex="5"/>
|
||||
</columns>
|
||||
<rows>
|
||||
<row>
|
||||
<label value="Funktion" control="funktion-menulist-funktion"/>
|
||||
<menulist id="funktion-menulist-funktion" disabled="true"
|
||||
datasources="<?php echo APP_ROOT.'rdf/funktion.rdf.php'; ?>" flex="1"
|
||||
ref="http://www.technikum-wien.at/funktion/liste"
|
||||
oncommand="FunktionToggleFachbereich()">
|
||||
<template>
|
||||
<menupopup>
|
||||
<menuitem value="rdf:http://www.technikum-wien.at/funktion/rdf#funktion_kurzbz"
|
||||
label="rdf:http://www.technikum-wien.at/funktion/rdf#beschreibung"
|
||||
fachbereich="rdf:http://www.technikum-wien.at/funktion/rdf#fachbereich"
|
||||
semester="rdf:http://www.technikum-wien.at/funktion/rdf#semester"
|
||||
uri="rdf:*"/>
|
||||
</menupopup>
|
||||
</template>
|
||||
</menulist>
|
||||
</row>
|
||||
<row>
|
||||
<label value="Organisationseinheit" control="funktion-menulist-oe_kurzbz"/>
|
||||
<menulist id="funktion-menulist-oe_kurzbz" disabled="true"
|
||||
xmlns:ORGANISATIONSEINHEIT="http://www.technikum-wien.at/organisationseinheit/rdf#"
|
||||
datasources="<?php echo APP_ROOT;?>rdf/organisationseinheit.rdf.php" flex="1"
|
||||
ref="http://www.technikum-wien.at/organisationseinheit/liste" >
|
||||
<template>
|
||||
<rule ORGANISATIONSEINHEIT:aktiv='false'>
|
||||
<menupopup>
|
||||
<menuitem value="rdf:http://www.technikum-wien.at/organisationseinheit/rdf#oe_kurzbz"
|
||||
label="rdf:http://www.technikum-wien.at/organisationseinheit/rdf#organisationseinheittyp_kurzbz rdf:http://www.technikum-wien.at/organisationseinheit/rdf#bezeichnung"
|
||||
uri="rdf:*" style="text-decoration:line-through;"/>
|
||||
</menupopup>
|
||||
</rule>
|
||||
<rule>
|
||||
<menupopup>
|
||||
<menuitem value="rdf:http://www.technikum-wien.at/organisationseinheit/rdf#oe_kurzbz"
|
||||
label="rdf:http://www.technikum-wien.at/organisationseinheit/rdf#organisationseinheittyp_kurzbz rdf:http://www.technikum-wien.at/organisationseinheit/rdf#bezeichnung"
|
||||
uri="rdf:*"/>
|
||||
</menupopup>
|
||||
</rule>
|
||||
</template>
|
||||
</menulist>
|
||||
</row>
|
||||
<row>
|
||||
<label id="funktion-label-semester" value="Semester" control="funktion-menulist-semester"/>
|
||||
<menulist id="funktion-menulist-semester" disabled="true">
|
||||
<menupopup>
|
||||
<menuitem value="" label="-- Keine Auswahl --"/>
|
||||
<menuitem value="1" label="1"/>
|
||||
<menuitem value="2" label="2"/>
|
||||
<menuitem value="3" label="3"/>
|
||||
<menuitem value="4" label="4"/>
|
||||
<menuitem value="5" label="5"/>
|
||||
<menuitem value="6" label="6"/>
|
||||
<menuitem value="7" label="7"/>
|
||||
<menuitem value="8" label="8"/>
|
||||
<menuitem value="9" label="9"/>
|
||||
</menupopup>
|
||||
</menulist>
|
||||
</row>
|
||||
<row>
|
||||
<label value="Institut" id="funktion-label-fachbereich" control="funktion-menulist-fachbereich"/>
|
||||
<menulist id="funktion-menulist-fachbereich" disabled="true"
|
||||
xmlns:FACHBEREICH="http://www.technikum-wien.at/fachbereich/rdf#"
|
||||
datasources="<?php echo APP_ROOT;?>/rdf/fachbereich.rdf.php?optional=true" flex="1"
|
||||
ref="http://www.technikum-wien.at/fachbereich/liste" >
|
||||
<template>
|
||||
<rule FACHBEREICH:aktiv="false">
|
||||
<menupopup>
|
||||
<menuitem value="rdf:http://www.technikum-wien.at/fachbereich/rdf#kurzbz"
|
||||
label="rdf:http://www.technikum-wien.at/fachbereich/rdf#bezeichnung"
|
||||
uri="rdf:*" style="text-decoration:line-through;"/>
|
||||
</menupopup>
|
||||
</rule>
|
||||
<rule>
|
||||
<menupopup>
|
||||
<menuitem value="rdf:http://www.technikum-wien.at/fachbereich/rdf#kurzbz"
|
||||
label="rdf:http://www.technikum-wien.at/fachbereich/rdf#bezeichnung"
|
||||
uri="rdf:*"/>
|
||||
</menupopup>
|
||||
</rule>
|
||||
</template>
|
||||
</menulist>
|
||||
</row>
|
||||
<row>
|
||||
<label value="Bezeichnung" control="funktion-textbox-bezeichnung"/>
|
||||
<textbox id="funktion-textbox-bezeichnung" disabled="true" maxlength="64" onchange="FunktionBezeichnungChange()"/>
|
||||
</row>
|
||||
<row>
|
||||
<label value="Wochenstunden" control="funktion-textbox-wochenstunden"/>
|
||||
<hbox>
|
||||
<textbox id="funktion-textbox-wochenstunden" disabled="true" maxlength="6" size="6"/>
|
||||
<spacer flex="1" />
|
||||
</hbox>
|
||||
</row>
|
||||
<row>
|
||||
<label value="Gültig von" control="funktion-box-datum_von"/>
|
||||
<hbox>
|
||||
<box class="Datum" id="funktion-box-datum_von" disabled="true"/>
|
||||
</hbox>
|
||||
</row>
|
||||
<row>
|
||||
<label value="Gültig bis" control="funktion-box-datum_bis"/>
|
||||
<hbox>
|
||||
<box class="Datum" id="funktion-box-datum_bis" disabled="true"/>
|
||||
</hbox>
|
||||
</row>
|
||||
</rows>
|
||||
</grid>
|
||||
<hbox>
|
||||
<spacer flex="1" />
|
||||
<button id="funktion-button-speichern" oncommand="FunktionDetailSpeichern()" label="Speichern" disabled="true"/>
|
||||
</hbox>
|
||||
</groupbox>
|
||||
<spacer/>
|
||||
</vbox>
|
||||
</hbox>
|
||||
</window>
|
||||
|
||||
@@ -0,0 +1,654 @@
|
||||
<?php
|
||||
/* Copyright (C) 2018 fhcomplete.org
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
|
||||
*
|
||||
* Authors: Andreas Oesterreicher <andreas.oesterreicher@technikum-wien.at>,
|
||||
*/
|
||||
/**
|
||||
* Datenverbund Services
|
||||
* Anbindung für Datenverbund des Bundesrechenzetrums zur
|
||||
* Abfrage und Vergabe von Matrikelnummern
|
||||
*/
|
||||
require_once(dirname(__FILE__).'/basis_db.class.php');
|
||||
|
||||
class dvb
|
||||
{
|
||||
const DVB_URL_WEBSERVICE_OAUTH = 'https://stubei-q.portal.at/dvb/oauth/token';
|
||||
const DVB_URL_WEBSERVICE_SVNR = 'https://stubei-q.portal.at/rws/0.1/simpleStudentBySozialVersicherungsnummer.xml';
|
||||
const DVB_URL_WEBSERVICE_ERSATZKZ = 'https://stubei-q.portal.at/rws/0.1/simpleStudentByErsatzKennzeichen.xml';
|
||||
const DVB_URL_WEBSERVICE_RESERVIERUNG = 'https://stubei-q.portal.at/dvb/matrikelnummern/1.0/reservierung.xml';
|
||||
const DVB_URL_WEBSERVICE_MELDUNG = 'https://stubei-q.portal.at/dvb/matrikelnummern/1.0/meldung.xml';
|
||||
|
||||
public $authentication;
|
||||
private $username;
|
||||
private $password;
|
||||
private $debug;
|
||||
public $debug_output = '';
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
* @param string $username Username fuer OAuth2 Login.
|
||||
* @param string $password Passwort fuer OAuth2 Login.
|
||||
* @param bool $debug Enables/Disables Debugging.
|
||||
*/
|
||||
public function __construct($username, $password, $debug = false)
|
||||
{
|
||||
$this->username = $username;
|
||||
$this->password = $password;
|
||||
$this->debug = $debug;
|
||||
}
|
||||
|
||||
/**
|
||||
* Performs a OAuth2 Authentication and returns the OAuth Bearer Token
|
||||
* @return boolean true wenn erfolgreich, false im Fehlerfall
|
||||
*/
|
||||
public function authenticate()
|
||||
{
|
||||
$this->debug('Request new OAuth Token');
|
||||
|
||||
$curl = curl_init();
|
||||
$url = self::DVB_URL_WEBSERVICE_OAUTH;
|
||||
$url .= '?grant_type=client_credentials';
|
||||
|
||||
curl_setopt($curl, CURLOPT_URL, $url);
|
||||
curl_setopt($curl, CURLOPT_POST, true);
|
||||
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
|
||||
curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, false);
|
||||
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
|
||||
|
||||
$headers = array(
|
||||
'Accept: application/json',
|
||||
'Content-Type: application/x-www-form-urlencoded',
|
||||
'Authorization: Basic '.base64_encode($this->username.":".$this->password),
|
||||
'User-Agent: FHComplete',
|
||||
'Connection: Keep-Alive',
|
||||
'Expect:',
|
||||
'Content-Length: 0'
|
||||
);
|
||||
curl_setopt($curl, CURLOPT_HTTPHEADER, $headers);
|
||||
|
||||
$this->debug('Sending Request to '.$url);
|
||||
$json_response = curl_exec($curl);
|
||||
$curl_info = curl_getinfo($curl);
|
||||
curl_close($curl);
|
||||
|
||||
$this->debug('Response: '.$curl_info['http_code']);
|
||||
|
||||
if ($curl_info['http_code'] == '200')
|
||||
{
|
||||
/* Example Response:
|
||||
{
|
||||
"access_token": "d9c60404-1530-4b05-bb8e-0a0b0f321726",
|
||||
"token_type": "bearer",
|
||||
"expires_in": 41087,
|
||||
"scope": "read write ROLE_bildungseinrichtung
|
||||
ROLE_bildungseinrichtung_A"
|
||||
}
|
||||
*/
|
||||
|
||||
$this->authentication = json_decode($json_response);
|
||||
|
||||
// Calculate Expire Date
|
||||
$ttl = new DateTime();
|
||||
$ttl->add(new DateInterval('PT'.$this->authentication->expires_in.'S'));
|
||||
$this->authentication->DateTimeExpires = $ttl;
|
||||
|
||||
$this->debug('Access_token:'.$this->authentication->access_token);
|
||||
$this->debug('Scope:'.$this->authentication->scope);
|
||||
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->errormsg = 'Request Failed with HTTP Code:'.$curl_info['http_code'].' and Response:'.$json_response;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if the Token is Expired
|
||||
* @return boolean true if expired, false if valid.
|
||||
*/
|
||||
private function tokenIsExpired()
|
||||
{
|
||||
if (!isset($this->authentication))
|
||||
return true;
|
||||
|
||||
$dtnow = new DateTime();
|
||||
if ($this->authentication->DateTimeExpires < $dtnow)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get Matrikelnummer by Social Security Number
|
||||
* @param string $svnr Social Security Number.
|
||||
* @return Matrikelnummer or false on error.
|
||||
*/
|
||||
public function getMatrikelnrBySVNR($svnr)
|
||||
{
|
||||
if ($this->tokenIsExpired())
|
||||
{
|
||||
$this->authenticate();
|
||||
}
|
||||
|
||||
$this->debug('getMatirkelnrBySVNR');
|
||||
|
||||
$curl = curl_init();
|
||||
|
||||
$url = self::DVB_URL_WEBSERVICE_SVNR;
|
||||
$url .= '?sozialVersicherungsNummer='.curl_escape($curl, $svnr);
|
||||
|
||||
curl_setopt($curl, CURLOPT_URL, $url);
|
||||
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
|
||||
curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, false);
|
||||
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
|
||||
|
||||
$headers = array(
|
||||
'Accept: application/json',
|
||||
'Authorization: Bearer '.$this->authentication->access_token,
|
||||
'User-Agent: FHComplete',
|
||||
'Connection: Keep-Alive',
|
||||
'Expect:',
|
||||
'Content-Length: 0'
|
||||
);
|
||||
curl_setopt($curl, CURLOPT_HTTPHEADER, $headers);
|
||||
|
||||
$this->debug('Sending Request to '.$url);
|
||||
|
||||
$response = curl_exec($curl);
|
||||
$curl_info = curl_getinfo($curl);
|
||||
curl_close($curl);
|
||||
|
||||
$this->debug('Response '.$curl_info['http_code']);
|
||||
if ($curl_info['http_code'] == '200')
|
||||
{
|
||||
/* Example Response:
|
||||
<uni:simpleStudentResponse xmlns:uni="http://www.brz.gv.at/datenverbund-unis">
|
||||
<uni:student inStudienBeitragsPool="false" inGesamtPool="true" gesperrt="false">
|
||||
<uni:matrikelNummer>12345678</uni:matrikelNummer>
|
||||
<uni:vorName>Max</uni:vorName>
|
||||
<uni:nachName>Mustermann</uni:nachName>
|
||||
<uni:geschlecht>M</uni:geschlecht>
|
||||
<uni:geburtsDatum>1999-02-19</uni:geburtsDatum>
|
||||
<uni:staatsAngehoerigkeit>A</uni:staatsAngehoerigkeit>
|
||||
</uni:student>
|
||||
</uni:simpleStudentResponse>
|
||||
*/
|
||||
$dom = new DOMDocument();
|
||||
$dom->loadXML($response);
|
||||
$namespace = 'http://www.brz.gv.at/datenverbund-unis';
|
||||
$domnodes_matrikelnummer = $dom->getElementsByTagNameNS($namespace, 'matrikelNummer');
|
||||
foreach ($domnodes_matrikelnummer as $row)
|
||||
{
|
||||
// Found
|
||||
return $row->textContent;
|
||||
}
|
||||
|
||||
$this->errormsg = '';
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->errormsg = 'Request Failed with HTTP Code:'.$curl_info['http_code'].' and Response:'.$response;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get Matrikelnummer by Ersatzkennzeichen
|
||||
* @param string $ersatzkennzeichen Ersatzkennzeichen to search for.
|
||||
* @return Matrikelnummer or false
|
||||
*/
|
||||
public function getMatrikelnrByErsatzkennzeichen($ersatzkennzeichen)
|
||||
{
|
||||
if ($this->tokenIsExpired())
|
||||
{
|
||||
$this->authenticate();
|
||||
}
|
||||
|
||||
$this->debug('getMatrikelnrByErsatzkennzeichen');
|
||||
$curl = curl_init();
|
||||
|
||||
$url = self::DVB_URL_WEBSERVICE_ERSATZKZ;
|
||||
$url .= '?ersatzKennzeichen='.curl_escape($curl, $ersatzkennzeichen);
|
||||
|
||||
curl_setopt($curl, CURLOPT_URL, $url);
|
||||
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
|
||||
curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, false);
|
||||
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
|
||||
|
||||
$headers = array(
|
||||
'Accept: application/json',
|
||||
'Authorization: Bearer '.$this->authentication->access_token,
|
||||
'User-Agent: FHComplete',
|
||||
'Connection: Keep-Alive',
|
||||
'Expect:',
|
||||
'Content-Length: 0'
|
||||
);
|
||||
curl_setopt($curl, CURLOPT_HTTPHEADER, $headers);
|
||||
|
||||
$this->debug('Sending Request to '.$url);
|
||||
$xml_response = curl_exec($curl);
|
||||
$curl_info = curl_getinfo($curl);
|
||||
curl_close($curl);
|
||||
$this->debug('Response: '.$curl_info['http_code']);
|
||||
|
||||
if ($curl_info['http_code'] == '200')
|
||||
{
|
||||
/* Example Response Success
|
||||
<uni:simpleStudentResponse xmlns:uni="http://www.brz.gv.at/datenverbund-unis">
|
||||
<uni:student inStudienBeitragsPool="true" inGesamtPool="false">
|
||||
<uni:uniKennzeichen>A</uni:uniKennzeichen>
|
||||
<uni:matrikelNummer>12345678</uni:matrikelNummer>
|
||||
<uni:semesterKennzeichen>2017S</uni:semesterKennzeichen>
|
||||
<uni:ersatzKennzeichen>ABCD201093</uni:ersatzKennzeichen>
|
||||
<uni:akadGradPre>Bc.</uni:akadGradPre>
|
||||
<uni:vorName>Max</uni:vorName>
|
||||
<uni:nachName>Mustermann</uni:nachName>
|
||||
<uni:geschlecht>W</uni:geschlecht>
|
||||
<uni:geburtsDatum>1993-06-26</uni:geburtsDatum>
|
||||
<uni:staatsAngehoerigkeit>TCH</uni:staatsAngehoerigkeit>
|
||||
<uni:wohnAdresse>
|
||||
<uni:staat>A</uni:staat>
|
||||
<uni:plz>1030</uni:plz>
|
||||
<uni:ort>Wien</uni:ort>
|
||||
<uni:strasse>Obere Bahngasse 20/12</uni:strasse>
|
||||
</uni:wohnAdresse>
|
||||
<uni:zustellAdresse>
|
||||
<uni:staat>A</uni:staat>
|
||||
<uni:plz>1030</uni:plz>
|
||||
<uni:ort>Wien</uni:ort>
|
||||
<uni:strasse>Obere Bahngasse 20/12</uni:strasse>
|
||||
</uni:zustellAdresse>
|
||||
</uni:student>
|
||||
<uni:student inStudienBeitragsPool="false" inGesamtPool="true" gesperrt="false">
|
||||
<uni:matrikelNummer>12345678</uni:matrikelNummer>
|
||||
<uni:vorName>Max</uni:vorName>
|
||||
<uni:nachName>Mustermann</uni:nachName>
|
||||
<uni:geschlecht>W</uni:geschlecht>
|
||||
<uni:geburtsDatum>1993-06-26</uni:geburtsDatum>
|
||||
<uni:staatsAngehoerigkeit>TCH</uni:staatsAngehoerigkeit>
|
||||
</uni:student>
|
||||
</uni:simpleStudentResponse>
|
||||
*/
|
||||
/* 200 - No Entry found
|
||||
<uni:simpleStudentResponse xmlns:uni="http://www.brz.gv.at/datenverbund-unis"/>
|
||||
*/
|
||||
/* 401 Error Code Token Expired
|
||||
{
|
||||
"error": "invalid_token",
|
||||
"error_description": "Access token expired: 64a58ef3-1a70-46e9-b44f-35cc5051ae8e"
|
||||
}
|
||||
*/
|
||||
/* 400 Bad Request
|
||||
<FehlerAntwort xmlns="http://www.brz.gv.at/datenverbund-unis">
|
||||
<uuid>318e1bc5-279d-43c4-af47-5e6df2ff5279</uuid>
|
||||
<fehlerliste fehleranzahl="1">
|
||||
<fehler>
|
||||
<fehlernummer>ZD00001</fehlernummer>
|
||||
<kategorie>Z</kategorie>
|
||||
<datenfeld/>
|
||||
<fehlertext>Der Server konnte die Anfrage nicht vearbeiten.</fehlertext>
|
||||
<massnahme>Required String parameter 'ersatzKennzeichen' is not present</massnahme>
|
||||
</fehler>
|
||||
</fehlerliste>
|
||||
</FehlerAntwort>
|
||||
*/
|
||||
|
||||
$dom = new DOMDocument();
|
||||
$dom->loadXML($xml_response);
|
||||
$namespace = 'http://www.brz.gv.at/datenverbund-unis';
|
||||
$domnodes_matrikelnummer = $dom->getElementsByTagNameNS($namespace, 'matrikelNummer');
|
||||
foreach ($domnodes_matrikelnummer as $row)
|
||||
{
|
||||
// Found
|
||||
return $row->textContent;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->errormsg = 'Request Failed with HTTP Code:'.$curl_info['http_code'].' and Response:'.$xml_response;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* List of already Reserved Matrikelnummern
|
||||
* @param string $bildungseinrichtung Shortname of Institution.
|
||||
* @param string $studienjahr Year of Reservation.
|
||||
* @return array with reserved Matrikelnr. or false on failure.
|
||||
*/
|
||||
public function getReservations($bildungseinrichtung, $studienjahr)
|
||||
{
|
||||
$this->debug('getReservations');
|
||||
$uuid = $this->getUUID();
|
||||
|
||||
if ($this->tokenIsExpired())
|
||||
{
|
||||
$this->authenticate();
|
||||
}
|
||||
|
||||
$curl = curl_init();
|
||||
$url = self::DVB_URL_WEBSERVICE_RESERVIERUNG;
|
||||
$url .= '?uuid='.curl_escape($curl, $uuid);
|
||||
$url .= '&be='.curl_escape($curl, $bildungseinrichtung);
|
||||
$url .= '&sj='.curl_escape($curl, $studienjahr);
|
||||
|
||||
curl_setopt($curl, CURLOPT_URL, $url);
|
||||
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
|
||||
curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, false);
|
||||
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
|
||||
|
||||
$headers = array(
|
||||
'Accept: application/xml',
|
||||
'Authorization: Bearer '.$this->authentication->access_token,
|
||||
'User-Agent: FHComplete',
|
||||
'Connection: Keep-Alive',
|
||||
'Expect:',
|
||||
'Content-Length: 0'
|
||||
);
|
||||
curl_setopt($curl, CURLOPT_HTTPHEADER, $headers);
|
||||
|
||||
$this->debug('Request URL:'.$url);
|
||||
$response = curl_exec($curl);
|
||||
$curl_info = curl_getinfo($curl);
|
||||
curl_close($curl);
|
||||
|
||||
$this->debug('Response: '.$curl_info['http_code']);
|
||||
|
||||
/* 200 ok
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<matrikelnummernantwort>
|
||||
<uuid>793d44fa-5646-42b1-b0cb-f2f121b2f14f</uuid>
|
||||
<fehlerliste fehleranzahl="0"/>
|
||||
<matrikelnummernliste>
|
||||
<matrikelnummer>12345678</matrikelnummer>
|
||||
<matrikelnummer>23456789</matrikelnummer>
|
||||
</matrikelnummernliste>
|
||||
</matrikelnummernantwort>
|
||||
*/
|
||||
if ($curl_info['http_code'] == '200')
|
||||
{
|
||||
$dom = new DOMDocument();
|
||||
$dom->loadXML($response);
|
||||
$domnodes_matrikelnummer = $dom->getElementsByTagName('matrikelnummer');
|
||||
$reservations = array();
|
||||
foreach ($domnodes_matrikelnummer as $row)
|
||||
{
|
||||
$reservations[] = $row->textContent;
|
||||
}
|
||||
return $reservations;
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->errormsg = 'Request Failed with HTTP Code:'.$curl_info['http_code'].' and Response:'.$response;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Request a new Matrikelnummer
|
||||
* @param string $bildungseinrichtung Shortname of Institution.
|
||||
* @param string $studienjahr Year of issuing.
|
||||
* @param int $anzahl Number of Requested Numbers.
|
||||
* @return array list of matrikelnr or false on failure.
|
||||
*/
|
||||
public function getKontingent($bildungseinrichtung, $studienjahr, $anzahl = 1)
|
||||
{
|
||||
$this->debug('getKontingent');
|
||||
$uuid = $this->getUUID();
|
||||
|
||||
if ($this->tokenIsExpired())
|
||||
{
|
||||
$this->authenticate();
|
||||
}
|
||||
|
||||
$data = '<?xml version="1.0" encoding="UTF-8"?>
|
||||
<matrikelnummernanfrage>
|
||||
<uuid>'.$uuid.'</uuid>
|
||||
<kontingentblock>
|
||||
<anzahl>'.$anzahl.'</anzahl>
|
||||
<be>'.$bildungseinrichtung.'</be>
|
||||
<sj>'.$studienjahr.'</sj>
|
||||
</kontingentblock>
|
||||
</matrikelnummernanfrage>
|
||||
';
|
||||
|
||||
$curl = curl_init();
|
||||
$url = self::DVB_URL_WEBSERVICE_RESERVIERUNG;
|
||||
|
||||
curl_setopt($curl, CURLOPT_URL, $url);
|
||||
curl_setopt($curl, CURLOPT_POST, true);
|
||||
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
|
||||
curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, false);
|
||||
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
|
||||
curl_setopt($curl, CURLOPT_POSTFIELDS, $data);
|
||||
|
||||
$headers = array(
|
||||
'Accept: application/xml',
|
||||
'Content-Type: application/xml',
|
||||
'Authorization: Bearer '.$this->authentication->access_token,
|
||||
'User-Agent: FHComplete',
|
||||
'Connection: Keep-Alive',
|
||||
'Expect:'
|
||||
);
|
||||
curl_setopt($curl, CURLOPT_HTTPHEADER, $headers);
|
||||
|
||||
$this->debug('Request URL:'.$url);
|
||||
$this->debug('Request Data:'.$data);
|
||||
$response = curl_exec($curl);
|
||||
$curl_info = curl_getinfo($curl);
|
||||
curl_close($curl);
|
||||
|
||||
$this->debug('Response: '.$curl_info['http_code']);
|
||||
|
||||
if ($curl_info['http_code'] == '200')
|
||||
{
|
||||
$dom = new DOMDocument();
|
||||
$dom->loadXML($response);
|
||||
$domnodes_matrikelnummer = $dom->getElementsByTagName('matrikelnummer');
|
||||
$kontingent = array();
|
||||
foreach ($domnodes_matrikelnummer as $row)
|
||||
{
|
||||
$kontingent[] = $row->textContent;
|
||||
}
|
||||
return $kontingent;
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->errormsg = 'Request Failed with HTTP Code:'.$curl_info['http_code'].' and Response:'.$response;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Meldet die Vergabe der Matrikelnummer
|
||||
* @param string $bildungseinrichtung Kennzeichen der Bildungseinrichtung.
|
||||
* @param object $person Objekt mit den Personendaten.
|
||||
* @return booelan true wenn erfolgreich
|
||||
*/
|
||||
public function setMatrikelnummer($bildungseinrichtung, $person)
|
||||
{
|
||||
$this->debug('setMatrikelnummer');
|
||||
$uuid = $this->getUUID();
|
||||
|
||||
if ($this->tokenIsExpired())
|
||||
{
|
||||
$this->authenticate();
|
||||
}
|
||||
|
||||
$data = '<?xml version="1.0" encoding="UTF-8"?>
|
||||
<matrikelnummernmeldung>
|
||||
<uuid>'.$uuid.'</uuid>
|
||||
<personmeldung>
|
||||
<be>'.$bildungseinrichtung.'</be>
|
||||
<gebdat>'.$person->geburtsdatum.'</gebdat>
|
||||
<geschlecht>'.$person->geschlecht.'</geschlecht>
|
||||
<matrikel>'.$person->matrikelnummer.'</matrikel>';
|
||||
if (isset($person->matura) && $person->matura != '')
|
||||
$data .= '<matura>'.$person->matura.'</matura>';
|
||||
else
|
||||
$data .= '<matura>00000000</matura>';
|
||||
|
||||
$data .= '<nachname>'.$person->nachname.'</nachname>';
|
||||
|
||||
if (isset($person->plz) && $person->plz != '')
|
||||
$data .= '<plz>'.$person->plz.'</plz>';
|
||||
|
||||
$data .= '<staat>'.$person->staat.'</staat>';
|
||||
|
||||
if (isset($person->svnr) && $person->svnr != '')
|
||||
$data .= '<svnr>'.$person->svnr.'</svnr>';
|
||||
|
||||
$data .= '<vorname>'.$person->vorname.'</vorname>';
|
||||
|
||||
if (isset($person->writeonerror) && $person->writeonerror === true)
|
||||
$data .= '<writeOnError>J</writeOnError>';
|
||||
|
||||
$data .= '
|
||||
</personmeldung>
|
||||
</matrikelnummernmeldung>
|
||||
';
|
||||
|
||||
$curl = curl_init();
|
||||
$url = self::DVB_URL_WEBSERVICE_MELDUNG;
|
||||
|
||||
curl_setopt($curl, CURLOPT_URL, $url);
|
||||
curl_setopt($curl, CURLOPT_POST, true);
|
||||
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
|
||||
curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, false);
|
||||
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
|
||||
curl_setopt($curl, CURLOPT_POSTFIELDS, $data);
|
||||
|
||||
$headers = array(
|
||||
'Accept: application/xml',
|
||||
'Content-Type: application/xml',
|
||||
'Authorization: Bearer '.$this->authentication->access_token,
|
||||
'User-Agent: FHComplete',
|
||||
'Connection: Keep-Alive',
|
||||
'Expect:'
|
||||
);
|
||||
curl_setopt($curl, CURLOPT_HTTPHEADER, $headers);
|
||||
|
||||
$this->debug('Request URL:'.$url);
|
||||
$this->debug('Request Data:'.$data);
|
||||
$response = curl_exec($curl);
|
||||
$curl_info = curl_getinfo($curl);
|
||||
curl_close($curl);
|
||||
|
||||
$this->debug('Response: '.$curl_info['http_code']);
|
||||
|
||||
$this->debug('Response: '.print_r($response, true));
|
||||
/* 200 Fehlermeldung
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||
<matrikelnummernmeldungantwort>
|
||||
<uuid>b76e84a9-c0bd-494c-97cb-c4ab9cd452c5</uuid>
|
||||
<fehlerliste fehleranzahl="3">
|
||||
<fehler>
|
||||
<fehlernummer>ZD01471</fehlernummer>
|
||||
<kategorie>90</kategorie>
|
||||
<datenfeld>UNI-Kennzeichen</datenfeld>
|
||||
<fehlertext>UNI-Kennzeichen fehlt oder ungültig (FHTEST)</fehlertext>
|
||||
<massnahme>BRZ</massnahme>
|
||||
<feldinhalt>FHTEST</feldinhalt>
|
||||
</fehler>
|
||||
<fehler>
|
||||
<fehlernummer>AG21333</fehlernummer>
|
||||
<kategorie>65</kategorie>
|
||||
<datenfeld>Datum allg.Univ.reife</datenfeld>
|
||||
<fehlertext>kein gültiges Datum oder Format</fehlertext>
|
||||
<massnahme>Korrektur Datum allg. Univ.reife oder 000000 angeben, falls nicht anwendbar</massnahme>
|
||||
<feldinhalt>leer</feldinhalt>
|
||||
</fehler>
|
||||
<fehler>
|
||||
<fehlernummer>ZD10073</fehlernummer>
|
||||
<kategorie>90</kategorie>
|
||||
<datenfeld>Matrikelnummer</datenfeld>
|
||||
<fehlertext>aus ungültigem Kontingent</fehlertext>
|
||||
<massnahme>Korrektur der Matrikelnummer</massnahme>
|
||||
<feldinhalt>12345678</feldinhalt>
|
||||
</fehler>
|
||||
</fehlerliste>
|
||||
</matrikelnummernmeldungantwort>
|
||||
*/
|
||||
/* 200 ok
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||
<matrikelnummernmeldungantwort>
|
||||
<uuid>8b239582-6bc5-4193-ac79-2dcf9ec96439</uuid>
|
||||
<fehlerliste fehleranzahl="0"/>
|
||||
</matrikelnummernmeldungantwort>
|
||||
*/
|
||||
if ($curl_info['http_code'] == '200')
|
||||
{
|
||||
$dom = new DOMDocument();
|
||||
$dom->loadXML($response);
|
||||
$domnodes_fehlerliste = $dom->getElementsByTagName('fehlerliste');
|
||||
|
||||
$fehleranzahl = $domnodes_fehlerliste[0]->getAttribute('fehleranzahl');
|
||||
if ($fehleranzahl === '0')
|
||||
{
|
||||
// Keine Fehler -> Meldung erfolgreich
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->errormsg = 'Es gab '.$fehleranzahl.' Fehler:';
|
||||
$domnodes_fehler = $dom->getElementsByTagName('fehler');
|
||||
foreach ($domnodes_fehler as $row)
|
||||
{
|
||||
$datenfeld = $row->getElementsByTagName('datenfeld');
|
||||
$fehlertext = $row->getElementsByTagName('fehlertext');
|
||||
$this->errormsg .= ' Datenfeld:'.$datenfeld[0]->textContent;
|
||||
$this->errormsg .= ' Fehlertext:'.$fehlertext[0]->textContent;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->errormsg = 'Request Failed with HTTP Code:'.$curl_info['http_code'].' and Response:'.$response;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Generiert eine eindeutige UUID
|
||||
* @return uuid
|
||||
*/
|
||||
private function getUUID()
|
||||
{
|
||||
$data = openssl_random_pseudo_bytes(16);
|
||||
$data[6] = chr(ord($data[6]) & 0x0f | 0x40); // set version to 0100
|
||||
$data[8] = chr(ord($data[8]) & 0x3f | 0x80); // set bits 6-7 to 10
|
||||
|
||||
return vsprintf('%s%s-%s-%s-%s-%s%s%s', str_split(bin2hex($data), 4));
|
||||
}
|
||||
|
||||
/**
|
||||
* Erstellt eine Debug Message
|
||||
* @param string $msg Message to log.
|
||||
* @return void
|
||||
*/
|
||||
private function debug($msg)
|
||||
{
|
||||
if ($this->debug)
|
||||
$this->debug_output .= "\n<br>".date('Y-m-d H:i:s').': '.htmlentities($msg);
|
||||
}
|
||||
}
|
||||
@@ -280,6 +280,8 @@ class variable extends basis_db
|
||||
if (!isset($this->variable->allow_lehrstunde_drop))
|
||||
$this->variable->allow_lehrstunde_drop='false';
|
||||
|
||||
if (!isset($this->variable->fasfunktionfilter))
|
||||
$this->variable->fasfunktionfilter='alle';
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -59,6 +59,7 @@ $this->phrasen['tools/ampelAbgelaufenTxt']='Sie können diese Ampeln weiterhin l
|
||||
$this->phrasen['tools/ampelBestaetigtAbgelaufen']='Bereits bestätigt oder abgelaufen';
|
||||
$this->phrasen['tools/ampelKeineAktuellen']='Keine aktuellen Ampeln';
|
||||
$this->phrasen['tools/ampelKeineAktuellenTxt']='Sie haben zur Zeit keine aktuellen Ampeln.';
|
||||
$this->phrasen['tools/ampelClose']='Jetzt nicht';
|
||||
|
||||
//Software fuer Lehre -> Softgrid
|
||||
$this->phrasen['tools/applikationsliste']='Applikationsliste';
|
||||
|
||||
@@ -33,3 +33,22 @@
|
||||
font-weight: bold;
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
.navbar-brand {
|
||||
float: left;
|
||||
height: 50px;
|
||||
padding-top: 15px;
|
||||
padding-right: 20px;
|
||||
padding-left: 7px;
|
||||
font-size: 18px;
|
||||
line-height: 20px;
|
||||
}
|
||||
|
||||
.navbar-brand-icon {
|
||||
float: left;
|
||||
height: 50px;
|
||||
padding-top: 15px;
|
||||
padding-right: 12px;
|
||||
padding-left: 7px;
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
@@ -24,14 +24,27 @@ var FHC_NavigationWidget = {
|
||||
FHC_AjaxClient.ajaxCallGet(
|
||||
'system/Navigation/header',
|
||||
{
|
||||
navigation_widget_called: FHC_NavigationWidget._getNavigationWidgetCalled()
|
||||
navigation_page: FHC_NavigationWidget._getNavigationWidgetCalled()
|
||||
},
|
||||
{
|
||||
successCallback: function(data, textStatus, jqXHR) {
|
||||
if (data != null)
|
||||
if (FHC_AjaxClient.hasData(data))
|
||||
{
|
||||
jQuery.each(data, function(i, e) {
|
||||
$(".menu-header-items").append('<a class="navbar-brand" href="' + e + '">' + i + '</a>');
|
||||
jQuery.each(FHC_AjaxClient.getData(data), function(i, e) {
|
||||
|
||||
var headerEntry = '';
|
||||
|
||||
if (e['icon'] != 'undefined' && e['icon'] != '')
|
||||
{
|
||||
headerEntry += '<i class="navbar-brand-icon fa fa-' + e['icon'] + ' fa-fw"></i>';
|
||||
}
|
||||
|
||||
var target = '';
|
||||
if (e['target'] != null) target = e['target'];
|
||||
|
||||
headerEntry += '<a class="navbar-brand" href="' + e['link'] + '" target=' + target + '>' + e['description'] + '</a>';
|
||||
|
||||
$(".menu-header-items").append(headerEntry);
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -47,18 +60,18 @@ var FHC_NavigationWidget = {
|
||||
FHC_AjaxClient.ajaxCallGet(
|
||||
'system/Navigation/menu',
|
||||
{
|
||||
navigation_widget_called: FHC_NavigationWidget._getNavigationWidgetCalled()
|
||||
navigation_page: FHC_NavigationWidget._getNavigationWidgetCalled()
|
||||
},
|
||||
{
|
||||
successCallback: function(data, textStatus, jqXHR) {
|
||||
if (data != null)
|
||||
if (FHC_AjaxClient.hasData(data))
|
||||
{
|
||||
var strMenu = '';
|
||||
|
||||
FHC_NavigationWidget._printCollapseIcon();
|
||||
|
||||
jQuery.each(data, function(i, e) {
|
||||
strMenu += FHC_NavigationWidget._printNavItem(e);
|
||||
jQuery.each(FHC_AjaxClient.getData(data), function(i, e) {
|
||||
if (e != null) strMenu += FHC_NavigationWidget._printNavItem(e);
|
||||
});
|
||||
|
||||
$("#side-menu").html(strMenu);
|
||||
@@ -104,33 +117,22 @@ var FHC_NavigationWidget = {
|
||||
*
|
||||
*/
|
||||
_printNavItem: function(item, depth = 1) {
|
||||
|
||||
strMenu = "";
|
||||
var expanded = typeof item['expand'] != 'undefined' && item['expand'] === true ? ' active' : '';
|
||||
|
||||
strMenu += '<li class="' + expanded + '">';
|
||||
|
||||
if (typeof item['subscriptLinkClass'] != 'undefined' && typeof item['subscriptDescription'] != 'undefined')
|
||||
if (typeof item['subscriptLinkClass'] != 'undefined' && typeof item['subscriptDescription'] != 'undefined'
|
||||
&& item['subscriptLinkClass'] != null && item['subscriptDescription'] != null)
|
||||
{
|
||||
strMenu += '<span>';
|
||||
}
|
||||
|
||||
// Handle fhc_controller_id
|
||||
var fhc_controller_id = FHC_AjaxClient.getUrlParameter('fhc_controller_id');
|
||||
if (fhc_controller_id != null && fhc_controller_id != '' && item['link'] != '#')
|
||||
{
|
||||
if (item['link'].indexOf('?') != -1)
|
||||
{
|
||||
item['link'] += '&';
|
||||
}
|
||||
else
|
||||
{
|
||||
item['link'] += '?';
|
||||
}
|
||||
var target = '';
|
||||
if (item['target'] != null) target = item['target'];
|
||||
|
||||
item['link'] += 'fhc_controller_id=' + fhc_controller_id;
|
||||
}
|
||||
|
||||
strMenu += '<a href="' + item['link'] + '"' + expanded + '>';
|
||||
strMenu += '<a href="' + item['link'] + '"' + expanded + ' target="' + target + '">';
|
||||
|
||||
if (item['icon'] != 'undefined')
|
||||
{
|
||||
@@ -146,7 +148,8 @@ var FHC_NavigationWidget = {
|
||||
|
||||
strMenu += '</a>';
|
||||
|
||||
if (typeof item['subscriptLinkClass'] != 'undefined' && typeof item['subscriptDescription'] != 'undefined')
|
||||
if (typeof item['subscriptLinkClass'] != 'undefined' && typeof item['subscriptDescription'] != 'undefined'
|
||||
&& item['subscriptLinkClass'] != null && item['subscriptDescription'] != null)
|
||||
{
|
||||
strMenu += '<a class="' + item['subscriptLinkClass'] + ' menuSubscriptLink" value="' + item['subscriptLinkValue'] + '" href="#"> (' + item['subscriptDescription'] + ')</a>';
|
||||
strMenu += '</span>';
|
||||
@@ -167,7 +170,7 @@ var FHC_NavigationWidget = {
|
||||
strMenu += '<ul class="nav nav-' + level + '-level" ' + expanded + '>';
|
||||
|
||||
jQuery.each(item['children'], function(i, e) {
|
||||
strMenu += FHC_NavigationWidget._printNavItem(e, ++depth);
|
||||
if (e != null) strMenu += FHC_NavigationWidget._printNavItem(e, ++depth);
|
||||
});
|
||||
|
||||
strMenu += '</ul>';
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
|
||||
var fhc_controller_id = FHC_AjaxClient.getUrlParameter('fhc_controller_id');
|
||||
const CONTROLLER_URL = FHC_JS_DATA_STORAGE_OBJECT.app_root + FHC_JS_DATA_STORAGE_OBJECT.ci_router + "/"+FHC_JS_DATA_STORAGE_OBJECT.called_path;
|
||||
const CALLED_PATH = FHC_JS_DATA_STORAGE_OBJECT.called_path;
|
||||
|
||||
@@ -403,9 +402,9 @@ var InfocenterDetails = {
|
||||
_refreshLog: function()
|
||||
{
|
||||
var personid = $("#hiddenpersonid").val();
|
||||
$("#logs").load(CONTROLLER_URL + '/reloadLogs/' + personid + '?fhc_controller_id=' + fhc_controller_id,
|
||||
function ()
|
||||
{
|
||||
$("#logs").load(
|
||||
CONTROLLER_URL + '/reloadLogs/' + personid + '?fhc_controller_id=' + FHC_AjaxClient.getUrlParameter('fhc_controller_id'),
|
||||
function () {
|
||||
//readd tablesorter
|
||||
InfocenterDetails._formatLogTable()
|
||||
}
|
||||
|
||||
@@ -11,7 +11,9 @@ function refreshSideMenu()
|
||||
//
|
||||
FHC_AjaxClient.ajaxCallGet(
|
||||
'system/infocenter/InfoCenter/setNavigationMenuArrayJson',
|
||||
null,
|
||||
{
|
||||
navigation_page: FHC_NavigationWidget._getNavigationWidgetCalled()
|
||||
},
|
||||
{
|
||||
successCallback: function(data, textStatus, jqXHR) {
|
||||
FHC_NavigationWidget.renderSideMenu();
|
||||
|
||||
+257
-237
@@ -19,16 +19,14 @@
|
||||
* Andreas Oesterreicher <andreas.oesterreicher@technikum-wien.at> and
|
||||
* Rudolf Hangl <rudolf.hangl@technikum-wien.at>.
|
||||
*/
|
||||
// header für no cache
|
||||
header("Cache-Control: no-cache");
|
||||
header("Cache-Control: post-check=0, pre-check=0",false);
|
||||
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
|
||||
header("Pragma: no-cache");
|
||||
// content type setzen
|
||||
header("Content-type: application/xhtml+xml");
|
||||
|
||||
// DAO
|
||||
require_once('../config/vilesci.config.inc.php');
|
||||
require_once('../include/functions.inc.php');
|
||||
require_once('../include/abschlusspruefung.class.php');
|
||||
require_once('../include/person.class.php');
|
||||
require_once('../include/benutzer.class.php');
|
||||
@@ -57,235 +55,257 @@ $abschlussbeurteilung_arr = array();
|
||||
$abschlussbeurteilung_arrEnglish = array();
|
||||
$qry = "SELECT * FROM lehre.tbl_abschlussbeurteilung";
|
||||
if($db->db_query($qry))
|
||||
{
|
||||
while($row = $db->db_fetch_object())
|
||||
{
|
||||
$abschlussbeurteilung_arr[$row->abschlussbeurteilung_kurzbz]=$row->bezeichnung;
|
||||
$abschlussbeurteilung_arrEng[$row->abschlussbeurteilung_kurzbz]=$row->bezeichnung_english;
|
||||
}
|
||||
}
|
||||
|
||||
$note_arr = array();
|
||||
$qry = "SELECT * FROM lehre.tbl_note";
|
||||
if($db->db_query($qry))
|
||||
{
|
||||
while($row = $db->db_fetch_object())
|
||||
$note_arr[$row->note]=$row->anmerkung;
|
||||
|
||||
function draw_content_xml($row)
|
||||
{
|
||||
global $rdf_url, $datum_obj, $abschlussbeurteilung_arr, $abschlussbeurteilung_arrEng, $note_arr;
|
||||
$vorsitz = '';
|
||||
$pruefer1= '';
|
||||
$pruefer2= '';
|
||||
$pruefer3= '';
|
||||
$note_arr[$row->note]=$row->anmerkung;
|
||||
}
|
||||
}
|
||||
|
||||
//Nachnamen der Pruefer holden
|
||||
$person = new person();
|
||||
$mitarbeiter = new mitarbeiter();
|
||||
$student= new student($row->student_uid);
|
||||
function draw_content_xml($row)
|
||||
{
|
||||
global $rdf_url, $datum_obj, $abschlussbeurteilung_arr, $abschlussbeurteilung_arrEng, $note_arr;
|
||||
$vorsitz = '';
|
||||
$pruefer1= '';
|
||||
$pruefer2= '';
|
||||
$pruefer3= '';
|
||||
|
||||
$nation=new nation($student->geburtsnation);
|
||||
$geburtsnation=$nation->kurztext;
|
||||
$geburtsnation_engl=$nation->engltext;
|
||||
$nation->load($student->staatsbuergerschaft);
|
||||
$staatsbuergerschaft=$nation->kurztext;
|
||||
$staatsbuergerschaft_engl=$nation->engltext;
|
||||
//Nachnamen der Pruefer holden
|
||||
$person = new person();
|
||||
$mitarbeiter = new mitarbeiter();
|
||||
$student= new student($row->student_uid);
|
||||
|
||||
$studiengang = new studiengang($student->studiengang_kz);
|
||||
$akadgrad = new akadgrad($row->akadgrad_id);
|
||||
$nation=new nation($student->geburtsnation);
|
||||
$geburtsnation=$nation->kurztext;
|
||||
$geburtsnation_engl=$nation->engltext;
|
||||
$nation->load($student->staatsbuergerschaft);
|
||||
$staatsbuergerschaft=$nation->kurztext;
|
||||
$staatsbuergerschaft_engl=$nation->engltext;
|
||||
|
||||
if($mitarbeiter->load($row->vorsitz))
|
||||
$studiengang = new studiengang($student->studiengang_kz);
|
||||
$akadgrad = new akadgrad($row->akadgrad_id);
|
||||
$vorsitz_geschlecht = '';
|
||||
|
||||
if($mitarbeiter->load($row->vorsitz))
|
||||
{
|
||||
$vorsitz = $mitarbeiter->titelpre.' '.$mitarbeiter->vorname;
|
||||
$vorsitz .= ' '.$mitarbeiter->nachname.' '.$mitarbeiter->titelpost;
|
||||
$vorsitz = trim($vorsitz);
|
||||
|
||||
$vorsitz_geschlecht = $mitarbeiter->geschlecht;
|
||||
}
|
||||
if($person->load($row->pruefer1))
|
||||
$pruefer1 = trim($person->titelpre.' '.$person->vorname.' '.$person->nachname.' '.$person->titelpost);
|
||||
if($person->load($row->pruefer2))
|
||||
$pruefer2 = trim($person->titelpre.' '.$person->vorname.' '.$person->nachname.' '.$person->titelpost);
|
||||
if($person->load($row->pruefer3))
|
||||
$pruefer3 = trim($person->titelpre.' '.$person->vorname.' '.$person->nachname.' '.$person->titelpost);
|
||||
|
||||
$qry = "SELECT * FROM public.tbl_benutzerfunktion JOIN campus.vw_mitarbeiter USING(uid) WHERE funktion_kurzbz='rek'";
|
||||
$rektor = '';
|
||||
$db = new basis_db();
|
||||
$db2 = new basis_db();
|
||||
if($db->db_query($qry))
|
||||
if($row_rek = $db->db_fetch_object())
|
||||
$rektor = $row_rek->titelpre.' '.$row_rek->vorname.' '.$row_rek->nachname.' '.$row_rek->titelpost;
|
||||
$qry = "SELECT
|
||||
*
|
||||
FROM
|
||||
(
|
||||
SELECT
|
||||
titel as themenbereich, ende, projektarbeit_id, note, beginn
|
||||
FROM
|
||||
lehre.tbl_projektarbeit a
|
||||
WHERE
|
||||
student_uid=".$db->db_add_param($student->uid)."
|
||||
AND projekttyp_kurzbz in('Bachelor','Diplom','Master','Dissertation','Lizenziat','Magister')
|
||||
AND a.final=true
|
||||
ORDER BY beginn DESC, projektarbeit_id ASC LIMIT 2
|
||||
) as a
|
||||
ORDER BY beginn asc";
|
||||
$themenbereich='';
|
||||
$datum_projekt='';
|
||||
$betreuer = '';
|
||||
$betreuer_2 = '';
|
||||
$themenbereich_2 = '';
|
||||
$note = '';
|
||||
$note2='';
|
||||
$datum_projekt2='';
|
||||
|
||||
if($result_proj = $db->db_query($qry))
|
||||
{
|
||||
if($row_proj = $db->db_fetch_object($result_proj))
|
||||
{
|
||||
$vorsitz = trim($mitarbeiter->titelpre.' '.$mitarbeiter->vorname.' '.$mitarbeiter->nachname.' '.$mitarbeiter->titelpost);
|
||||
$vorsitz_geschlecht = $mitarbeiter->geschlecht;
|
||||
}
|
||||
if($person->load($row->pruefer1))
|
||||
$pruefer1 = trim($person->titelpre.' '.$person->vorname.' '.$person->nachname.' '.$person->titelpost);
|
||||
if($person->load($row->pruefer2))
|
||||
$pruefer2 = trim($person->titelpre.' '.$person->vorname.' '.$person->nachname.' '.$person->titelpost);
|
||||
if($person->load($row->pruefer3))
|
||||
$pruefer3 = trim($person->titelpre.' '.$person->vorname.' '.$person->nachname.' '.$person->titelpost);
|
||||
|
||||
$qry = "SELECT * FROM public.tbl_benutzerfunktion JOIN campus.vw_mitarbeiter USING(uid) WHERE funktion_kurzbz='rek'";
|
||||
$rektor = '';
|
||||
$db = new basis_db();
|
||||
$db2 = new basis_db();
|
||||
if($db->db_query($qry))
|
||||
if($row_rek = $db->db_fetch_object())
|
||||
$rektor = $row_rek->titelpre.' '.$row_rek->vorname.' '.$row_rek->nachname.' '.$row_rek->titelpost;
|
||||
$qry = "SELECT
|
||||
*
|
||||
$qry_bet = "SELECT titelpre, vorname, nachname, titelpost
|
||||
FROM
|
||||
(
|
||||
SELECT
|
||||
titel as themenbereich, ende, projektarbeit_id, note, beginn
|
||||
lehre.tbl_projektbetreuer
|
||||
JOIN public.tbl_person USING(person_id)
|
||||
WHERE
|
||||
projektarbeit_id=".$db->db_add_param($row_proj->projektarbeit_id)."
|
||||
AND (betreuerart_kurzbz in('Erstbegutachter', 'Erstbetreuer', 'Betreuer', 'Begutacher'))
|
||||
LIMIT 1";
|
||||
if($db2->db_query($qry_bet))
|
||||
if($row_bet = $db2->db_fetch_object())
|
||||
$betreuer = $row_bet->titelpre.' '.$row_bet->vorname.' '.$row_bet->nachname.' '.$row_bet->titelpost;
|
||||
|
||||
$themenbereich = $row_proj->themenbereich;
|
||||
$note = (isset($note_arr[$row_proj->note])?$note_arr[$row_proj->note]:$row_proj->note);
|
||||
$datum_projekt = $datum_obj->convertISODate($row_proj->ende);
|
||||
$projektarbeit = new projektarbeit($row_proj->projektarbeit_id);
|
||||
$lehreinheit = new lehreinheit($projektarbeit->lehreinheit_id);
|
||||
$lehrveranstaltung = new lehrveranstaltung($lehreinheit->lehrveranstaltung_id);
|
||||
$projektnote = new note($note);
|
||||
}
|
||||
|
||||
if($row_proj = $db->db_fetch_object($result_proj))
|
||||
{
|
||||
$qry_bet = "SELECT titelpre, vorname, nachname, titelpost
|
||||
FROM
|
||||
lehre.tbl_projektarbeit a
|
||||
lehre.tbl_projektbetreuer
|
||||
JOIN public.tbl_person USING(person_id)
|
||||
WHERE
|
||||
student_uid=".$db->db_add_param($student->uid)."
|
||||
AND projekttyp_kurzbz in('Bachelor','Diplom','Master','Dissertation','Lizenziat','Magister')
|
||||
AND a.final=true
|
||||
ORDER BY beginn DESC, projektarbeit_id ASC LIMIT 2
|
||||
) as a
|
||||
ORDER BY beginn asc";
|
||||
$themenbereich='';
|
||||
$datum_projekt='';
|
||||
$betreuer = '';
|
||||
$betreuer_2 = '';
|
||||
$themenbereich_2 = '';
|
||||
$note = '';
|
||||
$note2='';
|
||||
$datum_projekt2='';
|
||||
projektarbeit_id=".$db->db_add_param($row_proj->projektarbeit_id, FHC_INTEGER)."
|
||||
AND (betreuerart_kurzbz in('Erstbegutachter', 'Erstbetreuer', 'Betreuer', 'Begutacher'))
|
||||
LIMIT 1";
|
||||
if($db2->db_query($qry_bet))
|
||||
if($row_bet = $db2->db_fetch_object())
|
||||
$betreuer_2 = $row_bet->titelpre.' '.$row_bet->vorname.' '.$row_bet->nachname.' '.$row_bet->titelpost;
|
||||
|
||||
if($result_proj = $db->db_query($qry))
|
||||
{
|
||||
if($row_proj = $db->db_fetch_object($result_proj))
|
||||
{
|
||||
$qry_bet = "SELECT titelpre, vorname, nachname, titelpost FROM lehre.tbl_projektbetreuer JOIN public.tbl_person USING(person_id) WHERE projektarbeit_id='$row_proj->projektarbeit_id' AND (betreuerart_kurzbz in('Erstbegutachter', 'Erstbetreuer', 'Betreuer', 'Begutacher')) LIMIT 1";
|
||||
if($db2->db_query($qry_bet))
|
||||
if($row_bet = $db2->db_fetch_object())
|
||||
$betreuer = $row_bet->titelpre.' '.$row_bet->vorname.' '.$row_bet->nachname.' '.$row_bet->titelpost;
|
||||
|
||||
$themenbereich = $row_proj->themenbereich;
|
||||
$note = (isset($note_arr[$row_proj->note])?$note_arr[$row_proj->note]:$row_proj->note);
|
||||
$datum_projekt = $datum_obj->convertISODate($row_proj->ende);
|
||||
$projektarbeit = new projektarbeit($row_proj->projektarbeit_id);
|
||||
$lehreinheit = new lehreinheit($projektarbeit->lehreinheit_id);
|
||||
$lehrveranstaltung = new lehrveranstaltung($lehreinheit->lehrveranstaltung_id);
|
||||
$projektnote = new note($note);
|
||||
}
|
||||
|
||||
if($row_proj = $db->db_fetch_object($result_proj))
|
||||
{
|
||||
$qry_bet = "SELECT titelpre, vorname, nachname, titelpost FROM lehre.tbl_projektbetreuer JOIN public.tbl_person USING(person_id) WHERE projektarbeit_id='$row_proj->projektarbeit_id' AND (betreuerart_kurzbz in('Erstbegutachter', 'Erstbetreuer', 'Betreuer', 'Begutacher')) LIMIT 1";
|
||||
if($db2->db_query($qry_bet))
|
||||
if($row_bet = $db2->db_fetch_object())
|
||||
$betreuer_2 = $row_bet->titelpre.' '.$row_bet->vorname.' '.$row_bet->nachname.' '.$row_bet->titelpost;
|
||||
|
||||
$themenbereich_2 = $row_proj->themenbereich;
|
||||
$note2 = (isset($note_arr[$row_proj->note])?$note_arr[$row_proj->note]:$row_proj->note);
|
||||
$datum_projekt2 = $datum_obj->convertISODate($row_proj->ende);
|
||||
}
|
||||
$themenbereich_2 = $row_proj->themenbereich;
|
||||
$note2 = (isset($note_arr[$row_proj->note])?$note_arr[$row_proj->note]:$row_proj->note);
|
||||
$datum_projekt2 = $datum_obj->convertISODate($row_proj->ende);
|
||||
}
|
||||
|
||||
switch($student->anrede)
|
||||
{
|
||||
case 'Herr': $anrede_engl = 'Mr'; break;
|
||||
case 'Frau': $anrede_engl = 'Ms'; break;
|
||||
default: $anrede_engl = ''; break;
|
||||
}
|
||||
|
||||
if($student->anrede == 'Herr')
|
||||
$anrede = 'Herrn';
|
||||
else
|
||||
$anrede = $student->anrede;
|
||||
|
||||
|
||||
|
||||
if($row->sponsion=='')
|
||||
$row->sponsion=$row->datum;
|
||||
|
||||
$oe = new organisationseinheit();
|
||||
$parents = $oe->getParents($studiengang->oe_kurzbz);
|
||||
$oe_parent = "";
|
||||
|
||||
foreach ($parents as $parent)
|
||||
{
|
||||
$oe_temp = new organisationseinheit();
|
||||
$oe_temp->load($parent);
|
||||
if($oe_temp->organisationseinheittyp_kurzbz == 'Fakultät')
|
||||
{
|
||||
$oe_parent = $oe_temp->bezeichnung;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
$studiengang_bezeichnung2 = explode(" ", $studiengang->bezeichnung, 2);
|
||||
$name = trim($student->titelpre.' '.trim($student->vorname.' '.$student->vornamen).' '.$student->nachname.($student->titelpost!=''?', '.$student->titelpost:''));
|
||||
|
||||
//Wenn Lehrgang, dann Erhalter-KZ vor die Studiengangs-Kz hängen
|
||||
if ($student->studiengang_kz<0)
|
||||
{
|
||||
$stg = new studiengang();
|
||||
$stg->load($student->studiengang_kz);
|
||||
|
||||
$studiengang_kz = sprintf("%03s", $stg->erhalter_kz).sprintf("%04s", abs($student->studiengang_kz));
|
||||
}
|
||||
else
|
||||
$studiengang_kz = sprintf("%04s", abs($student->studiengang_kz));
|
||||
|
||||
echo "\t<pruefung>".'
|
||||
<abschlusspruefung_id><![CDATA['.$row->abschlusspruefung_id.']]></abschlusspruefung_id>
|
||||
<student_uid><![CDATA['.$row->student_uid.']]></student_uid>
|
||||
<vorsitz><![CDATA['.$row->vorsitz.']]></vorsitz>
|
||||
<vorsitz_nachname><![CDATA['.$vorsitz.']]></vorsitz_nachname>
|
||||
<vorsitz_geschlecht><![CDATA['.$vorsitz_geschlecht.']]></vorsitz_geschlecht>
|
||||
<pruefer1><![CDATA['.$row->pruefer1.']]></pruefer1>
|
||||
<pruefer1_nachname><![CDATA['.$pruefer1.']]></pruefer1_nachname>
|
||||
<pruefer2><![CDATA['.$row->pruefer2.']]></pruefer2>
|
||||
<pruefer2_nachname><![CDATA['.$pruefer2.']]></pruefer2_nachname>
|
||||
<pruefer3><![CDATA['.$row->pruefer3.']]></pruefer3>
|
||||
<pruefer3_nachname><![CDATA['.$pruefer3.']]></pruefer3_nachname>
|
||||
<abschlussbeurteilung_kurzbz><![CDATA['.($row->abschlussbeurteilung_kurzbz!=''?$abschlussbeurteilung_arr[$row->abschlussbeurteilung_kurzbz]:'').']]></abschlussbeurteilung_kurzbz>
|
||||
<abschlussbeurteilung_kurzbzEng><![CDATA['.($row->abschlussbeurteilung_kurzbz!=''?$abschlussbeurteilung_arrEng[$row->abschlussbeurteilung_kurzbz]:'').']]></abschlussbeurteilung_kurzbzEng>
|
||||
<akadgrad_id><![CDATA['.$row->akadgrad_id.']]></akadgrad_id>
|
||||
<datum><![CDATA['.$datum_obj->convertISODate($row->datum).']]></datum>
|
||||
<datum_iso><![CDATA['.$row->datum.']]></datum_iso>
|
||||
<uhrzeit><![CDATA['.$row->uhrzeit.']]></uhrzeit>
|
||||
<sponsion><![CDATA['.$datum_obj->convertISODate($row->sponsion).']]></sponsion>
|
||||
<sponsion_iso><![CDATA['.$row->sponsion.']]></sponsion_iso>
|
||||
<pruefungstyp_kurzbz><![CDATA['.$row->pruefungstyp_kurzbz.']]></pruefungstyp_kurzbz>
|
||||
<pruefungstyp_beschreibung><![CDATA['.$row->beschreibung.']]></pruefungstyp_beschreibung>
|
||||
<anrede><![CDATA['.$anrede.']]></anrede>
|
||||
<anrede_engl><![CDATA['.$anrede_engl.']]></anrede_engl>
|
||||
<name><![CDATA['.$name.']]></name>
|
||||
<titelpre><![CDATA['.$student->titelpre.']]></titelpre>
|
||||
<vorname><![CDATA['.$student->vorname.']]></vorname>
|
||||
<vornamen><![CDATA['.$student->vornamen.']]></vornamen>
|
||||
<nachname><![CDATA['.$student->nachname.']]></nachname>
|
||||
<titelpost><![CDATA['.$student->titelpost.']]></titelpost>
|
||||
<matrikelnr><![CDATA['.trim($student->matrikelnr).']]></matrikelnr>
|
||||
<gebdatum_iso><![CDATA['.$student->gebdatum.']]></gebdatum_iso>
|
||||
<geschlecht><![CDATA['.$student->geschlecht.']]></geschlecht>
|
||||
<gebdatum><![CDATA['.$datum_obj->convertISODate($student->gebdatum).']]></gebdatum>
|
||||
<gebort><![CDATA['.$student->gebort.']]></gebort>
|
||||
<staatsbuergerschaft><![CDATA['.$staatsbuergerschaft.']]></staatsbuergerschaft>
|
||||
<staatsbuergerschaft_engl><![CDATA['.$staatsbuergerschaft_engl.']]></staatsbuergerschaft_engl>
|
||||
<geburtsnation><![CDATA['.$geburtsnation.']]></geburtsnation>
|
||||
<geburtsnation_engl><![CDATA['.$geburtsnation_engl.']]></geburtsnation_engl>
|
||||
<studiengang_kz><![CDATA['.$studiengang_kz.']]></studiengang_kz>
|
||||
<stg_bezeichnung><![CDATA['.$studiengang->bezeichnung.']]></stg_bezeichnung>
|
||||
<stg_bezeichnung2><![CDATA['.$studiengang_bezeichnung2[1].']]></stg_bezeichnung2>
|
||||
<stg_bezeichnung_engl><![CDATA['.$studiengang->english.']]></stg_bezeichnung_engl>
|
||||
<stg_oe_parent><![CDATA['.$oe_parent.']]></stg_oe_parent>
|
||||
<stg_art><![CDATA['.$studiengang->typ.']]></stg_art>
|
||||
<akadgrad_kurzbz><![CDATA['.$akadgrad->akadgrad_kurzbz.']]></akadgrad_kurzbz>
|
||||
<titel><![CDATA['.$akadgrad->titel.']]></titel>
|
||||
<datum_aktuell><![CDATA['.date('d.m.Y').']]></datum_aktuell>
|
||||
<anmerkung><![CDATA['.$row->anmerkung.']]></anmerkung>
|
||||
<bescheidbgbl1><![CDATA['.$studiengang->bescheidbgbl1.']]></bescheidbgbl1>
|
||||
<bescheidbgbl2><![CDATA['.$studiengang->bescheidbgbl2.']]></bescheidbgbl2>
|
||||
<bescheidgz><![CDATA['.$studiengang->bescheidgz.']]></bescheidgz>
|
||||
<bescheidvom><![CDATA['.$datum_obj->convertISODate($studiengang->bescheidvom).']]></bescheidvom>
|
||||
<titelbescheidvom><![CDATA['.$datum_obj->convertISODate($studiengang->titelbescheidvom).']]></titelbescheidvom>
|
||||
<rektor><![CDATA['.$rektor.']]></rektor>
|
||||
<themenbereich><![CDATA['.$themenbereich.']]></themenbereich>
|
||||
<projekt_typ><![CDATA['.$projektarbeit->projekttyp_bezeichnung.']]></projekt_typ>
|
||||
<projekt_fach><![CDATA['.$lehrveranstaltung->bezeichnung.']]></projekt_fach>
|
||||
<projekt_titel><![CDATA['.$projektarbeit->titel.']]></projekt_titel>
|
||||
<themenbereich_2><![CDATA['.$themenbereich_2.']]></themenbereich_2>
|
||||
<betreuer><![CDATA['.$betreuer.']]></betreuer>
|
||||
<betreuer_2><![CDATA['.$betreuer_2.']]></betreuer_2>
|
||||
<note><![CDATA['.$note.']]></note>
|
||||
<note_bezeichnung><![CDATA['.$projektnote->bezeichnung.']]></note_bezeichnung>
|
||||
<note2><![CDATA['.$note2.']]></note2>
|
||||
<notekommpruef><![CDATA['.$row->note.']]></notekommpruef>
|
||||
<datum_projekt><![CDATA['.$datum_projekt.']]></datum_projekt>
|
||||
<datum_projekt2><![CDATA['.$datum_projekt.']]></datum_projekt2>
|
||||
<ort_datum><![CDATA['.date('d.m.Y').']]></ort_datum>';
|
||||
|
||||
echo "\n\t</pruefung>";
|
||||
}
|
||||
|
||||
switch($student->anrede)
|
||||
{
|
||||
case 'Herr': $anrede_engl = 'Mr'; break;
|
||||
case 'Frau': $anrede_engl = 'Ms'; break;
|
||||
default: $anrede_engl = ''; break;
|
||||
}
|
||||
|
||||
if($student->anrede == 'Herr')
|
||||
$anrede = 'Herrn';
|
||||
else
|
||||
$anrede = $student->anrede;
|
||||
|
||||
if($row->sponsion=='')
|
||||
$row->sponsion=$row->datum;
|
||||
|
||||
$oe = new organisationseinheit();
|
||||
$parents = $oe->getParents($studiengang->oe_kurzbz);
|
||||
$oe_parent = "";
|
||||
|
||||
foreach ($parents as $parent)
|
||||
{
|
||||
$oe_temp = new organisationseinheit();
|
||||
$oe_temp->load($parent);
|
||||
if($oe_temp->organisationseinheittyp_kurzbz == 'Fakultät')
|
||||
{
|
||||
$oe_parent = $oe_temp->bezeichnung;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
$studiengang_bezeichnung2 = explode(" ", $studiengang->bezeichnung, 2);
|
||||
$name = $student->titelpre.' '.trim($student->vorname.' '.$student->vornamen).' '.$student->nachname;
|
||||
$name .= ($student->titelpost!=''?', '.$student->titelpost:'');
|
||||
$name = trim($name);
|
||||
|
||||
//Wenn Lehrgang, dann Erhalter-KZ vor die Studiengangs-Kz hängen
|
||||
if ($student->studiengang_kz<0)
|
||||
{
|
||||
$stg = new studiengang();
|
||||
$stg->load($student->studiengang_kz);
|
||||
|
||||
$studiengang_kz = sprintf("%03s", $stg->erhalter_kz).sprintf("%04s", abs($student->studiengang_kz));
|
||||
}
|
||||
else
|
||||
$studiengang_kz = sprintf("%04s", abs($student->studiengang_kz));
|
||||
|
||||
echo "\t<pruefung>".'
|
||||
<abschlusspruefung_id><![CDATA['.$row->abschlusspruefung_id.']]></abschlusspruefung_id>
|
||||
<student_uid><![CDATA['.$row->student_uid.']]></student_uid>
|
||||
<vorsitz><![CDATA['.$row->vorsitz.']]></vorsitz>
|
||||
<vorsitz_nachname><![CDATA['.$vorsitz.']]></vorsitz_nachname>
|
||||
<vorsitz_geschlecht><![CDATA['.$vorsitz_geschlecht.']]></vorsitz_geschlecht>
|
||||
<pruefer1><![CDATA['.$row->pruefer1.']]></pruefer1>
|
||||
<pruefer1_nachname><![CDATA['.$pruefer1.']]></pruefer1_nachname>
|
||||
<pruefer2><![CDATA['.$row->pruefer2.']]></pruefer2>
|
||||
<pruefer2_nachname><![CDATA['.$pruefer2.']]></pruefer2_nachname>
|
||||
<pruefer3><![CDATA['.$row->pruefer3.']]></pruefer3>
|
||||
<pruefer3_nachname><![CDATA['.$pruefer3.']]></pruefer3_nachname>
|
||||
<abschlussbeurteilung_kurzbz><![CDATA['.($row->abschlussbeurteilung_kurzbz!=''?$abschlussbeurteilung_arr[$row->abschlussbeurteilung_kurzbz]:'').']]></abschlussbeurteilung_kurzbz>
|
||||
<abschlussbeurteilung_kurzbzEng><![CDATA['.($row->abschlussbeurteilung_kurzbz!=''?$abschlussbeurteilung_arrEng[$row->abschlussbeurteilung_kurzbz]:'').']]></abschlussbeurteilung_kurzbzEng>
|
||||
<akadgrad_id><![CDATA['.$row->akadgrad_id.']]></akadgrad_id>
|
||||
<datum><![CDATA['.$datum_obj->convertISODate($row->datum).']]></datum>
|
||||
<datum_iso><![CDATA['.$row->datum.']]></datum_iso>
|
||||
<uhrzeit><![CDATA['.$row->uhrzeit.']]></uhrzeit>
|
||||
<sponsion><![CDATA['.$datum_obj->convertISODate($row->sponsion).']]></sponsion>
|
||||
<sponsion_iso><![CDATA['.$row->sponsion.']]></sponsion_iso>
|
||||
<pruefungstyp_kurzbz><![CDATA['.$row->pruefungstyp_kurzbz.']]></pruefungstyp_kurzbz>
|
||||
<pruefungstyp_beschreibung><![CDATA['.$row->beschreibung.']]></pruefungstyp_beschreibung>
|
||||
<anrede><![CDATA['.$anrede.']]></anrede>
|
||||
<anrede_engl><![CDATA['.$anrede_engl.']]></anrede_engl>
|
||||
<name><![CDATA['.$name.']]></name>
|
||||
<titelpre><![CDATA['.$student->titelpre.']]></titelpre>
|
||||
<vorname><![CDATA['.$student->vorname.']]></vorname>
|
||||
<vornamen><![CDATA['.$student->vornamen.']]></vornamen>
|
||||
<nachname><![CDATA['.$student->nachname.']]></nachname>
|
||||
<titelpost><![CDATA['.$student->titelpost.']]></titelpost>
|
||||
<matrikelnr><![CDATA['.trim($student->matrikelnr).']]></matrikelnr>
|
||||
<gebdatum_iso><![CDATA['.$student->gebdatum.']]></gebdatum_iso>
|
||||
<geschlecht><![CDATA['.$student->geschlecht.']]></geschlecht>
|
||||
<gebdatum><![CDATA['.$datum_obj->convertISODate($student->gebdatum).']]></gebdatum>
|
||||
<gebort><![CDATA['.$student->gebort.']]></gebort>
|
||||
<staatsbuergerschaft><![CDATA['.$staatsbuergerschaft.']]></staatsbuergerschaft>
|
||||
<staatsbuergerschaft_engl><![CDATA['.$staatsbuergerschaft_engl.']]></staatsbuergerschaft_engl>
|
||||
<geburtsnation><![CDATA['.$geburtsnation.']]></geburtsnation>
|
||||
<geburtsnation_engl><![CDATA['.$geburtsnation_engl.']]></geburtsnation_engl>
|
||||
<studiengang_kz><![CDATA['.$studiengang_kz.']]></studiengang_kz>
|
||||
<stg_bezeichnung><![CDATA['.$studiengang->bezeichnung.']]></stg_bezeichnung>
|
||||
<stg_bezeichnung2><![CDATA['.(isset($studiengang_bezeichnung2[1])?$studiengang_bezeichnung2[1]:'').']]></stg_bezeichnung2>
|
||||
<stg_bezeichnung_engl><![CDATA['.$studiengang->english.']]></stg_bezeichnung_engl>
|
||||
<stg_oe_parent><![CDATA['.$oe_parent.']]></stg_oe_parent>
|
||||
<stg_art><![CDATA['.$studiengang->typ.']]></stg_art>
|
||||
<akadgrad_kurzbz><![CDATA['.$akadgrad->akadgrad_kurzbz.']]></akadgrad_kurzbz>
|
||||
<titel><![CDATA['.$akadgrad->titel.']]></titel>
|
||||
<datum_aktuell><![CDATA['.date('d.m.Y').']]></datum_aktuell>
|
||||
<anmerkung><![CDATA['.$row->anmerkung.']]></anmerkung>
|
||||
<bescheidbgbl1><![CDATA['.$studiengang->bescheidbgbl1.']]></bescheidbgbl1>
|
||||
<bescheidbgbl2><![CDATA['.$studiengang->bescheidbgbl2.']]></bescheidbgbl2>
|
||||
<bescheidgz><![CDATA['.$studiengang->bescheidgz.']]></bescheidgz>
|
||||
<bescheidvom><![CDATA['.$datum_obj->convertISODate($studiengang->bescheidvom).']]></bescheidvom>
|
||||
<titelbescheidvom><![CDATA['.$datum_obj->convertISODate($studiengang->titelbescheidvom).']]></titelbescheidvom>
|
||||
<rektor><![CDATA['.$rektor.']]></rektor>
|
||||
<themenbereich><![CDATA['.$themenbereich.']]></themenbereich>
|
||||
<projekt_typ><![CDATA['.$projektarbeit->projekttyp_bezeichnung.']]></projekt_typ>
|
||||
<projekt_fach><![CDATA['.$lehrveranstaltung->bezeichnung.']]></projekt_fach>
|
||||
<projekt_titel><![CDATA['.$projektarbeit->titel.']]></projekt_titel>
|
||||
<themenbereich_2><![CDATA['.$themenbereich_2.']]></themenbereich_2>
|
||||
<betreuer><![CDATA['.$betreuer.']]></betreuer>
|
||||
<betreuer_2><![CDATA['.$betreuer_2.']]></betreuer_2>
|
||||
<note><![CDATA['.$note.']]></note>
|
||||
<note_bezeichnung><![CDATA['.$projektnote->bezeichnung.']]></note_bezeichnung>
|
||||
<note2><![CDATA['.$note2.']]></note2>
|
||||
<notekommpruef><![CDATA['.$row->note.']]></notekommpruef>
|
||||
<datum_projekt><![CDATA['.$datum_projekt.']]></datum_projekt>
|
||||
<datum_projekt2><![CDATA['.$datum_projekt.']]></datum_projekt2>
|
||||
<ort_datum><![CDATA['.date('d.m.Y').']]></ort_datum>';
|
||||
|
||||
echo "\n\t</pruefung>";
|
||||
}
|
||||
|
||||
// ----------------------------------- RDF --------------------------------------
|
||||
if ($xmlformat=='rdf')
|
||||
@@ -314,32 +334,32 @@ if ($xmlformat=='rdf')
|
||||
$pruefer3 = $person->nachname;
|
||||
|
||||
echo '
|
||||
<RDF:li>
|
||||
<RDF:Description id="'.$row->abschlusspruefung_id.'" about="'.$rdf_url.'/'.$row->abschlusspruefung_id.'" >
|
||||
<ABSCHLUSSPRUEFUNG:abschlusspruefung_id><![CDATA['.$row->abschlusspruefung_id.']]></ABSCHLUSSPRUEFUNG:abschlusspruefung_id>
|
||||
<ABSCHLUSSPRUEFUNG:student_uid><![CDATA['.$row->student_uid.']]></ABSCHLUSSPRUEFUNG:student_uid>
|
||||
<ABSCHLUSSPRUEFUNG:vorsitz><![CDATA['.$row->vorsitz.']]></ABSCHLUSSPRUEFUNG:vorsitz>
|
||||
<ABSCHLUSSPRUEFUNG:vorsitz_nachname><![CDATA['.$vorsitz.']]></ABSCHLUSSPRUEFUNG:vorsitz_nachname>
|
||||
<ABSCHLUSSPRUEFUNG:pruefer1><![CDATA['.$row->pruefer1.']]></ABSCHLUSSPRUEFUNG:pruefer1>
|
||||
<ABSCHLUSSPRUEFUNG:pruefer1_nachname><![CDATA['.$pruefer1.']]></ABSCHLUSSPRUEFUNG:pruefer1_nachname>
|
||||
<ABSCHLUSSPRUEFUNG:pruefer2><![CDATA['.$row->pruefer2.']]></ABSCHLUSSPRUEFUNG:pruefer2>
|
||||
<ABSCHLUSSPRUEFUNG:pruefer2_nachname><![CDATA['.$pruefer2.']]></ABSCHLUSSPRUEFUNG:pruefer2_nachname>
|
||||
<ABSCHLUSSPRUEFUNG:pruefer3><![CDATA['.$row->pruefer3.']]></ABSCHLUSSPRUEFUNG:pruefer3>
|
||||
<ABSCHLUSSPRUEFUNG:pruefer3_nachname><![CDATA['.$pruefer3.']]></ABSCHLUSSPRUEFUNG:pruefer3_nachname>
|
||||
<ABSCHLUSSPRUEFUNG:abschlussbeurteilung_kurzbz><![CDATA['.$row->abschlussbeurteilung_kurzbz.']]></ABSCHLUSSPRUEFUNG:abschlussbeurteilung_kurzbz>
|
||||
<ABSCHLUSSPRUEFUNG:notekommpruef><![CDATA['.$row->note.']]></ABSCHLUSSPRUEFUNG:notekommpruef>
|
||||
<ABSCHLUSSPRUEFUNG:akadgrad_id><![CDATA['.$row->akadgrad_id.']]></ABSCHLUSSPRUEFUNG:akadgrad_id>
|
||||
<ABSCHLUSSPRUEFUNG:datum><![CDATA['.$datum_obj->convertISODate($row->datum).']]></ABSCHLUSSPRUEFUNG:datum>
|
||||
<ABSCHLUSSPRUEFUNG:datum_iso><![CDATA['.$row->datum.']]></ABSCHLUSSPRUEFUNG:datum_iso>
|
||||
<ABSCHLUSSPRUEFUNG:uhrzeit><![CDATA['.$row->uhrzeit.']]></ABSCHLUSSPRUEFUNG:uhrzeit>
|
||||
<ABSCHLUSSPRUEFUNG:sponsion><![CDATA['.$datum_obj->convertISODate($row->sponsion).']]></ABSCHLUSSPRUEFUNG:sponsion>
|
||||
<ABSCHLUSSPRUEFUNG:sponsion_iso><![CDATA['.$row->sponsion.']]></ABSCHLUSSPRUEFUNG:sponsion_iso>
|
||||
<ABSCHLUSSPRUEFUNG:pruefungstyp_kurzbz><![CDATA['.$row->pruefungstyp_kurzbz.']]></ABSCHLUSSPRUEFUNG:pruefungstyp_kurzbz>
|
||||
<ABSCHLUSSPRUEFUNG:beschreibung><![CDATA['.$row->beschreibung.']]></ABSCHLUSSPRUEFUNG:beschreibung>
|
||||
<ABSCHLUSSPRUEFUNG:anmerkung><![CDATA['.$row->anmerkung.']]></ABSCHLUSSPRUEFUNG:anmerkung>
|
||||
</RDF:Description>
|
||||
</RDF:li>
|
||||
';
|
||||
<RDF:li>
|
||||
<RDF:Description id="'.$row->abschlusspruefung_id.'" about="'.$rdf_url.'/'.$row->abschlusspruefung_id.'" >
|
||||
<ABSCHLUSSPRUEFUNG:abschlusspruefung_id><![CDATA['.$row->abschlusspruefung_id.']]></ABSCHLUSSPRUEFUNG:abschlusspruefung_id>
|
||||
<ABSCHLUSSPRUEFUNG:student_uid><![CDATA['.$row->student_uid.']]></ABSCHLUSSPRUEFUNG:student_uid>
|
||||
<ABSCHLUSSPRUEFUNG:vorsitz><![CDATA['.$row->vorsitz.']]></ABSCHLUSSPRUEFUNG:vorsitz>
|
||||
<ABSCHLUSSPRUEFUNG:vorsitz_nachname><![CDATA['.$vorsitz.']]></ABSCHLUSSPRUEFUNG:vorsitz_nachname>
|
||||
<ABSCHLUSSPRUEFUNG:pruefer1><![CDATA['.$row->pruefer1.']]></ABSCHLUSSPRUEFUNG:pruefer1>
|
||||
<ABSCHLUSSPRUEFUNG:pruefer1_nachname><![CDATA['.$pruefer1.']]></ABSCHLUSSPRUEFUNG:pruefer1_nachname>
|
||||
<ABSCHLUSSPRUEFUNG:pruefer2><![CDATA['.$row->pruefer2.']]></ABSCHLUSSPRUEFUNG:pruefer2>
|
||||
<ABSCHLUSSPRUEFUNG:pruefer2_nachname><![CDATA['.$pruefer2.']]></ABSCHLUSSPRUEFUNG:pruefer2_nachname>
|
||||
<ABSCHLUSSPRUEFUNG:pruefer3><![CDATA['.$row->pruefer3.']]></ABSCHLUSSPRUEFUNG:pruefer3>
|
||||
<ABSCHLUSSPRUEFUNG:pruefer3_nachname><![CDATA['.$pruefer3.']]></ABSCHLUSSPRUEFUNG:pruefer3_nachname>
|
||||
<ABSCHLUSSPRUEFUNG:abschlussbeurteilung_kurzbz><![CDATA['.$row->abschlussbeurteilung_kurzbz.']]></ABSCHLUSSPRUEFUNG:abschlussbeurteilung_kurzbz>
|
||||
<ABSCHLUSSPRUEFUNG:notekommpruef><![CDATA['.$row->note.']]></ABSCHLUSSPRUEFUNG:notekommpruef>
|
||||
<ABSCHLUSSPRUEFUNG:akadgrad_id><![CDATA['.$row->akadgrad_id.']]></ABSCHLUSSPRUEFUNG:akadgrad_id>
|
||||
<ABSCHLUSSPRUEFUNG:datum><![CDATA['.$datum_obj->convertISODate($row->datum).']]></ABSCHLUSSPRUEFUNG:datum>
|
||||
<ABSCHLUSSPRUEFUNG:datum_iso><![CDATA['.$row->datum.']]></ABSCHLUSSPRUEFUNG:datum_iso>
|
||||
<ABSCHLUSSPRUEFUNG:uhrzeit><![CDATA['.$row->uhrzeit.']]></ABSCHLUSSPRUEFUNG:uhrzeit>
|
||||
<ABSCHLUSSPRUEFUNG:sponsion><![CDATA['.$datum_obj->convertISODate($row->sponsion).']]></ABSCHLUSSPRUEFUNG:sponsion>
|
||||
<ABSCHLUSSPRUEFUNG:sponsion_iso><![CDATA['.$row->sponsion.']]></ABSCHLUSSPRUEFUNG:sponsion_iso>
|
||||
<ABSCHLUSSPRUEFUNG:pruefungstyp_kurzbz><![CDATA['.$row->pruefungstyp_kurzbz.']]></ABSCHLUSSPRUEFUNG:pruefungstyp_kurzbz>
|
||||
<ABSCHLUSSPRUEFUNG:beschreibung><![CDATA['.$row->beschreibung.']]></ABSCHLUSSPRUEFUNG:beschreibung>
|
||||
<ABSCHLUSSPRUEFUNG:anmerkung><![CDATA['.$row->anmerkung.']]></ABSCHLUSSPRUEFUNG:anmerkung>
|
||||
</RDF:Description>
|
||||
</RDF:li>
|
||||
';
|
||||
}
|
||||
echo '
|
||||
<RDF:RDF
|
||||
@@ -347,7 +367,7 @@ if ($xmlformat=='rdf')
|
||||
xmlns:ABSCHLUSSPRUEFUNG="'.$rdf_url.'/rdf#"
|
||||
>
|
||||
|
||||
<RDF:Seq about="'.$rdf_url.'/liste">
|
||||
<RDF:Seq about="'.$rdf_url.'/liste">
|
||||
';
|
||||
|
||||
if(isset($_GET['student_uid']))
|
||||
@@ -370,7 +390,7 @@ if ($xmlformat=='rdf')
|
||||
|
||||
echo ' </RDF:Seq>';
|
||||
echo '</RDF:RDF>';
|
||||
} //endof xmlformat==rdf
|
||||
}
|
||||
// ----------------------------------- XML --------------------------------------
|
||||
elseif ($xmlformat=='xml')
|
||||
{
|
||||
@@ -412,5 +432,5 @@ elseif ($xmlformat=='xml')
|
||||
die('Student_uid oder Abschlusspruefung_id muss uebergeben werden');
|
||||
|
||||
echo "\n</abschlusspruefung>";
|
||||
} //endof xmlformat==xml
|
||||
}
|
||||
?>
|
||||
|
||||
@@ -47,6 +47,7 @@ echo '
|
||||
';
|
||||
$uid = (isset($_GET['uid'])?$_GET['uid']:'');
|
||||
$benutzerfunktion_id = (isset($_GET['benutzerfunktion_id'])?$_GET['benutzerfunktion_id']:'');
|
||||
$filter = (isset($_GET['filter'])?$_GET['filter']:'');
|
||||
$stg_arr = array();
|
||||
$fkt_arr = array();
|
||||
$datum_obj = new datum();
|
||||
@@ -60,7 +61,10 @@ $db = new basis_db();
|
||||
|
||||
if($uid!='')
|
||||
{
|
||||
$qry = "SELECT * FROM public.tbl_benutzerfunktion WHERE uid=".$db->db_add_param($uid)." ORDER BY funktion_kurzbz";
|
||||
$qry = "SELECT * FROM public.tbl_benutzerfunktion WHERE uid=".$db->db_add_param($uid);
|
||||
if($filter == 'offene')
|
||||
$qry .= " AND (datum_bis>=now() OR datum_bis is null)";
|
||||
$qry.=" ORDER BY funktion_kurzbz";
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 1.1 MiB |
Binary file not shown.
|
After Width: | Height: | Size: 800 KiB |
Binary file not shown.
Binary file not shown.
|
After Width: | Height: | Size: 640 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 602 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 619 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 642 KiB |
@@ -0,0 +1,245 @@
|
||||
<?php
|
||||
/* Copyright (C) 2018 fhcomplete.org
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
|
||||
*
|
||||
* Authors: Andreas Oesterreicher <andreas.oesterreicher@technikum-wien.at>,
|
||||
*/
|
||||
/**
|
||||
* Testclient fuer Abfrage der REST Webservice Schnittstelle des Datenverbundes
|
||||
*/
|
||||
require_once('../config/vilesci.config.inc.php');
|
||||
require_once('../include/functions.inc.php');
|
||||
require_once('../include/basis_db.class.php');
|
||||
require_once('../include/benutzerberechtigung.class.php');
|
||||
require_once('../include/dvb.class.php');
|
||||
|
||||
$uid = get_uid();
|
||||
$rechte = new benutzerberechtigung();
|
||||
$rechte->getBerechtigungen($uid);
|
||||
if (!$rechte->isBerechtigt('admin'))
|
||||
die($rechte->errormsg);
|
||||
|
||||
$db = new basis_db();
|
||||
|
||||
if (isset($_GET['action']))
|
||||
$action = $_GET['action'];
|
||||
else
|
||||
$action = 'getBySvnr';
|
||||
|
||||
$username = filter_input(INPUT_POST, 'username');
|
||||
$password = filter_input(INPUT_POST, 'password');
|
||||
$bildungseinrichtung = filter_input(INPUT_POST, 'bildungseinrichtung');
|
||||
$studienjahr = filter_input(INPUT_POST, 'studienjahr');
|
||||
$matrikelnr = filter_input(INPUT_POST, 'matrikelnummer');
|
||||
$nachname = filter_input(INPUT_POST, 'nachname');
|
||||
$vorname = filter_input(INPUT_POST, 'vorname');
|
||||
$geburtsdatum = filter_input(INPUT_POST, 'geburtsdatum');
|
||||
$geschlecht = filter_input(INPUT_POST, 'geschlecht');
|
||||
$postleitzahl = filter_input(INPUT_POST, 'postleitzahl');
|
||||
$staat = filter_input(INPUT_POST, 'staat');
|
||||
$matura = filter_input(INPUT_POST, 'matura');
|
||||
$svnr = filter_input(INPUT_POST, 'svnr');
|
||||
$ersatzkennzeichen = filter_input(INPUT_POST, 'ersatzkennzeichen');
|
||||
|
||||
?><!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8"/>
|
||||
<title>Datenverbund-Client</title>
|
||||
</head>
|
||||
<body>
|
||||
<h1>Testclient für Datenverbund-Webservice</h1>
|
||||
<ul>
|
||||
<li><a href="datenverbund_client.php?action=getOAuth">OAuth Token anfordern</a></li>
|
||||
<li><a href="datenverbund_client.php?action=getBySvnr">Matrikelnummer nach SVNR suchen</a></li>
|
||||
<li>
|
||||
<a href="datenverbund_client.php?action=getByErsatzkennzeichen">
|
||||
Matrikelnummer nach Ersatzkennzeichen suchen
|
||||
</a>
|
||||
</li>
|
||||
<li><a href="datenverbund_client.php?action=getReservations">Matrikelnummer Reservierungen anzeigen</a></li>
|
||||
<li><a href="datenverbund_client.php?action=getKontingent">Matrikelnummer Kontingent anfordern</a></li>
|
||||
<li><a href="datenverbund_client.php?action=setMatrikelnummer">Matrikelnummer Vergabe melden</a></li>
|
||||
</ul>
|
||||
<br><br>
|
||||
<form action="<?php echo $_SERVER['PHP_SELF'].'?action='.$action; ?>" method="post">
|
||||
<table border="0" cellpadding="5" cellspacing="0" bgcolor="#E0E0E0">
|
||||
<?php
|
||||
/**
|
||||
* Erstellt eine Tabllezeile mit Input-Feld
|
||||
* @param string $name Name des Inputs.
|
||||
* @param string $title Titel der Zeile.
|
||||
* @param string $value Value des Inputs.
|
||||
* @param string $hint Hinweistext zu Inputfeld.
|
||||
* @param int $maxlength Maximallaenge des Eingabefeldes.
|
||||
* @return void
|
||||
*/
|
||||
function printrow($name, $title, $value, $hint = '', $maxlength = 15)
|
||||
{
|
||||
global $db;
|
||||
|
||||
echo '
|
||||
<tr>
|
||||
<td align="right">'.$title.':</td>
|
||||
<td>
|
||||
<input name="'.$name.'" type="text" size="30" maxlength="'.$maxlength.'"
|
||||
value="'.$db->convert_html_chars($value).'"> '.$hint.'
|
||||
</td>
|
||||
</tr>';
|
||||
}
|
||||
|
||||
printrow('username', 'Username', $username, '', 100);
|
||||
printrow('password', 'Passwort', $password, '', 100);
|
||||
|
||||
switch($action)
|
||||
{
|
||||
case 'getOAuth':
|
||||
break;
|
||||
|
||||
case 'getBySvnr':
|
||||
printrow('svnr', 'SVNR', $svnr);
|
||||
break;
|
||||
|
||||
case 'getByErsatzkennzeichen':
|
||||
printrow('ersatzkennzeichen', 'Ersatzkennzeichen', $ersatzkennzeichen);
|
||||
break;
|
||||
|
||||
case 'getReservations':
|
||||
case 'getKontingent':
|
||||
printrow(
|
||||
'bildungseinrichtung',
|
||||
'Bildungseinrichtung',
|
||||
$bildungseinrichtung,
|
||||
'Kurzzeichen der Bildungseinrichtung'
|
||||
);
|
||||
printrow('studienjahr', 'Studienjahr', $studienjahr, 'zB 2016 (für WS2016 und SS2017)', 4);
|
||||
break;
|
||||
|
||||
case 'setMatrikelnummer':
|
||||
printrow(
|
||||
'bildungseinrichtung',
|
||||
'Bildungseinrichtung',
|
||||
$bildungseinrichtung,
|
||||
'Kurzzeichen der Bildungseinrichtung'
|
||||
);
|
||||
printrow('matrikelnummer', 'Matrikelnummer', $matrikelnr);
|
||||
printrow('nachname', 'Nachname', $nachname, '', 255);
|
||||
printrow('vorname', 'Vorname', $vorname, '', 30);
|
||||
printrow('geburtsdatum', 'Geburtsdatum', $geburtsdatum, 'Format: YYYYMMDD', 10);
|
||||
printrow('geschlecht', 'Geschlecht', $geschlecht, 'Format: M | W', 1);
|
||||
printrow('postleitzahl', 'Postleitzahl', $postleitzahl, '', 10);
|
||||
printrow('staat', 'Staat', $staat, '1-3 Stellen Codex (zb A für Österreich)', 3);
|
||||
printrow('svnr', 'SVNR', $staat);
|
||||
printrow('matura', 'Maturadatum', $matura, 'Format: YYYYMMDD (optional)', 10);
|
||||
break;
|
||||
|
||||
default:
|
||||
echo "Unknown action";
|
||||
break;
|
||||
}
|
||||
|
||||
echo '
|
||||
<tr>
|
||||
<td align="right">Debug</td>
|
||||
<td><input name="debug" type="checkbox" '.(isset($_POST['debug'])?'checked="checked"':'').' /></td>
|
||||
</tr>';
|
||||
?>
|
||||
|
||||
<tr>
|
||||
<td align="right"></td>
|
||||
<td>
|
||||
<input type="submit" value=" Absenden " name="submit">
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
<?php
|
||||
|
||||
if (isset($_REQUEST['submit']))
|
||||
{
|
||||
$dvb = new dvb($username, $password, isset($_POST['debug']));
|
||||
switch ($action)
|
||||
{
|
||||
case 'getOAuth':
|
||||
if ($dvb->authenticate())
|
||||
echo '<br><b>OAuth Bearer Token:</b> '.$dvb->authentication->access_token;
|
||||
else
|
||||
echo '<br><b>Failed:</b> '.$dvb->errormsg;
|
||||
break;
|
||||
|
||||
case 'getBySvnr':
|
||||
$matrikelnr = $dvb->getMatrikelnrBySVNR($_POST['svnr']);
|
||||
if ($matrikelnr !== false)
|
||||
echo '<br><b>Matrikelnummer vorhanden:</b>'.$matrikelnr;
|
||||
else
|
||||
echo '<br><b>Matrikelnummer nicht vorhanden:</b>'.$dvb->errormsg;
|
||||
break;
|
||||
|
||||
case 'getByErsatzkennzeichen':
|
||||
$matrikelnr = $dvb->getMatrikelnrByErsatzkennzeichen($_POST['ersatzkennzeichen']);
|
||||
if ($matrikelnr !== false)
|
||||
echo '<br><b>Matrikelnummer vorhanden:</b>'.$matrikelnr;
|
||||
else
|
||||
echo '<br><b>Matrikelnummer nicht vorhanden:</b>'.$dvb->errormsg;
|
||||
break;
|
||||
|
||||
case 'getReservations':
|
||||
$reservierteNummern = $dvb->getReservations($_POST['bildungseinrichtung'], $_POST['studienjahr']);
|
||||
|
||||
if ($reservierteNummern !== false)
|
||||
echo '<br><b>Reservierte Nummern:</b>'.print_r($reservierteNummern, true);
|
||||
else
|
||||
echo '<br><b>Fehlgeschlagen:</b>'.$dvb->errormsg;
|
||||
break;
|
||||
|
||||
case 'getKontingent':
|
||||
$kontingent = $dvb->getKontingent($_POST['bildungseinrichtung'], $_POST['studienjahr']);
|
||||
|
||||
if ($kontingent !== false)
|
||||
echo '<br><b>Kontingent:</b>'.print_r($kontingent, true);
|
||||
else
|
||||
echo '<br><b>Fehlgeschlagen:</b>'.$dvb->errormsg;
|
||||
break;
|
||||
|
||||
case 'setMatrikelnummer':
|
||||
$person = new stdClass();
|
||||
$person->matrikelnummer = $matrikelnummer;
|
||||
$person->vorname = $vorname;
|
||||
$person->nachname = $nachname;
|
||||
$person->geburtsdatum = $geburtsdatum;
|
||||
$person->geschlecht = $geschlecht;
|
||||
$person->staat = $staat;
|
||||
$person->plz = $postleitzahl;
|
||||
$person->matura = $matura; // Optional
|
||||
$person->svnr = $svnr; // Optional
|
||||
|
||||
if ($dvb->setMatrikelnummer($_POST['bildungseinrichtung'], $person))
|
||||
echo '<br><b>Erfolgreich gemeldet</b>';
|
||||
else
|
||||
echo '<br><b>Fehlgeschlagen:</b>'.$dvb->errormsg;
|
||||
break;
|
||||
|
||||
default:
|
||||
echo "Unknown action";
|
||||
break;
|
||||
}
|
||||
if (isset($_POST['debug']))
|
||||
echo '<div style="color: gray">'.$dvb->debug_output.'</div>';
|
||||
}
|
||||
|
||||
?>
|
||||
</body>
|
||||
</html>
|
||||
+3
-2
@@ -8,13 +8,14 @@
|
||||
<li><a href="soap_test_ort.php">Ort / Raum</a></li>
|
||||
<li><a href="soap_test_student.php">Studierendendaten</a></li>
|
||||
<li><a href="soap_test_lvplan.php">LV-Plan</a></li>
|
||||
<li><a href="soap_test_person.php">Personen</a></li>
|
||||
<li><a href="soap_test_person.php">Personen</a></li>
|
||||
</ul>
|
||||
<h2>Sonstiges</h2>
|
||||
<ul>
|
||||
<li><a href="test_client.php">Soap Test Client</a></li>
|
||||
<li><a href="stip_client.php">STIP Schnittstelle</a></li>
|
||||
<li><a href="semesterticket_client.php">Semesterticket Wiener Linien</a></li>
|
||||
<li><a href="datenverbund_client.php">Datenverbund - Matrikelnummer</a></li>
|
||||
</ul>
|
||||
<ul>
|
||||
<li>Projekte</li>
|
||||
@@ -23,4 +24,4 @@
|
||||
<li>Ressource</li>
|
||||
</ul>
|
||||
</body>
|
||||
</html>
|
||||
</html>
|
||||
|
||||
@@ -73,6 +73,16 @@ echo '<div>';
|
||||
require_once('phrasesupdate.php');
|
||||
echo '</div>';
|
||||
|
||||
// ******** filtersupdate ************/
|
||||
echo '<H2>Filters time!</H2>';
|
||||
|
||||
echo '<div>';
|
||||
echo 'filtersupdate.php wird aufgerufen...';
|
||||
echo '</div>';
|
||||
echo '<div>';
|
||||
require_once('filtersupdate.php');
|
||||
echo '</div>';
|
||||
|
||||
|
||||
// ******** Berechtigungen Prüfen ************/
|
||||
echo '<h2>Berechtigungen pruefen</h2>';
|
||||
|
||||
+30
-84
@@ -1878,89 +1878,6 @@ if($result = $db->db_query("SELECT obj_description('public.ci_apikey'::regclass)
|
||||
}
|
||||
}
|
||||
|
||||
if($result = @$db->db_query("SELECT * FROM system.tbl_filters WHERE filter_kurzbz='InfoCenterSentApplicationAll' AND app='infocenter'"))
|
||||
{
|
||||
if($db->db_num_rows($result)==0)
|
||||
{
|
||||
$qry = "INSERT INTO system.tbl_filters(app, dataset_name, filter_kurzbz, person_id, description, sort,
|
||||
default_filter, filter, oe_kurzbz)
|
||||
VALUES ('infocenter', 'PersonActions', 'InfoCenterSentApplicationAll', NULL, '{Alle}', 1, false,
|
||||
'{\"name\": \"Abgeschickt - Alle\", \"columns\": [{\"name\": \"Vorname\"},
|
||||
{\"name\": \"Nachname\"}, {\"name\": \"LastAction\"}, {\"name\": \"LockUser\"},
|
||||
{\"name\": \"Studiensemester\"}, {\"name\": \"SendDate\"}, {\"name\": \"StgAbgeschickt\"}],
|
||||
\"filters\": [{\"name\": \"AnzahlAbgeschickt\", \"option\": \"\",
|
||||
\"condition\": \"0\", \"operation\": \"gt\"}]}', NULL);";
|
||||
if(!$db->db_query($qry))
|
||||
echo '<strong>Filter: '.$db->db_last_error().'</strong><br>';
|
||||
else
|
||||
echo '<br>Filter InfoCenterSentApplicationAll hinzugefuegt';
|
||||
}
|
||||
}
|
||||
|
||||
if($result = @$db->db_query("SELECT * FROM system.tbl_filters WHERE filter_kurzbz='InfoCenterSentApplication3days' AND app='infocenter'"))
|
||||
{
|
||||
if($db->db_num_rows($result)==0)
|
||||
{
|
||||
$qry = "INSERT INTO system.tbl_filters(app, dataset_name, filter_kurzbz, person_id, description, sort,
|
||||
default_filter, filter, oe_kurzbz)
|
||||
VALUES ('infocenter', 'PersonActions', 'InfoCenterSentApplication3days', NULL,
|
||||
'{\"3 Tage keine Aktion\"}', 2, false, '{\"name\": \"Abgeschickt - 3 Tage keine Aktion\",
|
||||
\"columns\": [{\"name\": \"Vorname\"}, {\"name\": \"Nachname\"}, {\"name\": \"LastAction\"},
|
||||
{\"name\": \"LockUser\"}, {\"name\": \"Studiensemester\"}, {\"name\": \"SendDate\"},
|
||||
{\"name\": \"StgAbgeschickt\"}],
|
||||
\"filters\": [{\"name\": \"LastAction\", \"option\": \"days\", \"condition\": \"3\",
|
||||
\"operation\": \"gt\"}, {\"name\": \"AnzahlAbgeschickt\", \"option\": \"\",
|
||||
\"condition\": \"0\", \"operation\": \"gt\"}]}', NULL);";
|
||||
|
||||
if(!$db->db_query($qry))
|
||||
echo '<strong>Filter: '.$db->db_last_error().'</strong><br>';
|
||||
else
|
||||
echo '<br>Filter InfoCenterSentApplication3days hinzugefuegt';
|
||||
}
|
||||
}
|
||||
|
||||
if($result = @$db->db_query("SELECT * FROM system.tbl_filters WHERE filter_kurzbz='InfoCenterNotSentApplicationAll' AND app='infocenter'"))
|
||||
{
|
||||
if($db->db_num_rows($result)==0)
|
||||
{
|
||||
$qry = "INSERT INTO system.tbl_filters(app, dataset_name, filter_kurzbz, person_id, description, sort,
|
||||
default_filter, filter, oe_kurzbz)
|
||||
VALUES ('infocenter', 'PersonActions', 'InfoCenterNotSentApplicationAll', NULL, '{Alle}', 1, false,
|
||||
'{\"name\": \"Nicht abgeschickt - Alle\", \"columns\": [{\"name\": \"Vorname\"},
|
||||
{\"name\": \"Nachname\"}, {\"name\": \"LastAction\"}, {\"name\": \"LockUser\"},
|
||||
{\"name\": \"Studiensemester\"}, {\"name\": \"SendDate\"}, {\"name\": \"StgAbgeschickt\"}],
|
||||
\"filters\": [{\"name\": \"SendDate\", \"option\": \"\",
|
||||
\"condition\": \"\", \"operation\": \"nset\"}]}', NULL);";
|
||||
|
||||
if(!$db->db_query($qry))
|
||||
echo '<strong>Filter: '.$db->db_last_error().'</strong><br>';
|
||||
else
|
||||
echo '<br>Filter InfoCenterNotSentApplicationAll hinzugefuegt';
|
||||
}
|
||||
}
|
||||
|
||||
if($result = @$db->db_query("SELECT * FROM system.tbl_filters WHERE filter_kurzbz='InfoCenterNotSentApplication14Days' AND app='infocenter'"))
|
||||
{
|
||||
if($db->db_num_rows($result)==0)
|
||||
{
|
||||
$qry = "INSERT INTO system.tbl_filters(app, dataset_name, filter_kurzbz, person_id, description, sort,
|
||||
default_filter, filter, oe_kurzbz)
|
||||
VALUES ('infocenter', 'PersonActions', 'InfoCenterNotSentApplication14Days', NULL,
|
||||
'{\"14 Tage keine Aktion\"}', 2, false, '{\"name\": \"Nicht abgeschickt - 14 Tage keine Aktion\",
|
||||
\"columns\": [{\"name\": \"Vorname\"}, {\"name\": \"Nachname\"}, {\"name\": \"LastAction\"},
|
||||
{\"name\": \"LockUser\"}, {\"name\": \"Studiensemester\"}, {\"name\": \"SendDate\"},
|
||||
{\"name\": \"StgAbgeschickt\"}], \"filters\": [{\"name\": \"LastAction\", \"option\": \"days\",
|
||||
\"condition\": \"14\", \"operation\": \"gt\"}, {\"name\": \"SendDate\", \"option\": \"\",
|
||||
\"condition\": \"\", \"operation\": \"nset\"}]}', NULL);
|
||||
";
|
||||
|
||||
if(!$db->db_query($qry))
|
||||
echo '<strong>Filter: '.$db->db_last_error().'</strong><br>';
|
||||
else
|
||||
echo '<br>Filter InfoCenterNotSentApplication14Days hinzugefuegt';
|
||||
}
|
||||
}
|
||||
|
||||
if (!$result = @$db->db_query("SELECT projekt_id FROM fue.tbl_projekt LIMIT 1"))
|
||||
{
|
||||
$qry = "CREATE SEQUENCE fue.tbl_projekt_projekt_id_seq
|
||||
@@ -2267,7 +2184,7 @@ if($result = @$db->db_query("SELECT * FROM information_schema.role_table_grants
|
||||
if($db->db_num_rows($result)==0)
|
||||
{
|
||||
$qry = "GRANT DELETE ON system.tbl_log TO web;";
|
||||
|
||||
|
||||
if(!$db->db_query($qry))
|
||||
echo '<strong>Permission Log: '.$db->db_last_error().'</strong><br>';
|
||||
else
|
||||
@@ -2275,6 +2192,35 @@ if($result = @$db->db_query("SELECT * FROM information_schema.role_table_grants
|
||||
}
|
||||
}
|
||||
|
||||
// Add missing Foreign Key to public.tbl_rt_person.person_id
|
||||
if ($result = @$db->db_query("SELECT conname FROM pg_constraint WHERE conname = 'fk_tbl_rt_person_person_id'"))
|
||||
{
|
||||
if ($db->db_num_rows($result) == 0)
|
||||
{
|
||||
$qry = "SELECT person_id FROM public.tbl_rt_person WHERE NOT EXISTS(SELECT 1 FROM public.tbl_person WHERE person_id=tbl_rt_person.person_id)";
|
||||
if($result = $db->db_query($qry))
|
||||
{
|
||||
if($db->db_num_rows($result)==0)
|
||||
{
|
||||
$qry = "ALTER TABLE public.tbl_rt_person ADD CONSTRAINT fk_tbl_rt_person_person_id FOREIGN KEY (person_id) REFERENCES public.tbl_person ON DELETE RESTRICT ON UPDATE CASCADE;";
|
||||
|
||||
if (!$db->db_query($qry))
|
||||
echo '<strong>public.tbl_rt_person '.$db->db_last_error().'</strong><br>';
|
||||
else
|
||||
echo '<br>public.tbl_rt_person: added foreign key on column person_id';
|
||||
}
|
||||
else
|
||||
{
|
||||
echo '<strong>public.tbl_rt_person:
|
||||
Fehlender Foreign Key auf person_id kann nicht erstellt werden!
|
||||
In der Tabelle public.tbl_rt_person wird auf Personen verlinkt die nicht mehr in der Tabelle
|
||||
public.tbl_person vorhanden sind. Bitte bereinigen Sie die Datensätze manuell und starten Sie dieses Script erneut.
|
||||
</strong>';
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// *** Pruefung und hinzufuegen der neuen Attribute und Tabellen
|
||||
echo '<H2>Pruefe Tabellen und Attribute!</H2>';
|
||||
|
||||
|
||||
@@ -0,0 +1,390 @@
|
||||
<?php
|
||||
/**
|
||||
* Copyright (C) 2013 FH 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
|
||||
* published by the Free Software Foundation; either version 2 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
// Array of filters to be added or updated in the database
|
||||
$filters = array(
|
||||
array(
|
||||
'app' => 'infocenter',
|
||||
'dataset_name' => 'PersonActions',
|
||||
'filter_kurzbz' => 'InfoCenterSentApplicationAll',
|
||||
'description' => '{Alle}',
|
||||
'sort' => 1,
|
||||
'default_filter' => false,
|
||||
'filter' => '
|
||||
{
|
||||
"name": "Abgeschickt - Alle",
|
||||
"columns": [
|
||||
{"name": "Vorname"},
|
||||
{"name": "Nachname"},
|
||||
{"name": "Nation"},
|
||||
{"name": "StgAbgeschickt"},
|
||||
{"name": "LastAction"},
|
||||
{"name": "User/Operator"},
|
||||
{"name": "LockUser"}
|
||||
],
|
||||
"filters": [
|
||||
{
|
||||
"name": "AnzahlAbgeschickt",
|
||||
"option": "",
|
||||
"condition": "0",
|
||||
"operation": "gt"
|
||||
}
|
||||
]
|
||||
}
|
||||
',
|
||||
'oe_kurzbz' => null,
|
||||
),
|
||||
array(
|
||||
'app' => 'infocenter',
|
||||
'dataset_name' => 'PersonActions',
|
||||
'filter_kurzbz' => 'InfoCenterSentApplication3days',
|
||||
'description' => '{"3 Tage keine Aktion"}',
|
||||
'sort' => 2,
|
||||
'default_filter' => false,
|
||||
'filter' => '
|
||||
{
|
||||
"name": "Abgeschickt - 3 Tage keine Aktion",
|
||||
"columns": [
|
||||
{"name": "Vorname"},
|
||||
{"name": "Nachname"},
|
||||
{"name": "Nation"},
|
||||
{"name": "StgAbgeschickt"},
|
||||
{"name": "LastAction"},
|
||||
{"name": "User/Operator"},
|
||||
{"name": "LockUser"}
|
||||
],
|
||||
"filters": [
|
||||
{
|
||||
"name": "LastAction",
|
||||
"option": "days",
|
||||
"condition": "3",
|
||||
"operation": "gt"
|
||||
},
|
||||
{
|
||||
"name": "AnzahlAbgeschickt",
|
||||
"option": "",
|
||||
"condition": "0",
|
||||
"operation": "gt"
|
||||
}
|
||||
]
|
||||
}
|
||||
',
|
||||
'oe_kurzbz' => null,
|
||||
),
|
||||
array(
|
||||
'app' => 'infocenter',
|
||||
'dataset_name' => 'PersonActions',
|
||||
'filter_kurzbz' => 'InfoCenterNotSentApplicationAll',
|
||||
'description' => '{Alle}',
|
||||
'sort' => 1,
|
||||
'default_filter' => false,
|
||||
'filter' => '
|
||||
{
|
||||
"name": "Nicht abgeschickt - Alle",
|
||||
"columns": [
|
||||
{"name": "Vorname"},
|
||||
{"name": "Nachname"},
|
||||
{"name": "Nation"},
|
||||
{"name": "LastAction"},
|
||||
{"name": "User/Operator"},
|
||||
{"name": "LockUser"
|
||||
},
|
||||
{"name": "StgNichtAbgeschickt"},
|
||||
{"name": "StgAbgeschickt"},
|
||||
{"name": "StgAktiv"},
|
||||
{"name": "Studiensemester"}
|
||||
],
|
||||
"filters": [
|
||||
{
|
||||
"name": "SendDate",
|
||||
"option": "",
|
||||
"condition": "",
|
||||
"operation": "nset"
|
||||
}
|
||||
]
|
||||
}
|
||||
',
|
||||
'oe_kurzbz' => null,
|
||||
),
|
||||
array(
|
||||
'app' => 'infocenter',
|
||||
'dataset_name' => 'PersonActions',
|
||||
'filter_kurzbz' => 'InfoCenterNotSentApplication14Days',
|
||||
'description' => '{"14 Tage keine Aktion"}',
|
||||
'sort' => 3,
|
||||
'default_filter' => false,
|
||||
'filter' => '
|
||||
{
|
||||
"name": "Nicht abgeschickt - 14 Tage keine Aktion",
|
||||
"columns": [
|
||||
{"name": "Vorname"},
|
||||
{"name": "Nachname"},
|
||||
{"name": "Nation"},
|
||||
{"name": "LastAction"},
|
||||
{"name": "User/Operator"},
|
||||
{"name": "LockUser"},
|
||||
{"name": "StgNichtAbgeschickt"},
|
||||
{"name": "StgAbgeschickt"},
|
||||
{"name": "StgAktiv"},
|
||||
{"name": "Studiensemester"}
|
||||
],
|
||||
"filters": [
|
||||
{
|
||||
"name": "LastAction",
|
||||
"option": "days",
|
||||
"condition": "14",
|
||||
"operation": "gt"
|
||||
},
|
||||
{
|
||||
"name": "SendDate",
|
||||
"option": "",
|
||||
"condition": "",
|
||||
"operation": "nset"
|
||||
}
|
||||
]
|
||||
}
|
||||
',
|
||||
'oe_kurzbz' => null,
|
||||
),
|
||||
array(
|
||||
'app' => 'infocenter',
|
||||
'dataset_name' => 'PersonActions',
|
||||
'filter_kurzbz' => 'InfoCenterSentApplicationLt3days',
|
||||
'description' => '{"< 3 Tage"}',
|
||||
'sort' => 3,
|
||||
'default_filter' => false,
|
||||
'filter' => '
|
||||
{
|
||||
"name": "Abgeschickt - Aktion innert der letzten 3 Tage",
|
||||
"columns": [
|
||||
{"name": "Vorname"},
|
||||
{"name": "Nachname"},
|
||||
{"name": "Nation"},
|
||||
{"name": "StgAbgeschickt"},
|
||||
{"name": "LastAction"},
|
||||
{"name": "User/Operator"},
|
||||
{"name": "LockUser"}
|
||||
],
|
||||
"filters": [
|
||||
{
|
||||
"name": "LastAction",
|
||||
"option": "days",
|
||||
"condition": "3",
|
||||
"operation": "lt"
|
||||
},
|
||||
{
|
||||
"name": "AnzahlAbgeschickt",
|
||||
"option": "",
|
||||
"condition": "0",
|
||||
"operation": "gt"
|
||||
}
|
||||
]
|
||||
}
|
||||
',
|
||||
'oe_kurzbz' => null,
|
||||
),
|
||||
array(
|
||||
'app' => 'infocenter',
|
||||
'dataset_name' => 'PersonActions',
|
||||
'filter_kurzbz' => 'InfoCenterNotSentApplication5DaysOnline',
|
||||
'description' => '{"5 Tage keine BewAktion"}',
|
||||
'sort' => 2,
|
||||
'default_filter' => false,
|
||||
'filter' => '
|
||||
{
|
||||
"name": "Nicht abgeschickt - 5 Tage keine Aktion durch BewerberIn",
|
||||
"columns": [
|
||||
{"name": "Vorname"},
|
||||
{"name": "Nachname"},
|
||||
{"name": "Nation"},
|
||||
{"name": "LastAction"},
|
||||
{"name": "User/Operator"},
|
||||
{"name": "LockUser"},
|
||||
{"name": "StgNichtAbgeschickt"},
|
||||
{"name": "StgAbgeschickt"},
|
||||
{"name": "StgAktiv"},
|
||||
{"name": "Studiensemester"}
|
||||
],
|
||||
"filters": [
|
||||
{
|
||||
"name": "SendDate",
|
||||
"option": "",
|
||||
"condition": "",
|
||||
"operation": "nset"
|
||||
},
|
||||
{
|
||||
"name": "LastAction",
|
||||
"option": "days",
|
||||
"condition": "5",
|
||||
"operation": "gt"
|
||||
},
|
||||
{
|
||||
"name": "User/Operator",
|
||||
"option": "",
|
||||
"condition": "online",
|
||||
"operation": "contains"
|
||||
}
|
||||
]
|
||||
}
|
||||
',
|
||||
'oe_kurzbz' => null,
|
||||
),
|
||||
array(
|
||||
'app' => 'infocenter',
|
||||
'dataset_name' => 'PersonActions',
|
||||
'filter_kurzbz' => 'InfoCenterFreigegeben5days',
|
||||
'description' => '{"5 Tage Letzte Aktion"}',
|
||||
'sort' => 1,
|
||||
'default_filter' => true,
|
||||
'filter' => '
|
||||
{
|
||||
"name": "Freigegeben - 5 Tage Letzte Aktion",
|
||||
"columns": [
|
||||
{"name": "Vorname"},
|
||||
{"name": "Nachname"},
|
||||
{"name": "StgAbgeschickt"},
|
||||
{"name": "LastAction"},
|
||||
{"name": "User/Operator"},
|
||||
{"name": "LockUser"}
|
||||
],
|
||||
"filters": [
|
||||
{
|
||||
"name": "LastAction",
|
||||
"option": "days",
|
||||
"condition": "5",
|
||||
"operation": "lt"
|
||||
}
|
||||
]
|
||||
}
|
||||
',
|
||||
'oe_kurzbz' => null,
|
||||
),
|
||||
array(
|
||||
'app' => 'infocenter',
|
||||
'dataset_name' => 'PersonActions',
|
||||
'filter_kurzbz' => 'InfoCenterFreigegebenAlle',
|
||||
'description' => '{Alle}',
|
||||
'sort' => 2,
|
||||
'default_filter' => false,
|
||||
'filter' => '
|
||||
{
|
||||
"name": "Freigegeben - Alle",
|
||||
"columns": [
|
||||
{"name": "Vorname"},
|
||||
{"name": "Nachname"},
|
||||
{"name": "StgAbgeschickt"},
|
||||
{"name": "LastAction"},
|
||||
{"name": "User/Operator"},
|
||||
{"name": "LockUser"}
|
||||
],
|
||||
"filters": []
|
||||
}
|
||||
',
|
||||
'oe_kurzbz' => null,
|
||||
)
|
||||
);
|
||||
|
||||
// Loop through the filters array
|
||||
for ($filtersCounter = 0; $filtersCounter < count($filters); $filtersCounter++)
|
||||
{
|
||||
$filter = $filters[$filtersCounter]; // single filter definition
|
||||
|
||||
// If it's an array and contains the required number of elements
|
||||
// and contains the required fields
|
||||
if (is_array($filter) && count($filter) == 8
|
||||
&& isset($filter['app']) && isset($filter['dataset_name'])
|
||||
&& isset($filter['filter_kurzbz']) && isset($filter['description'])
|
||||
&& isset($filter['filter']))
|
||||
{
|
||||
$selectFilterQuery = 'SELECT filter_id
|
||||
FROM system.tbl_filters
|
||||
WHERE app = '.$db->db_add_param($filter['app']).
|
||||
' AND dataset_name = '.$db->db_add_param($filter['dataset_name']).
|
||||
' AND filter_kurzbz = '.$db->db_add_param($filter['filter_kurzbz']);
|
||||
|
||||
// If no error occurred while loading a filter from the DB
|
||||
if ($dbFilterDefinition = @$db->db_query($selectFilterQuery))
|
||||
{
|
||||
// If NO filters were loaded: insert
|
||||
if ($db->db_num_rows($dbFilterDefinition) == 0)
|
||||
{
|
||||
$insertFilterQuery = 'INSERT INTO system.tbl_filters (
|
||||
app,
|
||||
dataset_name,
|
||||
filter_kurzbz,
|
||||
person_id,
|
||||
description,
|
||||
sort,
|
||||
default_filter,
|
||||
filter,
|
||||
oe_kurzbz
|
||||
) VALUES (
|
||||
'.$db->db_add_param($filter['app']).',
|
||||
'.$db->db_add_param($filter['dataset_name']).',
|
||||
'.$db->db_add_param($filter['filter_kurzbz']).',
|
||||
null,
|
||||
'.$db->db_add_param($filter['description']).',
|
||||
'.$db->db_add_param($filter['sort']).',
|
||||
'.$db->db_add_param($filter['default_filter']).',
|
||||
'.$db->db_add_param($filter['filter']).',
|
||||
'.$db->db_add_param($filter['oe_kurzbz']).'
|
||||
)';
|
||||
|
||||
if (!@$db->db_query($insertFilterQuery)) // checks query execution
|
||||
{
|
||||
echo '<strong>An error occurred while inserting filters: '.$db->db_last_error().'</strong><br>';
|
||||
}
|
||||
else
|
||||
{
|
||||
echo 'Filter added: '.$filter['app'].' - '.$filter['dataset_name'].' - '.$filter['filter_kurzbz'].'<br>';
|
||||
}
|
||||
}
|
||||
else // otherwise if the filter is already present in the DB: update
|
||||
{
|
||||
if ($filterDb = $db->db_fetch_object($dbFilterDefinition))
|
||||
{
|
||||
$updateFilterQuery = 'UPDATE system.tbl_filters SET
|
||||
app = '.$db->db_add_param($filter['app']).',
|
||||
dataset_name = '.$db->db_add_param($filter['dataset_name']).',
|
||||
filter_kurzbz = '.$db->db_add_param($filter['filter_kurzbz']).',
|
||||
person_id = null,
|
||||
description = '.$db->db_add_param($filter['description']).',
|
||||
sort = '.$db->db_add_param($filter['sort']).',
|
||||
default_filter = '.$db->db_add_param($filter['default_filter']).',
|
||||
filter = '.$db->db_add_param($filter['filter']).',
|
||||
oe_kurzbz = '.$db->db_add_param($filter['oe_kurzbz']).'
|
||||
WHERE filter_id = '.$db->db_add_param($filterDb->filter_id);
|
||||
|
||||
if (!@$db->db_query($updateFilterQuery)) // checks query execution
|
||||
{
|
||||
echo '<strong>An error occurred while inserting filters: '.$db->db_last_error().'</strong><br>';
|
||||
}
|
||||
else
|
||||
{
|
||||
echo 'Filter updated: '.$filter['app'].' - '.$filter['dataset_name'].' - '.$filter['filter_kurzbz'].'<br>';
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else // otherwise if errors occurred
|
||||
{
|
||||
echo '<strong>An error occurred while inserting filters: '.$db->db_last_error().'</strong><br>';
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -34,7 +34,7 @@ $p = new phrasen($sprache);
|
||||
|
||||
//get all notifications
|
||||
$ampel_obj = new ampel();
|
||||
$ampel_obj->getAll();
|
||||
$ampel_obj->getAll();
|
||||
$ampel_arr = $ampel_obj->result;
|
||||
|
||||
//filter only notifications that are not expired, not before vorlaufzeit AND email is true
|
||||
@@ -56,9 +56,9 @@ foreach($ampel_arr as $ampel)
|
||||
$overdue_user_arr = array();
|
||||
|
||||
if($result = $db->db_query($qry_all_ampel_user))
|
||||
{
|
||||
{
|
||||
while($row = $db->db_fetch_object($result))
|
||||
{
|
||||
{
|
||||
$user = $row->uid;
|
||||
|
||||
//break if almost confirmed
|
||||
@@ -66,7 +66,7 @@ foreach($ampel_arr as $ampel)
|
||||
break;
|
||||
|
||||
//check if notification is new (within last week, as cronjob will run every week)
|
||||
if ($datum->DateDiff (date('Y-m-d'), $insert_date) >= -7)
|
||||
if($datum->DateDiff(date('Y-m-d'), $insert_date) >= -7)
|
||||
{
|
||||
$new = true;
|
||||
$new_user_arr[] = $user;
|
||||
@@ -77,28 +77,32 @@ foreach($ampel_arr as $ampel)
|
||||
{
|
||||
$overdue = true;
|
||||
$overdue_user_arr[] = $user;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
if ($new)
|
||||
{
|
||||
$new_ampel_user_arr[] = array(
|
||||
'ampel_id' => $ampel->ampel_id,
|
||||
'ampel_bezeichnung' => $kurzbz,
|
||||
'user' => $new_user_arr,
|
||||
'deadline' => date('d.m.Y', $deadline));
|
||||
}
|
||||
$new_ampel_user_arr[] =
|
||||
array(
|
||||
'ampel_id' => $ampel->ampel_id,
|
||||
'ampel_bezeichnung' => $kurzbz,
|
||||
'user' => $new_user_arr,
|
||||
'deadline' => date('d.m.Y', $deadline)
|
||||
);
|
||||
}
|
||||
|
||||
if ($overdue)
|
||||
{
|
||||
$overdue_ampel_user_arr[] = array(
|
||||
'ampel_id' => $ampel->ampel_id,
|
||||
'ampel_bezeichnung' => $kurzbz,
|
||||
'user' => $overdue_user_arr,
|
||||
'deadline' => date('d.m.Y', $deadline));
|
||||
$overdue_ampel_user_arr[] =
|
||||
array(
|
||||
'ampel_id' => $ampel->ampel_id,
|
||||
'ampel_bezeichnung' => $kurzbz,
|
||||
'user' => $overdue_user_arr,
|
||||
'deadline' => date('d.m.Y', $deadline)
|
||||
);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
//rearrange arrays as needed to send in eMails
|
||||
$new_ampel_user_arr = organizeAmpelnForMail($new_ampel_user_arr);
|
||||
@@ -113,29 +117,31 @@ foreach ($new_ampel_user_arr as $receiver)
|
||||
$firstName = $person->vorname;
|
||||
|
||||
//link to notifications system site
|
||||
$link = APP_ROOT . "cis/index.php?sprache=German&content_id=&menu=" . APP_ROOT . "cis/menu.php?content_id=&content=" . APP_ROOT . "cis/private/tools/ampelverwaltung.php";
|
||||
$link = APP_ROOT. "cis/index.php?sprache=German&content_id=&menu=".
|
||||
APP_ROOT. "cis/menu.php?content_id=&content=".
|
||||
APP_ROOT. "cis/private/tools/ampelverwaltung.php";
|
||||
|
||||
//eMail data
|
||||
$to = $receiver['user'] . '@' . DOMAIN;
|
||||
$from = 'noreply@'.DOMAIN;
|
||||
$to = $receiver['user']. '@'. DOMAIN;
|
||||
$from = 'noreply@'. DOMAIN;
|
||||
$subject = 'Sie haben eine neue Ampel!';
|
||||
$title = "Sie haben neue Nachrichten in Ihrem Ampelsystem!";
|
||||
$content = "<p>Hallo " . $firstName . ",</p>";
|
||||
$headerImg = "sancho_header_neue_nachrichten_in_ampelsystem.jpg";
|
||||
$content = "<p align=\"center\">Hallo ". $firstName. ",</p><br>";
|
||||
$content .= "<p>es gibt neue Ampeln für Sie:</p><br>";
|
||||
|
||||
for ($i = 0; $i < count($receiver) - 1; $i++)
|
||||
{
|
||||
$receiver[$i]['ampel_id'];
|
||||
$content .= "<p><i>NEU:</i>  <strong>" . $receiver[$i]['ampel_bezeichnung'] . "</strong></p>";
|
||||
$content .= "<p><strong>". strtoupper($receiver[$i]['ampel_bezeichnung']). "</strong></p></br>";
|
||||
}
|
||||
|
||||
$content .= "<br><p>Sie können sie jetzt gleich in Ihrem Ampelsystem bestätigen:</p>";
|
||||
$content .= "<br><a style=\"color: #74ba24;\" href=" . $link . ">Zu meinem Ampelsystem</a></br>";
|
||||
$content .= "<p><br>Schönen Tag noch,</p>";
|
||||
$content .= "<p>Sancho</p>";
|
||||
$content .= "<p>Sie können sie jetzt gleich in Ihrem Ampelsystem bestätigen:</p>";
|
||||
$content .= "<a style=\"color: #bfc130;\" href=". $link. ">Zu meinem Ampelsystem</a></br>";
|
||||
$content .= "<p align=\"center\"><br>Schönen Tag noch,</br>";
|
||||
$content .= "Sancho</p><br>";
|
||||
|
||||
//send eMail
|
||||
sendMail($to, $from, $subject, $content, $title);
|
||||
sendMail($to, $from, $subject, $content, $headerImg);
|
||||
}
|
||||
|
||||
//send eMail for overdue notifications
|
||||
@@ -147,30 +153,32 @@ foreach ($overdue_ampel_user_arr as $receiver)
|
||||
$firstName = $person->vorname;
|
||||
|
||||
//link to notifications system site
|
||||
$link = APP_ROOT . "cis/index.php?sprache=German&content_id=&menu=" . APP_ROOT . "cis/menu.php?content_id=&content=" . APP_ROOT . "cis/private/tools/ampelverwaltung.php";
|
||||
$link = APP_ROOT. "cis/index.php?sprache=German&content_id=&menu=".
|
||||
APP_ROOT. "cis/menu.php?content_id=&content=".
|
||||
APP_ROOT. "cis/private/tools/ampelverwaltung.php";
|
||||
|
||||
//eMail data
|
||||
$to = $receiver['user'] . '@' . DOMAIN;
|
||||
$from = 'noreply@'.DOMAIN;
|
||||
$subject = 'Bestätigen Sie bitte Ihre Ampel!';
|
||||
$title = "Die Deadline für Ihre Ampel ist überschritten!";
|
||||
$content = "<p>Hallo " . $firstName . ",</p>";
|
||||
$content .= "<p>es gibt Ampeln, die von Ihnen noch bestätigt werden müssen:</p><br>";
|
||||
$headerImg = "sancho_header_deadline_ampel_overdue.jpg";
|
||||
$content = "<p align=\"center\">Hallo " . $firstName . ",</p><br>";
|
||||
$content .= "<p>diese Ampeln müssen von Ihnen noch bestätigt werden:</p><br>";
|
||||
|
||||
for ($i = 0; $i < count($receiver) - 1; $i++)
|
||||
{
|
||||
$receiver[$i]['ampel_id'];
|
||||
$content .= "<p><i>BESTÄTIGUNG FEHLT:</i>  <strong>" . $receiver[$i]['ampel_bezeichnung'] . "</strong></p>";
|
||||
$content .= "<p><small><i style=\"color: #65696E;\">Die Deadline für die Bestätigung war am <span style=\"color: #FF0000;\">" . $receiver[$i]['deadline'] . "</span></i></small></p><br>";
|
||||
$content .= "<p><strong>" . strtoupper($receiver[$i]['ampel_bezeichnung']) . "</strong><br>";
|
||||
$content .= "<small><i style=\"color: #65696E;\">Die Deadline für die Bestätigung war am <span style=\"color: #FF0000;\">" . $receiver[$i]['deadline'] . "</span></i></small></p><br>";
|
||||
}
|
||||
|
||||
$content .= "<br><p>Sie können sie jetzt gleich in Ihrem Ampelsystem bestätigen:</p>";
|
||||
$content .= "<br><a style=\"color: #74ba24;\" href=" . $link . ">Zu meinem Ampelsystem</a></br>";
|
||||
$content .= "<p><br>Schönen Tag noch,</p>";
|
||||
$content .= "<p>Sancho</p>";
|
||||
$content .= "<p>Sie können sie jetzt gleich in Ihrem Ampelsystem bestätigen:</p>";
|
||||
$content .= "<a style=\"color: #bfc130;\" href=\"$link\">Zu meinem Ampelsystem</a><br>";
|
||||
$content .= "<p align=\"center\"><br>Schönen Tag noch!<br>";
|
||||
$content .= "Sancho</p><br>";
|
||||
|
||||
//send eMail
|
||||
sendMail($to, $from, $subject, $content, $title);
|
||||
sendMail($to, $from, $subject, $content, $headerImg);
|
||||
}
|
||||
|
||||
|
||||
@@ -234,10 +242,10 @@ function organizeAmpelnForMail ($ampel_user_arr)
|
||||
}
|
||||
return $unique_user_arr;
|
||||
}
|
||||
function sendMail($to, $from, $subject, $html_content, $title = 'Sancho hat neue Nachrichten für Sie!')
|
||||
function sendMail($to, $from, $subject, $html_content, $headerImg = 'sancho_header_sie_haben_neue_nachrichten.jpg')
|
||||
{
|
||||
$sancho_img = APP_ROOT . "skin/images/sancho_round_right_blue.png";
|
||||
$logo_img = APP_ROOT . "skin/images/fh_logo.png";
|
||||
$sanchoHeader_img = APP_ROOT . "skin/images/sancho/" . $headerImg;
|
||||
$sanchoFooter_img = APP_ROOT . "skin/images/sancho/sancho_footer.jpg";
|
||||
|
||||
//mail content as plain text (fallback if html not activated)
|
||||
$plain_text = "Hallo,\n\n";
|
||||
@@ -249,6 +257,7 @@ function sendMail($to, $from, $subject, $html_content, $title = 'Sancho hat neue
|
||||
/*
|
||||
* no css styles in html-head (email clients picky about that)
|
||||
* tables inside tables for correct styles in different email clients
|
||||
* border-collapse and mso-table: this corrects strange behavior of outlook 2013 adding unwished extra space
|
||||
*/
|
||||
$html_text = '
|
||||
<html>
|
||||
@@ -256,26 +265,24 @@ function sendMail($to, $from, $subject, $html_content, $title = 'Sancho hat neue
|
||||
<title>Sancho Ampelmail</title>
|
||||
</head>
|
||||
<body><center>
|
||||
<table width="650px" cellpadding="0" cellspacing="0" style="border: 2px solid #65696e; border-spacing: 0px; margin-top: 40px;">
|
||||
<table cellpadding="0" cellspacing="0" style="border: 2px solid #000000; padding: 0px; max-width: 850px;
|
||||
border-collapse:collapse; mso-table-lspace:0pt; mso-table-rspace:0pt;">
|
||||
<tr>
|
||||
<td align="left">
|
||||
<table cellpadding="0" width="100%" cellspacing="0" style="padding:0; border-bottom: 2px solid #A0A0A0; margin: 0; font-family: arial, verdana, sans-serif; font-size: 0.8em; border-spacing: 0px;">
|
||||
<td align="center">
|
||||
<table cellpadding="0" cellspacing="0" width="100%" border="0">
|
||||
<tr>
|
||||
<td width="25%" style="padding: 25px;">
|
||||
<img src="cid:SanchoFace" align="left" alt="sancho_face" width="105" height="105">
|
||||
</td>
|
||||
<td width="75%" style="padding: 25px;">
|
||||
<h4 align="center" style="padding-top: 20">' . $title . '</h4>
|
||||
<td>
|
||||
<img src="cid:SanchoHeader" alt="sancho_header" width="100%">
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="left">
|
||||
<table cellpadding="0" width="100%" cellspacing="0" style="padding:0; border-bottom: 2px solid #A0A0A0; margin: 0; font-family: arial, verdana, sans-serif; font-size: 0.8em; border-spacing: 0px;">
|
||||
<td align="center">
|
||||
<table cellpadding="0" cellspacing="0" width="100%" style="font-family: courier, verdana, sans-serif; font-size: 0.95em; border-bottom: 2px solid #000000;">
|
||||
<tr>
|
||||
<td style="padding: 25px;">
|
||||
<td style="padding-left: 8%; padding-right: 8%; padding-top: 5%; padding-bottom: 5%;">
|
||||
<br>' . $html_content . '</br>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -283,14 +290,11 @@ function sendMail($to, $from, $subject, $html_content, $title = 'Sancho hat neue
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="left">
|
||||
<table cellpadding="0" width="100%" cellspacing="0" style="padding:0; margin: 0; font-family: arial, verdana, sans-serif; font-size: 0.8em; border-spacing: 0px;">
|
||||
<td align="center">
|
||||
<table cellpadding="0" cellspacing="0" width="100%">
|
||||
<tr>
|
||||
<td width="75%" style="padding: 25px;">
|
||||
<span style="color: #0a629c; padding: 20 0 0 20;">So spannend kann Technik sein!</span>
|
||||
</td>
|
||||
<td width="25%" style="padding: 25px;">
|
||||
<a href="https://www.technikum-wien.at"><img src="cid:Logo" align="right" alt="logo" width="120" height="70">
|
||||
<td>
|
||||
<img src="cid:SanchoFooter" alt="sancho_footer" width="100%">
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
@@ -302,14 +306,10 @@ function sendMail($to, $from, $subject, $html_content, $title = 'Sancho hat neue
|
||||
|
||||
$mail = new mail($to, $from, $subject, $plain_text);
|
||||
$mail->setHtmlContent($html_text);
|
||||
$mail->addEmbeddedImage($sancho_img, "image/png", "", "SanchoFace");
|
||||
$mail->addEmbeddedImage($logo_img, "image/png", "", "Logo");
|
||||
$mail->addEmbeddedImage($sanchoFooter_img, "image/jpg", "", "SanchoFooter");
|
||||
$mail->addEmbeddedImage($sanchoHeader_img, "image/jpg", "", "SanchoHeader");
|
||||
|
||||
if(!$mail->send())
|
||||
echo $p->t('global/emailNichtVersendet') . ' an ' . $to . "<br>";
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -45,11 +45,11 @@ $datum_obj = new datum();
|
||||
<title>Ampel - Details</title>
|
||||
<link rel="stylesheet" href="../../skin/fhcomplete.css" type="text/css">
|
||||
<link rel="stylesheet" href="../../skin/vilesci.css" type="text/css">
|
||||
<link rel="stylesheet" href="../../vendor/fortawesome/font-awesome/css/font-awesome.min.css">
|
||||
<link rel="stylesheet" href="../../skin/jquery-ui-1.9.2.custom.min.css" type="text/css">
|
||||
<script type="text/javascript" src="../../vendor/christianbach/tablesorter/jquery.tablesorter.min.js"></script>
|
||||
<script type="text/javascript" src="../../vendor/components/jqueryui/jquery-ui.min.js"></script>
|
||||
<link rel="stylesheet" href="../../vendor/components/font-awesome/css/font-awesome.min.css">
|
||||
<link rel="stylesheet" href="../../vendor/components/jqueryui/themes/base/jquery-ui.min.css">
|
||||
<script type="text/javascript" src="../../vendor/components/jquery/jquery.min.js"></script>
|
||||
<script type="text/javascript" src="../../vendor/components/jqueryui/jquery-ui.min.js"></script>
|
||||
<script type="text/javascript" src="../../vendor/christianbach/tablesorter/jquery.tablesorter.min.js"></script>
|
||||
<script type="text/javascript" src="../../vendor/twbs/bootstrap/dist/js/bootstrap.min.js"></script>
|
||||
<script type="text/javascript" src="../../include/js/jquery.ui.datepicker.translation.js"></script>
|
||||
<script type="text/javascript">
|
||||
@@ -180,7 +180,7 @@ $datum_obj = new datum();
|
||||
<td>Deadline 
|
||||
<i class="fa fa-info-circle fa-lg" aria-hidden="true" data-toggle="tooltip" data-placement="left" title="Die Deadline gibt den Tag an, ab dem die Ampel von gelb auf rot gesetzt wird."></i>
|
||||
</td>
|
||||
<td><input type="date" name="deadline" size="10" maxlength="10" value="'.htmlspecialchars($datum_obj->formatDatum($ampel->deadline,'Y-m-d')).'" required></td>
|
||||
<td><input type="text" class="datepicker_datum" name="deadline" size="10" maxlength="10" value="'.htmlspecialchars($datum_obj->formatDatum($ampel->deadline,'Y-m-d')).'" required></td>
|
||||
</tr>
|
||||
<tr valign="top">
|
||||
<td rowspan="3">Benutzer Select</td>
|
||||
|
||||
@@ -125,6 +125,7 @@ if(isset($radio_1) && isset($radio_2) && $radio_1>=0 && $radio_2>=0)
|
||||
$sql_query_upd1.="UPDATE public.tbl_msg_status SET person_id=".$db->db_add_param($radio_2, FHC_INTEGER)." WHERE person_id=".$db->db_add_param($radio_1, FHC_INTEGER).";";
|
||||
$sql_query_upd1.="UPDATE system.tbl_person_lock SET person_id=".$db->db_add_param($radio_2, FHC_INTEGER)." WHERE person_id=".$db->db_add_param($radio_1, FHC_INTEGER).";";
|
||||
$sql_query_upd1.="UPDATE system.tbl_log SET person_id=".$db->db_add_param($radio_2, FHC_INTEGER)." WHERE person_id=".$db->db_add_param($radio_1, FHC_INTEGER).";";
|
||||
$sql_query_upd1.="UPDATE public.tbl_rt_person SET person_id=".$db->db_add_param($radio_2, FHC_INTEGER)." WHERE person_id=".$db->db_add_param($radio_1, FHC_INTEGER).";";
|
||||
$sql_query_upd1.="DELETE FROM public.tbl_person WHERE person_id=".$db->db_add_param($radio_1, FHC_INTEGER).";";
|
||||
|
||||
if($db->db_query($sql_query_upd1))
|
||||
|
||||
Reference in New Issue
Block a user