mirror of
				https://github.com/slawkens/myaac.git
				synced 2025-10-31 07:56:23 +01:00 
			
		
		
		
	 790d85a88a
			
		
	
	790d85a88a
	
	
	
		
			
			* Fix alert class name * feature: csrf protection * Cosmetics * Fix token generate * Admin Panel: changelogs csrf protection * news/id route * Refactor admin newses + add csrf * Use admin.links instead * Admin panel: Pages csrf * Menus: better csrf + add success message on reset colors * Plugins csrf * Move definitions * add info function, same as note($message) * Update mailer.php * Fix new page/news links * clear_cache & maintenance csrf * Formatting * Fix news type * Fix changelog link * Add new changelog link * More info to confirm dialog * This is always true
		
			
				
	
	
		
			27 lines
		
	
	
		
			606 B
		
	
	
	
		
			PHP
		
	
	
	
	
	
			
		
		
	
	
			27 lines
		
	
	
		
			606 B
		
	
	
	
		
			PHP
		
	
	
	
	
	
| <?php
 | |
| /**
 | |
|  * Login
 | |
|  *
 | |
|  * @package   MyAAC
 | |
|  * @author    Slawkens <slawkens@gmail.com>
 | |
|  * @copyright 2019 MyAAC
 | |
|  * @link      https://my-aac.org
 | |
|  */
 | |
| defined('MYAAC') or die('Direct access not allowed!');
 | |
| $title = 'Login';
 | |
| 
 | |
| csrfProtect();
 | |
| 
 | |
| require PAGES . 'account/login.php';
 | |
| if ($logged) {
 | |
| 	header('Location: ' . (admin() ? ADMIN_URL : BASE_URL));
 | |
| 	return;
 | |
| }
 | |
| 
 | |
| $twig->display('admin.login.html.twig', [
 | |
| 	'logout' => (ACTION == 'logout' ? 'You have  been logged out!'  : ''),
 | |
| 	'account' => USE_ACCOUNT_NAME ? 'Name' : 'Number',
 | |
| 	'account_login_by' => getAccountLoginByLabel(),
 | |
| 	'errors' => $errors ?? ''
 | |
| ]);
 |