Hi,
Also ich bastel gerade ein Ticketsystem für das Wbb.
Ich habe gerade die Formklasse vom Formular erstellt, aber irgendwie sagt er mir immer ich hätte einen Syntaxerror.
Hoffe ihr könnt mir helfen.
Bitte nicht auf Code achten, ist sehr unsauber und teils sogar unvollständig bzw. falsch
Alles anzeigen
Ich werde bestimmt noch viele Fragen bezüglich des Ticketsystems haben.
Fehlermeldung vergessen^^
Also ich bastel gerade ein Ticketsystem für das Wbb.
Ich habe gerade die Formklasse vom Formular erstellt, aber irgendwie sagt er mir immer ich hätte einen Syntaxerror.
Hoffe ihr könnt mir helfen.
Bitte nicht auf Code achten, ist sehr unsauber und teils sogar unvollständig bzw. falsch

PHP Parse error: syntax error, unexpected '}', expecting T_CATCH in C:\xampp\htdocs\wbb31\wcf\lib\form\TicketAddForm.class.php on line 51
Quellcode
- <?php
- // WCF imports
- require_once(WCF_DIR.'lib/form/MessageForm.class.php');
- /**
- *
- *
- * @package de.zumarta.ts
- * @author Zumarta
- * @copyright Zumarta.de
- */
- class TicketAddForm extends MessageForm {
- public $templateName = 'TicketAdd';
- public $title;
- public $text;
- public $showAttachments = true;
- public $attachmentsEditor;
- /**
- * @see Form::readFormParameters()
- */
- public function readFormParameters() {
- parent::readFormParameters();
- // Eingabe Auslesen
- if (isset($_POST['title'])) $this->title = StringUtil::trim($_POST['title']);
- if (isset($_POST['text'])) $this->text = StringUtil::trim($_POST['text']);
- }
- /**
- * @see Form::submit()
- */
- public function submit() {
- // call submit event
- EventHandler::fireAction($this, 'submit');
- $this->readFormParameters();
- try {
- // attachment handling
- if ($this->showAttachments) {
- $this->attachmentListEditor->handleRequest();
- }
- // send message or save as draft
- if ($this->send) {
- $this->validate();
- // no errors
- $this->save();
- }
- }
- }
- /**
- * @see Form::save()
- */
- public function save() {
- parent::save();
- $timestamp = time();
- $sql = "INSERT INTO `ts".WCF_N."_tickets` (`title`, `description`)
- VALUES ('".escapeString($this->title)."',
- '".escapeString($this->text)."',
- '".intval($licence['ID'])."',
- '".escapeString($this->data)."',
- '".WCF::getUser()->userID."',
- '0',
- '0',
- '2',
- '".$timestamp."')";
- WCF::getDB()->sendQuery($sql);
- HeaderUtil::redirect('index.php?page=ViewTicket&dataID='.WCF::getDB()->getInsertID().SID_ARG_2ND);
- /**
- * @see Page::show()
- */
- public function show() {
- parent::show();
- }
- }
- }
- ?>
Ich werde bestimmt noch viele Fragen bezüglich des Ticketsystems haben.

Fehlermeldung vergessen^^