5 Jappix - An open social platform
6 This is the Jappix Manager PHP/HTML code
8 -------------------------------------------------
12 Last revision: 26/08/11
16 // Someone is trying to hack us?
17 if(!defined('JAPPIX_BASE'))
20 // Get the manager functions
21 require_once(JAPPIX_BASE.'/php/functions-manager.php');
26 $logout_fired = false;
27 $form_parent = 'manager';
32 $user_meta = T_("unknown");
35 $remove_button = false;
37 $check_updates = false;
42 // Force the updates check?
43 if(isset($_GET['p']) && ($_GET['p'] == 'check'))
44 $check_updates = true;
47 if(isset($_POST['login'])) {
51 // Extract the user name
52 if(isset($_POST['admin_name']) && !empty($_POST['admin_name']))
53 $user = trim($_POST['admin_name']);
55 if($user && (isset($_POST['admin_password']) && !empty($_POST['admin_password']))) {
56 // Get the password values
57 $password = genStrongHash(trim($_POST['admin_password']));
60 $_SESSION['jappix_user'] = $user;
61 $_SESSION['jappix_password'] = $password;
66 else if((isset($_SESSION['jappix_user']) && !empty($_SESSION['jappix_user'])) && (isset($_SESSION['jappix_password']) && !empty($_SESSION['jappix_password']))) {
70 // Get the session values
71 $user = $_SESSION['jappix_user'];
72 $password = $_SESSION['jappix_password'];
75 // Validate the current session
76 if($login_fired && isAdmin($user, $password))
79 // Any special page requested (and authorized)?
80 if(($id != 0) && isset($_GET['a']) && !empty($_GET['a'])) {
81 // Extract the page name
82 $page_requested = $_GET['a'];
84 switch($page_requested) {
88 unset($_SESSION['jappix_user']);
89 unset($_SESSION['jappix_password']);
91 // Set a logout marker
99 // Configuration request
100 case 'configuration':
122 $remove_button = true;
133 $remove_button = true;
144 $remove_button = true;
158 // Default page when authorized (statistics)
165 // Page server-readable names
166 $identifiers = array(
177 // Page human-readable names
179 T_("Manager access"),
189 // Any user for the meta?
190 if($user && ($id != 0))
193 // Define current page identifier & name
194 $page_identifier = $identifiers[$id];
195 $page_name = $names[$id];
197 // Define the current page form action
199 $form_action = keepGet('(m|a|p|k)', false);
201 $form_action = keepGet('(m|p|k)', false);
205 <?php htmlTag($locale); ?>
208 <meta http-equiv="content-type" content="text/html; charset=utf-8" />
209 <meta name="robots" content="none" />
210 <title><?php _e("Jappix manager"); ?> • <?php echo($page_name); ?></title>
211 <link rel="shortcut icon" href="./favicon.ico" />
212 <?php echoGetFiles($hash, '', 'css', 'manager.xml', ''); echo "\n"; ?>
213 <!--[if lt IE 9]><?php echoGetFiles($hash, '', 'css', '', 'ie.css'); ?><![endif]-->
216 <body class="body-images">
217 <form id="manager" enctype="multipart/form-data" method="post" action="./?m=manager<?php echo $form_action; ?>">
218 <div id="manager-top">
219 <div class="logo manager-images"><?php _e("Manager"); ?></div>
222 <span><?php echo(htmlspecialchars($user_meta)); ?></span>
227 $keep_get = keepGet('(a|p|b|s|k)', false);
230 <a class="logout manager-images" href="./?a=logout<?php echo $keep_get; ?>"><?php _e("Disconnect"); ?></a>
233 <a class="close manager-images" href="./<?php echo keepGet('(m|a|p|b|s|k)', true); ?>"><?php _e("Close"); ?></a>
236 <div class="clear"></div>
239 <?php if($id != 0) { ?>
240 <div id="manager-tabs">
241 <a<?php currentTab('statistics', $page_identifier); ?> href="./?a=statistics<?php echo $keep_get; ?>"><?php _e("Statistics"); ?></a>
242 <a<?php currentTab('configuration', $page_identifier); ?> href="./?a=configuration<?php echo $keep_get; ?>"><?php _e("Configuration"); ?></a>
243 <a<?php currentTab('hosts', $page_identifier); ?> href="./?a=hosts<?php echo $keep_get; ?>"><?php _e("Hosts"); ?></a>
244 <a<?php currentTab('storage', $page_identifier); ?> href="./?a=storage<?php echo $keep_get; ?>"><?php _e("Storage"); ?></a>
245 <a<?php currentTab('design', $page_identifier); ?> href="./?a=design<?php echo $keep_get; ?>"><?php _e("Design"); ?></a>
246 <a<?php currentTab('users', $page_identifier); ?> href="./?a=users<?php echo $keep_get; ?>"><?php _e("Users"); ?></a>
247 <a<?php currentTab('updates', $page_identifier); ?> class="last" href="./?a=updates<?php echo $keep_get; ?>"><?php _e("Updates"); ?></a>
251 <div id="manager-content">
255 if(!storageWritable()) { ?>
256 <p class="info bottomspace fail"><?php _e("Your storage folders are not writable, please apply the good rights!"); ?></p>
259 if(BOSHProxy() && extension_loaded('suhosin') && (ini_get('suhosin.get.max_value_length') < 1000000)) { ?>
260 <p class="info bottomspace neutral"><?php printf(T_("%1s may cause problems to the proxy, please increase %2s value up to %3s!"), 'Suhosin', '<em>suhosin.get.max_value_length</em>', '1000000'); ?></p>
263 if(newUpdates($check_updates)) { ?>
264 <a class="info bottomspace neutral" href="./?a=updates<?php echo $keep_get; ?>"><?php _e("A new Jappix version is available! Check what is new and launch the update!"); ?></a>
268 // Authorized and statistics page requested
270 <h3 class="statistics manager-images"><?php _e("Statistics"); ?></h3>
272 <p><?php _e("Basic statistics are processed by Jappix about some important things, you can find them below."); ?></p>
274 <h4><?php _e("Access statistics"); ?></h4>
278 // Read the visits values
279 $visits = getVisits();
284 <li class="total"><b><?php _e("Total"); ?></b><span><?php echo $visits['total']; ?></span></li>
285 <li><b><?php _e("Daily"); ?></b><span><?php echo $visits['daily']; ?></span></li>
286 <li><b><?php _e("Weekly"); ?></b><span><?php echo $visits['weekly']; ?></span></li>
287 <li><b><?php _e("Monthly"); ?></b><span><?php echo $visits['monthly']; ?></span></li>
288 <li><b><?php _e("Yearly"); ?></b><span><?php echo $visits['yearly']; ?></span></li>
291 <object class="stats" type="image/svg+xml" data="./php/stats-svg.php?l=<?php echo $locale; ?>&g=access"></object>
295 // Get the share stats
296 $share_stats = shareStats();
298 // Any share stats to display?
299 if(count($share_stats)) { ?>
300 <h4><?php _e("Share statistics"); ?></h4>
305 // Display the users who have the largest share folder
306 $share_users = largestShare($share_stats, 8);
308 foreach($share_users as $current_user => $current_value)
309 echo('<li><b><a href="xmpp:'.$current_user.'">'.$current_user.'</a></b><span>'.formatBytes($current_value).'</span></li>');
314 <object class="stats" type="image/svg+xml" data="./php/stats-svg.php?l=<?php echo $locale; ?>&g=share"></object>
317 <h4><?php _e("Other statistics"); ?></h4>
320 <li class="total"><b><?php _e("Total"); ?></b><span><?php echo formatBytes(sizeDir(JAPPIX_BASE.'/store/')); ?></span></li>
324 // Append the human-readable array values
325 $others_stats = otherStats();
327 foreach($others_stats as $others_name => $others_value)
328 echo('<li><b>'.$others_name.'</b><span>'.formatBytes($others_value).'</span></li>');
333 <object class="stats" type="image/svg+xml" data="./php/stats-svg.php?l=<?php echo $locale; ?>&g=others"></object>
336 // Authorized and configuration page requested
337 else if($id == 2) { ?>
338 <h3 class="configuration manager-images"><?php _e("Configuration"); ?></h3>
340 <p><?php _e("Change your Jappix node configuration with this tool."); ?></p>
342 <p><?php _e("Note that if you don't specify a value which is compulsory, it will be automatically completed with the default one."); ?></p>
346 // Define the main configuration variables
347 include(JAPPIX_BASE.'/php/vars-main.php');
349 // Read the main configuration POST
350 if(isset($_POST['save'])) {
351 include(JAPPIX_BASE.'/php/post-main.php');
353 // Show a success alert
355 <p class="info smallspace success"><?php _e("Changes saved!"); ?></p>
359 // Include the main configuration form
360 include(JAPPIX_BASE.'/php/form-main.php');
363 // Authorized and hosts page requested
364 else if($id == 3) { ?>
365 <h3 class="hosts manager-images"><?php _e("Hosts"); ?></h3>
367 <p><?php _e("Change the XMPP hosts that this Jappix node serve with this tool."); ?></p>
369 <p><?php _e("Maybe you don't know what a BOSH server is? In fact, this is a relay between a Jappix client and a XMPP server, which is necessary because of technical limitations."); ?></p>
371 <p><?php _e("Note that if you don't specify a value which is compulsory, it will be automatically completed with the default one."); ?></p>
375 // Define the hosts configuration variables
376 include(JAPPIX_BASE.'/php/vars-hosts.php');
378 // Read the hosts configuration POST
379 if(isset($_POST['save'])) {
380 include(JAPPIX_BASE.'/php/post-hosts.php');
382 // Show a success alert
384 <p class="info smallspace success"><?php _e("Changes saved!"); ?></p>
388 // Include the hosts configuration form
389 include(JAPPIX_BASE.'/php/form-hosts.php');
392 // Authorized and storage page requested
393 else if($id == 4) { ?>
394 <h3 class="storage manager-images"><?php _e("Storage"); ?></h3>
396 <p><?php _e("All this Jappix node stored files can be managed with this tool: please select a sub-folder and start editing its content!"); ?></p>
400 // Include the store configuration vars
401 include(JAPPIX_BASE.'/php/vars-store.php');
403 // Include the store configuration POST handler
404 include(JAPPIX_BASE.'/php/post-store.php');
406 // Include the store configuration GET handler
407 include(JAPPIX_BASE.'/php/get-store.php');
411 <h4><?php _e("Maintenance"); ?></h4>
413 <p><?php _e("Keep your Jappix node fresh and fast, clean the storage folders regularly!"); ?></p>
418 $keep_get = keepGet('p', false);
423 <li class="total"><a href="./?p=everything<?php echo $keep_get; ?>"><?php _e("Clean everything"); ?></a></li>
424 <li><a href="./?p=cache<?php echo $keep_get; ?>"><?php _e("Purge cache"); ?></a></li>
425 <li><a href="./?p=logs<?php echo $keep_get; ?>"><?php _e("Purge logs"); ?></a></li>
426 <li><a href="./?p=send<?php echo $keep_get; ?>"><?php _e("Purge sent files"); ?></a></li>
427 <li><a href="./?p=updates<?php echo $keep_get; ?>"><?php _e("Purge updates"); ?></a></li>
430 <h4><?php _e("Share"); ?></h4>
432 <p><?php _e("Stay tuned in what your users store on your server and remove undesired content with this tool."); ?></p>
435 <legend><?php _e("Browse"); ?></legend>
440 // List the share files
441 browseFolder($share_folder, 'share');
447 <h4><?php _e("Music"); ?></h4>
449 <p><?php _e("Upload your music (Ogg Vorbis, MP3 or WAV) to be able to listen to it in Jappix!"); ?></p>
451 <p><?php printf(T_("The file you want to upload must be smaller than %s."), formatBytes(uploadMaxSize()).''); ?></p>
454 <legend><?php _e("New"); ?></legend>
456 <input type="hidden" name="MAX_FILE_SIZE" value="<?php echo(uploadMaxSize().''); ?>">
458 <label for="music_title"><?php _e("Title"); ?></label><input id="music_title" class="icon manager-images" type="text" name="music_title" value="<?php echo(htmlspecialchars($music_title)); ?>" />
460 <label for="music_artist"><?php _e("Artist"); ?></label><input id="music_artist" class="icon manager-images" type="text" name="music_artist" value="<?php echo(htmlspecialchars($music_artist)); ?>" />
462 <label for="music_album"><?php _e("Album"); ?></label><input id="music_album" class="icon manager-images" type="text" name="music_album" value="<?php echo(htmlspecialchars($music_album)); ?>" />
464 <label for="music_file"><?php _e("File"); ?></label><input id="music_file" type="file" name="music_file" accept="audio/*" />
465 <label for="music_upload"><?php _e("Upload"); ?></label><input id="music_upload" type="submit" name="upload" value="<?php _e("Upload"); ?>" />
469 <legend><?php _e("Browse"); ?></legend>
474 // List the music files
475 browseFolder($music_folder, 'music');
482 // Authorized and design page requested
483 else if($id == 5) { ?>
484 <h3 class="design manager-images"><?php _e("Design"); ?></h3>
486 <p><?php _e("Jappix is fully customisable: you can change its design right here."); ?></p>
490 // Include the design configuration vars
491 include(JAPPIX_BASE.'/php/vars-design.php');
493 // Include the design configuration POST handler
494 include(JAPPIX_BASE.'/php/post-design.php');
496 // Include the design configuration reader
497 include(JAPPIX_BASE.'/php/read-design.php');
500 if(isset($_GET['b']) && isset($_GET['s']) && ($_GET['b'] == 'backgrounds'))
501 $backgrounds_folder = urldecode($_GET['s']);
505 <h4><?php _e("Logo"); ?></h4>
507 <p><?php _e("You can set your own service logo to replace the default one. Take care of the size and the main color of each logo!"); ?></p>
510 <p><?php _e("Upload each logo with the recommended maximum pixel size."); ?></p>
511 <p><?php _e("Your logo format must be PNG. Leave a field empty and the logo will not be changed."); ?></p>
513 <label for="logo_own_1_location">Jappix Desktop, <em>311×113</em></label><?php logoFormField('1', 'desktop_home'); ?>
514 <label for="logo_own_2_location">Jappix Desktop, <em>90×25</em></label><?php logoFormField('2', 'desktop_app'); ?>
515 <label for="logo_own_3_location">Jappix Mobile, <em>83×30</em></label><?php logoFormField('3', 'mobile'); ?>
516 <label for="logo_own_4_location">Jappix Mini, <em>81×22</em></label><?php logoFormField('4', 'mini'); ?>
518 <label for="logo_own_upload"><?php _e("Upload"); ?></label><input id="logo_own_upload" type="submit" name="logo_upload" value="<?php _e("Upload"); ?>" />
520 <div class="clear"></div>
523 <h4><?php _e("Background"); ?></h4>
525 <p><?php _e("Change your Jappix node background with this tool. You can either set a custom color or an uploaded image. Let your creativity flow!"); ?></p>
527 <label class="master" for="background_default"><input id="background_default" type="radio" name="background_type" value="default"<?php echo($background_default); ?> /><?php _e("Use default background"); ?></label>
529 <?php if($backgrounds_number) { ?>
530 <label class="master" for="background_image"><input id="background_image" type="radio" name="background_type" value="image"<?php echo($background_image); ?> /><?php _e("Use your own image"); ?></label>
533 <p><?php _e("Select a background to use and change the display options."); ?></p>
535 <label for="background_image_file"><?php _e("Image"); ?></label><select id="background_image_file" name="background_image_file">
538 // List the background files
539 foreach($backgrounds as $backgrounds_current) {
540 // Check this is the selected background
541 if($backgrounds_current == $background['image_file'])
542 $backgrounds_selected = ' selected=""';
544 $backgrounds_selected = '';
546 // Encode the current background name
547 $backgrounds_current = htmlspecialchars($backgrounds_current);
549 echo('<option value="'.$backgrounds_current.'"'.$backgrounds_selected.'>'.$backgrounds_current.'</option>');
555 <label for="background_image_repeat"><?php _e("Repeat"); ?></label><select id="background_image_repeat" name="background_image_repeat">
556 <option value="no-repeat"<?php echo($background_image_repeat_no); ?>><?php _e("No"); ?></option>
557 <option value="repeat"<?php echo($background_image_repeat_all); ?>><?php _e("All"); ?></option>
558 <option value="repeat-x"<?php echo($background_image_repeat_x); ?>><?php _e("Horizontal"); ?></option>
559 <option value="repeat-y"<?php echo($background_image_repeat_y); ?>><?php _e("Vertical"); ?></option>
562 <label for="background_image_horizontal"><?php _e("Horizontal"); ?></label><select id="background_image_horizontal" name="background_image_horizontal">
563 <option value="center"<?php echo($background_image_horizontal_center); ?>><?php _e("Center"); ?></option>
564 <option value="left"<?php echo($background_image_horizontal_left); ?>><?php _e("Left"); ?></option>
565 <option value="right"<?php echo($background_image_horizontal_right); ?>><?php _e("Right"); ?></option>
568 <label for="background_image_vertical"><?php _e("Vertical"); ?></label><select id="background_image_vertical" name="background_image_vertical">
569 <option value="center"<?php echo($background_image_vertical_center); ?>><?php _e("Center"); ?></option>
570 <option value="top"<?php echo($background_image_vertical_top); ?>><?php _e("Top"); ?></option>
571 <option value="bottom"<?php echo($background_image_vertical_bottom); ?>><?php _e("Bottom"); ?></option>
574 <label for="background_image_adapt"><?php _e("Adapt"); ?></label><input id="background_image_adapt" type="checkbox" name="background_image_adapt"<?php echo($background_image_adapt); ?> />
576 <label for="background_image_color"><?php _e("Color"); ?></label><input id="background_image_color" class="icon manager-images" type="color" name="background_image_color" value="<?php echo(htmlspecialchars($background['image_color'])); ?>" />
578 <div class="clear"></div>
582 <label class="master" for="background_color"><input id="background_color" type="radio" name="background_type" value="color"<?php echo($background_color); ?> /><?php _e("Use your own color"); ?></label>
585 <p><?php _e("Type the hexadecimal color value you want to use as a background."); ?></p>
587 <label for="background_color_color"><?php _e("Color"); ?></label><input id="background_color_color" class="icon manager-images" type="color" name="background_color_color" value="<?php echo(htmlspecialchars($background['color_color'])); ?>" />
589 <div class="clear"></div>
592 <h4><?php _e("Manage backgrounds"); ?></h4>
594 <p><?php _e("You can add a new background to the list with this tool. Please send a valid image."); ?></p>
597 <p><?php printf(T_("The file you want to upload must be smaller than %s."), formatBytes(uploadMaxSize()).''); ?></p>
599 <input type="hidden" name="MAX_FILE_SIZE" value="<?php echo(uploadMaxSize().''); ?>">
601 <label for="background_image_location"><?php _e("File"); ?></label><input id="background_image_location" type="file" name="background_image_upload" accept="image/*" />
602 <label for="background_image_upload"><?php _e("Upload"); ?></label><input id="background_image_upload" type="submit" name="background_upload" value="<?php _e("Upload"); ?>" />
604 <div class="clear"></div>
607 <p><?php _e("If you want to remove some backgrounds, use the browser below."); ?></p>
610 <legend><?php _e("List"); ?></legend>
615 // List the background files
616 browseFolder($backgrounds_folder, 'backgrounds');
622 <h4><?php _e("Notice"); ?></h4>
624 <p><?php _e("Define a homepage notice for all your users, such as a warn, an important message or an advert with this tool."); ?></p>
626 <label class="master" for="notice_none"><input id="notice_none" type="radio" name="notice_type" value="none"<?php echo($notice_none); ?> /><?php _e("None"); ?></label>
628 <label class="master" for="notice_simple"><input id="notice_simple" type="radio" name="notice_type" value="simple"<?php echo($notice_simple); ?> /><?php _e("Simple notice"); ?></label>
631 <p><?php _e("This notice only needs simple text to be displayed, but no code is allowed!"); ?></p>
634 <label class="master" for="notice_advanced"><input id="notice_advanced" type="radio" name="notice_type" value="advanced"<?php echo($notice_advanced); ?> /><?php _e("Advanced notice"); ?></label>
637 <p><?php _e("You can customize your notice with embedded HTML, CSS and JavaScript, but you need to code the style."); ?></p>
640 <div class="clear"></div>
642 <textarea class="notice-text" name="notice_text" rows="8" cols="60"><?php echo(htmlspecialchars($notice_text)); ?></textarea>
645 // Authorized and users page requested
646 else if($id == 6) { ?>
647 <h3 class="users manager-images"><?php _e("Users"); ?></h3>
649 <p><?php _e("You can define more than one administrator for this Jappix node. You can also change a password with this tool."); ?></p>
654 if(isset($_POST['add'])) {
655 // Include the users POST handler
656 include(JAPPIX_BASE.'/php/post-users.php');
659 <p class="info smallspace success"><?php _e("The user has been added!"); ?></p>
663 <p class="info smallspace fail"><?php _e("Oops, you missed something or the two passwords do not match!"); ?></p>
668 else if(isset($_POST['remove'])) {
669 // Initialize the match
670 $users_removed = false;
671 $users_remove = array();
673 // Try to get the users to remove
674 foreach($_POST as $post_key => $post_value) {
675 // Is it an admin user?
676 if(preg_match('/^admin_(.+)$/i', $post_key)) {
678 $users_removed = true;
680 // Push the value to the global array
681 array_push($users_remove, $post_value);
685 // Somebody has been removed
689 manageUsers('remove', $users_remove);
692 <p class="info smallspace success"><?php _e("The chosen users have been removed."); ?></p>
695 // Nobody has been removed
697 <p class="info smallspace fail"><?php _e("You must select one or more users to be removed!"); ?></p>
701 <h4><?php _e("Add"); ?></h4>
703 <p><?php _e("Add a new user with this tool, or change a password (type an existing username). Please submit a strong password!"); ?></p>
707 // Include the user add form
708 include(JAPPIX_BASE.'/php/form-users.php');
712 <h4><?php _e("Manage"); ?></h4>
714 <p><?php _e("Remove users with this tool. Note that you cannot remove an user if he is the only one remaining."); ?></p>
717 <legend><?php _e("List"); ?></legend>
730 // Authorized and updates page requested
731 else if($id == 7) { ?>
732 <h3 class="updates manager-images"><?php _e("Updates"); ?></h3>
734 <p><?php _e("Update your Jappix node with this tool, or check if a new one is available. Informations about the latest version are also displayed (in english)."); ?></p>
738 // Using developer mode (no need to update)?
739 if(isDeveloper()) { ?>
740 <h4><?php _e("Check for updates"); ?></h4>
742 <p class="info smallspace neutral"><?php printf(T_("You are using a development version of Jappix. Update it through our repository by executing: %s."), '<em>svn up</em>'); ?></p>
745 // New updates available?
746 else if(newUpdates($check_updates)) {
747 // Get the update informations
748 $update_infos = updateInformations();
750 // We can launch the update!
751 if(isset($_GET['p']) && ($_GET['p'] == 'update')) { ?>
752 <h4><?php _e("Update in progress"); ?></h4>
754 <?php if(processUpdate($update_infos['url'])) { ?>
755 <p class="info smallspace success"><?php _e("Jappix has been updated: you are now running the latest version. Have fun!"); ?></p>
757 <p class="info smallspace fail"><?php _e("The update has failed! Please try again later."); ?></p>
761 // We just show a notice
764 <h4><?php _e("Available updates"); ?></h4>
766 <a class="info smallspace fail" href="./?p=update<?php echo keepGet('(p|b|s)', false); ?>"><?php printf(T_("Your version is out to date. Update it now to %s by clicking here!"), '<em>'.$update_infos['id'].'</em>'); ?></a>
768 <h4><?php _e("What's new?"); ?></h4>
770 <div><?php echo $update_infos['description']; ?></div>
775 <h4><?php _e("Check for updates"); ?></h4>
777 <a class="info smallspace success" href="./?p=check<?php echo keepGet('(p|b|s)', false); ?>"><?php _e("Your version seems to be up to date, but you can check updates manually by clicking here."); ?></a>
781 // Not authorized, show the login form
783 <h3 class="login manager-images"><?php _e("Manager access"); ?></h3>
785 <p><?php _e("This is a restricted area: only the authorized users can manage this Jappix node."); ?></p>
786 <p><?php _e("Please use the form below to login to the administration panel."); ?></p>
787 <p><?php _e("To improve security, sessions are limited in time and when your browser will be closed, you will be logged out."); ?></p>
790 <legend><?php _e("Credentials"); ?></legend>
792 <label for="admin_name"><?php _e("User"); ?></label><input id="admin_name" class="icon manager-images" type="text" name="admin_name" value="<?php echo(htmlspecialchars($user)); ?>" required="" />
794 <label for="admin_password"><?php _e("Password"); ?></label><input id="admin_password" class="icon manager-images" type="password" name="admin_password" required="" />
800 if($logout_fired) { ?>
801 <p class="info bigspace success"><?php _e("You have been logged out. Goodbye!"); ?></p>
805 else if($login_fired) { ?>
806 <p class="info bigspace fail"><?php _e("Oops, you could not be recognized as a valid administrator. Check your credentials!"); ?></p>
809 // Remove the session
810 unset($_SESSION['jappix_user']);
811 unset($_SESSION['jappix_password']);
816 <div class="clear"></div>
819 <div id="manager-buttons">
820 <?php if($id == 0) { ?>
821 <input type="submit" name="login" value="<?php _e("Here we go!"); ?>" />
823 <?php } if($add_button) { ?>
824 <input type="submit" name="add" value="<?php _e("Add"); ?>" />
825 <?php } if($save_button) { ?>
826 <input type="submit" name="save" value="<?php _e("Save"); ?>" />
827 <?php } if($remove_button) { ?>
828 <input type="submit" name="remove" value="<?php _e("Remove"); ?>" />
831 <div class="clear"></div>
839 <!-- Jappix Manager <?php echo $version; ?> - An open social platform -->