logo
Přihlášení
Uživatel: Přihlásit automaticky při příští návštěvě:
Zapomněli jste svoje heslo?
Heslo:
  Registrace
Internetový obchod, e-shop, SEO-shop
Webhosting C4 - 20 GB, PHP, MySQL, administrační systém, 1.200 Kč na rok s doménou v ceně.
Bezproblémová instalace phpBB, Joomla, Drupal. Návody pro C4 - užitečné rady pro zákazníky.

Úvodní stránka
Úvod
Diskusní fórum
Fórum
Ke stažení
Ke stažení
Instalace
Instalace
Rady a Návody
Návody
Moduly
Moduly
Vzhled
Vzhled
FAQ
FAQ
Odkazy
Odkazy
RSS

Levné pneu pro Vaše auto.
Kvalitní kočárky Tako. Levné zájezdy, last-minute

casino_install.php

 
Přidat nové téma   Zaslat odpověď    Obsah fóra phpBB CZ -> Zkušenosti s phpBB
Zobrazit předchozí téma :: Zobrazit následující téma  
Autor Zpráva
lekiller
Účastník
Účastník


Založen: 3.2.2007
Příspěvky: 20
Bydliště: CZ

PříspěvekZaslal: 24 duben 2009 20:52    Předmět: casino_install.php Citovat

Když spustím ať mi vytvoří databázi tak mi to píše unable to connect to databaze nebo tak něco. Teď si říkáte "další blbeček co neumí použít funkci hledat" ale já jsem jiný. Použil jsem jí a našel jsem odpověď že freehostingy, jako např. IC, na kterým mám fórum já prostě vyhodí databází co druhý den. JENŽE, já nemůžu vytvořit databáze jenom v tomhle souboru, jinak to jde! Např SQL update.php různých módů atd... normálně fungují, takže nevim co s tím je. Kontaktoval jsem IC podporu ale prej je chyba na mé straně. Takže se obracím s prosbou k Vám, nej českému phpbb fóru s plnou podporou. Hej ale fakt, jste lepší než oficiální phpbb.cz .Ale co, tady máte ten casino_install.php.
PS: zkoušel jsem to každý den po dobu týdne alespoň 3x denně. Ale tu už je ten soubor.

kód:
<?php
/***************************************************************************
 *                             casino_install.php
 *                            -------------------
 *   Version              : 1.0
 ***************************************************************************/


define('IN_PHPBB', true);
$phpbb_root_path = './';
include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'common.'.$phpEx);
include($phpbb_root_path . 'includes/constants.'.$phpEx);
include($phpbb_root_path . 'includes/db.'.$phpEx);
//
// Start session management
//
$userdata = session_pagestart($user_ip, PAGE_INDEX);
init_userprefs($userdata);
//
// End session management
//


if( !$userdata['session_logged_in'] )
{
   $header_location = ( @preg_match('/Microsoft|WebSTAR|Xitami/', getenv('SERVER_SOFTWARE')) ) ? 'Refresh: 0; URL=' : 'Location: ';
   header($header_location . append_sid("login.$phpEx?redirect=casino_install.$phpEx", true));
   exit;
}

if( $userdata['user_level'] != ADMIN )
{
   message_die(GENERAL_MESSAGE, 'You are not authorised to access this page');
}


$page_title = 'Updating the database';
include($phpbb_root_path . 'includes/page_header.'.$phpEx);

echo '<table width="100%" cellspacing="1" cellpadding="2" border="0" class="forumline">';
echo '<tr><th>Updating the database</th></tr><tr><td><span class="genmed"><ul type="circle">';

$current_time = time();

$sql = array();
$sql[] = "INSERT INTO " . $table_prefix . "config (config_name, config_value) values ('chance_playprice', '2')";
$sql[] = "INSERT INTO " . $table_prefix . "config (config_name, config_value) values ('chance_aceofclubs', '15')";
$sql[] = "INSERT INTO " . $table_prefix . "config (config_name, config_value) values ('chance_aceofdiamonds', '20')";
$sql[] = "INSERT INTO " . $table_prefix . "config (config_name, config_value) values ('chance_aceofhearts', '25')";
$sql[] = "INSERT INTO " . $table_prefix . "config (config_name, config_value) values ('chance_aceofspades', '30')";
$sql[] = "INSERT INTO " . $table_prefix . "config (config_name, config_value) values ('chance_onoff', 'on')";
$sql[] = "INSERT INTO " . $table_prefix . "config (config_name, config_value) values ('chance_minorprize', '5')";
$sql[] = "INSERT INTO " . $table_prefix . "config (config_name, config_value) values ('chance_given', '0')";
$sql[] = "INSERT INTO " . $table_prefix . "config (config_name, config_value) values ('chance_taken', '0')";
$sql[] = "INSERT INTO " . $table_prefix . "config (config_name, config_value) values ('chance_played', '0')";
$sql[] = "INSERT INTO " . $table_prefix . "config (config_name, config_value) values ('slot_playprice', '2')";
$sql[] = "INSERT INTO " . $table_prefix . "config (config_name, config_value) values ('slot_apple', '15')";
$sql[] = "INSERT INTO " . $table_prefix . "config (config_name, config_value) values ('slot_banana', '20')";
$sql[] = "INSERT INTO " . $table_prefix . "config (config_name, config_value) values ('slot_orange', '25')";
$sql[] = "INSERT INTO " . $table_prefix . "config (config_name, config_value) values ('slot_starfruit', '30')";
$sql[] = "INSERT INTO " . $table_prefix . "config (config_name, config_value) values ('slot_onoff', 'on')";
$sql[] = "INSERT INTO " . $table_prefix . "config (config_name, config_value) values ('slot_minorprize', '5')";
$sql[] = "INSERT INTO " . $table_prefix . "config (config_name, config_value) values ('slot_given', '0')";
$sql[] = "INSERT INTO " . $table_prefix . "config (config_name, config_value) values ('slot_taken', '0')";
$sql[] = "INSERT INTO " . $table_prefix . "config (config_name, config_value) values ('slot_played', '0')";
$sql[] = "INSERT INTO " . $table_prefix . "config (config_name, config_value) values ('luckydice_enable', '1')";
$sql[] = "INSERT INTO " . $table_prefix . "config (config_name, config_value) values ('luckydice_maxbet', '')";
$sql[] = "INSERT INTO " . $table_prefix . "config (config_name, config_value) values ('luckydice_windouble', '')";
$sql[] = "INSERT INTO " . $table_prefix . "config (config_name, config_value) values ('luckydice_wintriple', '')";
$sql[] = "INSERT INTO " . $table_prefix . "config (config_name, config_value) values ('luckydice_winperfect', '')";
$sql[] = "INSERT INTO " . $table_prefix . "config (config_name, config_value) values ('luckydice_bonussmall', '')";
$sql[] = "INSERT INTO " . $table_prefix . "config (config_name, config_value) values ('luckydice_bonusbig', '')";
$sql[] = "INSERT INTO " . $table_prefix . "config (config_name, config_value) values ('luckydice_played', '0')";
$sql[] = "INSERT INTO " . $table_prefix . "config (config_name, config_value) values ('luckydice_taken', '0')";
$sql[] = "INSERT INTO " . $table_prefix . "config (config_name, config_value) values ('luckydice_given', '0')";

$sql[] = "CREATE TABLE " . $table_prefix  . "blackjack_refresh (
  player int(10) NOT NULL default '0',
  card1 int(3) NOT NULL default '0',
  card2 text NOT NULL,
  card3 int(3) NOT NULL default '0',
  card4 text NOT NULL
) TYPE=MyISAM";

$sql[] = "CREATE TABLE " . $table_prefix  . "keno_game (
  played int(20) NOT NULL default '0',
  points_given int(20) NOT NULL default '0',
  points_taken int(20) NOT NULL default '0'
) TYPE=MyISAM";

$sql[] = "INSERT INTO " . $table_prefix . "keno_game (played, points_given, points_taken) VALUES ('0', '0', '0')";

$sql[] = "CREATE TABLE " . $table_prefix  . "blackjack_cards (
  number int(2) NOT NULL default '0',
  value text NOT NULL
) TYPE=MyISAM";

$sql[] = "INSERT INTO " . $table_prefix . "blackjack_cards (number, value) VALUES ('1', 'Two Of Clubs')";
$sql[] = "INSERT INTO " . $table_prefix . "blackjack_cards (number, value) VALUES ('2', 'Three Of Clubs')";
$sql[] = "INSERT INTO " . $table_prefix . "blackjack_cards (number, value) VALUES ('3', 'Four Of Clubs')";
$sql[] = "INSERT INTO " . $table_prefix . "blackjack_cards (number, value) VALUES ('4', 'Five Of Clubs')";
$sql[] = "INSERT INTO " . $table_prefix . "blackjack_cards (number, value) VALUES ('5', 'Six Of Clubs')";
$sql[] = "INSERT INTO " . $table_prefix . "blackjack_cards (number, value) VALUES ('6', 'Seven Of Clubs')";
$sql[] = "INSERT INTO " . $table_prefix . "blackjack_cards (number, value) VALUES ('7', 'Eight Of Clubs')";
$sql[] = "INSERT INTO " . $table_prefix . "blackjack_cards (number, value) VALUES ('8', 'Nine Of Clubs')";
$sql[] = "INSERT INTO " . $table_prefix . "blackjack_cards (number, value) VALUES ('9', 'Ten Of Clubs')";
$sql[] = "INSERT INTO " . $table_prefix . "blackjack_cards (number, value) VALUES ('10', 'Jack Of Clubs')";
$sql[] = "INSERT INTO " . $table_prefix . "blackjack_cards (number, value) VALUES ('11', 'Queen Of Clubs')";
$sql[] = "INSERT INTO " . $table_prefix . "blackjack_cards (number, value) VALUES ('12', 'King Of Clubs')";
$sql[] = "INSERT INTO " . $table_prefix . "blackjack_cards (number, value) VALUES ('13', 'Ace Of Clubs')";
$sql[] = "INSERT INTO " . $table_prefix . "blackjack_cards (number, value) VALUES ('14', 'Two Of Diamonds')";
$sql[] = "INSERT INTO " . $table_prefix . "blackjack_cards (number, value) VALUES ('15', 'Three Of Diamonds')";
$sql[] = "INSERT INTO " . $table_prefix . "blackjack_cards (number, value) VALUES ('16', 'Four Of Diamonds')";
$sql[] = "INSERT INTO " . $table_prefix . "blackjack_cards (number, value) VALUES ('17', 'Five Of Diamonds')";
$sql[] = "INSERT INTO " . $table_prefix . "blackjack_cards (number, value) VALUES ('18', 'Six Of Diamonds')";
$sql[] = "INSERT INTO " . $table_prefix . "blackjack_cards (number, value) VALUES ('19', 'Seven Of Diamonds')";
$sql[] = "INSERT INTO " . $table_prefix . "blackjack_cards (number, value) VALUES ('20', 'Eight Of Diamonds')";
$sql[] = "INSERT INTO " . $table_prefix . "blackjack_cards (number, value) VALUES ('21', 'Nine Of Diamonds')";
$sql[] = "INSERT INTO " . $table_prefix . "blackjack_cards (number, value) VALUES ('22', 'Ten Of Diamonds')";
$sql[] = "INSERT INTO " . $table_prefix . "blackjack_cards (number, value) VALUES ('23', 'Jack Of Diamonds')";
$sql[] = "INSERT INTO " . $table_prefix . "blackjack_cards (number, value) VALUES ('24', 'Queen Of Diamonds')";
$sql[] = "INSERT INTO " . $table_prefix . "blackjack_cards (number, value) VALUES ('25', 'King Of Diamonds')";
$sql[] = "INSERT INTO " . $table_prefix . "blackjack_cards (number, value) VALUES ('26', 'Ace Of Diamonds')";
$sql[] = "INSERT INTO " . $table_prefix . "blackjack_cards (number, value) VALUES ('27', 'Two Of Hearts')";
$sql[] = "INSERT INTO " . $table_prefix . "blackjack_cards (number, value) VALUES ('28', 'Three Of Hearts')";
$sql[] = "INSERT INTO " . $table_prefix . "blackjack_cards (number, value) VALUES ('29', 'Four Of Hearts')";
$sql[] = "INSERT INTO " . $table_prefix . "blackjack_cards (number, value) VALUES ('30', 'Five Of Hearts')";
$sql[] = "INSERT INTO " . $table_prefix . "blackjack_cards (number, value) VALUES ('31', 'Six Of Hearts')";
$sql[] = "INSERT INTO " . $table_prefix . "blackjack_cards (number, value) VALUES ('32', 'Seven Of Hearts')";
$sql[] = "INSERT INTO " . $table_prefix . "blackjack_cards (number, value) VALUES ('33', 'Eight Of Hearts')";
$sql[] = "INSERT INTO " . $table_prefix . "blackjack_cards (number, value) VALUES ('34', 'Nine Of Hearts')";
$sql[] = "INSERT INTO " . $table_prefix . "blackjack_cards (number, value) VALUES ('35', 'Ten Of Hearts')";
$sql[] = "INSERT INTO " . $table_prefix . "blackjack_cards (number, value) VALUES ('36', 'Jack Of Hearts')";
$sql[] = "INSERT INTO " . $table_prefix . "blackjack_cards (number, value) VALUES ('37', 'Queen Of Hearts')";
$sql[] = "INSERT INTO " . $table_prefix . "blackjack_cards (number, value) VALUES ('38', 'King Of Hearts')";
$sql[] = "INSERT INTO " . $table_prefix . "blackjack_cards (number, value) VALUES ('39', 'Ace Of Hearts')";
$sql[] = "INSERT INTO " . $table_prefix . "blackjack_cards (number, value) VALUES ('40', 'Two Of Spades')";
$sql[] = "INSERT INTO " . $table_prefix . "blackjack_cards (number, value) VALUES ('41', 'Three Of Spades')";
$sql[] = "INSERT INTO " . $table_prefix . "blackjack_cards (number, value) VALUES ('42', 'Four Of Spades')";
$sql[] = "INSERT INTO " . $table_prefix . "blackjack_cards (number, value) VALUES ('43', 'Five Of Spades')";
$sql[] = "INSERT INTO " . $table_prefix . "blackjack_cards (number, value) VALUES ('44', 'Six Of Spades')";
$sql[] = "INSERT INTO " . $table_prefix . "blackjack_cards (number, value) VALUES ('45', 'Seven Of Spades')";
$sql[] = "INSERT INTO " . $table_prefix . "blackjack_cards (number, value) VALUES ('46', 'Eight Of Spades')";
$sql[] = "INSERT INTO " . $table_prefix . "blackjack_cards (number, value) VALUES ('47', 'Nine Of Spades')";
$sql[] = "INSERT INTO " . $table_prefix . "blackjack_cards (number, value) VALUES ('48', 'Ten Of Spades')";
$sql[] = "INSERT INTO " . $table_prefix . "blackjack_cards (number, value) VALUES ('49', 'Jack Of Spades')";
$sql[] = "INSERT INTO " . $table_prefix . "blackjack_cards (number, value) VALUES ('50', 'Queen Of Spades')";
$sql[] = "INSERT INTO " . $table_prefix . "blackjack_cards (number, value) VALUES ('51', 'King Of Spades')";
$sql[] = "INSERT INTO " . $table_prefix . "blackjack_cards (number, value) VALUES ('52', 'Ace Of Spades')";

$sql[] = "CREATE TABLE " . $table_prefix  . "blackjack_info (
  given int(20) NOT NULL default '0',
  taken int(20) NOT NULL default '0',
  wins int(20) NOT NULL default '0',
  losses int(20) NOT NULL default '0',
  ties int(20) NOT NULL default '0',
  re_dealt int(20) NOT NULL default '0'
) TYPE=MyISAM";

$sql[] = "INSERT INTO " . $table_prefix . "blackjack_info (given, taken, wins, losses, ties, re_dealt) VALUES ('0', '0', '0', '0', '0', '0')";


for( $i = 0; $i < count($sql); $i++ )
{
   if( !$result = $db->sql_query ($sql[$i]) )
   {
      $error = $db->sql_error();

      echo '<li>' . $sql[$i] . '<br /> +++ <font color="#FF0000"><b>Error:</b></font> ' . $error['message'] . '</li><br />';
   }
   else
   {
      echo '<li>' . $sql[$i] . '<br /> +++ <font color="#00AA00"><b>Successfully updated database</b></font></li><br />';
   }
}


echo '</ul></span></td></tr><tr><td class="catBottom" height="28">&nbsp;</td></tr>';

echo '<tr><th>End</th></tr><tr><td><span class="genmed">The upgrade has completed. Please be sure to delete this file.<br />If you have run into any errors, please visit the <a href="http://www.truthofwar.com/community" target="_phpbbsupport">ToW</a> and ask someone for help.</span></td></tr>';
echo '<tr><td class="catBottom" height="28" align="center"><span class="genmed"><a href="' . append_sid("index.$phpEx") . '">Enjoy!</a></span></td></table>';

include($phpbb_root_path . 'includes/page_tail.'.$phpEx);

?>
Návrat nahoru
Zobrazit informace o autorovi Odeslat soukromou zprávu Zobrazit autorovy WWW stránky
Webhosting C4 - 20 GB, PHP, MySQL, administrační systém, 1.200 Kč na rok s doménou v ceně.
Bezproblémová instalace phpBB, Joomla, Drupal. Návody pro C4 - užitečné rady pro zákazníky.
lekiller
Účastník
Účastník


Založen: 3.2.2007
Příspěvky: 20
Bydliště: CZ

PříspěvekZaslal: 26 duben 2009 16:08    Předmět: Nikdo nic? Citovat

Fakt nevíte? plsss Crying or Very sad
Návrat nahoru
Zobrazit informace o autorovi Odeslat soukromou zprávu Zobrazit autorovy WWW stránky
Zobrazit příspěvky z předchozích:   
Přidat nové téma   Zaslat odpověď    Obsah fóra phpBB CZ -> Zkušenosti s phpBB Časy uváděny v GMT + 1 hodina
Strana 1 z 1

 
Přejdi na:  
Nemůžete odesílat nové téma do tohoto fóra.
Nemůžete odpovídat na témata v tomto fóru.
Nemůžete upravovat své příspěvky v tomto fóru.
Nemůžete mazat své příspěvky v tomto fóru.
Nemůžete hlasovat v tomto fóru.
Nemůžete připojovat soubory k příspěvkům
Nemůžete stahovat ani prohlížet přiložené soubory
šřa