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']); }
function au_sidebar_block($title, $icon, $content) { return '<div class="block"> <span class="title">' . au_icon($icon, 12) . ' ' . $title . '</span><br /> ' . $content . ' </div>'; }
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']); }
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" />'); }
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>'); }
</title> <link rel="stylesheet" href="' . $aulis['absolute_path'] . '/themes/hannover/css/admin.css"> <link rel="stylesheet" href="' . $aulis['absolute_path'] . '/library/css-assets/icons.css"> <link rel="shortcut icon" type="image/png" href="' . $aulis['absolute_path'] . 'library/static/favicon.png" /> <script src="' . $aulis['absolute_path'] . 'library/js-assets/jquery-1.11.3.min.js"></script> </head> <body class="admin"> <div class="topbar"> <a class="button" href="index.php">' . au_icon('arrow_left', 12) . ' ' . ADMIN_BACK_TO_SITE . '</a> <h1>' . au_icon('gear', 24) . ' Administration Dashboard</h1> <img class="logo" alt="[au]lis" src="' . $aulis['absolute_path'] . 'themes/hannover/images/logo.svg" /> <br class="clear" /> </div> <div class="icon-menu"> <div class="icon-stack"> <a href="#">' . au_icon('house_full', 32, 'white') . '</a> </div> <br class="clear" /> </div> <div class="side-menu"> <br class="clear" /> </div> <div class="canvas"> <div class="logo-container"> </div> <br class="clear" /> </div> </body> </html>';
<link rel="stylesheet" href="' . $aulis['absolute_path'] . '/themes/hannover/css/main.css"> <link rel="stylesheet" href="' . $aulis['absolute_path'] . '/library/css-assets/icons.css"> <link rel="shortcut icon" type="image/png" href="' . $aulis['absolute_path'] . 'library/static/favicon.png" /> <script src="' . $aulis['absolute_path'] . 'library/js-assets/jquery-1.11.3.min.js"></script> </head> <body class="bg4"> <header> <div class="top-stripe bg1"></div> <div class="logobar bg2"> <div class="userstack float-right"> <a href=""><img src="' . $aulis['absolute_path'] . '/uploads/avatars/80183_1.png" /></a> <span class="username"><a href="">Charlie ' . au_icon('small_arrow_down', 8, 'black') . '</a></span> </div> <div class="iconstack float-left"> <a href="javascript:void();">' . au_icon('menu', 24, 'black') . '</a> <a href="javascript:void();">' . au_icon('house', 24, 'black') . '</a> </div> <a href="' . au_url() . '"><img src="' . $aulis['absolute_path'] . 'themes/hannover/images/logo.svg" /></a> </div> <div class="navbar bg3"> <div class="menustack float-left">'; // Load the main menu $menu_tabs = au_menu(); // Show the tabs foreach ($menu_tabs as $tab) { if ($tab['visible'] == true) { echo ' <a href="' . $tab['link'] . '"' . ($tab['active'] == 1 || $tab['type'] != 1 ? ' class="' . ($tab['active'] == 1 ? 'active' : '') . ($tab['type'] != 1 ? ($tab['active'] == 1 ? ' ' : '') . $tab['type'] : '') . '"' : '') . ' target="' . $tab['target'] . '">' . $tab['text'] . '</a>'; } } echo '