<?
if($conexion){
SET SQL_MODE=\"NO_AUTO_VALUE_ON_ZERO\";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
CREATE TABLE IF NOT EXISTS `categoriav` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`nombre` varchar(30) NOT NULL,
`Subcategoria` int(2) NOT NULL DEFAULT '0',
`Subindexid` int(11) NOT NULL,
`Subnombre` text NOT NULL,
`ct_icon` text NOT NULL,
`ct_fech` date NOT NULL,
`ct_time` time NOT NULL,
`ct_n_public` int(11) NOT NULL DEFAULT '0',
`ct_n_comet` int(11) NOT NULL DEFAULT '0',
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=9 ;
INSERT INTO `categoriav` (`id`, `nombre`, `Subcategoria`, `Subindexid`, `Subnombre`, `ct_icon`, `ct_fech`, `ct_time`, `ct_n_public`, `ct_n_comet`) VALUES
(1, 'Juegos', 0, 0, '', 'cristal_clear/48px-Crystal_Clear_app_package_games.png', '2011-05-01', '00:00:00', 0, 0),
(2, 'Peliculas', 0, 0, 'Bla bla', 'png/movie.png', '2011-05-01', '00:00:00', 0, 0),
(3, 'Imformacion', 0, 0, '', 'cristal_clear/48px-Crystal_Clear_app_kedit.png', '2011-05-01', '00:00:00', 0, 0),
(4, '', 1, 1, 'Accion', '', '2011-05-01', '00:00:00', 0, 0),
(5, '', 1, 1, 'Aventura', '', '2011-05-01', '00:00:00', 0, 0),
(6, 'Herramientas', 0, 0, '', 'cristal_clear/48px-Crystal_Clear_action_configure.png', '2011-05-01', '00:00:00', 0, 0),
(7, 'Deportes', 0, 0, '', 'cristal_clear/48px-Crystal_Clear_app_clicknrun.png', '2011-05-01', '22:38:51', 0, 0),
(8, '', 1, 7, 'Atletismo', '', '2011-05-01', '22:41:08', 0, 0);
CREATE TABLE IF NOT EXISTS `noticiasv` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`idc` int(11) NOT NULL,
`Titulo` varchar(60) NOT NULL,
`Byid` int(11) NOT NULL,
`fecha` date NOT NULL,
`NoticiaV` longtext NOT NULL,
`NT_COMENT_OF` int(11) NOT NULL,
`Byname` text NOT NULL,
`NT_TIME` time NOT NULL,
`pb_coments` int(11) NOT NULL,
`pb_visitas` int(11) NOT NULL,
`pb_tags` text NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=36 ;
CREATE TABLE IF NOT EXISTS `noticias_coment` (
`cm_id` int(11) NOT NULL AUTO_INCREMENT,
`cm_indexid` int(11) NOT NULL,
`cm_byid` int(11) NOT NULL,
`cm_byname` text NOT NULL,
`cm_comentario` longblob NOT NULL,
`cm_date` date NOT NULL,
`cm_time` time NOT NULL,
PRIMARY KEY (`cm_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=21 ;
CREATE TABLE IF NOT EXISTS `nt_votem` (
`nt_vtid` int(11) NOT NULL AUTO_INCREMENT,
`nt_vtindex` int(11) NOT NULL,
`nt_vtname` text NOT NULL,
`nt_vtvalue` int(11) NOT NULL,
`vt_vttitle` text NOT NULL,
PRIMARY KEY (`nt_vtid`),
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=22 ;
CREATE TABLE IF NOT EXISTS `stadisticas_info` (
`si_id` int(11) NOT NULL AUTO_INCREMENT,
`si_ftid` int(11) NOT NULL,
`si_byid` int(11) NOT NULL,
`si_fecha` date NOT NULL,
`si_hora` time NOT NULL,
`si_fromid` int(11) NOT NULL,
PRIMARY KEY (`si_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=391 ;
CREATE TABLE IF NOT EXISTS `usuariosv` (
`us_id` int(11) NOT NULL AUTO_INCREMENT,
`us_nombre_us` text NOT NULL,
`us_nombre` text NOT NULL,
`us_apellido` text NOT NULL,
`us_fecha_nc` date NOT NULL,
`us_reg_fech` date NOT NULL,
`us_mail` varchar(30) NOT NULL,
`us_noticias_p` int(11) NOT NULL DEFAULT '0',
`us_comentarios_p` int(11) NOT NULL DEFAULT '0',
`us_password` text NOT NULL,
`us_rank` int(11) NOT NULL DEFAULT '0',
`us_img` varchar(100) NOT NULL DEFAULT 'Notimg-perfil.jpg',
`us_state` int(11) NOT NULL DEFAULT '0',
`us_reason` text NOT NULL,
`us_plivase` varchar(200) NOT NULL DEFAULT 'fech:0:cor:0:',
`us_pais` int(11) NOT NULL,
`us_provincia` text NOT NULL,
`us_localidad` text NOT NULL,
`us_sex` text NOT NULL,
`us_code` text not null,
PRIMARY KEY (`us_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=3 ;
CREATE TABLE IF NOT EXISTS `us_msg` (
`msg_id` int(11) NOT NULL AUTO_INCREMENT,
`msg_byid` int(11) NOT NULL,
`msg_sendid` int(11) NOT NULL,
`msg_byname` text NOT NULL,
`msg_sendname` text NOT NULL,
`msg_fecha` date NOT NULL,
`msg_time` time NOT NULL,
`msg_view` int(11) NOT NULL,
`msg_titulo` text NOT NULL,
`msg_msg` longtext NOT NULL,
`msg_delt` tinyint(1) NOT NULL DEFAULT '0',
`msg_deltfrom` tinyint(1) NOT NULL DEFAULT '0',
PRIMARY KEY (`msg_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=28 ; ");
}
}
function session_state($id = 0){
if($id == 1){
if(empty($_SESSION['us_state'])){ echo "<meta http-equiv='Refresh' content='0;url=error.php'>";
}
}
else if($id == 0){
if(!empty($_SESSION['us_state'])){ echo "<meta http-equiv='Refresh' content='0;url=index.php'>";
}
}
}?>