Example #1
0
<?php

if (version_compare(PHP_VERSION, '5') >= 0) {
    $Cmd[2] = addslashes(str_replace(" ", "%20", $Cmd[2]));
    //require EmbeVi Class
    include_once 'plugins/video/embevi.class.php';
    //instantiate EmbeVi class
    $embevi = new EmbeVi();
    $embevi->setAcceptShortUrl();
    $embevi->setAcceptExtendedSupport();
    if ($embevi->parseUrl($Cmd[2])) {
    } else {
        $Error = L_NO_VIDEO;
    }
}
if (!isset($Error)) {
    if (C_ALLOW_VIDEO) {
        $DbLink->query("INSERT INTO " . C_MSG_TBL . " VALUES ('{$T}', '{$R}', 'SYS video', '', '" . time() . "', '{$U}', '{$Cmd['2']}', '', '')");
        if (C_EN_STATS) {
            $DbLink->query("UPDATE " . C_STS_TBL . " SET vids_posted=vids_posted+1 WHERE stat_date=FROM_UNIXTIME(last_in,'%Y-%m-%d') AND room='{$R}' AND username='******'");
        }
    } else {
        AddMessage($Cmd[2], $T, $R, $U, '', '', '', '', $Charset);
        if (C_EN_STATS) {
            $DbLink->query("UPDATE " . C_STS_TBL . " SET urls_posted=urls_posted+1 WHERE stat_date=FROM_UNIXTIME(last_in,'%Y-%m-%d') AND room='{$R}' AND username='******'");
        }
    }
    $IsCommand = true;
    $RefreshMessages = true;
}
Example #2
0
     if ($imgSize[0] == MAX_PIC_SIZE || $imgSize[1] == MAX_PIC_SIZE) {
         $Resized = "<br />(" . L_PIC_RESIZED . " <B>" . round($imgSize[0], -1) . "</B>" . (isset($imgSize[1]) && $imgSize[1] != "" ? " x <B>" . round($imgSize[1], -1) . "</B>" : "") . ")";
     } else {
         $Resized = '';
     }
     $NewMsg .= "<font class=\"notify\"><a href='" . $Message . "' onMouseOver=\"window.status='" . sprintf(L_CLICK, L_FULLSIZE_PIC) . ".'; return true\" title='" . sprintf(L_CLICK, L_FULLSIZE_PIC) . "' target=_blank>" . L_PIC . "</a> " . $Dest . ":</font></td><td valign=\"top\"><a href=" . $Message . " onMouseOver=\"window.status='" . sprintf(L_CLICK, L_FULLSIZE_PIC) . ".'; return true\" title='" . sprintf(L_CLICK, L_FULLSIZE_PIC) . "' target=_blank><img src=" . $Message . (isset($imgSize[0]) && $imgSize[0] != "" ? " width=" . $imgSize[0] : "") . (isset($imgSize[1]) && $imgSize[1] != "" ? " height=" . $imgSize[1] : "") . " border=0 alt='" . sprintf(L_CLICK, L_FULLSIZE_PIC) . "'></a>" . $Resized . "</td></tr></table>";
 } elseif ($User == "SYS utube") {
     include_once './plugins/video/youtube.class.php';
     $jutjub = new YouTube();
     $youtube = $jutjub->EmbedVideo($Message, C_VIDEO_WIDTH, C_VIDEO_HEIGHT);
     $NewMsg .= "<font class=\"notify\"><img src=\"images/icons/youtube.png\" border=0 alt='YouTube' title='YouTube'>&nbsp;<a href='" . $Message . "' onMouseOver=\"window.status='" . sprintf(L_CLICK, L_ORIG_VIDEO) . ".'; return true\" title='" . sprintf(L_CLICK, L_ORIG_VIDEO) . "' target=_blank>" . L_VIDEO . "</a> " . $Dest . ":</font></td><td valign=\"top\">" . $youtube . "</td></tr></table>";
 } elseif ($User == "SYS video") {
     //require EmbeVi Class
     include_once 'plugins/video/embevi.class.php';
     //instantiate EmbeVi class
     $embevi = new EmbeVi();
     $embevi->setAcceptShortUrl();
     $embevi->setProviderIconLocal();
     $embevi->setProviderIconUrl('images/icons/');
     $embevi->setAcceptExtendedSupport();
     if ($embevi->parseUrl($Message)) {
         //set embeded width
         $embevi->setWidth(C_VIDEO_WIDTH);
         //set embeded height
         $embevi->setHeight(C_VIDEO_HEIGHT);
         //get the icon from the provider info
         $ealt = $embevi->getEmbeddedInfo();
         #					$eicon = $embevi->getEmbeddedIcon();
         $eicon = $embevi->getProviderImageIdentifier();
         //display video and embeded code
         $video = $embevi->getCode();
 $NewMsg .= "<td width=\"1%\" nowrap=\"nowrap\">" . $Time . "</td><td width=\"1%\" nowrap=\"nowrap\">" . $Room . "</td>";
 if ($Dest != " *" && $User != "SYS room" && $User != "SYS image" && $User != "SYS video" && $User != "SYS utube" && $User != "SYS math" && $User != "SYS topic" && $User != "SYS topic reset" && substr($User, 0, 8) != "SYS dice") {
     $User = $colorname_tag . "[" . special_char($User, $Latin1) . "]" . $colorname_endtag;
     if ($Dest != "") {
         $Dest = ">" . $colorname_tag . "[" . htmlspecialchars(stripslashes($Dest)) . "]" . $colorname_endtag;
     }
     $NewMsg .= "<td width=\"1%\" nowrap=\"nowrap\"><B>{$User}{$Dest}</B></td><td>" . $Message . "</td>";
 }
 if ($User == "SYS image") {
     $NewMsg .= "<td width=\"1%\" nowrap=\"nowrap\"><B>" . $colorname_tag . "[{$Dest}]" . $colorname_endtag . "</B></td><td><FONT class=\"notify\">" . L_PIC . " {$Dest}:</FONT> <A href=" . $Message . " onMouseOver=\"window.status='" . sprintf(L_CLICK, L_FULLSIZE_PIC) . ".'; return true\" title=\"" . sprintf(L_CLICK, L_FULLSIZE_PIC) . "\" target=_blank>" . $Message . "</A></td>";
 }
 if ($User == "SYS video") {
     //require EmbeVi Class
     include_once 'plugins/video/embevi.class.php';
     //instantiate EmbeVi class
     $embevi = new EmbeVi();
     $embevi->setAcceptShortUrl();
     $embevi->setProviderIconLocal();
     $embevi->setProviderIconUrl('images/icons/');
     $embevi->setAcceptExtendedSupport();
     if ($embevi->parseUrl($Message)) {
         $ealt = $embevi->getEmbeddedInfo();
         $eicon = $embevi->getProviderImageIdentifier();
         $NewMsg .= "<td width=\"1%\" nowrap=\"nowrap\"><B>" . $colorname_tag . "[{$Dest}]" . $colorname_endtag . "</B></td><td><FONT class=\"notify\"><img src=\"" . $eicon . "\" width='16' border=0 alt='&copy; " . $ealt . "' title='&copy; " . $ealt . "'>&nbsp;" . L_VIDEO . " {$Dest}:</FONT> <A href=" . $Message . " onMouseOver=\"window.status='" . sprintf(L_CLICK, L_ORIG_VIDEO) . ".'; return true\" title=\"" . sprintf(L_CLICK, L_ORIG_VIDEO) . "\" target=_blank>" . $Message . "</A></td>";
     }
 }
 if ($User == "SYS utube") {
     $NewMsg .= "<td width=\"1%\" nowrap=\"nowrap\"><B>" . $colorname_tag . "[{$Dest}]" . $colorname_endtag . "</B></td><td><FONT class=\"notify\"><img src=\"images/icons/youtube.png\" border=0 alt='YouTube' title='YouTube'>&nbsp;" . L_VIDEO . " {$Dest}:</FONT> <A href=" . $Message . " onMouseOver=\"window.status='" . sprintf(L_CLICK, L_ORIG_VIDEO) . ".'; return true\" title=\"" . sprintf(L_CLICK, L_ORIG_VIDEO) . "\" target=_blank>" . $Message . "</A></td>";
 }
 if ($User == "SYS announce") {
     if ($Message == 'L_RELOAD_CHAT') {