Ir para conteúdo
  • Cadastre-se

Normal Error ao Instalar Gesior 0.3.8 Do tibiaking !


Posts Recomendados

Vishhhhhhh Olha o que Deu agora HAHUEuHAHEae, Reiniciei o apache td.... e aparece isso

$config['site] = parse_ini_file('config/config.ini'); session_start(); //save config in ini file function saveconfig_ini($config) { $file = fopen("config/config.ini", "w"); foreach($config as $param => $data) { $file_data .= $param.' = "'.str_replace('"', '', $data).'" '; } rewind($file); fwrite($file, $file_data); fclose($file); } function check_password($pass) { $temp = strspn("$pass", "qwertyuiopasdfghjklzxcvbnmQWERTYUIOPASDFGHJKLZXCVBNM1234567890"); if ($temp != strlen($pass)) { return false; } else { $ok = "/[a-zA-Z0-9]{1,40}/"; return (preg_match($ok, $pass))? true: false; } } function password_ency($password) { $ency = $GLOBALS['passwordency']; if($ency == 'sha1') return sha1($password); elseif($ency == 'md5') return md5($password); elseif($ency == '') return $password; } if($_REQUEST['page'] == '' && !isset($_REQUEST['step'])) echo ' <cke:body>Frames don\'t work. Install Firefox <ahttp://www.tibiaking.com/forum/uploads/emoticons/default_tongue.png' alt=':P'></cke:body> '; if($_REQUEST['page] == 'menu') echo ' MENU IF NOT INSTALLED: 0. Informations 1. Set server path 2. Check DataBase connection 3. Add tables and columns to DB 4. Add samples to DB 5. Set Admin Account FOR ADMINS: 6. Load Monsters from OTS 7. Load Spells from OTS '; if($_REQUEST['page'] == 'step') { if($config['site']['install'] != "no") { if($_REQUEST['server_conf'] == 'yes' || ($_REQUEST['step'] > 2 && $_REQUEST['step'] < 6)) { $config['server'] = parse_ini_file($config['site']['server_path'].'config.lua'); if(isset($config['server']['mysqlHost'])) { $mysqlhost = $config['server']['mysqlHost']; $mysqluser = $config['server']['mysqlUser']; $mysqlpass = $config['server']['mysqlPass']; $mysqldatabase = $config['server']['mysqlDatabase']; } elseif(isset($config['server']['sqlHost'])) { $mysqlhost = $config['server']['sqlHost']; $mysqluser = $config['server']['sqlUser']; $mysqlpass = $config['server']['sqlPass']; $mysqldatabase = $config['server']['sqlDatabase']; } $sqlitefile = $config['server']['sqliteDatabase']; $passwordency = ''; if(strtolower($config['server']['useMD5Passwords']) == 'yes' || strtolower($config['server']['passwordType']) == 'md5') $passwordency = 'md5'; if(strtolower($config['server']['passwordType']) == 'sha1') $passwordency = 'sha1'; // loads #####POT mainfile##### include('pot/OTS.php'); // PDO and POT connects to database $ots = POT::getInstance(); if(strtolower($config['server']['sqlType']) == "mysql") { try { $ots->connect(POT::DB_MYSQL, array('host' => $mysqlhost, 'user' => $mysqluser, 'password' => $mysqlpass, 'database' => $mysqldatabase) ); } catch(PDOException $error) { echo 'Database error - can\'t connect to MySQL database. Possible reasons: 1. MySQL server is not running on host. 2. MySQL user, password, database or host isn\'t configured in: '.$config['site']['server_path'].'config.lua . 3. MySQL user, password, database or host is wrong.'; exit; } } elseif(strtolower($config['server']['sqlType']) == "sqlite") { $link_to_sqlitedatabase = $config['site']['server_path'].$sqlitefile; try { $ots->connect(POT::DB_SQLITE, array('database' => $link_to_sqlitedatabase)); } catch(PDOException $error) { echo 'Database error - can\'t open SQLite database. Possible reasons: '.$link_to_sqlitedatabase.' - file isn\'t valid SQLite database. '.$link_to_sqlitedatabase.' - doesn\'t exist.'; exit; } } else { echo 'Database error. Unknown database type in '.$config['site']['server_path'].'config.lua . Must be equal to: "mysql" or "sqlite". Now is: "'.strtolower($config['server']['sqlType']).'"'; exit; } $SQL = POT::getInstance()->getDBHandle(); } $step = $_REQUEST['step']; if(empty($step)) $step = $config['site']['install']; if($step == 'start') { echo ' STEP '.$step.' Informations '; echo 'Bem vindo ao Gesior ACC 0.3.8! First do steps 1-5 one by one, later (when you will be logged on admin account) press on links to steps 6-8 to load configuration from OTS.'; } if($step == '1') { if(isset($_REQUEST['server_path'])) { echo ' STEP '.$step.' Check server configuration '; $config['site']['server_path'] = $_REQUEST['server_path']; $config['site']['server_path'] = trim($config['site']['server_path'])."\\"; $config['site']['server_path'] = str_replace("\\\\", "/", $config['site']['server_path']); $config['site']['server_path'] = str_replace("\\", "/", $config['site']['server_path']); $config['site']['server_path'] = str_replace("//", "/", $config['site']['server_path']); saveconfig_ini($config['site']); if(file_exists($config['site']['server_path'].'config.lua')) { $config['server'] = parse_ini_file($config['site']['server_path'].'config.lua'); if(isset($config['server']['sqlType'])) { $config['site']['install'] = 2; saveconfig_ini($config['site']); echo 'File config.lua loaded from '.$config['site']['server_path'].'config.lua and looks like fine server config file. Now you can check database('.$config['server']['sqlType'].') connection: STEP 2 - check database connection'; } else { echo 'File config.lua loaded from '.$config['site']['server_path'].'config.lua and it\'s not valid TFS config.lua file. Go to STEP 1 - select other directory. If it\'s your config.lua file from TFS contact with acc. maker author.'; } } else { echo 'Can\'t load file config.lua from '.$config['site']['server_path'].'config.lua File doesn\'t exist in selected directory. Go to STEP 1 - select other directory.'; } } else { echo 'Please write you TFS directory below. Like: C:\Documents and Settings\Gesior\Desktop\TFS 0.3.6\ or /home/ots/tfs/ After install please delate all comments from config.lua Example: -- Account manager '; } } if($step == '2') { echo ' STEP '.$step.' Check database connection '; echo 'If you don\'t see any errors press link to STEP 3 - Add tables and columns to DB. If you see some errors it mean server has wrong configuration. Check FAQ or ask author of acc. maker.'; //load server config $config['server'] = parse_ini_file($config['site']['server_path'].'config.lua'); if(isset($config['server']['mysqlHost'])) { //new (0.2.6+) ots config.lua file $mysqlhost = $config['server']['mysqlHost']; $mysqluser = $config['server']['mysqlUser']; $mysqlpass = $config['server']['mysqlPass']; $mysqldatabase = $config['server']['mysqlDatabase']; } elseif(isset($config['server']['sqlHost'])) { //old (0.2.4) ots config.lua file $mysqlhost = $config['server']['sqlHost']; $mysqluser = $config['server']['sqlUser']; $mysqlpass = $config['server']['sqlPass']; $mysqldatabase = $config['server']['sqlDatabase']; } $sqlitefile = $config['server']['sqliteDatabase']; $passwordency = ''; if(strtolower($config['server']['useMD5Passwords']) == 'yes' || strtolower($config['server']['passwordType']) == 'md5') $passwordency = 'md5'; if(strtolower($config['server']['passwordType']) == 'sha1') $passwordency = 'sha1'; // loads #####POT mainfile##### include('pot/OTS.php'); $ots = POT::getInstance(); if(strtolower($config['server']['sqlType']) == "mysql") { try { $ots->connect(POT::DB_MYSQL, array('host' => $mysqlhost, 'user' => $mysqluser, 'password' => $mysqlpass, 'database' => $mysqldatabase) ); } catch(PDOException $error) { echo 'Database error - can\'t connect to MySQL database. Possible reasons: 1. MySQL server is not running on host. 2. MySQL user, password, database or host isn\'t configured in: '.$config['site']['server_path'].'config.lua . 3. MySQL user, password, database or host is wrong.'; exit; } } elseif(strtolower($config['server']['sqlType']) == "sqlite") { $link_to_sqlitedatabase = $config['site']['server_path'].$sqlitefile; try { $ots->connect(POT::DB_SQLITE, array('database' => $link_to_sqlitedatabase)); } catch(PDOException $error) { echo 'Database error - can\'t open SQLite database. Possible reasons: '.$link_to_sqlitedatabase.' - file isn\'t valid SQLite database. '.$link_to_sqlitedatabase.' - doesn\'t exist.'; exit; } } else { echo 'Database error. Unknown database type in '.$config['site']['server_path'].'config.lua . Must be equal to: "mysql" or "sqlite". Now is: "'.strtolower($config['server']['sqlType']).'"'; exit; } $SQL = POT::getInstance()->getDBHandle(); $config['site']['install'] = 3; saveconfig_ini($config['site']); } if($step == '3') { echo ' STEP '.$step.' Add tables and columns to DB '; echo 'Installer try to add new tables and columns to database. '; $config['server'] = parse_ini_file($config['site']['server_path'].'config.lua'); if($config['server']['sqlType'] == "sqlite") { try { $SQL->query('ALTER TABLE accounts ADD "key" VARCHAR(255) NOT NULL DEFAULT "";'); } catch(PDOException $error) {} try { $SQL->query('ALTER TABLE accounts ADD "page_lastday" INTEGER(11) NOT NULL DEFAULT 0;'); } catch(PDOException $error) {} try { $SQL->query('ALTER TABLE accounts ADD "email_new" VARCHAR(255) NOT NULL DEFAULT "";'); } catch(PDOException $error) {} try { $SQL->query('ALTER TABLE accounts ADD "email_new_time" INTEGER(15) NOT NULL DEFAULT 0;'); } catch(PDOException $error) {} try { $SQL->query('ALTER TABLE accounts ADD "created" INTEGER(11) NOT NULL DEFAULT 0;'); } catch(PDOException $error) {} try { $SQL->query('ALTER TABLE accounts ADD "rlname" VARCHAR(255) NOT NULL DEFAULT "";'); } catch(PDOException $error) {} try { $SQL->query('ALTER TABLE accounts ADD "location" VARCHAR(255) NOT NULL DEFAULT "";'); } catch(PDOException $error) {} try { $SQL->query('ALTER TABLE accounts ADD "page_access" INTEGER(11) NOT NULL DEFAULT 0;'); } catch(PDOException $error) {} try { $SQL->query('ALTER TABLE accounts ADD "email_code" VARCHAR(255) NOT NULL DEFAULT 0;'); } catch(PDOException $error) {} try { $SQL->query('ALTER TABLE accounts ADD "next_email" INTEGER(11) NOT NULL DEFAULT 0;'); } catch(PDOException $error) {} try { $SQL->query('ALTER TABLE accounts ADD "premium_points" INTEGER(11) NOT NULL DEFAULT 0;'); } catch(PDOException $error) {} echo "Added columns to table accounts. "; try { $SQL->query('ALTER TABLE guilds ADD "description" TEXT NOT NULL DEFAULT "";'); } catch(PDOException $error) {} try { $SQL->query('ALTER TABLE guilds ADD "logo_gfx_name" VARCHAR(255) NOT NULL DEFAULT "";'); } catch(PDOException $error) {} echo "Added columns to table guilds. "; try { $SQL->query('ALTER TABLE players ADD "online" INTEGER(11) NOT NULL DEFAULT 0;'); } catch(PDOException $error) {} try { $SQL->query('ALTER TABLE players ADD "created" INTEGER(11) NOT NULL DEFAULT 0;'); } catch(PDOException $error) {} try { $SQL->query('ALTER TABLE players ADD "nick_verify" INTEGER(11) NOT NULL DEFAULT 0;'); } catch(PDOException $error) {} try { $SQL->query('ALTER TABLE players ADD "old_name" VARCHAR(255) NOT NULL DEFAULT "";'); } catch(PDOException $error) {} try { $SQL->query('ALTER TABLE players ADD "hide_char" INTEGER(11) NOT NULL DEFAULT 0;'); } catch(PDOException $error) {} try { $SQL->query('ALTER TABLE players ADD "comment" TEXT NOT NULL DEFAULT "";'); } catch(PDOException $error) {} echo "Added columns to table players. "; try { $SQL->query('CREATE TABLE "z_news_tickers" ( "date" INTEGER NOT NULL, "author" INTEGER NOT NULL, "image_id" INTEGER NOT NULL DEFAULT 0, "text" TEXT NOT NULL, "hide_ticker" INTEGER NOT NULL DEFAULT 0);'); } catch(PDOException $error) {} echo "Added table z_news_tickers (tickers). "; try { $SQL->query('CREATE TABLE "z_spells" ( "name" VARCHAR(255) NOT NULL, "spell" VARCHAR(255) NOT NULL, "spell_type" VARCHAR(255) NOT NULL, "mana" INTEGER NOT NULL DEFAULT 0, "lvl" INTEGER NOT NULL DEFAULT 0, "mlvl" INTEGER NOT NULL DEFAULT 0, "soul" INTEGER NOT NULL DEFAULT 0, "pacc" VARCHAR(255) NOT NULL, "vocations" VARCHAR(255) NOT NULL, "conj_count" INTEGER NOT NULL DEFAULT 0, "hide_spell" INTEGER NOT NULL DEFAULT 0);'); } catch(PDOException $error) {} echo "Added table z_spells (spells list). "; try { $SQL->query('CREATE TABLE "z_monsters" ( "hide_creature" INTEGER NOT NULL DEFAULT 0, "name" VARCHAR(255) NOT NULL, "mana" INTEGER NOT NULL, "exp" INTEGER NOT NULL, "health" INTEGER NOT NULL, "speed_lvl" INTEGER NOT NULL DEFAULT 1, "use_haste" INTEGER NOT NULL, "voices" text NOT NULL, "immunities" VARCHAR(255) NOT NULL, "summonable" INTEGER NOT NULL, "convinceable" INTEGER NOT NULL, "race" VARCHAR(255) NOT NULL, "gfx_name" VARCHAR(255) NOT NULL)'); } catch(PDOException $error) {} echo "Added table z_monsters (monsters list). "; } elseif($config['server']['sqlType'] == "mysql") { echo " Add columns to table accounts "; try { $SQL->query("ALTER TABLE `accounts` ADD `page_lastday` INT( 11 ) NOT NULL;"); echo "Added column page_lastday to table accounts ";} catch(PDOException $error) { echo "Can't add column page_lastday to table accounts, already exist? ";} try { $SQL->query("ALTER TABLE `accounts` ADD `email_new` VARCHAR( 255 ) NOT NULL;"); echo "Added column email_new to table accounts ";} catch(PDOException $error) { echo "Can't add column email_new to table accounts, already exist? ";} try { $SQL->query("ALTER TABLE `accounts` ADD `email_new_time` INT( 15 ) NOT NULL;"); echo "Added column email_new_time to table accounts ";} catch(PDOException $error) { echo "Can't add column email_new_time to table accounts, already exist? ";} try { $SQL->query("ALTER TABLE `accounts` ADD `created` INT( 11 ) NOT NULL DEFAULT '0';"); echo "Added column created to table accounts ";} catch(PDOException $error) { echo "Can't add column created to table accounts, already exist? ";} try { $SQL->query("ALTER TABLE `accounts` ADD `rlname` VARCHAR( 255 ) NOT NULL DEFAULT '';"); echo "Added column rlname to table accounts ";} catch(PDOException $error) { echo "Can't add column rlname to table accounts, already exist? ";} try { $SQL->query("ALTER TABLE `accounts` ADD `location` VARCHAR( 255 ) NOT NULL DEFAULT '';"); echo "Added column location to table accounts ";} catch(PDOException $error) { echo "Can't add column location to table accounts, already exist? ";} try { $SQL->query("ALTER TABLE `accounts` ADD `page_access` INT( 11 ) NOT NULL DEFAULT '0';"); echo "Added column page_access to table accounts ";} catch(PDOException $error) { echo "Can't add column page_access to table accounts, already exist? ";} try { $SQL->query("ALTER TABLE `accounts` ADD `email_code` VARCHAR( 255 ) NOT NULL DEFAULT '0';"); echo "Added column email_code to table accounts ";} catch(PDOException $error) { echo "Can't add column email_code to table accounts, already exist? ";} try { $SQL->query("ALTER TABLE `accounts` ADD `next_email` INT( 11 ) NOT NULL DEFAULT '0';"); echo "Added column next_email to table accounts ";} catch(PDOException $error) { echo "Can't add column next_email to table accounts, already exist? ";} try { $SQL->query("ALTER TABLE `accounts` ADD `premium_points` INT( 11 ) NOT NULL DEFAULT '0';"); echo "Added column premium_points to table accounts ";} catch(PDOException $error) { echo "Can't add column premium_points to table accounts, already exist? ";} try { $SQL->query("ALTER TABLE `accounts` ADD `vote` INT( 11 ) NOT NULL;"); echo "Added column vote to table players ";} catch(PDOException $error) { echo "Can't add column vote to table players, already exist? ";} try { $SQL->query("ALTER TABLE `accounts` ADD `last_post` INT( 11 ) NOT NULL DEFAULT '0';"); echo "Added column last post to table accounts ";} catch(PDOException $error) { echo "Can't add column last posts to table accounts, already exist? ";} try { $SQL->query("ALTER TABLE `accounts` ADD `flag` VARCHAR( 255 ) NOT NULL;"); echo "Added column flag to table accounts ";} catch(PDOException $error) { echo "Can't add column flag to table accounts, already exist? ";} echo " Add columns to table guilds "; try { $SQL->query('ALTER TABLE `guilds` ADD `description` TEXT NOT NULL DEFAULT "";'); echo "Added column description to table guilds ";} catch(PDOException $error) { echo "Can't add column description to table guilds, already exist? ";} try { $SQL->query('ALTER TABLE `guilds` ADD `logo_gfx_name` VARCHAR( 255 ) NOT NULL DEFAULT "";'); echo "Added column logo_gfx_name to table guilds ";} catch(PDOException $error) { echo "Can't add column logo_gfx_name to table guilds, already exist? ";} echo " Add columns to table players "; try { $SQL->query("ALTER TABLE `players` ADD `created` INT( 11 ) NOT NULL DEFAULT '0';"); echo "Added column created to table players ";} catch(PDOException $error) { echo "Can't add column created to table players, already exist? ";} try { $SQL->query("ALTER TABLE `players` ADD `nick_verify` INT( 11 ) NOT NULL DEFAULT '0';"); echo "Added column nick_verify to table players ";} catch(PDOException $error) { echo "Can't add column nick_verify to table players, already exist? ";} try { $SQL->query("ALTER TABLE `players` ADD `old_name` VARCHAR( 255 ) NOT NULL DEFAULT '';"); echo "Added column old_name to table players ";} catch(PDOException $error) { echo "Can't add column old_name to table players, already exist? ";} try { $SQL->query("ALTER TABLE `players` ADD `hide_char` INT( 11 ) NOT NULL DEFAULT '0';"); echo "Added column hide_char to table players ";} catch(PDOException $error) { echo "Can't add column hide_char to table players, already exist? ";} try { $SQL->query("ALTER TABLE `players` ADD `worldtransfer` int(11) NOT NULL DEFAULT '0';"); echo "Added column worldtransfer to table players ";} catch(PDOException $error) { echo "Can't add column worldtransfer to table players, already exist? ";} try { $SQL->query("ALTER TABLE `players` ADD `comment` TEXT NOT NULL;"); echo "Added column comment to table players ";} catch(PDOException $error) { echo "Can't add column comment to table players, already exist? ";} try { $SQL->query("ALTER TABLE `players` ADD `show_outfit` TINYINT( 4 ) NOT NULL DEFAULT '1';"); echo "Added column show_outfit to table players ";} catch(PDOException $error) { echo "Can't add column comment to table players, already exist? ";} try { $SQL->query("ALTER TABLE `players` ADD `show_eq` TINYINT( 4 ) NOT NULL DEFAULT '1';"); echo "Added column show_eq to table players ";} catch(PDOException $error) { echo "Can't add column comment to table players, already exist? ";} try { $SQL->query("ALTER TABLE `players` ADD `show_bars` TINYINT( 4 ) NOT NULL DEFAULT '1';"); echo "Added column show_bars to table players ";} catch(PDOException $error) { echo "Can't add column comment to table players, already exist? ";} try { $SQL->query("ALTER TABLE `players` ADD `show_skills` TINYINT( 4 ) NOT NULL DEFAULT '1';"); echo "Added column show_skills to table players ";} catch(PDOException $error) { echo "Can't add column comment to table players, already exist? ";} try { $SQL->query("ALTER TABLE `players` ADD `show_quests` TINYINT( 4 ) NOT NULL DEFAULT '1';"); echo "Added column show_quests to table players ";} catch(PDOException $error) { echo "Can't add column comment to table players, already exist? ";} echo " Add new tables to database "; try { $SQL->query("CREATE TABLE `z_news_tickers` ( `date` int(11) NOT NULL default '1', `author` int(11) NOT NULL, `image_id` int(3) NOT NULL default '0', `text` text NOT NULL, `hide_ticker` tinyint(1) NOT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1;"); echo 'Added table z_news_tickers '; } catch(PDOException $error) { echo "Table z_news_tickers not added. Already exist? ";} try { $SQL->query('CREATE TABLE `z_spells` ( `name` VARCHAR(255) NOT NULL, `spell` VARCHAR(255) NOT NULL, `spell_type` VARCHAR(255) NOT NULL, `mana` INTEGER NOT NULL DEFAULT 0, `lvl` INTEGER NOT NULL DEFAULT 0, `mlvl` INTEGER NOT NULL DEFAULT 0, `soul` INTEGER NOT NULL DEFAULT 0, `pacc` VARCHAR(255) NOT NULL, `vocations` VARCHAR(255) NOT NULL, `conj_count` INTEGER NOT NULL DEFAULT 0, `hide_spell` INTEGER NOT NULL DEFAULT 0);'); echo 'Added table z_spells '; } catch(PDOException $error) { echo "Table z_spells not added. Already exist? ";} try { $SQL->query('CREATE TABLE `z_monsters` ( `hide_creature` tinyint(1) NOT NULL default \'0\', `name` varchar(255) NOT NULL, `mana` int(11) NOT NULL, `exp` int(11) NOT NULL, `health` int(11) NOT NULL, `speed_lvl` int(11) NOT NULL default \'1\', `use_haste` tinyint(1) NOT NULL, `voices` text NOT NULL, `immunities` varchar(255) NOT NULL, `summonable` tinyint(1) NOT NULL, `convinceable` tinyint(1) NOT NULL, `race` varchar(255) NOT NULL, `gfx_name` varchar(255) NOT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1;'); echo"Added table z_monsters "; } catch(PDOException $error) { echo "Table z_monsters not added. Already exist? ";} try { $SQL->query("CREATE TABLE `z_ots_comunication` ( `id` int(11) NOT NULL auto_increment, `name` varchar(255) NOT NULL, `type` varchar(255) NOT NULL, `action` varchar(255) NOT NULL, `param1` varchar(255) NOT NULL, `param2` varchar(255) NOT NULL, `param3` varchar(255) NOT NULL, `param4` varchar(255) NOT NULL, `param5` varchar(255) NOT NULL, `param6` varchar(255) NOT NULL, `param7` varchar(255) NOT NULL, `delete_it` int(2) NOT NULL default '1', PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1;"); echo "Added table z_ots_comunication (shopsystem). "; } catch(PDOException $error) { echo "Table z_ots_comunication not added. Already exist? ";} try { $SQL->query("CREATE TABLE `z_shop_offer` ( `id` int(11) NOT NULL auto_increment, `points` int(11) NOT NULL default '0', `itemid1` int(11) NOT NULL default '0', `count1` int(11) NOT NULL default '0', `itemid2` int(11) NOT NULL default '0', `count2` int(11) NOT NULL default '0', `offer_type` varchar(255) default NULL, `offer_description` text NOT NULL, `offer_name` varchar(255) NOT NULL, `pid` INT(11) NOT NULL DEFAULT '0', PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1;"); echo "Added table z_shop_offer (shopsystem). "; } catch(PDOException $error) { echo "Table z_shop_offer not added. Already exist? ";} try { $SQL->query("CREATE TABLE `z_shop_history_item` ( `id` int(11) NOT NULL auto_increment, `to_name` varchar(255) NOT NULL default '0', `to_account` int(11) NOT NULL default '0', `from_nick` varchar(255) NOT NULL, `from_account` int(11) NOT NULL default '0', `price` int(11) NOT NULL default '0', `offer_id` int(11) NOT NULL default '0', `trans_state` varchar(255) NOT NULL, `trans_start` int(11) NOT NULL default '0', `trans_real` int(11) NOT NULL default '0', PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1;"); echo "Added table z_shop_history_item (shopsystem). "; } catch(PDOException $error) { echo "Table z_shop_history_item not added. Already exist? ";} try { $SQL->query("CREATE TABLE `z_shop_history_pacc` ( `id` int(11) NOT NULL auto_increment, `to_name` varchar(255) NOT NULL default '0', `to_account` int(11) NOT NULL default '0', `from_nick` varchar(255) NOT NULL, `from_account` int(11) NOT NULL default '0', `price` int(11) NOT NULL default '0', `pacc_days` int(11) NOT NULL default '0', `trans_state` varchar(255) NOT NULL, `trans_start` int(11) NOT NULL default '0', `trans_real` int(11) NOT NULL default '0', PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1;"); echo "Added table z_shop_history_pacc (shopsystem). "; } catch(PDOException $error) { echo "Table z_shop_history_pacc not added. Already exist? ";} try { $SQL->query("CREATE TABLE `z_polls` ( `id` int(11) NOT NULL auto_increment, `question` varchar(255) NOT NULL, `end` int(11) NOT NULL, `start` int(11) NOT NULL, `answers` int(11) NOT NULL, `votes_all` int(11) NOT NULL, PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;"); echo "Added table z_polls (poll-system). "; } catch(PDOException $error) { echo "Table z_polls not added. Already exist? ";} try { $SQL->query("CREATE TABLE `z_polls_answers` ( `poll_id` int(11) NOT NULL, `answer_id` int(11) NOT NULL, `answer` varchar(255) NOT NULL, `votes` int(11) NOT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1;"); echo "Added table z_polls_answers (poll-system). "; } catch(PDOException $error) { echo "Table z_polls_answers not added. Already exist? ";} try { $SQL->query("CREATE TABLE `zaypay_payment` ( `payID` bigint(30) NOT NULL, `account_id` int(20) NOT NULL, `status` varchar(255) NOT NULL, PRIMARY KEY (`payID`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1;"); echo "Added table zaypay_payment. "; } catch(PDOException $error) { echo "Table zaypay_payment not added. Already exist? ";} try { $SQL->query("CREATE TABLE z_bug_tracker ( `account` varchar(255) NOT NULL, `type` int(11) NOT NULL, `status` int(11) NOT NULL, `text` text NOT NULL, `id` int(11) NOT NULL, `subject` varchar(255) NOT NULL, `priority` int(11) NOT NULL, `reply` int(11) NOT NULL, `who` int(11) NOT NULL, `uid` int(11) NOT NULL AUTO_INCREMENT, `tag` int(11) NOT NULL, PRIMARY KEY (uid) ) ENGINE=MyISAM DEFAULT CHARSET=latin1;"); echo "Added table z_bug_tracker (bug tracker). "; } catch(PDOException $error) { echo "Table z_bug_tracker not added. Already exist? ";} try { $SQL->query("CREATE TABLE `z_changelog` ( `id` int(11) NOT NULL auto_increment, `type` varchar(255) NOT NULL default '', `where` varchar(255) NOT NULL default '', `date` int(11) NOT NULL default '0', `description` varchar(255) NOT NULL, PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=0;"); echo "Added table z_changelog (changelog). "; } catch(PDOException $error) { echo "Table z_changelog not added. Already exist? ";} try { $SQL->query("CREATE TABLE `z_forum` ( `id` int(11) NOT NULL auto_increment, `sticky` tinyint(1) NOT NULL DEFAULT '0', `closed` tinyint(1) NOT NULL DEFAULT '0', `first_post` int(11) NOT NULL default '0', `last_post` int(11) NOT NULL default '0', `section` int(3) NOT NULL default '0', `icon_id` int(3) NOT NULL default '1', `replies` int(20) NOT NULL default '0', `views` int(20) NOT NULL default '0', `author_aid` int(20) NOT NULL default '0', `author_guid` int(20) NOT NULL default '0', `post_text` text NOT NULL, `post_topic` varchar(255) NOT NULL, `post_smile` tinyint(1) NOT NULL default '0', `post_date` int(20) NOT NULL default '0', `last_edit_aid` int(20) NOT NULL default '0', `edit_date` int(20) NOT NULL default '0', `post_ip` varchar(32) NOT NULL default '0.0.0.0', PRIMARY KEY (`id`), KEY `section` (`section`) ) ENGINE=MyISAM AUTO_INCREMENT=1;"); echo "Added table z_forum (forum). "; } catch(PDOException $error) { echo "Table z_forum not added. Already exist? ";} } $config['site']['install'] = 4; saveconfig_ini($config['site']); echo ' Tables and columns added to database. Go to STEP 4 - Add samples'; } if($step == '4') { echo ' STEP '.$step.' Add samples to DB: '; $check_news_ticker = $SQL->query('SELECT * FROM z_news_tickers WHERE image_id = 1 AND author = 1 AND hide_ticker = 0 LIMIT 1 OFFSET 0')->fetch(); if(!isset($check_news_ticker['author'])) { $SQL->query('INSERT INTO z_news_tickers (date, author, image_id, text, hide_ticker) VALUES ('.time().', 1, 1, "Bem vindo ao Gesior 0.3.8 Edited by Natan Beckman!", 0)'); echo "Added first news ticker. "; } else { echo "News ticker sample is already in database. New sample is not needed. "; } $check_voc_0 = $SQL->query('SELECT * FROM players WHERE name = "Rook Sample" LIMIT 1 OFFSET 0')->fetch(); if(!isset($check_voc_0['name'])) { $SQL->query('INSERT INTO `players` (`id`, `name`, `world_id`, `group_id`, `account_id`, `level`, `vocation`, `health`, `healthmax`, `experience`, `lookbody`, `lookfeet`, `lookhead`, `looklegs`, `looktype`, `lookaddons`, `maglevel`, `mana`, `manamax`, `manaspent`, `soul`, `town_id`, `posx`, `posy`, `posz`, `conditions`, `cap`, `sex`, `lastlogin`, `lastip`, `save`, `skull`, `skulltime`, `rank_id`, `guildnick`, `lastlogout`, `blessings`, `balance`, `stamina`, `direction`, `loss_experience`, `loss_mana`, `loss_skills`, `loss_containers`, `loss_items`, `premend`, `online`, `marriage`, `promotion`, `deleted`, `description`, `created`, `nick_verify`, `old_name`, `hide_char`, `comment`) VALUES (NULL, "Rook Sample", 0, 1, 1, 1, 0, 150, 150, 0, 0, 0, 0, 0, 110, 0, 0, 0, 0, 0, 0, 0, 50, 50, 7, "", 400, 0, 0, 0, 0, 0, 0, 0, "", 0, 0, 0, 201660000, 0, 100, 100, 100, 100, 100, 0, 0, 0, 0, 0, "", 0, 0, "", 0, "")'); echo "Added 'Rook Sample' character. "; } else { echo "Character 'Rook Sample' already in database. "; } $check_voc_1 = $SQL->query('SELECT * FROM players WHERE name = "Sorcerer Sample" LIMIT 1 OFFSET 0')->fetch(); if(!isset($check_voc_1['name'])) { $SQL->query('INSERT INTO `players` (`id`, `name`, `world_id`, `group_id`, `account_id`, `level`, `vocation`, `health`, `healthmax`, `experience`, `lookbody`, `lookfeet`, `lookhead`, `looklegs`, `looktype`, `lookaddons`, `maglevel`, `mana`, `manamax`, `manaspent`, `soul`, `town_id`, `posx`, `posy`, `posz`, `conditions`, `cap`, `sex`, `lastlogin`, `lastip`, `save`, `skull`, `skulltime`, `rank_id`, `guildnick`, `lastlogout`, `blessings`, `balance`, `stamina`, `direction`, `loss_experience`, `loss_mana`, `loss_skills`, `loss_containers`, `loss_items`, `premend`, `online`, `marriage`, `promotion`, `deleted`, `description`, `created`, `nick_verify`, `old_name`, `hide_char`, `comment`) VALUES (NULL, "Sorcerer Sample", 0, 1, 1, 1, 1, 150, 150, 0, 0, 0, 0, 0, 110, 0, 0, 0, 0, 0, 0, 0, 50, 50, 7, "", 400, 0, 0, 0, 0, 0, 0, 0, "", 0, 0, 0, 201660000, 0, 100, 100, 100, 100, 100, 0, 0, 0, 0, 0, "", 0, 0, "", 0, "")'); echo "Added 'Sorcerer Sample' character. "; } else { echo "Character 'Sorcerer Sample' already in database. "; } $check_voc_2 = $SQL->query('SELECT * FROM players WHERE name = "Druid Sample" LIMIT 1 OFFSET 0')->fetch(); if(!isset($check_voc_2['name'])) { $SQL->query('INSERT INTO `players` (`id`, `name`, `world_id`, `group_id`, `account_id`, `level`, `vocation`, `health`, `healthmax`, `experience`, `lookbody`, `lookfeet`, `lookhead`, `looklegs`, `looktype`, `lookaddons`, `maglevel`, `mana`, `manamax`, `manaspent`, `soul`, `town_id`, `posx`, `posy`, `posz`, `conditions`, `cap`, `sex`, `lastlogin`, `lastip`, `save`, `skull`, `skulltime`, `rank_id`, `guildnick`, `lastlogout`, `blessings`, `balance`, `stamina`, `direction`, `loss_experience`, `loss_mana`, `loss_skills`, `loss_containers`, `loss_items`, `premend`, `online`, `marriage`, `promotion`, `deleted`, `description`, `created`, `nick_verify`, `old_name`, `hide_char`, `comment`) VALUES (NULL, "Druid Sample", 0, 1, 1, 1, 2, 150, 150, 0, 0, 0, 0, 0, 110, 0, 0, 0, 0, 0, 0, 0, 50, 50, 7, "", 400, 0, 0, 0, 0, 0, 0, 0, "", 0, 0, 0, 201660000, 0, 100, 100, 100, 100, 100, 0, 0, 0, 0, 0, "", 0, 0, "", 0, "")'); echo "Added 'Druid Sample' character. "; } else { echo "Character 'Druid Sample' already in database. "; } $check_voc_3 = $SQL->query('SELECT * FROM players WHERE name = "Paladin Sample" LIMIT 1 OFFSET 0')->fetch(); if(!isset($check_voc_3['name'])) { $SQL->query('INSERT INTO `players` (`id`, `name`, `world_id`, `group_id`, `account_id`, `level`, `vocation`, `health`, `healthmax`, `experience`, `lookbody`, `lookfeet`, `lookhead`, `looklegs`, `looktype`, `lookaddons`, `maglevel`, `mana`, `manamax`, `manaspent`, `soul`, `town_id`, `posx`, `posy`, `posz`, `conditions`, `cap`, `sex`, `lastlogin`, `lastip`, `save`, `skull`, `skulltime`, `rank_id`, `guildnick`, `lastlogout`, `blessings`, `balance`, `stamina`, `direction`, `loss_experience`, `loss_mana`, `loss_skills`, `loss_containers`, `loss_items`, `premend`, `online`, `marriage`, `promotion`, `deleted`, `description`, `created`, `nick_verify`, `old_name`, `hide_char`, `comment`) VALUES (NULL, "Paladin Sample", 0, 1, 1, 1, 3, 150, 150, 0, 0, 0, 0, 0, 110, 0, 0, 0, 0, 0, 0, 0, 50, 50, 7, "", 400, 0, 0, 0, 0, 0, 0, 0, "", 0, 0, 0, 201660000, 0, 100, 100, 100, 100, 100, 0, 0, 0, 0, 0, "", 0, 0, "", 0, "")'); echo "Added 'Paladin Sample' character. "; } else { echo "Character 'Paladin Sample' already in database. "; } $check_voc_4 = $SQL->query('SELECT * FROM players WHERE name = "Knight Sample" LIMIT 1 OFFSET 0')->fetch(); if(!isset($check_voc_4['name'])) { $SQL->query('INSERT INTO `players` (`id`, `name`, `world_id`, `group_id`, `account_id`, `level`, `vocation`, `health`, `healthmax`, `experience`, `lookbody`, `lookfeet`, `lookhead`, `looklegs`, `looktype`, `lookaddons`, `maglevel`, `mana`, `manamax`, `manaspent`, `soul`, `town_id`, `posx`, `posy`, `posz`, `conditions`, `cap`, `sex`, `lastlogin`, `lastip`, `save`, `skull`, `skulltime`, `rank_id`, `guildnick`, `lastlogout`, `blessings`, `balance`, `stamina`, `direction`, `loss_experience`, `loss_mana`, `loss_skills`, `loss_containers`, `loss_items`, `premend`, `online`, `marriage`, `promotion`, `deleted`, `description`, `created`, `nick_verify`, `old_name`, `hide_char`, `comment`) VALUES (NULL, "Knight Sample", 0, 1, 1, 1, 4, 150, 150, 0, 0, 0, 0, 0, 110, 0, 0, 0, 0, 0, 0, 0, 50, 50, 7, "", 400, 0, 0, 0, 0, 0, 0, 0, "", 0, 0, 0, 201660000, 0, 100, 100, 100, 100, 100, 0, 0, 0, 0, 0, "", 0, 0, "", 0, "")'); echo "Added 'Knight Sample' character. "; echo 'All samples added to database. Now you can go to STEP 5 - Set Admin Account'; } else { echo "Character 'Knight Sample' already in database. "; $config['site']['install'] = 5; saveconfig_ini($config['site']); echo 'All samples added to database. Now you can go to STEP 5 - Set Admin Account '; } } if($step == '5') { echo ' STEP '.$step.' Set Admin Account '; $config['server'] = parse_ini_file($config['site']['server_path'].'config.lua'); if(empty($_REQUEST['saveaccpassword'])) { echo 'Admin account number is: 1 Set new password to this account. '; echo 'New password: (Don\'t give it password to anyone!)'; echo ' If account with number 1 doesn\'t exist installator will create it and set your password.'; } else { $newpass = $_POST['newpass']; if(!check_password($newpass)) echo 'Password contains illegal characters. Please use only a-Z and 0-9. GO BACK and write other password.'; else { $newpass_to_db = password_ency($newpass); $account = new OTS_Account(); $account->load(1); if($account->isLoaded()) { $account->setPassword($newpass_to_db); $account->save(); $account->setCustomField("page_access", 3); } else { $number = $account->create(1,1,1); $account->setPassword($newpass_to_db); $account->unblock(); $account->save(); $account->setCustomField("page_access", 3); } $_SESSION['account'] = 1; $_SESSION['password'] = $newpass; $logged = TRUE; $account->setCustomField("page_lastday", time()); echo ' Admin account number: 1 Admin account password: '.$_POST['newpass'].' It\'s end of first part of installation. Installation is blocked. From now don\'t modify file config.ini! Press links to STEPs 6 and 7 in menu. '; $config['site']['install'] = 'no'; saveconfig_ini($config['site']); } } } } else echo "Account maker is already installed! To reinstall open file 'config.ini' in directory 'config' and change: install = \"no\" to: install = \"start\" and enter this site again."; } ?>

Link para o post
Compartilhar em outros sites
  • Respostas 12
  • Created
  • Última resposta

Top Posters In This Topic

Top Posters In This Topic

vc ta acessando pelo localhost ne para instalar o site?

vc trocou o php.ini?

 

coloca esse aqui no install.php

 

$config['site'] = parse_ini_file('config/config.ini');


session_start();
//save config in ini file
function saveconfig_ini($config) {
$file = fopen("config/config.ini", "w");
foreach($config as $param => $data) {
$file_data .= $param.' = "'.str_replace('"', '', $data).'"
';
}
rewind($file);
fwrite($file, $file_data);
fclose($file);
}

function check_password($pass)
{
$temp = strspn("$pass", "qwertyuiopasdfghjklzxcvbnmQWERTYUIOPASDFGHJKLZXCVBNM1234567890");
if ($temp != strlen($pass)) {
return false;
}
else
{
$ok = "/[a-zA-Z0-9]{1,40}/";
return (preg_match($ok, $pass))? true: false;
}
}

function password_ency($password)
{
$ency = $GLOBALS['passwordency'];
if($ency == 'sha1')
return sha1($password);
elseif($ency == 'md5')
return md5($password);
elseif($ency == '')
return $password;
}

if($_REQUEST['page'] == '' && !isset($_REQUEST['step']))
echo '







&lt;cke:body&gt;Frames don\'t work. Install Firefox :P&lt;/cke:body&gt;

';
if($_REQUEST['page'] == 'menu')
echo '

MENU

IF NOT INSTALLED:

Hidden Content

    Give reaction to this post to see the hidden content.


Hidden Content

    Give reaction to this post to see the hidden content.


Hidden Content

    Give reaction to this post to see the hidden content.


Hidden Content

    Give reaction to this post to see the hidden content.


Hidden Content

    Give reaction to this post to see the hidden content.


Hidden Content

    Give reaction to this post to see the hidden content.


FOR ADMINS:

Hidden Content

    Give reaction to this post to see the hidden content.


Hidden Content

    Give reaction to this post to see the hidden content.

';
if($_REQUEST['page'] == 'step') {
if($config['site']['install'] != "no") {
if($_REQUEST['server_conf'] == 'yes' || ($_REQUEST['step'] > 2 && $_REQUEST['step'] < 6)) {
$config['server'] = parse_ini_file($config['site']['server_path'].'config.lua');
if(isset($config['server']['mysqlHost'])) {
$mysqlhost = $config['server']['mysqlHost'];
$mysqluser = $config['server']['mysqlUser'];
$mysqlpass = $config['server']['mysqlPass'];
$mysqldatabase = $config['server']['mysqlDatabase'];
}
elseif(isset($config['server']['sqlHost'])) {
$mysqlhost = $config['server']['sqlHost'];
$mysqluser = $config['server']['sqlUser'];
$mysqlpass = $config['server']['sqlPass'];
$mysqldatabase = $config['server']['sqlDatabase'];
}
$sqlitefile = $config['server']['sqliteDatabase'];
$passwordency = '';
if(strtolower($config['server']['useMD5Passwords']) == 'yes' || strtolower($config['server']['passwordType']) == 'md5')
$passwordency = 'md5';
if(strtolower($config['server']['passwordType']) == 'sha1')
$passwordency = 'sha1';
// loads #####POT mainfile#####
include('pot/OTS.php');
// PDO and POT connects to database
$ots = POT::getInstance();
if(strtolower($config['server']['sqlType']) == "mysql") {
try {
$ots->connect(POT::DB_MYSQL, array('host' => $mysqlhost, 'user' => $mysqluser, 'password' => $mysqlpass, 'database' => $mysqldatabase) );
}
catch(PDOException $error) {
echo 'Database error - can\'t connect to MySQL database. Possible reasons:
1. MySQL server is not running on host.
2. MySQL user, password, database or host isn\'t configured in: '.$config['site']['server_path'].'config.lua .
3. MySQL user, password, database or host is wrong.';
exit;
}
}
elseif(strtolower($config['server']['sqlType']) == "sqlite") {
$link_to_sqlitedatabase = $config['site']['server_path'].$sqlitefile;
try {
$ots->connect(POT::DB_SQLITE, array('database' => $link_to_sqlitedatabase));
}
catch(PDOException $error) {
echo 'Database error - can\'t open SQLite database. Possible reasons:
'.$link_to_sqlitedatabase.' - file isn\'t valid SQLite database.
'.$link_to_sqlitedatabase.' - doesn\'t exist.';
exit;
}
} else {
echo 'Database error. Unknown database type in '.$config['site']['server_path'].'config.lua . Must be equal to: "mysql" or "sqlite". Now is: "'.strtolower($config['server']['sqlType']).'"';
exit;
}
$SQL = POT::getInstance()->getDBHandle();
}
$step = $_REQUEST['step'];
if(empty($step))
$step = $config['site']['install'];
if($step == 'start') {
echo '

STEP '.$step.'

Informations
';
echo 'Bem vindo ao Gesior ACC 0.3.8! First do steps 1-5 one by one, later (when you will be logged on admin account) press on links to steps 6-8 to load configuration from OTS.';
}
if($step == '1') {
if(isset($_REQUEST['server_path'])) {
echo '

STEP '.$step.'

Check server configuration
';
$config['site']['server_path'] = $_REQUEST['server_path'];
$config['site']['server_path'] = trim($config['site']['server_path'])."\\";
$config['site']['server_path'] = str_replace("\\\\", "/", $config['site']['server_path']);
$config['site']['server_path'] = str_replace("\\", "/", $config['site']['server_path']);
$config['site']['server_path'] = str_replace("//", "/", $config['site']['server_path']);
saveconfig_ini($config['site']);
if(file_exists($config['site']['server_path'].'config.lua')) {
$config['server'] = parse_ini_file($config['site']['server_path'].'config.lua');
if(isset($config['server']['sqlType'])) {
$config['site']['install'] = 2;
saveconfig_ini($config['site']);
echo 'File config.lua loaded from '.$config['site']['server_path'].'config.lua and looks like fine server config file. Now you can check database('.$config['server']['sqlType'].') connection:

Hidden Content

    Give reaction to this post to see the hidden content.
';
}
else
{
echo 'File config.lua loaded from '.$config['site']['server_path'].'config.lua and it\'s not valid TFS config.lua file.

Hidden Content

    Give reaction to this post to see the hidden content.
If it\'s your config.lua file from TFS contact with acc. maker author.';
}
}
else
{
echo 'Can\'t load file config.lua from '.$config['site']['server_path'].'config.lua File doesn\'t exist in selected directory.

Hidden Content

    Give reaction to this post to see the hidden content.
';
}
}
else
{
echo 'Please write you TFS directory below. Like: C:\Documents and Settings\Gesior\Desktop\TFS 0.3.6\ or /home/ots/tfs/

After install please delate all comments from config.lua

Example:

-- Account manager
 

';
}
}
if($step == '2') {
echo '

STEP '.$step.'

Check database connection
';
echo 'If you don\'t see any errors press

Hidden Content

    Give reaction to this post to see the hidden content.
. If you see some errors it mean server has wrong configuration. Check FAQ or ask author of acc. maker.';
//load server config
$config['server'] = parse_ini_file($config['site']['server_path'].'config.lua');
if(isset($config['server']['mysqlHost'])) {
//new (0.2.6+) ots config.lua file
$mysqlhost = $config['server']['mysqlHost'];
$mysqluser = $config['server']['mysqlUser'];
$mysqlpass = $config['server']['mysqlPass'];
$mysqldatabase = $config['server']['mysqlDatabase'];
}
elseif(isset($config['server']['sqlHost'])) {
//old (0.2.4) ots config.lua file
$mysqlhost = $config['server']['sqlHost'];
$mysqluser = $config['server']['sqlUser'];
$mysqlpass = $config['server']['sqlPass'];
$mysqldatabase = $config['server']['sqlDatabase'];
}
$sqlitefile = $config['server']['sqliteDatabase'];
$passwordency = '';
if(strtolower($config['server']['useMD5Passwords']) == 'yes' || strtolower($config['server']['passwordType']) == 'md5')
$passwordency = 'md5';
if(strtolower($config['server']['passwordType']) == 'sha1')
$passwordency = 'sha1';
// loads #####POT mainfile#####
include('pot/OTS.php');
$ots = POT::getInstance();
if(strtolower($config['server']['sqlType']) == "mysql") {
try {
$ots->connect(POT::DB_MYSQL, array('host' => $mysqlhost, 'user' => $mysqluser, 'password' => $mysqlpass, 'database' => $mysqldatabase) );
}
catch(PDOException $error) {
echo 'Database error - can\'t connect to MySQL database. Possible reasons:
1. MySQL server is not running on host.
2. MySQL user, password, database or host isn\'t configured in: '.$config['site']['server_path'].'config.lua .
3. MySQL user, password, database or host is wrong.';
exit;
}
}
elseif(strtolower($config['server']['sqlType']) == "sqlite") {
$link_to_sqlitedatabase = $config['site']['server_path'].$sqlitefile;
try {
$ots->connect(POT::DB_SQLITE, array('database' => $link_to_sqlitedatabase));
}
catch(PDOException $error) {
echo 'Database error - can\'t open SQLite database. Possible reasons:
'.$link_to_sqlitedatabase.' - file isn\'t valid SQLite database.
'.$link_to_sqlitedatabase.' - doesn\'t exist.';
exit;
}
}
else
{
echo 'Database error. Unknown database type in '.$config['site']['server_path'].'config.lua . Must be equal to: "mysql" or "sqlite". Now is: "'.strtolower($config['server']['sqlType']).'"';
exit;
}
$SQL = POT::getInstance()->getDBHandle();
$config['site']['install'] = 3;
saveconfig_ini($config['site']);
}
if($step == '3') {
echo '

STEP '.$step.'

Add tables and columns to DB
';
echo 'Installer try to add new tables and columns to database.
';
$config['server'] = parse_ini_file($config['site']['server_path'].'config.lua');
if($config['server']['sqlType'] == "sqlite") {
try { $SQL->query('ALTER TABLE accounts ADD "key" VARCHAR(255) NOT NULL DEFAULT "";'); } catch(PDOException $error) {}
try { $SQL->query('ALTER TABLE accounts ADD "page_lastday" INTEGER(11) NOT NULL DEFAULT 0;'); } catch(PDOException $error) {}
try { $SQL->query('ALTER TABLE accounts ADD "email_new" VARCHAR(255) NOT NULL DEFAULT "";'); } catch(PDOException $error) {}
try { $SQL->query('ALTER TABLE accounts ADD "email_new_time" INTEGER(15) NOT NULL DEFAULT 0;'); } catch(PDOException $error) {}
try { $SQL->query('ALTER TABLE accounts ADD "created" INTEGER(11) NOT NULL DEFAULT 0;'); } catch(PDOException $error) {}
try { $SQL->query('ALTER TABLE accounts ADD "rlname" VARCHAR(255) NOT NULL DEFAULT "";'); } catch(PDOException $error) {}
try { $SQL->query('ALTER TABLE accounts ADD "location" VARCHAR(255) NOT NULL DEFAULT "";'); } catch(PDOException $error) {}
try { $SQL->query('ALTER TABLE accounts ADD "page_access" INTEGER(11) NOT NULL DEFAULT 0;'); } catch(PDOException $error) {}
try { $SQL->query('ALTER TABLE accounts ADD "email_code" VARCHAR(255) NOT NULL DEFAULT 0;'); } catch(PDOException $error) {}
try { $SQL->query('ALTER TABLE accounts ADD "next_email" INTEGER(11) NOT NULL DEFAULT 0;'); } catch(PDOException $error) {}
try { $SQL->query('ALTER TABLE accounts ADD "premium_points" INTEGER(11) NOT NULL DEFAULT 0;'); } catch(PDOException $error) {}
echo "Added columns to table accounts.
";
try { $SQL->query('ALTER TABLE guilds ADD "description" TEXT NOT NULL DEFAULT "";'); } catch(PDOException $error) {}
try { $SQL->query('ALTER TABLE guilds ADD "logo_gfx_name" VARCHAR(255) NOT NULL DEFAULT "";'); } catch(PDOException $error) {}
echo "Added columns to table guilds.
";
try { $SQL->query('ALTER TABLE players ADD "online" INTEGER(11) NOT NULL DEFAULT 0;'); } catch(PDOException $error) {}
try { $SQL->query('ALTER TABLE players ADD "created" INTEGER(11) NOT NULL DEFAULT 0;'); } catch(PDOException $error) {}
try { $SQL->query('ALTER TABLE players ADD "nick_verify" INTEGER(11) NOT NULL DEFAULT 0;'); } catch(PDOException $error) {}
try { $SQL->query('ALTER TABLE players ADD "old_name" VARCHAR(255) NOT NULL DEFAULT "";'); } catch(PDOException $error) {}
try { $SQL->query('ALTER TABLE players ADD "hide_char" INTEGER(11) NOT NULL DEFAULT 0;'); } catch(PDOException $error) {}
try { $SQL->query('ALTER TABLE players ADD "comment" TEXT NOT NULL DEFAULT "";'); } catch(PDOException $error) {}
echo "Added columns to table players.
";
try { $SQL->query('CREATE TABLE "z_news_tickers" (
"date" INTEGER NOT NULL,
"author" INTEGER NOT NULL,
"image_id" INTEGER NOT NULL DEFAULT 0,
"text" TEXT NOT NULL,
"hide_ticker" INTEGER NOT NULL DEFAULT 0);'); } catch(PDOException $error) {}
echo "Added table z_news_tickers (tickers).
";
try { $SQL->query('CREATE TABLE "z_spells" (
"name" VARCHAR(255) NOT NULL,
"spell" VARCHAR(255) NOT NULL,
"spell_type" VARCHAR(255) NOT NULL,
"mana" INTEGER NOT NULL DEFAULT 0,
"lvl" INTEGER NOT NULL DEFAULT 0,
"mlvl" INTEGER NOT NULL DEFAULT 0,
"soul" INTEGER NOT NULL DEFAULT 0,
"pacc" VARCHAR(255) NOT NULL,
"vocations" VARCHAR(255) NOT NULL,
"conj_count" INTEGER NOT NULL DEFAULT 0,
"hide_spell" INTEGER NOT NULL DEFAULT 0);'); } catch(PDOException $error) {}
echo "Added table z_spells (spells list).
";
try { $SQL->query('CREATE TABLE "z_monsters" (
"hide_creature" INTEGER NOT NULL DEFAULT 0,
"name" VARCHAR(255) NOT NULL,
"mana" INTEGER NOT NULL,
"exp" INTEGER NOT NULL,
"health" INTEGER NOT NULL,
"speed_lvl" INTEGER NOT NULL DEFAULT 1,
"use_haste" INTEGER NOT NULL,
"voices" text NOT NULL,
"immunities" VARCHAR(255) NOT NULL,
"summonable" INTEGER NOT NULL,
"convinceable" INTEGER NOT NULL,
"race" VARCHAR(255) NOT NULL,
"gfx_name" VARCHAR(255) NOT NULL)'); } catch(PDOException $error) {}
echo "Added table z_monsters (monsters list).
";
}
elseif($config['server']['sqlType'] == "mysql") {
echo "

Add columns to table accounts

";
try { $SQL->query("ALTER TABLE `accounts` ADD `page_lastday` INT( 11 ) NOT NULL;"); echo "Added column page_lastday to table accounts
";} catch(PDOException $error) { echo "Can't add column page_lastday to table accounts, already exist?
";}
try { $SQL->query("ALTER TABLE `accounts` ADD `email_new` VARCHAR( 255 ) NOT NULL;"); echo "Added column email_new to table accounts
";} catch(PDOException $error) { echo "Can't add column email_new to table accounts, already exist?
";}
try { $SQL->query("ALTER TABLE `accounts` ADD `email_new_time` INT( 15 ) NOT NULL;"); echo "Added column email_new_time to table accounts
";} catch(PDOException $error) { echo "Can't add column email_new_time to table accounts, already exist?
";}
try { $SQL->query("ALTER TABLE `accounts` ADD `created` INT( 11 ) NOT NULL DEFAULT '0';"); echo "Added column created to table accounts
";} catch(PDOException $error) { echo "Can't add column created to table accounts, already exist?
";}
try { $SQL->query("ALTER TABLE `accounts` ADD `rlname` VARCHAR( 255 ) NOT NULL DEFAULT '';"); echo "Added column rlname to table accounts
";} catch(PDOException $error) { echo "Can't add column rlname to table accounts, already exist?
";}
try { $SQL->query("ALTER TABLE `accounts` ADD `location` VARCHAR( 255 ) NOT NULL DEFAULT '';"); echo "Added column location to table accounts
";} catch(PDOException $error) { echo "Can't add column location to table accounts, already exist?
";}
try { $SQL->query("ALTER TABLE `accounts` ADD `page_access` INT( 11 ) NOT NULL DEFAULT '0';"); echo "Added column page_access to table accounts
";} catch(PDOException $error) { echo "Can't add column page_access to table accounts, already exist?
";}
try { $SQL->query("ALTER TABLE `accounts` ADD `email_code` VARCHAR( 255 ) NOT NULL DEFAULT '0';"); echo "Added column email_code to table accounts
";} catch(PDOException $error) { echo "Can't add column email_code to table accounts, already exist?
";}
try { $SQL->query("ALTER TABLE `accounts` ADD `next_email` INT( 11 ) NOT NULL DEFAULT '0';"); echo "Added column next_email to table accounts
";} catch(PDOException $error) { echo "Can't add column next_email to table accounts, already exist?
";}
try { $SQL->query("ALTER TABLE `accounts` ADD `premium_points` INT( 11 ) NOT NULL DEFAULT '0';"); echo "Added column premium_points to table accounts
";} catch(PDOException $error) { echo "Can't add column premium_points to table accounts, already exist?
";}
try { $SQL->query("ALTER TABLE `accounts` ADD `vote` INT( 11 ) NOT NULL;"); echo "Added column vote to table players
";} catch(PDOException $error) { echo "Can't add column vote to table players, already exist?
";}
try { $SQL->query("ALTER TABLE `accounts` ADD `last_post` INT( 11 ) NOT NULL DEFAULT '0';"); echo "Added column last post to table accounts
";} catch(PDOException $error) { echo "Can't add column last posts to table accounts, already exist?
";}
try { $SQL->query("ALTER TABLE `accounts` ADD `flag` VARCHAR( 255 ) NOT NULL;"); echo "Added column flag to table accounts
";} catch(PDOException $error) { echo "Can't add column flag to table accounts, already exist?
";}
echo "

Add columns to table guilds

";
try { $SQL->query('ALTER TABLE `guilds` ADD `description` TEXT NOT NULL DEFAULT "";'); echo "Added column description to table guilds
";} catch(PDOException $error) { echo "Can't add column description to table guilds, already exist?
";}
try { $SQL->query('ALTER TABLE `guilds` ADD `logo_gfx_name` VARCHAR( 255 ) NOT NULL DEFAULT "";'); echo "Added column logo_gfx_name to table guilds
";} catch(PDOException $error) { echo "Can't add column logo_gfx_name to table guilds, already exist?
";}
echo "

Add columns to table players

";
try { $SQL->query("ALTER TABLE `players` ADD `created` INT( 11 ) NOT NULL DEFAULT '0';"); echo "Added column created to table players
";} catch(PDOException $error) { echo "Can't add column created to table players, already exist?
";}
try { $SQL->query("ALTER TABLE `players` ADD `nick_verify` INT( 11 ) NOT NULL DEFAULT '0';"); echo "Added column nick_verify to table players
";} catch(PDOException $error) { echo "Can't add column nick_verify to table players, already exist?
";}
try { $SQL->query("ALTER TABLE `players` ADD `old_name` VARCHAR( 255 ) NOT NULL DEFAULT '';"); echo "Added column old_name to table players
";} catch(PDOException $error) { echo "Can't add column old_name to table players, already exist?
";}
try { $SQL->query("ALTER TABLE `players` ADD `hide_char` INT( 11 ) NOT NULL DEFAULT '0';"); echo "Added column hide_char to table players
";} catch(PDOException $error) { echo "Can't add column hide_char to table players, already exist?
";}
try { $SQL->query("ALTER TABLE `players` ADD `worldtransfer` int(11) NOT NULL DEFAULT '0';"); echo "Added column worldtransfer to table players
";} catch(PDOException $error) { echo "Can't add column worldtransfer to table players, already exist?
";}
try { $SQL->query("ALTER TABLE `players` ADD `comment` TEXT NOT NULL;"); echo "Added column comment to table players
";} catch(PDOException $error) { echo "Can't add column comment to table players, already exist?
";}
try { $SQL->query("ALTER TABLE `players` ADD `show_outfit` TINYINT( 4 ) NOT NULL DEFAULT '1';"); echo "Added column show_outfit to table players
";} catch(PDOException $error) { echo "Can't add column comment to table players, already exist?
";}
try { $SQL->query("ALTER TABLE `players` ADD `show_eq` TINYINT( 4 ) NOT NULL DEFAULT '1';"); echo "Added column show_eq to table players
";} catch(PDOException $error) { echo "Can't add column comment to table players, already exist?
";}
try { $SQL->query("ALTER TABLE `players` ADD `show_bars` TINYINT( 4 ) NOT NULL DEFAULT '1';"); echo "Added column show_bars to table players
";} catch(PDOException $error) { echo "Can't add column comment to table players, already exist?
";}
try { $SQL->query("ALTER TABLE `players` ADD `show_skills` TINYINT( 4 ) NOT NULL DEFAULT '1';"); echo "Added column show_skills to table players
";} catch(PDOException $error) { echo "Can't add column comment to table players, already exist?
";}
try { $SQL->query("ALTER TABLE `players` ADD `show_quests` TINYINT( 4 ) NOT NULL DEFAULT '1';"); echo "Added column show_quests to table players
";} catch(PDOException $error) { echo "Can't add column comment to table players, already exist?
";}
echo "

Add new tables to database

";
try { $SQL->query("CREATE TABLE `z_news_tickers` (
`date` int(11) NOT NULL default '1',
`author` int(11) NOT NULL,
`image_id` int(3) NOT NULL default '0',
`text` text NOT NULL,
`hide_ticker` tinyint(1) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;");
echo 'Added table z_news_tickers
';
} catch(PDOException $error) { echo "Table z_news_tickers not added. Already exist?
";}
try { $SQL->query('CREATE TABLE `z_spells` (
`name` VARCHAR(255) NOT NULL,
`spell` VARCHAR(255) NOT NULL,
`spell_type` VARCHAR(255) NOT NULL,
`mana` INTEGER NOT NULL DEFAULT 0,
`lvl` INTEGER NOT NULL DEFAULT 0,
`mlvl` INTEGER NOT NULL DEFAULT 0,
`soul` INTEGER NOT NULL DEFAULT 0,
`pacc` VARCHAR(255) NOT NULL,
`vocations` VARCHAR(255) NOT NULL,
`conj_count` INTEGER NOT NULL DEFAULT 0,
`hide_spell` INTEGER NOT NULL DEFAULT 0);');
echo 'Added table z_spells
';
} catch(PDOException $error) { echo "Table z_spells not added. Already exist?
";}
try { $SQL->query('CREATE TABLE `z_monsters` (
`hide_creature` tinyint(1) NOT NULL default \'0\',
`name` varchar(255) NOT NULL,
`mana` int(11) NOT NULL,
`exp` int(11) NOT NULL,
`health` int(11) NOT NULL,
`speed_lvl` int(11) NOT NULL default \'1\',
`use_haste` tinyint(1) NOT NULL,
`voices` text NOT NULL,
`immunities` varchar(255) NOT NULL,
`summonable` tinyint(1) NOT NULL,
`convinceable` tinyint(1) NOT NULL,
`race` varchar(255) NOT NULL,
`gfx_name` varchar(255) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;');
echo"Added table z_monsters
";
} catch(PDOException $error) { echo "Table z_monsters not added. Already exist?
";}
try { $SQL->query("CREATE TABLE `z_ots_comunication` (
`id` int(11) NOT NULL auto_increment,
`name` varchar(255) NOT NULL,
`type` varchar(255) NOT NULL,
`action` varchar(255) NOT NULL,
`param1` varchar(255) NOT NULL,
`param2` varchar(255) NOT NULL,
`param3` varchar(255) NOT NULL,
`param4` varchar(255) NOT NULL,
`param5` varchar(255) NOT NULL,
`param6` varchar(255) NOT NULL,
`param7` varchar(255) NOT NULL,
`delete_it` int(2) NOT NULL default '1',
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;");
echo "Added table z_ots_comunication (shopsystem).
";
}
catch(PDOException $error) { echo "Table z_ots_comunication not added. Already exist?
";}
try { $SQL->query("CREATE TABLE `z_shop_offer` (
`id` int(11) NOT NULL auto_increment,
`points` int(11) NOT NULL default '0',
`itemid1` int(11) NOT NULL default '0',
`count1` int(11) NOT NULL default '0',
`itemid2` int(11) NOT NULL default '0',
`count2` int(11) NOT NULL default '0',
`offer_type` varchar(255) default NULL,
`offer_description` text NOT NULL,
`offer_name` varchar(255) NOT NULL,
`pid` INT(11) NOT NULL DEFAULT '0',
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1;");
echo "Added table z_shop_offer (shopsystem).
";
}
catch(PDOException $error) { echo "Table z_shop_offer not added. Already exist?
";}
try { $SQL->query("CREATE TABLE `z_shop_history_item` (
`id` int(11) NOT NULL auto_increment,
`to_name` varchar(255) NOT NULL default '0',
`to_account` int(11) NOT NULL default '0',
`from_nick` varchar(255) NOT NULL,
`from_account` int(11) NOT NULL default '0',
`price` int(11) NOT NULL default '0',
`offer_id` int(11) NOT NULL default '0',
`trans_state` varchar(255) NOT NULL,
`trans_start` int(11) NOT NULL default '0',
`trans_real` int(11) NOT NULL default '0',
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;");
echo "Added table z_shop_history_item (shopsystem).
";
}
catch(PDOException $error) { echo "Table z_shop_history_item not added. Already exist?
";}
try { $SQL->query("CREATE TABLE `z_shop_history_pacc` (
`id` int(11) NOT NULL auto_increment,
`to_name` varchar(255) NOT NULL default '0',
`to_account` int(11) NOT NULL default '0',
`from_nick` varchar(255) NOT NULL,
`from_account` int(11) NOT NULL default '0',
`price` int(11) NOT NULL default '0',
`pacc_days` int(11) NOT NULL default '0',
`trans_state` varchar(255) NOT NULL,
`trans_start` int(11) NOT NULL default '0',
`trans_real` int(11) NOT NULL default '0',
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;");
echo "Added table z_shop_history_pacc (shopsystem).
";
}
catch(PDOException $error) { echo "Table z_shop_history_pacc not added. Already exist?
";}

try { $SQL->query("CREATE TABLE `z_polls` (
`id` int(11) NOT NULL auto_increment,
`question` varchar(255) NOT NULL,
`end` int(11) NOT NULL,
`start` int(11) NOT NULL,
`answers` int(11) NOT NULL,
`votes_all` int(11) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;");
echo "Added table z_polls (poll-system).
";
}
catch(PDOException $error) { echo "Table z_polls not added. Already exist?
";}
try { $SQL->query("CREATE TABLE `z_polls_answers` (
`poll_id` int(11) NOT NULL,
`answer_id` int(11) NOT NULL,
`answer` varchar(255) NOT NULL,
`votes` int(11) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;");
echo "Added table z_polls_answers (poll-system).
";
}
catch(PDOException $error) { echo "Table z_polls_answers not added. Already exist?
";}

try { $SQL->query("CREATE TABLE `zaypay_payment` (
`payID` bigint(30) NOT NULL,
`account_id` int(20) NOT NULL,
`status` varchar(255) NOT NULL,
PRIMARY KEY (`payID`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;");
echo "Added table zaypay_payment.
";
}
catch(PDOException $error) { echo "Table zaypay_payment not added. Already exist?
";}
try { $SQL->query("CREATE TABLE z_bug_tracker (
`account` varchar(255) NOT NULL,
`type` int(11) NOT NULL,
`status` int(11) NOT NULL,
`text` text NOT NULL,
`id` int(11) NOT NULL,
`subject` varchar(255) NOT NULL,
`priority` int(11) NOT NULL,
`reply` int(11) NOT NULL,
`who` int(11) NOT NULL,
`uid` int(11) NOT NULL AUTO_INCREMENT,
`tag` int(11) NOT NULL,
PRIMARY KEY (uid)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;");
echo "Added table z_bug_tracker (bug tracker).
";
}
catch(PDOException $error) { echo "Table z_bug_tracker not added. Already exist?
";}
try { $SQL->query("CREATE TABLE `z_changelog` (
`id` int(11) NOT NULL auto_increment,
`type` varchar(255) NOT NULL default '',
`where` varchar(255) NOT NULL default '',
`date` int(11) NOT NULL default '0',
`description` varchar(255) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=0;");
echo "Added table z_changelog (changelog).
";
}
catch(PDOException $error) { echo "Table z_changelog not added. Already exist?
";}
try { $SQL->query("CREATE TABLE `z_forum` (
`id` int(11) NOT NULL auto_increment,
`sticky` tinyint(1) NOT NULL DEFAULT '0',
`closed` tinyint(1) NOT NULL DEFAULT '0',
`first_post` int(11) NOT NULL default '0',
`last_post` int(11) NOT NULL default '0',
`section` int(3) NOT NULL default '0',
`icon_id` int(3) NOT NULL default '1',
`replies` int(20) NOT NULL default '0',
`views` int(20) NOT NULL default '0',
`author_aid` int(20) NOT NULL default '0',
`author_guid` int(20) NOT NULL default '0',
`post_text` text NOT NULL,
`post_topic` varchar(255) NOT NULL,
`post_smile` tinyint(1) NOT NULL default '0',
`post_date` int(20) NOT NULL default '0',
`last_edit_aid` int(20) NOT NULL default '0',
`edit_date` int(20) NOT NULL default '0',
`post_ip` varchar(32) NOT NULL default '0.0.0.0',
PRIMARY KEY (`id`),
KEY `section` (`section`)
) ENGINE=MyISAM AUTO_INCREMENT=1;");
echo "Added table z_forum (forum).
";
}
catch(PDOException $error) { echo "Table z_forum not added. Already exist?
";}

}
$config['site']['install'] = 4;
saveconfig_ini($config['site']);
echo '
Tables and columns added to database.
Go to

Hidden Content

    Give reaction to this post to see the hidden content.
';
}
if($step == '4') {
echo '

STEP '.$step.'

Add samples to DB:
';
$check_news_ticker = $SQL->query('SELECT * FROM z_news_tickers WHERE image_id = 1 AND author = 1 AND hide_ticker = 0 LIMIT 1 OFFSET 0')->fetch();
if(!isset($check_news_ticker['author'])) {
$SQL->query('INSERT INTO z_news_tickers (date, author, image_id, text, hide_ticker) VALUES ('.time().', 1, 1, "Bem vindo ao Gesior 0.3.8 Edited by Natan Beckman!", 0)');
echo "Added first news ticker.
";
} else {
echo "News ticker sample is already in database. New sample is not needed.
";
}
$check_voc_0 = $SQL->query('SELECT * FROM players WHERE name = "Rook Sample" LIMIT 1 OFFSET 0')->fetch();
if(!isset($check_voc_0['name'])) {
$SQL->query('INSERT INTO `players` (`id`, `name`, `world_id`, `group_id`, `account_id`, `level`, `vocation`, `health`, `healthmax`, `experience`, `lookbody`, `lookfeet`, `lookhead`, `looklegs`, `looktype`, `lookaddons`, `maglevel`, `mana`, `manamax`, `manaspent`, `soul`, `town_id`, `posx`, `posy`, `posz`, `conditions`, `cap`, `sex`, `lastlogin`, `lastip`, `save`, `skull`, `skulltime`, `rank_id`, `guildnick`, `lastlogout`, `blessings`, `balance`, `stamina`, `direction`, `loss_experience`, `loss_mana`, `loss_skills`, `loss_containers`, `loss_items`, `premend`, `online`, `marriage`, `promotion`, `deleted`, `description`, `created`, `nick_verify`, `old_name`, `hide_char`, `comment`) VALUES
(NULL, "Rook Sample", 0, 1, 1, 1, 0, 150, 150, 0, 0, 0, 0, 0, 110, 0, 0, 0, 0, 0, 0, 0, 50, 50, 7, "", 400, 0, 0, 0, 0, 0, 0, 0, "", 0, 0, 0, 201660000, 0, 100, 100, 100, 100, 100, 0, 0, 0, 0, 0, "", 0, 0, "", 0, "")');
echo "Added 'Rook Sample' character.
";
} else {
echo "Character 'Rook Sample' already in database.
";
}
$check_voc_1 = $SQL->query('SELECT * FROM players WHERE name = "Sorcerer Sample" LIMIT 1 OFFSET 0')->fetch();
if(!isset($check_voc_1['name'])) {
$SQL->query('INSERT INTO `players` (`id`, `name`, `world_id`, `group_id`, `account_id`, `level`, `vocation`, `health`, `healthmax`, `experience`, `lookbody`, `lookfeet`, `lookhead`, `looklegs`, `looktype`, `lookaddons`, `maglevel`, `mana`, `manamax`, `manaspent`, `soul`, `town_id`, `posx`, `posy`, `posz`, `conditions`, `cap`, `sex`, `lastlogin`, `lastip`, `save`, `skull`, `skulltime`, `rank_id`, `guildnick`, `lastlogout`, `blessings`, `balance`, `stamina`, `direction`, `loss_experience`, `loss_mana`, `loss_skills`, `loss_containers`, `loss_items`, `premend`, `online`, `marriage`, `promotion`, `deleted`, `description`, `created`, `nick_verify`, `old_name`, `hide_char`, `comment`) VALUES
(NULL, "Sorcerer Sample", 0, 1, 1, 1, 1, 150, 150, 0, 0, 0, 0, 0, 110, 0, 0, 0, 0, 0, 0, 0, 50, 50, 7, "", 400, 0, 0, 0, 0, 0, 0, 0, "", 0, 0, 0, 201660000, 0, 100, 100, 100, 100, 100, 0, 0, 0, 0, 0, "", 0, 0, "", 0, "")');
echo "Added 'Sorcerer Sample' character.
";
} else {
echo "Character 'Sorcerer Sample' already in database.
";
}
$check_voc_2 = $SQL->query('SELECT * FROM players WHERE name = "Druid Sample" LIMIT 1 OFFSET 0')->fetch();
if(!isset($check_voc_2['name'])) {
$SQL->query('INSERT INTO `players` (`id`, `name`, `world_id`, `group_id`, `account_id`, `level`, `vocation`, `health`, `healthmax`, `experience`, `lookbody`, `lookfeet`, `lookhead`, `looklegs`, `looktype`, `lookaddons`, `maglevel`, `mana`, `manamax`, `manaspent`, `soul`, `town_id`, `posx`, `posy`, `posz`, `conditions`, `cap`, `sex`, `lastlogin`, `lastip`, `save`, `skull`, `skulltime`, `rank_id`, `guildnick`, `lastlogout`, `blessings`, `balance`, `stamina`, `direction`, `loss_experience`, `loss_mana`, `loss_skills`, `loss_containers`, `loss_items`, `premend`, `online`, `marriage`, `promotion`, `deleted`, `description`, `created`, `nick_verify`, `old_name`, `hide_char`, `comment`) VALUES
(NULL, "Druid Sample", 0, 1, 1, 1, 2, 150, 150, 0, 0, 0, 0, 0, 110, 0, 0, 0, 0, 0, 0, 0, 50, 50, 7, "", 400, 0, 0, 0, 0, 0, 0, 0, "", 0, 0, 0, 201660000, 0, 100, 100, 100, 100, 100, 0, 0, 0, 0, 0, "", 0, 0, "", 0, "")');
echo "Added 'Druid Sample' character.
";
} else {
echo "Character 'Druid Sample' already in database.
";
}
$check_voc_3 = $SQL->query('SELECT * FROM players WHERE name = "Paladin Sample" LIMIT 1 OFFSET 0')->fetch();
if(!isset($check_voc_3['name'])) {
$SQL->query('INSERT INTO `players` (`id`, `name`, `world_id`, `group_id`, `account_id`, `level`, `vocation`, `health`, `healthmax`, `experience`, `lookbody`, `lookfeet`, `lookhead`, `looklegs`, `looktype`, `lookaddons`, `maglevel`, `mana`, `manamax`, `manaspent`, `soul`, `town_id`, `posx`, `posy`, `posz`, `conditions`, `cap`, `sex`, `lastlogin`, `lastip`, `save`, `skull`, `skulltime`, `rank_id`, `guildnick`, `lastlogout`, `blessings`, `balance`, `stamina`, `direction`, `loss_experience`, `loss_mana`, `loss_skills`, `loss_containers`, `loss_items`, `premend`, `online`, `marriage`, `promotion`, `deleted`, `description`, `created`, `nick_verify`, `old_name`, `hide_char`, `comment`) VALUES
(NULL, "Paladin Sample", 0, 1, 1, 1, 3, 150, 150, 0, 0, 0, 0, 0, 110, 0, 0, 0, 0, 0, 0, 0, 50, 50, 7, "", 400, 0, 0, 0, 0, 0, 0, 0, "", 0, 0, 0, 201660000, 0, 100, 100, 100, 100, 100, 0, 0, 0, 0, 0, "", 0, 0, "", 0, "")');
echo "Added 'Paladin Sample' character.
";
} else {
echo "Character 'Paladin Sample' already in database.
";
}
$check_voc_4 = $SQL->query('SELECT * FROM players WHERE name = "Knight Sample" LIMIT 1 OFFSET 0')->fetch();
if(!isset($check_voc_4['name'])) {
$SQL->query('INSERT INTO `players` (`id`, `name`, `world_id`, `group_id`, `account_id`, `level`, `vocation`, `health`, `healthmax`, `experience`, `lookbody`, `lookfeet`, `lookhead`, `looklegs`, `looktype`, `lookaddons`, `maglevel`, `mana`, `manamax`, `manaspent`, `soul`, `town_id`, `posx`, `posy`, `posz`, `conditions`, `cap`, `sex`, `lastlogin`, `lastip`, `save`, `skull`, `skulltime`, `rank_id`, `guildnick`, `lastlogout`, `blessings`, `balance`, `stamina`, `direction`, `loss_experience`, `loss_mana`, `loss_skills`, `loss_containers`, `loss_items`, `premend`, `online`, `marriage`, `promotion`, `deleted`, `description`, `created`, `nick_verify`, `old_name`, `hide_char`, `comment`) VALUES
(NULL, "Knight Sample", 0, 1, 1, 1, 4, 150, 150, 0, 0, 0, 0, 0, 110, 0, 0, 0, 0, 0, 0, 0, 50, 50, 7, "", 400, 0, 0, 0, 0, 0, 0, 0, "", 0, 0, 0, 201660000, 0, 100, 100, 100, 100, 100, 0, 0, 0, 0, 0, "", 0, 0, "", 0, "")');
echo "Added 'Knight Sample' character.
";
echo 'All samples added to database. Now you can go to

Hidden Content

    Give reaction to this post to see the hidden content.
';
} else {
echo "Character 'Knight Sample' already in database.
";
$config['site']['install'] = 5;
saveconfig_ini($config['site']);
echo 'All samples added to database. Now you can go to

Hidden Content

    Give reaction to this post to see the hidden content.

';
}
}
if($step == '5') {
echo '

STEP '.$step.'

Set Admin Account
';
$config['server'] = parse_ini_file($config['site']['server_path'].'config.lua');
if(empty($_REQUEST['saveaccpassword'])) {
echo 'Admin account number is: 1
Set new password to this account.
';
echo 'New password:

(Don\'t give it password to anyone!)';
echo ' 

If account with number 1 doesn\'t exist installator will create it and set your password.';
} else {
$newpass = $_POST['newpass'];
if(!check_password($newpass))
echo 'Password contains illegal characters. Please use only a-Z and 0-9.

Hidden Content

    Give reaction to this post to see the hidden content.
and write other password.';
else
{
$newpass_to_db = password_ency($newpass);
$account = new OTS_Account();
$account->load(1);
if($account->isLoaded()) {
$account->setPassword($newpass_to_db);
$account->save();
$account->setCustomField("page_access", 3);
} else {
$number = $account->create(1,1,1);
$account->setPassword($newpass_to_db);
$account->unblock();
$account->save();
$account->setCustomField("page_access", 3);
}
$_SESSION['account'] = 1;
$_SESSION['password'] = $newpass;
$logged = TRUE;
$account->setCustomField("page_lastday", time());
echo '

Admin account number: 1
Admin account password: '.$_POST['newpass'].'

 

It\'s end of first part of installation. Installation is blocked. From now don\'t modify file config.ini!
Press links to STEPs 6 and 7 in menu.

';
$config['site']['install'] = 'no';
saveconfig_ini($config['site']);
}
}
}
}
else
echo "Account maker is already installed! To reinstall open file 'config.ini' in directory 'config' and change:
install = \"no\"
to:
install = \"start\"
and enter this site again.";
}
?>

Link para o post
Compartilhar em outros sites

Participe da conversa

Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.

Visitante
Responder

×   Você colou conteúdo com formatação.   Remover formatação

  Apenas 75 emojis são permitidos.

×   Seu link foi automaticamente incorporado.   Mostrar como link

×   Seu conteúdo anterior foi restaurado.   Limpar o editor

×   Não é possível colar imagens diretamente. Carregar ou inserir imagens do URL.

  • Quem Está Navegando   0 membros estão online

    Nenhum usuário registrado visualizando esta página.

  • Conteúdo Similar

    • Por Jaurez
      .
    • Por Cat
      Em alguns casos, o tibia 8.60 comum não abre de jeito nenhum no map editor, mesmo desmarcando check file signatures e configurando o path corretamente.
       
      Este é o client 8.60 adaptado para o Remere's Map Editor. Resolvi postar já que ele foi removido do site oficial do RME. (ficou apenas a versão para linux lá)
      Se estiver tendo problemas para abrir a versão 8.60, tente utilizar este.
                                                                                                                     
      Baixar o Tibia Client 8.60 que funciona no Remere’s Map Editor
      Essa versão do Tibia 8.60 client resolve o erro unsupported client version ou Could not locate tibia.dat and/or tibia.spr, please navigate to your tibia 8.60 installation folder.
       
      Downloads
      https://tibiaking.com/applications/core/interface/file/attachment.php?id=47333

      Scan: https://www.virustotal.com/gui/file/333e172ac49ba2028db9eb5889994509e7d2de28ebccfa428c04e86defbe15cc
       
    • Por danilo belato
      Fala Galera To Com um problema aki 
       
      quero exporta umas sprites de um server para colocar em outro 
       
      eu clico na sprites ai aparece tds a forma delas do lado de la >>
       
      ai eu clico nela e ponho a opiçao de export mais quando salvo a sprite ela n abri 
       
      aparece isso quando tento vê-la 
       
      visualização não disponível ( no formatos png e bitmap)
       
      Agora no formato idc fala que o paint n pode ler 
       
      me ajudem ae...
    • Por Vitor Bicaleto
      Galera to com o script do addon doll aqui, quando eu digito apenas "!addon" ele aparece assim: Digite novamente, algo está errado!"
      quando digito por exemplo: "!addon citizen" ele não funciona e não da nenhum erro
       
      mesma coisa acontece com o mount doll.. 
    • Por Ayron5
      Substitui uma stone no serve, deu tudo certo fora  esse  erro ajudem  Valendo  Rep+  Grato  

      Erro: data/actions/scripts/boost.lua:557: table index is nil
       [Warning - Event::loadScript] Cannot load script (data/actions/scripts/boost.lua)

      Script:
  • Estatísticas dos Fóruns

    96847
    Tópicos
    519606
    Posts



×
×
  • Criar Novo...

Informação Importante

Confirmação de Termo