public function addVideoAction(Request $request, $id) { // Récupère les informations de l'utilisateur connecté depuis la BDD $em = $this->getDoctrine()->getManager(); $newVideo = new video(); $Series = $em->getRepository('VideoBundle:serie')->find($id); // Formulaire pour la modification des infos $form = $this->createFormBuilder()->add('titre', 'text', array('label' => 'Titre : ', 'data' => ''))->add('url', 'text', array('label' => 'Url de l\'iframe : ', 'data' => ''))->add('serie_id', 'text', array('label' => 'Serie id : ', 'data' => $Series->getTitre()))->add('saison', 'text', array('label' => 'Saison : ', 'data' => ''))->add('episode', 'text', array('label' => 'Episode : ', 'data' => ''))->add('urlImage', 'text', array('label' => 'Url de l\'image : ', 'data' => '', 'required' => false))->add('sauvegarder', 'submit')->getForm(); $form->handleRequest($request); // Se lance lorsque le formulaire est soumis if ($form->isValid()) { $video = $form->getData(); // Enregistre le nouveau titre dans la BDD $newVideo->setTitre($video['titre']); // Enregistre le nouveau nbSaisons dans la BDD $newVideo->setUrl($video['url']); // Enregistre le nouveau genre dans la BDD $newVideo->setSerieId($id); // Enregistre le nouveau description dans la BDD $newVideo->setSaison($video['saison']); // Enregistre le nouveau annee dans la BDD $newVideo->setEpisode($video['episode']); // Enregistre le nouveau urlImage dans la BDD $newVideo->setUrlImage($video['urlImage']); // Applique les modifications de BDD $em->persist($newVideo); $em->flush(); } // Lance la view avec le formulaire en paramètre return $this->render('VideoBundle:Sommaire:addVideo.html.twig', array('form' => $form->createView())); }
/** * Returns HTML containing all video details. * @param integer $cid Content ID of the video. * @return string JSON String */ function getVideoHtml($cid) { $v=new video($cid); $tagarray=$v->getTags(); $c=count($tagarray); $tags=""; for($i=0;$i<$c;$i++) $tags.="<li><a href='search.php?tag=".$tagarray[$i]."'>".$tagarray[$i]."</a></li>"; $video= "<span class='videoTitle'>".$v->getTitle()."</span> <!-- Begin VideoJS --> <div class='video-js-box'> <video cid='".$v->getContentId()."' poster='".$v->getPoster()."' class='video-js' controls preload height=325 width=550> <source src='".$v->getCompletePath()."' type='video/ogg; codecs=\"theora, vorbis\"' /> </video> </div> <!-- End VideoJS --> <!-- video bar --> <div class='videoBar'> <img src='pics/vidbar/watch.png' class='VideoBarButton' /><span class='videoBarElement' id='playCount'>Views:".$v->getViewCount()."</span> <span id='likes' defStatus='1' ></span> <img src='pics/vidbar/download.png' title='Download' class='VideoBarButton' style='float:right;' id='downloadButton' /> </div> <!-- /video bar --> <img src='pics/vidbar/tag.png' title='tags' style='margin-left:6px;'/> <ul class='tags'>".$tags."</ul> <div class='VideoDesc'>".$v->getDesc()."</div>"; $v->addViewCount(); return $video; }
public function ChallengeMail(video $newVideo, challenge $challenge) { //Get all the videos that are under the current video repetitions $listVideos = $this->em->getRepository('BFSiteBundle:Video')->lowerRepetitionsVideos($challenge, $newVideo->getRepetitions()); if ($listVideos !== null) { $subject = "Nouvelle vidéo pour le challenge " . $challenge->getTitleFR() . "!"; foreach ($listVideos as $video) { if ($newVideo->getUser()->getId() != $video->getUser()->getId()) { //send a mail to the user to notice him the new video. $message = \Swift_Message::newInstance()->setSubject($subject)->setFrom('*****@*****.**')->setTo($video->getUser()->getEmailCanonical())->setBody($this->render('Emails/challenge/ScorePassed.html.twig', array('subject' => $subject, 'user' => $video->getUser(), 'opponentVideo' => $newVideo)), 'text/html'); $this->mailer->send($message); //using the spool mailing method unset($message); } } } $done = true; return $done; }
function index() { if ($this->args[0] != 'index') { system::setParam("page", "showPage"); video::getPostBySlug($this->args[0]); //$this->smarty->addCacheID(); // @Mgenry что ты несёшь блять ??? } else { system::setParam("page", "listPage"); $fill = video::getPosts()->fetchAll(); $this->smarty->assign("fill", $fill); } }
function addPageAjax() { system::setParam("page", "ajax"); if ($_POST) { $fill = array(); $slug = ""; $fill = $_POST; if (!empty($_POST["slug"])) { $slug = core::generateSlug($_POST["slug"]); } else { if (!empty($_POST["title"])) { $slug = core::generateSlug($_POST["title"]); } } $fill["slug"] = $slug; $savedPost = video::writePost($fill); // $this->smarty->assign ("fill", $fill); return true; } }
<?php $videoid = $_REQUEST['i']; $d = $_REQUEST['d']; require_once 'classes/connexio.php'; require_once 'classes/videos.php'; require_once './lang.php'; $v = new video(); $v->seleccionar($videoid); $bd = new connexio(); $dades = $bd->query("SELECT nom FROM empresa LIMIT 1"); $empresa = $dades->fetch_array(MYSQLI_ASSOC); $bd->close(); ?> <script> function tancar(){ $(".desc").hide("slow",function(){ $(".desc").remove(); }); $(".descexistent").hide("slow",function(){ $(".descexistent").remove(); }); history.pushState('', document.title, window.location.pathname);
/** * 浏览详细内容 */ public function actionView($id) { $video = Video::model()->findByPk(intval($id)); if (false == $video || $video->status == 'N') { throw new CHttpException(404, Yii::t('common', 'The requested page does not exist.')); } // seo信息 $this->_seoTitle = empty($video->seo_title) ? $video->title . ' - ' . $this->_setting['site_name'] : $video->seo_title; $this->_seoKeywords = empty($video->seo_keywords) ? $this->_seoKeywords : $post->seo_keywords; $this->_seoDescription = empty($video->seo_description) ? $this->_seoDescription : $video->seo_description; $catalogArr = Catalog::model()->findByPk($video->catalog_id); //更新浏览次数 $video->updateCounters(array('view_count' => 1), 'id=:id', array('id' => $id)); // 加载css,js Yii::app()->clientScript->registerCssFile($this->_stylePath . "/css/view.css"); Yii::app()->clientScript->registerCssFile($this->_stylePath . "/css/score.css"); Yii::app()->clientScript->registerScriptFile($this->_static_public . "/js/jquery/jquery.js"); Yii::app()->clientScript->registerScriptFile($this->_stylePath . "/js/score.js", CClientScript::POS_END); // 最近的软件 $last_videos = video::model()->findAll(array('condition' => 'catalog_id = ' . $video->catalog_id, 'order' => 'id DESC', 'limit' => 10)); // nav $navs = array(); $navs[] = array('url' => $this->createUrl('video/view', array('id' => $id)), 'name' => $video->title); $tplVar = array('video' => $video, 'navs' => $navs, 'last_videos' => $last_videos); $this->render('view', $tplVar); }
<?php $videoid = $_REQUEST['i']; $d = $_REQUEST['d']; require_once 'classes/connexio.php'; require_once 'classes/videos.php'; require_once './lang.php'; $v = new video(); $v->seleccionar($videoid); $bd = new connexio(); $dades = $bd->query("SELECT nom FROM empresa LIMIT 1"); $empresa = $dades->fetch_array(MYSQLI_ASSOC); $bd->close(); ?> <script> function tancar(){ $(".desc").hide("slow",function(){ $(".desc").remove(); }); $(".descexistent").hide("slow",function(){ $(".descexistent").remove(); }); history.pushState('', document.title, window.location.pathname); document.title = "<?php echo $empresa['nom']; ?> "; } </script> <div class="containervideo"> <div class="col-md-12">
<?php /* * 行业资讯数据库安装文件 * * @author Arthur(ArthurXF@gmail.com) * @copyright (c) 2006 by bizeway.com * @version $Id$ * modified 2009-1-3 */ include_once dirname(__FILE__) . '/config/config.inc.php'; include_once dirname(__FILE__) . '/class/video.class.php'; $objWebInit = new video(); //数据库连接参数 $objWebInit->setDBG($arrGPdoDB); //smarty参数 $objWebInit->arrGSmarty = $arrGSmarty; $objWebInit->db(); if (empty($charset)) { $charset = str_replace('-', '', $arrGWeb['charset']); } if (empty($charset)) { $extend = $objWebInit->db->getAttribute(PDO::ATTR_SERVER_VERSION) > '4.1' ? " DEFAULT CHARSET={$charset} " : ""; } $intDbSummaryLen = $arrGWeb['db_summary_len']; //写入频道数组 if (empty($strWEB_ROOT_pre)) { $strWEB_ROOT_pre = $arrGWeb['WEB_ROOT_pre']; } if (empty($strWEBADMIN_ROOT)) { $strWEBADMIN_ROOT = $arrGWeb['WEBADMIN_ROOT'];
<?php /** * 最新 列表文件 * * @author Arthur(ArthurXF@gmail.com) * @copyright (c) 2006 by bizeway.com * @version $Id$ * @package ArthurXF * @subpackage video */ if (is_object($objWebInit)) { if (!isset($objvideo)) { include_once __WEB_ROOT . "/video/class/video.class.php"; include_once __WEB_ROOT . "/video/config/var.inc.php"; $objvideo = new video(); $objvideo->setDBG($arrGPdoDB); if (is_object($objWebInit->db)) { $objvideo->db = $objWebInit->db; } else { $objvideo->db(); } } $arrNewest = array(); $arrNewest = $objvideo->getInfoList("where pass=1", " ORDER BY clicktimes DESC,submit_date DESC", 0, 5, true); unset($arrNewest['COUNT_ROWS']); //print_r($arrNewest); // 输出到模板 $arrMOutput["smarty_assign"]['arrNewest'] = $arrNewest; }
public function videoPoints(video $video) { //we get the user $user = $video->getUser(); $challenge = $video->getChallenge(); //if the video is for an ambassador challenge if ($challenge->getType() != 'normal') { //we give the user 0 points $video->setScore('0'); } else { if ($video->getRepetitions() >= $challenge->getSix()) { $video->setScore('300'); } if ($challenge->getSix() > $video->getRepetitions() && $video->getRepetitions() >= $challenge->getFive()) { $video->setScore('250'); } if ($challenge->getFive() > $video->getRepetitions() && $video->getRepetitions() >= $challenge->getFour()) { $video->setScore('200'); } if ($challenge->getFour() > $video->getRepetitions() && $video->getRepetitions() >= $challenge->getThree()) { $video->setScore('150'); } if ($challenge->getThree() > $video->getRepetitions() && $video->getRepetitions() >= $challenge->getTwo()) { $video->setScore('100'); } if ($challenge->getTwo() > $video->getRepetitions() && $video->getRepetitions() >= $challenge->getOne()) { $video->setScore('50'); } if ($challenge->getOne() > $video->getRepetitions()) { $video->setScore('0'); } } //we flush the video. $this->em->persist($video); $this->em->flush(); //get all the videos of the user. $listVideos = $this->em->getRepository('BFSiteBundle:Video')->allVideos($user); //recount the points of the user $points = 0; $oldvideo = null; foreach ($listVideos as $video) { //compter les likes pour la vidéo. $likePoints = count($video->getLikes()) * 5; // 5 points par like. $points = $points + $likePoints; //compter les points de la vidéo et éventuellement les 20 points d'entraînement if ($oldvideo === null) { $points = $points + $video->getScore(); } elseif ($oldvideo->getChallenge()->getId() == $video->getChallenge()->getId()) { //It's the same challenge. //Look for 20 points if ($video->getScore() < $oldvideo->getScore()) { //give 20 points for improvement. $points = $points + 20; } } elseif ($oldvideo->getChallenge()->getId() != $video->getChallenge()->getId()) { //It's a new challenge. $points = $points + $video->getScore(); } $oldvideo = $video; } $user->setPoints($points); $this->em->persist($user); $this->em->flush(); $done = true; return $done; }
<?php /** * 行业视频后台管理栏目新增文件 * * @author Arthur(ArthurXF@gmail.com) * @copyright (c) 2006 by bizeway.com * @version $Id$ * @package ArthurXF * @subpackage video */ require_once '../config/config.inc.php'; require_once "../class/video.class.php"; require_once '../../useradmin/checklogin.php'; $objWebInit = new video(); //数据库连接参数 $objWebInit->setDBG($arrGPdoDB); //smarty参数 $objWebInit->arrGSmarty = $arrGSmarty; //图片上传参数 $objWebInit->arrGPic = $arrGPic; $objWebInit->db(); if ($_SERVER["REQUEST_METHOD"] == "POST") { if (empty($_POST['submitpass']) || $_POST['submitpass'] != $_SESSION['submitpasskey']) { exit; } if (empty($_POST['type_id']) || empty($_POST['title']) || empty($_POST['intro'])) { check::AlertExit("错误:有必填选项没填!", -1); } $arrTemp = explode('|', $_POST['type_id']); $_POST['type_id'] = $arrTemp[0];
$all ? msg($MOD['name'] . '生成成功', $this_forward) : dmsg($MOD['name'] . '生成成功', $this_forward); } $catid = isset($catid) ? intval($catid) : ''; $sql = $catid ? " AND catid={$catid}" : ''; if (!isset($fid)) { $r = $db->get_one("SELECT min(itemid) AS fid FROM {$table} WHERE status>2 {$sql}"); $fid = $r['fid'] ? $r['fid'] : 0; } isset($sid) or $sid = $fid; if (!isset($tid)) { $r = $db->get_one("SELECT max(itemid) AS tid FROM {$table} WHERE status>2 {$sql}"); $tid = $r['tid'] ? $r['tid'] : 0; } if ($update) { require MD_ROOT . '/video.class.php'; $do = new video($moduleid); } isset($num) or $num = 100; if ($fid <= $tid) { $result = $db->query("SELECT itemid FROM {$table} WHERE status>2 AND itemid>={$fid} {$sql} ORDER BY itemid LIMIT 0,{$num} "); if ($db->affected_rows($result)) { while ($r = $db->fetch_array($result)) { $itemid = $r['itemid']; $update ? $do->update($itemid) : tohtml('show', $module); } $itemid += 1; } else { $itemid = $fid + $num; } } else { if ($update) {
<?php /** * 相关新闻 列表文件 * * @author Arthur(ArthurXF@gmail.com) * @copyright (c) 2006 by bizeway.com * @version $Id$ * @package ArthurXF * @subpackage video */ if (is_object($objWebInit)) { if (!isset($objvideo)) { include_once __WEB_ROOT . "/video/class/video.class.php"; include_once __WEB_ROOT . "/video/config/var.inc.php"; $objvideo = new video(); $objvideo->setDBG($arrGPdoDB); if (is_object($objWebInit->db)) { $objvideo->db = $objWebInit->db; } else { $objvideo->db(); } } if (isset($arrInfo['tag']) && !empty($arrInfo['tag'])) { $arrTag = explode(',', $arrInfo['tag']); $where = array(); foreach ($arrTag as $strTag) { $where[] = "'%" . $strTag . "%'"; } //echo $arrInfo['id']; //print_r($where);
<?php /** * 行业资讯后台管理栏目修改文件 * * @author Arthur(ArthurXF@gmail.com) * @copyright (c) 2006 by bizeway.com * @version $Id$ * @package ArthurXF * @subpackage video */ require_once '../config/config.inc.php'; require_once "../class/video.class.php"; require_once '../../admin/checklogin.php'; $objWebInit = new video(); //数据库连接参数 $objWebInit->setDBG($arrGPdoDB); //smarty参数 $objWebInit->arrGSmarty = $arrGSmarty; //图片上传参数 $objWebInit->arrGPic = $arrGPic; $objWebInit->db(); //访问权限检查 if (!$objWebInit->checkPopedomG($_SESSION['user_id'])) { check::AlertExit('对不起,您没有权限访问此页', -1); } if ($_SERVER["REQUEST_METHOD"] == "POST") { if (empty($_POST['title']) || empty($_POST['intro'])) { check::AlertExit("错误:有必填选项没填!", -1); } //还原图片数组
public function rebuild_data() { $id = intval($this->input['id']); //获取视频在流媒体服务器上的ID include ROOT_DIR . 'lib/video/video.class.php'; $video = new video(); $video_info = $video->get_single_video($id); $serve_id = $video_info['serve_id']; if (!$serve_id) { echo 0; exit; } include ROOT_DIR . 'api/video/video_api.php'; //导入流媒体API $tvie_video_api = new TVie_video_api($this->config); $serve_video_info = $tvie_video_api->find_video_by_id($serve_id); $duration = ceil($serve_video_info->files[0]->duration); //视频时长(返回秒数) $thumbnail_url = $serve_video_info->thumbnail_url; //视频缩略图 $bthumbnail_url = $serve_video_info->video_still_url; //视频大图 $media_addr = $serve_video_info->files[0]->url; //流媒体地址 //更新本地缩略图 $sql = "UPDATE " . DB_PREFIX . "video \r\n\t\t\t\tSET toff = " . $duration . " , \r\n\t\t\t\t\tschematic = '" . $thumbnail_url . "' , \r\n\t\t\t\t\tbschematic = '" . $bthumbnail_url . "' , \r\n\t\t\t\t\tstreaming_media = '" . $media_addr . "' \r\n\t\t\t\tWHERE id = " . $id; $r = $this->db->query($sql); if ($r) { echo 1; } else { echo 0; } }
<?php /** * 行业资讯后台分类管理文件 * * @author Arthur(ArthurXF@gmail.com) * @copyright (c) 2006 by bizeway.com * @version $Id$ * @package ArthurXF * @subpackage video */ require_once '../config/config.inc.php'; require_once "../class/video.class.php"; require_once '../../admin/checklogin.php'; $objWebInit = new video(); //数据库连接参数 $objWebInit->setDBG($arrGPdoDB); //smarty参数 $arrMOutput["template_file"] = "admin.html"; $objWebInit->arrGSmarty = $arrGSmarty; $objWebInit->db(); //图形参数 $objWebInit->arrGPic = $arrGPic; //访问权限检查 if (!$objWebInit->checkPopedomG($_SESSION['user_id'])) { check::AlertExit('对不起,您没有权限访问此页', -1); } if (isset($_GET['action'])) { switch ($_GET['action']) { // 显示新增页面 case 'add':
<?php include '../functions/class.video.php'; session_start(); global $global_raw_videos_folder, $global_user_folder; if( isset($_POST['title']) && isset($_POST['desc']) && isset($_SESSION['uid']) && isset($_POST['file']) && isset($_POST['tags'])){ $v = new video($_POST['title'], $_POST['desc'], $_SESSION['uid'], "SP", "videos", $_POST['file']); if($v->getContentId()){ $v->addTags($_POST['tags']); $mvcommand = "mv ".$_SERVER["DOCUMENT_ROOT"]."/".$global_raw_videos_folder."/".$_POST['file'].".ogv" ." ".$_SERVER["DOCUMENT_ROOT"]."/"."videos"."/".$v->getContentId().$_POST['file'].".ogv"; $mv = shell_exec($mvcommand); echo "{ \"status\" : 1 ,\"cid\" : ".$v->getContentId()."}"; } else{ echo "{ \"status\" : 0 }"; } } else{ echo "{ \"status\" : 0 }"; }
echo "MYSQLUTILS TEST:\n"; require_once 'mysqlUtils.php'; $mysqlUtils = new mysqlUtils(); $mysqlUtils->test(); echo "---------------------\n"; require_once 'user.php'; echo "USER TEST:\n"; $user = new user(); $user->test(); echo "---------------------\n"; require_once 'admin.php'; echo "ADMIN TEST:\n"; $user->userType = 'admin'; $admin = new admin($user); $admin->test(); echo "---------------------\n"; require_once 'message.php'; echo "MESSAGE TEST:\n"; $message = new message(); $message->test(); echo "---------------------\n"; require_once 'video.php'; echo "VIDEO TEST:\n"; $video = new video(); $video->test(); echo "---------------------\n"; require_once 'friend.php'; echo "FRIEND TEST:\n"; $friend = new friend(); $friend->test(); echo "---------------------\n";
/** * * @param * @return */ function getRelatedSeriesJson($sid) { $seriesvideos = content::getCompleteSeries($sid); $count = count($seriesvideos); $json = array(); for ($i = 0; $i < $count; $i++) { $obj = new video($seriesvideos[$i]); array_push($json, array('cid' => $obj->getContentId(), 'title' => $obj->getTitle(), 'viewcount' => $obj->getViewCount(), 'poster' => $obj->getPoster(), 'timestamp' => $obj->getTimestamp(), 'uid' => $obj->getUserId(), 'uname' => user::getFullNameS($obj->getUserId()))); } return json_encode($json); }
<?php /** * 行业资讯 列表文件 * * @author Arthur(ArthurXF@gmail.com) * @copyright (c) 2006 by bizeway.com * @version $Id$ * @package ArthurXF * @subpackage video */ //调用配置文件 require_once 'config/config.inc.php'; require_once "class/video.class.php"; $objWebInit = new video(); //数据库连接参数 $objWebInit->setDBG($arrGPdoDB); //smarty参数 $objWebInit->arrGSmarty = $arrGSmarty; //翻页参数 $objWebInit->arrGPage = $arrGPage; $objWebInit->db(); //获取当前页码 分页功能使用 if (empty($_GET['page'])) { $intPage = 1; } else { $intPage = intval($_GET['page']); } $arrWhere = array(); $arrLink = array(); $arrWhere[] = "pass='******'";
$oDbc = new konexion("Web"); $debug->add("oDbc: " . var_export($oDbc, TRUE)); $DEBUG_LVL = 2; $todo = count($ids); $USE_LOCAL_FTP === TRUE ? $debug->add("Using Local FTP - 241") : $debug->add("Using Remote FTP - USA"); $debug->add("Preparing to process {$todo} contents..."); // borro work_dir $debug->add("Cleaning working dir {$work_dir}..."); exec("rm -rf {$work_dir}/*"); $i = 0; $j = 0; foreach ($ids as $id) { $i++; $debug->add("******* Processing content #{$id}, {$i} of {$todo}..."); $map = $xml_map["video_tpl"]; $vid = new video($oDbc, $id); $vid->load($workingCat, $workingSubCat); // copio archivos $debug->add("## Copying img sources..."); $debug->add("Switching to Remote FTP - USA"); $USE_LOCAL_FTP = FALSE; $download_ok = FALSE; $debug->add("Downloading source img..."); $file = $vid->icons; if (get_preview($file, "{$work_dir}/" . $vid->filename . ".gif") === TRUE) { $debug->add("Download OK!"); $download_ok = TRUE; } else { $debug->add("Download ERROR!!!"); $debug->add("Giving up :( "); echo "{$id} - {$file} (preview)\n";
function get_v_nhaccuatui() { $db = $this->load->database('default', TRUE); if (isset($_REQUEST['text_get_link'])) { if (preg_match('/http/', $_REQUEST['text_get_link'])) { $r = $db->select('*')->from('film')->where('referer', 'memevn')->where('fetch_link', $_REQUEST['text_get_link'])->get()->result_array(); } else { $r = $db->select('*')->from('film')->where('referer', 'memevn')->like('name', $_REQUEST['text_get_link'])->limit(300)->get()->result_array(); } $link = new video(); if ($r) { $video = $link->get_memevn($r[0]['fetch_link']); $json = array('link' => $video, 'name' => $r[0]['name'], 'arr_link' => $r); echo json_encode($json); die; } else { if (preg_match('/http/', $_REQUEST['text_get_link'])) { $video = $link->get_memevn($_REQUEST['text_get_link']); $json = array('link' => $video, 'name' => ''); echo json_encode($json); die; } else { $json = array('link' => '0', 'name' => ''); echo json_encode($json); die; } } } $header = new header(); $header->getlink("Get link video server v.nhaccuatui.com"); $data['csrf_test_name'] = $this->security->get_csrf_hash(); $this->load->view('getlink/v_nhaccuatui_com', $data); }
<?php include_once "../../login/check.php"; $folder = "../../"; include_once "../../class/video.php"; $video = new video(); include_once "../../class/equipo.php"; $equipo = new equipo(); /*echo "<pre>"; print_r($_POST); print_r($_SESSION); echo "</pre>"; exit();*/ if (!empty($_POST)) { extract($_POST); if ($_FILES['archivovideomp4']['name'] != "") { $nombrearchivo = quitarSimbolosArchivo($_FILES['archivovideomp4']['name'], false); $nombrearchivo = str_ireplace(" ", "_", $nombrearchivo); @copy($_FILES['archivovideomp4']['tmp_name'], "../../archivosvideos/mp4/" . $nombrearchivo); $archivovideomp4 = $nombrearchivo; } if ($_FILES['archivovideomov']['name'] != "") { $nombrearchivo = quitarSimbolosArchivo($_FILES['archivovideomov']['name'], false); $nombrearchivo = str_ireplace(" ", "_", $nombrearchivo); @copy($_FILES['archivovideomov']['tmp_name'], "../../archivosvideos/mov/" . $nombrearchivo); $archivovideomov = $nombrearchivo; } if ($_FILES['archivovideoavi']['name'] != "") { $nombrearchivo = quitarSimbolosArchivo($_FILES['archivovideoavi']['name'], false); $nombrearchivo = str_ireplace(" ", "_", $nombrearchivo); @copy($_FILES['archivovideoavi']['tmp_name'], "../../archivosvideos/avi/" . $nombrearchivo);
<?php include_once 'classes/videos.php'; $v = new video(); $i = 1; if (count($elements) > 9) { $limit = 9; } else { $limit = count($elements); } for ($r = 0; $r < $limit; $r++) { $v->seleccionar($elements[$r]); if ($i == 1 || $i == 4 || $i == 7) { $_SESSION['j']++; ?> <div id="row<?php echo $_SESSION['j']; ?> "><?php } if ($i == 7) { ?> <div class="col-md-4 "><?php } ?> <div class="video <?php if ($i == 7 || $i == 8) { echo 'col-md-12 petit'; } if ($i == 1 || $i == 9) {
<?php defined('DT_ADMIN') or exit('Access Denied'); require MD_ROOT . '/video.class.php'; $do = new video($moduleid); $menus = array(array('添加' . $MOD['name'], '?moduleid=' . $moduleid . '&action=add'), array($MOD['name'] . '列表', '?moduleid=' . $moduleid), array('审核' . $MOD['name'], '?moduleid=' . $moduleid . '&action=check'), array('未通过' . $MOD['name'], '?moduleid=' . $moduleid . '&action=reject'), array('回收站', '?moduleid=' . $moduleid . '&action=recycle'), array('移动分类', '?moduleid=' . $moduleid . '&action=move')); if (in_array($action, array('add', 'edit'))) { $FD = cache_read('fields-' . substr($table, strlen($DT_PRE)) . '.php'); if ($FD) { require DT_ROOT . '/include/fields.func.php'; } isset($post_fields) or $post_fields = array(); $CP = $MOD['cat_property']; if ($CP) { require DT_ROOT . '/include/property.func.php'; } isset($post_ppt) or $post_ppt = array(); } if ($_catids || $_areaids) { require DT_ROOT . '/admin/admin_check.inc.php'; } if (in_array($action, array('', 'check', 'reject', 'recycle'))) { $sfields = array('模糊', '标题', '视频地址', '视频系列', '会员名', '编辑', 'IP', '文件路径', '内容模板'); $dfields = array('keyword', 'title', 'video', 'tag', 'username', 'editor', 'ip', 'filepath', 'template'); $sorder = array('结果排序方式', '更新时间降序', '更新时间升序', '添加时间降序', '添加时间升序', '浏览次数降序', '浏览次数升序', '视频ID降序', '视频ID升序'); $dorder = array($MOD['order'], 'edittime DESC', 'edittime ASC', 'addtime DESC', 'addtime ASC', 'hits DESC', 'hits ASC', 'itemid DESC', 'itemid ASC'); $level = isset($level) ? intval($level) : 0; isset($fields) && isset($dfields[$fields]) or $fields = 0; isset($order) && isset($dorder[$order]) or $order = 0; isset($datetype) && in_array($datetype, array('edittime', 'addtime')) or $datetype = 'addtime'; $fromdate = isset($fromdate) && is_date($fromdate) ? $fromdate : '';
<?php ob_start(); session_start(); require_once '../classes/connexio.php'; require_once '../classes/videos.php'; if (isset($_SESSION['id'])) { $id = $_REQUEST['id']; $bd = new connexio(); $dades = $bd->query("SELECT nom FROM empresa LIMIT 1"); $empresa = $dades->fetch_array(MYSQLI_ASSOC); $v = new video(); $v->seleccionar($id); require_once '../lang.php'; ?> <!DOCTYPE html> <html> <head> <title><?php echo $empresa['nom']; ?> </title> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="stylesheet" href="css/bootstrap.min.css"> <link rel="stylesheet" href="css/style.css"> <script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script> <script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js"></script> <script src="js/scripts.js" type="text/javascript"></script> <script>
<?php include_once "../../login/check.php"; $folder = "../../"; $codvideo = $_GET['codvideo']; include_once "../../class/video.php"; $video = new video(); $vid = $video->mostrarTodoRegistro("codvideo=" . $codvideo, 0, ""); $vid = array_shift($vid); include_once "../../class/tematica.php"; $tematica = new tematica(); $tem = $tematica->mostrarTodoRegistro("codtematica=" . $vid['codtematica'], 0, "nombre"); $tem = array_shift($tem); include_once "../../class/formato.php"; $formato = new formato(); $for = $formato->mostrarTodoRegistro("codformato=" . $vid['codformato'], 0, "nombre"); $for = array_shift($for); include_once "../../class/soporte.php"; $soporte = new soporte(); $sop = $soporte->mostrarTodoRegistro("codsoporte=" . $vid['codsoporte'], 0, "nombre"); $sop = array_shift($sop); include_once "../../class/tipo.php"; $tipo = new tipo(); $tip = $tipo->mostrarTodoRegistro("codtipo=" . $vid['codtipo'], 0, "nombre"); $tip = array_shift($tip); include_once "../../class/descargas.php"; $descargas = new descargas(); $des = $descargas->cantidadDescargas($codvideo); $des = array_shift($des); $cantidad = $des['cantidad']; include_once "../../class/equipo.php";
function __construct($url, $titol, $cat, $ter, $des, $autor, $autorvideo, $data, $img, $tags, $r1, $r2, $r3, $lat, $lon) { parent::__construct(); $this->setUrl($url); $this->setTitol($titol); $this->setCategoria($cat); $this->setTerritori($ter); $this->setDescripcio($des); $this->setAutor($autor); $this->setAutorVideo($autorvideo); $this->setData($data); $this->setImatge($img); $this->setTags($tags); $this->setReferit1($r1); $this->setReferit2($r2); $this->setReferit3($r3); $this->setLatitud($lat); $this->setLongitud($lon); }
<?php session_start(); ob_start(); require_once '../classes/videos.php'; $pro1 = $_POST['pro1']; $pro2 = $_POST['pro2']; $pro3 = $_POST['pro3']; $pro4 = $_POST['pro4']; $pro5 = $_POST['pro5']; $pro6 = $_POST['pro6']; $promocionar = new video(); $promocionar->promocionar($pro1, $pro2, $pro3, $pro4, $pro5, $pro6); header('Location: ../login/index2.php?p=4');