Vergleich admin/templates.php - 1.00 - 1.17

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 6Zeile 6
 * Website: http://www.mybboard.com
* License: http://www.mybboard.com/eula.html
*

 * Website: http://www.mybboard.com
* License: http://www.mybboard.com/eula.html
*

 * $Id$

 * $Id: templates.php 957 2005-12-11 20:07:10Z dennis $

 */

require "./global.php";

// Just a little fix here
$db->query("DELETE FROM ".TABLE_PREFIX."templates WHERE title=''");

 */

require "./global.php";

// Just a little fix here
$db->query("DELETE FROM ".TABLE_PREFIX."templates WHERE title=''");

 

$mybb->input['tid'] = intval($mybb->input['tid']);
$mybb->input['setid'] = intval($mybb->input['setid']);
$mybb->input['expand'] = intval($mybb->input['expand']);
$mybb->input['sid2'] = intval($mybb->input['sid2']);
$mybb->input['sid'] = intval($mybb->input['sid']);


// Load language packs for this section
global $lang;


// Load language packs for this section
global $lang;

Zeile 23Zeile 29
{
case "add":
addacpnav($lang->nav_add_template);

{
case "add":
addacpnav($lang->nav_add_template);

		break;

		break;

	case "edit":
addacpnav($lang->nav_edit_template);

	case "edit":
addacpnav($lang->nav_edit_template);

		break;

		break;

	case "delete":
addacpnav($lang->nav_delete_template);

	case "delete":
addacpnav($lang->nav_delete_template);

		break;

		break;

	case "addset":
addacpnav($lang->nav_add_set);
break;

	case "addset":
addacpnav($lang->nav_add_set);
break;

Zeile 57Zeile 63
			}
}
break;

			}
}
break;

}


}


$expand = $mybb->input['expand'];
$group = $mybb->input['group'];

checkadminpermissions("canedittemps");
logadmin();

$expand = $mybb->input['expand'];
$group = $mybb->input['group'];

checkadminpermissions("canedittemps");
logadmin();





$templategroups['calendar'] = $lang->group_calendar;
$templategroups['editpost'] = $lang->group_editpost;
$templategroups['email'] = $lang->group_email;

$templategroups['calendar'] = $lang->group_calendar;
$templategroups['editpost'] = $lang->group_editpost;
$templategroups['email'] = $lang->group_email;

Zeile 103Zeile 109
	if($templateinfo['template'] == $mybb->input['template'])
{
cperror($lang->template_same_master);

	if($templateinfo['template'] == $mybb->input['template'])
{
cperror($lang->template_same_master);

	}

	}

	$newtemplate = array(
"title" => addslashes($mybb->input['title']),
"template" => addslashes($mybb->input['template']),

	$newtemplate = array(
"title" => addslashes($mybb->input['title']),
"template" => addslashes($mybb->input['template']),

Zeile 119Zeile 125
		$opengroup = "&group=".$mybb->input['group']."#".$mybb->input['group'];
}
if($mybb->input['continue'] != "yes")

		$opengroup = "&group=".$mybb->input['group']."#".$mybb->input['group'];
}
if($mybb->input['continue'] != "yes")

	{

	{

		$editurl = "templates.php?expand=".$setid.$opengroup;
}
else

		$editurl = "templates.php?expand=".$setid.$opengroup;
}
else

Zeile 147Zeile 153
			$opengroup = "&group=".$mybb->input['group']."#".$mybb->input['group'];
}
cpredirect("templates.php?expand=".$mybb->input['expand'].$opengroup, $lang->template_deleted);

			$opengroup = "&group=".$mybb->input['group']."#".$mybb->input['group'];
}
cpredirect("templates.php?expand=".$mybb->input['expand'].$opengroup, $lang->template_deleted);

	}
else

	}
else

	{
$mybb->input['action'] = "modify";
$expand = $template[sid];

	{
$mybb->input['action'] = "modify";
$expand = $template[sid];

Zeile 165Zeile 171
	else
{
cpredirect("templates.php");

	else
{
cpredirect("templates.php");

	}

	}

}
if($mybb->input['action'] == "do_editset")
{

}
if($mybb->input['action'] == "do_editset")
{

Zeile 192Zeile 198
		);
$db->update_query(TABLE_PREFIX."templates", $updatedtemplate, "tid='".$mybb->input['tid']."'");
if($mybb->input['group'])

		);
$db->update_query(TABLE_PREFIX."templates", $updatedtemplate, "tid='".$mybb->input['tid']."'");
if($mybb->input['group'])

	{

	{

		$opengroup = "&group=".$mybb->input['group']."#".$mybb->input['group'];
}
if($mybb->input['continue'] != "yes")

		$opengroup = "&group=".$mybb->input['group']."#".$mybb->input['group'];
}
if($mybb->input['continue'] != "yes")

Zeile 225Zeile 231
					$updatedtemplate = array(
"template" => addslashes($newtemplate)
);

					$updatedtemplate = array(
"template" => addslashes($newtemplate)
);

					$db->update_array(TABLE_PREFIX."templates", $updatedtemplate, "tid='".$template['tid']."'");

					$db->update_query(TABLE_PREFIX."templates", $updatedtemplate, "tid='".$template['tid']."'");

					echo "$lang->search_updated $template[title]".
makelinkcode($lang->search_edit, "templates.php?action=edit&tid=".$template[tid]).
"<br>";

					echo "$lang->search_updated $template[title]".
makelinkcode($lang->search_edit, "templates.php?action=edit&tid=".$template[tid]).
"<br>";

Zeile 328Zeile 334
	}
makehiddencode("expand", $mybb->input['expand']);
makehiddencode("group", $mybb->input['group']);

	}
makehiddencode("expand", $mybb->input['expand']);
makehiddencode("group", $mybb->input['group']);

	endtable();

	endtable();

	endform();
cpfooter();
}

	endform();
cpfooter();
}

Zeile 356Zeile 362
	while($template = $db->fetch_array($query)) {
if($template[origtitle]) {
$updatedtemplate = array(

	while($template = $db->fetch_array($query)) {
if($template[origtitle]) {
$updatedtemplate = array(

				"template" => addslashes($template['template'])

				"template" => addslashes($template['template'])

				);
$db->update_query(TABLE_PREFIX."templates", $updatedtemplate, "title='".$template['title']."' AND sid='-2'");
} else {

				);
$db->update_query(TABLE_PREFIX."templates", $updatedtemplate, "title='".$template['title']."' AND sid='-2'");
} else {

Zeile 373Zeile 379
}

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

}

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

	if($mybb->input['title']) {
$query = $db->query("SELECT * FROM ".TABLE_PREFIX."templates WHERE title='".$mybb->input['title']."' AND sid='-2'");


	if($mybb->input['title'])
{
$query = $db->query("SELECT * FROM ".TABLE_PREFIX."templates WHERE title='".addslashes($mybb->input['title'])."' AND sid='-2'");

		$template = $db->fetch_array($query);
}
cpheader();

		$template = $db->fetch_array($query);
}
cpheader();

Zeile 428Zeile 435
	{
$mybb->input['sid1'] = -2;
}

	{
$mybb->input['sid1'] = -2;
}

	$query = $db->query("SELECT * FROM ".TABLE_PREFIX."templates WHERE title='".$mybb->input['title']."' AND sid='".$mybb->input['sid1']."'");

	$query = $db->query("SELECT * FROM ".TABLE_PREFIX."templates WHERE title='".addslashes($mybb->input['title'])."' AND sid='".$mybb->input['sid1']."'");

	$template1 = $db->fetch_array($query);


	$template1 = $db->fetch_array($query);


	$query = $db->query("SELECT * FROM ".TABLE_PREFIX."templates WHERE title='".$mybb->input['title']."' AND sid='".$mybb->input['sid2']."'");

	$query = $db->query("SELECT * FROM ".TABLE_PREFIX."templates WHERE title='".addslashes($mybb->input['title'])."' AND sid='".$mybb->input['sid2']."'");

	$template2 = $db->fetch_array($query);

if($template1['template'] == $template2['template'])

	$template2 = $db->fetch_array($query);

if($template1['template'] == $template2['template'])