Ir para conteúdo

Posts Recomendados

Olá,eu conseguir por a War system no meu ot .. mais eu fui por aqui pra entrar no site "localhost" apareçeu isso : case "wars"; $subtopic = "wars"; $topic = "Guild Wars"; include("wars.php"); break; o que eu faço ? eu botei isso no Index.php, ai eu tenho outro INDEX.php , ai o outro index que ta assim :

<!--?PHP

date_default_timezone_set('America/Recife');

session_start();

ob_start("ob_gzhandler");

//require('./exaBD.php');

function microtime_float() {

list($usec, $sec) = explode(" ", microtime());

return ((float)$usec + (float)$sec);

}

$time_start = microtime_float();

 

//##### CONFIG #####

include('config-and-functions.php');

$action = $_REQUEST['action'];

 

//##### LOGOUT #####

if($action == "logout") {

unset($_SESSION['account']);

unset($_SESSION['password']);

}

 

//##### LOGIN #####

$logged = FALSE;

if(isset($_SESSION['account'])) {

$account_logged = $ots--->createObject('Account');

$account_logged->load($_SESSION['account']);

if($account_logged->isLoaded() && $account_logged->getPassword() == $_SESSION['password']) {

$logged = TRUE;

$group_id_of_acc_logged = $account_logged->getPageAccess();

} else {

$logged = FALSE;

unset($_SESSION['account']);

unset($account_logged);

}

}

$login_account = strtoupper(trim($_POST['account_login']));

$login_password = trim($_POST['password_login']);

if(!$logged && !empty($login_account) && !empty($login_password)) {

$login_password = password_ency($login_password);

$account_logged = $ots->createObject('Account');

$account_logged->find($login_account);

if($account_logged->isLoaded()) {

if($login_password == $account_logged->getPassword()) {

$_SESSION['account'] = $account_logged->getId();

$_SESSION['password'] = $login_password;

$logged = TRUE;

$account_logged->setCustomField("page_lastday", time());

$group_id_of_acc_logged = $account_logged->getPageAccess();

} else

$logged = FALSE;

}

}

 

//#### LOAD PAGE ##########

if(empty($_REQUEST['subtopic'])) {

$_REQUEST['subtopic'] = "latestnews";

$subtopic = "latestnews";

}

switch($_REQUEST['subtopic']) {

 

case "latestnews":

$topic = "Ultimas Noticias";

$subtopic = "latestnews";

include("latestnews.php");

break;

 

case "suport":

$topic = "Suport Online";

$subtopic = "suportonline";

include("suport.php");

break;

 

case "exphist";

$topic = "Power Gamers";

$subtopic = "exphist";

include("exphist.php");

break;

 

case "onlinetime";

$topic = "Most Online";

$subtopic = "onlinetime";

include("onlinetime.php");

break;

 

case "chat";

$topic = "chat";

$subtopic = "chat";

include("chat.php");

break;

 

case "exphist";

$subtopic = "exphist";

$topic = "Powergamers";

include("exphist.php");

break;

 

case "featured":

$topic = "Featured Article";

$subtopic = "article";

include("featured.php");

break;

 

case "viplist";

$subtopic = "viplist";

$topic = "Jogadores Vip";

include("viplist.php");

break;

 

case "home";

$subtopic = "home";

$topic = "home";

include("home.php");

break;

 

case "addons":

$topic = "Addons";

$subtopic = "addons";

include("addons.php");

break;

 

 

case "detalhe";

$topic = "Detalhes";

$subtopic = "detalhe";

include("detalhe.php");

break;

 

 

case "buypoints":

$topic = "Comprar Pontos";

$subtopic = "buypoints";

include("buypoints.php");

break;

 

case "auctionsystem":

$topic = "Trade Items";

$subtopic = "auctionsystem";

include("auctionsystem.php");

break;

 

case "lottery";

$topic = "Loteira";

$subtopic = "lottery";

include("lottery.php");

break;

 

case "wars":

$topic = "Guild Wars";

$subtopic = "wars";

include("wars.php");

break;

 

case "creatures";

$topic = "Monstros";

$subtopic = "creatures";

include("creatures.php");

break;

 

case "about";

$topic = "Sobre o Server";

$subtopic = "about";

include("about.php");

break;

 

case "spells";

$topic = "Magias";

$subtopic = "spells";

include("spells.php");

break;

 

case "bugtracker";

$topic = "Bug Tracker";

$subtopic = "bugtracker";

include("bug.php");

break;

 

case "experiencetable";

$topic = "Tabela de Experiência";

$subtopic = "experiencetable";

include("experiencetable.php");

break;

 

case "characters";

$topic = "Players";

$subtopic = "characters";

include("characters.php");

break;

 

case "whoisonline";

$topic = "Players Online";

$subtopic = "whoisonline";

include("whoisonline.php");

break;

 

case "highscores";

$topic = "Ranking";

$subtopic = "highscores";

include("highscores.php");

break;

 

case "killstatistics";

$topic = "Últimas Mortes";

$subtopic = "killstatistics";

include("killstatistics.php");

break;

 

case "guilds";

$topic = "Guilds";

$subtopic = "guilds";

include("guilds.php");

break;

 

case "accountmanagement";

$topic = "Logar sua Conta";

$subtopic = "accountmanagement";

include("accountmanagement.php");

break;

 

case "createaccount";

$topic = "Criar Conta";

$subtopic = "createaccount";

include("createaccount.php");

break;

 

case "lostaccount";

$topic = "Perdeu sua conta?";

$subtopic = "lostaccount";

include("lostaccount.php");

break;

 

case "tibiarules";

$topic = "Regras do Server";

$subtopic = "tibiarules";

include("tibiarules.php");

break;

 

case "adminpanel":

$topic = "Painel do Admin";

$subtopic = "adminpanel";

include("adminpanel.php");

break;

 

case "admin";

$subtopic = "admin";

$topic = "Advanced Admin Panel";

include("adminpro.php");

break;

 

case "confirmacao":

$topic = "Confirmação";

$subtopic = "confirmacao";

include("confirmacao.php");

break;

 

case "vantagens":

$topic = "Vantagens";

$subtopic = "vantagens";

include("vantagens.php");

break;

 

case "forum":

$topic = "Forum";

$subtopic = "forum";

include("forum.php");

break;

 

case "team";

$subtopic = "Membros da Staff";

$topic = "Support List";

include("team.php");

break;

 

case "downloads";

$subtopic = "Downloads";

$topic = "Downloads";

include("downloads.php");

break;

 

case "serverinfo";

$subtopic = "Info do Server";

$topic = "Server Info";

include("serverinfo.php");

break;

 

case "shopsystem";

$subtopic = "Loja do Server";

$topic = "Shop Offerts";

include("shopsystem.php");

break;

 

case "doacao";

$subtopic = "doação";

$topic = "Doacao";

include("doacao.php");

break;

 

case "gallery";

$subtopic = "gallery";

$topic = "Gallery";

include("gallery.php");

break;

 

case "namelock";

$subtopic = "namelock";

$topic = "Namelock Manager";

include("namelocks.php");

break;

 

case "archive";

$subtopic = "archive";

$topic = "News Archives";

include("archive.php");

break;

 

case "mail";

$subtopic = "mail";

$topic = "Mass emails sender";

include("mail.php");

break;

 

case "shopadmin";

$subtopic = "Loja do Admin";

$topic = "Shop Admin";

include("shopadmin.php");

break;

 

case "records";

$subtopic = "Record de Players ON";

$topic = "Players Online Records";

include("records.php");

break;

 

case "restarter";

$subtopic = "restarter";

$topic = "Restarter";

include("restarter.php");

break;

 

case "bans";

$subtopic = "Banidos";

$topic = "Ban List";

include("bans.php");

break;

 

case "polls";

$topic = "Enquetes";

$subtopic = "polls";

include("polls.php");

break;

 

case "changelog";

$topic = "Changelog";

$subtopic = "changelog";

include("changelog.php");

break;

 

case "fragers";

$topic = "Top Fragers";

$subtopic = "fragers";

include("fragers.php");

break;

}

 

if(empty($topic)) {

$title = $GLOBALS['config']['server']["serverName"]." - OTS";

$main_content .= 'Invalid subtopic. Can\'t load page.';

} else {

$title = $GLOBALS['config']['server']["serverName"]." - ".$topic;

}

 

//#####LAYOUT#####

$layout_header = '";

include($layout_name."/layout.php");

ob_end_flush();

?>

 

ai quando eu boto esse .. e coloco pra ir no site "localhost" apareçe esse erro :

Warning: parse_ini_file(C:/Users/Lucas/Desktop/Arquivos/Otserver8.60/BaiakDipic/BaiakDipic/config.lua) [function.parse-ini-file]: failed to open stream: No such file or directory in C:\xampp\htdocs\config-and-functions.php on line 13

Database error. Unknown database type in C:/Users/Lucas/Desktop/Arquivos/Otserver8.60/BaiakDipic/BaiakDipic/config.lua . Must be equal to: "mysql" or "sqlite". Now is: ""

alguem me ajuda ? e eu to achando eu coloquei alguma script na pasta errada,porq tem mais de 1 pasta index.php :x

Editado por LucasDipic
Link para o comentário
https://xtibia.com/forum/topic/182535-erro-ao-tentar-entrar-no-site-do-ot/
Compartilhar em outros sites

por favor ao ultilizar uma amostra de conteudo grande como esse ultilize codes ou quotes para melhor visualizaçao e para q possa ser compreendido melhor!

 

e agora sobre o seu erro, vc nao add os comandos sql no phpmyadmin, adicione-os que o erro sumirá!

Link para o comentário
https://xtibia.com/forum/topic/182535-erro-ao-tentar-entrar-no-site-do-ot/#findComment-1217599
Compartilhar em outros sites

sao os comandos adicionados na databse criada para o servidor no xampp via phpmyadmin, no botao sql dentro da sua db, tem que adicionar alguns comandos parea que possa ultilizar o system + a pagina no site!

Link para o comentário
https://xtibia.com/forum/topic/182535-erro-ao-tentar-entrar-no-site-do-ot/#findComment-1218082
Compartilhar em outros sites

qualquer duvida poste aqui, so nao irei procurar agora pra vc os comandos pois eu to sem paciencia e ta facil ao seu alcance!

Link para o comentário
https://xtibia.com/forum/topic/182535-erro-ao-tentar-entrar-no-site-do-ot/#findComment-1218107
Compartilhar em outros sites

 

 

.:: Tabelas ::.

 

Para quem ainda não sabe add tabelas a sua database,vou ensinar:

 

Acesse seu phpmyadmin,digite sua senha (caso tenha),clique no nome da sua database a esquerda,assim que carregar a sua database clique em SQL lá em cima...Aparecerá um espaço em branco lá voce irá add as seguintes tabelas...e depois clicar em Executar.

 

CREATE TABLE IF NOT EXISTS `guild_wars` (
 `id` INT NOT NULL AUTO_INCREMENT,
 `guild_id` INT NOT NULL,
 `enemy_id` INT NOT NULL,
 `begin` BIGINT NOT NULL DEFAULT '0',
 `end` BIGINT NOT NULL DEFAULT '0',
 `frags` INT UNSIGNED NOT NULL DEFAULT '0',
 `payment` BIGINT UNSIGNED NOT NULL DEFAULT '0',
 `guild_kills` INT UNSIGNED NOT NULL DEFAULT '0',
 `enemy_kills` INT UNSIGNED NOT NULL DEFAULT '0',
 `status` TINYINT(1) UNSIGNED NOT NULL DEFAULT '0',
 PRIMARY KEY (`id`),
 KEY `status` (`status`),
 KEY `guild_id` (`guild_id`),
 KEY `enemy_id` (`enemy_id`)
) ENGINE=InnoDB;

 

ALTER TABLE `guild_wars`
 ADD CONSTRAINT `guild_wars_ibfk_1` FOREIGN KEY (`guild_id`) REFERENCES `guilds` (`id`) ON DELETE CASCADE,
 ADD CONSTRAINT `guild_wars_ibfk_2` FOREIGN KEY (`enemy_id`) REFERENCES `guilds` (`id`) ON DELETE CASCADE;

 

ALTER TABLE `guilds` ADD `balance` BIGINT UNSIGNED NOT NULL AFTER `motd`;

 

CREATE TABLE IF NOT EXISTS `guild_kills` (
 `id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
 `guild_id` INT NOT NULL,
 `war_id` INT NOT NULL,
 `death_id` INT NOT NULL
) ENGINE = InnoDB;

 

ALTER TABLE `guild_kills`
 ADD CONSTRAINT `guild_kills_ibfk_1` FOREIGN KEY (`war_id`) REFERENCES `guild_wars` (`id`) ON DELETE CASCADE,
 ADD CONSTRAINT `guild_kills_ibfk_2` FOREIGN KEY (`death_id`) REFERENCES `player_deaths` (`id`) ON DELETE CASCADE,
 ADD CONSTRAINT `guild_kills_ibfk_3` FOREIGN KEY (`guild_id`) REFERENCES `guilds` (`id`) ON DELETE CASCADE;

 

 

ALTER TABLE `killers` ADD `war` INT NOT NULL DEFAULT 0;

 

 

 

 

ai esta e como instalar!

 

Creditos WalefXavier

Link para o comentário
https://xtibia.com/forum/topic/182535-erro-ao-tentar-entrar-no-site-do-ot/#findComment-1218370
Compartilhar em outros sites

Ok,mais não tou conseguindo postar as fotos aqui .. vou copiar e colar o erro e te mandar ..

esse comando :

 

ALTER TABLE `guild_wars`

ADD CONSTRAINT `guild_wars_ibfk_1` FOREIGN KEY (`guild_id`) REFERENCES `guilds` (`id`) ON DELETE CASCADE,

 

ADD CONSTRAINT `guild_wars_ibfk_2` FOREIGN KEY (`enemy_id`) REFERENCES `guilds` (`id`) ON DELETE CASCADE;

deu esse erro :

 

#1005 - Can't create table 'baiakdipic1.#sql-158_3c' (errno: 121)

 

Esse outro comando :

ALTER TABLE `guilds` ADD `balance` BIGINT UNSIGNED NOT NULL AFTER `motd`;

 

Deu esse erro :

 

#1060 - Duplicate column name 'balance'

 

E esse outro comando :

ALTER TABLE `guild_kills`

ADD CONSTRAINT `guild_kills_ibfk_1` FOREIGN KEY (`war_id`) REFERENCES `guild_wars` (`id`) ON DELETE CASCADE,

ADD CONSTRAINT `guild_kills_ibfk_2` FOREIGN KEY (`death_id`) REFERENCES `player_deaths` (`id`) ON DELETE CASCADE,

 

ADD CONSTRAINT `guild_kills_ibfk_3` FOREIGN KEY (`guild_id`) REFERENCES `guilds` (`id`) ON DELETE CASCADE;

 

Deu esse erro :

 

#1005 - Can't create table 'baiakdipic1.#sql-158_44' (errno: 121)

 

e por fim .. esse comando :

 

ALTER TABLE `killers` ADD `war` INT NOT NULL DEFAULT 0;

 

deu esse erro :

#1060 - Duplicate column name 'war'

 

e ai , de pra vc saber o que é mais ou menos?!

Link para o comentário
https://xtibia.com/forum/topic/182535-erro-ao-tentar-entrar-no-site-do-ot/#findComment-1218407
Compartilhar em outros sites

Visitante
Este tópico está impedido de receber novos posts.
×
×
  • Criar Novo...