Vergleich inc/tasks/promotions.php - 1.4.4 - 1.4.10

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 6Zeile 6
 * Website: http://www.mybboard.net
* License: http://www.mybboard.net/about/license
*

 * Website: http://www.mybboard.net
* License: http://www.mybboard.net/about/license
*

 * $Id: promotions.php 4265 2008-11-08 23:52:49Z Tikitiki $

 * $Id: promotions.php 4535 2009-11-25 06:23:38Z RyanGordon $

 */

function task_promotions($task)

 */

function task_promotions($task)

Zeile 22Zeile 22
		
// Based on the promotion generate criteria for user selection
$requirements = explode(',', $promotion['requirements']);

		
// Based on the promotion generate criteria for user selection
$requirements = explode(',', $promotion['requirements']);

		if(in_array('postcount', $requirements) && intval($promotion['posts']) > 0 && !empty($promotion['posttype']))

		if(in_array('postcount', $requirements) && intval($promotion['posts']) >= 0 && !empty($promotion['posttype']))

		{
$sql_where .= "{$and}postnum {$promotion['posttype']} '{$promotion['posts']}'";

$and = " AND ";
}


		{
$sql_where .= "{$and}postnum {$promotion['posttype']} '{$promotion['posts']}'";

$and = " AND ";
}


		if(in_array('reputation', $requirements) && intval($promotion['reputations']) > 0 && !empty($promotion['reputationtype']))

		if(in_array('reputation', $requirements) && intval($promotion['reputations']) >= 0 && !empty($promotion['reputationtype']))

		{
$sql_where .= "{$and}reputation {$promotion['reputationtype']} '{$promotion['reputations']}'";


		{
$sql_where .= "{$and}reputation {$promotion['reputationtype']} '{$promotion['reputations']}'";


Zeile 136Zeile 136
					$db->update_query("users", array('usergroup' => $promotion['newusergroup']), "uid IN(".implode(",", $uids).")");
}


					$db->update_query("users", array('usergroup' => $promotion['newusergroup']), "uid IN(".implode(",", $uids).")");
}


				$db->insert_query_multiple("promotionlogs", $log_inserts);




				if(!empty($log_inserts))
{
$db->insert_query_multiple("promotionlogs", $log_inserts);
}

				
$uids = array();
$log_inserts = array();

				
$uids = array();
$log_inserts = array();

Zeile 146Zeile 149
		if(count($uids) > 0)
{
if($usergroup_select == "usergroup")

		if(count($uids) > 0)
{
if($usergroup_select == "usergroup")

			{

			{

				$db->update_query("users", array('usergroup' => $promotion['newusergroup']), "uid IN(".implode(",", $uids).")");

				$db->update_query("users", array('usergroup' => $promotion['newusergroup']), "uid IN(".implode(",", $uids).")");

			}

			}

			

			

			$db->insert_query_multiple("promotionlogs", $log_inserts);




			if(!empty($log_inserts))
{
$db->insert_query_multiple("promotionlogs", $log_inserts);
}

				
$uids = array();
$log_inserts = array();

				
$uids = array();
$log_inserts = array();