function getAllActiveVideosByExamYear($examyear) { $conn = getConnection(); $query = "SELECT * FROM video WHERE examyear = '" . $examyear . "' AND activeflag = 1 ORDER BY ID DESC"; $result = mysql_query($query); $list = array(); while ($member = mysql_fetch_array($result)) { $temp = getVideo($member['ID']); array_push($list, $temp); } if (count($list) != 0) { return $list; } return NULL; }
function main() { if (isset($_REQUEST['type'])) { $type = $_REQUEST['type']; if ($type == "info") { return getInfo(); } else { if ($type == "video") { return getVideo(); } else { if ($type == "danmaku") { return getDanmaku(); } } } } make_error(400, "Invaild type"); }
$collectionDb = $count ? !$type ? $collectionService->findByUidInPage($winduid, $page, $db_perpage, $ftype) : $collectionService->findByUidAndTypeInPage($winduid, $type, $page, $db_perpage, $ftype) : array(); $pages = numofpage($count, $page, ceil($count / $db_perpage), "{$basename}type={$type}&ftype={$ftype}&"); } elseif ($a == 'post') { $totalCollection = $collectionService->countByUid($winduid); $totalCollection >= $_G['maxfavor'] && Showmsg('已达到用户组允许的收藏上限'); PostCheck(); S::gp(array('link'), 'P', 1); $link = str_replace('=', '=', $link); !$link && Showmsg('链接地址不能为空'); !preg_match("/^https?\\:\\/\\/.{4,255}\$/i", $link) && Showmsg('mode_share_link_error'); $share['uid'] = $winduid; $share['username'] = $windid; $share['link'] = $link; $parselink = parse_url($link); if (preg_match("/(youku.com|youtube.com|sohu.com|sina.com.cn)\$/i", $parselink['host'], $hosts)) { $hash = getVideo($link, $hosts[1]); if (!empty($hash)) { $type = "multimedia"; $share['type'] = 'video'; $share['video']['hash'] = $f_hash = $hash; $share['video']['host'] = $hosts[1]; } else { //$type = "multimedia"; $type = $share['type'] = 'web'; } if (preg_match("/\\.swf\\??.*\$/i", $link)) { $type = "multimedia"; $share['type'] = 'flash'; $f_hash = $share['link']; } } elseif (preg_match("/\\.(mp3|wma)\\??.*\$/i", $link)) {
<?php } } else { if ($featuring['featuring_type'] == 'picture') { $image = getFeaturingImage($project['project_id']); if (!empty($image)) { ?> <p><img src="uploads/images/<?php echo $image; ?> "></p> <?php } } else { $video = getVideo($project['project_id']); ?> <!-- Chang URLs to wherever Video.js files will be hosted --> <link href="js/video-js/video-js.css" rel="stylesheet" type="text/css"> <!-- video.js must be in the <head> for older IEs to work. --> <script src="js/video-js/video.js"></script> <!-- Unless using the CDN hosted version, update the URL to the Flash SWF --> <script> videojs.options.flash.swf = "js/video-js/video-js.swf"; </script> <div class="project-video auto-width"> <video id="video_1" class="video-js vjs-default-skin" controls preload="none" width="600" height="338" data-setup="{}"> <source src="<?php
</div> <div class="content-block"> <div class="content-title">Project Story</div> <p> <?php echo $project['details']; ?> </div> <div class="content-block"> <div class="content-title">Extra Details</div> <div class="form-item no-height"> <?php $video = getVideo($id); if (!empty($video)) { ?> <link href="js/video-js/video-js.css" rel="stylesheet" type="text/css"> <!-- video.js must be in the <head> for older IEs to work. --> <script src="js/video-js/video.js"></script> <!-- Unless using the CDN hosted version, update the URL to the Flash SWF --> <script> videojs.options.flash.swf = "js/video-js/video-js.swf"; </script> <div class="project-video auto-width"> <video id="video_1" class="video-js vjs-default-skin" controls preload="none" width="420" height="250" data-setup="{}">
while ($stmt->fetch()) { $results[$i]['title'] = $title; $results[$i]['video_embed'] = $video_embed; $i++; } $stmt->close(); $mysqli->close(); return $results; } } ?> <div id="videoModal" class="white"> <?php if (isset($_GET['id'])) { $pageId = $_GET['id']; $pageDetails = getVideo($pageId, $DB_SERVER, $DB_USERNAME, $DB_PASSWORD, $DB_DATABASE); foreach ($pageDetails as $pageDetail) { echo '<h3>' . $pageDetail['title'] . '</h3>'; echo '<div class="text-center videoWrapper">' . stripcslashes(stripcslashes($pageDetail['video_embed'])) . '</div>'; } } else { if (isset($_GET['src'])) { $src = $_GET['src']; if (isset($_GET['title'])) { echo '<h3>' . $_GET['title'] . '</h3>'; } ?> <div class="text-center videoWrapper"> <iframe src="<?php echo $src; ?>
$ch = curl_init($url); curl_setopt($ch, CURLOPT_HEADER, 0); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_BINARYTRANSFER, 1); $rawdata = curl_exec($ch); curl_close($ch); $path = dirname(__DIR__); $fp = fopen($path . "/sally/videos/{$rename}.mp4", 'w'); fwrite($fp, $rawdata); fclose($fp); return true; } $ch = curl_init(); $video = $l; $random_string = generateRandomString(); if (getVideo($video, $random_string, $ch)) { $path = dirname(__DIR__); //upload video to impossible software $username = "******"; $password = "******"; $file = fopen($path . "/sally/videos/{$random_string}.mp4", 'r'); $is_url = 'https://api.impossible.io/v1/data/' . $DISTRIBUTION_ID . '/' . $random_string . '.mp4'; $ch = curl_init(); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_BINARYTRANSFER, true); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST"); curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true); curl_setopt($ch, CURLOPT_URL, $is_url); curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/json')); curl_setopt($ch, CURLOPT_USERPWD, $username . ':' . $password);
$query = urlclean($query); // Save query saveRequest($query); $app->render('layout.php', ['page' => 'search', 'results' => search($query), 'query' => $query, 'video' => getVideo($query), 'title' => ucwords($query) . ' download mp3 music | Mp3Cooll.com', 'description' => 'Download ' . ucwords($query) . ' mp3 and listen online song ' . ucwords($query) . ' just now unlimited. Watch video ']); })->conditions(['query' => '.+']); /** * Search route */ $app->get('/search', function () use($app) { $query = urlclean($_GET['q']); if (strlen($query) < 1) { $app->redirect('/'); } // Save query saveRequest($query); $app->render('layout.php', ['page' => 'search', 'results' => search($query), 'query' => $query, 'video' => getVideo($query), 'title' => ucwords($query) . ' download mp3 music | Mp3Cooll.com', 'description' => 'Download ' . ucwords($query) . ' mp3 and listen online song ' . ucwords($query) . ' just now unlimited. Watch video ']); }); /** * Autocomplete route */ $app->get('/autocomplete', function () use($app) { //$_GET['query'] echo json_encode(['query' => $_GET['query'], 'suggestions' => getAutocompleteData($_GET['query'])]); }); /** * Search route */ $app->get('/:query', function ($query) use($app) { $app->redirect('/' . urlclean($query, '-') . '.html'); })->conditions(['query' => '.+']); /**