array('default' => 0))); $chkVersion = filter_input(INPUT_GET, 'version', FILTER_VALIDATE_INT, array('options' => array('default' => 0))); $chkMode = filter_input(INPUT_GET, 'mode', FILTER_SANITIZE_STRING); $chkUser = filter_input(INPUT_GET, 'user', FILTER_SANITIZE_STRING); $chkRights = filter_input(INPUT_GET, 'rights', FILTER_SANITIZE_STRING); $chkId = filter_input(INPUT_GET, 'id', FILTER_SANITIZE_STRING); $chkLinkTab = filter_input(INPUT_GET, 'linktab', FILTER_SANITIZE_STRING); if (substr_count($chkRights, '-')) { $arrRights = explode('-', $chkRights); $strRights = ''; if ($arrRights[0] == 1) { $strRights .= 'READ,'; } if ($arrRights[1] == 1) { $strRights .= 'WRITE,'; } if ($arrRights[2] == 1) { $strRights .= 'LINK,'; } if ($strRights != '') { $strRights = substr($strRights, 0, -1); } $chkRights = $strRights; } if (get_magic_quotes_gpc() == 0) { $chkUser = addslashes($chkUser); $chkRights = addslashes($chkRights); } // // Get datasets // ============ if ($chkLinkTab != '') { $strSQL = 'SELECT * FROM `tbl_user` LEFT JOIN `' .$chkLinkTab. '` ON `id`=`idSlave` ' . "WHERE `idMaster`=$chkDataId ORDER BY `username`"; $booReturn = $myDBClass->hasDataArray($strSQL, $arrDataLines, $intDataCount); // // Write data to session // ===================== if ($chkMode == '') { $_SESSION['groupuser'] = array(); if ($intDataCount != 0) { foreach ($arrDataLines as $elem) { $arrTemp['id'] = $elem['id']; $arrTemp['user'] = $elem['id']; $strRights = ''; if ($elem['read'] == 1) { $strRights .= 'READ,'; } if ($elem['write'] == 1) { $strRights .= 'WRITE,'; } if ($elem['link'] == 1) { $strRights .= 'LINK,'; } if ($strRights != '') { $strRights = substr($strRights, 0, -1); } $arrTemp['rights'] = $strRights; $arrTemp['status'] = 0; $_SESSION['groupuser'][] = $arrTemp; } } } } // // Add mode // ======== if ($chkMode == 'add') { if (isset($_SESSION['groupuser']) && is_array($_SESSION['groupuser'])) { $intCheck = 0; foreach ($_SESSION['groupuser'] as $key => $elem) { if (($elem['user'] == $chkUser) && ($elem['status'] == 0)) { $_SESSION['groupuser'][$key]['user'] = $chkUser; $_SESSION['groupuser'][$key]['rights'] = $chkRights; $intCheck = 1; } } if ($intCheck == 0) { $arrTemp['id'] = 0; $arrTemp['user'] = $chkUser; $arrTemp['rights'] = $chkRights; $arrTemp['status'] = 0; $_SESSION['groupuser'][] = $arrTemp; } } else { $arrTemp['id'] = 0; $arrTemp['user'] = $chkUser; $arrTemp['rights'] = $chkRights; $arrTemp['status'] = 0; $_SESSION['groupuser'] = array(); $_SESSION['groupuser'][] = $arrTemp; } } // // Deletion mode // ============= if ($chkMode == 'del' && isset($_SESSION['groupuser']) && is_array($_SESSION['groupuser'])) { foreach ($_SESSION['groupuser'] as $key => $elem) { if (($elem['user'] == $chkUser) && ($elem['status'] == 0)) { $_SESSION['groupuser'][$key]['status'] = 1; } } } ?> None getFieldData('SELECT `username` FROM `tbl_user` WHERE `id`=' .$elem['user']); ?>
<?php
                    echo translate('Delete'); ?>