Another Basic request.
Basically Just deletes Entries and Returns to the user after 7 Days.
Keeps Cmarket from cluttering up

First Add this SQL
ALTER TABLE `crystalmarket` ADD `timer` INT(11) NOT NULL DEFAULT 0;
Next Add This to cron_day.php
$db->query("UPDATE `crystalmarket` SET `timer`=`timer`+1");
Go to the bottom of cron_day and right above ?>
Add the Following
$remove = $db->query("SELECT `cmID`,`cmADDER`,`cmQTY` FROM `crystalmarket` WHERE `timer`>7");
while($take = $db->fetch_row($remove))
{
$db->query("UPDATE `users` SET `crystals`=`crystals`+{$take['cmQTY']} WHERE `userid`={$take['cmADDER']}");
$db->query("DELETE FROM `crystalmarket` WHERE `cmID`={$take['cmID']}");
}
Next you are going to want to open up cmarket.php
Find the query Where it inserts the values into crystalmarket table
Will look something like this.
$db->query("INSERT INTO crystalmarket VALUES ('', {$_POST['crystals']}, $userid, {$_POST['price']})");
Change to
$db->query("INSERT INTO crystalmarket VALUES ('', {$_POST['crystals']}, $userid, {$_POST['price']}), 0");
Save, Close.
This should be it, any problems post here.