| | Bitsand 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 General Public License for more | details. | | You should have received a copy of the GNU General Public License along with | Bitsand. If not, see <http://www.gnu.org/licenses/>. +---------------------------------------------------------------------------*/ include 'inc/inc_head_db.php'; include 'inc/inc_forms.php'; //Initialise error message $sWarn = ''; $db_prefix = DB_PREFIX; if ($_POST['btnSubmit'] != '' && CheckReferrer('ic_form.php')) { $sNameWarn = IC_Check(); //Character details - check if character exists $sql = "SELECT * FROM {$db_prefix}characters WHERE chPlayerID = {$PLAYER_ID}"; $result = ba_db_query($link, $sql); //If character does not exist insert a row so that UPDATE query will work if (ba_db_num_rows($result) == 0) { $sql = "INSERT INTO {$db_prefix}characters (chPlayerID) VALUES ({$PLAYER_ID})"; if (!ba_db_query($link, $sql)) { $sWarn = "There was a problem updating your IC details"; LogError("Error inserting player ID into characters table prior to running UPDATE query.\nPlayer ID: {$PLAYER_ID}"); } } elseif (ba_db_num_rows($result) > 1) { LogWarning("Multiple rows in characters table with player ID {$PLAYER_ID}"); } if ($_POST['selGroup'] == 'Other (enter name below)') { $sSelGroupName = '';
| FOR A PARTICULAR PURPOSE. See the GNU General Public License for more | details. | | You should have received a copy of the GNU General Public License along with | Bitsand. If not, see <http://www.gnu.org/licenses/>. +---------------------------------------------------------------------------*/ include '../inc/inc_head_db.php'; include '../inc/inc_admin.php'; include '../inc/inc_forms.php'; //Get player ID of player to be edited $admin_player_id = (int) $_GET['pid']; //Initialise error message $sWarn = ''; $db_prefix = DB_PREFIX; if ($_POST['btnSubmit'] != '' && CheckReferrer('admin_edit_ic.php')) { $sDataWarn = IC_Check(); if ($sDataWarn != '') { //Append warning to the IC Notes field if not already added $sNotes = ba_db_real_escape_string($link, $_POST['txtNotes']); if (stripos($sNotes, "Illegal set of skills entered") === False) { $sNotes .= "\nIllegal set of skills entered"; } } else { $sNotes = ba_db_real_escape_string($link, $_POST['txtNotes']); } //Character details - check if character exists $sql = "SELECT * FROM {$db_prefix}characters WHERE chPlayerID = {$admin_player_id}"; $result = ba_db_query($link, $sql); //If character does not exist insert a row so that UPDATE query will work if (ba_db_num_rows($result) == 0) { $sql = "INSERT INTO {$db_prefix}characters (chPlayerID) VALUES ({$admin_player_id})";