コード例 #1
0
    /**
     * @access private
     * @return string;
     */
    function _DateFormular($Day = -1, $Month = -1, $Year = -1, $Hour = -1, $Minute = -1, $Location = '', $Topic = '', $EventID = -1, $LocationError = '', $TopicError = '')
    {
        $this->_ComaLate->SetReplacement('LANG_EVENTS', $this->_Translation->GetTranslation('events'));
        $this->_ComaLate->SetReplacement('LANG_DATE', $this->_Translation->GetTranslation('date'));
        $this->_ComaLate->SetReplacement('DATE_INFO', $this->_Translation->GetTranslation('this_is_the_date_of_the_event'));
        $this->_ComaLate->SetReplacement('LANG_LOCATION', $this->_Translation->GetTranslation('location'));
        $this->_ComaLate->SetReplacement('LOCATION_INFO', $this->_Translation->GetTranslation('this_is_the_location_where_the_event_will_be'));
        $this->_ComaLate->SetReplacement('LANG_TOPIC', $this->_Translation->GetTranslation('topic'));
        $this->_ComaLate->SetReplacement('LANG_BACK', $this->_Translation->GetTranslation('back'));
        $this->_ComaLate->SetReplacement('TOPIC_INFO', $this->_Translation->GetTranslation('the_topic_describes_this_event'));
        $this->_ComaLate->SetReplacement('EVENT_ID', $EventID);
        $this->_ComaLate->SetReplacement('LOCATION_VALUE', stripslashes($Location));
        $this->_ComaLate->SetReplacement('TOPIC_VALUE', stripslashes($Topic));
        if ($EventID == -1) {
            $this->_ComaLate->SetReplacement('EVENT_SUBTITLE', $this->_Translation->GetTranslation('add_a_new_event'));
            $this->_ComaLate->SetReplacement('LANG_ADD', $this->_Translation->GetTranslation('add'));
            $this->_ComaLate->SetReplacement('EVENT_ACTION', 'add');
        } else {
            $this->_ComaLate->SetReplacement('EVENT_SUBTITLE', $this->_Translation->GetTranslation('edit_event'));
            $this->_ComaLate->SetReplacement('LANG_ADD', $this->_Translation->GetTranslation('save'));
            $this->_ComaLate->SetReplacement('EVENT_ACTION', 'save');
        }
        if ($LocationError != '') {
            $this->_ComaLate->SetCondition('event_location_error', true);
            $this->_ComaLate->SetReplacement('LOCATION_ERROR', $LocationError);
        }
        if ($TopicError != '') {
            $this->_ComaLate->SetCondition('event_topic_error', true);
            $this->_ComaLate->SetReplacement('TOPIC_ERROR', $TopicError);
        }
        // The timestamp "selectedDate"
        $selectedDate = 0;
        if ($Day == -1 || $Month == -1 || $Year == -1 || $Hour == -1 || $Minute == -1) {
            $selectedDate = mktime();
        } else {
            $selectedDate = mktime($Hour, $Minute, 0, $Month, $Day, $Year);
        }
        $template = '<h2>{LANG_EVENTS}</h2>
 				<form method="post" action="admin.php">
				<input type="hidden" name="page" value="module_dates" />
				<input type="hidden" name="action" value="{EVENT_ACTION}" />
				<input type="hidden" name="eventID" value="{EVENT_ID}" />
				<fieldset>
					<legend>{EVENT_SUBTITLE}</legend>
					<div class="row">
						<label>
							<strong>{LANG_DATE}:</strong>
							<span class="info">{DATE_INFO}</span>
							</label>
						' . Dates::DateSelector($selectedDate, mktime(), 'date', 7) . '
					</div>
					<div class="row">
						<label>
							<strong>{LANG_LOCATION}:</strong>
							<span class="info">{LOCATION_INFO}</span>
							<event_location_error:condition><span class="error">{LOCATION_ERROR}</span></event_location_error>
						</label>
						<input type="text" name="dateLocation" maxlength="60" value="{LOCATION_VALUE}" />
					</div>
					<div class="row">
						<label>
							<strong>{LANG_TOPIC}:</strong>
							<span class="info">{TOPIC_INFO}</span>
							<event_topic_error:condition><span class="error">{TOPIC_ERROR}</span></event_topic_error>
						</label>
						<script type="text/javascript" language="JavaScript" src="system/functions.js"></script>
						<script type="text/javascript" language="javascript">
							//<![CDATA[
							writeButton("img/button_fett.png", "Text fett formatieren", "**", "**", "fetter Text", "f");
							writeButton("img/button_kursiv.png", "Text kursiv formatieren", "//", "//", "{LANG_ITALIC_TEXT", "k");
							writeButton("img/button_unterstrichen.png", "Text unterstreichen", "__", "__", "unterstrichener Text", "u");
							//]]>
						</script><br />
						<textarea name="dateTopic" id="editor">{TOPIC_VALUE}</textarea>
					</div>
					<div class="row">
						<a href="admin.php?page=module_dates" class="button">{LANG_BACK}</a>
						<input type="submit" class="button" value="{LANG_ADD}" />
					</div>
				</fieldset>
			</form>';
        return $template;
    }