Skip to content

Commit

Permalink
Initial Commit
Browse files Browse the repository at this point in the history
  • Loading branch information
atrol committed Jun 19, 2015
0 parents commit 7d9509d
Show file tree
Hide file tree
Showing 1,242 changed files with 307,674 additions and 0 deletions.
47 changes: 47 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# Config files - v1.2.x config files - keep for convenience for dev machines switching branches
config_inc.php
custom_constants_inc.php
custom_functions_inc.php
custom_relationships_inc.php
custom_strings_inc.php
api/soap/mc_config_inc.php

# Config files
config/
mantis_offline.php

# Docbook builds
docbook/*/*/builddate
docbook/*/*/build
docbook/*/*/install
docbook/*/tmp
!docbook/Admin_Guide/*/config

# Build output
build/

# Untracked plugins
plugins/*
!plugins/MantisCoreFormatting
!plugins/MantisGraph
!plugins/XmlImportExport

# IDE/Editor temporary files
*~
*.swp
*.bak
.buildpath
.cache
.project
.settings
.idea/
*.kdev4
nbproject/

# IIS7
web.config
!library/securimage/web.config

#libraries
library/jpgraph
library/FirePHPCore
111 changes: 111 additions & 0 deletions account_delete.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
<?php
# MantisBT - A PHP based bugtracking system

# MantisBT is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 2 of the License, or
# (at your option) any later version.
#
# MantisBT is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with MantisBT. If not, see <http://www.gnu.org/licenses/>.

/**
* CALLERS
* This page is called from:
* - account_page.php
*
* EXPECTED BEHAVIOUR
* - Delete the currently logged in user account
* - Logout the current user
* - Redirect to the page specified in the logout_redirect_page config option
*
* CALLS
* This page conditionally redirects upon completion
*
* RESTRICTIONS & PERMISSIONS
* - User must be authenticated
* - allow_account_delete config option must be enabled
* @todo review form security tokens for this page
* @todo should page_top1 be before meta redirect?
*
* @package MantisBT
* @copyright Copyright 2000 - 2002 Kenzaburo Ito - [email protected]
* @copyright Copyright 2002 MantisBT Team - [email protected]
* @link http://www.mantisbt.org
*
* @uses core.php
* @uses access_api.php
* @uses authentication_api.php
* @uses config_api.php
* @uses constant_inc.php
* @uses current_user_api.php
* @uses form_api.php
* @uses helper_api.php
* @uses lang_api.php
* @uses print_api.php
* @uses user_api.php
*/

require_once( 'core.php' );
require_api( 'access_api.php' );
require_api( 'authentication_api.php' );
require_api( 'config_api.php' );
require_api( 'constant_inc.php' );
require_api( 'current_user_api.php' );
require_api( 'form_api.php' );
require_api( 'helper_api.php' );
require_api( 'lang_api.php' );
require_api( 'print_api.php' );
require_api( 'user_api.php' );

form_security_validate( 'account_delete' );

auth_ensure_user_authenticated();

current_user_ensure_unprotected();

# Only allow users to delete their own accounts if allow_account_delete = ON or
# the user has permission to manage user accounts.
if( OFF == config_get( 'allow_account_delete' ) &&
!access_has_global_level( config_get( 'manage_user_threshold' ) ) ) {
print_header_redirect( 'account_page.php' );
}

# check that we are not deleting the last administrator account
$t_admin_threshold = config_get_global( 'admin_site_threshold' );
if( current_user_is_administrator() &&
user_count_level( $t_admin_threshold ) <= 1 ) {
trigger_error( ERROR_USER_CHANGE_LAST_ADMIN, ERROR );
}

helper_ensure_confirmed( lang_get( 'confirm_delete_msg' ),
lang_get( 'delete_account_button' ) );

form_security_purge( 'account_delete' );

$t_user_id = auth_get_current_user_id();

auth_logout();

user_delete( $t_user_id );

html_page_top1();
html_page_top2a();

?>

<br />
<div>
<?php
echo lang_get( 'account_removed_msg' ) . '<br />';
print_bracket_link( config_get( 'logout_redirect_page' ), lang_get( 'proceed' ) );
?>
</div>

<?php
html_page_bottom1a();
59 changes: 59 additions & 0 deletions account_manage_columns_page.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
<?php
# MantisBT - A PHP based bugtracking system

# MantisBT is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 2 of the License, or
# (at your option) any later version.
#
# MantisBT is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with MantisBT. If not, see <http://www.gnu.org/licenses/>.

/**
* This page allows a user to manage the column api data stored in their profile.
*
* Users are presented with a list of available columns (fields). They mean then choose which types
* of field to include on the following types of pages:
* i) "View Issues Columns" - These are the fields displayed when viewing the list of bugs
* ii) "Print Issues Columns" - These are the fields that are included when printing out bug
* details.
* iii) "Export Issues Columns" - These are the list of fields included when exporting an issue from
* the bug tracker.
* Note: These are now shared between different types of exports - for example, the core MantisBT
* distribution can export to Excel and Word Documents.
*
* The settings defined here can be allocated to the current project, or All Projects. In addition,
* it is possible to copy the column configuration between different projects.
*
* @package MantisBT
* @copyright Copyright 2000 - 2002 Kenzaburo Ito - [email protected]
* @copyright Copyright 2002 MantisBT Team - [email protected]
* @link http://www.mantisbt.org
*
* @uses core.php
* @uses current_user_api.php
* @uses html_api.php
* @uses lang_api.php
*/

require_once( 'core.php' );
require_api( 'current_user_api.php' );
require_api( 'html_api.php' );
require_api( 'lang_api.php' );

html_page_top( lang_get( 'manage_columns_config' ) );

current_user_ensure_unprotected();

# Define constant that will be checked by the include page.
define( 'ACCOUNT_COLUMNS', true );

define( 'MANAGE_COLUMNS_INC_ALLOW', true );
include ( dirname( __FILE__ ) . '/manage_columns_inc.php' );

html_page_bottom();
Loading

0 comments on commit 7d9509d

Please sign in to comment.