DDDDec
Tongue Boxing Champion 2023
- May 30, 2017
- 411
- 253
PHP:
$enable = array(
"registerGift" => true
);
public function registerGift() {
global $db, $enable;
if ($enable['registerGift'] == true) {
$day = date('l');
$getGift = $db->prepare('SELECT * FROM cms_register_gift WHERE day = :day');
$getGift->bindParam(":day", $day);
$getGift->execute();
if ($getGift->RowCount() > 0) {
if ($getGift->RowCount() == 1) {
$getGift = $gift->fetch();
$giveGift = $db->prepare("INSERT INTO user_furni (furniture) VALUES (?)");
$giveGift->execute([$getGift]);
} else {
while ($getGift = $gift->fetch()) {
$giveGift = $db->prepare("INSERT INTO user_furni (furniture) VALUES (?)");
$giveGift->execute([$getGift]);
}
}
} else {
exit();
}
}
}