mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-06-01 12:19:28 +00:00
Merge branch 'master' into feature-19473/VUE_Filter_Navigation_Widgets
This commit is contained in:
@@ -249,3 +249,14 @@ $config['navigation_menu']['lehre/lehrauftrag/LehrauftragErteilen/*'] = array(
|
|||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
$config['navigation_menu']['system/issues/Issues/*'] = array(
|
||||||
|
'fehlerzustaendigkeiten' => array(
|
||||||
|
'link' => site_url('system/issues/IssuesZustaendigkeiten'),
|
||||||
|
'description' => 'Fehler Zuständigkeiten',
|
||||||
|
'icon' => 'cogs',
|
||||||
|
'sort' => 100,
|
||||||
|
'target' => '_blank',
|
||||||
|
'requiredPermissions' => array('admin:rw')
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
|
|||||||
@@ -240,11 +240,13 @@ class LVPlanJob extends JOB_Controller
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Send mail to STG Assistenz
|
// Send mail to STG Assistenz
|
||||||
|
/*
|
||||||
$result = $this->_sendMailToStg($uidByStg_arr);
|
$result = $this->_sendMailToStg($uidByStg_arr);
|
||||||
if (isError($result))
|
if (isError($result))
|
||||||
{
|
{
|
||||||
$this->logError(getError($result));
|
$this->logError(getError($result));
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
// Send mail to Kompetenzfeld Leitung
|
// Send mail to Kompetenzfeld Leitung
|
||||||
$result = $this->_sendMailToKF($uidByOe_arr);
|
$result = $this->_sendMailToKF($uidByOe_arr);
|
||||||
|
|||||||
@@ -359,7 +359,7 @@ class LehrauftragJob extends JOB_Controller
|
|||||||
for ($i = 0; $i < $data_len; $i++)
|
for ($i = 0; $i < $data_len; $i++)
|
||||||
{
|
{
|
||||||
// Get all users entitled by organisational unit
|
// Get all users entitled by organisational unit
|
||||||
$result = $this->BenutzerrolleModel->getBenutzerByBerechtigung(self::BERECHTIGUNG_LEHRAUFTRAG_ERTEILEN, $data[$i]['oe_kurzbz']);
|
$result = $this->BenutzerrolleModel->getBenutzerByBerechtigung(self::BERECHTIGUNG_LEHRAUFTRAG_ERTEILEN, $data[$i]['oe_kurzbz'], 'suid');
|
||||||
|
|
||||||
if ($berechtigung_arr = getData($result))
|
if ($berechtigung_arr = getData($result))
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -395,8 +395,12 @@ class approveAnrechnungDetail extends Auth_Controller
|
|||||||
// Set filename to be used on downlaod
|
// Set filename to be used on downlaod
|
||||||
$filename = $this->anrechnunglib->setFilenameOnDownload($dms_id);
|
$filename = $this->anrechnunglib->setFilenameOnDownload($dms_id);
|
||||||
|
|
||||||
|
// Get file to be downloaded from DMS
|
||||||
|
$download = $this->dmslib->download($dms_id, $filename);
|
||||||
|
if (isError($download)) return $download;
|
||||||
|
|
||||||
// Download file
|
// Download file
|
||||||
$this->dmslib->download($dms_id, $filename);
|
$this->outputFile(getData($download));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -8,13 +8,13 @@ class approveAnrechnungUebersicht extends Auth_Controller
|
|||||||
const BERECHTIGUNG_ANRECHNUNG_ANLEGEN = 'lehre/anrechnung_anlegen';
|
const BERECHTIGUNG_ANRECHNUNG_ANLEGEN = 'lehre/anrechnung_anlegen';
|
||||||
|
|
||||||
const REVIEW_ANRECHNUNG_URI = '/lehre/anrechnung/ReviewAnrechnungUebersicht';
|
const REVIEW_ANRECHNUNG_URI = '/lehre/anrechnung/ReviewAnrechnungUebersicht';
|
||||||
|
|
||||||
const ANRECHNUNGSTATUS_PROGRESSED_BY_STGL = 'inProgressDP';
|
const ANRECHNUNGSTATUS_PROGRESSED_BY_STGL = 'inProgressDP';
|
||||||
const ANRECHNUNGSTATUS_PROGRESSED_BY_KF = 'inProgressKF';
|
const ANRECHNUNGSTATUS_PROGRESSED_BY_KF = 'inProgressKF';
|
||||||
const ANRECHNUNGSTATUS_PROGRESSED_BY_LEKTOR = 'inProgressLektor';
|
const ANRECHNUNGSTATUS_PROGRESSED_BY_LEKTOR = 'inProgressLektor';
|
||||||
const ANRECHNUNGSTATUS_APPROVED = 'approved';
|
const ANRECHNUNGSTATUS_APPROVED = 'approved';
|
||||||
const ANRECHNUNGSTATUS_REJECTED = 'rejected';
|
const ANRECHNUNGSTATUS_REJECTED = 'rejected';
|
||||||
|
|
||||||
public function __construct()
|
public function __construct()
|
||||||
{
|
{
|
||||||
// Set required permissions
|
// Set required permissions
|
||||||
@@ -27,23 +27,23 @@ class approveAnrechnungUebersicht extends Auth_Controller
|
|||||||
'requestRecommendation' => 'lehre/anrechnung_genehmigen:rw'
|
'requestRecommendation' => 'lehre/anrechnung_genehmigen:rw'
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
// Load models
|
// Load models
|
||||||
$this->load->model('education/Anrechnung_model', 'AnrechnungModel');
|
$this->load->model('education/Anrechnung_model', 'AnrechnungModel');
|
||||||
$this->load->model('education/Anrechnungstatus_model', 'AnrechnungstatusModel');
|
$this->load->model('education/Anrechnungstatus_model', 'AnrechnungstatusModel');
|
||||||
$this->load->model('content/DmsVersion_model', 'DmsVersionModel');
|
$this->load->model('content/DmsVersion_model', 'DmsVersionModel');
|
||||||
|
|
||||||
// Load libraries
|
// Load libraries
|
||||||
$this->load->library('WidgetLib');
|
$this->load->library('WidgetLib');
|
||||||
$this->load->library('PermissionLib');
|
$this->load->library('PermissionLib');
|
||||||
$this->load->library('AnrechnungLib');
|
$this->load->library('AnrechnungLib');
|
||||||
$this->load->library('DmsLib');
|
$this->load->library('DmsLib');
|
||||||
|
|
||||||
// Load helpers
|
// Load helpers
|
||||||
$this->load->helper('form');
|
$this->load->helper('form');
|
||||||
$this->load->helper('url');
|
$this->load->helper('url');
|
||||||
$this->load->helper('hlp_sancho_helper');
|
$this->load->helper('hlp_sancho_helper');
|
||||||
|
|
||||||
// Load language phrases
|
// Load language phrases
|
||||||
$this->loadPhrases(
|
$this->loadPhrases(
|
||||||
array(
|
array(
|
||||||
@@ -55,23 +55,23 @@ class approveAnrechnungUebersicht extends Auth_Controller
|
|||||||
'table'
|
'table'
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
$this->_setAuthUID();
|
$this->_setAuthUID();
|
||||||
|
|
||||||
$this->setControllerId();
|
$this->setControllerId();
|
||||||
}
|
}
|
||||||
|
|
||||||
public function index()
|
public function index()
|
||||||
{
|
{
|
||||||
// Get study semester
|
// Get study semester
|
||||||
$studiensemester_kurzbz = $this->input->get('studiensemester');
|
$studiensemester_kurzbz = $this->input->get('studiensemester');
|
||||||
|
|
||||||
if (isEmptyString($studiensemester_kurzbz))
|
if (isEmptyString($studiensemester_kurzbz))
|
||||||
{
|
{
|
||||||
$result = $this->StudiensemesterModel->getNearest();
|
$result = $this->StudiensemesterModel->getNearest();
|
||||||
$studiensemester_kurzbz = getData($result)[0]->studiensemester_kurzbz;
|
$studiensemester_kurzbz = getData($result)[0]->studiensemester_kurzbz;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get studiengaenge the user is entitled for
|
// Get studiengaenge the user is entitled for
|
||||||
if (!$studiengang_kz_arr = $this->permissionlib->getSTG_isEntitledFor(self::BERECHTIGUNG_ANRECHNUNG_GENEHMIGEN))
|
if (!$studiengang_kz_arr = $this->permissionlib->getSTG_isEntitledFor(self::BERECHTIGUNG_ANRECHNUNG_GENEHMIGEN))
|
||||||
{
|
{
|
||||||
@@ -91,10 +91,10 @@ class approveAnrechnungUebersicht extends Auth_Controller
|
|||||||
'hasReadOnlyAccess' => $hasReadOnlyAccess,
|
'hasReadOnlyAccess' => $hasReadOnlyAccess,
|
||||||
'hasCreateAnrechnungAccess' => $hasCreateAnrechnungAccess
|
'hasCreateAnrechnungAccess' => $hasCreateAnrechnungAccess
|
||||||
);
|
);
|
||||||
|
|
||||||
$this->load->view('lehre/anrechnung/approveAnrechnungUebersicht.php', $viewData);
|
$this->load->view('lehre/anrechnung/approveAnrechnungUebersicht.php', $viewData);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Approve Anrechnungen.
|
* Approve Anrechnungen.
|
||||||
*/
|
*/
|
||||||
@@ -107,7 +107,7 @@ class approveAnrechnungUebersicht extends Auth_Controller
|
|||||||
{
|
{
|
||||||
return $this->outputJsonError('Fehler beim Übertragen der Daten.');
|
return $this->outputJsonError('Fehler beim Übertragen der Daten.');
|
||||||
}
|
}
|
||||||
|
|
||||||
// Approve Anrechnung
|
// Approve Anrechnung
|
||||||
foreach ($data as $item)
|
foreach ($data as $item)
|
||||||
{
|
{
|
||||||
@@ -120,7 +120,7 @@ class approveAnrechnungUebersicht extends Auth_Controller
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Output json to ajax
|
// Output json to ajax
|
||||||
if (isset($json) && !isEmptyArray($json))
|
if (isset($json) && !isEmptyArray($json))
|
||||||
{
|
{
|
||||||
@@ -131,20 +131,20 @@ class approveAnrechnungUebersicht extends Auth_Controller
|
|||||||
return $this->outputJsonError('Es wurden keine Anrechnungen genehmigt.');
|
return $this->outputJsonError('Es wurden keine Anrechnungen genehmigt.');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Reject Anrechnungen.
|
* Reject Anrechnungen.
|
||||||
*/
|
*/
|
||||||
public function reject()
|
public function reject()
|
||||||
{
|
{
|
||||||
$data = $this->input->post('data');
|
$data = $this->input->post('data');
|
||||||
|
|
||||||
// Validate data
|
// Validate data
|
||||||
if (isEmptyArray($data))
|
if (isEmptyArray($data))
|
||||||
{
|
{
|
||||||
return $this->outputJsonError('Fehler beim Übertragen der Daten.');
|
return $this->outputJsonError('Fehler beim Übertragen der Daten.');
|
||||||
}
|
}
|
||||||
|
|
||||||
// Reject Anrechnung
|
// Reject Anrechnung
|
||||||
foreach ($data as $item)
|
foreach ($data as $item)
|
||||||
{
|
{
|
||||||
@@ -157,7 +157,7 @@ class approveAnrechnungUebersicht extends Auth_Controller
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Output json to ajax
|
// Output json to ajax
|
||||||
if (isset($json) && !isEmptyArray($json))
|
if (isset($json) && !isEmptyArray($json))
|
||||||
{
|
{
|
||||||
@@ -168,22 +168,22 @@ class approveAnrechnungUebersicht extends Auth_Controller
|
|||||||
return $this->outputJsonError('Es wurden keine Anrechnungen genehmigt.');
|
return $this->outputJsonError('Es wurden keine Anrechnungen genehmigt.');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Request recommendation for Anrechnungen.
|
* Request recommendation for Anrechnungen.
|
||||||
*/
|
*/
|
||||||
public function requestRecommendation()
|
public function requestRecommendation()
|
||||||
{
|
{
|
||||||
$data = $this->input->post('data');
|
$data = $this->input->post('data');
|
||||||
|
|
||||||
if(isEmptyArray($data))
|
if(isEmptyArray($data))
|
||||||
{
|
{
|
||||||
return $this->outputJsonError('Fehler beim Übertragen der Daten.');
|
return $this->outputJsonError('Fehler beim Übertragen der Daten.');
|
||||||
}
|
}
|
||||||
|
|
||||||
$retval = array();
|
$retval = array();
|
||||||
$counter = 0;
|
$counter = 0;
|
||||||
|
|
||||||
foreach ($data as $item)
|
foreach ($data as $item)
|
||||||
{
|
{
|
||||||
// Check if Anrechnungs-LV has lector
|
// Check if Anrechnungs-LV has lector
|
||||||
@@ -191,7 +191,7 @@ class approveAnrechnungUebersicht extends Auth_Controller
|
|||||||
{
|
{
|
||||||
// Count up LV with no lector
|
// Count up LV with no lector
|
||||||
$counter++;
|
$counter++;
|
||||||
|
|
||||||
// Continue loop, if LV has no lector
|
// Continue loop, if LV has no lector
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
@@ -205,7 +205,7 @@ class approveAnrechnungUebersicht extends Auth_Controller
|
|||||||
$empfehlungsanfrage_an = !isEmptyArray($lector_arr)
|
$empfehlungsanfrage_an = !isEmptyArray($lector_arr)
|
||||||
? implode(', ', array_column($lector_arr, 'fullname'))
|
? implode(', ', array_column($lector_arr, 'fullname'))
|
||||||
: '';
|
: '';
|
||||||
|
|
||||||
$retval[]= array(
|
$retval[]= array(
|
||||||
'anrechnung_id' => $item['anrechnung_id'],
|
'anrechnung_id' => $item['anrechnung_id'],
|
||||||
'status_kurzbz' => self::ANRECHNUNGSTATUS_PROGRESSED_BY_LEKTOR,
|
'status_kurzbz' => self::ANRECHNUNGSTATUS_PROGRESSED_BY_LEKTOR,
|
||||||
@@ -216,7 +216,7 @@ class approveAnrechnungUebersicht extends Auth_Controller
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Send mails to lectors
|
* Send mails to lectors
|
||||||
* NOTE: mails are sent at the end to ensure sending only ONE mail to each LV-Leitung or lector
|
* NOTE: mails are sent at the end to ensure sending only ONE mail to each LV-Leitung or lector
|
||||||
@@ -226,16 +226,16 @@ class approveAnrechnungUebersicht extends Auth_Controller
|
|||||||
{
|
{
|
||||||
self::_sendSanchoMailToLectors($retval);
|
self::_sendSanchoMailToLectors($retval);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Output json to ajax
|
// Output json to ajax
|
||||||
if (isEmptyArray($retval) && $counter == 0)
|
if (isEmptyArray($retval) && $counter == 0)
|
||||||
{
|
{
|
||||||
return $this->outputJsonError('Es wurden keine Empfehlungen angefordert');
|
return $this->outputJsonError('Es wurden keine Empfehlungen angefordert');
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this->outputJsonSuccess($retval);
|
return $this->outputJsonSuccess($retval);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Download and open uploaded document (Nachweisdokument).
|
* Download and open uploaded document (Nachweisdokument).
|
||||||
*/
|
*/
|
||||||
@@ -250,25 +250,28 @@ class approveAnrechnungUebersicht extends Auth_Controller
|
|||||||
|
|
||||||
// Check if user is entitled to read dms doc
|
// Check if user is entitled to read dms doc
|
||||||
$this->_checkIfEntitledToReadDMSDoc($dms_id);
|
$this->_checkIfEntitledToReadDMSDoc($dms_id);
|
||||||
|
|
||||||
// Set filename to be used on downlaod
|
// Set filename to be used on downlaod
|
||||||
$filename = $this->anrechnunglib->setFilenameOnDownload($dms_id);
|
$filename = $this->anrechnunglib->setFilenameOnDownload($dms_id);
|
||||||
|
|
||||||
|
// Get file to be downloaded from DMS
|
||||||
|
$download = $this->dmslib->download($dms_id, $filename);
|
||||||
|
if (isError($download)) return $download;
|
||||||
|
|
||||||
// Download file
|
// Download file
|
||||||
$this->dmslib->download($dms_id, $filename);
|
$this->outputFile(getData($download));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Retrieve the UID of the logged user and checks if it is valid
|
* Retrieve the UID of the logged user and checks if it is valid
|
||||||
*/
|
*/
|
||||||
private function _setAuthUID()
|
private function _setAuthUID()
|
||||||
{
|
{
|
||||||
$this->_uid = getAuthUID();
|
$this->_uid = getAuthUID();
|
||||||
|
|
||||||
if (!$this->_uid) show_error('User authentification failed');
|
if (!$this->_uid) show_error('User authentification failed');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Check if user is entitled to read dms doc
|
* Check if user is entitled to read dms doc
|
||||||
* @param $dms_id
|
* @param $dms_id
|
||||||
@@ -276,31 +279,30 @@ class approveAnrechnungUebersicht extends Auth_Controller
|
|||||||
private function _checkIfEntitledToReadDMSDoc($dms_id)
|
private function _checkIfEntitledToReadDMSDoc($dms_id)
|
||||||
{
|
{
|
||||||
$result = $this->AnrechnungModel->loadWhere(array('dms_id' => $dms_id));
|
$result = $this->AnrechnungModel->loadWhere(array('dms_id' => $dms_id));
|
||||||
|
|
||||||
if(!$result = getData($result)[0])
|
if(!$result = getData($result)[0])
|
||||||
{
|
{
|
||||||
show_error('Failed retrieving Anrechnung');
|
show_error('Failed retrieving Anrechnung');
|
||||||
}
|
}
|
||||||
|
|
||||||
$result = $this->LehrveranstaltungModel->loadWhere(array(
|
$result = $this->LehrveranstaltungModel->loadWhere(array(
|
||||||
'lehrveranstaltung_id' => $result->lehrveranstaltung_id
|
'lehrveranstaltung_id' => $result->lehrveranstaltung_id
|
||||||
));
|
));
|
||||||
|
|
||||||
|
|
||||||
if(!$result = getData($result)[0])
|
if(!$result = getData($result)[0])
|
||||||
{
|
{
|
||||||
show_error('Failed loading Lehrveranstaltung');
|
show_error('Failed loading Lehrveranstaltung');
|
||||||
}
|
}
|
||||||
|
|
||||||
$studiengang_kz = $result->studiengang_kz;
|
$studiengang_kz = $result->studiengang_kz;
|
||||||
|
|
||||||
// Check if user is entitled
|
// Check if user is entitled
|
||||||
if (!$this->permissionlib->isBerechtigt(self::BERECHTIGUNG_ANRECHNUNG_GENEHMIGEN, 's', $studiengang_kz))
|
if (!$this->permissionlib->isBerechtigt(self::BERECHTIGUNG_ANRECHNUNG_GENEHMIGEN, 's', $studiengang_kz))
|
||||||
{
|
{
|
||||||
show_error('You are not entitled to read this document');
|
show_error('You are not entitled to read this document');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Send mail to lectors asking for recommendation. (first to LV-Leitung, if not present to all lectors of lv)
|
* Send mail to lectors asking for recommendation. (first to LV-Leitung, if not present to all lectors of lv)
|
||||||
* @param $mail_params
|
* @param $mail_params
|
||||||
@@ -310,7 +312,7 @@ class approveAnrechnungUebersicht extends Auth_Controller
|
|||||||
{
|
{
|
||||||
// Get Lehrveranstaltungen
|
// Get Lehrveranstaltungen
|
||||||
$anrechnung_arr = array();
|
$anrechnung_arr = array();
|
||||||
|
|
||||||
foreach ($mail_params as $item)
|
foreach ($mail_params as $item)
|
||||||
{
|
{
|
||||||
$this->AnrechnungModel->addSelect('lehrveranstaltung_id, studiensemester_kurzbz');
|
$this->AnrechnungModel->addSelect('lehrveranstaltung_id, studiensemester_kurzbz');
|
||||||
@@ -319,10 +321,10 @@ class approveAnrechnungUebersicht extends Auth_Controller
|
|||||||
'studiensemester_kurzbz' => $this->AnrechnungModel->load($item['anrechnung_id'])->retval[0]->studiensemester_kurzbz
|
'studiensemester_kurzbz' => $this->AnrechnungModel->load($item['anrechnung_id'])->retval[0]->studiensemester_kurzbz
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
$anrechnung_arr = array_unique($anrechnung_arr, SORT_REGULAR);
|
$anrechnung_arr = array_unique($anrechnung_arr, SORT_REGULAR);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get lectors (prio for LV-Leitung, if not present to all lectors of LV.
|
* Get lectors (prio for LV-Leitung, if not present to all lectors of LV.
|
||||||
* Anyway this function will receive a unique array to avoid sending more mails to one and the same lector.
|
* Anyway this function will receive a unique array to avoid sending more mails to one and the same lector.
|
||||||
@@ -334,27 +336,27 @@ class approveAnrechnungUebersicht extends Auth_Controller
|
|||||||
{
|
{
|
||||||
$to = $lector->uid;
|
$to = $lector->uid;
|
||||||
$vorname = $lector->vorname;
|
$vorname = $lector->vorname;
|
||||||
|
|
||||||
// Get full name of stgl
|
// Get full name of stgl
|
||||||
$this->load->model('person/Person_model', 'PersonModel');
|
$this->load->model('person/Person_model', 'PersonModel');
|
||||||
if (!$stgl_name = getData($this->PersonModel->getFullName($this->_uid)))
|
if (!$stgl_name = getData($this->PersonModel->getFullName($this->_uid)))
|
||||||
{
|
{
|
||||||
show_error ('Failed retrieving person');
|
show_error ('Failed retrieving person');
|
||||||
}
|
}
|
||||||
|
|
||||||
// Link to Antrag genehmigen
|
// Link to Antrag genehmigen
|
||||||
$url =
|
$url =
|
||||||
CIS_ROOT. 'cis/index.php?menu='.
|
CIS_ROOT. 'cis/index.php?menu='.
|
||||||
CIS_ROOT. 'cis/menu.php?content_id=&content='.
|
CIS_ROOT. 'cis/menu.php?content_id=&content='.
|
||||||
CIS_ROOT. index_page(). self::REVIEW_ANRECHNUNG_URI;
|
CIS_ROOT. index_page(). self::REVIEW_ANRECHNUNG_URI;
|
||||||
|
|
||||||
// Prepare mail content
|
// Prepare mail content
|
||||||
$body_fields = array(
|
$body_fields = array(
|
||||||
'vorname' => $vorname,
|
'vorname' => $vorname,
|
||||||
'stgl_name' => $stgl_name,
|
'stgl_name' => $stgl_name,
|
||||||
'link' => anchor($url, 'Anrechnungsanträge Übersicht')
|
'link' => anchor($url, 'Anrechnungsanträge Übersicht')
|
||||||
);
|
);
|
||||||
|
|
||||||
sendSanchoMail(
|
sendSanchoMail(
|
||||||
'AnrechnungEmpfehlungAnfordern',
|
'AnrechnungEmpfehlungAnfordern',
|
||||||
$body_fields,
|
$body_fields,
|
||||||
@@ -364,7 +366,7 @@ class approveAnrechnungUebersicht extends Auth_Controller
|
|||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get lectors (prio for LV-Leitung, if not present to all lectors of LV.
|
* Get lectors (prio for LV-Leitung, if not present to all lectors of LV.
|
||||||
* Anyway this function will receive a unique array to avoid sending more mails to one and the same lector.
|
* Anyway this function will receive a unique array to avoid sending more mails to one and the same lector.
|
||||||
@@ -374,18 +376,18 @@ class approveAnrechnungUebersicht extends Auth_Controller
|
|||||||
private function _getLectors($anrechnung_arr)
|
private function _getLectors($anrechnung_arr)
|
||||||
{
|
{
|
||||||
$lector_arr = array();
|
$lector_arr = array();
|
||||||
|
|
||||||
// Get lectors
|
// Get lectors
|
||||||
foreach($anrechnung_arr as $anrechnung)
|
foreach($anrechnung_arr as $anrechnung)
|
||||||
{
|
{
|
||||||
$this->load->model('education/Lehrveranstaltung_model', 'LehrveranstaltungModel');
|
$this->load->model('education/Lehrveranstaltung_model', 'LehrveranstaltungModel');
|
||||||
$result = $this->LehrveranstaltungModel->getLecturersByLv($anrechnung['studiensemester_kurzbz'], $anrechnung['lehrveranstaltung_id']);
|
$result = $this->LehrveranstaltungModel->getLecturersByLv($anrechnung['studiensemester_kurzbz'], $anrechnung['lehrveranstaltung_id']);
|
||||||
|
|
||||||
if (!hasData($result))
|
if (!hasData($result))
|
||||||
{
|
{
|
||||||
show_error('Failed retrieving lectors of Lehrveranstaltung');
|
show_error('Failed retrieving lectors of Lehrveranstaltung');
|
||||||
}
|
}
|
||||||
|
|
||||||
$lecturersByLv = getData($result);
|
$lecturersByLv = getData($result);
|
||||||
|
|
||||||
// Check if lv has LV-Leitung
|
// Check if lv has LV-Leitung
|
||||||
@@ -401,7 +403,7 @@ class approveAnrechnungUebersicht extends Auth_Controller
|
|||||||
$lector_arr = array_merge($lector_arr, $lecturersByLv);
|
$lector_arr = array_merge($lector_arr, $lecturersByLv);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* NOTE: This step is only done to make the array unique by uid, vorname and nachname in the following step
|
* NOTE: This step is only done to make the array unique by uid, vorname and nachname in the following step
|
||||||
* (e.g. if same lector is ones LV-Leitung and another time not, then array_unique would leave both.
|
* (e.g. if same lector is ones LV-Leitung and another time not, then array_unique would leave both.
|
||||||
@@ -411,10 +413,10 @@ class approveAnrechnungUebersicht extends Auth_Controller
|
|||||||
{
|
{
|
||||||
unset($lector->lvleiter);
|
unset($lector->lvleiter);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Now make the lector array aka mail receivers unique
|
// Now make the lector array aka mail receivers unique
|
||||||
$lector_arr = array_unique($lector_arr, SORT_REGULAR);
|
$lector_arr = array_unique($lector_arr, SORT_REGULAR);
|
||||||
|
|
||||||
return $lector_arr;
|
return $lector_arr;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -205,9 +205,14 @@ class requestAnrechnung extends Auth_Controller
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Check if user is entitled to read dms doc
|
// Check if user is entitled to read dms doc
|
||||||
self::_checkIfEntitledToReadDMSDoc($dms_id);
|
$this->_checkIfEntitledToReadDMSDoc($dms_id);
|
||||||
|
|
||||||
$this->dmslib->download($dms_id);
|
// Get file to be downloaded from DMS
|
||||||
|
$download = $this->dmslib->download($dms_id, $filename);
|
||||||
|
if (isError($download)) return $download;
|
||||||
|
|
||||||
|
// Download file
|
||||||
|
$this->outputFile(getData($download));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -366,4 +371,4 @@ class requestAnrechnung extends Auth_Controller
|
|||||||
// Upload document
|
// Upload document
|
||||||
return $this->dmslib->upload($dms, 'uploadfile', array('pdf'));
|
return $this->dmslib->upload($dms, 'uploadfile', array('pdf'));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -217,15 +217,18 @@ class reviewAnrechnungDetail extends Auth_Controller
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Check if user is entitled to read dms doc
|
// Check if user is entitled to read dms doc
|
||||||
self::_checkIfEntitledToReadDMSDoc($dms_id);
|
$this->_checkIfEntitledToReadDMSDoc($dms_id);
|
||||||
|
|
||||||
// Set filename to be used on downlaod
|
// Set filename to be used on downlaod
|
||||||
$filename = $this->anrechnunglib->setFilenameOnDownload($dms_id);
|
$filename = $this->anrechnunglib->setFilenameOnDownload($dms_id);
|
||||||
|
|
||||||
// Download file
|
// Get file to be downloaded from DMS
|
||||||
$this->dmslib->download($dms_id, $filename);
|
$download = $this->dmslib->download($dms_id, $filename);
|
||||||
}
|
if (isError($download)) return $download;
|
||||||
|
|
||||||
|
// Download file
|
||||||
|
$this->outputFile(getData($download));
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Retrieve the UID of the logged user and checks if it is valid
|
* Retrieve the UID of the logged user and checks if it is valid
|
||||||
|
|||||||
@@ -180,13 +180,17 @@ class reviewAnrechnungUebersicht extends Auth_Controller
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Check if user is entitled to read dms doc
|
// Check if user is entitled to read dms doc
|
||||||
self::_checkIfEntitledToReadDMSDoc($dms_id);
|
$this->_checkIfEntitledToReadDMSDoc($dms_id);
|
||||||
|
|
||||||
// Set filename to be used on downlaod
|
// Set filename to be used on downlaod
|
||||||
$filename = $this->anrechnunglib->setFilenameOnDownload($dms_id);
|
$filename = $this->anrechnunglib->setFilenameOnDownload($dms_id);
|
||||||
|
|
||||||
|
// Get file to be downloaded from DMS
|
||||||
|
$download = $this->dmslib->download($dms_id, $filename);
|
||||||
|
if (isError($download)) return $download;
|
||||||
|
|
||||||
// Download file
|
// Download file
|
||||||
$this->dmslib->download($dms_id, $filename);
|
$this->outputFile(getData($download));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -18,10 +18,10 @@ class Variables extends Auth_Controller
|
|||||||
{
|
{
|
||||||
parent::__construct(
|
parent::__construct(
|
||||||
array(
|
array(
|
||||||
'setVar' => 'basis/variable:rw',
|
'setVar' => array('basis/variable:rw','basis/variable_persoenlich:rw'),
|
||||||
'getVar' => 'basis/variable:rw',
|
'getVar' => array('basis/variable:rw','basis/variable_persoenlich:rw'),
|
||||||
'changeStudiensemesterVar' => 'basis/variable:rw',
|
'changeStudiensemesterVar' => array('basis/variable:rw','basis/variable_persoenlich:rw'),
|
||||||
'changeStudengangsTypVar' => 'basis/variable:rw'
|
'changeStudengangsTypVar' => array('basis/variable:rw','basis/variable_persoenlich:rw')
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ class Issues extends Auth_Controller
|
|||||||
{
|
{
|
||||||
private $_uid;
|
private $_uid;
|
||||||
|
|
||||||
const FUNKTION_KURZBZ = 'ass'; // // user having this funktion can see issues for oes assigned with this funktion
|
const FUNKTION_KURZBZ = 'ass'; // user having this funktion can see issues for oes assigned with this funktion
|
||||||
const BERECHTIGUNG_KURZBZ = 'system/issues_verwalten'; // user having this permission can see issues for oes assigned with this permission
|
const BERECHTIGUNG_KURZBZ = 'system/issues_verwalten'; // user having this permission can see issues for oes assigned with this permission
|
||||||
|
|
||||||
public function __construct()
|
public function __construct()
|
||||||
@@ -39,6 +39,7 @@ class Issues extends Auth_Controller
|
|||||||
);
|
);
|
||||||
|
|
||||||
$this->_setAuthUID(); // sets property uid
|
$this->_setAuthUID(); // sets property uid
|
||||||
|
$this->setControllerId(); // sets the controller id
|
||||||
}
|
}
|
||||||
|
|
||||||
public function index()
|
public function index()
|
||||||
@@ -127,7 +128,7 @@ class Issues extends Auth_Controller
|
|||||||
{
|
{
|
||||||
$all_funktionen_oe_kurzbz[$benutzerfunktion->oe_kurzbz][] = $benutzerfunktion->funktion_kurzbz;
|
$all_funktionen_oe_kurzbz[$benutzerfunktion->oe_kurzbz][] = $benutzerfunktion->funktion_kurzbz;
|
||||||
|
|
||||||
// separate oes for the funktion needed for displaying issues
|
// separate oes for the additional funktion which enables displaying issues
|
||||||
if ($benutzerfunktion->funktion_kurzbz == self::FUNKTION_KURZBZ)
|
if ($benutzerfunktion->funktion_kurzbz == self::FUNKTION_KURZBZ)
|
||||||
{
|
{
|
||||||
$oe_kurzbz_for_funktion[] = $benutzerfunktion->oe_kurzbz;
|
$oe_kurzbz_for_funktion[] = $benutzerfunktion->oe_kurzbz;
|
||||||
@@ -153,7 +154,9 @@ class Issues extends Auth_Controller
|
|||||||
}
|
}
|
||||||
|
|
||||||
// add oes for which there is the "manage issues" Berechtigung
|
// add oes for which there is the "manage issues" Berechtigung
|
||||||
if (!$oe_kurzbz_berechtigt = $this->permissionlib->getOE_isEntitledFor(self::BERECHTIGUNG_KURZBZ))
|
$oe_kurzbz_berechtigt = $this->permissionlib->getOE_isEntitledFor(self::BERECHTIGUNG_KURZBZ);
|
||||||
|
|
||||||
|
if (!$oe_kurzbz_berechtigt)
|
||||||
show_error('No permission or error when checking permissions');
|
show_error('No permission or error when checking permissions');
|
||||||
|
|
||||||
$all_oe_kurzbz_berechtigt = array_unique(array_merge($oe_kurzbz_for_funktion, $oe_kurzbz_berechtigt));
|
$all_oe_kurzbz_berechtigt = array_unique(array_merge($oe_kurzbz_for_funktion, $oe_kurzbz_berechtigt));
|
||||||
|
|||||||
@@ -0,0 +1,217 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
if (! defined('BASEPATH')) exit('No direct script access allowed');
|
||||||
|
|
||||||
|
class IssuesZustaendigkeiten extends Auth_Controller
|
||||||
|
{
|
||||||
|
private $_uid;
|
||||||
|
|
||||||
|
public function __construct()
|
||||||
|
{
|
||||||
|
parent::__construct(
|
||||||
|
array(
|
||||||
|
'index' => 'admin:r',
|
||||||
|
'getApps' => 'admin:r',
|
||||||
|
'getFehlercodes' => 'admin:r',
|
||||||
|
'getNonAssignedZustaendigkeiten' => 'admin:r',
|
||||||
|
'addZustaendigkeit' => 'admin:rw',
|
||||||
|
'deleteZustaendigkeit' => 'admin:rw'
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
|
// Load libraries
|
||||||
|
$this->load->library('IssuesLib');
|
||||||
|
$this->load->library('WidgetLib');
|
||||||
|
|
||||||
|
// Load models
|
||||||
|
$this->load->model('organisation/Organisationseinheit_model', 'OrganisationseinheitModel');
|
||||||
|
$this->load->model('system/Fehler_model', 'FehlerModel');
|
||||||
|
$this->load->model('system/Fehler_model', 'FehlerModel');
|
||||||
|
$this->load->model('system/Fehlerzustaendigkeiten_model', 'FehlerzustaendigkeitenModel');
|
||||||
|
|
||||||
|
$this->loadPhrases(
|
||||||
|
array(
|
||||||
|
'global',
|
||||||
|
'ui',
|
||||||
|
'filter',
|
||||||
|
'lehre',
|
||||||
|
'person',
|
||||||
|
'fehlermonitoring'
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
|
$this->_setAuthUID(); // sets property uid
|
||||||
|
$this->setControllerId(); // sets the controller id
|
||||||
|
}
|
||||||
|
|
||||||
|
public function index()
|
||||||
|
{
|
||||||
|
$this->load->view("system/issues/issuesZustaendigkeiten.php");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Loads all Apps to which Fehler exist.
|
||||||
|
*/
|
||||||
|
public function getApps()
|
||||||
|
{
|
||||||
|
$this->FehlerModel->addDistinct();
|
||||||
|
$this->FehlerModel->addSelect('app');
|
||||||
|
$this->FehlerModel->addOrder('app');
|
||||||
|
|
||||||
|
$appRes = $this->FehlerModel->load();
|
||||||
|
|
||||||
|
$this->outputJson($appRes);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets all fehlercodes, optionally by app.
|
||||||
|
*/
|
||||||
|
public function getFehlercodes()
|
||||||
|
{
|
||||||
|
$app = $this->input->get('app');
|
||||||
|
|
||||||
|
//$this->FehlerModel->addSelect('fehlercode, fehler_kurzbz, fehlertext, fehlertyp_kurzbz');
|
||||||
|
$this->FehlerModel->addOrder('fehlercode');
|
||||||
|
|
||||||
|
$fehlerRes = isset($app) ? $this->FehlerModel->loadWhere(array('app' => $app)) : $this->FehlerModel->load();
|
||||||
|
|
||||||
|
$this->outputJson($fehlerRes);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets all Mitarbeiter, Organisationseinheiten, Funktionen not assigned to a Fehler yet.
|
||||||
|
*/
|
||||||
|
public function getNonAssignedZustaendigkeiten()
|
||||||
|
{
|
||||||
|
$fehlercode = $this->input->get('fehlercode');
|
||||||
|
|
||||||
|
$mitarbeiterRes = $this->FehlerzustaendigkeitenModel->getNonAssignedMitarbeiter($fehlercode);
|
||||||
|
|
||||||
|
if (isError($mitarbeiterRes))
|
||||||
|
{
|
||||||
|
$this->outputJsonError(getError($mitarbeiterRes));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
$this->OrganisationseinheitModel->addSelect('oe_kurzbz, bezeichnung, organisationseinheittyp_kurzbz');
|
||||||
|
$this->OrganisationseinheitModel->addOrder('organisationseinheittyp_kurzbz, bezeichnung');
|
||||||
|
$oeRes = $this->OrganisationseinheitModel->loadWhere(array('aktiv' => true));
|
||||||
|
|
||||||
|
if (isError($oeRes))
|
||||||
|
{
|
||||||
|
$this->outputJsonError(getError($oeRes));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
$oe_funktionen = array();
|
||||||
|
|
||||||
|
if (hasData($oeRes))
|
||||||
|
{
|
||||||
|
$oes = getData($oeRes);
|
||||||
|
|
||||||
|
foreach ($oes as $oe)
|
||||||
|
{
|
||||||
|
$oe->funktionen = array();
|
||||||
|
$funktionRes = $this->FehlerzustaendigkeitenModel->getNonAssignedFunktionen($fehlercode, $oe->oe_kurzbz);
|
||||||
|
|
||||||
|
if (isError($funktionRes))
|
||||||
|
{
|
||||||
|
$this->outputJsonError(getError($oeRes));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
$funktionData = getData($funktionRes);
|
||||||
|
$oe->funktionen = $funktionData;
|
||||||
|
$oe_funktionen[] = $oe;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (isError($funktionRes))
|
||||||
|
{
|
||||||
|
$this->outputJsonError(getError($funktionRes));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
$result = array(
|
||||||
|
'mitarbeiter' => getData($mitarbeiterRes),
|
||||||
|
'oe_funktionen' => $oe_funktionen
|
||||||
|
);
|
||||||
|
|
||||||
|
$this->outputJsonSuccess($result);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Adds a Zuständigkeit after performing error checks.
|
||||||
|
*/
|
||||||
|
public function addZustaendigkeit()
|
||||||
|
{
|
||||||
|
$fehlercode = $this->input->post('fehlercode');
|
||||||
|
$mitarbeiter_person_id = $this->input->post('mitarbeiter_person_id');
|
||||||
|
$oe_kurzbz = $this->input->post('oe_kurzbz');
|
||||||
|
$funktion_kurzbz = $this->input->post('funktion_kurzbz');
|
||||||
|
|
||||||
|
if (isEmptyString($fehlercode))
|
||||||
|
$this->outputJsonError($this->p->t('fehlermonitoring', 'fehlercodeFehlt'));
|
||||||
|
elseif (isEmptyString($mitarbeiter_person_id) && isEmptyString($oe_kurzbz))
|
||||||
|
$this->outputJsonError($this->p->t('fehlermonitoring', 'mitarbeiterUndOeFehlt'));
|
||||||
|
elseif (!isEmptyString($mitarbeiter_person_id) && !isEmptyString($oe_kurzbz))
|
||||||
|
$this->outputJsonError($this->p->t('fehlermonitoring', 'nurOeOderMitarbeiterSetzen'));
|
||||||
|
elseif (isset($mitarbeiter_person_id) && !is_numeric($mitarbeiter_person_id))
|
||||||
|
$this->outputJsonError($this->p->t('fehlermonitoring', 'ungueltigeMitarbeiterId'));
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$data = array(
|
||||||
|
'fehlercode' => $fehlercode
|
||||||
|
);
|
||||||
|
|
||||||
|
if (!isEmptyString($mitarbeiter_person_id))
|
||||||
|
$data['person_id'] = $mitarbeiter_person_id;
|
||||||
|
|
||||||
|
if (!isEmptyString($oe_kurzbz))
|
||||||
|
$data['oe_kurzbz'] = $oe_kurzbz;
|
||||||
|
|
||||||
|
if (!isEmptyString($funktion_kurzbz))
|
||||||
|
$data['funktion_kurzbz'] = $funktion_kurzbz;
|
||||||
|
|
||||||
|
$zustaendigkeitExistsRes = $this->FehlerzustaendigkeitenModel->loadWhere($data);
|
||||||
|
|
||||||
|
if (isError($zustaendigkeitExistsRes))
|
||||||
|
$this->outputJsonError(getError($zustaendigkeitExistsRes));
|
||||||
|
elseif (hasData($zustaendigkeitExistsRes))
|
||||||
|
$this->outputJsonError($this->p->t('fehlermonitoring', 'zustaendigkeitExistiert'));
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$data['insertvon'] = $this->_uid;
|
||||||
|
|
||||||
|
$this->outputJson($this->FehlerzustaendigkeitenModel->insert($data));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Deletes a Zuständigkeit.
|
||||||
|
*/
|
||||||
|
public function deleteZustaendigkeit()
|
||||||
|
{
|
||||||
|
$fehlerzustaendigkeiten_id = $this->input->post('fehlerzustaendigkeiten_id');
|
||||||
|
|
||||||
|
// check if Id correctly passed
|
||||||
|
if (!isset($fehlerzustaendigkeiten_id) || !is_numeric($fehlerzustaendigkeiten_id))
|
||||||
|
{
|
||||||
|
$this->outputJsonError($this->p->t('fehlermonitoring', 'ungueltigeZustaendigkeitenId'));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
$this->outputJson($this->FehlerzustaendigkeitenModel->delete($fehlerzustaendigkeiten_id));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Retrieve the UID of the logged user and checks if it is valid
|
||||||
|
*/
|
||||||
|
private function _setAuthUID()
|
||||||
|
{
|
||||||
|
$this->_uid = getAuthUID();
|
||||||
|
|
||||||
|
if (!$this->_uid) show_error('User authentification failed');
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -121,7 +121,7 @@ abstract class FHC_Controller extends CI_Controller
|
|||||||
protected function terminateWithJsonError($message)
|
protected function terminateWithJsonError($message)
|
||||||
{
|
{
|
||||||
header('Content-Type: application/json');
|
header('Content-Type: application/json');
|
||||||
echo json_encode(error($message));
|
echo json_encode(error($message)); // KEEP IT!!!
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -132,31 +132,41 @@ abstract class FHC_Controller extends CI_Controller
|
|||||||
{
|
{
|
||||||
$this->output->set_content_type('application/json')->set_output(json_encode($mixed));
|
$this->output->set_content_type('application/json')->set_output(json_encode($mixed));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* To download the given file represented by the fileObj parameter.
|
||||||
|
* fileObj has the following structure:
|
||||||
|
* $fileObj->filename
|
||||||
|
* $fileObj->file
|
||||||
|
* $fileObj->name
|
||||||
|
* $fileObj->mimetype
|
||||||
|
* $fileObj->disposition
|
||||||
|
*/
|
||||||
protected function outputFile($fileObj)
|
protected function outputFile($fileObj)
|
||||||
{
|
{
|
||||||
if (file_exists($fileObj->file))
|
// If the file exists
|
||||||
|
if (isset($fileObj->file) && !isEmptyString($fileObj->file) && file_exists($fileObj->file))
|
||||||
{
|
{
|
||||||
$finfo = new finfo(FILEINFO_MIME);
|
|
||||||
|
|
||||||
header('Content-Description: File Transfer');
|
header('Content-Description: File Transfer');
|
||||||
header('Content-Type: '. $finfo->file($fileObj->file));
|
header('Content-Type: '. $fileObj->mimetype);
|
||||||
header('Expires: 0');
|
header('Expires: 0');
|
||||||
header('Cache-Control: must-revalidate');
|
header('Cache-Control: must-revalidate');
|
||||||
header('Pragma: public');
|
header('Pragma: public');
|
||||||
header('Content-Length: ' . filesize($fileObj->file));
|
header('Content-Length: ' . filesize($fileObj->file));
|
||||||
|
|
||||||
if (isset($fileObj->disposition) && ($fileObj->disposition == 'inline' || $fileObj->disposition == 'attachment'))
|
if (isset($fileObj->disposition)
|
||||||
|
&& ($fileObj->disposition == 'inline' || $fileObj->disposition == 'attachment'))
|
||||||
{
|
{
|
||||||
header('Content-Disposition: '. $fileObj->disposition. '; filename="'. $fileObj->name. '"');
|
header('Content-Disposition: '. $fileObj->disposition. '; filename="'. $fileObj->name. '"');
|
||||||
}
|
}
|
||||||
|
|
||||||
readfile($fileObj->file);
|
readfile($fileObj->file); // reads the file content to the output buffer
|
||||||
|
}
|
||||||
exit;
|
else
|
||||||
|
{
|
||||||
|
// Otherwise print an error
|
||||||
|
show_error('The provided file does not exist: '.(isset($fileObj->file) ? $fileObj->file : 'file not given'));
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
+249
-60
@@ -3,113 +3,238 @@
|
|||||||
if (!defined('BASEPATH')) exit('No direct script access allowed');
|
if (!defined('BASEPATH')) exit('No direct script access allowed');
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
* Model to work with the filesystem, it represents a directory
|
||||||
|
* It could be extended or could be used directly to work on the given path
|
||||||
*/
|
*/
|
||||||
abstract class FS_Model extends CI_Model
|
class FS_Model extends CI_Model
|
||||||
{
|
{
|
||||||
protected $filepath; // Path of the file
|
const READ_MODE = 'r';
|
||||||
|
const READ_WRITE_MODE = 'w+';
|
||||||
|
const READ_APPEND_MODE = 'a+';
|
||||||
|
const BLOCK_SIZE = 8192;
|
||||||
|
const META_URI = 'uri';
|
||||||
|
|
||||||
|
private $_path; // Directory where this model can operate
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Loads FilesystemLib and set properties
|
* Set properties
|
||||||
*/
|
*/
|
||||||
public function __construct($filepath = null)
|
public function __construct($path)
|
||||||
{
|
{
|
||||||
parent::__construct();
|
parent::__construct();
|
||||||
|
|
||||||
// Load the filesystem library
|
$this->_path = $path;
|
||||||
$this->load->library('FilesystemLib');
|
}
|
||||||
|
|
||||||
$this->filepath = $filepath;
|
// ------------------------------------------------------------------------------------------------------------------
|
||||||
|
// Public methods
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Opens a file in read mode and returns its file handle
|
||||||
|
*/
|
||||||
|
public function openRead($filename)
|
||||||
|
{
|
||||||
|
return $this->_open($filename, self::READ_MODE);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Read data from file system
|
* Opens a file in read and write mode and returns its file handle
|
||||||
*
|
* If the file does not exist then it is created
|
||||||
* @return array
|
|
||||||
*/
|
*/
|
||||||
public function read($filename)
|
public function openReadWrite($filename)
|
||||||
{
|
{
|
||||||
// Check Class-Attributes
|
return $this->_open($filename, self::READ_WRITE_MODE);
|
||||||
if (is_null($this->filepath)) return error('The given filepath in not valid', EXIT_ERROR);
|
|
||||||
|
|
||||||
// Check method parameters
|
|
||||||
if (is_null($filename)) return error('The given filename is not valid', EXIT_ERROR);
|
|
||||||
|
|
||||||
if (!is_null($data = $this->filesystemlib->read($this->filepath, $filename)))
|
|
||||||
{
|
|
||||||
return success(base64_encode($data));
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
return error('An error occurred while reading a file', EXIT_ERROR);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Writing data to file system
|
* Opens a file in read and append mode and returns its file handle
|
||||||
*
|
* If the file does not exist then it is created
|
||||||
* @param string $fileContent File content
|
|
||||||
* @return object
|
|
||||||
*/
|
*/
|
||||||
public function write($filename, $content)
|
public function openReadAppend($filename)
|
||||||
{
|
{
|
||||||
// Check Class-Attributes
|
return $this->_open($filename, self::READ_APPEND_MODE);
|
||||||
if (is_null($this->filepath)) return error('The given filepath in not valid', EXIT_ERROR);
|
}
|
||||||
|
|
||||||
// Check method parameters
|
/**
|
||||||
if (is_null($content)) return error('The given file content is not valid', EXIT_ERROR);
|
* Closes a file handle
|
||||||
if (is_null($filename)) return error('The given filename is not valid', EXIT_ERROR);
|
*/
|
||||||
|
public function close($fileHandle)
|
||||||
|
{
|
||||||
|
return fclose($fileHandle) === true ? success() : error('Error while closing the file handler');
|
||||||
|
}
|
||||||
|
|
||||||
if ($this->filesystemlib->write($this->filepath, $filename, base64_decode($content)) === true)
|
/**
|
||||||
|
* Reads a block of bytes from the given file
|
||||||
|
* Returns a success that contains the block
|
||||||
|
* On failure returns an error
|
||||||
|
*/
|
||||||
|
public function readBlock($fileHandle)
|
||||||
|
{
|
||||||
|
// Reads a block of bytes from the file
|
||||||
|
$block = fread($fileHandle, self::BLOCK_SIZE);
|
||||||
|
|
||||||
|
// If an error occurred
|
||||||
|
if ($block === false)
|
||||||
|
{
|
||||||
|
// Prepare the error message
|
||||||
|
$errorMsg = 'An error occurred while reading a file';
|
||||||
|
|
||||||
|
// Tries to get the file name and to concatenate it to the error message
|
||||||
|
$fileMetaData = stream_get_meta_data($fileHandle);
|
||||||
|
if (isset($fileMetaData[self::META_URI])) $errorMsg .= ': '.$fileMetaData[self::META_URI];
|
||||||
|
|
||||||
|
return error($errorMsg); // returns the error
|
||||||
|
}
|
||||||
|
|
||||||
|
return success($block); // return success if everything was fine
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Writes/appends (depending on how the file was opened) a content into a file
|
||||||
|
* Returns a success that contains the written number of bytes
|
||||||
|
* On failure returns an error
|
||||||
|
*/
|
||||||
|
public function write($fileHandle, $content)
|
||||||
|
{
|
||||||
|
// Writes the provided content to the file
|
||||||
|
$writeResult = fwrite($fileHandle, $content);
|
||||||
|
|
||||||
|
// If an error occurred
|
||||||
|
if ($writeResult === false)
|
||||||
|
{
|
||||||
|
$errorMsg = 'An error occurred while writing a file';
|
||||||
|
|
||||||
|
// Tries to get the file name and to concatenate it to the error message
|
||||||
|
$fileMetaData = stream_get_meta_data($fileHandle);
|
||||||
|
if (isset($fileMetaData[self::META_URI])) $errorMsg .= ': '.$fileMetaData[self::META_URI];
|
||||||
|
|
||||||
|
return error($errorMsg); // returns the error
|
||||||
|
}
|
||||||
|
|
||||||
|
return success($writeResult);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Removes a given file
|
||||||
|
*/
|
||||||
|
public function remove($filename)
|
||||||
|
{
|
||||||
|
// Check if the property _path represents a valid directory
|
||||||
|
$checkResult = $this->_checkPath();
|
||||||
|
|
||||||
|
if (isError($checkResult)) return $checkResult; // If not then return the error
|
||||||
|
|
||||||
|
// Check filename
|
||||||
|
if (isEmptyString($filename)) return error('The given filename is not valid');
|
||||||
|
|
||||||
|
// remove file
|
||||||
|
if (unlink($this->_path.DIRECTORY_SEPARATOR.$filename) === true)
|
||||||
{
|
{
|
||||||
return success();
|
return success();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
return error('An error occurred while writing a file', EXIT_ERROR);
|
return error('An error occurred while removing a file');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// ------------------------------------------------------------------------------------------------------------------
|
||||||
|
// Old public methods that work with the base64 encoding, not to be used!
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Append data to a file
|
* Read data from the given file and encode its content to base64
|
||||||
*
|
|
||||||
* @param array $data File content
|
|
||||||
* @return array
|
|
||||||
*/
|
*/
|
||||||
public function append($filename, $content)
|
public function readBase64($filename)
|
||||||
{
|
{
|
||||||
// Check Class-Attributes
|
// Open the file in read mode
|
||||||
if (is_null($this->filepath)) return error('The given filepath in not valid', EXIT_ERROR);
|
$openReadResult = $this->openRead($filename);
|
||||||
|
if (isError($openReadResult)) return $openReadResult; // if an error occurred then return it
|
||||||
|
|
||||||
// Check method parameters
|
$fileContent = ''; // to store the file content
|
||||||
if (is_null($content)) return error('The given file content is not valid', EXIT_ERROR);
|
$fileHandle = getData($openReadResult); // get the file handle
|
||||||
if (is_null($filename)) return error('The given filename is not valid', EXIT_ERROR);
|
|
||||||
|
|
||||||
if ($this->filesystemlib->append($this->filepath, $filename, base64_decode($content)) === true)
|
// While the end of the file is not reached and the read does not fail
|
||||||
|
while (!feof($fileHandle) && isSuccess($readBlockResult = $this->readBlock($fileHandle)))
|
||||||
{
|
{
|
||||||
return success();
|
// Concatenate the content of the file
|
||||||
}
|
$fileContent .= getData($readBlockResult);
|
||||||
else
|
|
||||||
{
|
|
||||||
return error('An error occurred while appending to a file', EXIT_ERROR);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// If an error occurred while reading then return it
|
||||||
|
if (isError($readBlockResult)) return $readBlockResult;
|
||||||
|
|
||||||
|
// Close the file handler
|
||||||
|
$closeResult = $this->close($fileHandle);
|
||||||
|
if (isError($closeResult)) return $closeResult; // if it fails then return the error
|
||||||
|
|
||||||
|
// If everything was fine encode the file content into base64 and return it as a success
|
||||||
|
return success(base64_encode($fileContent));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Writes the given content into the given file. The content is base64 encoded
|
||||||
|
*/
|
||||||
|
public function writeBase64($filename, $content)
|
||||||
|
{
|
||||||
|
// Open the file in read and write mode
|
||||||
|
$openWriteResult = $this->openReadWrite($filename);
|
||||||
|
if (isError($openWriteResult)) return $openWriteResult; // if an error occurred then return it
|
||||||
|
|
||||||
|
$fileHandle = getData($openWriteResult); // get the file handle
|
||||||
|
|
||||||
|
// Writes the given base64 encoded content into to given file
|
||||||
|
$writeResult = $this->write($fileHandle, base64_decode($content));
|
||||||
|
// If an error occurred while writing then return it
|
||||||
|
if (isError($writeResult)) return $writeResult;
|
||||||
|
|
||||||
|
// Close the file handler
|
||||||
|
$closeResult = $this->close($fileHandle);
|
||||||
|
if (isError($closeResult)) return $closeResult; // if it fails then return the error
|
||||||
|
|
||||||
|
// If everything was fine
|
||||||
|
return success();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Appends the given content into the given file. The content is base64 encoded
|
||||||
|
*/
|
||||||
|
public function appendBase64($filename, $content)
|
||||||
|
{
|
||||||
|
// Open the file in read and append mode
|
||||||
|
$openWriteResult = $this->openReadAppend($filename);
|
||||||
|
if (isError($openWriteResult)) return $openWriteResult; // if an error occurred then return it
|
||||||
|
|
||||||
|
$fileHandle = getData($openWriteResult); // get the file handle
|
||||||
|
|
||||||
|
// Writes the given base64 encoded content into to given file
|
||||||
|
$writeResult = $this->write($fileHandle, base64_decode($content));
|
||||||
|
// If an error occurred while writing then return it
|
||||||
|
if (isError($writeResult)) return $writeResult;
|
||||||
|
|
||||||
|
// Close the file handler
|
||||||
|
$closeResult = $this->close($fileHandle);
|
||||||
|
if (isError($closeResult)) return $closeResult; // if it fails then return the error
|
||||||
|
|
||||||
|
// If everything was fine
|
||||||
|
return success();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Delete data from file system
|
* Delete data from file system
|
||||||
|
* NOTE: it does not work with the base64 encoding but it has been kept for retro compatibility
|
||||||
*
|
*
|
||||||
* @param string $id Primary Key for DELETE
|
* @param string $id Primary Key for DELETE
|
||||||
* @return array
|
* @return array
|
||||||
*/
|
*/
|
||||||
public function remove($filename)
|
public function removeBase64($filename)
|
||||||
{
|
{
|
||||||
// Check Class-Attributes
|
// Check Class-Attributes
|
||||||
if (is_null($this->filepath)) return error('The given filepath in not valid', EXIT_ERROR);
|
if (is_null($this->_path)) return error('The given _path in not valid', EXIT_ERROR);
|
||||||
|
|
||||||
// Check method parameters
|
// Check method parameters
|
||||||
if (is_null($filename)) return error('The given filename is not valid', EXIT_ERROR);
|
if (is_null($filename)) return error('The given filename is not valid', EXIT_ERROR);
|
||||||
|
|
||||||
if ($this->filesystemlib->remove($this->filepath, $filename) === true)
|
if (unlink($this->_path.DIRECTORY_SEPARATOR.$filename) === true)
|
||||||
{
|
{
|
||||||
return success();
|
return success();
|
||||||
}
|
}
|
||||||
@@ -121,20 +246,21 @@ abstract class FS_Model extends CI_Model
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Rename a file
|
* Rename a file
|
||||||
|
* NOTE: it does not work with the base64 encoding but it has been kept for retro compatibility
|
||||||
*
|
*
|
||||||
* @param string $id Primary Key for DELETE
|
* @param string $id Primary Key for DELETE
|
||||||
* @return array
|
* @return array
|
||||||
*/
|
*/
|
||||||
public function rename($filename, $newFilename)
|
public function renameBase64($filename, $newFilename)
|
||||||
{
|
{
|
||||||
// Check Class-Attributes
|
// Check Class-Attributes
|
||||||
if (is_null($this->filepath)) return error('The given filepath in not valid', EXIT_ERROR);
|
if (is_null($this->_path)) return error('The given _path in not valid', EXIT_ERROR);
|
||||||
|
|
||||||
// Check method parameters
|
// Check method parameters
|
||||||
if (is_null($filename)) return error('The given filename is not valid', EXIT_ERROR);
|
if (is_null($filename)) return error('The given filename is not valid', EXIT_ERROR);
|
||||||
if (is_null($newFilename)) return error('The given new filename is not valid', EXIT_ERROR);
|
if (is_null($newFilename)) return error('The given new filename is not valid', EXIT_ERROR);
|
||||||
|
|
||||||
if ($this->filesystemlib->rename($this->filepath, $filename, $this->filepath, $newFilename) === true)
|
if (rename($this->_path.DIRECTORY_SEPARATOR.$filename, $this->_path.DIRECTORY_SEPARATOR.$newFilename) === true)
|
||||||
{
|
{
|
||||||
return success();
|
return success();
|
||||||
}
|
}
|
||||||
@@ -143,4 +269,67 @@ abstract class FS_Model extends CI_Model
|
|||||||
return error('An error occurred while renaming a file', EXIT_ERROR);
|
return error('An error occurred while renaming a file', EXIT_ERROR);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// ------------------------------------------------------------------------------------------------------------------
|
||||||
|
// Private methods
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Checks if the given $this->_path is a valid directory
|
||||||
|
*/
|
||||||
|
private function _checkPath()
|
||||||
|
{
|
||||||
|
// If _path...
|
||||||
|
if (!isEmptyString($this->_path) // ...is a not empty string...
|
||||||
|
&& file_exists($this->_path) && is_dir($this->_path)) // ...exists on the file system and it is a directory...
|
||||||
|
{
|
||||||
|
return success(); // return a success
|
||||||
|
}
|
||||||
|
|
||||||
|
// If not a valid path return an error
|
||||||
|
return error('The given path is not valid: '.$this->_path);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Open a file using the provided mode
|
||||||
|
* It returns a file handle
|
||||||
|
* Or write and append if the file does not exist then creates it
|
||||||
|
*/
|
||||||
|
private function _open($filename, $mode)
|
||||||
|
{
|
||||||
|
// Check if the property _path represents a valid directory
|
||||||
|
$checkResult = $this->_checkPath();
|
||||||
|
if (isError($checkResult)) return $checkResult; // If not then return the error
|
||||||
|
|
||||||
|
// Full file path: path + filename
|
||||||
|
$fileFullPath = $this->_path.DIRECTORY_SEPARATOR.$filename;
|
||||||
|
|
||||||
|
// If needed then check if the file exists and really it is a file
|
||||||
|
if ($mode == self::READ_MODE && (!file_exists($fileFullPath) || !is_file($fileFullPath)))
|
||||||
|
{
|
||||||
|
return error('Trying to read a not existing file');
|
||||||
|
}
|
||||||
|
|
||||||
|
// If needed then check if it is possible to read from the path and the file
|
||||||
|
if ($mode == self::READ_MODE && (!is_readable($this->_path) || !is_readable($fileFullPath)))
|
||||||
|
{
|
||||||
|
return error('The given path or filename are not readable: '.$fileFullPath);
|
||||||
|
}
|
||||||
|
|
||||||
|
// If needed then check if the path and the filename are writable
|
||||||
|
if (($mode == self::READ_WRITE_MODE || $mode == self::READ_APPEND_MODE)
|
||||||
|
&& (!is_writable($this->_path) || (file_exists($fileFullPath) && !is_writable($fileFullPath))))
|
||||||
|
{
|
||||||
|
return error('The given path or filename are not writable: '.$fileFullPath);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Open the file in read mode
|
||||||
|
$fileHandle = fopen($fileFullPath, $mode);
|
||||||
|
|
||||||
|
// If it was a failure the return the error
|
||||||
|
if ($fileHandle === false) return error('An error occurred while opening a file in '.$mode.' mode');
|
||||||
|
|
||||||
|
// Otherwise return the file handle
|
||||||
|
return success($fileHandle);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,268 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/**
|
||||||
|
* FH-Complete
|
||||||
|
*
|
||||||
|
* @package FHC-Helper
|
||||||
|
* @author FHC-Team
|
||||||
|
* @copyright Copyright (c) 2022 fhcomplete.net
|
||||||
|
* @license GPLv3
|
||||||
|
*/
|
||||||
|
|
||||||
|
if (! defined('BASEPATH')) exit('No direct script access allowed');
|
||||||
|
|
||||||
|
class AkteLib
|
||||||
|
{
|
||||||
|
const AKTE_KATEGORIE_KURZBZ = 'Akte'; // kategorie_kurzbz of dms when inserting for akte
|
||||||
|
|
||||||
|
private $_ci; // Code igniter instance
|
||||||
|
private $_who; // who added this document
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Object initialization
|
||||||
|
*/
|
||||||
|
public function __construct($params = null)
|
||||||
|
{
|
||||||
|
$this->_ci =& get_instance();
|
||||||
|
|
||||||
|
// Set the the _who property
|
||||||
|
$this->_who = 'Akte system'; // default
|
||||||
|
// It is possible to set it using the who parameter
|
||||||
|
if (!isEmptyArray($params) && isset($params['who']) && !isEmptyString($params['who'])) $this->_who = $params['who'];
|
||||||
|
|
||||||
|
$this->_ci->load->model('crm/Akte_model', 'AkteModel');
|
||||||
|
$this->_ci->load->model('content/DmsFS_model', 'DmsFSModel');
|
||||||
|
|
||||||
|
$this->_ci->load->library('DmsLib');
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Writes a new file, adds a new dms entry with given akte data,
|
||||||
|
* adds a new dms version 0 for the written file, and adds Akte if dms add was successfull
|
||||||
|
* Returns success with inserted akte id or error
|
||||||
|
*/
|
||||||
|
public function add(
|
||||||
|
$person_id, $dokument_kurzbz, $titel, $mimetype, $fileHandle, // Required parameters
|
||||||
|
$bezeichnung = null, $archiv = false, $signiert = false, $stud_selfservice = false
|
||||||
|
)
|
||||||
|
{
|
||||||
|
// add new dms entry and new dms version for the Akte, using Akte data (title, mimetype, file content as handle)
|
||||||
|
$dmsAddResult = $this->_ci->dmslib->add($titel, $mimetype, $fileHandle, self::AKTE_KATEGORIE_KURZBZ, $dokument_kurzbz, $bezeichnung);
|
||||||
|
|
||||||
|
if (isError($dmsAddResult)) return $dmsAddResult;
|
||||||
|
|
||||||
|
if (!hasData($dmsAddResult)) return error("Dms document could not be added");
|
||||||
|
|
||||||
|
$dmsAddData = getData($dmsAddResult);
|
||||||
|
|
||||||
|
// insert the Akte
|
||||||
|
return $this->_ci->AkteModel->insert(
|
||||||
|
array(
|
||||||
|
'person_id' => $person_id,
|
||||||
|
'dokument_kurzbz' => $dokument_kurzbz,
|
||||||
|
'titel' => $titel,
|
||||||
|
'mimetype' => $mimetype,
|
||||||
|
'bezeichnung' => $bezeichnung,
|
||||||
|
'erstelltam' => date('Y-m-d'),
|
||||||
|
'dms_id' => $dmsAddData->dms_id,
|
||||||
|
'archiv' => $archiv,
|
||||||
|
'signiert' => $signiert,
|
||||||
|
'stud_selfservice' => $stud_selfservice,
|
||||||
|
'insertamum' => date('Y-m-d H:i:s'),
|
||||||
|
'insertvon' => $this->_who
|
||||||
|
)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Writes a new file, adds a new dms version 0 for the written file, and updates Akte if dms version add was successfull
|
||||||
|
* Returns success with updated akte id or error
|
||||||
|
*/
|
||||||
|
public function update($akte_id, $titel, $mimetype, $fileHandle, $bezeichnung = null, $archiv = false, $signiert = false, $stud_selfservice = false)
|
||||||
|
{
|
||||||
|
// check if Akte with dms exists
|
||||||
|
$this->_ci->AkteModel->addSelect('dms_id');
|
||||||
|
$akteResult = $this->_ci->AkteModel->load($akte_id);
|
||||||
|
|
||||||
|
if (isError($akteResult)) return $akteResult;
|
||||||
|
|
||||||
|
if (!hasData($akteResult)) return error("Akte not found");
|
||||||
|
|
||||||
|
$dms_id = getData($akteResult)[0]->dms_id;
|
||||||
|
|
||||||
|
if (isEmptyString($dms_id)) return error("Akte has no dms document");
|
||||||
|
|
||||||
|
// if Akte with dms found, update the last dms version
|
||||||
|
$dmsUpdateResult = $this->_ci->dmslib->updateLastVersion($dms_id, $fileHandle, $titel, $mimetype, $bezeichnung);
|
||||||
|
|
||||||
|
if (isError($dmsUpdateResult)) return $dmsUpdateResult;
|
||||||
|
|
||||||
|
if (!hasData($dmsUpdateResult)) return error("Dms document could not be updated");
|
||||||
|
|
||||||
|
// update the Akte
|
||||||
|
return $this->_ci->AkteModel->update(
|
||||||
|
$akte_id,
|
||||||
|
array(
|
||||||
|
'titel' => $titel,
|
||||||
|
'mimetype' => $mimetype,
|
||||||
|
'bezeichnung' => $bezeichnung,
|
||||||
|
'erstelltam' => date('Y-m-d'),
|
||||||
|
'dms_id' => $dms_id,
|
||||||
|
'archiv' => $archiv,
|
||||||
|
'signiert' => $signiert,
|
||||||
|
'stud_selfservice' => $stud_selfservice,
|
||||||
|
'updateamum' => date('Y-m-d H:i:s'),
|
||||||
|
'updatevon' => $this->_who
|
||||||
|
)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets akte data and associated dms data by akte Id
|
||||||
|
* Returns success with akte and dms data or error
|
||||||
|
*/
|
||||||
|
public function get($akte_id)
|
||||||
|
{
|
||||||
|
// get Akte data
|
||||||
|
$this->_ci->AkteModel->addSelect('person_id, dokument_kurzbz, mimetype, erstelltam, titel, bezeichnung,
|
||||||
|
gedruckt, uid, dms_id, nachgereicht, nachgereicht_am, anmerkung,
|
||||||
|
ausstellungsnation, formal_geprueft_amum, archiv, signiert,
|
||||||
|
stud_selfservice, akzeptiertamum, insertvon, insertamum, updatevon, updateamum');
|
||||||
|
$this->_ci->AkteModel->load($akte_id);
|
||||||
|
$akteResult = $this->_ci->AkteModel->load($akte_id);
|
||||||
|
|
||||||
|
if (isError($akteResult)) return $akteResult;
|
||||||
|
|
||||||
|
if (!hasData($akteResult)) return error("Akte not found");
|
||||||
|
|
||||||
|
$resultObject = getData($akteResult)[0];
|
||||||
|
|
||||||
|
// set properties with same name in Akte and Dms table
|
||||||
|
$resultObject->akte_mimetype = $resultObject->mimetype;
|
||||||
|
|
||||||
|
// get dms data
|
||||||
|
$dmsResult = $this->_ci->dmslib->getLastVersion($resultObject->dms_id);
|
||||||
|
|
||||||
|
if (isError($dmsResult)) return $dmsResult;
|
||||||
|
|
||||||
|
// properties to retrieve from dms
|
||||||
|
$dmsProperties = array('version', 'filename', 'mimetype', 'name', 'beschreibung', 'cis_suche', 'schlagworte', DmsLib::FILE_CONTENT_PROPERTY);
|
||||||
|
|
||||||
|
// set dms properties
|
||||||
|
if (hasData($dmsResult))
|
||||||
|
{
|
||||||
|
$dmsData = getData($dmsResult);
|
||||||
|
|
||||||
|
foreach ($dmsProperties as $dmsProperty)
|
||||||
|
{
|
||||||
|
$resultObject->{$dmsProperty} = $dmsData->{$dmsProperty};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// set null if no dms result found
|
||||||
|
foreach ($dmsProperties as $dmsProperty)
|
||||||
|
{
|
||||||
|
$resultObject->{$dmsProperty} = null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// return the object containing akte and dms data
|
||||||
|
return success($resultObject);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets Akte data and associated dms data by person Id and dokument_kurzbz
|
||||||
|
* Returns success with result array with akte and dms data or error
|
||||||
|
*/
|
||||||
|
public function getByPersonIdAndDocumentType($person_id, $dokument_kurzbz)
|
||||||
|
{
|
||||||
|
// load all Akte entries for given person and dokument_kurzbz
|
||||||
|
$this->_ci->AkteModel->addSelect('akte_id');
|
||||||
|
$akteResult = $this->_ci->AkteModel->loadWhere(
|
||||||
|
array(
|
||||||
|
'person_id' => $person_id,
|
||||||
|
'dokument_kurzbz' => $dokument_kurzbz
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
|
if (!hasData($akteResult)) return error("Akte not found");
|
||||||
|
|
||||||
|
$akteData = getData($akteResult);
|
||||||
|
|
||||||
|
$resultArr = array();
|
||||||
|
|
||||||
|
// for each found akte entry
|
||||||
|
foreach ($akteData as $akte)
|
||||||
|
{
|
||||||
|
// get dms and akte data from akte Id
|
||||||
|
$getAkteDmsResult = $this->get($akte->akte_id);
|
||||||
|
|
||||||
|
if (isError($getAkteDmsResult)) return $getAkteDmsResult;
|
||||||
|
|
||||||
|
$resultArr[] = getData($getAkteDmsResult);
|
||||||
|
}
|
||||||
|
|
||||||
|
// return all found entries
|
||||||
|
return success($resultArr);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Removes Akte by akte Id, removes all associated dms entries and versions, and deletes all associated files
|
||||||
|
* Returns success with removed version numbers or error
|
||||||
|
*/
|
||||||
|
public function remove($akte_id)
|
||||||
|
{
|
||||||
|
// get dms_id for akte
|
||||||
|
$this->_ci->AkteModel->addSelect('dms_id');
|
||||||
|
$akteResult = $this->_ci->AkteModel->load($akte_id);
|
||||||
|
|
||||||
|
if (isError($akteResult)) return $akteResult;
|
||||||
|
|
||||||
|
if (!hasData($akteResult)) return error("Akte not found");
|
||||||
|
|
||||||
|
$dms_id = getData($akteResult)[0]->dms_id;
|
||||||
|
$error = null;
|
||||||
|
|
||||||
|
// Start DB transaction to avoid deleting only part of the data
|
||||||
|
$this->_ci->db->trans_begin();
|
||||||
|
|
||||||
|
// delete Akte
|
||||||
|
$deleteResult = $this->_ci->AkteModel->delete($akte_id);
|
||||||
|
|
||||||
|
if (isError($deleteResult))
|
||||||
|
{
|
||||||
|
$error = $deleteResult;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// remove all dms entry for dms of the akte
|
||||||
|
$removeAllResult = $this->_ci->dmslib->removeAll($dms_id);
|
||||||
|
|
||||||
|
if (isError($removeAllResult))
|
||||||
|
$error = $removeAllResult;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Transaction complete!
|
||||||
|
$this->_ci->db->trans_complete();
|
||||||
|
|
||||||
|
// Check if everything went ok during the transaction
|
||||||
|
if ($this->_ci->db->trans_status() === false || isset($error))
|
||||||
|
{
|
||||||
|
$this->_ci->db->trans_rollback();
|
||||||
|
|
||||||
|
// return occured error
|
||||||
|
if (isset($error))
|
||||||
|
return $error;
|
||||||
|
else
|
||||||
|
return error("Error occured when deleting, rolled back");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$this->_ci->db->trans_commit();
|
||||||
|
|
||||||
|
// return removed dms entry data
|
||||||
|
return $removeAllResult;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
+633
-141
@@ -1,25 +1,532 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
/**
|
||||||
|
* FH-Complete
|
||||||
|
*
|
||||||
|
* @package FHC-Helper
|
||||||
|
* @author FHC-Team
|
||||||
|
* @copyright Copyright (c) 2022 fhcomplete.net
|
||||||
|
* @license GPLv3
|
||||||
|
*/
|
||||||
|
|
||||||
if (! defined('BASEPATH')) exit('No direct script access allowed');
|
if (! defined('BASEPATH')) exit('No direct script access allowed');
|
||||||
|
|
||||||
class DmsLib extends FHC_Controller
|
use \stdClass as stdClass;
|
||||||
|
|
||||||
|
class DmsLib
|
||||||
{
|
{
|
||||||
const FILE_CONTENT_PROPERTY = 'file_content';
|
const FILE_CONTENT_PROPERTY = 'file_content'; // property name for file content
|
||||||
|
|
||||||
private $UPLOAD_PATH = DMS_PATH; // temporary directory to store the upload file
|
private $_ci; // code igniter instance
|
||||||
|
private $_who; // who added this document
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Object initialization
|
* Object initialization
|
||||||
*/
|
*/
|
||||||
public function __construct()
|
public function __construct($params = null)
|
||||||
{
|
{
|
||||||
$this->ci =& get_instance();
|
$this->_ci =& get_instance();
|
||||||
|
|
||||||
$this->ci->load->model('crm/Akte_model', 'AkteModel');
|
// Set the the _who property
|
||||||
$this->ci->load->model('content/Dms_model', 'DmsModel');
|
$this->_who = 'DMS system'; // default
|
||||||
$this->ci->load->model('content/DmsVersion_model', 'DmsVersionModel');
|
// It is possible to set it using the who parameter
|
||||||
$this->ci->load->model('content/DmsFS_model', 'DmsFSModel');
|
if (!isEmptyArray($params) && isset($params['who']) && !isEmptyString($params['who'])) $this->_who = $params['who'];
|
||||||
|
|
||||||
|
$this->_ci->load->model('crm/Akte_model', 'AkteModel'); // deprecated, should not be used here!
|
||||||
|
$this->_ci->load->model('content/Dms_model', 'DmsModel');
|
||||||
|
$this->_ci->load->model('content/DmsVersion_model', 'DmsVersionModel');
|
||||||
|
$this->_ci->load->model('content/DmsFS_model', 'DmsFSModel');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// -----------------------------------------------------------------------------------------------------------
|
||||||
|
// Public methods
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Writes a new file, adds a new dms entry and a new dms version 0 for the written file
|
||||||
|
* Returns success info of added dms entry (dms_id, version, filename) or error
|
||||||
|
*/
|
||||||
|
public function add(
|
||||||
|
$name, $mimetype, $fileHandle, // Required parameters
|
||||||
|
$kategorie_kurzbz = null, $dokument_kurzbz = null, $beschreibung = null, $cis_suche = false, $schlagworte = null
|
||||||
|
)
|
||||||
|
{
|
||||||
|
// write file with content of fileHandle
|
||||||
|
$writeFileResult = $this->_writeNewFile($name, $fileHandle);
|
||||||
|
|
||||||
|
if (isError($writeFileResult)) return $writeFileResult;
|
||||||
|
|
||||||
|
if (hasData($writeFileResult))
|
||||||
|
{
|
||||||
|
$writeFileData = getData($writeFileResult);
|
||||||
|
$filename = $writeFileData->filename;
|
||||||
|
|
||||||
|
// if file written successful, insert dms
|
||||||
|
$dmsResult = $this->_ci->DmsModel->insert(
|
||||||
|
array(
|
||||||
|
'kategorie_kurzbz' => $kategorie_kurzbz,
|
||||||
|
'dokument_kurzbz' => $dokument_kurzbz
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
|
if (isError($dmsResult)) return $dmsResult;
|
||||||
|
|
||||||
|
if (hasData($dmsResult))
|
||||||
|
{
|
||||||
|
$dms_id = getData($dmsResult);
|
||||||
|
$version = 0;
|
||||||
|
|
||||||
|
// insert dms version
|
||||||
|
$dmsVersion = array(
|
||||||
|
'dms_id' => $dms_id,
|
||||||
|
'version' => $version,
|
||||||
|
'filename' => $filename,
|
||||||
|
'mimetype' => $mimetype,
|
||||||
|
'name' => $name,
|
||||||
|
'beschreibung' => $beschreibung,
|
||||||
|
'cis_suche' => $cis_suche,
|
||||||
|
'schlagworte' => $schlagworte,
|
||||||
|
'insertvon' => $this->_who,
|
||||||
|
'insertamum' => date('Y-m-d H:i:s')
|
||||||
|
);
|
||||||
|
|
||||||
|
$dmsVersionResult = $this->_ci->DmsVersionModel->insert($dmsVersion);
|
||||||
|
|
||||||
|
if (isError($dmsVersionResult)) return $dmsVersionResult;
|
||||||
|
|
||||||
|
// return dms info
|
||||||
|
$resObj = new stdClass();
|
||||||
|
$resObj->dms_id = $dms_id;
|
||||||
|
$resObj->version = $version;
|
||||||
|
$resObj->filename = $filename;
|
||||||
|
|
||||||
|
return success($resObj);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
return error("error when inserting DMS");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
return error("file could not be written");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Writes a new file with content of fileHandle, adds a new dms version (max version number + 1) for the written file
|
||||||
|
* Returns success with info of added dms version (version, filename) or error
|
||||||
|
*/
|
||||||
|
public function addNewVersion($dms_id, $fileHandle, $name = null, $mimetype = null, $beschreibung = null, $cis_suche = false, $schlagworte = null)
|
||||||
|
{
|
||||||
|
// get the latest version
|
||||||
|
$lastVersionResult = $this->getLastVersion($dms_id);
|
||||||
|
|
||||||
|
if (isError($lastVersionResult)) return $lastVersionResult;
|
||||||
|
|
||||||
|
if (hasData($lastVersionResult))
|
||||||
|
{
|
||||||
|
$lastVersion = getData($lastVersionResult);
|
||||||
|
|
||||||
|
$originalName = isset($name) ? $name : $lastVersion->name;
|
||||||
|
|
||||||
|
// write new file with content of fileHandle
|
||||||
|
$writeFileResult = $this->_writeNewFile($originalName, $fileHandle);
|
||||||
|
|
||||||
|
if (isError($writeFileResult)) return $writeFileResult;
|
||||||
|
|
||||||
|
if (hasData($writeFileResult))
|
||||||
|
{
|
||||||
|
$writeFileData = getData($writeFileResult);
|
||||||
|
$filename = $writeFileData->filename;
|
||||||
|
|
||||||
|
// insert new version
|
||||||
|
$newVersionNumber = $lastVersion->version + 1;
|
||||||
|
|
||||||
|
// if new parameters given, use them, otherwise use parameters from last version
|
||||||
|
$newVersion = array(
|
||||||
|
'dms_id' => $dms_id,
|
||||||
|
'name' => $originalName,
|
||||||
|
'filename' => $filename,
|
||||||
|
'version' => $newVersionNumber,
|
||||||
|
'mimetype' => isset($mimetype) ? $mimetype : $lastVersion->mimetype,
|
||||||
|
'beschreibung' => isset($beschreibung) ? $beschreibung : $lastVersion->beschreibung,
|
||||||
|
'cis_suche' => isset($cis_suche) ? $cis_suche : $lastVersion->cis_suche,
|
||||||
|
'schlagworte' => isset($schlagworte) ? $schlagworte : $lastVersion->schlagworte,
|
||||||
|
'insertvon' => $this->_who,
|
||||||
|
'insertamum' => date('Y-m-d H:i:s')
|
||||||
|
);
|
||||||
|
|
||||||
|
$addVersionResult = $this->_ci->DmsVersionModel->insert($newVersion);
|
||||||
|
|
||||||
|
if (isError($addVersionResult)) return $addVersionResult;
|
||||||
|
|
||||||
|
// return dms info
|
||||||
|
$resObj = new stdClass();
|
||||||
|
$resObj->version = $newVersionNumber;
|
||||||
|
$resObj->filename = $filename;
|
||||||
|
|
||||||
|
return success($resObj);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
return error("file could not be written");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
return error("last version not found");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Updates the last version (max version number) of a dms entry
|
||||||
|
* Overwrites the file associated with this version with content read from fileHandle
|
||||||
|
* Returns success with info of added dms version (version, filename) or error
|
||||||
|
*/
|
||||||
|
public function updateLastVersion($dms_id, $fileHandle, $name = null, $mimetype = null, $beschreibung = null, $cis_suche = false, $schlagworte = null)
|
||||||
|
{
|
||||||
|
// get the latest version
|
||||||
|
$lastVersionResult = $this->getLastVersion($dms_id);
|
||||||
|
|
||||||
|
if (isError($lastVersionResult)) return $lastVersionResult;
|
||||||
|
|
||||||
|
if (hasData($lastVersionResult))
|
||||||
|
{
|
||||||
|
$lastVersion = getData($lastVersionResult);
|
||||||
|
|
||||||
|
// update file in filesystem
|
||||||
|
$writeFileResult = $this->_writeFile($lastVersion->filename, $fileHandle);
|
||||||
|
|
||||||
|
if (isError($writeFileResult)) return $writeFileResult;
|
||||||
|
|
||||||
|
if (hasData($writeFileResult))
|
||||||
|
{
|
||||||
|
$writeFileData = getData($writeFileResult);
|
||||||
|
$filename = $writeFileData->filename;
|
||||||
|
|
||||||
|
// if new parameters given, use them, otherwise use parameters from last version
|
||||||
|
$newVersion = array(
|
||||||
|
'name' => isset($name) ? $name : $lastVersion->name,
|
||||||
|
'filename' => $filename,
|
||||||
|
'mimetype' => isset($mimetype) ? $mimetype : $lastVersion->mimetype,
|
||||||
|
'beschreibung' => isset($beschreibung) ? $beschreibung : $lastVersion->beschreibung,
|
||||||
|
'cis_suche' => isset($cis_suche) ? $cis_suche : $lastVersion->cis_suche,
|
||||||
|
'schlagworte' => isset($schlagworte) ? $schlagworte : $lastVersion->schlagworte,
|
||||||
|
);
|
||||||
|
|
||||||
|
// update last dms version
|
||||||
|
$addVersionResult = $this->_ci->DmsVersionModel->update(
|
||||||
|
array($dms_id, $lastVersion->version),
|
||||||
|
$newVersion
|
||||||
|
);
|
||||||
|
|
||||||
|
if (isError($addVersionResult)) return $addVersionResult;
|
||||||
|
|
||||||
|
// return dms info
|
||||||
|
$resObj = new stdClass();
|
||||||
|
$resObj->version = $lastVersion->version;
|
||||||
|
$resObj->filename = $filename;
|
||||||
|
|
||||||
|
return success($resObj);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
return error("file could not be written");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
return error("last version not found");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets dms version with highest number
|
||||||
|
* Returns success with dms data and fileHandle with file content or error
|
||||||
|
*/
|
||||||
|
public function getLastVersion($dms_id)
|
||||||
|
{
|
||||||
|
// get the latest version number
|
||||||
|
$this->_ci->DmsVersionModel->addSelect('version');
|
||||||
|
$this->_ci->DmsVersionModel->addOrder('version', 'DESC');
|
||||||
|
$this->_ci->DmsVersionModel->addOrder('insertamum', 'DESC');
|
||||||
|
$this->_ci->DmsVersionModel->addLimit(1);
|
||||||
|
$lastDmsVersionResult = $this->_ci->DmsVersionModel->loadWhere(
|
||||||
|
array('dms_id' => $dms_id)
|
||||||
|
);
|
||||||
|
|
||||||
|
if (isError($lastDmsVersionResult)) return $lastDmsVersionResult;
|
||||||
|
|
||||||
|
if (hasData($lastDmsVersionResult))
|
||||||
|
{
|
||||||
|
$lastDmsVersionData = getData($lastDmsVersionResult)[0];
|
||||||
|
$lastDmsVersion = $lastDmsVersionData->version;
|
||||||
|
|
||||||
|
// call get Version with last version number
|
||||||
|
return $this->getVersion($dms_id, $lastDmsVersion);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
return error("Dms last version not found");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets specified dms version
|
||||||
|
* Returns success with dms data and fileHandle with file content or error
|
||||||
|
*/
|
||||||
|
public function getVersion($dms_id, $version)
|
||||||
|
{
|
||||||
|
$this->_ci->DmsVersionModel->addSelect('dms_id, version, filename, mimetype, name, beschreibung, cis_suche, schlagworte');
|
||||||
|
$dmsVersionResult = $this->_ci->DmsVersionModel->loadWhere(
|
||||||
|
array(
|
||||||
|
'dms_id' => $dms_id,
|
||||||
|
'version' => $version
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
|
if (isError($dmsVersionResult)) return $dmsVersionResult;
|
||||||
|
|
||||||
|
if (hasData($dmsVersionResult))
|
||||||
|
{
|
||||||
|
$dmsVersion = getData($dmsVersionResult)[0];
|
||||||
|
|
||||||
|
// get file content as file pointer
|
||||||
|
$fileHandleResult = $this->_ci->DmsFSModel->openRead($dmsVersion->filename);
|
||||||
|
|
||||||
|
if (isError($fileHandleResult)) return $fileHandleResult;
|
||||||
|
|
||||||
|
if (hasData($fileHandleResult))
|
||||||
|
{
|
||||||
|
$fileHandle = getData($fileHandleResult);
|
||||||
|
$dmsVersion->{self::FILE_CONTENT_PROPERTY} = $fileHandle;
|
||||||
|
|
||||||
|
// close file pointer
|
||||||
|
$closeResult = $this->_ci->DmsFSModel->close($fileHandle);
|
||||||
|
|
||||||
|
if (isError($closeResult)) return $closeResult;
|
||||||
|
|
||||||
|
return success($dmsVersion);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
return error("File could not be opened");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
return error("Dms version not found");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Removes dms entry and all its versions, deletes all associated files
|
||||||
|
* Returns success with removed version numbers or error
|
||||||
|
*/
|
||||||
|
public function removeAll($dms_id)
|
||||||
|
{
|
||||||
|
$versionsRemoved = array();
|
||||||
|
|
||||||
|
$this->_ci->DmsVersionModel->addSelect('version, filename');
|
||||||
|
$allVersionsResult = $this->_ci->DmsVersionModel->loadWhere(array('dms_id' => $dms_id));
|
||||||
|
|
||||||
|
if (hasData($allVersionsResult))
|
||||||
|
{
|
||||||
|
$allVersionsData = getData($allVersionsResult);
|
||||||
|
|
||||||
|
$error = null;
|
||||||
|
|
||||||
|
// Start DB transaction to avoid deleting only part of the data
|
||||||
|
$this->_ci->db->trans_begin();
|
||||||
|
|
||||||
|
// remove all versions of the dms Id
|
||||||
|
foreach ($allVersionsData as $version)
|
||||||
|
{
|
||||||
|
$removeVersionResult = $this->removeVersion($dms_id, $version->version);
|
||||||
|
|
||||||
|
if (isError($removeVersionResult))
|
||||||
|
{
|
||||||
|
$error = $removeVersionResult;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
$versionsRemoved[] = $version; // return removed versions
|
||||||
|
}
|
||||||
|
|
||||||
|
// Transaction complete!
|
||||||
|
$this->_ci->db->trans_complete();
|
||||||
|
|
||||||
|
// Check if everything went ok during the transaction
|
||||||
|
if ($this->_ci->db->trans_status() === false || isset($error))
|
||||||
|
{
|
||||||
|
$this->_ci->db->trans_rollback();
|
||||||
|
|
||||||
|
if (isset($error))
|
||||||
|
return $error;
|
||||||
|
else
|
||||||
|
return error("Error occured when deleting, rolled back");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$this->_ci->db->trans_commit();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return success($versionsRemoved);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Removes latest version and its associated file
|
||||||
|
* Returns success with removed dms version data (dms_id, version, filename) or error
|
||||||
|
*/
|
||||||
|
public function removeLastVersion($dms_id)
|
||||||
|
{
|
||||||
|
$lastVersionNumber = 0;
|
||||||
|
// get the latest version
|
||||||
|
$lastVersionResult = $this->getLastVersion($dms_id);
|
||||||
|
|
||||||
|
if (isError($lastVersionResult)) return $lastVersionResult;
|
||||||
|
|
||||||
|
if (hasData($lastVersionResult))
|
||||||
|
{
|
||||||
|
$lastVersion = getData($lastVersionResult);
|
||||||
|
$lastVersionNumber = $lastVersion->version;
|
||||||
|
}
|
||||||
|
|
||||||
|
// call remove method for latest version
|
||||||
|
return $this->removeVersion($dms_id, $lastVersionNumber);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Removes latest version and its associated file
|
||||||
|
* Returns success with removed dms version data (dms_id, version, filename) or error
|
||||||
|
*/
|
||||||
|
public function removeVersion($dms_id, $version)
|
||||||
|
{
|
||||||
|
$removeVersionResultObj = new stdClass();
|
||||||
|
$removeVersionResultObj->dms_id = null;
|
||||||
|
$removeVersionResultObj->version = null;
|
||||||
|
$removeVersionResultObj->filename = null;
|
||||||
|
|
||||||
|
// load dms version and check how many versions there are
|
||||||
|
$db = new DB_Model();
|
||||||
|
|
||||||
|
$checkDeleteResult = $db->execReadOnlyQuery(
|
||||||
|
"SELECT filename,
|
||||||
|
(SELECT count(version)
|
||||||
|
FROM campus.tbl_dms_version dv_anzahl
|
||||||
|
WHERE dv_anzahl.dms_id = dv.dms_id) AS anzahl_versionen
|
||||||
|
FROM campus.tbl_dms_version dv
|
||||||
|
WHERE dms_id=?
|
||||||
|
AND version=?",
|
||||||
|
array($dms_id, $version)
|
||||||
|
);
|
||||||
|
|
||||||
|
if (isError($checkDeleteResult)) return $checkDeleteResult;
|
||||||
|
|
||||||
|
if (hasData($checkDeleteResult))
|
||||||
|
{
|
||||||
|
$checkDeleteData = getData($checkDeleteResult)[0];
|
||||||
|
|
||||||
|
// delete version
|
||||||
|
$deleteVersionResult = $this->_ci->DmsVersionModel->delete(array($dms_id, $version));
|
||||||
|
|
||||||
|
if (isError($deleteVersionResult)) return $deleteVersionResult;
|
||||||
|
|
||||||
|
$removeVersionResultObj->version = $version;
|
||||||
|
$removeVersionResultObj->filename = $checkDeleteData->filename;
|
||||||
|
|
||||||
|
// delete dms too if no versions left
|
||||||
|
if ($checkDeleteData->anzahl_versionen <= 1)
|
||||||
|
{
|
||||||
|
$deleteDmsResult = $this->_ci->DmsModel->delete($dms_id);
|
||||||
|
|
||||||
|
if (isError($deleteDmsResult)) return $deleteDmsResult;
|
||||||
|
|
||||||
|
$removeVersionResultObj->dms_id = $dms_id;
|
||||||
|
}
|
||||||
|
|
||||||
|
// delete file from file system
|
||||||
|
$removeResult = $this->_ci->DmsFSModel->remove($checkDeleteData->filename);
|
||||||
|
|
||||||
|
if (isError($removeResult)) return $removeResult;
|
||||||
|
}
|
||||||
|
|
||||||
|
return success($removeVersionResultObj);
|
||||||
|
}
|
||||||
|
|
||||||
|
// -----------------------------------------------------------------------------------------------------------
|
||||||
|
// Private methods
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Writes file with content of fileHandle using original document name for file extension
|
||||||
|
*/
|
||||||
|
private function _writeNewFile($originalName, $fileHandle)
|
||||||
|
{
|
||||||
|
// create unique filename, using original document name to detect file extension
|
||||||
|
$filename = $this->_getUniqueFilename($originalName);
|
||||||
|
|
||||||
|
// write the file
|
||||||
|
return $this->_writeFile($filename, $fileHandle);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Writes file with content of fileHandle
|
||||||
|
* Returns number of bytes written and filename
|
||||||
|
*/
|
||||||
|
private function _writeFile($filename, $fileHandle)
|
||||||
|
{
|
||||||
|
// file content provided by fileHandle
|
||||||
|
$fileContent = '';
|
||||||
|
|
||||||
|
$readBlockResult = success();
|
||||||
|
|
||||||
|
// While the end of the file is not reached and the read does not fail
|
||||||
|
while (!feof($fileHandle) && isSuccess($readBlockResult = $this->_ci->DmsFSModel->readBlock($fileHandle)))
|
||||||
|
{
|
||||||
|
// Concatenate the content of the file
|
||||||
|
$fileContent .= getData($readBlockResult);
|
||||||
|
}
|
||||||
|
|
||||||
|
// If an error occurred while reading then return it
|
||||||
|
if (isError($readBlockResult)) return $readBlockResult;
|
||||||
|
|
||||||
|
// open file for writing
|
||||||
|
$openFileResult = $this->_ci->DmsFSModel->openReadWrite($filename);
|
||||||
|
|
||||||
|
if (isError($openFileResult)) return $openFileResult;
|
||||||
|
|
||||||
|
if (!hasData($openFileResult)) return error("File could not be opened");
|
||||||
|
|
||||||
|
$newFileHandle = getData($openFileResult);
|
||||||
|
|
||||||
|
// write file
|
||||||
|
$writeFileResult = $this->_ci->DmsFSModel->write($newFileHandle, $fileContent);
|
||||||
|
|
||||||
|
if (isError($writeFileResult)) return $writeFileResult;
|
||||||
|
|
||||||
|
// return number of bytes written and filename
|
||||||
|
$resObj = new stdClass();
|
||||||
|
$resObj->bytesWritten = 0;
|
||||||
|
$resObj->filename = '';
|
||||||
|
|
||||||
|
if (hasData($writeFileResult))
|
||||||
|
{
|
||||||
|
$resObj->bytesWritten = getData($writeFileResult);
|
||||||
|
$resObj->filename = $filename;
|
||||||
|
}
|
||||||
|
|
||||||
|
// close handle
|
||||||
|
$closeResult = $this->_ci->DmsFSModel->close($newFileHandle, $fileContent);
|
||||||
|
|
||||||
|
if (isError($closeResult)) return $closeResult;
|
||||||
|
|
||||||
|
return success($resObj);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Generates unique filename, appends file extension from document name
|
||||||
|
* Returns the filename string
|
||||||
|
*/
|
||||||
|
private function _getUniqueFilename($dokname)
|
||||||
|
{
|
||||||
|
// create unique id
|
||||||
|
$uniqueFilename = uniqid();
|
||||||
|
|
||||||
|
// getting extension of file from document name
|
||||||
|
$fileExtension = pathinfo($dokname, PATHINFO_EXTENSION);
|
||||||
|
|
||||||
|
// if file extension found, append it
|
||||||
|
if (!isEmptyString($fileExtension))
|
||||||
|
$uniqueFilename .= '.'.$fileExtension;
|
||||||
|
|
||||||
|
return $uniqueFilename;
|
||||||
|
}
|
||||||
|
|
||||||
|
// -----------------------------------------------------------------------------------------------------------
|
||||||
|
// Deprecated methods, not to be used
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Load a DMS Document.
|
* Load a DMS Document.
|
||||||
@@ -33,19 +540,20 @@ class DmsLib extends FHC_Controller
|
|||||||
{
|
{
|
||||||
if (is_numeric($dms_id))
|
if (is_numeric($dms_id))
|
||||||
{
|
{
|
||||||
$this->ci->DmsModel->addJoin('campus.tbl_dms_version', 'dms_id');
|
$this->_ci->DmsModel->addJoin('campus.tbl_dms_version', 'dms_id');
|
||||||
$this->ci->DmsModel->addOrder('version', 'DESC');
|
$this->_ci->DmsModel->addOrder('version', 'DESC');
|
||||||
$this->ci->DmsModel->addLimit(1);
|
$this->_ci->DmsModel->addLimit(1);
|
||||||
|
|
||||||
if (!is_numeric($version))
|
if (!is_numeric($version))
|
||||||
{
|
{
|
||||||
return $this->ci->DmsModel->load($dms_id);
|
return $this->_ci->DmsModel->load($dms_id);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
return $this->ci->DmsModel->loadWhere(array('dms_id' => $dms_id, 'version' => $version));
|
return $this->_ci->DmsModel->loadWhere(array('dms_id' => $dms_id, 'version' => $version));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return error('The parameter DMS ID must be a number');
|
return error('The parameter DMS ID must be a number');
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -57,34 +565,30 @@ class DmsLib extends FHC_Controller
|
|||||||
*/
|
*/
|
||||||
public function read($dms_id, $version = null)
|
public function read($dms_id, $version = null)
|
||||||
{
|
{
|
||||||
$result = null;
|
$result = error('Wrong dms_id parameter');
|
||||||
|
|
||||||
if (isset($dms_id))
|
if (isset($dms_id))
|
||||||
{
|
{
|
||||||
$this->ci->DmsModel->addJoin('campus.tbl_dms_version', 'dms_id');
|
$this->_ci->DmsModel->addJoin('campus.tbl_dms_version', 'dms_id');
|
||||||
$this->ci->DmsModel->addOrder('version', 'DESC');
|
$this->_ci->DmsModel->addOrder('version', 'DESC');
|
||||||
$this->ci->DmsModel->addLimit(1);
|
$this->_ci->DmsModel->addLimit(1);
|
||||||
|
|
||||||
if (!isset($version))
|
if (!isset($version))
|
||||||
{
|
{
|
||||||
$result = $this->ci->DmsModel->load($dms_id);
|
$result = $this->_ci->DmsModel->load($dms_id);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$result = $this->ci->DmsModel->loadWhere(array('dms_id' => $dms_id, 'version' => $version));
|
$result = $this->_ci->DmsModel->loadWhere(array('dms_id' => $dms_id, 'version' => $version));
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
if (hasData($result))
|
// If a dms has been found
|
||||||
{
|
if (hasData($result))
|
||||||
$resultFS = $this->ci->DmsFSModel->read($result->retval[0]->filename);
|
|
||||||
if (isSuccess($resultFS))
|
|
||||||
{
|
{
|
||||||
$result->retval[0]->{DmsLib::FILE_CONTENT_PROPERTY} = $resultFS->retval;
|
$resultFS = $this->_ci->DmsFSModel->readBase64(getData($result)[0]->filename);
|
||||||
}
|
if (isError($resultFS)) return $resultFS; // if an error occurred return it
|
||||||
else
|
|
||||||
{
|
$result->retval[0]->{self::FILE_CONTENT_PROPERTY} = getData($resultFS);
|
||||||
$result = $resultFS;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -101,22 +605,16 @@ class DmsLib extends FHC_Controller
|
|||||||
*/
|
*/
|
||||||
public function getAktenAcceptedDms($person_id, $dokument_kurzbz = null, $no_file = null)
|
public function getAktenAcceptedDms($person_id, $dokument_kurzbz = null, $no_file = null)
|
||||||
{
|
{
|
||||||
$result = $this->ci->AkteModel->getAktenAcceptedDms($person_id, $dokument_kurzbz);
|
$result = $this->_ci->AkteModel->getAktenAcceptedDms($person_id, $dokument_kurzbz);
|
||||||
|
|
||||||
if (hasData($result) && $no_file == null)
|
if (hasData($result) && $no_file == null)
|
||||||
{
|
{
|
||||||
$cnt = count($result->retval);
|
for ($i = 0; $i < count(getData($result)); $i++)
|
||||||
for ($i = 0; $i < $cnt; $i++)
|
|
||||||
{
|
{
|
||||||
$resultFS = $this->ci->DmsFSModel->read($result->retval[$i]->filename);
|
$resultFS = $this->_ci->DmsFSModel->readBase64(getData($result)[$i]->filename);
|
||||||
if (isSuccess($resultFS))
|
if (isError($resultFS)) return $resultFS; // if an error occurred return it
|
||||||
{
|
|
||||||
$result->retval[$i]->{DmsLib::FILE_CONTENT_PROPERTY} = $resultFS->retval;
|
$result->retval[$i]->{self::FILE_CONTENT_PROPERTY} = getData($resultFS);
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$result = $resultFS;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -135,30 +633,31 @@ class DmsLib extends FHC_Controller
|
|||||||
// Init upload configs
|
// Init upload configs
|
||||||
$this->_loadUploadLibrary($allowed_types);
|
$this->_loadUploadLibrary($allowed_types);
|
||||||
|
|
||||||
if (!$this->ci->upload->do_upload($field_name))
|
if (!$this->_ci->upload->do_upload($field_name))
|
||||||
{
|
{
|
||||||
return error($this->ci->upload->display_errors());
|
return error($this->_ci->upload->display_errors());
|
||||||
}
|
}
|
||||||
|
|
||||||
$upload_data = $this->ci->upload->data(); // data about the uploaded file
|
$upload_data = $this->_ci->upload->data(); // data about the uploaded file
|
||||||
$filename = $upload_data['file_name'];
|
|
||||||
|
|
||||||
// Insert to DMS table
|
// Insert to DMS table
|
||||||
if (!$result = $this->ci->DmsModel->insert($this->ci->DmsModel->filterFields($dms)))
|
$insDmsResult = $this->_ci->DmsModel->insert($this->_ci->DmsModel->filterFields($dms));
|
||||||
{
|
if (isError($insDmsResult)) return $insDmsResult;
|
||||||
return error('Failed inserting to DMS');
|
|
||||||
}
|
$upload_data['dms_id'] = getData($insDmsResult);
|
||||||
$upload_data['dms_id'] = $result->retval;
|
|
||||||
|
|
||||||
// Insert DMS version
|
// Insert DMS version
|
||||||
if (!$result = $this->ci->DmsVersionModel->insert(
|
$insVersionResult = $this->_ci->DmsVersionModel->insert(
|
||||||
$this->ci->DmsVersionModel->filterFields($dms, $result->retval, $filename)))
|
$this->_ci->DmsVersionModel->filterFields(
|
||||||
{
|
$dms,
|
||||||
return error('Failed inserting DMS version');
|
$upload_data['dms_id'],
|
||||||
}
|
$upload_data['file_name']
|
||||||
|
)
|
||||||
|
);
|
||||||
|
if (isError($insVersionResult)) return $insVersionResult;
|
||||||
|
|
||||||
// return result of uploaded data
|
// Return result of uploaded data
|
||||||
return success($upload_data); // data about the uploaded file
|
return success($upload_data);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -171,36 +670,29 @@ class DmsLib extends FHC_Controller
|
|||||||
*/
|
*/
|
||||||
public function download($dms_id, $filename = null, $disposition = 'inline')
|
public function download($dms_id, $filename = null, $disposition = 'inline')
|
||||||
{
|
{
|
||||||
$result = $this->getFileInfo($dms_id);
|
// Retrieves info about the given dms
|
||||||
|
$fileInfoResult = $this->getFileInfo($dms_id);
|
||||||
if (isError($result))
|
if (isError($fileInfoResult)) return error(getError($fileInfoResult));
|
||||||
|
|
||||||
|
// If data have been found
|
||||||
|
if (hasData($fileInfoResult))
|
||||||
{
|
{
|
||||||
return error(getError($result));
|
$fileObj = getData($fileInfoResult);
|
||||||
|
|
||||||
|
// Change filename, if filename is provided
|
||||||
|
if (!isEmptyString($filename)) $fileObj->name = $filename;
|
||||||
|
|
||||||
|
// Add file disposition if disposition has a valid value
|
||||||
|
if ($disposition == 'attachment' || $disposition == 'inline')
|
||||||
|
{
|
||||||
|
$fileObj->disposition = $disposition;
|
||||||
|
}
|
||||||
|
|
||||||
|
return success($fileObj);
|
||||||
}
|
}
|
||||||
|
|
||||||
$fileObj = getData($result);
|
// If no data have been found then return an empty success
|
||||||
|
return success();
|
||||||
// Change filename, if filename is provided
|
|
||||||
if (is_string($filename))
|
|
||||||
{
|
|
||||||
$fileObj->name = $filename;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Add file disposition
|
|
||||||
if ($disposition == 'attachment')
|
|
||||||
{
|
|
||||||
$fileObj->disposition = 'attachment';
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$fileObj->disposition = 'inline';
|
|
||||||
}
|
|
||||||
|
|
||||||
// Output file
|
|
||||||
if(!$this->outputFile($fileObj))
|
|
||||||
{
|
|
||||||
return error('Error on file output');
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -212,28 +704,28 @@ class DmsLib extends FHC_Controller
|
|||||||
*/
|
*/
|
||||||
public function getFileInfo($dms_id, $version = null)
|
public function getFileInfo($dms_id, $version = null)
|
||||||
{
|
{
|
||||||
if (!is_numeric($dms_id))
|
// Checks the dms_id parameter
|
||||||
{
|
if (!is_numeric($dms_id)) return error('Wrong parameter');
|
||||||
return error('Wrong parameter');
|
|
||||||
}
|
|
||||||
|
|
||||||
// Load file
|
// Load DMS from database
|
||||||
$result = $this->load($dms_id, $version);
|
$result = $this->load($dms_id, $version);
|
||||||
|
if (isError($result)) return error(getError($result));
|
||||||
|
|
||||||
if (isError($result))
|
// If data have been found
|
||||||
|
if (hasData($result))
|
||||||
{
|
{
|
||||||
return error(getError($result));
|
// Store file information in fileObj
|
||||||
|
$fileObj = new stdClass();
|
||||||
|
$fileObj->filename = getData($result)[0]->filename;
|
||||||
|
$fileObj->file = DMS_PATH.getData($result)[0]->filename;
|
||||||
|
$fileObj->name = DMS_PATH.getData($result)[0]->name; // original user filename
|
||||||
|
$fileObj->mimetype = getData($result)[0]->mimetype;
|
||||||
|
|
||||||
|
return success($fileObj);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Store file information in fileObj
|
// If no data have been found return an empty success
|
||||||
$fileObj = new StdClass();
|
return success();
|
||||||
$fileObj->filename = getData($result)[0]->filename;
|
|
||||||
$fileObj->file = DMS_PATH. getData($result)[0]->filename;
|
|
||||||
$fileObj->name = DMS_PATH. getData($result)[0]->name; // original users filename
|
|
||||||
$fileObj->mimetype = DMS_PATH. getData($result)[0]->mimetype;
|
|
||||||
|
|
||||||
return success($fileObj);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -253,20 +745,20 @@ class DmsLib extends FHC_Controller
|
|||||||
$result = $this->_saveFileOnInsert($dms);
|
$result = $this->_saveFileOnInsert($dms);
|
||||||
if (isSuccess($result))
|
if (isSuccess($result))
|
||||||
{
|
{
|
||||||
$filename = $result->retval;
|
$filename = getData($result);
|
||||||
if (isset($dms['dms_id']) && $dms['dms_id'] != '')
|
if (isset($dms['dms_id']) && $dms['dms_id'] != '')
|
||||||
{
|
{
|
||||||
$result = $this->ci->DmsVersionModel->insert(
|
$result = $this->_ci->DmsVersionModel->insert(
|
||||||
$this->ci->DmsVersionModel->filterFields($dms, $dms['dms_id'], $filename)
|
$this->_ci->DmsVersionModel->filterFields($dms, $dms['dms_id'], $filename)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$result = $this->ci->DmsModel->insert($this->ci->DmsModel->filterFields($dms));
|
$result = $this->_ci->DmsModel->insert($this->_ci->DmsModel->filterFields($dms));
|
||||||
if (isSuccess($result))
|
if (isSuccess($result))
|
||||||
{
|
{
|
||||||
$result = $this->ci->DmsVersionModel->insert(
|
$result = $this->_ci->DmsVersionModel->insert(
|
||||||
$this->ci->DmsVersionModel->filterFields($dms, $result->retval, $filename)
|
$this->_ci->DmsVersionModel->filterFields($dms, getData($result), $filename)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -277,15 +769,15 @@ class DmsLib extends FHC_Controller
|
|||||||
$result = $this->_saveFileOnUpdate($dms);
|
$result = $this->_saveFileOnUpdate($dms);
|
||||||
if (isSuccess($result))
|
if (isSuccess($result))
|
||||||
{
|
{
|
||||||
$result = $this->ci->DmsModel->update($dms['dms_id'], $this->ci->DmsModel->filterFields($dms));
|
$result = $this->_ci->DmsModel->update($dms['dms_id'], $this->_ci->DmsModel->filterFields($dms));
|
||||||
if (isSuccess($result))
|
if (isSuccess($result))
|
||||||
{
|
{
|
||||||
$result = $this->ci->DmsVersionModel->update(
|
$result = $this->_ci->DmsVersionModel->update(
|
||||||
array(
|
array(
|
||||||
$dms['dms_id'],
|
$dms['dms_id'],
|
||||||
$dms['version']
|
$dms['version']
|
||||||
),
|
),
|
||||||
$this->ci->DmsVersionModel->filterFields($dms)
|
$this->_ci->DmsVersionModel->filterFields($dms)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -308,56 +800,54 @@ class DmsLib extends FHC_Controller
|
|||||||
if (is_numeric($person_id) && is_numeric($dms_id))
|
if (is_numeric($person_id) && is_numeric($dms_id))
|
||||||
{
|
{
|
||||||
// Start DB transaction
|
// Start DB transaction
|
||||||
$this->ci->db->trans_start(false);
|
$this->_ci->db->trans_start(false);
|
||||||
|
|
||||||
// Get akte_id from table tbl_akte
|
// Get akte_id from table tbl_akte
|
||||||
$result = $this->ci->AkteModel->loadWhere(array('person_id' => $person_id, 'dms_id' => $dms_id));
|
$result = $this->_ci->AkteModel->loadWhere(array('person_id' => $person_id, 'dms_id' => $dms_id));
|
||||||
if (isSuccess($result))
|
if (isSuccess($result))
|
||||||
{
|
{
|
||||||
// Delete all entries in tbl_akte
|
// Delete all entries in tbl_akte
|
||||||
$cnt = count($result->retval);
|
for ($i = 0; $i < count(getData($result)); $i++)
|
||||||
for ($i = 0; $i < $cnt; $i++)
|
|
||||||
{
|
{
|
||||||
$this->ci->AkteModel->delete($result->retval[$i]->akte_id);
|
$this->_ci->AkteModel->delete(getData($result)[$i]->akte_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get all filenames related to this dms
|
// Get all filenames related to this dms
|
||||||
$resultFileNames = $this->ci->DmsVersionModel->loadWhere(array('dms_id' => $dms_id));
|
$resultFileNames = $this->_ci->DmsVersionModel->loadWhere(array('dms_id' => $dms_id));
|
||||||
if (isSuccess($resultFileNames))
|
if (isSuccess($resultFileNames))
|
||||||
{
|
{
|
||||||
// Delete from tbl_dms_version
|
// Delete from tbl_dms_version
|
||||||
$result = $this->ci->DmsVersionModel->delete(array('dms_id' => $dms_id));
|
$result = $this->_ci->DmsVersionModel->delete(array('dms_id' => $dms_id));
|
||||||
if (isSuccess($result))
|
if (isSuccess($result))
|
||||||
{
|
{
|
||||||
// Delete from tbl_dms
|
// Delete from tbl_dms
|
||||||
$result = $this->ci->DmsModel->delete($dms_id);
|
$result = $this->_ci->DmsModel->delete($dms_id);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Transaction complete!
|
// Transaction complete!
|
||||||
$this->ci->db->trans_complete();
|
$this->_ci->db->trans_complete();
|
||||||
|
|
||||||
// Check if everything went ok during the transaction
|
// Check if everything went ok during the transaction
|
||||||
if ($this->ci->db->trans_status() === false || isError($result))
|
if ($this->_ci->db->trans_status() === false || isError($result))
|
||||||
{
|
{
|
||||||
$this->ci->db->trans_rollback();
|
$this->_ci->db->trans_rollback();
|
||||||
$result = error('An error occurred while performing a delete operation', EXIT_ERROR);
|
$result = error('An error occurred while performing a delete operation', EXIT_ERROR);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$this->ci->db->trans_commit();
|
$this->_ci->db->trans_commit();
|
||||||
$result = success('Dms successfully removed from DB');
|
$result = success('Dms successfully removed from DB');
|
||||||
}
|
}
|
||||||
|
|
||||||
// If everything is ok
|
// If everything is ok
|
||||||
if (isSuccess($result))
|
if (isSuccess($result))
|
||||||
{
|
{
|
||||||
$cnt = count($resultFileNames->retval);
|
|
||||||
// Remove all files related to this person and dms
|
// Remove all files related to this person and dms
|
||||||
for ($i = 0; $i < $cnt; $i++)
|
for ($i = 0; $i < count(getData($resultFileNames)); $i++)
|
||||||
{
|
{
|
||||||
$this->ci->DmsFSModel->remove($resultFileNames->retval[$i]->filename);
|
$this->_ci->DmsFSModel->removeBase64(getData($resultFileNames)[$i]->filename);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -376,19 +866,19 @@ class DmsLib extends FHC_Controller
|
|||||||
*/
|
*/
|
||||||
public function getAkteContent($akte_id)
|
public function getAkteContent($akte_id)
|
||||||
{
|
{
|
||||||
$akte = $this->ci->AkteModel->load($akte_id);
|
$akte = $this->_ci->AkteModel->load($akte_id);
|
||||||
if (hasData($akte))
|
if (hasData($akte))
|
||||||
{
|
{
|
||||||
if ($akte->retval[0]->inhalt != '')
|
if (getData($akte)[0]->inhalt != '')
|
||||||
{
|
{
|
||||||
return success(base64_decode($akte->retval[0]->inhalt));
|
return success(base64_decode(getData($akte)[0]->inhalt));
|
||||||
}
|
}
|
||||||
elseif ($akte->retval[0]->dms_id != '')
|
elseif (getData($akte)[0]->dms_id != '')
|
||||||
{
|
{
|
||||||
$dmscontent = $this->read($akte->retval[0]->dms_id);
|
$dmscontent = $this->read(getData($akte)[0]->dms_id);
|
||||||
if (isSuccess($dmscontent))
|
if (isSuccess($dmscontent))
|
||||||
{
|
{
|
||||||
return success(base64_decode($dmscontent->retval[0]->file_content));
|
return success(base64_decode(getData($dmscontent)[0]->file_content));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -415,10 +905,10 @@ class DmsLib extends FHC_Controller
|
|||||||
{
|
{
|
||||||
$filename = uniqid().'.'.pathinfo($dms['name'], PATHINFO_EXTENSION);
|
$filename = uniqid().'.'.pathinfo($dms['name'], PATHINFO_EXTENSION);
|
||||||
|
|
||||||
$result = $this->ci->DmsFSModel->write($filename, $dms['file_content']);
|
$result = $this->_ci->DmsFSModel->writeBase64($filename, $dms['file_content']);
|
||||||
if (isSuccess($result))
|
if (isSuccess($result))
|
||||||
{
|
{
|
||||||
$result->retval = $filename;
|
$result = success($filename);
|
||||||
}
|
}
|
||||||
|
|
||||||
return $result;
|
return $result;
|
||||||
@@ -439,7 +929,7 @@ class DmsLib extends FHC_Controller
|
|||||||
|
|
||||||
if (hasData($result))
|
if (hasData($result))
|
||||||
{
|
{
|
||||||
$result = $this->ci->DmsFSModel->write($result->retval[0]->filename, $dms['file_content']);
|
$result = $this->_ci->DmsFSModel->writeBase64(getData($result)[0]->filename, $dms['file_content']);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -451,12 +941,14 @@ class DmsLib extends FHC_Controller
|
|||||||
*/
|
*/
|
||||||
private function _loadUploadLibrary($allowed_types)
|
private function _loadUploadLibrary($allowed_types)
|
||||||
{
|
{
|
||||||
$config['upload_path'] = $this->UPLOAD_PATH;
|
$config = array();
|
||||||
$config['allowed_types'] = implode('|', $allowed_types);
|
$config['upload_path'] = DMS_PATH;
|
||||||
$config['overwrite'] = true;
|
$config['allowed_types'] = implode('|', $allowed_types);
|
||||||
$config['file_name'] = uniqid().'.pdf';
|
$config['overwrite'] = true;
|
||||||
|
$config['file_name'] = uniqid().'.pdf';
|
||||||
|
|
||||||
$this->ci->load->library('upload', $config);
|
$this->_ci->load->library('upload', $config);
|
||||||
$this->ci->upload->initialize($config);
|
$this->_ci->upload->initialize($config);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,142 +0,0 @@
|
|||||||
<?php
|
|
||||||
/***
|
|
||||||
* FH-Complete
|
|
||||||
*
|
|
||||||
* @package FHC-API
|
|
||||||
* @author FHC-Team
|
|
||||||
* @copyright Copyright (c) 2016, fhcomplete.org
|
|
||||||
* @license GPLv3
|
|
||||||
* @link http://fhcomplete.org
|
|
||||||
* @since Version 1.0
|
|
||||||
* @filesource
|
|
||||||
*/
|
|
||||||
|
|
||||||
if (!defined('BASEPATH')) exit('No direct script access allowed');
|
|
||||||
|
|
||||||
class FilesystemLib
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
* checkParameters
|
|
||||||
*/
|
|
||||||
private function checkParameters($filepath, $filename)
|
|
||||||
{
|
|
||||||
if (isset($filepath) && isset($filename) &&
|
|
||||||
$filepath != '' && $filename != '')
|
|
||||||
{
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* read
|
|
||||||
*/
|
|
||||||
public function read($filepath, $filename)
|
|
||||||
{
|
|
||||||
$result = null;
|
|
||||||
|
|
||||||
if ($this->checkParameters($filepath, $filename))
|
|
||||||
{
|
|
||||||
$resource = $filepath.DIRECTORY_SEPARATOR.$filename;
|
|
||||||
if (file_exists($resource) && $fileHandle = fopen($resource, 'r'))
|
|
||||||
{
|
|
||||||
$result = '';
|
|
||||||
while (!feof($fileHandle))
|
|
||||||
{
|
|
||||||
$result .= fread($fileHandle, 8192);
|
|
||||||
}
|
|
||||||
fclose($fileHandle);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return $result;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* write
|
|
||||||
*/
|
|
||||||
public function write($filepath, $filename, $content)
|
|
||||||
{
|
|
||||||
$result = null;
|
|
||||||
|
|
||||||
if ($this->checkParameters($filepath, $filename) && isset($content))
|
|
||||||
{
|
|
||||||
$resource = $filepath.DIRECTORY_SEPARATOR.$filename;
|
|
||||||
if (is_writable($filepath) && $fileHandle = fopen($resource, 'w'))
|
|
||||||
{
|
|
||||||
if (fwrite($fileHandle, $content) !== false)
|
|
||||||
{
|
|
||||||
$result = true;
|
|
||||||
}
|
|
||||||
fclose($fileHandle);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return $result;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* append
|
|
||||||
*/
|
|
||||||
public function append($filepath, $filename, $content)
|
|
||||||
{
|
|
||||||
$result = null;
|
|
||||||
|
|
||||||
if ($this->checkParameters($filepath, $filename) && isset($content))
|
|
||||||
{
|
|
||||||
$resource = $filepath.DIRECTORY_SEPARATOR.$filename;
|
|
||||||
if (is_writable($resource) && $fileHandle = fopen($resource, 'a'))
|
|
||||||
{
|
|
||||||
if (fwrite($fileHandle, $content) !== false)
|
|
||||||
{
|
|
||||||
$result = true;
|
|
||||||
}
|
|
||||||
fclose($fileHandle);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return $result;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* remove
|
|
||||||
*/
|
|
||||||
public function remove($filepath, $filename)
|
|
||||||
{
|
|
||||||
$result = null;
|
|
||||||
|
|
||||||
if ($this->checkParameters($filepath, $filename))
|
|
||||||
{
|
|
||||||
if (is_writable($filepath))
|
|
||||||
{
|
|
||||||
$resource = $filepath.DIRECTORY_SEPARATOR.$filename;
|
|
||||||
$result = unlink($resource);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return $result;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* rename
|
|
||||||
*/
|
|
||||||
public function rename($filepath, $filename, $newFilepath, $newFilename)
|
|
||||||
{
|
|
||||||
$result = null;
|
|
||||||
|
|
||||||
if ($this->checkParameters($filepath, $filename) && $this->checkParameters($newFilepath, $newFilename))
|
|
||||||
{
|
|
||||||
$resource = $filepath.DIRECTORY_SEPARATOR.$filename;
|
|
||||||
if (is_writable($filepath) && is_writable($newFilepath) && file_exists($resource))
|
|
||||||
{
|
|
||||||
$destination = $newFilepath.DIRECTORY_SEPARATOR.$newFilename;
|
|
||||||
$result = rename($resource, $destination);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return $result;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -135,7 +135,7 @@ class Vertragvertragsstatus_model extends DB_Model
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Get all contracts, where the status had been set to 'bestellt' on given date
|
* Get all contracts, where the status had been set to 'bestellt' on given date
|
||||||
* @param string $string_date e.g. '01.11.2019' or special Date/Time inputs like 'YESTERDAY', 'TODAY', 'NOW'
|
* @param string $string_date e.g. 'YYYY-MM-DD' or special Date/Time inputs like 'YESTERDAY', 'TODAY', 'NOW'
|
||||||
* @param bool $further_processed If true, ALL ordered contracts of that day are retrieved, even if they were
|
* @param bool $further_processed If true, ALL ordered contracts of that day are retrieved, even if they were
|
||||||
* were ALSO approved/accepted/cancelled (further processed) on that same day.
|
* were ALSO approved/accepted/cancelled (further processed) on that same day.
|
||||||
* @return array
|
* @return array
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ class DmsFS_model extends FS_Model
|
|||||||
*/
|
*/
|
||||||
public function __construct()
|
public function __construct()
|
||||||
{
|
{
|
||||||
parent::__construct();
|
parent::__construct(DMS_PATH);
|
||||||
$this->filepath = DMS_PATH;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,16 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Model for writing temporary files
|
||||||
|
*/
|
||||||
|
class TempFS_model extends FS_Model
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Constructor
|
||||||
|
*/
|
||||||
|
public function __construct()
|
||||||
|
{
|
||||||
|
// default temp directory of server is used
|
||||||
|
parent::__construct(sys_get_temp_dir());
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -309,4 +309,50 @@ class Lehrveranstaltung_model extends DB_Model
|
|||||||
|
|
||||||
return $this->execQuery($query, array($uid, $studiensemester_kurzbz, $lehrveranstaltung_id));
|
return $this->execQuery($query, array($uid, $studiensemester_kurzbz, $lehrveranstaltung_id));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sucht nach LV Templates und gibt Id und Label ("bezeichnung [kurzbz]") aus
|
||||||
|
* Diese funktion ist für autocomplete gedacht
|
||||||
|
*
|
||||||
|
* @param string $filter Suchfilter
|
||||||
|
* @return \stdClass A return object
|
||||||
|
*/
|
||||||
|
public function loadTemplates($filter)
|
||||||
|
{
|
||||||
|
$filter = strtolower($filter);
|
||||||
|
$qry = "SELECT
|
||||||
|
tbl_lehrveranstaltung.lehrveranstaltung_id, tbl_lehrveranstaltung.bezeichnung, tbl_lehrveranstaltung.kurzbz
|
||||||
|
FROM
|
||||||
|
lehre.tbl_lehrveranstaltung
|
||||||
|
WHERE
|
||||||
|
tbl_lehrveranstaltung.lehrtyp_kurzbz = 'tpl' AND (
|
||||||
|
CAST(tbl_lehrveranstaltung.lehrveranstaltung_id AS TEXT) LIKE '%".$this->db_escape($filter)."%' OR
|
||||||
|
LOWER(tbl_lehrveranstaltung.bezeichnung) LIKE '%".$this->db_escape($filter). "%' OR
|
||||||
|
LOWER(tbl_lehrveranstaltung.kurzbz) LIKE '%".$this->db_escape($filter). "%'
|
||||||
|
)
|
||||||
|
";
|
||||||
|
return $this->execQuery($qry);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Lädt Template und gibt Id und Label ("bezeichnung [kurzbz]") zurück
|
||||||
|
* Diese funktion ist für autocomplete gedacht
|
||||||
|
*
|
||||||
|
* @param string $name
|
||||||
|
* @return \stdClass A return object
|
||||||
|
*/
|
||||||
|
public function loadTemplateByName($name)
|
||||||
|
{
|
||||||
|
$qry = "SELECT
|
||||||
|
tbl_lehrveranstaltung.lehrveranstaltung_id as id, CONCAT(tbl_lehrveranstaltung.bezeichnung, ' [', tbl_lehrveranstaltung.kurzbz, ']') as label
|
||||||
|
FROM
|
||||||
|
lehre.tbl_lehrveranstaltung
|
||||||
|
WHERE
|
||||||
|
tbl_lehrveranstaltung.lehrtyp_kurzbz = 'tpl' AND (
|
||||||
|
CAST(tbl_lehrveranstaltung.lehrveranstaltung_id AS TEXT) = '".($name ? $this->db_escape($name) : 0)."' OR tbl_lehrveranstaltung.bezeichnung = '".$this->db_escape($name). "' OR tbl_lehrveranstaltung.kurzbz = '".$this->db_escape($name). "'
|
||||||
|
)
|
||||||
|
";
|
||||||
|
return $this->execQuery($qry);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -283,8 +283,8 @@ class Person_model extends DB_Model
|
|||||||
SELECT p2.person_id
|
SELECT p2.person_id
|
||||||
FROM public.tbl_person p
|
FROM public.tbl_person p
|
||||||
JOIN public.tbl_person p2
|
JOIN public.tbl_person p2
|
||||||
ON p.vorname = p2.vorname
|
ON lower(p.vorname) = lower(p2.vorname)
|
||||||
AND p.nachname = p2.nachname
|
AND lower(p.nachname) = lower(p2.nachname)
|
||||||
AND p.gebdatum = p2.gebdatum
|
AND p.gebdatum = p2.gebdatum
|
||||||
AND p.person_id = ?
|
AND p.person_id = ?
|
||||||
)
|
)
|
||||||
@@ -310,8 +310,8 @@ class Person_model extends DB_Model
|
|||||||
SELECT p2.person_id
|
SELECT p2.person_id
|
||||||
FROM public.tbl_person p
|
FROM public.tbl_person p
|
||||||
JOIN public.tbl_person p2
|
JOIN public.tbl_person p2
|
||||||
ON p.vorname = p2.vorname
|
ON lower(p.vorname) = lower(p2.vorname)
|
||||||
AND p.nachname = p2.nachname
|
AND lower(p.nachname) = lower(p2.nachname)
|
||||||
AND p.gebdatum = p2.gebdatum
|
AND p.gebdatum = p2.gebdatum
|
||||||
AND p.person_id = ?
|
AND p.person_id = ?
|
||||||
)
|
)
|
||||||
@@ -321,8 +321,18 @@ class Person_model extends DB_Model
|
|||||||
JOIN public.tbl_status USING(status_kurzbz)
|
JOIN public.tbl_status USING(status_kurzbz)
|
||||||
WHERE status_kurzbz = 'Abbrecher'
|
WHERE status_kurzbz = 'Abbrecher'
|
||||||
)
|
)
|
||||||
";
|
|
||||||
|
|
||||||
return $this->execQuery($qry, array($person_id, $person_id));
|
UNION
|
||||||
|
|
||||||
|
SELECT p2.person_id
|
||||||
|
FROM tbl_person p1
|
||||||
|
INNER JOIN (
|
||||||
|
SELECT vorname, nachname, gebdatum, person_id
|
||||||
|
FROM tbl_person
|
||||||
|
) p2
|
||||||
|
ON (lower(p1.vorname) = lower(p2.vorname) AND lower(p1.nachname) = lower(p2.nachname) AND p1.gebdatum = p2.gebdatum)
|
||||||
|
WHERE p1.person_id != p2.person_id AND (p1.person_id = ?)";
|
||||||
|
|
||||||
|
return $this->execQuery($qry, array($person_id, $person_id, $person_id));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ class Benutzerrolle_model extends DB_Model
|
|||||||
* @param null $oe_kurzbz
|
* @param null $oe_kurzbz
|
||||||
* @return array
|
* @return array
|
||||||
*/
|
*/
|
||||||
public function getBenutzerByBerechtigung($berechtigung_kurzbz, $oe_kurzbz = null)
|
public function getBenutzerByBerechtigung($berechtigung_kurzbz, $oe_kurzbz = null, $art = null)
|
||||||
{
|
{
|
||||||
$params = array();
|
$params = array();
|
||||||
$query = '
|
$query = '
|
||||||
@@ -62,6 +62,12 @@ class Benutzerrolle_model extends DB_Model
|
|||||||
$params[] = $oe_kurzbz;
|
$params[] = $oe_kurzbz;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!is_null($art))
|
||||||
|
{
|
||||||
|
$query .= ' AND art = ?';
|
||||||
|
$params[] = $art;
|
||||||
|
}
|
||||||
|
|
||||||
return $this->execQuery($query, $params);
|
return $this->execQuery($query, $params);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,58 @@
|
|||||||
|
<?php
|
||||||
|
class Fehlerzustaendigkeiten_model extends DB_Model
|
||||||
|
{
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Constructor
|
||||||
|
*/
|
||||||
|
public function __construct()
|
||||||
|
{
|
||||||
|
parent::__construct();
|
||||||
|
$this->dbTable = 'system.tbl_fehler_zustaendigkeiten';
|
||||||
|
$this->pk = 'fehlerzustaendigkeiten_id';
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets active Mitarbeiter not assigned to a Fehler.
|
||||||
|
* @param $fehlercode
|
||||||
|
* @return object
|
||||||
|
*/
|
||||||
|
public function getNonAssignedMitarbeiter($fehlercode)
|
||||||
|
{
|
||||||
|
$query = "SELECT person_id, ben.uid, vorname, nachname, titelpre, titelpost, personalnummer
|
||||||
|
FROM public.tbl_mitarbeiter
|
||||||
|
JOIN public.tbl_benutzer ben ON tbl_mitarbeiter.mitarbeiter_uid = ben.uid
|
||||||
|
JOIN public.tbl_person pers USING (person_id)
|
||||||
|
WHERE ben.aktiv
|
||||||
|
AND NOT EXISTS (
|
||||||
|
SELECT 1 FROM system.tbl_fehler_zustaendigkeiten
|
||||||
|
WHERE person_id = pers.person_id
|
||||||
|
AND fehlercode = ?
|
||||||
|
)
|
||||||
|
ORDER BY nachname, vorname, uid";
|
||||||
|
|
||||||
|
return $this->execReadOnlyQuery($query, array($fehlercode));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets Funktionen not assigned to a Fehler (over an organisational unit).
|
||||||
|
* @param $fehlercode
|
||||||
|
* @param $oe_kurzbz
|
||||||
|
* @return object
|
||||||
|
*/
|
||||||
|
public function getNonAssignedFunktionen($fehlercode, $oe_kurzbz)
|
||||||
|
{
|
||||||
|
$query = "SELECT funktion_kurzbz, beschreibung
|
||||||
|
FROM public.tbl_funktion funk
|
||||||
|
WHERE aktiv
|
||||||
|
AND NOT EXISTS (
|
||||||
|
SELECT 1 FROM system.tbl_fehler_zustaendigkeiten
|
||||||
|
WHERE funktion_kurzbz = funk.funktion_kurzbz
|
||||||
|
AND fehlercode = ?
|
||||||
|
AND oe_kurzbz = ?
|
||||||
|
)
|
||||||
|
ORDER BY beschreibung";
|
||||||
|
|
||||||
|
return $this->execReadOnlyQuery($query, array($fehlercode, $oe_kurzbz));
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -22,7 +22,10 @@ $query = '
|
|||||||
FROM public.tbl_prestudentstatus press
|
FROM public.tbl_prestudentstatus press
|
||||||
WHERE press.prestudent_id = anrechnung.prestudent_id
|
WHERE press.prestudent_id = anrechnung.prestudent_id
|
||||||
AND press.studiensemester_kurzbz = anrechnung.studiensemester_kurzbz
|
AND press.studiensemester_kurzbz = anrechnung.studiensemester_kurzbz
|
||||||
AND press.status_kurzbz = \'Student\'),
|
AND press.status_kurzbz = \'Student\'
|
||||||
|
ORDER BY press.datum DESC
|
||||||
|
LIMIT 1
|
||||||
|
),
|
||||||
lv.bezeichnung AS "lv_bezeichnung",
|
lv.bezeichnung AS "lv_bezeichnung",
|
||||||
lv.ects,
|
lv.ects,
|
||||||
(person.nachname || \' \' || person.vorname) AS "student",
|
(person.nachname || \' \' || person.vorname) AS "student",
|
||||||
@@ -56,7 +59,7 @@ $query = '
|
|||||||
JOIN lehre.tbl_anrechnung_anrechnungstatus USING (anrechnung_id)
|
JOIN lehre.tbl_anrechnung_anrechnungstatus USING (anrechnung_id)
|
||||||
JOIN lehre.tbl_anrechnung_begruendung AS begruendung USING (begruendung_id)
|
JOIN lehre.tbl_anrechnung_begruendung AS begruendung USING (begruendung_id)
|
||||||
)
|
)
|
||||||
|
|
||||||
SELECT anrechnungen.*,
|
SELECT anrechnungen.*,
|
||||||
array_to_json(anrechnungstatus.bezeichnung_mehrsprachig::varchar[])->>' . $LANGUAGE_INDEX . ' AS "status_bezeichnung",
|
array_to_json(anrechnungstatus.bezeichnung_mehrsprachig::varchar[])->>' . $LANGUAGE_INDEX . ' AS "status_bezeichnung",
|
||||||
CASE
|
CASE
|
||||||
@@ -191,4 +194,4 @@ $filterWidgetArray = array(
|
|||||||
|
|
||||||
echo $this->widgetlib->widget('TableWidget', $filterWidgetArray);
|
echo $this->widgetlib->widget('TableWidget', $filterWidgetArray);
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|||||||
@@ -254,6 +254,22 @@
|
|||||||
ORDER BY ps.zgvmanation DESC NULLS LAST, ps.prestudent_id DESC
|
ORDER BY ps.zgvmanation DESC NULLS LAST, ps.prestudent_id DESC
|
||||||
LIMIT 1
|
LIMIT 1
|
||||||
) AS "ZGVMNation",
|
) AS "ZGVMNation",
|
||||||
|
(
|
||||||
|
SELECT upper(tbl_nation.nationengruppe_kurzbz)
|
||||||
|
FROM public.tbl_prestudent ps
|
||||||
|
JOIN bis.tbl_nation ON ps.zgvnation = tbl_nation.nation_code
|
||||||
|
WHERE ps.person_id = p.person_id
|
||||||
|
ORDER BY ps.zgvnation DESC NULLS LAST, ps.prestudent_id DESC
|
||||||
|
LIMIT 1
|
||||||
|
) AS "ZGVNationGruppe",
|
||||||
|
(
|
||||||
|
SELECT upper(tbl_nation.nationengruppe_kurzbz)
|
||||||
|
FROM public.tbl_prestudent ps
|
||||||
|
JOIN bis.tbl_nation ON ps.zgvmanation = tbl_nation.nation_code
|
||||||
|
WHERE ps.person_id = p.person_id
|
||||||
|
ORDER BY ps.zgvmanation DESC NULLS LAST, ps.prestudent_id DESC
|
||||||
|
LIMIT 1
|
||||||
|
) AS "ZGVMNationGruppe",
|
||||||
(
|
(
|
||||||
SELECT tbl_organisationseinheit.bezeichnung
|
SELECT tbl_organisationseinheit.bezeichnung
|
||||||
FROM public.tbl_benutzerfunktion
|
FROM public.tbl_benutzerfunktion
|
||||||
@@ -361,6 +377,8 @@
|
|||||||
ucfirst($this->p->t('lehre', 'studiengang')).' ('.$this->p->t('global', 'aktiv').')',
|
ucfirst($this->p->t('lehre', 'studiengang')).' ('.$this->p->t('global', 'aktiv').')',
|
||||||
'ZGV Nation BA',
|
'ZGV Nation BA',
|
||||||
'ZGV Nation MA',
|
'ZGV Nation MA',
|
||||||
|
'ZGV Gruppe BA',
|
||||||
|
'ZGV Gruppe MA',
|
||||||
'InfoCenter Mitarbeiter'
|
'InfoCenter Mitarbeiter'
|
||||||
),
|
),
|
||||||
'formatRow' => function($datasetRaw) {
|
'formatRow' => function($datasetRaw) {
|
||||||
@@ -452,6 +470,16 @@
|
|||||||
$datasetRaw->{'ZGVMNation'} = '-';
|
$datasetRaw->{'ZGVMNation'} = '-';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($datasetRaw->{'ZGVNationGruppe'} == null)
|
||||||
|
{
|
||||||
|
$datasetRaw->{'ZGVNationGruppe'} = '-';
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($datasetRaw->{'ZGVMNationGruppe'} == null)
|
||||||
|
{
|
||||||
|
$datasetRaw->{'ZGVMNationGruppe'} = '-';
|
||||||
|
}
|
||||||
|
|
||||||
if ($datasetRaw->{'InfoCenterMitarbeiter'} === null)
|
if ($datasetRaw->{'InfoCenterMitarbeiter'} === null)
|
||||||
{
|
{
|
||||||
$datasetRaw->{'InfoCenterMitarbeiter'} = 'Nein';
|
$datasetRaw->{'InfoCenterMitarbeiter'} = 'Nein';
|
||||||
|
|||||||
@@ -199,14 +199,15 @@ $query = '
|
|||||||
LIMIT 1
|
LIMIT 1
|
||||||
) AS "ReihungstestApplied",
|
) AS "ReihungstestApplied",
|
||||||
(
|
(
|
||||||
SELECT rtp.datum
|
SELECT CONCAT(rtp.datum, rtp.uhrzeit)
|
||||||
FROM public.tbl_prestudentstatus pss
|
FROM public.tbl_prestudentstatus pss
|
||||||
JOIN public.tbl_prestudent ps USING(prestudent_id)
|
JOIN public.tbl_prestudent ps USING(prestudent_id)
|
||||||
LEFT JOIN (
|
LEFT JOIN (
|
||||||
SELECT rtp.person_id,
|
SELECT rtp.person_id,
|
||||||
rt.studiensemester_kurzbz,
|
rt.studiensemester_kurzbz,
|
||||||
rtp.teilgenommen,
|
rtp.teilgenommen,
|
||||||
rt.datum
|
rt.datum,
|
||||||
|
rt.uhrzeit
|
||||||
FROM public.tbl_rt_person rtp
|
FROM public.tbl_rt_person rtp
|
||||||
JOIN tbl_reihungstest rt ON(rtp.rt_id = rt.reihungstest_id)
|
JOIN tbl_reihungstest rt ON(rtp.rt_id = rt.reihungstest_id)
|
||||||
WHERE rt.stufe = 1
|
WHERE rt.stufe = 1
|
||||||
@@ -409,13 +410,13 @@ $query = '
|
|||||||
$datasetRaw->{'ReihungstestApplied'} = 'Nein';
|
$datasetRaw->{'ReihungstestApplied'} = 'Nein';
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($datasetRaw->{'ReihungstestDate'} == null)
|
if ($datasetRaw->{'ReihungstestDate'} == '')
|
||||||
{
|
{
|
||||||
$datasetRaw->{'ReihungstestDate'} = '-';
|
$datasetRaw->{'ReihungstestDate'} = '-';
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$datasetRaw->{'ReihungstestDate'} = date_format(date_create($datasetRaw->{'ReihungstestDate'}),'Y-m-d');
|
$datasetRaw->{'ReihungstestDate'} = date_format(date_create($datasetRaw->{'ReihungstestDate'}),'Y-m-d H:i');
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($datasetRaw->{'ZGVNation'} == null)
|
if ($datasetRaw->{'ZGVNation'} == null)
|
||||||
|
|||||||
@@ -1,7 +1,9 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
$PERSON_ID = getAuthPersonId();
|
$PERSON_ID = getAuthPersonId();
|
||||||
|
// all oe kurzbz for which logged user has a funktion
|
||||||
$ALL_FUNKTIONEN_OE_KURZBZ = "('" . implode("','", array_keys($all_funktionen_oe_kurzbz)) . "')";
|
$ALL_FUNKTIONEN_OE_KURZBZ = "('" . implode("','", array_keys($all_funktionen_oe_kurzbz)) . "')";
|
||||||
|
// all oes for which logged user has issues permissions, including permissions for "special" issue funktion
|
||||||
$ALL_OE_KURZBZ_BERECHTIGT = "('" . implode("','", $all_oe_kurzbz_berechtigt) . "')";
|
$ALL_OE_KURZBZ_BERECHTIGT = "('" . implode("','", $all_oe_kurzbz_berechtigt) . "')";
|
||||||
$RELEVANT_PRESTUDENT_STATUS = "('Aufgenommener', 'Student', 'Incoming', 'Diplomand', 'Abbrecher', 'Unterbrecher', 'Absolvent')";
|
$RELEVANT_PRESTUDENT_STATUS = "('Aufgenommener', 'Student', 'Incoming', 'Diplomand', 'Abbrecher', 'Unterbrecher', 'Absolvent')";
|
||||||
$LANGUAGE_INDEX = getUserLanguage() == 'German' ? '1' : '2';
|
$LANGUAGE_INDEX = getUserLanguage() == 'German' ? '1' : '2';
|
||||||
@@ -29,39 +31,74 @@ $query = "WITH zustaendigkeiten AS (
|
|||||||
$query .= " THEN TRUE
|
$query .= " THEN TRUE
|
||||||
ELSE FALSE
|
ELSE FALSE
|
||||||
END AS \"zustaendig\"
|
END AS \"zustaendig\"
|
||||||
FROM system.tbl_fehler_zustaendigkeiten zst
|
FROM system.tbl_fehler_zustaendigkeiten zst
|
||||||
)";
|
)";
|
||||||
|
|
||||||
$query .= "SELECT issue_id, fehlercode AS \"Fehlercode\", iss.fehlercode_extern AS \"Fehlercode extern\", datum AS \"Datum\",
|
$query .= "SELECT issue_id, fehlercode AS \"Fehlercode\", iss.fehlercode_extern AS \"Fehlercode extern\", datum AS \"Datum\",
|
||||||
inhalt AS \"Inhalt\", inhalt_extern AS \"Inhalt extern\", iss.person_id AS \"PersonId\", iss.oe_kurzbz AS \"OE\",
|
inhalt AS \"Inhalt\", inhalt_extern AS \"Inhalt extern\", iss.person_id AS \"PersonId\", iss.oe_kurzbz AS \"OE\",
|
||||||
ftyp.bezeichnung_mehrsprachig[".$LANGUAGE_INDEX."] AS \"Fehlertyp\", stat.bezeichnung_mehrsprachig[".$LANGUAGE_INDEX."] AS \"Fehlerstatus\",
|
ftyp.bezeichnung_mehrsprachig[".$LANGUAGE_INDEX."] AS \"Fehlertyp\", stat.bezeichnung_mehrsprachig[".$LANGUAGE_INDEX."] AS \"Fehlerstatus\",
|
||||||
verarbeitetvon AS \"Verarbeitet von\",verarbeitetamum AS \"Verarbeitet am\", fr.app AS \"Applikation\",
|
verarbeitetvon AS \"Verarbeitet von\",verarbeitetamum AS \"Verarbeitet am\", fr.app AS \"Applikation\",
|
||||||
fr.fehlertyp_kurzbz AS \"Fehlertypcode\", iss.status_kurzbz AS \"Statuscode\",
|
fr.fehlertyp_kurzbz AS \"Fehlertypcode\", iss.status_kurzbz AS \"Statuscode\",
|
||||||
pers.vorname AS \"Vorname\", pers.nachname AS \"Nachname\",
|
pers.vorname AS \"Vorname\", pers.nachname AS \"Nachname\",
|
||||||
CASE
|
(
|
||||||
WHEN
|
/* show all relevant Studiengänge of person and wether it is an employee*/
|
||||||
EXISTS(SELECT 1
|
SELECT STRING_AGG(studiengang || ' ' || last_status, ' | ')
|
||||||
FROM zustaendigkeiten
|
|| (CASE WHEN EXISTS (
|
||||||
WHERE fehlercode = iss.fehlercode
|
SELECT 1 FROM public.tbl_mitarbeiter ma
|
||||||
AND zustaendig = TRUE) /* If Zuständigkeit is defined for the oe/person, zustaendig. */
|
JOIN public.tbl_benutzer ben ON ma.mitarbeiter_uid = ben.uid
|
||||||
THEN 'Ja'
|
WHERE person_id = prestudents.person_id
|
||||||
WHEN
|
AND ben.aktiv
|
||||||
EXISTS(SELECT 1
|
) THEN ' | Mitarbeiter' ELSE '' END)
|
||||||
FROM zustaendigkeiten
|
FROM (
|
||||||
WHERE fehlercode = iss.fehlercode
|
SELECT DISTINCT person_id, prestudent_id, UPPER(stg.typ || stg.kurzbz) AS studiengang, get_rolle_prestudent(ps.prestudent_id, null) AS last_status
|
||||||
AND zustaendig = FALSE) /* If Zuständigkeit is defined for different oe/person, not zustaendig. */
|
FROM public.tbl_prestudent ps
|
||||||
THEN 'Nein'
|
JOIN public.tbl_studiengang stg USING (studiengang_kz)
|
||||||
ELSE 'Ja' /* If no Zuständigkeit defined, zustaendig by default. */
|
WHERE person_id = pers.person_id
|
||||||
END AS \"Hauptzuständig\"
|
ORDER BY prestudent_id DESC
|
||||||
FROM system.tbl_issue iss
|
) prestudents
|
||||||
JOIN system.tbl_fehler fr USING (fehlercode)
|
WHERE last_status IN ('Aufgenommener', 'Student', 'Incoming', 'Diplomand', 'Abbrecher', 'Unterbrecher', 'Absolvent')
|
||||||
JOIN system.tbl_fehlertyp ftyp USING (fehlertyp_kurzbz)
|
GROUP BY person_id
|
||||||
JOIN system.tbl_issue_status stat USING (status_kurzbz)
|
LIMIT 1;
|
||||||
LEFT JOIN public.tbl_person pers ON iss.person_id = pers.person_id
|
) AS \"Zugehörigkeit\",
|
||||||
WHERE EXISTS ( /* if oe or person is specified in fehler_zustaendigkeiten */
|
CASE
|
||||||
SELECT 1 FROM zustaendigkeiten
|
WHEN
|
||||||
WHERE fehlercode = iss.fehlercode
|
EXISTS(SELECT 1
|
||||||
AND zustaendig = TRUE)";
|
FROM zustaendigkeiten
|
||||||
|
WHERE fehlercode = iss.fehlercode
|
||||||
|
AND zustaendig = TRUE) /* If Zuständigkeit is defined for the oe/person, zustaendig. */
|
||||||
|
THEN 'Ja'
|
||||||
|
WHEN
|
||||||
|
EXISTS(SELECT 1
|
||||||
|
FROM zustaendigkeiten
|
||||||
|
WHERE fehlercode = iss.fehlercode
|
||||||
|
AND zustaendig = FALSE) /* If Zuständigkeit is defined for different oe/person, not zustaendig. */
|
||||||
|
THEN 'Nein'
|
||||||
|
ELSE 'Ja' /* If no Zuständigkeit defined, zustaendig by default. */
|
||||||
|
END AS \"Hauptzuständig\",
|
||||||
|
(
|
||||||
|
SELECT string_agg(vorname || ' ' || nachname, ' | ' ORDER BY vorname, nachname)
|
||||||
|
FROM system.tbl_fehler_zustaendigkeiten
|
||||||
|
JOIN public.tbl_person USING (person_id)
|
||||||
|
WHERE fehlercode = fr.fehlercode
|
||||||
|
GROUP BY fehlercode
|
||||||
|
) AS \"Person Zuständigkeiten\",
|
||||||
|
(
|
||||||
|
SELECT string_agg(organisationseinheittyp_kurzbz || ' ' || oe.bezeichnung || COALESCE(' - ' || fu.beschreibung, ''), ' | ' ORDER BY bezeichnung, oe_kurzbz)
|
||||||
|
FROM system.tbl_fehler_zustaendigkeiten
|
||||||
|
LEFT JOIN public.tbl_organisationseinheit oe USING (oe_kurzbz)
|
||||||
|
LEFT JOIN public.tbl_funktion fu USING (funktion_kurzbz)
|
||||||
|
WHERE fehlercode = fr.fehlercode
|
||||||
|
GROUP BY fehlercode
|
||||||
|
) AS \"Organisationseinheit Zuständigkeiten\"
|
||||||
|
FROM system.tbl_issue iss
|
||||||
|
JOIN system.tbl_fehler fr USING (fehlercode)
|
||||||
|
JOIN system.tbl_fehlertyp ftyp USING (fehlertyp_kurzbz)
|
||||||
|
JOIN system.tbl_issue_status stat USING (status_kurzbz)
|
||||||
|
LEFT JOIN public.tbl_person pers ON iss.person_id = pers.person_id
|
||||||
|
WHERE EXISTS ( /* if oe or person is specified in fehler_zustaendigkeiten */
|
||||||
|
SELECT 1 FROM zustaendigkeiten
|
||||||
|
WHERE fehlercode = iss.fehlercode
|
||||||
|
AND zustaendig = TRUE)";
|
||||||
|
|
||||||
// show issue if it is assigend to oe of logged in user or to student of oe of logged in user
|
// show issue if it is assigend to oe of logged in user or to student of oe of logged in user
|
||||||
if (!isEmptyArray($all_oe_kurzbz_berechtigt))
|
if (!isEmptyArray($all_oe_kurzbz_berechtigt))
|
||||||
@@ -78,13 +115,13 @@ if (!isEmptyArray($all_oe_kurzbz_berechtigt))
|
|||||||
AND NOT EXISTS (SELECT 1 /* irrelevant if already finished studies and studied a while ago */
|
AND NOT EXISTS (SELECT 1 /* irrelevant if already finished studies and studied a while ago */
|
||||||
FROM public.tbl_prestudentstatus ps_finished
|
FROM public.tbl_prestudentstatus ps_finished
|
||||||
JOIN public.tbl_studiensemester sem_finished USING (studiensemester_kurzbz)
|
JOIN public.tbl_studiensemester sem_finished USING (studiensemester_kurzbz)
|
||||||
WHERE prestudent_id = ps.prestudent_id
|
WHERE prestudent_id = ps.prestudent_id
|
||||||
AND status_kurzbz IN ('Absolvent','Abbrecher','Abgewiesener')
|
AND status_kurzbz IN ('Absolvent','Abbrecher','Abgewiesener')
|
||||||
AND datum::date + interval '2 months' < NOW()
|
AND datum::date + interval '2 months' < NOW()
|
||||||
AND EXISTS (SELECT 1 FROM public.tbl_prestudent /* if more recent prestudent exists, still display the issue */
|
AND EXISTS (SELECT 1 FROM public.tbl_prestudent /* if more recent prestudent exists, still display the issue */
|
||||||
JOIN public.tbl_prestudentstatus USING (prestudent_id)
|
JOIN public.tbl_prestudentstatus USING (prestudent_id)
|
||||||
JOIN public.tbl_studiensemester USING (studiensemester_kurzbz)
|
JOIN public.tbl_studiensemester USING (studiensemester_kurzbz)
|
||||||
WHERE tbl_prestudentstatus.status_kurzbz IN $RELEVANT_PRESTUDENT_STATUS
|
WHERE tbl_prestudentstatus.status_kurzbz IN $RELEVANT_PRESTUDENT_STATUS
|
||||||
AND person_id = ps.person_id
|
AND person_id = ps.person_id
|
||||||
AND prestudent_id <> ps_finished.prestudent_id
|
AND prestudent_id <> ps_finished.prestudent_id
|
||||||
AND tbl_studiensemester.start::date > sem_finished.start::date)
|
AND tbl_studiensemester.start::date > sem_finished.start::date)
|
||||||
@@ -111,7 +148,7 @@ $filterWidgetArray = array(
|
|||||||
'datasetName' => 'issues',
|
'datasetName' => 'issues',
|
||||||
'filter_id' => $this->input->get('filter_id'),
|
'filter_id' => $this->input->get('filter_id'),
|
||||||
'tableUniqueId' => 'issues',
|
'tableUniqueId' => 'issues',
|
||||||
'requiredPermissions' => 'admin',
|
'requiredPermissions' => 'system/issues_verwalten',
|
||||||
'datasetRepresentation' => 'tablesorter',
|
'datasetRepresentation' => 'tablesorter',
|
||||||
'checkboxes' => 'issue_id',
|
'checkboxes' => 'issue_id',
|
||||||
'columnsAliases' => array(
|
'columnsAliases' => array(
|
||||||
@@ -132,7 +169,10 @@ $filterWidgetArray = array(
|
|||||||
ucfirst($this->p->t('fehlermonitoring', 'statuscode')),
|
ucfirst($this->p->t('fehlermonitoring', 'statuscode')),
|
||||||
ucfirst($this->p->t('person', 'vorname')),
|
ucfirst($this->p->t('person', 'vorname')),
|
||||||
ucfirst($this->p->t('person', 'nachname')),
|
ucfirst($this->p->t('person', 'nachname')),
|
||||||
ucfirst($this->p->t('fehlermonitoring', 'hauptzustaendig'))
|
ucfirst($this->p->t('fehlermonitoring', 'zugehoerigkeit')),
|
||||||
|
ucfirst($this->p->t('fehlermonitoring', 'hauptzustaendig')),
|
||||||
|
ucfirst($this->p->t('fehlermonitoring', 'zustaendigePersonen')),
|
||||||
|
ucfirst($this->p->t('fehlermonitoring', 'zustaendigeOrganisationseinheiten'))
|
||||||
),
|
),
|
||||||
'formatRow' => function($datasetRaw) {
|
'formatRow' => function($datasetRaw) {
|
||||||
|
|
||||||
@@ -161,16 +201,26 @@ $filterWidgetArray = array(
|
|||||||
$datasetRaw->{'OE'} = '-';
|
$datasetRaw->{'OE'} = '-';
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($datasetRaw->{'Verarbeitet am'} == null)
|
|
||||||
{
|
|
||||||
$datasetRaw->{'Verarbeitet am'} = '-';
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($datasetRaw->{'Verarbeitet von'} == null)
|
if ($datasetRaw->{'Verarbeitet von'} == null)
|
||||||
{
|
{
|
||||||
$datasetRaw->{'Verarbeitet von'} = '-';
|
$datasetRaw->{'Verarbeitet von'} = '-';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($datasetRaw->{'Zugehörigkeit'} == null)
|
||||||
|
{
|
||||||
|
$datasetRaw->{'Zugehörigkeit'} = '-';
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($datasetRaw->{'Person Zuständigkeiten'} == null)
|
||||||
|
{
|
||||||
|
$datasetRaw->{'Person Zuständigkeiten'} = '-';
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($datasetRaw->{'Organisationseinheit Zuständigkeiten'} == null)
|
||||||
|
{
|
||||||
|
$datasetRaw->{'Organisationseinheit Zuständigkeiten'} = '-';
|
||||||
|
}
|
||||||
|
|
||||||
return $datasetRaw;
|
return $datasetRaw;
|
||||||
},
|
},
|
||||||
'markRow' => function($datasetRaw) {
|
'markRow' => function($datasetRaw) {
|
||||||
|
|||||||
@@ -0,0 +1,168 @@
|
|||||||
|
<?php
|
||||||
|
$this->load->view(
|
||||||
|
'templates/FHC-Header',
|
||||||
|
array(
|
||||||
|
'title' => 'Fehler Zuständigkeiten',
|
||||||
|
'jquery' => true,
|
||||||
|
'jqueryui' => true,
|
||||||
|
'jquerycheckboxes' => true,
|
||||||
|
'bootstrap' => true,
|
||||||
|
'fontawesome' => true,
|
||||||
|
'sbadmintemplate' => true,
|
||||||
|
'tablesorter' => true,
|
||||||
|
'ajaxlib' => true,
|
||||||
|
'filterwidget' => true,
|
||||||
|
'navigationwidget' => true,
|
||||||
|
'dialoglib' => true,
|
||||||
|
'phrases' => array(
|
||||||
|
'ui',
|
||||||
|
'fehlermonitoring'
|
||||||
|
),
|
||||||
|
'customCSSs' => array('public/css/issues/issuesZustaendigkeiten.css', 'public/css/sbadmin2/tablesort_bootstrap.css'),
|
||||||
|
'customJSs' => array('public/js/issues/issuesZustaendigkeiten.js', 'public/js/bootstrapper.js')
|
||||||
|
)
|
||||||
|
);
|
||||||
|
?>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
<div id="wrapper">
|
||||||
|
|
||||||
|
<?php echo $this->widgetlib->widget('NavigationWidget'); ?>
|
||||||
|
|
||||||
|
<div id="page-wrapper">
|
||||||
|
<div class="container-fluid">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-lg-12">
|
||||||
|
<h3 class="page-header">
|
||||||
|
<?php echo $this->p->t('fehlermonitoring', 'fehlerZustaendigkeiten') ?>
|
||||||
|
</h3>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-lg-4">
|
||||||
|
<div class="panel panel-default">
|
||||||
|
<table class="table table-bordered" id="fehlercodeSelectTable">
|
||||||
|
<tr>
|
||||||
|
<td class="tableCellNoRightBorder">
|
||||||
|
<label for="fehlerappSelect">App</label>
|
||||||
|
<select class="form-control" name="fehlerappSelect" id="fehlerappSelect">
|
||||||
|
</select>
|
||||||
|
</td>
|
||||||
|
<td class="tableCellNoLeftBorder tableCellNoRightBorder">
|
||||||
|
<label for="fehlercodeSelect"><?php echo $this->p->t('fehlermonitoring', 'fehlercode') ?></label>
|
||||||
|
<select class="form-control" name="fehlercodeSelect" id="fehlercodeSelect">
|
||||||
|
</select>
|
||||||
|
</td>
|
||||||
|
<td class="tableCellNoLeftBorder" id="fehlercodeInfoCell"><i class="fa fa-info-circle"></i></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-lg-8">
|
||||||
|
<div class="panel panel-default">
|
||||||
|
<table class="table table-bordered">
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<label for="mitarbeiterSelect"><?php echo $this->p->t('fehlermonitoring', 'zustaendigerMitarbeiter') ?></label>
|
||||||
|
<input type="text" class="form-control" name="mitarbeiterSelect" id="mitarbeiterSelect">
|
||||||
|
<input type="hidden" name="mitarbeiter_person_id" id="mitarbeiter_person_id">
|
||||||
|
</td>
|
||||||
|
<td align="center">
|
||||||
|
<?php echo $this->p->t('fehlermonitoring', 'oder') ?>
|
||||||
|
<br>
|
||||||
|
<i class="fa fa-arrows-h"></i>
|
||||||
|
</td>
|
||||||
|
<td class="tableCellNoRightBorder">
|
||||||
|
<label for="oeSelect"><?php echo $this->p->t('fehlermonitoring', 'organisationseinheit') ?></label>
|
||||||
|
<select class="form-control" name="oeSelect" id="oeSelect">
|
||||||
|
</select>
|
||||||
|
</td>
|
||||||
|
<td class="tableCellNoLeftBorder">
|
||||||
|
<label for="funktionSelect"><?php echo $this->p->t('fehlermonitoring', 'funktion') ?></label>
|
||||||
|
<select class="form-control" name="funktionSelect" id="funktionSelect">
|
||||||
|
</select>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-lg-offset-3 col-lg-9">
|
||||||
|
<button class="btn btn-default" id="assignZustaendigkeit">
|
||||||
|
<i class="fa fa-angle-double-right"></i>
|
||||||
|
<?php echo $this->p->t('fehlermonitoring', 'zustaendigkeitZuweisen') ?>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<?php $this->load->view('system/issues/issuesZustaendigkeitenData.php'); ?>
|
||||||
|
</div>
|
||||||
|
<div class="modal fade" id="fehlerInfo" tabindex="-1"
|
||||||
|
role="dialog"
|
||||||
|
aria-labelledby="fehlerInfoLabel"
|
||||||
|
aria-hidden="true">
|
||||||
|
<div class="modal-dialog">
|
||||||
|
<div class="modal-content">
|
||||||
|
<div class="modal-header">
|
||||||
|
<button type="button" class="close"
|
||||||
|
data-dismiss="modal"
|
||||||
|
aria-hidden="true">×
|
||||||
|
</button>
|
||||||
|
<h4 class="modal-title" id="fehlerInfoLabel">
|
||||||
|
</h4>
|
||||||
|
</div>
|
||||||
|
<div class="modal-body" id="fehlerInfoContent">
|
||||||
|
<table class="table table-condensed table-bordered">
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<b><?php echo ucfirst($this->p->t('fehlermonitoring', 'fehlercode')) ?></b>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<span id="fehlercodeInfo"></span>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<b><?php echo ucfirst($this->p->t('fehlermonitoring', 'fehlerkurzbz')) ?></b>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<span id="fehlerkurzbzInfo"></span>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<b><?php echo ucfirst($this->p->t('fehlermonitoring', 'fehlertyp')) ?></b>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<span id="fehlertypInfo"></span>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<b><?php echo ucfirst($this->p->t('fehlermonitoring', 'fehlercodeExtern')) ?></b>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<span id="fehlercodeExternInfo"></span>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<b><?php echo ucfirst($this->p->t('fehlermonitoring', 'fehlertext')) ?></b>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<span id="fehlertextInfo"></span>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</div><!-- /.modal-content -->
|
||||||
|
</div><!-- /.modal-dialog -->
|
||||||
|
</div><!-- /.modal-fade -->
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
|
||||||
|
<?php $this->load->view('templates/FHC-Footer'); ?>
|
||||||
@@ -0,0 +1,84 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
// get assigned Zustaendigkeiten
|
||||||
|
$query = "SELECT fehlerzustaendigkeiten_id, fe.fehlercode, fe.fehlercode_extern, fehler_kurzbz, fehlertext, fehlertyp_kurzbz, fe.app,
|
||||||
|
pers.person_id, pers.vorname, pers.nachname,
|
||||||
|
oe.oe_kurzbz, oe.bezeichnung AS oe_bezeichnung, funk.funktion_kurzbz, funk.beschreibung AS funktion_beschreibung
|
||||||
|
FROM system.tbl_fehler_zustaendigkeiten zst
|
||||||
|
JOIN system.tbl_fehler fe USING (fehlercode)
|
||||||
|
LEFT JOIN public.tbl_person pers USING (person_id)
|
||||||
|
LEFT JOIN public.tbl_organisationseinheit oe USING (oe_kurzbz)
|
||||||
|
LEFT JOIN public.tbl_funktion funk USING (funktion_kurzbz)
|
||||||
|
ORDER BY fe.fehlercode, pers.nachname, oe.bezeichnung, funk.beschreibung";
|
||||||
|
|
||||||
|
$filterWidgetArray = array(
|
||||||
|
'query' => $query,
|
||||||
|
'app' => 'core',
|
||||||
|
'datasetName' => 'fehlerZustaendigkeiten',
|
||||||
|
'filter_id' => $this->input->get('filter_id'),
|
||||||
|
'tableUniqueId' => 'issuesZustaendigkeiten',
|
||||||
|
'requiredPermissions' => 'admin',
|
||||||
|
'datasetRepresentation' => 'tablesorter',
|
||||||
|
'additionalColumns' => array('Delete'),
|
||||||
|
'columnsAliases' => array(
|
||||||
|
'ID',
|
||||||
|
ucfirst($this->p->t('fehlermonitoring', 'fehlercode')),
|
||||||
|
ucfirst($this->p->t('fehlermonitoring', 'fehlercodeExtern')),
|
||||||
|
ucfirst($this->p->t('fehlermonitoring', 'fehlerkurzbz')),
|
||||||
|
ucfirst($this->p->t('fehlermonitoring', 'fehlertext')),
|
||||||
|
ucfirst($this->p->t('fehlermonitoring', 'fehlertyp')),
|
||||||
|
'app',
|
||||||
|
'PersonId',
|
||||||
|
ucfirst($this->p->t('person', 'vorname')),
|
||||||
|
ucfirst($this->p->t('person', 'nachname')),
|
||||||
|
ucfirst($this->p->t('fehlermonitoring', 'oeKurzbz')),
|
||||||
|
ucfirst($this->p->t('fehlermonitoring', 'oeBezeichnung')),
|
||||||
|
ucfirst($this->p->t('fehlermonitoring', 'funktionKurzbz')),
|
||||||
|
ucfirst($this->p->t('fehlermonitoring', 'funktionBeschreibung'))
|
||||||
|
),
|
||||||
|
'formatRow' => function($datasetRaw) {
|
||||||
|
|
||||||
|
$datasetRaw->{'Delete'} =
|
||||||
|
"<button id='".$datasetRaw->{'fehlerzustaendigkeiten_id'}."' class='btn btn-default deleteBtn'>"
|
||||||
|
.ucfirst($this->p->t('ui', 'loeschen'))."</button>";
|
||||||
|
|
||||||
|
if ($datasetRaw->{'person_id'} == null)
|
||||||
|
{
|
||||||
|
$datasetRaw->{'person_id'} = '-';
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($datasetRaw->{'vorname'} == null)
|
||||||
|
{
|
||||||
|
$datasetRaw->{'vorname'} = '-';
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($datasetRaw->{'nachname'} == null)
|
||||||
|
{
|
||||||
|
$datasetRaw->{'nachname'} = '-';
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($datasetRaw->{'oe_kurzbz'} == null)
|
||||||
|
{
|
||||||
|
$datasetRaw->{'oe_kurzbz'} = '-';
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($datasetRaw->{'oe_bezeichnung'} == null)
|
||||||
|
{
|
||||||
|
$datasetRaw->{'oe_bezeichnung'} = '-';
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($datasetRaw->{'funktion_kurzbz'} == null)
|
||||||
|
{
|
||||||
|
$datasetRaw->{'funktion_kurzbz'} = '-';
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($datasetRaw->{'funktion_beschreibung'} == null)
|
||||||
|
{
|
||||||
|
$datasetRaw->{'funktion_beschreibung'} = '-';
|
||||||
|
}
|
||||||
|
|
||||||
|
return $datasetRaw;
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
echo $this->widgetlib->widget('FilterWidget', $filterWidgetArray);
|
||||||
+23
-173
@@ -22,21 +22,21 @@
|
|||||||
*/
|
*/
|
||||||
session_start();
|
session_start();
|
||||||
|
|
||||||
require_once('../../config/cis.config.inc.php');
|
require_once('../../config/cis.config.inc.php');
|
||||||
require_once('../../include/wochenplan.class.php');
|
require_once('../../include/wochenplan.class.php');
|
||||||
require_once('../../include/benutzerberechtigung.class.php');
|
require_once('../../include/benutzerberechtigung.class.php');
|
||||||
require_once('../../include/betriebsmittel.class.php');
|
require_once('../../include/betriebsmittel.class.php');
|
||||||
require_once('../../include/betriebsmittelperson.class.php');
|
require_once('../../include/betriebsmittelperson.class.php');
|
||||||
require_once('../../include/betriebsmitteltyp.class.php');
|
require_once('../../include/betriebsmitteltyp.class.php');
|
||||||
require_once('../../include/mail.class.php');
|
require_once('../../include/mail.class.php');
|
||||||
require_once('../../include/news.class.php');
|
require_once('../../include/news.class.php');
|
||||||
require_once('../../include/content.class.php');
|
require_once('../../include/content.class.php');
|
||||||
require_once('../../include/studiensemester.class.php');
|
require_once('../../include/studiensemester.class.php');
|
||||||
require_once('../../include/konto.class.php');
|
require_once('../../include/konto.class.php');
|
||||||
require_once('../../include/functions.inc.php');
|
require_once('../../include/functions.inc.php');
|
||||||
require_once('../../include/authentication.class.php');
|
require_once('../../include/authentication.class.php');
|
||||||
require_once('../../include/addon.class.php');
|
require_once('../../include/addon.class.php');
|
||||||
require_once('../../include/'.EXT_FKT_PATH.'/serviceterminal.inc.php');
|
require_once('../../include/'.EXT_FKT_PATH.'/serviceterminal.inc.php');
|
||||||
|
|
||||||
if (!$db = new basis_db())
|
if (!$db = new basis_db())
|
||||||
$db=false;
|
$db=false;
|
||||||
@@ -679,10 +679,6 @@ function meine_uid_informationen($db,$uid,$user="")
|
|||||||
if ($db)
|
if ($db)
|
||||||
$user_array=personen_id_read_mitarbeiter_oder_student($db,$user->person_id);
|
$user_array=personen_id_read_mitarbeiter_oder_student($db,$user->person_id);
|
||||||
|
|
||||||
#echo '<hr>';
|
|
||||||
##var_dump($user_array);
|
|
||||||
#var_dump($_SESSION[constSESSIONNAME]["ldap_get_entries"]);
|
|
||||||
|
|
||||||
if (isset($user_array) && is_array($user_array) && count($user_array)>1)
|
if (isset($user_array) && is_array($user_array) && count($user_array)>1)
|
||||||
{
|
{
|
||||||
$html_user_daten.='<table class="persoenlichedaten">';
|
$html_user_daten.='<table class="persoenlichedaten">';
|
||||||
@@ -724,54 +720,6 @@ function meine_uid_informationen($db,$uid,$user="")
|
|||||||
|
|
||||||
$html_user_daten.='<hr>';
|
$html_user_daten.='<hr>';
|
||||||
|
|
||||||
// eMail senden nach anforderung
|
|
||||||
/*
|
|
||||||
$send_mail=(isset($_REQUEST['send_mail']) ? $_REQUEST['send_mail']:false);
|
|
||||||
if ($send_mail)
|
|
||||||
{
|
|
||||||
$to=$uid.'@'.DOMAIN;
|
|
||||||
$from=MAIL_CIS;
|
|
||||||
$subject=CAMPUS_NAME.' Informationen';
|
|
||||||
|
|
||||||
$mail=new mail($to, $from, $subject, $html_user_daten_detail);
|
|
||||||
if (isset($user_array) && is_array($user_array) && count($user_array)>1)
|
|
||||||
{
|
|
||||||
reset($user_array);
|
|
||||||
for ($i=0;$i<count($user_array);$i++)
|
|
||||||
{
|
|
||||||
if ($uid!=$user_array[$i]->uid && ($user_array[$i]->aktiv='t' || ($user_array[$i]->aktiv !='f' && $user_array[$i]->aktiv)) )
|
|
||||||
$mail->setCCRecievers($user_array[$i]->uid.'@'.DOMAIN);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
$mail->setHTMLContent($html_user_daten_detail);
|
|
||||||
if ($mail->send())
|
|
||||||
$html_user_daten.='<p>email gesendet an '.$mail->to.' '.($mail->CC_recievers?$mail->CC_recievers:'').'</p>';
|
|
||||||
else
|
|
||||||
$html_user_daten.='<p>email nicht gesendet an '.$mail->to.'</p>';
|
|
||||||
}
|
|
||||||
// Send eMail Auswahl anzeigen
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$farbe='gruen';
|
|
||||||
$html_user_daten.='<table class="persoenlichedaten">';
|
|
||||||
$html_user_daten.='<tr>';
|
|
||||||
$html_user_daten.='<td>';
|
|
||||||
$html_user_daten.='<a href="'.$_SERVER['PHP_SELF'].'?work=meinedaten&send_mail=x&standort_id='.$standort_id.'">';
|
|
||||||
$html_user_daten.='<b class="'.$farbe.'_rtop">
|
|
||||||
<b class="'.$farbe.'_r1"></b> <b class="'.$farbe.'_r2"></b> <b class="'.$farbe.'_r3"></b> <b class="'.$farbe.'_r4"></b>
|
|
||||||
</b>
|
|
||||||
<span class="'.$farbe.'_mitteText">';
|
|
||||||
$html_user_daten.='Informationen per Mail senden';
|
|
||||||
$html_user_daten.='
|
|
||||||
</span>
|
|
||||||
<b class="'.$farbe.'_rbottom">
|
|
||||||
<b class="'.$farbe.'_r4"></b><b class="'.$farbe.'_r3"></b> <b class="'.$farbe.'_r2"></b> <b class="'.$farbe.'_r1"></b>
|
|
||||||
</b>';
|
|
||||||
$html_user_daten.='</a>';
|
|
||||||
$html_user_daten.='</td>';
|
|
||||||
$html_user_daten.='</tr>';
|
|
||||||
$html_user_daten.='</table>';
|
|
||||||
}*/
|
|
||||||
return $html_user_daten;
|
return $html_user_daten;
|
||||||
}
|
}
|
||||||
#-------------------------------------------------------------------------------------------
|
#-------------------------------------------------------------------------------------------
|
||||||
@@ -952,33 +900,6 @@ function meine_uid_informationen_detail($db,$uid,$count=0)
|
|||||||
die($db->db_last_error());
|
die($db->db_last_error());
|
||||||
$nr_mg=$db->db_num_rows($erg_mg);
|
$nr_mg=$db->db_num_rows($erg_mg);
|
||||||
|
|
||||||
// Betriebsmittel zur Person lesen
|
|
||||||
/*
|
|
||||||
$betriebsmittelperson=array();
|
|
||||||
$qry="SELECT nummer,betriebsmitteltyp FROM public.vw_betriebsmittelperson where uid='".addslashes(trim($uid))."' and aktiv and benutzer_aktiv and ( retouram IS NULL ) LIMIT 50 ; ";
|
|
||||||
if(!$result=$db->db_query($qry))
|
|
||||||
die('Probleme beim Lesen der Benutzer uid '.$db->db_last_error());
|
|
||||||
if ($result)
|
|
||||||
{
|
|
||||||
while($rows = $db->db_fetch_object($result))
|
|
||||||
{
|
|
||||||
$rows->asco='ASCO Datensätze gefunden';
|
|
||||||
if (is_numeric($rows->nummer) && $mssql_verbindung)
|
|
||||||
{
|
|
||||||
$card_no=$rows->nummer;
|
|
||||||
$anfrage = mssql_query('SELECT * FROM view_fh_technikum_mitarbeiterkarten_berechtigungen where card_no='.$card_no);
|
|
||||||
if (mssql_num_rows($anfrage))
|
|
||||||
{
|
|
||||||
$rows->asco=array();
|
|
||||||
while ($datensatz = mssql_fetch_object($anfrage))
|
|
||||||
$rows->asco[]=$datensatz;
|
|
||||||
}
|
|
||||||
mssql_free_result($anfrage);
|
|
||||||
}
|
|
||||||
$betriebsmittelperson[]=$rows;
|
|
||||||
}
|
|
||||||
}*/
|
|
||||||
|
|
||||||
if ($count==0)
|
if ($count==0)
|
||||||
{
|
{
|
||||||
$html_user_daten.='<h1>Persönliche Daten</h1>';
|
$html_user_daten.='<h1>Persönliche Daten</h1>';
|
||||||
@@ -1022,49 +943,6 @@ function meine_uid_informationen_detail($db,$uid,$count=0)
|
|||||||
$html_user_daten.='<tr><td style="background-color: #E9ECEE;" align="center" colspan="2" ><b><font size="+1">Email</font></b></td></tr>';
|
$html_user_daten.='<tr><td style="background-color: #E9ECEE;" align="center" colspan="2" ><b><font size="+1">Email</font></b></td></tr>';
|
||||||
$html_user_daten.='<tr><td ><b>Intern</b></td><td >'.$email.'</td></tr>';
|
$html_user_daten.='<tr><td ><b>Intern</b></td><td >'.$email.'</td></tr>';
|
||||||
$html_user_daten.='<tr><td ><b>Alias</b></td><td >'.$email_alias.'</td></tr>';
|
$html_user_daten.='<tr><td ><b>Alias</b></td><td >'.$email_alias.'</td></tr>';
|
||||||
/*
|
|
||||||
|
|
||||||
$html_user_daten.='<tr><td style="background-color: #E9ECEE;" align="center" colspan="2" ><b>Mitglied in folgenden Verteilern</b></td></tr>';
|
|
||||||
for($i=0;$i<$nr_mg;$i++)
|
|
||||||
{
|
|
||||||
$row=$db->db_fetch_object($erg_mg,$i);
|
|
||||||
|
|
||||||
$html_user_daten.='<tr>';
|
|
||||||
$html_user_daten.='<td valign="top"><a class="Item" href="mailto:'.trim(strtolower($row->gruppe_kurzbz)).'@'.DOMAIN.'">'.strtolower($row->gruppe_kurzbz).' </td>';
|
|
||||||
$html_user_daten.='<td >'.$row->beschreibung.' </td>';
|
|
||||||
$html_user_daten.='</tr>';
|
|
||||||
}
|
|
||||||
|
|
||||||
if (isset($matrikelnr))
|
|
||||||
{
|
|
||||||
$html_user_daten.='<TR><TD valign="top"><A class="Item" href="mailto:'.strtolower(trim($stgkz)).'_std@'.DOMAIN.'">'.strtolower($stgkz).'_std </TD>';
|
|
||||||
$html_user_daten.="\n<TD > Alle Studierdenden von $stgbez</TD><TD></TD></TR>";
|
|
||||||
$html_user_daten.='<TR><TD valign="top">'.strtolower($stgkz).$semester.' </TD>';
|
|
||||||
$html_user_daten.="\n<TD > Alle Studierenden von $stgkz $semester</TD><TD></TD></TR>";
|
|
||||||
$html_user_daten.='<TR><TD valign="top"><A class="Item" href="mailto:'.strtolower(trim($stgkz)).trim($semester).strtolower(trim($verband)).'@'.DOMAIN.'">'.strtolower($stgkz).$semester.strtolower($verband).' </TD>';
|
|
||||||
$html_user_daten.="\n<TD > Alle Studierenden von $stgkz $semester$verband</TD><TD></TD></TR>";
|
|
||||||
$html_user_daten.='<TR><TD valign="top"><A class="Item" href="mailto:'.strtolower(trim($stgkz)).trim($semester).strtolower(trim($verband)).trim($gruppe).'@'.DOMAIN.'">'.strtolower($stgkz).$semester.strtolower($verband).$gruppe.' </TD>';
|
|
||||||
$html_user_daten.="\n<TD > Alle Studierenden von $stgkz $semester$verband$gruppe</TD><TD></TD></TR>";
|
|
||||||
}
|
|
||||||
$html_user_daten.='</table> </td>';
|
|
||||||
|
|
||||||
$html_user_daten.='<td valign="top" width="50%"><table width="100%">';
|
|
||||||
if ($stud_num_rows==1)
|
|
||||||
{
|
|
||||||
$html_user_daten.='<tr><td colspan="2" align="center" style="background-color: #E9ECEE;"><b><font size="+1">StudentIn</font></b></td></tr>';
|
|
||||||
$html_user_daten.="<td colspan='2' >
|
|
||||||
Studiengang: $stgbez<br>
|
|
||||||
Semester: $semester<br>
|
|
||||||
Verband: $verband<br>
|
|
||||||
Gruppe: $gruppe<br>
|
|
||||||
Matrikelnummer: $matrikelnr";
|
|
||||||
$html_user_daten.='</td></tr>';
|
|
||||||
}
|
|
||||||
else if ($lekt_num_rows==1)
|
|
||||||
{
|
|
||||||
$html_user_daten.='<tr><td colspan="2" align="center" style="background-color: #E9ECEE;"><b><font size="+1">Lektor </font></b></td></tr>';
|
|
||||||
$html_user_daten.='<td colspan="2"><b>Kurzzeichen: </b>'.$kurzbz.'<br><b>Standort: </b>'.$ort.'<br><b>'.($tel!=''?'Telefon TW:</b> '.$vorwahl.' '.$tel:'').'</td></tr>';
|
|
||||||
}*/
|
|
||||||
|
|
||||||
$html_user_daten.='</table>';
|
$html_user_daten.='</table>';
|
||||||
$html_user_daten.=' </td></tr></table>';
|
$html_user_daten.=' </td></tr></table>';
|
||||||
@@ -1096,30 +974,6 @@ function alle_uid_stundenplan_informationen($db,$uid,$user_array="")
|
|||||||
return $html_liste_raum;
|
return $html_liste_raum;
|
||||||
}
|
}
|
||||||
|
|
||||||
// ------------------------------------------------------------------------------------------
|
|
||||||
// Kalenderwoche und Tage Initialisieren
|
|
||||||
// ------------------------------------------------------------------------------------------
|
|
||||||
/*
|
|
||||||
$date = date('d');
|
|
||||||
$month = date('m');
|
|
||||||
$year = date('y');
|
|
||||||
$weekday = date('w');
|
|
||||||
$kalenderweek = ((int)date('W')<10?'0'.(int)date('W'):date('W'));
|
|
||||||
|
|
||||||
// Montag ermitteln
|
|
||||||
if($weekday == 0)
|
|
||||||
{
|
|
||||||
$datum=mktime(0, 0, 0, $month, $date-$weekday -6, $year);
|
|
||||||
$ersterTagMonat=date('m', mktime(0, 0, 0, $month, $date-$weekday -6, $year));
|
|
||||||
$ersterTag=date('d', mktime(0, 0, 0, $month, $date-$weekday -6, $year));
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$datum=mktime(0, 0, 0, $month, $date-$weekday +1, $year);
|
|
||||||
$ersterTagMonat=date('m', mktime(0, 0, 0, $month, $date-$weekday +1, $year));
|
|
||||||
$ersterTag=date('d', mktime(0, 0, 0, $month, $date-$weekday +1, $year));
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
// ------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------
|
||||||
// Alle Termine zum User lesen
|
// Alle Termine zum User lesen
|
||||||
// ------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------
|
||||||
@@ -1334,18 +1188,19 @@ function alle_raum_informationen($db,$raumtyp_kurzbz,$ort_kurzbz, $standort_id)
|
|||||||
$qry.=" SELECT DISTINCT ";
|
$qry.=" SELECT DISTINCT ";
|
||||||
$qry.=" tbl_ortraumtyp.ort_kurzbz ";
|
$qry.=" tbl_ortraumtyp.ort_kurzbz ";
|
||||||
$qry.=" ,tbl_ort.bezeichnung ,tbl_ort.aktiv ";
|
$qry.=" ,tbl_ort.bezeichnung ,tbl_ort.aktiv ";
|
||||||
|
$qry.=" , (SELECT 'gesperrt'::text FROM public.tbl_ortraumtyp WHERE raumtyp_kurzbz='Gesperrt' AND ort_kurzbz=tbl_ort.ort_kurzbz) as gesperrt";
|
||||||
$qry.=" FROM tbl_raumtyp , tbl_ortraumtyp , tbl_ort ";
|
$qry.=" FROM tbl_raumtyp , tbl_ortraumtyp , tbl_ort ";
|
||||||
$qry.=" WHERE tbl_ortraumtyp.raumtyp_kurzbz=tbl_raumtyp.raumtyp_kurzbz ";
|
$qry.=" WHERE tbl_ortraumtyp.raumtyp_kurzbz=tbl_raumtyp.raumtyp_kurzbz ";
|
||||||
$qry.=" AND tbl_ort.ort_kurzbz=tbl_ortraumtyp.ort_kurzbz ";
|
$qry.=" AND tbl_ort.ort_kurzbz=tbl_ortraumtyp.ort_kurzbz ";
|
||||||
$qry.=" AND tbl_ort.aktiv ";
|
$qry.=" AND tbl_ort.aktiv ";
|
||||||
$qry.=" AND lower(tbl_raumtyp.raumtyp_kurzbz) like lower('%".$db->db_escape(trim($raumtyp_kurzbz))."%') ";
|
$qry.=" AND lower(tbl_raumtyp.raumtyp_kurzbz) like lower('%".$db->db_escape(trim($raumtyp_kurzbz))."%') ";
|
||||||
if($standort_id!='')
|
if($standort_id!='')
|
||||||
$qry.=" AND (tbl_ort.standort_id=".$db->db_add_param($standort_id, FHC_INTEGER).' OR tbl_ort.standort_id is null)';
|
$qry.=" AND (tbl_ort.standort_id=".$db->db_add_param($standort_id, FHC_INTEGER)." OR tbl_ort.standort_id is null)";
|
||||||
$qry.=" order by tbl_ortraumtyp.ort_kurzbz ";
|
$qry.=" order by tbl_ortraumtyp.ort_kurzbz ";
|
||||||
$qry.=" ; ";
|
$qry.=" ; ";
|
||||||
|
|
||||||
if(!$result=$db->db_query($qry))
|
if(!$result=$db->db_query($qry))
|
||||||
die('Probleme beim lesen der Raumtyptabelle '.$db->db_last_error());
|
die('Probleme beim lesen der Raumtyptabelle ');
|
||||||
$num_rows_stunde=$db->db_num_rows($result);
|
$num_rows_stunde=$db->db_num_rows($result);
|
||||||
|
|
||||||
if($num_rows_stunde==0)
|
if($num_rows_stunde==0)
|
||||||
@@ -1372,7 +1227,6 @@ function alle_raum_informationen($db,$raumtyp_kurzbz,$ort_kurzbz, $standort_id)
|
|||||||
// Raumreservierungen fuer Aktive Raumauswahl
|
// Raumreservierungen fuer Aktive Raumauswahl
|
||||||
// --------------------------------------------------------------
|
// --------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
// Die aktive Stunde ermitteln - zum lesen welcher Raum jetzt besetzt ist - aktive Lehreinheit
|
// Die aktive Stunde ermitteln - zum lesen welcher Raum jetzt besetzt ist - aktive Lehreinheit
|
||||||
$row_stunde=array();
|
$row_stunde=array();
|
||||||
|
|
||||||
@@ -1382,9 +1236,6 @@ function alle_raum_informationen($db,$raumtyp_kurzbz,$ort_kurzbz, $standort_id)
|
|||||||
$qry.=" WHERE ".$db->db_add_param(constAktuelleZeitHHMi,FHC_STRING)." between to_char(tbl_stunde.beginn, 'HH24MI') and to_char(tbl_stunde.ende, 'HH24MI') ";
|
$qry.=" WHERE ".$db->db_add_param(constAktuelleZeitHHMi,FHC_STRING)." between to_char(tbl_stunde.beginn, 'HH24MI') and to_char(tbl_stunde.ende, 'HH24MI') ";
|
||||||
$qry.=" ORDER BY stunde LIMIT 1 ; ";
|
$qry.=" ORDER BY stunde LIMIT 1 ; ";
|
||||||
|
|
||||||
# $qry.=" WHERE '". constAktuelleZeitHH."' between to_char(tbl_stunde.beginn, 'HH24') and to_char(tbl_stunde.ende, 'HH24') ";
|
|
||||||
# $qry.=" ORDER BY stunde desc LIMIT 1; ";
|
|
||||||
|
|
||||||
if(!$result=$db->db_query($qry))
|
if(!$result=$db->db_query($qry))
|
||||||
die('Probleme beim lesen der Raumtyptabelle '.$db->db_last_error());
|
die('Probleme beim lesen der Raumtyptabelle '.$db->db_last_error());
|
||||||
|
|
||||||
@@ -1436,8 +1287,8 @@ function alle_raum_informationen($db,$raumtyp_kurzbz,$ort_kurzbz, $standort_id)
|
|||||||
$farbe="gruen";
|
$farbe="gruen";
|
||||||
}
|
}
|
||||||
|
|
||||||
# if ($farbe=="orange")
|
if ($row_raum[$i]->gesperrt=="gesperrt")
|
||||||
# var_dump($info);
|
$farbe="rot";
|
||||||
|
|
||||||
// Nach 4 Raumanzeigen eine Neuezeile erzeugen
|
// Nach 4 Raumanzeigen eine Neuezeile erzeugen
|
||||||
$html_liste_raum.=($i==0 || $i%4?"":"</tr><tr>");
|
$html_liste_raum.=($i==0 || $i%4?"":"</tr><tr>");
|
||||||
@@ -1461,7 +1312,7 @@ function alle_raum_informationen($db,$raumtyp_kurzbz,$ort_kurzbz, $standort_id)
|
|||||||
|
|
||||||
$html_liste_raum.='<td><table><tr><td><span class="gruen_mitteText"> </span></td><td>Mindestens nächsten 2 Einheiten frei</td></tr></table></td>';
|
$html_liste_raum.='<td><table><tr><td><span class="gruen_mitteText"> </span></td><td>Mindestens nächsten 2 Einheiten frei</td></tr></table></td>';
|
||||||
$html_liste_raum.='<td><table><tr><td><span class="orange_mitteText"> </span></td><td>Derzeit frei</td></tr></table></td>';
|
$html_liste_raum.='<td><table><tr><td><span class="orange_mitteText"> </span></td><td>Derzeit frei</td></tr></table></td>';
|
||||||
$html_liste_raum.='<td><table><tr><td><span class="rot_mitteText"> </span></td><td>Raum derzeit besetzt</td></tr></table></td>';
|
$html_liste_raum.='<td><table><tr><td><span class="rot_mitteText"> </span></td><td>Raum derzeit besetzt / gesperrt</td></tr></table></td>';
|
||||||
$html_liste_raum.='</tr>';
|
$html_liste_raum.='</tr>';
|
||||||
$html_liste_raum.='</table>';
|
$html_liste_raum.='</table>';
|
||||||
$html_liste_raum.='<hr>';
|
$html_liste_raum.='<hr>';
|
||||||
@@ -1506,7 +1357,6 @@ function alle_raum_informationen($db,$raumtyp_kurzbz,$ort_kurzbz, $standort_id)
|
|||||||
// dh. Letztes Ende ist gleich Start aktueller Datensatz
|
// dh. Letztes Ende ist gleich Start aktueller Datensatz
|
||||||
if ($lastEnde && $row->time_beginn!=$lastEnde)
|
if ($lastEnde && $row->time_beginn!=$lastEnde)
|
||||||
{
|
{
|
||||||
# echo "<p>Zeit korr. Funktion:alle_raum_informationen ".$row->beginn_show." wird zu ".$lastShowEnde."</p>";
|
|
||||||
$row->time_beginn=$lastEnde;
|
$row->time_beginn=$lastEnde;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1900,7 +1750,7 @@ function uid_read_mitarbeiter_oder_student($db,$uid)
|
|||||||
// Wenn kein Mitarbeiter pruefen ob Student
|
// Wenn kein Mitarbeiter pruefen ob Student
|
||||||
$qry="SELECT uid,person_id,anrede,titelpre,vorname,vornamen,nachname,aktiv FROM campus.vw_student where uid=".$db->db_add_param(trim($uid), FHC_STRING)." LIMIT 1 ; ";
|
$qry="SELECT uid,person_id,anrede,titelpre,vorname,vornamen,nachname,aktiv FROM campus.vw_student where uid=".$db->db_add_param(trim($uid), FHC_STRING)." LIMIT 1 ; ";
|
||||||
if(!$result=$db->db_query($qry))
|
if(!$result=$db->db_query($qry))
|
||||||
die('Probleme beim Lesen der Studierenden '.$db->db_last_error());
|
die('Probleme beim Lesen der Studierenden ');
|
||||||
if ($num_rows_stunde=$db->db_num_rows($result))
|
if ($num_rows_stunde=$db->db_num_rows($result))
|
||||||
{
|
{
|
||||||
while($rows = $db->db_fetch_object($result))
|
while($rows = $db->db_fetch_object($result))
|
||||||
@@ -1976,7 +1826,7 @@ function read_create_html_news($db,$fachbereich_kurzbz,$studiengang_kz,$semester
|
|||||||
{
|
{
|
||||||
if(defined('CIS_INFOSCREEN_NEWS_ANZEIGEN') && CIS_INFOSCREEN_NEWS_ANZEIGEN==false)
|
if(defined('CIS_INFOSCREEN_NEWS_ANZEIGEN') && CIS_INFOSCREEN_NEWS_ANZEIGEN==false)
|
||||||
return '';
|
return '';
|
||||||
|
|
||||||
// ------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------
|
||||||
// Lesen Newstickerzeilen
|
// Lesen Newstickerzeilen
|
||||||
// ------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------
|
||||||
|
|||||||
@@ -169,21 +169,22 @@ echo '
|
|||||||
echo '<!-- Last content:'.$lastinfoscreencontent.' ID:'.$infoscreen_id.' IP:'.$ip.'-->';
|
echo '<!-- Last content:'.$lastinfoscreencontent.' ID:'.$infoscreen_id.' IP:'.$ip.'-->';
|
||||||
if($infoscreen_id!='' && isset($content[$aktuellerContentIdx]))
|
if($infoscreen_id!='' && isset($content[$aktuellerContentIdx]))
|
||||||
{
|
{
|
||||||
|
|
||||||
echo '<center style="height: 100%"><iframe id="content" src="../../cms/content.php?content_id='.$content[$aktuellerContentIdx].'" ></iframe></center>';
|
echo '<center style="height: 100%"><iframe id="content" src="../../cms/content.php?content_id='.$content[$aktuellerContentIdx].'" ></iframe></center>';
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
echo '<br><br><br>
|
echo ' <table style="width: 100%; height: 100%">
|
||||||
<center>
|
<tr>
|
||||||
<h1>Informationsbildschirm - '.CAMPUS_NAME.'</h1>
|
<td style="height: 80%; vertical-align: center; text-align: center">
|
||||||
<br><br><br>
|
<img style="height: 900px" src="../../skin/styles/'.EXT_FKT_PATH.'/logo_200x400.png" />
|
||||||
Dieser Informationsbildschirm wurde noch nicht registriert
|
</td>
|
||||||
<br><br>
|
</tr>
|
||||||
IP-Adresse:'.$ip.'
|
<tr>
|
||||||
</center>';
|
<td style="height: 20%; vertical-align: bottom; text-align: right; color: #CCCCCC; padding: 50px">'.$ip.'</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
';
|
||||||
}
|
}
|
||||||
|
|
||||||
echo '
|
echo '
|
||||||
</body>
|
</body>
|
||||||
</html>';
|
</html>';
|
||||||
|
|||||||
@@ -48,11 +48,11 @@ if(check_lektor($user))
|
|||||||
<head>
|
<head>
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||||
<link href="../../../skin/style.css.php" rel="stylesheet" type="text/css">
|
<link href="../../../skin/style.css.php" rel="stylesheet" type="text/css">
|
||||||
<link rel="stylesheet" type="text/css" href="../../../skin/jquery-ui-1.9.2.custom.min.css">
|
<link rel="stylesheet" type="text/css" href="../../../skin/jquery-ui-1.9.2.custom.min.css">
|
||||||
<script type="text/javascript" src="../../../vendor/jquery/jquery1/jquery-1.12.4.min.js"></script>
|
<script type="text/javascript" src="../../../vendor/jquery/jquery1/jquery-1.12.4.min.js"></script>
|
||||||
<script type="text/javascript" src="../../../vendor/christianbach/tablesorter/jquery.tablesorter.min.js"></script>
|
<script type="text/javascript" src="../../../vendor/christianbach/tablesorter/jquery.tablesorter.min.js"></script>
|
||||||
<script type="text/javascript" src="../../../vendor/components/jqueryui/jquery-ui.min.js"></script>
|
<script type="text/javascript" src="../../../vendor/components/jqueryui/jquery-ui.min.js"></script>
|
||||||
<script type="text/javascript" src="../../../include/js/jquery.ui.datepicker.translation.js"></script>
|
<script type="text/javascript" src="../../../include/js/jquery.ui.datepicker.translation.js"></script>
|
||||||
<script type="text/javascript" src="../../../vendor/jquery/sizzle/sizzle.js"></script>
|
<script type="text/javascript" src="../../../vendor/jquery/sizzle/sizzle.js"></script>
|
||||||
<link rel="stylesheet" href="../../../skin/tablesort.css" type="text/css"/>
|
<link rel="stylesheet" href="../../../skin/tablesort.css" type="text/css"/>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
@@ -175,16 +175,23 @@ if(check_lektor($user))
|
|||||||
|
|
||||||
<?php
|
<?php
|
||||||
$zeilenzaehl=0;
|
$zeilenzaehl=0;
|
||||||
$sql_query = "SELECT vorname, nachname, telefonklappe, kontakt, ort_kurzbz, beschreibung, vw_mitarbeiter.standort_id
|
$sql_query = "SELECT vorname, nachname, telefonklappe, kontakt, ort_kurzbz, beschreibung, vw_mitarbeiter.standort_id, uid
|
||||||
FROM campus.vw_mitarbeiter
|
FROM campus.vw_mitarbeiter
|
||||||
JOIN public.tbl_benutzerfunktion USING (uid)
|
JOIN public.tbl_benutzerfunktion USING (uid)
|
||||||
JOIN public.tbl_funktion USING (funktion_kurzbz)
|
JOIN public.tbl_funktion USING (funktion_kurzbz)
|
||||||
JOIN public.tbl_kontakt USING (person_id)
|
JOIN public.tbl_kontakt USING (person_id)
|
||||||
WHERE funktion_kurzbz='brandbeauftragt'
|
WHERE funktion_kurzbz='brandbeauftragt'
|
||||||
AND (datum_bis>='now()' OR datum_bis IS NULL)
|
AND (
|
||||||
|
datum_von <= 'now()'
|
||||||
|
OR datum_von IS NULL
|
||||||
|
)
|
||||||
|
AND (
|
||||||
|
datum_bis >= 'now()'
|
||||||
|
OR datum_bis IS NULL
|
||||||
|
)
|
||||||
AND campus.vw_mitarbeiter.aktiv=TRUE
|
AND campus.vw_mitarbeiter.aktiv=TRUE
|
||||||
AND vw_mitarbeiter.standort_id IS NOT NULL
|
AND vw_mitarbeiter.standort_id IS NOT NULL
|
||||||
AND kontakt LIKE '%61925%'
|
AND kontakttyp='firmenhandy'
|
||||||
ORDER BY funktion_kurzbz";
|
ORDER BY funktion_kurzbz";
|
||||||
$result = $db->db_query($sql_query);
|
$result = $db->db_query($sql_query);
|
||||||
if ($db->db_num_rows($result) > 0)
|
if ($db->db_num_rows($result) > 0)
|
||||||
@@ -202,7 +209,7 @@ if(check_lektor($user))
|
|||||||
{
|
{
|
||||||
echo '
|
echo '
|
||||||
<tr>
|
<tr>
|
||||||
<td width="40%">'.$row->nachname.'</td>
|
<td width="40%"><a href="../profile/index.php?uid='.$row->uid.'">'.$row->nachname.'</a></td>
|
||||||
<td width="30%">'.$row->vorname.'</td>
|
<td width="30%">'.$row->vorname.'</td>
|
||||||
<td ><nobr>'.$row->kontakt.'</nobr></td>
|
<td ><nobr>'.$row->kontakt.'</nobr></td>
|
||||||
</tr>';
|
</tr>';
|
||||||
@@ -210,23 +217,6 @@ if(check_lektor($user))
|
|||||||
echo '
|
echo '
|
||||||
</tbody></table>';
|
</tbody></table>';
|
||||||
}
|
}
|
||||||
// An der FHTW wird als Übergangsloesung statisch die Fa. HEALTH COUNSULT als Brandschutzbeauftragte angezeigt
|
|
||||||
if ($db->db_num_rows($result) == 0 && CAMPUS_NAME == 'FH Technikum Wien')
|
|
||||||
{
|
|
||||||
echo '<h2 style="margin-top:0px;">'.$p->t("notfallbestimmungen/brandschutzbeauftragte").'</h2>';
|
|
||||||
echo '<table class="tablesorter" id="t2">
|
|
||||||
<thead>
|
|
||||||
<tr>
|
|
||||||
<th>Name</th>
|
|
||||||
<th>Nummer</th>
|
|
||||||
</tr>
|
|
||||||
</thead><tbody>
|
|
||||||
<tr>
|
|
||||||
<td>HEALT COUNSULT - Sicherheitstechnik GmbH</td>
|
|
||||||
<td ><nobr>0650/30 96 909</nobr></td>
|
|
||||||
</tr>
|
|
||||||
</tbody></table>';
|
|
||||||
}
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<!--Rektorat auslesen-->
|
<!--Rektorat auslesen-->
|
||||||
@@ -325,4 +315,4 @@ if(check_lektor($user))
|
|||||||
</table>
|
</table>
|
||||||
</table>
|
</table>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
@@ -68,7 +68,7 @@ isset($_GET['lehreinheit_id']) ? $lehreinheit = $_GET['lehreinheit_id'] : $lehre
|
|||||||
$stg = new studiengang();
|
$stg = new studiengang();
|
||||||
$stg->load($lv->studiengang_kz);
|
$stg->load($lv->studiengang_kz);
|
||||||
|
|
||||||
$doc = new dokument_export('Anwesenheitslist');
|
$doc = new dokument_export('Anwesenheitslist', $stg->oe_kurzbz);
|
||||||
|
|
||||||
$lehrelisthelper = new LehreListHelper($db, $studiensemester, $lvid, $lv, $stg, $lehreinheit);
|
$lehrelisthelper = new LehreListHelper($db, $studiensemester, $lvid, $lv, $stg, $lehreinheit);
|
||||||
$arr_lehrende = $lehrelisthelper->getArr_Lehrende();
|
$arr_lehrende = $lehrelisthelper->getArr_Lehrende();
|
||||||
|
|||||||
@@ -37,7 +37,6 @@ require_once('../../../include/erhalter.class.php');
|
|||||||
require_once('../../../include/datum.class.php');
|
require_once('../../../include/datum.class.php');
|
||||||
|
|
||||||
|
|
||||||
$doc = new dokument_export('fotoliste');
|
|
||||||
$output = 'pdf';
|
$output = 'pdf';
|
||||||
$show_all_fotos = false;
|
$show_all_fotos = false;
|
||||||
|
|
||||||
@@ -62,6 +61,8 @@ $lv->load($lvid);
|
|||||||
$stg = new studiengang();
|
$stg = new studiengang();
|
||||||
$stg->load($lv->studiengang_kz);
|
$stg->load($lv->studiengang_kz);
|
||||||
|
|
||||||
|
$doc = new dokument_export('fotoliste', $stg->oe_kurzbz);
|
||||||
|
|
||||||
$berechtigung = new benutzerberechtigung();
|
$berechtigung = new benutzerberechtigung();
|
||||||
$berechtigung->getBerechtigungen($user);
|
$berechtigung->getBerechtigungen($user);
|
||||||
|
|
||||||
|
|||||||
@@ -33,6 +33,7 @@ require_once('../../../include/mail.class.php');
|
|||||||
require_once('../../../include/phrasen.class.php');
|
require_once('../../../include/phrasen.class.php');
|
||||||
require_once('../../../include/globals.inc.php');
|
require_once('../../../include/globals.inc.php');
|
||||||
require_once('../../../include/sprache.class.php');
|
require_once('../../../include/sprache.class.php');
|
||||||
|
require_once('../../../include/zeitaufzeichnung.class.php');
|
||||||
|
|
||||||
$sprache = getSprache();
|
$sprache = getSprache();
|
||||||
$lang = new sprache();
|
$lang = new sprache();
|
||||||
@@ -270,20 +271,59 @@ if(isset($_GET['speichern']) && isset($_GET['wtag']))
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//Pruefen ob bereits ein Urlaub in den markierten Bereichen vorhanden ist und ggf Abbrechen
|
//Prüfen, ob eine Zeitaufzeichnung vorhanden ist und ggf Abbrechen
|
||||||
//Das Problem sollte nur beim manuellen Refresh der Seite auftreten
|
$error = false;
|
||||||
$error=false;
|
for ($i = 0; $i < count($akette); $i++)
|
||||||
for($i=0;$i<count($akette);$i++)
|
|
||||||
{
|
{
|
||||||
$zeitsperre = new zeitsperre();
|
$za = new zeitaufzeichnung();
|
||||||
|
$vonDatum = new DateTime($akette[$i]);
|
||||||
|
$bisDatum = new DateTime($ekette[$i]);
|
||||||
|
|
||||||
if($zeitsperre->UrlaubEingetragen($uid, $akette[$i], $ekette[$i]))
|
if ($za->existsZeitaufzeichnung($uid, $vonDatum->format('d.m.Y'), $bisDatum->format('d.m.Y')))
|
||||||
{
|
{
|
||||||
$vgmail.='<br><span class="error">'.$p->t('zeitsperre/urlaubBereitsEingetragen').'</span>';
|
$error = true;
|
||||||
$error=true;
|
$vgmail .= '<br><span class="error">'.$p->t('zeitsperre/zeitaufzeichnungVorhanden'). ' '.
|
||||||
|
$vonDatum->format('d.m.Y'). ' - '. $bisDatum->format('d.m.Y'). '</span>';
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//Prüfen ob eine ganztägige Zeitsperre eingetragen ist und ggf abbrechen
|
||||||
|
$daysToCheck = array();
|
||||||
|
for ($i = 0; $i < count($akette); $i++)
|
||||||
|
{
|
||||||
|
$zeitsperre = new zeitsperre();
|
||||||
|
$vonDatum = new DateTime($akette[$i]);
|
||||||
|
$bisDatum = new DateTime($ekette[$i]);
|
||||||
|
|
||||||
|
//add here to array, weil in der foreach-Schleife, das bisdatum nicht inkludiert ist
|
||||||
|
$daysToCheck[] = $bisDatum->format("Y-m-d");
|
||||||
|
|
||||||
|
$daterange = new DatePeriod($vonDatum, new DateInterval('P1D'), $bisDatum);
|
||||||
|
foreach($daterange as $date)
|
||||||
|
{
|
||||||
|
$daysToCheck[] = $date->format("Y-m-d");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
foreach ($daysToCheck AS $date)
|
||||||
|
{
|
||||||
|
$zeitsperre->getSperreByDate($uid, $date, null, zeitsperre::NUR_BLOCKIERENDE_ZEITSPERREN);
|
||||||
|
|
||||||
|
foreach ($zeitsperre->result as $z)
|
||||||
|
{
|
||||||
|
if ($z->zeitsperretyp_kurzbz)
|
||||||
|
{
|
||||||
|
$error = true;
|
||||||
|
|
||||||
|
$z->zeitsperretyp_kurzbz == 'Urlaub' ?
|
||||||
|
$vgmail.='<br><span class="error">'.$p->t('zeitsperre/urlaubBereitsEingetragen').'</span>' :
|
||||||
|
$vgmail .= '<br><span class="error">'.$p->t('zeitsperre/zeitsperreEingetragen',[$date, $z->zeitsperretyp_kurzbz]). '</span>';
|
||||||
|
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!$error)
|
if(!$error)
|
||||||
@@ -794,13 +834,13 @@ for ($i=0;$i<6;$i++)
|
|||||||
echo '<b>'.$tage[$j+7*$i].'</b><br>';
|
echo '<b>'.$tage[$j+7*$i].'</b><br>';
|
||||||
if(strlen(stristr($tage[$j+7*$i],"."))>0)
|
if(strlen(stristr($tage[$j+7*$i],"."))>0)
|
||||||
{
|
{
|
||||||
echo '<input type="checkbox" name="wtag[]"
|
echo '<input type="checkbox" name="wtag[]"
|
||||||
value="'.date("Y-m-d",mktime(0, 0, 0, substr($tage[$j+7*$i],3,2) , substr($tage[$j+7*$i],0,2), substr($tage[$j+7*$i],6,4))).'"
|
value="'.date("Y-m-d",mktime(0, 0, 0, substr($tage[$j+7*$i],3,2) , substr($tage[$j+7*$i],0,2), substr($tage[$j+7*$i],6,4))).'"
|
||||||
id="'.date("d.m.Y",mktime(0, 0, 0, substr($tage[$j+7*$i],3,2) , substr($tage[$j+7*$i],0,2), substr($tage[$j+7*$i],6,4))).'"></td>';
|
id="'.date("d.m.Y",mktime(0, 0, 0, substr($tage[$j+7*$i],3,2) , substr($tage[$j+7*$i],0,2), substr($tage[$j+7*$i],6,4))).'"></td>';
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
echo '<input type="checkbox" name="wtag[]" value="'.date("Y-m-d",mktime(0, 0, 0, ($wmonat+1) , $tage[$j+7*$i], $jahre[$wjahr])).'"
|
echo '<input type="checkbox" name="wtag[]" value="'.date("Y-m-d",mktime(0, 0, 0, ($wmonat+1) , $tage[$j+7*$i], $jahre[$wjahr])).'"
|
||||||
id="'.date("d.m.Y",mktime(0, 0, 0, ($wmonat+1) , $tage[$j+7*$i], $jahre[$wjahr])).'"></td>';
|
id="'.date("d.m.Y",mktime(0, 0, 0, ($wmonat+1) , $tage[$j+7*$i], $jahre[$wjahr])).'"></td>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -275,7 +275,7 @@ function searchOE($searchItems)
|
|||||||
$oe->result[] = new organisationseinheit($row->oe_kurzbz);
|
$oe->result[] = new organisationseinheit($row->oe_kurzbz);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(count($oe->result)>0)
|
if(is_array($oe->result) && count($oe->result)>0)
|
||||||
{
|
{
|
||||||
echo '<h2 style="padding-bottom: 10px;">',$p->t('global/organisationseinheiten'),'</h2>';
|
echo '<h2 style="padding-bottom: 10px;">',$p->t('global/organisationseinheiten'),'</h2>';
|
||||||
echo '
|
echo '
|
||||||
|
|||||||
@@ -37,6 +37,7 @@ require_once('../../include/gebiet.class.php');
|
|||||||
require_once('../../include/sprache.class.php');
|
require_once('../../include/sprache.class.php');
|
||||||
require_once '../../include/phrasen.class.php';
|
require_once '../../include/phrasen.class.php';
|
||||||
require_once '../../include/reihungstest.class.php';
|
require_once '../../include/reihungstest.class.php';
|
||||||
|
require_once '../../include/pruefling.class.php';
|
||||||
|
|
||||||
if (!$db = new basis_db())
|
if (!$db = new basis_db())
|
||||||
die('Fehler beim Oeffnen der Datenbankverbindung');
|
die('Fehler beim Oeffnen der Datenbankverbindung');
|
||||||
@@ -157,6 +158,12 @@ echo '
|
|||||||
if(!isset($_SESSION['pruefling_id']))
|
if(!isset($_SESSION['pruefling_id']))
|
||||||
die($p->t('testtool/bitteZuerstAnmelden'));
|
die($p->t('testtool/bitteZuerstAnmelden'));
|
||||||
|
|
||||||
|
$pruefling = new pruefling();
|
||||||
|
$pruefling->load($_SESSION['pruefling_id']);
|
||||||
|
|
||||||
|
if ($pruefling->gesperrt === 't')
|
||||||
|
die("<script>document.location.href='prueflinggesperrt.php';</script>");
|
||||||
|
|
||||||
$gebiet = new gebiet($gebiet_id);
|
$gebiet = new gebiet($gebiet_id);
|
||||||
|
|
||||||
if($gebiet->level_start!='')
|
if($gebiet->level_start!='')
|
||||||
|
|||||||
@@ -0,0 +1,39 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
require_once('../../config/cis.config.inc.php');
|
||||||
|
require_once('../../include/basis_db.class.php');
|
||||||
|
require_once('../../include/sprache.class.php');
|
||||||
|
require_once '../../include/phrasen.class.php';
|
||||||
|
|
||||||
|
if (!$db = new basis_db())
|
||||||
|
die('Fehler beim Oeffnen der Datenbankverbindung');
|
||||||
|
|
||||||
|
// Start session
|
||||||
|
session_start();
|
||||||
|
|
||||||
|
// If language is changed by language select menu, reset language variables
|
||||||
|
if (isset($_GET['sprache_user']) && !empty($_GET['sprache_user']))
|
||||||
|
{
|
||||||
|
$_SESSION['sprache_user'] = $_GET['sprache_user'];
|
||||||
|
$sprache_user = $_GET['sprache_user'];
|
||||||
|
}
|
||||||
|
|
||||||
|
// Set language variable
|
||||||
|
$sprache_user = (isset($_SESSION['sprache_user']) && !empty($_SESSION['sprache_user'])) ? $_SESSION['sprache_user'] : DEFAULT_LANGUAGE;
|
||||||
|
$p = new phrasen($sprache_user);
|
||||||
|
|
||||||
|
?>
|
||||||
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||||
|
<link href="../../skin/style.css.php" rel="stylesheet" type="text/css">
|
||||||
|
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
<br><br><br><br><br>
|
||||||
|
<center><h2><?php echo $p->t('testtool/prueflingGesperrt');?></h2>
|
||||||
|
</center>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
@@ -175,7 +175,7 @@ SELECT
|
|||||||
SELECT
|
SELECT
|
||||||
'Verlinkung von '||content_id AS art
|
'Verlinkung von '||content_id AS art
|
||||||
FROM campus.tbl_contentsprache
|
FROM campus.tbl_contentsprache
|
||||||
WHERE content::text LIKE '%content.php?content_id='||content.content_id||'%'
|
WHERE content::text LIKE '%content.php?content_id='||content.content_id
|
||||||
/*WHERE content::text ~* '[\w\d\s]*content\.php\?content_id=1245[\w\d\s]*'*/
|
/*WHERE content::text ~* '[\w\d\s]*content\.php\?content_id=1245[\w\d\s]*'*/
|
||||||
) verwendung
|
) verwendung
|
||||||
) AS verwendung_in,
|
) AS verwendung_in,
|
||||||
|
|||||||
@@ -1477,7 +1477,7 @@ if(!$error)
|
|||||||
$lema_new->insertamum = date('Y-m-d H:i:s');
|
$lema_new->insertamum = date('Y-m-d H:i:s');
|
||||||
$lema_new->insertvon = $user;
|
$lema_new->insertvon = $user;
|
||||||
$lema_new->ext_id = $row->ext_id;
|
$lema_new->ext_id = $row->ext_id;
|
||||||
$lema_new->vertrag_id = $row->vertrag_id;
|
$lema_new->vertrag_id = '';
|
||||||
|
|
||||||
if (!$lema_new->save(true))
|
if (!$lema_new->save(true))
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -95,6 +95,7 @@ if(!$rechte->isBerechtigt('admin') && !$rechte->isBerechtigt('assistenz') && !$r
|
|||||||
$data = '';
|
$data = '';
|
||||||
$error = true;
|
$error = true;
|
||||||
}
|
}
|
||||||
|
$check_statusaenderung_berechtigung = 'student/keine_studstatuspruefung';
|
||||||
|
|
||||||
// *** FUNKTIONEN ***
|
// *** FUNKTIONEN ***
|
||||||
|
|
||||||
@@ -372,6 +373,175 @@ function isBuchungAllowedToChange($buchung_obj)
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* Prüft für einen Prestudenten, ob eine bestimmte Statusänderung valide ist.
|
||||||
|
* @param $prestudent_id
|
||||||
|
* @param $status_kurzbz des neuen/bearbeiteten Status
|
||||||
|
* @param $new_status_studiensemester Studiensemester des neuen/zu ändernen Status
|
||||||
|
* @param $new_status_datum Datum des neuen/zu ändernen Status
|
||||||
|
* @param $new_status_ausbildungssemester Ausbildungssemester des neuen/zu ändernen Status
|
||||||
|
* @param $old_status_studiensemester Studiensemester des alten Status, leer wenn neuer Status
|
||||||
|
* @param $old_status_ausbildungssemester Ausbildungssemester des alten Status, leer wenn neuer Status
|
||||||
|
* @return array
|
||||||
|
*/
|
||||||
|
function checkStatusaenderung(
|
||||||
|
$prestudent_id, $status_kurzbz, $new_status_studiensemester, $new_status_datum, $new_status_ausbildungssemester,
|
||||||
|
$old_status_studiensemester = '', $old_status_ausbildungssemester = ''
|
||||||
|
)
|
||||||
|
{
|
||||||
|
global $db;
|
||||||
|
// Es ist ein neuer Status wenn es kein altes Semester gibt
|
||||||
|
$isNewStatus = $old_status_studiensemester == '' && $old_status_ausbildungssemester == '';
|
||||||
|
// status_kurzbz für Endstatus
|
||||||
|
$endstatusArr = array('Absolvent', 'Abbrecher');
|
||||||
|
// Datum des neuen Status setzen
|
||||||
|
$new_status_datum = new DateTime($new_status_datum);
|
||||||
|
|
||||||
|
// Wenn neuer Status
|
||||||
|
if ($isNewStatus)
|
||||||
|
{
|
||||||
|
// Datum des neuen Status darf nicht in Vergangenheit liegen, sonst Probleme wenn neues Datum < Bismeldedatum
|
||||||
|
$current_date = new DateTime('today');
|
||||||
|
if ($new_status_datum < $current_date)
|
||||||
|
{
|
||||||
|
return array(
|
||||||
|
'error' => true,
|
||||||
|
'errormsg' => 'Datum eines neuen Statuseintrags darf nicht in der Vergangenheit liegen'
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// start des Studiensemesters holen
|
||||||
|
$studiensemester = new studiensemester();
|
||||||
|
$studiensemester->load($new_status_studiensemester);
|
||||||
|
$new_status_semesterstart = new DateTime($studiensemester->start);
|
||||||
|
|
||||||
|
// Alle bisherigen prestudentstatus nach Datum sortiert
|
||||||
|
$qry = "SELECT status_kurzbz, studiensemester_kurzbz, ausbildungssemester, datum, sem.start AS studiensemester_start
|
||||||
|
FROM public.tbl_prestudentstatus pss
|
||||||
|
JOIN public.tbl_studiensemester sem USING (studiensemester_kurzbz)
|
||||||
|
WHERE prestudent_id=".$db->db_add_param($prestudent_id, FHC_INTEGER);
|
||||||
|
|
||||||
|
// zu ändernden Status rausfiltern wenn Status bearbeitet wird
|
||||||
|
if (!$isNewStatus)
|
||||||
|
{
|
||||||
|
$qry .= " AND NOT (
|
||||||
|
status_kurzbz=".$db->db_add_param($status_kurzbz)
|
||||||
|
." AND studiensemester_kurzbz=".$db->db_add_param($old_status_studiensemester)
|
||||||
|
." AND ausbildungssemester=".$db->db_add_param($old_status_ausbildungssemester, FHC_INTEGER)."
|
||||||
|
)";
|
||||||
|
}
|
||||||
|
|
||||||
|
$qry .= " ORDER BY datum DESC, pss.insertamum DESC, pss.ext_id DESC";
|
||||||
|
|
||||||
|
$statusArr = array();
|
||||||
|
if ($result = $db->db_query($qry))
|
||||||
|
{
|
||||||
|
$newStatusInserted = false;
|
||||||
|
|
||||||
|
// für jeden Status
|
||||||
|
while ($row = $db->db_fetch_object($result))
|
||||||
|
{
|
||||||
|
$studiensemester_start = new DateTime($row->studiensemester_start);
|
||||||
|
$status_datum = new DateTime($row->datum);
|
||||||
|
|
||||||
|
// Neuer/editierter Statuseintrag nach bestehendem Statuseintrag
|
||||||
|
if ($new_status_datum >= $status_datum && $new_status_semesterstart >= $studiensemester_start)
|
||||||
|
{
|
||||||
|
if (!$newStatusInserted)
|
||||||
|
{
|
||||||
|
// neuer Status erstmals größer als Datum eines bestehenden Status -> neuen Status einfügen
|
||||||
|
$new_status = new stdClass();
|
||||||
|
$new_status->status_kurzbz = $status_kurzbz;
|
||||||
|
$new_status->studiensemester_kurzbz = $new_status_studiensemester;
|
||||||
|
$new_status->datum = $new_status_datum;
|
||||||
|
$new_status->ausbildungssemester = $new_status_ausbildungssemester;
|
||||||
|
$statusArr[] = $new_status;
|
||||||
|
$newStatusInserted = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Gültige Zeitabfolge, bestehenden Status hinzufügen
|
||||||
|
$statusArr[] = $row;
|
||||||
|
}
|
||||||
|
// oder Neuer/editierter Statuseintrag nach bestehendem Statuseintrag
|
||||||
|
elseif ($new_status_datum <= $status_datum && $new_status_semesterstart <= $studiensemester_start)
|
||||||
|
{
|
||||||
|
// Gültige Zeitabfolge, bestehenden Status hinzufügen
|
||||||
|
$statusArr[] = $row;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// Zeitabfolge ungültig, Fehler
|
||||||
|
return array(
|
||||||
|
'error' => true,
|
||||||
|
'errormsg' => 'Datum des Statuseintrags muss nach dem Statusdatum,'
|
||||||
|
.' Semesterstartdatum nach Semesterstartdatum des vorherigen Statuseintrags sein'
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Prüfungen den Prestudentstatus betreffend
|
||||||
|
// Über alle gespeicherten Status gehen und Statusabfolge prüfen
|
||||||
|
for ($i = 0; $i < count($statusArr); $i++)
|
||||||
|
{
|
||||||
|
$curr_status = $statusArr[$i];
|
||||||
|
$curr_status_kurzbz = $curr_status->status_kurzbz;
|
||||||
|
$curr_status_ausbildungssemester = $curr_status->ausbildungssemester;
|
||||||
|
$next_idx = $i - 1; //absteigend sortiert, nächster Status ist vorheriger Eintrag
|
||||||
|
$next_status = isset($statusArr[$next_idx]) ? $statusArr[$next_idx] : null;
|
||||||
|
|
||||||
|
// Abbrecher- oder Absolventenstatus muss Endstatus sein
|
||||||
|
if (isset($next_status) && in_array($curr_status_kurzbz, $endstatusArr))
|
||||||
|
{
|
||||||
|
return array(
|
||||||
|
'error' => true,
|
||||||
|
'errormsg' => 'Nach Abbrecher- und Absolventenstatus darf kein anderer Status mehr eingetragen werden'
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
// wenn Unterbrecher auf Unterbrecher folgt, muss Ausbildungssemester gleich sein
|
||||||
|
if (
|
||||||
|
$curr_status_kurzbz == 'Unterbrecher' && isset($next_status) && $next_status->status_kurzbz == 'Unterbrecher'
|
||||||
|
&& $curr_status_ausbildungssemester != $next_status->ausbildungssemester
|
||||||
|
)
|
||||||
|
{
|
||||||
|
return array(
|
||||||
|
'error' => true,
|
||||||
|
'errormsg' => 'Aufeinanderfolgende Unterbrecher müssen gleiches Ausbildungssemester haben'
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
// wenn Abbrecher auf Unterbrecher folgt, muss Ausbildungssemester gleich sein
|
||||||
|
if (
|
||||||
|
isset($next_status) && $curr_status_kurzbz == 'Unterbrecher'
|
||||||
|
&& $next_status->status_kurzbz == 'Abbrecher' && $curr_status_ausbildungssemester != $next_status->ausbildungssemester
|
||||||
|
)
|
||||||
|
{
|
||||||
|
return array(
|
||||||
|
'error' => true,
|
||||||
|
'errormsg' => 'Unterbrecher und folgender Abbrecher müssen gleiches Ausbildungssemester haben'
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
// keine Studenten nach Diplomand Status
|
||||||
|
if (
|
||||||
|
isset($next_status) && $curr_status_kurzbz == 'Diplomand' && $next_status->status_kurzbz == 'Student'
|
||||||
|
)
|
||||||
|
{
|
||||||
|
return array(
|
||||||
|
'error' => true,
|
||||||
|
'errormsg' => 'Nach Diplomantenstatus darf kein Studentenstatus mehr eingetragen werden'
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
return array('error' => true, 'errormsg' => 'Fehler bei Statusänderungcheck');
|
||||||
|
|
||||||
|
return array('error' => false, 'errormsg' => '');
|
||||||
|
}
|
||||||
|
|
||||||
if(!$error)
|
if(!$error)
|
||||||
{
|
{
|
||||||
|
|
||||||
@@ -403,7 +573,7 @@ if(!$error)
|
|||||||
$return = false;
|
$return = false;
|
||||||
$errormsg = 'Geburtsdatum ist nicht korrekt.';
|
$errormsg = 'Geburtsdatum ist nicht korrekt.';
|
||||||
$error = true;
|
$error = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!$error)
|
if(!$error)
|
||||||
{
|
{
|
||||||
@@ -648,12 +818,12 @@ if(!$error)
|
|||||||
$prestudent->zgvort = $_POST['zgvort'];
|
$prestudent->zgvort = $_POST['zgvort'];
|
||||||
$prestudent->zgvdatum = $_POST['zgvdatum'];
|
$prestudent->zgvdatum = $_POST['zgvdatum'];
|
||||||
$prestudent->zgvnation = $_POST['zgvnation'];
|
$prestudent->zgvnation = $_POST['zgvnation'];
|
||||||
$prestudent->zgv_erfuellt = $_POST['zgv_erfuellt'];
|
$prestudent->zgv_erfuellt = $_POST['zgv_erfuellt'];
|
||||||
$prestudent->zgvmas_code = $_POST['zgvmas_code'];
|
$prestudent->zgvmas_code = $_POST['zgvmas_code'];
|
||||||
$prestudent->zgvmaort = $_POST['zgvmaort'];
|
$prestudent->zgvmaort = $_POST['zgvmaort'];
|
||||||
$prestudent->zgvmadatum = $_POST['zgvmadatum'];
|
$prestudent->zgvmadatum = $_POST['zgvmadatum'];
|
||||||
$prestudent->zgvmanation = $_POST['zgvmanation'];
|
$prestudent->zgvmanation = $_POST['zgvmanation'];
|
||||||
$prestudent->zgvmas_erfuellt = $_POST['zgvmas_erfuellt'];
|
$prestudent->zgvmas_erfuellt = $_POST['zgvmas_erfuellt'];
|
||||||
$prestudent->zgvdoktor_code = $_POST['zgvdoktor_code'];
|
$prestudent->zgvdoktor_code = $_POST['zgvdoktor_code'];
|
||||||
$prestudent->zgvdoktorort = $_POST['zgvdoktorort'];
|
$prestudent->zgvdoktorort = $_POST['zgvdoktorort'];
|
||||||
$prestudent->zgvdoktordatum = $_POST['zgvdoktordatum'];
|
$prestudent->zgvdoktordatum = $_POST['zgvdoktordatum'];
|
||||||
@@ -808,6 +978,28 @@ if(!$error)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// wenn keine spezielle Berechtiung zur Umgebung, Statusänderung Checks durchführen
|
||||||
|
if (!$rechte->isBerechtigt($check_statusaenderung_berechtigung))
|
||||||
|
{
|
||||||
|
$new_status_datum = isset($_POST['datum']) ? $_POST['datum'] : date('Y-m-d');
|
||||||
|
|
||||||
|
$check_statusaenderung_result = checkStatusaenderung(
|
||||||
|
$prestudent_id,
|
||||||
|
$_POST['status_kurzbz'],
|
||||||
|
$studiensemester,
|
||||||
|
$new_status_datum,
|
||||||
|
$sem
|
||||||
|
);
|
||||||
|
|
||||||
|
if (isset($check_statusaenderung_result['error']) && $check_statusaenderung_result['error'] === true)
|
||||||
|
{
|
||||||
|
$return = false;
|
||||||
|
$error = true;
|
||||||
|
$errormsg .= isset($check_statusaenderung_result['errormsg']) ? $check_statusaenderung_result['errormsg'] : '';
|
||||||
|
$anzahl_fehler++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if(!$error)
|
if(!$error)
|
||||||
{
|
{
|
||||||
$prestd_neu = new prestudent();
|
$prestd_neu = new prestudent();
|
||||||
@@ -1003,7 +1195,7 @@ if(!$error)
|
|||||||
isset($_POST['prestudent_id']) && is_numeric($_POST['prestudent_id']) &&
|
isset($_POST['prestudent_id']) && is_numeric($_POST['prestudent_id']) &&
|
||||||
isset($_POST['ausbildungssemester']) && is_numeric($_POST['ausbildungssemester']))
|
isset($_POST['ausbildungssemester']) && is_numeric($_POST['ausbildungssemester']))
|
||||||
{
|
{
|
||||||
if($_POST['status_kurzbz']=='Student' && !$rechte->isBerechtigt('admin', null, 'suid'))
|
if($_POST['status_kurzbz']=='Student' && !$rechte->isBerechtigt('admin', null, 'suid') && !$rechte->isBerechtigt('student/keine_studstatuspruefung', null, 'suid'))
|
||||||
{
|
{
|
||||||
$return = false;
|
$return = false;
|
||||||
$errormsg = 'Studentenrolle kann nur durch den Administrator geloescht werden';
|
$errormsg = 'Studentenrolle kann nur durch den Administrator geloescht werden';
|
||||||
@@ -1019,7 +1211,7 @@ if(!$error)
|
|||||||
if($row->anzahl<=1)
|
if($row->anzahl<=1)
|
||||||
{
|
{
|
||||||
$deletePrestudent = true;
|
$deletePrestudent = true;
|
||||||
if (!$rechte->isBerechtigt('admin', null, 'suid'))
|
if (!$rechte->isBerechtigt('admin', null, 'suid') && !$rechte->isBerechtigt('student/keine_studstatuspruefung', null, 'suid'))
|
||||||
{
|
{
|
||||||
$return = false;
|
$return = false;
|
||||||
$errormsg = 'Die letzte Rolle kann nur durch den Administrator geloescht werden';
|
$errormsg = 'Die letzte Rolle kann nur durch den Administrator geloescht werden';
|
||||||
@@ -1307,6 +1499,28 @@ if(!$error)
|
|||||||
$rolle->new = false;
|
$rolle->new = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Statuschecks durchführen wenn keine spezielle Berechtigung zur Umgehung
|
||||||
|
if (!$rechte->isBerechtigt($check_statusaenderung_berechtigung))
|
||||||
|
{
|
||||||
|
// allgemeine Prüfung bei Änderung oder Hinzufügen eines Status, inkludiert alle Status
|
||||||
|
$check_statusaenderung_result = checkStatusaenderung(
|
||||||
|
$_POST['prestudent_id'],
|
||||||
|
$_POST['status_kurzbz'],
|
||||||
|
$_POST['studiensemester_kurzbz'],
|
||||||
|
$_POST['datum'],
|
||||||
|
$_POST['ausbildungssemester'],
|
||||||
|
$_POST['studiensemester_old'],
|
||||||
|
$_POST['ausbildungssemester_old']
|
||||||
|
);
|
||||||
|
|
||||||
|
if (isset($check_statusaenderung_result['error']) && $check_statusaenderung_result['error'] === true)
|
||||||
|
{
|
||||||
|
$return = false;
|
||||||
|
$error = true;
|
||||||
|
$errormsg = isset($check_statusaenderung_result['errormsg']) ? $check_statusaenderung_result['errormsg'] : '';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if(!$error)
|
if(!$error)
|
||||||
{
|
{
|
||||||
// Bei Studenten wird der Studentlehrverband Eintrag angelegt/korrigiert
|
// Bei Studenten wird der Studentlehrverband Eintrag angelegt/korrigiert
|
||||||
@@ -2361,7 +2575,7 @@ if(!$error)
|
|||||||
{
|
{
|
||||||
if ($dokument_kurzbz === 'Sonst' && $sonst !== 0)
|
if ($dokument_kurzbz === 'Sonst' && $sonst !== 0)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if($dokument_kurzbz!='')
|
if($dokument_kurzbz!='')
|
||||||
{
|
{
|
||||||
$dok = new dokument();
|
$dok = new dokument();
|
||||||
@@ -2374,7 +2588,7 @@ if(!$error)
|
|||||||
$dok->new = true;
|
$dok->new = true;
|
||||||
if ($dokument_kurzbz === 'Sonst')
|
if ($dokument_kurzbz === 'Sonst')
|
||||||
$sonst++;
|
$sonst++;
|
||||||
|
|
||||||
|
|
||||||
if(!$dok->save())
|
if(!$dok->save())
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -71,9 +71,10 @@ echo '<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>';
|
|||||||
<row>
|
<row>
|
||||||
<label value="Person ID" control="student-detail-textbox-person_id"/>
|
<label value="Person ID" control="student-detail-textbox-person_id"/>
|
||||||
<hbox><textbox id="student-detail-textbox-person_id" readonly="true" maxlength="16" size="16"/></hbox>
|
<hbox><textbox id="student-detail-textbox-person_id" readonly="true" maxlength="16" size="16"/></hbox>
|
||||||
<label value="Zugangscode" control="student-detail-zugangscode"/>
|
<?php $hideZugangscode = (defined('ACTIVE_ADDONS') && strpos(ACTIVE_ADDONS, 'bewerbung') !== false) ? '':' hidden="true"'; ?>
|
||||||
|
<label value="Zugangscode" control="student-detail-zugangscode" <?php echo $hideZugangscode; ?>/>
|
||||||
<label id="label-student-detail-link_bewerbungstool" hidden="true" value=""></label>
|
<label id="label-student-detail-link_bewerbungstool" hidden="true" value=""></label>
|
||||||
<label class="text-link" href="#" id="label-student-detail-zugangscode" value="" onclick="window.open(document.getElementById('label-student-detail-link_bewerbungstool').value)"/>
|
<label class="text-link" href="#" id="label-student-detail-zugangscode" value="" <?php echo $hideZugangscode; ?> onclick="window.open(document.getElementById('label-student-detail-link_bewerbungstool').value)"/>
|
||||||
<?php $hideBpk = $rechte->isBerechtigt('student/bpk') ? '':' hidden="true"'; ?>
|
<?php $hideBpk = $rechte->isBerechtigt('student/bpk') ? '':' hidden="true"'; ?>
|
||||||
<label value="BPK" control="student-detail-textbox-bpk"<?php echo $hideBpk; ?>/>
|
<label value="BPK" control="student-detail-textbox-bpk"<?php echo $hideBpk; ?>/>
|
||||||
<hbox><textbox id="student-detail-textbox-bpk" disabled="true" maxlength="28" size="50"<?php echo $hideBpk; ?>/></hbox>
|
<hbox><textbox id="student-detail-textbox-bpk" disabled="true" maxlength="28" size="50"<?php echo $hideBpk; ?>/></hbox>
|
||||||
|
|||||||
@@ -1025,7 +1025,10 @@ function StudentCount()
|
|||||||
// ****
|
// ****
|
||||||
function StudentAuswahl()
|
function StudentAuswahl()
|
||||||
{
|
{
|
||||||
document.getElementById('student-toolbar-label-anzahl').value = 'Anzahl: ' + StudentCount();
|
var tree=document.getElementById('student-tree');
|
||||||
|
var items = tree.view.rowCount; //Anzahl der Zeilen ermitteln
|
||||||
|
|
||||||
|
document.getElementById('student-toolbar-label-anzahl').value = 'Anzahl: ' + StudentCount() + '/' + items;
|
||||||
|
|
||||||
if(!StudentTreeLoadDataOnSelect)
|
if(!StudentTreeLoadDataOnSelect)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -160,8 +160,6 @@ $is_hidden = (!defined('FAS_STUDIERENDE_PROJEKTARBEIT_VERTRAGSDETAILS_ANZEIGEN')
|
|||||||
<vbox hidden="true">
|
<vbox hidden="true">
|
||||||
<label value="Neu"/>
|
<label value="Neu"/>
|
||||||
<checkbox id="student-projektarbeit-checkbox-neu" checked="true" />
|
<checkbox id="student-projektarbeit-checkbox-neu" checked="true" />
|
||||||
<label value="Projektarbeit ID"/>
|
|
||||||
<textbox id="student-projektarbeit-textbox-projektarbeit_id" disabled="true"/>
|
|
||||||
</vbox>
|
</vbox>
|
||||||
<groupbox flex="1">
|
<groupbox flex="1">
|
||||||
<caption label="Details"/>
|
<caption label="Details"/>
|
||||||
@@ -171,6 +169,10 @@ $is_hidden = (!defined('FAS_STUDIERENDE_PROJEKTARBEIT_VERTRAGSDETAILS_ANZEIGEN')
|
|||||||
<column flex="5"/>
|
<column flex="5"/>
|
||||||
</columns>
|
</columns>
|
||||||
<rows>
|
<rows>
|
||||||
|
<row>
|
||||||
|
<label value="Projektarbeit ID" control="student-projektarbeit-textbox-projektarbeit_id"/>
|
||||||
|
<hbox><textbox id="student-projektarbeit-textbox-projektarbeit_id" readonly="true" maxlength="16" size="16"/></hbox>
|
||||||
|
</row>
|
||||||
<row>
|
<row>
|
||||||
<label value="Titel" control="student-projektarbeit-textbox-titel"/>
|
<label value="Titel" control="student-projektarbeit-textbox-titel"/>
|
||||||
<textbox id="student-projektarbeit-textbox-titel" disabled="true" maxlength="1024" />
|
<textbox id="student-projektarbeit-textbox-titel" disabled="true" maxlength="1024" />
|
||||||
|
|||||||
@@ -154,7 +154,7 @@ class datum
|
|||||||
public function checkDatum($datum)
|
public function checkDatum($datum)
|
||||||
{
|
{
|
||||||
//Format dd.mm.yyyy
|
//Format dd.mm.yyyy
|
||||||
if(mb_ereg("([0-9]{2}).([0-9]{2}).([0-9]{4})$", $datum))
|
if(mb_ereg("([0-9]{2})[.]([0-9]{2})[.]([0-9]{4})$", $datum))
|
||||||
{
|
{
|
||||||
|
|
||||||
$year = substr($datum, 6, 4);
|
$year = substr($datum, 6, 4);
|
||||||
|
|||||||
@@ -1,38 +0,0 @@
|
|||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
||||||
<!--
|
|
||||||
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
|
|
||||||
* Copyright (C) 2003-2008 Frederico Caldeira Knabben
|
|
||||||
*
|
|
||||||
* == BEGIN LICENSE ==
|
|
||||||
*
|
|
||||||
* Licensed under the terms of any of the following licenses at your
|
|
||||||
* choice:
|
|
||||||
*
|
|
||||||
* - GNU General Public License Version 2 or later (the "GPL")
|
|
||||||
* http://www.gnu.org/licenses/gpl.html
|
|
||||||
*
|
|
||||||
* - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
|
|
||||||
* http://www.gnu.org/licenses/lgpl.html
|
|
||||||
*
|
|
||||||
* - Mozilla Public License Version 1.1 or later (the "MPL")
|
|
||||||
* http://www.mozilla.org/MPL/MPL-1.1.html
|
|
||||||
*
|
|
||||||
* == END LICENSE ==
|
|
||||||
-->
|
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
|
||||||
<head>
|
|
||||||
<title>FCKeditor - Documentation</title>
|
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
|
||||||
<style type="text/css">
|
|
||||||
body { font-family: arial, verdana, sans-serif }
|
|
||||||
p { margin-left: 20px }
|
|
||||||
</style>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<h1>
|
|
||||||
FCKeditor Documentation</h1>
|
|
||||||
<p>
|
|
||||||
You can find the official documentation for FCKeditor online, at <a href="http://docs.fckeditor.net/">
|
|
||||||
http://docs.fckeditor.net/</a>.</p>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
@@ -1,38 +0,0 @@
|
|||||||
/*
|
|
||||||
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
|
|
||||||
* Copyright (C) 2003-2008 Frederico Caldeira Knabben
|
|
||||||
*
|
|
||||||
* == BEGIN LICENSE ==
|
|
||||||
*
|
|
||||||
* Licensed under the terms of any of the following licenses at your
|
|
||||||
* choice:
|
|
||||||
*
|
|
||||||
* - GNU General Public License Version 2 or later (the "GPL")
|
|
||||||
* http://www.gnu.org/licenses/gpl.html
|
|
||||||
*
|
|
||||||
* - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
|
|
||||||
* http://www.gnu.org/licenses/lgpl.html
|
|
||||||
*
|
|
||||||
* - Mozilla Public License Version 1.1 or later (the "MPL")
|
|
||||||
* http://www.mozilla.org/MPL/MPL-1.1.html
|
|
||||||
*
|
|
||||||
* == END LICENSE ==
|
|
||||||
*
|
|
||||||
* This is the sample plugin definition file.
|
|
||||||
*/
|
|
||||||
|
|
||||||
// Register the related commands.
|
|
||||||
FCKCommands.RegisterCommand( 'My_Find' , new FCKDialogCommand( FCKLang['DlgMyFindTitle'] , FCKLang['DlgMyFindTitle'] , FCKConfig.PluginsPath + 'findreplace/find.html' , 340, 170 ) ) ;
|
|
||||||
FCKCommands.RegisterCommand( 'My_Replace' , new FCKDialogCommand( FCKLang['DlgMyReplaceTitle'], FCKLang['DlgMyReplaceTitle'] , FCKConfig.PluginsPath + 'findreplace/replace.html', 340, 200 ) ) ;
|
|
||||||
|
|
||||||
// Create the "Find" toolbar button.
|
|
||||||
var oFindItem = new FCKToolbarButton( 'My_Find', FCKLang['DlgMyFindTitle'] ) ;
|
|
||||||
oFindItem.IconPath = FCKConfig.PluginsPath + 'findreplace/find.gif' ;
|
|
||||||
|
|
||||||
FCKToolbarItems.RegisterItem( 'My_Find', oFindItem ) ; // 'My_Find' is the name used in the Toolbar config.
|
|
||||||
|
|
||||||
// Create the "Replace" toolbar button.
|
|
||||||
var oReplaceItem = new FCKToolbarButton( 'My_Replace', FCKLang['DlgMyReplaceTitle'] ) ;
|
|
||||||
oReplaceItem.IconPath = FCKConfig.PluginsPath + 'findreplace/replace.gif' ;
|
|
||||||
|
|
||||||
FCKToolbarItems.RegisterItem( 'My_Replace', oReplaceItem ) ; // 'My_Replace' is the name used in the Toolbar config.
|
|
||||||
Binary file not shown.
|
Before Width: | Height: | Size: 595 B |
@@ -1,172 +0,0 @@
|
|||||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
|
||||||
<!--
|
|
||||||
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
|
|
||||||
* Copyright (C) 2003-2008 Frederico Caldeira Knabben
|
|
||||||
*
|
|
||||||
* == BEGIN LICENSE ==
|
|
||||||
*
|
|
||||||
* Licensed under the terms of any of the following licenses at your
|
|
||||||
* choice:
|
|
||||||
*
|
|
||||||
* - GNU General Public License Version 2 or later (the "GPL")
|
|
||||||
* http://www.gnu.org/licenses/gpl.html
|
|
||||||
*
|
|
||||||
* - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
|
|
||||||
* http://www.gnu.org/licenses/lgpl.html
|
|
||||||
*
|
|
||||||
* - Mozilla Public License Version 1.1 or later (the "MPL")
|
|
||||||
* http://www.mozilla.org/MPL/MPL-1.1.html
|
|
||||||
*
|
|
||||||
* == END LICENSE ==
|
|
||||||
*
|
|
||||||
* This is the sample "Find" plugin window.
|
|
||||||
-->
|
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
|
||||||
<meta content="noindex, nofollow" name="robots">
|
|
||||||
<script type="text/javascript">
|
|
||||||
|
|
||||||
var oEditor = window.parent.InnerDialogLoaded() ;
|
|
||||||
|
|
||||||
function OnLoad()
|
|
||||||
{
|
|
||||||
// Whole word is available on IE only.
|
|
||||||
if ( oEditor.FCKBrowserInfo.IsIE )
|
|
||||||
document.getElementById('divWord').style.display = '' ;
|
|
||||||
|
|
||||||
// First of all, translate the dialog box texts.
|
|
||||||
oEditor.FCKLanguageManager.TranslatePage( document ) ;
|
|
||||||
|
|
||||||
window.parent.SetAutoSize( true ) ;
|
|
||||||
}
|
|
||||||
|
|
||||||
function btnStat(frm)
|
|
||||||
{
|
|
||||||
document.getElementById('btnFind').disabled =
|
|
||||||
( document.getElementById('txtFind').value.length == 0 ) ;
|
|
||||||
}
|
|
||||||
|
|
||||||
function ReplaceTextNodes( parentNode, regex, replaceValue, replaceAll )
|
|
||||||
{
|
|
||||||
for ( var i = 0 ; i < parentNode.childNodes.length ; i++ )
|
|
||||||
{
|
|
||||||
var oNode = parentNode.childNodes[i] ;
|
|
||||||
if ( oNode.nodeType == 3 )
|
|
||||||
{
|
|
||||||
var sReplaced = oNode.nodeValue.replace( regex, replaceValue ) ;
|
|
||||||
if ( oNode.nodeValue != sReplaced )
|
|
||||||
{
|
|
||||||
oNode.nodeValue = sReplaced ;
|
|
||||||
if ( ! replaceAll )
|
|
||||||
return true ;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if ( ReplaceTextNodes( oNode, regex, replaceValue ) )
|
|
||||||
return true ;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return false ;
|
|
||||||
}
|
|
||||||
|
|
||||||
function GetRegexExpr()
|
|
||||||
{
|
|
||||||
if ( document.getElementById('chkWord').checked )
|
|
||||||
var sExpr = '\\b' + document.getElementById('txtFind').value + '\\b' ;
|
|
||||||
else
|
|
||||||
var sExpr = document.getElementById('txtFind').value ;
|
|
||||||
|
|
||||||
return sExpr ;
|
|
||||||
}
|
|
||||||
|
|
||||||
function GetCase()
|
|
||||||
{
|
|
||||||
return ( document.getElementById('chkCase').checked ? '' : 'i' ) ;
|
|
||||||
}
|
|
||||||
|
|
||||||
function Ok()
|
|
||||||
{
|
|
||||||
if ( document.getElementById('txtFind').value.length == 0 )
|
|
||||||
return ;
|
|
||||||
|
|
||||||
if ( oEditor.FCKBrowserInfo.IsIE )
|
|
||||||
FindIE() ;
|
|
||||||
else
|
|
||||||
FindGecko() ;
|
|
||||||
}
|
|
||||||
|
|
||||||
var oRange = null ;
|
|
||||||
|
|
||||||
function FindIE()
|
|
||||||
{
|
|
||||||
if ( oRange == null )
|
|
||||||
oRange = oEditor.FCK.EditorDocument.body.createTextRange() ;
|
|
||||||
|
|
||||||
var iFlags = 0 ;
|
|
||||||
|
|
||||||
if ( chkCase.checked )
|
|
||||||
iFlags = iFlags | 4 ;
|
|
||||||
|
|
||||||
if ( chkWord.checked )
|
|
||||||
iFlags = iFlags | 2 ;
|
|
||||||
|
|
||||||
var bFound = oRange.findText( document.getElementById('txtFind').value, 1, iFlags ) ;
|
|
||||||
|
|
||||||
if ( bFound )
|
|
||||||
{
|
|
||||||
oRange.scrollIntoView() ;
|
|
||||||
oRange.select() ;
|
|
||||||
oRange.collapse(false) ;
|
|
||||||
oLastRangeFound = oRange ;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
oRange = null ;
|
|
||||||
alert( oEditor.FCKLang.DlgFindNotFoundMsg ) ;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function FindGecko()
|
|
||||||
{
|
|
||||||
var bCase = document.getElementById('chkCase').checked ;
|
|
||||||
var bWord = document.getElementById('chkWord').checked ;
|
|
||||||
|
|
||||||
// window.find( searchString, caseSensitive, backwards, wrapAround, wholeWord, searchInFrames, showDialog ) ;
|
|
||||||
oEditor.FCK.EditorWindow.find( document.getElementById('txtFind').value, bCase, false, false, bWord, false, false ) ;
|
|
||||||
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
</head>
|
|
||||||
<body onload="OnLoad()" scroll="no" style="OVERFLOW: hidden">
|
|
||||||
<div align="center">
|
|
||||||
This is my Plugin!
|
|
||||||
</div>
|
|
||||||
<table cellSpacing="3" cellPadding="2" width="100%" border="0">
|
|
||||||
<tr>
|
|
||||||
<td nowrap>
|
|
||||||
<label for="txtFind" fckLang="DlgMyReplaceFindLbl">Find what:</label>
|
|
||||||
</td>
|
|
||||||
<td width="100%">
|
|
||||||
<input id="txtFind" onkeyup="btnStat(this.form)" style="WIDTH: 100%" tabIndex="1" type="text">
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<input id="btnFind" style="WIDTH: 100%; PADDING-RIGHT: 5px; PADDING-LEFT: 5px" disabled
|
|
||||||
onclick="Ok();" type="button" value="Find" fckLang="DlgMyFindFindBtn">
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td valign="bottom" colSpan="3">
|
|
||||||
<input id="chkCase" tabIndex="3" type="checkbox"><label for="chkCase" fckLang="DlgMyReplaceCaseChk">Match
|
|
||||||
case</label>
|
|
||||||
<br>
|
|
||||||
<div id="divWord" style="DISPLAY: none">
|
|
||||||
<input id="chkWord" tabIndex="4" type="checkbox"><label for="chkWord" fckLang="DlgMyReplaceWordChk">Match
|
|
||||||
whole word</label>
|
|
||||||
</div>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
@@ -1,33 +0,0 @@
|
|||||||
/*
|
|
||||||
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
|
|
||||||
* Copyright (C) 2003-2008 Frederico Caldeira Knabben
|
|
||||||
*
|
|
||||||
* == BEGIN LICENSE ==
|
|
||||||
*
|
|
||||||
* Licensed under the terms of any of the following licenses at your
|
|
||||||
* choice:
|
|
||||||
*
|
|
||||||
* - GNU General Public License Version 2 or later (the "GPL")
|
|
||||||
* http://www.gnu.org/licenses/gpl.html
|
|
||||||
*
|
|
||||||
* - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
|
|
||||||
* http://www.gnu.org/licenses/lgpl.html
|
|
||||||
*
|
|
||||||
* - Mozilla Public License Version 1.1 or later (the "MPL")
|
|
||||||
* http://www.mozilla.org/MPL/MPL-1.1.html
|
|
||||||
*
|
|
||||||
* == END LICENSE ==
|
|
||||||
*
|
|
||||||
* English language file for the sample plugin.
|
|
||||||
*/
|
|
||||||
|
|
||||||
FCKLang['DlgMyReplaceTitle'] = 'Plugin - Replace' ;
|
|
||||||
FCKLang['DlgMyReplaceFindLbl'] = 'Find what:' ;
|
|
||||||
FCKLang['DlgMyReplaceReplaceLbl'] = 'Replace with:' ;
|
|
||||||
FCKLang['DlgMyReplaceCaseChk'] = 'Match case' ;
|
|
||||||
FCKLang['DlgMyReplaceReplaceBtn'] = 'Replace' ;
|
|
||||||
FCKLang['DlgMyReplaceReplAllBtn'] = 'Replace All' ;
|
|
||||||
FCKLang['DlgMyReplaceWordChk'] = 'Match whole word' ;
|
|
||||||
|
|
||||||
FCKLang['DlgMyFindTitle'] = 'Plugin - Find' ;
|
|
||||||
FCKLang['DlgMyFindFindBtn'] = 'Find' ;
|
|
||||||
@@ -1,33 +0,0 @@
|
|||||||
/*
|
|
||||||
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
|
|
||||||
* Copyright (C) 2003-2008 Frederico Caldeira Knabben
|
|
||||||
*
|
|
||||||
* == BEGIN LICENSE ==
|
|
||||||
*
|
|
||||||
* Licensed under the terms of any of the following licenses at your
|
|
||||||
* choice:
|
|
||||||
*
|
|
||||||
* - GNU General Public License Version 2 or later (the "GPL")
|
|
||||||
* http://www.gnu.org/licenses/gpl.html
|
|
||||||
*
|
|
||||||
* - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
|
|
||||||
* http://www.gnu.org/licenses/lgpl.html
|
|
||||||
*
|
|
||||||
* - Mozilla Public License Version 1.1 or later (the "MPL")
|
|
||||||
* http://www.mozilla.org/MPL/MPL-1.1.html
|
|
||||||
*
|
|
||||||
* == END LICENSE ==
|
|
||||||
*
|
|
||||||
* French language file for the sample plugin.
|
|
||||||
*/
|
|
||||||
|
|
||||||
FCKLang['DlgMyReplaceTitle'] = 'Plugin - Remplacer' ;
|
|
||||||
FCKLang['DlgMyReplaceFindLbl'] = 'Chercher:' ;
|
|
||||||
FCKLang['DlgMyReplaceReplaceLbl'] = 'Remplacer par:' ;
|
|
||||||
FCKLang['DlgMyReplaceCaseChk'] = 'Respecter la casse' ;
|
|
||||||
FCKLang['DlgMyReplaceReplaceBtn'] = 'Remplacer' ;
|
|
||||||
FCKLang['DlgMyReplaceReplAllBtn'] = 'Remplacer Tout' ;
|
|
||||||
FCKLang['DlgMyReplaceWordChk'] = 'Mot entier' ;
|
|
||||||
|
|
||||||
FCKLang['DlgMyFindTitle'] = 'Plugin - Chercher' ;
|
|
||||||
FCKLang['DlgMyFindFindBtn'] = 'Chercher' ;
|
|
||||||
@@ -1,33 +0,0 @@
|
|||||||
/*
|
|
||||||
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
|
|
||||||
* Copyright (C) 2003-2008 Frederico Caldeira Knabben
|
|
||||||
*
|
|
||||||
* == BEGIN LICENSE ==
|
|
||||||
*
|
|
||||||
* Licensed under the terms of any of the following licenses at your
|
|
||||||
* choice:
|
|
||||||
*
|
|
||||||
* - GNU General Public License Version 2 or later (the "GPL")
|
|
||||||
* http://www.gnu.org/licenses/gpl.html
|
|
||||||
*
|
|
||||||
* - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
|
|
||||||
* http://www.gnu.org/licenses/lgpl.html
|
|
||||||
*
|
|
||||||
* - Mozilla Public License Version 1.1 or later (the "MPL")
|
|
||||||
* http://www.mozilla.org/MPL/MPL-1.1.html
|
|
||||||
*
|
|
||||||
* == END LICENSE ==
|
|
||||||
*
|
|
||||||
* Italian language file for the sample plugin.
|
|
||||||
*/
|
|
||||||
|
|
||||||
FCKLang['DlgMyReplaceTitle'] = 'Plugin - Sostituisci' ;
|
|
||||||
FCKLang['DlgMyReplaceFindLbl'] = 'Trova:' ;
|
|
||||||
FCKLang['DlgMyReplaceReplaceLbl'] = 'Sostituisci con:' ;
|
|
||||||
FCKLang['DlgMyReplaceCaseChk'] = 'Maiuscole/minuscole' ;
|
|
||||||
FCKLang['DlgMyReplaceReplaceBtn'] = 'Sostituisci' ;
|
|
||||||
FCKLang['DlgMyReplaceReplAllBtn'] = 'Sostituisci tutto' ;
|
|
||||||
FCKLang['DlgMyReplaceWordChk'] = 'Parola intera' ;
|
|
||||||
|
|
||||||
FCKLang['DlgMyFindTitle'] = 'Plugin - Cerca' ;
|
|
||||||
FCKLang['DlgMyFindFindBtn'] = 'Cerca' ;
|
|
||||||
Binary file not shown.
|
Before Width: | Height: | Size: 326 B |
@@ -1,135 +0,0 @@
|
|||||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
|
||||||
<!--
|
|
||||||
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
|
|
||||||
* Copyright (C) 2003-2008 Frederico Caldeira Knabben
|
|
||||||
*
|
|
||||||
* == BEGIN LICENSE ==
|
|
||||||
*
|
|
||||||
* Licensed under the terms of any of the following licenses at your
|
|
||||||
* choice:
|
|
||||||
*
|
|
||||||
* - GNU General Public License Version 2 or later (the "GPL")
|
|
||||||
* http://www.gnu.org/licenses/gpl.html
|
|
||||||
*
|
|
||||||
* - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
|
|
||||||
* http://www.gnu.org/licenses/lgpl.html
|
|
||||||
*
|
|
||||||
* - Mozilla Public License Version 1.1 or later (the "MPL")
|
|
||||||
* http://www.mozilla.org/MPL/MPL-1.1.html
|
|
||||||
*
|
|
||||||
* == END LICENSE ==
|
|
||||||
*
|
|
||||||
* This is the sample "Replace" plugin window.
|
|
||||||
-->
|
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
|
||||||
<meta content="noindex, nofollow" name="robots">
|
|
||||||
<script type="text/javascript">
|
|
||||||
|
|
||||||
var oEditor = window.parent.InnerDialogLoaded() ;
|
|
||||||
|
|
||||||
function OnLoad()
|
|
||||||
{
|
|
||||||
// First of all, translate the dialog box texts
|
|
||||||
oEditor.FCKLanguageManager.TranslatePage( document ) ;
|
|
||||||
|
|
||||||
window.parent.SetAutoSize( true ) ;
|
|
||||||
}
|
|
||||||
|
|
||||||
function btnStat(frm)
|
|
||||||
{
|
|
||||||
document.getElementById('btnReplace').disabled =
|
|
||||||
document.getElementById('btnReplaceAll').disabled =
|
|
||||||
( document.getElementById('txtFind').value.length == 0 ) ;
|
|
||||||
}
|
|
||||||
|
|
||||||
function ReplaceTextNodes( parentNode, regex, replaceValue, replaceAll, hasFound )
|
|
||||||
{
|
|
||||||
for ( var i = 0 ; i < parentNode.childNodes.length ; i++ )
|
|
||||||
{
|
|
||||||
var oNode = parentNode.childNodes[i] ;
|
|
||||||
if ( oNode.nodeType == 3 )
|
|
||||||
{
|
|
||||||
var sReplaced = oNode.nodeValue.replace( regex, replaceValue ) ;
|
|
||||||
if ( oNode.nodeValue != sReplaced )
|
|
||||||
{
|
|
||||||
oNode.nodeValue = sReplaced ;
|
|
||||||
if ( ! replaceAll )
|
|
||||||
return true ;
|
|
||||||
hasFound = true ;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
hasFound = ReplaceTextNodes( oNode, regex, replaceValue, replaceAll, hasFound ) ;
|
|
||||||
if ( ! replaceAll && hasFound )
|
|
||||||
return true ;
|
|
||||||
}
|
|
||||||
|
|
||||||
return hasFound ;
|
|
||||||
}
|
|
||||||
|
|
||||||
function GetRegexExpr()
|
|
||||||
{
|
|
||||||
if ( document.getElementById('chkWord').checked )
|
|
||||||
var sExpr = '\\b' + document.getElementById('txtFind').value + '\\b' ;
|
|
||||||
else
|
|
||||||
var sExpr = document.getElementById('txtFind').value ;
|
|
||||||
|
|
||||||
return sExpr ;
|
|
||||||
}
|
|
||||||
|
|
||||||
function GetCase()
|
|
||||||
{
|
|
||||||
return ( document.getElementById('chkCase').checked ? '' : 'i' ) ;
|
|
||||||
}
|
|
||||||
|
|
||||||
function Replace()
|
|
||||||
{
|
|
||||||
var oRegex = new RegExp( GetRegexExpr(), GetCase() ) ;
|
|
||||||
ReplaceTextNodes( oEditor.FCK.EditorDocument.body, oRegex, document.getElementById('txtReplace').value, false ) ;
|
|
||||||
}
|
|
||||||
|
|
||||||
function ReplaceAll()
|
|
||||||
{
|
|
||||||
var oRegex = new RegExp( GetRegexExpr(), GetCase() + 'g' ) ;
|
|
||||||
ReplaceTextNodes( oEditor.FCK.EditorDocument.body, oRegex, document.getElementById('txtReplace').value, true ) ;
|
|
||||||
window.parent.Cancel() ;
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
</head>
|
|
||||||
<body onload="OnLoad()" scroll="no" style="OVERFLOW: hidden">
|
|
||||||
<div align="center">
|
|
||||||
This is my Plugin!
|
|
||||||
</div>
|
|
||||||
<table cellSpacing="3" cellPadding="2" width="100%" border="0">
|
|
||||||
<tr>
|
|
||||||
<td noWrap><label for="txtFind" fckLang="DlgMyReplaceFindLbl">Find what:</label>
|
|
||||||
</td>
|
|
||||||
<td width="100%"><input id="txtFind" onkeyup="btnStat(this.form)" style="WIDTH: 100%" tabIndex="1" type="text">
|
|
||||||
</td>
|
|
||||||
<td><input id="btnReplace" style="WIDTH: 100%" disabled onclick="Replace();" type="button"
|
|
||||||
value="Replace" fckLang="DlgMyReplaceReplaceBtn">
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td vAlign="top" nowrap><label for="txtReplace" fckLang="DlgMyReplaceReplaceLbl">Replace
|
|
||||||
with:</label>
|
|
||||||
</td>
|
|
||||||
<td vAlign="top"><input id="txtReplace" style="WIDTH: 100%" tabIndex="2" type="text">
|
|
||||||
</td>
|
|
||||||
<td><input id="btnReplaceAll" disabled onclick="ReplaceAll()" type="button" value="Replace All"
|
|
||||||
fckLang="DlgMyReplaceReplAllBtn">
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td vAlign="bottom" colSpan="3"> <input id="chkCase" tabIndex="3" type="checkbox"><label for="chkCase" fckLang="DlgMyReplaceCaseChk">Match
|
|
||||||
case</label>
|
|
||||||
<br>
|
|
||||||
<input id="chkWord" tabIndex="4" type="checkbox"><label for="chkWord" fckLang="DlgMyReplaceWordChk">Match
|
|
||||||
whole word</label>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
@@ -1,73 +0,0 @@
|
|||||||
/*
|
|
||||||
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
|
|
||||||
* Copyright (C) 2003-2008 Frederico Caldeira Knabben
|
|
||||||
*
|
|
||||||
* == BEGIN LICENSE ==
|
|
||||||
*
|
|
||||||
* Licensed under the terms of any of the following licenses at your
|
|
||||||
* choice:
|
|
||||||
*
|
|
||||||
* - GNU General Public License Version 2 or later (the "GPL")
|
|
||||||
* http://www.gnu.org/licenses/gpl.html
|
|
||||||
*
|
|
||||||
* - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
|
|
||||||
* http://www.gnu.org/licenses/lgpl.html
|
|
||||||
*
|
|
||||||
* - Mozilla Public License Version 1.1 or later (the "MPL")
|
|
||||||
* http://www.mozilla.org/MPL/MPL-1.1.html
|
|
||||||
*
|
|
||||||
* == END LICENSE ==
|
|
||||||
*
|
|
||||||
* This is a sample plugin definition file.
|
|
||||||
*/
|
|
||||||
|
|
||||||
// Here we define our custom Style combo, with custom widths.
|
|
||||||
var oMyBigStyleCombo = new FCKToolbarStyleCombo() ;
|
|
||||||
oMyBigStyleCombo.FieldWidth = 250 ;
|
|
||||||
oMyBigStyleCombo.PanelWidth = 300 ;
|
|
||||||
FCKToolbarItems.RegisterItem( 'My_BigStyle', oMyBigStyleCombo ) ;
|
|
||||||
|
|
||||||
|
|
||||||
// ##### Defining a custom context menu entry.
|
|
||||||
|
|
||||||
// ## 1. Define the command to be executed when selecting the context menu item.
|
|
||||||
var oMyCMCommand = new Object() ;
|
|
||||||
oMyCMCommand.Name = 'OpenImage' ;
|
|
||||||
|
|
||||||
// This is the standard function used to execute the command (called when clicking in the context menu item).
|
|
||||||
oMyCMCommand.Execute = function()
|
|
||||||
{
|
|
||||||
// This command is called only when an image element is selected (IMG).
|
|
||||||
// Get image URL (src).
|
|
||||||
var sUrl = FCKSelection.GetSelectedElement().src ;
|
|
||||||
|
|
||||||
// Open the URL in a new window.
|
|
||||||
window.top.open( sUrl ) ;
|
|
||||||
}
|
|
||||||
|
|
||||||
// This is the standard function used to retrieve the command state (it could be disabled for some reason).
|
|
||||||
oMyCMCommand.GetState = function()
|
|
||||||
{
|
|
||||||
// Let's make it always enabled.
|
|
||||||
return FCK_TRISTATE_OFF ;
|
|
||||||
}
|
|
||||||
|
|
||||||
// ## 2. Register our custom command.
|
|
||||||
FCKCommands.RegisterCommand( 'OpenImage', oMyCMCommand ) ;
|
|
||||||
|
|
||||||
// ## 3. Define the context menu "listener".
|
|
||||||
var oMyContextMenuListener = new Object() ;
|
|
||||||
|
|
||||||
// This is the standard function called right before sowing the context menu.
|
|
||||||
oMyContextMenuListener.AddItems = function( contextMenu, tag, tagName )
|
|
||||||
{
|
|
||||||
// Let's show our custom option only for images.
|
|
||||||
if ( tagName == 'IMG' )
|
|
||||||
{
|
|
||||||
contextMenu.AddSeparator() ;
|
|
||||||
contextMenu.AddItem( 'OpenImage', 'Open image in a new window (Custom)' ) ;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// ## 4. Register our context menu listener.
|
|
||||||
FCK.ContextMenu.RegisterListener( oMyContextMenuListener ) ;
|
|
||||||
@@ -1,34 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8" ?>
|
|
||||||
<application xmlns="http://ns.adobe.com/air/application/1.0">
|
|
||||||
<id>net.fckeditor.air.samples.sample01</id>
|
|
||||||
<name>FCKeditor Sample Application 1.0</name>
|
|
||||||
<version>1.0</version>
|
|
||||||
<filename>FCKeditor AIR Sample</filename>
|
|
||||||
<description>This is a sample AIR application including FCKeditor.</description>
|
|
||||||
<copyright>Copyright (C) 2003-2008 Frederico Caldeira Knabben</copyright>
|
|
||||||
<initialWindow>
|
|
||||||
<content>_samples/adobeair/sample01.html</content>
|
|
||||||
<title>FCKeditor AIR Sample</title>
|
|
||||||
<systemChrome>standard</systemChrome>
|
|
||||||
<transparent>false</transparent>
|
|
||||||
<visible>true</visible>
|
|
||||||
<minimizable>true</minimizable>
|
|
||||||
<maximizable>true</maximizable>
|
|
||||||
<resizable>true</resizable>
|
|
||||||
<x>100</x>
|
|
||||||
<y>80</y>
|
|
||||||
<width>820</width>
|
|
||||||
<height>600</height>
|
|
||||||
<minSize>600 400</minSize>
|
|
||||||
</initialWindow>
|
|
||||||
<installFolder>FCKeditor/AIR Samples/Sample01</installFolder>
|
|
||||||
<programMenuFolder>FCKeditor/AIR Samples</programMenuFolder>
|
|
||||||
<icon>
|
|
||||||
<image16x16>_samples/adobeair/icons/16.png</image16x16>
|
|
||||||
<image32x32>_samples/adobeair/icons/32.png</image32x32>
|
|
||||||
<image48x48>_samples/adobeair/icons/48.png</image48x48>
|
|
||||||
<image128x128>_samples/adobeair/icons/128.png</image128x128>
|
|
||||||
</icon>
|
|
||||||
<customUpdateUI>false</customUpdateUI>
|
|
||||||
<allowBrowserInvocation>false</allowBrowserInvocation>
|
|
||||||
</application>
|
|
||||||
Binary file not shown.
|
Before Width: | Height: | Size: 1.2 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 273 B |
Binary file not shown.
|
Before Width: | Height: | Size: 562 B |
Binary file not shown.
|
Before Width: | Height: | Size: 563 B |
@@ -1,26 +0,0 @@
|
|||||||
@ECHO OFF
|
|
||||||
|
|
||||||
::
|
|
||||||
:: FCKeditor - The text editor for Internet - http://www.fckeditor.net
|
|
||||||
:: Copyright (C) 2003-2008 Frederico Caldeira Knabben
|
|
||||||
::
|
|
||||||
:: == BEGIN LICENSE ==
|
|
||||||
::
|
|
||||||
:: Licensed under the terms of any of the following licenses at your
|
|
||||||
:: choice:
|
|
||||||
::
|
|
||||||
:: - GNU General Public License Version 2 or later (the "GPL")
|
|
||||||
:: http://www.gnu.org/licenses/gpl.html
|
|
||||||
::
|
|
||||||
:: - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
|
|
||||||
:: http://www.gnu.org/licenses/lgpl.html
|
|
||||||
::
|
|
||||||
:: - Mozilla Public License Version 1.1 or later (the "MPL")
|
|
||||||
:: http://www.mozilla.org/MPL/MPL-1.1.html
|
|
||||||
::
|
|
||||||
:: == END LICENSE ==
|
|
||||||
::
|
|
||||||
|
|
||||||
:: adt -package SIGNING_OPTIONS air_file app_xml [file_or_dir | -C dir file_or_dir | -e file dir ...] ...
|
|
||||||
|
|
||||||
"C:\Adobe AIR SDK\bin\adt" -package -storetype pkcs12 -keystore sample01_cert.pfx -storepass 123abc FCKeditor.air application.xml -C ../../ .
|
|
||||||
@@ -1,26 +0,0 @@
|
|||||||
@ECHO OFF
|
|
||||||
|
|
||||||
::
|
|
||||||
:: FCKeditor - The text editor for Internet - http://www.fckeditor.net
|
|
||||||
:: Copyright (C) 2003-2008 Frederico Caldeira Knabben
|
|
||||||
::
|
|
||||||
:: == BEGIN LICENSE ==
|
|
||||||
::
|
|
||||||
:: Licensed under the terms of any of the following licenses at your
|
|
||||||
:: choice:
|
|
||||||
::
|
|
||||||
:: - GNU General Public License Version 2 or later (the "GPL")
|
|
||||||
:: http://www.gnu.org/licenses/gpl.html
|
|
||||||
::
|
|
||||||
:: - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
|
|
||||||
:: http://www.gnu.org/licenses/lgpl.html
|
|
||||||
::
|
|
||||||
:: - Mozilla Public License Version 1.1 or later (the "MPL")
|
|
||||||
:: http://www.mozilla.org/MPL/MPL-1.1.html
|
|
||||||
::
|
|
||||||
:: == END LICENSE ==
|
|
||||||
::
|
|
||||||
|
|
||||||
:: adl [-runtime runtime-directory] [-pubId publisher-id] [-nodebug] application.xml [rootdirectory] [-- arguments]
|
|
||||||
|
|
||||||
"C:\Adobe AIR SDK\bin\adl" application.xml ../../
|
|
||||||
@@ -1,58 +0,0 @@
|
|||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
||||||
<!--
|
|
||||||
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
|
|
||||||
* Copyright (C) 2003-2008 Frederico Caldeira Knabben
|
|
||||||
*
|
|
||||||
* == BEGIN LICENSE ==
|
|
||||||
*
|
|
||||||
* Licensed under the terms of any of the following licenses at your
|
|
||||||
* choice:
|
|
||||||
*
|
|
||||||
* - GNU General Public License Version 2 or later (the "GPL")
|
|
||||||
* http://www.gnu.org/licenses/gpl.html
|
|
||||||
*
|
|
||||||
* - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
|
|
||||||
* http://www.gnu.org/licenses/lgpl.html
|
|
||||||
*
|
|
||||||
* - Mozilla Public License Version 1.1 or later (the "MPL")
|
|
||||||
* http://www.mozilla.org/MPL/MPL-1.1.html
|
|
||||||
*
|
|
||||||
* == END LICENSE ==
|
|
||||||
*
|
|
||||||
* Sample Adobe AIR application.
|
|
||||||
-->
|
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
|
||||||
<head>
|
|
||||||
<title>FCKeditor - Adobe AIR Sample</title>
|
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
|
||||||
<meta name="robots" content="noindex, nofollow" />
|
|
||||||
<link href="../sample.css" rel="stylesheet" type="text/css" />
|
|
||||||
<script type="text/javascript" src="../../fckeditor.js"></script>
|
|
||||||
<style type="text/css">
|
|
||||||
body { margin: 10px ; }
|
|
||||||
</style>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<h1>
|
|
||||||
FCKeditor - Adobe AIR Sample
|
|
||||||
</h1>
|
|
||||||
<div>
|
|
||||||
This sample loads FCKeditor with full features enabled.
|
|
||||||
</div>
|
|
||||||
<hr />
|
|
||||||
<script type="text/javascript">
|
|
||||||
|
|
||||||
// Automatically calculates the editor base path based on the _samples directory.
|
|
||||||
// This is usefull only for these samples. A real application should use something like this:
|
|
||||||
// oFCKeditor.BasePath = '/fckeditor/' ; // '/fckeditor/' is the default value.
|
|
||||||
var sBasePath = document.location.href.substring(0,document.location.href.lastIndexOf('_samples')) ;
|
|
||||||
|
|
||||||
var oFCKeditor = new FCKeditor( 'FCKeditor1' ) ;
|
|
||||||
oFCKeditor.BasePath = sBasePath ;
|
|
||||||
oFCKeditor.Height = 400 ;
|
|
||||||
oFCKeditor.Value = '<p>FCKeditor is in the <strong>AIR</strong>!<\/p>' ;
|
|
||||||
oFCKeditor.Create() ;
|
|
||||||
|
|
||||||
</script>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
Binary file not shown.
@@ -1 +0,0 @@
|
|||||||
<application ID="fck"/>
|
|
||||||
@@ -1,165 +0,0 @@
|
|||||||
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
|
|
||||||
* Copyright (C) 2003-2008 Frederico Caldeira Knabben
|
|
||||||
*
|
|
||||||
* == BEGIN LICENSE ==
|
|
||||||
*
|
|
||||||
* Licensed under the terms of any of the following licenses at your
|
|
||||||
* choice:
|
|
||||||
*
|
|
||||||
* - GNU General Public License Version 2 or later (the "GPL")
|
|
||||||
* http://www.gnu.org/licenses/gpl.html
|
|
||||||
*
|
|
||||||
* - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
|
|
||||||
* http://www.gnu.org/licenses/lgpl.html
|
|
||||||
*
|
|
||||||
* - Mozilla Public License Version 1.1 or later (the "MPL")
|
|
||||||
* http://www.mozilla.org/MPL/MPL-1.1.html
|
|
||||||
*
|
|
||||||
* == END LICENSE ==
|
|
||||||
*
|
|
||||||
* This is the class definition file for the sample pages.
|
|
||||||
*
|
|
||||||
|
|
||||||
DEFINE CLASS fckeditor AS custom
|
|
||||||
cInstanceName =""
|
|
||||||
BasePath =""
|
|
||||||
cWIDTH =""
|
|
||||||
cHEIGHT =""
|
|
||||||
ToolbarSet =""
|
|
||||||
cValue=""
|
|
||||||
DIMENSION aConfig(10,2)
|
|
||||||
|
|
||||||
&& -----------------------------------------------------------------------
|
|
||||||
FUNCTION fckeditor( tcInstanceName )
|
|
||||||
LOCAL lnLoop,lnLoop2
|
|
||||||
THIS.cInstanceName = tcInstanceName
|
|
||||||
THIS.BasePath = '../../../FCKeditor/'
|
|
||||||
THIS.cWIDTH = '100%'
|
|
||||||
THIS.cHEIGHT = '200'
|
|
||||||
THIS.ToolbarSet = 'Default'
|
|
||||||
THIS.cValue = ''
|
|
||||||
FOR lnLoop=1 TO 10
|
|
||||||
FOR lnLoop2=1 TO 2
|
|
||||||
THIS.aConfig(lnLoop,lnLoop2) = ""
|
|
||||||
NEXT
|
|
||||||
NEXT
|
|
||||||
RETURN
|
|
||||||
ENDFUNC
|
|
||||||
|
|
||||||
|
|
||||||
&& -----------------------------------------------------------------------
|
|
||||||
FUNCTION CREATE()
|
|
||||||
RETURN(THIS.CreateHtml())
|
|
||||||
ENDFUNC
|
|
||||||
|
|
||||||
&& -----------------------------------------------------------------------
|
|
||||||
FUNCTION CreateHtml()
|
|
||||||
LOCAL html
|
|
||||||
LOCAL lcLink
|
|
||||||
|
|
||||||
HtmlValue = THIS.cValue && HTMLSPECIALCHARS()
|
|
||||||
|
|
||||||
html = [<div>]
|
|
||||||
IF THIS.IsCompatible()
|
|
||||||
lcLink = THIS.BasePath+[editor/fckeditor.html?InstanceName=]+THIS.cInstanceName
|
|
||||||
|
|
||||||
IF ( !THIS.ToolbarSet == '' )
|
|
||||||
lcLink = lcLink + [&Toolbar=]+THIS.ToolbarSet
|
|
||||||
ENDIF
|
|
||||||
|
|
||||||
&& Render the LINKED HIDDEN FIELD.
|
|
||||||
html = html + [<input type="hidden" id="]+THIS.cInstanceName +[" name="]+THIS.cInstanceName +[" value="]+HtmlValue+[">]
|
|
||||||
|
|
||||||
&& Render the configurations HIDDEN FIELD.
|
|
||||||
html = html + [<input type="hidden" id="]+THIS.cInstanceName +[___Config" value="]+THIS.GetConfigFieldString() + [">] +CHR(13)+CHR(10)
|
|
||||||
|
|
||||||
&& Render the EDITOR IFRAME.
|
|
||||||
html = html + [<iframe id="]+THIS.cInstanceName +[___Frame" src="]+lcLink+[" width="]+THIS.cWIDTH+[" height="]+THIS.cHEIGHT+[" frameborder="no" scrolling="no"></iframe>]
|
|
||||||
ELSE
|
|
||||||
IF ( AT("%", THIS.cWIDTH)=0 )
|
|
||||||
WidthCSS = THIS.cWIDTH + 'px'
|
|
||||||
ELSE
|
|
||||||
WidthCSS = THIS.cWIDTH
|
|
||||||
ENDIF
|
|
||||||
|
|
||||||
IF ( AT("%",THIS.cHEIGHT)=0 )
|
|
||||||
HeightCSS = THIS.cHEIGHT + 'px'
|
|
||||||
ELSE
|
|
||||||
HeightCSS = THIS.cHEIGHT
|
|
||||||
ENDIF
|
|
||||||
|
|
||||||
html = html + [<textarea name="]+THIS.cInstanceName +[" rows="4" cols="40" style="width: ]+WidthCSS+[ height: ]+HeightCSS+[" wrap="virtual">]+HtmlValue+[</textarea>]
|
|
||||||
ENDIF
|
|
||||||
|
|
||||||
html = html + [</div>]
|
|
||||||
|
|
||||||
RETURN (html)
|
|
||||||
ENDFUNC
|
|
||||||
|
|
||||||
|
|
||||||
&& -----------------------------------------------------------------------
|
|
||||||
FUNCTION IsCompatible()
|
|
||||||
LOCAL llRetval
|
|
||||||
LOCAL sAgent
|
|
||||||
|
|
||||||
llRetval=.F.
|
|
||||||
|
|
||||||
sAgent= LOWER(Request.ServerVariables("HTTP_USER_AGENT"))
|
|
||||||
|
|
||||||
IF AT("msie",sAgent) >0 .AND. AT("mac",sAgent)=0 .AND. AT("opera",sAgent)=0
|
|
||||||
iVersion=VAL(SUBSTR(sAgent,AT("msie",sAgent)+5,3))
|
|
||||||
llRetval= iVersion > 5.5
|
|
||||||
ELSE
|
|
||||||
IF AT("gecko",sAgent)>0
|
|
||||||
iVersion=VAL(SUBSTR(sAgent,AT("gecko/",sAgent)+6,8))
|
|
||||||
llRetval =iVersion > 20030210
|
|
||||||
ENDIF
|
|
||||||
ENDIF
|
|
||||||
RETURN (llRetval)
|
|
||||||
ENDFUNC
|
|
||||||
|
|
||||||
&& -----------------------------------------------------------------------
|
|
||||||
FUNCTION GetConfigFieldString()
|
|
||||||
LOCAL sParams
|
|
||||||
LOCAL bFirst
|
|
||||||
LOCAL sKey
|
|
||||||
sParams = ""
|
|
||||||
bFirst = .T.
|
|
||||||
FOR lnLoop=1 TO 10 && ALEN(this.aconfig)
|
|
||||||
IF !EMPTY(THIS.aConfig(lnLoop,1))
|
|
||||||
IF bFirst = .F.
|
|
||||||
sParams = sParams + "&"
|
|
||||||
ELSE
|
|
||||||
bFirst = .F.
|
|
||||||
ENDIF
|
|
||||||
sParams = sParams +THIS.aConfig(lnLoop,1)+[=]+THIS.aConfig(lnLoop,2)
|
|
||||||
ELSE
|
|
||||||
EXIT
|
|
||||||
ENDIF
|
|
||||||
NEXT
|
|
||||||
RETURN(sParams)
|
|
||||||
ENDFUNC
|
|
||||||
&& -----------------------------------------------------------------------
|
|
||||||
&& This function removes unwanted characters in URL parameters mostly entered by hackers
|
|
||||||
|
|
||||||
FUNCTION StripAttacks
|
|
||||||
LPARAMETERS tcString
|
|
||||||
IF !EMPTY(tcString)
|
|
||||||
tcString=STRTRAN(tcString,"&","")
|
|
||||||
tcString=STRTRAN(tcString,"?","")
|
|
||||||
tcString=STRTRAN(tcString,";","")
|
|
||||||
tcString=STRTRAN(tcString,"!","")
|
|
||||||
tcString=STRTRAN(tcString,"<%","")
|
|
||||||
tcString=STRTRAN(tcString,"%>","")
|
|
||||||
tcString=STRTRAN(tcString,"<","")
|
|
||||||
tcString=STRTRAN(tcString,">","")
|
|
||||||
tcString=STRTRAN(tcString,"..","")
|
|
||||||
tcString=STRTRAN(tcString,"/","")
|
|
||||||
tcString=STRTRAN(tcString,"\","")
|
|
||||||
tcString=STRTRAN(tcString,":","")
|
|
||||||
ELSE
|
|
||||||
tcString=""
|
|
||||||
ENDIF
|
|
||||||
RETURN (tcString)
|
|
||||||
|
|
||||||
ENDDEFINE
|
|
||||||
@@ -1,56 +0,0 @@
|
|||||||
<%
|
|
||||||
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
|
|
||||||
* Copyright (C) 2003-2008 Frederico Caldeira Knabben
|
|
||||||
*
|
|
||||||
* == BEGIN LICENSE ==
|
|
||||||
*
|
|
||||||
* Licensed under the terms of any of the following licenses at your
|
|
||||||
* choice:
|
|
||||||
*
|
|
||||||
* - GNU General Public License Version 2 or later (the "GPL")
|
|
||||||
* http://www.gnu.org/licenses/gpl.html
|
|
||||||
*
|
|
||||||
* - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
|
|
||||||
* http://www.gnu.org/licenses/lgpl.html
|
|
||||||
*
|
|
||||||
* - Mozilla Public License Version 1.1 or later (the "MPL")
|
|
||||||
* http://www.mozilla.org/MPL/MPL-1.1.html
|
|
||||||
*
|
|
||||||
* == END LICENSE ==
|
|
||||||
*
|
|
||||||
* This page lists the data posted by a form.
|
|
||||||
*
|
|
||||||
%>
|
|
||||||
|
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
<title>FCKeditor - AFP Sample 1</title>
|
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
|
||||||
<meta name="robots" content="noindex, nofollow">
|
|
||||||
<link href="../sample.css" rel="stylesheet" type="text/css" />
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<h1>FCKeditor - AFP - Sample 1</h1>
|
|
||||||
This sample displays a normal HTML form with an FCKeditor with full features enabled.
|
|
||||||
<hr>
|
|
||||||
<form action="sampleposteddata.afp" method="post" target="_blank">
|
|
||||||
<%
|
|
||||||
|
|
||||||
sBasePath="../../../fckeditor/" && Change this to your local path
|
|
||||||
|
|
||||||
lcText=[<p>This is some <strong>sample text</strong>. You are using ]
|
|
||||||
lcText=lcText+[<a href='http://www.fckeditor.net/'>FCKeditor</a>.]
|
|
||||||
|
|
||||||
oFCKeditor = CREATEOBJECT("FCKeditor")
|
|
||||||
oFCKeditor.fckeditor("FCKeditor1")
|
|
||||||
oFCKeditor.BasePath = sBasePath
|
|
||||||
oFCKeditor.cValue = lcText
|
|
||||||
|
|
||||||
? oFCKeditor.Create()
|
|
||||||
|
|
||||||
%>
|
|
||||||
<br>
|
|
||||||
<input type="submit" value="Submit">
|
|
||||||
</form>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
@@ -1,113 +0,0 @@
|
|||||||
<%
|
|
||||||
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
|
|
||||||
* Copyright (C) 2003-2008 Frederico Caldeira Knabben
|
|
||||||
*
|
|
||||||
* == BEGIN LICENSE ==
|
|
||||||
*
|
|
||||||
* Licensed under the terms of any of the following licenses at your
|
|
||||||
* choice:
|
|
||||||
*
|
|
||||||
* - GNU General Public License Version 2 or later (the "GPL")
|
|
||||||
* http://www.gnu.org/licenses/gpl.html
|
|
||||||
*
|
|
||||||
* - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
|
|
||||||
* http://www.gnu.org/licenses/lgpl.html
|
|
||||||
*
|
|
||||||
* - Mozilla Public License Version 1.1 or later (the "MPL")
|
|
||||||
* http://www.mozilla.org/MPL/MPL-1.1.html
|
|
||||||
*
|
|
||||||
* == END LICENSE ==
|
|
||||||
*
|
|
||||||
* This page is a basic Sample for FCKeditor integration in the AFP script language (www.afpages.de)
|
|
||||||
*
|
|
||||||
%>
|
|
||||||
|
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
<title>FCKeditor - AFP Sample 2</title>
|
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
|
||||||
<meta name="robots" content="noindex, nofollow">
|
|
||||||
<link href="../sample.css" rel="stylesheet" type="text/css" />
|
|
||||||
|
|
||||||
<script type="text/javascript">
|
|
||||||
function FCKeditor_OnComplete( editorInstance )
|
|
||||||
{
|
|
||||||
var oCombo = document.getElementById( 'cmbLanguages' ) ;
|
|
||||||
for ( code in editorInstance.Language.AvailableLanguages )
|
|
||||||
{
|
|
||||||
AddComboOption( oCombo, editorInstance.Language.AvailableLanguages[code] + ' (' + code + ')', code ) ;
|
|
||||||
}
|
|
||||||
oCombo.value = editorInstance.Language.ActiveLanguage.Code ;
|
|
||||||
}
|
|
||||||
|
|
||||||
function AddComboOption(combo, optionText, optionValue)
|
|
||||||
{
|
|
||||||
var oOption = document.createElement("OPTION") ;
|
|
||||||
|
|
||||||
combo.options.add(oOption) ;
|
|
||||||
|
|
||||||
oOption.innerHTML = optionText ;
|
|
||||||
oOption.value = optionValue ;
|
|
||||||
|
|
||||||
return oOption ;
|
|
||||||
}
|
|
||||||
|
|
||||||
function ChangeLanguage( languageCode )
|
|
||||||
{
|
|
||||||
window.location.href = window.location.pathname + "?Lang=" + languageCode ;
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<h1>FCKeditor - AFP - Sample 2</h1>
|
|
||||||
This sample shows the editor in all its available languages.
|
|
||||||
<hr>
|
|
||||||
<table cellpadding="0" cellspacing="0" border="0">
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
Select a language:
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<select id="cmbLanguages" onchange="ChangeLanguage(this.value);">
|
|
||||||
</select>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
<br>
|
|
||||||
<form action="sampleposteddata.afp" method="post" target="_blank">
|
|
||||||
<%
|
|
||||||
|
|
||||||
sBasePath="../../../fckeditor/" && Change this to your local path
|
|
||||||
|
|
||||||
oFCKeditor = CREATEOBJECT("FCKeditor")
|
|
||||||
oFCKeditor.fckeditor("FCKeditor1")
|
|
||||||
|
|
||||||
lcLanguage="" && Initialize Variable
|
|
||||||
lcLanguage=request.querystring("Lang") && Request Parameter
|
|
||||||
lcLanguage=oFCKeditor.StripAttacks(lcLanguage) && Remove special escape characters
|
|
||||||
IF EMPTY(lcLanguage)
|
|
||||||
oFCKeditor.aconfig[1,1]="AutoDetectLanguage"
|
|
||||||
oFCKeditor.aconfig[1,2]="true"
|
|
||||||
oFCKeditor.aconfig[2,1]="DefaultLanguage"
|
|
||||||
oFCKeditor.aconfig[2,2]="en"
|
|
||||||
ELSE
|
|
||||||
oFCKeditor.aconfig[1,1]="AutoDetectLanguage"
|
|
||||||
oFCKeditor.aconfig[1,2]="false"
|
|
||||||
oFCKeditor.aconfig[2,1]="DefaultLanguage"
|
|
||||||
oFCKeditor.aconfig[2,2]=lcLanguage
|
|
||||||
ENDIF
|
|
||||||
|
|
||||||
lcText=[<p>This is some <strong>sample text</strong>. You are using ]
|
|
||||||
lcText=lcText+[<a href='http://www.fckeditor.net/'>FCKeditor</a>.]
|
|
||||||
|
|
||||||
oFCKeditor.BasePath = sBasePath
|
|
||||||
oFCKeditor.cValue = lcText
|
|
||||||
|
|
||||||
? oFCKeditor.Create()
|
|
||||||
|
|
||||||
%>
|
|
||||||
<br>
|
|
||||||
<input type="submit" value="Submit">
|
|
||||||
</form>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
@@ -1,91 +0,0 @@
|
|||||||
<%
|
|
||||||
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
|
|
||||||
* Copyright (C) 2003-2008 Frederico Caldeira Knabben
|
|
||||||
*
|
|
||||||
* == BEGIN LICENSE ==
|
|
||||||
*
|
|
||||||
* Licensed under the terms of any of the following licenses at your
|
|
||||||
* choice:
|
|
||||||
*
|
|
||||||
* - GNU General Public License Version 2 or later (the "GPL")
|
|
||||||
* http://www.gnu.org/licenses/gpl.html
|
|
||||||
*
|
|
||||||
* - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
|
|
||||||
* http://www.gnu.org/licenses/lgpl.html
|
|
||||||
*
|
|
||||||
* - Mozilla Public License Version 1.1 or later (the "MPL")
|
|
||||||
* http://www.mozilla.org/MPL/MPL-1.1.html
|
|
||||||
*
|
|
||||||
* == END LICENSE ==
|
|
||||||
*
|
|
||||||
* This page is a basic Sample for FCKeditor integration in the AFP script language (www.afpages.de)
|
|
||||||
*
|
|
||||||
%>
|
|
||||||
|
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
<title>FCKeditor - AFP Sample 3</title>
|
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
|
||||||
<meta name="robots" content="noindex, nofollow">
|
|
||||||
<link href="../sample.css" rel="stylesheet" type="text/css" />
|
|
||||||
|
|
||||||
<script type="text/javascript">
|
|
||||||
function FCKeditor_OnComplete( editorInstance )
|
|
||||||
{
|
|
||||||
var oCombo = document.getElementById( 'cmbToolbars' ) ;
|
|
||||||
oCombo.value = editorInstance.ToolbarSet.Name ;
|
|
||||||
oCombo.style.visibility = '' ;
|
|
||||||
}
|
|
||||||
|
|
||||||
function ChangeToolbar( toolbarName )
|
|
||||||
{
|
|
||||||
window.location.href = window.location.pathname + "?Toolbar=" + toolbarName ;
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<h1>FCKeditor - AFP - Sample 3</h1>
|
|
||||||
This sample shows how to change the editor toolbar.
|
|
||||||
<hr>
|
|
||||||
<table cellpadding="0" cellspacing="0" border="0">
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
Select the toolbar to load:
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<select id="cmbToolbars" onchange="ChangeToolbar(this.value);" style="VISIBILITY: hidden">
|
|
||||||
<option value="Default" selected>Default</option>
|
|
||||||
<option value="Basic">Basic</option>
|
|
||||||
</select>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
<br>
|
|
||||||
<form action="sampleposteddata.afp" method="post" target="_blank">
|
|
||||||
<%
|
|
||||||
|
|
||||||
sBasePath="../../../fckeditor/" && Change this to your local path
|
|
||||||
|
|
||||||
oFCKeditor = CREATEOBJECT("FCKeditor")
|
|
||||||
oFCKeditor.fckeditor("FCKeditor1")
|
|
||||||
|
|
||||||
lcToolbar=request.querystring("Toolbar") && Request Parameter
|
|
||||||
lcToolbar=oFCKeditor.StripAttacks(lcToolbar) && Remove special escape characters
|
|
||||||
IF !EMPTY(lcToolbar)
|
|
||||||
oFCKeditor.ToolbarSet=lcToolbar
|
|
||||||
ENDIF
|
|
||||||
|
|
||||||
lcText=[<p>This is some <strong>sample text</strong>. You are using ]
|
|
||||||
lcText=lcText+[<a href='http://www.fckeditor.net/'>FCKeditor</a>.]
|
|
||||||
|
|
||||||
oFCKeditor.BasePath = sBasePath
|
|
||||||
oFCKeditor.cValue = lcText
|
|
||||||
|
|
||||||
? oFCKeditor.Create()
|
|
||||||
|
|
||||||
%>
|
|
||||||
<br>
|
|
||||||
<input type="submit" value="Submit">
|
|
||||||
</form>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
@@ -1,98 +0,0 @@
|
|||||||
<%
|
|
||||||
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
|
|
||||||
* Copyright (C) 2003-2008 Frederico Caldeira Knabben
|
|
||||||
*
|
|
||||||
* == BEGIN LICENSE ==
|
|
||||||
*
|
|
||||||
* Licensed under the terms of any of the following licenses at your
|
|
||||||
* choice:
|
|
||||||
*
|
|
||||||
* - GNU General Public License Version 2 or later (the "GPL")
|
|
||||||
* http://www.gnu.org/licenses/gpl.html
|
|
||||||
*
|
|
||||||
* - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
|
|
||||||
* http://www.gnu.org/licenses/lgpl.html
|
|
||||||
*
|
|
||||||
* - Mozilla Public License Version 1.1 or later (the "MPL")
|
|
||||||
* http://www.mozilla.org/MPL/MPL-1.1.html
|
|
||||||
*
|
|
||||||
* == END LICENSE ==
|
|
||||||
*
|
|
||||||
* This page is a basic Sample for FCKeditor integration in the AFP script language (www.afpages.de)
|
|
||||||
*
|
|
||||||
%>
|
|
||||||
|
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
<title>FCKeditor - AFP Sample 4</title>
|
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
|
||||||
<meta name="robots" content="noindex, nofollow">
|
|
||||||
<link href="../sample.css" rel="stylesheet" type="text/css" />
|
|
||||||
|
|
||||||
<script type="text/javascript">
|
|
||||||
function FCKeditor_OnComplete( editorInstance )
|
|
||||||
{
|
|
||||||
var oCombo = document.getElementById( 'cmbSkins' ) ;
|
|
||||||
|
|
||||||
// Get the active skin.
|
|
||||||
var sSkin = editorInstance.Config['SkinPath'] ;
|
|
||||||
sSkin = sSkin.match( /[^\/]+(?=\/$)/g ) ;
|
|
||||||
|
|
||||||
oCombo.value = sSkin ;
|
|
||||||
oCombo.style.visibility = '' ;
|
|
||||||
}
|
|
||||||
|
|
||||||
function ChangeSkin( skinName )
|
|
||||||
{
|
|
||||||
window.location.href = window.location.pathname + "?Skin=" + skinName ;
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<h1>FCKeditor - AFP - Sample 4</h1>
|
|
||||||
This sample shows how to change the editor skin.
|
|
||||||
<hr>
|
|
||||||
<table cellpadding="0" cellspacing="0" border="0">
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
Select the skin to load:
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<select id="cmbSkins" onchange="ChangeSkin(this.value);" style="VISIBILITY: hidden">
|
|
||||||
<option value="default" selected>Default</option>
|
|
||||||
<option value="office2003">Office 2003</option>
|
|
||||||
<option value="silver">Silver</option>
|
|
||||||
</select>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
<br>
|
|
||||||
<form action="sampleposteddata.afp" method="post" target="_blank">
|
|
||||||
<%
|
|
||||||
|
|
||||||
sBasePath="../../../fckeditor/" && <-- Change this to your local path
|
|
||||||
|
|
||||||
oFCKeditor = CREATEOBJECT("FCKeditor")
|
|
||||||
oFCKeditor.fckeditor("FCKeditor1")
|
|
||||||
|
|
||||||
lcSkin=request.querystring("Skin") && Request Parameter
|
|
||||||
lcSkin=oFCKeditor.StripAttacks(lcSkin) && Remove special escape characters
|
|
||||||
IF !EMPTY(lcSkin)
|
|
||||||
oFCKeditor.aconfig[1,1]="SkinPath"
|
|
||||||
oFCKeditor.aconfig[1,2]="/fckeditor/editor/skins/"+lcSkin+"/" && <-- Change this to your local path
|
|
||||||
ENDIF
|
|
||||||
|
|
||||||
lcText=[<p>This is some <strong>sample text</strong>. You are using ]
|
|
||||||
lcText=lcText+[<a href='http://www.fckeditor.net/'>FCKeditor</a>.]
|
|
||||||
|
|
||||||
oFCKeditor.BasePath = sBasePath
|
|
||||||
oFCKeditor.cValue = lcText
|
|
||||||
|
|
||||||
? oFCKeditor.Create()
|
|
||||||
|
|
||||||
%>
|
|
||||||
<br>
|
|
||||||
<input type="submit" value="Submit">
|
|
||||||
</form>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
@@ -1,63 +0,0 @@
|
|||||||
<%
|
|
||||||
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
|
|
||||||
* Copyright (C) 2003-2008 Frederico Caldeira Knabben
|
|
||||||
*
|
|
||||||
* == BEGIN LICENSE ==
|
|
||||||
*
|
|
||||||
* Licensed under the terms of any of the following licenses at your
|
|
||||||
* choice:
|
|
||||||
*
|
|
||||||
* - GNU General Public License Version 2 or later (the "GPL")
|
|
||||||
* http://www.gnu.org/licenses/gpl.html
|
|
||||||
*
|
|
||||||
* - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
|
|
||||||
* http://www.gnu.org/licenses/lgpl.html
|
|
||||||
*
|
|
||||||
* - Mozilla Public License Version 1.1 or later (the "MPL")
|
|
||||||
* http://www.mozilla.org/MPL/MPL-1.1.html
|
|
||||||
*
|
|
||||||
* == END LICENSE ==
|
|
||||||
*
|
|
||||||
* This page lists the data posted by a form.
|
|
||||||
*
|
|
||||||
%>
|
|
||||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
<title>FCKeditor - AFP - Samples - Posted Data</title>
|
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
|
||||||
<meta name="robots" content="noindex, nofollow">
|
|
||||||
<link href="../sample.css" rel="stylesheet" type="text/css">
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<h1>FCKeditor - Samples - Posted Data</h1>
|
|
||||||
This page lists all data posted by the form.
|
|
||||||
<hr>
|
|
||||||
<table border="1" cellspacing="0" id="outputSample">
|
|
||||||
<colgroup><col width="80"><col></colgroup>
|
|
||||||
<thead>
|
|
||||||
<tr>
|
|
||||||
<th>Field Name</th>
|
|
||||||
<th>Value</th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<%
|
|
||||||
lcForm=REQUEST.Form()
|
|
||||||
lcForm=STRTRAN(lcForm,"&",CHR(13)+CHR(10))
|
|
||||||
|
|
||||||
FOR lnLoop=1 TO MEMLINES(lcForm)
|
|
||||||
lcZeile=ALLTRIM(MLINE(lcForm,lnLoop))
|
|
||||||
IF AT("=",lcZeile)>0
|
|
||||||
lcVariable=UPPER(ALLTRIM(LEFT(lcZeile,AT("=",lcZeile)-1)))
|
|
||||||
lcWert=ALLTRIM(RIGHT(lcZeile,LEN(lcZeile)-AT("=",lcZeile)))
|
|
||||||
lcWert=Server.UrlDecode( lcWert )
|
|
||||||
lcWert=STRTRAN(lcWert,"<","<")
|
|
||||||
lcWert=STRTRAN(lcWert,">",">") && ... if wanted remove/translate HTML Chars ...
|
|
||||||
|
|
||||||
? [<tr><th>]+lcVariable+[ =</th><td><pre>]+lcWert+[</pre></td></tr>]
|
|
||||||
ENDIF
|
|
||||||
NEXT
|
|
||||||
%>
|
|
||||||
</table>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
@@ -1,62 +0,0 @@
|
|||||||
<%@ codepage="65001" language="VBScript" %>
|
|
||||||
<% Option Explicit %>
|
|
||||||
<!--
|
|
||||||
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
|
|
||||||
* Copyright (C) 2003-2008 Frederico Caldeira Knabben
|
|
||||||
*
|
|
||||||
* == BEGIN LICENSE ==
|
|
||||||
*
|
|
||||||
* Licensed under the terms of any of the following licenses at your
|
|
||||||
* choice:
|
|
||||||
*
|
|
||||||
* - GNU General Public License Version 2 or later (the "GPL")
|
|
||||||
* http://www.gnu.org/licenses/gpl.html
|
|
||||||
*
|
|
||||||
* - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
|
|
||||||
* http://www.gnu.org/licenses/lgpl.html
|
|
||||||
*
|
|
||||||
* - Mozilla Public License Version 1.1 or later (the "MPL")
|
|
||||||
* http://www.mozilla.org/MPL/MPL-1.1.html
|
|
||||||
*
|
|
||||||
* == END LICENSE ==
|
|
||||||
*
|
|
||||||
* Sample page.
|
|
||||||
-->
|
|
||||||
<% ' You must set "Enable Parent Paths" on your web site in order this relative include to work. %>
|
|
||||||
<!-- #INCLUDE file="../../fckeditor.asp" -->
|
|
||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
|
||||||
<head>
|
|
||||||
<title>FCKeditor - Sample</title>
|
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
|
||||||
<meta name="robots" content="noindex, nofollow" />
|
|
||||||
<link href="../sample.css" rel="stylesheet" type="text/css" />
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<h1>
|
|
||||||
FCKeditor - ASP - Sample 1
|
|
||||||
</h1>
|
|
||||||
<div>
|
|
||||||
This sample displays a normal HTML form with an FCKeditor with full features enabled.
|
|
||||||
</div>
|
|
||||||
<hr />
|
|
||||||
<form action="sampleposteddata.asp" method="post" target="_blank">
|
|
||||||
<%
|
|
||||||
' Automatically calculates the editor base path based on the _samples directory.
|
|
||||||
' This is usefull only for these samples. A real application should use something like this:
|
|
||||||
' oFCKeditor.BasePath = '/fckeditor/' ; // '/fckeditor/' is the default value.
|
|
||||||
Dim sBasePath
|
|
||||||
sBasePath = Request.ServerVariables("PATH_INFO")
|
|
||||||
sBasePath = Left( sBasePath, InStrRev( sBasePath, "/_samples" ) )
|
|
||||||
|
|
||||||
Dim oFCKeditor
|
|
||||||
Set oFCKeditor = New FCKeditor
|
|
||||||
oFCKeditor.BasePath = sBasePath
|
|
||||||
oFCKeditor.Value = "<p>This is some <strong>sample text</strong>. You are using <a href=""http://www.fckeditor.net/"">FCKeditor</a>."
|
|
||||||
oFCKeditor.Create "FCKeditor1"
|
|
||||||
%>
|
|
||||||
<br />
|
|
||||||
<input type="submit" value="Submit" />
|
|
||||||
</form>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
@@ -1,108 +0,0 @@
|
|||||||
<%@ CodePage=65001 Language="VBScript"%>
|
|
||||||
<% Option Explicit %>
|
|
||||||
<!--
|
|
||||||
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
|
|
||||||
* Copyright (C) 2003-2008 Frederico Caldeira Knabben
|
|
||||||
*
|
|
||||||
* == BEGIN LICENSE ==
|
|
||||||
*
|
|
||||||
* Licensed under the terms of any of the following licenses at your
|
|
||||||
* choice:
|
|
||||||
*
|
|
||||||
* - GNU General Public License Version 2 or later (the "GPL")
|
|
||||||
* http://www.gnu.org/licenses/gpl.html
|
|
||||||
*
|
|
||||||
* - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
|
|
||||||
* http://www.gnu.org/licenses/lgpl.html
|
|
||||||
*
|
|
||||||
* - Mozilla Public License Version 1.1 or later (the "MPL")
|
|
||||||
* http://www.mozilla.org/MPL/MPL-1.1.html
|
|
||||||
*
|
|
||||||
* == END LICENSE ==
|
|
||||||
*
|
|
||||||
* Sample page.
|
|
||||||
-->
|
|
||||||
<% ' You must set "Enable Parent Paths" on your web site in order this relative include to work. %>
|
|
||||||
<!-- #INCLUDE file="../../fckeditor.asp" -->
|
|
||||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
<title>FCKeditor - Sample</title>
|
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
|
||||||
<meta name="robots" content="noindex, nofollow">
|
|
||||||
<link href="../sample.css" rel="stylesheet" type="text/css" />
|
|
||||||
<script type="text/javascript">
|
|
||||||
|
|
||||||
function FCKeditor_OnComplete( editorInstance )
|
|
||||||
{
|
|
||||||
var oCombo = document.getElementById( 'cmbLanguages' ) ;
|
|
||||||
for ( code in editorInstance.Language.AvailableLanguages )
|
|
||||||
{
|
|
||||||
AddComboOption( oCombo, editorInstance.Language.AvailableLanguages[code] + ' (' + code + ')', code ) ;
|
|
||||||
}
|
|
||||||
oCombo.value = editorInstance.Language.ActiveLanguage.Code ;
|
|
||||||
}
|
|
||||||
|
|
||||||
function AddComboOption(combo, optionText, optionValue)
|
|
||||||
{
|
|
||||||
var oOption = document.createElement("OPTION") ;
|
|
||||||
|
|
||||||
combo.options.add(oOption) ;
|
|
||||||
|
|
||||||
oOption.innerHTML = optionText ;
|
|
||||||
oOption.value = optionValue ;
|
|
||||||
|
|
||||||
return oOption ;
|
|
||||||
}
|
|
||||||
|
|
||||||
function ChangeLanguage( languageCode )
|
|
||||||
{
|
|
||||||
window.location.href = window.location.pathname + "?Lang=" + languageCode ;
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<h1>FCKeditor - ASP - Sample 2</h1>
|
|
||||||
This sample shows the editor in all its available languages.
|
|
||||||
<hr>
|
|
||||||
<table cellpadding="0" cellspacing="0" border="0">
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
Select a language:
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<select id="cmbLanguages" onchange="ChangeLanguage(this.value);">
|
|
||||||
</select>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
<br>
|
|
||||||
<form action="sampleposteddata.asp" method="post" target="_blank">
|
|
||||||
<%
|
|
||||||
' Automatically calculates the editor base path based on the _samples directory.
|
|
||||||
' This is usefull only for these samples. A real application should use something like this:
|
|
||||||
' oFCKeditor.BasePath = '/fckeditor/' ; // '/fckeditor/' is the default value.
|
|
||||||
Dim sBasePath
|
|
||||||
sBasePath = Request.ServerVariables("PATH_INFO")
|
|
||||||
sBasePath = Left( sBasePath, InStrRev( sBasePath, "/_samples" ) )
|
|
||||||
|
|
||||||
Dim oFCKeditor
|
|
||||||
Set oFCKeditor = New FCKeditor
|
|
||||||
oFCKeditor.BasePath = sBasePath
|
|
||||||
|
|
||||||
If Request.QueryString("Lang") = "" Then
|
|
||||||
oFCKeditor.Config("AutoDetectLanguage") = True
|
|
||||||
oFCKeditor.Config("DefaultLanguage") = "en"
|
|
||||||
Else
|
|
||||||
oFCKeditor.Config("AutoDetectLanguage") = False
|
|
||||||
oFCKeditor.Config("DefaultLanguage") = Request.QueryString("Lang")
|
|
||||||
End If
|
|
||||||
|
|
||||||
oFCKeditor.Value = "<p>This is some <strong>sample text</strong>. You are using <a href=""http://www.fckeditor.net/"">FCKeditor</a>."
|
|
||||||
oFCKeditor.Create "FCKeditor1"
|
|
||||||
%>
|
|
||||||
<br>
|
|
||||||
<input type="submit" value="Submit">
|
|
||||||
</form>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
@@ -1,92 +0,0 @@
|
|||||||
<%@ CodePage=65001 Language="VBScript"%>
|
|
||||||
<% Option Explicit %>
|
|
||||||
<!--
|
|
||||||
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
|
|
||||||
* Copyright (C) 2003-2008 Frederico Caldeira Knabben
|
|
||||||
*
|
|
||||||
* == BEGIN LICENSE ==
|
|
||||||
*
|
|
||||||
* Licensed under the terms of any of the following licenses at your
|
|
||||||
* choice:
|
|
||||||
*
|
|
||||||
* - GNU General Public License Version 2 or later (the "GPL")
|
|
||||||
* http://www.gnu.org/licenses/gpl.html
|
|
||||||
*
|
|
||||||
* - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
|
|
||||||
* http://www.gnu.org/licenses/lgpl.html
|
|
||||||
*
|
|
||||||
* - Mozilla Public License Version 1.1 or later (the "MPL")
|
|
||||||
* http://www.mozilla.org/MPL/MPL-1.1.html
|
|
||||||
*
|
|
||||||
* == END LICENSE ==
|
|
||||||
*
|
|
||||||
* Sample page.
|
|
||||||
-->
|
|
||||||
<% ' You must set "Enable Parent Paths" on your web site in order this relative include to work. %>
|
|
||||||
<!-- #INCLUDE file="../../fckeditor.asp" -->
|
|
||||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
<title>FCKeditor - Sample</title>
|
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
|
||||||
<meta name="robots" content="noindex, nofollow">
|
|
||||||
<link href="../sample.css" rel="stylesheet" type="text/css" />
|
|
||||||
<script type="text/javascript">
|
|
||||||
|
|
||||||
function FCKeditor_OnComplete( editorInstance )
|
|
||||||
{
|
|
||||||
var oCombo = document.getElementById( 'cmbToolbars' ) ;
|
|
||||||
oCombo.value = editorInstance.ToolbarSet.Name ;
|
|
||||||
oCombo.style.visibility = '' ;
|
|
||||||
}
|
|
||||||
|
|
||||||
function ChangeToolbar( toolbarName )
|
|
||||||
{
|
|
||||||
window.location.href = window.location.pathname + "?Toolbar=" + toolbarName ;
|
|
||||||
}
|
|
||||||
|
|
||||||
</script>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<h1>FCKeditor - ASP - Sample 3</h1>
|
|
||||||
This sample shows how to change the editor toolbar.
|
|
||||||
<hr>
|
|
||||||
<table cellpadding="0" cellspacing="0" border="0">
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
Select the toolbar to load:
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<select id="cmbToolbars" onchange="ChangeToolbar(this.value);" style="VISIBILITY: hidden">
|
|
||||||
<option value="Default" selected>Default</option>
|
|
||||||
<option value="Basic">Basic</option>
|
|
||||||
</select>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
<br>
|
|
||||||
<form action="sampleposteddata.asp" method="post" target="_blank">
|
|
||||||
<%
|
|
||||||
' Automatically calculates the editor base path based on the _samples directory.
|
|
||||||
' This is usefull only for these samples. A real application should use something like this:
|
|
||||||
' oFCKeditor.BasePath = '/fckeditor/' ; // '/fckeditor/' is the default value.
|
|
||||||
Dim sBasePath
|
|
||||||
sBasePath = Request.ServerVariables("PATH_INFO")
|
|
||||||
sBasePath = Left( sBasePath, InStrRev( sBasePath, "/_samples" ) )
|
|
||||||
|
|
||||||
Dim oFCKeditor
|
|
||||||
Set oFCKeditor = New FCKeditor
|
|
||||||
oFCKeditor.BasePath = sBasePath
|
|
||||||
|
|
||||||
If Request.QueryString("Toolbar") <> "" Then
|
|
||||||
oFCKeditor.ToolbarSet = Server.HTMLEncode( Request.QueryString("Toolbar") )
|
|
||||||
End If
|
|
||||||
|
|
||||||
oFCKeditor.Value = "<p>This is some <strong>sample text</strong>. You are using <a href=""http://www.fckeditor.net/"">FCKeditor</a>."
|
|
||||||
oFCKeditor.Create "FCKeditor1"
|
|
||||||
%>
|
|
||||||
<br>
|
|
||||||
<input type="submit" value="Submit">
|
|
||||||
</form>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
@@ -1,98 +0,0 @@
|
|||||||
<%@ CodePage=65001 Language="VBScript"%>
|
|
||||||
<% Option Explicit %>
|
|
||||||
<!--
|
|
||||||
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
|
|
||||||
* Copyright (C) 2003-2008 Frederico Caldeira Knabben
|
|
||||||
*
|
|
||||||
* == BEGIN LICENSE ==
|
|
||||||
*
|
|
||||||
* Licensed under the terms of any of the following licenses at your
|
|
||||||
* choice:
|
|
||||||
*
|
|
||||||
* - GNU General Public License Version 2 or later (the "GPL")
|
|
||||||
* http://www.gnu.org/licenses/gpl.html
|
|
||||||
*
|
|
||||||
* - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
|
|
||||||
* http://www.gnu.org/licenses/lgpl.html
|
|
||||||
*
|
|
||||||
* - Mozilla Public License Version 1.1 or later (the "MPL")
|
|
||||||
* http://www.mozilla.org/MPL/MPL-1.1.html
|
|
||||||
*
|
|
||||||
* == END LICENSE ==
|
|
||||||
*
|
|
||||||
* Sample page.
|
|
||||||
-->
|
|
||||||
<% ' You must set "Enable Parent Paths" on your web site in order this relative include to work. %>
|
|
||||||
<!-- #INCLUDE file="../../fckeditor.asp" -->
|
|
||||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
<title>FCKeditor - Sample</title>
|
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
|
||||||
<meta name="robots" content="noindex, nofollow">
|
|
||||||
<link href="../sample.css" rel="stylesheet" type="text/css" />
|
|
||||||
<script type="text/javascript">
|
|
||||||
|
|
||||||
function FCKeditor_OnComplete( editorInstance )
|
|
||||||
{
|
|
||||||
var oCombo = document.getElementById( 'cmbSkins' ) ;
|
|
||||||
|
|
||||||
// Get the active skin.
|
|
||||||
var sSkin = editorInstance.Config['SkinPath'] ;
|
|
||||||
sSkin = sSkin.match( /[^\/]+(?=\/$)/g ) ;
|
|
||||||
|
|
||||||
oCombo.value = sSkin ;
|
|
||||||
oCombo.style.visibility = '' ;
|
|
||||||
}
|
|
||||||
|
|
||||||
function ChangeSkin( skinName )
|
|
||||||
{
|
|
||||||
window.location.href = window.location.pathname + "?Skin=" + skinName ;
|
|
||||||
}
|
|
||||||
|
|
||||||
</script>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<h1>FCKeditor - ASP - Sample 4</h1>
|
|
||||||
This sample shows how to change the editor skin.
|
|
||||||
<hr>
|
|
||||||
<table cellpadding="0" cellspacing="0" border="0">
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
Select the skin to load:
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<select id="cmbSkins" onchange="ChangeSkin(this.value);" style="VISIBILITY: hidden">
|
|
||||||
<option value="default" selected>Default</option>
|
|
||||||
<option value="office2003">Office 2003</option>
|
|
||||||
<option value="silver">Silver</option>
|
|
||||||
</select>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
<br>
|
|
||||||
<form action="sampleposteddata.asp" method="post" target="_blank">
|
|
||||||
<%
|
|
||||||
' Automatically calculates the editor base path based on the _samples directory.
|
|
||||||
' This is usefull only for these samples. A real application should use something like this:
|
|
||||||
' oFCKeditor.BasePath = '/fckeditor/' ; // '/fckeditor/' is the default value.
|
|
||||||
Dim sBasePath
|
|
||||||
sBasePath = Request.ServerVariables("PATH_INFO")
|
|
||||||
sBasePath = Left( sBasePath, InStrRev( sBasePath, "/_samples" ) )
|
|
||||||
|
|
||||||
Dim oFCKeditor
|
|
||||||
Set oFCKeditor = New FCKeditor
|
|
||||||
oFCKeditor.BasePath = sBasePath
|
|
||||||
|
|
||||||
If Request.QueryString("Skin") <> "" Then
|
|
||||||
oFCKeditor.Config("SkinPath") = sBasePath + "editor/skins/" & Server.HTMLEncode( Request.QueryString("Skin") ) + "/"
|
|
||||||
End If
|
|
||||||
|
|
||||||
oFCKeditor.Value = "<p>This is some <strong>sample text</strong>. You are using <a href=""http://www.fckeditor.net/"">FCKeditor</a>."
|
|
||||||
oFCKeditor.Create "FCKeditor1"
|
|
||||||
%>
|
|
||||||
<br>
|
|
||||||
<input type="submit" value="Submit">
|
|
||||||
</form>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
@@ -1,56 +0,0 @@
|
|||||||
<%@ CodePage=65001 Language="VBScript"%>
|
|
||||||
<% Option Explicit %>
|
|
||||||
<!--
|
|
||||||
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
|
|
||||||
* Copyright (C) 2003-2008 Frederico Caldeira Knabben
|
|
||||||
*
|
|
||||||
* == BEGIN LICENSE ==
|
|
||||||
*
|
|
||||||
* Licensed under the terms of any of the following licenses at your
|
|
||||||
* choice:
|
|
||||||
*
|
|
||||||
* - GNU General Public License Version 2 or later (the "GPL")
|
|
||||||
* http://www.gnu.org/licenses/gpl.html
|
|
||||||
*
|
|
||||||
* - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
|
|
||||||
* http://www.gnu.org/licenses/lgpl.html
|
|
||||||
*
|
|
||||||
* - Mozilla Public License Version 1.1 or later (the "MPL")
|
|
||||||
* http://www.mozilla.org/MPL/MPL-1.1.html
|
|
||||||
*
|
|
||||||
* == END LICENSE ==
|
|
||||||
*
|
|
||||||
* This page lists the data posted by a form.
|
|
||||||
-->
|
|
||||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
<title>FCKeditor - Samples - Posted Data</title>
|
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
|
||||||
<meta name="robots" content="noindex, nofollow">
|
|
||||||
<link href="../sample.css" rel="stylesheet" type="text/css" >
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<h1>FCKeditor - Samples - Posted Data</h1>
|
|
||||||
This page lists all data posted by the form.
|
|
||||||
<hr>
|
|
||||||
<table border="1" cellspacing="0" id="outputSample">
|
|
||||||
<colgroup><col width="80"><col></colgroup>
|
|
||||||
<thead>
|
|
||||||
<tr>
|
|
||||||
<th>Field Name</th>
|
|
||||||
<th>Value</th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<%
|
|
||||||
Dim sForm
|
|
||||||
For Each sForm in Request.Form
|
|
||||||
%>
|
|
||||||
<tr>
|
|
||||||
<th><%=sForm%></th>
|
|
||||||
<td><pre><%=Server.HTMLEncode( Request.Form(sForm) )%></pre></td>
|
|
||||||
</tr>
|
|
||||||
<% Next %>
|
|
||||||
</table>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
@@ -1,63 +0,0 @@
|
|||||||
<cfsetting enablecfoutputonly="true">
|
|
||||||
<!---
|
|
||||||
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
|
|
||||||
* Copyright (C) 2003-2008 Frederico Caldeira Knabben
|
|
||||||
*
|
|
||||||
* == BEGIN LICENSE ==
|
|
||||||
*
|
|
||||||
* Licensed under the terms of any of the following licenses at your
|
|
||||||
* choice:
|
|
||||||
*
|
|
||||||
* - GNU General Public License Version 2 or later (the "GPL")
|
|
||||||
* http://www.gnu.org/licenses/gpl.html
|
|
||||||
*
|
|
||||||
* - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
|
|
||||||
* http://www.gnu.org/licenses/lgpl.html
|
|
||||||
*
|
|
||||||
* - Mozilla Public License Version 1.1 or later (the "MPL")
|
|
||||||
* http://www.mozilla.org/MPL/MPL-1.1.html
|
|
||||||
*
|
|
||||||
* == END LICENSE ==
|
|
||||||
*
|
|
||||||
* Sample page for ColdFusion.
|
|
||||||
--->
|
|
||||||
|
|
||||||
<cfoutput>
|
|
||||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
<title>FCKeditor - Sample</title>
|
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
|
||||||
<meta name="robots" content="noindex, nofollow">
|
|
||||||
<link href="../sample.css" rel="stylesheet" type="text/css" />
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<h1>FCKeditor - ColdFusion - Sample 1</h1>
|
|
||||||
|
|
||||||
This sample displays a normal HTML form with a FCKeditor with full features enabled.
|
|
||||||
<hr>
|
|
||||||
|
|
||||||
<form method="POST" action="sampleposteddata.cfm">
|
|
||||||
</cfoutput>
|
|
||||||
|
|
||||||
<!--- Calculate basepath for FCKeditor. It's in the folder right above _samples --->
|
|
||||||
<cfset basePath = Left( cgi.script_name, FindNoCase( '_samples', cgi.script_name ) - 1 )>
|
|
||||||
|
|
||||||
<cfmodule
|
|
||||||
template="../../fckeditor.cfm"
|
|
||||||
basePath="#basePath#"
|
|
||||||
instanceName="myEditor"
|
|
||||||
value='<p>This is some <strong>sample text</strong>. You are using <a href="http://www.fckeditor.net/">FCKeditor</a>.</p>'
|
|
||||||
width="100%"
|
|
||||||
height="200"
|
|
||||||
>
|
|
||||||
|
|
||||||
<cfoutput>
|
|
||||||
<br />
|
|
||||||
<input type="submit" value="Submit">
|
|
||||||
<hr />
|
|
||||||
</form>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
</cfoutput>
|
|
||||||
<cfsetting enablecfoutputonly="false">
|
|
||||||
@@ -1,67 +0,0 @@
|
|||||||
<cfsetting enablecfoutputonly="true">
|
|
||||||
<!---
|
|
||||||
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
|
|
||||||
* Copyright (C) 2003-2008 Frederico Caldeira Knabben
|
|
||||||
*
|
|
||||||
* == BEGIN LICENSE ==
|
|
||||||
*
|
|
||||||
* Licensed under the terms of any of the following licenses at your
|
|
||||||
* choice:
|
|
||||||
*
|
|
||||||
* - GNU General Public License Version 2 or later (the "GPL")
|
|
||||||
* http://www.gnu.org/licenses/gpl.html
|
|
||||||
*
|
|
||||||
* - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
|
|
||||||
* http://www.gnu.org/licenses/lgpl.html
|
|
||||||
*
|
|
||||||
* - Mozilla Public License Version 1.1 or later (the "MPL")
|
|
||||||
* http://www.mozilla.org/MPL/MPL-1.1.html
|
|
||||||
*
|
|
||||||
* == END LICENSE ==
|
|
||||||
*
|
|
||||||
* Sample page for ColdFusion MX 6.0 and above.
|
|
||||||
--->
|
|
||||||
|
|
||||||
<cfoutput>
|
|
||||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
<title>FCKeditor - Sample</title>
|
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
|
||||||
<meta name="robots" content="noindex, nofollow">
|
|
||||||
<link href="../sample.css" rel="stylesheet" type="text/css" />
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<h1>FCKeditor - ColdFusion Component (CFC) - Sample 1</h1>
|
|
||||||
|
|
||||||
This sample displays a normal HTML form with a FCKeditor with full features enabled.
|
|
||||||
<hr>
|
|
||||||
|
|
||||||
<form method="POST" action="sampleposteddata.cfm">
|
|
||||||
</cfoutput>
|
|
||||||
|
|
||||||
<cfif listFirst( server.coldFusion.productVersion ) LT 6>
|
|
||||||
<cfoutput><br><em style="color: red;">This sample works only with a ColdFusion MX server and higher, because it uses some advantages of this version.</em></cfoutput>
|
|
||||||
<cfabort>
|
|
||||||
</cfif>
|
|
||||||
|
|
||||||
<cfscript>
|
|
||||||
// Calculate basepath for FCKeditor. It's in the folder right above _samples
|
|
||||||
basePath = Left( cgi.script_name, FindNoCase( '_samples', cgi.script_name ) - 1 ) ;
|
|
||||||
|
|
||||||
fckEditor = createObject( "component", "#basePath#fckeditor" ) ;
|
|
||||||
fckEditor.instanceName = "myEditor" ;
|
|
||||||
fckEditor.value = '<p>This is some <strong>sample text</strong>. You are using <a href="http://www.fckeditor.net/">FCKeditor</a>.</p>' ;
|
|
||||||
fckEditor.basePath = basePath ;
|
|
||||||
fckEditor.Create() ; // create the editor.
|
|
||||||
</cfscript>
|
|
||||||
|
|
||||||
<cfoutput>
|
|
||||||
<br />
|
|
||||||
<input type="submit" value="Submit">
|
|
||||||
<hr />
|
|
||||||
</form>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
</cfoutput>
|
|
||||||
<cfsetting enablecfoutputonly="false">
|
|
||||||
@@ -1,110 +0,0 @@
|
|||||||
<cfsetting enablecfoutputonly="true">
|
|
||||||
<!---
|
|
||||||
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
|
|
||||||
* Copyright (C) 2003-2008 Frederico Caldeira Knabben
|
|
||||||
*
|
|
||||||
* == BEGIN LICENSE ==
|
|
||||||
*
|
|
||||||
* Licensed under the terms of any of the following licenses at your
|
|
||||||
* choice:
|
|
||||||
*
|
|
||||||
* - GNU General Public License Version 2 or later (the "GPL")
|
|
||||||
* http://www.gnu.org/licenses/gpl.html
|
|
||||||
*
|
|
||||||
* - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
|
|
||||||
* http://www.gnu.org/licenses/lgpl.html
|
|
||||||
*
|
|
||||||
* - Mozilla Public License Version 1.1 or later (the "MPL")
|
|
||||||
* http://www.mozilla.org/MPL/MPL-1.1.html
|
|
||||||
*
|
|
||||||
* == END LICENSE ==
|
|
||||||
*
|
|
||||||
* Sample page for ColdFusion.
|
|
||||||
--->
|
|
||||||
|
|
||||||
<cfoutput>
|
|
||||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
<title>FCKeditor - Sample</title>
|
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
|
||||||
<meta name="robots" content="noindex, nofollow">
|
|
||||||
<link href="../sample.css" rel="stylesheet" type="text/css" />
|
|
||||||
<script type="text/javascript">
|
|
||||||
|
|
||||||
function FCKeditor_OnComplete( editorInstance )
|
|
||||||
{
|
|
||||||
var oCombo = document.getElementById( 'cmbLanguages' ) ;
|
|
||||||
for ( code in editorInstance.Language.AvailableLanguages )
|
|
||||||
{
|
|
||||||
AddComboOption( oCombo, editorInstance.Language.AvailableLanguages[code] + ' (' + code + ')', code ) ;
|
|
||||||
}
|
|
||||||
oCombo.value = editorInstance.Language.ActiveLanguage.Code ;
|
|
||||||
}
|
|
||||||
|
|
||||||
function AddComboOption(combo, optionText, optionValue)
|
|
||||||
{
|
|
||||||
var oOption = document.createElement("OPTION") ;
|
|
||||||
|
|
||||||
combo.options.add(oOption) ;
|
|
||||||
|
|
||||||
oOption.innerHTML = optionText ;
|
|
||||||
oOption.value = optionValue ;
|
|
||||||
|
|
||||||
return oOption ;
|
|
||||||
}
|
|
||||||
|
|
||||||
function ChangeLanguage( languageCode )
|
|
||||||
{
|
|
||||||
window.location.href = window.location.pathname + "?Lang=" + languageCode ;
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<h1>FCKeditor - ColdFusion - Sample 2</h1>
|
|
||||||
This sample shows the editor in all its available languages.
|
|
||||||
<hr>
|
|
||||||
<table cellpadding="0" cellspacing="0" border="0">
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
Select a language:
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<select id="cmbLanguages" onchange="ChangeLanguage(this.value);">
|
|
||||||
</select>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
<br>
|
|
||||||
<form action="sampleposteddata.cfm" method="post" target="_blank">
|
|
||||||
</cfoutput>
|
|
||||||
|
|
||||||
<cfset config = structNew()>
|
|
||||||
<cfif isDefined( "URL.Lang" )>
|
|
||||||
<cfset config["AutoDetectLanguage"] = false>
|
|
||||||
<cfset config["DefaultLanguage"] = HTMLEditFormat( URL.Lang )>
|
|
||||||
<cfelse>
|
|
||||||
<cfset config["AutoDetectLanguage"] = true>
|
|
||||||
<cfset config["DefaultLanguage"] = 'en'>
|
|
||||||
</cfif>
|
|
||||||
|
|
||||||
<!--- Calculate basepath for FCKeditor. It's in the folder right above _samples --->
|
|
||||||
<cfset basePath = Left( cgi.script_name, FindNoCase( '_samples', cgi.script_name ) - 1 )>
|
|
||||||
|
|
||||||
<cfmodule
|
|
||||||
template="../../fckeditor.cfm"
|
|
||||||
basePath="#basePath#"
|
|
||||||
instanceName="myEditor"
|
|
||||||
value='<p>This is some <strong>sample text</strong>. You are using <a href="http://www.fckeditor.net/">FCKeditor</a>.</p>'
|
|
||||||
width="100%"
|
|
||||||
height="200"
|
|
||||||
config="#config#"
|
|
||||||
>
|
|
||||||
<cfoutput>
|
|
||||||
<br>
|
|
||||||
<input type="submit" value="Submit">
|
|
||||||
</form>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
</cfoutput>
|
|
||||||
<cfsetting enablecfoutputonly="false">
|
|
||||||
@@ -1,114 +0,0 @@
|
|||||||
<cfsetting enablecfoutputonly="true">
|
|
||||||
<!---
|
|
||||||
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
|
|
||||||
* Copyright (C) 2003-2008 Frederico Caldeira Knabben
|
|
||||||
*
|
|
||||||
* == BEGIN LICENSE ==
|
|
||||||
*
|
|
||||||
* Licensed under the terms of any of the following licenses at your
|
|
||||||
* choice:
|
|
||||||
*
|
|
||||||
* - GNU General Public License Version 2 or later (the "GPL")
|
|
||||||
* http://www.gnu.org/licenses/gpl.html
|
|
||||||
*
|
|
||||||
* - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
|
|
||||||
* http://www.gnu.org/licenses/lgpl.html
|
|
||||||
*
|
|
||||||
* - Mozilla Public License Version 1.1 or later (the "MPL")
|
|
||||||
* http://www.mozilla.org/MPL/MPL-1.1.html
|
|
||||||
*
|
|
||||||
* == END LICENSE ==
|
|
||||||
*
|
|
||||||
* Sample page for ColdFusion MX 6.0 and above.
|
|
||||||
--->
|
|
||||||
|
|
||||||
<cfoutput>
|
|
||||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
<title>FCKeditor - Sample</title>
|
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
|
||||||
<meta name="robots" content="noindex, nofollow">
|
|
||||||
<link href="../sample.css" rel="stylesheet" type="text/css" />
|
|
||||||
<script type="text/javascript">
|
|
||||||
|
|
||||||
function FCKeditor_OnComplete( editorInstance )
|
|
||||||
{
|
|
||||||
var oCombo = document.getElementById( 'cmbLanguages' ) ;
|
|
||||||
for ( code in editorInstance.Language.AvailableLanguages )
|
|
||||||
{
|
|
||||||
AddComboOption( oCombo, editorInstance.Language.AvailableLanguages[code] + ' (' + code + ')', code ) ;
|
|
||||||
}
|
|
||||||
oCombo.value = editorInstance.Language.ActiveLanguage.Code ;
|
|
||||||
}
|
|
||||||
|
|
||||||
function AddComboOption(combo, optionText, optionValue)
|
|
||||||
{
|
|
||||||
var oOption = document.createElement("OPTION") ;
|
|
||||||
|
|
||||||
combo.options.add(oOption) ;
|
|
||||||
|
|
||||||
oOption.innerHTML = optionText ;
|
|
||||||
oOption.value = optionValue ;
|
|
||||||
|
|
||||||
return oOption ;
|
|
||||||
}
|
|
||||||
|
|
||||||
function ChangeLanguage( languageCode )
|
|
||||||
{
|
|
||||||
window.location.href = window.location.pathname + "?Lang=" + languageCode ;
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<h1>FCKeditor - ColdFusion Component (CFC) - Sample 2</h1>
|
|
||||||
This sample shows the editor in all its available languages.
|
|
||||||
<hr>
|
|
||||||
</cfoutput>
|
|
||||||
<cfif listFirst( server.coldFusion.productVersion ) LT 6>
|
|
||||||
<cfoutput><br><em style="color: red;">This sample works only with a ColdFusion MX server and higher, because it uses some advantages of this version.</em></cfoutput>
|
|
||||||
<cfabort>
|
|
||||||
</cfif>
|
|
||||||
<cfoutput>
|
|
||||||
<table cellpadding="0" cellspacing="0" border="0">
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
Select a language:
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<select id="cmbLanguages" onchange="ChangeLanguage(this.value);">
|
|
||||||
</select>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
<br>
|
|
||||||
<form action="sampleposteddata.cfm" method="post" target="_blank">
|
|
||||||
</cfoutput>
|
|
||||||
<cfscript>
|
|
||||||
// Calculate basepath for FCKeditor. It's in the folder right above _samples
|
|
||||||
basePath = Left( cgi.script_name, FindNoCase( '_samples', cgi.script_name ) - 1 ) ;
|
|
||||||
|
|
||||||
fckEditor = createObject( "component", "#basePath#fckeditor" ) ;
|
|
||||||
fckEditor.instanceName = "myEditor" ;
|
|
||||||
fckEditor.value = '<p>This is some <strong>sample text</strong>. You are using <a href="http://www.fckeditor.net/">FCKeditor</a>.</p>' ;
|
|
||||||
fckEditor.basePath = basePath ;
|
|
||||||
if ( isDefined( "URL.Lang" ) )
|
|
||||||
{
|
|
||||||
fckEditor.config["AutoDetectLanguage"] = false ;
|
|
||||||
fckEditor.config["DefaultLanguage"] = HTMLEditFormat( URL.Lang ) ;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
fckEeditor.config["AutoDetectLanguage"] = true ;
|
|
||||||
fckEeditor.config["DefaultLanguage"] = 'en' ;
|
|
||||||
}
|
|
||||||
fckEditor.create() ; // create the editor.
|
|
||||||
</cfscript>
|
|
||||||
<cfoutput>
|
|
||||||
<br>
|
|
||||||
<input type="submit" value="Submit">
|
|
||||||
</form>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
</cfoutput>
|
|
||||||
<cfsetting enablecfoutputonly="false">
|
|
||||||
@@ -1,95 +0,0 @@
|
|||||||
<cfsetting enablecfoutputonly="true">
|
|
||||||
<!---
|
|
||||||
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
|
|
||||||
* Copyright (C) 2003-2008 Frederico Caldeira Knabben
|
|
||||||
*
|
|
||||||
* == BEGIN LICENSE ==
|
|
||||||
*
|
|
||||||
* Licensed under the terms of any of the following licenses at your
|
|
||||||
* choice:
|
|
||||||
*
|
|
||||||
* - GNU General Public License Version 2 or later (the "GPL")
|
|
||||||
* http://www.gnu.org/licenses/gpl.html
|
|
||||||
*
|
|
||||||
* - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
|
|
||||||
* http://www.gnu.org/licenses/lgpl.html
|
|
||||||
*
|
|
||||||
* - Mozilla Public License Version 1.1 or later (the "MPL")
|
|
||||||
* http://www.mozilla.org/MPL/MPL-1.1.html
|
|
||||||
*
|
|
||||||
* == END LICENSE ==
|
|
||||||
*
|
|
||||||
* Sample page for ColdFusion.
|
|
||||||
--->
|
|
||||||
<cfoutput>
|
|
||||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
<title>FCKeditor - Sample</title>
|
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
|
||||||
<meta name="robots" content="noindex, nofollow">
|
|
||||||
<link href="../sample.css" rel="stylesheet" type="text/css" />
|
|
||||||
<script type="text/javascript">
|
|
||||||
|
|
||||||
function FCKeditor_OnComplete( editorInstance )
|
|
||||||
{
|
|
||||||
var oCombo = document.getElementById( 'cmbToolbars' ) ;
|
|
||||||
oCombo.value = editorInstance.ToolbarSet.Name ;
|
|
||||||
oCombo.style.visibility = '' ;
|
|
||||||
}
|
|
||||||
|
|
||||||
function ChangeToolbar( toolbarName )
|
|
||||||
{
|
|
||||||
window.location.href = window.location.pathname + "?Toolbar=" + toolbarName ;
|
|
||||||
}
|
|
||||||
|
|
||||||
</script>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<h1>FCKeditor - ColdFusion - Sample 3</h1>
|
|
||||||
This sample shows how to change the editor toolbar.
|
|
||||||
<hr>
|
|
||||||
<table cellpadding="0" cellspacing="0" border="0">
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
Select the toolbar to load:
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<select id="cmbToolbars" onchange="ChangeToolbar(this.value);" style="VISIBILITY: hidden">
|
|
||||||
<option value="Default" selected>Default</option>
|
|
||||||
<option value="Basic">Basic</option>
|
|
||||||
</select>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
<br>
|
|
||||||
<form action="sampleposteddata.cfm" method="post" target="_blank">
|
|
||||||
</cfoutput>
|
|
||||||
|
|
||||||
<cfif isDefined( "URL.Toolbar" )>
|
|
||||||
<cfset toolbarSet = HTMLEditFormat( URL.Toolbar )>
|
|
||||||
<cfelse>
|
|
||||||
<cfset toolbarSet = "Default">
|
|
||||||
</cfif>
|
|
||||||
|
|
||||||
<!--- Calculate basepath for FCKeditor. It's in the folder right above _samples --->
|
|
||||||
<cfset basePath = Left( cgi.script_name, FindNoCase( '_samples', cgi.script_name ) - 1 )>
|
|
||||||
|
|
||||||
<cfmodule
|
|
||||||
template="../../fckeditor.cfm"
|
|
||||||
basePath="#basePath#"
|
|
||||||
instanceName="myEditor"
|
|
||||||
value='<p>This is some <strong>sample text</strong>. You are using <a href="http://www.fckeditor.net/">FCKeditor</a>.</p>'
|
|
||||||
width="100%"
|
|
||||||
height="200"
|
|
||||||
toolbarSet="#toolbarSet#"
|
|
||||||
>
|
|
||||||
|
|
||||||
<cfoutput>
|
|
||||||
<br>
|
|
||||||
<input type="submit" value="Submit">
|
|
||||||
</form>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
</cfoutput>
|
|
||||||
<cfsetting enablecfoutputonly="false">
|
|
||||||
@@ -1,95 +0,0 @@
|
|||||||
<cfsetting enablecfoutputonly="true">
|
|
||||||
<!---
|
|
||||||
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
|
|
||||||
* Copyright (C) 2003-2008 Frederico Caldeira Knabben
|
|
||||||
*
|
|
||||||
* == BEGIN LICENSE ==
|
|
||||||
*
|
|
||||||
* Licensed under the terms of any of the following licenses at your
|
|
||||||
* choice:
|
|
||||||
*
|
|
||||||
* - GNU General Public License Version 2 or later (the "GPL")
|
|
||||||
* http://www.gnu.org/licenses/gpl.html
|
|
||||||
*
|
|
||||||
* - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
|
|
||||||
* http://www.gnu.org/licenses/lgpl.html
|
|
||||||
*
|
|
||||||
* - Mozilla Public License Version 1.1 or later (the "MPL")
|
|
||||||
* http://www.mozilla.org/MPL/MPL-1.1.html
|
|
||||||
*
|
|
||||||
* == END LICENSE ==
|
|
||||||
*
|
|
||||||
* Sample page for ColdFusion MX 6.0 and above.
|
|
||||||
--->
|
|
||||||
<cfoutput>
|
|
||||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
<title>FCKeditor - Sample</title>
|
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
|
||||||
<meta name="robots" content="noindex, nofollow">
|
|
||||||
<link href="../sample.css" rel="stylesheet" type="text/css" />
|
|
||||||
<script type="text/javascript">
|
|
||||||
|
|
||||||
function FCKeditor_OnComplete( editorInstance )
|
|
||||||
{
|
|
||||||
var oCombo = document.getElementById( 'cmbToolbars' ) ;
|
|
||||||
oCombo.value = editorInstance.ToolbarSet.Name ;
|
|
||||||
oCombo.style.visibility = '' ;
|
|
||||||
}
|
|
||||||
|
|
||||||
function ChangeToolbar( toolbarName )
|
|
||||||
{
|
|
||||||
window.location.href = window.location.pathname + "?Toolbar=" + toolbarName ;
|
|
||||||
}
|
|
||||||
|
|
||||||
</script>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<h1>FCKeditor - ColdFusion Component (CFC) - Sample 3</h1>
|
|
||||||
This sample shows how to change the editor toolbar.
|
|
||||||
<hr>
|
|
||||||
</cfoutput>
|
|
||||||
<cfif listFirst( server.coldFusion.productVersion ) LT 6>
|
|
||||||
<cfoutput><br><em style="color: red;">This sample works only with a ColdFusion MX server and higher, because it uses some advantages of this version.</em></cfoutput>
|
|
||||||
<cfabort>
|
|
||||||
</cfif>
|
|
||||||
<cfoutput>
|
|
||||||
<table cellpadding="0" cellspacing="0" border="0">
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
Select the toolbar to load:
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<select id="cmbToolbars" onchange="ChangeToolbar(this.value);" style="VISIBILITY: hidden">
|
|
||||||
<option value="Default" selected>Default</option>
|
|
||||||
<option value="Basic">Basic</option>
|
|
||||||
</select>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
<br>
|
|
||||||
<form action="sampleposteddata.cfm" method="post" target="_blank">
|
|
||||||
</cfoutput>
|
|
||||||
<cfscript>
|
|
||||||
// Calculate basepath for FCKeditor. It's in the folder right above _samples
|
|
||||||
basePath = Left( cgi.script_name, FindNoCase( '_samples', cgi.script_name ) - 1 ) ;
|
|
||||||
|
|
||||||
fckEditor = createObject( "component", "#basePath#fckeditor" ) ;
|
|
||||||
fckEditor.instanceName = "myEditor" ;
|
|
||||||
fckEditor.value = '<p>This is some <strong>sample text</strong>. You are using <a href="http://www.fckeditor.net/">FCKeditor</a>.</p>' ;
|
|
||||||
fckEditor.basePath = basePath ;
|
|
||||||
if ( isDefined( "URL.Toolbar" ) )
|
|
||||||
{
|
|
||||||
fckEditor.ToolbarSet = HTMLEditFormat( URL.Toolbar ) ;
|
|
||||||
}
|
|
||||||
fckEditor.create() ; // create the editor.
|
|
||||||
</cfscript>
|
|
||||||
<cfoutput>
|
|
||||||
<br>
|
|
||||||
<input type="submit" value="Submit">
|
|
||||||
</form>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
</cfoutput>
|
|
||||||
<cfsetting enablecfoutputonly="false">
|
|
||||||
@@ -1,100 +0,0 @@
|
|||||||
<cfsetting enablecfoutputonly="true">
|
|
||||||
<!---
|
|
||||||
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
|
|
||||||
* Copyright (C) 2003-2008 Frederico Caldeira Knabben
|
|
||||||
*
|
|
||||||
* == BEGIN LICENSE ==
|
|
||||||
*
|
|
||||||
* Licensed under the terms of any of the following licenses at your
|
|
||||||
* choice:
|
|
||||||
*
|
|
||||||
* - GNU General Public License Version 2 or later (the "GPL")
|
|
||||||
* http://www.gnu.org/licenses/gpl.html
|
|
||||||
*
|
|
||||||
* - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
|
|
||||||
* http://www.gnu.org/licenses/lgpl.html
|
|
||||||
*
|
|
||||||
* - Mozilla Public License Version 1.1 or later (the "MPL")
|
|
||||||
* http://www.mozilla.org/MPL/MPL-1.1.html
|
|
||||||
*
|
|
||||||
* == END LICENSE ==
|
|
||||||
*
|
|
||||||
* Sample page for ColdFusion.
|
|
||||||
--->
|
|
||||||
<cfoutput>
|
|
||||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
<title>FCKeditor - Sample</title>
|
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
|
||||||
<meta name="robots" content="noindex, nofollow">
|
|
||||||
<link href="../sample.css" rel="stylesheet" type="text/css" />
|
|
||||||
<script type="text/javascript">
|
|
||||||
|
|
||||||
function FCKeditor_OnComplete( editorInstance )
|
|
||||||
{
|
|
||||||
var oCombo = document.getElementById( 'cmbSkins' ) ;
|
|
||||||
|
|
||||||
// Get the active skin.
|
|
||||||
var sSkin = editorInstance.Config['SkinPath'] ;
|
|
||||||
sSkin = sSkin.match( /[^\/]+(?=\/$)/g ) ;
|
|
||||||
|
|
||||||
oCombo.value = sSkin ;
|
|
||||||
oCombo.style.visibility = '' ;
|
|
||||||
}
|
|
||||||
|
|
||||||
function ChangeSkin( skinName )
|
|
||||||
{
|
|
||||||
window.location.href = window.location.pathname + "?Skin=" + skinName ;
|
|
||||||
}
|
|
||||||
|
|
||||||
</script>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<h1>FCKeditor - ColdFusion - Sample 4</h1>
|
|
||||||
This sample shows how to change the editor skin.
|
|
||||||
<hr>
|
|
||||||
<table cellpadding="0" cellspacing="0" border="0">
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
Select the skin to load:
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<select id="cmbSkins" onchange="ChangeSkin(this.value);" style="VISIBILITY: hidden">
|
|
||||||
<option value="default" selected>Default</option>
|
|
||||||
<option value="office2003">Office 2003</option>
|
|
||||||
<option value="silver">Silver</option>
|
|
||||||
</select>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
<br>
|
|
||||||
<form action="sampleposteddata.cfm" method="post" target="_blank">
|
|
||||||
</cfoutput>
|
|
||||||
|
|
||||||
<!--- Calculate basepath for FCKeditor. It's in the folder right above _samples --->
|
|
||||||
<cfset basePath = Left( cgi.script_name, FindNoCase( '_samples', cgi.script_name ) - 1 )>
|
|
||||||
|
|
||||||
<cfset config = structNew()>
|
|
||||||
<cfif isDefined( "URL.Skin" )>
|
|
||||||
<cfset config["SkinPath"] = basePath & 'editor/skins/' & HTMLEditFormat( URL.Skin ) & '/'>
|
|
||||||
</cfif>
|
|
||||||
|
|
||||||
<cfmodule
|
|
||||||
template="../../fckeditor.cfm"
|
|
||||||
basePath="#basePath#"
|
|
||||||
instanceName="myEditor"
|
|
||||||
value='<p>This is some <strong>sample text</strong>. You are using <a href="http://www.fckeditor.net/">FCKeditor</a>.</p>'
|
|
||||||
width="100%"
|
|
||||||
height="200"
|
|
||||||
config="#config#"
|
|
||||||
>
|
|
||||||
|
|
||||||
<cfoutput>
|
|
||||||
<br>
|
|
||||||
<input type="submit" value="Submit">
|
|
||||||
</form>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
</cfoutput>
|
|
||||||
<cfsetting enablecfoutputonly="false">
|
|
||||||
@@ -1,101 +0,0 @@
|
|||||||
<cfsetting enablecfoutputonly="true">
|
|
||||||
<!---
|
|
||||||
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
|
|
||||||
* Copyright (C) 2003-2008 Frederico Caldeira Knabben
|
|
||||||
*
|
|
||||||
* == BEGIN LICENSE ==
|
|
||||||
*
|
|
||||||
* Licensed under the terms of any of the following licenses at your
|
|
||||||
* choice:
|
|
||||||
*
|
|
||||||
* - GNU General Public License Version 2 or later (the "GPL")
|
|
||||||
* http://www.gnu.org/licenses/gpl.html
|
|
||||||
*
|
|
||||||
* - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
|
|
||||||
* http://www.gnu.org/licenses/lgpl.html
|
|
||||||
*
|
|
||||||
* - Mozilla Public License Version 1.1 or later (the "MPL")
|
|
||||||
* http://www.mozilla.org/MPL/MPL-1.1.html
|
|
||||||
*
|
|
||||||
* == END LICENSE ==
|
|
||||||
*
|
|
||||||
* Sample page for ColdFusion MX 6.0 and above.
|
|
||||||
--->
|
|
||||||
<cfoutput>
|
|
||||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
<title>FCKeditor - Sample</title>
|
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
|
||||||
<meta name="robots" content="noindex, nofollow">
|
|
||||||
<link href="../sample.css" rel="stylesheet" type="text/css" />
|
|
||||||
<script type="text/javascript">
|
|
||||||
|
|
||||||
function FCKeditor_OnComplete( editorInstance )
|
|
||||||
{
|
|
||||||
var oCombo = document.getElementById( 'cmbSkins' ) ;
|
|
||||||
|
|
||||||
// Get the active skin.
|
|
||||||
var sSkin = editorInstance.Config['SkinPath'] ;
|
|
||||||
sSkin = sSkin.match( /[^\/]+(?=\/$)/g ) ;
|
|
||||||
|
|
||||||
oCombo.value = sSkin ;
|
|
||||||
oCombo.style.visibility = '' ;
|
|
||||||
}
|
|
||||||
|
|
||||||
function ChangeSkin( skinName )
|
|
||||||
{
|
|
||||||
window.location.href = window.location.pathname + "?Skin=" + skinName ;
|
|
||||||
}
|
|
||||||
|
|
||||||
</script>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<h1>FCKeditor - ColdFusion Component (CFC) - Sample 4</h1>
|
|
||||||
This sample shows how to change the editor skin.
|
|
||||||
<hr>
|
|
||||||
</cfoutput>
|
|
||||||
<cfif listFirst( server.coldFusion.productVersion ) LT 6>
|
|
||||||
<cfoutput><br><em style="color: red;">This sample works only with a ColdFusion MX server and higher, because it uses some advantages of this version.</em></cfoutput>
|
|
||||||
<cfabort>
|
|
||||||
</cfif>
|
|
||||||
<cfoutput>
|
|
||||||
<table cellpadding="0" cellspacing="0" border="0">
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
Select the skin to load:
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<select id="cmbSkins" onchange="ChangeSkin(this.value);" style="VISIBILITY: hidden">
|
|
||||||
<option value="default" selected>Default</option>
|
|
||||||
<option value="office2003">Office 2003</option>
|
|
||||||
<option value="silver">Silver</option>
|
|
||||||
</select>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
<br>
|
|
||||||
<form action="sampleposteddata.cfm" method="post" target="_blank">
|
|
||||||
</cfoutput>
|
|
||||||
<cfscript>
|
|
||||||
// Calculate basepath for FCKeditor. It's in the folder right above _samples
|
|
||||||
basePath = Left( cgi.script_name, FindNoCase( '_samples', cgi.script_name ) - 1 ) ;
|
|
||||||
|
|
||||||
fckEditor = createObject( "component", "#basePath#fckeditor" ) ;
|
|
||||||
fckEditor.instanceName = "myEditor" ;
|
|
||||||
fckEditor.value = '<p>This is some <strong>sample text</strong>. You are using <a href="http://www.fckeditor.net/">FCKeditor</a>.</p>' ;
|
|
||||||
fckEditor.basePath = basePath ;
|
|
||||||
if ( isDefined( "URL.Skin" ) )
|
|
||||||
{
|
|
||||||
fckEditor.config['SkinPath'] = basePath & 'editor/skins/' & HTMLEditFormat( URL.Skin ) & '/' ;
|
|
||||||
}
|
|
||||||
fckEditor.create() ; // create the editor.
|
|
||||||
</cfscript>
|
|
||||||
<cfoutput>
|
|
||||||
<br>
|
|
||||||
<input type="submit" value="Submit">
|
|
||||||
</form>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
</cfoutput>
|
|
||||||
<cfsetting enablecfoutputonly="false">
|
|
||||||
@@ -1,68 +0,0 @@
|
|||||||
<!---
|
|
||||||
/*
|
|
||||||
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
|
|
||||||
* Copyright (C) 2003-2008 Frederico Caldeira Knabben
|
|
||||||
*
|
|
||||||
* == BEGIN LICENSE ==
|
|
||||||
*
|
|
||||||
* Licensed under the terms of any of the following licenses at your
|
|
||||||
* choice:
|
|
||||||
*
|
|
||||||
* - GNU General Public License Version 2 or later (the "GPL")
|
|
||||||
* http://www.gnu.org/licenses/gpl.html
|
|
||||||
*
|
|
||||||
* - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
|
|
||||||
* http://www.gnu.org/licenses/lgpl.html
|
|
||||||
*
|
|
||||||
* - Mozilla Public License Version 1.1 or later (the "MPL")
|
|
||||||
* http://www.mozilla.org/MPL/MPL-1.1.html
|
|
||||||
*
|
|
||||||
* == END LICENSE ==
|
|
||||||
*
|
|
||||||
* This page lists the data posted by a form.
|
|
||||||
*/
|
|
||||||
--->
|
|
||||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
<title>FCKeditor - Samples - Posted Data</title>
|
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
|
||||||
<meta name="robots" content="noindex, nofollow">
|
|
||||||
<link href="../sample.css" rel="stylesheet" type="text/css" />
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<h1>FCKeditor - Samples - Posted Data</h1>
|
|
||||||
This page lists all data posted by the form.
|
|
||||||
<hr>
|
|
||||||
<cfif listFirst( server.coldFusion.productVersion ) LT 6>
|
|
||||||
<cfif isDefined( 'FORM.fieldnames' )>
|
|
||||||
<cfoutput>
|
|
||||||
<hr />
|
|
||||||
<table border="1" cellspacing="0" id="outputSample">
|
|
||||||
<colgroup><col width="80"><col></colgroup>
|
|
||||||
<thead>
|
|
||||||
<tr>
|
|
||||||
<th>Field Name</th>
|
|
||||||
<th>Value</th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tr>
|
|
||||||
<th>FieldNames</th>
|
|
||||||
<td>#FORM.fieldNames#</td>
|
|
||||||
</tr>
|
|
||||||
<cfloop list="#FORM.fieldnames#" index="key">
|
|
||||||
<tr>
|
|
||||||
<th>#key#</th>
|
|
||||||
<td><pre>#HTMLEditFormat( evaluate( "FORM.#key#" ) )#</pre></td>
|
|
||||||
</tr>
|
|
||||||
</cfloop>
|
|
||||||
</table>
|
|
||||||
</cfoutput>
|
|
||||||
</cfif>
|
|
||||||
<cfelse>
|
|
||||||
<cfdump var="#FORM#" label="Dump of FORM Variables">
|
|
||||||
</cfif>
|
|
||||||
|
|
||||||
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
@@ -1,35 +0,0 @@
|
|||||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN"
|
|
||||||
"http://www.w3.org/TR/html4/frameset.dtd">
|
|
||||||
<!--
|
|
||||||
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
|
|
||||||
* Copyright (C) 2003-2008 Frederico Caldeira Knabben
|
|
||||||
*
|
|
||||||
* == BEGIN LICENSE ==
|
|
||||||
*
|
|
||||||
* Licensed under the terms of any of the following licenses at your
|
|
||||||
* choice:
|
|
||||||
*
|
|
||||||
* - GNU General Public License Version 2 or later (the "GPL")
|
|
||||||
* http://www.gnu.org/licenses/gpl.html
|
|
||||||
*
|
|
||||||
* - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
|
|
||||||
* http://www.gnu.org/licenses/lgpl.html
|
|
||||||
*
|
|
||||||
* - Mozilla Public License Version 1.1 or later (the "MPL")
|
|
||||||
* http://www.mozilla.org/MPL/MPL-1.1.html
|
|
||||||
*
|
|
||||||
* == END LICENSE ==
|
|
||||||
*
|
|
||||||
* Samples Frameset page.
|
|
||||||
-->
|
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
<title>FCKeditor - Samples</title>
|
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
|
||||||
<meta name="robots" content="noindex, nofollow">
|
|
||||||
</head>
|
|
||||||
<frameset rows="60,*">
|
|
||||||
<frame src="sampleslist.html" noresize scrolling="no">
|
|
||||||
<frame name="Sample" src="html/sample01.html" noresize>
|
|
||||||
</frameset>
|
|
||||||
</html>
|
|
||||||
@@ -1,49 +0,0 @@
|
|||||||
/*
|
|
||||||
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
|
|
||||||
* Copyright (C) 2003-2008 Frederico Caldeira Knabben
|
|
||||||
*
|
|
||||||
* == BEGIN LICENSE ==
|
|
||||||
*
|
|
||||||
* Licensed under the terms of any of the following licenses at your
|
|
||||||
* choice:
|
|
||||||
*
|
|
||||||
* - GNU General Public License Version 2 or later (the "GPL")
|
|
||||||
* http://www.gnu.org/licenses/gpl.html
|
|
||||||
*
|
|
||||||
* - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
|
|
||||||
* http://www.gnu.org/licenses/lgpl.html
|
|
||||||
*
|
|
||||||
* - Mozilla Public License Version 1.1 or later (the "MPL")
|
|
||||||
* http://www.mozilla.org/MPL/MPL-1.1.html
|
|
||||||
*
|
|
||||||
* == END LICENSE ==
|
|
||||||
*
|
|
||||||
* Sample custom configuration settings used in the plugin sample page (sample06).
|
|
||||||
*/
|
|
||||||
|
|
||||||
// Set our sample toolbar.
|
|
||||||
FCKConfig.ToolbarSets['PluginTest'] = [
|
|
||||||
['SourceSimple'],
|
|
||||||
['My_Find','My_Replace','-','Placeholder'],
|
|
||||||
['StyleSimple','FontFormatSimple','FontNameSimple','FontSizeSimple'],
|
|
||||||
['Table','-','TableInsertRowAfter','TableDeleteRows','TableInsertColumnAfter','TableDeleteColumns','TableInsertCellAfter','TableDeleteCells','TableMergeCells','TableHorizontalSplitCell','TableCellProp'],
|
|
||||||
['Bold','Italic','-','OrderedList','UnorderedList','-','Link','Unlink'],
|
|
||||||
'/',
|
|
||||||
['My_BigStyle','-','Smiley','-','About']
|
|
||||||
] ;
|
|
||||||
|
|
||||||
// Change the default plugin path.
|
|
||||||
FCKConfig.PluginsPath = FCKConfig.BasePath.substr(0, FCKConfig.BasePath.length - 7) + '_samples/_plugins/' ;
|
|
||||||
|
|
||||||
// Add our plugin to the plugins list.
|
|
||||||
// FCKConfig.Plugins.Add( pluginName, availableLanguages )
|
|
||||||
// pluginName: The plugin name. The plugin directory must match this name.
|
|
||||||
// availableLanguages: a list of available language files for the plugin (separated by a comma).
|
|
||||||
FCKConfig.Plugins.Add( 'findreplace', 'en,fr,it' ) ;
|
|
||||||
FCKConfig.Plugins.Add( 'samples' ) ;
|
|
||||||
|
|
||||||
// If you want to use plugins found on other directories, just use the third parameter.
|
|
||||||
var sOtherPluginPath = FCKConfig.BasePath.substr(0, FCKConfig.BasePath.length - 7) + 'editor/plugins/' ;
|
|
||||||
FCKConfig.Plugins.Add( 'placeholder', 'de,en,es,fr,it,pl', sOtherPluginPath ) ;
|
|
||||||
FCKConfig.Plugins.Add( 'tablecommands', null, sOtherPluginPath ) ;
|
|
||||||
FCKConfig.Plugins.Add( 'simplecommands', null, sOtherPluginPath ) ;
|
|
||||||
@@ -1,69 +0,0 @@
|
|||||||
<!--
|
|
||||||
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
|
|
||||||
* Copyright (C) 2003-2008 Frederico Caldeira Knabben
|
|
||||||
*
|
|
||||||
* == BEGIN LICENSE ==
|
|
||||||
*
|
|
||||||
* Licensed under the terms of any of the following licenses at your
|
|
||||||
* choice:
|
|
||||||
*
|
|
||||||
* - GNU General Public License Version 2 or later (the "GPL")
|
|
||||||
* http://www.gnu.org/licenses/gpl.html
|
|
||||||
*
|
|
||||||
* - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
|
|
||||||
* http://www.gnu.org/licenses/lgpl.html
|
|
||||||
*
|
|
||||||
* - Mozilla Public License Version 1.1 or later (the "MPL")
|
|
||||||
* http://www.mozilla.org/MPL/MPL-1.1.html
|
|
||||||
*
|
|
||||||
* == END LICENSE ==
|
|
||||||
*
|
|
||||||
* Sample page.
|
|
||||||
-->
|
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
|
||||||
<head>
|
|
||||||
<title>FCKeditor - Sample</title>
|
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
|
||||||
<meta name="robots" content="noindex, nofollow" />
|
|
||||||
<link href="../sample.css" rel="stylesheet" type="text/css" />
|
|
||||||
<script type="text/javascript" src="../../../fckeditor.js"></script>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<form action="../../php/sampleposteddata.php" method="post" target="_blank">
|
|
||||||
Normal text field:<br />
|
|
||||||
<input name="NormaText" value="Plain Text" />
|
|
||||||
<br />
|
|
||||||
<br />
|
|
||||||
FCKeditor 1:
|
|
||||||
<script type="text/javascript">
|
|
||||||
<!--
|
|
||||||
// Automatically calculates the editor base path based on the _samples directory.
|
|
||||||
// This is usefull only for these samples. A real application should use something like this:
|
|
||||||
// oFCKeditor.BasePath = '/fckeditor/' ; // '/fckeditor/' is the default value.
|
|
||||||
var sBasePath = document.location.href.substring(0,document.location.href.lastIndexOf('_samples')) ;
|
|
||||||
|
|
||||||
var oFCKeditor = new FCKeditor( 'FCKeditor_1' ) ;
|
|
||||||
oFCKeditor.BasePath = sBasePath ;
|
|
||||||
oFCKeditor.Height = 100 ;
|
|
||||||
oFCKeditor.Config[ 'ToolbarLocation' ] = 'Out:parent(xToolbar)' ;
|
|
||||||
oFCKeditor.Value = '<p>This is some <strong>sample text<\/strong>. You are using <a href="http://www.fckeditor.net/">FCKeditor<\/a>.<\/p>' ;
|
|
||||||
oFCKeditor.Create() ;
|
|
||||||
//-->
|
|
||||||
</script>
|
|
||||||
<br />
|
|
||||||
FCKeditor 2:
|
|
||||||
<script type="text/javascript">
|
|
||||||
<!--
|
|
||||||
oFCKeditor = new FCKeditor( 'FCKeditor_2' ) ;
|
|
||||||
oFCKeditor.BasePath = sBasePath ;
|
|
||||||
oFCKeditor.Height = 100 ;
|
|
||||||
oFCKeditor.Config[ 'ToolbarLocation' ] = 'Out:parent(xToolbar)' ;
|
|
||||||
oFCKeditor.Value = '<p>This is some <strong>sample text<\/strong>. You are using <a href="http://www.fckeditor.net/">FCKeditor<\/a>.<\/p>' ;
|
|
||||||
oFCKeditor.Create() ;
|
|
||||||
//-->
|
|
||||||
</script>
|
|
||||||
<br />
|
|
||||||
<input type="submit" value="Submit" />
|
|
||||||
</form>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
@@ -1,121 +0,0 @@
|
|||||||
/*
|
|
||||||
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
|
|
||||||
* Copyright (C) 2003-2008 Frederico Caldeira Knabben
|
|
||||||
*
|
|
||||||
* == BEGIN LICENSE ==
|
|
||||||
*
|
|
||||||
* Licensed under the terms of any of the following licenses at your
|
|
||||||
* choice:
|
|
||||||
*
|
|
||||||
* - GNU General Public License Version 2 or later (the "GPL")
|
|
||||||
* http://www.gnu.org/licenses/gpl.html
|
|
||||||
*
|
|
||||||
* - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
|
|
||||||
* http://www.gnu.org/licenses/lgpl.html
|
|
||||||
*
|
|
||||||
* - Mozilla Public License Version 1.1 or later (the "MPL")
|
|
||||||
* http://www.mozilla.org/MPL/MPL-1.1.html
|
|
||||||
*
|
|
||||||
* == END LICENSE ==
|
|
||||||
*
|
|
||||||
* Configuration settings used by the XHTML 1.1 sample page (sample14.html).
|
|
||||||
*/
|
|
||||||
|
|
||||||
// Our intention is force all formatting features to use CSS classes or
|
|
||||||
// semantic aware elements.
|
|
||||||
|
|
||||||
// Load our custom CSS files for this sample.
|
|
||||||
// We are using "BasePath" just for this sample convenience. In normal
|
|
||||||
// situations it would be just pointed to the file directly,
|
|
||||||
// like "/css/myfile.css".
|
|
||||||
FCKConfig.EditorAreaCSS = FCKConfig.BasePath + '../_samples/html/assets/sample14.styles.css' ;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Core styles.
|
|
||||||
*/
|
|
||||||
FCKConfig.CoreStyles.Bold = { Element : 'span', Attributes : { 'class' : 'Bold' } } ;
|
|
||||||
FCKConfig.CoreStyles.Italic = { Element : 'span', Attributes : { 'class' : 'Italic' } } ;
|
|
||||||
FCKConfig.CoreStyles.Underline = { Element : 'span', Attributes : { 'class' : 'Underline' } } ;
|
|
||||||
FCKConfig.CoreStyles.StrikeThrough = { Element : 'span', Attributes : { 'class' : 'StrikeThrough' } } ;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Font face
|
|
||||||
*/
|
|
||||||
// List of fonts available in the toolbar combo. Each font definition is
|
|
||||||
// separated by a semi-colon (;). We are using class names here, so each font
|
|
||||||
// is defined by {Class Name}/{Combo Label}.
|
|
||||||
FCKConfig.FontNames = 'FontComic/Comic Sans MS;FontCourier/Courier New;FontTimes/Times New Roman' ;
|
|
||||||
|
|
||||||
// Define the way font elements will be applied to the document. The "span"
|
|
||||||
// element will be used. When a font is selected, the font name defined in the
|
|
||||||
// above list is passed to this definition with the name "Font", being it
|
|
||||||
// injected in the "class" attribute.
|
|
||||||
// We must also instruct the editor to replace span elements that are used to
|
|
||||||
// set the font (Overrides).
|
|
||||||
FCKConfig.CoreStyles.FontFace =
|
|
||||||
{
|
|
||||||
Element : 'span',
|
|
||||||
Attributes : { 'class' : '#("Font")' },
|
|
||||||
Overrides : [ { Element : 'span', Attributes : { 'class' : /^Font(?:Comic|Courier|Times)$/ } } ]
|
|
||||||
} ;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Font sizes.
|
|
||||||
*/
|
|
||||||
FCKConfig.FontSizes = 'FontSmaller/Smaller;FontLarger/Larger;FontSmall/8pt;FontBig/14pt;FontDouble/Double Size' ;
|
|
||||||
FCKConfig.CoreStyles.Size =
|
|
||||||
{
|
|
||||||
Element : 'span',
|
|
||||||
Attributes : { 'class' : '#("Size")' },
|
|
||||||
Overrides : [ { Element : 'span', Attributes : { 'class' : /^Font(?:Smaller|Larger|Small|Big|Double)$/ } } ]
|
|
||||||
} ;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Font colors.
|
|
||||||
*/
|
|
||||||
FCKConfig.EnableMoreFontColors = false ;
|
|
||||||
FCKConfig.FontColors = 'ff9900/FontColor1,0066cc/FontColor2,ff0000/FontColor3' ;
|
|
||||||
FCKConfig.CoreStyles.Color =
|
|
||||||
{
|
|
||||||
Element : 'span',
|
|
||||||
Attributes : { 'class' : '#("Color")' },
|
|
||||||
Overrides : [ { Element : 'span', Attributes : { 'class' : /^FontColor(?:1|2|3)$/ } } ]
|
|
||||||
} ;
|
|
||||||
|
|
||||||
FCKConfig.CoreStyles.BackColor =
|
|
||||||
{
|
|
||||||
Element : 'span',
|
|
||||||
Attributes : { 'class' : '#("Color")BG' },
|
|
||||||
Overrides : [ { Element : 'span', Attributes : { 'class' : /^FontColor(?:1|2|3)BG$/ } } ]
|
|
||||||
} ;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Indentation.
|
|
||||||
*/
|
|
||||||
FCKConfig.IndentClasses = [ 'Indent1', 'Indent2', 'Indent3' ] ;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Paragraph justification.
|
|
||||||
*/
|
|
||||||
FCKConfig.JustifyClasses = [ 'JustifyLeft', 'JustifyCenter', 'JustifyRight', 'JustifyFull' ] ;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Styles combo.
|
|
||||||
*/
|
|
||||||
FCKConfig.StylesXmlPath = '' ;
|
|
||||||
FCKConfig.CustomStyles =
|
|
||||||
{
|
|
||||||
'Strong Emphasis' : { Element : 'strong' },
|
|
||||||
'Emphasis' : { Element : 'em' },
|
|
||||||
|
|
||||||
'Computer Code' : { Element : 'code' },
|
|
||||||
'Keyboard Phrase' : { Element : 'kbd' },
|
|
||||||
'Sample Text' : { Element : 'samp' },
|
|
||||||
'Variable' : { Element : 'var' },
|
|
||||||
|
|
||||||
'Deleted Text' : { Element : 'del' },
|
|
||||||
'Inserted Text' : { Element : 'ins' },
|
|
||||||
|
|
||||||
'Cited Work' : { Element : 'cite' },
|
|
||||||
'Inline Quotation' : { Element : 'q' }
|
|
||||||
} ;
|
|
||||||
@@ -1,228 +0,0 @@
|
|||||||
/*
|
|
||||||
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
|
|
||||||
* Copyright (C) 2003-2008 Frederico Caldeira Knabben
|
|
||||||
*
|
|
||||||
* == BEGIN LICENSE ==
|
|
||||||
*
|
|
||||||
* Licensed under the terms of any of the following licenses at your
|
|
||||||
* choice:
|
|
||||||
*
|
|
||||||
* - GNU General Public License Version 2 or later (the "GPL")
|
|
||||||
* http://www.gnu.org/licenses/gpl.html
|
|
||||||
*
|
|
||||||
* - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
|
|
||||||
* http://www.gnu.org/licenses/lgpl.html
|
|
||||||
*
|
|
||||||
* - Mozilla Public License Version 1.1 or later (the "MPL")
|
|
||||||
* http://www.mozilla.org/MPL/MPL-1.1.html
|
|
||||||
*
|
|
||||||
* == END LICENSE ==
|
|
||||||
*
|
|
||||||
* Styles used by the XHTML 1.1 sample page (sample14.html).
|
|
||||||
*/
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Basic definitions for the editing area.
|
|
||||||
*/
|
|
||||||
body
|
|
||||||
{
|
|
||||||
background-color: #ffffff;
|
|
||||||
padding: 5px 5px 5px 5px;
|
|
||||||
margin: 0px;
|
|
||||||
}
|
|
||||||
|
|
||||||
body, td
|
|
||||||
{
|
|
||||||
font-family: Arial, Verdana, sans-serif;
|
|
||||||
font-size: 12px;
|
|
||||||
}
|
|
||||||
|
|
||||||
a[href]
|
|
||||||
{
|
|
||||||
color: #0000FF !important; /* For Firefox... mark as important, otherwise it becomes black */
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Core styles.
|
|
||||||
*/
|
|
||||||
|
|
||||||
.Bold
|
|
||||||
{
|
|
||||||
font-weight: bold;
|
|
||||||
}
|
|
||||||
|
|
||||||
.Italic
|
|
||||||
{
|
|
||||||
font-style: italic;
|
|
||||||
}
|
|
||||||
|
|
||||||
.Underline
|
|
||||||
{
|
|
||||||
text-decoration: underline;
|
|
||||||
}
|
|
||||||
|
|
||||||
.StrikeThrough
|
|
||||||
{
|
|
||||||
text-decoration: line-through;
|
|
||||||
}
|
|
||||||
|
|
||||||
.Subscript
|
|
||||||
{
|
|
||||||
vertical-align: sub;
|
|
||||||
font-size: smaller;
|
|
||||||
}
|
|
||||||
|
|
||||||
.Superscript
|
|
||||||
{
|
|
||||||
vertical-align: super;
|
|
||||||
font-size: smaller;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Font faces.
|
|
||||||
*/
|
|
||||||
|
|
||||||
.FontComic
|
|
||||||
{
|
|
||||||
font-family: 'Comic Sans MS';
|
|
||||||
}
|
|
||||||
|
|
||||||
.FontCourier
|
|
||||||
{
|
|
||||||
font-family: 'Courier New';
|
|
||||||
}
|
|
||||||
|
|
||||||
.FontTimes
|
|
||||||
{
|
|
||||||
font-family: 'Times New Roman';
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Font sizes.
|
|
||||||
*/
|
|
||||||
|
|
||||||
.FontSmaller
|
|
||||||
{
|
|
||||||
font-size: smaller;
|
|
||||||
}
|
|
||||||
|
|
||||||
.FontLarger
|
|
||||||
{
|
|
||||||
font-size: larger;
|
|
||||||
}
|
|
||||||
|
|
||||||
.FontSmall
|
|
||||||
{
|
|
||||||
font-size: 8pt;
|
|
||||||
}
|
|
||||||
|
|
||||||
.FontBig
|
|
||||||
{
|
|
||||||
font-size: 14pt;
|
|
||||||
}
|
|
||||||
|
|
||||||
.FontDouble
|
|
||||||
{
|
|
||||||
font-size: 200%;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Font colors.
|
|
||||||
*/
|
|
||||||
.FontColor1
|
|
||||||
{
|
|
||||||
color: #ff9900;
|
|
||||||
}
|
|
||||||
|
|
||||||
.FontColor2
|
|
||||||
{
|
|
||||||
color: #0066cc;
|
|
||||||
}
|
|
||||||
|
|
||||||
.FontColor3
|
|
||||||
{
|
|
||||||
color: #ff0000;
|
|
||||||
}
|
|
||||||
|
|
||||||
.FontColor1BG
|
|
||||||
{
|
|
||||||
background-color: #ff9900;
|
|
||||||
}
|
|
||||||
|
|
||||||
.FontColor2BG
|
|
||||||
{
|
|
||||||
background-color: #0066cc;
|
|
||||||
}
|
|
||||||
|
|
||||||
.FontColor3BG
|
|
||||||
{
|
|
||||||
background-color: #ff0000;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Indentation.
|
|
||||||
*/
|
|
||||||
|
|
||||||
.Indent1
|
|
||||||
{
|
|
||||||
margin-left: 40px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.Indent2
|
|
||||||
{
|
|
||||||
margin-left: 80px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.Indent3
|
|
||||||
{
|
|
||||||
margin-left: 120px;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Alignment.
|
|
||||||
*/
|
|
||||||
|
|
||||||
.JustifyLeft
|
|
||||||
{
|
|
||||||
text-align: left;
|
|
||||||
}
|
|
||||||
|
|
||||||
.JustifyRight
|
|
||||||
{
|
|
||||||
text-align: right;
|
|
||||||
}
|
|
||||||
|
|
||||||
.JustifyCenter
|
|
||||||
{
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
.JustifyFull
|
|
||||||
{
|
|
||||||
text-align: justify;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Other.
|
|
||||||
*/
|
|
||||||
|
|
||||||
code
|
|
||||||
{
|
|
||||||
font-family: courier, monospace;
|
|
||||||
background-color: #eeeeee;
|
|
||||||
padding-left: 1px;
|
|
||||||
padding-right: 1px;
|
|
||||||
border: #c0c0c0 1px solid;
|
|
||||||
}
|
|
||||||
|
|
||||||
kbd
|
|
||||||
{
|
|
||||||
padding: 0px 1px 0px 1px;
|
|
||||||
border-width: 1px 2px 2px 1px;
|
|
||||||
border-style: solid;
|
|
||||||
}
|
|
||||||
|
|
||||||
blockquote
|
|
||||||
{
|
|
||||||
color: #808080;
|
|
||||||
}
|
|
||||||
@@ -1,92 +0,0 @@
|
|||||||
/*
|
|
||||||
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
|
|
||||||
* Copyright (C) 2003-2008 Frederico Caldeira Knabben
|
|
||||||
*
|
|
||||||
* == BEGIN LICENSE ==
|
|
||||||
*
|
|
||||||
* Licensed under the terms of any of the following licenses at your
|
|
||||||
* choice:
|
|
||||||
*
|
|
||||||
* - GNU General Public License Version 2 or later (the "GPL")
|
|
||||||
* http://www.gnu.org/licenses/gpl.html
|
|
||||||
*
|
|
||||||
* - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
|
|
||||||
* http://www.gnu.org/licenses/lgpl.html
|
|
||||||
*
|
|
||||||
* - Mozilla Public License Version 1.1 or later (the "MPL")
|
|
||||||
* http://www.mozilla.org/MPL/MPL-1.1.html
|
|
||||||
*
|
|
||||||
* == END LICENSE ==
|
|
||||||
*
|
|
||||||
* Configuration settings used by the XHTML 1.1 sample page (sample14.html).
|
|
||||||
*/
|
|
||||||
|
|
||||||
// Our intention is force all formatting features to use CSS classes or
|
|
||||||
// semantic aware elements.
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Core styles.
|
|
||||||
*/
|
|
||||||
FCKConfig.CoreStyles.Bold = { Element : 'b' } ;
|
|
||||||
FCKConfig.CoreStyles.Italic = { Element : 'i' } ;
|
|
||||||
FCKConfig.CoreStyles.Underline = { Element : 'u' } ;
|
|
||||||
FCKConfig.CoreStyles.StrikeThrough = { Element : 'strike' } ;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Font face
|
|
||||||
*/
|
|
||||||
// Define the way font elements will be applied to the document. The "span"
|
|
||||||
// element will be used. When a font is selected, the font name defined in the
|
|
||||||
// above list is passed to this definition with the name "Font", being it
|
|
||||||
// injected in the "class" attribute.
|
|
||||||
// We must also instruct the editor to replace span elements that are used to
|
|
||||||
// set the font (Overrides).
|
|
||||||
FCKConfig.CoreStyles.FontFace =
|
|
||||||
{
|
|
||||||
Element : 'font',
|
|
||||||
Attributes : { 'face' : '#("Font")' }
|
|
||||||
} ;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Font sizes.
|
|
||||||
*/
|
|
||||||
FCKConfig.FontSizes = '1/xx-small;2/x-small;3/small;4/medium;5/large;6/x-large;7/xx-large' ;
|
|
||||||
FCKConfig.CoreStyles.Size =
|
|
||||||
{
|
|
||||||
Element : 'font',
|
|
||||||
Attributes : { 'size' : '#("Size")' }
|
|
||||||
} ;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Font colors.
|
|
||||||
*/
|
|
||||||
FCKConfig.EnableMoreFontColors = true ;
|
|
||||||
FCKConfig.CoreStyles.Color =
|
|
||||||
{
|
|
||||||
Element : 'font',
|
|
||||||
Attributes : { 'color' : '#("Color")' }
|
|
||||||
} ;
|
|
||||||
|
|
||||||
FCKConfig.CoreStyles.BackColor =
|
|
||||||
{
|
|
||||||
Element : 'font',
|
|
||||||
Styles : { 'background-color' : '#("Color","color")' }
|
|
||||||
} ;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Styles combo.
|
|
||||||
*/
|
|
||||||
FCKConfig.StylesXmlPath = '' ;
|
|
||||||
FCKConfig.CustomStyles =
|
|
||||||
{
|
|
||||||
'Computer Code' : { Element : 'code' },
|
|
||||||
'Keyboard Phrase' : { Element : 'kbd' },
|
|
||||||
'Sample Text' : { Element : 'samp' },
|
|
||||||
'Variable' : { Element : 'var' },
|
|
||||||
|
|
||||||
'Deleted Text' : { Element : 'del' },
|
|
||||||
'Inserted Text' : { Element : 'ins' },
|
|
||||||
|
|
||||||
'Cited Work' : { Element : 'cite' },
|
|
||||||
'Inline Quotation' : { Element : 'q' }
|
|
||||||
} ;
|
|
||||||
@@ -1,92 +0,0 @@
|
|||||||
/*
|
|
||||||
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
|
|
||||||
* Copyright (C) 2003-2008 Frederico Caldeira Knabben
|
|
||||||
*
|
|
||||||
* == BEGIN LICENSE ==
|
|
||||||
*
|
|
||||||
* Licensed under the terms of any of the following licenses at your
|
|
||||||
* choice:
|
|
||||||
*
|
|
||||||
* - GNU General Public License Version 2 or later (the "GPL")
|
|
||||||
* http://www.gnu.org/licenses/gpl.html
|
|
||||||
*
|
|
||||||
* - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
|
|
||||||
* http://www.gnu.org/licenses/lgpl.html
|
|
||||||
*
|
|
||||||
* - Mozilla Public License Version 1.1 or later (the "MPL")
|
|
||||||
* http://www.mozilla.org/MPL/MPL-1.1.html
|
|
||||||
*
|
|
||||||
* == END LICENSE ==
|
|
||||||
*
|
|
||||||
* Configuration settings used by the XHTML 1.1 sample page (sample14.html).
|
|
||||||
*/
|
|
||||||
|
|
||||||
// Our intention is force all formatting features to use CSS classes or
|
|
||||||
// semantic aware elements.
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Core styles.
|
|
||||||
*/
|
|
||||||
FCKConfig.CoreStyles.Bold = { Element : 'b' } ;
|
|
||||||
FCKConfig.CoreStyles.Italic = { Element : 'i' } ;
|
|
||||||
FCKConfig.CoreStyles.Underline = { Element : 'u' } ;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Font face
|
|
||||||
*/
|
|
||||||
// Define the way font elements will be applied to the document. The "span"
|
|
||||||
// element will be used. When a font is selected, the font name defined in the
|
|
||||||
// above list is passed to this definition with the name "Font", being it
|
|
||||||
// injected in the "class" attribute.
|
|
||||||
// We must also instruct the editor to replace span elements that are used to
|
|
||||||
// set the font (Overrides).
|
|
||||||
FCKConfig.CoreStyles.FontFace =
|
|
||||||
{
|
|
||||||
Element : 'font',
|
|
||||||
Attributes : { 'face' : '#("Font")' }
|
|
||||||
} ;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Font sizes.
|
|
||||||
* The CSS part of the font sizes isn't used by Flash, it is there to get the
|
|
||||||
* font rendered correctly in FCKeditor.
|
|
||||||
*/
|
|
||||||
FCKConfig.FontSizes = '8/8px;9/9px;10/10px;11/11px;12/12px;14/14px;16/16px;18/18px;20/20px;22/22px;24/24px;26/26px;28/28px;36/36px;48/48px;72/72px' ;
|
|
||||||
FCKConfig.CoreStyles.Size =
|
|
||||||
{
|
|
||||||
Element : 'font',
|
|
||||||
Attributes : { 'size' : '#("Size")' },
|
|
||||||
Styles : { 'font-size' : '#("Size","fontSize")' }
|
|
||||||
} ;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Font colors.
|
|
||||||
*/
|
|
||||||
FCKConfig.EnableMoreFontColors = true ;
|
|
||||||
FCKConfig.CoreStyles.Color =
|
|
||||||
{
|
|
||||||
Element : 'font',
|
|
||||||
Attributes : { 'color' : '#("Color")' }
|
|
||||||
} ;
|
|
||||||
/**
|
|
||||||
* Styles combo.
|
|
||||||
*/
|
|
||||||
FCKConfig.StylesXmlPath = '' ;
|
|
||||||
FCKConfig.CustomStyles =
|
|
||||||
{
|
|
||||||
} ;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Toolbar set for Flash HTML editing.
|
|
||||||
*/
|
|
||||||
FCKConfig.ToolbarSets['Flash'] = [
|
|
||||||
['Source','-','Bold','Italic','Underline','-','UnorderedList','-','Link','Unlink'],
|
|
||||||
['FontName','FontSize','-','About']
|
|
||||||
] ;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Flash specific formatting settings.
|
|
||||||
*/
|
|
||||||
FCKConfig.EditorAreaStyles = 'p, ol, ul {margin-top: 0px; margin-bottom: 0px;}' ;
|
|
||||||
FCKConfig.FormatSource = false ;
|
|
||||||
FCKConfig.FormatOutput = false ;
|
|
||||||
Binary file not shown.
Binary file not shown.
File diff suppressed because one or more lines are too long
@@ -1,59 +0,0 @@
|
|||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
||||||
<!--
|
|
||||||
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
|
|
||||||
* Copyright (C) 2003-2008 Frederico Caldeira Knabben
|
|
||||||
*
|
|
||||||
* == BEGIN LICENSE ==
|
|
||||||
*
|
|
||||||
* Licensed under the terms of any of the following licenses at your
|
|
||||||
* choice:
|
|
||||||
*
|
|
||||||
* - GNU General Public License Version 2 or later (the "GPL")
|
|
||||||
* http://www.gnu.org/licenses/gpl.html
|
|
||||||
*
|
|
||||||
* - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
|
|
||||||
* http://www.gnu.org/licenses/lgpl.html
|
|
||||||
*
|
|
||||||
* - Mozilla Public License Version 1.1 or later (the "MPL")
|
|
||||||
* http://www.mozilla.org/MPL/MPL-1.1.html
|
|
||||||
*
|
|
||||||
* == END LICENSE ==
|
|
||||||
*
|
|
||||||
* Sample page.
|
|
||||||
-->
|
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
|
||||||
<head>
|
|
||||||
<title>FCKeditor - Sample</title>
|
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
|
||||||
<meta name="robots" content="noindex, nofollow" />
|
|
||||||
<link href="../sample.css" rel="stylesheet" type="text/css" />
|
|
||||||
<script type="text/javascript" src="../../fckeditor.js"></script>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<h1>
|
|
||||||
FCKeditor - JavaScript - Sample 1
|
|
||||||
</h1>
|
|
||||||
<div>
|
|
||||||
This sample displays a normal HTML form with an FCKeditor with full features enabled.
|
|
||||||
</div>
|
|
||||||
<hr />
|
|
||||||
<form action="../php/sampleposteddata.php" method="post" target="_blank">
|
|
||||||
<script type="text/javascript">
|
|
||||||
<!--
|
|
||||||
// Automatically calculates the editor base path based on the _samples directory.
|
|
||||||
// This is usefull only for these samples. A real application should use something like this:
|
|
||||||
// oFCKeditor.BasePath = '/fckeditor/' ; // '/fckeditor/' is the default value.
|
|
||||||
var sBasePath = document.location.href.substring(0,document.location.href.lastIndexOf('_samples')) ;
|
|
||||||
|
|
||||||
var oFCKeditor = new FCKeditor( 'FCKeditor1' ) ;
|
|
||||||
oFCKeditor.BasePath = sBasePath ;
|
|
||||||
oFCKeditor.Height = 300 ;
|
|
||||||
oFCKeditor.Value = '<p>This is some <strong>sample text<\/strong>. You are using <a href="http://www.fckeditor.net/">FCKeditor<\/a>.<\/p>' ;
|
|
||||||
oFCKeditor.Create() ;
|
|
||||||
//-->
|
|
||||||
</script>
|
|
||||||
<br />
|
|
||||||
<input type="submit" value="Submit" />
|
|
||||||
</form>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
@@ -1,63 +0,0 @@
|
|||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
||||||
<!--
|
|
||||||
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
|
|
||||||
* Copyright (C) 2003-2008 Frederico Caldeira Knabben
|
|
||||||
*
|
|
||||||
* == BEGIN LICENSE ==
|
|
||||||
*
|
|
||||||
* Licensed under the terms of any of the following licenses at your
|
|
||||||
* choice:
|
|
||||||
*
|
|
||||||
* - GNU General Public License Version 2 or later (the "GPL")
|
|
||||||
* http://www.gnu.org/licenses/gpl.html
|
|
||||||
*
|
|
||||||
* - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
|
|
||||||
* http://www.gnu.org/licenses/lgpl.html
|
|
||||||
*
|
|
||||||
* - Mozilla Public License Version 1.1 or later (the "MPL")
|
|
||||||
* http://www.mozilla.org/MPL/MPL-1.1.html
|
|
||||||
*
|
|
||||||
* == END LICENSE ==
|
|
||||||
*
|
|
||||||
* Sample page.
|
|
||||||
-->
|
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
|
||||||
<head>
|
|
||||||
<title>FCKeditor - Sample</title>
|
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
|
||||||
<meta name="robots" content="noindex, nofollow" />
|
|
||||||
<link href="../sample.css" rel="stylesheet" type="text/css" />
|
|
||||||
<script type="text/javascript" src="../../fckeditor.js"></script>
|
|
||||||
<script type="text/javascript">
|
|
||||||
|
|
||||||
window.onload = function()
|
|
||||||
{
|
|
||||||
// Automatically calculates the editor base path based on the _samples directory.
|
|
||||||
// This is usefull only for these samples. A real application should use something like this:
|
|
||||||
// oFCKeditor.BasePath = '/fckeditor/' ; // '/fckeditor/' is the default value.
|
|
||||||
var sBasePath = document.location.href.substring(0,document.location.href.lastIndexOf('_samples')) ;
|
|
||||||
|
|
||||||
var oFCKeditor = new FCKeditor( 'FCKeditor1' ) ;
|
|
||||||
oFCKeditor.BasePath = sBasePath ;
|
|
||||||
oFCKeditor.ReplaceTextarea() ;
|
|
||||||
}
|
|
||||||
|
|
||||||
</script>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<h1>
|
|
||||||
FCKeditor - JavaScript - Sample 2</h1>
|
|
||||||
<div>
|
|
||||||
This sample displays a normal HTML form with an FCKeditor with full features enabled.
|
|
||||||
It uses the "ReplaceTextarea" command to create the editor.
|
|
||||||
</div>
|
|
||||||
<hr />
|
|
||||||
<form action="../php/sampleposteddata.php" method="post" target="_blank">
|
|
||||||
<div>
|
|
||||||
<textarea name="FCKeditor1" rows="10" cols="80" style="width: 100%; height: 200px"><p>This is some <strong>sample text</strong>. You are using <a href="http://www.fckeditor.net/">FCKeditor</a>.</p></textarea>
|
|
||||||
</div>
|
|
||||||
<br />
|
|
||||||
<input type="submit" value="Submit" />
|
|
||||||
</form>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
@@ -1,140 +0,0 @@
|
|||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
||||||
<!--
|
|
||||||
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
|
|
||||||
* Copyright (C) 2003-2008 Frederico Caldeira Knabben
|
|
||||||
*
|
|
||||||
* == BEGIN LICENSE ==
|
|
||||||
*
|
|
||||||
* Licensed under the terms of any of the following licenses at your
|
|
||||||
* choice:
|
|
||||||
*
|
|
||||||
* - GNU General Public License Version 2 or later (the "GPL")
|
|
||||||
* http://www.gnu.org/licenses/gpl.html
|
|
||||||
*
|
|
||||||
* - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
|
|
||||||
* http://www.gnu.org/licenses/lgpl.html
|
|
||||||
*
|
|
||||||
* - Mozilla Public License Version 1.1 or later (the "MPL")
|
|
||||||
* http://www.mozilla.org/MPL/MPL-1.1.html
|
|
||||||
*
|
|
||||||
* == END LICENSE ==
|
|
||||||
*
|
|
||||||
* Sample page.
|
|
||||||
-->
|
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
|
||||||
<head>
|
|
||||||
<title>FCKeditor - Sample</title>
|
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
|
||||||
<meta name="robots" content="noindex, nofollow" />
|
|
||||||
<link href="../sample.css" rel="stylesheet" type="text/css" />
|
|
||||||
<script type="text/javascript" src="../../fckeditor.js"></script>
|
|
||||||
<script type="text/javascript">
|
|
||||||
|
|
||||||
var bIsLoaded = false ;
|
|
||||||
|
|
||||||
function FCKeditor_OnComplete( editorInstance )
|
|
||||||
{
|
|
||||||
if ( bIsLoaded )
|
|
||||||
return ;
|
|
||||||
|
|
||||||
var oCombo = document.getElementById( 'cmbLanguages' ) ;
|
|
||||||
|
|
||||||
// Remove all options. (#1399)
|
|
||||||
oCombo.innerHTML = '' ;
|
|
||||||
|
|
||||||
var aLanguages = new Array() ;
|
|
||||||
|
|
||||||
for ( code in editorInstance.Language.AvailableLanguages )
|
|
||||||
aLanguages.push( { Code : code, Name : editorInstance.Language.AvailableLanguages[code] } ) ;
|
|
||||||
|
|
||||||
aLanguages.sort( SortLanguage ) ;
|
|
||||||
|
|
||||||
for ( var i = 0 ; i < aLanguages.length ; i++ )
|
|
||||||
AddComboOption( oCombo, aLanguages[i].Name + ' (' + aLanguages[i].Code + ')', aLanguages[i].Code ) ;
|
|
||||||
|
|
||||||
oCombo.value = editorInstance.Language.ActiveLanguage.Code ;
|
|
||||||
|
|
||||||
document.getElementById('eNumLangs').innerHTML = '(' + aLanguages.length + ' languages available!)' ;
|
|
||||||
|
|
||||||
bIsLoaded = true ;
|
|
||||||
}
|
|
||||||
|
|
||||||
function SortLanguage( langA, langB )
|
|
||||||
{
|
|
||||||
return ( langA.Name < langB.Name ? -1 : langA.Name > langB.Name ? 1 : 0 ) ;
|
|
||||||
}
|
|
||||||
|
|
||||||
function AddComboOption(combo, optionText, optionValue)
|
|
||||||
{
|
|
||||||
var oOption = document.createElement("OPTION") ;
|
|
||||||
|
|
||||||
combo.options.add(oOption) ;
|
|
||||||
|
|
||||||
oOption.innerHTML = optionText ;
|
|
||||||
oOption.value = optionValue ;
|
|
||||||
|
|
||||||
return oOption ;
|
|
||||||
}
|
|
||||||
|
|
||||||
function ChangeLanguage( languageCode )
|
|
||||||
{
|
|
||||||
document.location.href = document.location.href.replace( /\?.*$/, '' ) + "?" + languageCode ;
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<h1>
|
|
||||||
FCKeditor - JavaScript - Sample 3</h1>
|
|
||||||
<div>
|
|
||||||
This sample shows the editor in all its available languages.
|
|
||||||
</div>
|
|
||||||
<hr />
|
|
||||||
<table cellpadding="0" cellspacing="0" border="0">
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
Select a language:
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<select id="cmbLanguages" onchange="ChangeLanguage(this.value);">
|
|
||||||
<option> </option>
|
|
||||||
</select>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<span id="eNumLangs"></span>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
<br />
|
|
||||||
<form action="../php/sampleposteddata.php" method="post" target="_blank">
|
|
||||||
<script type="text/javascript">
|
|
||||||
<!--
|
|
||||||
// Automatically calculates the editor base path based on the _samples directory.
|
|
||||||
// This is usefull only for these samples. A real application should use something like this:
|
|
||||||
// oFCKeditor.BasePath = '/fckeditor/' ; // '/fckeditor/' is the default value.
|
|
||||||
var sBasePath = document.location.href.substring(0,document.location.href.lastIndexOf('_samples')) ;
|
|
||||||
|
|
||||||
var sLang ;
|
|
||||||
if ( document.location.search.length > 1 )
|
|
||||||
sLang = document.location.search.substr(1) ;
|
|
||||||
|
|
||||||
var oFCKeditor = new FCKeditor( 'FCKeditor1' ) ;
|
|
||||||
oFCKeditor.BasePath = sBasePath ;
|
|
||||||
if ( sLang == null )
|
|
||||||
{
|
|
||||||
oFCKeditor.Config["AutoDetectLanguage"] = true ;
|
|
||||||
oFCKeditor.Config["DefaultLanguage"] = "en" ;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
oFCKeditor.Config["AutoDetectLanguage"] = false ;
|
|
||||||
oFCKeditor.Config["DefaultLanguage"] = sLang ;
|
|
||||||
}
|
|
||||||
oFCKeditor.Value = '<p>This is some <strong>sample text<\/strong>. You are using <a href="http://www.fckeditor.net/">FCKeditor<\/a>.<\/p>' ;
|
|
||||||
oFCKeditor.Create() ;
|
|
||||||
//-->
|
|
||||||
</script>
|
|
||||||
<br />
|
|
||||||
<input type="submit" value="Submit" />
|
|
||||||
</form>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
@@ -1,95 +0,0 @@
|
|||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
||||||
<!--
|
|
||||||
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
|
|
||||||
* Copyright (C) 2003-2008 Frederico Caldeira Knabben
|
|
||||||
*
|
|
||||||
* == BEGIN LICENSE ==
|
|
||||||
*
|
|
||||||
* Licensed under the terms of any of the following licenses at your
|
|
||||||
* choice:
|
|
||||||
*
|
|
||||||
* - GNU General Public License Version 2 or later (the "GPL")
|
|
||||||
* http://www.gnu.org/licenses/gpl.html
|
|
||||||
*
|
|
||||||
* - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
|
|
||||||
* http://www.gnu.org/licenses/lgpl.html
|
|
||||||
*
|
|
||||||
* - Mozilla Public License Version 1.1 or later (the "MPL")
|
|
||||||
* http://www.mozilla.org/MPL/MPL-1.1.html
|
|
||||||
*
|
|
||||||
* == END LICENSE ==
|
|
||||||
*
|
|
||||||
* Sample page.
|
|
||||||
-->
|
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
|
||||||
<head>
|
|
||||||
<title>FCKeditor - Sample</title>
|
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
|
||||||
<meta name="robots" content="noindex, nofollow" />
|
|
||||||
<link href="../sample.css" rel="stylesheet" type="text/css" />
|
|
||||||
<script type="text/javascript" src="../../fckeditor.js"></script>
|
|
||||||
<script type="text/javascript">
|
|
||||||
|
|
||||||
function FCKeditor_OnComplete( editorInstance )
|
|
||||||
{
|
|
||||||
var oCombo = document.getElementById( 'cmbToolbars' ) ;
|
|
||||||
oCombo.value = editorInstance.ToolbarSet.Name ;
|
|
||||||
oCombo.style.visibility = '' ;
|
|
||||||
}
|
|
||||||
|
|
||||||
function ChangeLanguage( languageCode )
|
|
||||||
{
|
|
||||||
document.location.href = document.location.href.replace( /\?.*$/, '' ) + "?" + languageCode ;
|
|
||||||
}
|
|
||||||
|
|
||||||
</script>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<h1>
|
|
||||||
FCKeditor - JavaScript - Sample 4</h1>
|
|
||||||
<div>
|
|
||||||
This sample shows how to change the editor toolbar.
|
|
||||||
</div>
|
|
||||||
<hr />
|
|
||||||
<table cellpadding="0" cellspacing="0" border="0">
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
Select the toolbar to load:
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<select id="cmbToolbars" onchange="ChangeLanguage(this.value);" style="visibility: hidden">
|
|
||||||
<option value="Default" selected="selected">Default</option>
|
|
||||||
<option value="Basic">Basic</option>
|
|
||||||
</select>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
<br />
|
|
||||||
<form action="../php/sampleposteddata.php" method="post" target="_blank">
|
|
||||||
<script type="text/javascript">
|
|
||||||
<!--
|
|
||||||
// Automatically calculates the editor base path based on the _samples directory.
|
|
||||||
// This is usefull only for these samples. A real application should use something like this:
|
|
||||||
// oFCKeditor.BasePath = '/fckeditor/' ; // '/fckeditor/' is the default value.
|
|
||||||
var sBasePath = document.location.href.substring(0,document.location.href.lastIndexOf('_samples')) ;
|
|
||||||
|
|
||||||
// Get the toolbar from the URL.
|
|
||||||
var sToolbar ;
|
|
||||||
if ( document.location.search.length > 1 )
|
|
||||||
sToolbar = document.location.search.substr(1) ;
|
|
||||||
|
|
||||||
var oFCKeditor = new FCKeditor( 'FCKeditor1' ) ;
|
|
||||||
oFCKeditor.BasePath = sBasePath ;
|
|
||||||
|
|
||||||
if ( sToolbar != null )
|
|
||||||
oFCKeditor.ToolbarSet = sToolbar ;
|
|
||||||
|
|
||||||
oFCKeditor.Value = '<p>This is some <strong>sample text<\/strong>. You are using <a href="http://www.fckeditor.net/">FCKeditor<\/a>.<\/p>' ;
|
|
||||||
oFCKeditor.Create() ;
|
|
||||||
//-->
|
|
||||||
</script>
|
|
||||||
<br />
|
|
||||||
<input type="submit" value="Submit" />
|
|
||||||
</form>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
@@ -1,125 +0,0 @@
|
|||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
||||||
<!--
|
|
||||||
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
|
|
||||||
* Copyright (C) 2003-2008 Frederico Caldeira Knabben
|
|
||||||
*
|
|
||||||
* == BEGIN LICENSE ==
|
|
||||||
*
|
|
||||||
* Licensed under the terms of any of the following licenses at your
|
|
||||||
* choice:
|
|
||||||
*
|
|
||||||
* - GNU General Public License Version 2 or later (the "GPL")
|
|
||||||
* http://www.gnu.org/licenses/gpl.html
|
|
||||||
*
|
|
||||||
* - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
|
|
||||||
* http://www.gnu.org/licenses/lgpl.html
|
|
||||||
*
|
|
||||||
* - Mozilla Public License Version 1.1 or later (the "MPL")
|
|
||||||
* http://www.mozilla.org/MPL/MPL-1.1.html
|
|
||||||
*
|
|
||||||
* == END LICENSE ==
|
|
||||||
*
|
|
||||||
* Sample page.
|
|
||||||
-->
|
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
|
||||||
<head>
|
|
||||||
<title>FCKeditor - Sample</title>
|
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
|
||||||
<meta name="robots" content="noindex, nofollow" />
|
|
||||||
<link href="../sample.css" rel="stylesheet" type="text/css" />
|
|
||||||
<script type="text/javascript" src="../../fckeditor.js"></script>
|
|
||||||
<script type="text/javascript">
|
|
||||||
|
|
||||||
function FCKeditor_OnComplete( editorInstance )
|
|
||||||
{
|
|
||||||
var oCombo = document.getElementById( 'cmbSkins' ) ;
|
|
||||||
|
|
||||||
// Get the active skin.
|
|
||||||
var sSkin = editorInstance.Config['SkinPath'] ;
|
|
||||||
sSkin = sSkin.match( /[^\/]+(?=\/$)/g ) ;
|
|
||||||
|
|
||||||
oCombo.value = sSkin ;
|
|
||||||
oCombo.style.visibility = '' ;
|
|
||||||
}
|
|
||||||
|
|
||||||
function ChangeLanguage( languageCode )
|
|
||||||
{
|
|
||||||
document.location.href = document.location.href.replace( /\?.*$/, '' ) + "?" + languageCode ;
|
|
||||||
}
|
|
||||||
|
|
||||||
</script>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<h1>
|
|
||||||
FCKeditor - JavaScript - Sample 5</h1>
|
|
||||||
<div>
|
|
||||||
This sample shows how to change the editor skin.
|
|
||||||
</div>
|
|
||||||
<hr />
|
|
||||||
<table cellpadding="0" cellspacing="0" border="0">
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
Select the skin to load:
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<select id="cmbSkins" onchange="ChangeLanguage(this.value);" style="visibility: hidden">
|
|
||||||
<option value="default" selected="selected">Default</option>
|
|
||||||
<option value="office2003">Office 2003</option>
|
|
||||||
<option value="silver">Silver</option>
|
|
||||||
</select>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
<br />
|
|
||||||
<form action="../php/sampleposteddata.php" method="post" target="_blank">
|
|
||||||
<script type="text/javascript">
|
|
||||||
<!--
|
|
||||||
// Automatically calculates the editor base path based on the _samples directory.
|
|
||||||
// This is usefull only for these samples. A real application should use something like this:
|
|
||||||
// oFCKeditor.BasePath = '/fckeditor/' ; // '/fckeditor/' is the default value.
|
|
||||||
var sBasePath = document.location.href.substring(0,document.location.href.lastIndexOf('_samples')) ;
|
|
||||||
|
|
||||||
// Get the skin from the URL.
|
|
||||||
var sSkin ;
|
|
||||||
if ( document.location.search.length > 1 )
|
|
||||||
sSkin = document.location.search.substr(1) ;
|
|
||||||
|
|
||||||
var oFCKeditor = new FCKeditor( 'FCKeditor1' ) ;
|
|
||||||
oFCKeditor.BasePath = sBasePath ;
|
|
||||||
|
|
||||||
if ( sSkin != null )
|
|
||||||
{
|
|
||||||
var sSkinPath = sBasePath + 'editor/skins/' + sSkin + '/' ;
|
|
||||||
oFCKeditor.Config['SkinPath'] = sSkinPath ;
|
|
||||||
|
|
||||||
// The following switch is optional. It is done to enhance the loading
|
|
||||||
// time of the toolbar, by preloading the images used on it.
|
|
||||||
switch ( sSkin )
|
|
||||||
{
|
|
||||||
case 'office2003' :
|
|
||||||
oFCKeditor.Config['PreloadImages'] =
|
|
||||||
sSkinPath + 'images/toolbar.start.gif' + ';' +
|
|
||||||
sSkinPath + 'images/toolbar.end.gif' + ';' +
|
|
||||||
sSkinPath + 'images/toolbar.bg.gif' + ';' +
|
|
||||||
sSkinPath + 'images/toolbar.buttonarrow.gif' ;
|
|
||||||
break ;
|
|
||||||
|
|
||||||
case 'silver' :
|
|
||||||
oFCKeditor.Config['PreloadImages'] =
|
|
||||||
sSkinPath + 'images/toolbar.start.gif' + ';' +
|
|
||||||
sSkinPath + 'images/toolbar.end.gif' + ';' +
|
|
||||||
sSkinPath + 'images/toolbar.buttonbg.gif' + ';' +
|
|
||||||
sSkinPath + 'images/toolbar.buttonarrow.gif' ;
|
|
||||||
break ;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
oFCKeditor.Value = '<p>This is some <strong>sample text<\/strong>. You are using <a href="http://www.fckeditor.net/">FCKeditor<\/a>.<\/p>' ;
|
|
||||||
oFCKeditor.Create() ;
|
|
||||||
//-->
|
|
||||||
</script>
|
|
||||||
<br />
|
|
||||||
<input type="submit" value="Submit" />
|
|
||||||
</form>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user