'; $message .= __( 'Pimp my Log is not configured.'); $message .= '

'; $message .= ' '; $message .= sprintf( __( 'You can manually copy cfg/config.example.php to %s in the root directory and change parameters. Then refresh this page.' ) , '' . CONFIG_FILE_NAME . '' ); $message .= '

'; $message .= ' '; $message .= __( 'Or let me try to configure it for you!' ); $message .= '

'; if ( SUHOSIN_LOADED === true ) { $message .= '
'; $message .= sprintf( __('Suhosin extension is loaded, according to its configuration, Pimp My Log could not run normally... More information %shere%s.') , '' , '' ); $message .= '
'; $message .= '

'; } $link_url = 'inc/configure.php?' . $_SERVER['QUERY_STRING']; $link_msg = __('Configure now'); include_once 'inc/error.inc.php'; die(); } /* |-------------------------------------------------------------------------- | Load config and constants |-------------------------------------------------------------------------- | */ list( $badges , $files ) = config_load(); /* |-------------------------------------------------------------------------- | Login |-------------------------------------------------------------------------- | */ $current_user = Sentinel::attempt( $files ); /* |-------------------------------------------------------------------------- | Check configuration |-------------------------------------------------------------------------- | */ $errors = config_check( $files ); if ( $errors === false ) { $title = __( 'Oups!' ); $message = '
'; $message .= __( 'Your access is disabled, you cannot view any log file.' ); $message .= '
'; $message .= __( 'Please contact your administrator.' ); $message .= '

'; $link_url = '?signout&l=' . $locale; $link_msg = __('Sign out'); include_once 'inc/error.inc.php'; die(); } if ( is_array( $errors ) ) { $title = __( 'Oups!' ); $message = '
'; $message .= __( 'config.user.json configuration file is buggy:' ) . ''; $message .= '
'; $message .= __( 'If you want me to build the configuration for you, please remove file config.user.json at root and click below.' ); $message .= '

'; $link_url = 'inc/configure.php?' . $_SERVER['QUERY_STRING']; $link_msg = __('Configure now'); include_once 'inc/error.inc.php'; die(); } /* |-------------------------------------------------------------------------- | Javascript lemma |-------------------------------------------------------------------------- | */ $lemma = array( 'action' => __( 'Action' ), 'addadmin' => __( 'Add admin' ), 'adduser' => __( 'Add user' ), 'all_access' => __( 'All accesses granted' ), 'anonymous_ok' => __( 'Anonymous access has been successfully saved!' ), 'authlogerror' => __( 'There is no log to display and your are connected... It seems that global parameter AUTH_LOG_FILE_COUNT is set to 0. Change this parameter to a higher value to display logs.' ), 'changepwd' => __( 'Password changed' ), 'createdby' => __( 'Created by' ), 'creationdate' => __( 'Created at' ), 'date' => __( 'Date' ), 'deleteuser' => __( 'Delete user' ), 'display_log' => __( '1 log displayed,' ), 'display_nlogs' => __( '%s logs displayed,' ), 'error' => __( 'An error occurs!' ), 'form_invalid' => __( 'Form is invalid:' ), 'ip' => __( 'IP' ), 'lastlogin' => __( 'Last login' ), 'loadmore' => __( 'Still %s to load'), 'logincount' => __( 'Logins' ), 'new_log' => __( '1 new log is available' ), 'new_logs' => __( 'New logs are available' ), 'new_nlogs' => __( '%s new logs are available' ), 'no_log' => __( 'No log has been found.' ), 'notification_deny' => __( 'Notifications are denied for this site. Go to your browser preferences to enable notifications for this site.' ), 'profile_ok' => __( 'Your profile has been successfully saved!' ), 'reallydeleteuser' => __( 'Confirm' ), 'reallysigninuser' => __( 'Confirm' ), 'regex_invalid' => __( 'Search was done with regular engine' ), 'regex_valid' => __( 'Search was done with RegEx engine' ), 'resultcopied' => __( 'Result copied!' ), 'roles' => __( 'Roles' ), 'search_no_regex' => __( 'No log has been found with Reg Ex search %s' ), 'search_no_regular' => __( 'No log has been found with regular search %s' ), 'signin' => __( 'Sign in' ), 'signinas' => __( 'Sign in as' ), 'signinerr' => __( 'Sign in error' ), 'signinuser' => __('Sign in as'), 'signout' => __( 'Sign out' ), 'system' => __( 'System' ), 'toggle_column' => __( 'Toggle column %s' ), 'urlcopied' => __( 'URL copied!' ), 'user' => __( 'User' ), 'user_add_ok' => __( 'User has been successfully saved!' ), 'user_api_lastlogin' => __( 'Last API call' ), 'user_api_logincount' => __( 'API calls' ), 'user_at' => __( 'Access token' ), 'user_cb' => __( 'Created by' ), 'user_cd' => __( 'Created at' ), 'user_delete_ok' => __( 'User has been successfully deleted!' ), 'user_hp' => __( 'Presalt key' ), 'user_lastlogin' => __( 'Last login' ), 'user_logincount' => __( 'Logins' ), 'user_logs' => __( 'Log access' ), 'user_roles' => __( 'Roles' ), 'useragent' => __( 'User agent' ), 'username' => __( 'User name' ), 'users' => __( 'Users' ), 'youhavebeendisconnected' => __( 'You need to sign in' ), ); /* |-------------------------------------------------------------------------- | Session |-------------------------------------------------------------------------- | */ $csrf = csrf_get(); /* |-------------------------------------------------------------------------- | HTML |-------------------------------------------------------------------------- | */ ?><?php echo TITLE;?>'; echo file_get_contents( PML_CONFIG_BASE . DIRECTORY_SEPARATOR . 'css' . DIRECTORY_SEPARATOR . 'config.inc.user.css' ); echo ''; } else { echo ''; } ?>
' . sprintf( __('Welcome in version %s') , $infos['v'] ) . ''; if ( isset( $infos['welcome'] ) ) { $print .= '
' . $infos['welcome'] . '
'; } $print .= '
'; $print .= sprintf( __('The changelog and all informations about this version are available on the %sblog%s.') , '' , '' ); ?>