Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- global $siteurl;
- // Module settings
- $module_name = basename(dirname(__FILE__));
- $audioLoc = 'modules/' . $module_name . '/clan_meetings/current/';
- $audiofiles = dir($audioLoc);
- $audiolist = array();
- $meeting = isset($_POST['meeting']) ? $_POST['meeting'] : false;
- $start = isset($_POST['start']) ? $_POST['start'] : false;
- $audio_loc = 'modules/' . $module_name . '/clan_meetings/archive/';
- $siteurl = $siteurl;
- // Go through the file list returned
- while ($file = $audiofiles->read()) {
- if (preg_match('/(mp3|wav|ogg|wma)/', $file)) {
- $audiolist[] = $file;
- }
- }
- closedir($audiofiles->handle);
- // Select a file at random
- $total = sizeof($audiolist) - 2;
- $rand = mt_rand(0, $total);
- $audio = $audiolist[$rand];
- include_once(NUKE_BASE_DIR . 'header.php');
- OpenTable();
- ?>
- <div align="center">
- <img src="images/meetings.png" alt="Weekly meeting recording" height="50" width="125" /><br /><br />
- Now Playing<br />
- <strong><em><?php echo $audio; ?></em></strong><br />
- <embed type="application/x-mplayer2" pluginspage="http://microsoft.com/Windows/Downloads/Contents/Products/MediaPlayer/" src="modules/<?php echo $module_name; ?>/clan_meetings/current/<?php echo $audio; ?>" name="MediaPlayer" width="200" height="100" autostart="0"></embed><br /><br />
- [ <a href="<?php echo $siteurl; ?>/modules/<?php echo $module_name; ?>/clan_meetings/current.m3u" onclick="window.open(this.href, 'popup', 'width=300, height=200, scrollbars=no, resizable=no, toolbar=no, directories=no, location=no, status=no, left=0, top=0'); return false;"><strong><em>Pop up player</em></strong></a> ]<br /><br />
- <strong>Meeting Archive...</strong><br /><br />
- <?php if ($start): ?>
- <object classid="CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95" codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab" width="125" height="50">
- <param name="FileName" value="<?php echo $audio_loc; ?>/<?php echo $meeting; ?>">
- <param name="AutoStart" value="1">
- <param name="ShowTracker" value="1">
- <param name="ShowControls" value="1">
- <param name="ShowGotoBar" value="1">
- <param name="ShowDisplay" value="0">
- <param name="ShowStatusBar" value="0">
- <param name="AutoSize" value="0">
- <param name="PlayCount" value="1">
- <embed type="application/x-mplayer2" src="<?php echo $audio_loc; ?>/<?php echo $meeting; ?>" name="MediaPlayer" width="200" height="100" AutoStart="1" ShowTracker="1" ShowControls="1" PlayCount="1" ShowGotoBar="1" ShowDisplay="0" ShowStatusBar="0" AutoSize="0" pluginspage="http://www.microsoft.com/Windows/Downloads/Contents/Products/MediaPlayer/"></embed>
- </object>
- <?php endif; ?>
- <form action="modules.php?name=<?php echo $module_name; ?>" method="post">
- <select name="meeting">
- <option value="">Choose a meeting</option>
- <?php
- $files = array();
- $path = $audio_loc;
- $handle = opendir($path);
- while ($file = readdir($handle)) {
- if (is_dir($path . '/' . $file)) {
- continue;
- }
- if (is_file($path . '/' . $file) && $file != '.' && $file != '..') {
- $files[] = $file;
- }
- }
- closedir($handle);
- asort($files);
- foreach ($files as $i => $f) {
- echo '<option value="' . $f . '">' . $f . '</option>';
- }
- ?>
- </select>
- <input name="start" type="submit" value="Play!" />
- </form>
- <br />
- <strong>No plug-in? No problem!</strong><br />
- [ <a href="http://port25.technet.com/pages/windows-media-player-firefox-plugin-download.aspx" target="_blank"><strong><em>Windows plugin</em></strong></a> ]<br /><br />
- [ <a href="http://www.apple.com/quicktime/download/" target="_blank"><strong><em>Macintosh Quicktime</em></strong></a> - Firefox, Opera, Safari and Google Chrome ]<br /><br />
- [ <a href="http://www.microsoft.com/windows/windowsmedia/player/wmcomponents.mspx" target="_blank"><strong><em>Macintosh Windows media player components</em></strong></a> ]
- </div>
- <div align="right" style="margin-top: 10px;">
- <a href="http://www.phoenixsniperteam.com/modules.php?name=Profile&mode=viewprofile&u=1741" target="_blank">©</a>
- </div>
- <?php
- CloseTable();
- include_once(NUKE_BASE_DIR . 'footer.php');
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement