mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-19 07:52:16 +00:00
Merge branch 'master' into udf
This commit is contained in:
@@ -9,6 +9,7 @@ $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['message_server'] = 'http://www.fhcomplete.org/';
|
||||
$config['assistent_function'] = 'ass';
|
||||
|
||||
define('EMAIL_KONTAKT_TYPE', 'email'); // Email kontakt type
|
||||
|
||||
@@ -53,10 +53,11 @@ class Dms extends APIv1_Controller
|
||||
{
|
||||
$person_id = $this->get('person_id');
|
||||
$dokument_kurzbz = $this->get('dokument_kurzbz');
|
||||
$no_file = $this->get('no_file');
|
||||
|
||||
if (isset($person_id))
|
||||
{
|
||||
$result = $this->dmslib->getAktenAcceptedDms($person_id, $dokument_kurzbz);
|
||||
$result = $this->dmslib->getAktenAcceptedDms($person_id, $dokument_kurzbz, $no_file);
|
||||
|
||||
$this->response($result, REST_Controller::HTTP_OK);
|
||||
}
|
||||
|
||||
@@ -40,14 +40,13 @@ class Messages extends VileSci_Controller
|
||||
}
|
||||
|
||||
// Get variables
|
||||
$this->load->model('crm/Prestudent_model', 'PrestudentModel');
|
||||
$prestudent = $this->MessageModel->getMsgVarsDataByPrestudentId($prestudent_id);
|
||||
if ($prestudent->error)
|
||||
$this->load->model('system/Message_model', 'MessageModel');
|
||||
$msgVarsDataByPrestudentId = $this->MessageModel->getMsgVarsDataByPrestudentId($prestudent_id);
|
||||
if ($msgVarsDataByPrestudentId->error)
|
||||
{
|
||||
show_error($prestudent->retval);
|
||||
show_error($msgVarsDataByPrestudentId->retval);
|
||||
}
|
||||
|
||||
$this->load->model('system/Message_model', 'MessageModel');
|
||||
if (!hasData($variables = $this->MessageModel->getMessageVars()))
|
||||
{
|
||||
unset($variables);
|
||||
@@ -65,11 +64,33 @@ class Messages extends VileSci_Controller
|
||||
array_shift($variables->retval); // Remove person_id
|
||||
array_shift($variables->retval); // Remove prestudent_id
|
||||
|
||||
// Organisation units
|
||||
$oe_kurzbz = array(); // A person can have more organisation units
|
||||
$this->load->model('person/Benutzerfunktion_model', 'BenutzerfunktionModel');
|
||||
$benutzerResult = $this->BenutzerfunktionModel->getByPersonId($sender_id);
|
||||
if (hasData($benutzerResult))
|
||||
{
|
||||
foreach($benutzerResult->retval as $val)
|
||||
{
|
||||
$oe_kurzbz[] = $val->oe_kurzbz;
|
||||
}
|
||||
}
|
||||
|
||||
// Admin or commoner?
|
||||
$this->load->model('system/Benutzerrolle_model', 'BenutzerrolleModel');
|
||||
$isAdmin = $this->BenutzerrolleModel->isAdminByPersonId($sender_id);
|
||||
if (isError($isAdmin))
|
||||
{
|
||||
show_error($isAdmin->retval);
|
||||
}
|
||||
|
||||
$data = array (
|
||||
'sender_id' => $sender_id,
|
||||
'receivers' => $prestudent->retval,
|
||||
'receivers' => $msgVarsDataByPrestudentId->retval,
|
||||
'message' => $msg,
|
||||
'variables' => $variablesArray
|
||||
'variables' => $variablesArray,
|
||||
'oe_kurzbz' => $oe_kurzbz,
|
||||
'isAdmin' => $isAdmin->retval
|
||||
);
|
||||
|
||||
$v = $this->load->view('system/messageWrite', $data);
|
||||
|
||||
@@ -2,13 +2,15 @@
|
||||
|
||||
require_once APPPATH . '/libraries/REST_Controller.php';
|
||||
|
||||
class APIv1_Controller extends REST_Controller
|
||||
class APIv1_Controller extends REST_Controller
|
||||
{
|
||||
function __construct()
|
||||
function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
|
||||
// Loads return messages
|
||||
$this->load->helper('message');
|
||||
|
||||
log_message('debug', 'Called API: '.$_SERVER['PHP_SELF'].'?'.$_SERVER['QUERY_STRING']);
|
||||
}
|
||||
}
|
||||
@@ -62,3 +62,17 @@ function generateToken($length = 64)
|
||||
$token .= $characters[mt_rand(0, $charactersLength)];
|
||||
return $token;
|
||||
}
|
||||
|
||||
/**
|
||||
* var_dump_to_error_log()
|
||||
* Gets the output of the var_dump function and print it out
|
||||
* via the error log. It also removes the end line characters
|
||||
*/
|
||||
function var_dump_to_error_log($parameter)
|
||||
{
|
||||
ob_start();
|
||||
var_dump($parameter);
|
||||
$ob_get_contents = ob_get_contents();
|
||||
ob_end_clean();
|
||||
error_log(str_replace("\n", '', $ob_get_contents));
|
||||
}
|
||||
@@ -11,7 +11,8 @@
|
||||
* @filesource
|
||||
*/
|
||||
if (! defined('BASEPATH')) exit('No direct script access allowed');
|
||||
require_once FCPATH.'include/authentication.class.php';
|
||||
|
||||
require_once FHCPATH.'include/authentication.class.php';
|
||||
|
||||
/**
|
||||
* FHC-Auth Helpers
|
||||
|
||||
@@ -68,11 +68,11 @@ class DmsLib
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public function getAktenAcceptedDms($person_id, $dokument_kurzbz = null)
|
||||
public function getAktenAcceptedDms($person_id, $dokument_kurzbz = null, $no_file = null)
|
||||
{
|
||||
$result = $this->ci->AkteModel->getAktenAcceptedDms($person_id, $dokument_kurzbz);
|
||||
|
||||
if (hasData($result))
|
||||
if (hasData($result) && $no_file == null)
|
||||
{
|
||||
for ($i = 0; $i < count($result->retval); $i++)
|
||||
{
|
||||
|
||||
@@ -11,8 +11,9 @@
|
||||
* @filesource
|
||||
*/
|
||||
if (! defined('BASEPATH')) exit('No direct script access allowed');
|
||||
require_once FCPATH.'include/authentication.class.php';
|
||||
require_once FCPATH.'include/AddonAuthentication.php';
|
||||
|
||||
require_once FHCPATH.'include/authentication.class.php';
|
||||
require_once FHCPATH.'include/AddonAuthentication.php';
|
||||
|
||||
/**
|
||||
* FHC-Auth Helpers
|
||||
|
||||
@@ -453,7 +453,7 @@ class MessageLib
|
||||
// If the person has an email account
|
||||
if (!is_null($result->retval[$i]->receiver) && $result->retval[$i]->receiver != '')
|
||||
{
|
||||
$href = APP_ROOT . $this->ci->config->item('message_html_view_url') . $result->retval[0]->token;
|
||||
$href = $this->ci->config->item('message_server') . $this->ci->config->item('message_html_view_url') . $result->retval[0]->token;
|
||||
// Using a template for the html email body
|
||||
$body = $this->ci->parser->parse(
|
||||
'templates/mailHTML',
|
||||
@@ -588,7 +588,7 @@ class MessageLib
|
||||
if ($multiPartMime === true)
|
||||
{
|
||||
// Using a template for the html email body
|
||||
$href = APP_ROOT . $this->ci->config->item('message_html_view_url') . $result->retval[0]->token;
|
||||
$href = $this->ci->config->item('message_server') . $this->ci->config->item('message_html_view_url') . $result->retval[0]->token;
|
||||
$bodyMsg = $this->ci->parser->parse(
|
||||
'templates/mailHTML',
|
||||
array(
|
||||
|
||||
@@ -59,7 +59,48 @@ class OrganisationseinheitLib
|
||||
return $this->treeSearch($schema, $table, $select, $where, $orderby, $result->retval[0]->_ppk);
|
||||
}
|
||||
}
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
public function treeSearchEntire($table, $alias, $fields, $where, $orderby, $oe_kurzbz)
|
||||
{
|
||||
$select = "";
|
||||
if (is_array($fields))
|
||||
{
|
||||
for ($i = 0; $i < count($fields); $i++)
|
||||
{
|
||||
$select .= $fields[$i];
|
||||
if ($i != count($fields) - 1)
|
||||
{
|
||||
$select .= ", ";
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$select = $fields;
|
||||
}
|
||||
|
||||
$result = $this->ci->OrganisationseinheitModel->getOneLevelAlias($table, $alias, $select, $where, $orderby, $oe_kurzbz);
|
||||
|
||||
if (hasData($result))
|
||||
{
|
||||
if ($result->retval[0]->_pk != null && $result->retval[0]->_ppk != null && $result->retval[0]->_jtpk != null)
|
||||
{
|
||||
$tmpResult = $this->treeSearchEntire($table, $alias, $select, $where, $orderby, $result->retval[0]->_ppk);
|
||||
|
||||
if (hasData($tmpResult) && $tmpResult->retval[0]->_pk != null && $tmpResult->retval[0]->_ppk != null && $tmpResult->retval[0]->_jtpk != null)
|
||||
{
|
||||
$result->retval = array_merge($result->retval, $tmpResult->retval);
|
||||
}
|
||||
}
|
||||
else if ($result->retval[0]->_ppk != null)
|
||||
{
|
||||
$result = $this->treeSearchEntire($table, $alias, $select, $where, $orderby, $result->retval[0]->_ppk);
|
||||
}
|
||||
}
|
||||
|
||||
return $result;
|
||||
}
|
||||
}
|
||||
@@ -11,15 +11,15 @@
|
||||
* @filesource
|
||||
*/
|
||||
|
||||
if (! defined('FCPATH')) exit('No direct script access allowed');
|
||||
if (! defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
require_once(FCPATH.'include/basis_db.class.php');
|
||||
require_once(FCPATH.'include/organisationseinheit.class.php');
|
||||
require_once(FCPATH.'include/studiengang.class.php');
|
||||
require_once(FCPATH.'include/fachbereich.class.php');
|
||||
require_once(FCPATH.'include/functions.inc.php');
|
||||
require_once(FCPATH.'include/wawi_kostenstelle.class.php');
|
||||
require_once(FCPATH.'include/benutzerberechtigung.class.php');
|
||||
require_once(FHCPATH.'include/basis_db.class.php');
|
||||
require_once(FHCPATH.'include/organisationseinheit.class.php');
|
||||
require_once(FHCPATH.'include/studiengang.class.php');
|
||||
require_once(FHCPATH.'include/fachbereich.class.php');
|
||||
require_once(FHCPATH.'include/functions.inc.php');
|
||||
require_once(FHCPATH.'include/wawi_kostenstelle.class.php');
|
||||
require_once(FHCPATH.'include/benutzerberechtigung.class.php');
|
||||
|
||||
class PermissionLib
|
||||
{
|
||||
@@ -29,34 +29,36 @@ class PermissionLib
|
||||
const INSERT_RIGHT = 'i';
|
||||
const DELETE_RIGHT = 'd';
|
||||
const REPLACE_RIGHT = 'ui';
|
||||
|
||||
private $bb; // benutzerberechtigung
|
||||
|
||||
private $acl; // conversion array from a source to a permission
|
||||
|
||||
private static $bb; // benutzerberechtigung
|
||||
|
||||
/**
|
||||
*
|
||||
* PermissionLib's constructor
|
||||
* Here is initialized the static property bb with all the rights of the user (API caller)
|
||||
*/
|
||||
function __construct()
|
||||
{
|
||||
// Loads CI instance
|
||||
$this->ci =& get_instance();
|
||||
|
||||
|
||||
// Loads the library to manage the rights system
|
||||
//$this->ci->load->library('FHC_DB_ACL');
|
||||
|
||||
|
||||
// Loads the auth helper
|
||||
$this->ci->load->helper('fhcauth');
|
||||
|
||||
|
||||
// Loads the array of resources
|
||||
$this->acl = $this->ci->config->item('fhc_acl');
|
||||
|
||||
//
|
||||
$this->bb = new benutzerberechtigung();
|
||||
// API Caller rights initialization
|
||||
self::$bb = new benutzerberechtigung();
|
||||
self::$bb->getBerechtigungen(getAuthUID());
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Check if the user is entitled to get access to a source with the given access type
|
||||
*
|
||||
*
|
||||
* @return bool <b>true</b> if a user has the right to access to the specified
|
||||
* resource with a specified permission type, <b>false</b> otherwise
|
||||
*/
|
||||
@@ -66,7 +68,7 @@ class PermissionLib
|
||||
if (isset($this->acl[$sourceName]))
|
||||
{
|
||||
// Checks permission
|
||||
return $this->isBerechtigt($this->acl[$sourceName], $permissionType);
|
||||
return $this->_isBerechtigt($this->acl[$sourceName], $permissionType);
|
||||
}
|
||||
// if the resource does not exist, do not lose useful clock cycles
|
||||
else
|
||||
@@ -74,7 +76,7 @@ class PermissionLib
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Get a permission by a given source
|
||||
*/
|
||||
@@ -89,20 +91,22 @@ class PermissionLib
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* Checks user's (API caller) rights
|
||||
*/
|
||||
private function isBerechtigt($berechtigung_kurzbz, $art = null, $oe_kurzbz = null, $kostenstelle_id = null)
|
||||
private function _isBerechtigt($berechtigung_kurzbz, $art = null, $oe_kurzbz = null, $kostenstelle_id = null)
|
||||
{
|
||||
$isBerechtigt = false;
|
||||
|
||||
if (!is_null($berechtigung_kurzbz))
|
||||
{
|
||||
$this->bb->getBerechtigungen(getAuthUID());
|
||||
return $this->bb->isBerechtigt($berechtigung_kurzbz, $oe_kurzbz, $art, $kostenstelle_id);
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
if(self::$bb->isBerechtigt($berechtigung_kurzbz, $oe_kurzbz, $art, $kostenstelle_id))
|
||||
{
|
||||
$isBerechtigt = true;
|
||||
}
|
||||
}
|
||||
|
||||
return $isBerechtigt;
|
||||
}
|
||||
}
|
||||
@@ -23,7 +23,14 @@ class ReihungstestLib
|
||||
*/
|
||||
public function insertPersonReihungstest($ddReihungstest)
|
||||
{
|
||||
return $this->ci->RtPersonModel->insert($ddReihungstest);
|
||||
if (isset($ddReihungstest['rt_id']) && $this->checkAvailability($ddReihungstest['rt_id']))
|
||||
{
|
||||
return $this->ci->RtPersonModel->insert($ddReihungstest);
|
||||
}
|
||||
else
|
||||
{
|
||||
return error('This test is not more available');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -62,4 +69,19 @@ class ReihungstestLib
|
||||
|
||||
return $this->ci->ReihungstestModel->loadWhere($parametersArray);
|
||||
}
|
||||
|
||||
/**
|
||||
* It checks if the test is available
|
||||
*/
|
||||
public function checkAvailability($reihungstest_id)
|
||||
{
|
||||
$result = $this->ci->ReihungstestModel->checkAvailability($reihungstest_id);
|
||||
|
||||
if (hasData($result))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -11,4 +11,31 @@ class Reihungstest_model extends DB_Model
|
||||
$this->dbTable = 'public.tbl_reihungstest';
|
||||
$this->pk = 'reihungstest_id';
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets a test from a test id only if it is available
|
||||
*/
|
||||
public function checkAvailability($reihungstest_id)
|
||||
{
|
||||
$query = 'SELECT public.tbl_reihungstest.*
|
||||
FROM public.tbl_reihungstest LEFT JOIN public.tbl_rt_studienplan USING(reihungstest_id)
|
||||
WHERE tbl_reihungstest.oeffentlich = TRUE
|
||||
AND tbl_reihungstest.datum > NOW()
|
||||
AND tbl_reihungstest.anmeldefrist >= NOW()
|
||||
AND COALESCE (
|
||||
tbl_reihungstest.max_teilnehmer,
|
||||
(
|
||||
SELECT SUM(arbeitsplaetze)
|
||||
FROM public.tbl_ort JOIN public.tbl_rt_ort USING(ort_kurzbz)
|
||||
WHERE rt_id = tbl_reihungstest.reihungstest_id
|
||||
)
|
||||
) - (
|
||||
SELECT COUNT(*)
|
||||
FROM public.tbl_rt_person
|
||||
WHERE rt_id = tbl_reihungstest.reihungstest_id
|
||||
) > 0
|
||||
AND reihungstest_id = ?';
|
||||
|
||||
return $this->execQuery($query, array($reihungstest_id));
|
||||
}
|
||||
}
|
||||
@@ -78,9 +78,34 @@ class Organisationseinheit_model extends DB_Model
|
||||
) _joined_table ON (orgs._pk = _joined_table._pk)
|
||||
WHERE orgs._pk = ?
|
||||
ORDER BY %s";
|
||||
|
||||
|
||||
$query = sprintf($query, $table, $fields, $schema, $table, $where, $orderby);
|
||||
|
||||
|
||||
return $this->execQuery($query, array($oe_kurzbz));
|
||||
}
|
||||
}
|
||||
|
||||
public function getOneLevelAlias($table, $alias, $fields, $where, $orderby, $oe_kurzbz)
|
||||
{
|
||||
$query = "WITH RECURSIVE organizations(_pk, _ppk) AS
|
||||
(
|
||||
SELECT o.oe_kurzbz, o.oe_parent_kurzbz
|
||||
FROM public.tbl_organisationseinheit o
|
||||
WHERE o.oe_parent_kurzbz IS NULL
|
||||
UNION ALL
|
||||
SELECT o.oe_kurzbz, o.oe_parent_kurzbz
|
||||
FROM public.tbl_organisationseinheit o INNER JOIN organizations orgs ON (o.oe_parent_kurzbz = orgs._pk)
|
||||
)
|
||||
SELECT orgs._pk, orgs._ppk, _joined_table.*
|
||||
FROM organizations orgs LEFT JOIN (
|
||||
SELECT %s.oe_kurzbz as _jtpk, %s
|
||||
FROM %s
|
||||
WHERE %s
|
||||
) _joined_table ON (orgs._pk = _joined_table._jtpk)
|
||||
WHERE orgs._pk = ?
|
||||
ORDER BY %s";
|
||||
|
||||
$query = sprintf($query, $alias, $fields, $table, $where, $orderby);
|
||||
|
||||
return $this->execQuery($query, array($oe_kurzbz));
|
||||
}
|
||||
}
|
||||
@@ -22,7 +22,7 @@ class Studiengang_model extends DB_Model
|
||||
return $isEntitled;
|
||||
if (($isEntitled = $this->isEntitled('bis.tbl_lgartcode', PermissionLib::SELECT_RIGHT, FHC_NORIGHT, FHC_MODEL_ERROR)) !== true)
|
||||
return $isEntitled;
|
||||
|
||||
|
||||
$allForBewerbungQuery = 'SELECT DISTINCT studiengang_kz,
|
||||
typ,
|
||||
organisationseinheittyp_kurzbz,
|
||||
@@ -95,7 +95,7 @@ class Studiengang_model extends DB_Model
|
||||
WHERE t1.onlinebewerbung IS TRUE
|
||||
AND t1.aktiv IS TRUE
|
||||
ORDER BY typ, studiengangbezeichnung, tbl_lgartcode.bezeichnung ASC';
|
||||
|
||||
|
||||
return $this->execQuery($allForBewerbungQuery);
|
||||
}
|
||||
|
||||
@@ -110,11 +110,11 @@ class Studiengang_model extends DB_Model
|
||||
$this->addJoin('lehre.tbl_studienplan', 'studienordnung_id');
|
||||
// Then join with table lehre.tbl_studienplan_semester on column studienplan_id
|
||||
$this->addJoin('lehre.tbl_studienplan_semester', 'studienplan_id');
|
||||
|
||||
|
||||
// Ordering by studiengang_kz and studienplan_id
|
||||
$this->addOrder('public.tbl_studiengang.studiengang_kz');
|
||||
$this->addOrder('lehre.tbl_studienplan.studienplan_id');
|
||||
|
||||
|
||||
$result = $this->loadTree(
|
||||
'public.tbl_studiengang',
|
||||
array(
|
||||
@@ -130,7 +130,7 @@ class Studiengang_model extends DB_Model
|
||||
'studienplaene'
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
@@ -156,7 +156,7 @@ class Studiengang_model extends DB_Model
|
||||
// Ordering by studiengang_kz and studienplan_id
|
||||
$this->addOrder('public.tbl_studiengang.bezeichnung');
|
||||
$this->addOrder('lehre.tbl_studienplan.studienplan_id');
|
||||
|
||||
|
||||
$result = $this->loadTree(
|
||||
'public.tbl_studiengang',
|
||||
array(
|
||||
@@ -175,12 +175,12 @@ class Studiengang_model extends DB_Model
|
||||
'akadgrad'
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
*/
|
||||
public function getAppliedStudiengang($person_id, $studiensemester_kurzbz, $titel)
|
||||
{
|
||||
@@ -200,10 +200,10 @@ class Studiengang_model extends DB_Model
|
||||
'prestudent_id',
|
||||
'LEFT'
|
||||
);
|
||||
|
||||
|
||||
// Ordering by studiengang_kz and studienplan_id
|
||||
$this->addOrder('public.tbl_studiengang.bezeichnung');
|
||||
|
||||
|
||||
$result = $this->loadTree(
|
||||
'public.tbl_studiengang',
|
||||
array(
|
||||
@@ -222,12 +222,12 @@ class Studiengang_model extends DB_Model
|
||||
'notizen'
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
*/
|
||||
public function getAvailableReihungstestByPersonId($person_id)
|
||||
{
|
||||
@@ -241,22 +241,22 @@ class Studiengang_model extends DB_Model
|
||||
return $isEntitled;
|
||||
if (($isEntitled = $this->isEntitled('public.tbl_prestudent', PermissionLib::SELECT_RIGHT, FHC_NORIGHT, FHC_MODEL_ERROR)) !== true)
|
||||
return $isEntitled;
|
||||
|
||||
|
||||
$this->addJoin('lehre.tbl_studienordnung', 'studiengang_kz');
|
||||
|
||||
|
||||
$this->addJoin('lehre.tbl_studienplan', 'studienordnung_id');
|
||||
|
||||
|
||||
$this->addJoin('public.tbl_prestudentstatus', 'studienplan_id');
|
||||
|
||||
|
||||
$this->addJoin('public.tbl_prestudent', 'prestudent_id');
|
||||
|
||||
|
||||
$this->addFrom(
|
||||
'(SELECT * FROM public.tbl_reihungstest LEFT JOIN public.tbl_rt_studienplan USING(reihungstest_id))',
|
||||
'tbl_reihungstest'
|
||||
);
|
||||
|
||||
|
||||
$this->addOrder('tbl_studiengang.bezeichnung, tbl_reihungstest.stufe, tbl_reihungstest.datum');
|
||||
|
||||
|
||||
return $this->loadTree(
|
||||
'public.tbl_studiengang',
|
||||
array('public.tbl_reihungstest'),
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
|
||||
class Benutzerfunktion_model extends DB_Model
|
||||
{
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*/
|
||||
@@ -11,4 +11,15 @@ class Benutzerfunktion_model extends DB_Model
|
||||
$this->dbTable = 'public.tbl_benutzerfunktion';
|
||||
$this->pk = 'benutzerfunktion_id';
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the Benutzerfunktion using the person_id
|
||||
*/
|
||||
public function getByPersonId($person_id)
|
||||
{
|
||||
// Join with the table
|
||||
$this->addJoin('public.tbl_benutzer', 'uid');
|
||||
|
||||
return $this->loadWhere(array('person_id' => $person_id));
|
||||
}
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
|
||||
class Benutzerrolle_model extends DB_Model
|
||||
{
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*/
|
||||
@@ -11,4 +11,29 @@ class Benutzerrolle_model extends DB_Model
|
||||
$this->dbTable = 'system.tbl_benutzerrolle';
|
||||
$this->pk = 'benutzerberechtigung_id';
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if the given user is an admin
|
||||
*/
|
||||
public function isAdminByPersonId($person_id)
|
||||
{
|
||||
// Join with the table tbl_benutzer
|
||||
$this->addJoin('public.tbl_benutzer', 'uid');
|
||||
|
||||
$result = $this->loadWhere(array('person_id' => $person_id, 'rolle_kurzbz' => 'admin'));
|
||||
|
||||
if (!isError($result))
|
||||
{
|
||||
if (hasData($result))
|
||||
{
|
||||
$result = success(true);
|
||||
}
|
||||
else if (!hasData($result))
|
||||
{
|
||||
$result = success(false);
|
||||
}
|
||||
}
|
||||
|
||||
return $result;
|
||||
}
|
||||
}
|
||||
@@ -93,7 +93,7 @@
|
||||
<?php
|
||||
echo $this->widgetlib->widget(
|
||||
'Vorlage_widget',
|
||||
null,
|
||||
array('oe_kurzbz' => $oe_kurzbz, 'isAdmin' => $isAdmin),
|
||||
array('name' => 'vorlage', 'id' => 'vorlageDnD')
|
||||
);
|
||||
?>
|
||||
|
||||
@@ -4,13 +4,28 @@ class Vorlage_widget extends DropdownWidget
|
||||
{
|
||||
public function display($widgetData)
|
||||
{
|
||||
$this->load->model('system/Vorlage_model', 'VorlageModel');
|
||||
$this->VorlageModel->addOrder('vorlage_kurzbz');
|
||||
// All organization units to which the user belongs
|
||||
$oe_kurzbz = $widgetData['oe_kurzbz'];
|
||||
$idAdmin = $widgetData['isAdmin'];
|
||||
|
||||
$this->addSelectToModel($this->VorlageModel, 'vorlage_kurzbz', 'bezeichnung');
|
||||
$vorlage = null;
|
||||
|
||||
// If the user is an admin
|
||||
if ($idAdmin === true)
|
||||
{
|
||||
// Get all the vorlage with mimetype = text/html
|
||||
$vorlage = $this->_getAllHTMLVorlage();
|
||||
}
|
||||
else
|
||||
{
|
||||
// Get all the vorlage that belongs to the organisation units of the user
|
||||
// and the parents of those organisation units until the root of the
|
||||
// organisation unit tree
|
||||
$vorlage = $this->_getUserVorlage($oe_kurzbz);
|
||||
}
|
||||
|
||||
$this->setElementsArray(
|
||||
$this->VorlageModel->loadWhere(array('mimetype' => 'text/html')),
|
||||
$vorlage,
|
||||
true,
|
||||
'Select a vorlage...',
|
||||
'No vorlage found'
|
||||
@@ -18,4 +33,96 @@ class Vorlage_widget extends DropdownWidget
|
||||
|
||||
$this->loadDropDownView($widgetData);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get all the vorlage with mimetype = text/html
|
||||
*/
|
||||
private function _getAllHTMLVorlage()
|
||||
{
|
||||
$this->load->model('system/Vorlage_model', 'VorlageModel');
|
||||
$this->VorlageModel->addOrder('vorlage_kurzbz');
|
||||
|
||||
$this->addSelectToModel($this->VorlageModel, 'vorlage_kurzbz', 'bezeichnung');
|
||||
|
||||
return $this->VorlageModel->loadWhere(array('mimetype' => 'text/html'));
|
||||
}
|
||||
|
||||
/**
|
||||
* Get all the vorlage that belongs to the organisation units of the user
|
||||
* and the parents of those organisation units until the root of the
|
||||
* organisation unit tree
|
||||
*/
|
||||
private function _getUserVorlage($oe_kurzbz)
|
||||
{
|
||||
// Loads library OrganisationseinheitLib
|
||||
$this->load->library('OrganisationseinheitLib');
|
||||
|
||||
$vorlage = success(array()); // Default value
|
||||
|
||||
$table = '(
|
||||
SELECT v.vorlage_kurzbz, v.bezeichnung, vs.version, vs.oe_kurzbz, vs.aktiv, vs.subject, vs.text, v.mimetype
|
||||
FROM tbl_vorlagestudiengang vs INNER JOIN tbl_vorlage v USING(vorlage_kurzbz)
|
||||
) templates';
|
||||
$alias = 'templates';
|
||||
$fields = array("templates.vorlage_kurzbz AS id", "UPPER(templates.oe_kurzbz) || ' - ' || templates.bezeichnung || ' - V' || templates.version AS description");
|
||||
$where = 'templates.aktiv = TRUE
|
||||
AND templates.subject IS NOT NULL
|
||||
AND templates.text IS NOT NULL
|
||||
AND templates.mimetype = \'text/html\'';
|
||||
$order_by = 'description ASC';
|
||||
|
||||
if (!is_array($oe_kurzbz))
|
||||
{
|
||||
$vorlage = $this->organisationseinheitlib->treeSearchEntire(
|
||||
$table,
|
||||
$alias,
|
||||
$fields,
|
||||
$where,
|
||||
$order_by,
|
||||
$oe_kurzbz
|
||||
);
|
||||
}
|
||||
else // is an array
|
||||
{
|
||||
// Get the vorlage for each organisation unit
|
||||
foreach($oe_kurzbz as $val)
|
||||
{
|
||||
$tmpVorlage = $this->organisationseinheitlib->treeSearchEntire(
|
||||
$table,
|
||||
$alias,
|
||||
$fields,
|
||||
$where,
|
||||
$order_by,
|
||||
$val
|
||||
);
|
||||
|
||||
// Everything is ok and data are inside
|
||||
if (hasData($tmpVorlage))
|
||||
{
|
||||
// If it's the first vorlage copy it
|
||||
if (count($vorlage->retval) == 0)
|
||||
{
|
||||
$vorlage->retval = $tmpVorlage->retval;
|
||||
}
|
||||
else // checks for duplicates, if it's not already present push it into the array $vorlage->retval
|
||||
{
|
||||
for ($i = 0; $i < count($vorlage->retval); $i++)
|
||||
{
|
||||
for ($j = 0; $j < count($tmpVorlage->retval); $j++)
|
||||
{
|
||||
if ($vorlage->retval[$i]->_pk != $tmpVorlage->retval[$j]->_pk
|
||||
&& $vorlage->retval[$i]->_ppk != $tmpVorlage->retval[$j]->_ppk
|
||||
&& $vorlage->retval[$i]->_jtpk != $tmpVorlage->retval[$j]->_jtpk)
|
||||
{
|
||||
array_push($vorlage->retval, $tmpVorlage->retval[$j]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return $vorlage;
|
||||
}
|
||||
}
|
||||
@@ -20,6 +20,7 @@
|
||||
require_once('../../../config/cis.config.inc.php');
|
||||
require_once('../../../include/ort.class.php');
|
||||
require_once('../../../include/benutzer.class.php');
|
||||
require_once('../../../include/gruppe.class.php');
|
||||
|
||||
if(!isset($_REQUEST['work']))
|
||||
die('Parameter Work missing');
|
||||
@@ -64,6 +65,23 @@ switch($work)
|
||||
$item['bezeichnung']=$row->nachname.' '.$row->vorname;
|
||||
$result[]=$item;
|
||||
}
|
||||
|
||||
$gruppe = new gruppe();
|
||||
|
||||
if(!$gruppe->searchGruppen(array($q)))
|
||||
die('Fehler beim Laden der Gruppe: '.$gruppe->errormsg);
|
||||
|
||||
foreach($gruppe->result as $row)
|
||||
{
|
||||
if ($row->sichtbar)
|
||||
{
|
||||
$item['uid']=$row->gruppe_kurzbz;
|
||||
$item['typ']='Gruppe';
|
||||
$item['bezeichnung']='Gruppe';
|
||||
$result[]=$item;
|
||||
}
|
||||
}
|
||||
|
||||
echo json_encode($result);
|
||||
break;
|
||||
default:
|
||||
|
||||
@@ -27,6 +27,7 @@ require_once('../../../include/functions.inc.php');
|
||||
require_once('../../../include/ort.class.php');
|
||||
require_once('../../../include/benutzer.class.php');
|
||||
require_once('../../../include/coodle.class.php');
|
||||
require_once('../../../include/gruppe.class.php');
|
||||
|
||||
$user = get_uid();
|
||||
|
||||
@@ -65,6 +66,7 @@ switch($work)
|
||||
$uid='';
|
||||
$ort='';
|
||||
$email='';
|
||||
$gruppe_kurzbz='';
|
||||
$name='';
|
||||
switch($typ)
|
||||
{
|
||||
@@ -74,27 +76,61 @@ switch($work)
|
||||
$email = $id;
|
||||
$name=$bezeichnung;
|
||||
break;
|
||||
case 'Gruppe': $gruppe_kurzbz = $id; break;
|
||||
default: die('Ungueltiger Typ:'.$typ); break;
|
||||
}
|
||||
|
||||
if($coodle->RessourceExists($coodle_id, $uid, $ort, $email))
|
||||
die('Ressource ist bereits zugeteilt');
|
||||
|
||||
$coodle->coodle_id = $coodle_id;
|
||||
$coodle->uid = $uid;
|
||||
$coodle->ort_kurzbz = $ort;
|
||||
$coodle->email = $email;
|
||||
$coodle->name = $name;
|
||||
$coodle->zugangscode = uniqid();
|
||||
$coodle->insertamum = date('Y-m-d H:i:s');
|
||||
$coodle->insertvon = $user;
|
||||
$coodle->updateamum = date('Y-m-d H:i:s');
|
||||
$coodle->updatevon = $user;
|
||||
|
||||
if($coodle->saveRessource(true))
|
||||
}
|
||||
|
||||
if($typ=='Gruppe')
|
||||
{
|
||||
$gruppe = new gruppe();
|
||||
if(!$gruppe->loadUser($gruppe_kurzbz))
|
||||
die('Fehler: '.$gruppe->errormsg);
|
||||
|
||||
foreach($gruppe->result as $row)
|
||||
{
|
||||
$coodle->coodle_id = $coodle_id;
|
||||
$coodle->uid = $row->uid;
|
||||
$coodle->ort_kurzbz = $ort;
|
||||
$coodle->email = $email;
|
||||
$coodle->name = $name;
|
||||
$coodle->zugangscode = uniqid();
|
||||
$coodle->insertamum = date('Y-m-d H:i:s');
|
||||
$coodle->insertvon = $user;
|
||||
$coodle->updateamum = date('Y-m-d H:i:s');
|
||||
$coodle->updatevon = $user;
|
||||
|
||||
if(!$coodle->RessourceExists($coodle_id, $row->uid, $ort, $email))
|
||||
{
|
||||
if(!$coodle->saveRessource(true))
|
||||
{
|
||||
echo 'Fehler beim Speichern:'.$coodle->errormsg;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
}
|
||||
echo 'true';
|
||||
else
|
||||
echo 'Fehler beim Speichern:'.$coodle->errormsg;
|
||||
}
|
||||
else
|
||||
{
|
||||
if($coodle->RessourceExists($coodle_id, $uid, $ort, $email))
|
||||
die('Ressource ist bereits zugeteilt');
|
||||
|
||||
$coodle->coodle_id = $coodle_id;
|
||||
$coodle->uid = $uid;
|
||||
$coodle->ort_kurzbz = $ort;
|
||||
$coodle->email = $email;
|
||||
$coodle->name = $name;
|
||||
$coodle->zugangscode = uniqid();
|
||||
$coodle->insertamum = date('Y-m-d H:i:s');
|
||||
$coodle->insertvon = $user;
|
||||
$coodle->updateamum = date('Y-m-d H:i:s');
|
||||
$coodle->updatevon = $user;
|
||||
|
||||
if($coodle->saveRessource(true))
|
||||
echo 'true';
|
||||
else
|
||||
echo 'Fehler beim Speichern:'.$coodle->errormsg;
|
||||
}
|
||||
|
||||
break;
|
||||
case 'removeressource':
|
||||
@@ -122,20 +158,29 @@ switch($work)
|
||||
$uid='';
|
||||
$ort='';
|
||||
$email='';
|
||||
$gruppe='';
|
||||
$name='';
|
||||
switch($typ)
|
||||
{
|
||||
case 'Ort': $ort = $id; break;
|
||||
case 'Person': $uid = $id; break;
|
||||
case 'Extern': $email = $id; break;
|
||||
case 'Gruppe': $gruppe = $id; break;
|
||||
default: die('Ungueltiger Typ'); break;
|
||||
}
|
||||
if($coodle_ressource_id = $coodle->RessourceExists($coodle_id, $uid, $ort, $email))
|
||||
{
|
||||
if($coodle->deleteRessource($coodle_ressource_id))
|
||||
echo 'true';
|
||||
else
|
||||
echo 'Fehler:'.$coodle->errormsg;
|
||||
//Person darf nur entfernt werden, wenn noch kein Termin gewaelt wurde
|
||||
$coodle->getRessourceTermin($coodle_id, $coodle_ressource_id);
|
||||
if (count($coodle->result) == 0)
|
||||
{
|
||||
if($coodle->deleteRessource($coodle_ressource_id))
|
||||
echo 'true';
|
||||
else
|
||||
echo 'Fehler:'.$coodle->errormsg;
|
||||
}
|
||||
else
|
||||
echo 'Die Person kann nicht entfern werden, da sie bereits eine Terminauswahl getroffen hat';
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -206,10 +251,13 @@ switch($work)
|
||||
|
||||
if($coodle->ersteller_uid!=$user)
|
||||
die('Diese Aktion ist nur durch den Ersteller der Umfrage möglich');
|
||||
|
||||
|
||||
$coodletermin = new coodle();
|
||||
if(!$coodletermin->loadTermin($coodle_termin_id))
|
||||
die('Fehler: '.$coodletermin->errormsg);
|
||||
|
||||
if($coodletermin->checkTerminGewaehlt($coodle_termin_id))
|
||||
die('Der Termin kann nicht verschoben werden, da er schon ausgewählt wurde');
|
||||
|
||||
$coodletermin->datum = $datum;
|
||||
$coodletermin->uhrzeit = $uhrzeit;
|
||||
@@ -249,6 +297,9 @@ switch($work)
|
||||
die('Termin und Umfrage passen nicht zusammen!');
|
||||
}
|
||||
|
||||
if($coodletermin->checkTerminGewaehlt($coodle_termin_id))
|
||||
die('Der Termin kann nicht gelöscht werden, da er schon ausgewählt wurde');
|
||||
|
||||
if($coodletermin->deleteTermin($coodle_termin_id))
|
||||
echo 'true';
|
||||
else
|
||||
|
||||
@@ -38,17 +38,39 @@ if(!check_lektor($user))
|
||||
|
||||
echo '
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
|
||||
"http://www.w3.org/TR/html4/strict.dtd">
|
||||
"http://www.w3.org/TR/html4/strict.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<link rel="stylesheet" href="../../../skin/fhcomplete.css" type="text/css">
|
||||
<link rel="stylesheet" href="../../../skin/style.css.php" type="text/css">
|
||||
<link rel="stylesheet" href="../../../skin/styles/jquery.css" type="text/css">
|
||||
<link rel="stylesheet" href="../../../skin/styles/jquery-ui1.9.2.custom.min.css" type="text/css">
|
||||
<link rel="stylesheet" href="../../../skin/jquery-ui-1.9.2.custom.min.css" type="text/css">
|
||||
<link rel="stylesheet" href="../../../skin/jquery.ui.timepicker.css" type="text/css"/>
|
||||
<script src="../../../include/js/jquery1.9.min.js" type="text/javascript"></script>
|
||||
<script type="text/javascript" src="../../../include/tiny_mce/tiny_mce.js"></script>
|
||||
|
||||
<script src="../../../include/tiny_mce/tiny_mce.js" type="text/javascript" ></script>
|
||||
<script src="../../../include/js/jquery.ui.timepicker.js" type="text/javascript" ></script>
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function()
|
||||
{
|
||||
$.datepicker.setDefaults( $.datepicker.regional[ "de" ] );
|
||||
$("#datepicker_datum").datepicker(
|
||||
{
|
||||
changeMonth: true,
|
||||
defaultDate: "+7",
|
||||
minDate: "0",
|
||||
});
|
||||
$(".timepicker").timepicker(
|
||||
{
|
||||
showPeriodLabels: false,
|
||||
showHours: false,
|
||||
minuteText: "",
|
||||
minutes: {starts: 30, ends: 150, interval: 30},
|
||||
rows: 5,
|
||||
});
|
||||
|
||||
});
|
||||
</script>
|
||||
<script type="text/javascript">
|
||||
tinyMCE.init
|
||||
(
|
||||
@@ -62,56 +84,147 @@ echo '
|
||||
|
||||
// Theme options
|
||||
theme_advanced_buttons1 : "bold,italic,underline,|,justifyleft,justifycenter,justifyright,justifyfull,|,link,unlink,|,bullist,pastetext",
|
||||
theme_advanced_buttons2 : "",
|
||||
theme_advanced_buttons3 : "",
|
||||
theme_advanced_toolbar_location : "top",
|
||||
theme_advanced_toolbar_align : "center",
|
||||
theme_advanced_statusbar_location : "bottom",
|
||||
theme_advanced_resizing : true,
|
||||
force_br_newlines : true,
|
||||
force_p_newlines : false,
|
||||
forced_root_block : "",
|
||||
//Formatierungen beim Einfuegen entfernen
|
||||
paste_auto_cleanup_on_paste : true,
|
||||
paste_remove_styles: true,
|
||||
paste_remove_styles_if_webkit: true,
|
||||
paste_strip_class_attributes: true,
|
||||
paste_retain_style_properties: "",
|
||||
paste_text_sticky: true,
|
||||
setup : function(ed)
|
||||
{
|
||||
ed.onInit.add(function(ed)
|
||||
{ ed.pasteAsPlainText = true;
|
||||
ed.controlManager.setActive("pastetext", true);
|
||||
});
|
||||
}
|
||||
theme_advanced_buttons2 : "",
|
||||
theme_advanced_buttons3 : "",
|
||||
theme_advanced_toolbar_location : "top",
|
||||
theme_advanced_toolbar_align : "center",
|
||||
theme_advanced_statusbar_location : "bottom",
|
||||
theme_advanced_resizing : true,
|
||||
force_br_newlines : true,
|
||||
force_p_newlines : false,
|
||||
forced_root_block : "",
|
||||
//Formatierungen beim Einfuegen entfernen
|
||||
paste_auto_cleanup_on_paste : true,
|
||||
paste_remove_styles: true,
|
||||
paste_remove_styles_if_webkit: true,
|
||||
paste_strip_class_attributes: true,
|
||||
paste_retain_style_properties: "",
|
||||
paste_text_sticky: true,
|
||||
setup : function(ed)
|
||||
{
|
||||
ed.onInit.add(function(ed)
|
||||
{ ed.pasteAsPlainText = true;
|
||||
ed.controlManager.setActive("pastetext", true);
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
);
|
||||
|
||||
function checkrequired()
|
||||
{
|
||||
var error = false;
|
||||
if(document.getElementById("titel").value == "")
|
||||
{
|
||||
document.getElementById("titel").style.border = "solid red 2px";
|
||||
error = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
document.getElementById("titel").style.border = "";
|
||||
}
|
||||
if(document.getElementById("dauer").value == "")
|
||||
{
|
||||
document.getElementById("dauer").style.border = "solid red 2px";
|
||||
error = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
document.getElementById("dauer").style.border = "";
|
||||
}
|
||||
if(document.getElementById("datepicker_datum").value == "")
|
||||
{
|
||||
document.getElementById("datepicker_datum").style.border = "solid red 2px";
|
||||
error = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
document.getElementById("datepicker_datum").style.border = "";
|
||||
}
|
||||
|
||||
var datum = document.getElementById("datepicker_datum").value;
|
||||
var Tag = datum.substring(0,2);
|
||||
var Monat = datum.substring(3,5);
|
||||
Monat = Monat-1;
|
||||
var Jahr = datum.substring(6,10);
|
||||
//Neues Datumsobjekt erzeugen
|
||||
var Enddatum = new Date(Jahr, Monat, Tag,23,59,59);
|
||||
var Heute = new Date();
|
||||
if (Enddatum < Heute)
|
||||
{
|
||||
alert("Das Umfrageende darf nicht in der Vergangenheit liegen");
|
||||
document.getElementById("datepicker_datum").style.border = "solid red 2px";
|
||||
error = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
document.getElementById("datepicker_datum").style.border = "";
|
||||
}
|
||||
|
||||
if (error)
|
||||
return false;
|
||||
else
|
||||
return true;
|
||||
}
|
||||
</script>
|
||||
<style>
|
||||
#wrapper
|
||||
{
|
||||
width: 70%;
|
||||
width: 80%;
|
||||
padding: 0 10px 15px 10px;
|
||||
border: 1px solid #ccc;
|
||||
background: #eee;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
#wrapper h4
|
||||
{
|
||||
font-size: 16px;
|
||||
font-size: 17px;
|
||||
margin-top: 0;
|
||||
padding-top: 1em;
|
||||
}
|
||||
|
||||
padding-top: 10px;
|
||||
padding-bottom: 10px;
|
||||
text-decoration: none;
|
||||
}
|
||||
#weiter
|
||||
{
|
||||
width: 70%;
|
||||
text-align: right;
|
||||
width: 80%;
|
||||
text-align: center;
|
||||
margin-top: 10px;
|
||||
padding: 10px;
|
||||
|
||||
padding: 10px 10px 10px 10px;
|
||||
border: 1px solid #D6E9C6;
|
||||
background: #DFF0D8;
|
||||
}
|
||||
#weiter:hover
|
||||
{
|
||||
width: 80%;
|
||||
text-align: center;
|
||||
margin-top: 10px;
|
||||
padding: 10px;
|
||||
|
||||
padding: 10px 10px 10px 10px;
|
||||
border: 1px solid #ccc;
|
||||
background: #ddd;
|
||||
}
|
||||
#laufend
|
||||
{
|
||||
width: 80%;
|
||||
text-align: center;
|
||||
margin-top: 10px;
|
||||
padding: 10px;
|
||||
|
||||
padding: 10px 10px 10px 10px;
|
||||
border: 1px solid #ccc;
|
||||
background: #EDCECE;
|
||||
}
|
||||
a:hover
|
||||
{
|
||||
text-decoration: none;
|
||||
}
|
||||
.ui-timepicker-table td a
|
||||
{
|
||||
padding:0.2em 0.3em 0.2em 0.3em;
|
||||
width: 1.8em;
|
||||
}
|
||||
</style>
|
||||
<title>'.$p->t('coodle/coodle').'</title>
|
||||
@@ -123,10 +236,24 @@ if(isset($_POST['save']))
|
||||
{
|
||||
//Speichern
|
||||
$titel = $_POST['titel'];
|
||||
$beschreibung = $_POST['beschreibung'];
|
||||
$beschreibung = ($_POST['beschreibung']==''?null:$_POST['beschreibung']);
|
||||
$dauer = $_POST['dauer'];
|
||||
$endedatum = $_POST['endedatum'];
|
||||
$coodle_id = $_POST['coodle_id'];
|
||||
if (isset($_POST['mailversand']))
|
||||
$mailversand = true;
|
||||
else
|
||||
$mailversand = false;
|
||||
|
||||
if (isset($_POST['teilnehmer_anonym']))
|
||||
$teilnehmer_anonym = true;
|
||||
else
|
||||
$teilnehmer_anonym = false;
|
||||
|
||||
if (isset($_POST['termin_anonym']))
|
||||
$termin_anonym = true;
|
||||
else
|
||||
$termin_anonym = false;
|
||||
|
||||
$coodle = new coodle();
|
||||
|
||||
@@ -139,15 +266,15 @@ if(isset($_POST['save']))
|
||||
{
|
||||
die($p->t('basis/keineBerechtigung'));
|
||||
}
|
||||
$coodle->new=false;
|
||||
$coodle->new = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
$coodle->new=true;
|
||||
$coodle->new = true;
|
||||
$coodle->ersteller_uid = $user;
|
||||
$coodle->insertamum = date('Y-m-d H:i:s');
|
||||
$coodle->insertvon = $user;
|
||||
$coodle->coodle_status_kurzbz='neu';
|
||||
$coodle->coodle_status_kurzbz = 'neu';
|
||||
}
|
||||
|
||||
$coodle->titel = $titel;
|
||||
@@ -156,10 +283,25 @@ if(isset($_POST['save']))
|
||||
$coodle->endedatum = $datum_obj->formatDatum($endedatum, 'Y-m-d');
|
||||
$coodle->updateamum = date('Y-m-d H:i:s');
|
||||
$coodle->updatevon = $user;
|
||||
$coodle->mailversand = $mailversand;
|
||||
$coodle->teilnehmer_anonym = $teilnehmer_anonym;
|
||||
$coodle->termine_anonym = $termin_anonym;
|
||||
|
||||
if($coodle->save())
|
||||
{
|
||||
$message.= '<span class="ok">'.$p->t('global/erfolgreichgespeichert').'</span>';
|
||||
//Fuer alle neuen Umfragen wird ein Termine am 01.01.1900 00:00:01 als Option fuer "Keine Auswahl" angelegt
|
||||
if ($coodle->new == true)
|
||||
{
|
||||
$coodletermin = new coodle();
|
||||
|
||||
$coodletermin->datum = '1900-01-01';
|
||||
$coodletermin->uhrzeit = '00:00:01';
|
||||
$coodletermin->coodle_id = $coodle->coodle_id;
|
||||
|
||||
if (!$coodletermin->saveTermin(true))
|
||||
$message.= '<span class="error">'.$coodletermin->errormsg.'</span>';
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -175,9 +317,9 @@ elseif(isset($_GET['coodle_id']))
|
||||
if($coodle->ersteller_uid!=$user)
|
||||
die($p->t('global/keineBerechtigungFuerDieseSeite'));
|
||||
|
||||
if($coodle->coodle_status_kurzbz!='neu')
|
||||
if(($coodle->coodle_status_kurzbz!='neu') && ($coodle->coodle_status_kurzbz!='laufend'))
|
||||
{
|
||||
// Wenn bereits gestartet, abgeschlosse oder storniert,
|
||||
// Wenn bereits abgeschlosse oder storniert,
|
||||
// kann nicht mehr bearbeitet werden
|
||||
die($p->t('coodle/umfrageNichtGueltig'));
|
||||
}
|
||||
@@ -193,6 +335,7 @@ else
|
||||
$coodle = new coodle();
|
||||
$coodle->endedatum=date('d.m.Y',strtotime("+7 day"));
|
||||
$coodle->dauer=60;
|
||||
$coodle->mailversand=true;
|
||||
}
|
||||
echo '
|
||||
<a href="uebersicht.php"><< '.$p->t('coodle/zurueckZurUebersicht').'</a><br>
|
||||
@@ -202,6 +345,8 @@ echo '<div id="wrapper">
|
||||
<h4>';
|
||||
if($coodle->coodle_id=='')
|
||||
echo $p->t('coodle/neuerEintrag');
|
||||
elseif($coodle->coodle_status_kurzbz=='laufend')
|
||||
echo $p->t('coodle/laufendeUmfrageBearbeiten');
|
||||
else
|
||||
echo $p->t('coodle/bearbeiten');
|
||||
echo '</h4>';
|
||||
@@ -210,27 +355,49 @@ echo '
|
||||
<input type="hidden" name="coodle_id" value="'.$db->convert_html_chars($coodle->coodle_id).'" />
|
||||
<table>
|
||||
<tr>
|
||||
<td>'.$p->t('coodle/titel').'</td>
|
||||
<td><input type="text" name="titel" value="'.$db->convert_html_chars($coodle->titel).'" maxlength="64" size="50"/></td>
|
||||
<td valign="top">'.$p->t('coodle/titel').'</td>
|
||||
<td valign="top">
|
||||
<input type="hidden" name="titel" value="'.$db->convert_html_chars($coodle->titel).'" />
|
||||
<input id="titel" placeholder="'.$p->t('coodle/titelEingeben').'" title="'.$p->t('coodle/titelInfotext').'" type="text" name="titel" value="'.$db->convert_html_chars($coodle->titel).'" maxlength="64" size="50" '.($coodle->coodle_status_kurzbz=='laufend'?'disabled':'').'/></td>
|
||||
<td valign="top" style="color:grey">'.$p->t('coodle/titelInfotext').'</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td valign="top">'.$p->t('coodle/beschreibung').'</td>
|
||||
<td><textarea name="beschreibung" rows="6" cols="50">'.$db->convert_html_chars($coodle->beschreibung).'</textarea></td>
|
||||
<td><textarea name="beschreibung" rows="6" cols="50" >'.$db->convert_html_chars($coodle->beschreibung).'</textarea></td>
|
||||
<td valign="top" style="color:grey"><br><br>'.$p->t('coodle/beschreibungInfotext').'</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>'.$p->t('coodle/dauer').'</td>
|
||||
<td>
|
||||
<input type="text" name="dauer" value="'.$db->convert_html_chars($coodle->dauer).'" maxlength="5" size="2"/>
|
||||
<td valign="top">'.$p->t('coodle/dauer').'</td>
|
||||
<td valign="top">
|
||||
<input type="hidden" name="dauer" value="'.$db->convert_html_chars($coodle->dauer).'" />
|
||||
<input id="dauer" class="timepicker" type="text" name="dauer" value="'.$db->convert_html_chars($coodle->dauer).'" maxlength="5" size="2" '.($coodle->coodle_status_kurzbz=='laufend'?'disabled':'').'/>
|
||||
'.$p->t('coodle/dauerminuten').'
|
||||
</td>
|
||||
<td valign="top" style="color:grey">'.$p->t('coodle/dauerInfotext').'</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>'.$p->t('coodle/endedatum').'</td>
|
||||
<td><input type="text" name="endedatum" value="'.$db->convert_html_chars($datum_obj->formatDatum($coodle->endedatum,'d.m.Y')).'" maxlength="10" size="10"/></td>
|
||||
<td valign="top">'.$p->t('coodle/endedatum').'</td>
|
||||
<td valign="top"><input id="datepicker_datum" type="text" name="endedatum" value="'.$db->convert_html_chars($datum_obj->formatDatum($coodle->endedatum,'d.m.Y')).'" maxlength="10" size="10"/></td>
|
||||
<td valign="top" style="color:grey">'.$p->t('coodle/endeInfotext').'</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td valign="top">'.$p->t('coodle/mailversand').'</td>
|
||||
<td valign="top"><input id="mailversand" type="checkbox" name="mailversand" '.($coodle->mailversand=='t'?'checked':'').'/></td>
|
||||
<td valign="top" style="color:grey">'.$p->t('coodle/infotextMailversand').'</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td valign="top">'.$p->t('coodle/teilnehmerAnonym').'</td>
|
||||
<td valign="top"><input id="teilnehmer_anonym" type="checkbox" name="teilnehmer_anonym" '.($coodle->teilnehmer_anonym=='t'?'checked':'').'/></td>
|
||||
<td valign="top" style="color:grey">'.$p->t('coodle/infotextTeilnehmerAnonym').'</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td valign="top">'.$p->t('coodle/terminAnonym').'</td>
|
||||
<td valign="top"><input id="termin_anonym" type="checkbox" name="termin_anonym" '.($coodle->termine_anonym=='t'?'checked':'').'/></td>
|
||||
<td valign="top" style="color:grey">'.$p->t('coodle/infotextTerminAnonym').'</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td><input type="submit" name="save" value="'.$p->t('global/speichern').'"/> '.$message.'</td>
|
||||
<td><input type="submit" name="save" value="'.$p->t('global/speichern').'" onClick="return checkrequired();"/> '.$message.'</td>
|
||||
</tr>
|
||||
</table>';
|
||||
|
||||
@@ -241,8 +408,10 @@ echo '
|
||||
|
||||
if($coodle->coodle_id)
|
||||
{
|
||||
echo '<div id="weiter"><a href="termin.php?coodle_id='.$db->convert_html_chars($coodle->coodle_id).'"> >> '.$p->t('coodle/weiterZurTerminauswahl').'</a></div>';
|
||||
echo '<a href="termin.php?coodle_id='.$db->convert_html_chars($coodle->coodle_id).'"><div id="weiter">'.$p->t('coodle/weiterZurTerminauswahl').'</div></a>';
|
||||
}
|
||||
/*elseif ($coodle->coodle_status_kurzbz=='laufend')
|
||||
echo '<div id="laufend">'.$p->t('coodle/umfrageLaeuftBereits').'</div>';*/
|
||||
|
||||
echo '</body>
|
||||
</html>';
|
||||
|
||||
+107
-70
@@ -55,7 +55,7 @@ if(!$coodle->load($coodle_id))
|
||||
}
|
||||
$event_titel = $coodle->titel;
|
||||
|
||||
if($coodle->coodle_status_kurzbz == 'storniert' || $coodle->coodle_status_kurzbz == 'abgeschlossen' || $coodle->coodle_status_kurzbz=='laufend')
|
||||
if($coodle->coodle_status_kurzbz == 'storniert' || $coodle->coodle_status_kurzbz == 'abgeschlossen')
|
||||
{
|
||||
die($p->t('coodle/umfrageNichtGueltig'));
|
||||
}
|
||||
@@ -67,7 +67,7 @@ if(isset($_POST['action']) && $_POST['action']=='start')
|
||||
echo '<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<link rel="stylesheet" href="../../../skin/fhcomplete.css" type="text/css">
|
||||
<link rel="stylesheet" href="../../../skin/fhcomplete.css" type="text/css">
|
||||
<link rel="stylesheet" href="../../../skin/style.css.php" type="text/css">
|
||||
</head>
|
||||
<body>
|
||||
@@ -132,15 +132,22 @@ if(isset($_POST['action']) && $_POST['action']=='start')
|
||||
$html=$anrede.'!<br><br>
|
||||
Sie wurden zu einer Terminumfrage zum Thema "'.$db->convert_html_chars($coodle->titel).'" eingeladen.
|
||||
<br>
|
||||
Bitte folgen Sie dem Link um Ihre Terminwünsche bekannt zu geben:
|
||||
Bitte folgen Sie dem Link, um Ihre Terminwünsche bekannt zu geben:
|
||||
<a href="'.$link.'">Link zur Terminumfrage</a>
|
||||
<br><br>'.nl2br($sign);
|
||||
<br><br>
|
||||
Beschreibung:<br><br>
|
||||
'.$coodle->beschreibung.'<br><br>
|
||||
'.nl2br($sign);
|
||||
|
||||
$text=$anrede."!\n\nSie wurden zu einer Terminumfrage zum Thema \"".$db->convert_html_chars($coodle->titel)."\" eingeladen.\n
|
||||
Bitte folgen Sie dem Link um Ihre Terminwünsche bekannt zu geben:\n
|
||||
$link\n\n$sign";
|
||||
Bitte folgen Sie dem Link, um Ihre Terminwünsche bekannt zu geben:\n
|
||||
$link\n\n
|
||||
Beschreibung:\n\n
|
||||
".strip_tags($coodle->beschreibung)."
|
||||
\n\n
|
||||
$sign";
|
||||
|
||||
$mail = new mail($email, $von,'Termineinladung - '.$coodle->titel, $text);
|
||||
$mail = new mail($email, $von,'Terminumfrage - '.$coodle->titel, $text);
|
||||
$mail->setHTMLContent($html);
|
||||
if($mail->send())
|
||||
{
|
||||
@@ -199,9 +206,11 @@ echo '<html>
|
||||
}
|
||||
|
||||
#external-events h4 {
|
||||
font-size: 16px;
|
||||
font-size: 17px;
|
||||
margin-top: 0;
|
||||
padding-top: 1em;
|
||||
padding-top: 10px;
|
||||
padding-bottom: 10px;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.external-event { /* try to mimick the look of a real event */
|
||||
@@ -211,6 +220,8 @@ echo '<html>
|
||||
color: #fff;
|
||||
font-size: .85em;
|
||||
cursor: pointer;
|
||||
border-radius: 2px;
|
||||
box-shadow: 3px 3px 3px #bbb;
|
||||
}
|
||||
|
||||
#external-events p {
|
||||
@@ -239,9 +250,11 @@ echo '<html>
|
||||
}
|
||||
|
||||
#ressourcen h4 {
|
||||
font-size: 16px;
|
||||
font-size: 17px;
|
||||
margin-top: 0;
|
||||
padding-top: 1em;
|
||||
padding-top: 10px;
|
||||
padding-bottom: 10px;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.ressourcen {
|
||||
@@ -285,9 +298,11 @@ echo '<html>
|
||||
|
||||
#fertig h4
|
||||
{
|
||||
font-size: 16px;
|
||||
font-size: 17px;
|
||||
margin-top: 0;
|
||||
padding-top: 1em;
|
||||
padding-top: 10px;
|
||||
padding-bottom: 10px;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
#fertig p
|
||||
@@ -296,7 +311,7 @@ echo '<html>
|
||||
font-size: 11px;
|
||||
color: #666;
|
||||
}
|
||||
|
||||
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
|
||||
@@ -398,36 +413,45 @@ echo '<html>
|
||||
else
|
||||
uhrzeit = $.fullCalendar.formatDate(date, "HH:mm:ss");
|
||||
|
||||
// Pruefen ob die Reservierungsgrenze ueberschritten wurde und ggf Warnung anzeigen
|
||||
if(datum>\''.RES_TAGE_LEKTOR_BIS.'\')
|
||||
// Pruefen ob der Termin in der Vergangenheit liegt
|
||||
if(datum+\' \'+uhrzeit<=\''.date('Y-m-d H:i:s').'\')
|
||||
{
|
||||
alert("'.$p->t('coodle/ReservierungNichtMoeglich', array($datum_obj->formatDatum(RES_TAGE_LEKTOR_BIS, 'd.m.Y'))).'");
|
||||
alert("'.$p->t('coodle/TerminInDerVergangenheit').'");
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
// Pruefen ob die Reservierungsgrenze ueberschritten wurde und ggf Warnung anzeigen
|
||||
if(datum>\''.RES_TAGE_LEKTOR_BIS.'\')
|
||||
{
|
||||
alert("'.$p->t('coodle/ReservierungNichtMoeglich', array($datum_obj->formatDatum(RES_TAGE_LEKTOR_BIS, 'd.m.Y'))).'");
|
||||
}
|
||||
|
||||
// Termin Speichern
|
||||
$.ajax({
|
||||
type:"POST",
|
||||
url:"coodle_worker.php",
|
||||
data:{
|
||||
"work": "addTermin",
|
||||
"datum": datum,
|
||||
"uhrzeit": uhrzeit,
|
||||
"coodle_id": "'.$coodle_id.'"
|
||||
},
|
||||
success: function(data)
|
||||
{
|
||||
if(isNaN(data))
|
||||
alert("ERROR:"+data)
|
||||
else
|
||||
{
|
||||
copiedEventObject.id=data;
|
||||
// render the event on the calendar
|
||||
// the last `true` argument determines if the event "sticks" (http://arshaw.com/fullcalendar/docs/event_rendering/renderEvent/)
|
||||
$("#calendar").fullCalendar("renderEvent", copiedEventObject, true);
|
||||
}
|
||||
},
|
||||
error: function() { alert("error"); }
|
||||
});
|
||||
// Termin Speichern
|
||||
$.ajax({
|
||||
type:"POST",
|
||||
url:"coodle_worker.php",
|
||||
data:{
|
||||
"work": "addTermin",
|
||||
"datum": datum,
|
||||
"uhrzeit": uhrzeit,
|
||||
"coodle_id": "'.$coodle_id.'"
|
||||
},
|
||||
success: function(data)
|
||||
{
|
||||
if(isNaN(data))
|
||||
alert("ERROR:"+data)
|
||||
else
|
||||
{
|
||||
copiedEventObject.id=data;
|
||||
// render the event on the calendar
|
||||
// the last `true` argument determines if the event "sticks" (http://arshaw.com/fullcalendar/docs/event_rendering/renderEvent/)
|
||||
$("#calendar").fullCalendar("renderEvent", copiedEventObject, true);
|
||||
}
|
||||
},
|
||||
error: function() { alert("error"); }
|
||||
});
|
||||
}
|
||||
},
|
||||
eventDrop: function(event, dayDelta, minuteDelta, allDay, revertFunc, jsEvent, ui, view)
|
||||
{
|
||||
@@ -445,31 +469,41 @@ echo '<html>
|
||||
event.allDay=false;
|
||||
$("#calendar").fullCalendar("renderEvent", event, true);
|
||||
}
|
||||
// Verschiebung Speichern
|
||||
$.ajax({
|
||||
type:"POST",
|
||||
url:"coodle_worker.php",
|
||||
data:{
|
||||
"work": "moveTermin",
|
||||
"datum": datum,
|
||||
"uhrzeit": uhrzeit,
|
||||
"coodle_termin_id": event.id,
|
||||
"coodle_id": "'.$coodle_id.'"
|
||||
},
|
||||
success: function(data)
|
||||
{
|
||||
if(data!="true")
|
||||
{
|
||||
alert("ERROR:"+data)
|
||||
revertFunc();
|
||||
}
|
||||
else
|
||||
{
|
||||
// Verschiebung OK
|
||||
}
|
||||
},
|
||||
error: function() { alert("error"); }
|
||||
});
|
||||
|
||||
// Pruefen ob der Termin in der Vergangenheit liegt
|
||||
if(datum+\' \'+uhrzeit<=\''.date('Y-m-d H:i:s').'\')
|
||||
{
|
||||
alert("'.$p->t('coodle/TerminInDerVergangenheit').'");
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
// Verschiebung Speichern
|
||||
$.ajax({
|
||||
type:"POST",
|
||||
url:"coodle_worker.php",
|
||||
data:{
|
||||
"work": "moveTermin",
|
||||
"datum": datum,
|
||||
"uhrzeit": uhrzeit,
|
||||
"coodle_termin_id": event.id,
|
||||
"coodle_id": "'.$coodle_id.'"
|
||||
},
|
||||
success: function(data)
|
||||
{
|
||||
if(data!="true")
|
||||
{
|
||||
alert("ERROR:"+data)
|
||||
revertFunc();
|
||||
}
|
||||
else
|
||||
{
|
||||
// Verschiebung OK
|
||||
}
|
||||
},
|
||||
error: function() { alert("error"); }
|
||||
});
|
||||
}
|
||||
},
|
||||
eventRender: function (event, element)
|
||||
{
|
||||
@@ -578,7 +612,7 @@ echo '
|
||||
select: function(event, ui)
|
||||
{
|
||||
//Ausgeaehlte Ressource zuweisen und Textfeld wieder leeren
|
||||
addRessource(ui.item.uid, ui.item.typ, ui.item.bezeichnung);
|
||||
addRessource(ui.item.uid, ui.item.typ, ui.item.bezeichnung);
|
||||
ui.item.value="";
|
||||
ui.item.label="";
|
||||
}
|
||||
@@ -608,14 +642,17 @@ echo '
|
||||
else
|
||||
{
|
||||
// Speichern der Ressource OK
|
||||
addRessourceToContent(id, typ, bezeichnung);
|
||||
if(typ=="Gruppe")
|
||||
location.reload(true);
|
||||
else
|
||||
addRessourceToContent(id, typ, bezeichnung);
|
||||
}
|
||||
|
||||
},
|
||||
error: function() { alert("error"); }
|
||||
});
|
||||
}
|
||||
// Zeigt eine Ressoure mit deren Events an
|
||||
// Zeigt eine Ressource mit deren Events an
|
||||
function addRessourceToContent(id, typ, bezeichnung)
|
||||
{
|
||||
// HTML Tags aus der Bezeichnung Entfernen, sofern vorhanden
|
||||
@@ -645,7 +682,7 @@ echo '
|
||||
error: function() {
|
||||
alert("Error fetching data for "+typ+" "+id);
|
||||
},
|
||||
color:"gray"
|
||||
color:"lightgrey"
|
||||
//textColor:"black"
|
||||
});
|
||||
|
||||
|
||||
+128
-119
@@ -36,103 +36,110 @@ $uid = get_uid();
|
||||
$message = '';
|
||||
|
||||
echo '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
|
||||
"http://www.w3.org/TR/html4/strict.dtd">
|
||||
"http://www.w3.org/TR/html4/strict.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
|
||||
<link rel="stylesheet" href="../../../skin/fhcomplete.css" type="text/css">
|
||||
<link rel="stylesheet" href="../../../skin/style.css.php" type="text/css">
|
||||
<link href="../../../skin/style.css.php" rel="stylesheet" type="text/css">
|
||||
<link href="../../../skin/tablesort.css" rel="stylesheet" type="text/css">
|
||||
<link href="../../../skin/jquery.css" rel="stylesheet" type="text/css"/>
|
||||
<script src="../../../include/js/jquery1.9.min.js" type="text/javascript"></script>
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function()
|
||||
{
|
||||
$("#myTableFiles").tablesorter(
|
||||
{
|
||||
sortList: [[3,0]],
|
||||
widgets: ["zebra"]
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
$(document).ready(function()
|
||||
{
|
||||
$("#myTableFiles2").tablesorter(
|
||||
{
|
||||
sortList: [[3,1]],
|
||||
widgets: ["zebra"]
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
</script>
|
||||
<style>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
|
||||
<link rel="stylesheet" href="../../../skin/fhcomplete.css" type="text/css">
|
||||
<link rel="stylesheet" href="../../../skin/style.css.php" type="text/css">
|
||||
<link href="../../../skin/style.css.php" rel="stylesheet" type="text/css">
|
||||
<link href="../../../skin/tablesort.css" rel="stylesheet" type="text/css">
|
||||
<link href="../../../skin/jquery.css" rel="stylesheet" type="text/css"/>
|
||||
<script src="../../../include/js/jquery1.9.min.js" type="text/javascript"></script>
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function()
|
||||
{
|
||||
$("#myTableFiles").tablesorter(
|
||||
{
|
||||
sortList: [[3,0]],
|
||||
widgets: ["zebra"]
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
$(document).ready(function()
|
||||
{
|
||||
$("#myTableFiles2").tablesorter(
|
||||
{
|
||||
sortList: [[3,1]],
|
||||
widgets: ["zebra"]
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
</script>
|
||||
<style>
|
||||
.wrapper h4
|
||||
{
|
||||
font-size: 16px;
|
||||
font-size: 17px;
|
||||
margin-top: 0;
|
||||
padding-top: 1em;
|
||||
padding-top: 10px;
|
||||
padding-bottom: 10px;
|
||||
text-decoration: none;
|
||||
}
|
||||
a:hover
|
||||
{
|
||||
text-decoration: none;
|
||||
}
|
||||
</style>
|
||||
';
|
||||
|
||||
echo' <title>'.$p->t('coodle/uebersicht').'</title>
|
||||
</head>
|
||||
<body>';
|
||||
</head>
|
||||
<body>';
|
||||
|
||||
$method = isset($_GET['method'])?$_GET['method']:'';
|
||||
|
||||
// coodle umfrage löschen
|
||||
if($method=='delete')
|
||||
{
|
||||
$coodle= new coodle();
|
||||
$coodle_id = isset($_GET['coodle_id'])?$_GET['coodle_id']:'';
|
||||
|
||||
if($coodle->load($coodle_id))
|
||||
$coodle= new coodle();
|
||||
$coodle_id = isset($_GET['coodle_id'])?$_GET['coodle_id']:'';
|
||||
|
||||
if($coodle->load($coodle_id))
|
||||
{
|
||||
// löschen nur von eigenen Umfragen möglich
|
||||
// löschen nur von eigenen Umfragen möglich
|
||||
if($coodle->ersteller_uid!=$uid)
|
||||
$message = '<span class="error">'.$p->t('global/keineBerechtigung').'</span>';
|
||||
else
|
||||
{
|
||||
if($coodle->delete($coodle_id))
|
||||
$message ='<span class="ok">Erfolgreich storniert!</span>';
|
||||
else
|
||||
$message ='<span class="error">'.$p->t('coodle/umfrageKonnteNichtGeloeschtWerden').'</span>';
|
||||
}
|
||||
else
|
||||
{
|
||||
if($coodle->delete($coodle_id))
|
||||
$message ='<span class="ok">Erfolgreich storniert!</span>';
|
||||
else
|
||||
$message ='<span class="error">'.$p->t('coodle/umfrageKonnteNichtGeloeschtWerden').'</span>';
|
||||
}
|
||||
}
|
||||
else
|
||||
$message = '<span class ="error">'.$p->t('coodle/umfrageNichtGeladen').'</span>';
|
||||
else
|
||||
$message = '<span class ="error">'.$p->t('coodle/umfrageNichtGeladen').'</span>';
|
||||
}
|
||||
|
||||
echo'<h1>'.$p->t('coodle/uebersicht').'</h1>
|
||||
<br>';
|
||||
echo'<h1>'.$p->t('coodle/uebersicht').'</h1>';
|
||||
|
||||
echo $p->t('coodle/einfuehrungstext').'<br /><br />';
|
||||
|
||||
if(check_lektor($uid))
|
||||
{
|
||||
echo '
|
||||
<div style="display:block; text-align:left; float:left;">
|
||||
<div style="display:block; text-align:left; float:left;">
|
||||
<input type="button" onclick="window.location.href=\'stammdaten.php\'" value="'.$p->t('coodle/neueUmfrage').'">
|
||||
</div><br>';
|
||||
}
|
||||
|
||||
echo '
|
||||
<div style="display:block; text-align:right; margin-right:16px; ">'.$message.'</div>
|
||||
<br>
|
||||
<div class="wrapper">
|
||||
<h4>'.$p->t('coodle/laufendeUmfragen').'</h4>
|
||||
<table id="myTableFiles" class="tablesorter">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>'.$p->t('coodle/titel').'</th>
|
||||
<th>'.$p->t('coodle/letzterStatus').'</th>
|
||||
<th>'.$p->t('coodle/ersteller').'</th>
|
||||
<th>'.$p->t('coodle/endedatum').'</th>
|
||||
<th>'.$p->t('coodle/aktion').'</th>
|
||||
</tr>
|
||||
</thead><tbody>';
|
||||
<div style="display:block; text-align:right; margin-right:16px; ">'.$message.'</div>
|
||||
<br>
|
||||
<div class="wrapper">
|
||||
<h4>'.$p->t('coodle/laufendeUmfragen').'</h4>
|
||||
<table id="myTableFiles" class="tablesorter">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>'.$p->t('coodle/titel').'</th>
|
||||
<th>'.$p->t('coodle/letzterStatus').'</th>
|
||||
<th>'.$p->t('coodle/ersteller').'</th>
|
||||
<th>'.$p->t('coodle/endedatum').'</th>
|
||||
<th>'.$p->t('coodle/aktion').'</th>
|
||||
</tr>
|
||||
</thead><tbody>';
|
||||
|
||||
$beendeteUmfragen='';
|
||||
$datum = new datum();
|
||||
@@ -144,50 +151,52 @@ foreach($coodle->result as $c)
|
||||
$benutzer = new benutzer();
|
||||
$benutzer->load($c->ersteller_uid);
|
||||
$ersteller = $benutzer->nachname.' '.$benutzer->vorname;
|
||||
$row = '<tr>
|
||||
<td>'.$coodle->convert_html_chars($c->titel).'</td>
|
||||
<td>'.$coodle->convert_html_chars($coodle->status_arr[$c->coodle_status_kurzbz]).'</td>
|
||||
<td>'.$coodle->convert_html_chars($ersteller).'</td>
|
||||
<td>'.$coodle->convert_html_chars($datum->formatDatum($c->endedatum, 'd.m.Y')).'</td>
|
||||
<td nowrap>
|
||||
';
|
||||
|
||||
// Bearbeiten Button
|
||||
if(($c->coodle_status_kurzbz=='neu') && $uid==$c->ersteller_uid)
|
||||
{
|
||||
$row.= '<a href="stammdaten.php?coodle_id='.$c->coodle_id.'">
|
||||
<img src="../../../skin/images/edit.png" title="'.$p->t('coodle/bearbeiten').'">
|
||||
</a>';
|
||||
}
|
||||
else
|
||||
$row = '<tr>
|
||||
<td>'.$coodle->convert_html_chars($c->titel).'</td>
|
||||
<td>'.$coodle->convert_html_chars($coodle->status_arr[$c->coodle_status_kurzbz]).'</td>
|
||||
<td>'.$coodle->convert_html_chars($ersteller).'</td>
|
||||
<td>'.$coodle->convert_html_chars($datum->formatDatum($c->endedatum, 'd.m.Y')).'</td>
|
||||
<td nowrap>
|
||||
';
|
||||
|
||||
// Bearbeiten Button
|
||||
if((($c->coodle_status_kurzbz=='neu')||($c->coodle_status_kurzbz=='laufend')) && $uid==$c->ersteller_uid)
|
||||
{
|
||||
if($c->coodle_status_kurzbz=='laufend')
|
||||
$title=$p->t('coodle/umfrageWurdeBereitsGestartet');
|
||||
else
|
||||
$title=$p->t('global/keineBerechtigung');
|
||||
$title=$p->t('coodle/bearbeiten');
|
||||
|
||||
$row.= ' <a href="stammdaten.php?coodle_id='.$c->coodle_id.'">
|
||||
<img src="../../../skin/images/edit.png" title="'.$title.'">
|
||||
</a>';
|
||||
}
|
||||
else
|
||||
{
|
||||
$title=$p->t('global/keineBerechtigung');
|
||||
|
||||
$row.= ' <img src="../../../skin/images/edit_grau.png" title="'.$title.'">';
|
||||
}
|
||||
|
||||
// Storno Button
|
||||
if($uid==$c->ersteller_uid && $c->coodle_status_kurzbz!='storniert' && $c->coodle_status_kurzbz!='abgeschlossen')
|
||||
{
|
||||
$row.= '<a href="'.$_SERVER['PHP_SELF'].'?method=delete&coodle_id='.$c->coodle_id.'">
|
||||
<img src="../../../skin/images/delete_x.png" title="'.$p->t('coodle/loeschen').'">
|
||||
</a>';
|
||||
}
|
||||
else
|
||||
{
|
||||
$row.=' <img src="../../../skin/images/delete_x_grau.png" title="'.$p->t('global/keineBerechtigung').'">';
|
||||
}
|
||||
|
||||
// Umfrage Button
|
||||
if($c->coodle_status_kurzbz=='laufend' || $c->coodle_status_kurzbz=='abgeschlossen')
|
||||
{
|
||||
$row.= '<a href="../../public/coodle.php?coodle_id='.$c->coodle_id.'">
|
||||
<img src="../../../skin/images/date_go.png" title="'.$p->t('coodle/zurUmfrage').'">
|
||||
}
|
||||
|
||||
// Storno Button
|
||||
if($uid==$c->ersteller_uid && $c->coodle_status_kurzbz!='storniert' && $c->coodle_status_kurzbz!='abgeschlossen')
|
||||
{
|
||||
$row.= ' <a href="'.$_SERVER['PHP_SELF'].'?method=delete&coodle_id='.$c->coodle_id.'">
|
||||
<img src="../../../skin/images/delete_x.png" title="'.$p->t('coodle/loeschen').'">
|
||||
</a>';
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$row.=' <img src="../../../skin/images/delete_x_grau.png" title="'.$p->t('global/keineBerechtigung').'">';
|
||||
}
|
||||
|
||||
// Umfrage Button
|
||||
if($c->coodle_status_kurzbz=='laufend' || $c->coodle_status_kurzbz=='abgeschlossen')
|
||||
{
|
||||
$row.= ' <a href="../../public/coodle.php?coodle_id='.$c->coodle_id.'">
|
||||
<img src="../../../skin/images/date_go.png" title="'.$p->t('coodle/zurUmfrage').'">
|
||||
</a>';
|
||||
}
|
||||
else
|
||||
{
|
||||
if($c->coodle_status_kurzbz=='neu')
|
||||
@@ -198,11 +207,11 @@ foreach($coodle->result as $c)
|
||||
$row.=' <img src="../../../skin/images/date_go_grau.png" title="'.$title.'">';
|
||||
}
|
||||
|
||||
$row.='
|
||||
</td>
|
||||
</tr>';
|
||||
|
||||
if($c->coodle_status_kurzbz=='laufend' || $c->coodle_status_kurzbz=='neu')
|
||||
$row.='
|
||||
</td>
|
||||
</tr>';
|
||||
|
||||
if($c->coodle_status_kurzbz=='laufend' || $c->coodle_status_kurzbz=='neu')
|
||||
echo $row;
|
||||
else
|
||||
$beendeteUmfragen.=$row;
|
||||
@@ -217,17 +226,17 @@ if($beendeteUmfragen!='')
|
||||
<h4>'.$p->t('coodle/beendeteUmfragen').'</h4>
|
||||
|
||||
<table id="myTableFiles2" class="tablesorter">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>'.$p->t('coodle/titel').'</th>
|
||||
<th>'.$p->t('coodle/letzterStatus').'</th>
|
||||
<th>'.$p->t('coodle/ersteller').'</th>
|
||||
<th>'.$p->t('coodle/endedatum').'</th>
|
||||
<th>'.$p->t('coodle/aktion').'</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>'.$p->t('coodle/titel').'</th>
|
||||
<th>'.$p->t('coodle/letzterStatus').'</th>
|
||||
<th>'.$p->t('coodle/ersteller').'</th>
|
||||
<th>'.$p->t('coodle/endedatum').'</th>
|
||||
<th>'.$p->t('coodle/aktion').'</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
'.$beendeteUmfragen.'
|
||||
'.$beendeteUmfragen.'
|
||||
</tbody>
|
||||
</table>
|
||||
</div>';
|
||||
|
||||
@@ -20,11 +20,9 @@
|
||||
* Rudolf Hangl < rudolf.hangl@technikum-wien.at >
|
||||
* Gerald Simane-Sequens < gerald.simane-sequens@technikum-wien.at >
|
||||
*/
|
||||
|
||||
/*
|
||||
* Ermoeglicht das Anmelden zu Freifaechern
|
||||
*/
|
||||
|
||||
require_once('../../../config/cis.config.inc.php');
|
||||
require_once('../../../include/basis_db.class.php');
|
||||
require_once('../../../include/functions.inc.php');
|
||||
@@ -33,20 +31,19 @@ require_once('../../../include/lehrveranstaltung.class.php');
|
||||
require_once('../../../include/phrasen.class.php');
|
||||
|
||||
if (!$db = new basis_db())
|
||||
$db=false;
|
||||
$db = false;
|
||||
$sprache = getSprache();
|
||||
$p = new phrasen($sprache);
|
||||
|
||||
$user = get_uid();
|
||||
?>
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html>
|
||||
<!DOCTYPE HTML>
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<link href="../../../skin/style.css.php" rel="stylesheet" type="text/css">
|
||||
<title><?php echo $p->t('freifach/freifaecherAnmeldungsuebersicht');?></title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<link href="../../../skin/style.css.php" rel="stylesheet" type="text/css">
|
||||
<title><?php echo $p->t('freifach/freifaecherAnmeldungsuebersicht');?></title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<h1><?php echo $p->t('freifach/freifaecherAnmeldungsuebersicht');?></h1>
|
||||
<?php echo $p->t('freifach/bitteFreifachAuswaehlen');?>
|
||||
@@ -59,21 +56,21 @@ $stsem_obj = new studiensemester();
|
||||
$stsem = $stsem_obj->getaktorNext();
|
||||
|
||||
$lv_obj = new lehrveranstaltung();
|
||||
if($lv_obj->load_lva('0',null,null,true,null,'bezeichnung'))
|
||||
if ($lv_obj->load_lva('0',null,null,true,null,'bezeichnung'))
|
||||
{
|
||||
echo "<FORM method='POST' name='frmauswahl'>";
|
||||
echo "<SELECT name='lvid' onchange='window.document.frmauswahl.submit();'>";
|
||||
if($lvid=='')
|
||||
echo "\n<OPTION value='0' selected>--".$p->t('freifach/auswahl')."--</OPTION>";
|
||||
foreach($lv_obj->lehrveranstaltungen as $row)
|
||||
{
|
||||
if($lvid==$row->lehrveranstaltung_id)
|
||||
echo "\n<OPTION value='$row->lehrveranstaltung_id' selected>$row->bezeichnung</OPTION>";
|
||||
else
|
||||
echo "\n<OPTION value='$row->lehrveranstaltung_id'>$row->bezeichnung</OPTION>";
|
||||
echo "<FORM method='POST' name='frmauswahl'>";
|
||||
echo "<SELECT name='lvid' onchange='window.document.frmauswahl.submit();'>";
|
||||
if ($lvid == '')
|
||||
echo "\n<OPTION value='0' selected>--".$p->t('freifach/auswahl')."--</OPTION>";
|
||||
foreach ($lv_obj->lehrveranstaltungen as $row)
|
||||
{
|
||||
if ($lvid == $row->lehrveranstaltung_id)
|
||||
echo "\n<OPTION value='$row->lehrveranstaltung_id' selected>$row->bezeichnung</OPTION>";
|
||||
else
|
||||
echo "\n<OPTION value='$row->lehrveranstaltung_id'>$row->bezeichnung</OPTION>";
|
||||
}
|
||||
echo "\n</SELECT>";
|
||||
echo "\n</FORM>";
|
||||
echo "\n</SELECT>";
|
||||
echo "\n</FORM>";
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -81,9 +78,8 @@ else
|
||||
}
|
||||
|
||||
//Wenn das Formular abgeschickt wurde
|
||||
if($lvid!='')
|
||||
if ($lvid != '')
|
||||
{
|
||||
|
||||
$qry = "SELECT
|
||||
vorname,
|
||||
nachname,
|
||||
@@ -96,53 +92,49 @@ if($lvid!='')
|
||||
(public.tbl_student LEFT JOIN public.tbl_studiengang using (studiengang_kz)) ON (student_uid = uid)
|
||||
WHERE
|
||||
uid IN (SELECT uid FROM campus.tbl_benutzerlvstudiensemester
|
||||
WHERE lehrveranstaltung_id='".addslashes($lvid)."' AND studiensemester_kurzbz='".addslashes($stsem)."')
|
||||
WHERE lehrveranstaltung_id=".$db->db_add_param($lvid, FHC_INTEGER)." AND studiensemester_kurzbz=".$db->db_add_param($stsem).")
|
||||
ORDER BY
|
||||
nachname, vorname";
|
||||
|
||||
if($result=$db->db_query($qry))
|
||||
|
||||
if ($result = $db->db_query($qry))
|
||||
{
|
||||
$ff = array();
|
||||
$content='';
|
||||
|
||||
//$mailto= " <a href='mailto:";
|
||||
|
||||
$mailto=array();
|
||||
$mailto_idx=0;
|
||||
$content .= "<table>\n <tr class='liste'><th></th><th>".$p->t('global/nachname')."</th><th>".$p->t('global/vorname')."</th><th>".$p->t('global/mail')."</th><th>".$p->t('global/studiengang')."</th><th>".$p->t('global/semester')."</th></tr>";
|
||||
$i=0;
|
||||
while($row=$db->db_fetch_object($result))
|
||||
while ($row = $db->db_fetch_object($result))
|
||||
{
|
||||
$i++;
|
||||
$content .= "\n<tr class='liste".($i%2)."'><td>$i</td><td>$row->nachname</td><td>$row->vorname</td><td><a href='mailto:$row->uid@technikum-wien.at'>$row->uid@technikum-wien.at</a></td><td align='center'>$row->kurzbzlang</td><td align='center'>$row->semester</td></tr>";
|
||||
|
||||
if(isset($mailto[$mailto_idx]) && mb_strlen($mailto[$mailto_idx])>450)
|
||||
|
||||
if (isset($mailto[$mailto_idx]) && mb_strlen($mailto[$mailto_idx])>450)
|
||||
$mailto_idx++;
|
||||
|
||||
if(isset($mailto[$mailto_idx]))
|
||||
|
||||
if (isset($mailto[$mailto_idx]))
|
||||
$mailto[$mailto_idx]=$mailto[$mailto_idx].',';
|
||||
else
|
||||
$mailto[$mailto_idx]='';
|
||||
$mailto[$mailto_idx]=$mailto[$mailto_idx].$row->uid.'@'.DOMAIN;
|
||||
}
|
||||
//$mailto.="'>".$p->t('freifach/MailAnAlleSenden')."</a>";
|
||||
|
||||
$content .= "</table>";
|
||||
|
||||
if($i==0)
|
||||
|
||||
if ($i == 0)
|
||||
{
|
||||
echo "<b>".$p->t('freifach/keineAnmeldungenFuerDiesesFreifach')."</b>";
|
||||
}
|
||||
else
|
||||
{
|
||||
//echo "Anzahl der Anmeldungen: ".$i;
|
||||
echo $content;
|
||||
echo "<br />";
|
||||
echo "<script>
|
||||
function openMail()
|
||||
{";
|
||||
if(count($mailto)>1)
|
||||
if (count($mailto) > 1)
|
||||
echo "alert('Aufgrund der großen Anzahl an Empfängern, muss die Nachricht auf mehrere E-Mails aufgeteilt werden!');";
|
||||
foreach($mailto as $val)
|
||||
foreach ($mailto as $val)
|
||||
echo "window.location.href='mailto:".$val."';\n";
|
||||
echo '
|
||||
}
|
||||
@@ -155,9 +147,5 @@ if($lvid!='')
|
||||
}
|
||||
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -353,7 +353,11 @@ $( document ).ready(function()
|
||||
$user_is_allowed_to_upload=true;
|
||||
}
|
||||
}
|
||||
?></td>
|
||||
|
||||
// DIV zur Plazierung von Zusatzinformationen durch Addons
|
||||
echo '<div id="lesson_infobox_lektor"></div>';
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td > </td>
|
||||
|
||||
@@ -27,6 +27,7 @@ require_once('../../../include/moodle.class.php');
|
||||
require_once('../../../include/moodle19_course.class.php');
|
||||
require_once('../../../include/moodle24_course.class.php');
|
||||
require_once('../../../include/phrasen.class.php');
|
||||
require_once('../../../include/lehreinheit.class.php');
|
||||
|
||||
if (!$db = new basis_db())
|
||||
die('Fehler beim Herstellen der Datenbankverbindung');
|
||||
@@ -37,15 +38,15 @@ $p = new phrasen(getSprache());
|
||||
|
||||
if(isset($_GET['lvid']))
|
||||
$lvid=$_GET['lvid'];
|
||||
else
|
||||
else
|
||||
die('lvid muss uebergeben werden');
|
||||
|
||||
|
||||
if(isset($_GET['stsem']))
|
||||
$stsem = $_GET['stsem'];
|
||||
else
|
||||
else
|
||||
die('Es wurde kein Studiensemester uebergeben');
|
||||
|
||||
echo '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
|
||||
echo '<!DOCTYPE HTML>
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
@@ -53,39 +54,74 @@ echo '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www
|
||||
</head>
|
||||
<body>
|
||||
<h1>'.$p->t('moodle/kursUebersicht').'</h1>
|
||||
|
||||
<table width="100%">
|
||||
<tr>
|
||||
<td>';
|
||||
';
|
||||
|
||||
$moodle = new moodle();
|
||||
$moodle->getAll($lvid, $stsem);
|
||||
|
||||
$meinekurse = '';
|
||||
$allgemeinekurse = '';
|
||||
|
||||
foreach ($moodle->result as $row)
|
||||
{
|
||||
$kurs = '';
|
||||
switch($row->moodle_version)
|
||||
{
|
||||
case '1.9':
|
||||
$mdlcourse19=new moodle19_course();
|
||||
$mdlcourse19->load($row->mdl_course_id);
|
||||
echo "<a href='".$moodle->getPfad($row->moodle_version)."course/view.php?id=".$row->mdl_course_id."' class='Item'>$mdlcourse19->mdl_fullname</a><br>";
|
||||
$bezeichnung = $mdlcourse19->mdl_fullname;
|
||||
if($bezeichnung=='')
|
||||
$bezeichnung = 'Course '.$row->mdl_course_id;
|
||||
$kurs = "<a href='".$moodle->getPfad($row->moodle_version)."course/view.php?id=".$row->mdl_course_id."' class='Item'>$bezeichnung</a><br>";
|
||||
break;
|
||||
|
||||
case '2.4':
|
||||
$mdlcourse24=new moodle24_course();
|
||||
$mdlcourse24->load($row->mdl_course_id);
|
||||
echo "<a href='".$moodle->getPfad($row->moodle_version)."course/view.php?id=".$row->mdl_course_id."' class='Item'>$mdlcourse24->mdl_fullname</a><br>";
|
||||
$bezeichnung = $mdlcourse24->mdl_fullname;
|
||||
if($bezeichnung=='')
|
||||
$bezeichnung = 'Course '.$row->mdl_course_id;
|
||||
$kurs = "<a href='".$moodle->getPfad($row->moodle_version)."course/view.php?id=".$row->mdl_course_id."' class='Item'>$bezeichnung</a><br>";
|
||||
break;
|
||||
|
||||
default:
|
||||
echo $p->t('moodle/ungueltigeVersion',array($row->moodle_version)).'<br>';
|
||||
$kurs = $p->t('moodle/ungueltigeVersion',array($row->moodle_version)).'<br>';
|
||||
break;
|
||||
}
|
||||
if($row->lehreinheit_id!='')
|
||||
{
|
||||
$le = new lehreinheit();
|
||||
$stud = $le->getStudenten($row->lehreinheit_id);
|
||||
$zugeordnet = false;
|
||||
|
||||
foreach($stud as $row_stud)
|
||||
{
|
||||
if($row_stud->uid == $user)
|
||||
{
|
||||
$zugeordnet = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if($zugeordnet)
|
||||
{
|
||||
$meinekurse .= $kurs;
|
||||
}
|
||||
}
|
||||
$allgemeinekurse .= $kurs;
|
||||
}
|
||||
|
||||
echo ' </td>
|
||||
</tr>
|
||||
</table>
|
||||
</body>
|
||||
if($meinekurse!='')
|
||||
{
|
||||
echo '<h2>'.$p->t('moodle/meineKurse').'</h2>';
|
||||
echo $meinekurse;
|
||||
}
|
||||
|
||||
echo '<br><br><h2>'.$p->t('moodle/vorhandeneKurse').'</h2>';
|
||||
|
||||
echo $allgemeinekurse;
|
||||
|
||||
echo '</body>
|
||||
</html>';
|
||||
?>
|
||||
|
||||
@@ -324,7 +324,7 @@ function writePruefungsTable(e, data, anmeldung)
|
||||
else
|
||||
{
|
||||
//button = "<p><span style='display: inline-block; width: 155px;'>Anmelden (bis "+frist+"): </span><input style='width: 90px;' type='button' value='"+termin+"' onclick='openDialog(\""+e.lehrveranstaltung[0].lehrveranstaltung_id+"\", \""+d.pruefungstermin_id+"\", \""+e.lehrveranstaltung[0].bezeichnung+"\", \""+d.von+"\", \""+d.bis+"\");'></p>";
|
||||
button = "<p><a href='#' title='Anmeldung möglich bis "+frist+"';><input style='width: 140px; background-color: green;' type='button' value='"+termin+" "+time+"' onclick='openDialog(\""+e.lehrveranstaltung[0].lehrveranstaltung_id+"\", \""+d.pruefungstermin_id+"\", \""+e.lehrveranstaltung[0].bezeichnung+"\", \""+d.von+"\", \""+d.bis+"\");'></a></p>";
|
||||
button = "<p><a href='#' title='Anmeldung möglich bis "+frist+"';><input style='width: 140px; background-color: green;' type='button' value='"+termin+" "+time+"' onclick='openDialog(\""+e.lehrveranstaltung[0].lehrveranstaltung_id+"\", \""+d.pruefungstermin_id+"\", \""+e.lehrveranstaltung[0].bezeichnung.replace("'", "'")+"\", \""+d.von+"\", \""+d.bis+"\");'></a></p>";
|
||||
}
|
||||
}
|
||||
else
|
||||
|
||||
@@ -40,6 +40,15 @@ else
|
||||
$anmeldefrist = 3;
|
||||
}
|
||||
|
||||
if (defined('CIS_PRUEFUNGSTERMIN_FRIST'))
|
||||
{
|
||||
$terminfrist = CIS_PRUEFUNGSTERMIN_FRIST;
|
||||
}
|
||||
else
|
||||
{
|
||||
$terminfrist = 14;
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
/* Copyright (C) 2013 fhcomplete.org
|
||||
@@ -1983,7 +1992,7 @@ function loadAllPruefungen()
|
||||
function checkTermin(termin)
|
||||
{
|
||||
var heute = new Date();
|
||||
var aktTime = new Date(heute.getTime() + (14*24*60*60*1000));
|
||||
var aktTime = new Date(heute.getTime() + (<?php echo $terminfrist ?>*24*60*60*1000));
|
||||
var vonTime = stringToDate(termin.datum, termin.beginn);
|
||||
var bisTime = stringToDate(termin.datum, termin.ende);
|
||||
|
||||
|
||||
@@ -289,12 +289,14 @@ $i=0;
|
||||
while($begin<$ende)
|
||||
{
|
||||
$i++;
|
||||
if(!date("w",$begin))
|
||||
$begin=jump_day($begin,1);
|
||||
$begin = montag($begin);
|
||||
|
||||
$stdplan->init_stdplan();
|
||||
$datum=$begin;
|
||||
$begin+=604800; // eine Woche
|
||||
|
||||
// eine Woche weiterspringen
|
||||
$datum_tmp = new datum();
|
||||
$begin = $datum_tmp->jump_week($begin,1);
|
||||
|
||||
// Stundenplan einer Woche laden
|
||||
if(!$stdplan->load_week($datum,$db_stpl_table))
|
||||
|
||||
@@ -73,6 +73,7 @@ if(!$semester || !array_key_exists($semester, $alle_semester))
|
||||
|
||||
$lehreinheiten = $lema->getLehreinheiten($uid, $semester);
|
||||
|
||||
|
||||
if(!array_key_exists($lehreinheit_id, $lehreinheiten))
|
||||
{
|
||||
$lehreinheit_id = null;
|
||||
@@ -125,8 +126,19 @@ if($lehreinheit_id)
|
||||
|
||||
foreach($lehreinheiten as $le)
|
||||
{
|
||||
$lvdropdown_bezeichnung = $le->stg_kurzbzlang.' '.$le->lv_semester.' '.$le->lv_bezeichnung;
|
||||
$lvdropdown_bezeichnung .= ' (';
|
||||
if($le->lv_lehrform_kurzbz!='')
|
||||
{
|
||||
$lvdropdown_bezeichnung .= $le->lv_lehrform_kurzbz;
|
||||
if($le->lehrform_kurzbz!='')
|
||||
$lvdropdown_bezeichnung .= ' - '.$le->lehrform_kurzbz;
|
||||
$lvdropdown_bezeichnung .= ', ';
|
||||
}
|
||||
$lvdropdown_bezeichnung .= $le->lehreinheit_id.')';
|
||||
|
||||
echo '<option value="'.$le->lehreinheit_id.'" '.($le->lehreinheit_id === $lehreinheit_id ? 'selected' : '').'>
|
||||
'.$le->stg_kurzbzlang.' '.$le->lv_semester.' '.$le->lv_bezeichnung.' ('.($le->lv_lehrform_kurzbz ? $le->lv_lehrform_kurzbz . ', ' : '') . $le->lehreinheit_id.')
|
||||
'.$lvdropdown_bezeichnung.'
|
||||
</option>';
|
||||
}
|
||||
echo '
|
||||
@@ -153,7 +165,7 @@ if($lehreinheit_id)
|
||||
$fehlstunden = $anwesenheit->getAnwesenheit($student->uid, $lehreinheit_id);
|
||||
$le_erledigt = $fehlstunden + $anwesenheit->getAnwesenheit($student->uid, $lehreinheit_id, true);
|
||||
$anwesenheit_relativ = ($stunden_gesamt - $fehlstunden) / $stunden_gesamt * 100;
|
||||
|
||||
|
||||
echo '
|
||||
<div class="lv">
|
||||
<div>
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
+660
-439
File diff suppressed because it is too large
Load Diff
@@ -455,7 +455,7 @@ else if($method=="lehrveranstaltungen")
|
||||
|
||||
if(!$preincoming->checkLehrveranstaltung($preincoming->preincoming_id, $_GET['id']) && $freieplaetze>0)
|
||||
{
|
||||
if($preincoming->addLehrveranstaltung($preincoming->preincoming_id, $_GET['id'], date('Y-m-d H:i:s')))
|
||||
if($preincoming->addLehrveranstaltung($preincoming->preincoming_id, $_GET['id'], date('Y-m-d H:i:s'), 'Incoming '.$preincoming->preincoming_id))
|
||||
$message = '<span style="color: green"><b>'.($p->t('global/erfolgreichgespeichert')).'</b></span>';
|
||||
else
|
||||
$message = '<span style="color: red"><b>'.($p->t('global/fehleraufgetreten')).'</b></span>';
|
||||
|
||||
@@ -166,7 +166,13 @@ if($result = $db->db_query($qry))
|
||||
$zgvma_arr[$row->zgvmas_code]=$row->zgvmas_kurzbz;
|
||||
|
||||
// Reihungstests laden
|
||||
$sql_query="SELECT * FROM public.tbl_reihungstest WHERE date_part('year',datum)=date_part('year',now()) ORDER BY datum,uhrzeit";
|
||||
$sql_query = "SELECT * FROM public.tbl_reihungstest WHERE date_part('year',datum)=date_part('year',now()) ";
|
||||
|
||||
// Wenn Reihungstest ID gesetzt ist, diesen Test zusaetzlich laden, um auch jene außerhalbs des Datumszeitraums zu erwischen
|
||||
if ($reihungstest != '')
|
||||
$sql_query .= "UNION SELECT * FROM public.tbl_reihungstest WHERE reihungstest_id=".$db->db_add_param($reihungstest, FHC_INTEGER);
|
||||
|
||||
$sql_query .= " ORDER BY datum,uhrzeit";
|
||||
|
||||
if(!($result=$db->db_query($sql_query)))
|
||||
die($db->db_last_error());
|
||||
|
||||
@@ -331,6 +331,7 @@ function getStgContent($studiengang_kz, $semester, $sprache)
|
||||
$xml.='<ass>';
|
||||
|
||||
$xml.='<name><![CDATA['.$ma->titelpre.' '.$ma->vorname.' '.$ma->nachname.' '.$ma->titelpost.']]></name>';
|
||||
$xml.='<bezeichnung><![CDATA['.$row->bezeichnung.']]></bezeichnung>';
|
||||
$alias = new benutzer();
|
||||
$alias->load($ma->uid);
|
||||
if($alias->alias!='')
|
||||
|
||||
Regular → Executable
+9
-1
@@ -212,6 +212,14 @@ define('CIS_INFOSCREEN_LAGEPLAN_ANZEIGEN',true);
|
||||
//User, welcher für das Anlegen von Anrechnungen bei der Prüfungsanmeldung verwendet wird
|
||||
define('CIS_PRUEFUNGSANMELDUNG_USER','p.pruefungsanmeldung');
|
||||
|
||||
// Anmeldefristen für Prüfungen in Tagen;
|
||||
// Wenn nicht definiert: 3
|
||||
//define('CIS_PRUEFUNGSANMELDUNG_FRIST',3);
|
||||
|
||||
// Mindestvorlaufzeit beim Anlegen von Prüfungen in Tagen
|
||||
// Wenn nicht definiert: 14
|
||||
//define('CIS_PRUEFUNGSTERMIN_FRIST',14);
|
||||
|
||||
// Soll für die Prüfungsanmeldungen eine Anrechnung erstellt werden
|
||||
define('CIS_PRUEFUNGSANMELDUNG_ANRECHNUNG', true);
|
||||
|
||||
@@ -224,6 +232,6 @@ define('CIS_MEINELV_ANZAHL_SEMESTER_PAST', 3);
|
||||
//Gibt an, welche Buchungstypen bei der Überprüfung auf Einzahlung berücksichtigt werden
|
||||
define('CIS_DOKUMENTE_STUDIENBEITRAG_TYPEN', serialize(array("Studiengebuehr")));
|
||||
|
||||
//Gibt an bei welcher Länge die LV-Bezeichnungen im Menü abgeschnitten werden. Default: 21
|
||||
//Gibt an bei welcher Länge die LV-Bezeichnungen im Menü abgeschnitten werden. Default: 21
|
||||
define('CIS_LVMENUE_CUTLENGTH', 21);
|
||||
?>
|
||||
|
||||
@@ -95,6 +95,7 @@ foreach($addon_obj->result as $addon)
|
||||
<command id="menu-prefs-stpltable-stundenplan:command" oncommand="stpltableChange('stundenplan');"/>
|
||||
<command id="menu-prefs-stpltable-stundenplandev:command" oncommand="stpltableChange('stundenplandev');"/>
|
||||
<command id="menu-prefs-kontofilterstg:command" oncommand="EinstellungenKontoFilterStgChange();"/>
|
||||
<command id="menu-prefs-number_displayed_past_studiensemester:command" oncommand="variableChangeValue('number_displayed_past_studiensemester');"/>
|
||||
<command id="menu-statistic-koordinatorstunden:command" oncommand="StatistikPrintKoordinatorstunden();"/>
|
||||
<command id="menu-statistic-lehrauftraege:command" oncommand="StatistikPrintLehrauftraege();"/>
|
||||
<command id="menu-statistic-lvplanung:command" oncommand="StatistikPrintLVPlanung();"/>
|
||||
@@ -266,6 +267,14 @@ foreach($addon_obj->result as $addon)
|
||||
checkbox ="true"
|
||||
checked ="<?php echo $variable->variable->kontofilterstg;?>"
|
||||
/>
|
||||
<menuitem
|
||||
id ="menu-prefs-number_displayed_past_studiensemester"
|
||||
key ="menu-prefs-number_displayed_past_studiensemester:key"
|
||||
label ="&menu-prefs-number_displayed_past_studiensemester.label;"
|
||||
command ="menu-prefs-number_displayed_past_studiensemester:command"
|
||||
accesskey ="&menu-prefs-number_displayed_past_studiensemester.accesskey;"
|
||||
value ="<?php echo (isset($variable->variable->number_displayed_past_studiensemester)?$variable->variable->number_displayed_past_studiensemester:'');?>"
|
||||
/>
|
||||
</menupopup>
|
||||
</menu>
|
||||
<!-- ********** BERICHTE ********** -->
|
||||
|
||||
@@ -2047,3 +2047,71 @@ function OrganisationseinheitTreeRefresh()
|
||||
oe_datasource.QueryInterface(Components.interfaces.nsIRDFXMLSink);
|
||||
tree.database.AddDataSource(oe_datasource);
|
||||
}
|
||||
|
||||
// ****
|
||||
// * Oeffnet ein Fenster zum Aendern eines Variablenwertes
|
||||
// ****
|
||||
function variableChangeValue(variable)
|
||||
{
|
||||
var variablevalue = getvariable(variable);
|
||||
|
||||
if(variablevalue = prompt('Bitte geben Sie den neuen Wert fuer '+variable+' ein', variablevalue))
|
||||
{
|
||||
variableChange(variable, '', variablevalue);
|
||||
}
|
||||
}
|
||||
|
||||
// ****
|
||||
// * Sendet einen Request zum Aendern einer Variable
|
||||
// ****
|
||||
function variableChange(variable, id, wert)
|
||||
{
|
||||
if(id!=null)
|
||||
item = document.getElementById(id);
|
||||
|
||||
if(typeof(wert)==='undefined')
|
||||
{
|
||||
if(item.getAttribute('checked')=='true')
|
||||
checked='true';
|
||||
else
|
||||
checked='false';
|
||||
}
|
||||
else
|
||||
checked=wert;
|
||||
|
||||
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
|
||||
|
||||
// Request absetzen
|
||||
|
||||
var url = '<?php echo APP_ROOT ?>content/fasDBDML.php';
|
||||
|
||||
var req = new phpRequest(url,'','');
|
||||
|
||||
req.add('type', 'variablechange');
|
||||
req.add('name', variable);
|
||||
req.add('wert', checked);
|
||||
|
||||
var response = req.executePOST();
|
||||
|
||||
var val = new ParseReturnValue(response)
|
||||
|
||||
if (!val.dbdml_return)
|
||||
{
|
||||
if(val.dbdml_errormsg=='')
|
||||
alert(response)
|
||||
else
|
||||
alert(val.dbdml_errormsg)
|
||||
}
|
||||
else
|
||||
{
|
||||
if(variable=='ignore_kollision')
|
||||
updateignorekollision();
|
||||
if(variable=='db_stpl_table')
|
||||
{
|
||||
document.getElementById("statusbarpanel-db_table").label = wert;
|
||||
updatedbstpltable();
|
||||
}
|
||||
//Statusbar setzen
|
||||
document.getElementById("statusbarpanel-text").label = "Variable erfolgreich geaendert";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -66,63 +66,63 @@ echo "<?xml-stylesheet href=\"".APP_ROOT."content/bindings.css\" type=\"text/css
|
||||
<treecols>
|
||||
<treecol id="lehrveranstaltung-noten-tree-student_vorname" label="Vorname" flex="2" hidden="false" persist="hidden, width, ordinal"
|
||||
class="sortDirectionIndicator"
|
||||
sort="rdf:http://www.technikum-wien.at/zeugnisnote/rdf#student_vorname" />
|
||||
sort="rdf:http://www.technikum-wien.at/zeugnisnote/rdf#student_vorname" onclick="LehrveranstaltungNotenTreeSort()" />
|
||||
<splitter class="tree-splitter"/>
|
||||
<treecol id="lehrveranstaltung-noten-tree-student_nachname" label="Nachname" flex="2" hidden="false" persist="hidden, width, ordinal"
|
||||
class="sortDirectionIndicator"
|
||||
sort="rdf:http://www.technikum-wien.at/zeugnisnote/rdf#student_nachname" />
|
||||
sort="rdf:http://www.technikum-wien.at/zeugnisnote/rdf#student_nachname" onclick="LehrveranstaltungNotenTreeSort()"/>
|
||||
<splitter class="tree-splitter"/>
|
||||
<treecol id="lehrveranstaltung-noten-tree-lehrveranstaltung_bezeichnung" label="Lehrveranstaltung" flex="2" hidden="true" persist="hidden, width, ordinal"
|
||||
class="sortDirectionIndicator"
|
||||
sort="rdf:http://www.technikum-wien.at/zeugnisnote/rdf#lehrveranstaltung_bezeichnung"/>
|
||||
sort="rdf:http://www.technikum-wien.at/zeugnisnote/rdf#lehrveranstaltung_bezeichnung" onclick="LehrveranstaltungNotenTreeSort()"/>
|
||||
<splitter class="tree-splitter"/>
|
||||
<treecol id="lehrveranstaltung-noten-tree-note_bezeichnung" label="Note" flex="5" hidden="false" persist="hidden, width, ordinal"
|
||||
class="sortDirectionIndicator"
|
||||
sort="rdf:http://www.technikum-wien.at/zeugnisnote/rdf#note_bezeichnung"/>
|
||||
sort="rdf:http://www.technikum-wien.at/zeugnisnote/rdf#note_bezeichnung" onclick="LehrveranstaltungNotenTreeSort()"/>
|
||||
<splitter class="tree-splitter"/>
|
||||
<treecol id="lehrveranstaltung-noten-tree-uebernahmedatum" label="Uebernahmedatum" flex="2" hidden="true" persist="hidden, width, ordinal"
|
||||
class="sortDirectionIndicator"
|
||||
sort="rdf:http://www.technikum-wien.at/zeugnisnote/rdf#uebernahmedatum_iso" />
|
||||
sort="rdf:http://www.technikum-wien.at/zeugnisnote/rdf#uebernahmedatum_iso" onclick="LehrveranstaltungNotenTreeSort()" />
|
||||
<splitter class="tree-splitter"/>
|
||||
<treecol id="lehrveranstaltung-noten-tree-benotungsdatum" label="Benotungsdatum" flex="2" hidden="true" persist="hidden, width, ordinal"
|
||||
class="sortDirectionIndicator"
|
||||
sort="rdf:http://www.technikum-wien.at/zeugnisnote/rdf#benotungsdatum_iso" />
|
||||
sort="rdf:http://www.technikum-wien.at/zeugnisnote/rdf#benotungsdatum_iso" onclick="LehrveranstaltungNotenTreeSort()"/>
|
||||
<splitter class="tree-splitter"/>
|
||||
<treecol id="lehrveranstaltung-noten-tree-benotungsdatum-iso" label="BenotungsdatumISO" flex="2" hidden="true" persist="hidden, width, ordinal"
|
||||
class="sortDirectionIndicator"
|
||||
sort="rdf:http://www.technikum-wien.at/zeugnisnote/rdf#benotungsdatum_iso" />
|
||||
sort="rdf:http://www.technikum-wien.at/zeugnisnote/rdf#benotungsdatum_iso" onclick="LehrveranstaltungNotenTreeSort()"/>
|
||||
<splitter class="tree-splitter"/>
|
||||
<treecol id="lehrveranstaltung-noten-tree-studiensemester_kurzbz" label="Studiensemester" flex="2" hidden="true" persist="hidden, width, ordinal"
|
||||
class="sortDirectionIndicator"
|
||||
sort="rdf:http://www.technikum-wien.at/zeugnisnote/rdf#studiensemester_kurzbz" />
|
||||
sort="rdf:http://www.technikum-wien.at/zeugnisnote/rdf#studiensemester_kurzbz" onclick="LehrveranstaltungNotenTreeSort()"/>
|
||||
<splitter class="tree-splitter"/>
|
||||
<treecol id="lehrveranstaltung-noten-tree-note" label="Note" flex="2" hidden="true" persist="hidden, width, ordinal"
|
||||
class="sortDirectionIndicator"
|
||||
sort="rdf:http://www.technikum-wien.at/zeugnisnote/rdf#note" />
|
||||
sort="rdf:http://www.technikum-wien.at/zeugnisnote/rdf#note" onclick="LehrveranstaltungNotenTreeSort()"/>
|
||||
<splitter class="tree-splitter"/>
|
||||
<treecol id="lehrveranstaltung-noten-tree-student_uid" label="Uid" flex="2" hidden="true" persist="hidden, width, ordinal"
|
||||
class="sortDirectionIndicator"
|
||||
sort="rdf:http://www.technikum-wien.at/zeugnisnote/rdf#student_uid" />
|
||||
sort="rdf:http://www.technikum-wien.at/zeugnisnote/rdf#student_uid" onclick="LehrveranstaltungNotenTreeSort()"/>
|
||||
<splitter class="tree-splitter"/>
|
||||
<treecol id="lehrveranstaltung-noten-tree-lehrveranstaltung_id" label="LehrveranstaltungID" flex="2" hidden="true" persist="hidden, width, ordinal"
|
||||
class="sortDirectionIndicator"
|
||||
sort="rdf:http://www.technikum-wien.at/zeugnisnote/rdf#lehrveranstaltung_id" />
|
||||
sort="rdf:http://www.technikum-wien.at/zeugnisnote/rdf#lehrveranstaltung_id" onclick="LehrveranstaltungNotenTreeSort()"/>
|
||||
<splitter class="tree-splitter"/>
|
||||
<treecol id="lehrveranstaltung-noten-tree-studiengang" label="Studiengang" flex="2" hidden="true" persist="hidden, width, ordinal"
|
||||
class="sortDirectionIndicator"
|
||||
sort="rdf:http://www.technikum-wien.at/zeugnisnote/rdf#studiengang" />
|
||||
sort="rdf:http://www.technikum-wien.at/zeugnisnote/rdf#studiengang" onclick="LehrveranstaltungNotenTreeSort()"/>
|
||||
<splitter class="tree-splitter"/>
|
||||
<treecol id="lehrveranstaltung-noten-tree-studiengang_kz" label="Studiengang_kz" flex="1" hidden="true" persist="hidden, width, ordinal"
|
||||
class="sortDirectionIndicator"
|
||||
sort="rdf:http://www.technikum-wien.at/zeugnisnote/rdf#studiengang_kz" />
|
||||
sort="rdf:http://www.technikum-wien.at/zeugnisnote/rdf#studiengang_kz" onclick="LehrveranstaltungNotenTreeSort()"/>
|
||||
<splitter class="tree-splitter"/>
|
||||
<treecol id="lehrveranstaltung-noten-tree-student_semester" label="Semester" flex="2" hidden="true" persist="hidden, width, ordinal"
|
||||
class="sortDirectionIndicator"
|
||||
sort="rdf:http://www.technikum-wien.at/zeugnisnote/rdf#student_semester" />
|
||||
sort="rdf:http://www.technikum-wien.at/zeugnisnote/rdf#student_semester" onclick="LehrveranstaltungNotenTreeSort()"/>
|
||||
<splitter class="tree-splitter"/>
|
||||
<treecol id="lehrveranstaltung-noten-tree-punkte" label="Punkte" flex="2" hidden="true" persist="hidden, width, ordinal"
|
||||
class="sortDirectionIndicator"
|
||||
sort="rdf:http://www.technikum-wien.at/zeugnisnote/rdf#punkte" />
|
||||
sort="rdf:http://www.technikum-wien.at/zeugnisnote/rdf#punkte" onclick="LehrveranstaltungNotenTreeSort()"/>
|
||||
<splitter class="tree-splitter"/>
|
||||
</treecols>
|
||||
|
||||
@@ -168,55 +168,55 @@ echo "<?xml-stylesheet href=\"".APP_ROOT."content/bindings.css\" type=\"text/css
|
||||
<treecols>
|
||||
<treecol id="lehrveranstaltung-lvgesamtnoten-tree-student-vorname" label="Vorname" flex="2" hidden="false"
|
||||
class="sortDirectionIndicator"
|
||||
sort="rdf:http://www.technikum-wien.at/lvgesamtnote/rdf#student_vorname"/>
|
||||
sort="rdf:http://www.technikum-wien.at/lvgesamtnote/rdf#student_vorname" onclick="LehrveranstaltungLVGesamtNotenTreeSort()"/>
|
||||
<splitter class="tree-splitter"/>
|
||||
<treecol id="lehrveranstaltung-lvgesamtnoten-tree-student-nachname" label="Nachname" flex="2" hidden="false"
|
||||
class="sortDirectionIndicator"
|
||||
sort="rdf:http://www.technikum-wien.at/lvgesamtnote/rdf#student_nachname"/>
|
||||
sort="rdf:http://www.technikum-wien.at/lvgesamtnote/rdf#student_nachname" onclick="LehrveranstaltungLVGesamtNotenTreeSort()"/>
|
||||
<splitter class="tree-splitter"/>
|
||||
<treecol id="lehrveranstaltung-lvgesamtnoten-tree-lehrveranstaltung_bezeichnung" label="Lehrveranstaltung" flex="2" hidden="true"
|
||||
class="sortDirectionIndicator"
|
||||
sort="rdf:http://www.technikum-wien.at/lvgesamtnote/rdf#lehrveranstaltung_bezeichnung"/>
|
||||
sort="rdf:http://www.technikum-wien.at/lvgesamtnote/rdf#lehrveranstaltung_bezeichnung" onclick="LehrveranstaltungLVGesamtNotenTreeSort()"/>
|
||||
<splitter class="tree-splitter"/>
|
||||
<treecol id="lehrveranstaltung-lvgesamtnoten-tree-note_bezeichnung" label="Note" flex="5" hidden="false"
|
||||
class="sortDirectionIndicator"
|
||||
sort="rdf:http://www.technikum-wien.at/lvgesamtnote/rdf#note_bezeichnung"/>
|
||||
sort="rdf:http://www.technikum-wien.at/lvgesamtnote/rdf#note_bezeichnung" onclick="LehrveranstaltungLVGesamtNotenTreeSort()"/>
|
||||
<splitter class="tree-splitter"/>
|
||||
<treecol id="lehrveranstaltung-lvgesamtnoten-tree-mitarbeiter_uid" label="MitarbeiterUID" flex="2" hidden="true"
|
||||
class="sortDirectionIndicator"
|
||||
sort="rdf:http://www.technikum-wien.at/lvgesamtnote/rdf#mitarbeiter_uid" />
|
||||
sort="rdf:http://www.technikum-wien.at/lvgesamtnote/rdf#mitarbeiter_uid" onclick="LehrveranstaltungLVGesamtNotenTreeSort()"/>
|
||||
<splitter class="tree-splitter"/>
|
||||
<treecol id="lehrveranstaltung-lvgesamtnoten-tree-benotungsdatum" label="Benotungsdatum" flex="2" hidden="true"
|
||||
class="sortDirectionIndicator"
|
||||
sort="rdf:http://www.technikum-wien.at/lvgesamtnote/rdf#benotungsdatum_iso" />
|
||||
sort="rdf:http://www.technikum-wien.at/lvgesamtnote/rdf#benotungsdatum_iso" onclick="LehrveranstaltungLVGesamtNotenTreeSort()"/>
|
||||
<splitter class="tree-splitter"/>
|
||||
<treecol id="lehrveranstaltung-lvgesamtnoten-tree-benotungsdatum-iso" label="BenotungsdatumISO" flex="2" hidden="true"
|
||||
class="sortDirectionIndicator"
|
||||
sort="rdf:http://www.technikum-wien.at/lvgesamtnote/rdf#benotungsdatum_iso" />
|
||||
sort="rdf:http://www.technikum-wien.at/lvgesamtnote/rdf#benotungsdatum_iso" onclick="LehrveranstaltungLVGesamtNotenTreeSort()"/>
|
||||
<splitter class="tree-splitter"/>
|
||||
<treecol id="lehrveranstaltung-lvgesamtnoten-tree-freigabedatum" label="Freigabedatum" flex="2" hidden="true"
|
||||
class="sortDirectionIndicator"
|
||||
sort="rdf:http://www.technikum-wien.at/lvgesamtnote/rdf#freigabedatum_iso" />
|
||||
sort="rdf:http://www.technikum-wien.at/lvgesamtnote/rdf#freigabedatum_iso" onclick="LehrveranstaltungLVGesamtNotenTreeSort()"/>
|
||||
<splitter class="tree-splitter"/>
|
||||
<treecol id="lehrveranstaltung-lvgesamtnoten-tree-studiensemester_kurzbz" label="Studiensemester" flex="2" hidden="true"
|
||||
class="sortDirectionIndicator"
|
||||
sort="rdf:http://www.technikum-wien.at/lvgesamtnote/rdf#studiensemester_kurzbz" />
|
||||
sort="rdf:http://www.technikum-wien.at/lvgesamtnote/rdf#studiensemester_kurzbz" onclick="LehrveranstaltungLVGesamtNotenTreeSort()"/>
|
||||
<splitter class="tree-splitter"/>
|
||||
<treecol id="lehrveranstaltung-lvgesamtnoten-tree-note" label="Note" flex="2" hidden="true"
|
||||
class="sortDirectionIndicator"
|
||||
sort="rdf:http://www.technikum-wien.at/lvgesamtnote/rdf#note" />
|
||||
sort="rdf:http://www.technikum-wien.at/lvgesamtnote/rdf#note" onclick="LehrveranstaltungLVGesamtNotenTreeSort()"/>
|
||||
<splitter class="tree-splitter"/>
|
||||
<treecol id="lehrveranstaltung-lvgesamtnoten-tree-student_uid" label="StudentUID" flex="2" hidden="true"
|
||||
class="sortDirectionIndicator"
|
||||
sort="rdf:http://www.technikum-wien.at/lvgesamtnote/rdf#student_uid" />
|
||||
sort="rdf:http://www.technikum-wien.at/lvgesamtnote/rdf#student_uid" onclick="LehrveranstaltungLVGesamtNotenTreeSort()"/>
|
||||
<splitter class="tree-splitter"/>
|
||||
<treecol id="lehrveranstaltung-lvgesamtnoten-tree-lehrveranstaltung_id" label="LehrveranstaltungID" flex="2" hidden="true"
|
||||
class="sortDirectionIndicator"
|
||||
sort="rdf:http://www.technikum-wien.at/lvgesamtnote/rdf#lehrveranstaltung_id" />
|
||||
sort="rdf:http://www.technikum-wien.at/lvgesamtnote/rdf#lehrveranstaltung_id" onclick="LehrveranstaltungLVGesamtNotenTreeSort()"/>
|
||||
<splitter class="tree-splitter"/>
|
||||
<treecol id="lehrveranstaltung-lvgesamtnoten-tree-punkte" label="Punkte" flex="2" hidden="true"
|
||||
class="sortDirectionIndicator"
|
||||
sort="rdf:http://www.technikum-wien.at/lvgesamtnote/rdf#punkte" />
|
||||
sort="rdf:http://www.technikum-wien.at/lvgesamtnote/rdf#punkte" onclick="LehrveranstaltungLVGesamtNotenTreeSort()"/>
|
||||
<splitter class="tree-splitter"/>
|
||||
</treecols>
|
||||
|
||||
@@ -311,6 +311,8 @@ if(defined('FAS_GESAMTNOTE_PRUEFUNGSHONORAR') && FAS_GESAMTNOTE_PRUEFUNGSHONORAR
|
||||
<hbox>
|
||||
<label value="Anmerkung" control="lehrveranstaltung-noten-pruefung-textbox-anmerkung"/>
|
||||
<textbox id="lehrveranstaltung-noten-pruefung-textbox-anmerkung" size="60"/>
|
||||
<label value="Vertragsdatum" control="lehrveranstaltung-noten-pruefung-box-datum"/>
|
||||
<box class="Datum" id="lehrveranstaltung-noten-pruefung-box-datum"/>
|
||||
<button id="lehrveranstaltung-noten-pruefung-button-save" label="Speichern" oncommand="LehrveranstaltungNotenPruefungSave();" />
|
||||
</hbox>
|
||||
</vbox>
|
||||
|
||||
@@ -733,6 +733,17 @@ function LeAuswahl()
|
||||
lehrveranstaltungGesamtNotenTreeloaded=false;
|
||||
|
||||
if (tree.currentIndex==-1) return;
|
||||
|
||||
// Wenn Honorareingabe aktiviert ist dann das Vertragsdatum auf heutigen Tag setzen
|
||||
var pruefung_vertragsdatum = document.getElementById('lehrveranstaltung-noten-pruefung-box-datum')
|
||||
if(pruefung_vertragsdatum)
|
||||
{
|
||||
var heute = new Date();
|
||||
var datum = '';
|
||||
datum = heute.getDate()+'.'+(heute.getMonth()+1)+'.'+heute.getFullYear();
|
||||
pruefung_vertragsdatum.value=datum;
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
//Ausgewaehlte Lehreinheit holen
|
||||
@@ -979,7 +990,6 @@ function LeAuswahl()
|
||||
// Notizen Laden
|
||||
var lehreinheitnotiz = document.getElementById('lehrveranstaltung-box-notizen');
|
||||
lehreinheitnotiz.LoadNotizTree('','','','','','','','',lehreinheit_id);
|
||||
|
||||
}
|
||||
|
||||
//******** LehreinheitMitarbeiter **********//
|
||||
@@ -2575,6 +2585,8 @@ function LehrveranstaltungNotenPruefungSave()
|
||||
var anzahl = document.getElementById('lehrveranstaltung-noten-pruefung-textbox-anzahl').value;
|
||||
var vertragstyp_kurzbz = document.getElementById('lehrveranstaltung-noten-pruefung-menulist-vertragstyp').value;
|
||||
var anmerkung = document.getElementById('lehrveranstaltung-noten-pruefung-textbox-anmerkung').value;
|
||||
var vertragsdatum = document.getElementById('lehrveranstaltung-noten-pruefung-box-datum').iso;
|
||||
|
||||
satz = satz.replace(',','.');
|
||||
|
||||
if(mitarbeiter_uid == '' || satz == '' || anzahl == '' || vertragstyp_kurzbz=='')
|
||||
@@ -2604,16 +2616,13 @@ function LehrveranstaltungNotenPruefungSave()
|
||||
|
||||
var req = new phpRequest('mitarbeiter/mitarbeiterDBDML.php','','');
|
||||
|
||||
var heute = new Date();
|
||||
var datum = '';
|
||||
datum = heute.getFullYear()+'-'+(heute.getMonth()+1)+'-'+heute.getDate();
|
||||
req.add('type', 'vertraggenerate');
|
||||
req.add('mitarbeiter_uid', mitarbeiter_uid);
|
||||
req.add('vertragstyp_kurzbz', vertragstyp_kurzbz);
|
||||
req.add('betrag', gesamt);
|
||||
req.add('bezeichnung', 'Pruefungshonorar '+lv_studiengang+' '+lv_semester+' '+lv_bezeichnung+' '+lehrveranstaltung_id);
|
||||
req.add('anmerkung', anmerkung);
|
||||
req.add('vertragsdatum', datum);
|
||||
req.add('vertragsdatum', vertragsdatum);
|
||||
req.add('lehrveranstaltung_id',lehrveranstaltung_id);
|
||||
|
||||
var response = req.executePOST();
|
||||
@@ -2636,3 +2645,14 @@ function LehrveranstaltungNotenPruefungSave()
|
||||
document.getElementById('lehrveranstaltung-noten-pruefung-textbox-anmerkung').value='';
|
||||
}
|
||||
}
|
||||
|
||||
function LehrveranstaltungLVGesamtNotenTreeSort()
|
||||
{
|
||||
// Nach dem Sortieren der Noten die Unterschiede erneut markieren
|
||||
// da sonst nach dem sortieren falsche Eintraege markiert sind
|
||||
window.setTimeout(LehrveranstaltungGesamtNotenTreeSelectDifferent,20);
|
||||
}
|
||||
|
||||
function LehrveranstaltungNotenTreeSort()
|
||||
{
|
||||
}
|
||||
|
||||
@@ -201,6 +201,10 @@ echo '<?xul-overlay href="'.APP_ROOT.'content/lvplanung/lehrveranstaltungnotenov
|
||||
class="sortDirectionIndicator"
|
||||
sort="rdf:http://www.technikum-wien.at/lehrveranstaltung_einheiten/rdf#lehrtyp_kurzbz"/>
|
||||
<splitter class="tree-splitter"/>
|
||||
<treecol id="lehrveranstaltung-treecol-studiensemester_kurzbz" label="Studiensemester" flex="1" hidden="true" persist="hidden, width, ordinal"
|
||||
class="sortDirectionIndicator"
|
||||
sort="rdf:http://www.technikum-wien.at/lehrveranstaltung_einheiten/rdf#studiensemester_kurzbz"/>
|
||||
<splitter class="tree-splitter"/>
|
||||
</treecols>
|
||||
|
||||
<template>
|
||||
@@ -233,6 +237,7 @@ echo '<?xul-overlay href="'.APP_ROOT.'content/lvplanung/lehrveranstaltungnotenov
|
||||
<treecell label="rdf:http://www.technikum-wien.at/lehrveranstaltung_einheiten/rdf#studienplan_id"/>
|
||||
<treecell label="rdf:http://www.technikum-wien.at/lehrveranstaltung_einheiten/rdf#studienplan_bezeichnung"/>
|
||||
<treecell label="rdf:http://www.technikum-wien.at/lehrveranstaltung_einheiten/rdf#lehrtyp_kurzbz"/>
|
||||
<treecell label="rdf:http://www.technikum-wien.at/lehrveranstaltung_einheiten/rdf#studiensemester_kurzbz"/>
|
||||
</treerow>
|
||||
</treeitem>
|
||||
</treechildren>
|
||||
|
||||
+37
-6
@@ -24,6 +24,7 @@ var MessagePersonID=null;
|
||||
var MessagesTreeDatasource=''; // Datasource des Adressen Trees
|
||||
var MessagesSelectID='';
|
||||
var MessageSenderPersonID='';
|
||||
var MessageIFrameIsInitialized=false;
|
||||
|
||||
var MessagesTreeSinkObserver =
|
||||
{
|
||||
@@ -102,9 +103,9 @@ function MessagesNewMessage()
|
||||
else
|
||||
{
|
||||
var prestudentIdArray = getMultipleTreeCellText(tree, 'student-treecol-prestudent_id');
|
||||
|
||||
|
||||
var action = '<?php echo APP_ROOT ?>index.ci.php/system/Messages/write/' + MessageSenderPersonID;
|
||||
|
||||
|
||||
openWindowPostArray(action, 'prestudent_id', prestudentIdArray);
|
||||
}
|
||||
}
|
||||
@@ -116,7 +117,7 @@ function MessagesSendAnswer()
|
||||
{
|
||||
var messagesTree = document.getElementById('messages-tree');
|
||||
var studentsTree = parent.document.getElementById('student-tree');
|
||||
|
||||
|
||||
if (messagesTree.currentIndex == -1)
|
||||
{
|
||||
alert("Bitte markieren Sie zuerst eine Nachricht");
|
||||
@@ -126,9 +127,9 @@ function MessagesSendAnswer()
|
||||
var MessageId = getTreeCellText(messagesTree, 'messages-tree-message_id', messagesTree.currentIndex);
|
||||
var RecipientID = getTreeCellText(messagesTree, 'messages-tree-recipient_id', messagesTree.currentIndex);
|
||||
var prestudentIdArray = new Array(getTreeCellText(studentsTree, 'student-treecol-prestudent_id', studentsTree.currentIndex));
|
||||
|
||||
|
||||
var action = '<?php echo APP_ROOT ?>index.ci.php/system/Messages/write/' + MessageSenderPersonID + '/' + MessageId + '/' + RecipientID;
|
||||
|
||||
|
||||
openWindowPostArray(action, 'prestudent_id', prestudentIdArray);
|
||||
}
|
||||
}
|
||||
@@ -156,5 +157,35 @@ function MessageAuswahl()
|
||||
document.getElementById('messages-button-answer').disabled=false;
|
||||
}
|
||||
}
|
||||
document.getElementById('message-wysiwyg').value=text;
|
||||
|
||||
MessagesIFrameSetHTML(text);
|
||||
}
|
||||
|
||||
function MessagesIFrameSetHTML(val)
|
||||
{
|
||||
MessageIFrameInit();
|
||||
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
|
||||
editor = document.getElementById('message-wysiwyg');
|
||||
|
||||
if(editor.contentWindow.document.body.innerHTML!='')
|
||||
{
|
||||
//Inhalt leeren
|
||||
editor.contentDocument.execCommand("selectall", false, null);
|
||||
editor.contentDocument.execCommand("delete", false, null);
|
||||
}
|
||||
//Value setzen
|
||||
if(val!='')
|
||||
editor.contentDocument.execCommand("inserthtml", false, val);
|
||||
}
|
||||
|
||||
function MessageIFrameInit()
|
||||
{
|
||||
if(!MessageIFrameIsInitialized)
|
||||
{
|
||||
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
|
||||
editor = document.getElementById('message-wysiwyg');
|
||||
editor.contentDocument.designMode = 'on';
|
||||
editor.style.backgroundColor="#FFFFFF";
|
||||
MessageIFrameIsInitialized=true;
|
||||
}
|
||||
}
|
||||
@@ -73,7 +73,7 @@ echo ']>
|
||||
<button oncommand="MessagesSendAnswer()" id="messages-button-answer" label="Antworten"/>
|
||||
</hbox>
|
||||
|
||||
<hbox>
|
||||
<hbox flex="1">
|
||||
|
||||
<tree id="messages-tree" seltype="single" hidecolumnpicker="false" flex="1"
|
||||
datasources="rdf:null" ref="http://www.technikum-wien.at/messages"
|
||||
@@ -142,8 +142,11 @@ echo ']>
|
||||
</treechildren>
|
||||
</template>
|
||||
</tree>
|
||||
<splitter collapse="after" persist="state">
|
||||
<grippy />
|
||||
</splitter>
|
||||
<iframe id="message-wysiwyg" editortype="html" src="about:blank" flex="1" type="content-primary" style="min-width: 100px; min-height: 100px; border: 1px solid gray; margin: 10px;"/>
|
||||
</hbox>
|
||||
<box class="WYSIWYG" id="message-wysiwyg" flex="1"/>
|
||||
<spacer flex="1" />
|
||||
|
||||
</vbox>
|
||||
</window>
|
||||
|
||||
+110
-110
@@ -45,7 +45,7 @@ echo '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>';
|
||||
<xul:toolbarbutton anonid="toolbarbutton-notiz-neu" label="Neue Notiz" oncommand="document.getBindingParent(this).NeueNotiz()" image="<?php echo APP_ROOT;?>skin/images/NeuDokument.png" tooltiptext="Neue Notiz anlegen" />
|
||||
<xul:toolbarbutton anonid="toolbarbutton-notiz-del" label="Loeschen" oncommand="document.getBindingParent(this).Loeschen()" image="<?php echo APP_ROOT;?>skin/images/DeleteIcon.png" disabled="true" tooltiptext="Notiz löschen"/>
|
||||
<xul:toolbarbutton anonid="toolbarbutton-notiz-aktualisieren" label="Aktualisieren" oncommand="document.getBindingParent(this).RefreshNotiz()" image="<?php echo APP_ROOT;?>skin/images/refresh.png" tooltiptext="Liste neu laden"/>
|
||||
<xul:toolbarbutton anonid="toolbarbutton-notiz-filter" label="Filter" type="menu">
|
||||
<xul:toolbarbutton anonid="toolbarbutton-notiz-filter" label="Filter" type="menu">
|
||||
<xul:menupopup>
|
||||
<xul:menuitem label="Alle Notizen anzeigen" oncommand="document.getBindingParent(this).LoadNotizTree(document.getBindingParent(this).getAttribute('projekt_kurzbz'),document.getBindingParent(this).getAttribute('projektphase_id'),document.getBindingParent(this).getAttribute('projekttask_id'),document.getBindingParent(this).getAttribute('uid'),document.getBindingParent(this).getAttribute('person_id'),document.getBindingParent(this).getAttribute('prestudent_id'),document.getBindingParent(this).getAttribute('bestellung_id'), document.getBindingParent(this).getAttribute('user'), document.getBindingParent(this).getAttribute('lehreinheit_id'), null, document.getBindingParent(this).getAttribute('anrechnung_id'));" tooltiptext="Alle Notizen anzeigen"/>
|
||||
<xul:menuitem label="nur offene Notizen anzeigen" oncommand="document.getBindingParent(this).LoadNotizTree(document.getBindingParent(this).getAttribute('projekt_kurzbz'),document.getBindingParent(this).getAttribute('projektphase_id'),document.getBindingParent(this).getAttribute('projekttask_id'),document.getBindingParent(this).getAttribute('uid'),document.getBindingParent(this).getAttribute('person_id'),document.getBindingParent(this).getAttribute('prestudent_id'),document.getBindingParent(this).getAttribute('bestellung_id'), document.getBindingParent(this).getAttribute('user'), document.getBindingParent(this).getAttribute('lehreinheit_id'), false, document.getBindingParent(this).getAttribute('anrechnung_id'));" tooltiptext="nur offene Notizen anzeigen"/>
|
||||
@@ -60,34 +60,34 @@ echo '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>';
|
||||
onselect="document.getBindingParent(this).edit(event);"
|
||||
flags="dont-build-content" style="min-height: 60px"
|
||||
>
|
||||
|
||||
|
||||
<xul:treecols>
|
||||
<xul:treecol anonid="treecol-notiz-titel" label="Titel" flex="5" primary="true" persist="hidden width ordinal"
|
||||
class="sortDirectionIndicator" sortActive="true"
|
||||
class="sortDirectionIndicator"
|
||||
sort="rdf:http://www.technikum-wien.at/notiz/rdf#titel" />
|
||||
<xul:splitter class="tree-splitter"/>
|
||||
<xul:treecol anonid="treecol-notiz-text" label="Text" flex="2" hidden="false" persist="hidden width ordinal"
|
||||
class="sortDirectionIndicator"
|
||||
class="sortDirectionIndicator"
|
||||
sort="rdf:http://www.technikum-wien.at/notiz/rdf#text" />
|
||||
<xul:splitter class="tree-splitter"/>
|
||||
<xul:treecol anonid="treecol-notiz-verfasser" label="Verfasser" flex="2" hidden="false" persist="hidden width ordinal"
|
||||
class="sortDirectionIndicator"
|
||||
class="sortDirectionIndicator"
|
||||
sort="rdf:http://www.technikum-wien.at/notiz/rdf#verfasser_uid" />
|
||||
<xul:splitter class="tree-splitter"/>
|
||||
<xul:treecol anonid="treecol-notiz-bearbeiter" label="Bearbeiter" flex="2" hidden="true" persist="hidden width ordinal"
|
||||
class="sortDirectionIndicator"
|
||||
class="sortDirectionIndicator"
|
||||
sort="rdf:http://www.technikum-wien.at/notiz/rdf#bearbeiter_uid" />
|
||||
<xul:splitter class="tree-splitter"/>
|
||||
<xul:treecol anonid="treecol-notiz-start" label="Start" flex="2" hidden="false" persist="hidden width ordinal"
|
||||
class="sortDirectionIndicator"
|
||||
class="sortDirectionIndicator" sortActive="true" sortDirection="descending"
|
||||
sort="rdf:http://www.technikum-wien.at/notiz/rdf#startISO" />
|
||||
<xul:splitter class="tree-splitter"/>
|
||||
<xul:treecol anonid="treecol-notiz-ende" label="Ende" flex="2" hidden="false" persist="hidden width ordinal"
|
||||
class="sortDirectionIndicator"
|
||||
class="sortDirectionIndicator"
|
||||
sort="rdf:http://www.technikum-wien.at/notiz/rdf#endeISO" />
|
||||
<xul:splitter class="tree-splitter"/>
|
||||
<xul:treecol anonid="treecol-notiz-dokumente" label="Dokumente" flex="2" hidden="false" persist="hidden width ordinal"
|
||||
class="sortDirectionIndicator"
|
||||
class="sortDirectionIndicator"
|
||||
sort="rdf:http://www.technikum-wien.at/notiz/rdf#dokumente" />
|
||||
<xul:splitter class="tree-splitter"/>
|
||||
<xul:treecol anonid="treecol-notiz-erledigt" label="Erledigt" flex="2" hidden="false" persist="hidden width ordinal"
|
||||
@@ -106,7 +106,7 @@ echo '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>';
|
||||
class="sortDirectionIndicator"
|
||||
sort="rdf:http://www.technikum-wien.at/notiz/rdf#endeISO" />
|
||||
</xul:treecols>
|
||||
|
||||
|
||||
<xul:template>
|
||||
<xul:rule>
|
||||
<xul:treechildren>
|
||||
@@ -138,7 +138,7 @@ echo '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>';
|
||||
</xul:splitter>
|
||||
<xul:vbox flex="1">
|
||||
<xul:textbox anonid="textbox-notiz-notiz_id" hidden="true"/>
|
||||
|
||||
|
||||
<xul:groupbox flex="1">
|
||||
<xul:caption anonid="caption-notiz-detail" label="Neue Notiz"/>
|
||||
<xul:grid anonid="grid-notiz-detail" style="overflow:auto;margin:4px;" flex="1">
|
||||
@@ -188,7 +188,7 @@ echo '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>';
|
||||
<xul:menulist anonid="menulist-notiz-bearbeiter"
|
||||
editable="true" flex="1"
|
||||
datasources="rdf:null"
|
||||
ref="http://www.technikum-wien.at/mitarbeiter/liste"
|
||||
ref="http://www.technikum-wien.at/mitarbeiter/liste"
|
||||
oninput="document.getBindingParent(this).BearbeiterLoad(this);"
|
||||
oncommand=""
|
||||
>
|
||||
@@ -201,7 +201,7 @@ echo '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>';
|
||||
</xul:template>
|
||||
</xul:menulist>
|
||||
</xul:hbox>
|
||||
|
||||
|
||||
</xul:hbox>
|
||||
</xul:row>
|
||||
<xul:row>
|
||||
@@ -247,7 +247,7 @@ echo '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>';
|
||||
<![CDATA[
|
||||
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
|
||||
tree = document.getAnonymousElementByAttribute(this ,'anonid', 'tree-notiz');
|
||||
|
||||
|
||||
var direction = treecol.getAttribute("sortDirection");
|
||||
var current = treecol.parentNode.firstChild;
|
||||
while (current) {
|
||||
@@ -262,7 +262,7 @@ echo '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>';
|
||||
} else {
|
||||
direction = "ascending";
|
||||
treecol.setAttribute("sortDirection",direction);
|
||||
}
|
||||
}
|
||||
var sortService = Components.classes["@mozilla.org/xul/xul-sort-service;1"].
|
||||
getService(Components.interfaces.nsIXULSortService);
|
||||
sortService.sort(tree, treecol.getAttribute('sort'), direction);
|
||||
@@ -326,9 +326,9 @@ echo '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>';
|
||||
var start = document.getAnonymousElementByAttribute(this ,'anonid', 'box-notiz-start').iso;
|
||||
var ende = document.getAnonymousElementByAttribute(this ,'anonid', 'box-notiz-ende').iso;
|
||||
var verfasser_uid = document.getAnonymousElementByAttribute(this ,'anonid', 'textbox-notiz-verfasser').value;
|
||||
|
||||
|
||||
menulist = document.getAnonymousElementByAttribute(this ,'anonid', 'menulist-notiz-bearbeiter');
|
||||
|
||||
|
||||
//Es kann sein, dass im Eingabefeld nichts steht und
|
||||
//trotzdem ein Eintrag auf selected gesetzt ist.
|
||||
//In diesem Fall soll aber kein Wert zurueckgegeben werden
|
||||
@@ -337,7 +337,7 @@ echo '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>';
|
||||
bearbeiter_uid='';
|
||||
}
|
||||
else
|
||||
{
|
||||
{
|
||||
//Wenn es Selektierte Eintraege gibt, dann den value zurueckliefern
|
||||
var children = menulist.getElementsByAttribute('selected','true');
|
||||
if(children.length>0)
|
||||
@@ -345,9 +345,9 @@ echo '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>';
|
||||
else
|
||||
bearbeiter_uid = '';
|
||||
}
|
||||
|
||||
|
||||
var erledigt = document.getAnonymousElementByAttribute(this ,'anonid', 'checkbox-notiz-erledigt').checked;
|
||||
|
||||
|
||||
var projekt_kurzbz = this.getAttribute('projekt_kurzbz');
|
||||
var projektphase_id = this.getAttribute('projektphase_id');
|
||||
var projekttask_id = this.getAttribute('projekttask_id');
|
||||
@@ -357,11 +357,11 @@ echo '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>';
|
||||
var bestellung_id = this.getAttribute('bestellung_id');
|
||||
var lehreinheit_id = this.getAttribute('lehreinheit_id');
|
||||
var anrechnung_id = this.getAttribute('anrechnung_id');
|
||||
|
||||
|
||||
var soapBody = new SOAPObject("saveNotiz");
|
||||
//soapBody.appendChild(new SOAPObject("username")).val('joe');
|
||||
//soapBody.appendChild(new SOAPObject("passwort")).val('waschl');
|
||||
|
||||
|
||||
var notiz = new SOAPObject("notiz");
|
||||
notiz.appendChild(new SOAPObject("notiz_id")).val(notiz_id);
|
||||
notiz.appendChild(new SOAPObject("titel")).cdataval(titel);
|
||||
@@ -371,7 +371,7 @@ echo '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>';
|
||||
notiz.appendChild(new SOAPObject("start")).val(start);
|
||||
notiz.appendChild(new SOAPObject("ende")).val(ende);
|
||||
notiz.appendChild(new SOAPObject("erledigt")).val(erledigt);
|
||||
|
||||
|
||||
notiz.appendChild(new SOAPObject("projekt_kurzbz")).val(projekt_kurzbz);
|
||||
notiz.appendChild(new SOAPObject("projektphase_id")).val(projektphase_id);
|
||||
notiz.appendChild(new SOAPObject("projekttask_id")).val(projekttask_id);
|
||||
@@ -382,11 +382,11 @@ echo '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>';
|
||||
notiz.appendChild(new SOAPObject("lehreinheit_id")).val(lehreinheit_id);
|
||||
notiz.appendChild(new SOAPObject("anrechnung_id")).val(anrechnung_id);
|
||||
soapBody.appendChild(notiz);
|
||||
|
||||
|
||||
var sr = new SOAPRequest("saveNotiz",soapBody);
|
||||
|
||||
|
||||
SOAPClient.Proxy="<?php echo APP_ROOT;?>soap/notiz.soap.php?"+gettimestamp();
|
||||
|
||||
|
||||
function mycallb(obj) {
|
||||
var me=obj;
|
||||
this.invoke=function (respObj) {
|
||||
@@ -412,11 +412,11 @@ echo '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>';
|
||||
me.RefreshNotiz();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
var cb=new mycallb(this);
|
||||
|
||||
|
||||
SOAPClient.SendRequest(sr, cb.invoke);
|
||||
|
||||
|
||||
]]>
|
||||
</body>
|
||||
</method>
|
||||
@@ -451,9 +451,9 @@ echo '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>';
|
||||
<method name="Loeschen">
|
||||
<body>
|
||||
<![CDATA[
|
||||
|
||||
|
||||
var notiz_id = document.getAnonymousElementByAttribute(this ,'anonid', 'textbox-notiz-notiz_id').value;
|
||||
|
||||
|
||||
// falls nichts markiert ist
|
||||
if(notiz_id =='')
|
||||
alert('Keine Notiz ausgewählt')
|
||||
@@ -465,11 +465,11 @@ echo '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>';
|
||||
document.getAnonymousElementByAttribute(this ,'anonid', 'button-notiz-upload-dokument').disabled=true;
|
||||
var soapBody = new SOAPObject("deleteNotiz");
|
||||
soapBody.appendChild(new SOAPObject("notiz_id")).val(notiz_id);
|
||||
|
||||
|
||||
var sr = new SOAPRequest("deleteNotiz",soapBody);
|
||||
|
||||
|
||||
SOAPClient.Proxy="<?php echo APP_ROOT;?>soap/notiz.soap.php?"+gettimestamp();
|
||||
|
||||
|
||||
function mycallb(obj) {
|
||||
var me=obj;
|
||||
this.invoke=function (respObj) {
|
||||
@@ -494,16 +494,16 @@ echo '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>';
|
||||
me.RefreshNotiz();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
var cb=new mycallb(this);
|
||||
|
||||
|
||||
SOAPClient.SendRequest(sr, cb.invoke);
|
||||
}
|
||||
}
|
||||
]]>
|
||||
</body>
|
||||
</method>
|
||||
|
||||
|
||||
<method name="updateErledigt">
|
||||
<parameter name="event"/>
|
||||
<body>
|
||||
@@ -512,13 +512,13 @@ echo '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>';
|
||||
var col = new Object();
|
||||
var childElt = new Object();
|
||||
//Tree holen
|
||||
var tree = event.currentTarget;
|
||||
var tree = event.currentTarget;
|
||||
//Treecol ermitteln in die geklickt wurde
|
||||
tree.treeBoxObject.getCellAt(event.clientX, event.clientY, row, col, childElt);
|
||||
//abbrechen wenn auf Header oder Scrollbar geklickt wurde
|
||||
if(!col.value)
|
||||
return 0;
|
||||
|
||||
|
||||
var val = tree.view.getCellValue(row.value, col.value);
|
||||
var text = tree.view.getCellText(row.value, col.value);
|
||||
var newval='false';
|
||||
@@ -526,11 +526,11 @@ echo '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>';
|
||||
newval='false';
|
||||
else
|
||||
newval='true';
|
||||
|
||||
|
||||
var col_id = tree.columns.getColumnFor(document.getAnonymousElementByAttribute(this ,'anonid', 'treecol-notiz-notiz_id'));
|
||||
var id = tree.view.getCellText(row.value, col_id);
|
||||
document.getAnonymousElementByAttribute(this ,'anonid', 'toolbarbutton-notiz-del').disabled=false;
|
||||
|
||||
document.getAnonymousElementByAttribute(this ,'anonid', 'toolbarbutton-notiz-del').disabled=false;
|
||||
|
||||
if(text=='erledigt')
|
||||
{
|
||||
var soapBody = new SOAPObject("setErledigt");
|
||||
@@ -539,7 +539,7 @@ echo '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>';
|
||||
|
||||
var sr = new SOAPRequest("setErledigt",soapBody);
|
||||
SOAPClient.Proxy="<?php echo APP_ROOT;?>soap/notiz.soap.php?"+gettimestamp();
|
||||
|
||||
|
||||
function mycallb(obj) {
|
||||
var me=obj;
|
||||
this.invoke=function (respObj) {
|
||||
@@ -556,9 +556,9 @@ echo '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>';
|
||||
me.RefreshNotiz();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
var cb=new mycallb(this);
|
||||
|
||||
|
||||
SOAPClient.SendRequest(sr,cb.invoke);
|
||||
}
|
||||
]]>
|
||||
@@ -569,7 +569,7 @@ echo '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>';
|
||||
<body>
|
||||
<![CDATA[
|
||||
var id = this.value;
|
||||
|
||||
|
||||
if(id!='')
|
||||
{
|
||||
var notizdoks = document.getAnonymousElementByAttribute(this ,'anonid', 'hbox-notiz-dokumente');
|
||||
@@ -577,22 +577,22 @@ echo '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>';
|
||||
{
|
||||
notizdoks.removeChild(notizdoks.firstChild);
|
||||
}
|
||||
|
||||
|
||||
this.DisableDetails(false);
|
||||
document.getAnonymousElementByAttribute(this ,'anonid', 'button-notiz-upload-dokument').disabled=false;
|
||||
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
|
||||
//Daten holen
|
||||
var url = '<?php echo APP_ROOT ?>rdf/notiz.rdf.php?notiz_id='+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/notiz/" + id);
|
||||
|
||||
|
||||
var predicateNS = "http://www.technikum-wien.at/notiz/rdf";
|
||||
|
||||
|
||||
//RDF parsen
|
||||
titel = getTargetHelper(dsource,subject,rdfService.GetResource( predicateNS + "#titel" ));
|
||||
text = getTargetHelper(dsource,subject,rdfService.GetResource( predicateNS + "#text" ));
|
||||
@@ -602,12 +602,12 @@ echo '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>';
|
||||
bearbeiter = getTargetHelper(dsource,subject,rdfService.GetResource( predicateNS + "#bearbeiter_uid" ));
|
||||
updateamum = getTargetHelper(dsource,subject,rdfService.GetResource( predicateNS + "#updateamum" ));
|
||||
erledigt = getTargetHelper(dsource,subject,rdfService.GetResource( predicateNS + "#erledigt" ));
|
||||
|
||||
|
||||
if(erledigt=='true')
|
||||
erledigt=true;
|
||||
else
|
||||
erledigt=false;
|
||||
|
||||
|
||||
document.getAnonymousElementByAttribute(this ,'anonid', 'textbox-notiz-notiz_id').value=id;
|
||||
document.getAnonymousElementByAttribute(this ,'anonid', 'textbox-notiz-titel').value=titel;
|
||||
document.getAnonymousElementByAttribute(this ,'anonid', 'textbox-notiz-text').value=text;
|
||||
@@ -621,43 +621,43 @@ echo '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>';
|
||||
{
|
||||
menulist = document.getAnonymousElementByAttribute(this ,'anonid', 'menulist-notiz-bearbeiter');
|
||||
this.BearbeiterLoad(menulist, bearbeiter);
|
||||
|
||||
|
||||
var children = menulist.getElementsByAttribute('value',bearbeiter);
|
||||
menulist.selectedItem=children[0];
|
||||
menulist.selectedItem=children[0];
|
||||
}
|
||||
else
|
||||
{
|
||||
menulist = document.getAnonymousElementByAttribute(this ,'anonid', 'menulist-notiz-bearbeiter');
|
||||
this.BearbeiterLoad(menulist, bearbeiter);
|
||||
|
||||
|
||||
var children = menulist.getElementsByAttribute('value',bearbeiter);
|
||||
menulist.selectedItem=null;
|
||||
}
|
||||
document.getAnonymousElementByAttribute(this ,'anonid', 'caption-notiz-detail').label="Bearbeiten";
|
||||
|
||||
|
||||
// Dokumente auslesen
|
||||
var url = '<?php echo APP_ROOT ?>rdf/dms.rdf.php?notiz_id='+id+'&'+gettimestamp();
|
||||
|
||||
|
||||
var rdfService = Components.classes["@mozilla.org/rdf/rdf-service;1"].
|
||||
getService(Components.interfaces.nsIRDFService);
|
||||
|
||||
dsource = rdfService.GetDataSourceBlocking(url);
|
||||
|
||||
// Alle Elemente aus dem RDF holen
|
||||
var dsResources = dsource.GetAllResources();
|
||||
var thisResource = null;
|
||||
var dsResources = dsource.GetAllResources();
|
||||
var thisResource = null;
|
||||
|
||||
// Durchlaufen der Elemente
|
||||
while(dsResources.hasMoreElements())
|
||||
{
|
||||
thisResource = dsResources.getNext().QueryInterface( Components.interfaces.nsIRDFResource);
|
||||
{
|
||||
thisResource = dsResources.getNext().QueryInterface( Components.interfaces.nsIRDFResource);
|
||||
|
||||
var predicateNS = "http://www.technikum-wien.at/dms/rdf";
|
||||
|
||||
//Spalten holen
|
||||
name = getTargetHelper(dsource,thisResource,rdfService.GetResource( predicateNS + "#name" ));
|
||||
dms_id = getTargetHelper(dsource,thisResource,rdfService.GetResource( predicateNS + "#dms_id" ));
|
||||
|
||||
|
||||
if(dms_id!='')
|
||||
{
|
||||
// Download-Link für Dokument einfügen
|
||||
@@ -667,7 +667,7 @@ echo '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>';
|
||||
dokbtn.setAttribute("onclick", "window.open('"+dokurl+"')");
|
||||
dokbtn.setAttribute("style", "margin-right: -5px;");
|
||||
document.getAnonymousElementByAttribute(this ,'anonid', 'hbox-notiz-dokumente').appendChild(dokbtn);
|
||||
|
||||
|
||||
// Link zum Löschen des Dokuments
|
||||
var delbtn = document.createElement("button");
|
||||
delbtn.setAttribute("image", "<?php echo APP_ROOT;?>skin/images/delete_x.png");
|
||||
@@ -686,16 +686,16 @@ echo '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>';
|
||||
<body>
|
||||
<![CDATA[
|
||||
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
|
||||
|
||||
|
||||
if(typeof(filter)=='undefined')
|
||||
v = menulist.value;
|
||||
else
|
||||
v = filter;
|
||||
|
||||
|
||||
if(v.length>2)
|
||||
{
|
||||
{
|
||||
var url = '<?php echo APP_ROOT; ?>rdf/mitarbeiter.rdf.php?filter='+encodeURIComponent(v)+'&'+gettimestamp();
|
||||
|
||||
|
||||
var oldDatasources = menulist.database.GetDataSources();
|
||||
while(oldDatasources.hasMoreElements())
|
||||
{
|
||||
@@ -703,7 +703,7 @@ echo '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>';
|
||||
}
|
||||
//Refresh damit die entfernten DS auch wirklich entfernt werden
|
||||
menulist.builder.rebuild();
|
||||
|
||||
|
||||
var rdfService = Components.classes["@mozilla.org/rdf/rdf-service;1"].getService(Components.interfaces.nsIRDFService);
|
||||
if(typeof(filter)=='undefined')
|
||||
var datasource = rdfService.GetDataSource(url);
|
||||
@@ -734,7 +734,7 @@ echo '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>';
|
||||
<![CDATA[
|
||||
//debug('LoadNotizTree');
|
||||
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
|
||||
|
||||
|
||||
try
|
||||
{
|
||||
this.initialsiert=false;
|
||||
@@ -744,8 +744,8 @@ echo '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>';
|
||||
this.DisableControls(false);
|
||||
this.DisableDetails(true);
|
||||
this.ResetDetails();
|
||||
|
||||
|
||||
|
||||
|
||||
this.setAttribute('projekt_kurzbz',projekt_kurzbz);
|
||||
this.setAttribute('projektphase_id',projektphase_id);
|
||||
this.setAttribute('projekttask_id',projekttask_id);
|
||||
@@ -755,18 +755,18 @@ echo '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>';
|
||||
this.setAttribute('bestellung_id',bestellung_id);
|
||||
this.setAttribute('user',user);
|
||||
this.setAttribute('lehreinheit_id',lehreinheit_id);
|
||||
|
||||
//Wenn kein Erledigt Parameter uebergeben wird, dann wird die zuletzt
|
||||
|
||||
//Wenn kein Erledigt Parameter uebergeben wird, dann wird die zuletzt
|
||||
//verwendete Einstellung verwendet
|
||||
if(typeof erledigt=="undefined")
|
||||
erledigt = this.getAttribute('erledigt');
|
||||
|
||||
if(typeof erledigt!="undefined")
|
||||
this.setAttribute('erledigt',erledigt);
|
||||
|
||||
|
||||
if(typeof anrechnung_id=="undefined")
|
||||
anrechnung_id = '';
|
||||
|
||||
|
||||
if(typeof anrechnung_id!="undefined")
|
||||
this.setAttribute('anrechnung_id',anrechnung_id);
|
||||
|
||||
@@ -786,9 +786,9 @@ echo '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>';
|
||||
datasource = datasource+"&erledigt=true";
|
||||
else if((typeof erledigt=="boolean" && erledigt==false) || (typeof erledigt=="string" && erledigt=='false'))
|
||||
datasource = datasource+"&erledigt=false";
|
||||
|
||||
|
||||
datasource = datasource+"&anrechnung_id="+encodeURIComponent(anrechnung_id);
|
||||
|
||||
|
||||
//debug('Source:'+datasource);
|
||||
var tree = document.getAnonymousElementByAttribute(this ,'anonid', 'tree-notiz');
|
||||
|
||||
@@ -798,34 +798,34 @@ echo '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>';
|
||||
{
|
||||
tree.database.RemoveDataSource(oldDatasources.getNext());
|
||||
}
|
||||
|
||||
|
||||
var rdfService = Components.classes["@mozilla.org/rdf/rdf-service;1"].getService(Components.interfaces.nsIRDFService);
|
||||
this.TreeNotizDatasource = rdfService.GetDataSource(datasource);
|
||||
this.TreeNotizDatasource.QueryInterface(Components.interfaces.nsIRDFRemoteDataSource);
|
||||
this.TreeNotizDatasource.QueryInterface(Components.interfaces.nsIRDFXMLSink);
|
||||
tree.database.AddDataSource(this.TreeNotizDatasource);
|
||||
|
||||
|
||||
this.TreeNotizDatasource.addXMLSinkObserver({
|
||||
notiz: this,
|
||||
onBeginLoad: function(aSink)
|
||||
{},
|
||||
|
||||
|
||||
onInterrupt: function(aSink)
|
||||
{},
|
||||
|
||||
|
||||
onResume: function(aSink)
|
||||
{},
|
||||
|
||||
|
||||
onEndLoad: function(aSink)
|
||||
{
|
||||
{
|
||||
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
|
||||
|
||||
|
||||
//aSink.removeXMLSinkObserver(this);
|
||||
//debug('onEndLoad start Rebuild');
|
||||
var tree = document.getAnonymousElementByAttribute(this.notiz ,'anonid', 'tree-notiz');
|
||||
tree.builder.rebuild();
|
||||
},
|
||||
|
||||
|
||||
onError: function(aSink, aStatus, aErrorMsg)
|
||||
{ alert("error! " + aErrorMsg); }
|
||||
});
|
||||
@@ -843,7 +843,7 @@ echo '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>';
|
||||
notiz.selectItem();
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
catch(e)
|
||||
{
|
||||
@@ -859,7 +859,7 @@ echo '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>';
|
||||
if(tree.view)
|
||||
{
|
||||
var items = tree.view.rowCount; //Anzahl der Zeilen ermitteln
|
||||
|
||||
|
||||
//In der globalen Variable ist die zu selektierende ID gespeichert
|
||||
if(this.selectID!=null)
|
||||
{
|
||||
@@ -868,7 +868,7 @@ echo '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>';
|
||||
//id der row holen
|
||||
var col = tree.columns.getColumnFor(document.getAnonymousElementByAttribute(this ,'anonid', 'treecol-notiz-notiz_id'));
|
||||
id = tree.view.getCellText(i, col);
|
||||
|
||||
|
||||
//wenn dies die zu selektierende Zeile
|
||||
if(this.selectID==id)
|
||||
{
|
||||
@@ -877,21 +877,21 @@ echo '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>';
|
||||
//Sicherstellen, dass die Zeile im sichtbaren Bereich liegt
|
||||
tree.treeBoxObject.ensureRowIsVisible(i);
|
||||
this.selectID=null;
|
||||
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]]>
|
||||
</body>
|
||||
</method>
|
||||
|
||||
|
||||
<method name="UploadDokument">
|
||||
<body>
|
||||
<![CDATA[
|
||||
notiz_id = document.getAnonymousElementByAttribute(this ,'anonid', 'textbox-notiz-notiz_id').value;
|
||||
|
||||
|
||||
if(notiz_id != '')
|
||||
{
|
||||
NotizDokumentUploadScope = this;
|
||||
@@ -903,13 +903,13 @@ echo '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>';
|
||||
]]>
|
||||
</body>
|
||||
</method>
|
||||
|
||||
|
||||
<method name="LoeschenDokument">
|
||||
<parameter name="dms_id"/>
|
||||
<parameter name="dateiname"/>
|
||||
<body>
|
||||
<![CDATA[
|
||||
|
||||
|
||||
//Abfrage ob wirklich geloescht werden soll
|
||||
if (confirm('Wollen Sie die Datei '+dateiname+' wirklich loeschen?'))
|
||||
{
|
||||
@@ -948,39 +948,39 @@ echo '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>';
|
||||
var cb=new mycallb(this);
|
||||
|
||||
SOAPClient.SendRequest(sr, cb.invoke);
|
||||
|
||||
|
||||
// Alle Download-Buttons der Dokumente entfernen
|
||||
var notizdoks = document.getAnonymousElementByAttribute(this ,'anonid', 'hbox-notiz-dokumente');
|
||||
while(notizdoks.hasChildNodes())
|
||||
{
|
||||
notizdoks.removeChild(notizdoks.firstChild);
|
||||
}
|
||||
|
||||
|
||||
// Dokumente auslesen
|
||||
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
|
||||
var id = document.getAnonymousElementByAttribute(this ,'anonid', 'textbox-notiz-notiz_id').value;
|
||||
var url = '<?php echo APP_ROOT ?>rdf/dms.rdf.php?notiz_id='+id+'&'+gettimestamp();
|
||||
|
||||
|
||||
var rdfService = Components.classes["@mozilla.org/rdf/rdf-service;1"].
|
||||
getService(Components.interfaces.nsIRDFService);
|
||||
|
||||
dsource = rdfService.GetDataSourceBlocking(url);
|
||||
|
||||
// Alle Elemente aus dem RDF holen
|
||||
var dsResources = dsource.GetAllResources();
|
||||
var thisResource = null;
|
||||
var dsResources = dsource.GetAllResources();
|
||||
var thisResource = null;
|
||||
|
||||
// Durchlaufen der Elemente
|
||||
while(dsResources.hasMoreElements())
|
||||
{
|
||||
thisResource = dsResources.getNext().QueryInterface( Components.interfaces.nsIRDFResource);
|
||||
{
|
||||
thisResource = dsResources.getNext().QueryInterface( Components.interfaces.nsIRDFResource);
|
||||
|
||||
var predicateNS = "http://www.technikum-wien.at/dms/rdf";
|
||||
|
||||
//Spalten holen
|
||||
name = getTargetHelper(dsource,thisResource,rdfService.GetResource( predicateNS + "#name" ));
|
||||
dms_id = getTargetHelper(dsource,thisResource,rdfService.GetResource( predicateNS + "#dms_id" ));
|
||||
|
||||
|
||||
if(dms_id!='')
|
||||
{
|
||||
// Download-Link für Dokument einfügen
|
||||
@@ -990,7 +990,7 @@ echo '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>';
|
||||
dokbtn.setAttribute("onclick", "window.open('"+dokurl+"')");
|
||||
dokbtn.setAttribute("style", "margin-right: -5px;");
|
||||
document.getAnonymousElementByAttribute(this ,'anonid', 'hbox-notiz-dokumente').appendChild(dokbtn);
|
||||
|
||||
|
||||
// Link zum Löschen des Dokuments
|
||||
var delbtn = document.createElement("button");
|
||||
delbtn.setAttribute("image", "<?php echo APP_ROOT;?>skin/images/delete_x.png");
|
||||
@@ -1000,11 +1000,11 @@ echo '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
]]>
|
||||
</body>
|
||||
</method>
|
||||
|
||||
|
||||
<constructor>
|
||||
//debug('load notiz:'+this.getAttribute('id'));
|
||||
this.DisableControls(true);
|
||||
@@ -1019,8 +1019,8 @@ echo '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>';
|
||||
var user = this.getAttribute('user');
|
||||
var lehreinheit_id = this.getAttribute('lehreinheit_id');
|
||||
var anrechnung_id = this.getAttribute('anrechnung_id');
|
||||
|
||||
if(projekt_kurzbz!='' || projektphase_id!='' || projekttask_id!=''
|
||||
|
||||
if(projekt_kurzbz!='' || projektphase_id!='' || projekttask_id!=''
|
||||
|| uid!='' || person_id!='' || prestudent_id!='' || bestellung_id!='' || user!='' || lehreinheit_id!='' || anrechnung_id!='')
|
||||
{
|
||||
this.LoadNotizTree(projekt_kurzbz,projektphase_id,projekttask_id,uid,person_id,prestudent_id,bestellung_id, user, lehreinheit_id, null, anrechnung_id);
|
||||
@@ -1031,6 +1031,6 @@ echo '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>';
|
||||
//debug('Notiz Binding Stop');
|
||||
</destructor>
|
||||
</implementation>
|
||||
|
||||
|
||||
</binding>
|
||||
</bindings>
|
||||
|
||||
@@ -93,7 +93,7 @@ $mitarbeiterDAO->getPersonal($fix, $stgl, $fbl, $aktiv, $karenziert, $ausgeschie
|
||||
//sondern richtig mitsortiert
|
||||
$vorname=array();
|
||||
$nachname=array();
|
||||
|
||||
|
||||
$umlaute = array('ö','Ö','ü','Ü','ä','Ä');
|
||||
$umlauterep = array('o','O','u','U','a','A');
|
||||
foreach ($mitarbeiterDAO->result as $key=>$foo)
|
||||
@@ -102,7 +102,7 @@ foreach ($mitarbeiterDAO->result as $key=>$foo)
|
||||
$nachname[$key]=str_replace($umlaute, $umlauterep, $foo->nachname);
|
||||
}
|
||||
array_multisort($nachname, SORT_ASC, $vorname, SORT_ASC, $mitarbeiterDAO->result);
|
||||
|
||||
|
||||
// Creating a workbook
|
||||
$workbook = new Spreadsheet_Excel_Writer();
|
||||
$workbook->setVersion(8);
|
||||
@@ -112,7 +112,7 @@ array_multisort($nachname, SORT_ASC, $vorname, SORT_ASC, $mitarbeiterDAO->result
|
||||
// Creating a worksheet
|
||||
$worksheet =& $workbook->addWorksheet("Mitarbeiter");
|
||||
$worksheet->setInputEncoding('utf-8');
|
||||
|
||||
|
||||
$format_bold =& $workbook->addFormat();
|
||||
$format_bold->setBold();
|
||||
|
||||
@@ -145,20 +145,20 @@ array_multisort($nachname, SORT_ASC, $vorname, SORT_ASC, $mitarbeiterDAO->result
|
||||
//Spalten ausgeben
|
||||
for ($i=0;$i<$anzSpalten;$i++)
|
||||
{
|
||||
if(is_bool($mitarbeiter->$spalte[$i]))
|
||||
$mitarbeiter->$spalte[$i] = ($mitarbeiter->$spalte[$i]?'Ja':'Nein');
|
||||
|
||||
if(mb_strlen($mitarbeiter->$spalte[$i])>$maxlength[$i])
|
||||
$maxlength[$i] = mb_strlen($mitarbeiter->$spalte[$i]);
|
||||
$worksheet->write($j,$i, $mitarbeiter->$spalte[$i]);
|
||||
if(is_bool($mitarbeiter->{$spalte[$i]}))
|
||||
$mitarbeiter->{$spalte[$i]} = ($mitarbeiter->{$spalte[$i]}?'Ja':'Nein');
|
||||
|
||||
if(mb_strlen($mitarbeiter->{$spalte[$i]})>$maxlength[$i])
|
||||
$maxlength[$i] = mb_strlen($mitarbeiter->{$spalte[$i]});
|
||||
$worksheet->write($j,$i, $mitarbeiter->{$spalte[$i]});
|
||||
}
|
||||
|
||||
|
||||
//Zustelladresse aus der Datenbank holen und dazuhaengen
|
||||
$qry = "SELECT * FROM public.tbl_adresse WHERE person_id='$mitarbeiter->person_id' AND zustelladresse=true LIMIT 1";
|
||||
if($result = $db->db_query($qry))
|
||||
{
|
||||
if($row = $db->db_fetch_object($result))
|
||||
{
|
||||
{
|
||||
if(mb_strlen($row->strasse)>$maxlength[$i])
|
||||
$maxlength[$i]=mb_strlen($row->strasse);
|
||||
$worksheet->write($j,$i, $row->strasse);
|
||||
@@ -168,7 +168,7 @@ array_multisort($nachname, SORT_ASC, $vorname, SORT_ASC, $mitarbeiterDAO->result
|
||||
if(mb_strlen($row->ort)>$maxlength[$i+2])
|
||||
$maxlength[$i+2]=mb_strlen($row->ort);
|
||||
$worksheet->write($j,$i+2, $row->ort);
|
||||
|
||||
|
||||
if($row->firma_id!='')
|
||||
{
|
||||
$qry = "SELECT * FROM public.tbl_firma WHERE firma_id='$row->firma_id'";
|
||||
@@ -184,7 +184,7 @@ array_multisort($nachname, SORT_ASC, $vorname, SORT_ASC, $mitarbeiterDAO->result
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$j++;
|
||||
}
|
||||
|
||||
|
||||
@@ -157,14 +157,17 @@ if($studiensemester_kurzbz!='')
|
||||
(SELECT strasse FROM public.tbl_adresse WHERE person_id=public.tbl_person.person_id ORDER BY heimatadresse desc LIMIT 1) AS w_strasse,
|
||||
titelpost, get_rolle_prestudent(tbl_prestudent.prestudent_id, ".$db->db_add_param($studiensemester_kurzbz).") as status,
|
||||
(SELECT ausbildungssemester FROM public.tbl_prestudentstatus WHERE prestudent_id=public.tbl_prestudent.prestudent_id AND tbl_prestudentstatus.studiensemester_kurzbz='".addslashes($studiensemester_kurzbz)."' ORDER BY datum desc LIMIT 1) AS semester
|
||||
FROM public.tbl_person
|
||||
JOIN public.tbl_benutzer using(person_id)
|
||||
JOIN public.tbl_student on(uid=student_uid)
|
||||
JOIN public.tbl_prestudent using(prestudent_id)
|
||||
JOIN public.tbl_prestudentstatus on(tbl_prestudentstatus.prestudent_id=tbl_student.prestudent_id)
|
||||
WHERE tbl_prestudentstatus.studiensemester_kurzbz=".$db->db_add_param($studiensemester_kurzbz)."
|
||||
AND get_rolle_prestudent(tbl_prestudent.prestudent_id, ".$db->db_add_param($studiensemester_kurzbz).") in('Student','Diplomand','Praktikant','Incoming')
|
||||
AND tbl_student.studiengang_kz<999 AND tbl_prestudent.bismelden=true";
|
||||
FROM
|
||||
public.tbl_person
|
||||
JOIN public.tbl_benutzer using(person_id)
|
||||
JOIN public.tbl_student on(uid=student_uid)
|
||||
JOIN public.tbl_prestudent using(prestudent_id)
|
||||
JOIN public.tbl_prestudentstatus on(tbl_prestudentstatus.prestudent_id=tbl_student.prestudent_id)
|
||||
WHERE
|
||||
tbl_prestudentstatus.studiensemester_kurzbz=".$db->db_add_param($studiensemester_kurzbz)."
|
||||
AND get_rolle_prestudent(tbl_prestudent.prestudent_id, ".$db->db_add_param($studiensemester_kurzbz).") in('Student','Diplomand','Praktikant','Incoming')
|
||||
AND tbl_student.studiengang_kz<10000
|
||||
AND tbl_prestudent.bismelden=true";
|
||||
// AND tbl_benutzer.aktiv=true
|
||||
|
||||
if($result = $db->db_query($qry))
|
||||
@@ -331,19 +334,21 @@ if($studiensemester_kurzbz!='')
|
||||
(SELECT strasse FROM public.tbl_adresse WHERE person_id=public.tbl_person.person_id ORDER BY heimatadresse desc LIMIT 1) AS w_strasse,
|
||||
titelpost, get_rolle_prestudent(tbl_prestudent.prestudent_id, ".$db->db_add_param($studiensemester_kurzbz).") as status,
|
||||
(SELECT ausbildungssemester FROM public.tbl_prestudentstatus WHERE prestudent_id=public.tbl_prestudent.prestudent_id AND tbl_prestudentstatus.studiensemester_kurzbz='".addslashes($studiensemester_kurzbz)."' ORDER BY datum desc LIMIT 1) AS semester
|
||||
FROM public.tbl_person
|
||||
JOIN public.tbl_konto as ka using(person_id)
|
||||
JOIN public.tbl_konto as kb using(person_id)
|
||||
JOIN public.tbl_benutzer using(person_id)
|
||||
JOIN public.tbl_student on(uid=student_uid)
|
||||
JOIN public.tbl_prestudent using(prestudent_id)
|
||||
JOIN public.tbl_prestudentstatus on(tbl_prestudentstatus.prestudent_id=tbl_student.prestudent_id)
|
||||
WHERE tbl_prestudentstatus.studiensemester_kurzbz=".$db->db_add_param($studiensemester_kurzbz)."
|
||||
AND get_rolle_prestudent(tbl_prestudent.prestudent_id, ".$db->db_add_param($studiensemester_kurzbz).") in('Student','Diplomand','Praktikant','Incoming','Absolvent','Abbrecher')
|
||||
AND tbl_student.studiengang_kz<999 AND
|
||||
ka.studiensemester_kurzbz=".$db->db_add_param($studiensemester_kurzbz)." AND ka.buchungstyp_kurzbz='OEH' AND tbl_student.studiengang_kz=ka.studiengang_kz
|
||||
AND kb.studiensemester_kurzbz=".$db->db_add_param($studiensemester_kurzbz)." AND kb.buchungstyp_kurzbz='OEH' AND tbl_student.studiengang_kz=kb.studiengang_kz
|
||||
AND kb.buchungsnr_verweis=ka.buchungsnr";
|
||||
FROM
|
||||
public.tbl_person
|
||||
JOIN public.tbl_konto as ka using(person_id)
|
||||
JOIN public.tbl_konto as kb using(person_id)
|
||||
JOIN public.tbl_benutzer using(person_id)
|
||||
JOIN public.tbl_student on(uid=student_uid)
|
||||
JOIN public.tbl_prestudent using(prestudent_id)
|
||||
JOIN public.tbl_prestudentstatus on(tbl_prestudentstatus.prestudent_id=tbl_student.prestudent_id)
|
||||
WHERE
|
||||
tbl_prestudentstatus.studiensemester_kurzbz=".$db->db_add_param($studiensemester_kurzbz)."
|
||||
AND get_rolle_prestudent(tbl_prestudent.prestudent_id, ".$db->db_add_param($studiensemester_kurzbz).") in('Student','Diplomand','Praktikant','Incoming','Absolvent','Abbrecher')
|
||||
AND tbl_student.studiengang_kz<10000
|
||||
AND ka.studiensemester_kurzbz=".$db->db_add_param($studiensemester_kurzbz)." AND ka.buchungstyp_kurzbz in('OEH','Lehrgangsgebuehr') AND tbl_student.studiengang_kz=ka.studiengang_kz
|
||||
AND kb.studiensemester_kurzbz=".$db->db_add_param($studiensemester_kurzbz)." AND kb.buchungstyp_kurzbz in('OEH','Lehrgangsgebuehr') AND tbl_student.studiengang_kz=kb.studiengang_kz
|
||||
AND kb.buchungsnr_verweis=ka.buchungsnr";
|
||||
//AND tbl_benutzer.aktiv=true
|
||||
|
||||
if($result = $db->db_query($qry))
|
||||
|
||||
@@ -177,7 +177,9 @@ loadVariables($user);
|
||||
$maxlength[$i]=8;
|
||||
$worksheet->write($zeile,++$i,"PRESTUDENTID", $format_bold);
|
||||
$maxlength[$i]=12;
|
||||
|
||||
$worksheet->write($zeile,++$i,"MATR_NR", $format_bold);
|
||||
$maxlength[$i]=12;
|
||||
|
||||
$zeile++;
|
||||
|
||||
$ids = explode(';',$data);
|
||||
@@ -565,6 +567,12 @@ loadVariables($user);
|
||||
$maxlength[$i] = mb_strlen($row->prestudent_id);
|
||||
$worksheet->write($zeile,$i, $row->prestudent_id);
|
||||
$i++;
|
||||
|
||||
//Matrikelnummer (tbl_person)
|
||||
if(mb_strlen($row->matr_nr)>$maxlength[$i])
|
||||
$maxlength[$i] = mb_strlen($row->matr_nr);
|
||||
$worksheet->write($zeile,$i, $row->matr_nr);
|
||||
$i++;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -106,7 +106,7 @@ echo '<?xml-stylesheet href="'.APP_ROOT.'content/datepicker/datepicker.css" type
|
||||
<row>
|
||||
<label value="Studiensemester" control="student-konto-neu-menulist-studiensemester"/>
|
||||
<menulist id="student-konto-neu-menulist-studiensemester"
|
||||
datasources="<?php echo APP_ROOT ?>rdf/studiensemester.rdf.php" flex="1"
|
||||
datasources="<?php echo APP_ROOT ?>rdf/studiensemester.rdf.php?order=desc" flex="1"
|
||||
ref="http://www.technikum-wien.at/studiensemester/liste" >
|
||||
<template>
|
||||
<menupopup>
|
||||
|
||||
@@ -183,47 +183,48 @@ echo "<?xml-stylesheet href=\"".APP_ROOT."content/bindings.css\" type=\"text/css
|
||||
class="sortDirectionIndicator"
|
||||
sortActive="true"
|
||||
sortDirection="ascending"
|
||||
sort="rdf:http://www.technikum-wien.at/lvgesamtnote/rdf#lehrveranstaltung_bezeichnung"/>
|
||||
sort="rdf:http://www.technikum-wien.at/lvgesamtnote/rdf#lehrveranstaltung_bezeichnung"
|
||||
onclick="StudentLVGesamtNotenTreeSort()"/>
|
||||
<splitter class="tree-splitter"/>
|
||||
<treecol id="student-lvgesamtnoten-tree-note_bezeichnung" label="Note" flex="5" hidden="false"
|
||||
class="sortDirectionIndicator"
|
||||
sort="rdf:http://www.technikum-wien.at/lvgesamtnote/rdf#note_bezeichnung"/>
|
||||
sort="rdf:http://www.technikum-wien.at/lvgesamtnote/rdf#note_bezeichnung" onclick="StudentLVGesamtNotenTreeSort()"/>
|
||||
<splitter class="tree-splitter"/>
|
||||
<treecol id="student-lvgesamtnoten-tree-mitarbeiter_uid" label="MitarbeiterUID" flex="2" hidden="true"
|
||||
class="sortDirectionIndicator"
|
||||
sort="rdf:http://www.technikum-wien.at/lvgesamtnote/rdf#mitarbeiter_uid" />
|
||||
sort="rdf:http://www.technikum-wien.at/lvgesamtnote/rdf#mitarbeiter_uid" onclick="StudentLVGesamtNotenTreeSort()"/>
|
||||
<splitter class="tree-splitter"/>
|
||||
<treecol id="student-lvgesamtnoten-tree-benotungsdatum" label="Benotungsdatum" flex="2" hidden="true"
|
||||
class="sortDirectionIndicator"
|
||||
sort="rdf:http://www.technikum-wien.at/lvgesamtnote/rdf#benotungsdatum_iso" />
|
||||
sort="rdf:http://www.technikum-wien.at/lvgesamtnote/rdf#benotungsdatum_iso" onclick="StudentLVGesamtNotenTreeSort()"/>
|
||||
<splitter class="tree-splitter"/>
|
||||
<treecol id="student-lvgesamtnoten-tree-benotungsdatum-iso" label="BenotungsdatumISO" flex="2" hidden="true"
|
||||
class="sortDirectionIndicator"
|
||||
sort="rdf:http://www.technikum-wien.at/lvgesamtnote/rdf#benotungsdatum_iso" />
|
||||
sort="rdf:http://www.technikum-wien.at/lvgesamtnote/rdf#benotungsdatum_iso" onclick="StudentLVGesamtNotenTreeSort()"/>
|
||||
<splitter class="tree-splitter"/>
|
||||
<treecol id="student-lvgesamtnoten-tree-freigabedatum" label="Freigabedatum" flex="2" hidden="true"
|
||||
class="sortDirectionIndicator"
|
||||
sort="rdf:http://www.technikum-wien.at/lvgesamtnote/rdf#freigabedatum_iso" />
|
||||
sort="rdf:http://www.technikum-wien.at/lvgesamtnote/rdf#freigabedatum_iso" onclick="StudentLVGesamtNotenTreeSort()"/>
|
||||
<splitter class="tree-splitter"/>
|
||||
<treecol id="student-lvgesamtnoten-tree-studiensemester_kurzbz" label="Studiensemester" flex="2" hidden="true"
|
||||
class="sortDirectionIndicator"
|
||||
sort="rdf:http://www.technikum-wien.at/lvgesamtnote/rdf#studiensemester_kurzbz" />
|
||||
sort="rdf:http://www.technikum-wien.at/lvgesamtnote/rdf#studiensemester_kurzbz" onclick="StudentLVGesamtNotenTreeSort()"/>
|
||||
<splitter class="tree-splitter"/>
|
||||
<treecol id="student-lvgesamtnoten-tree-note" label="Note" flex="2" hidden="true"
|
||||
class="sortDirectionIndicator"
|
||||
sort="rdf:http://www.technikum-wien.at/lvgesamtnote/rdf#note" />
|
||||
sort="rdf:http://www.technikum-wien.at/lvgesamtnote/rdf#note" onclick="StudentLVGesamtNotenTreeSort()"/>
|
||||
<splitter class="tree-splitter"/>
|
||||
<treecol id="student-lvgesamtnoten-tree-student_uid" label="StudentUID" flex="2" hidden="true"
|
||||
class="sortDirectionIndicator"
|
||||
sort="rdf:http://www.technikum-wien.at/lvgesamtnote/rdf#student_uid" />
|
||||
sort="rdf:http://www.technikum-wien.at/lvgesamtnote/rdf#student_uid" onclick="StudentLVGesamtNotenTreeSort()"/>
|
||||
<splitter class="tree-splitter"/>
|
||||
<treecol id="student-lvgesamtnoten-tree-lehrveranstaltung_id" label="LehrveranstaltungID" flex="2" hidden="true"
|
||||
class="sortDirectionIndicator"
|
||||
sort="rdf:http://www.technikum-wien.at/lvgesamtnote/rdf#lehrveranstaltung_id" />
|
||||
sort="rdf:http://www.technikum-wien.at/lvgesamtnote/rdf#lehrveranstaltung_id" onclick="StudentLVGesamtNotenTreeSort()"/>
|
||||
<splitter class="tree-splitter"/>
|
||||
<treecol id="student-lvgesamtnoten-tree-punkte" label="Punkte" flex="2" hidden="true"
|
||||
class="sortDirectionIndicator"
|
||||
sort="rdf:http://www.technikum-wien.at/lvgesamtnote/rdf#punkte" />
|
||||
sort="rdf:http://www.technikum-wien.at/lvgesamtnote/rdf#punkte" onclick="StudentLVGesamtNotenTreeSort()"/>
|
||||
<splitter class="tree-splitter"/>
|
||||
</treecols>
|
||||
|
||||
|
||||
@@ -1712,7 +1712,7 @@ function StudentPrestudentRolleDelete()
|
||||
studiengang_kz = document.getElementById('student-prestudent-menulist-studiengang_kz').value;
|
||||
if(confirm('Diese Rolle wirklich loeschen?'))
|
||||
{
|
||||
|
||||
|
||||
var url = '<?php echo APP_ROOT ?>content/student/studentDBDML.php';
|
||||
var req = new phpRequest(url,'','');
|
||||
|
||||
@@ -1721,7 +1721,7 @@ function StudentPrestudentRolleDelete()
|
||||
|
||||
var response = req.executePOST();
|
||||
var val = new ParseReturnValue(response)
|
||||
|
||||
|
||||
if (val.dbdml_data == 1)
|
||||
{
|
||||
if(confirm('Das Loeschen der letzten Rolle loescht auch den gesamten Prestudent-Datensatz!\nMoechten Sie Fortfahren?'))
|
||||
@@ -1759,19 +1759,19 @@ function StudentPrestudentRolleDelete()
|
||||
{
|
||||
var url = '<?php echo APP_ROOT ?>content/student/studentDBDML.php';
|
||||
var req = new phpRequest(url,'','');
|
||||
|
||||
|
||||
req.add('type', 'deleterolle');
|
||||
|
||||
|
||||
req.add('status_kurzbz', status_kurzbz);
|
||||
req.add('prestudent_id', prestudent_id);
|
||||
req.add('studiensemester_kurzbz', studiensemester_kurzbz);
|
||||
req.add('ausbildungssemester', ausbildungssemester);
|
||||
req.add('studiengang_kz', studiengang_kz);
|
||||
|
||||
|
||||
var response = req.executePOST();
|
||||
|
||||
|
||||
var val = new ParseReturnValue(response)
|
||||
|
||||
|
||||
if (!val.dbdml_return)
|
||||
{
|
||||
if(val.dbdml_errormsg=='')
|
||||
@@ -5590,7 +5590,7 @@ function StudentSuchkriterien(suchkriterium)
|
||||
{
|
||||
position = filter.search(" ") + 1;
|
||||
filter = filter.substr(position);
|
||||
}
|
||||
}
|
||||
|
||||
newval = suchkriterium+' '+filter;
|
||||
|
||||
@@ -5598,3 +5598,10 @@ function StudentSuchkriterien(suchkriterium)
|
||||
document.getElementById('student-toolbar-textbox-suche').focus();
|
||||
//document.getElementById('student-toolbar-textbox-suche').select();
|
||||
}
|
||||
|
||||
function StudentLVGesamtNotenTreeSort()
|
||||
{
|
||||
// Nach dem Sortieren der Noten die Unterschiede erneut markieren
|
||||
// da sonst nach dem sortieren falsche Eintraege markiert sind
|
||||
window.setTimeout(StudentNotenTreeSelectDifferent,20);
|
||||
}
|
||||
|
||||
@@ -88,7 +88,7 @@ class Spreadsheet_Excel_Writer_BIFFwriter extends PEAR
|
||||
*
|
||||
* @access public
|
||||
*/
|
||||
function Spreadsheet_Excel_Writer_BIFFwriter()
|
||||
function __construct()
|
||||
{
|
||||
$this->_byte_order = '';
|
||||
$this->_data = '';
|
||||
|
||||
@@ -43,10 +43,10 @@ class OLE_PPS_File extends OLE_PPS
|
||||
* @param string $name The name of the file (in Unicode)
|
||||
* @see OLE::Asc2Ucs()
|
||||
*/
|
||||
function OLE_PPS_File($name)
|
||||
function __construct($name)
|
||||
{
|
||||
$this->_tmp_dir = '';
|
||||
$this->OLE_PPS(
|
||||
parent::__construct(
|
||||
null,
|
||||
$name,
|
||||
OLE_PPS_TYPE_FILE,
|
||||
|
||||
@@ -248,7 +248,7 @@ class Spreadsheet_Excel_Writer_Format extends PEAR
|
||||
* @param integer $index the XF index for the format.
|
||||
* @param array $properties array with properties to be set on initialization.
|
||||
*/
|
||||
function Spreadsheet_Excel_Writer_Format($BIFF_version, $index = 0, $properties = array())
|
||||
function __construct($BIFF_version, $index = 0, $properties = array())
|
||||
{
|
||||
$this->_xf_index = $index;
|
||||
$this->_BIFF_version = $BIFF_version;
|
||||
@@ -431,12 +431,12 @@ class Spreadsheet_Excel_Writer_Format extends PEAR
|
||||
//$rotation = 0x00;
|
||||
//oesi fix rotation mit utf8
|
||||
switch($this->_rotation)
|
||||
{
|
||||
case 0: $rotation = 0; break;
|
||||
case 1: $rotation = 255; break;
|
||||
case 2: $rotation = 90; break;
|
||||
case 3: $rotation = 180; break;
|
||||
default: $rotation = 0; break;
|
||||
{
|
||||
case 0: $rotation = 0; break;
|
||||
case 1: $rotation = 255; break;
|
||||
case 2: $rotation = 90; break;
|
||||
case 3: $rotation = 180; break;
|
||||
default: $rotation = 0; break;
|
||||
}
|
||||
$biff8_options = 0x00;
|
||||
$data = pack("vvvC", $ifnt, $ifmt, $style, $align);
|
||||
|
||||
@@ -57,7 +57,7 @@ class OLE extends PEAR
|
||||
* Remember to use ampersand when creating an OLE object ($my_ole =& new OLE();)
|
||||
* @access public
|
||||
*/
|
||||
function OLE()
|
||||
function __construct()
|
||||
{
|
||||
$this->_list = array();
|
||||
}
|
||||
|
||||
@@ -167,7 +167,7 @@ class PEAR
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
function PEAR($error_class = null)
|
||||
function __construct($error_class = null)
|
||||
{
|
||||
$classname = strtolower(get_class($this));
|
||||
if ($this->_debug) {
|
||||
@@ -842,7 +842,7 @@ class PEAR_Error
|
||||
* @access public
|
||||
*
|
||||
*/
|
||||
function PEAR_Error($message = 'unknown error', $code = null,
|
||||
function __construct($message = 'unknown error', $code = null,
|
||||
$mode = null, $options = null, $userinfo = null)
|
||||
{
|
||||
if ($mode === null) {
|
||||
|
||||
@@ -116,7 +116,7 @@ class OLE_PPS extends PEAR
|
||||
* @param integer $time_2nd A timestamp
|
||||
* @param array $children Array containing children PPS for this PPS
|
||||
*/
|
||||
function OLE_PPS($No, $name, $type, $prev, $next, $dir, $time_1st, $time_2nd, $data, $children)
|
||||
function __construct($No, $name, $type, $prev, $next, $dir, $time_1st, $time_2nd, $data, $children)
|
||||
{
|
||||
$this->No = $No;
|
||||
$this->Name = $name;
|
||||
|
||||
@@ -164,7 +164,7 @@ class Spreadsheet_Excel_Writer_Parser extends PEAR
|
||||
* @param integer $byte_order The byte order (Little endian or Big endian) of the architecture
|
||||
(optional). 1 => big endian, 0 (default) little endian.
|
||||
*/
|
||||
function Spreadsheet_Excel_Writer_Parser($byte_order, $biff_version)
|
||||
function __construct($byte_order, $biff_version)
|
||||
{
|
||||
$this->_current_char = 0;
|
||||
$this->_BIFF_version = $biff_version;
|
||||
|
||||
@@ -43,11 +43,11 @@ class OLE_PPS_Root extends OLE_PPS
|
||||
* @param integer $time_1st A timestamp
|
||||
* @param integer $time_2nd A timestamp
|
||||
*/
|
||||
function OLE_PPS_Root($time_1st, $time_2nd, $raChild)
|
||||
function __construct($time_1st, $time_2nd, $raChild)
|
||||
{
|
||||
$ole_obj = new OLE();
|
||||
$this->_tmp_dir = '';
|
||||
$this->OLE_PPS(
|
||||
parent::__construct(
|
||||
null,
|
||||
$ole_obj->Asc2Ucs('Root Entry'),
|
||||
OLE_PPS_TYPE_ROOT,
|
||||
|
||||
@@ -66,7 +66,7 @@ class Spreadsheet_Excel_Writer_Validator
|
||||
*/
|
||||
var $_parser;
|
||||
|
||||
function Spreadsheet_Excel_Writer_Validator(&$parser)
|
||||
function __construct(&$parser)
|
||||
{
|
||||
$this->_parser = $parser;
|
||||
$this->_type = 0x01; // FIXME: add method for setting datatype
|
||||
|
||||
@@ -171,10 +171,10 @@ class Spreadsheet_Excel_Writer_Workbook extends Spreadsheet_Excel_Writer_BIFFwri
|
||||
* @param string filename for storing the workbook. "-" for writing to stdout.
|
||||
* @access public
|
||||
*/
|
||||
function Spreadsheet_Excel_Writer_Workbook($filename)
|
||||
function __construct($filename)
|
||||
{
|
||||
// It needs to call its parent's constructor explicitly
|
||||
$this->Spreadsheet_Excel_Writer_BIFFwriter();
|
||||
parent::__construct();
|
||||
|
||||
$this->_filename = $filename;
|
||||
$this->_parser = new Spreadsheet_Excel_Writer_Parser($this->_byte_order, $this->_BIFF_version);
|
||||
|
||||
@@ -364,14 +364,14 @@ class Spreadsheet_Excel_Writer_Worksheet extends Spreadsheet_Excel_Writer_BIFFwr
|
||||
* @param mixed &$parser The formula parser created for the Workbook
|
||||
* @access private
|
||||
*/
|
||||
function Spreadsheet_Excel_Writer_Worksheet($BIFF_version, $name,
|
||||
function __construct($BIFF_version, $name,
|
||||
$index, &$activesheet,
|
||||
&$firstsheet, &$str_total,
|
||||
&$str_unique, &$str_table,
|
||||
&$url_format, &$parser)
|
||||
{
|
||||
// It needs to call its parent's constructor explicitly
|
||||
$this->Spreadsheet_Excel_Writer_BIFFwriter();
|
||||
parent::__construct();
|
||||
$this->_BIFF_version = $BIFF_version;
|
||||
$rowmax = 65536; // 16384 in Excel 5
|
||||
$colmax = 256;
|
||||
|
||||
@@ -49,10 +49,10 @@ class Spreadsheet_Excel_Writer extends Spreadsheet_Excel_Writer_Workbook
|
||||
* @param string $filename The optional filename for the Workbook.
|
||||
* @return Spreadsheet_Excel_Writer_Workbook The Workbook created
|
||||
*/
|
||||
function Spreadsheet_Excel_Writer($filename = '')
|
||||
function __construct($filename = '')
|
||||
{
|
||||
$this->_filename = $filename;
|
||||
$this->Spreadsheet_Excel_Writer_Workbook($filename);
|
||||
parent::__construct($filename);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -248,9 +248,9 @@ class adresse extends basis_db
|
||||
$this->errormsg = 'Strasse darf nicht länger als 255 Zeichen sein';
|
||||
return false;
|
||||
}
|
||||
if(mb_strlen($this->plz)>10)
|
||||
if(mb_strlen($this->plz)>16)
|
||||
{
|
||||
$this->errormsg = 'Plz darf nicht länger als 10 Zeichen sein';
|
||||
$this->errormsg = 'Plz darf nicht länger als 16 Zeichen sein';
|
||||
return false;
|
||||
}
|
||||
if(mb_strlen($this->ort)>255)
|
||||
@@ -450,5 +450,58 @@ class adresse extends basis_db
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Laedt die Rechnungsadresse zu der Person die uebergeben wird
|
||||
* @param $pers_id ID der Person zu der die Adressen geladen werden sollen
|
||||
* @return true wenn ok, false im Fehlerfall
|
||||
*/
|
||||
public function load_rechnungsadresse($pers_id)
|
||||
{
|
||||
//Pruefen ob pers_id eine gueltige Zahl ist
|
||||
if(!is_numeric($pers_id) || $pers_id == '')
|
||||
{
|
||||
$this->errormsg = 'person_id muss eine gültige Zahl sein';
|
||||
return false;
|
||||
}
|
||||
|
||||
//Lesen der Daten aus der Datenbank
|
||||
$qry = "SELECT * FROM public.tbl_adresse WHERE rechnungsadresse and person_id=".$this->db_add_param($pers_id, FHC_INTEGER, false);
|
||||
$qry.=" limit 1";
|
||||
|
||||
if(!$this->db_query($qry))
|
||||
{
|
||||
$this->errormsg = 'Fehler bei einer Datenbankabfrage';
|
||||
return false;
|
||||
}
|
||||
|
||||
while($row = $this->db_fetch_object())
|
||||
{
|
||||
$adr_obj = new adresse();
|
||||
|
||||
$adr_obj->adresse_id = $row->adresse_id;
|
||||
$adr_obj->heimatadresse = $this->db_parse_bool($row->heimatadresse);
|
||||
$adr_obj->gemeinde = $row->gemeinde;
|
||||
$adr_obj->name = $row->name;
|
||||
$adr_obj->nation = $row->nation;
|
||||
$adr_obj->ort = $row->ort;
|
||||
$adr_obj->person_id = $row->person_id;
|
||||
$adr_obj->plz = $row->plz;
|
||||
$adr_obj->strasse = $row->strasse;
|
||||
$adr_obj->typ = $row->typ;
|
||||
$adr_obj->firma_id = $row->firma_id;
|
||||
$adr_obj->updateamum = $row->updateamum;
|
||||
$adr_obj->updatevon = $row->updatevon;
|
||||
$adr_obj->insertamum = $row->insertamum;
|
||||
$adr_obj->insertvon = $row->insertvon;
|
||||
$adr_obj->zustelladresse = $this->db_parse_bool($row->zustelladresse);
|
||||
$adr_obj->rechnungsadresse = $this->db_parse_bool($row->rechnungsadresse);
|
||||
$adr_obj->anmerkung = $row->anmerkung;
|
||||
|
||||
$this->result[] = $adr_obj;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
@@ -104,14 +104,30 @@ class bewerbungstermin extends basis_db
|
||||
}
|
||||
|
||||
/**
|
||||
* Liefert alle Förderverträge
|
||||
* Liefert die Bewerbungstermine eines Studiengangs
|
||||
* @param integer $studiengang_kz. Kennzahl des Studiengangs, dessen Bewerbungstermine geladen werden sollen
|
||||
* @param string $studiensemester_kurzbz. Optional. Default NULL. Studiensemester, dessen Bewerbungstermine geladen werden sollen
|
||||
* @param $sort. Optional. Default NULL. Sortierung der Ergebnisse
|
||||
* @param $studienplan_id. Optional. Default NULL. Studienplan ID, dessen Bewerbungstermine geladen werden sollen
|
||||
* @return true wenn ok, false im Fehlerfall
|
||||
*/
|
||||
public function getBewerbungstermine($studiengang_kz, $studiensemester_kurzbz=null, $sort=null)
|
||||
public function getBewerbungstermine($studiengang_kz, $studiensemester_kurzbz = null, $sort = null, $studienplan_id = null)
|
||||
{
|
||||
$qry = "SELECT * FROM public.tbl_bewerbungstermine WHERE studiengang_kz=".$this->db_add_param($studiengang_kz, FHC_INTEGER);
|
||||
$qry = "SELECT
|
||||
tbl_bewerbungstermine.*,
|
||||
tbl_studienplan.bezeichnung as stpl_bezeichnung
|
||||
FROM
|
||||
public.tbl_bewerbungstermine
|
||||
LEFT JOIN lehre.tbl_studienplan USING(studienplan_id)
|
||||
WHERE
|
||||
studiengang_kz=".$this->db_add_param($studiengang_kz, FHC_INTEGER);
|
||||
|
||||
if($studiensemester_kurzbz!=null)
|
||||
$qry.=" AND studiensemester_kurzbz=".$this->db_add_param($studiensemester_kurzbz);
|
||||
|
||||
if($studienplan_id!=null)
|
||||
$qry.=" AND studienplan_id=".$this->db_add_param($studienplan_id);
|
||||
|
||||
if($sort != null)
|
||||
{
|
||||
$qry.=" ORDER BY ".$sort;
|
||||
@@ -137,6 +153,7 @@ class bewerbungstermin extends basis_db
|
||||
$obj->updateamum = $row->updateamum;
|
||||
$obj->updatevon = $row->updatevon;
|
||||
$obj->studienplan_id = $row->studienplan_id;
|
||||
$obj->stpl_bezeichnung = $row->stpl_bezeichnung;
|
||||
|
||||
$this->result[] = $obj;
|
||||
}
|
||||
|
||||
+106
-13
@@ -40,6 +40,9 @@ class coodle extends basis_db
|
||||
public $updatevon; // varchar(32)
|
||||
public $insertamum; // timestamp
|
||||
public $insertvon; // varchar(32)
|
||||
public $mailversand; // boolean
|
||||
public $teilnehmer_anonym; // boolean
|
||||
public $termine_anonym; // boolean
|
||||
|
||||
// tbl_coodle_ressource
|
||||
public $coodle_ressource_id; // integer
|
||||
@@ -105,6 +108,9 @@ class coodle extends basis_db
|
||||
$this->updatevon = $row->updatevon;
|
||||
$this->insertamum = $row->insertamum;
|
||||
$this->insertvon = $row->insertvon;
|
||||
$this->mailversand = $this->db_parse_bool($row->mailversand);
|
||||
$this->teilnehmer_anonym = $this->db_parse_bool($row->teilnehmer_anonym);
|
||||
$this->termine_anonym = $this->db_parse_bool($row->termine_anonym);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -156,7 +162,7 @@ class coodle extends basis_db
|
||||
{
|
||||
//Neuen Datensatz einfuegen
|
||||
$qry='BEGIN;INSERT INTO campus.tbl_coodle(ersteller_uid, coodle_status_kurzbz, titel, beschreibung,
|
||||
dauer, endedatum, insertamum, insertvon, updateamum, updatevon) VALUES('.
|
||||
dauer, endedatum, insertamum, insertvon, updateamum, updatevon, mailversand, teilnehmer_anonym, termine_anonym) VALUES('.
|
||||
$this->db_add_param($this->ersteller_uid).', '.
|
||||
$this->db_add_param($this->coodle_status_kurzbz).', '.
|
||||
$this->db_add_param($this->titel).', '.
|
||||
@@ -166,7 +172,10 @@ class coodle extends basis_db
|
||||
$this->db_add_param($this->insertamum).', '.
|
||||
$this->db_add_param($this->insertvon).', '.
|
||||
$this->db_add_param($this->updateamum).', '.
|
||||
$this->db_add_param($this->updatevon).');';
|
||||
$this->db_add_param($this->updatevon).', '.
|
||||
$this->db_add_param($this->mailversand, FHC_BOOLEAN, true).', '.
|
||||
$this->db_add_param($this->teilnehmer_anonym, FHC_BOOLEAN, true).', '.
|
||||
$this->db_add_param($this->termine_anonym, FHC_BOOLEAN, true).');';
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -184,7 +193,10 @@ class coodle extends basis_db
|
||||
' dauer='.$this->db_add_param($this->dauer).', '.
|
||||
' endedatum='.$this->db_add_param($this->endedatum).', '.
|
||||
' updateamum='.$this->db_add_param($this->updateamum).', '.
|
||||
' updatevon='.$this->db_add_param($this->updatevon).' '.
|
||||
' updatevon='.$this->db_add_param($this->updatevon).', '.
|
||||
' mailversand='.$this->db_add_param($this->mailversand, FHC_BOOLEAN).', '.
|
||||
' teilnehmer_anonym='.$this->db_add_param($this->teilnehmer_anonym, FHC_BOOLEAN).', '.
|
||||
' termine_anonym='.$this->db_add_param($this->termine_anonym, FHC_BOOLEAN).' '.
|
||||
'WHERE coodle_id='.$this->db_add_param($this->coodle_id, FHC_INTEGER, false).';';
|
||||
}
|
||||
|
||||
@@ -383,6 +395,9 @@ class coodle extends basis_db
|
||||
$coodle->updatevon = $row->updatevon;
|
||||
$coodle->endedatum = $row->endedatum;
|
||||
$coodle->ersteller_uid = $row->ersteller_uid;
|
||||
$coodle->mailversand = $row->mailversand;
|
||||
$coodle->teilnehmer_anonym = $row->teilnehmer_anonym;
|
||||
$coodle->termine_anonym = $row->termine_anonym;
|
||||
|
||||
$this->result[] = $coodle;
|
||||
}
|
||||
@@ -505,7 +520,7 @@ class coodle extends basis_db
|
||||
}
|
||||
|
||||
/**
|
||||
* Speichert die aktuelle Ressource in die Datenbank
|
||||
* Speichert die Terminwahl der Ressource in die Datenbank
|
||||
* Wenn $neu auf true gesetzt ist wird ein neuer Datensatz angelegt
|
||||
* andernfalls wird der Datensatz mit der ID in $coodle_id aktualisiert
|
||||
* @return true wenn ok, false im Fehlerfall
|
||||
@@ -650,6 +665,70 @@ class coodle extends basis_db
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Überprüft ob der übergebenen Termin schon von einer Ressource gewählt wurde
|
||||
* @param Integer $termin_id
|
||||
* @return boolean true, wenn schon ein Termin schon gewaehlt wurde, sonst false
|
||||
*/
|
||||
public function checkTerminGewaehlt($termin_id)
|
||||
{
|
||||
if( $termin_id == '' || !is_numeric($termin_id))
|
||||
{
|
||||
$this->errormsg = 'Ungültige ID übergeben';
|
||||
return false;
|
||||
}
|
||||
|
||||
$qry="SELECT * FROM campus.tbl_coodle_ressource_termin
|
||||
WHERE coodle_termin_id=".$this->db_add_param($termin_id, FHC_INTEGER).';';
|
||||
|
||||
if($result = $this->db_query($qry))
|
||||
{
|
||||
if($row = $this->db_fetch_row($result))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Zählt, wie oft ein Termin gewählt wurde
|
||||
* @param Integer $termin_id
|
||||
* @param Integer $ressource_id
|
||||
* @return boolean
|
||||
*/
|
||||
public function countTermin($termin_id)
|
||||
{
|
||||
if($termin_id == '' || !is_numeric($termin_id))
|
||||
{
|
||||
$this->errormsg = 'Ungültige ID übergeben';
|
||||
return false;
|
||||
}
|
||||
|
||||
$qry="SELECT count(*) AS anzahl FROM campus.tbl_coodle_ressource_termin
|
||||
WHERE coodle_termin_id=".$this->db_add_param($termin_id, FHC_INTEGER).';';
|
||||
|
||||
if($result = $this->db_query($qry))
|
||||
{
|
||||
if($row = $this->db_fetch_object($result))
|
||||
{
|
||||
$this->anzahl = $row->anzahl;
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->errormsg = "Fehler bei der Abfrage aufgetreten";
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Laedt alle Termine einer Umfrage zu denen eine Ressource zugesagt hat
|
||||
@@ -844,20 +923,28 @@ class coodle extends basis_db
|
||||
|
||||
/**
|
||||
* Laedt die Terminvorschlaege zu einer Umfrage
|
||||
* Das Datum 1900-01-01 wird an die letzte Stelle sortiert, da es fuer "Keine Auswahl" benoetigt wird
|
||||
* @param $coodle_id
|
||||
* @return boolean
|
||||
*/
|
||||
public function getTermine($coodle_id)
|
||||
{
|
||||
if($coodle_id == '' || !is_numeric($coodle_id))
|
||||
{
|
||||
$this->errormsg = "Ungültige Coodle_id";
|
||||
return false;
|
||||
}
|
||||
|
||||
$qry = "SELECT * FROM campus.tbl_coodle_termin
|
||||
WHERE coodle_id=".$this->db_add_param($coodle_id, FHC_INTEGER, false).'
|
||||
ORDER BY datum, uhrzeit;';
|
||||
if($coodle_id == '' || !is_numeric($coodle_id))
|
||||
{
|
||||
$this->errormsg = "Ungültige Coodle_id";
|
||||
return false;
|
||||
}
|
||||
|
||||
$qry = "(SELECT * FROM campus.tbl_coodle_termin
|
||||
WHERE coodle_id=".$this->db_add_param($coodle_id, FHC_INTEGER, false)."
|
||||
AND datum != '1900-01-01'
|
||||
ORDER BY datum, uhrzeit)
|
||||
|
||||
UNION ALL
|
||||
|
||||
(SELECT * FROM campus.tbl_coodle_termin
|
||||
WHERE coodle_id=".$this->db_add_param($coodle_id, FHC_INTEGER, false)."
|
||||
AND datum = '1900-01-01');";
|
||||
|
||||
if($result = $this->db_query($qry))
|
||||
{
|
||||
@@ -910,6 +997,9 @@ class coodle extends basis_db
|
||||
$coodle->insertvon = $row->insertvon;
|
||||
$coodle->updateamum = $row->updateamum;
|
||||
$coodle->updatevon = $row->updatevon;
|
||||
$coodle->mailversand = $row->mailversand;
|
||||
$coodle->teilnehmer_anonym = $row->teilnehmer_anonym;
|
||||
$coodle->termine_anonym = $row->termine_anonym;
|
||||
|
||||
$this->result[] = $coodle;
|
||||
}
|
||||
@@ -1210,6 +1300,9 @@ class coodle extends basis_db
|
||||
$coodle->updatevon = $row->updatevon;
|
||||
$coodle->endedatum = $row->endedatum;
|
||||
$coodle->ersteller_uid = $row->ersteller_uid;
|
||||
$coodle->mailversand = $row->mailversand;
|
||||
$coodle->teilnehmer_anonym = $row->teilnehmer_anonym;
|
||||
$coodle->termine_anonym = $row->termine_anonym;
|
||||
|
||||
$this->result[] = $coodle;
|
||||
}
|
||||
|
||||
@@ -965,4 +965,82 @@ function check_infrastruktur($uid)
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* The function is used to prepare a string for a regular expression search in an sql-query.
|
||||
* It lowers and trims the $inputString, splits it by character, compares each character with the character set
|
||||
* and replaces (if exists) this character with the entire set surrounded with square brackets.
|
||||
* E.g: "ösi" returns "[oóŏǒôốộồổỗöọőòỏơớợờởỡōǫøǿõɛɔɵʘœ][sśšşŝșṡṣʂſʃʆßʅ][iíĭǐîïịìỉīįɨĩɩı]"
|
||||
*
|
||||
* @param string $inputString The string to convert
|
||||
* @param boolean $punctuationMark Default false. If true, the set is expanded with punctuation marks.
|
||||
* @return string A regular expression-formatted string
|
||||
*/
|
||||
function generateSpecialCharacterString($inputString, $punctuationMark = false)
|
||||
{
|
||||
$character_set = array(
|
||||
'aáăắặằẳẵǎâấậầẩẫäạàảāąåǻãæǽɑɐɒ',
|
||||
'bḅɓß',
|
||||
'cćčçĉɕċ',
|
||||
'dďḓḍɗḏđɖʤdzʣʥdžð',
|
||||
'eéĕěêếệềểễëėẹèẻēęẽʒǯʓɘɜɝəɚ',
|
||||
'fƒſʩfiflʃʆʅɟʄ',
|
||||
'gǵğǧģĝġɠḡɡɣ',
|
||||
'hḫĥḥɦẖħɧɥʮʯų',
|
||||
'iíĭǐîïịìỉīįɨĩɩıİ',
|
||||
'jijɟjǰĵʝȷɟʄ',
|
||||
'kķḳƙḵĸʞ',
|
||||
'lĺƚɬľļḽḷḹḻŀɫɭłƛɮljʪʫ',
|
||||
'mḿṁṃɱɯɰ',
|
||||
'nʼnńňņṋṅṇǹɲṉɳñnjŋŊ',
|
||||
'oóŏǒôốộồổỗöọőòỏơớợờởỡōǫøǿõɛɔɵʘœ',
|
||||
'pɸþ',
|
||||
'rŕřŗṙṛṝɾṟɼɽɿɹɻɺ',
|
||||
'sśšşŝșṡṣʂſʃʆßʅ',
|
||||
'tťţṱțẗṭṯʈŧʨʧþðʦʇ',
|
||||
'uʉúŭǔûüǘǚǜǖụűùủưứựừửữūųůũʊ',
|
||||
'wẃŵẅẁʍ',
|
||||
'yýŷÿẏỵỳƴỷȳỹʎ',
|
||||
'zźžʑżẓẕʐƶ'
|
||||
);
|
||||
|
||||
if ($punctuationMark == true)
|
||||
array_push($character_set, '--‒–——–—-');
|
||||
|
||||
|
||||
/* the backslash \,
|
||||
* the caret ^,
|
||||
* the dollar sign $,
|
||||
* the period or dot .,
|
||||
* the vertical bar or pipe symbol |,
|
||||
* the question mark ?,
|
||||
* the asterisk or star *,
|
||||
* the plus sign +,
|
||||
* the opening parenthesis (,
|
||||
* the closing parenthesis ),
|
||||
* the opening square bracket [,
|
||||
* the opening curly brace { */
|
||||
|
||||
// Trim and lower $inputString
|
||||
$inputString = mb_strtolower(TRIM($inputString));
|
||||
// Split string by character to compare it with the character set
|
||||
$inputStringSplitted = preg_split('//u', $inputString, -1, PREG_SPLIT_NO_EMPTY);
|
||||
|
||||
// Compare every character with the set and replace it
|
||||
foreach ($inputStringSplitted AS $key => $item)
|
||||
{
|
||||
foreach ($character_set AS $set)
|
||||
{
|
||||
if (strpos($set, $item) !== false)
|
||||
$inputStringSplitted[$key] = '['.$set.']';
|
||||
elseif ($item == ' ')
|
||||
$inputStringSplitted[$key] = '.*';
|
||||
}
|
||||
}
|
||||
|
||||
// Recombine array to string
|
||||
$inputString = implode('', $inputStringSplitted);
|
||||
|
||||
return $inputString;
|
||||
}
|
||||
?>
|
||||
|
||||
@@ -623,5 +623,76 @@ class gruppe extends basis_db
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Sucht nach Gruppen in gruppe_kurzbz, bezeichnung und beschreibung.
|
||||
*
|
||||
* @param array $searchItems Array mit Suchbegriffen, nach denen gesucht werden soll
|
||||
* @param boolean $aktiv (optional). Default true. Wenn false werden nur inaktive gruppen geladen, wenn null dann alle
|
||||
* @param integer $limit (optional). Limit an Ergebnissen
|
||||
*
|
||||
* @return true, wenn erfolgreich, false im Fehlerfall
|
||||
*/
|
||||
public function searchGruppen($searchItems, $aktiv = true, $limit = null)
|
||||
{
|
||||
$qry = "SELECT
|
||||
*
|
||||
FROM
|
||||
public.tbl_gruppe
|
||||
WHERE";
|
||||
if(is_null($aktiv))
|
||||
$qry.=" (";
|
||||
elseif($aktiv==true)
|
||||
$qry.=" tbl_gruppe.aktiv=true AND (";
|
||||
elseif($aktiv==false)
|
||||
$qry.=" tbl_gruppe.aktiv=false AND (";
|
||||
|
||||
$qry.=" lower(gruppe_kurzbz) like lower('%".$this->db_escape(implode(' ',$searchItems))."%')";
|
||||
$qry.=" OR lower(bezeichnung) like lower('%".$this->db_escape(implode(' ',$searchItems))."%')";
|
||||
$qry.=" OR lower(beschreibung) like lower('%".$this->db_escape(implode(' ',$searchItems))."%')";
|
||||
|
||||
$qry.=") ORDER BY gruppe_kurzbz";
|
||||
|
||||
if(!is_null($limit) && is_numeric($limit))
|
||||
$qry.=" LIMIT ".$limit;
|
||||
|
||||
if($result = $this->db_query($qry))
|
||||
{
|
||||
while($row = $this->db_fetch_object($result))
|
||||
{
|
||||
$grp_obj = new gruppe();
|
||||
|
||||
$grp_obj->gruppe_kurzbz = $row->gruppe_kurzbz;
|
||||
$grp_obj->studiengang_kz = $row->studiengang_kz;
|
||||
$grp_obj->bezeichnung = $row->bezeichnung;
|
||||
$grp_obj->semester = $row->semester;
|
||||
$grp_obj->sort = $row->sort;
|
||||
$grp_obj->mailgrp = $this->db_parse_bool($row->mailgrp);
|
||||
$grp_obj->lehre = $this->db_parse_bool($row->lehre);
|
||||
$grp_obj->beschreibung = $row->beschreibung;
|
||||
$grp_obj->sichtbar = $this->db_parse_bool($row->sichtbar);
|
||||
$grp_obj->aktiv = $this->db_parse_bool($row->aktiv);
|
||||
$grp_obj->content_visible = $this->db_parse_bool($row->content_visible);
|
||||
$grp_obj->generiert = $this->db_parse_bool($row->generiert);
|
||||
$grp_obj->updateamum = $row->updateamum;
|
||||
$grp_obj->updatevon = $row->updatevon;
|
||||
$grp_obj->insertamum = $row->insertamum;
|
||||
$grp_obj->insertvon = $row->insertvon;
|
||||
$grp_obj->orgform_kurzbz = $row->orgform_kurzbz;
|
||||
$grp_obj->gesperrt = $this->db_parse_bool($row->gesperrt);
|
||||
$grp_obj->zutrittssystem = $this->db_parse_bool($row->zutrittssystem);
|
||||
$grp_obj->aufnahmegruppe = $this->db_parse_bool($row->aufnahmegruppe);
|
||||
|
||||
$this->result[] = $grp_obj;
|
||||
}
|
||||
$this->errormsg = $qry;
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->errormsg = 'Fehler beim Laden der Daten';
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
@@ -473,11 +473,15 @@ class lehreinheitmitarbeiter extends basis_db
|
||||
*/
|
||||
public function getLehreinheiten($mitarbeiter_uid, $studiensemester_kurzbz)
|
||||
{
|
||||
$qry = 'SELECT DISTINCT lehreinheit_id, lv_bezeichnung, lv_kurzbz, unr, lv_lehrform_kurzbz, stg_kurzbzlang, lv_semester '
|
||||
. 'FROM campus.vw_lehreinheit '
|
||||
. 'WHERE mitarbeiter_uid = ' . $this->db_add_param($mitarbeiter_uid)
|
||||
. ' AND studiensemester_kurzbz = ' . $this->db_add_param($studiensemester_kurzbz)
|
||||
. ' ORDER BY lv_bezeichnung, unr ';
|
||||
$qry = 'SELECT
|
||||
DISTINCT lehreinheit_id, lv_bezeichnung, lv_kurzbz, unr, lv_lehrform_kurzbz, stg_kurzbzlang,
|
||||
lv_semester, lehrform_kurzbz
|
||||
FROM
|
||||
campus.vw_lehreinheit
|
||||
WHERE
|
||||
mitarbeiter_uid = '.$this->db_add_param($mitarbeiter_uid).'
|
||||
AND studiensemester_kurzbz = '.$this->db_add_param($studiensemester_kurzbz).'
|
||||
ORDER BY lv_bezeichnung, unr ';
|
||||
|
||||
$result = $this->db_query($qry);
|
||||
$ret = array();
|
||||
@@ -494,7 +498,7 @@ class lehreinheitmitarbeiter extends basis_db
|
||||
* Laedt die Lektoren einer Lehrveranstaltung in einem Studiensemester
|
||||
* @param lehrveranstaltung_id
|
||||
* @param studiensemester_kurzbz
|
||||
* @param integer lehreinheit_id Optional Lehreinheit_id
|
||||
* @param integer lehreinheit_id Optional Lehreinheit_id
|
||||
* @return array + true wenn ok / false im Fehlerfall
|
||||
*/
|
||||
public function getMitarbeiterLV($lehrveranstaltung_id, $studiensemester_kurzbz, $lehreinheit_id=null)
|
||||
@@ -514,7 +518,7 @@ class lehreinheitmitarbeiter extends basis_db
|
||||
WHERE
|
||||
lehrveranstaltung_id=".$this->db_add_param($lehrveranstaltung_id, FHC_INTEGER)."
|
||||
AND tbl_lehreinheit.studiensemester_kurzbz=".$this->db_add_param($studiensemester_kurzbz);
|
||||
|
||||
|
||||
if(!is_null($lehreinheit_id))
|
||||
$qry .=" AND tbl_lehreinheit.lehreinheit_id=".$this->db_add_param($lehreinheit_id, FHC_INTEGER);
|
||||
$qry .=" ORDER BY nachname, vorname;";
|
||||
|
||||
@@ -41,6 +41,7 @@ if($dr=='')
|
||||
//Originaldateien des Herstellers
|
||||
echo '<link rel="stylesheet" type="text/css" href="'.$dr.'vendor/FHC-vendor/jquery-tablesorter/css/theme.default.css">';
|
||||
echo '<script src="'.$dr.'vendor/FHC-vendor/jquery-tablesorter/js/jquery.tablesorter.js"></script>';
|
||||
echo '<script src="'.$dr.'vendor/FHC-vendor/jquery-tablesorter/js/jquery.tablesorter.widgets.js"></script>';
|
||||
|
||||
//Anpassungen
|
||||
echo '<link rel="stylesheet" type="text/css" href="'.$dr.'include/vendor_custom/jquery-tablesorter/tablesort.css">';
|
||||
|
||||
+3
-3
@@ -27,10 +27,10 @@ class PDF extends FPDF
|
||||
* letter
|
||||
* legal
|
||||
*/
|
||||
function PDF($orientation='P',$unit='mm',$format='A4')
|
||||
function __construct($orientation='P',$unit='mm',$format='A4')
|
||||
{
|
||||
//Call parent constructor
|
||||
$this->FPDF($orientation,$unit,$format);
|
||||
parent::__construct($orientation,$unit,$format);
|
||||
//Initialization
|
||||
$this->B=0;
|
||||
$this->I=0;
|
||||
@@ -188,4 +188,4 @@ class PDF extends FPDF
|
||||
}
|
||||
|
||||
}
|
||||
?>
|
||||
?>
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
* Date: 2008-08-03 *
|
||||
* Author: Olivier PLATHEY *
|
||||
*******************************************************************************/
|
||||
if (!defined('FPDF_VERSION'))
|
||||
if (!defined('FPDF_VERSION'))
|
||||
define('FPDF_VERSION','1.6');
|
||||
|
||||
class FPDF
|
||||
@@ -72,7 +72,7 @@ var $PDFVersion; //PDF version number
|
||||
* Public methods *
|
||||
* *
|
||||
*******************************************************************************/
|
||||
function FPDF($orientation='P', $unit='mm', $format='A4')
|
||||
function __construct($orientation='P', $unit='mm', $format='A4')
|
||||
{
|
||||
//Some checks
|
||||
$this->_dochecks();
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,10 +0,0 @@
|
||||
The year 1866 was marked by a bizarre development, an unexplained and downright inexplicable phenomenon that surely no one has forgotten. Without getting into those rumors that upset civilians in the seaports and deranged the public mind even far inland, it must be said that professional seamen were especially alarmed. Traders, shipowners, captains of vessels, skippers, and master mariners from Europe and America, naval officers from every country, and at their heels the various national governments on these two continents, were all extremely disturbed by the business.
|
||||
In essence, over a period of time several ships had encountered "an enormous thing" at sea, a long spindle-shaped object, sometimes giving off a phosphorescent glow, infinitely bigger and faster than any whale.
|
||||
The relevant data on this apparition, as recorded in various logbooks, agreed pretty closely as to the structure of the object or creature in question, its unprecedented speed of movement, its startling locomotive power, and the unique vitality with which it seemed to be gifted. If it was a cetacean, it exceeded in bulk any whale previously classified by science. No naturalist, neither Cuvier nor Lacépède, neither Professor Dumeril nor Professor de Quatrefages, would have accepted the existence of such a monster sight unseen -- specifically, unseen by their own scientific eyes.
|
||||
Striking an average of observations taken at different times -- rejecting those timid estimates that gave the object a length of 200 feet, and ignoring those exaggerated views that saw it as a mile wide and three long--you could still assert that this phenomenal creature greatly exceeded the dimensions of anything then known to ichthyologists, if it existed at all.
|
||||
Now then, it did exist, this was an undeniable fact; and since the human mind dotes on objects of wonder, you can understand the worldwide excitement caused by this unearthly apparition. As for relegating it to the realm of fiction, that charge had to be dropped.
|
||||
In essence, on July 20, 1866, the steamer Governor Higginson, from the Calcutta & Burnach Steam Navigation Co., encountered this moving mass five miles off the eastern shores of Australia. Captain Baker at first thought he was in the presence of an unknown reef; he was even about to fix its exact position when two waterspouts shot out of this inexplicable object and sprang hissing into the air some 150 feet. So, unless this reef was subject to the intermittent eruptions of a geyser, the Governor Higginson had fair and honest dealings with some aquatic mammal, until then unknown, that could spurt from its blowholes waterspouts mixed with air and steam.
|
||||
Similar events were likewise observed in Pacific seas, on July 23 of the same year, by the Christopher Columbus from the West India & Pacific Steam Navigation Co. Consequently, this extraordinary cetacean could transfer itself from one locality to another with startling swiftness, since within an interval of just three days, the Governor Higginson and the Christopher Columbus had observed it at two positions on the charts separated by a distance of more than 700 nautical leagues.
|
||||
Fifteen days later and 2,000 leagues farther, the Helvetia from the Compagnie Nationale and the Shannon from the Royal Mail line, running on opposite tacks in that part of the Atlantic lying between the United States and Europe, respectively signaled each other that the monster had been sighted in latitude 42 degrees 15' north and longitude 60 degrees 35' west of the meridian of Greenwich. From their simultaneous observations, they were able to estimate the mammal's minimum length at more than 350 English feet; this was because both the Shannon and the Helvetia were of smaller dimensions, although each measured 100 meters stem to stern. Now then, the biggest whales, those rorqual whales that frequent the waterways of the Aleutian Islands, have never exceeded a length of 56 meters--if they reach even that.
|
||||
One after another, reports arrived that would profoundly affect public opinion: new observations taken by the transatlantic liner Pereire, the Inman line's Etna running afoul of the monster, an official report drawn up by officers on the French frigate Normandy, dead-earnest reckonings obtained by the general staff of Commodore Fitz-James aboard the Lord Clyde. In lighthearted countries, people joked about this phenomenon, but such serious, practical countries as England, America, and Germany were deeply concerned.
|
||||
In every big city the monster was the latest rage; they sang about it in the coffee houses, they ridiculed it in the newspapers, they dramatized it in the theaters. The tabloids found it a fine opportunity for hatching all sorts of hoaxes. In those newspapers short of copy, you saw the reappearance of every gigantic imaginary creature, from "Moby Dick," that dreadful white whale from the High Arctic regions, to the stupendous kraken whose tentacles could entwine a 500-ton craft and drag it into the ocean depths. They even reprinted reports from ancient times: the views of Aristotle and Pliny accepting the existence of such monsters, then the Norwegian stories of Bishop Pontoppidan, the narratives of Paul Egede, and finally the reports of Captain Harrington -- whose good faith is above suspicion--in which he claims he saw, while aboard the Castilian in 1857, one of those enormous serpents that, until then, had frequented only the seas of France's old extremist newspaper, The Constitutionalist.
|
||||
@@ -1,23 +0,0 @@
|
||||
During the period in which these developments were occurring, I had returned from a scientific undertaking organized to explore the Nebraska badlands in the United States. In my capacity as Assistant Professor at the Paris Museum of Natural History, I had been attached to this expedition by the French government. After spending six months in Nebraska, I arrived in New York laden with valuable collections near the end of March. My departure for France was set for early May. In the meantime, then, I was busy classifying my mineralogical, botanical, and zoological treasures when that incident took place with the Scotia.
|
||||
I was perfectly abreast of this question, which was the big news of the day, and how could I not have been? I had read and reread every American and European newspaper without being any farther along. This mystery puzzled me. Finding it impossible to form any views, I drifted from one extreme to the other. Something was out there, that much was certain, and any doubting Thomas was invited to place his finger on the Scotia's wound.
|
||||
When I arrived in New York, the question was at the boiling point. The hypothesis of a drifting islet or an elusive reef, put forward by people not quite in their right minds, was completely eliminated. And indeed, unless this reef had an engine in its belly, how could it move about with such prodigious speed?
|
||||
Also discredited was the idea of a floating hull or some other enormous wreckage, and again because of this speed of movement.
|
||||
So only two possible solutions to the question were left, creating two very distinct groups of supporters: on one side, those favoring a monster of colossal strength; on the other, those favoring an "underwater boat" of tremendous motor power.
|
||||
Now then, although the latter hypothesis was completely admissible, it couldn't stand up to inquiries conducted in both the New World and the Old. That a private individual had such a mechanism at his disposal was less than probable. Where and when had he built it, and how could he have built it in secret?
|
||||
Only some government could own such an engine of destruction, and in these disaster-filled times, when men tax their ingenuity to build increasingly powerful aggressive weapons, it was possible that, unknown to the rest of the world, some nation could have been testing such a fearsome machine. The Chassepot rifle led to the torpedo, and the torpedo has led to this underwater battering ram, which in turn will lead to the world putting its foot down. At least I hope it will.
|
||||
But this hypothesis of a war machine collapsed in the face of formal denials from the various governments. Since the public interest was at stake and transoceanic travel was suffering, the sincerity of these governments could not be doubted. Besides, how could the assembly of this underwater boat have escaped public notice? Keeping a secret under such circumstances would be difficult enough for an individual, and certainly impossible for a nation whose every move is under constant surveillance by rival powers.
|
||||
So, after inquiries conducted in England, France, Russia, Prussia, Spain, Italy, America, and even Turkey, the hypothesis of an underwater Monitor was ultimately rejected.
|
||||
After I arrived in New York, several people did me the honor of consulting me on the phenomenon in question. In France I had published a two-volume work, in quarto, entitled The Mysteries of the Great Ocean Depths. Well received in scholarly circles, this book had established me as a specialist in this pretty obscure field of natural history. My views were in demand. As long as I could deny the reality of the business, I confined myself to a flat "no comment." But soon, pinned to the wall, I had to explain myself straight out. And in this vein, "the honorable Pierre Aronnax, Professor at the Paris Museum," was summoned by The New York Herald to formulate his views no matter what.
|
||||
I complied. Since I could no longer hold my tongue, I let it wag. I discussed the question in its every aspect, both political and scientific, and this is an excerpt from the well-padded article I published in the issue of April 30.
|
||||
|
||||
"Therefore," I wrote, "after examining these different hypotheses one by one, we are forced, every other supposition having been refuted, to accept the existence of an extremely powerful marine animal.
|
||||
"The deepest parts of the ocean are totally unknown to us. No soundings have been able to reach them. What goes on in those distant depths? What creatures inhabit, or could inhabit, those regions twelve or fifteen miles beneath the surface of the water? What is the constitution of these animals? It's almost beyond conjecture.
|
||||
"However, the solution to this problem submitted to me can take the form of a choice between two alternatives.
|
||||
"Either we know every variety of creature populating our planet, or we do not.
|
||||
"If we do not know every one of them, if nature still keeps ichthyological secrets from us, nothing is more admissible than to accept the existence of fish or cetaceans of new species or even new genera, animals with a basically 'cast-iron' constitution that inhabit strata beyond the reach of our soundings, and which some development or other, an urge or a whim if you prefer, can bring to the upper level of the ocean for long intervals.
|
||||
"If, on the other hand, we do know every living species, we must look for the animal in question among those marine creatures already cataloged, and in this event I would be inclined to accept the existence of a giant narwhale.
|
||||
"The common narwhale, or sea unicorn, often reaches a length of sixty feet. Increase its dimensions fivefold or even tenfold, then give this cetacean a strength in proportion to its size while enlarging its offensive weapons, and you have the animal we're looking for. It would have the proportions determined by the officers of the Shannon, the instrument needed to perforate the Scotia, and the power to pierce a steamer's hull.
|
||||
"In essence, the narwhale is armed with a sort of ivory sword, or lance, as certain naturalists have expressed it. It's a king-sized tooth as hard as steel. Some of these teeth have been found buried in the bodies of baleen whales, which the narwhale attacks with invariable success. Others have been wrenched, not without difficulty, from the undersides of vessels that narwhales have pierced clean through, as a gimlet pierces a wine barrel. The museum at the Faculty of Medicine in Paris owns one of these tusks with a length of 2.25 meters and a width at its base of forty-eight centimeters!
|
||||
"All right then! Imagine this weapon to be ten times stronger and the animal ten times more powerful, launch it at a speed of twenty miles per hour, multiply its mass times its velocity, and you get just the collision we need to cause the specified catastrophe.
|
||||
"So, until information becomes more abundant, I plump for a sea unicorn of colossal dimensions, no longer armed with a mere lance but with an actual spur, like ironclad frigates or those warships called 'rams,' whose mass and motor power it would possess simultaneously.
|
||||
"This inexplicable phenomenon is thus explained away--unless it's something else entirely, which, despite everything that has been sighted, studied, explored and experienced, is still possible!"
|
||||
@@ -1,275 +0,0 @@
|
||||
StartFontMetrics 4.1
|
||||
FontName Calligrapher-Regular
|
||||
FullName Calligrapher Regular
|
||||
Notice Generated by Fontographer 3.5
|
||||
EncodingScheme FontSpecific
|
||||
FamilyName Calligrapher
|
||||
Weight Regular
|
||||
Version (Altsys Fontographer 3.5 5/26/92)
|
||||
Characters 215
|
||||
ItalicAngle 0.0
|
||||
Ascender 899
|
||||
Descender -234
|
||||
UnderlineThickness 20
|
||||
UnderlinePosition -200
|
||||
IsFixedPitch false
|
||||
FontBBox -50 -234 1328 899
|
||||
StartCharMetrics 256
|
||||
C 0 ; WX 800 ; N .notdef ; B 50 0 750 800 ;
|
||||
C 1 ; WX 800 ; N .notdef ; B 50 0 750 800 ;
|
||||
C 2 ; WX 800 ; N .notdef ; B 50 0 750 800 ;
|
||||
C 3 ; WX 800 ; N .notdef ; B 50 0 750 800 ;
|
||||
C 4 ; WX 800 ; N .notdef ; B 50 0 750 800 ;
|
||||
C 5 ; WX 800 ; N .notdef ; B 50 0 750 800 ;
|
||||
C 6 ; WX 800 ; N .notdef ; B 50 0 750 800 ;
|
||||
C 7 ; WX 800 ; N .notdef ; B 50 0 750 800 ;
|
||||
C 8 ; WX 800 ; N .notdef ; B 50 0 750 800 ;
|
||||
C 9 ; WX 800 ; N .notdef ; B 50 0 750 800 ;
|
||||
C 10 ; WX 800 ; N .notdef ; B 50 0 750 800 ;
|
||||
C 11 ; WX 800 ; N .notdef ; B 50 0 750 800 ;
|
||||
C 12 ; WX 800 ; N .notdef ; B 50 0 750 800 ;
|
||||
C 13 ; WX 800 ; N .notdef ; B 50 0 750 800 ;
|
||||
C 14 ; WX 800 ; N .notdef ; B 50 0 750 800 ;
|
||||
C 15 ; WX 800 ; N .notdef ; B 50 0 750 800 ;
|
||||
C 16 ; WX 800 ; N .notdef ; B 50 0 750 800 ;
|
||||
C 17 ; WX 800 ; N .notdef ; B 50 0 750 800 ;
|
||||
C 18 ; WX 800 ; N .notdef ; B 50 0 750 800 ;
|
||||
C 19 ; WX 800 ; N .notdef ; B 50 0 750 800 ;
|
||||
C 20 ; WX 800 ; N .notdef ; B 50 0 750 800 ;
|
||||
C 21 ; WX 800 ; N .notdef ; B 50 0 750 800 ;
|
||||
C 22 ; WX 800 ; N .notdef ; B 50 0 750 800 ;
|
||||
C 23 ; WX 800 ; N .notdef ; B 50 0 750 800 ;
|
||||
C 24 ; WX 800 ; N .notdef ; B 50 0 750 800 ;
|
||||
C 25 ; WX 800 ; N .notdef ; B 50 0 750 800 ;
|
||||
C 26 ; WX 800 ; N .notdef ; B 50 0 750 800 ;
|
||||
C 27 ; WX 800 ; N .notdef ; B 50 0 750 800 ;
|
||||
C 28 ; WX 800 ; N .notdef ; B 50 0 750 800 ;
|
||||
C 29 ; WX 800 ; N .notdef ; B 50 0 750 800 ;
|
||||
C 30 ; WX 800 ; N .notdef ; B 50 0 750 800 ;
|
||||
C 31 ; WX 800 ; N .notdef ; B 50 0 750 800 ;
|
||||
C 32 ; WX 282 ; N space ; B 67 -16 251 718 ;
|
||||
C 33 ; WX 324 ; N exclam ; B 67 -16 251 718 ;
|
||||
C 34 ; WX 405 ; N quotedbl ; B 60 460 353 718 ;
|
||||
C 35 ; WX 584 ; N numbersign ; B 35 0 549 701 ;
|
||||
C 36 ; WX 632 ; N dollar ; B 32 -126 595 814 ;
|
||||
C 37 ; WX 980 ; N percent ; B 35 -16 945 703 ;
|
||||
C 38 ; WX 776 ; N ampersand ; B 41 -17 811 670 ;
|
||||
C 39 ; WX 259 ; N quotesingle ; B 72 460 206 718 ;
|
||||
C 40 ; WX 299 ; N parenleft ; B 57 -119 299 785 ;
|
||||
C 41 ; WX 299 ; N parenright ; B 0 -119 242 785 ;
|
||||
C 42 ; WX 377 ; N asterisk ; B 35 407 342 714 ;
|
||||
C 43 ; WX 600 ; N plus ; B 47 0 553 506 ;
|
||||
C 44 ; WX 259 ; N comma ; B 35 -67 224 162 ;
|
||||
C 45 ; WX 432 ; N hyphen ; B 28 249 404 377 ;
|
||||
C 46 ; WX 254 ; N period ; B 43 -16 227 162 ;
|
||||
C 47 ; WX 597 ; N slash ; B 7 -14 591 714 ;
|
||||
C 48 ; WX 529 ; N zero ; B 21 -18 508 583 ;
|
||||
C 49 ; WX 298 ; N one ; B 8 -15 233 582 ;
|
||||
C 50 ; WX 451 ; N two ; B 17 -8 430 588 ;
|
||||
C 51 ; WX 359 ; N three ; B 11 -54 337 582 ;
|
||||
C 52 ; WX 525 ; N four ; B 18 -20 519 602 ;
|
||||
C 53 ; WX 423 ; N five ; B 10 -55 420 582 ;
|
||||
C 54 ; WX 464 ; N six ; B 23 -14 447 589 ;
|
||||
C 55 ; WX 417 ; N seven ; B 8 -18 415 589 ;
|
||||
C 56 ; WX 457 ; N eight ; B 19 -16 432 583 ;
|
||||
C 57 ; WX 479 ; N nine ; B 26 -16 450 588 ;
|
||||
C 58 ; WX 275 ; N colon ; B 59 -16 242 491 ;
|
||||
C 59 ; WX 282 ; N semicolon ; B 54 -67 245 491 ;
|
||||
C 60 ; WX 600 ; N less ; B 47 -8 553 514 ;
|
||||
C 61 ; WX 600 ; N equal ; B 47 98 553 408 ;
|
||||
C 62 ; WX 600 ; N greater ; B 47 -8 553 514 ;
|
||||
C 63 ; WX 501 ; N question ; B 21 -16 473 721 ;
|
||||
C 64 ; WX 800 ; N at ; B 29 -12 771 730 ;
|
||||
C 65 ; WX 743 ; N A ; B -23 -14 754 723 ;
|
||||
C 66 ; WX 636 ; N B ; B -42 -7 608 706 ;
|
||||
C 67 ; WX 598 ; N C ; B 27 -12 572 712 ;
|
||||
C 68 ; WX 712 ; N D ; B -42 -11 684 705 ;
|
||||
C 69 ; WX 608 ; N E ; B -21 0 608 708 ;
|
||||
C 70 ; WX 562 ; N F ; B -21 -18 584 716 ;
|
||||
C 71 ; WX 680 ; N G ; B 29 -8 668 714 ;
|
||||
C 72 ; WX 756 ; N H ; B 70 -17 777 728 ;
|
||||
C 73 ; WX 308 ; N I ; B 14 -15 238 718 ;
|
||||
C 74 ; WX 314 ; N J ; B 7 -223 244 727 ;
|
||||
C 75 ; WX 676 ; N K ; B 14 -16 683 725 ;
|
||||
C 76 ; WX 552 ; N L ; B 14 -8 580 713 ;
|
||||
C 77 ; WX 1041 ; N M ; B 42 -17 1017 739 ;
|
||||
C 78 ; WX 817 ; N N ; B -42 -17 747 736 ;
|
||||
C 79 ; WX 729 ; N O ; B 32 -16 698 709 ;
|
||||
C 80 ; WX 569 ; N P ; B -35 -15 570 716 ;
|
||||
C 81 ; WX 698 ; N Q ; B 27 -201 1328 715 ;
|
||||
C 82 ; WX 674 ; N R ; B -35 -20 696 712 ;
|
||||
C 83 ; WX 618 ; N S ; B 31 -16 589 709 ;
|
||||
C 84 ; WX 673 ; N T ; B -21 -20 702 714 ;
|
||||
C 85 ; WX 805 ; N U ; B 0 -19 804 722 ;
|
||||
C 86 ; WX 753 ; N V ; B -28 -20 788 729 ;
|
||||
C 87 ; WX 1238 ; N W ; B -28 -17 1273 736 ;
|
||||
C 88 ; WX 716 ; N X ; B 7 -38 709 731 ;
|
||||
C 89 ; WX 754 ; N Y ; B -35 -17 789 747 ;
|
||||
C 90 ; WX 599 ; N Z ; B 30 -5 584 748 ;
|
||||
C 91 ; WX 315 ; N bracketleft ; B 93 -124 322 718 ;
|
||||
C 92 ; WX 463 ; N backslash ; B -21 -18 484 736 ;
|
||||
C 93 ; WX 315 ; N bracketright ; B -7 -124 222 718 ;
|
||||
C 94 ; WX 600 ; N asciicircum ; B 63 266 537 658 ;
|
||||
C 95 ; WX 547 ; N underscore ; B -7 -198 554 -163 ;
|
||||
C 96 ; WX 278 ; N grave ; B -1 541 214 693 ;
|
||||
C 97 ; WX 581 ; N a ; B 21 -16 581 494 ;
|
||||
C 98 ; WX 564 ; N b ; B -24 -17 543 793 ;
|
||||
C 99 ; WX 440 ; N c ; B 21 -17 422 490 ;
|
||||
C 100 ; WX 571 ; N d ; B 0 -15 550 659 ;
|
||||
C 101 ; WX 450 ; N e ; B 28 -23 428 493 ;
|
||||
C 102 ; WX 347 ; N f ; B -35 -14 474 785 ;
|
||||
C 103 ; WX 628 ; N g ; B 19 -219 612 496 ;
|
||||
C 104 ; WX 611 ; N h ; B -29 -18 569 785 ;
|
||||
C 105 ; WX 283 ; N i ; B -14 -15 241 679 ;
|
||||
C 106 ; WX 283 ; N j ; B -14 -234 241 679 ;
|
||||
C 107 ; WX 560 ; N k ; B -24 -15 582 789 ;
|
||||
C 108 ; WX 252 ; N l ; B -28 -15 210 789 ;
|
||||
C 109 ; WX 976 ; N m ; B -21 -16 927 494 ;
|
||||
C 110 ; WX 595 ; N n ; B -28 -15 574 493 ;
|
||||
C 111 ; WX 508 ; N o ; B 27 -17 485 490 ;
|
||||
C 112 ; WX 549 ; N p ; B -28 -216 526 496 ;
|
||||
C 113 ; WX 540 ; N q ; B 28 -219 491 493 ;
|
||||
C 114 ; WX 395 ; N r ; B -21 -19 430 492 ;
|
||||
C 115 ; WX 441 ; N s ; B 34 -15 413 493 ;
|
||||
C 116 ; WX 307 ; N t ; B -21 -16 378 621 ;
|
||||
C 117 ; WX 614 ; N u ; B -14 -18 558 501 ;
|
||||
C 118 ; WX 556 ; N v ; B -28 -20 569 483 ;
|
||||
C 119 ; WX 915 ; N w ; B -28 -17 928 495 ;
|
||||
C 120 ; WX 559 ; N x ; B 14 -17 546 500 ;
|
||||
C 121 ; WX 597 ; N y ; B -21 -227 541 500 ;
|
||||
C 122 ; WX 452 ; N z ; B 28 -5 442 515 ;
|
||||
C 123 ; WX 315 ; N braceleft ; B 6 -118 309 718 ;
|
||||
C 124 ; WX 222 ; N bar ; B 63 -18 159 730 ;
|
||||
C 125 ; WX 315 ; N braceright ; B 6 -118 309 718 ;
|
||||
C 126 ; WX 600 ; N asciitilde ; B 69 166 531 340 ;
|
||||
C 127 ; WX 800 ; N .notdef ; B 50 0 750 800 ;
|
||||
C 128 ; WX 800 ; N .notdef ; B 50 0 750 800 ;
|
||||
C 129 ; WX 800 ; N .notdef ; B 50 0 750 800 ;
|
||||
C 130 ; WX 0 ; N quotesinglbase ; B -23 -14 754 877 ;
|
||||
C 131 ; WX 0 ; N florin ; B 0 -19 804 854 ;
|
||||
C 132 ; WX 0 ; N quotedblbase ; B -23 -14 754 877 ;
|
||||
C 133 ; WX 780 ; N ellipsis ; B 43 -16 747 162 ;
|
||||
C 134 ; WX 0 ; N dagger ; B 27 -122 437 592 ;
|
||||
C 135 ; WX 0 ; N daggerdbl ; B 43 278 227 456 ;
|
||||
C 136 ; WX 278 ; N circumflex ; B -14 557 292 677 ;
|
||||
C 137 ; WX 0 ; N perthousand ; B -23 -14 754 877 ;
|
||||
C 138 ; WX 0 ; N Scaron ; B 0 0 0 100 ;
|
||||
C 139 ; WX 0 ; N guilsinglleft ; B 43 278 227 456 ;
|
||||
C 140 ; WX 1064 ; N OE ; B 32 -16 1055 709 ;
|
||||
C 141 ; WX 800 ; N .notdef ; B 50 0 750 800 ;
|
||||
C 142 ; WX 800 ; N .notdef ; B 50 0 750 800 ;
|
||||
C 143 ; WX 800 ; N .notdef ; B 50 0 750 800 ;
|
||||
C 144 ; WX 800 ; N .notdef ; B 50 0 750 800 ;
|
||||
C 145 ; WX 259 ; N quoteleft ; B 35 489 224 717 ;
|
||||
C 146 ; WX 259 ; N quoteright ; B 35 489 224 717 ;
|
||||
C 147 ; WX 470 ; N quotedblleft ; B 35 489 443 717 ;
|
||||
C 148 ; WX 470 ; N quotedblright ; B 35 487 443 717 ;
|
||||
C 149 ; WX 500 ; N bullet ; B 70 179 430 539 ;
|
||||
C 150 ; WX 300 ; N endash ; B 0 245 300 350 ;
|
||||
C 151 ; WX 600 ; N emdash ; B 0 245 600 350 ;
|
||||
C 152 ; WX 278 ; N tilde ; B -44 563 326 689 ;
|
||||
C 153 ; WX 990 ; N trademark ; B 62 306 928 718 ;
|
||||
C 154 ; WX 0 ; N scaron ; B 0 0 0 100 ;
|
||||
C 155 ; WX 0 ; N guilsinglright ; B 43 278 227 456 ;
|
||||
C 156 ; WX 790 ; N oe ; B 27 -23 764 493 ;
|
||||
C 157 ; WX 800 ; N .notdef ; B 50 0 750 800 ;
|
||||
C 158 ; WX 800 ; N .notdef ; B 50 0 750 800 ;
|
||||
C 159 ; WX 754 ; N Ydieresis ; B -35 -17 789 882 ;
|
||||
C 160 ; WX 282 ; N nbspace ; B -23 -14 754 893 ;
|
||||
C 161 ; WX 324 ; N exclamdown ; B 69 -203 253 531 ;
|
||||
C 162 ; WX 450 ; N cent ; B 27 -122 437 592 ;
|
||||
C 163 ; WX 640 ; N sterling ; B 0 -9 619 716 ;
|
||||
C 164 ; WX 518 ; N currency ; B 3 72 515 586 ;
|
||||
C 165 ; WX 603 ; N yen ; B -28 -65 631 747 ;
|
||||
C 166 ; WX 0 ; N brokenbar ; B 0 0 0 100 ;
|
||||
C 167 ; WX 519 ; N section ; B -50 -216 524 762 ;
|
||||
C 168 ; WX 254 ; N dieresis ; B -20 554 308 682 ;
|
||||
C 169 ; WX 800 ; N copyright ; B 29 -12 771 730 ;
|
||||
C 170 ; WX 349 ; N ordfeminine ; B 13 385 349 717 ;
|
||||
C 171 ; WX 0 ; N guillemotleft ; B 43 -16 747 162 ;
|
||||
C 172 ; WX 0 ; N logicalnot ; B 30 0 730 700 ;
|
||||
C 173 ; WX 432 ; N hyphen ; B 28 249 404 377 ;
|
||||
C 174 ; WX 800 ; N registered ; B 29 -12 771 730 ;
|
||||
C 175 ; WX 278 ; N macron ; B -47 584 325 665 ;
|
||||
C 176 ; WX 0 ; N degree ; B 27 -122 437 592 ;
|
||||
C 177 ; WX 0 ; N plusminus ; B 29 -8 668 877 ;
|
||||
C 178 ; WX 0 ; N twosuperior ; B 0 0 0 100 ;
|
||||
C 179 ; WX 0 ; N threesuperior ; B 0 0 0 100 ;
|
||||
C 180 ; WX 278 ; N acute ; B 49 536 279 693 ;
|
||||
C 181 ; WX 614 ; N mu ; B -14 -231 558 501 ;
|
||||
C 182 ; WX 0 ; N paragraph ; B -35 -15 668 785 ;
|
||||
C 183 ; WX 254 ; N periodcentered ; B 43 278 227 456 ;
|
||||
C 184 ; WX 278 ; N cedilla ; B -8 -216 231 6 ;
|
||||
C 185 ; WX 0 ; N onesuperior ; B 0 0 0 100 ;
|
||||
C 186 ; WX 305 ; N ordmasculine ; B 16 373 291 702 ;
|
||||
C 187 ; WX 0 ; N guillemotright ; B 43 -16 747 162 ;
|
||||
C 188 ; WX 0 ; N onequarter ; B 0 0 0 100 ;
|
||||
C 189 ; WX 0 ; N onehalf ; B 0 0 0 100 ;
|
||||
C 190 ; WX 0 ; N threequarters ; B 0 0 0 100 ;
|
||||
C 191 ; WX 501 ; N questiondown ; B 15 -196 467 541 ;
|
||||
C 192 ; WX 743 ; N Agrave ; B -23 -14 754 893 ;
|
||||
C 193 ; WX 743 ; N Aacute ; B -23 -14 754 893 ;
|
||||
C 194 ; WX 743 ; N Acircumflex ; B -23 -14 754 877 ;
|
||||
C 195 ; WX 743 ; N Atilde ; B -23 -14 754 889 ;
|
||||
C 196 ; WX 743 ; N Adieresis ; B -23 -14 754 882 ;
|
||||
C 197 ; WX 743 ; N Aring ; B -23 -14 754 899 ;
|
||||
C 198 ; WX 1060 ; N AE ; B -29 -14 1053 708 ;
|
||||
C 199 ; WX 598 ; N Ccedilla ; B 27 -183 572 712 ;
|
||||
C 200 ; WX 608 ; N Egrave ; B -21 0 608 893 ;
|
||||
C 201 ; WX 608 ; N Eacute ; B -21 0 608 893 ;
|
||||
C 202 ; WX 608 ; N Ecircumflex ; B -21 0 608 877 ;
|
||||
C 203 ; WX 608 ; N Edieresis ; B -21 0 608 882 ;
|
||||
C 204 ; WX 308 ; N Igrave ; B 14 -15 264 893 ;
|
||||
C 205 ; WX 308 ; N Iacute ; B 14 -15 274 893 ;
|
||||
C 206 ; WX 308 ; N Icircumflex ; B 1 -15 307 877 ;
|
||||
C 207 ; WX 308 ; N Idieresis ; B -15 -15 313 882 ;
|
||||
C 208 ; WX 0 ; N Eth ; B 0 0 0 100 ;
|
||||
C 209 ; WX 817 ; N Ntilde ; B -42 -17 747 889 ;
|
||||
C 210 ; WX 729 ; N Ograve ; B 32 -16 698 893 ;
|
||||
C 211 ; WX 729 ; N Oacute ; B 32 -16 698 893 ;
|
||||
C 212 ; WX 729 ; N Ocircumflex ; B 32 -16 698 877 ;
|
||||
C 213 ; WX 729 ; N Otilde ; B 32 -16 698 889 ;
|
||||
C 214 ; WX 729 ; N Odieresis ; B 32 -16 698 882 ;
|
||||
C 215 ; WX 0 ; N multiply ; B 0 0 0 100 ;
|
||||
C 216 ; WX 729 ; N Oslash ; B 14 -24 724 709 ;
|
||||
C 217 ; WX 805 ; N Ugrave ; B 0 -19 804 893 ;
|
||||
C 218 ; WX 805 ; N Uacute ; B 0 -19 804 893 ;
|
||||
C 219 ; WX 805 ; N Ucircumflex ; B 0 -19 804 877 ;
|
||||
C 220 ; WX 805 ; N Udieresis ; B 0 -19 804 882 ;
|
||||
C 221 ; WX 0 ; N _235 ; B 0 0 0 100 ;
|
||||
C 222 ; WX 0 ; N Thorn ; B 0 0 0 100 ;
|
||||
C 223 ; WX 688 ; N germandbls ; B -35 -15 668 785 ;
|
||||
C 224 ; WX 581 ; N agrave ; B 21 -16 581 693 ;
|
||||
C 225 ; WX 581 ; N aacute ; B 21 -16 581 693 ;
|
||||
C 226 ; WX 581 ; N acircumflex ; B 21 -16 581 677 ;
|
||||
C 227 ; WX 581 ; N atilde ; B 21 -16 581 689 ;
|
||||
C 228 ; WX 581 ; N adieresis ; B 21 -16 581 682 ;
|
||||
C 229 ; WX 581 ; N aring ; B 21 -16 581 734 ;
|
||||
C 230 ; WX 792 ; N ae ; B 21 -23 773 494 ;
|
||||
C 231 ; WX 440 ; N ccedilla ; B 21 -183 422 490 ;
|
||||
C 232 ; WX 450 ; N egrave ; B 28 -23 428 693 ;
|
||||
C 233 ; WX 450 ; N eacute ; B 28 -23 428 693 ;
|
||||
C 234 ; WX 450 ; N ecircumflex ; B 28 -23 432 677 ;
|
||||
C 235 ; WX 450 ; N edieresis ; B 28 -23 428 682 ;
|
||||
C 236 ; WX 283 ; N igrave ; B -14 -15 244 693 ;
|
||||
C 237 ; WX 283 ; N iacute ; B -14 -15 269 693 ;
|
||||
C 238 ; WX 283 ; N icircumflex ; B -14 -15 297 677 ;
|
||||
C 239 ; WX 283 ; N idieresis ; B -25 -15 303 682 ;
|
||||
C 240 ; WX 0 ; N Yacute ; B 0 0 0 100 ;
|
||||
C 241 ; WX 595 ; N ntilde ; B -28 -15 574 689 ;
|
||||
C 242 ; WX 508 ; N ograve ; B 27 -17 485 693 ;
|
||||
C 243 ; WX 508 ; N oacute ; B 27 -17 485 693 ;
|
||||
C 244 ; WX 508 ; N ocircumflex ; B 27 -17 485 677 ;
|
||||
C 245 ; WX 508 ; N otilde ; B 27 -17 485 689 ;
|
||||
C 246 ; WX 508 ; N odieresis ; B 27 -17 485 682 ;
|
||||
C 247 ; WX 0 ; N divide ; B 35 0 760 727 ;
|
||||
C 248 ; WX 508 ; N oslash ; B -8 -54 496 589 ;
|
||||
C 249 ; WX 614 ; N ugrave ; B -14 -18 558 693 ;
|
||||
C 250 ; WX 614 ; N uacute ; B -14 -18 558 693 ;
|
||||
C 251 ; WX 614 ; N ucircumflex ; B -14 -18 558 677 ;
|
||||
C 252 ; WX 614 ; N udieresis ; B -14 -18 558 682 ;
|
||||
C 253 ; WX 0 ; N yacute ; B 0 0 0 100 ;
|
||||
C 254 ; WX 0 ; N thorn ; B 0 0 0 100 ;
|
||||
C 255 ; WX 597 ; N ydieresis ; B -21 -227 541 682 ;
|
||||
EndCharMetrics
|
||||
EndFontMetrics
|
||||
@@ -1,24 +0,0 @@
|
||||
<?php
|
||||
$type='TrueType';
|
||||
$name='Calligrapher-Regular';
|
||||
$desc=array('Ascent'=>899,'Descent'=>-234,'CapHeight'=>731,'Flags'=>32,'FontBBox'=>'[-50 -234 1328 899]','ItalicAngle'=>0,'StemV'=>70,'MissingWidth'=>800);
|
||||
$up=-200;
|
||||
$ut=20;
|
||||
$cw=array(
|
||||
chr(0)=>800,chr(1)=>800,chr(2)=>800,chr(3)=>800,chr(4)=>800,chr(5)=>800,chr(6)=>800,chr(7)=>800,chr(8)=>800,chr(9)=>800,chr(10)=>800,chr(11)=>800,chr(12)=>800,chr(13)=>800,chr(14)=>800,chr(15)=>800,chr(16)=>800,chr(17)=>800,chr(18)=>800,chr(19)=>800,chr(20)=>800,chr(21)=>800,
|
||||
chr(22)=>800,chr(23)=>800,chr(24)=>800,chr(25)=>800,chr(26)=>800,chr(27)=>800,chr(28)=>800,chr(29)=>800,chr(30)=>800,chr(31)=>800,' '=>282,'!'=>324,'"'=>405,'#'=>584,'$'=>632,'%'=>980,'&'=>776,'\''=>259,'('=>299,')'=>299,'*'=>377,'+'=>600,
|
||||
','=>259,'-'=>432,'.'=>254,'/'=>597,'0'=>529,'1'=>298,'2'=>451,'3'=>359,'4'=>525,'5'=>423,'6'=>464,'7'=>417,'8'=>457,'9'=>479,':'=>275,';'=>282,'<'=>600,'='=>600,'>'=>600,'?'=>501,'@'=>800,'A'=>743,
|
||||
'B'=>636,'C'=>598,'D'=>712,'E'=>608,'F'=>562,'G'=>680,'H'=>756,'I'=>308,'J'=>314,'K'=>676,'L'=>552,'M'=>1041,'N'=>817,'O'=>729,'P'=>569,'Q'=>698,'R'=>674,'S'=>618,'T'=>673,'U'=>805,'V'=>753,'W'=>1238,
|
||||
'X'=>716,'Y'=>754,'Z'=>599,'['=>315,'\\'=>463,']'=>315,'^'=>600,'_'=>547,'`'=>278,'a'=>581,'b'=>564,'c'=>440,'d'=>571,'e'=>450,'f'=>347,'g'=>628,'h'=>611,'i'=>283,'j'=>283,'k'=>560,'l'=>252,'m'=>976,
|
||||
'n'=>595,'o'=>508,'p'=>549,'q'=>540,'r'=>395,'s'=>441,'t'=>307,'u'=>614,'v'=>556,'w'=>915,'x'=>559,'y'=>597,'z'=>452,'{'=>315,'|'=>222,'}'=>315,'~'=>600,chr(127)=>800,chr(128)=>800,chr(129)=>800,chr(130)=>0,chr(131)=>0,
|
||||
chr(132)=>0,chr(133)=>780,chr(134)=>0,chr(135)=>0,chr(136)=>278,chr(137)=>0,chr(138)=>0,chr(139)=>0,chr(140)=>1064,chr(141)=>800,chr(142)=>800,chr(143)=>800,chr(144)=>800,chr(145)=>259,chr(146)=>259,chr(147)=>470,chr(148)=>470,chr(149)=>500,chr(150)=>300,chr(151)=>600,chr(152)=>278,chr(153)=>990,
|
||||
chr(154)=>0,chr(155)=>0,chr(156)=>790,chr(157)=>800,chr(158)=>800,chr(159)=>754,chr(160)=>282,chr(161)=>324,chr(162)=>450,chr(163)=>640,chr(164)=>518,chr(165)=>603,chr(166)=>0,chr(167)=>519,chr(168)=>254,chr(169)=>800,chr(170)=>349,chr(171)=>0,chr(172)=>0,chr(173)=>432,chr(174)=>800,chr(175)=>278,
|
||||
chr(176)=>0,chr(177)=>0,chr(178)=>0,chr(179)=>0,chr(180)=>278,chr(181)=>614,chr(182)=>0,chr(183)=>254,chr(184)=>278,chr(185)=>0,chr(186)=>305,chr(187)=>0,chr(188)=>0,chr(189)=>0,chr(190)=>0,chr(191)=>501,chr(192)=>743,chr(193)=>743,chr(194)=>743,chr(195)=>743,chr(196)=>743,chr(197)=>743,
|
||||
chr(198)=>1060,chr(199)=>598,chr(200)=>608,chr(201)=>608,chr(202)=>608,chr(203)=>608,chr(204)=>308,chr(205)=>308,chr(206)=>308,chr(207)=>308,chr(208)=>0,chr(209)=>817,chr(210)=>729,chr(211)=>729,chr(212)=>729,chr(213)=>729,chr(214)=>729,chr(215)=>0,chr(216)=>729,chr(217)=>805,chr(218)=>805,chr(219)=>805,
|
||||
chr(220)=>805,chr(221)=>0,chr(222)=>0,chr(223)=>688,chr(224)=>581,chr(225)=>581,chr(226)=>581,chr(227)=>581,chr(228)=>581,chr(229)=>581,chr(230)=>792,chr(231)=>440,chr(232)=>450,chr(233)=>450,chr(234)=>450,chr(235)=>450,chr(236)=>283,chr(237)=>283,chr(238)=>283,chr(239)=>283,chr(240)=>800,chr(241)=>595,
|
||||
chr(242)=>508,chr(243)=>508,chr(244)=>508,chr(245)=>508,chr(246)=>508,chr(247)=>0,chr(248)=>508,chr(249)=>614,chr(250)=>614,chr(251)=>614,chr(252)=>614,chr(253)=>0,chr(254)=>0,chr(255)=>597);
|
||||
$enc='cp1252';
|
||||
$diff='';
|
||||
$file='calligra.z';
|
||||
$originalsize=40120;
|
||||
?>
|
||||
Binary file not shown.
Binary file not shown.
@@ -1,15 +0,0 @@
|
||||
Austria;Vienna;83859;8075
|
||||
Belgium;Brussels;30518;10192
|
||||
Denmark;Copenhagen;43094;5295
|
||||
Finland;Helsinki;304529;5147
|
||||
France;Paris;543965;58728
|
||||
Germany;Berlin;357022;82057
|
||||
Greece;Athens;131625;10511
|
||||
Ireland;Dublin;70723;3694
|
||||
Italy;Roma;301316;57563
|
||||
Luxembourg;Luxembourg;2586;424
|
||||
Netherlands;Amsterdam;41526;15654
|
||||
Portugal;Lisbon;91906;9957
|
||||
Spain;Madrid;504790;39348
|
||||
Sweden;Stockholm;410934;8839
|
||||
United Kingdom;London;243820;58862
|
||||
@@ -1,18 +0,0 @@
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=ISO-8859-1">
|
||||
<TITLE>Tutorials</TITLE>
|
||||
<LINK TYPE="text/css" REL="stylesheet" HREF="../fpdf.css">
|
||||
</HEAD>
|
||||
<BODY>
|
||||
<H2>Tutorials</H2>
|
||||
The different examples rapidly show how to use FPDF. You will find all main features explained.<BR><BR>
|
||||
<A HREF="tuto1.htm">Tutorial 1</A>: Minimal example<BR>
|
||||
<A HREF="tuto2.htm">Tutorial 2</A>: Header, footer, page break and image<BR>
|
||||
<A HREF="tuto3.htm">Tutorial 3</A>: Line breaks and colors<BR>
|
||||
<A HREF="tuto4.htm">Tutorial 4</A>: Multi-columns<BR>
|
||||
<A HREF="tuto5.htm">Tutorial 5</A>: Tables<BR>
|
||||
<A HREF="tuto6.htm">Tutorial 6</A>: Links and flowing text<BR>
|
||||
<A HREF="tuto7.htm">Tutorial 7</A>: Adding new fonts and encoding support<BR>
|
||||
</BODY>
|
||||
</HTML>
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 2.3 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 2.6 KiB |
@@ -1,6 +0,0 @@
|
||||
<?php
|
||||
//Generation of font definition file for tutorial 7
|
||||
require('../font/makefont/makefont.php');
|
||||
|
||||
MakeFont('calligra.ttf','calligra.afm');
|
||||
?>
|
||||
@@ -1,92 +0,0 @@
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=ISO-8859-1">
|
||||
<TITLE>Minimal example</TITLE>
|
||||
<LINK TYPE="text/css" REL="stylesheet" HREF="../fpdf.css">
|
||||
</HEAD>
|
||||
<BODY>
|
||||
<H2>Minimal example</H2>
|
||||
Let's start with the classic example:
|
||||
<BR>
|
||||
<BR>
|
||||
<TABLE WIDTH="100%" STYLE="color:#4040C0; border-style:ridge" BORDERCOLORLIGHT="#B0B0E0" BORDERCOLORDARK="#000000" BORDER="2" CELLPADDING=6 CELLSPACING=0 BGCOLOR="#F0F5FF"><TR><TD style="border-width:0px">
|
||||
<NOBR><code><font color="#000000">
|
||||
<?php<br>define<font class="kw">(</font><font class="str">'FPDF_FONTPATH'</font><font class="kw">,</font><font class="str">'font/'</font><font class="kw">);<br>require(</font><font class="str">'fpdf.php'</font><font class="kw">);<br><br></font>$pdf<font class="kw">=new </font>FPDF<font class="kw">();<br></font>$pdf<font class="kw">-></font>AddPage<font class="kw">();<br></font>$pdf<font class="kw">-></font>SetFont<font class="kw">(</font><font class="str">'Arial'</font><font class="kw">,</font><font class="str">'B'</font><font class="kw">,</font>16<font class="kw">);<br></font>$pdf<font class="kw">-></font>Cell<font class="kw">(</font>40<font class="kw">,</font>10<font class="kw">,</font><font class="str">'Hello World!'</font><font class="kw">);<br></font>$pdf<font class="kw">-></font>Output<font class="kw">();<br></font>?>
|
||||
</font>
|
||||
</code></NOBR></TD></TR></TABLE><P></P>
|
||||
<SCRIPT>
|
||||
<!--
|
||||
if(document.location.href.indexOf('http:')==0)
|
||||
{
|
||||
document.write("<P CLASS='demo'><A HREF='tuto1.php' TARGET='_blank' CLASS='demo'>[Demo]</A></P>");
|
||||
}
|
||||
//-->
|
||||
</SCRIPT>
|
||||
The first line defines where the font directory resides, relative to the current directory.<BR>
|
||||
Then, after including the library file, we create an FPDF object.
|
||||
The <A HREF='../doc/fpdf.htm'>FPDF()</A> constructor is used here with the default values: pages are in A4 portrait and
|
||||
the measure unit is millimeter. It could have been specified explicitly with:
|
||||
<BR>
|
||||
<BR>
|
||||
<TABLE WIDTH="100%" STYLE="color:#4040C0; border-style:ridge" BORDERCOLORLIGHT="#B0B0E0" BORDERCOLORDARK="#000000" BORDER="2" CELLPADDING=6 CELLSPACING=0 BGCOLOR="#F0F5FF"><TR><TD style="border-width:0px">
|
||||
<NOBR><code><font color="#000000">
|
||||
$pdf<font class="kw">=new </font>FPDF<font class="kw">(</font><font class="str">'P'</font><font class="kw">,</font><font class="str">'mm'</font><font class="kw">,</font><font class="str">'A4'</font><font class="kw">);</font><br>
|
||||
</font>
|
||||
</code></NOBR></TD></TR></TABLE><P></P>
|
||||
It is possible to use landscape (<TT>L</TT>), other page formats (such as <TT>Letter</TT> and
|
||||
<TT>Legal</TT>) and measure units (<TT>pt</TT>, <TT>cm</TT>, <TT>in</TT>).
|
||||
<BR>
|
||||
<BR>
|
||||
There is no page for the moment, so we have to add one with <A HREF='../doc/addpage.htm'>AddPage()</A>. The origin
|
||||
is at the upper-left corner and the current position is by default placed at 1 cm from the
|
||||
borders; the margins can be changed with <A HREF='../doc/setmargins.htm'>SetMargins()</A>.
|
||||
<BR>
|
||||
<BR>
|
||||
Before we can print text, it is mandatory to select a font with <A HREF='../doc/setfont.htm'>SetFont()</A>, otherwise the
|
||||
document would be invalid. We choose Arial bold 16:
|
||||
<BR>
|
||||
<BR>
|
||||
<TABLE WIDTH="100%" STYLE="color:#4040C0; border-style:ridge" BORDERCOLORLIGHT="#B0B0E0" BORDERCOLORDARK="#000000" BORDER="2" CELLPADDING=6 CELLSPACING=0 BGCOLOR="#F0F5FF"><TR><TD style="border-width:0px">
|
||||
<NOBR><code><font color="#000000">
|
||||
$pdf<font class="kw">-></font>SetFont<font class="kw">(</font><font class="str">'Arial'</font><font class="kw">,</font><font class="str">'B'</font><font class="kw">,</font>16<font class="kw">);</font><br>
|
||||
</font>
|
||||
</code></NOBR></TD></TR></TABLE><P></P>
|
||||
We could have specified italics with I, underlined with U or a regular font with an empty string
|
||||
(or any combination). Note that the font size is given in points, not millimeters (or another
|
||||
user unit); it is the only exception. The other standard fonts are Times, Courier, Symbol and
|
||||
ZapfDingbats.
|
||||
<BR>
|
||||
<BR>
|
||||
We can now print a cell with <A HREF='../doc/cell.htm'>Cell()</A>. A cell is a rectangular area, possibly framed,
|
||||
which contains some text. It is output at the current position. We specify its dimensions,
|
||||
its text (centered or aligned), if borders should be drawn, and where the current position
|
||||
moves after it (to the right, below or to the beginning of the next line). To add a frame, we would do this:
|
||||
<BR>
|
||||
<BR>
|
||||
<TABLE WIDTH="100%" STYLE="color:#4040C0; border-style:ridge" BORDERCOLORLIGHT="#B0B0E0" BORDERCOLORDARK="#000000" BORDER="2" CELLPADDING=6 CELLSPACING=0 BGCOLOR="#F0F5FF"><TR><TD style="border-width:0px">
|
||||
<NOBR><code><font color="#000000">
|
||||
$pdf<font class="kw">-></font>Cell<font class="kw">(</font>40<font class="kw">,</font>10<font class="kw">,</font><font class="str">'Hello World !'</font><font class="kw">,</font>1<font class="kw">);</font><br>
|
||||
</font>
|
||||
</code></NOBR></TD></TR></TABLE><P></P>
|
||||
To add a new cell next to it with centered text and go to the next line, we would do:
|
||||
<BR>
|
||||
<BR>
|
||||
<TABLE WIDTH="100%" STYLE="color:#4040C0; border-style:ridge" BORDERCOLORLIGHT="#B0B0E0" BORDERCOLORDARK="#000000" BORDER="2" CELLPADDING=6 CELLSPACING=0 BGCOLOR="#F0F5FF"><TR><TD style="border-width:0px">
|
||||
<NOBR><code><font color="#000000">
|
||||
$pdf<font class="kw">-></font>Cell<font class="kw">(</font>60<font class="kw">,</font>10<font class="kw">,</font><font class="str">'Powered by FPDF.'</font><font class="kw">,</font>0<font class="kw">,</font>1<font class="kw">,</font><font class="str">'C'</font><font class="kw">);</font><br>
|
||||
</font>
|
||||
</code></NOBR></TD></TR></TABLE><P></P>
|
||||
Remark : the line break can also be done with <A HREF='../doc/ln.htm'>Ln()</A>. This method allows to specify
|
||||
in addition the height of the break.
|
||||
<BR>
|
||||
<BR>
|
||||
Finally, the document is closed and sent to the browser with <A HREF='../doc/output.htm'>Output()</A>. We could have saved
|
||||
it in a file by passing the desired file name.
|
||||
<BR>
|
||||
<BR>
|
||||
Caution: in case when the PDF is sent to the browser, nothing else must be output, not before
|
||||
nor after (the least space or carriage return matters). If you send some data before, you will
|
||||
get the error message: "Some data has already been output to browser, can't send PDF file". If
|
||||
you send after, your browser may display a blank page.
|
||||
</BODY>
|
||||
</HTML>
|
||||
@@ -1,10 +0,0 @@
|
||||
<?php
|
||||
define('FPDF_FONTPATH','../font/');
|
||||
require('../fpdf.php');
|
||||
|
||||
$pdf=new FPDF();
|
||||
$pdf->AddPage();
|
||||
$pdf->SetFont('Arial','B',16);
|
||||
$pdf->Cell(40,10,'Hello World!');
|
||||
$pdf->Output();
|
||||
?>
|
||||
@@ -1,50 +0,0 @@
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=ISO-8859-1">
|
||||
<TITLE>Header, footer, page break and image</TITLE>
|
||||
<LINK TYPE="text/css" REL="stylesheet" HREF="../fpdf.css">
|
||||
</HEAD>
|
||||
<BODY>
|
||||
<H2>Header, footer, page break and image</H2>
|
||||
Here is a two page example with header, footer and logo:
|
||||
<BR>
|
||||
<BR>
|
||||
<TABLE WIDTH="100%" STYLE="color:#4040C0; border-style:ridge" BORDERCOLORLIGHT="#B0B0E0" BORDERCOLORDARK="#000000" BORDER="2" CELLPADDING=6 CELLSPACING=0 BGCOLOR="#F0F5FF"><TR><TD style="border-width:0px">
|
||||
<NOBR><code><font color="#000000">
|
||||
<?php<br>define<font class="kw">(</font><font class="str">'FPDF_FONTPATH'</font><font class="kw">,</font><font class="str">'font/'</font><font class="kw">);<br>require(</font><font class="str">'fpdf.php'</font><font class="kw">);<br><br>class </font>PDF <font class="kw">extends </font>FPDF<br><font class="kw">{<br></font><font class="cmt">//Page header<br></font><font class="kw">function </font>Header<font class="kw">()<br>{<br> </font><font class="cmt">//Logo<br> </font>$<font class="kw">this-></font>Image<font class="kw">(</font><font class="str">'logo_pb.png'</font><font class="kw">,</font>10<font class="kw">,</font>8<font class="kw">,</font>33<font class="kw">);<br> </font><font class="cmt">//Arial bold 15<br> </font>$<font class="kw">this-></font>SetFont<font class="kw">(</font><font class="str">'Arial'</font><font class="kw">,</font><font class="str">'B'</font><font class="kw">,</font>15<font class="kw">);<br> </font><font class="cmt">//Move to the right<br> </font>$<font class="kw">this-></font>Cell<font class="kw">(</font>80<font class="kw">);<br> </font><font class="cmt">//Title<br> </font>$<font class="kw">this-></font>Cell<font class="kw">(</font>30<font class="kw">,</font>10<font class="kw">,</font><font class="str">'Title'</font><font class="kw">,</font>1<font class="kw">,</font>0<font class="kw">,</font><font class="str">'C'</font><font class="kw">);<br> </font><font class="cmt">//Line break<br> </font>$<font class="kw">this-></font>Ln<font class="kw">(</font>20<font class="kw">);<br>}<br><br></font><font class="cmt">//Page footer<br></font><font class="kw">function </font>Footer<font class="kw">()<br>{<br> </font><font class="cmt">//Position at 1.5 cm from bottom<br> </font>$<font class="kw">this-></font>SetY<font class="kw">(-</font>15<font class="kw">);<br> </font><font class="cmt">//Arial italic 8<br> </font>$<font class="kw">this-></font>SetFont<font class="kw">(</font><font class="str">'Arial'</font><font class="kw">,</font><font class="str">'I'</font><font class="kw">,</font>8<font class="kw">);<br> </font><font class="cmt">//Page number<br> </font>$<font class="kw">this-></font>Cell<font class="kw">(</font>0<font class="kw">,</font>10<font class="kw">,</font><font class="str">'Page '</font><font class="kw">.</font>$<font class="kw">this-></font>PageNo<font class="kw">().</font><font class="str">'/{nb}'</font><font class="kw">,</font>0<font class="kw">,</font>0<font class="kw">,</font><font class="str">'C'</font><font class="kw">);<br>}<br>}<br><br></font><font class="cmt">//Instanciation of inherited class<br></font>$pdf<font class="kw">=new </font>PDF<font class="kw">();<br></font>$pdf<font class="kw">-></font>AliasNbPages<font class="kw">();<br></font>$pdf<font class="kw">-></font>AddPage<font class="kw">();<br></font>$pdf<font class="kw">-></font>SetFont<font class="kw">(</font><font class="str">'Times'</font><font class="kw">,</font><font class="str">''</font><font class="kw">,</font>12<font class="kw">);<br>for(</font>$i<font class="kw">=</font>1<font class="kw">;</font>$i<font class="kw"><=</font>40<font class="kw">;</font>$i<font class="kw">++)<br> </font>$pdf<font class="kw">-></font>Cell<font class="kw">(</font>0<font class="kw">,</font>10<font class="kw">,</font><font class="str">'Printing line number '</font><font class="kw">.</font>$i<font class="kw">,</font>0<font class="kw">,</font>1<font class="kw">);<br></font>$pdf<font class="kw">-></font>Output<font class="kw">();<br></font>?>
|
||||
</font>
|
||||
</code></NOBR></TD></TR></TABLE><P></P>
|
||||
<SCRIPT>
|
||||
<!--
|
||||
if(document.location.href.indexOf('http:')==0)
|
||||
{
|
||||
document.write("<P CLASS='demo'><A HREF='tuto2.php' TARGET='_blank' CLASS='demo'>[Demo]</A></P>");
|
||||
}
|
||||
//-->
|
||||
</SCRIPT>
|
||||
This example makes use of the <A HREF='../doc/header.htm'>Header()</A> and <A HREF='../doc/footer.htm'>Footer()</A> methods to process page headers and
|
||||
footers. They are called automatically. They already exist in the FPDF class but do nothing,
|
||||
therefore we have to extend the class and override them.
|
||||
<BR>
|
||||
<BR>
|
||||
The logo is printed with the <A HREF='../doc/image.htm'>Image()</A> method by specifying its upper-left corner and
|
||||
its width. The height is calculated automatically to respect the image proportions.
|
||||
<BR>
|
||||
<BR>
|
||||
To print the page number, a null value is passed as the cell width. It means that the cell
|
||||
should extend up to the right margin of the page; it is handy to center text. The current page
|
||||
number is returned by the <A HREF='../doc/pageno.htm'>PageNo()</A> method; as for the total number of pages, it is obtained
|
||||
by means of the special value <TT>{nb}</TT> which will be substituted on document closure
|
||||
(provided you first called <A HREF='../doc/aliasnbpages.htm'>AliasNbPages()</A>).
|
||||
<BR>
|
||||
Note the use of the <A HREF='../doc/sety.htm'>SetY()</A> method which allows to set position at an absolute location in
|
||||
the page, starting from the top or the bottom.
|
||||
<BR>
|
||||
<BR>
|
||||
Another interesting feature is used here: the automatic page breaking. As soon as a cell would
|
||||
cross a limit in the page (at 2 centimeters from the bottom by default), a break is performed
|
||||
and the font restored. Although the header and footer select their own font (Arial), the body
|
||||
continues with Times. This mechanism of automatic restoration also applies to colors and line
|
||||
width. The limit which triggers page breaks can be set with <A HREF='../doc/setautopagebreak.htm'>SetAutoPageBreak()</A>.
|
||||
</BODY>
|
||||
</HTML>
|
||||
@@ -1,42 +0,0 @@
|
||||
<?php
|
||||
define('FPDF_FONTPATH','../font/');
|
||||
require('../fpdf.php');
|
||||
|
||||
class PDF extends FPDF
|
||||
{
|
||||
//Page header
|
||||
function Header()
|
||||
{
|
||||
//Logo
|
||||
$this->Image('logo_pb.png',10,8,33);
|
||||
//Arial bold 15
|
||||
$this->SetFont('Arial','B',15);
|
||||
//Move to the right
|
||||
$this->Cell(80);
|
||||
//Title
|
||||
$this->Cell(30,10,'Title',1,0,'C');
|
||||
//Line break
|
||||
$this->Ln(20);
|
||||
}
|
||||
|
||||
//Page footer
|
||||
function Footer()
|
||||
{
|
||||
//Position at 1.5 cm from bottom
|
||||
$this->SetY(-15);
|
||||
//Arial italic 8
|
||||
$this->SetFont('Arial','I',8);
|
||||
//Page number
|
||||
$this->Cell(0,10,'Page '.$this->PageNo().'/{nb}',0,0,'C');
|
||||
}
|
||||
}
|
||||
|
||||
//Instanciation of inherited class
|
||||
$pdf=new PDF();
|
||||
$pdf->AliasNbPages();
|
||||
$pdf->AddPage();
|
||||
$pdf->SetFont('Times','',12);
|
||||
for($i=1;$i<=40;$i++)
|
||||
$pdf->Cell(0,10,'Printing line number '.$i,0,1);
|
||||
$pdf->Output();
|
||||
?>
|
||||
File diff suppressed because one or more lines are too long
@@ -1,84 +0,0 @@
|
||||
<?php
|
||||
define('FPDF_FONTPATH','../font/');
|
||||
require('../fpdf.php');
|
||||
|
||||
class PDF extends FPDF
|
||||
{
|
||||
function Header()
|
||||
{
|
||||
global $title;
|
||||
|
||||
//Arial bold 15
|
||||
$this->SetFont('Arial','B',15);
|
||||
//Calculate width of title and position
|
||||
$w=$this->GetStringWidth($title)+6;
|
||||
$this->SetX((210-$w)/2);
|
||||
//Colors of frame, background and text
|
||||
$this->SetDrawColor(0,80,180);
|
||||
$this->SetFillColor(230,230,0);
|
||||
$this->SetTextColor(220,50,50);
|
||||
//Thickness of frame (1 mm)
|
||||
$this->SetLineWidth(1);
|
||||
//Title
|
||||
$this->Cell($w,9,$title,1,1,'C',1);
|
||||
//Line break
|
||||
$this->Ln(10);
|
||||
}
|
||||
|
||||
function Footer()
|
||||
{
|
||||
//Position at 1.5 cm from bottom
|
||||
$this->SetY(-15);
|
||||
//Arial italic 8
|
||||
$this->SetFont('Arial','I',8);
|
||||
//Text color in gray
|
||||
$this->SetTextColor(128);
|
||||
//Page number
|
||||
$this->Cell(0,10,'Page '.$this->PageNo(),0,0,'C');
|
||||
}
|
||||
|
||||
function ChapterTitle($num,$label)
|
||||
{
|
||||
//Arial 12
|
||||
$this->SetFont('Arial','',12);
|
||||
//Background color
|
||||
$this->SetFillColor(200,220,255);
|
||||
//Title
|
||||
$this->Cell(0,6,"Chapter $num : $label",0,1,'L',1);
|
||||
//Line break
|
||||
$this->Ln(4);
|
||||
}
|
||||
|
||||
function ChapterBody($file)
|
||||
{
|
||||
//Read text file
|
||||
$f=fopen($file,'r');
|
||||
$txt=fread($f,filesize($file));
|
||||
fclose($f);
|
||||
//Times 12
|
||||
$this->SetFont('Times','',12);
|
||||
//Output justified text
|
||||
$this->MultiCell(0,5,$txt);
|
||||
//Line break
|
||||
$this->Ln();
|
||||
//Mention in italics
|
||||
$this->SetFont('','I');
|
||||
$this->Cell(0,5,'(end of excerpt)');
|
||||
}
|
||||
|
||||
function PrintChapter($num,$title,$file)
|
||||
{
|
||||
$this->AddPage();
|
||||
$this->ChapterTitle($num,$title);
|
||||
$this->ChapterBody($file);
|
||||
}
|
||||
}
|
||||
|
||||
$pdf=new PDF();
|
||||
$title='20000 Leagues Under the Seas';
|
||||
$pdf->SetTitle($title);
|
||||
$pdf->SetAuthor('Jules Verne');
|
||||
$pdf->PrintChapter(1,'A RUNAWAY REEF','20k_c1.txt');
|
||||
$pdf->PrintChapter(2,'THE PROS AND CONS','20k_c2.txt');
|
||||
$pdf->Output();
|
||||
?>
|
||||
File diff suppressed because one or more lines are too long
@@ -1,114 +0,0 @@
|
||||
<?php
|
||||
define('FPDF_FONTPATH','../font/');
|
||||
require('../fpdf.php');
|
||||
|
||||
class PDF extends FPDF
|
||||
{
|
||||
//Current column
|
||||
var $col=0;
|
||||
//Ordinate of column start
|
||||
var $y0;
|
||||
|
||||
function Header()
|
||||
{
|
||||
//Page header
|
||||
global $title;
|
||||
|
||||
$this->SetFont('Arial','B',15);
|
||||
$w=$this->GetStringWidth($title)+6;
|
||||
$this->SetX((210-$w)/2);
|
||||
$this->SetDrawColor(0,80,180);
|
||||
$this->SetFillColor(230,230,0);
|
||||
$this->SetTextColor(220,50,50);
|
||||
$this->SetLineWidth(1);
|
||||
$this->Cell($w,9,$title,1,1,'C',1);
|
||||
$this->Ln(10);
|
||||
//Save ordinate
|
||||
$this->y0=$this->GetY();
|
||||
}
|
||||
|
||||
function Footer()
|
||||
{
|
||||
//Page footer
|
||||
$this->SetY(-15);
|
||||
$this->SetFont('Arial','I',8);
|
||||
$this->SetTextColor(128);
|
||||
$this->Cell(0,10,'Page '.$this->PageNo(),0,0,'C');
|
||||
}
|
||||
|
||||
function SetCol($col)
|
||||
{
|
||||
//Set position at a given column
|
||||
$this->col=$col;
|
||||
$x=10+$col*65;
|
||||
$this->SetLeftMargin($x);
|
||||
$this->SetX($x);
|
||||
}
|
||||
|
||||
function AcceptPageBreak()
|
||||
{
|
||||
//Method accepting or not automatic page break
|
||||
if($this->col<2)
|
||||
{
|
||||
//Go to next column
|
||||
$this->SetCol($this->col+1);
|
||||
//Set ordinate to top
|
||||
$this->SetY($this->y0);
|
||||
//Keep on page
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
//Go back to first column
|
||||
$this->SetCol(0);
|
||||
//Page break
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
function ChapterTitle($num,$label)
|
||||
{
|
||||
//Title
|
||||
$this->SetFont('Arial','',12);
|
||||
$this->SetFillColor(200,220,255);
|
||||
$this->Cell(0,6,"Chapter $num : $label",0,1,'L',1);
|
||||
$this->Ln(4);
|
||||
//Save ordinate
|
||||
$this->y0=$this->GetY();
|
||||
}
|
||||
|
||||
function ChapterBody($fichier)
|
||||
{
|
||||
//Read text file
|
||||
$f=fopen($fichier,'r');
|
||||
$txt=fread($f,filesize($fichier));
|
||||
fclose($f);
|
||||
//Font
|
||||
$this->SetFont('Times','',12);
|
||||
//Output text in a 6 cm width column
|
||||
$this->MultiCell(60,5,$txt);
|
||||
$this->Ln();
|
||||
//Mention
|
||||
$this->SetFont('','I');
|
||||
$this->Cell(0,5,'(end of excerpt)');
|
||||
//Go back to first column
|
||||
$this->SetCol(0);
|
||||
}
|
||||
|
||||
function PrintChapter($num,$title,$file)
|
||||
{
|
||||
//Add chapter
|
||||
$this->AddPage();
|
||||
$this->ChapterTitle($num,$title);
|
||||
$this->ChapterBody($file);
|
||||
}
|
||||
}
|
||||
|
||||
$pdf=new PDF();
|
||||
$title='20000 Leagues Under the Seas';
|
||||
$pdf->SetTitle($title);
|
||||
$pdf->SetAuthor('Jules Verne');
|
||||
$pdf->PrintChapter(1,'A RUNAWAY REEF','20k_c1.txt');
|
||||
$pdf->PrintChapter(2,'THE PROS AND CONS','20k_c2.txt');
|
||||
$pdf->Output();
|
||||
?>
|
||||
File diff suppressed because one or more lines are too long
@@ -1,102 +0,0 @@
|
||||
<?php
|
||||
define('FPDF_FONTPATH','../font/');
|
||||
require('../fpdf.php');
|
||||
|
||||
class PDF extends FPDF
|
||||
{
|
||||
//Load data
|
||||
function LoadData($file)
|
||||
{
|
||||
//Read file lines
|
||||
$lines=file($file);
|
||||
$data=array();
|
||||
foreach($lines as $line)
|
||||
$data[]=explode(';',chop($line));
|
||||
return $data;
|
||||
}
|
||||
|
||||
//Simple table
|
||||
function BasicTable($header,$data)
|
||||
{
|
||||
//Header
|
||||
foreach($header as $col)
|
||||
$this->Cell(40,7,$col,1);
|
||||
$this->Ln();
|
||||
//Data
|
||||
foreach($data as $row)
|
||||
{
|
||||
foreach($row as $col)
|
||||
$this->Cell(40,6,$col,1);
|
||||
$this->Ln();
|
||||
}
|
||||
}
|
||||
|
||||
//Better table
|
||||
function ImprovedTable($header,$data)
|
||||
{
|
||||
//Column widths
|
||||
$w=array(40,35,40,45);
|
||||
//Header
|
||||
for($i=0;$i<count($header);$i++)
|
||||
$this->Cell($w[$i],7,$header[$i],1,0,'C');
|
||||
$this->Ln();
|
||||
//Data
|
||||
foreach($data as $row)
|
||||
{
|
||||
$this->Cell($w[0],6,$row[0],'LR');
|
||||
$this->Cell($w[1],6,$row[1],'LR');
|
||||
$this->Cell($w[2],6,number_format($row[2]),'LR',0,'R');
|
||||
$this->Cell($w[3],6,number_format($row[3]),'LR',0,'R');
|
||||
$this->Ln();
|
||||
}
|
||||
//Closure line
|
||||
$this->Cell(array_sum($w),0,'','T');
|
||||
}
|
||||
|
||||
//Colored table
|
||||
function FancyTable($header,$data)
|
||||
{
|
||||
//Colors, line width and bold font
|
||||
$this->SetFillColor(255,0,0);
|
||||
$this->SetTextColor(255);
|
||||
$this->SetDrawColor(128,0,0);
|
||||
$this->SetLineWidth(.3);
|
||||
$this->SetFont('','B');
|
||||
//Header
|
||||
$w=array(40,35,40,45);
|
||||
for($i=0;$i<count($header);$i++)
|
||||
$this->Cell($w[$i],7,$header[$i],1,0,'C',1);
|
||||
$this->Ln();
|
||||
//Color and font restoration
|
||||
$this->SetFillColor(224,235,255);
|
||||
$this->SetTextColor(0);
|
||||
$this->SetFont('');
|
||||
//Data
|
||||
$fill=0;
|
||||
foreach($data as $row)
|
||||
{
|
||||
$this->Cell($w[0],6,$row[0],'LR',0,'L',$fill);
|
||||
$this->Cell($w[1],6,$row[1],'LR',0,'L',$fill);
|
||||
$this->Cell($w[2],6,number_format($row[2]),'LR',0,'R',$fill);
|
||||
$this->Cell($w[3],6,number_format($row[3]),'LR',0,'R',$fill);
|
||||
$this->Ln();
|
||||
$fill=!$fill;
|
||||
}
|
||||
$this->Cell(array_sum($w),0,'','T');
|
||||
}
|
||||
}
|
||||
|
||||
$pdf=new PDF();
|
||||
//Column titles
|
||||
$header=array('Country','Capital','Area (sq km)','Pop. (thousands)');
|
||||
//Data loading
|
||||
$data=$pdf->LoadData('countries.txt');
|
||||
$pdf->SetFont('Arial','',14);
|
||||
$pdf->AddPage();
|
||||
$pdf->BasicTable($header,$data);
|
||||
$pdf->AddPage();
|
||||
$pdf->ImprovedTable($header,$data);
|
||||
$pdf->AddPage();
|
||||
$pdf->FancyTable($header,$data);
|
||||
$pdf->Output();
|
||||
?>
|
||||
File diff suppressed because one or more lines are too long
@@ -1,123 +0,0 @@
|
||||
<?php
|
||||
define('FPDF_FONTPATH','../font/');
|
||||
require('../fpdf.php');
|
||||
|
||||
class PDF extends FPDF
|
||||
{
|
||||
var $B;
|
||||
var $I;
|
||||
var $U;
|
||||
var $HREF;
|
||||
|
||||
function PDF($orientation='P',$unit='mm',$format='A4')
|
||||
{
|
||||
//Call parent constructor
|
||||
$this->FPDF($orientation,$unit,$format);
|
||||
//Initialization
|
||||
$this->B=0;
|
||||
$this->I=0;
|
||||
$this->U=0;
|
||||
$this->HREF='';
|
||||
}
|
||||
|
||||
function WriteHTML($html)
|
||||
{
|
||||
//HTML parser
|
||||
$html=str_replace("\n",' ',$html);
|
||||
$a=preg_split('/<(.*)>/U',$html,-1,PREG_SPLIT_DELIM_CAPTURE);
|
||||
foreach($a as $i=>$e)
|
||||
{
|
||||
if($i%2==0)
|
||||
{
|
||||
//Text
|
||||
if($this->HREF)
|
||||
$this->PutLink($this->HREF,$e);
|
||||
else
|
||||
$this->Write(5,$e);
|
||||
}
|
||||
else
|
||||
{
|
||||
//Tag
|
||||
if($e{0}=='/')
|
||||
$this->CloseTag(strtoupper(substr($e,1)));
|
||||
else
|
||||
{
|
||||
//Extract attributes
|
||||
$a2=explode(' ',$e);
|
||||
$tag=strtoupper(array_shift($a2));
|
||||
$attr=array();
|
||||
foreach($a2 as $v)
|
||||
if(ereg('^([^=]*)=["\']?([^"\']*)["\']?$',$v,$a3))
|
||||
$attr[strtoupper($a3[1])]=$a3[2];
|
||||
$this->OpenTag($tag,$attr);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function OpenTag($tag,$attr)
|
||||
{
|
||||
//Opening tag
|
||||
if($tag=='B' or $tag=='I' or $tag=='U')
|
||||
$this->SetStyle($tag,true);
|
||||
if($tag=='A')
|
||||
$this->HREF=$attr['HREF'];
|
||||
if($tag=='BR')
|
||||
$this->Ln(5);
|
||||
}
|
||||
|
||||
function CloseTag($tag)
|
||||
{
|
||||
//Closing tag
|
||||
if($tag=='B' or $tag=='I' or $tag=='U')
|
||||
$this->SetStyle($tag,false);
|
||||
if($tag=='A')
|
||||
$this->HREF='';
|
||||
}
|
||||
|
||||
function SetStyle($tag,$enable)
|
||||
{
|
||||
//Modify style and select corresponding font
|
||||
$this->$tag+=($enable ? 1 : -1);
|
||||
$style='';
|
||||
foreach(array('B','I','U') as $s)
|
||||
if($this->$s>0)
|
||||
$style.=$s;
|
||||
$this->SetFont('',$style);
|
||||
}
|
||||
|
||||
function PutLink($URL,$txt)
|
||||
{
|
||||
//Put a hyperlink
|
||||
$this->SetTextColor(0,0,255);
|
||||
$this->SetStyle('U',true);
|
||||
$this->Write(5,$txt,$URL);
|
||||
$this->SetStyle('U',false);
|
||||
$this->SetTextColor(0);
|
||||
}
|
||||
}
|
||||
|
||||
$html='You can now easily print text mixing different
|
||||
styles : <B>bold</B>, <I>italic</I>, <U>underlined</U>, or
|
||||
<B><I><U>all at once</U></I></B>!<BR>You can also insert links
|
||||
on text, such as <A HREF="http://www.fpdf.org">www.fpdf.org</A>,
|
||||
or on an image: click on the logo.';
|
||||
|
||||
$pdf=new PDF();
|
||||
//First page
|
||||
$pdf->AddPage();
|
||||
$pdf->SetFont('Arial','',20);
|
||||
$pdf->Write(5,'To find out what\'s new in this tutorial, click ');
|
||||
$pdf->SetFont('','U');
|
||||
$link=$pdf->AddLink();
|
||||
$pdf->Write(5,'here',$link);
|
||||
$pdf->SetFont('');
|
||||
//Second page
|
||||
$pdf->AddPage();
|
||||
$pdf->SetLink($link);
|
||||
$pdf->Image('logo.png',10,10,30,0,'','http://www.fpdf.org');
|
||||
$pdf->SetLeftMargin(45);
|
||||
$pdf->SetFontSize(14);
|
||||
$pdf->WriteHTML($html);
|
||||
$pdf->Output();
|
||||
?>
|
||||
@@ -1,316 +0,0 @@
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=ISO-8859-1">
|
||||
<TITLE>Adding new fonts and encoding support</TITLE>
|
||||
<LINK TYPE="text/css" REL="stylesheet" HREF="../fpdf.css">
|
||||
</HEAD>
|
||||
<BODY>
|
||||
<H2>Adding new fonts and encoding support</H2>
|
||||
This tutorial explains how to use TrueType or Type1 fonts so that you are not limited to the standard
|
||||
fonts any more. The other interest is that you can choose the font encoding, which allows you to
|
||||
use other languages than the Western ones (the standard fonts having too few available characters).
|
||||
<BR>
|
||||
<BR>
|
||||
There are two ways to use a new font: embedding it in the PDF or not. When a font is not
|
||||
embedded, it is sought in the system. The advantage is that the PDF file is lighter; on the other
|
||||
hand, if it is not available, a substitution font is used. So it is preferable to ensure that the
|
||||
needed font is installed on the client systems. If the file is to be viewed by a large audience,
|
||||
it is better to embed.
|
||||
<BR>
|
||||
<BR>
|
||||
Adding a new font requires three steps for TrueTypes:
|
||||
<UL>
|
||||
<LI>Generation of the metric file (.afm)
|
||||
<LI>Generation of the font definition file (.php)
|
||||
<LI>Declaration of the font in the script
|
||||
</UL>
|
||||
For Type1, the first one is theoretically not necessary because the AFM file is usually shipped
|
||||
with the font. In case you have only a metric file in PFM format, use the convertor available
|
||||
<A HREF="http://www.fpdf.org/fr/dl.php?id=34">here</A>.
|
||||
<H4 CLASS='st'>Generation of the metric file</H4>
|
||||
The first step for a TrueType consists in generating the AFM file. A utility exists to do this
|
||||
task: <A HREF="http://ttf2pt1.sourceforge.net" TARGET="_blank">ttf2pt1</A>. The Windows binary
|
||||
is available <A HREF="http://www.fpdf.org/fr/dl.php?id=22">here</A>. The command line to use is
|
||||
the following:
|
||||
<BR>
|
||||
<BR>
|
||||
<TT>ttf2pt1 -a font.ttf font</TT>
|
||||
<BR>
|
||||
<BR>
|
||||
For example, for Comic Sans MS Regular:
|
||||
<BR>
|
||||
<BR>
|
||||
<TT>ttf2pt1 -a c:\windows\fonts\comic.ttf comic</TT>
|
||||
<BR>
|
||||
<BR>
|
||||
Two files are created; the one we are interested in is comic.afm.
|
||||
<H4 CLASS='st'>Generation of the font definition file</H4>
|
||||
The second step consists in generating a PHP file containing all the information needed by FPDF;
|
||||
in addition, the font file is compressed. To do this, a helper script is provided in the font/makefont/
|
||||
directory of the package: makefont.php. It contains the following function:
|
||||
<BR>
|
||||
<BR>
|
||||
<TT>MakeFont(<B>string</B> fontfile, <B>string</B> afmfile [, <B>string</B> enc [, <B>array</B> patch [, <B>string</B> type]]])</TT>
|
||||
<BR>
|
||||
<BR>
|
||||
<TT><U>fontfile</U></TT>
|
||||
<BLOCKQUOTE>
|
||||
Path to the .ttf or .pfb file.
|
||||
</BLOCKQUOTE>
|
||||
<TT><U>afmfile</U></TT>
|
||||
<BLOCKQUOTE>
|
||||
Path to the .afm file.
|
||||
</BLOCKQUOTE>
|
||||
<TT><U>enc</U></TT>
|
||||
<BLOCKQUOTE>
|
||||
Name of the encoding to use. Default value: <TT>cp1252</TT>.
|
||||
</BLOCKQUOTE>
|
||||
<TT><U>patch</U></TT>
|
||||
<BLOCKQUOTE>
|
||||
Optional modification of the encoding. Empty by default.
|
||||
</BLOCKQUOTE>
|
||||
<TT><U>type</U></TT>
|
||||
<BLOCKQUOTE>
|
||||
Type of the font (<TT>TrueType</TT> or <TT>Type1</TT>). Default value: <TT>TrueType</TT>.
|
||||
</BLOCKQUOTE>
|
||||
<BR>
|
||||
The first parameter is the name of the font file. The extension must be either .ttf or .pfb and
|
||||
determines the font type. If you own a Type1 font in ASCII format (.pfa), you can convert it to
|
||||
binary format with <A HREF="http://www.lcdf.org/~eddietwo/type/#t1utils" TARGET="_blank">t1utils</A>.
|
||||
<BR>
|
||||
If you don't want to embed the font, pass an empty string. In this case, type is given by the
|
||||
<TT>type</TT> parameter.
|
||||
<BR>
|
||||
Note: in the case of a font with the same name as a standard one, for instance arial.ttf, it is
|
||||
mandatory to embed. If you don't, Acrobat will use its own font.
|
||||
<BR>
|
||||
<BR>
|
||||
The AFM file is the one previously generated.
|
||||
<BR>
|
||||
<BR>
|
||||
The encoding defines the association between a code (from 0 to 255) and a character. The first
|
||||
128 are fixed and correspond to ASCII; the following are variable. The encodings are stored in
|
||||
.map files. Those available are:
|
||||
<UL>
|
||||
<LI>cp1250 (Central Europe)
|
||||
<LI>cp1251 (Cyrillic)
|
||||
<LI>cp1252 (Western Europe)
|
||||
<LI>cp1253 (Greek)
|
||||
<LI>cp1254 (Turkish)
|
||||
<LI>cp1255 (Hebrew)
|
||||
<LI>cp1257 (Baltic)
|
||||
<LI>cp1258 (Vietnamese)
|
||||
<LI>cp874 (Thai)
|
||||
<LI>ISO-8859-1 (Western Europe)
|
||||
<LI>ISO-8859-2 (Central Europe)
|
||||
<LI>ISO-8859-4 (Baltic)
|
||||
<LI>ISO-8859-5 (Cyrillic)
|
||||
<LI>ISO-8859-7 (Greek)
|
||||
<LI>ISO-8859-9 (Turkish)
|
||||
<LI>ISO-8859-11 (Thai)
|
||||
<LI>ISO-8859-15 (Western Europe)
|
||||
<LI>ISO-8859-16 (Central Europe)
|
||||
<LI>KOI8-R (Russian)
|
||||
<LI>KOI8-U (Ukrainian)
|
||||
</UL>
|
||||
Of course, the font must contain the characters corresponding to the chosen encoding.
|
||||
<BR>
|
||||
In the particular case of a symbolic font (that is to say which does not contain letters, such
|
||||
as Symbol or ZapfDingbats), pass an empty string.
|
||||
<BR>
|
||||
The encodings which begin with cp are those used by Windows; Linux systems usually use ISO.
|
||||
<BR>
|
||||
Remark: the standard fonts use cp1252.
|
||||
<BR>
|
||||
<BR>
|
||||
The fourth parameter gives the possibility to alter the encoding. Sometimes you may want to add
|
||||
some characters. For instance, ISO-8859-1 does not contain the euro symbol. To add it at position
|
||||
164, pass <TT>array(164=>'Euro')</TT>.
|
||||
<BR>
|
||||
<BR>
|
||||
The last parameter is used to give the type of the font in case it is not embedded (that is to
|
||||
say the first parameter is empty).
|
||||
<BR>
|
||||
<BR>
|
||||
After you have called the function (create a new file for this and include makefont.php, or
|
||||
simply add the call directly inside), a .php file is created, with the same name as the .afm one.
|
||||
You may rename it if you wish. If the case of embedding, the font file is compressed and gives a
|
||||
second file with .z as extension (except if the compression function is not available, it
|
||||
requires Zlib). You may rename it too, but in this case you have to alter the variable <TT>$file</TT>
|
||||
in the .php file accordingly.
|
||||
<BR>
|
||||
<BR>
|
||||
Example:
|
||||
<BR>
|
||||
<BR>
|
||||
<TT>MakeFont('c:\\windows\\fonts\\comic.ttf','comic.afm','cp1252');</TT>
|
||||
<BR>
|
||||
<BR>
|
||||
which gives the files comic.php and comic.z.
|
||||
<BR>
|
||||
<BR>
|
||||
Then you have to copy the generated file(s) either in the directory of the script which will use
|
||||
the font, or in the directory given by FPDF_FONTPATH if the constant is defined. If the font file
|
||||
could not be compressed, copy the .ttf or .pfb instead of the .z.
|
||||
<H4 CLASS='st'>Declaration of the font in the script</H4>
|
||||
The last step is the most simple. You just need to call the <A HREF='../doc/addfont.htm'>AddFont()</A> method. For instance:
|
||||
<BR>
|
||||
<BR>
|
||||
<TABLE WIDTH="100%" STYLE="color:#4040C0; border-style:ridge" BORDERCOLORLIGHT="#B0B0E0" BORDERCOLORDARK="#000000" BORDER="2" CELLPADDING=6 CELLSPACING=0 BGCOLOR="#F0F5FF"><TR><TD style="border-width:0px">
|
||||
<NOBR><code><font color="#000000">
|
||||
$pdf<font class="kw">-></font>AddFont<font class="kw">(</font><font class="str">'Comic'</font><font class="kw">,</font><font class="str">''</font><font class="kw">,</font><font class="str">'comic.php'</font><font class="kw">);</font><br>
|
||||
</font>
|
||||
</code></NOBR></TD></TR></TABLE><P></P>
|
||||
or simply:
|
||||
<BR>
|
||||
<BR>
|
||||
<TABLE WIDTH="100%" STYLE="color:#4040C0; border-style:ridge" BORDERCOLORLIGHT="#B0B0E0" BORDERCOLORDARK="#000000" BORDER="2" CELLPADDING=6 CELLSPACING=0 BGCOLOR="#F0F5FF"><TR><TD style="border-width:0px">
|
||||
<NOBR><code><font color="#000000">
|
||||
$pdf<font class="kw">-></font>AddFont<font class="kw">(</font><font class="str">'Comic'</font><font class="kw">);</font><br>
|
||||
</font>
|
||||
</code></NOBR></TD></TR></TABLE><P></P>
|
||||
And the font is now available (in regular and underlined styles), usable like the others. If we
|
||||
had worked with Comic Sans MS Bold (comicbd.ttf), we would have put:
|
||||
<BR>
|
||||
<BR>
|
||||
<TABLE WIDTH="100%" STYLE="color:#4040C0; border-style:ridge" BORDERCOLORLIGHT="#B0B0E0" BORDERCOLORDARK="#000000" BORDER="2" CELLPADDING=6 CELLSPACING=0 BGCOLOR="#F0F5FF"><TR><TD style="border-width:0px">
|
||||
<NOBR><code><font color="#000000">
|
||||
$pdf<font class="kw">-></font>AddFont<font class="kw">(</font><font class="str">'Comic'</font><font class="kw">,</font><font class="str">'B'</font><font class="kw">,</font><font class="str">'comicbd.php'</font><font class="kw">);</font><br>
|
||||
</font>
|
||||
</code></NOBR></TD></TR></TABLE><P></P>
|
||||
<H4 CLASS='st'>Example</H4>
|
||||
Let's now see a small complete example. The font used is Calligrapher, available at
|
||||
<A HREF="http://www.abstractfonts.com/fonts/" TARGET="_blank">www.abstractfonts.com</A> (a site
|
||||
offering numerous free TrueType fonts). The first step is the generation of the AFM file:
|
||||
<BR>
|
||||
<BR>
|
||||
<TT>ttf2pt1 -a calligra.ttf calligra</TT>
|
||||
<BR>
|
||||
<BR>
|
||||
which gives calligra.afm (and calligra.t1a that we can delete). Then we generate the definition
|
||||
file:
|
||||
<BR>
|
||||
<BR>
|
||||
<TABLE WIDTH="100%" STYLE="color:#4040C0; border-style:ridge" BORDERCOLORLIGHT="#B0B0E0" BORDERCOLORDARK="#000000" BORDER="2" CELLPADDING=6 CELLSPACING=0 BGCOLOR="#F0F5FF"><TR><TD style="border-width:0px">
|
||||
<NOBR><code><font color="#000000">
|
||||
<?php<br><font class="kw">require(</font><font class="str">'../font/makefont/makefont.php'</font><font class="kw">);<br><br></font>MakeFont<font class="kw">(</font><font class="str">'calligra.ttf'</font><font class="kw">,</font><font class="str">'calligra.afm'</font><font class="kw">);<br></font>?>
|
||||
</font>
|
||||
</code></NOBR></TD></TR></TABLE><P></P>
|
||||
The function call gives the following report:
|
||||
<BR>
|
||||
<BR>
|
||||
<B>Warning:</B> character Euro is missing<BR>
|
||||
<B>Warning:</B> character Zcaron is missing<BR>
|
||||
<B>Warning:</B> character zcaron is missing<BR>
|
||||
<B>Warning:</B> character eth is missing<BR>
|
||||
Font file compressed (calligra.z)<BR>
|
||||
Font definition file generated (calligra.php)<BR>
|
||||
<BR>
|
||||
The euro character is not present in the font (it is too old). Three other characters are missing
|
||||
too, but we are not interested in them anyway.
|
||||
<BR>
|
||||
We can now copy the two files in the font directory and write the script:
|
||||
<BR>
|
||||
<BR>
|
||||
<TABLE WIDTH="100%" STYLE="color:#4040C0; border-style:ridge" BORDERCOLORLIGHT="#B0B0E0" BORDERCOLORDARK="#000000" BORDER="2" CELLPADDING=6 CELLSPACING=0 BGCOLOR="#F0F5FF"><TR><TD style="border-width:0px">
|
||||
<NOBR><code><font color="#000000">
|
||||
<?php<br>define<font class="kw">(</font><font class="str">'FPDF_FONTPATH'</font><font class="kw">,</font><font class="str">'font/'</font><font class="kw">);<br>require(</font><font class="str">'fpdf.php'</font><font class="kw">);<br><br></font>$pdf<font class="kw">=new </font>FPDF<font class="kw">();<br></font>$pdf<font class="kw">-></font>AddFont<font class="kw">(</font><font class="str">'Calligrapher'</font><font class="kw">,</font><font class="str">''</font><font class="kw">,</font><font class="str">'calligra.php'</font><font class="kw">);<br></font>$pdf<font class="kw">-></font>AddPage<font class="kw">();<br></font>$pdf<font class="kw">-></font>SetFont<font class="kw">(</font><font class="str">'Calligrapher'</font><font class="kw">,</font><font class="str">''</font><font class="kw">,</font>35<font class="kw">);<br></font>$pdf<font class="kw">-></font>Cell<font class="kw">(</font>0<font class="kw">,</font>10<font class="kw">,</font><font class="str">'Enjoy new fonts with FPDF!'</font><font class="kw">);<br></font>$pdf<font class="kw">-></font>Output<font class="kw">();<br></font>?>
|
||||
</font>
|
||||
</code></NOBR></TD></TR></TABLE><P></P>
|
||||
<SCRIPT>
|
||||
<!--
|
||||
if(document.location.href.indexOf('http:')==0)
|
||||
{
|
||||
document.write("<P CLASS='demo'><A HREF='tuto7.php' TARGET='_blank' CLASS='demo'>[Demo]</A></P>");
|
||||
}
|
||||
//-->
|
||||
</SCRIPT>
|
||||
<H4 CLASS='st'>About the euro symbol</H4>
|
||||
The euro character is not present in all encodings, and is not always placed at the same position:
|
||||
<BR>
|
||||
<BR>
|
||||
<STYLE>
|
||||
TH {text-align:left; background:#E0EBFF}
|
||||
TH, TD {padding-left:10px; padding-right:10px; border-bottom-width:0px; border-left-width:1px; border-right-width:0px; border-top-width:1px}
|
||||
TR.alt0 {background:#FFFFEE}
|
||||
TR.alt1 {background:#FFFFDF}
|
||||
</STYLE>
|
||||
<TABLE STYLE="margin-left:15px; border-style:outset" BORDER="2" CELLSPACING="0" CELLPADDING="2" BGCOLOR2="#FFFFEE">
|
||||
<TR><TH CLASS="st">Encoding</TH><TH CLASS="st">Position</TH></TR>
|
||||
<TR CLASS="alt0"><TD>cp1250</TD><TD>128<BR></TD></TR>
|
||||
<TR CLASS="alt1"><TD>cp1251</TD><TD>136<BR></TD></TR>
|
||||
<TR CLASS="alt0"><TD>cp1252</TD><TD>128<BR></TD></TR>
|
||||
<TR CLASS="alt1"><TD>cp1253</TD><TD>128<BR></TD></TR>
|
||||
<TR CLASS="alt0"><TD>cp1254</TD><TD>128<BR></TD></TR>
|
||||
<TR CLASS="alt1"><TD>cp1255</TD><TD>128<BR></TD></TR>
|
||||
<TR CLASS="alt0"><TD>cp1257</TD><TD>128<BR></TD></TR>
|
||||
<TR CLASS="alt1"><TD>cp1258</TD><TD>128<BR></TD></TR>
|
||||
<TR CLASS="alt0"><TD>cp874</TD><TD>128<BR></TD></TR>
|
||||
<TR CLASS="alt1"><TD>ISO-8859-1</TD><TD>absent<BR></TD></TR>
|
||||
<TR CLASS="alt0"><TD>ISO-8859-2</TD><TD>absent<BR></TD></TR>
|
||||
<TR CLASS="alt1"><TD>ISO-8859-4</TD><TD>absent<BR></TD></TR>
|
||||
<TR CLASS="alt0"><TD>ISO-8859-5</TD><TD>absent<BR></TD></TR>
|
||||
<TR CLASS="alt1"><TD>ISO-8859-7</TD><TD>absent<BR></TD></TR>
|
||||
<TR CLASS="alt0"><TD>ISO-8859-9</TD><TD>absent<BR></TD></TR>
|
||||
<TR CLASS="alt1"><TD>ISO-8859-11</TD><TD>absent<BR></TD></TR>
|
||||
<TR CLASS="alt0"><TD>ISO-8859-15</TD><TD>164<BR></TD></TR>
|
||||
<TR CLASS="alt1"><TD>ISO-8859-16</TD><TD>164<BR></TD></TR>
|
||||
<TR CLASS="alt0"><TD>KOI8-R</TD><TD>absent<BR></TD></TR>
|
||||
<TR CLASS="alt1"><TD>KOI8-U</TD><TD>absent<BR></TD></TR>
|
||||
</TABLE>
|
||||
<BR>
|
||||
ISO-8859-1 is widespread but does not include the euro sign. If you need it, the simplest thing
|
||||
to do is using cp1252 or ISO-8859-15 instead, which are nearly identical but contain the precious
|
||||
symbol.
|
||||
<BR>
|
||||
As for ISO-8859-2, it is possible to use ISO-8859-16 instead, but it contains many differences.
|
||||
It is therefore simpler to patch the encoding to add the symbol to it, as explained above. The
|
||||
same is true for the other encodings.
|
||||
<H4 CLASS='st'>Font synthesis under Windows</H4>
|
||||
When a TrueType font is not available in a given style, Windows is able to synthesize it from the
|
||||
regular version. For instance, there is no Comic Sans MS Italic, but it can be built from Comic
|
||||
Sans MS Regular. This feature can be used in a PDF file, but unfortunately requires that the
|
||||
regular font be present in the system (you must not embed it). Here is how to do it:
|
||||
<UL>
|
||||
<LI>Generate the definition file for the regular font without embedding (you may rename it to
|
||||
reflect the desired style)
|
||||
<LI>Open it and append to the variable <TT>$name</TT> a comma followed by the desired style
|
||||
(<TT>Italic</TT>, <TT>Bold</TT> or <TT>BoldItalic</TT>)
|
||||
</UL>
|
||||
For instance, for the file comici.php:
|
||||
<BR>
|
||||
<BR>
|
||||
<TT>$name='ComicSansMS,Italic';</TT>
|
||||
<BR>
|
||||
<BR>
|
||||
It can then be used normally:
|
||||
<BR>
|
||||
<BR>
|
||||
<TABLE WIDTH="100%" STYLE="color:#4040C0; border-style:ridge" BORDERCOLORLIGHT="#B0B0E0" BORDERCOLORDARK="#000000" BORDER="2" CELLPADDING=6 CELLSPACING=0 BGCOLOR="#F0F5FF"><TR><TD style="border-width:0px">
|
||||
<NOBR><code><font color="#000000">
|
||||
$pdf<font class="kw">-></font>AddFont<font class="kw">(</font><font class="str">'Comic'</font><font class="kw">,</font><font class="str">'I'</font><font class="kw">,</font><font class="str">'comici.php'</font><font class="kw">);</font><br>
|
||||
</font>
|
||||
</code></NOBR></TD></TR></TABLE><P></P>
|
||||
<H4 CLASS='st'>Reducing the size of TrueType fonts</H4>
|
||||
Font files are often quite voluminous (more than 100, even 200KB); this is due to the fact that
|
||||
they contain the characters corresponding to many encodings. Zlib compression reduces them but
|
||||
they remain fairly big. A technique exists to reduce them further. It consists in converting the
|
||||
font to the Type1 format with ttf2pt1 by specifying the encoding you are interested in; all other
|
||||
characters will be discarded.
|
||||
<BR>
|
||||
For instance, the arial.ttf font shipped with Windows 98 is 267KB (it contains 1296 characters).
|
||||
After compression it gives 147. Let's convert it to Type1 by keeping only cp1250 characters:
|
||||
<BR>
|
||||
<BR>
|
||||
<TT>ttf2pt1 -b -L cp1250.map c:\windows\fonts\arial.ttf arial</TT>
|
||||
<BR>
|
||||
<BR>
|
||||
The .map files are located in the font/makefont/ directory of the package. The command produces
|
||||
arial.pfb and arial.afm. The arial.pfb file is only 35KB, and 30KB after compression.
|
||||
<BR>
|
||||
<BR>
|
||||
It is possible to go even further. If you are interested only by a subset of the encoding (you
|
||||
probably don't need all 217 characters), you can open the .map file and remove the lines you are
|
||||
not interested in. This will reduce the file size accordingly.
|
||||
</BODY>
|
||||
</HTML>
|
||||
@@ -1,10 +0,0 @@
|
||||
<?php
|
||||
require('../fpdf.php');
|
||||
|
||||
$pdf=new FPDF();
|
||||
$pdf->AddFont('Calligrapher','','calligra.php');
|
||||
$pdf->AddPage();
|
||||
$pdf->SetFont('Calligrapher','',35);
|
||||
$pdf->Cell(0,10,'Enjoy new fonts with FPDF!');
|
||||
$pdf->Output();
|
||||
?>
|
||||
@@ -98,7 +98,7 @@ class person extends basis_db
|
||||
$this->errormsg = "Fehler beim Lesen der Personendaten\n";
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
if ($row = $this->db_fetch_object())
|
||||
{
|
||||
$this->person_id = $row->person_id;
|
||||
@@ -279,7 +279,7 @@ class person extends basis_db
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if ($this->svnr != '')
|
||||
{
|
||||
//Pruefen ob bereits ein Eintrag mit dieser SVNR vorhanden ist
|
||||
@@ -302,6 +302,24 @@ class person extends basis_db
|
||||
$this->errormsg = 'Ersatzkennzeichen darf nicht laenger als 10 Zeichen sein';
|
||||
return false;
|
||||
}
|
||||
|
||||
if ($this->ersatzkennzeichen != '')
|
||||
{
|
||||
//Pruefen ob bereits ein Eintrag mit dieser SVNR vorhanden ist
|
||||
$qry = "SELECT person_id FROM public.tbl_person WHERE ersatzkennzeichen=".$this->db_add_param($this->ersatzkennzeichen);
|
||||
if ($this->db_query($qry))
|
||||
{
|
||||
if ($row = $this->db_fetch_object())
|
||||
{
|
||||
if ($row->person_id != $this->person_id)
|
||||
{
|
||||
$this->errormsg = 'Es existiert bereits eine Person mit diesem Ersatzkennzeichen! Daten wurden NICHT gepeichert.';
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (mb_strlen($this->familienstand) > 1)
|
||||
{
|
||||
$this->errormsg = 'Familienstand ist ungueltig';
|
||||
@@ -516,6 +534,8 @@ class person extends basis_db
|
||||
*/
|
||||
public function getTab($filter, $order = 'person_id')
|
||||
{
|
||||
//Filterstring trimmen und Umwandlung mittels generateSpecialCharacterString um auch Namen mit Sonderzeichen zu erhalten
|
||||
$filter = generateSpecialCharacterString(trim($filter));
|
||||
$sqlQuery = "
|
||||
SELECT
|
||||
distinct on (person_id) *
|
||||
@@ -526,16 +546,16 @@ class person extends basis_db
|
||||
|
||||
if ($filter != '')
|
||||
{
|
||||
$sqlQuery .= " AND nachname ~* '".$this->db_escape($filter)."' OR
|
||||
vorname ~* '".$this->db_escape($filter)."' OR
|
||||
(nachname || ' ' || vorname) ~* '".$this->db_escape($filter)."' OR
|
||||
(vorname || ' ' || nachname) ~* '".$this->db_escape($filter)."' OR
|
||||
$sqlQuery .= " AND UPPER(nachname) ~* UPPER(".$this->db_add_param($filter).") OR
|
||||
UPPER (vorname) ~* UPPER(".$this->db_add_param($filter).") OR
|
||||
UPPER (nachname || ' ' || vorname) ~* UPPER(".$this->db_add_param($filter).") OR
|
||||
UPPER (vorname || ' ' || nachname) ~* UPPER(".$this->db_add_param($filter).") OR
|
||||
uid=".$this->db_add_param($filter);
|
||||
}
|
||||
|
||||
$sqlQuery .= " ORDER BY $order";
|
||||
if ($filter == '')
|
||||
$sqlQuery .= " LIMIT 30";
|
||||
$sqlQuery .= " LIMIT 30";
|
||||
|
||||
if ($this->db_query($sqlQuery))
|
||||
{
|
||||
@@ -959,4 +979,4 @@ class person extends basis_db
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -370,8 +370,9 @@ class prestudent extends person
|
||||
*/
|
||||
public function getPrestudentRT($datum)
|
||||
{
|
||||
$sql_query='SELECT
|
||||
DISTINCT tbl_prestudent.prestudent_id,
|
||||
$sql_query='SELECT * FROM (
|
||||
SELECT
|
||||
DISTINCT on(tbl_prestudent.prestudent_id) tbl_prestudent.prestudent_id,
|
||||
tbl_person.vorname, tbl_person.nachname, tbl_person.person_id, tbl_person.titelpre,
|
||||
tbl_person.titelpost, tbl_person.gebdatum,
|
||||
tbl_reihungstest.*,
|
||||
@@ -386,6 +387,7 @@ class prestudent extends person
|
||||
AND tbl_rt_person.studienplan_id IN (SELECT studienplan_id FROM public.tbl_prestudentstatus WHERE prestudent_id=tbl_prestudent.prestudent_id)
|
||||
AND EXISTS(SELECT * FROM public.tbl_prestudentstatus JOIN public.tbl_studiensemester USING(studiensemester_kurzbz)
|
||||
WHERE prestudent_id=tbl_prestudent.prestudent_id AND tbl_studiensemester.start>'.$this->db_add_param($datum).')
|
||||
) a
|
||||
ORDER BY nachname,vorname';
|
||||
|
||||
if(!$this->db_query($sql_query))
|
||||
@@ -1748,7 +1750,7 @@ class prestudent extends person
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Loescht einen Prestudenten und legt einen Log-Eintrag dafuer an
|
||||
* @param integer $prestudent_id
|
||||
@@ -1761,11 +1763,11 @@ class prestudent extends person
|
||||
$this->errormsg = 'Prestudent_id ist ungueltig';
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
$qry = "DELETE FROM public.tbl_prestudent
|
||||
WHERE
|
||||
prestudent_id=".$this->db_add_param($prestudent_id, FHC_INTEGER);
|
||||
|
||||
|
||||
if($this->load($prestudent_id))
|
||||
{
|
||||
$this->db_query('BEGIN;');
|
||||
@@ -1818,7 +1820,7 @@ class prestudent extends person
|
||||
$this->db_add_param($this->zgvdoktornation).','.
|
||||
$this->db_add_param($this->gsstudientyp_kurzbz).','.
|
||||
$this->db_add_param($this->aufnahmegruppe_kurzbz).');';
|
||||
|
||||
|
||||
if($log->save(true))
|
||||
{
|
||||
if($this->db_query($qry))
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user