Vergleich admin/modules/config/calendars.php - 1.8.6 - 1.8.33

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 26Zeile 26
	$sub_tabs['add_calendar'] = array(
'title' => $lang->add_calendar,
'link' => "index.php?module=config-calendars&action=add",

	$sub_tabs['add_calendar'] = array(
'title' => $lang->add_calendar,
'link' => "index.php?module=config-calendars&action=add",

 
		'description' => $lang->add_calendar_desc

	);
}


	);
}


Zeile 91Zeile 92

$page->add_breadcrumb_item($lang->add_calendar);
$page->output_header($lang->calendars." - ".$lang->add_calendar);


$page->add_breadcrumb_item($lang->add_calendar);
$page->output_header($lang->calendars." - ".$lang->add_calendar);


$sub_tabs['add_calendar'] = array(
'title' => $lang->add_calendar,
'link' => "index.php?module=config-calendars&action=add",
'description' => $lang->add_calendar_desc
);

 

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


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







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

$form_container = new FormContainer($lang->add_calendar);

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

$form_container = new FormContainer($lang->add_calendar);

	$form_container->output_row($lang->name." <em>*</em>", "", $form->generate_text_box('name', $mybb->input['name'], array('id' => 'name')), 'name');
$form_container->output_row($lang->display_order, $lang->display_order_desc, $form->generate_numeric_field('disporder', $mybb->input['disporder'], array('id' => 'disporder', 'min' => 0)), 'disporder');

	$form_container->output_row($lang->name." <em>*</em>", "", $form->generate_text_box('name', $mybb->get_input('name'), array('id' => 'name')), 'name');
$form_container->output_row($lang->display_order, $lang->display_order_desc, $form->generate_numeric_field('disporder', $mybb->get_input('disporder'), array('id' => 'disporder', 'min' => 0)), 'disporder');

	$select_list = array($lang->sunday, $lang->monday, $lang->tuesday, $lang->wednesday, $lang->thursday, $lang->friday, $lang->saturday);

	$select_list = array($lang->sunday, $lang->monday, $lang->tuesday, $lang->wednesday, $lang->thursday, $lang->friday, $lang->saturday);

	$form_container->output_row($lang->week_start, $lang->week_start_desc, $form->generate_select_box('startofweek', $select_list, $mybb->input['startofweek'], array('id' => 'startofweek')), 'startofweek');
$form_container->output_row($lang->event_limit, $lang->event_limit_desc, $form->generate_numeric_field('eventlimit', $mybb->input['eventlimit'], array('id' => 'eventlimit', 'min' => 0)), 'eventlimit');
$form_container->output_row($lang->show_birthdays, $lang->show_birthdays_desc, $form->generate_yes_no_radio('showbirthdays', $mybb->input['showbirthdays'], true));
$form_container->output_row($lang->moderate_events, $lang->moderate_events_desc, $form->generate_yes_no_radio('moderation', $mybb->input['moderation'], true));
$form_container->output_row($lang->allow_html, "", $form->generate_yes_no_radio('allowhtml', $mybb->input['allowhtml']));
$form_container->output_row($lang->allow_mycode, "", $form->generate_yes_no_radio('allowmycode', $mybb->input['allowmycode']));
$form_container->output_row($lang->allow_img, "", $form->generate_yes_no_radio('allowimgcode', $mybb->input['allowimgcode']));
$form_container->output_row($lang->allow_video, "", $form->generate_yes_no_radio('allowvideocode', $mybb->input['allowvideocode']));
$form_container->output_row($lang->allow_smilies, "", $form->generate_yes_no_radio('allowsmilies', $mybb->input['allowsmilies']));

	$form_container->output_row($lang->week_start, $lang->week_start_desc, $form->generate_select_box('startofweek', $select_list, $mybb->get_input('startofweek'), array('id' => 'startofweek')), 'startofweek');
$form_container->output_row($lang->event_limit, $lang->event_limit_desc, $form->generate_numeric_field('eventlimit', $mybb->get_input('eventlimit'), array('id' => 'eventlimit', 'min' => 0)), 'eventlimit');
$form_container->output_row($lang->show_birthdays, $lang->show_birthdays_desc, $form->generate_yes_no_radio('showbirthdays', $mybb->get_input('showbirthdays'), true));
$form_container->output_row($lang->moderate_events, $lang->moderate_events_desc, $form->generate_yes_no_radio('moderation', $mybb->get_input('moderation'), true));
$form_container->output_row($lang->allow_html, "", $form->generate_yes_no_radio('allowhtml', $mybb->get_input('allowhtml')));
$form_container->output_row($lang->allow_mycode, "", $form->generate_yes_no_radio('allowmycode', $mybb->get_input('allowmycode')));
$form_container->output_row($lang->allow_img, "", $form->generate_yes_no_radio('allowimgcode', $mybb->get_input('allowimgcode')));
$form_container->output_row($lang->allow_video, "", $form->generate_yes_no_radio('allowvideocode', $mybb->get_input('allowvideocode')));
$form_container->output_row($lang->allow_smilies, "", $form->generate_yes_no_radio('allowsmilies', $mybb->get_input('allowsmilies')));

	$form_container->end();

$buttons[] = $form->generate_submit_button($lang->save_calendar);

$form->output_submit_wrapper($buttons);
$form->end();

	$form_container->end();

$buttons[] = $form->generate_submit_button($lang->save_calendar);

$form->output_submit_wrapper($buttons);
$form->end();





	$page->output_footer();
}

	$page->output_footer();
}





if($mybb->input['action'] == "permissions")
{
$usergroups = array();

if($mybb->input['action'] == "permissions")
{
$usergroups = array();

Zeile 142Zeile 136
	{
flash_message($lang->error_invalid_calendar, 'error');
admin_redirect("index.php?module=config-calendars");

	{
flash_message($lang->error_invalid_calendar, 'error');
admin_redirect("index.php?module=config-calendars");

	}

$plugins->run_hooks("admin_config_calendars_permissions");

	}

$plugins->run_hooks("admin_config_calendars_permissions");


$query = $db->simple_select("usergroups", "*", "", array("order" => "name"));
while($usergroup = $db->fetch_array($query))
{
$usergroups[$usergroup['gid']] = $usergroup;
}


$query = $db->simple_select("usergroups", "*", "", array("order" => "name"));
while($usergroup = $db->fetch_array($query))
{
$usergroups[$usergroup['gid']] = $usergroup;
}

 

$existing_permissions = array();


$query = $db->simple_select("calendarpermissions", "*", "cid='{$calendar['cid']}'");
while($existing = $db->fetch_array($query))


$query = $db->simple_select("calendarpermissions", "*", "cid='{$calendar['cid']}'");
while($existing = $db->fetch_array($query))

Zeile 162Zeile 158
	{
foreach(array_keys($usergroups) as $group_id)
{

	{
foreach(array_keys($usergroups) as $group_id)
{

			$permissions = $mybb->input['permissions'][$group_id];









			if(isset($mybb->input['permissions'][$group_id]))
{
$permissions = $mybb->input['permissions'][$group_id];
}
else
{
$permissions = array();
}


			$db->delete_query("calendarpermissions", "cid='{$calendar['cid']}' AND gid='".(int)$group_id."'");


			$db->delete_query("calendarpermissions", "cid='{$calendar['cid']}' AND gid='".(int)$group_id."'");


			if(!$mybb->input['default_permissions'][$group_id])

			if(empty($mybb->input['default_permissions'][$group_id]))

			{
foreach(array('canviewcalendar','canaddevents','canbypasseventmod','canmoderateevents') as $calendar_permission)
{

			{
foreach(array('canviewcalendar','canaddevents','canbypasseventmod','canmoderateevents') as $calendar_permission)
{

					if($permissions[$calendar_permission] == 1)

					if(!empty($permissions[$calendar_permission]))

					{
$permissions_array[$calendar_permission] = 1;
}

					{
$permissions_array[$calendar_permission] = 1;
}

Zeile 211Zeile 215

foreach($usergroups as $usergroup)
{


foreach($usergroups as $usergroup)
{

		if($existing_permissions[$usergroup['gid']])

		if(!empty($existing_permissions[$usergroup['gid']]))

		{
$perms = $existing_permissions[$usergroup['gid']];
$default_checked = false;

		{
$perms = $existing_permissions[$usergroup['gid']];
$default_checked = false;

Zeile 234Zeile 238
				$value = "false";
}
if($perms[$calendar_permission] != 1)

				$value = "false";
}
if($perms[$calendar_permission] != 1)

			{

			{

				$all_checked = false;
}
if($perms[$calendar_permission] == 1)

				$all_checked = false;
}
if($perms[$calendar_permission] == 1)

			{

			{

				$perms_checked[$calendar_permission] = 1;
}
else

				$perms_checked[$calendar_permission] = 1;
}
else

Zeile 258Zeile 262
		$table->construct_cell($form->generate_check_box("permissions[{$usergroup['gid']}][canmoderateevents]", 1, "", array("id" => "permissions_{$usergroup['gid']}_canmoderateevents", "checked" => $perms_checked['canmoderateevents'], "onclick" => $reset_default)), array('class' => 'align_center'));
$table->construct_cell($form->generate_check_box("permissions[{$usergroup['gid']}][all]", 1, "", array("id" => "permissions_{$usergroup['gid']}_all", "checked" => $all_checked, "onclick" => $all_check)), array('class' => 'align_center'));
$table->construct_row();

		$table->construct_cell($form->generate_check_box("permissions[{$usergroup['gid']}][canmoderateevents]", 1, "", array("id" => "permissions_{$usergroup['gid']}_canmoderateevents", "checked" => $perms_checked['canmoderateevents'], "onclick" => $reset_default)), array('class' => 'align_center'));
$table->construct_cell($form->generate_check_box("permissions[{$usergroup['gid']}][all]", 1, "", array("id" => "permissions_{$usergroup['gid']}_all", "checked" => $all_checked, "onclick" => $all_check)), array('class' => 'align_center'));
$table->construct_row();

	}

	}

	$table->output("{$lang->calendar_permissions_for} {$calendar['name']}");


	$table->output("{$lang->calendar_permissions_for} {$calendar['name']}");


	if(!$no_results)
{
$buttons[] = $form->generate_submit_button($lang->save_permissions);
$form->output_submit_wrapper($buttons);
}

	$buttons[] = $form->generate_submit_button($lang->save_permissions);
$form->output_submit_wrapper($buttons);





$form->end();



$form->end();


Zeile 388Zeile 389
	$plugins->run_hooks("admin_config_calendars_delete");

// User clicked no

	$plugins->run_hooks("admin_config_calendars_delete");

// User clicked no

	if($mybb->input['no'])

	if($mybb->get_input('no'))

	{
admin_redirect("index.php?module=config-calendars");
}

	{
admin_redirect("index.php?module=config-calendars");
}

Zeile 464Zeile 465
		$table->construct_row();
}


		$table->construct_row();
}


	if($table->num_rows()  == 0)


	$no_results = false;
if($table->num_rows() == 0)

	{
$table->construct_cell($lang->no_calendars, array('colspan' => 5));
$table->construct_row();

	{
$table->construct_cell($lang->no_calendars, array('colspan' => 5));
$table->construct_row();