ebay button
Geplaatst: 31 dec 2005, 16:11
Support template:
welke sql regels moet ik hebben ?
- Wat is het probleem? ebay_button_install.php word niet geopent
Wanneer ontstond het probleem? gelijk
Adres van je forum: http://www.torrentgame.nl/forum
Geïnstalleerde mods: http://www.torrentgame.nl/forum/hacks_list.php
Huidige template: fiblue3d
phpBB versie: 2.0.19
Host: aurelius.tiscali.nl
Heb je onlangs een mod of stijl geïnstalleerd? nop
Heb je gezocht naar een antwoord? ja maar kan niets vinden
welke sql regels moet ik hebben ?
Code: Selecteer alles
<?php
/***************************************************************************
* ebay_button_install.php
* -------------------
* Version : 1.0
***************************************************************************/
define('IN_PHPBB', true);
$phpbb_root_path='./';
include($phpbb_root_path.'extension.inc');
include($phpbb_root_path.'common.'.$phpEx);
//
// Start session management
//
$userdata = session_pagestart($user_ip, PAGE_INDEX);
init_userprefs($userdata);
//
// End session management
//
if( !$userdata['session_logged_in'] )
{
header('Location: ' . append_sid("login.$phpEx?redirect=".$PHP_SELF, true));
}
if( $userdata['user_level'] != ADMIN )
{
message_die(GENERAL_MESSAGE, $lang['Not_Authorised']);
}
if( !strstr($dbms, "mysql") )
{
if( !isset($bypass) )
{
$message = 'This mod has only been tested on MySQL and may only work on MySQL.<br />';
$message .= 'Click <a href="ebay_button_install.php?bypass=true">here</a> to install anyways.';
message_die(GENERAL_MESSAGE, $message);
}
}
$sql = array();
$sql[] = "ALTER TABLE ".USERS_TABLE." ADD `user_ebay` VARCHAR( 255 ) AFTER `user_msnm` ;";
$sql[] = "ALTER TABLE ".USERS_TABLE." ADD FULLTEXT (`user_ebay` );";
$sql_count = count($sql);
echo "<html>\n";
echo "<body>\n";
for($i = 0; $i < $sql_count; $i++)
{
echo "Running :: " . $sql[$i];
flush();
if ( !$db->sql_query($sql[$i]) )
{
$errored = true;
$error = $db->sql_error();
echo " -> <b>FAILED</b> ---> <u>" . $error['message'] . "</u><br /><br />\n\n";
}
else
{
echo " -> <b>COMPLETED</b><br /><br />\n\n";
}
}
if( $errored )
{
$message = "Some of the querys have failed, contact me so I can fix the errors.";
}
else
{
$message = "The table have been edited successfully. You can now delete this file.";
}
echo "\n<br />\n<b>Finished!</b><br />\n";
echo $message . "<br />\n";
echo "</body>\n";
echo "</html>\n";
exit();
?>