$feed['body_template'] = 'feed_thread_activity_message'; $feed['body_data'] = array('subject' => "<a href=\"{$boardurl}viewthread.php?tid={$tid}\">{$subject}</a>", 'starttimefrom' => $starttimefrom[$activitytime], 'activityplace' => $activityplace, 'cost' => $cost, 'message' => cutstr(strip_tags(preg_replace(array("/\\[hide=?\\d*\\].+?\\[\\/hide\\]/is", "/\\[.+?\\]/is"), array('', ''), $message)), 150)); } elseif ($special == 5) { $feed['icon'] = 'debate'; $feed['title_template'] = 'feed_thread_debate_title'; $feed['body_template'] = 'feed_thread_debate_message'; $feed['body_data'] = array('subject' => "<a href=\"{$boardurl}viewthread.php?tid={$tid}\">{$subject}</a>", 'message' => cutstr(strip_tags(preg_replace(array("/\\[hide=?\\d*\\].+?\\[\\/hide\\]/is", "/\\[.+?\\]/is"), array('', ''), $message)), 150), 'affirmpoint' => cutstr(strip_tags(preg_replace("/\\[.+?\\]/is", '', $affirmpoint)), 150), 'negapoint' => cutstr(strip_tags(preg_replace("/\\[.+?\\]/is", '', $negapoint)), 150)); } elseif ($special == 6) { $feed['icon'] = 'video'; $feed['title_template'] = 'feed_thread_video_title'; $feed['body_template'] = 'feed_thread_video_message'; $feed['body_data'] = array('subject' => "<a href=\"{$boardurl}viewthread.php?tid={$tid}\">{$subject}</a>", 'play' => "<a href=\"{$boardurl}viewthread.php?tid={$tid}\" class=\"playbutton\">Play</a>", 'message' => cutstr(strip_tags(preg_replace(array("/\\[hide=?\\d*\\].+?\\[\\/hide\\]/is", "/\\[.+?\\]/is"), array('', ''), $message)), 150), 'vlength' => sprintf("%02d", intval($vlength / 60)) . ':' . sprintf("%02d", intval($vlength % 60))); } } if ($special == 6) { $feed['images'][] = array('url' => VideoClient_Util::getThumbUrl($vid, 'small'), 'link' => "{$boardurl}viewthread.php?tid={$tid}"); } else { if (in_array($attachments[1]['type'], array('image/gif', 'image/jpeg', 'image/png'))) { $attachurl = preg_match("/^((https?|ftps?):\\/\\/|www\\.)/i", $attachurl) ? $attachurl : $boardurl . $attachurl; $imgurl = $attachurl . '/' . $attachments[1]['attachment'] . ($attachments[1]['thumb'] && $attachments[1]['type'] != 'image/gif' ? '.thumb.jpg' : ''); $feed['images'][] = $attachments[1]['attachment'] ? array('url' => $imgurl, 'link' => "{$boardurl}viewthread.php?tid={$tid}") : array(); } } if ($feed) { postfeed($feed); } } if ($digest) { foreach ($digestcredits as $id => $addcredits) { $postcredits[$id] = (isset($postcredits[$id]) ? $postcredits[$id] : 0) + $addcredits; }
This is NOT a freeware, use is subject to license terms $Id: video.php 16688 2008-11-14 06:41:07Z cnteacher $ */ error_reporting(0); define('DISCUZ_ROOT', substr(dirname(__FILE__), 0, -3)); require_once DISCUZ_ROOT . './forumdata/cache/cache_settings.php'; $appid = 'c4ca4238a0b923820dcc509a6f75849b'; $siteid = $_DCACHE['settings']['vsiteid']; $sitekey = $_DCACHE['settings']['vkey']; define('VIDEO_DEBUG', 0); define('SERVER_HOST', 'api.v.insenz.com'); define('SERVER_URL', 'http://' . SERVER_HOST . '/video_api.php'); define('PIC_SERVER_HOST', 'p.v.insenz.com'); if ($_GET['action'] == 'createcode') { echo VideoClient_Util::createCode(); } class VideoClient_Result { var $status; var $errMessage; var $errCode; var $_result; function VideoClient_Result($result) { $this->status = $result['status']; $this->errMessage = $result['errMessage']; $this->errCode = $result['errCode']; $this->_result = $result; if ($result['resultData']) { foreach ($result['resultData'] as $value) {
$extcredits = $_DCACHE['settings']['extcredits']; $creditstransextra = $_DCACHE['settings']['creditstransextra']; $rewardend = $thread['price'] > 0; $rewardprice = abs($thread['price']); $message = cutmessage($db->result_first("SELECT message FROM {$tablepre}posts WHERE tid='{$tid}' AND first=1"), 100); } elseif ($thread['special'] == 4) { $message = cutmessage($db->result_first("SELECT message FROM {$tablepre}posts WHERE tid='{$tid}' AND first=1"), 100); $number = $db->result_first("SELECT number FROM {$tablepre}activities WHERE tid='{$tid}'"); $applynumbers = $db->result_first("SELECT COUNT(*) FROM {$tablepre}activityapplies WHERE tid='{$tid}' AND verified=1"); $aboutmembers = $number - $applynumbers; } elseif ($thread['special'] == 5) { $message = cutmessage($db->result_first("SELECT message FROM {$tablepre}posts WHERE tid='{$tid}' AND first=1"), 100); $debate = $db->fetch_first("SELECT affirmdebaters, negadebaters, affirmvotes, negavotes FROM {$tablepre}debates WHERE tid='{$tid}'"); $debate['affirmvoteswidth'] = $debate['affirmvotes'] ? intval(80 * (($debate['affirmvotes'] + 1) / ($debate['affirmvotes'] + $debate['negavotes'] + 1))) : 1; $debate['negavoteswidth'] = $debate['negavotes'] ? intval(80 * (($debate['negavotes'] + 1) / ($debate['affirmvotes'] + $debate['negavotes'] + 1))) : 1; } elseif ($thread['special'] == 6) { require_once DISCUZ_ROOT . './api/video.php'; $video = $db->fetch_first("SELECT vid, vtitle, vthumb FROM {$tablepre}videos WHERE tid='{$tid}' ORDER BY displayorder LIMIT 1"); $video['vthumb'] = VideoClient_Util::getThumbUrl($video['vid'], 'small'); } else { $message = cutmessage($db->result_first("SELECT message FROM {$tablepre}posts WHERE tid='{$tid}' AND first=1"), 100); } } include template('request_thread'); } else { $request_version = '1.0'; $request_name = $requestlang['thread_name']; $request_description = $requestlang['thread_desc']; $request_copyright = '<a href="http://www.comsenz.com" target="_blank">Comsenz Inc.</a>'; $request_settings = array('tid' => array($requestlang['thread_id'], '', 'text')); }
$multipage = multi($num, $tpp, $page, "my.php?item=debate&type=reply{$extrafid}"); $query = $db->query("SELECT m.dateline, t.tid, t.fid, t.subject, t.displayorder, t.closed\r\n\t\t\tFROM {$tablepre}myposts m, {$tablepre}threads t\r\n\t\t\tWHERE m.uid='{$discuz_uid}' AND m.special='5' AND m.tid=t.tid {$threadadd}\r\n\t\t\tORDER BY m.dateline DESC LIMIT {$start_limit}, {$tpp}"); while ($debate = $db->fetch_array($query)) { $debate['dateline'] = dgmdate("{$dateformat} {$timeformat}", $debate['dateline'] + $timeoffset * 3600); $debate['forumname'] = $_DCACHE['forums'][$debate['fid']]['name']; $debatelist[] = $debate; } } } elseif ($item == 'video') { require_once DISCUZ_ROOT . './api/video.php'; $videolist = array(); $num = $db->result_first("SELECT COUNT(*) FROM {$tablepre}videos WHERE uid='{$discuz_uid}'"); $multipage = multi($num, $tpp, $page, "my.php?item=video"); $query = $db->query("SELECT * FROM {$tablepre}videos WHERE uid='{$discuz_uid}' ORDER BY dateline DESC LIMIT {$start_limit}, {$tpp}"); while ($video = $db->fetch_array($query)) { $video['vthumb'] = !$videoinfo['vthumb'] ? VideoClient_Util::getThumbUrl($video['vid'], 'small') : $videoinfo['vthumb']; $video['dateline'] = dgmdate("{$dateformat} {$timeformat}", $video['dateline'] + $timeoffset * 3600); $video['vtime'] = $video['vtime'] ? sprintf("%02d", intval($video['vtime'] / 60)) . ':' . sprintf("%02d", intval($video['vtime'] % 60)) : ''; $videolist[] = $video; } $videonum = count($videolist); $videoendrows = ''; if ($colspan = $videonum % 2) { while ($colspan - 2 < 0) { $videoendrows .= '<td></td>'; $colspan++; } $videoendrows .= '</tr>'; } } elseif ($item == 'buddylist') { include_once DISCUZ_ROOT . './uc_client/client.php';
} else { $videoinfo['vthumb'] = VideoClient_Util::getThumbUrl($videoinfo['vid'], 'small'); } $videoinfo['vtime'] = $videoinfo['vtime'] ? sprintf("%02d", intval($videoinfo['vtime'] / 60)) . ':' . sprintf("%02d", intval($videoinfo['vtime'] % 60)) : ''; $videolist[] = $videoinfo; } if (!empty($videolist)) { $videocount = count($videolist); if (!empty($vid)) { foreach ($videolist as $video) { if ($video['vid'] == $vid) { $vid = dhtmlspecialchars($video['vid']); $vautoplay = $autoplay ? intval($autoplay) : $video['vautoplay']; break; } } } else { $vid = $videolist[0]['vid']; $vautoplay = $autoplay ? intval($autoplay) : $videolist[0]['vautoplay']; } if (!$videosource) { $client = new VideoClient_Util($appid, $siteid, $sitekey); $videoshow = $client->createPlayer(array(), array('ivid' => $vid, 'site' => $boardurl, 'auto' => $vautoplay)); } else { $playurl = "http://union.bokecc.com/flash/discuz2/player.swf?siteid={$vsiteid}&vid={$vid}&tid={$tid}&pid={$pid}&autoStart={$vautoplay}&referer=" . urlencode($boardurl . "viewthread.php?tid={$tid}"); $videoshow = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" id="object_flash_player" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" height="373" width="438">' . '<param name="movie" value=' . $playurl . '>' . '<param name="quality" value="high">' . '<param name="allowScriptAccess" value="always">' . '<param name="allowFullScreen" value="true">' . '<embed src=' . $playurl . ' allowScriptAccess="always" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" allowfullscreen="true" height="373" width="438"></object>'; } } else { $db->query("UPDATE {$tablepre}threads SET special=0 WHERE tid='{$tid}'", 'UNBUFFERED'); dheader("Location: {$boardurl}viewthread.php?tid={$tid}"); }
<?php /* [Discuz!] (C)2001-2009 Comsenz Inc. This is NOT a freeware, use is subject to license terms $Id: my.php 10920 2007-10-19 00:53:10Z monkey $ */ define('NOROBOT', TRUE); define('CURSCRIPT', 'video'); require_once './include/common.inc.php'; require_once DISCUZ_ROOT . './api/video.php'; if ($action == 'player') { $ivid = $ivid ? $ivid : $vid; $tid = $db->result_first("SELECT tid FROM {$tablepre}videos WHERE vid='{$ivid}'"); $tid = $tid ? intval($tid) : ''; dheader("Location: {$boardurl}viewthread.php?tid={$tid}&vid={$ivid}"); } elseif ($action == 'updatevideoinfo') { $db->query("UPDATE {$tablepre}videos SET vview=vview+'1' WHERE vid='{$vid}'"); showmessage('ok'); } elseif ($action == 'flv') { $client = new VideoClient_Util($appid, $siteid, $sitekey); $flvurl = $client->createReferPlayer(array('ivid' => $ivid, 'm' => 'play', 'site' => $boardurl)); dheader("Location: {$flvurl}"); } else { showmessage('undefined_action', NULL, 'HALTED'); }