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
$txt['user_ga_code'] = "Send GoogleAuthenticator to user by email";
$txt['send_ga_code'] = "Google Authenticator for user";
$txt['error_no_email'] = "This user has no email set!";
$txt['error_no_user'] = "No user found!";
$txt['email_ga_subject'] = "Your Google Authenticator flash code for Teampass";
$txt['email_ga_text'] = "Hello,<br><br>Please click this <a href='#link#'>LINK</a> and flash it with GoogleAuthenticator application to get your OTP credentials for Teampass.<br /><br />Cheers";
$txt['settings_attachments_encryption'] = "Enable encryption of Items attachments";
$txt['settings_attachments_encryption_tip'] = "THIS OPTION COULD BREAK EXISTING ATTACHMENTS, please read carefully the next. If enabled, Items attachments are stored encrypted on the server. The ecryption uses the SALT defined for Teampass. This requieres more server ressources. WARNING: once you change strategy, it is mandatory to run the script to adapt existing attachments. See tab 'Specific Actions'.";
$txt['admin_action_attachments_cryption'] = "Encrypt or Decrypt the Items attachments";
@@ -99,7 +92,7 @@
$txt['purge_log'] = "Purge logs from";
$txt['to'] = "to";
$txt['purge_now'] = "Purge Now!";
$txt['purge_done'] = "Purge done! Number of elements deleted: ";
$txt['purge_done'] = "The purge has been performed!<br />Number of elements deleted: ";
$txt['settings_upload_maxfilesize_tip'] = "Maximum file size you allow. It should be coherant with your server settings.";
$txt['settings_upload_docext_tip'] = "Document types. Indicate the file extensions allowed separated with a coma (,)";
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
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
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
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
@@ -613,7 +622,15 @@ function recursiveKeepassXML($xmlRoot, $xmlLevel = 0)
}
//create folder - if not exists at the same level
$data = $db->fetchRow("SELECT COUNT(*) FROM ".$pre."nested_tree WHERE nlevel = ".($folderLevel+$startPathLevel)." AND title = \"".$fold."\" AND parent_id = ".$parent_id);
//$data = $db->fetchRow("SELECT COUNT(*) FROM ".$pre."nested_tree WHERE nlevel = ".($folderLevel+$startPathLevel)." AND title = \"".$fold."\" AND parent_id = ".$parent_id);
$data = $db->queryCount(
"nested_tree",
array(
"nlevel" => intval($folderLevel+$startPathLevel),
"title" => $fold,
"parent_id" => intval(parent_id)
)
);
if ($data[0] == 0) {
//do query
$id = $db->queryInsert(
@@ -654,7 +671,18 @@ function recursiveKeepassXML($xmlRoot, $xmlLevel = 0)
$nbFoldersImported++;
} else {
//get forlder actual ID
$data = $db->fetchRow("SELECT id FROM ".$pre."nested_tree WHERE nlevel = '".($folderLevel+$startPathLevel)."' AND title = '".$fold."' AND parent_id = '".$parent_id."'");
// $data = $db->fetchRow("SELECT id FROM ".$pre."nested_tree WHERE nlevel = '".($folderLevel+$startPathLevel)."' AND title = '".$fold."' AND parent_id = '".$parent_id."'");
$row = $db->queryGetRow(
"nested_tree",
array(
"id"
),
array(
"nlevel" => intval($folderLevel+$startPathLevel),
"title" => $fold,
"parent_id" => intval($parent_id)
)
);
$id = $data[0];
}
@@ -705,8 +733,14 @@ function recursiveKeepassXML($xmlRoot, $xmlLevel = 0)
if (!empty($item[2])) {
//check if not exists
$data = $db->fetchRow("SELECT COUNT(*) FROM ".$pre."items WHERE id_tree = '".$foldersArray[$item[1]]['id']."' AND label = \"".$item[2]."\"");
//$data = $db->fetchRow("SELECT COUNT(*) FROM ".$pre."items WHERE id_tree = '".$foldersArray[$item[1]]['id']."' AND label = \"".$item[2]."\"");
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
$data_count = $db->fetchRow("SELECT COUNT(*) FROM ".$pre."items WHERE inactif = 0");
$whereArg = " AND i.id_tree=".$_POST['id'];
//$data_count = $db->fetchRow("SELECT COUNT(*) FROM ".$pre."items WHERE inactif = 0");
$data_count = $db->queryCount(
"items",
array(
"inactif" => "0"
)
);
$whereArg = " AND i.id_tree=".intval($_POST['id']);
}
if ($data_count[0] > 0 && empty($showError)) {
@@ -2106,7 +2140,17 @@
case"recup_complex":
if (isset($_POST['item_id']) && !empty($_POST['item_id'])) {
// Lock Item (if already locked), go back and warn
$dataTmp = $db->fetchRow("SELECT timestamp, user_id FROM ".$pre."items_edition WHERE item_id = '".$_POST['item_id']."'");//echo ">".$dataTmp[0];
// $dataTmp = $db->fetchRow("SELECT timestamp, user_id FROM ".$pre."items_edition WHERE item_id = '".$_POST['item_id']."'");//echo ">".$dataTmp[0];
$dataTmp = $db->queryGetRow(
"items_edition",
array(
"timestamp",
"user_id"
),
array(
"item_id" => intval($_POST['item_id'])
)
);
// If token is taken for this Item and delay is passed then delete it.
if (isset($_SESSION['settings']['delay_item_edition']) &&
@@ -2115,7 +2159,17 @@
) {
$db->query("DELETE FROM ".$pre."items_edition WHERE item_id = '".$_POST['item_id']."'");
//reload the previous data
$dataTmp = $db->fetchRow("SELECT timestamp, user_id FROM ".$pre."items_edition WHERE item_id = '".$_POST['item_id']."'");
// $dataTmp = $db->fetchRow("SELECT timestamp, user_id FROM ".$pre."items_edition WHERE item_id = '".$_POST['item_id']."'");
$dataTmp = $db->queryGetRow(
"items_edition",
array(
"timestamp",
"user_id"
),
array(
"item_id" => intval($_POST['item_id'])
)
);
}
// If edition by same user (and token not freed before for any reason, then update timestamp)
@@ -2143,7 +2197,17 @@
}
// Get required Complexity for this Folder
$data = $db->fetchRow("SELECT valeur FROM ".$pre."misc WHERE type='complex' AND intitule = '".$_POST['groupe']."'");
// $data = $db->fetchRow("SELECT valeur FROM ".$pre."misc WHERE type='complex' AND intitule = '".$_POST['groupe']."'");
$data = $db->queryGetRow(
"misc",
array(
"valeur"
),
array(
"intitule" => $_POST['groupe'],
"type" => "complex"
)
);
if (isset($data[0]) && (!empty($data[0]) || $data[0] == 0)) {
$complexity = $pwComplexity[$data[0]][1];
@@ -2211,7 +2275,18 @@
*/
case"delete_attached_file":
// Get some info before deleting
$data = $db->fetchRow("SELECT name,id_item,file FROM ".$pre."files WHERE id = '".$_POST['file_id']."'");
// $data = $db->fetchRow("SELECT name,id_item,file FROM ".$pre."files WHERE id = '".$_POST['file_id']."'");
$data = $db->queryGetRow(
"files",
array(
"name",
"id_item",
"file"
),
array(
"id" => intval($_POST['file_id'])
)
);
if (!empty($data[1])) {
// Delete from FILES table
$db->query("DELETE FROM ".$pre."files WHERE id = '".$_POST['file_id']."'");
@@ -2582,7 +2657,18 @@
* Check if Item has been changed since loaded
*/
case"is_item_changed":
$data = $db->fetchRow("SELECT date FROM ".$pre."log_items WHERE action = 'at_modification' AND id_item = '".$_POST['item_id']."' ORDER BY date DESC");
// $data = $db->fetchRow("SELECT date FROM ".$pre."log_items WHERE action = 'at_modification' AND id_item = '".$_POST['item_id']."' ORDER BY date DESC");
$data = $db->queryGetRow(
"log_items",
array(
"date"
),
array(
"action" => "at_modification",
"id_item" => intval($_POST['item_id'])
),
" ORDER BY date DESC"
);
// Check if it's in a personal folder. If yes, then force complexity overhead.
if ($data[0] > $_POST['timestamp']) {
echo'{ "modified" : "1" }';
@@ -2623,7 +2709,18 @@
functionrecupDroitCreationSansComplexite($groupe)
{
global$db, $pre;
$data = $db->fetchRow("SELECT bloquer_creation,bloquer_modification,personal_folder FROM ".$pre."nested_tree WHERE id = '".$groupe."'");
// $data = $db->fetchRow("SELECT bloquer_creation,bloquer_modification,personal_folder FROM ".$pre."nested_tree WHERE id = '".$groupe."'");
$data = $db->queryGetRow(
"nested_tree",
array(
"bloquer_creation",
"bloquer_modification",
"personal_folder"
),
array(
"id" => intval($groupe)
)
);
// Check if it's in a personal folder. If yes, then force complexity overhead.
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
$row = $db->query("SELECT anyone_can_modify, author_id FROM ".$pre."kb WHERE id = ".$id);
$ret = $db->fetchArray($row);
$ret = $db->queryGetArray(
"kb",
array(
"anyone_can_modify",
"author_id"
),
array(
"id" => intval($id)
)
);
if ($ret['anyone_can_modify'] == 1 || $ret['author_id'] == $_SESSION['user_id']) {
$manage_kb = true;
} else {
@@ -81,7 +100,13 @@ function utf8Urldecode($value)
}
if ($manage_kb == true) {
//Add category if new
$data = $db->fetchRow("SELECT COUNT(*) FROM ".$pre."kb_categories WHERE category = '".mysql_real_escape_string($category)."'");
//$data = $db->fetchRow("SELECT COUNT(*) FROM ".$pre."kb_categories WHERE category = '".mysql_real_escape_string($category)."'");
$data = $db->queryCount(
"kb_categories",
array(
"category" => $category
)
);
if ($data[0] == 0) {
$cat_id = $db->queryInsert(
"kb_categories",
@@ -155,15 +180,29 @@ function utf8Urldecode($value)
echo'[ { "error" : "key_not_conform" } ]';
break;
}
$row = $db->query(
"SELECT k.id as id, k.label as label, k.description as description, k.category_id as category_id, k.author_id as author_id, k.anyone_can_modify as anyone_can_modify,
u.login as login, c.category as category
FROM ".$pre."kb as k
INNER JOIN ".$pre."kb_categories as c ON (c.id = k.category_id)
INNER JOIN ".$pre."users as u ON (u.id = k.author_id)
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
$tmp = $db->fetchRow("SELECT COUNT(*) FROM ".$pre."roles_title WHERE title = '".mysql_real_escape_string(stripslashes($_POST['name']))."'");
//$tmp = $db->fetchRow("SELECT COUNT(*) FROM ".$pre."roles_title WHERE title = '".mysql_real_escape_string(stripslashes($_POST['name']))."'");
$tmp = $db->queryCount(
"roles_title",
array(
"title" => stripslashes($_POST['name'])
)
);
if ($tmp[0] == 0) {
$role_id = $db->queryInsert(
'roles_title',
@@ -79,7 +97,14 @@
#CASE editing a role
case"edit_role":
//Check if role already exist : No similar roles
$tmp = $db->fetchRow("SELECT COUNT(*) FROM ".$pre."roles_title WHERE id != '".$_POST['id']."' AND title = '".mysql_real_escape_string(stripslashes($_POST['title']))."'");
//$tmp = $db->fetchRow("SELECT COUNT(*) FROM ".$pre."roles_title WHERE id != '".$_POST['id']."' AND title = '".mysql_real_escape_string(stripslashes($_POST['title']))."'");
$tmp = $db->queryCount(
"roles_title",
array(
"title" => stripslashes($_POST['title']),
"id" => intval($_POST['id'])
)
);
if ($tmp[0] == 0) {
$db->queryUpdate(
"roles_title",
@@ -221,7 +246,14 @@
foreach ($arrRolesas$role) {
//check if this role has access or not
// if not then color is red; if yes then color is green
$count = $db->fetchRow("SELECT COUNT(*) FROM ".$pre."roles_values WHERE folder_id = ".$node->id." AND role_id = ".$role);
//$count = $db->fetchRow("SELECT COUNT(*) FROM ".$pre."roles_values WHERE folder_id = ".$node->id." AND role_id = ".$role);
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