kann mir jemand weiterhelfen?
habe seltsamen fehler nach add header link installation.
Code: Alles auswählen
Parse error: parse error in /home/muvera/biker.aloeverashop-online.de/admin/admin_header.php on line 63
streetdog
Code: Alles auswählen
Parse error: parse error in /home/muvera/biker.aloeverashop-online.de/admin/admin_header.php on line 63
Code: Alles auswählen
<?php
/***************************************************************************
* admin_board.php
* -------------------
* begin : Thursday, Jul 12, 2001
* copyright : (C) 2001 The phpBB Group
* email : support@phpbb.com
*
* $Id: admin_board.php,v 1.51.2.1 2002/05/12 00:47:39 psotfx Exp $
*
*
***************************************************************************/
define('IN_PHPBB', 1);
if( !empty($setmodules) )
{
$file = basename(__FILE__);
$module['Tools']['Add link in phpBB Header'] = "$file";
$module['Tools']['Register'] = "http://www.dseitz.de/extra/info.php";
return;
}
//
// Let's set the root dir for phpBB
//
$phpbb_root_path = "./../";
require($phpbb_root_path . 'extension.inc');
require('./pagestart.' . $phpEx);
function style_array()
{
global $db;
$sql = "SELECT template_name
FROM " . THEMES_TABLE . "
ORDER BY template_name";
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, "Couldn't query themes table", "", __LINE__, __FILE__, $sql);
}
while ( $row = $db->sql_fetchrow($result) )
{
$style_array[] = $row['template_name'];
}
return $style_array;
}
//
// This small thing checks who is accessing the page
// If it is not the main admin the script dies.
// Removing or editing this may be a big security risk.
// Don't touch it
//
if ( $userdata['user_id'] != '2' )
{
message_die(GENERAL_MESSAGE, 'Only the main admin is allowed to view this page !');
}
//
// Here we are checking if the tool has
// already been installed or not
//
$test = implode(' ' , file($phpbb_root_path . 'templates/subSilver/overall_header.tpl'));
$test = explode('<!--#-->', $test);
//
// Just our Standard Header
//
echo '<h1>Link im Header von phpBB einfügen</h1><hr>';
if ( $test['1'] != '<!--install-->')
{
echo 'Das Setup hat entdeckt, das das Tool noch nicht installiert ist<br />';
echo 'Installiere...<i>';
flush();
$styles = style_array();
foreach($styles as $style)
{
echo '<br />Installiere für Template: ' . $style;
flush();
$name = $phpbb_root_path . 'templates/' . $style . '/overall_header.tpl';
$file = file($name);
$fi = implode('', $file);
$write = str_replace('{PRIVATE_MESSAGE_INFO}</a> ' , '{PRIVATE_MESSAGE_INFO}</a> <!--#--><!--install--><!--#-->' , $fi);
$fp = fopen($name, 'r+');
fputs($fp, $write);
fclose($fp);
echo '<br />Installiert für ' .$style;
flush();
}
echo '</i><br />Installation abgeschlossen<br />';
echo '<a href="admin_header.php">Tool öffnen</a>';
echo '<hr>';
include('./page_footer_admin.'.$phpEx);
}
if ($add)
{
$styles = style_array();
$link = ' <a href="' . $ziel . '"><img src="' . $board_config['script_path'] . $bild .'" width="13" height="13" target="' . $target . '" border="0" alt="' . $name . '" title="' . $name . '" hspace="3" align="top" />' . $name . '</a>';
echo 'Füge ' . $link . ' hinzu<i>';
foreach($styles as $style)
{
echo '<br />Erstelle Link für: ' . $style;
flush();
$name = $phpbb_root_path . 'templates/' . $style . '/overall_header.tpl';
$file = file($name);
$fi = implode('', $file);
$write = str_replace('<!--#--><!--install--><!--#-->' , '<!--#--><!--install--><!--#-->' . $link, $fi);
$fp = fopen($name, 'r+');
fputs($fp, $write);
fclose($fp);
echo '<br />Link erstellt für ' .$style;
flush();
}
echo '</i><br />Link wurde hinzugefügt<br />';
echo '<a href="admin_header.php">Neuen Link hinzufügen</a>';
echo '<hr>';
include('./page_footer_admin.'.$phpEx);
}
else
{
$template->set_filenames(array(
'body' => 'admin/admin_header.tpl')
);
$tpl = style_array();
$template->assign_vars(array(
'TEMPLATE' => $tpl['0'])
);
$template->pparse('body');
}
//
// That's all folks
//
echo '<hr>';
include('./page_footer_admin.'.$phpEx);
?>
Code: Alles auswählen
if( !$db->sql_query($sql) )
{
message_die(GENERAL_ERROR, "Failed to update general configuration for $config_name", "", __LINE__, __FILE__, $sql);
}
}
}
if( isset($HTTP_POST_VARS['submit']) )
{
$message = $lang['Config_updated'] . "<br /><br />" . sprintf($lang['Click_return_config'], "<a href=\"" . append_sid("admin_board.$phpEx") . "\">", "</a>") . "<br /><br />" . sprintf($lang['Click_return_admin_index'], "<a href=\"" . append_sid("index.$phpEx?pane=right") . "\">", "</a>");
message_die(GENERAL_MESSAGE, $message);
}
}
Code: Alles auswählen
}
}
Code: Alles auswählen
if ( $userdata['user_id'] != '2' )
{
message_die(GENERAL_MESSAGE, 'Only the main admin is allowed to view this page !');
}