AvocadoAmber/AvocadoEdition_Light/skin/board/character/proc/set_body.php

24 lines
579 B
PHP

<?php
include_once "./_common.php";
// 권한 확인
if(!$is_admin) {
if($member['mb_id'] && $write['mb_id'] == $member['mb_id']) {
exit;
} else if ($member['mb_level'] < $board['bo_write_level']) {
exit;
}
}
/**
* @var string|int $bd_id
*/
sql_query("UPDATE {$g5['character_body_table']} SET bd_use = '' where wr_id = '{$wr_id}'");
$bd = sql_fetch("SELECT * FROM {$g5['character_body_table']} where bd_id = '{$bd_id}'");
if($bd['bd_id']) {
$sql = " update {$g5['character_body_table']}
set bd_use = '1'
where bd_id = '{$bd['bd_id']}'";
sql_query($sql);
}