Code: Alles auswählen
<?php
define('IN_PHPBB', true);
$phpbb_root_path = './';
include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'common.'.$phpEx);
$userdata = session_pagestart($user_ip, PAGE_INDEX);
init_userprefs($userdata);
$page_title = 'Allianz Statistik Update';
include($phpbb_root_path . 'includes/page_header.'.$phpEx);
$template->set_filenames(array(
'body' => 'alli_update.tpl')
);
$tablet = "x_world";
$sql= "TRUNCATE TABLE $tablet";
if( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not query users', '', __LINE__, __FILE__, $sql);
}
//if ( $row = $db->sql_fetchrow($result) )
//{
//$files = array('/sql/1.sql', '/sql/2.sql', '/sql/3.sql', '/sql/4.sql', '/sql/5.sql' ,'/sql/6.sql' ,'/sql/7.sql' ,'/sql/8.sql' ,'/sql/9.sql' ,'/sql/10.sql', '/sql/11.sql'); // Hier die Dateien einfügen
//foreach( $files as $file )
//{
$content = file_get_contents("http://welt3.travian.de/karte.sql");
$content = stripslashes(trim($content));
$sql = explode(';', $content);
foreach( $sql as $mysql )
{
$result = $db->sql_query($mysql) or die(mysql_error());
$db->sql_freeresult($result);
}
//}
echo "<b>Die Daten von $tablet sind erfolgreich eingetragen wurden!</b>";
//}
$template->pparse('body');
include($phpbb_root_path . 'includes/page_tail.'.$phpEx);
?>