Vergleich admin/modules/user/titles.php - 1.6.9 - 1.6.14

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 47Zeile 47
		if(!isset($mybb->input['posts']))
{
$errors[] = $lang->error_missing_posts;

		if(!isset($mybb->input['posts']))
{
$errors[] = $lang->error_missing_posts;

 
		}

$query = $db->simple_select("usertitles", "utid", "posts= '".intval($mybb->input['posts'])."'");
if($db->num_rows($query))
{
$errors[] = $lang->error_cannot_have_same_posts;

		}

if(!$errors)

		}

if(!$errors)

Zeile 59Zeile 65
			);

$utid = $db->insert_query("usertitles", $new_title);

			);

$utid = $db->insert_query("usertitles", $new_title);

			

			

			$cache->update_usertitles();

$plugins->run_hooks("admin_user_titles_add_commit");

			$cache->update_usertitles();

$plugins->run_hooks("admin_user_titles_add_commit");

Zeile 68Zeile 74
			log_admin_action($utid, $mybb->input['title'], $mybb->input['posts']);

flash_message($lang->success_user_title_created, 'success');

			log_admin_action($utid, $mybb->input['title'], $mybb->input['posts']);

flash_message($lang->success_user_title_created, 'success');

			admin_redirect("index.php?module=user-titles");
}

			admin_redirect("index.php?module=user-titles");
}

	}
else
{

	}
else
{

Zeile 77Zeile 83
			'stars' => '1',
'starimage' => '{theme}/star.gif',
);

			'stars' => '1',
'starimage' => '{theme}/star.gif',
);

	}

	}

	
$page->add_breadcrumb_item($lang->add_new_user_title);
$page->output_header($lang->user_titles." - ".$lang->add_new_user_title);

	
$page->add_breadcrumb_item($lang->add_new_user_title);
$page->output_header($lang->user_titles." - ".$lang->add_new_user_title);

	

	

	$page->output_nav_tabs($sub_tabs, 'add_title');
$form = new Form("index.php?module=user-titles&action=add", "post");

	$page->output_nav_tabs($sub_tabs, 'add_title');
$form = new Form("index.php?module=user-titles&action=add", "post");

	

if($errors)
{
$page->output_inline_error($errors);
}


	

if($errors)
{
$page->output_inline_error($errors);
}


	$form_container = new FormContainer($lang->add_new_user_title);
$form_container->output_row($lang->title_to_assign."<em>*</em>", $lang->title_to_assign_desc, $form->generate_text_box('title', $mybb->input['title'], array('id' => 'title')), 'title');
$form_container->output_row($lang->minimum_posts, $lang->minimum_posts_desc, $form->generate_text_box('posts', $mybb->input['posts'], array('id' => 'posts')), 'posts');

	$form_container = new FormContainer($lang->add_new_user_title);
$form_container->output_row($lang->title_to_assign."<em>*</em>", $lang->title_to_assign_desc, $form->generate_text_box('title', $mybb->input['title'], array('id' => 'title')), 'title');
$form_container->output_row($lang->minimum_posts, $lang->minimum_posts_desc, $form->generate_text_box('posts', $mybb->input['posts'], array('id' => 'posts')), 'posts');

Zeile 109Zeile 115
if($mybb->input['action'] == "edit")
{
$plugins->run_hooks("admin_user_titles_edit");

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

	
$query = $db->simple_select("usertitles", "*", "utid='".intval($mybb->input['utid'])."'");
$usertitle = $db->fetch_array($query);

	
$query = $db->simple_select("usertitles", "*", "utid='".intval($mybb->input['utid'])."'");
$usertitle = $db->fetch_array($query);


if(!$usertitle['utid'])


if(!$usertitle['utid'])

	{

	{

		flash_message($lang->error_invalid_user_title, 'error');
admin_redirect("index.php?module=user-titles");
}

		flash_message($lang->error_invalid_user_title, 'error');
admin_redirect("index.php?module=user-titles");
}





	if($mybb->request_method == "post")
{
if(!trim($mybb->input['title']))

	if($mybb->request_method == "post")
{
if(!trim($mybb->input['title']))

		{

		{

			$errors[] = $lang->error_missing_title;
}


			$errors[] = $lang->error_missing_title;
}


		if(!isset($mybb->input['posts']))







		if(!isset($mybb->input['posts']))
{
$errors[] = $lang->error_missing_posts;
}

$query = $db->simple_select("usertitles", "utid", "posts= '".intval($mybb->input['posts'])."' AND utid!= '".intval($mybb->input['utid'])."'");
if($db->num_rows($query))

		{

		{

			$errors[] = $lang->error_missing_posts;

			$errors[] = $lang->error_cannot_have_same_posts;

		}

if(!$errors)

		}

if(!$errors)

Zeile 152Zeile 164
			flash_message($lang->success_user_title_updated, 'success');
admin_redirect("index.php?module=user-titles");
}

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

	}


	}


	$page->add_breadcrumb_item($lang->edit_user_title);
$page->output_header($lang->user_titles." - ".$lang->edit_user_title);

	$page->add_breadcrumb_item($lang->edit_user_title);
$page->output_header($lang->user_titles." - ".$lang->edit_user_title);

	

	

	$sub_tabs['edit_title'] = array(
'title' => $lang->edit_user_title,
'link' => "index.php?module=user-titles&amp;action=edit&amp;uid=".$mybb->input['uid'],

	$sub_tabs['edit_title'] = array(
'title' => $lang->edit_user_title,
'link' => "index.php?module=user-titles&amp;action=edit&amp;uid=".$mybb->input['uid'],

Zeile 174Zeile 186
	else
{
$mybb->input = $usertitle;

	else
{
$mybb->input = $usertitle;

	}

	}


$form_container = new FormContainer($lang->edit_user_title);
$form_container->output_row($lang->title_to_assign."<em>*</em>", $lang->title_to_assign_desc, $form->generate_text_box('title', $mybb->input['title'], array('id' => 'title')), 'title');


$form_container = new FormContainer($lang->edit_user_title);
$form_container->output_row($lang->title_to_assign."<em>*</em>", $lang->title_to_assign_desc, $form->generate_text_box('title', $mybb->input['title'], array('id' => 'title')), 'title');

Zeile 217Zeile 229
		
$plugins->run_hooks("admin_user_titles_delete_commit");


		
$plugins->run_hooks("admin_user_titles_delete_commit");


 
		$cache->update_usertitles();


		// Log admin action
log_admin_action($usertitle['utid'], $usertitle['title'], $usertitle['posts']);


		// Log admin action
log_admin_action($usertitle['utid'], $usertitle['title'], $usertitle['posts']);