Vergleich admin/modules/user/titles.php - 1.6.13 - 1.6.18

  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: titles.php 5828 2012-05-08 16:06:16Z Tomm $

 * $Id$

 */

// Disallow direct access to this file for security reasons

 */

// Disallow direct access to this file for security reasons

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");

// Log admin action

			$cache->update_usertitles();

$plugins->run_hooks("admin_user_titles_add_commit");

// Log admin action

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

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


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


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

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

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

	else
{
$mybb->input = array(

	else
{
$mybb->input = array(

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 147Zeile 159
			$plugins->run_hooks("admin_user_titles_edit_commit");

// Log admin action

			$plugins->run_hooks("admin_user_titles_edit_commit");

// Log admin action

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

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

			
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");

Zeile 159Zeile 171
	
$sub_tabs['edit_title'] = array(
'title' => $lang->edit_user_title,

	
$sub_tabs['edit_title'] = array(
'title' => $lang->edit_user_title,

		'link' => "index.php?module=user-titles&action=edit&uid=".$mybb->input['uid'],

		'link' => "index.php?module=user-titles&action=edit&utid=".$usertitle['uid'],

		'description' => $lang->edit_user_title_desc
);


		'description' => $lang->edit_user_title_desc
);


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->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->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->output_row($lang->minimum_posts, $lang->minimum_posts_desc, $form->generate_text_box('posts', $mybb->input['posts'], array('id' => 'posts')), 'posts');

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

		log_admin_action($usertitle['utid'], $usertitle['title'], $usertitle['posts']);

		log_admin_action($usertitle['utid'], htmlspecialchars_uni($usertitle['title']), $usertitle['posts']);


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


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