Beispiel #1
0
 * your option) any later version.
 * 
 * allocPSA 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 Affero General Public
 * License for more details.
 * 
 * You should have received a copy of the GNU Affero General Public License
 * along with allocPSA. If not, see <http://www.gnu.org/licenses/>.
*/
require_once "../alloc.php";
$permission = new permission();
$permissionID = $_POST["permissionID"] or $permissionID = $_GET["permissionID"];
if ($permissionID) {
    $permission->set_id($permissionID);
    $permission->select();
}
$actions_array = $_POST["actions_array"];
if (is_array($actions_array)) {
    $actions = 0;
    foreach ($actions_array as $k => $a) {
        $actions = $actions | $a;
    }
}
$permission->read_globals();
$permission->set_values();
if (!$permission->get_value("tableName")) {
    global $modules;
    $entities = array();
    reset($modules);
    while (list($module_name, $module) = each($modules)) {