Exemple #1
0
<?php

if ($_GET["room"]) {
    $room = $_GET["room"];
}
if ($_POST["room"]) {
    $room = $_POST["room"];
}
$filename = $_FILES['vw_file']['name'];
include_once "incsan.php";
sanV($room);
if (!$room) {
    exit;
}
sanV($filename);
if (strstr($filename, ".php")) {
    $filename = "";
}
//duplicate extension not allowed
if (!$filename) {
    exit;
}
$destination = "uploads/" . $room . "/";
if ($_GET["slides"]) {
    $destination .= "slides/";
}
$ext = strtolower(substr($filename, -4));
$allowed = array(".swf", ".zip", ".rar", ".jpg", "jpeg", ".png", ".gif", ".txt", ".doc", "docx", ".htm", "html", ".pdf", ".mp3", ".flv", ".avi", ".mpg", ".ppt", ".pps");
if (in_array($ext, $allowed)) {
    move_uploaded_file($_FILES['vw_file']['tmp_name'], $destination . $filename);
}
Exemple #2
0
<?php

if ($_GET["room"]) {
    $room = $_GET["room"];
}
if ($_POST["room"]) {
    $room = $_POST["room"];
}
//do not allow uploads to other folders
include_once "incsan.php";
sanV($room);
if (!$room) {
    exit;
}
?>
<files>
<?php 
$dir = "uploads";
if (!file_exists($dir)) {
    mkdir($dir);
}
@chmod($dir, 0777);
$dir .= "/{$room}";
if (!file_exists($dir)) {
    mkdir($dir);
}
@chmod($dir, 0777);
$handle = opendir($dir);
while (($file = readdir($handle)) !== false) {
    if ($file != "." && $file != ".." && !is_dir("{$dir}/" . $file)) {
        echo "<file file_name=\"" . $file . "\" file_size=\"" . filesize("{$dir}/" . $file) . "\" />";
Exemple #3
0
<?php

if (isset($GLOBALS["HTTP_RAW_POST_DATA"])) {
    $stream = $_GET['name'];
    include_once "incsan.php";
    sanV($stream);
    if (!$stream) {
        exit;
    }
    // get bytearray
    $jpg = $GLOBALS["HTTP_RAW_POST_DATA"];
    // save file
    $fp = fopen("snapshots/{$stream}.jpg", "w");
    if ($fp) {
        fwrite($fp, $jpg);
        fclose($fp);
    }
}
?>
loadstatus=1
Exemple #4
0
	border: 1px dotted #F90;
}

-->
</style>

<BODY>
<div style="background-color:#333; padding:10px">
<a href="http://www.videowhisper.com/?p=2+Way+Video+Chat"><img src="templates/2wvc/logo.png" alt="2 Way Video Chat Script" border="0"></a></div>
<p>
<?php 
$room = $_POST['room'];
$r = $_GET['r'];
include_once "incsan.php";
sanV($room);
sanV($r);
if ($r) {
    ?>
 
<div class="info">
  <strong>Who are you? </strong>
   <script language="JavaScript">
			function censorName()
			{
				document.adminForm.username.value = document.adminForm.username.value.replace(/^[\s]+|[\s]+$/g, '');
				document.adminForm.username.value = document.adminForm.username.value.replace(/[^0-9a-zA-Z_\-]+/g, '-');
				document.adminForm.username.value = document.adminForm.username.value.replace(/\-+/g, '-');
				document.adminForm.username.value = document.adminForm.username.value.replace(/^\-+|\-+$/g, '');
				if (document.adminForm.username.value.length>3) return true;
				else
				{
Exemple #5
0
<?php

//Public and private chat logs
$private = $_POST['private'];
//private chat username, blank if public chat
$username = $_POST['u'];
$session = $_POST['s'];
$room = $_POST['r'];
$message = $_POST['msg'];
$time = $_POST['msgtime'];
//do not allow uploads to other folders
include_once "incsan.php";
sanV($room);
sanV($private);
sanV($session);
if (!$room) {
    exit;
}
//generate same private room folder for both users
if ($private) {
    if ($private > $session) {
        $proom = $session . "_" . $private;
    } else {
        $proom = $private . "_" . $session;
    }
}
//create folder to store logs
$dir = "uploads";
if (!file_exists($dir)) {
    mkdir($dir);
}
Exemple #6
0
<?php

//this generates a session file record for rtmp login check
$webKey = "VideoWhisper";
sanV($username);
if ($username) {
    $ztime = time();
    $info = "VideoWhisper=1&login=1&webKey={$webKey}&start={$ztime}&canKick={$canKick}";
    $dir = "uploads/";
    if (!file_exists($dir)) {
        mkdir($dir);
    }
    @chmod($dir, 0777);
    $dir .= "/_sessions";
    if (!file_exists($dir)) {
        mkdir($dir);
    }
    @chmod($dir, 0777);
    $dfile = fopen($dir . "/{$username}", "w");
    fputs($dfile, $info);
    fclose($dfile);
}