' . print_r($v, true) . '';
if ($czyscHtmlIExit) exit;
}
function vv($v, $czyscHtmlIExit = false) {
if ($czyscHtmlIExit) ob_end_clean();
echo '
';
var_dump($v);
echo '
';
if ($czyscHtmlIExit) exit;
}
function vvv($var, & $result = null, $is_view = true)
{
if (is_array($var) || is_object($var)) foreach ($var as $key=> $value) vvv($value, $result[$key], false);
else $result = $var;
if ($is_view) v($result);
}
function loginForm() {
echo'
';
}
function getSetup($key = null) {
$arr = parse_ini_file('setup.ini');
return isset($key) ? $arr[$key] : $arr;
}
function deleteOldHistory() {
$expireHistory = getSetup('expire_history');
$expireDate = date('Y-m-d', strtotime("-$expireHistory day"));
foreach (glob('./history/*') as $f) {
if (basename($f) < $expireDate) {
unlink($f);
}
}
}
//-------------------------
session_start();
if (isset($_GET['logout'])) {
session_destroy();
header("Location: ./"); //Redirect the user
}
if (isset($_REQUEST['name'])) {
if ($_REQUEST['name'] != "") {
$_SESSION['name'] = stripslashes(htmlspecialchars($_REQUEST['name']));
} else {
echo 'Please type in a name';
}
}
if (isset($_REQUEST['room'])) {
$room = $_REQUEST['room'];
} else {
$room = "";
}
?>
Chat - Customer Module