-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathupdate.php
89 lines (83 loc) · 2.97 KB
/
update.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
<?php
/*
Template Name: Update Template
*/
$page = $_GET['page'];
?>
<?php query_posts( array( 'posts_per_page' => 1, 'order' => 'ASC', 'paged' => $page ) );
while ( have_posts() ) : the_post();
$storyboard = get_post_meta($post->ID, '_dkk_story_board', $single = true);
$script = get_post_meta($post->ID, '_dkk_script', $single = true);
$shot = get_post_meta($post->ID, '_dkk_shot_description', $single = true);
$soundFX = get_post_meta($post->ID, '_dkk_sound_fx', $single = true);
$music = get_post_meta($post->ID, '_dkk_music_file', $single = true);
$storyboardLink = explode('-600x165', $storyboard);
?>
<article id="storyboard">
<header class="info">
<p class="left">Client Storyboard:</p>
<h1 class="right">CARFAX - Super Hero's Campaign - "Batman"</h1>
</header>
<div class="image">
<a href="<?php echo $storyboardLink[0] . $storyboardLink[1]; ?>"><img src="<?php echo $storyboard; ?>" alt="Storyboard"></a>
<a href="<?php echo $storyboard; ?>"><img src="<?php echo $storyboard; ?>" width="600" height="166" alt="Shot 1"></a>
</div> <!-- end .image -->
<?php if ($script) : ?>
<div class="info">
<p class="left">Script:</p>
<p class="right"><?php echo $script; ?></p>
</div>
<?php endif;
if ($shot) : ?>
<div class="info">
<p class="left">Shot Description:</p>
<p class="right"><?php echo $shot; ?></p>
</div>
<?php endif;
if ($soundFX) : ?>
<div class="info">
<p class="left">Sound FX:</p>
<p class="right"><?php echo $soundFX; ?></p>
</div>
<?php endif;
if ($music) : ?>
<div class="audio">
<?php echo do_shortcode('[audio src="'.$music.'"]'); ?>
</div> <!-- end .audio -->
<?php endif; ?>
</article>
<?php endwhile; ?>
<?php $page = $_GET['page']; ?>
<div id="post-nav">
<?php if ($page != 1) : ?>
<div class="post-previous"><a href="<?php echo get_site_url() . '/'; echo $page - 1; ?>/">PREVIOUS</a></div>
<?php endif; ?>
<?php if ($wp_query->max_num_pages > $page) : ?>
<div class="post-next"><a href="<?php echo get_site_url() . '/'; echo $page + 1; ?>/">NEXT</a></div>
<?php endif; ?>
</div>
<script>
jQuery(document).ready(function() {
jQuery.ajaxSetup({cache:false});
jQuery('#post-nav a').click(function(e) {
e.preventDefault();
var page = jQuery(this).attr('href');
page = page.split('/');
page = page[5];
//page = page.charAt(page.length-2);
page = page.charAt(page.length-2);
var data = '?page=' + page;
jQuery('.container').html('<img src="assets/ajax-loader.gif" alt="Loading...">');
jQuery('.container').fadeOut('slow', function() {
jQuery(this).load('update/' + data, function() {
jQuery(this).fadeIn('slow');
});
return false;
});
jQuery('#sidebar li').removeClass();
jQuery('#sidebar li').filter(function() {
return jQuery(this).text() === page;
}).addClass('active');
});
});
</script>