|
From: <be...@us...> - 2014-06-05 08:27:18
|
Revision: 12564
http://sourceforge.net/p/xoops/svn/12564
Author: beckmi
Date: 2014-06-05 08:27:03 +0000 (Thu, 05 Jun 2014)
Log Message:
-----------
Rearranging folders
Added Paths:
-----------
XoopsModules/onair/releases/1.04/
XoopsModules/onair/releases/1.04/onair/
XoopsModules/onair/releases/1.04/onair/TODO.txt
XoopsModules/onair/releases/1.04/onair/admin/
XoopsModules/onair/releases/1.04/onair/admin/admin_header.php
XoopsModules/onair/releases/1.04/onair/admin/help.php
XoopsModules/onair/releases/1.04/onair/admin/hitlist.php
XoopsModules/onair/releases/1.04/onair/admin/index.php
XoopsModules/onair/releases/1.04/onair/admin/menu.php
XoopsModules/onair/releases/1.04/onair/admin/playlist.php
XoopsModules/onair/releases/1.04/onair/admin/post.php
XoopsModules/onair/releases/1.04/onair/admin/songs.php
XoopsModules/onair/releases/1.04/onair/admin/uploader.php
XoopsModules/onair/releases/1.04/onair/blocks/
XoopsModules/onair/releases/1.04/onair/blocks/index.html
XoopsModules/onair/releases/1.04/onair/blocks/onair_ajaxcall.php
XoopsModules/onair/releases/1.04/onair/blocks/simple_now.php
XoopsModules/onair/releases/1.04/onair/changelog.txt
XoopsModules/onair/releases/1.04/onair/detail.php
XoopsModules/onair/releases/1.04/onair/detailplaylist.php
XoopsModules/onair/releases/1.04/onair/header.php
XoopsModules/onair/releases/1.04/onair/images/
XoopsModules/onair/releases/1.04/onair/images/Image3.png
XoopsModules/onair/releases/1.04/onair/images/blank.gif
XoopsModules/onair/releases/1.04/onair/images/changelog.txt
XoopsModules/onair/releases/1.04/onair/images/helpfiles/
XoopsModules/onair/releases/1.04/onair/images/helpfiles/direttore_01.png
XoopsModules/onair/releases/1.04/onair/images/helpfiles/index.html
XoopsModules/onair/releases/1.04/onair/images/helpfiles/np_00.png
XoopsModules/onair/releases/1.04/onair/images/helpfiles/np_01.png
XoopsModules/onair/releases/1.04/onair/images/helpfiles/np_02.png
XoopsModules/onair/releases/1.04/onair/images/helpfiles/np_03.png
XoopsModules/onair/releases/1.04/onair/images/helpfiles/np_04.png
XoopsModules/onair/releases/1.04/onair/images/helpfiles/np_05.png
XoopsModules/onair/releases/1.04/onair/images/icons/
XoopsModules/onair/releases/1.04/onair/images/icons/index.html
XoopsModules/onair/releases/1.04/onair/images/icons/musicnote.png
XoopsModules/onair/releases/1.04/onair/images/index.html
XoopsModules/onair/releases/1.04/onair/images/no.png
XoopsModules/onair/releases/1.04/onair/images/onair.jpg
XoopsModules/onair/releases/1.04/onair/include/
XoopsModules/onair/releases/1.04/onair/include/classes.php
XoopsModules/onair/releases/1.04/onair/include/functions.php
XoopsModules/onair/releases/1.04/onair/include/index.html
XoopsModules/onair/releases/1.04/onair/include/jquery/
XoopsModules/onair/releases/1.04/onair/include/jquery/jquery-1.3.2.js
XoopsModules/onair/releases/1.04/onair/index.html
XoopsModules/onair/releases/1.04/onair/index.php
XoopsModules/onair/releases/1.04/onair/language/
XoopsModules/onair/releases/1.04/onair/language/danish/
XoopsModules/onair/releases/1.04/onair/language/danish/admin.php
XoopsModules/onair/releases/1.04/onair/language/danish/blocks.php
XoopsModules/onair/releases/1.04/onair/language/danish/index.html
XoopsModules/onair/releases/1.04/onair/language/danish/main.php
XoopsModules/onair/releases/1.04/onair/language/danish/modinfo.php
XoopsModules/onair/releases/1.04/onair/language/english/
XoopsModules/onair/releases/1.04/onair/language/english/admin.php
XoopsModules/onair/releases/1.04/onair/language/english/blocks.php
XoopsModules/onair/releases/1.04/onair/language/english/index.html
XoopsModules/onair/releases/1.04/onair/language/english/main.php
XoopsModules/onair/releases/1.04/onair/language/english/modinfo.php
XoopsModules/onair/releases/1.04/onair/language/index.html
XoopsModules/onair/releases/1.04/onair/language/spanish/
XoopsModules/onair/releases/1.04/onair/language/spanish/admin.php
XoopsModules/onair/releases/1.04/onair/language/spanish/blocks.php
XoopsModules/onair/releases/1.04/onair/language/spanish/index.html
XoopsModules/onair/releases/1.04/onair/language/spanish/main.php
XoopsModules/onair/releases/1.04/onair/language/spanish/modinfo.php
XoopsModules/onair/releases/1.04/onair/onair_ajaxassign.php
XoopsModules/onair/releases/1.04/onair/onair_ajaxassign2.php
XoopsModules/onair/releases/1.04/onair/onair_logo.png
XoopsModules/onair/releases/1.04/onair/playlists.php
XoopsModules/onair/releases/1.04/onair/plugins/
XoopsModules/onair/releases/1.04/onair/plugins/index.html
XoopsModules/onair/releases/1.04/onair/plugins/plugins.php
XoopsModules/onair/releases/1.04/onair/sql/
XoopsModules/onair/releases/1.04/onair/sql/index.html
XoopsModules/onair/releases/1.04/onair/sql/mysql.sql
XoopsModules/onair/releases/1.04/onair/templates/
XoopsModules/onair/releases/1.04/onair/templates/blocks/
XoopsModules/onair/releases/1.04/onair/templates/blocks/index.html
XoopsModules/onair/releases/1.04/onair/templates/blocks/onair_block.html
XoopsModules/onair/releases/1.04/onair/templates/index.html
XoopsModules/onair/releases/1.04/onair/templates/onair_detail.html
XoopsModules/onair/releases/1.04/onair/templates/onair_div1.html
XoopsModules/onair/releases/1.04/onair/templates/onair_div2.html
XoopsModules/onair/releases/1.04/onair/templates/onair_index.html
XoopsModules/onair/releases/1.04/onair/templates/onair_playlistdetail.html
XoopsModules/onair/releases/1.04/onair/templates/onair_playlists.html
XoopsModules/onair/releases/1.04/onair/templates/onair_program.html
XoopsModules/onair/releases/1.04/onair/xoops_version.php
Removed Paths:
-------------
XoopsModules/onair/onair 1.04/
Added: XoopsModules/onair/releases/1.04/onair/TODO.txt
===================================================================
--- XoopsModules/onair/releases/1.04/onair/TODO.txt (rev 0)
+++ XoopsModules/onair/releases/1.04/onair/TODO.txt 2014-06-05 08:27:03 UTC (rev 12564)
@@ -0,0 +1,7 @@
+TODO
+----
+
+- Make possible to add event to more than one day at the time. Radiobuttons for
+ instance choosing sun, mon, tue, wed etc... and then script inserts automaticly
+ days (1,3,5,6) in 4 separate mysql inserts
+- Possibility to automaticly create hitlist, playlist etc using the jquery call
\ No newline at end of file
Added: XoopsModules/onair/releases/1.04/onair/admin/admin_header.php
===================================================================
--- XoopsModules/onair/releases/1.04/onair/admin/admin_header.php (rev 0)
+++ XoopsModules/onair/releases/1.04/onair/admin/admin_header.php 2014-06-05 08:27:03 UTC (rev 12564)
@@ -0,0 +1,43 @@
+<?php
+/**
+ * Onair Module
+ *
+ * Use this to show details, picture and schedule of timed events in a block.
+ *
+ * LICENSE
+ *
+ * You may not change or alter any portion of this comment or credits
+ * of supporting developers from this source code or any supporting source code
+ * which is considered copyrighted (c) material of the original comment or credit authors.
+ *
+ * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/
+ * @license http://www.fsf.org/copyleft/gpl.html GNU public license
+ * @author Michael Albertsen (culex) <http://www.culex.dk>
+ * @version $Id:admin_header.php 630 2009-06-07 15:12 culex $
+ * @since File available since Release 1.0.0
+ */
+
+ include '../../../mainfile.php';
+ include_once XOOPS_ROOT_PATH.'/class/xoopsmodule.php';
+ include XOOPS_ROOT_PATH.'/include/cp_functions.php';
+ if ( $xoopsUser ) {
+ $xoopsModule = XoopsModule::getByDirname("onair");
+
+ if ( !$xoopsUser->isAdmin($xoopsModule->mid()) ) {
+ redirect_header(XOOPS_URL."/",2,_NOPERM);
+ exit();
+ }
+ }
+ else {
+ redirect_header(XOOPS_URL."/",2,_NOPERM);
+ exit();
+ }
+
+ if ( file_exists("../language/".$xoopsConfig['language']."/admin.php") ) {
+ include("../language/".$xoopsConfig['language']."/admin.php");
+ }
+ else {
+ include("../language/english/admin.php");
+ }
+
+?>
\ No newline at end of file
Property changes on: XoopsModules/onair/releases/1.04/onair/admin/admin_header.php
___________________________________________________________________
Added: svn:keywords
## -0,0 +1 ##
+Author Date Id Rev URL
\ No newline at end of property
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: XoopsModules/onair/releases/1.04/onair/admin/help.php
===================================================================
--- XoopsModules/onair/releases/1.04/onair/admin/help.php (rev 0)
+++ XoopsModules/onair/releases/1.04/onair/admin/help.php 2014-06-05 08:27:03 UTC (rev 12564)
@@ -0,0 +1,65 @@
+<?php
+/**
+ * Onair Module
+ *
+ * Use this to show details, picture and schedule of timed events in a block.
+ *
+ * LICENSE
+ *
+ * You may not change or alter any portion of this comment or credits
+ * of supporting developers from this source code or any supporting source code
+ * which is considered copyrighted (c) material of the original comment or credit authors.
+ *
+ * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/
+ * @license http://www.fsf.org/copyleft/gpl.html GNU public license
+ * @author Michael Albertsen (culex) <http://www.culex.dk>
+ * @version $Id:help.php 4.33 2009-06-07 15:12 culex $
+ * @since File available since Release 1.0.0
+ */
+
+ include_once 'admin_header.php';
+ include_once XOOPS_ROOT_PATH.'/class/xoopslists.php';
+ include XOOPS_ROOT_PATH.'/class/xoopsformloader.php';
+ include XOOPS_ROOT_PATH.'/include/xoopscodes.php';
+ include '../include/functions.php';
+ include '../include/classes.php';
+ xoops_cp_header();
+echo "<p>Culex On-air was originally build as a radio related script to run a rotator showing who is currently on-air, the radio staions name, the title of the show, when it started, when it will end, show picture of the dj and what song he is currently playing.</p>
+<p>Now it has progressed a little to be included in a 2-parted container / scroller showing also the same information about what will come just after current event. Also you can click the front rotators image to move on and see the details of this event in a separate page.</p>
+<p>As I was working and rewriting the module from the older version, I descided to include also the ability to add playlists to every independent show, and I hope I acomplished this ok.</p>
+<p>Later I discovered this module can be used to many other things, not just radio shows. </p>
+<p>It could serve also nicely as a banner rotator with the details shoing more info about the client, or showing movies playing in a theater, concerts currently playing somewhere, maybe event churches could use this to show events cumming up or in progress.... Use as you like actually :)<br />
+</p>
+<p><strong>Installation</strong><br />
+ ------------</p>
+<p>1) upload the onair folder to your XOOPS_ROOT/modules/<br />
+ and install as a normal module.</p>
+<p>2) Go to preferences and set up you timeformat (12 hours / 24 hours).<br />
+ Dont use both formats. The script gets confused as it only understands ONE time type at the ...well time.<br />
+ 3) set up the paths for plugins, imagepath, image size etc etc, and your ready to roll.</p>
+<p>4) Choose ADD new to fill out infor about your show and choose already uploaded images for the event + plugins<br />
+ used by you station. A good idea would be to upload the images first and the Add new.</p>
+<p>5) The plugins write songinfo to a small file on your your hp to let you show wich song your playing. <br />
+ Default is Now Playing (winamp) and for DireTTore </p>
+ <br><br>
+ <strong><u>Setup : RDS plug-in (Direttore)</strong></u> <a href='http://www.culex.dk/modules/PDdownloads/visit.php?cid=3&lid=2' target='_blank'>Download here</a><br><br>1) Install using the downloaded file, and run program. The settings are pretty easy to follow. <br>1) Just type in your ftp.<br>2) password to ftp.<br>3) Where do you want txt file to be upload to and name of txt file / Onair default is root <em>(/)</em> and <em>(direttore.txt)</em><br>4) Path to your local folder of DireTTore log files.<br>5) Test and your ready to use.<br><br><center><img src='../images/helpfiles/direttore_01.png' align='center'></img></center>
+ <br><br>
+ <strong><u>Setup : Now Playing plug-in (winamp)</strong></u> <a href='http://www.culex.dk/modules/PDdownloads/visit.php?cid=3&lid=1' target='_blank'>Download here</a>
+ <br><br>
+ The installation of this plugin is a little more complex but follow these instructions and<br>you'll have no problems (i hope).<br><br>
+ 1) Install as normal program on your pc.
+ 2) Open winamp and choose setting like this<br><br><center><img src='../images/helpfiles/np_00.png'></img></center>
+ <br><br>3) Make setting similar to these.:
+ <center><br><br><img src='../images/helpfiles/np_01.png'</img><br>
+ <br><img src='../images/helpfiles/np_02.png'</img><br>
+ <br><img src='../images/helpfiles/np_03.png'</img><br>
+ <br><img src='../images/helpfiles/np_04.png'</img><br></center>
+ <br>4) Open Now playing html-template on your local installation like this.: <br><br><center><img src='../images/helpfiles/np_05.png'</img></center><br><br>
+ <br>Delete all text from the file in your favorite editor and insert this (<em>As shown in the picture</em>:
+ <br><br><form >
+ <label>
+ <input style='background-color:#FF6' value='[np:Artist1] - [np:Title1]' size='26' maxlength='26' />
+ </label>
+</form><br>The template.html file is usually placed in your <em>c:\Program Files\Winamp\np_templates</em> Folder.<br><br>That's it!<br>Any other question write in my forum <a href='http://www.culex.dk/forum/viewforum.php?forum=1'><strong>here</strong></a><br><br>";
+ xoops_cp_footer();
+?>
\ No newline at end of file
Property changes on: XoopsModules/onair/releases/1.04/onair/admin/help.php
___________________________________________________________________
Added: svn:keywords
## -0,0 +1 ##
+Author Date Id Rev URL
\ No newline at end of property
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: XoopsModules/onair/releases/1.04/onair/admin/hitlist.php
===================================================================
--- XoopsModules/onair/releases/1.04/onair/admin/hitlist.php (rev 0)
+++ XoopsModules/onair/releases/1.04/onair/admin/hitlist.php 2014-06-05 08:27:03 UTC (rev 12564)
@@ -0,0 +1,46 @@
+<?php
+include '../../mainfile.php';
+include '../include/functions.php';
+global $xoopsDB;
+$checksong ="";
+$onair_songData ="";
+
+// check database for existing data
+$myts =& MyTextSanitizer::getInstance();
+$onair_songdata = onair_File_Get_Contents_Utf8($oa_pluginfile);
+$checksong = "SELECT MAX(oa_songid) FROM".$xoopsDb->prefix('oa_hitlist')." song";
+$result = $xoopsDB->query($checksong);
+while ($sqlfetch=$xoopsDB->fetchArray($result)) {
+ $messageid = $myts->htmlSpecialChars($sqlfetch["oa_songid"});
+ $messagetime = $myts->htmlSpecialChars($sqlfetch["oa_songtime"});
+ $messageyear = $myts->htmlSpecialChars($sqlfetch["oa_songyear"});
+ $messageweek = $myts->htmlSpecialChars($sqlfetch["oa_songweek"});
+ $messagesong = $myts->htmlSpecialChars($sqlfetch["oa_songsong"});
+}
+
+if ($onair_songdata != $messagesong['oa_songsong'])
+{
+$oa_songid="";
+$oa_songtime = time();
+$oa_songyear = date('Y');
+$oa_songweek = date('W');
+
+$songinsert = "INSERT INTO ".$xoopsDb->prefix('oa_hitlist')." (oa_songid, oa_songtime, oa_songyear, oa_songweek, oa_songsong) VALUES (".$xoopsDB->quoteString($oa_songid).",".$xoopsDB->quoteString($oa_songtime).",".$xoopsDB->quoteString($oa_songyear).",".$xoopsDB->quoteString($oa_songweek).",".$xoopsDB->quoteString($messagesong).")";
+
+ if (!$result = $xoopsDB->query($songinsert)) {
+ $oa_send = _AM_ONAIR_ERRORINSERT;
+ }
+} else if ($onair_songdata == $messagesong['oa_songsong']) {
+$oa_songid="";
+$oa_songtime = time();
+$oa_songyear = date('Y');
+$oa_songweek = date('W');
+ $xoopsDB->query("UPDATE ".$xoopsDB->prefix('oa_hitlist')." SET oa_songtime = ".$xoopsDB->quoteString($oa_songtime).", oa_songsong = "
+ .$xoopsDB->quoteString($messagesong)." WHERE oa_songid = MAX(oa_songid)");
+ redirect_header("index.php",2,_AM_ONAIR_EVENTMOD);
+ exit();
+
+}
+
+
+?>
\ No newline at end of file
Property changes on: XoopsModules/onair/releases/1.04/onair/admin/hitlist.php
___________________________________________________________________
Added: svn:keywords
## -0,0 +1 ##
+Author Date Id Rev URL
\ No newline at end of property
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: XoopsModules/onair/releases/1.04/onair/admin/index.php
===================================================================
--- XoopsModules/onair/releases/1.04/onair/admin/index.php (rev 0)
+++ XoopsModules/onair/releases/1.04/onair/admin/index.php 2014-06-05 08:27:03 UTC (rev 12564)
@@ -0,0 +1,474 @@
+<?php
+/**
+ * Onair Module
+ *
+ * Use this to show details, picture and schedule of timed events in a block.
+ *
+ * LICENSE
+ *
+ * You may not change or alter any portion of this comment or credits
+ * of supporting developers from this source code or any supporting source code
+ * which is considered copyrighted (c) material of the original comment or credit authors.
+ *
+ * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/
+ * @license http://www.fsf.org/copyleft/gpl.html GNU public license
+ * @author Michael Albertsen (culex) <http://www.culex.dk>
+ * @version $Id:admin_header.php 2009-06-19 13:22 culex $
+ * @since File available since Release 1.0.0
+ */
+
+ include_once 'admin_header.php';
+ include_once XOOPS_ROOT_PATH.'/class/xoopslists.php';
+ include XOOPS_ROOT_PATH.'/class/xoopsformloader.php';
+ include XOOPS_ROOT_PATH.'/include/xoopscodes.php';
+ include '../include/functions.php';
+ include '../include/classes.php';
+
+ $oa_timetype = onair_GetModuleOption('timetype');
+
+ if (isset($_GET['op']) && $_GET['op'] == 'Eventshow') {
+ $op = 'Eventshow';
+ }
+ if (isset($_GET['op']) && $_GET['op'] == 'Eventedit') {
+ $op = 'Eventedit';
+ }
+ if (isset($_GET['op']) && $_GET['op'] == 'Eventdel') {
+ $op = 'Eventdel';
+ }
+ if (isset($_GET['op']) && $_GET['op'] == 'Eventapprove') {
+ $op = 'Eventapprove';
+ }
+ if (isset($_POST['op']) && $_POST['op'] == 'Eventsave') {
+ $op = 'Eventsave';
+ }
+ if (isset($_GET['op']) && $_GET['op'] == 'Addnew') {
+ $op ='Addnew';
+ }
+ if (isset($_GET['op']) && $_GET['op'] == 'ImageUpload') {
+ $op ='ImageUpload';
+ }
+ if (isset($_GET['op']) && $_GET['op'] == 'PlayList') {
+ $op ='PlayList';
+ }
+/**
+ * Choose from menu
+ *
+ * @param Place $In admin choose your action from menu
+ * @param integer $repeat 1
+ * @return Status
+ */
+function Choice() {
+ global $xoopsModule;
+ xoops_cp_header();
+ echo '<table class="outer" width="100%"><tr>';
+ echo "<td class='even'><center><a href='index.php?op=Addnew'>"._AM_ONAIR_ADDNEW."</a></center></td>";
+ echo "<td class='even'><center><a href='index.php?op=Eventshow'>"._AM_ONAIR_EDIT."</a></center></td>";
+ echo "<td class='even'><center><a href='playlist.php?op=Playlistshow'>"._AM_ONAIR_SHOWPLAYLISTS."</a></center></td>";
+ echo "<td class='even'><center><a href='../help.php'"._AM_ONAIR_HELP."</a></center></td>";
+ echo "<td class='even'><center><a href='songs.php"._AM_ONAIR_SONGSADMIN."</a></center></td>";
+ echo "<td class='even'><center><a href='../../system/admin.php?fct=preferences&op=showmod&mod="
+ .$xoopsModule ->getVar('mid')."'>"._AM_ONAIR_CONFIG."</a></center></td>";
+ echo '</tr></table>';
+ xoops_cp_footer();
+ }
+/**
+ * Delete events
+ *
+ * @param Place $In admin Delete from database
+ * @param integer $repeat 1
+ * @return Status
+ */
+function onair_EventDel($del=0) {
+ global $xoopsDB;
+ if (isset($_POST['del']) && $_POST['del'] == 1) {
+ $result = $xoopsDB->query("DELETE FROM ".$xoopsDB->prefix("oa_program")
+ ." WHERE oa_id = ".intval($_POST['oa_id'])."");
+ redirect_header("index.php",2,_AM_ONAIR_EVENTDEL);
+ exit();
+ }
+ else {
+ xoops_cp_header();
+ xoops_confirm(array('oa_id' => $_GET['oa_id'], 'del' => 1), 'index.php?op=Eventdel',
+ _AM_ONAIR_SUREDELETE);
+ xoops_cp_footer();
+ }
+ }
+/**
+ * Save event from edit
+ *
+ * @param Place $In admin saves the edited event
+ * @param integer $repeat 1
+ * @return Status
+ */
+function onair_EventSave() {
+ global $xoopsDB,$oa_timetype,$numbers2days;
+ if (onair_GetModuleOption('timetype')=='1'){
+ $_POST['oa_start'] = date('h:i:s a', $_POST['oa_start']);
+ $_POST['oa_stop'] = date('h:i:s a', $_POST['oa_stop']);
+ if ($_POST['oa_stop'] < $_POST['oa_start']) {
+ $_POST['oa_stop'] = '11:59:59 pm';
+ }
+ } else if (onair_GetModuleOption('timetype')=='0'){
+ $_POST['oa_start'] = date("H:i:s",$_POST["oa_start"]);
+ $_POST['oa_stop'] = date("H:i:s",$_POST["oa_stop"]);
+ if ($_POST['oa_stop'] < $_POST['oa_start']) {
+ $_POST['oa_stop'] = '23:59:59';
+ }
+ }
+
+ $xoopsDB->query("UPDATE ".$xoopsDB->prefix('oa_program')." SET oa_day = "
+ .$xoopsDB->quoteString($_POST['oa_day']).", oa_station = ".$xoopsDB->quoteString($_POST['oa_station'])
+ .", oa_title = ".$xoopsDB->quoteString($_POST['oa_title']).", oa_name = "
+ .$xoopsDB->quoteString($_POST['oa_name']).", oa_start = ".$xoopsDB->quoteString($_POST['oa_start'])
+ .", oa_stop = ".$xoopsDB->quoteString($_POST['oa_stop']).", oa_image = "
+ .$xoopsDB->quoteString($_POST['oa_image']).", oa_description = "
+ .$xoopsDB->quoteString($_POST['oa_description']).", oa_plugin = "
+ .$xoopsDB->quoteString($_POST['oa_plugin']).", oa_stream = "
+ .$xoopsDB->quoteString($_POST['oa_stream'])." WHERE oa_id = ".$_POST['oa_id']."");
+ redirect_header("index.php",2,_AM_ONAIR_EVENTMOD);
+ exit();
+ }
+/**
+ * Edit event
+ *
+ * @param Place $In admin edit choosen event
+ * @param integer $repeat 1
+ * @return Status
+ */
+function onair_EventEdit($oa_id) {
+ global $xoopsModule, $xoopsDB, $oa_timetype,$numbers2days;
+ $myts =& MyTextSanitizer::getInstance();
+ $oa_id = $_GET['oa_id'];
+ xoops_cp_header();
+ $oa_start='';
+ $oa_stop='';
+ $result=$xoopsDB->query("SELECT oa_day, oa_station, oa_title, oa_name, oa_start, oa_stop, oa_image, oa_description, oa_plugin, oa_stream FROM ".$xoopsDB->prefix("oa_program")." WHERE oa_id=".intval($oa_id)."");
+ list($oa_day, $oa_station, $oa_title, $oa_name, $oa_start, $oa_stop, $oa_image, $oa_description, $oa_plugin, $oa_stream) = $xoopsDB->fetchRow($result);
+
+ // Form for day names
+ $edform = new XoopsThemeForm(_AM_ONAIR_EDITENTRY, "onair", "index.php");
+ $edformday = new XoopsFormSelect(_AM_ONAIR_DAY, "oa_day", $oa_day,1,FALSE);
+ $edformday->addOption('0', _AM_ONAIR_SUNDAYNAME);
+ $edformday->addOption('1', _AM_ONAIR_MONDAYNAME);
+ $edformday->addOption('2', _AM_ONAIR_TUEDAYNAME);
+ $edformday->addOption('3', _AM_ONAIR_WEDDAYNAME);
+ $edformday->addOption('4', _AM_ONAIR_THUDAYNAME);
+ $edformday->addOption('5', _AM_ONAIR_FRIDAYNAME);
+ $edformday->addOption('6', _AM_ONAIR_SATDAYNAME);
+ $edform->addElement($edformday);
+
+
+ // Form for Station
+ $edformstation = new XoopsFormText(_AM_ONAIR_STATION, "oa_station", 75, 75, $myts->htmlSpecialChars($myts ->stripSlashesGPC($oa_station)));
+ $edform->addElement($edformstation);
+
+ // Form for Title
+ $edformtitle = new XoopsFormText(_AM_ONAIR_TITLE, "oa_title", 75, 75, $myts->htmlSpecialChars($myts ->stripSlashesGPC($oa_title)));
+ $edform->addElement($edformtitle);
+
+ // Form for name
+ $edformname = new XoopsFormText(_AM_ONAIR_NAME, "oa_name", 75, 75, $myts->htmlSpecialChars($myts ->stripSlashesGPC($oa_name)));
+ $edform->addElement($edformname);
+
+ // determine 12 hour Or 24 hour format time
+
+ if (onair_GetModuleOption('timetype')=='0'){
+
+ // Uses class to set 24 hour format
+ $edformstart = new onair_XoopsFormTimeEuro(_AM_ONAIR_START, 'oa_start',20);
+ $edform->addElement($edformstart);
+ $edformstop = new onair_XoopsFormTimeEuro(_AM_ONAIR_STOP, "oa_stop",15);
+ $oa_start = date('H:i:s', strtotime($oa_start));
+ $oa_stop = date('H:i:s', strtotime($oa_stop));
+ $edform->addElement($edformstop);
+ }
+
+ // Uses class to set 12 hour format
+ else if (onair_GetModuleOption('timetype')=='1'){
+ $edformstart = new onair_XoopsFormTimeUs(_AM_ONAIR_START, 'oa_start',20);
+ $edform->addElement($edformstart);
+ $edformstop = new onair_XoopsFormTimeUs(_AM_ONAIR_STOP, "oa_stop", 15);
+ $edform->addElement($edformstop);
+ $oa_start = date('h:i:s a', strtotime($oa_start));
+ $oa_stop = date('h:i:s a', strtotime($oa_stop));
+ }
+ // Check to see if end time is bigger than start time
+
+ // Form to choose image
+
+ $imgdir = "/modules/" . $xoopsModule->dirname() . "/images";
+
+ if ($oa_image=='0'){
+ $oa_image = 'blank.gif';
+ }
+ $graph_array = &onair_OaLists::getImgListAsArray(XOOPS_ROOT_PATH . $imgdir."/");
+ array_unshift($graph_array, _NONE);
+ $indeximage_select = new XoopsFormSelect('', 'oa_image', 'oa_image');
+ $indeximage_select->addOptionArray($graph_array);
+ $indeximage_select->setExtra("onchange=\"showImgSelected('img', 'oa_image', '/".
+ $imgdir."/', '', '" . XOOPS_URL . "')\"");
+ $indeximage_tray = new XoopsFormElementTray(_AM_SELECT_IMAGE, ' ');
+ $indeximage_tray->addElement($indeximage_select);
+ $indeximage_tray->addElement(new XoopsFormLabel('', "<br /><img src='"
+ . XOOPS_URL . $imgdir . "/" . $oa_image . " 'name='img' id='img' alt='' />"));
+ $edform->addElement($indeximage_tray);
+
+
+
+ // Form for Description
+ $edformdescription = new XoopsFormDhtmlTextArea(_AM_ONAIR_DESCRIPTION, 'oa_description',
+ $myts->htmlSpecialChars($myts ->stripSlashesGPC($oa_description)), 10, 50);
+ $edform->addElement($edformdescription);
+
+ //Select Plugin
+ $edformplugin = new XoopsFormSelect(_AM_ONAIR_PLUGINSELECT,"oa_plugin",$value="0",1,false);
+ $edformplugin->addOption('0', _AM_ONAIR_PLUGINNONE);
+ $edformplugin->addOption('1', _AM_ONAIR_PLUGINDIRETTORE);
+ $edformplugin->addOption('2', _AM_ONAIR_PLUGINSP);
+ $edformplugin->addOption('3', _AM_ONAIR_PLUGINWINAMP);
+ $edform->addElement($edformplugin);
+
+ $edformstream = new XoopsFormText(_AM_ONAIR_STREAM, 'oa_stream', 75, 75, $oa_stream);
+ $edform->addElement($edformstream);
+
+
+ // Hidden forms and id
+ $op_hidden = new XoopsFormHidden("op", "Eventsave");
+ $edform->addElement($op_hidden);
+ $id_event_hidden = new XoopsFormHidden("oa_id", $_GET['oa_id']);
+ $edform->addElement($id_event_hidden);
+ $submit_button = new XoopsFormButton("", "Submit", _AM_ONAIR_SUBMIT, "submit");
+ $edform->addElement($submit_button);
+ $edform->display();
+
+ xoops_cp_footer();
+}
+
+/**
+ * Show events in database
+ *
+ * @param Place $In admin Show events sorted by day, start time
+ * @param integer $repeat 1
+ * @return Status
+ */
+function onair_EventShow() {
+ global $xoopsDB, $myts, $oa_days,$xoopsModuleConfig,$oa_timetype;
+ $myts =& MyTextSanitizer::getInstance();
+ xoops_cp_header();
+ echo "<table border='0' width='100%' class='outer' align='center'>
+ <tr><td class='even'><b>"._AM_ONAIR_DAY."</b></td><td class='even'><b>"
+ ._AM_ONAIR_TITLE."</b></td><td class='even'><b>"._AM_ONAIR_START."</b></td><td class='even'><b>"
+ ._AM_ONAIR_STOP."</b></td><td colspan='2' class='even'><center><b>"
+ ._AM_ONAIR_ACTION."</center></b></td><td colspan='2' class='even'><center><b>"
+ ._AM_ONAIR_MAKEPLAYLIST."</center></b></td></tr>";
+
+
+ $result=$xoopsDB->query("SELECT oa_id, oa_day, oa_title, oa_start, oa_stop ,"
+ ." oa_image, oa_description FROM ".$xoopsDB->prefix("oa_program")." ORDER BY oa_day,oa_start");
+
+ while($myrow=$xoopsDB->fetchArray($result)) {
+ $oa_id = $myrow['oa_id'];
+ $oa_day = $myrow['oa_day'];
+ $oa_title = $myts->htmlSpecialChars($myts ->stripSlashesGPC($myrow['oa_title']));
+ if ($oa_timetype==0) {
+ $oa_start = date("H:i:s",strtotime($myrow['oa_start']));
+ $oa_stop = date("H:i:s",strtotime($myrow['oa_stop']));
+ }
+ if ($oa_timetype==1) {
+ $oa_start = date("h:i:s a",strtotime($myrow['oa_start']));
+ $oa_stop = date("h:i:s a",strtotime($myrow['oa_stop']));
+ }
+
+ $oa_image = $myrow['oa_image'];
+ $oa_description = $myts->htmlSpecialChars($myts ->stripSlashesGPC($myrow['oa_description']));
+
+ echo "</td>
+ <td class='odd'>$oa_days[$oa_day] </td>
+ <td class='odd'>$oa_title </td>
+ <td class='odd'>$oa_start </td>
+ <td class='odd'>$oa_stop </td>
+ <td class='odd'><a href='index.php?op=Eventedit&oa_id=$oa_id'>"._AM_ONAIR_EDIT."</a></td>
+ <td class='odd'><a href='index.php?op=Eventdel&oa_id=$oa_id'>"._AM_ONAIR_DEL."</a></td>
+ <td class='odd'><a href='playlist.php?op=Playlist&oa_id=$oa_id'>"._AM_ONAIR_PL."</a></td>
+ </tr>";
+ }
+ echo "</table><br>";
+ xoops_cp_footer();
+}
+/**
+ * Add new event
+ *
+ * @param Place $In admin create new event and send to post.php
+ * @param integer $repeat 1
+ * @return Status
+ */
+function onair_AddNew() {
+
+ global $xoopsModule, $xoopsDB, $myts,$numbers2days,$oa_eu_start,$oa_eu_stop,$oa_us_start,$oa_us_start;
+
+ if (isset($_POST["oa_day"])) $oa_day =
+ $myts->htmlSpecialChars($myts->stripSlashesGPC($_POST["oa_day"]));
+ else $oa_day="";
+ if (isset($_POST["oa_station"])) $oa_station =
+ $myts->htmlSpecialChars($myts->stripSlashesGPC($_POST["oa_station"]));
+ else $oa_station="";
+ if (isset($_POST["oa_name"])) $oa_name =
+ $myts->htmlSpecialChars($myts->stripSlashesGPC($_POST["oa_name"]));
+ else $oa_name="";
+ if (isset($_POST["oa_title"])) $oa_title =
+ $myts->htmlSpecialChars($myts->stripSlashesGPC($_POST["oa_title"]));
+ else $oa_title="";
+ if (isset($_POST["oa_start"])) $oa_start =
+ $myts->htmlSpecialChars($myts->stripSlashesGPC($_POST["oa_start"]));
+ else $oa_start="";
+ if (isset($_POST["oa_stop"])) $oa_stop =
+ $myts->htmlSpecialChars($myts->stripSlashesGPC($_POST["oa_stop"]));
+ else $oa_stop="";
+ if (isset($_POST["oa_image"])) $oa_image =
+ $myts->htmlSpecialChars($myts->stripSlashesGPC($_POST["oa_image"]));
+ else $oa_image = "blank.gif";
+ if (isset($_POST["oa_description"])) $oa_description =
+ $myts->htmlSpecialChars($myts->stripSlashesGPC($_POST["oa_description"]));
+ else $oa_description=_AM_ONAIR_NODESCRIPTION;
+
+
+ $myts =& MyTextSanitizer::getInstance();
+
+ //assign variable of xoopsuser to form
+ xoops_cp_header();
+ $signform = new XoopsThemeForm(_AM_ONAIR_ENTRY, "Onair", "post.php");
+
+ // Select days
+ $signformday = new XoopsFormSelect(_AM_ONAIR_DAY, "oa_day",0,1,FALSE);
+ $signformday->addOption('0', _AM_ONAIR_SUNDAYNAME);
+ $signformday->addOption('1', _AM_ONAIR_MONDAYNAME);
+ $signformday->addOption('2', _AM_ONAIR_TUEDAYNAME);
+ $signformday->addOption('3', _AM_ONAIR_WEDDAYNAME);
+ $signformday->addOption('4', _AM_ONAIR_THUDAYNAME);
+ $signformday->addOption('5', _AM_ONAIR_FRIDAYNAME);
+ $signformday->addOption('6', _AM_ONAIR_SATDAYNAME);
+ $signform->addElement($signformday);
+
+ // Select Station name
+ $signformstation = new XoopsFormText(_AM_ONAIR_STATION, "oa_station", 75, 75, $oa_station);
+ $signform->addElement($signformstation);
+
+ // Select Person name
+ $signformuname = new XoopsFormText(_AM_ONAIR_NAME, 'oa_name', 75, 75, $oa_name);
+ $signform->addElement($signformuname);
+
+ // Select Show title
+ $signformutitle = new XoopsFormText(_AM_ONAIR_TITLE, 'oa_title', 75, 75, $oa_title);
+ $signform->addElement($signformutitle);
+
+ // determine 12 hour Or 24 hour format time
+
+ // Uses class to set 12 hour format
+ if (onair_GetModuleOption('timetype')=='1'){
+
+ $signformstarteu = new onair_XoopsFormTimeUs(_AM_ONAIR_START, 'oa_start',20);
+ $signform->addElement($signformstarteu);
+ $signformstopeu = new onair_XoopsFormTimeUs(_AM_ONAIR_STOP, "oa_stop", 15);
+ $signform->addElement($signformstopeu);
+ $oa_start = date('h:i:s a', strtotime($oa_start));
+ $oa_stop = date('h:i:s a', strtotime($oa_stop));
+
+ }
+ else if (onair_GetModuleOption('timetype')=='0'){
+
+ // Uses class to set 24 hour format
+
+ $signformstart = new onair_XoopsFormTimeEuro(_AM_ONAIR_START, 'oa_start',20);
+ $signform->addElement($signformstart);
+ $signformstop = new onair_XoopsFormTimeEuro(_AM_ONAIR_STOP, "oa_stop", 15);
+ $signform->addElement($signformstop);
+ $oa_start = date('H:i:s', strtotime($oa_start));
+ $oa_stop = date('H:i:s', strtotime($oa_stop));
+ }
+
+
+ // Make description for the show
+ $signformdescription =
+ new XoopsFormDhtmlTextArea(_AM_ONAIR_DESCRIPTION, 'oa_description', $oa_description, 10, 50);
+ $signform->addElement($signformdescription);
+
+ // Is smilies allowed ?
+ global $xoopsModuleConfig,$oa_images;
+ if ($xoopsModuleConfig['smiliesallow']==1) {
+ ob_start();
+ echo xoopsSmilies('oa_description');
+ $signform->addElement(new XoopsFormLabel('', ob_get_contents()));
+ ob_end_clean();
+ }
+
+ // Choose image
+ $imgdir = "/modules/" . $xoopsModule->dirname() . "/images";
+
+ if ($oa_images=='0'){
+ $oa_images = 'blank.gif';
+ }
+ $graph_array = &onair_OaLists::getImgListAsArray(XOOPS_ROOT_PATH . $imgdir."/");
+ array_unshift($graph_array, _NONE);
+ $indeximage_select = new XoopsFormSelect('', 'oa_image', 'oa_image');
+ $indeximage_select->addOptionArray($graph_array);
+ $indeximage_select->setExtra("onchange=\"showImgSelected('img', 'oa_image', '/".
+ $imgdir."/', '', '" . XOOPS_URL . "')\"");
+ $indeximage_tray = new XoopsFormElementTray(_AM_SELECT_IMAGE, ' ');
+ $indeximage_tray->addElement($indeximage_select);
+ $indeximage_tray->addElement(new XoopsFormLabel('', "<br /><img src='"
+ . XOOPS_URL . $imgdir . "/" . $oa_images . " 'name='img' id='img' alt='' />"));
+ $signform->addElement($indeximage_tray);
+
+ //Select Plugin
+ $signformplugin = new XoopsFormSelect(_AM_ONAIR_PLUGINSELECT,"oa_plugin",0,1,false);
+ $signformplugin->addOption('0', _AM_ONAIR_PLUGINNONE);
+ $signformplugin->addOption('1', _AM_ONAIR_PLUGINDIRETTORE);
+ $signformplugin->addOption('2', _AM_ONAIR_PLUGINSP);
+ $signformplugin->addOption('3', _AM_ONAIR_PLUGINWINAMP);
+ $signform->addElement($signformplugin);
+
+ $signformstream = new XoopsFormText(_AM_ONAIR_STREAM, 'oa_stream', 75, 75, $oa_stream);
+ $signform->addElement($signformstream);
+
+
+ //$signform->addElement(new XoopsFormHidden("oa_id", $oa_id));
+ $submit_button = new XoopsFormButton('', 'submitbutton',_AM_ONAIR_SUBMIT, 'submit');
+ $signform->addElement($submit_button);
+ $signform->display();
+ xoops_cp_footer();
+ }
+
+
+ // Switch for choises
+ global $op;
+ $oa_id = intval($oa_id);
+ switch($op) {
+ case "Eventsave":
+ onair_EventSave();
+ break;
+ case "Eventedit":
+ onair_EventEdit($_GET["oa_id"]);
+ break;
+ case "Eventapprove":
+ onair_EventApprove();
+ break;
+ case "Eventdel":
+ onair_EventDel();
+ break;
+ case "Eventshow":
+ onair_EventShow();
+ break;
+ case "Addnew":
+ onair_AddNew();
+ break;
+ case "ImageUpload":
+ redirect_header("uploader.php",5,_AM_ONAIR_GOING2UPLOADFORM);
+ break;
+case "PlayList":
+ redirect_header("playlist.php",5,_AM_ONAIR_GOING2PLAYLISTFORM);
+ break;
+ default:
+ Choice();
+ break;
+}
+ ?>
Property changes on: XoopsModules/onair/releases/1.04/onair/admin/index.php
___________________________________________________________________
Added: svn:keywords
## -0,0 +1 ##
+Author Date Id Rev URL
\ No newline at end of property
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: XoopsModules/onair/releases/1.04/onair/admin/menu.php
===================================================================
--- XoopsModules/onair/releases/1.04/onair/admin/menu.php (rev 0)
+++ XoopsModules/onair/releases/1.04/onair/admin/menu.php 2014-06-05 08:27:03 UTC (rev 12564)
@@ -0,0 +1,33 @@
+<?php
+/**
+ * Onair Module
+ *
+ * Use this to show details, picture and schedule of timed events in a block.
+ *
+ * LICENSE
+ *
+ * You may not change or alter any portion of this comment or credits
+ * of supporting developers from this source code or any supporting source code
+ * which is considered copyrighted (c) material of the original comment or credit authors.
+ *
+ * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/
+ * @license http://www.fsf.org/copyleft/gpl.html GNU public license
+ * @author Michael Albertsen (culex) <http://www.culex.dk>
+ * @version $Id:menu.php 2009-06-19 13:22 culex $
+ * @since File available since Release 1.0.0
+ */
+
+ // Items in the left-side menu for amin
+
+$adminmenu[1]['title'] = _MI_ONAIR_PROGRAM_EDIT;
+$adminmenu[1]['link'] = "admin/index.php?op=Eventshow";
+$adminmenu[2]['title'] = _MI_ONAIR_ADDNEW;
+$adminmenu[2]['link'] = "admin/index.php?op=Addnew";
+$adminmenu[3]['title'] = _MI_ONAIR_ADDIMAGE;
+$adminmenu[3]['link'] = "admin/index.php?op=ImageUpload";
+$adminmenu[4]['title'] = _MI_ONAIR_PLAYLISTMENU;
+$adminmenu[4]['link'] = "admin/playlist.php?op=Playlistshow";
+$adminmenu[5]['title'] = _MI_ONAIR_HELP;
+$adminmenu[5]['link'] = "admin/help.php";
+
+?>
\ No newline at end of file
Property changes on: XoopsModules/onair/releases/1.04/onair/admin/menu.php
___________________________________________________________________
Added: svn:keywords
## -0,0 +1 ##
+Author Date Id Rev URL
\ No newline at end of property
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: XoopsModules/onair/releases/1.04/onair/admin/playlist.php
===================================================================
--- XoopsModules/onair/releases/1.04/onair/admin/playlist.php (rev 0)
+++ XoopsModules/onair/releases/1.04/onair/admin/playlist.php 2014-06-05 08:27:03 UTC (rev 12564)
@@ -0,0 +1,375 @@
+<?php
+/**
+ * Onair Module
+ *
+ * Use this to show details, picture and schedule of timed events in a block.
+ *
+ * LICENSE
+ *
+ * You may not change or alter any portion of this comment or credits
+ * of supporting developers from this source code or any supporting source code
+ * which is considered copyrighted (c) material of the original comment or credit authors.
+ *
+ * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/
+ * @license http://www.fsf.org/copyleft/gpl.html GNU public license
+ * @author Michael Albertsen (culex) <http://www.culex.dk>
+ * @version $Id:playlist.php 2009-06-19 13:22 culex $
+ * @since File available since Release 1.0.0
+ */
+ include_once 'admin_header.php';
+ include_once XOOPS_ROOT_PATH.'/class/xoopslists.php';
+ include XOOPS_ROOT_PATH.'/class/xoopsformloader.php';
+ include XOOPS_ROOT_PATH.'/include/xoopscodes.php';
+ include '../include/functions.php';
+ include '../include/classes.php';
+
+ $pl_timetype = onair_GetModuleOption('timetype');
+
+ if (isset($_GET['op']) && $_GET['op'] == 'Playlistshow') {
+ $op = 'Playlistshow';
+ }
+ if (isset($_GET['op']) && $_GET['op'] == 'Playlistedit') {
+ $op = 'Playlistedit';
+ }
+ if (isset($_GET['op']) && $_GET['op'] == 'Playlistdel') {
+ $op = 'Playlistdel';
+ }
+ if (isset($_POST['op']) && $_POST['op'] == 'Playlistsave') {
+ $op = 'Playlistsave';
+ }
+ if (isset($_GET['op']) && $_GET['op'] == 'Playlist') {
+ $op = 'Playlist';
+ }
+ if (empty($op)) {
+ $op = 'Playlistchoice';
+ }
+ if (isset($_GET['op']) && $_GET['op'] == 'Playlist' && $_GET['oa_id']=='') {
+ redirect_header("index.php?op=Eventshow",4,_AM_ONAIR_NOTEXISTEVENT);
+ }
+
+/**
+ * Choose from playlist menu
+ *
+ * @param Place $In admin choose your action from menu
+ * @param integer $repeat 1
+ * @return Status
+ */
+function onair_PlaylistChoice() {
+ global $xoopsModule;
+ xoops_cp_header();
+ echo '<table class="outer" width="100%"><tr><td class="even">';
+ echo "<a href='playlist.php?op=Playlistshow'>"._AM_ONAIR_PLAYLISTSHOWALL."</a><br />";
+ echo "<a href='index.php?op=choice'>"._AM_ONAIR_BACK2INDEX."</a><br />";
+ echo '</td></tr></table>';
+ xoops_cp_footer();
+ }
+
+/**
+ * Delete playlist
+ *
+ * @param Place $In admin delete playlist from database
+ * @param integer $repeat 1
+ * @return Status
+ */
+function onair_PlaylistDel($del=0) {
+ global $xoopsDB;
+ if (isset($_POST['del']) && $_POST['del'] == 1) {
+ $result = $xoopsDB->query("DELETE FROM ".$xoopsDB->prefix("oa_playlist")
+ ." WHERE pl_id = ".intval($_POST['pl_id'])."");
+ redirect_header("playlist.php",2,_AM_ONAIR_PLAYLISTDEL);
+ exit();
+ }
+ else {
+ xoops_cp_header();
+ xoops_confirm(array('pl_id' => $_GET['pl_id'], 'del' => 1), 'playlist.php?op=Playlistdel',
+ _AM_ONAIR_SUREDELETE);
+ xoops_cp_footer();
+ }
+ }
+
+/**
+ * Save edited playlist to database
+ *
+ * @param Place $In admin saves your edited playlist
+ * @param integer $repeat 1
+ * @return Status
+ */
+function onair_PlaylistSave() {
+ global $xoopsDB,$pl_timetype,$numbers2days;
+
+ $xoopsDB->query("UPDATE ".$xoopsDB->prefix('oa_playlist')." SET pl_day = "
+ .$xoopsDB->quoteString($_POST['pl_day']).", pl_station = ".$xoopsDB->quoteString($_POST['pl_station'])
+ .", pl_title = ".$xoopsDB->quoteString($_POST['pl_title']).", pl_name = "
+ .$xoopsDB->quoteString($_POST['pl_name']).", pl_start = ".$xoopsDB->quoteString($_POST['pl_start'])
+ .", pl_stop = ".$xoopsDB->quoteString($_POST['pl_stop']).", pl_image = "
+ .$xoopsDB->quoteString($_POST['pl_image']).", pl_description = "
+ .$xoopsDB->quoteString($_POST['pl_description']).", pl_date = "
+ .$xoopsDB->quoteString($_POST['pl_date'])." WHERE pl_id = ".intval($_POST['pl_id'])."");
+ redirect_header("playlist.php",2,_AM_ONAIR_PLAYLISTMOD.$_POST['approved']);
+ exit();
+ }
+
+/**
+ * Edit choosen playlist
+ *
+ * @param Place $In admin Load data to edit form and send to onair_PlaylistSave
+ * @param integer $repeat 1
+ * @return Status
+ */
+function onair_PlaylistEdit($pl_id) {
+
+ global $xoopsModuleConfig,$xoopsModule,$xoopsDB,$pl_timetype,$myts;
+include XOOPS_ROOT_PATH."/class/xoopsformloader.php";
+ $playlistform = new XoopsThemeForm("PlayList", "form", "playlist.php?op=Playlistsave&pl_id=$pl_id");
+ $myts =& MyTextSanitizer::getInstance();
+ $result=$xoopsDB->query("SELECT pl_day, pl_title, pl_name, pl_start, pl_stop, pl_image, pl_date, pl_description,pl_station FROM ".$xoopsDB->prefix("oa_playlist")." WHERE pl_id=".intval($pl_id)."");
+
+ list($pl_day,$pl_title,$pl_name,$pl_start,$pl_stop,$pl_image,$pl_date,$pl_description,$pl_station) = $xoopsDB->fetchRow($result);
+
+ $id_playlist_hidden = new XoopsFormHidden("pl_id", $pl_id);
+ $day_playlist_hidden = new XoopsFormHidden("pl_day", $pl_day);
+ $title_playlist_hidden = new XoopsFormHidden("pl_title", $myts->htmlSpecialChars($myts ->stripSlashesGPC($pl_title)));
+ $name_playlist_hidden = new XoopsFormHidden("pl_name", $myts->htmlSpecialChars($myts ->stripSlashesGPC($pl_name)));
+ $start_playlist_hidden = new XoopsFormHidden("pl_start", $pl_start);
+ $stop_playlist_hidden = new XoopsFormHidden("pl_stop", $pl_stop);
+ $image_playlist_hidden = new XoopsFormHidden("pl_image", $pl_image);
+ $date_playlist_hidden = new XoopsFormHidden("pl_date", $pl_date);
+ $station_playlist_hidden = new XoopsFormHidden("pl_station", $myts->htmlSpecialChars($myts ->stripSlashesGPC($pl_station)));
+ // SELECT PROGRAM TO ADD PLAYLIST TO...
+
+ $infoday = new XoopsFormText(_AM_ONAIR_DAY, "pl_day", 75, 75, $myts->htmlSpecialChars($myts ->stripSlashesGPC($pl_day)));
+ $playlistform->addElement($infoday);
+
+ $infotitle = new XoopsFormText(_AM_ONAIR_TITLE, "pl_title", 75, 75, $myts->htmlSpecialChars($myts ->stripSlashesGPC($pl_title)));
+ $playlistform->addElement($infotitle);
+
+ $infoname = new XoopsFormText(_AM_ONAIR_NAME, "pl_name", 75, 75, $myts->htmlSpecialChars($myts ->stripSlashesGPC($pl_name)));
+ $playlistform->addElement($infoname);
+
+ $infostart = new XoopsFormText(_AM_ONAIR_START, "pl_start", 75, 75, $pl_start);
+ $playlistform->addElement($infostart);
+
+ $infostop = new XoopsFormText(_AM_ONAIR_STOP, "pl_stop", 75, 75, $pl_stop);
+ $playlistform->addElement($infostop);
+
+ $infoimage = new XoopsFormText(_AM_ONAIR_IMAGE, "pl_image", 75, 75, $pl_image);
+ $playlistform->addElement($infoimage);
+
+ $infostation = new XoopsFormText(_AM_ONAIR_STATION, "pl_station", 75, 75, $myts->htmlSpecialChars($myts ->stripSlashesGPC($pl_station)));
+ $playlistform->addElement($infostation);
+
+ //SELECT DATE TO SAVE
+ $playlistformdate = new XoopsFormTextDateSelect (_AM_ONAIR_DATE, "pl_date", $size=15, date('D.m.y'));
+ $playlistform->addElement($playlistformdate);
+
+ // DESCRIPTION / PLAYLIST FOR THE DATED SHOW
+
+ $playlistformdescription =
+ new XoopsFormDhtmlTextArea(_AM_ONAIR_DESCRIPTION, 'pl_description', $myts->htmlSpecialChars($myts ->stripSlashesGPC($pl_description)), 10, 50);
+ $playlistform->addElement($playlistformdescription);
+
+ // SUBMIT BUTTON AND SHOW FORM
+ $op_hidden = new XoopsFormHidden("op", "Playlistsave");
+ $playlistform->addElement($op_hidden);
+
+
+ $playlistform->addElement($id_playlist_hidden);
+ $playlistform->addElement($day_playlist_hidden);
+ $playlistform->addElement($image_playlist_hidden);
+ $playlistform->addElement($name_playlist_hidden);
+ $playlistform->addElement($date_playlist_hidden);
+ $playlistform->addElement($start_playlist_hidden);
+ $playlistform->addElement($stop_playlist_hidden);
+ $playlistform->addElement($title_playlist_hidden);
+ $playlistform->addElement($station_playlist_hidden);
+ $button_tray = new XoopsFormElementTray('' ,'');
+ $button_tray->addElement(new XoopsFormButton('', 'Playlistsave',"Submit", 'submit'));
+ $playlistform->addElement($button_tray);
+ $playlistform->display();
+ }
+
+/**
+ * Show all playlist in database
+ *
+ * @param Place $In admin Show all playlists
+ * @param integer $repeat 1
+ * @return Status
+ */
+function onair_PlaylistShow() {
+ global $xoopsDB, $myts, $pl_days,$xoopsModuleConfig,$pl_timetype;
+
+ xoops_cp_header();
+ $myts =& MyTextSanitizer::getInstance();
+ echo "<table border='0' width='100%' class='outer' align='center'>
+ <tr><td class='even'><b>"._AM_ONAIR_DATE."</b></td><td class='even'><b>"
+ ._AM_ONAIR_TITLE."</b></td><td class='even'><b>"._AM_ONAIR_START."</b></td><td class='even'><b>"
+ ._AM_ONAIR_STOP."</b></td><td colspan='2' class='even'><center><b>"
+ ._AM_ONAIR_ACTION."</center></b></td></tr>";
+
+
+ $result=$xoopsDB->query("SELECT pl_id, pl_day, pl_title, pl_start, pl_stop ,"
+ ." pl_image, pl_description, pl_date FROM ".$xoopsDB->prefix("oa_playlist")." ORDER BY pl_date,pl_start");
+ while($myrow=$xoopsDB->fetchArray($result)) {
+ $pl_id = $myrow['pl_id'];
+ $pl_day = $myrow['pl_day'];
+ $pl_title = $myts->htmlSpecialChars($myts ->stripSlashesGPC($myrow['pl_title']));
+ if ($pl_timetype==0) {
+ $pl_start = date("H:i:s",strtotime($myrow['pl_start']));
+ $pl_stop = date("H:i:s",strtotime($myrow['pl_stop']));
+ }
+ if ($pl_timetype==1) {
+ $pl_start = date("h:i:s a",strtotime($myrow['pl_start']));
+ $pl_stop = date("h:i:s a",strtotime($myrow['pl_stop']));
+ }
+
+ $pl_image = $myrow['pl_image'];
+ $pl_description = $myts->htmlSpecialChars($myts ->stripSlashesGPC($myrow['pl_description']));
+ $pl_date = $myrow['pl_date'];
+ echo "</td>
+ <td class='odd'>$pl_date </td>
+ <td class='odd'>$pl_title </td>
+ <td class='odd'>$pl_start </td>
+ <td class='odd'>$pl_stop </td>
+ <td class='odd'><a href='playlist.php?op=Playlistedit&pl_id=$pl_id'>"._AM_ONAIR_EDIT."</a></td>
+ <td class='odd'><a href='playlist.php?op=Playlistdel&pl_id=$pl_id'>"._AM_ONAIR_DEL."</a></td>
+ </tr>";
+ }
+ echo "</table>";
+ xoops_cp_footer();
+}
+
+/**
+ * Create playlist with data from choosen event
+ *
+ * @param Place $In admin choose event to make playlist to
+ * @param integer $repeat 1
+ * @return Status
+ */
+function onair_Playlist($oa_id) {
+ global $xoopsModuleConfig,$xoopsModule,$xoopsDB,$pl_timetype,$oa_id,$oa_day,$myts;
+ include XOOPS_ROOT_PATH."/class/xoopsformloader.php";
+ $oa_id = $_GET['oa_id'];
+ $playlistform = new XoopsThemeForm("Playlist", "form", "playlist.php?op=Playlistpost&pl_id=$oa_id");
+ $myts =& MyTextSanitizer::getInstance();
+
+ $result=$xoopsDB->query("SELECT oa_id, oa_day, oa_title, oa_name, oa_start, oa_stop, oa_image,oa_station FROM ".$xoopsDB->prefix("oa_program")." WHERE oa_id=".intval($oa_id)."");
+ $myts =& MyTextSanitizer::getInstance();
+ list($oa_id,$oa_day,$oa_title,$oa_name,$oa_start,$oa_stop,$oa_image,$oa_station) = $xoopsDB->fetchRow($result);
+ $id_playlist_hidden = new XoopsFormHidden("pl_id", $myts->htmlSpecialChars($myts ->stripSlashesGPC($oa_id)));
+ $day_playlist_hidden = new XoopsFormHidden("pl_day", $oa_day);
+ $image_playlist_hidden = new XoopsFormHidden("pl_image", $oa_image);
+ $name_playlist_hidden = new XoopsFormHidden("pl_name", $myts->htmlSpecialChars($myts ->stripSlashesGPC($oa_name)));
+ $start_playlist_hidden = new XoopsFormHidden("pl_start", $oa_start);
+ $stop_playlist_hidden = new XoopsFormHidden("pl_stop", $oa_stop);
+ $title_playlist_hidden = new XoopsFormHidden("pl_title", $myts->htmlSpecialChars($myts ->stripSlashesGPC($oa_title)));
+ $station_playlist_hidden = new XoopsFormHidden("pl_station", $myts->htmlSpecialChars($myts ->stripSlashesGPC($oa_station)));
+
+ // SELECT PROGRAM TO ADD PLAYLIST TO...
+
+ $infoday = new XoopsFormText(_AM_ONAIR_DAY, "pl_day", 75, 75, $myts->htmlSpecialChars($myts ->stripSlashesGPC($oa_day)));
+ $playlistform->addElement($infoday);
+
+ $infotitle = new XoopsFormText(_AM_ONAIR_TITLE, "pl_title", 75, 75, $myts->htmlSpecialChars($myts ->stripSlashesGPC($oa_title)));
+ $playlistform->addElement($infotitle);
+
+ $infoname = new XoopsFormText(_AM_ONAIR_NAME, "pl_name", 75, 75, $myts->htmlSpecialChars($myts ->stripSlashesGPC($oa_name)));
+ $playlistform->addElement($infoname);
+
+ $infostart = new XoopsFormText(_AM_ONAIR_START, "pl_start", 75, 75, $oa_start);
+ $playlistform->addElement($infostart);
+
+ $infostop = new XoopsFormText(_AM_ONAIR_STOP, "pl_stop", 75, 75, $oa_stop);
+ $playlistform->addElement($infostop);
+
+ $infostation = new XoopsFormText(_AM_ONAIR_STATION, "pl_station", 75, 75, $myts->htmlSpecialChars($myts ->stripSlashesGPC($oa_station)));
+ $playlistform->addElement($infostation);
+
+ //SELECT DATE TO SAVE
+ $playlistformdate = new XoopsFormTextDateSelect (_AM_ONAIR_DATE, "pl_date", $size=15, date('D.m.y'));
+ $playlistform->addElement($playlistformdate);
+
+ // DESCRIPTION / PLAYLIST FOR THE DATED SHOW
+ $pl_description='';
+
+ $playlistformdescription =
+ new XoopsFormDhtmlTextArea(_AM_ONAIR_DESCRIPTION, 'pl_description', $myts->htmlSpecialChars($myts ->stripSlashesGPC($pl_description)), 10, 50);
+ $playlistform->addElement($playlistformdescription);
+
+ // SUBMIT BUTTON AND SHOW FORM
+ $op_hidden = new XoopsFormHidden("op", "Playlistpost");
+ $playlistform->addElement($op_hidden);
+
+
+ $playlistform->addElement($id_playlist_hidden);
+ $playlistform->addElement($day_playlist_hidden);
+ $playlistform->addElement($image_playlist_hidden);
+ $playlistform->addElement($name_playlist_hidden);
+ $playlistform->addElement($name_playlist_hidden);
+ $playlistform->addElement($start_playlist_hidden);
+ $playlistform->addElement($stop_playlist_hidden);
+ $playlistform->addElement($title_playlist_hidden);
+ $playlistform->addElement($station_playlist_hidden);
+ $button_tray = new XoopsFormElementTray('' ,'');
+ $button_tray->addElement(new XoopsFormButton('', 'Playlistpost',"Submit", 'submit'));
+ $playlistform->addElement($button_tray);
+ $playlistform->display();
+ }
+ // end up using the function selector
+ if(!isset($_POST['op'])) {
+ $op = isset($_GET['op']) ? $_GET['op'] : 'Playlistchoice';
+ } else {
+ $op = $_POST['op'];
+ }
+
+ // Switch for choises
+ global $op;
+ $pl_id = intval($pl_id);
+ $oa_id = intval($oa_id);
+ switch($op) {
+ case "Playlistsave":
+ onair_PlaylistSave();
+ break;
+ case "Playlistedit":
+ xoops_cp_header();
+ onair_PlaylistEdit($_GET["pl_id"]);
+ xoops_cp_footer();
+ break;
+ case "Playlistdel":
+ onair_PlaylistDel();
+ break;
+ case "Playlistshow":
+ onair_PlaylistShow();
+ break;
+ case "Playlist":
+ xoops_cp_header();
+ onair_Playlist($_GET["oa_id"]);
+ xoops_cp_footer();
+ break;
+ case "Playlistpost":
+ global $myts,$xoopsDB;
+ $myts =& MyTextSanitizer::getInstance();
+ $pl_id = $myts->htmlSpecialChars($_POST["pl_id"]);
+ $pl_day = $myts->htmlSpecialChars($_POST["pl_day"]);
+ $pl_date = $myts->htmlSpecialChars($_POST["pl_date"]);
+ $pl_title = $myts->htmlSpecialChars($_POST["pl_title"]);
+ $pl_name = $myts->htmlSpecialChars($_POST["pl_name"]);
+ $pl_image = $myts->htmlSpecialChars($_POST["pl_image"]);
+ $pl_start = $myts->htmlSpecialChars($_POST["pl_start"]);
+ $pl_stop = $myts->htmlSpecialChars($_POST["pl_stop"]);
+ $pl_description = $myts->htmlSpecialChars($_POST["pl_description"]);
+ $pl_station = $myts->htmlSpecialChars($_POST["pl_station"]);
+
+ $sqlinsert="INSERT INTO ".$xoopsDB->prefix("oa_playlist")." (pl_id, pl_day, pl_title, pl_date, pl_start, pl_stop,pl_description, pl_image, pl_name, pl_station) VALUES ('', ".$xoopsDB->quoteString($pl_day).", ".$xoopsDB->quoteString($pl_title).", ".$xoopsDB->quoteString($pl_date).", ".$xoopsDB->quoteString($pl_start).", ".$xoopsDB->quoteString($pl_stop).", ".$xoopsDB->quoteString($pl_description).", ".$xoopsDB->quoteString($pl_image).", ".$xoopsDB->quoteString($pl_name).", ".$xoopsDB->quoteString($pl_station).")";
+
+ if (!$result = $xoopsDB->query($sqlinsert)) {
+ redirect_header("index.php",2,_AM_ONAIR_ERRORINSERT);
+ }
+ redirect_header("index.php",2,_AM_ONAIR_THANKS);
+
+break;
+case "Playlistchoice":
+default:
+ onair_PlaylistChoice();
+ break;
+}
+ ?>
Property changes on: XoopsModules/onair/releases/1.04/onair/admin/playlist.php
___________________________________________________________________
Added: svn:keywords
## -0,0 +1 ##
+Author Date Id Rev URL
\ No newline at end of property
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: XoopsModules/onair/releases/1.04/onair/admin/post.php
===================================================================
--- XoopsModules/onair/releases/1.04/onair/admin/post.php (rev 0)
+++ XoopsModules/onair/releases/1.04/onair/admin/post.php 2014-06-05 08:27:03 UTC (rev 12564)
@@ -0,0 +1,71 @@
+<?php
+/**
+ * Onair Module
+ *
+ * Use this to show details, picture and schedule of timed events in a block.
+ *
+ * LICENSE
+ *
+ * You may not change or alter any portion of this comment or credits
+ * of supporting developers from this source code or any supporting source code
+ * which is considered copyrighted (c) material of the original comment or credit authors.
+ *
+ * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/
+ * @license http://www.fsf.org/copyleft/gpl.html GNU public license
+ * @author Michael Albertsen (culex) <http://www.culex.dk>
+ * @version $Id:post.php 2009-06-19 13:23 culex $
+ * @since File available since Release 1.0.0
+ */
+ include_once ('admin_header.php');
+ include '../include/functions.php';
+ global $xoopsDB,$oa_start,$oa_stop;
+
+ $oa_timetype = onair_GetModuleOption('timetype');
+ $myts =& MyTextSanitizer::getInstance();
+ $oa_id="";
+ $oa_day = $myts->htmlSpecialChars($_POST["oa_day"]);
+ $oa_station = $myts->htmlSpecialChars($_POST["oa_station"]);
+ $oa_name = $myts->htmlSpecialChars($_POST["oa_name"]);
+ $oa_title = $myts->htmlSpecialChars($_POST["oa_title"]);
+ if (onair_GetModuleOption('timetype')=='0'){
+ $oa_start = date('H:i:s', $_POST['oa_start']);
+ $oa_stop = date('H:i:s', $_POST['oa_stop']);
+ if ($oa_stop < $oa_start) {
+ $_oa_stop = '23:59:59';
+ }
+ }
+ if (onair_GetModuleOption('timetype')=='1'){
+ $oa_start = date('h:i:s a', $_POST['oa_start']);
+ $oa_stop = date('h:i:s a', $_POST['oa_stop']);
+ if ($oa_stop < $oa_start) {
+ $oa_stop = '23:59:59';
+ }
+ }
+ $oa_image = $myts->htmlSpecialChars($_POST["oa_image"]);
+ $oa_description = $myts->htmlSpecialChars($_POST["oa_description"]);
+ $oa_plugin = $myts->htmlSpecialChars($_POST["oa_plugin"]);
+ $oa_stream = $myts->htmlSpecialChars($_POST["oa_stream"]);
+
+ $sqlinsert="INSERT INTO ".$xoopsDB->prefix("oa_program")." (oa_day, oa_station, oa_name, oa_title,oa_start, oa_stop, oa_image, oa_description, oa_plugin, oa_stream) VALUES (".$xoopsDB->quoteString($oa_day).", ".$xoopsDB->quoteString($oa_station).", ".$xoopsDB->quoteString($oa_name).", ".$xoopsDB->quoteString($oa_title).", ".$xoopsDB->quoteString($oa_start).", ".$xoopsDB->quoteString($oa_stop).", ".$xoopsDB->quoteString($oa_image).", ".$xoopsDB->quoteString($oa_description).", ".$xoopsDB->quoteString($oa_plugin).", ".$xoopsDB->quoteString($oa_stream).")";
+
+ if (!$result = $xoopsDB->query($sqlinsert)) {
+ $oa_send = _AM_ONAIR_ERRORINSERT;
+ }
+
+ // Send mail to webmaster
+ if ($xoopsModuleConfig['adminmail'] == 1) {
+ $subject = $xoopsConfig['sitename']." - "._AM_ONAIR_NAMEMODULE;
+ $xoopsMailer =& getMailer();
+ $xoopsMailer->useMail();
+ $xoopsMailer->setToEmails($xoopsConfig['adminmail']);
+ $xoopsMailer->setFromEmail($xoopsConfig['adminmail']);
+ $xoopsMailer->setFromName($xoopsConfig['sitename']);
+ $xoopsMailer->setSubject($subject);
+ $xoopsMailer->setBody(_AM_ONAIR_NEWEVENT." ".XOOPS_URL."/modules/onair/");
+ $xoopsMailer->send();
+ }
+
+ $oa_send = "<br />"._AM_ONAIR_THANKS;
+
+ redirect_header("index.php",2,$oa_send);
+?>
\ No newline at end of file
Property changes on: XoopsModules/onair/releases/1.04/onair/admin/post.php
___________________________________________________________________
Added: svn:keywords
## -0,0 +1 ##
+Author Date Id Rev URL
\ No newline at end of property
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: XoopsModules/onair/releases/1.04/onair/admin/songs.php
=========...
[truncated message content] |