Zeile 1 | Zeile 1 |
---|
<?php /** * MyBB 1.6
|
<?php /** * MyBB 1.6
|
* Copyright � 2010 MyBB Group, All Rights Reserved
| * Copyright 2010 MyBB Group, All Rights Reserved
|
* * Website: http://mybb.com * License: http://mybb.com/about/license *
|
* * Website: http://mybb.com * License: http://mybb.com/about/license *
|
* $Id: group_promotions.php 5746 2012-02-03 10:03:25Z Tomm $
| * $Id$
|
*/
// Disallow direct access to this file for security reasons
| */
// Disallow direct access to this file for security reasons
|
Zeile 63 | Zeile 63 |
---|
if($mybb->request_method == "post") {
|
if($mybb->request_method == "post") {
|
$promotion = array(
| $update_promotion = array(
|
"enabled" => 0 );
|
"enabled" => 0 );
|
$db->update_query("promotions", $promotion, "pid = '{$mybb->input['pid']}'");
| $db->update_query("promotions", $update_promotion, "pid = '{$mybb->input['pid']}'");
|
$plugins->run_hooks("admin_user_group_promotions_disable_commit");
| $plugins->run_hooks("admin_user_group_promotions_disable_commit");
|
Zeile 150 | Zeile 150 |
---|
admin_redirect("index.php?module=user-group_promotions"); }
|
admin_redirect("index.php?module=user-group_promotions"); }
|
$promotion = array(
| $update_promotion = array(
|
"enabled" => 1 );
|
"enabled" => 1 );
|
$db->update_query("promotions", $promotion, "pid = '{$mybb->input['pid']}'");
| $db->update_query("promotions", $update_promotion, "pid = '{$mybb->input['pid']}'");
|
$plugins->run_hooks("admin_user_group_promotions_enable_commit");
| $plugins->run_hooks("admin_user_group_promotions_enable_commit");
|
Zeile 226 | Zeile 226 |
---|
{ $mybb->input['originalusergroup'] = implode(',', array_map('intval', $mybb->input['originalusergroup'])); }
|
{ $mybb->input['originalusergroup'] = implode(',', array_map('intval', $mybb->input['originalusergroup'])); }
|
| $allowed_operators = array('>', '>=', '=', '<=', '<'); $operator_fields = array('posttype', 'timeregisteredtype', 'reputationtype', 'referralstype');
foreach($operator_fields as $field) { if(!in_array($mybb->input[$field], $allowed_operators)) { $mybb->input[$field] = '='; } }
|
$update_promotion = array( "title" => $db->escape_string($mybb->input['title']), "description" => $db->escape_string($mybb->input['description']),
| $update_promotion = array( "title" => $db->escape_string($mybb->input['title']), "description" => $db->escape_string($mybb->input['description']),
|
Zeile 249 | Zeile 260 |
---|
$db->update_query("promotions", $update_promotion, "pid = '".intval($mybb->input['pid'])."'"); $plugins->run_hooks("admin_user_group_promotions_edit_commit");
|
$db->update_query("promotions", $update_promotion, "pid = '".intval($mybb->input['pid'])."'"); $plugins->run_hooks("admin_user_group_promotions_edit_commit");
|
|
|
// Log admin action log_admin_action($promotion['pid'], $mybb->input['title']);
|
// Log admin action log_admin_action($promotion['pid'], $mybb->input['title']);
|
|
|
flash_message($lang->success_promo_updated, 'success'); admin_redirect("index.php?module=user-group_promotions"); }
| flash_message($lang->success_promo_updated, 'success'); admin_redirect("index.php?module=user-group_promotions"); }
|
Zeile 272 | Zeile 283 |
---|
$form = new Form("index.php?module=user-group_promotions&action=edit", "post", "edit"); echo $form->generate_hidden_field("pid", $mybb->input['pid']); if($errors)
|
$form = new Form("index.php?module=user-group_promotions&action=edit", "post", "edit"); echo $form->generate_hidden_field("pid", $mybb->input['pid']); if($errors)
|
{
| {
|
$page->output_inline_error($errors); } else
| $page->output_inline_error($errors); } else
|
Zeile 411 | Zeile 422 |
---|
{ $mybb->input['originalusergroup'] = implode(',', array_map('intval', $mybb->input['originalusergroup'])); }
|
{ $mybb->input['originalusergroup'] = implode(',', array_map('intval', $mybb->input['originalusergroup'])); }
|
| $allowed_operators = array('>', '>=', '=', '<=', '<'); $operator_fields = array('posttype', 'timeregisteredtype', 'reputationtype', 'referralstype');
foreach($operator_fields as $field) { if(!in_array($mybb->input[$field], $allowed_operators)) { $mybb->input[$field] = '='; } }
|
$new_promotion = array( "title" => $db->escape_string($mybb->input['title']), "description" => $db->escape_string($mybb->input['description']),
| $new_promotion = array( "title" => $db->escape_string($mybb->input['title']), "description" => $db->escape_string($mybb->input['description']),
|