Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if ($act == 'save_cli_data') {
- $cli_id = (int)@$_POST['id'];
- $field = $mysqli -> real_escape_string(htmlspecialchars(@$_POST['field']));
- $value = $mysqli -> real_escape_string(htmlspecialchars(@$_POST['value']));
- $fields = array('login', 'name', 'pass', 'phone', 'email', 'grp', 'comment');
- $fields_permissions = array(
- 'login' => 'CLI_CH_LOGIN',
- 'name' => 'CLI_CH_NAME',
- 'pass' => 'CLI_CH_PASS',
- 'phone' => 'CLI_CH_PHONE',
- 'email' => 'CLI_CH_EMAIL',
- 'grp' => 'CLI_CH_GRP',
- 'comment' => 'CLI_CH_COMMENT'
- );
- if (in_array($field, $fields)) {
- $access_field = checkPerm($fields_permissions[$field], $perms) ? $field : false;
- if ($access_field) {
- // how to update mysql data row
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment