Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Added management pages to manage languages (in the site tab)
- Added user management to management page in case of Db authentication git-svn-id: https://xerteonlinetoolkits.googlecode.com/svn/trunk@729 912cdd6b-5c7d-d5a7-a2ba-d0f0cdb91641
- Loading branch information
Showing
32 changed files
with
1,026 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<?php | ||
/** | ||
* Created by JetBrains PhpStorm. | ||
* User: tom | ||
* Date: 23-3-13 | ||
* Time: 10:26 | ||
* To change this template use File | Settings | File Templates. | ||
*/ | ||
|
||
define("AUTH_DB_DELETEUSER", "Delete"); | ||
define("AUTH_DB_CHANGEPASSWD", "Change password"); | ||
define("AUTH_DB_USERNAME", "Login name"); | ||
define("AUTH_DB_FIRSTNAME", "First name"); | ||
define("AUTH_DB_SURNAME", "Last name"); | ||
define("AUTH_DB_PASSWORD", "Password"); | ||
define("AUTH_DB_ADDUSER", "Create user"); | ||
define("AUTH_DB_USEREXISTS", "User already exists"); | ||
define("AUTH_DB_USERADDFAILED", "Error when adding user to the Db, do you have write permissions for MySQL?"); | ||
define("AUTH_DB_USERDELFAILED", "Error when deleting user from the Db, do you have write permissions for MySQL?"); | ||
define("AUTH_DB_CHANGEPASSWORDFAILED", "Error when changing the user password in the Db, do you have write permissions for MySQL?"); | ||
|
||
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
/** | ||
* Created with JetBrains PhpStorm. | ||
* User: tom | ||
* Date: 23-3-13 | ||
* Time: 11:16 | ||
* To change this template use File | Settings | File Templates. | ||
*/ | ||
var REMOVE_USER_PROMPT = "Are you sure you want to remove this user?"; |
18 changes: 18 additions & 0 deletions
18
languages/en-GB/library/Xerte/Authentication/Db/adduser.inc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<?php | ||
/** | ||
* Created by JetBrains PhpStorm. | ||
* User: tom | ||
* Date: 23-3-13 | ||
* Time: 12:06 | ||
* To change this template use File | Settings | File Templates. | ||
*/ | ||
|
||
define("AUTH_DB_ADDUSER_INVALIDUSERNAME", "Invalid username given."); | ||
define("AUTH_DB_ADDUSER_INVALIDFIRSTNAME", "Invalid first name given."); | ||
define("AUTH_DB_ADDUSER_INVALIDSURNAME", "Invalid last name given."); | ||
define("AUTH_DB_ADDUSER_INVALIDPASSWORD", "Empty password is not allowed."); | ||
define("AUTH_DB_ADDUSER_PASSWORDTOOSHORT", "Password needs to be at least 5 chars"); | ||
define("AUTH_DB_ADDUSER_FAILED", "Failed to add user:"); | ||
define("AUTH_DB_ADDUSER_SUCCEEDED", "User added successfully"); | ||
|
||
?> |
16 changes: 16 additions & 0 deletions
16
languages/en-GB/library/Xerte/Authentication/Db/changepassword.inc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<?php | ||
/** | ||
* Created by JetBrains PhpStorm. | ||
* User: tom | ||
* Date: 23-3-13 | ||
* Time: 13:34 | ||
* To change this template use File | Settings | File Templates. | ||
*/ | ||
|
||
define("AUTH_DB_CHANGEPASSWORD_INVALIDUSERNAME", "Invalid username given."); | ||
define("AUTH_DB_CHANGEPASSWORD_INVALIDPASSWORD", "Empty password is not allowed."); | ||
define("AUTH_DB_CHANGEPASSWORD_PASSWORDTOOSHORT", "Password needs to be at least 5 chars"); | ||
define("AUTH_DB_CHANGEPASSWORD_FAILED", "Failed to change password:"); | ||
define("AUTH_DB_CHANGEPASSWORD_SUCCEEDED", "Password is changed successfully"); | ||
|
||
?> |
14 changes: 14 additions & 0 deletions
14
languages/en-GB/library/Xerte/Authentication/Db/deluser.inc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<?php | ||
/** | ||
* Created by JetBrains PhpStorm. | ||
* User: tom | ||
* Date: 23-3-13 | ||
* Time: 13:25 | ||
* To change this template use File | Settings | File Templates. | ||
*/ | ||
|
||
define("AUTH_DB_DELUSER_INVALIDUSERNAME", "Invalid user name."); | ||
define("AUTH_DB_DELUSER_FAILED", "Deletion has failed.."); | ||
define("AUTH_DB_DELUSER_SUCCEEDED", "User is successfully deleted."); | ||
|
||
?> |
15 changes: 15 additions & 0 deletions
15
languages/en-GB/website_code/php/language/delete_language.inc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<?php | ||
/** | ||
* Created by JetBrains PhpStorm. | ||
* User: tom | ||
* Date: 22-3-13 | ||
* Time: 10:48 | ||
* To change this template use File | Settings | File Templates. | ||
*/ | ||
|
||
define("DELETE_LANGUAGE_SUCCEEDED", "Language definition successfully deleted: "); | ||
define("DELETE_LANGUAGE_FAILED", "Deletion of fanguage definition failed:\n"); | ||
define("DELETE_LANGUAGE_WRITABLE", " needs to be writeable. Cannot perform installation"); | ||
define("DELETE_LANGUAGE_INVALIDCODE", " No valid language code given!"); | ||
define("DELETE_LANGUAGE_UNABLE_TO_DELETE", " Unable to delete "); | ||
?> |
7 changes: 7 additions & 0 deletions
7
languages/en-GB/website_code/php/language/import_language.inc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<?php | ||
|
||
define("IMPORT_LANGUAGE_SUCCEEDED", "Language definition successfully installed: "); | ||
define("IMPORT_LANGUAGE_FAILED", "installation of language definition failed:\n"); | ||
define("IMPORT_LANGUAGE_WRITABLE", " needs to be writeable. Cannot perform installation"); | ||
define("IMPORT_LANGUAGE_NOVALIDZIP", " No valid language definition found in the file!"); | ||
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
/** | ||
* Created with JetBrains PhpStorm. | ||
* User: tom | ||
* Date: 23-3-13 | ||
* Time: 10:56 | ||
* To change this template use File | Settings | File Templates. | ||
*/ | ||
|
||
|
||
function authdb_ajax_send_prepare(url){ | ||
|
||
xmlHttp.open("post","library/Xerte/Authentication/Db/" + url,true); | ||
xmlHttp.onreadystatechange=authdb_stateChanged; | ||
xmlHttp.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); | ||
|
||
} | ||
|
||
/** | ||
* | ||
* Function folders properties state changed | ||
* This function handles all of the responses from the ajax queries | ||
* @version 1.0 | ||
* @author Patrick Lockley | ||
*/ | ||
|
||
function authdb_stateChanged(){ | ||
|
||
if (xmlHttp.readyState==4){ | ||
|
||
if(xmlHttp.responseText!=""){ | ||
|
||
document.getElementById('manage_auth_users').innerHTML = xmlHttp.responseText; | ||
|
||
} | ||
} | ||
} | ||
|
||
function delete_authDb_user() { | ||
if(setup_ajax()!=false){ | ||
var answer = confirm(REMOVE_USER_PROMPT); | ||
|
||
if(answer){ | ||
var url="deluser.php"; | ||
|
||
authdb_ajax_send_prepare(url); | ||
|
||
xmlHttp.send('username=' + encodeURIComponent(document.getElementById('authDb_list_user').value)); | ||
} | ||
|
||
} | ||
} | ||
|
||
function changepassword_authDb_user() { | ||
if(setup_ajax()!=false){ | ||
|
||
var url="changepassword.php"; | ||
|
||
authdb_ajax_send_prepare(url); | ||
|
||
var passwd = document.getElementById('authDb_changepassword').value; | ||
var encodedpasswd = encodeURIComponent(document.getElementById('authDb_changepassword').value); | ||
xmlHttp.send('username=' + encodeURIComponent(document.getElementById('authDb_list_user').value) + '&password=' + encodeURIComponent(document.getElementById('authDb_changepassword').value)); | ||
|
||
} | ||
} | ||
|
||
function add_authDb_user() { | ||
if(setup_ajax()!=false){ | ||
|
||
var url="adduser.php"; | ||
|
||
authdb_ajax_send_prepare(url); | ||
|
||
xmlHttp.send('username=' + encodeURIComponent(document.getElementById('authDb_username').value) + | ||
'&firstname=' + encodeURIComponent(document.getElementById('authDb_firstname').value) + | ||
'&surname=' + encodeURIComponent(document.getElementById('authDb_surname').value) + | ||
'&password=' + encodeURIComponent(document.getElementById('authDb_password').value)); | ||
|
||
} | ||
} |
Oops, something went wrong.