<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>::: Instalar XaMaEe WeBsItE :::</title>
</head>
<body bgcolor="#CCCCFF"><?php

include(	"config.php"	);
if( !mssql_query("select diasdesbloc from Character")	){	mssql_query("alter table Character add diasdesbloc varchar(255)"); $msg.="Tabela Character, Coluna diasdesbloc<br>"; }
if( !mssql_query("select databloc from Character")	){	mssql_query("alter table Character add databloc varchar(255)"); $msg.="Tabela Character, Coluna databloc<br>"; }
if( !mssql_query("select motivobloc from Character")	){	mssql_query("alter table Character add motivobloc varchar(255)"); $msg.="Tabela Character, Coluna motivobloc<br>"; }
if( !mssql_query("select blocpor from Character")	){	mssql_query("alter table Character add blocpor varchar(255)"); $msg.="Tabela Character, Coluna blocpor<br>"; }
if( !mssql_query("select Resets from Character")	){	mssql_query("alter table Character add Resets int not null default 0"); $msg.="Tabela Character, Coluna Resets<br>"; }
if( !mssql_query("select Items2 from warehouse")	){	mssql_query("alter table warehouse add Items2 varbinary(1920)"); $msg.="Tabela warehouse, Coluna Items2<br>"; }
if( !mssql_query("select databloc from MEMB_INFO")	){	mssql_query("alter table MEMB_INFO add databloc smalldatetime"); $msg.="Tabela MEMB_INFO, Coluna databloc<br>"; }
if( !mssql_query("select vencimento from MEMB_INFO")	){	mssql_query("alter table MEMB_INFO add vencimento smalldatetime");	$msg.="Tabela MEMB_INFO, Coluna vencimento<br>"; }
if( !mssql_query("select diasdevip from MEMB_INFO")	){	mssql_query("alter table MEMB_INFO add diasdevip int not null default 0");	$msg.="Tabela MEMB_INFO, Coluna diasdevip<br>"; }
if( !mssql_query("select vip from MEMB_INFO")	){	mssql_query("alter table MEMB_INFO add vip int not null default 0");	$msg.="Tabela MEMB_INFO, Coluna vip<br>"; }
if( !mssql_query("select blocpor from MEMB_INFO")	){	mssql_query("alter table MEMB_INFO add blocpor varchar(255)");	$msg.="Tabela MEMB_INFO, Coluna blocpor<br>"; }
if( !mssql_query("select motivobloc from MEMB_INFO")	){	mssql_query("alter table MEMB_INFO add motivobloc varchar(255)");	$msg.="Tabela MEMB_INFO, Coluna motivobloc<br>"; }
if( !mssql_query("select diasdesbloc from MEMB_INFO")	){	mssql_query("alter table MEMB_INFO add diasdesbloc int not null default 0");	$msg.="Tabela MEMB_INFO, Coluna diasdesbloc<br>"; }
if( !mssql_query("select datavip from MEMB_INFO")	){	mssql_query("alter table MEMB_INFO add datavip smalldatetime");	$msg.="Tabela MEMB_INFO, Coluna datavip<br>"; }
if( !mssql_query("select adm from MEMB_INFO")	){	mssql_query("alter table MEMB_INFO add adm int not null default 0");	$msg.="Tabela MEMB_INFO, Coluna adm<br>"; }
mssql_query("
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[noticias]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[noticias]
GO

CREATE TABLE [dbo].[noticias] (
	[id] [int] NOT NULL ,
	[titulo] [varchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[corpo] [text] COLLATE Chinese_PRC_CI_AS NULL ,
	[autor] [varchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[data] [varchar] (80) COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[hora] [varchar] (80) COLLATE Chinese_PRC_CI_AS NOT NULL 
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
	  ");

if($msg==""){ $msg="Nenhuma, Todas J&aacute; Estavam Criadas!"; }
print(	"<center>Tabelas instaladas:<br>".$msg."<br><h3>Agora falta editar o php.ini, no appserv ele &eacute; encontrado em C:\windows\php.ini
<br>Procure por: output_buffering = , coloque igual a On (vai estar Off ou 4096 ou outro numero)
<br>procure por:  ;extension=php_mssql.dll, retire o ;<br>procure por: mssql.secure_connection = Off , altere para On<br><font color=red>AGORA RESTARTA O APACHE!!!<br><br><br>Crie uma job com este codigo em verde: <br><font color=green>Update MEMB_INFO set vip=0, diasdevip=0, datavip=NULL, vencimento=NULL WHERE vip=1 AND datavip<=getdate()-diasdevip<br>Update MEMB_INFO set bloc_code=0, diasdesbloc=0, databloc=NULL, motivobloc=NULL, blocpor=NULL WHERE bloc_code=1 AND databloc<=getdate()-diasdesbloc<br>Update Character set CtlCode=0, diasdesbloc=0, databloc=NULL, motivobloc=NULL, blocpor=NULL WHERE CtlCode=1 AND databloc<=getdate()-diasdesbloc</font>
<br> e coloque para rodar todo dia<br>Jobs By DouglasF<br>Delete Esta Pagina Agora!</font></h3>
</center>"	);
?>
<div align="center"><h3>Adicionar Admin</h3>
<BR />
<form id="form1" name="form1" method="post" action="">
  <h3><br />
    Login:
    <input name="login" type="text" id="login" />
    <input type="submit" name="Submit" value="Add" />
  </h3>
</form>
<?
if(!empty($_POST['login'])){
$l	=	$_POST['login'];
$c	=	mssql_num_rows(mssql_query("select memb___id from MEMB_INFO where memb___id='$l'"));
if($c<=0) print("login inv&aacute;lido!");
elseif(mssql_result(mssql_query("select adm from MEMB_INFO where memb___id='$l'"),0,0) == 1) print("login $l j&aacute; &eacute; ADM"); 
else{
mssql_query("update MEMB_INFO set adm='1' where memb___id='$l'");
print("login ($l) adicionado como adm com sucesso!");
}
}
?>
</div>
</body>
</html>