All pastes #431745 Raw Edit

Anonymous

public text v1 · immutable
·published 2007-04-09 21:27 UTC
rendered paste body
<?php
/*======================================================================*\
|| #################################################################### ||
|| # vBulletin 3.5.4 - Licence Number VBF6BE1066
|| # ---------------------------------------------------------------- # ||
|| # Copyright ©2000-2006 Jelsoft Enterprises Ltd. All Rights Reserved. ||
|| # This file may not be redistributed in whole or significant part. # ||
|| # ---------------- VBULLETIN IS NOT FREE SOFTWARE ---------------- # ||
|| # http://www.vbulletin.com | http://www.vbulletin.com/license.html # ||
|| #################################################################### ||
\*======================================================================*/

// ######################## SET PHP ENVIRONMENT ###########################
error_reporting(E_ALL & ~E_NOTICE);
if (!is_object($vbulletin->db))
{
	exit;
}

// ########################################################################
// ######################### START MAIN SCRIPT ############################
// ########################################################################

$user = $vbulletin->db->query_read("SELECT * FROM " . TABLE_PREFIX . "user WHERE usergroupid=11 AND usergroupid=9 AND usergroupid=19");
while($users = $vbulletin->db->fetch_array($user))
{
$puid = $users['userid'];
$jmoins30 = time() - (30*86400);
$moisups = $vbulletin->db->query_read("SELECT sum(upload) AS tot FROM " . TABLE_PREFIX . "thread WHERE postuserid='$puid' AND dateline>='$jmoins30'");
$moisup = $vbulletin->db->fetch_array($moisups);
$cota = $moisup['tot'];
if ($cota>=2048)
{
$vbulletin->db->query_write("UPDATE " . TABLE_PREFIX . "user SET usergroupid='9' WHERE userid='$puid'");
} 
elseif ($cota>=7189)
{
$vbulletin->db->query_write("UPDATE " . TABLE_PREFIX . "user SET usergroupid='19' WHERE userid='$puid'");
}
elseif ($cota==0)
{
$vbulletin->db->query_write("UPDATE " . TABLE_PREFIX . "user SET usergroupid='11' WHERE userid='$puid'");
}
else
{
}
}

log_cron_action('Gestion Vip', $nextitem);


/*======================================================================*\
|| ####################################################################
|| # Downloaded: 20:28, Tue Feb 21st 2006
|| # CVS: $RCSfile: attachmentviews.php,v $ - $Revision: 1.26 $
|| ####################################################################
\*======================================================================*/
?>