<?php require_once dirname(dirname(__FILE__)) . '/flag-config.php'; // check for correct capability if (!is_user_logged_in()) { die('-1'); } // check for correct FlAG capability if (!current_user_can('FlAG Manage video')) { die('-1'); } ?> <html> <head> <title>Preview Video</title> <script type="text/javascript" src="<?php echo plugins_url('/' . FLAGFOLDER . '/'); ?> admin/js/jquery.js"></script> <script type="text/javascript" src="<?php echo plugins_url('/' . FLAGFOLDER . '/'); ?> admin/js/swfobject.js"></script> </head> <body style="margin: 0; padding: 0; background: #555555; overflow: hidden;"> <?php $vidID = intval($_GET['vid']); echo flagShowVmPlayer($vidID, $w = '520', $h = '304', $autoplay = true); ?> </body> </html>
function grandflv($atts) { global $wpdb; extract(shortcode_atts(array('id' => '', 'w' => '', 'h' => '', 'autoplay' => ''), $atts)); $out = ''; if ($id) { $this->flag_shortcode = true; $out = flagShowVmPlayer($id, $w, $h, $autoplay); } return $out; }
$file = sanitize_flagname($_GET['v']); $playlistpath = $flag_options['galleryPath'] . 'playlists/video/' . $file . '.xml'; if (file_exists($playlistpath)) { echo flagShowVPlayer($file, $width, $height, $wmode = 'opaque'); } else { _e("Can't find playlist"); } } ?> <?php if (isset($_GET['mv'])) { $height = isset($_GET['h']) ? intval($_GET['h']) : ''; $width = '100%'; $mv = intval($_GET['mv']); echo flagShowVmPlayer($mv, $width, $height, $autoplay = 'true'); } ?> <?php if (isset($_GET['b'])) { $file = sanitize_flagname($_GET['b']); $playlistpath = $flag_options['galleryPath'] . 'playlists/banner/' . $file . '.xml'; if (file_exists($playlistpath)) { echo flagShowBanner($file, $width = '', $height = '', $wmode = 'opaque'); } else { _e("Can't find playlist"); } } ?>