Vergleich admin/modules/user/group_promotions.php - 1.6.0 - 1.6.6

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 6Zeile 6
 * Website: http://mybb.com
* License: http://mybb.com/about/license
*

 * Website: http://mybb.com
* License: http://mybb.com/about/license
*

 * $Id: group_promotions.php 4941 2010-05-15 18:17:38Z RyanGordon $

 * $Id: group_promotions.php 5297 2010-12-28 22:01:14Z Tomm $

 */

// Disallow direct access to this file for security reasons

 */

// Disallow direct access to this file for security reasons

Zeile 40Zeile 40
if($mybb->input['action'] == "disable")
{
$plugins->run_hooks("admin_user_group_promotions_disable");

if($mybb->input['action'] == "disable")
{
$plugins->run_hooks("admin_user_group_promotions_disable");

	
if(!trim($mybb->input['pid']))
{
flash_message($lang->error_no_promo_id, 'error');
admin_redirect("index.php?module=user-group_promotions");
}

$query = $db->simple_select("promotions", "*", "pid='".intval($mybb->input['pid'])."'");
$promotion = $db->fetch_array($query);

if(!$promotion['pid'])
{
flash_message($lang->error_invalid_promo_id, 'error');
admin_redirect("index.php?module=user-group_promotions");
}

$promotion = array(
"enabled" => 0
);
$db->update_query("promotions", $promotion, "pid = '{$mybb->input['pid']}'");

$plugins->run_hooks("admin_user_group_promotions_disable_commit");

// Log admin action
log_admin_action($promotion['pid'], $promotion['title']);

flash_message($lang->success_promo_disabled, 'success');
admin_redirect("index.php?module=user-group_promotions");
}
















if($mybb->input['no'])
{
admin_redirect("index.php?module=user-group_promotions");
}

if(!trim($mybb->input['pid']))
{
flash_message($lang->error_no_promo_id, 'error');
admin_redirect("index.php?module=user-group_promotions");
}

$query = $db->simple_select("promotions", "*", "pid='".intval($mybb->input['pid'])."'");
$promotion = $db->fetch_array($query);

if(!$promotion['pid'])
{
flash_message($lang->error_invalid_promo_id, 'error');
admin_redirect("index.php?module=user-group_promotions");
}

if($mybb->request_method == "post")
{
$promotion = array(
"enabled" => 0
);

$db->update_query("promotions", $promotion, "pid = '{$mybb->input['pid']}'");

$plugins->run_hooks("admin_user_group_promotions_disable_commit");

// Log admin action
log_admin_action($promotion['pid'], $promotion['title']);

flash_message($lang->success_promo_disabled, 'success');
admin_redirect("index.php?module=user-group_promotions");
}
else
{
$page->output_confirm_action("index.php?module=user-group_promotions&action=disable&pid={$promotion['pid']}", $lang->confirm_promo_disable);
}
}


if($mybb->input['action'] == "delete")
{
$plugins->run_hooks("admin_user_group_promotions_delete");

if($mybb->input['action'] == "delete")
{
$plugins->run_hooks("admin_user_group_promotions_delete");

Zeile 77Zeile 90
	if($mybb->input['no']) 
{
admin_redirect("index.php?module=user-group_promotions");

	if($mybb->input['no']) 
{
admin_redirect("index.php?module=user-group_promotions");

	} 

	}

	
if(!trim($mybb->input['pid']))
{

	
if(!trim($mybb->input['pid']))
{

Zeile 115Zeile 128
if($mybb->input['action'] == "enable")
{
$plugins->run_hooks("admin_user_group_promotions_enable");

if($mybb->input['action'] == "enable")
{
$plugins->run_hooks("admin_user_group_promotions_enable");

	








if(!verify_post_check($mybb->input['my_post_key']))
{
flash_message($lang->invalid_post_verify_key2, 'error');
admin_redirect("index.php?module=user-group_promotions");
}


	if(!trim($mybb->input['pid']))
{
flash_message($lang->error_no_promo_id, 'error');

	if(!trim($mybb->input['pid']))
{
flash_message($lang->error_no_promo_id, 'error');

Zeile 635Zeile 654
		$popup->add_item($lang->edit_promotion, "index.php?module=user-group_promotions&action=edit&pid={$promotion['pid']}");
if($promotion['enabled'] == 1)
{

		$popup->add_item($lang->edit_promotion, "index.php?module=user-group_promotions&action=edit&pid={$promotion['pid']}");
if($promotion['enabled'] == 1)
{

			$popup->add_item($lang->disable_promotion, "index.php?module=user-group_promotions&action=disable&pid={$promotion['pid']}");

			$popup->add_item($lang->disable_promotion, "index.php?module=user-group_promotions&action=disable&pid={$promotion['pid']}&my_post_key={$mybb->post_code}", "return AdminCP.deleteConfirmation(this, '{$lang->confirm_promo_disable}')");

		}
else
{

		}
else
{

			$popup->add_item($lang->enable_promotion, "index.php?module=user-group_promotions&action=enable&pid={$promotion['pid']}");

			$popup->add_item($lang->enable_promotion, "index.php?module=user-group_promotions&action=enable&pid={$promotion['pid']}&my_post_key={$mybb->post_code}");

		}
$popup->add_item($lang->delete_promotion, "index.php?module=user-group_promotions&action=delete&pid={$promotion['pid']}&my_post_key={$mybb->post_code}", "return AdminCP.deleteConfirmation(this, '{$lang->confirm_promo_deletion}')");
$table->construct_cell($popup->fetch(), array("class" => "align_center"));

		}
$popup->add_item($lang->delete_promotion, "index.php?module=user-group_promotions&action=delete&pid={$promotion['pid']}&my_post_key={$mybb->post_code}", "return AdminCP.deleteConfirmation(this, '{$lang->confirm_promo_deletion}')");
$table->construct_cell($popup->fetch(), array("class" => "align_center"));