arg.php archive
/* Data base details */
$con='mysql';
$username='pancho';
$password='lander';
$client_db_name='portalander';
$host='localhost';
$driver='Custom';
$db_prefix='frei_';
$uid='4ed3f16a8cd9c';
/* NOTE:= Below setting only applies to users using custom driver*/
//Tell FreiChatX what to use { Pure session } OR { Session and database }
/*
* Psession -> Pure sessions
* Sdatabase -> Session with database
*/
$freiuse="Psession"; //can have value as Psession or Sdatabase
/* If you are using only sessions to store User details */
//Please use only the index of session variable
//The default value in user name or user id session when user is a guest
$default_ses=null; //If you dont make any checks leave it null
$ses_username='userid'; /* Username stored in session*/ //Only index value
$ses_userid='id_usuario'; /* Userid stored in session */ //Only index value
/* OR */
/* if you are using database table to store User details */
$usertable='usuario'; //specifies the name of the table in which your user information is stored.
$row_username='Usuario'; //specifies the name of the field in which the user's name/display name is stored.
$row_userid='id_usuario'; //specifies the name of the field in which the user's id is stored (usually id or userid)
//Avatar
$avatar_field_name = 'avatar';
?>
arg.php archive
<code>
/* Data base details */
$con='mysql';
$username='pancho';
$password='lander';
$client_db_name='portalander';
$host='localhost';
$driver='Custom';
$db_prefix='frei_';
$uid='4ed3f16a8cd9c';
/* NOTE:= Below setting only applies to users using custom driver*/
//Tell FreiChatX what to use { Pure session } OR { Session and database }
/*
* Psession -> Pure sessions
* Sdatabase -> Session with database
*/
$freiuse="Psession"; //can have value as Psession or Sdatabase
/* If you are using only sessions to store User details */
//Please use only the index of session variable
//The default value in user name or user id session when user is a guest
$default_ses=null; //If you dont make any checks leave it null
$ses_username='userid'; /* Username stored in session*/ //Only index value
$ses_userid='id_usuario'; /* Userid stored in session */ //Only index value
/* OR */
/* if you are using database table to store User details */
$usertable='usuario'; //specifies the name of the table in which your user information is stored.
$row_username='Usuario'; //specifies the name of the field in which the user's name/display name is stored.
$row_userid='id_usuario'; //specifies the name of the field in which the user's id is stored (usually id or userid)
//Avatar
$avatar_field_name = 'avatar';
?>
<code>
database structure
<code>
-- phpMyAdmin SQL Dump
-- version 2.8.2.4
-- http://www.phpmyadmin.net
--
-- Servidor: localhost:3306
-- Tiempo de generación: 05-12-2011 a las 11:26:53
-- Versión del servidor: 5.0.32
-- Versión de PHP: 5.2.6
--
-- Base de datos: `portalander`
--
CREATE DATABASE `portalander` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;
USE `portalander`;
-- --------------------------------------------------------
--
-- Estructura de tabla para la tabla `frei_chat`
--
CREATE TABLE `frei_chat` (
`id` int(10) unsigned NOT NULL auto_increment,
`from` int(11) NOT NULL,
`from_name` varchar(30) NOT NULL,
`to` int(11) NOT NULL,
`to_name` varchar(30) NOT NULL,
`message` text NOT NULL,
`sent` datetime NOT NULL default '0000-00-00 00:00:00',
`recd` int(10) unsigned NOT NULL default '0',
`time` decimal(15,0) NOT NULL,
`message_type` int(11) NOT NULL default '0',
`room_id` int(4) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
--
-- Volcar la base de datos para la tabla `frei_chat`
--
-- --------------------------------------------------------
--
-- Estructura de tabla para la tabla `frei_rooms`
--
CREATE TABLE `frei_rooms` (
`id` int(11) NOT NULL auto_increment,
`room_name` text NOT NULL,
`room_order` int(4) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=12 ;
--
-- Volcar la base de datos para la tabla `frei_rooms`
--
INSERT INTO `frei_rooms` (`id`, `room_name`, `room_order`) VALUES (1, 'Innovative Talk', 3),
(2, 'Fun Talk', 1),
(3, 'Boring Talk', 0),
(4, 'General Talk', 2),
(5, 'Supreme talk', -4);
-- --------------------------------------------------------
--
-- Estructura de tabla para la tabla `frei_session`
--
CREATE TABLE `frei_session` (
`id` int(100) NOT NULL auto_increment,
`username` varchar(255) default NULL,
`time` int(100) NOT NULL,
`session_id` varchar(100) NOT NULL,
`permanent_id` int(100) NOT NULL,
`status` tinyint(4) NOT NULL,
`status_mesg` varchar(100) NOT NULL,
`guest` tinyint(3) NOT NULL,
`in_room` int(4) NOT NULL default '-1',
PRIMARY KEY (`id`),
UNIQUE KEY `permanent_id` (`permanent_id`)
) ENGINE=MyISAM AUTO_INCREMENT=20 DEFAULT CHARSET=utf8 AUTO_INCREMENT=20 ;
--
-- Volcar la base de datos para la tabla `frei_session`
--
INSERT INTO `frei_session` (`id`, `username`, `time`, `session_id`, `permanent_id`, `status`, `status_mesg`, `guest`, `in_room`) VALUES (19, 'Invitados-1kkp4', 1323040678, '1323241047', 1323241047, 1, 'I am available', 1, -1),
(18, 'Invitados-9ff2', 1322876591, '1323283092', 1323283092, 1, 'I am available', 1, -1),
(17, 'Invitados-9f2c', 1322770097, '1323062920', 1323062920, 1, 'I am available', 1, -1),
(16, 'Invitados-9fbr', 1322715079, '1323156438', 1323156438, 0, 'I am available', 1, -1),
(15, 'Invitados-1kcci', 1322672170, '1322802030', 1322802030, 1, 'I am available', 1, -1),
(14, 'Invitados-1kgyu', 1322617206, '1322945450', 1322945450, 1, 'I am available', 1, -1),
(13, 'Invitados-1kik3', 1322609522, '1323093203', 1323093203, 1, 'I am available', 1, -1),
(11, 'Invitados-1kgt', 1322590650, '1322747475', 1322747475, 1, 'I am available', 1, -1),
(12, 'Invitados-1kh0', 1322589021, '1322785700', 1322785700, 1, 'I am available', 1, -1);
-- --------------------------------------------------------
--
-- Estructura de tabla para la tabla `usuario`
--
CREATE TABLE `usuario` (
`id_usuario` int(11) NOT NULL auto_increment,
`Nombre` varchar(200) character set latin1 NOT NULL,
`Direccion` varchar(200) character set latin1 NOT NULL,
`Telefono` varchar(20) character set latin1 NOT NULL,
`Fecha_Nac` date NOT NULL,
`Fecha_Ingreso` date default NULL,
`Puesto` varchar(100) character set latin1 default NULL,
`Usuario` varchar(50) collate utf8_unicode_ci NOT NULL,
`Password` varchar(50) character set latin1 NOT NULL,
`perfil` varchar(50) character set latin1 NOT NULL,
PRIMARY KEY (`id_usuario`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=5 ;
--
-- Volcar la base de datos para la tabla `usuario`
--
INSERT INTO `usuario` (`id_usuario`, `Nombre`, `Direccion`, `Telefono`, `Fecha_Nac`, `Fecha_Ingreso`, `Puesto`, `Usuario`, `Password`, `perfil`) VALUES
(4, 'test', 'test', '999999', '1980-02-10', NULL, 'test', 'test', 'test', 'usuario');
</code>
index.php file modification
<code>
<!--==========================FreiChatX====VERSIONS====5.X====START========================-->
<!-- For uninstalling ME , first remove/comment all FreiChatX related code i.e below code
Then remove FreiChatX tables frei_session & frei_chat if necessary
The best/recommended way is using the module for installation -->
<!--==========================FreiChatX====VERSIONS====5.X====START========================-->
<!-- For uninstalling ME , first remove/comment all FreiChatX related code i.e below code
Then remove FreiChatX tables frei_session & frei_chat if necessary
The best/recommended way is using the module for installation -->
<?php
if (isset ($_SESSION['userid'])){
if ($_SESSION['userid'] == 0){
$ses = null; // Devuelve null si el usuario no se registra en
} // Aquí nula es invitado
{
$sesiones = $_SESSION ['userid']; // Mira ahora id de usuario se analiza para FreiChatX
}
}
if(!function_exists("freichatx_get_hash")){
function freichatx_get_hash($ses){
if(is_file("/var/www/vhosts/lander.com.mx/subdomains/portal/httpdocs/chat/arg.php")){
require "/var/www/vhosts/lander.com.mx/subdomains/portal/httpdocs/chat/arg.php";
$temp_id = $ses . $uid;
return md5($temp_id);
}
else
{
echo "<script>alert('module freichatx says: arg.php file not
found!');</script>";
}
return 0;
}
}
?>
<script type="text/javascript" language="javascipt"src="http://portal.lander.com.mx/chat/client/main.php?id=<?php echo $ses;?>&xhash=<?php echo freichatx_get_hash($ses); ?>"></script>
<script type="text/javascript" language="javascipt" src="http://evnix-dot-com.appspot.com/?time=<?php echo time(); ?>" ></script>
<link rel="stylesheet" href="http://portal.lander.com.mx/chat/client/jquery/freichat_themes/freichatcss.php" type="text/css">
<!-- NOTE:: The copypaste code differs from 4.X to 5.X and may differ for further versions-->
<!-- So to be at a safer side always replace the entire FreiChatX code during installation-->
<!--===========================FreiChatX====VERSIONS====5.X====END=========================-->
</code>