function au_template_global_error_box()
{
    // Our template needs the big $aulis
    global $aulis;
    // This will output an errorbox in hannover style
    au_out("<div class='notice bg5 c5'>" . au_icon('warning', 16, 'red') . " " . $aulis['error_box_contents'] . "</div>", true, $aulis['error_box_output']);
}
Esempio n. 2
0
function au_show_boardindex()
{
    global $aulis;
    // Dummy content
    au_out("This is dummy content, we will show the smilies here, because they need to be tested anyway.<br /><br/>");
    foreach (glob($aulis['root_path'] . '/library/smilies/*.svg') as $smiley) {
        au_out(au_smiley(basename($smiley, '.svg')) . ' ');
    }
}
Esempio n. 3
0
function au_template_blog_sidebar()
{
    // Our template needs the big $aulis
    global $aulis;
    $search_value = '';
    if (isset($saulis['blog_search'])) {
        $search_value = $aulis['blog_search'];
    }
    return au_out('<div class="blog_sidebar">
			' . au_blog_sidebar_about() . '
			' . au_blog_sidebar_search($search_value) . '
			' . au_blog_sidebar_categories() . '
		</div>');
}
Esempio n. 4
0
function au_template_blog_preview()
{
    // Our template needs the big $aulis
    global $aulis;
    // Let's make this thing shorter
    $e = $aulis['blog_entry'];
    // If our blog has no seperate intro text, it is the same as the whole blog
    if ($e->blog_intro == '' and $e->blog_content != '') {
        $e->blog_intro = $e->blog_content;
    } else {
        if ($e->blog_intro == '' and $e->blog_content == '') {
            return au_error_box(BLOG_EMPTY);
        }
    }
    // We might have to highlight stuff
    if (isset($_GET['search'])) {
        // Explode the search string, so that we can highlight every word seperatly
        $exploded_search = explode(' ', $aulis['blog_search']);
        // Each word needs to be highlighted in blog_name and blog_intro
        foreach ($exploded_search as $keyword) {
            $e->blog_name = au_highlight($keyword, $e->blog_name, "<span class='highlight'>", "</span>");
            $e->blog_intro = au_highlight($keyword, $e->blog_intro, "<span class='highlight'>", "</span>");
        }
    }
    // The href to the blog entry page
    $href = au_blog_url($aulis['blog_url_input']);
    // The heading
    au_out("<h1><a href='" . $href . "'>" . $e->blog_name . "</a></h1>", true, 'blog_entries');
    // The sub heading with time and catergory
    au_out("<span class='sub'>" . au_icon('category', 12) . ' ' . sprintf(BLOG_POSTED_IN, "<a href='" . au_blog_url(array('app' => 'blogindex', 'category' => $e->blog_category, 'category_name' => $e->category_name)) . "'>" . $e->category_name . "</a>") . "\n\t\t " . au_icon('clock', 12) . ' ' . au_date($e->blog_date) . "</span>", true, 'blog_entries');
    // The content
    au_out("<p>" . au_parse_blog($e->blog_intro, $e->blog_parse_mode) . "</p>", true, 'blog_entries');
    // Comments bar!
    au_out('<div class="comments_bar"><a href="' . $href . '#comments">' . au_icon('comment', 12) . ' ' . ($aulis['blog_comment_count'] == 0 ? BLOG_NO_COMMENTS : $aulis['blog_comment_count'] . ' ' . ($aulis['blog_comment_count'] > 1 ? BLOG_COMMENTS : BLOG_COMMENT)) . '</a> | <a href="' . $href . '">' . au_icon('lamp', 12) . ' ' . BLOG_READMORE . '</a></div>', $e->blog_can_comment == 1, 'blog_entries');
    // We need this for the output
    $blog_preview = '';
    // Finish the output into $aulis['page']['blog_preview']
    foreach ($aulis['page']['blog_entries'] as $entry) {
        $blog_preview .= $entry;
    }
    // Transfer the output
    au_out($blog_preview, true, 'blog_preview');
    // Ready for the next one
    unset($aulis['blog']['entry'], $aulis['page']['blog_entries']);
}
Esempio n. 5
0
function au_template_blog_entry()
{
    // Our template needs the big $aulis
    global $aulis;
    // Let's make this thing shorter
    $e = $aulis['blog']['entry'];
    // The href to the blog entry page
    $href = au_blog_url($aulis['blog']['url_input']);
    // The wrapper
    au_out("<div class='blog_full_wrapper'>");
    // The heading
    au_out("<h1><a href='" . $href . "'>" . $e->blog_name . "</a></h1>");
    // The sub heading with time and catergory
    au_out("<span class='sub'><a class='icon i-category i-12'></a> " . sprintf(BLOG_POSTED_IN, "<a href='" . au_url("?app=blogindex&category=" . $e->blog_category) . "'>" . $e->category_name . "</a>") . "\n\t\t <a class='icon i-clock i-12'></a> " . au_date($e->blog_date) . "</span>");
    // The content
    au_out("<p>" . au_parse_blog($e->blog_content) . "</p>");
    // Ending the wrapper
    au_out("</div>");
    // Ready for the next one
    unset($aulis['blog']['entry']);
}
Esempio n. 6
0
function au_template_login($complete = false)
{
    global $setting;
    // Just show the login page
    au_out('
			<div class="reglogin_minimal">
				' . (!empty($data['error_message']) ? '<div class="error">' . implode('<br />', $data['error_message']) . '</div>' : '') . '
				<div class="sectiontitle2">
					<img src="' . $setting['theme_url'] . '/images/icons/user_green.png" /> ' . $language['login'] . '
				</div>
				<form action="' . $basefile . 'do=login" method="post">
					<input type="hidden" name="draseim_login" />
					<table class="user" width="100%">
						<tr>
							<td>' . LOGIN_USERNAME . '</td>
							<td><input type="text" name="draseim_username"' . (!empty($data['username']) ? ' value="' . $data['username'] . '"' : '') . ' /></td>
						</tr>
						<tr>
							<td>' . LOGIN_PASSWORD . '</td>
							<td><input type="password" name="draseim_password" /></td>
						</tr>
						<tr>
							<td colspan="2"><input type="checkbox" name="draseim_forever" /> ' . LOGIN_FOREVER . '</td>
						</tr>
						<tr>
							<td></td>
							<td><input type="submit" value="' . LOGIN_SUBMIT . '" /></td>
						</tr>
					</table>
				</form>
				<p class="loginlinks">
					<a href="' . $basefile . 'do=register&activate">' . LOGIN_ACTIVATE_ACCOUNT . '</a><br />
					<a href="' . $basefile . 'do=resetpassword">' . LOGIN_RESET_PASSWORD . '</a>
				</p>
			</div>');
}
Esempio n. 7
0
function au_template_blog_index()
{
    // Our template needs the big $aulis
    global $aulis;
    // What error do we need to show if no entries are found?
    $no_entries = BLOG_NO_ENTRIES_FOUND;
    // The sidebar, needs to be on top
    au_load_template('blog_sidebar');
    // If we are searching, we need to have a title and such
    if (isset($_GET['search']) && !isset($_GET['category'], $_GET['tag']) && ($no_entries = sprintf(BLOG_SEARCH_NO_ENTRIES, $aulis['blog_search']))) {
        au_out('<div class="blog_preview_page_title"><span class="float-right lowercase">' . sprintf(BLOG_SEARCH_FOUND_HITS, au_format_number($aulis['blog_count'], 0), $aulis['blog_count'] > 1 || $aulis['blog_count'] == 0 ? BLOG_SEARCH_FOUND_HITS_PLURAL : BLOG_SEARCH_FOUND_HITS_SINGULAR) . '</span>
			<h1>' . sprintf(BLOG_SEARCH_TITLE, '\'' . $aulis['blog_search'] . '\'') . '</h1></div>
			<div class="blog_preview_page_title_sub"><a class="button" href="' . au_blog_url() . '">' . au_icon('arrow_left', 8) . 'Back to blog</a><br /><br /></div>');
    }
    // If we are in category, the title needs to show that
    if (isset($_GET['category']) && is_numeric($_GET['category']) && !isset($_GET['search'], $_GET['tag']) and $no_entries = BLOG_CATEGORY_NO_ENTRIES) {
        au_out('<div class="blog_preview_page_title"><span class="float-right lowercase">' . sprintf(BLOG_FOUND_HITS, au_format_number($aulis['blog_count'], 0), $aulis['blog_count'] > 1 || $aulis['blog_count'] == 0 ? BLOG_FOUND_HITS_PLURAL : BLOG_FOUND_HITS_SINGULAR) . '</span>
			<h1>' . sprintf(BLOG_CATEGORY_TITLE, '\'' . au_get_blog_category_name($aulis['blog_category']) . '\'') . '</h1></div>
			<div class="blog_preview_page_title_sub"><a class="button" href="' . au_blog_url() . '">' . au_icon('arrow_left', 8) . 'Back to blog</a><br /><br /></div>');
    }
    // If there are no entries parsed, we need to show that
    if (!isset($aulis['page']['blog_preview']) || empty($aulis['page']['blog_preview'])) {
        au_error_box($no_entries, 'blog_preview');
    }
    // Let's output the page links we want into $aulis['blog_preview'], so that it gets parsed in a nice wrapper
    au_out('<br /><div class="maxwidth">' . au_blog_index_timeline_links() . '</div>', $aulis['blog_count'] != 0 and $aulis['blog_max_offset'] != 0, 'blog_preview');
    // Finalize the output; rendering it into nice wrappers.
    $output = '';
    foreach ($aulis['page']['blog_preview'] as $number => $entry) {
        $output .= '<div class="blog_preview_wrapper w-' . $number . '">' . $entry . '</div>';
    }
    // Wrap it again, for easy jQuery selection of all preview elements
    au_out('<div class="blog_previews">' . $output . '</div>');
    // We want a clean page
    au_out('<br class="clear" />');
}
Esempio n. 8
0
function au_template_register($data = array(), $iscomplete = false)
{
    global $setting;
    // Show a thanks-page if we need to
    if ($iscomplete == true) {
        au_out('
				<div class="reglogin">
					<div class="sectiontitle">
						' . au_icon('user_add', 16) . ' ' . REGISTER_DONE . '
					</div>
					<div class="sectioncontent">
						' . REGISTER_DONE_DESC . '
					</div>
				</div>');
        return;
    }
    // Now let's just echo the header
    au_out('
			<div class="reglogin">
				' . (!empty($data['error_message']) ? '<div class="notice bg5 c5"><span class="float-right">' . au_icon('warning', 24, 'red') . '</span> ' . implode('<br />', $data['error_message']) . '</div>' : '') . '
				<div class="sectiontitle">
					' . au_icon('user_add', 16) . ' ' . REGISTER . '
				</div>
				<div class="sectioncontent">
					' . REGISTER_WELCOME . '
					<hr />
					<form action="' . au_url('?app=register') . '" method="post">
						<input type="hidden" name="aulis_register" value="1" />
						<table class="user" width="100%">
							<tr>
								<td><span>' . REGISTER_USERNAME . '</span><br />' . REGISTER_USERNAME_DESCRIPTION . '</td>
								<td><input type="text" name="aulis_username"' . (!empty($data['username']) ? ' value="' . $data['username'] . '"' : '') . ' /></td>
							</tr>
							<tr>
								<td><span>' . REGISTER_PASSWORD . '</span><br />' . REGISTER_PASSWORD_DESCRIPTION . '</td>
								<td><input type="password" name="aulis_password" /></td>
							</tr>
							<tr>
								<td><span>' . REGISTER_PASSWORD2 . '</span><br />' . REGISTER_PASSWORD2_DESCRIPTION . '</td>
								<td><input type="password" name="aulis_password2" /></td>
							</tr>
							<tr>
								<td><span>' . REGISTER_EMAIL . '</span><br />' . REGISTER_EMAIL_DESCRIPTION . '</td>
								<td><input type="text" name="aulis_email"' . (!empty($data['email']) ? ' value="' . $data['email'] . '"' : '') . ' /></td>
							</tr>
							<tr>
								<td><span>' . REGISTER_BIRTHDATE . '</span><br />' . REGISTER_BIRTHDATE_DESCRIPTION . '</td>
								<td>
									<select name="aulis_month" id="aulis_month">');
    // Display the months
    for ($month = 1; $month <= 12; $month++) {
        au_out('
										<option value="' . $month . '"' . (!empty($data['birthdate_month']) && $month == $data['birthdate_month'] ? ' selected="selected"' : '') . '>' . constant('DATE_MONTH_' . $month) . '</option>');
    }
    au_out('
									</select>
									<select name="aulis_day" id="aulis_day">');
    // And the days
    for ($day = 1; $day <= 31; $day++) {
        au_out('
										<option value="' . $day . '"' . (!empty($data['birthdate_day']) && $month == $data['birthdate_day'] ? ' selected="selected"' : '') . '>' . $day . '</option>');
    }
    au_out('
									</select>
									<select name="aulis_year" id="aulis_year">');
    // Now continue with the years
    foreach (range(date('Y'), date('Y') - 100) as $year) {
        au_out('
										<option value="' . $year . '"' . (!empty($data['birthdate_year']) && $month == $data['birthdate_year'] ? ' selected="selected"' : '') . '>' . $year . '</option>');
    }
    au_out('
									</select>
								</td>
							</tr>
							<tr>
								<td colspan="2" id="agreement">
									<strong>' . REGISTER_SIGN_AGREEMENT . '</strong><br />
									' . REGISTER_AGREEMENT . '
								</td>
							</tr>');
    // Do we have registration questions to display?
    if (!empty($data['questions'])) {
        foreach ($data['questions'] as $question) {
            au_out('
							<tr>
								<td><span>' . $question['question_title'] . '</span><br />' . $question['question_description'] . '</td>
								<td><input type="text" name="aulis_squestion_' . $question['question_id'] . '" /></td>
							</tr>');
        }
    }
    au_out('
							<tr>
								<td></td>
								<td><input type="submit" value="' . REGISTER_SUBMIT . '" /></td>
							</tr>
						</table>
					</form>
				</div>
			</div>');
}