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

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
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"));