View Single Post
nineteeneleven
Veteran Member
Join Date: Nov 2010
Old 11-09-2014 , 18:29   Re: Donation Control 3.1.0 [over 1000 donations served!]
Reply With Quote #451

Quote:
Originally Posted by jpwanabe View Post
Last question. I swear. I use chat color manager for my vips. But this uses it's own database for CC. How can I edit the remove_expired.php so that when it runs, it will check the database cccm for the correct steamid to remove?

This is what I use for my key donation removing.

Code:
<?php
include('db.class.php');
include('db2.class.php');
$db = new Database(*****','****','sourcebans');
$db2 = new databaseRemote('****','****','cccm');

$db->query("SELECT * FROM donations WHERE expire < NOW()");
$data = $db->resultset();
foreach ($data as $key => $value) {
    $db->query('DELETE FROM donations WHERE steam_id = ?')
		->bind(1,$value['steam_id'])
		->execute();
	$db->query('DELETE FROM sb_admins WHERE authid = ?')
		->bind(1,$value['steam_id'])
		->execute();
	
	$db2->query('DELETE FROM cccm_users WHERE auth = ?')
		->bind(1,$value['steam_id'])
		->execute();

	echo "removed - " . $value['steam_id'] . "\n";

}
echo "DONE!";
Im not sure what cccm is or how it works.l and usually dont provide support for 3rd party scripts.
__________________

Last edited by nineteeneleven; 11-09-2014 at 18:36.
nineteeneleven is offline