示例#1
0
 * the Free Software Foundation, either version 3 of the License, or (at
 * 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);