View file class.inc.php

File size: 3.15Kb
<?php
Error_Reporting(E_ALL & ~E_NOTICE);
class chat {
function a_header($title = 'WapMoto чат',$time_update = '0'){

define('ref', md5(uniqid(rand(1000, 9999),1)));
define('ref1', md5(uniqid(rand(1000, 9999),1)));
define('ref2', md5(uniqid(rand(1000, 9999),1)));
define('ref3', md5(uniqid(rand(1000, 9999),1)));
define('ref4', substr(md5(uniqid(rand(1000, 9999),1)),0,5));
define('ref5', md5(uniqid(rand(1000, 9999),1)));
define('ref6', md5(uniqid(rand(1000, 9999),1)));
define('ref7', md5(uniqid(rand(1000, 9999),1)));
define('ref8', md5(uniqid(rand(1000, 9999),1)));
define('ref9', md5(uniqid(rand(1000, 9999),1)));
define('ref10', md5(uniqid(rand(1000, 9999),1)));
define('ref11', md5(uniqid(rand(1000, 9999),1)));
define('ref12', md5(uniqid(rand(1000, 9999),1)));
define('ref13', md5(uniqid(rand(1000, 9999),1)));
define('ref14', md5(uniqid(rand(1000, 9999),1)));
define('ref15', md5(uniqid(rand(1000, 9999),1)));
define('ref16', md5(uniqid(rand(1000, 9999),1)));
define('ref17', md5(uniqid(rand(1000, 9999),1)));

require_once(rootpath.'compress.php');
header("Cache-Control: no-store, no-cache");
header("Content-type:text/html; charset=utf-8");

echo '<!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><link rel="stylesheet" type="text/css" href="'.rootlink.'css/css.css"/>
<title>'.$title.'</title>';if (!empty($time_update)){echo '<meta http-equiv="refresh" content="'.$time_update.'" />';}echo '<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /></head><body>';
}
function a_footer($url = '',$name = 'На главную')
{
require_once(rootpath.'endcompress.php');
if (empty($url))  {$url= rootlink.'?action=logout';}
echo '<div class="d0"><a href="'.$url.'&amp;'.SID.'">'.$name.'</a></div></body></html>';
}
function write($text)
{
echo $text;
}
function form($link = 'index.php',$method = 'post')
{
echo '<form action="'.$link.'" method="'.$method.'">';
}
function input($text,$name,$size='',$maxlength,$value = '')
{
if(!empty($text)){echo $text.'<br/>';}
echo '<input type="text" name="'.$name.'" ';
if($size > 0 && !empty($size)){echo 'size="'.$size.'" ';}
if($maxlength > 0){echo 'maxlength="'.$maxlength.'" ';}
echo 'value="'.$value.'" class="itext"/><br/>';
}
function hidden($name,$value)
{
echo '<input type="hidden" name="'.$name.'" value="'.$value.'"/>';
}
function checkbox($name,$value,$nme = 'Текст')
{
echo '<input type="checkbox" name="'.$name.'" value="'.$value.'"/>'.$nme.'<br/>';
}
function button($name,$value,$o = '',$c = '')
{
if(!empty($c)){echo '<input type="radio" name="'.$name.'" value="'.$value.'" checked="checked"/>'.$o.'<br/>';}
else{echo '<input type="radio" name="'.$name.'" value="'.$value.'"/>'.$o.'<br/>';}
}
function end_form($value)
{
echo '<input type="submit" name="" value="'.$value.'" class="ibutton"/></form>';
}
function select($name, $value)
{
echo '<select name="'.$name.'" value="'.$value.'">';
}
function addselect($value, $label)
{
echo '<option value="'.$value.'">'.$label.'</option>';
}
function select_end()
{
echo '</select><br/>';
}
}
?>