Ejemplo n.º 1
0
 public function save_bz()
 {
     $this->tpl_name = "";
     if ($_REQUEST["movie"]) {
         $video_info = get_video_id($_REQUEST["movie"]);
         if ($video_info['id']) {
             $video_data = get_video_data($video_info['id'], $video_info['type']);
             $_REQUEST["movie1"] = $video_info['id'];
             $_REQUEST["movie1_type"] = $video_info['type'];
             $_REQUEST["movie1_thumb"] = $video_data['b_thumbnail'];
         }
     }
     if ($_REQUEST["startup_name"]) {
         $_REQUEST["startup_id"] = "";
     }
     if ($_REQUEST["s_id"] > 0) {
         $_REQUEST["id"] = $_REQUEST["s_id"];
     }
     $_REQUEST["user_id_bz"] = $_SESSION["s"]["id"];
     $_id = $this->Startup_service->add($_REQUEST);
     if ($_id) {
         $this->Startup_service->del_category($_id);
         if ($_REQUEST["market_1"]) {
             $this->Startup_service->add_category($_id, $_REQUEST["market_1"]);
         }
         if ($_REQUEST["market_2"]) {
             $this->Startup_service->add_category($_id, $_REQUEST["market_2"]);
         }
         if ($_REQUEST["market_3"]) {
             $this->Startup_service->add_category($_id, $_REQUEST["market_3"]);
         }
         $this->Startup_service->del_date($_id);
         if ($_REQUEST["founded"]) {
             $this->Startup_service->add_date($_id, $_REQUEST["founded"], 0);
         }
         for ($d = 1; $d < $_REQUEST["cnt_date"] + 1; $d++) {
             if ($_REQUEST["update_" . $d]) {
                 $this->Startup_service->add_date($_id, $_REQUEST["update_" . $d], 1, $_REQUEST["update_des_" . $d]);
             }
         }
         $this->Startup_service->del_article($_id);
         for ($a = 1; $a < $_REQUEST["cnt_article"] + 1; $a++) {
             if ($_REQUEST["article_" . $a]) {
                 $this->Startup_service->add_article($_id, $_REQUEST["article_" . $a], $_REQUEST["article_t_" . $a]);
             }
         }
         if ($_REQUEST["pic_1"]) {
             $img_temp_name = str_replace(" ", "", $_REQUEST['pic_1']);
             $ck = substr($img_temp_name, 0, 1);
             if ($ck == '/') {
                 $img_temp_name = substr($img_temp_name, 1, strlen($img_temp_name) - 1);
             }
             $file_ext = explode('.', $img_temp_name);
             $file_ext = '.' . $file_ext[sizeof($file_ext) - 1];
             $original_file = $this->settings->root_path . $img_temp_name;
             $copy_file = $this->settings->root_path . 'media/service/1_' . $_id . $file_ext;
             //그림 파일 update 폴더로 옮긴 후 임시파일 삭제
             copy($original_file, $copy_file);
             unlink($original_file);
             $_pic = '/media/service/1_' . $_id . $file_ext;
             $this->Startup_service->add_picture($_id, $_pic);
         }
         $res["id"] = $_id;
         echo json_encode($res);
     }
 }
 * The template for displaying all single posts and attachments
 *
 * @package WordPress
 * @subpackage Twenty_Sixteen
 * @since Twenty Sixteen 1.0
 */
get_header();
?>

<?php 
$obj = $post;
$description = '';
$attachment = get_field('attachments', $post->ID);
$video = get_field('video', $post->ID);
$ext = pathinfo($attachment['url'], PATHINFO_EXTENSION);
$vt = get_video_data($video);
$slideshare = get_field('slideshare', $post->ID);
$session = get_post_meta($post->ID, 'session');
$end_datetime = strtotime(get_field('end_date', $post->ID));
$initial_datetime = strtotime(get_field('initial_date', $post->ID));
// Find connected participants
$connected = new WP_Query(array('connected_type' => 'presentations_to_participants', 'connected_items' => $post, 'nopaging' => true));
?>
    
<div id="primary" class="content-area">
	<main id="main" class="site-main" role="main">

		<?php 
event_breadcrumb($post->ID);
?>
Ejemplo n.º 3
0
 public function startup_add_step3()
 {
     if ($_REQUEST["id"]) {
         $ex = $this->Startup_service->get($_REQUEST["id"]);
     }
     $_id = $this->Startup_service->add($_REQUEST);
     if (!$_REQUEST["id"]) {
         $_REQUEST["id"] = $_id;
     }
     for ($i = 1; $i < 5; $i++) {
         $_ord = 'img' . $i;
         if ($_REQUEST[$_ord]) {
             if (strpos($_REQUEST[$_ord], '/temp/')) {
                 $img_temp_name = str_replace(" ", "", $_REQUEST[$_ord]);
                 $ck = substr($img_temp_name, 0, 1);
                 if ($ck == '/') {
                     $img_temp_name = substr($img_temp_name, 1, strlen($img_temp_name) - 1);
                 }
                 $file_ext = explode('.', $img_temp_name);
                 //$filename = basename($_FILES['file']['name']);
                 $file_ext = '.' . $file_ext[sizeof($file_ext) - 1];
                 $original_file = $this->settings->root_path . $img_temp_name;
                 $copy_file = $this->settings->root_path . 'media/service/' . $i . '_' . $_id . $file_ext;
                 $_REQUEST[$_ord] = '/media/service/' . $i . '_' . $_id . $file_ext;
                 $_REQUEST[$_ord . "_thumb"] = '/media/service/thumb/' . $i . '_' . $_id . $file_ext;
                 if ($ex[$_ord]) {
                     unlink(substr($ex[$_ord], 1));
                     unlink(substr($ex[$_ord . "_thumb"], 1));
                 }
                 //그림 파일 update 폴더로 옮긴 후 임시파일 삭제
                 copy($original_file, $copy_file);
                 unlink($original_file);
                 GD2_make_thumb_x(180, 'thumb/', $copy_file);
             } else {
                 $_REQUEST[$_ord] = $ex[$_ord];
                 $_REQUEST[$_ord . "_thumb"] = $ex[$_ord . "_thumb"];
             }
         } else {
             $_REQUEST[$_ord] = '';
             $_REQUEST[$_ord . "_thumb"] = '';
             if ($ex[$_ord]) {
                 unlink(substr($ex[$_ord], 1));
                 unlink(substr($ex[$_ord . "_thumb"], 1));
             }
         }
     }
     for ($k = 1; $k < 5; $k++) {
         $_o = "movie" . $k;
         if ($_REQUEST[$_o]) {
             $video_info = get_video_id($_REQUEST[$_o]);
             if ($video_info['id']) {
                 $video_data = get_video_data($video_info['id'], $video_info['type']);
                 $_REQUEST[$_o] = $video_info['id'];
                 $_REQUEST[$_o . "_type"] = $video_info['type'];
                 $_REQUEST[$_o . "_thumb"] = $video_data['b_thumbnail'];
             } else {
                 $_REQUEST[$_o] = '';
                 $_REQUEST[$_o . "_type"] = '';
                 $_REQUEST[$_o . "_thumb"] = '';
             }
         }
     }
     for ($j = 1; $j < 5; $j++) {
         $_or = "gr" . $j;
         if ($_REQUEST[$_or]) {
             if (strpos($_REQUEST[$_or], '/temp/')) {
                 $img_temp_name = str_replace(" ", "", $_REQUEST[$_or]);
                 $ck = substr($img_temp_name, 0, 1);
                 if ($ck == '/') {
                     $img_temp_name = substr($img_temp_name, 1, strlen($img_temp_name) - 1);
                 }
                 $file_ext = explode('.', $img_temp_name);
                 //$filename = basename($_FILES['file']['name']);
                 $file_ext = '.' . $file_ext[sizeof($file_ext) - 1];
                 $original_file = $this->settings->root_path . $img_temp_name;
                 $copy_file = $this->settings->root_path . 'media/service/' . $_or . '_' . $_id . $file_ext;
                 $_REQUEST[$_or] = '/media/service/' . $_or . '_' . $_id . $file_ext;
                 $_REQUEST[$_or . "_thumb"] = '/media/service/thumb/' . $_or . '_' . $_id . $file_ext;
                 if ($ex[$_or]) {
                     unlink(substr($ex[$_or], 1));
                     unlink(substr($ex[$_or . "_thumb"], 1));
                 }
                 //그림 파일 update 폴더로 옮긴 후 임시파일 삭제
                 copy($original_file, $copy_file);
                 unlink($original_file);
                 GD2_make_thumb_x(180, 'thumb/', $copy_file);
             } else {
                 $_REQUEST[$_or] = $ex[$_or];
                 $_REQUEST[$_or . "_thumb"] = $ex[$_or . "_thumb"];
             }
         } else {
             $_REQUEST[$_or . '_title'] = '';
             $_REQUEST[$_or . '_thumb'] = '';
             $_REQUEST[$_or] = '';
             if ($ex[$_or]) {
                 unlink(substr($ex[$_or], 1));
                 unlink(substr($ex[$_or . "_thumb"], 1));
             }
         }
     }
     $this->Startup_service->add($_REQUEST);
     $result["id"] = $_id;
     echo json_encode($result);
     $this->tpl_name = "";
 }
Ejemplo n.º 4
0
function the_videos($videoCategorySlug = '', $videoHtml = 'default_video')
{
    if (!$videoCategorySlug) {
        return;
    }
    $args = array('post_type' => 'video', 'youtube_video' => $videoCategorySlug, 'posts_per_page' => -1);
    $VIDEO_HTML = array('default_video' => 'default_video_html', 'about_video' => 'about_video_html', 'thumb_video' => 'thumb_video_html', 'main_video' => 'main_video_html', 'role_modeling_main_video' => 'role_modeling_main_video_html', 'founder_video' => 'founder_video_html');
    $posts = get_posts($args);
    if ($posts) {
        foreach ($posts as $post) {
            $youtubeId = get_youtube_id($post->ID);
            $videoData = array('thumbnail' => null, 'views' => null, 'text' => null, 'twitter-message' => null, 'permalink' => get_permalink($post->ID));
            $videoData = array_merge($videoData, get_video_data($post->ID, $youtubeId));
            if ($videoData['thumbnail']) {
                $VIDEO_HTML[$videoHtml]($videoData);
            }
            the_excerpt();
        }
    }
}
Ejemplo n.º 5
0
<?php

$id = get_the_ID();
$youtubeId = get_youtube_id($id);
$videoData = get_video_data($id, $youtubeId);
?>
<div class="video-container" id="playerContainer" data-video-id="<?php 
echo $youtubeId;
?>
">
	<div id="player"></div>
	<section id="playerInfo" class="disabled">
		<h2 class="title"><?php 
get_the_title($id);
?>
</h2>
		<?php 
video_info_html($videoData);
?>
	</section>
	<?php 
get_template_part('social');
?>
</div>
<?php 
social_include();