Vergleich admin/modules/tools/tasks.php - 1.6.2 - 1.6.13

  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: tasks.php 5016 2010-06-12 00:24:02Z RyanGordon $

 * $Id$

 */

// Disallow direct access to this file for security reasons

 */

// Disallow direct access to this file for security reasons

Zeile 349Zeile 349
			
if($enable_confirmation == true)
{

			
if($enable_confirmation == true)
{

				admin_redirect("index.php?module=tools-tasks&action=enable&tid={$task['tid']}&my_post_key={$mybb->post_code}");

				admin_redirect("index.php?module=tools-tasks&action=enable&tid={$task['tid']}&my_post_key={$mybb->post_code}");

			}
else
{

			}
else
{

Zeile 386Zeile 386
	$form_container = new FormContainer($lang->edit_task);
echo $form->generate_hidden_field("tid", $task['tid']);
$form_container->output_row($lang->title." <em>*</em>", "", $form->generate_text_box('title', $task_data['title'], array('id' => 'title')), 'title');

	$form_container = new FormContainer($lang->edit_task);
echo $form->generate_hidden_field("tid", $task['tid']);
$form_container->output_row($lang->title." <em>*</em>", "", $form->generate_text_box('title', $task_data['title'], array('id' => 'title')), 'title');

	$form_container->output_row($lang->short_description, "", $form->generate_text_box('description', $task_data['description'], array('id' => 'description')), 'description');

	$form_container->output_row($lang->short_description." <em>*</em>", "", $form->generate_text_box('description', $task_data['description'], array('id' => 'description')), 'description');


$task_list = array();
$task_files = scandir(MYBB_ROOT."inc/tasks/");


$task_list = array();
$task_files = scandir(MYBB_ROOT."inc/tasks/");

Zeile 398Zeile 398
			$task_list[$file_id] = $task_file;
}
}

			$task_list[$file_id] = $task_file;
}
}

	$form_container->output_row($lang->task." <em>*</em>", $lang->task_desc, $form->generate_select_box("file", $task_list, $task_data['file'], array('id' => 'file')), 'file');

	$form_container->output_row($lang->task." <em>*</em>", $lang->task_file_desc, $form->generate_select_box("file", $task_list, $task_data['file'], array('id' => 'file')), 'file');

	$form_container->output_row($lang->time_minutes, $lang->time_minutes_desc, $form->generate_text_box('minute', $task_data['minute'], array('id' => 'minute')), 'minute');
$form_container->output_row($lang->time_hours, $lang->time_hours_desc, $form->generate_text_box('hour', $task_data['hour'], array('id' => 'hour')), 'hour');
$form_container->output_row($lang->time_days_of_month, $lang->time_days_of_month_desc, $form->generate_text_box('day', $task_data['day'], array('id' => 'day')), 'day');

	$form_container->output_row($lang->time_minutes, $lang->time_minutes_desc, $form->generate_text_box('minute', $task_data['minute'], array('id' => 'minute')), 'minute');
$form_container->output_row($lang->time_hours, $lang->time_hours_desc, $form->generate_text_box('hour', $task_data['hour'], array('id' => 'hour')), 'hour');
$form_container->output_row($lang->time_days_of_month, $lang->time_days_of_month_desc, $form->generate_text_box('day', $task_data['day'], array('id' => 'day')), 'day');

Zeile 502Zeile 502
	}
else
{

	}
else
{

		$plugins->run_hooks("admin_tools_tasks_enable");

		$plugins->run_hooks("admin_tools_tasks_disable");

	}

$query = $db->simple_select("tasks", "*", "tid='".intval($mybb->input['tid'])."'");

	}

$query = $db->simple_select("tasks", "*", "tid='".intval($mybb->input['tid'])."'");

Zeile 521Zeile 521
		{
// User clicked no
if($mybb->input['no'])

		{
// User clicked no
if($mybb->input['no'])

			{

			{

				admin_redirect("index.php?module=tools-tasks");
}


				admin_redirect("index.php?module=tools-tasks");
}


Zeile 532Zeile 532
				$cache->update_tasks();

$plugins->run_hooks("admin_tools_tasks_enable_commit");

				$cache->update_tasks();

$plugins->run_hooks("admin_tools_tasks_enable_commit");

				

				

				// Log admin action
log_admin_action($task['tid'], $task['title'], $mybb->input['action']);


				// Log admin action
log_admin_action($task['tid'], $task['title'], $mybb->input['action']);


Zeile 563Zeile 563
	{
$db->update_query("tasks", array("enabled" => 0), "tid='{$task['tid']}'");
$cache->update_tasks();

	{
$db->update_query("tasks", array("enabled" => 0), "tid='{$task['tid']}'");
$cache->update_tasks();

		

		

		$plugins->run_hooks("admin_tools_tasks_disable_commit");

// Log admin action
log_admin_action($task['tid'], $task['title'], $mybb->input['action']);

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

		$plugins->run_hooks("admin_tools_tasks_disable_commit");

// Log admin action
log_admin_action($task['tid'], $task['title'], $mybb->input['action']);

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

		admin_redirect("index.php?module=tools-tasks");
}

		admin_redirect("index.php?module=tools-tasks");
}

}

if($mybb->input['action'] == "run")

}

if($mybb->input['action'] == "run")

Zeile 579Zeile 579
	if(!verify_post_check($mybb->input['my_post_key']))
{
flash_message($lang->invalid_post_verify_key2, 'error');

	if(!verify_post_check($mybb->input['my_post_key']))
{
flash_message($lang->invalid_post_verify_key2, 'error');

		admin_redirect("index.php?module=tools-tasks");

		admin_redirect("index.php?module=tools-tasks");

	}

ignore_user_abort(true);

	}

ignore_user_abort(true);

Zeile 594Zeile 594
	{
flash_message($lang->error_invalid_task, 'error');
admin_redirect("index.php?module=tools-tasks");

	{
flash_message($lang->error_invalid_task, 'error');
admin_redirect("index.php?module=tools-tasks");

	}

	}

	
run_task($task['tid']);


	
run_task($task['tid']);


Zeile 718Zeile 718
	$table->construct_header($lang->task);
$table->construct_header($lang->next_run, array("class" => "align_center", "width" => 200));
$table->construct_header($lang->controls, array("class" => "align_center", "width" => 150));

	$table->construct_header($lang->task);
$table->construct_header($lang->next_run, array("class" => "align_center", "width" => 200));
$table->construct_header($lang->controls, array("class" => "align_center", "width" => 150));





	$query = $db->simple_select("tasks", "*", "", array("order_by" => "title", "order_dir" => "asc"));
while($task = $db->fetch_array($query))
{
$task['title'] = htmlspecialchars_uni($task['title']);
$task['description'] = htmlspecialchars_uni($task['description']);
$next_run = date($mybb->settings['dateformat'], $task['nextrun']).", ".date($mybb->settings['timeformat'], $task['nextrun']);

	$query = $db->simple_select("tasks", "*", "", array("order_by" => "title", "order_dir" => "asc"));
while($task = $db->fetch_array($query))
{
$task['title'] = htmlspecialchars_uni($task['title']);
$task['description'] = htmlspecialchars_uni($task['description']);
$next_run = date($mybb->settings['dateformat'], $task['nextrun']).", ".date($mybb->settings['timeformat'], $task['nextrun']);

		if($task['enabled'] == 1)
{

		if($task['enabled'] == 1)
{

			$icon = "<img src=\"styles/{$page->style}/images/icons/bullet_on.gif\" alt=\"({$lang->alt_enabled})\" title=\"{$lang->alt_enabled}\"  style=\"vertical-align: middle;\" /> ";

			$icon = "<img src=\"styles/{$page->style}/images/icons/bullet_on.gif\" alt=\"({$lang->alt_enabled})\" title=\"{$lang->alt_enabled}\"  style=\"vertical-align: middle;\" /> ";

		}
else
{

		}
else
{

			$icon = "<img src=\"styles/{$page->style}/images/icons/bullet_off.gif\" alt=\"({$lang->alt_disabled})\" title=\"{$lang->alt_disabled}\"  style=\"vertical-align: middle;\" /> ";
}
$table->construct_cell("<div class=\"float_right\"><a href=\"index.php?module=tools-tasks&amp;action=run&amp;tid={$task['tid']}&amp;my_post_key={$mybb->post_code}\"><img src=\"styles/{$page->style}/images/icons/run_task.gif\" title=\"{$lang->run_task_now}\" alt=\"{$lang->run_task}\" /></a></div><div>{$icon}<strong><a href=\"index.php?module=tools-tasks&amp;action=edit&amp;tid={$task['tid']}\">{$task['title']}</a></strong><br /><small>{$task['description']}</small></div>");

			$icon = "<img src=\"styles/{$page->style}/images/icons/bullet_off.gif\" alt=\"({$lang->alt_disabled})\" title=\"{$lang->alt_disabled}\"  style=\"vertical-align: middle;\" /> ";
}
$table->construct_cell("<div class=\"float_right\"><a href=\"index.php?module=tools-tasks&amp;action=run&amp;tid={$task['tid']}&amp;my_post_key={$mybb->post_code}\"><img src=\"styles/{$page->style}/images/icons/run_task.gif\" title=\"{$lang->run_task_now}\" alt=\"{$lang->run_task}\" /></a></div><div>{$icon}<strong><a href=\"index.php?module=tools-tasks&amp;action=edit&amp;tid={$task['tid']}\">{$task['title']}</a></strong><br /><small>{$task['description']}</small></div>");

Zeile 750Zeile 750
		$table->construct_cell($popup->fetch(), array("class" => "align_center"));
$table->construct_row();
}

		$table->construct_cell($popup->fetch(), array("class" => "align_center"));
$table->construct_row();
}

 

if($table->num_rows() == 0)
{
$table->construct_cell($lang->no_tasks, array('colspan' => 3));
$table->construct_row();
}


	$table->output($lang->scheduled_tasks);

$page->output_footer();

	$table->output($lang->scheduled_tasks);

$page->output_footer();