Merge branch 'master' of dev.sourcefabric.org:campcaster

Conflicts:
	pypo/tests/airtime-schedule-insert.php
This commit is contained in:
martin 2011-01-06 21:45:49 -05:00
commit f7aa3b37ef
99 changed files with 982 additions and 574 deletions

View File

@ -35,6 +35,7 @@
<actionMethod actionName="delete"/> <actionMethod actionName="delete"/>
<actionMethod actionName="contents"/> <actionMethod actionName="contents"/>
<actionMethod actionName="editFileMd"/> <actionMethod actionName="editFileMd"/>
<actionMethod actionName="quickSearch"/>
</controllerFile> </controllerFile>
<controllerFile controllerName="Plupload"> <controllerFile controllerName="Plupload">
<actionMethod actionName="index"/> <actionMethod actionName="index"/>
@ -45,6 +46,7 @@
<actionMethod actionName="index"/> <actionMethod actionName="index"/>
<actionMethod actionName="newfield"/> <actionMethod actionName="newfield"/>
<actionMethod actionName="display"/> <actionMethod actionName="display"/>
<actionMethod actionName="newgroup"/>
</controllerFile> </controllerFile>
<controllerFile controllerName="Login"> <controllerFile controllerName="Login">
<actionMethod actionName="index"/> <actionMethod actionName="index"/>
@ -85,6 +87,7 @@
<formFile formName="AddShow"/> <formFile formName="AddShow"/>
<formFile formName="ScheduleShow"/> <formFile formName="ScheduleShow"/>
<formFile formName="AddUser"/> <formFile formName="AddUser"/>
<formFile formName="AdvancedSearchGroup"/>
</formsDirectory> </formsDirectory>
<layoutsDirectory enabled="false"/> <layoutsDirectory enabled="false"/>
<modelsDirectory/> <modelsDirectory/>
@ -229,6 +232,12 @@
<viewControllerScriptsDirectory forControllerName="Library"> <viewControllerScriptsDirectory forControllerName="Library">
<viewScriptFile forActionName="editFileMd"/> <viewScriptFile forActionName="editFileMd"/>
</viewControllerScriptsDirectory> </viewControllerScriptsDirectory>
<viewControllerScriptsDirectory forControllerName="Library">
<viewScriptFile forActionName="quickSearch"/>
</viewControllerScriptsDirectory>
<viewControllerScriptsDirectory forControllerName="Search">
<viewScriptFile forActionName="newgroup"/>
</viewControllerScriptsDirectory>
</viewScriptsDirectory> </viewScriptsDirectory>
<viewHelpersDirectory/> <viewHelpersDirectory/>
<viewFiltersDirectory enabled="false"/> <viewFiltersDirectory enabled="false"/>

View File

@ -6,7 +6,8 @@ Version 1.6.0
------------- -------------
This version marks a major change to the project, completely replacing the This version marks a major change to the project, completely replacing the
custom audio player with liquidsoap, dropping the custom desktop GUI, and custom audio player with liquidsoap, dropping the custom desktop GUI, and
completely rewriting the web interface. completely rewriting the web interface. The project has also been renamed
from "Campcaster" to "Airtime" for this release.
Paul Baranowski (paul.baranowski@sourcefabric.org) Paul Baranowski (paul.baranowski@sourcefabric.org)
Role: Project Lead / Software Developer Role: Project Lead / Software Developer
@ -20,6 +21,12 @@ Naomi Aro (naomi.aro@sourcefabric.org)
- New User Interface - New User Interface
- Conversion to Propel DB backend - Conversion to Propel DB backend
Martin Konecny (martin.konecny@sourcefabric.org)
Role:Software Developer
Highlights:
- New User Interface
- Scheduler
Daniel James Daniel James
Role: Documentor & QA Role: Documentor & QA

View File

@ -2,22 +2,22 @@
Copyright (c) 2010 Sourcefabric O.P.S. Copyright (c) 2010 Sourcefabric O.P.S.
This file is part of the Campcaster project. This file is part of the Airtime project.
http://campcaster.sourcefabric.org/ http://campcaster.sourcefabric.org/
To report bugs, send an e-mail to contact@sourcefabric.org To report bugs, send an e-mail to contact@sourcefabric.org
Campcaster is free software; you can redistribute it and/or modify Airtime is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or the Free Software Foundation; either version 2 of the License, or
(at your option) any later version. (at your option) any later version.
Campcaster is distributed in the hope that it will be useful, Airtime is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details. GNU General Public License for more details.
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License
along with Campcaster; if not, write to the Free Software along with Airtime; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-------------------------------------------------------------------------------- --------------------------------------------------------------------------------

75
README
View File

@ -1,94 +1,45 @@
========================================================================= =========================================================================
========================== CAMPCASTER =============================== ========================== AIRTIME =================================
========================================================================= =========================================================================
Campcaster is the first free and open radio management software that Airtime is an open source application that provides remote automation
provides live studio broadcast capabilities as well as remote automation of a radio station.
in one integrated system.
Campcaster has three audio outputs: one for live broadcasting, one for Major features:
previewing audio, and one for automated scheduled playback.
Major features of Campcaster:
* Live, in-studio playout. Campcaster Studio enables station personnel
to play out both individual sound files and playlists such as
advertising blocks or entire programs.
* Web-based remote station management. Authorized personnel can add * Web-based remote station management. Authorized personnel can add
program material, create playlists, and schedule programming all via program material, create playlists, and schedule programming all via
Campcaster's web interface. a web interface.
* Automation. Campcaster has a scheduler function that enables users to * Automation. Airtime has a scheduler function that enables users to
set playlists for playback at a date and time of their choosing. set playlists for playback at a date and time of their choosing.
Playlists can be played back multiple times. Playlists can be played back multiple times.
* Playlists. Campcaster allows users to create playlists that can be * Playlists. Airtime allows users to create playlists that can be
either played on-demand in the Studio or in automated mode. Playlists either played on-demand in the Studio or in automated mode. Playlists
can be nested inside each other, so for example, a playlist with a can be nested inside each other, so for example, a playlist with a
block of ads can be inside of a playlist with a music program. block of ads can be inside of a playlist with a music program.
* Centralized archives of station program material. Station personnel * Centralized archives of station program material. Station personnel
have a searchable, browseable central archive that is accessible both have a searchable, browseable central archive that is accessible both
in the office and via the web. in the office and via the web.
* Solid, fast playback. Campcaster uses the popular Gstreamer * Solid, fast playback. Airtime uses the open source Liquidsoap
multimedia framework for clean, reliable, fast playback. multimedia framework for clean, reliable, fast playback.
* Program sharing. Stations can share both playlists and files with a
designated, centralized 'network hub.' This enables the creation of
'virtual radio networks' connected via the Internet.
* Search-based backup. You can backup all station archives at the click
of a button, or only backup certain files based on search terms, so
that backup files can be made of only a certain program or of all
files created by a certain user.
* Localization. Campcaster is multilingual and supports Unicode. It
also is very easy to create language localizations.
* No restrictions. Multiple instances of the Campcaster Studio program
can access the same archive on the office network, and there are no
worries about hardware dongles or keys limiting access on multiple PCs.
* Innovative design. Campcaster's user interface the product of
Parsons School of Design's “Design and Communication” program -
introduces a number of innovations, including the 'Scratchpad',
a list of recently-used files and playlists.
* Open, extensible architecture. Stations are free to extend and alter * Open, extensible architecture. Stations are free to extend and alter
all parts of the Campcaster program code, which makes extensive use all parts of the program code.
of XML-RPC APIs.
INSTALLATION INSTALLATION
------------ ------------
Please see this page for a typical user installation: Please see this page for a typical user installation:
http://en.flossmanuals.net/Campcaster http://en.flossmanuals.net/Airtime
If you are a developer, please see this page: If you are a developer, please see this page:
http://wiki.sourcefabric.org/display/CC/Campcaster+Dev+Site http://wiki.sourcefabric.org/display/CC/Airtime+Dev+Site
Quick links to our resources Quick links to our resources
---------------------------- ----------------------------
User Manual: http://en.flossmanuals.net/Campcaster/Introduction User Manual: http://en.flossmanuals.net/Airtime/Introduction
Forums and mailing lists: http://forum.sourcefabric.org Forums and mailing lists: http://forum.sourcefabric.org
Bug Tracking: http://dev.sourcefabric.org Bug Tracking: http://dev.sourcefabric.org
Code view/review: http://code.sourcefabric.org Code view/review: http://code.sourcefabric.org
Public source code hosting: http://github.com/sourcefabric Public source code hosting: http://github.com/sourcefabric
Download link: https://sourceforge.net/projects/campcaster/files/ Download link: https://sourceforge.net/projects/airtime/files/
Developer's wiki: http://wiki.sourcefabric.org Developer's wiki: http://wiki.sourcefabric.org
-------------------------------------------------------------------------
Copyright (c) 2010 Sourcefabric O.P.S.
This file is part of the Campcaster project.
http://campcaster.sourcefabric.org/
To report bugs, send an e-mail to campcaster-support@lists.sourcefabric.org
Campcaster is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
Campcaster is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Campcaster; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-------------------------------------------------------------------------

View File

@ -53,6 +53,8 @@ class Bootstrap extends Zend_Application_Bootstrap_Bootstrap
$view = $this->getResource('view'); $view = $this->getResource('view');
$view->headScript()->appendFile('/js/libs/jquery-1.4.4.min.js','text/javascript'); $view->headScript()->appendFile('/js/libs/jquery-1.4.4.min.js','text/javascript');
$view->headScript()->appendFile('/js/libs/jquery-ui-1.8.7.custom.min.js','text/javascript'); $view->headScript()->appendFile('/js/libs/jquery-ui-1.8.7.custom.min.js','text/javascript');
$view->headScript()->appendFile('/js/playlist/playlist.js','text/javascript');
$view->headScript()->appendFile('/js/progressbar/jquery.progressbar.min.js','text/javascript');
} }
} }

View File

@ -12,9 +12,9 @@ resources.view[] =
resources.db.adapter = "Pdo_Pgsql" resources.db.adapter = "Pdo_Pgsql"
resources.db.params.charset = "utf8" resources.db.params.charset = "utf8"
resources.db.params.host = "localhost" resources.db.params.host = "localhost"
resources.db.params.username = "campcaster" resources.db.params.username = "airtime"
resources.db.params.password = "campcaster" resources.db.params.password = "airtime"
resources.db.params.dbname = "campcaster" resources.db.params.dbname = "airtime"
[staging : production] [staging : production]

View File

@ -8,11 +8,11 @@ global $CC_CONFIG;
$CC_CONFIG = array( $CC_CONFIG = array(
// Database config // Database config
'dsn' => array( 'dsn' => array(
'username' => 'campcaster', 'username' => 'airtime',
'password' => 'campcaster', 'password' => 'airtime',
'hostspec' => 'localhost', 'hostspec' => 'localhost',
'phptype' => 'pgsql', 'phptype' => 'pgsql',
'database' => 'campcaster', 'database' => 'airtime',
), ),
// Name of the web server user // Name of the web server user
@ -173,4 +173,4 @@ set_include_path('.'.PATH_SEPARATOR.$CC_CONFIG['pearPath']
//$CC_DBC->setFetchMode(DB_FETCHMODE_ASSOC); //$CC_DBC->setFetchMode(DB_FETCHMODE_ASSOC);
?> ?>

View File

@ -1,6 +1,6 @@
<?php <?php
// This file generated by Propel 1.5.2 convert-conf target // This file generated by Propel 1.5.2 convert-conf target
// from XML runtime conf file /home/naomiaro/dev-campcaster/campcaster/build/runtime-conf.xml // from XML runtime conf file /home/naomi/dev-campcaster/campcaster/build/runtime-conf.xml
$conf = array ( $conf = array (
'datasources' => 'datasources' =>
array ( array (

View File

@ -2,7 +2,9 @@
class LibraryController extends Zend_Controller_Action class LibraryController extends Zend_Controller_Action
{ {
protected $pl_sess = null; protected $pl_sess = null;
protected $search_sess = null; protected $search_sess = null;
public function init() public function init()
@ -18,6 +20,7 @@ class LibraryController extends Zend_Controller_Action
->addActionContext('upload', 'json') ->addActionContext('upload', 'json')
->addActionContext('delete', 'json') ->addActionContext('delete', 'json')
->addActionContext('context-menu', 'json') ->addActionContext('context-menu', 'json')
->addActionContext('quick-search', 'json')
->initContext(); ->initContext();
$this->pl_sess = new Zend_Session_Namespace(UI_PLAYLIST_SESSNAME); $this->pl_sess = new Zend_Session_Namespace(UI_PLAYLIST_SESSNAME);
@ -26,16 +29,17 @@ class LibraryController extends Zend_Controller_Action
public function indexAction() public function indexAction()
{ {
$this->view->headScript()->appendFile('/js/campcaster/onready/library.js','text/javascript'); $this->view->headScript()->appendFile('/js/airtime/onready/library.js','text/javascript');
$this->view->headScript()->appendFile('/js/contextmenu/jjmenu.js','text/javascript'); $this->view->headScript()->appendFile('/js/contextmenu/jjmenu.js','text/javascript');
$this->view->headLink()->appendStylesheet('/css/contextmenu.css'); $this->view->headLink()->appendStylesheet('/css/contextmenu.css');
$this->_helper->layout->setLayout('library'); $this->_helper->layout->setLayout('library');
unset($this->search_sess->page);
unset($this->search_sess->md); unset($this->search_sess->md);
unset($this->search_sess->order);
$this->_helper->actionStack('contents', 'library'); $this->_helper->actionStack('contents', 'library');
$this->_helper->actionStack('quick-search', 'library');
$this->_helper->actionStack('index', 'sideplaylist'); $this->_helper->actionStack('index', 'sideplaylist');
} }
@ -59,7 +63,7 @@ class LibraryController extends Zend_Controller_Action
} }
$menu[] = array('action' => array('type' => 'gourl', 'url' => '/Library/edit-file-md/id/#id#'), $menu[] = array('action' => array('type' => 'gourl', 'url' => '/Library/edit-file-md/id/#id#'),
'title' => 'Info'); 'title' => 'Edit Metadata');
} }
else if($type === "pl") { else if($type === "pl") {
@ -94,7 +98,7 @@ class LibraryController extends Zend_Controller_Action
public function deleteAction() public function deleteAction()
{ {
$id = $this->_getParam('id'); $id = $this->_getParam('id');
if (!is_null($id)) { if (!is_null($id)) {
$file = StoredFile::Recall($id); $file = StoredFile::Recall($id);
@ -120,17 +124,55 @@ class LibraryController extends Zend_Controller_Action
public function contentsAction() public function contentsAction()
{ {
$this->view->headScript()->appendFile('/js/campcaster/library/library.js','text/javascript'); $this->view->headScript()->appendFile('/js/airtime/library/library.js','text/javascript');
$this->_helper->viewRenderer->setResponseSegment('library'); $this->_helper->viewRenderer->setResponseSegment('library');
$order["category"] = $this->_getParam('ob', "dc:creator"); $cat = $this->_getParam('ob', null);
$order["order"] = $this->_getParam('order', "asc"); $or = $this->_getParam('order', null);
$page = $this->_getParam('page', null);
$this->search_sess->order = $order; if(!is_null($cat) && !is_null($or)) {
$md = isset($this->search_sess->md) ? $this->search_sess->md : array(); $order["category"] = $cat;
$order["order"] = $or;
$this->search_sess->order = $order;
}
else if(isset($this->search_sess->order)){
$order = $this->search_sess->order;
}
else{
$order = null;
}
$this->view->files = StoredFile::searchFiles($md, $order); if (isset($this->search_sess->page)) {
$last_page = $this->search_sess->page;
}
else{
$last_page = null;
}
if(isset($this->search_sess->md)){
$md = $this->search_sess->md;
$quick = false;
}
else if(isset($this->search_sess->quick)) {
$md = $this->search_sess->quick;
$quick = true;
}
else {
$md = array();
$quick = false;
}
$currpage = isset($page) ? $page : $last_page;
$this->search_sess->page = $currpage;
$count = StoredFile::searchFiles($md, $order, true, null, null, $quick);
$paginator = new Zend_Paginator(new Zend_Paginator_Adapter_Null($count));
$paginator->setCurrentPageNumber($currpage);
$this->view->paginator = $paginator;
$this->view->files = StoredFile::searchFiles($md, $order, false, $paginator->getCurrentPageNumber(), $paginator->getItemCountPerPage(), $quick);
} }
public function editFileMdAction() public function editFileMdAction()
@ -156,7 +198,52 @@ class LibraryController extends Zend_Controller_Action
$this->view->form = $form; $this->view->form = $form;
} }
public function quickSearchAction()
{
$this->view->headScript()->appendFile('/js/airtime/library/quicksearch.js','text/javascript');
$this->_helper->viewRenderer->setResponseSegment('quick_search');
$this->view->qs_value = $this->search_sess->quick_string;
$format = $this->_getParam('format', 'layout');
if($format !== 'json')
return;
$search = $this->_getParam('search', null);
$this->search_sess->quick_string = $search;
$categories = array("dc:title", "dc:creator", "dc:source", "ls:type");
$keywords = explode(" ", $search);
$md = array();
for($group_id=1; $group_id <= count($keywords); $group_id++) {
for($row_id=1; $row_id <= count($categories); $row_id++) {
$md["group_".$group_id]["row_".$row_id]["metadata"] = $categories[$row_id-1];
$md["group_".$group_id]["row_".$row_id]["match"] = "0";
$md["group_".$group_id]["row_".$row_id]["search"] = $keywords[$group_id-1];
}
}
$this->search_sess->quick = $md;
$currpage = isset($this->search_sess->page) ? $this->search_sess->page : null;
$order = isset($this->search_sess->order) ? $this->search_sess->order : null;
$count = StoredFile::searchFiles($md, $order, true, null, null, true);
$paginator = new Zend_Paginator(new Zend_Paginator_Adapter_Null($count));
$paginator->setCurrentPageNumber($currpage);
$this->view->paginator = $paginator;
$this->view->files = StoredFile::searchFiles($md, $order, false, $paginator->getCurrentPageNumber(), $paginator->getItemCountPerPage(), true);
$this->view->html = $this->view->render('library/contents.phtml');
unset($this->view->files);
unset($this->view->paginator);
}
} }
@ -173,3 +260,5 @@ class LibraryController extends Zend_Controller_Action

View File

@ -136,7 +136,7 @@ class PlaylistController extends Zend_Controller_Action
public function editAction() public function editAction()
{ {
$this->view->headScript()->appendFile('/js/campcaster/playlist/playlist.js','text/javascript'); $this->view->headScript()->appendFile('/js/airtime/playlist/playlist.js','text/javascript');
$pl_id = $this->_getParam('id', null); $pl_id = $this->_getParam('id', null);
$display = $this->_getParam('view', null); $display = $this->_getParam('view', null);

View File

@ -165,7 +165,7 @@ class PluploadController extends Zend_Controller_Action
$view->headScript()->appendFile('/js/plupload/plupload.full.min.js','text/javascript'); $view->headScript()->appendFile('/js/plupload/plupload.full.min.js','text/javascript');
$view->headScript()->appendFile('/js/plupload/jquery.plupload.queue.min.js','text/javascript'); $view->headScript()->appendFile('/js/plupload/jquery.plupload.queue.min.js','text/javascript');
$view->headScript()->appendFile('/js/campcaster/library/plupload.js','text/javascript'); $view->headScript()->appendFile('/js/airtime/library/plupload.js','text/javascript');
$view->headLink()->appendStylesheet('/css/plupload.queue.css'); $view->headLink()->appendStylesheet('/css/plupload.queue.css');
} }

View File

@ -29,7 +29,7 @@ class ScheduleController extends Zend_Controller_Action
$this->view->headScript()->appendFile('/js/contextmenu/jquery.contextMenu.js','text/javascript'); $this->view->headScript()->appendFile('/js/contextmenu/jquery.contextMenu.js','text/javascript');
$this->view->headScript()->appendFile('/js/qtip/jquery.qtip-1.0.0.min.js','text/javascript'); $this->view->headScript()->appendFile('/js/qtip/jquery.qtip-1.0.0.min.js','text/javascript');
$this->view->headScript()->appendFile('/js/campcaster/schedule/schedule.js','text/javascript'); $this->view->headScript()->appendFile('/js/airtime/schedule/schedule.js','text/javascript');
$this->view->headLink()->appendStylesheet('/css/jquery.contextMenu.css'); $this->view->headLink()->appendStylesheet('/css/jquery.contextMenu.css');
$this->view->headLink()->appendStylesheet('/css/fullcalendar.css'); $this->view->headLink()->appendStylesheet('/css/fullcalendar.css');
@ -177,8 +177,7 @@ class ScheduleController extends Zend_Controller_Action
public function viewPlaylistAction() public function viewPlaylistAction()
{ {
$this->view->headScript()->appendFile('/js/playlist/playlist.js','text/javascript'); //TODO: insert code for datagrid
$this->view->headScript()->appendFile('/js/progressbar/jquery.progressbar.min.js','text/javascript');
} }
public function getCurrentPlaylistAction() public function getCurrentPlaylistAction()

View File

@ -2,23 +2,42 @@
class SearchController extends Zend_Controller_Action class SearchController extends Zend_Controller_Action
{ {
protected $search_sess = null;
protected $form; private function addGroup($group_id) {
protected $search_sess = null;
$form = new Application_Form_AdvancedSearch();
$form->addGroup($group_id, 1);
$group = $form->getSubForm('group_'.$group_id);
return $group->__toString();
}
private function addFieldToGroup($group_id, $row_id) {
$form = new Application_Form_AdvancedSearch();
$form->addGroup($group_id);
$group = $form->getSubForm('group_'.$group_id);
$group->addRow($row_id);
return $group->__toString();
}
public function init() public function init()
{ {
if(!Zend_Auth::getInstance()->hasIdentity()) if(!Zend_Auth::getInstance()->hasIdentity())
{ {
$this->_redirect('login/index'); $this->_redirect('login/index');
} }
$ajaxContext = $this->_helper->getHelper('AjaxContext'); $ajaxContext = $this->_helper->getHelper('AjaxContext');
$ajaxContext->addActionContext('newfield', 'html') $ajaxContext->addActionContext('newfield', 'json')
->addActionContext('display', 'json') ->addActionContext('newgroup', 'json')
->initContext(); ->initContext();
$this->form = new Application_Form_AdvancedSearch();
$this->search_sess = new Zend_Session_Namespace("search"); $this->search_sess = new Zend_Session_Namespace("search");
} }
@ -26,80 +45,82 @@ class SearchController extends Zend_Controller_Action
{ {
$this->_helper->layout->setLayout('search'); $this->_helper->layout->setLayout('search');
$this->view->headScript()->appendFile('/js/campcaster/onready/search.js','text/javascript'); $this->view->headScript()->appendFile('/js/airtime/onready/search.js','text/javascript');
$this->view->headScript()->appendFile('/js/contextmenu/jjmenu.js','text/javascript'); $this->view->headScript()->appendFile('/js/contextmenu/jjmenu.js','text/javascript');
$this->view->headLink()->appendStylesheet('/css/contextmenu.css'); $this->view->headLink()->appendStylesheet('/css/contextmenu.css');
$this->_helper->actionStack('display', 'search');
$this->_helper->actionStack('contents', 'library'); $this->_helper->actionStack('contents', 'library');
$this->_helper->actionStack('display', 'search');
$this->_helper->actionStack('index', 'sideplaylist'); $this->_helper->actionStack('index', 'sideplaylist');
} }
public function displayAction() public function displayAction()
{ {
$this->view->headScript()->appendFile('/js/campcaster/library/advancedsearch.js','text/javascript'); $this->view->headScript()->appendFile('/js/airtime/library/advancedsearch.js','text/javascript');
$this->view->headLink()->appendStylesheet('/css/library_search.css'); $this->view->headLink()->appendStylesheet('/css/library_search.css');
$this->_helper->viewRenderer->setResponseSegment('search'); $this->_helper->viewRenderer->setResponseSegment('search');
$request = $this->getRequest(); $request = $this->getRequest();
$this->form = new Application_Form_AdvancedSearch(); $form = new Application_Form_AdvancedSearch();
$form = $this->form; $this->view->form = $form;
// Form has not been submitted - displayed using layouts // Form has not been submitted - displayed using layouts
if (!$request->isPost()) { if (!$request->isPost()) {
unset($this->search_sess->md); $form->addGroup(1, 1);
unset($this->search_sess->order);
$sub = new Application_Form_AdvancedSearchRow(1); $this->search_sess->next_group = 2;
$form->addSubForm($sub, 'row_1'); $this->search_sess->next_row[1] = 2;
$form->getSubForm('row_1')->removeDecorator('DtDdWrapper');
$this->view->form = $form;
return; return;
} }
// Form has been submitted - run data through preValidation() $this->view->md = $request->getPost();
// Form has been submitted
$form->preValidation($request->getPost()); $form->preValidation($request->getPost());
if (!$form->isValid($request->getPost())) { if (!$form->isValid($request->getPost())) {
$this->view->form = $form->__toString();
return; return;
} }
// form was submitted, send back strings to json response. // valid form was submitted set as search criteria.
$info = $form->getValues(); $this->view->md = $form->getValues();
$this->search_sess->md = $info; $this->search_sess->md = $form->getValues();
$order = isset($this->search_sess->order) ? $this->search_sess->order : NULL;
$this->view->files = StoredFile::searchFiles($info, $order); //make sure to start on first page of new results.
unset($this->search_sess->page);
if (count($this->view->files) > 0) {
$this->view->results = $this->view->render('library/update.phtml');
}
else {
$this->view->results = "<tr>No Results</tr>";
}
unset($this->view->files);
} }
public function newfieldAction() public function newfieldAction()
{ {
$id = $this->_getParam('id', 1); $group_id = $this->_getParam('group', 1);
$row_id = $this->search_sess->next_row[$group_id];
$this->form->addSubForm(new Application_Form_AdvancedSearchRow($id), 'row_'.$id, $id); $this->view->html = $this->addFieldToGroup($group_id, $row_id);
$this->view->row = $row_id;
$this->form->getSubForm('row_'.$id)->removeDecorator('DtDdWrapper'); $this->search_sess->next_row[$group_id] = $row_id + 1;
$e = $this->form->getSubForm('row_'.$id);
$this->view->field = $e->__toString();
} }
public function newgroupAction()
{
$group_id = $this->search_sess->next_group;
$this->view->html = $this->addGroup($group_id);
$this->search_sess->next_group = $group_id + 1;
$this->search_sess->next_row[$group_id] = 2;
}
} }

View File

@ -17,7 +17,7 @@ class SideplaylistController extends Zend_Controller_Action
public function indexAction() public function indexAction()
{ {
$this->view->headScript()->appendFile('/js/campcaster/library/spl.js','text/javascript'); $this->view->headScript()->appendFile('/js/airtime/library/spl.js','text/javascript');
$this->_helper->viewRenderer->setResponseSegment('spl'); $this->_helper->viewRenderer->setResponseSegment('spl');

View File

@ -5,12 +5,34 @@ class Application_Form_AdvancedSearch extends Zend_Form
public function init() public function init()
{ {
$this->addElement('hidden', 'search_next_id', array( // Add the add button
'value' => 2 $this->addElement('button', 'search_add_group', array(
)); 'ignore' => true,
$this->getElement('search_next_id')->removeDecorator('Label')->removeDecorator('HtmlTag'); 'label' => 'Add',
'order' => '-2'
));
$this->getElement('search_add_group')->removeDecorator('DtDdWrapper');
// Add the submit button
$this->addElement('submit', 'search_submit', array(
'ignore' => true,
'label' => 'Submit',
'order' => '-1'
));
$this->getElement('search_submit')->removeDecorator('DtDdWrapper');
} }
public function addGroup($group_id, $row_id=null) {
$this->addSubForm(new Application_Form_AdvancedSearchGroup(), 'group_'.$group_id, $group_id);
$this->getSubForm('group_'.$group_id)->removeDecorator('DtDdWrapper');
if(!is_null($row_id)) {
$subGroup = $this->getSubForm('group_'.$group_id);
$subGroup->addRow($row_id);
}
}
public function preValidation(array $data) { public function preValidation(array $data) {
function findId($name) { function findId($name) {
@ -18,34 +40,26 @@ class Application_Form_AdvancedSearch extends Zend_Form
return $t[1]; return $t[1];
} }
// array_filter callback
function findFields($field) { function findFields($field) {
return strpos($field, 'row') !== false; return strpos($field, 'group') !== false;
} }
$fields = array_filter(array_keys($data), 'findFields'); $groups = array_filter(array_keys($data), 'findFields');
foreach ($fields as $field) { foreach ($groups as $group) {
// use id to set new order
$id = findId($field); $group_id = findId($group);
$this->addNewField($data, $id); $this->addGroup($group_id);
$subGroup = $this->getSubForm($group);
foreach (array_keys($data[$group]) as $row) {
$row_id = findId($row);
$subGroup->addRow($row_id, $data[$group][$row]);
}
} }
} }
public function addNewField($data, $id) {
$sub = new Application_Form_AdvancedSearchRow($id);
$values = array("metadata_".$id => $data["row_".$id]["metadata_".$id],
"match_".$id => $data["row_".$id]["match_".$id],
"search_".$id => $data["row_".$id]["search_".$id]);
$sub->setDefaults($values);
$this->addSubForm($sub, 'row_'.$id, $id);
$this->getSubForm('row_'.$id)->removeDecorator('DtDdWrapper');
}
} }

View File

@ -0,0 +1,29 @@
<?php
class Application_Form_AdvancedSearchGroup extends Zend_Form_SubForm
{
public function init()
{
// Add the add button
$this->addElement('button', 'search_add_row', array(
'ignore' => true,
'label' => 'Add',
'order' => '-2'
));
$this->getElement('search_add_row')->removeDecorator('DtDdWrapper');
}
public function addRow($row_id, $data=null) {
$this->addSubForm(new Application_Form_AdvancedSearchRow(), 'row_'.$row_id, $row_id);
$row = $this->getSubForm('row_'.$row_id);
$row->removeDecorator('DtDdWrapper');
if(!is_null($data)) {
$row->setDefaults($data);
}
}
}

View File

@ -2,22 +2,11 @@
class Application_Form_AdvancedSearchRow extends Zend_Form_SubForm class Application_Form_AdvancedSearchRow extends Zend_Form_SubForm
{ {
protected $_rowid;
public function __construct($id = null)
{
$this->_rowid = $id;
parent::__construct();
}
public function init() public function init()
{ {
$id = $this->_rowid;
$this->addElement( $this->addElement(
'select', 'select',
'metadata_'.$id, 'metadata',
array( array(
'required' => true, 'required' => true,
'multiOptions' => array( 'multiOptions' => array(
@ -50,11 +39,11 @@ class Application_Form_AdvancedSearchRow extends Zend_Form_SubForm
), ),
) )
); );
$this->getElement('metadata_'.$id)->removeDecorator('Label')->removeDecorator('HtmlTag'); $this->getElement('metadata')->removeDecorator('Label')->removeDecorator('HtmlTag');
$this->addElement( $this->addElement(
'select', 'select',
'match_'.$id, 'match',
array( array(
'required' => true, 'required' => true,
'multiOptions' => array( 'multiOptions' => array(
@ -68,12 +57,12 @@ class Application_Form_AdvancedSearchRow extends Zend_Form_SubForm
), ),
) )
); );
$this->getElement('match_'.$id)->removeDecorator('Label')->removeDecorator('HtmlTag'); $this->getElement('match')->removeDecorator('Label')->removeDecorator('HtmlTag');
$this->addElement('text', 'search_'.$id, array( $this->addElement('text', 'search', array(
'required' => true, 'required' => true,
)); ));
$this->getElement('search_'.$id)->removeDecorator('Label')->removeDecorator('HtmlTag'); $this->getElement('search')->removeDecorator('Label')->removeDecorator('HtmlTag');
} }

View File

@ -3,7 +3,7 @@
<html xmlns="http://www.w3.org/1999/xhtml"> <html xmlns="http://www.w3.org/1999/xhtml">
<head> <head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Campcaster</title> <title>Airtime</title>
<?php echo $this->headScript() ?> <?php echo $this->headScript() ?>
<?php echo $this->headLink() ?> <?php echo $this->headLink() ?>
</head> </head>
@ -11,7 +11,17 @@
<div id="nav"><?php echo $this->navigation()->menu()->setRenderInvisible(true) ?></div> <div id="nav"><?php echo $this->navigation()->menu()->setRenderInvisible(true) ?></div>
<div id="content"><?php echo $this->layout()->content ?></div> <div id="content" style="height: auto"><?php echo $this->layout()->content ?></div>
<div style="z-index: 1; position: absolute; width: 100%; left: 0px; right: 0px; bottom: 0px; color: black; min-height: 100px; background-color: #cc3300;">
<div style="float:left; width: 15%; height: 100%;">&nbsp;</div>
<div style="float:left; width: 25%; height: 100%;"><div>Show:</div><div>Playlist:</div><div>Host:</div></div>
<div style="float:left; width: 30%; height: 100%;"><div>Previous:</div><div>Current:</div><div>Upcoming:</div></div>
<div style="float:left; width: 30%; height: 100%;" id="list0" ></div>
</div>
<script>
$(document).ready(function() {
$("#list0").playlistViewer();
});
</script>
</body> </body>
</html> </html>

View File

@ -3,7 +3,7 @@
<html xmlns="http://www.w3.org/1999/xhtml"> <html xmlns="http://www.w3.org/1999/xhtml">
<head> <head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Campcaster</title> <title>Airtime</title>
<?php echo $this->headScript() ?> <?php echo $this->headScript() ?>
<?php echo $this->headLink() ?> <?php echo $this->headLink() ?>
</head> </head>
@ -11,6 +11,7 @@
<div id="nav"><?php echo $this->navigation()->menu()->setRenderInvisible(true) ?></div> <div id="nav"><?php echo $this->navigation()->menu()->setRenderInvisible(true) ?></div>
<div id="library_quick_search"><?php echo $this->layout()->quick_search ?></div>
<div id="library_content"><?php echo $this->layout()->library ?></div> <div id="library_content"><?php echo $this->layout()->library ?></div>
<div id="side_playlist"><?php echo $this->layout()->spl ?></div> <div id="side_playlist"><?php echo $this->layout()->spl ?></div>

View File

@ -3,7 +3,7 @@
<html xmlns="http://www.w3.org/1999/xhtml"> <html xmlns="http://www.w3.org/1999/xhtml">
<head> <head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Campcaster</title> <title>Airtime</title>
<?php echo $this->headScript() ?> <?php echo $this->headScript() ?>
<?php echo $this->headLink() ?> <?php echo $this->headLink() ?>
</head> </head>

View File

@ -3,7 +3,7 @@
<html xmlns="http://www.w3.org/1999/xhtml"> <html xmlns="http://www.w3.org/1999/xhtml">
<head> <head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Campcaster</title> <title>Airtime</title>
<?php echo $this->headScript() ?> <?php echo $this->headScript() ?>
<?php echo $this->headLink() ?> <?php echo $this->headLink() ?>
</head> </head>

View File

@ -5,7 +5,7 @@
* Handles recursive accessPlaylist/releasePlaylist. * Handles recursive accessPlaylist/releasePlaylist.
* Should be 'required_once' from LocStor.php only. * Should be 'required_once' from LocStor.php only.
* *
* @package Campcaster * @package Airtime
* @subpackage StorageServer * @subpackage StorageServer
* @copyright 2010 Sourcefabric O.P.S. * @copyright 2010 Sourcefabric O.P.S.
* @license http://www.gnu.org/licenses/gpl.txt * @license http://www.gnu.org/licenses/gpl.txt
@ -181,4 +181,4 @@ class AccessRecur {
} }
} // class AccessRecur } // class AccessRecur
?> ?>

View File

@ -8,7 +8,7 @@ define('ALIBERR_NOTEXISTS', 31);
/** /**
* Authentication/authorization class * Authentication/authorization class
* *
* @package Campcaster * @package Airtime
* @subpackage Alib * @subpackage Alib
* @copyright 2010 Sourcefabric O.P.S. * @copyright 2010 Sourcefabric O.P.S.
* @license http://www.gnu.org/licenses/gpl.txt * @license http://www.gnu.org/licenses/gpl.txt
@ -619,4 +619,4 @@ class Alib {
} // fn test } // fn test
} // class Alib } // class Alib
?> ?>

View File

@ -3,7 +3,7 @@ define('BACKUP_EXT', 'tar');
define('ACCESS_TYPE', 'backup'); define('ACCESS_TYPE', 'backup');
/** /**
* @package Campcaster * @package Airtime
* @subpackage StorageServer * @subpackage StorageServer
* @copyright 2010 Sourcefabric O.P.S. * @copyright 2010 Sourcefabric O.P.S.
* @license http://www.gnu.org/licenses/gpl.txt * @license http://www.gnu.org/licenses/gpl.txt

View File

@ -106,9 +106,9 @@ require_once(dirname(__FILE__)."/Playlist.php");
// "dc:language" => "language"); // "dc:language" => "language");
/** /**
* Core of Campcaster file storage module * Core of Airtime file storage module
* *
* @package Campcaster * @package Airtime
* @subpackage StorageServer * @subpackage StorageServer
* @copyright 2010 Sourcefabric O.P.S. * @copyright 2010 Sourcefabric O.P.S.
* @license http://www.gnu.org/licenses/gpl.txt * @license http://www.gnu.org/licenses/gpl.txt
@ -1494,7 +1494,7 @@ class BasicStor {
* @param string $plid * @param string $plid
* Playlist gunid * Playlist gunid
* @param string $aPath * @param string $aPath
* Absolute path part of imported file (e.g. /home/user/campcaster) * Absolute path part of imported file (e.g. /home/user/airtime)
* @param string $rPath * @param string $rPath
* Relative path/filename part of imported file (e.g. playlists/playlist_1.smil) * Relative path/filename part of imported file (e.g. playlists/playlist_1.smil)
* @param string $ext * @param string $ext
@ -2183,4 +2183,4 @@ class BasicStor {
} }
} // class BasicStor } // class BasicStor
?> ?>

View File

@ -18,7 +18,7 @@ require_once("Transport.php");
* *
* File storage module. * File storage module.
* *
* @package Campcaster * @package Airtime
* @subpackage StorageServer * @subpackage StorageServer
* @copyright 2010 Sourcefabric O.P.S. * @copyright 2010 Sourcefabric O.P.S.
* @license http://www.gnu.org/licenses/gpl.txt * @license http://www.gnu.org/licenses/gpl.txt
@ -1723,4 +1723,4 @@ class GreenBox extends BasicStor {
} // fn removePerm } // fn removePerm
} // class GreenBox } // class GreenBox
?> ?>

View File

@ -16,7 +16,7 @@ if (isset($WHITE_SCREEN_OF_DEATH) && $WHITE_SCREEN_OF_DEATH) {
* *
* Local storage interface * Local storage interface
* *
* @package Campcaster * @package Airtime
* @subpackage StorageServer * @subpackage StorageServer
* @copyright 2010 Sourcefabric O.P.S. * @copyright 2010 Sourcefabric O.P.S.
* @license http://www.gnu.org/licenses/gpl.txt * @license http://www.gnu.org/licenses/gpl.txt
@ -1362,7 +1362,7 @@ class LocStor extends BasicStor {
/*===================================================== auxiliary methods */ /*===================================================== auxiliary methods */
/** /**
* Dummy method - only returns Campcaster version * Dummy method - only returns Airtime version
* *
* @return string * @return string
*/ */
@ -1746,4 +1746,4 @@ class LocStor extends BasicStor {
/* ==================================================== auxiliary methods */ /* ==================================================== auxiliary methods */
} // class LocStor } // class LocStor
?> ?>

View File

@ -4,7 +4,7 @@ define('INDCH', ' ');
/** /**
* M3uPlaylist class * M3uPlaylist class
* *
* @package Campcaster * @package Airtime
* @subpackage StorageServer * @subpackage StorageServer
* @copyright 2010 Sourcefabric O.P.S. * @copyright 2010 Sourcefabric O.P.S.
* @license http://www.gnu.org/licenses/gpl.txt * @license http://www.gnu.org/licenses/gpl.txt
@ -59,7 +59,7 @@ class M3uPlaylist {
* *
* @param GreenBox $gb * @param GreenBox $gb
* @param string $aPath * @param string $aPath
* absolute path part of imported file (e.g. /home/user/campcaster) * absolute path part of imported file (e.g. /home/user/airtime)
* @param string $rPath * @param string $rPath
* relative path/filename part of imported file * relative path/filename part of imported file
* (e.g. playlists/playlist_1.smil) * (e.g. playlists/playlist_1.smil)
@ -141,7 +141,7 @@ class M3uPlaylist {
* @param string $data * @param string $data
* local path to M3U file * local path to M3U file
* @return string * @return string
* XML playlist in Campcaster playlist format * XML playlist in Airtime playlist format
*/ */
function convert2lspl(&$gb, $data) function convert2lspl(&$gb, $data)
{ {
@ -196,7 +196,7 @@ class M3uPlaylist {
/** /**
* @package Campcaster * @package Airtime
* @subpackage StorageServer * @subpackage StorageServer
* @copyright 2010 Sourcefabric O.P.S. * @copyright 2010 Sourcefabric O.P.S.
* @license http://www.gnu.org/licenses/gpl.txt * @license http://www.gnu.org/licenses/gpl.txt
@ -231,7 +231,7 @@ class M3uPlaylistBodyElement {
/** /**
* @package Campcaster * @package Airtime
* @subpackage StorageServer * @subpackage StorageServer
* @copyright 2010 Sourcefabric O.P.S. * @copyright 2010 Sourcefabric O.P.S.
* @license http://www.gnu.org/licenses/gpl.txt * @license http://www.gnu.org/licenses/gpl.txt
@ -257,7 +257,7 @@ class M3uPlaylistParElement {
/** /**
* @package Campcaster * @package Airtime
* @subpackage StorageServer * @subpackage StorageServer
* @copyright 2010 Sourcefabric O.P.S. * @copyright 2010 Sourcefabric O.P.S.
* @license http://www.gnu.org/licenses/gpl.txt * @license http://www.gnu.org/licenses/gpl.txt
@ -313,7 +313,7 @@ class M3uPlaylistAudioElement {
/** /**
* @package Campcaster * @package Airtime
* @subpackage StorageServer * @subpackage StorageServer
* @copyright 2010 Sourcefabric O.P.S. * @copyright 2010 Sourcefabric O.P.S.
* @license http://www.gnu.org/licenses/gpl.txt * @license http://www.gnu.org/licenses/gpl.txt
@ -349,4 +349,4 @@ class M3uPlaylistAnimateElement {
} }
} }
?> ?>

View File

@ -7,7 +7,7 @@ define('INDCH', ' ');
* *
* remark: dcterms:extent format: hh:mm:ss.ssssss * remark: dcterms:extent format: hh:mm:ss.ssssss
* *
* @package Campcaster * @package Airtime
* @subpackage StorageServer * @subpackage StorageServer
* @copyright 2010 Sourcefabric O.P.S. * @copyright 2010 Sourcefabric O.P.S.
* @license http://www.gnu.org/licenses/gpl.txt * @license http://www.gnu.org/licenses/gpl.txt
@ -155,8 +155,7 @@ class Playlist {
{ {
$con = Propel::getConnection("campcaster"); $con = Propel::getConnection("campcaster");
$sql = "SELECT * FROM cc_playlist LEFT JOIN cc_playlisttimes USING(id) WHERE length <= '{$p_length}' "; $sql = "SELECT * FROM cc_playlist LEFT JOIN cc_playlisttimes USING(id) WHERE length <= '{$p_length}' AND state != 'edited' ";
//AND state != 'edited'
$r = $con->query($sql); $r = $con->query($sql);
return $r->fetchAll(); return $r->fetchAll();
@ -905,7 +904,7 @@ class Playlist {
} // class Playlist } // class Playlist
/** /**
* @package Campcaster * @package Airtime
* @subpackage StorageServer * @subpackage StorageServer
* @copyright 2010 Sourcefabric O.P.S. * @copyright 2010 Sourcefabric O.P.S.
* @license http://www.gnu.org/licenses/gpl.txt * @license http://www.gnu.org/licenses/gpl.txt
@ -1015,7 +1014,7 @@ class PlaylistTagExport
/** /**
* @package Campcaster * @package Airtime
* @subpackage StorageServer * @subpackage StorageServer
* @copyright 2010 Sourcefabric O.P.S. * @copyright 2010 Sourcefabric O.P.S.
* @license http://www.gnu.org/licenses/gpl.txt * @license http://www.gnu.org/licenses/gpl.txt
@ -1196,7 +1195,7 @@ class PlaylistElementExport {
/** /**
* @package Campcaster * @package Airtime
* @subpackage StorageServer * @subpackage StorageServer
* @copyright 2010 Sourcefabric O.P.S. * @copyright 2010 Sourcefabric O.P.S.
* @license http://www.gnu.org/licenses/gpl.txt * @license http://www.gnu.org/licenses/gpl.txt
@ -1270,7 +1269,7 @@ class PlaylistAudioClipExport
/** /**
* @package Campcaster * @package Airtime
* @subpackage StorageServer * @subpackage StorageServer
* @copyright 2010 Sourcefabric O.P.S. * @copyright 2010 Sourcefabric O.P.S.
* @license http://www.gnu.org/licenses/gpl.txt * @license http://www.gnu.org/licenses/gpl.txt
@ -1304,7 +1303,7 @@ class PlaylistFadeInfoExport
/** /**
* @package Campcaster * @package Airtime
* @subpackage StorageServer * @subpackage StorageServer
* @copyright 2010 Sourcefabric O.P.S. * @copyright 2010 Sourcefabric O.P.S.
* @license http://www.gnu.org/licenses/gpl.txt * @license http://www.gnu.org/licenses/gpl.txt

View File

@ -5,7 +5,7 @@ require_once("GreenBox.php");
/** /**
* Preference storage class. * Preference storage class.
* *
* @package Campcaster * @package Airtime
* @subpackage StorageServer * @subpackage StorageServer
* @copyright 2010 Sourcefabric O.P.S. * @copyright 2010 Sourcefabric O.P.S.
* @license http://www.gnu.org/licenses/gpl.txt * @license http://www.gnu.org/licenses/gpl.txt
@ -439,4 +439,4 @@ class Prefs {
} }
} // class Prefs } // class Prefs
?> ?>

View File

@ -8,7 +8,7 @@ require_once("Playlist.php");
* *
* Playlist to file rendering - PHP layer, caller to the renderer executable * Playlist to file rendering - PHP layer, caller to the renderer executable
* *
* @package Campcaster * @package Airtime
* @subpackage StorageServer * @subpackage StorageServer
* @copyright 2010 Sourcefabric O.P.S. * @copyright 2010 Sourcefabric O.P.S.
* @license http://www.gnu.org/licenses/gpl.txt * @license http://www.gnu.org/licenses/gpl.txt
@ -287,4 +287,4 @@ class Renderer
} // class Renderer } // class Renderer
?> ?>

View File

@ -1,7 +1,7 @@
<?php <?php
/** /**
* @package Campcaster * @package Airtime
* @subpackage StorageServer * @subpackage StorageServer
* @copyright 2010 Sourcefabric O.P.S. * @copyright 2010 Sourcefabric O.P.S.
* @license http://www.gnu.org/licenses/gpl.txt * @license http://www.gnu.org/licenses/gpl.txt

View File

@ -6,7 +6,7 @@ require_once("XmlParser.php");
/** /**
* SmilPlaylist class * SmilPlaylist class
* *
* @package Campcaster * @package Airtime
* @subpackage StorageServer * @subpackage StorageServer
* @copyright 2010 Sourcefabric O.P.S. * @copyright 2010 Sourcefabric O.P.S.
* @license http://www.gnu.org/licenses/gpl.txt * @license http://www.gnu.org/licenses/gpl.txt
@ -35,7 +35,7 @@ class SmilPlaylist {
* @param GreenBox $gb * @param GreenBox $gb
* reference to GreenBox object * reference to GreenBox object
* @param string $aPath * @param string $aPath
* absolute path part of imported file (e.g. /home/user/campcaster) * absolute path part of imported file (e.g. /home/user/airtime)
* @param string $rPath * @param string $rPath
* relative path/filename part of imported file * relative path/filename part of imported file
* (e.g. playlists/playlist_1.smil) * (e.g. playlists/playlist_1.smil)
@ -92,7 +92,7 @@ class SmilPlaylist {
* @param array $parr * @param array $parr
* array of subjid, aPath, plid, rPath * array of subjid, aPath, plid, rPath
* @return string * @return string
* XML of playlist in Campcaster playlist format * XML of playlist in Airtime playlist format
*/ */
public static function convert2lspl(&$gb, $data, &$gunids, $parr) public static function convert2lspl(&$gb, $data, &$gunids, $parr)
{ {
@ -119,7 +119,7 @@ class SmilPlaylist {
/** /**
* @package Campcaster * @package Airtime
* @subpackage StorageServer * @subpackage StorageServer
* @copyright 2010 Sourcefabric O.P.S. * @copyright 2010 Sourcefabric O.P.S.
* @license http://www.gnu.org/licenses/gpl.txt * @license http://www.gnu.org/licenses/gpl.txt
@ -158,7 +158,7 @@ class SmilPlaylistBodyElement {
/** /**
* @package Campcaster * @package Airtime
* @subpackage StorageServer * @subpackage StorageServer
* @copyright 2010 Sourcefabric O.P.S. * @copyright 2010 Sourcefabric O.P.S.
* @license http://www.gnu.org/licenses/gpl.txt * @license http://www.gnu.org/licenses/gpl.txt
@ -186,7 +186,7 @@ class SmilPlaylistParElement {
/** /**
* @package Campcaster * @package Airtime
* @subpackage StorageServer * @subpackage StorageServer
* @copyright 2010 Sourcefabric O.P.S. * @copyright 2010 Sourcefabric O.P.S.
* @license http://www.gnu.org/licenses/gpl.txt * @license http://www.gnu.org/licenses/gpl.txt
@ -271,7 +271,7 @@ class SmilPlaylistAudioElement {
/** /**
* @package Campcaster * @package Airtime
* @subpackage StorageServer * @subpackage StorageServer
* @copyright 2010 Sourcefabric O.P.S. * @copyright 2010 Sourcefabric O.P.S.
* @license http://www.gnu.org/licenses/gpl.txt * @license http://www.gnu.org/licenses/gpl.txt
@ -310,4 +310,4 @@ class SmilPlaylistAnimateElement {
} }
} // class SmilPlaylistAnimateElement } // class SmilPlaylistAnimateElement
?> ?>

View File

@ -6,6 +6,7 @@ require_once("Schedule.php");
global $g_metadata_xml_to_db_mapping; global $g_metadata_xml_to_db_mapping;
$g_metadata_xml_to_db_mapping = array( $g_metadata_xml_to_db_mapping = array(
"ls:type" => "ftype",
"dc:format" => "format", "dc:format" => "format",
"ls:bitrate" => "bit_rate", "ls:bitrate" => "bit_rate",
"ls:samplerate" => "sample_rate", "ls:samplerate" => "sample_rate",
@ -312,14 +313,14 @@ function camp_get_audio_metadata($p_filename, $p_testonly = false)
/** /**
* StoredFile class * StoredFile class
* *
* Campcaster file storage support class.<br> * Airtime file storage support class.<br>
* Represents one virtual file in storage. Virtual file has up to two parts: * Represents one virtual file in storage. Virtual file has up to two parts:
* <ul> * <ul>
* <li>metadata in database - represented by MetaData class</li> * <li>metadata in database - represented by MetaData class</li>
* <li>binary media data in real file</li> * <li>binary media data in real file</li>
* </ul> * </ul>
* *
* @package Campcaster * @package Airtime
* @subpackage StorageServer * @subpackage StorageServer
* @copyright 2010 Sourcefabric O.P.S. * @copyright 2010 Sourcefabric O.P.S.
* @license http://www.gnu.org/licenses/gpl.txt * @license http://www.gnu.org/licenses/gpl.txt
@ -1741,7 +1742,7 @@ class StoredFile {
return $CC_CONFIG['accessDir']."/$p_token.$p_ext"; return $CC_CONFIG['accessDir']."/$p_token.$p_ext";
} }
public static function searchFiles($md, $order=NULL) public static function searchFiles($md, $order=NULL, $count=false, $page=null, $limit=null, $quick=false)
{ {
global $CC_CONFIG, $CC_DBC, $g_metadata_xml_to_db_mapping; global $CC_CONFIG, $CC_DBC, $g_metadata_xml_to_db_mapping;
@ -1755,9 +1756,6 @@ class StoredFile {
"6" => "!=", "6" => "!=",
); );
//$sql = "SELECT * FROM ".$CC_CONFIG['filesTable'];
$plSelect = "SELECT "; $plSelect = "SELECT ";
$fileSelect = "SELECT "; $fileSelect = "SELECT ";
$_SESSION["br"] = ""; $_SESSION["br"] = "";
@ -1766,6 +1764,10 @@ class StoredFile {
if($key === "dc:title"){ if($key === "dc:title"){
$plSelect .= "name AS ".$val.", "; $plSelect .= "name AS ".$val.", ";
$fileSelect .= $val.", "; $fileSelect .= $val.", ";
}
else if ($key === "ls:type"){
$plSelect .= "'playlist' AS ".$val.", ";
$fileSelect .= $val.", ";
} }
else if ($key === "dc:creator"){ else if ($key === "dc:creator"){
$plSelect .= "creator AS ".$val.", "; $plSelect .= "creator AS ".$val.", ";
@ -1785,45 +1787,79 @@ class StoredFile {
} }
} }
$sql = "SELECT * FROM ((".$plSelect."PL.id, 'playlist' AS ftype if($count) {
$selector = "SELECT COUNT(*)";
}
else {
$selector = "SELECT *";
}
$from = " FROM ((".$plSelect."PL.id
FROM ".$CC_CONFIG["playListTable"]." AS PL FROM ".$CC_CONFIG["playListTable"]." AS PL
LEFT JOIN ".$CC_CONFIG['playListTimeView']." PLT ON PL.id = PLT.id) LEFT JOIN ".$CC_CONFIG['playListTimeView']." PLT ON PL.id = PLT.id)
UNION UNION
(".$fileSelect."id, ftype FROM ".$CC_CONFIG["filesTable"]." AS FILES)) AS RESULTS "; (".$fileSelect."id FROM ".$CC_CONFIG["filesTable"]." AS FILES)) AS RESULTS ";
$cond = array(); $sql = $selector." ".$from;
foreach(array_keys($md) as $key) {
if(strpos($key, 'row') !== false){
$t = explode("_", $key);
$row_num = $t[1];
$string = $g_metadata_xml_to_db_mapping[$md[$key]["metadata_".$row_num]]; $or_cond = array();
$inner = $quick ? 'OR':'AND';
$outer = $quick ? 'AND':'OR';
foreach (array_keys($md) as $group) {
$string = $string ." ".$match[$md[$key]["match_".$row_num]]; if(strpos($group, 'group') === false) {
continue;
}
if ($md[$key]["match_".$row_num] === "0") $and_cond = array();
$string = $string." '%". $md[$key]["search_".$row_num]."%'"; foreach (array_keys($md[$group]) as $row) {
$string = $g_metadata_xml_to_db_mapping[$md[$group][$row]["metadata"]];
$string = $string ." ".$match[$md[$group][$row]["match"]];
if ($md[$group][$row]["match"] === "0")
$string = $string." '%". $md[$group][$row]["search"]."%'";
else else
$string = $string." '". $md[$key]["search_".$row_num]."'"; $string = $string." '". $md[$group][$row]["search"]."'";
$cond[] = $string; $and_cond[] = $string;
}
if(count($and_cond) > 0) {
$or_cond[] = "(".join(" ".$inner." ", $and_cond).")";
} }
} }
if(count($cond) > 0) { if(count($or_cond) > 0) {
$where = " WHERE ". join(" AND ", $cond); $where = " WHERE ". join(" ".$outer." ", $or_cond);
$sql = $sql . $where; $sql = $sql . $where;
} }
if(!is_null($order)) { if($count) {
$ob = " ORDER BY ".$g_metadata_xml_to_db_mapping[$order["category"]]; return $CC_DBC->getOne($sql);
$sql = $sql . $ob . " " .$order["order"];
} }
if(!is_null($order)) {
$ob = " ORDER BY ".$g_metadata_xml_to_db_mapping[$order["category"]]." ".$order["order"].", id ";
$sql = $sql . $ob;
}
else{
$ob = " ORDER BY artist_name asc, id";
$sql = $sql . $ob;
}
if(!is_null($page) && !is_null($limit)) {
$offset = $page * $limit - ($limit);
$paginate = " LIMIT ".$limit. " OFFSET " .$offset;
$sql = $sql . $paginate;
}
//echo var_dump($md);
//echo $sql; //echo $sql;
return $CC_DBC->getAll($sql); return $CC_DBC->getAll($sql);
} }
} }

View File

@ -9,7 +9,7 @@ define('ALIBERR_BADSMEMB', 21);
* with "linearized recursive membership" ;) * with "linearized recursive membership" ;)
* (allow adding users to groups or groups to groups) * (allow adding users to groups or groups to groups)
* *
* @package Campcaster * @package Airtime
* @subpackage Alib * @subpackage Alib
* @copyright 2010 Sourcefabric O.P.S. * @copyright 2010 Sourcefabric O.P.S.
* @license http://www.gnu.org/licenses/gpl.txt * @license http://www.gnu.org/licenses/gpl.txt
@ -680,4 +680,4 @@ class Subjects {
} // fn test } // fn test
} // class Subjects } // class Subjects
?> ?>

View File

@ -38,7 +38,7 @@ include_once("TransportRecord.php");
* <li>file</li> * <li>file</li>
* </ul> * </ul>
* *
* @package Campcaster * @package Airtime
* @subpackage StorageServer * @subpackage StorageServer
* @copyright 2010 Sourcefabric O.P.S. * @copyright 2010 Sourcefabric O.P.S.
* @license http://www.gnu.org/licenses/gpl.txt * @license http://www.gnu.org/licenses/gpl.txt
@ -401,7 +401,7 @@ class Transport
/* ------------------------------------------------ remote-search methods */ /* ------------------------------------------------ remote-search methods */
/** /**
* Start search job on remote Campcaster instance. * Start search job on remote Airtime instance.
* *
* @param array $criteria * @param array $criteria
* LS criteria format (see localSearch) * LS criteria format (see localSearch)
@ -1636,7 +1636,7 @@ class Transport
/** /**
* Ping to remote Campcaster server * Ping to remote Airtime server
* *
* @return string * @return string
* network hub response or error object * network hub response or error object

View File

@ -5,7 +5,7 @@ define('TR_LEAVE_CLOSED', TRUE);
/** /**
* Auxiliary class for transport records * Auxiliary class for transport records
* *
* @package Campcaster * @package Airtime
* @subpackage StorageServer * @subpackage StorageServer
* @copyright 2010 Sourcefabric O.P.S. * @copyright 2010 Sourcefabric O.P.S.
* @license http://www.gnu.org/licenses/gpl.txt * @license http://www.gnu.org/licenses/gpl.txt
@ -416,4 +416,4 @@ class TransportRecord
} }
} // class TransportRecord } // class TransportRecord
?> ?>

View File

@ -23,7 +23,7 @@ define('VAL_PREDXML', 121);
* </ul> * </ul>
* It probably should be replaced by XML schema validation in the future. * It probably should be replaced by XML schema validation in the future.
* *
* @package Campcaster * @package Airtime
* @subpackage StorageServer * @subpackage StorageServer
* @copyright 2010 Sourcefabric O.P.S. * @copyright 2010 Sourcefabric O.P.S.
* @license http://www.gnu.org/licenses/gpl.txt * @license http://www.gnu.org/licenses/gpl.txt
@ -382,4 +382,4 @@ class Validator {
} // class Validator } // class Validator
?> ?>

View File

@ -1,6 +1,6 @@
<?php <?php
/** /**
* @package Campcaster * @package Airtime
* @subpackage StorageServer * @subpackage StorageServer
*/ */
require_once "XML/Util.php"; require_once "XML/Util.php";
@ -10,7 +10,7 @@ require_once "XML/Util.php";
/** /**
* Object representation of one XML element * Object representation of one XML element
* *
* @package Campcaster * @package Airtime
* @subpackage StorageServer * @subpackage StorageServer
* @copyright 2010 Sourcefabric O.P.S. * @copyright 2010 Sourcefabric O.P.S.
* @license http://www.gnu.org/licenses/gpl.txt * @license http://www.gnu.org/licenses/gpl.txt
@ -80,7 +80,7 @@ class XmlElement {
/** /**
* Object representation of one XML attribute * Object representation of one XML attribute
* *
* @package Campcaster * @package Airtime
* @subpackage StorageServer * @subpackage StorageServer
* @copyright 2010 Sourcefabric O.P.S. * @copyright 2010 Sourcefabric O.P.S.
* @license http://www.gnu.org/licenses/gpl.txt * @license http://www.gnu.org/licenses/gpl.txt
@ -126,7 +126,7 @@ class XmlAttrib {
/** /**
* XML parser object encapsulation * XML parser object encapsulation
* *
* @package Campcaster * @package Airtime
* @subpackage StorageServer * @subpackage StorageServer
* @copyright 2010 Sourcefabric O.P.S. * @copyright 2010 Sourcefabric O.P.S.
* @license http://www.gnu.org/licenses/gpl.txt * @license http://www.gnu.org/licenses/gpl.txt
@ -395,4 +395,4 @@ class XmlParser {
} }
} }
?> ?>

View File

@ -40,6 +40,8 @@ class CcShowScheduleTableMap extends TableMap {
// columns // columns
$this->addPrimaryKey('ID', 'DbId', 'INTEGER', true, null, null); $this->addPrimaryKey('ID', 'DbId', 'INTEGER', true, null, null);
$this->addForeignKey('SHOW_ID', 'DbShowId', 'INTEGER', 'cc_show', 'ID', true, null, null); $this->addForeignKey('SHOW_ID', 'DbShowId', 'INTEGER', 'cc_show', 'ID', true, null, null);
$this->addColumn('SHOW_DAY', 'DbShowDay', 'DATE', true, null, null);
$this->addColumn('POSITION', 'DbPosition', 'INTEGER', false, null, null);
$this->addColumn('GROUP_ID', 'DbGroupId', 'INTEGER', true, null, null); $this->addColumn('GROUP_ID', 'DbGroupId', 'INTEGER', true, null, null);
// validators // validators
} // initialize() } // initialize()

View File

@ -36,6 +36,18 @@ abstract class BaseCcShowSchedule extends BaseObject implements Persistent
*/ */
protected $show_id; protected $show_id;
/**
* The value for the show_day field.
* @var string
*/
protected $show_day;
/**
* The value for the position field.
* @var int
*/
protected $position;
/** /**
* The value for the group_id field. * The value for the group_id field.
* @var int * @var int
@ -81,6 +93,49 @@ abstract class BaseCcShowSchedule extends BaseObject implements Persistent
return $this->show_id; return $this->show_id;
} }
/**
* Get the [optionally formatted] temporal [show_day] column value.
*
*
* @param string $format The date/time format string (either date()-style or strftime()-style).
* If format is NULL, then the raw DateTime object will be returned.
* @return mixed Formatted date/time value as string or DateTime object (if format is NULL), NULL if column is NULL
* @throws PropelException - if unable to parse/validate the date/time value.
*/
public function getDbShowDay($format = '%x')
{
if ($this->show_day === null) {
return null;
}
try {
$dt = new DateTime($this->show_day);
} catch (Exception $x) {
throw new PropelException("Internally stored date/time/timestamp value could not be converted to DateTime: " . var_export($this->show_day, true), $x);
}
if ($format === null) {
// Because propel.useDateTimeClass is TRUE, we return a DateTime object.
return $dt;
} elseif (strpos($format, '%') !== false) {
return strftime($format, $dt->format('U'));
} else {
return $dt->format($format);
}
}
/**
* Get the [position] column value.
*
* @return int
*/
public function getDbPosition()
{
return $this->position;
}
/** /**
* Get the [group_id] column value. * Get the [group_id] column value.
* *
@ -135,6 +190,75 @@ abstract class BaseCcShowSchedule extends BaseObject implements Persistent
return $this; return $this;
} // setDbShowId() } // setDbShowId()
/**
* Sets the value of [show_day] column to a normalized version of the date/time value specified.
*
* @param mixed $v string, integer (timestamp), or DateTime value. Empty string will
* be treated as NULL for temporal objects.
* @return CcShowSchedule The current object (for fluent API support)
*/
public function setDbShowDay($v)
{
// we treat '' as NULL for temporal objects because DateTime('') == DateTime('now')
// -- which is unexpected, to say the least.
if ($v === null || $v === '') {
$dt = null;
} elseif ($v instanceof DateTime) {
$dt = $v;
} else {
// some string/numeric value passed; we normalize that so that we can
// validate it.
try {
if (is_numeric($v)) { // if it's a unix timestamp
$dt = new DateTime('@'.$v, new DateTimeZone('UTC'));
// We have to explicitly specify and then change the time zone because of a
// DateTime bug: http://bugs.php.net/bug.php?id=43003
$dt->setTimeZone(new DateTimeZone(date_default_timezone_get()));
} else {
$dt = new DateTime($v);
}
} catch (Exception $x) {
throw new PropelException('Error parsing date/time value: ' . var_export($v, true), $x);
}
}
if ( $this->show_day !== null || $dt !== null ) {
// (nested ifs are a little easier to read in this case)
$currNorm = ($this->show_day !== null && $tmpDt = new DateTime($this->show_day)) ? $tmpDt->format('Y-m-d') : null;
$newNorm = ($dt !== null) ? $dt->format('Y-m-d') : null;
if ( ($currNorm !== $newNorm) // normalized values don't match
)
{
$this->show_day = ($dt ? $dt->format('Y-m-d') : null);
$this->modifiedColumns[] = CcShowSchedulePeer::SHOW_DAY;
}
} // if either are not null
return $this;
} // setDbShowDay()
/**
* Set the value of [position] column.
*
* @param int $v new value
* @return CcShowSchedule The current object (for fluent API support)
*/
public function setDbPosition($v)
{
if ($v !== null) {
$v = (int) $v;
}
if ($this->position !== $v) {
$this->position = $v;
$this->modifiedColumns[] = CcShowSchedulePeer::POSITION;
}
return $this;
} // setDbPosition()
/** /**
* Set the value of [group_id] column. * Set the value of [group_id] column.
* *
@ -189,7 +313,9 @@ abstract class BaseCcShowSchedule extends BaseObject implements Persistent
$this->id = ($row[$startcol + 0] !== null) ? (int) $row[$startcol + 0] : null; $this->id = ($row[$startcol + 0] !== null) ? (int) $row[$startcol + 0] : null;
$this->show_id = ($row[$startcol + 1] !== null) ? (int) $row[$startcol + 1] : null; $this->show_id = ($row[$startcol + 1] !== null) ? (int) $row[$startcol + 1] : null;
$this->group_id = ($row[$startcol + 2] !== null) ? (int) $row[$startcol + 2] : null; $this->show_day = ($row[$startcol + 2] !== null) ? (string) $row[$startcol + 2] : null;
$this->position = ($row[$startcol + 3] !== null) ? (int) $row[$startcol + 3] : null;
$this->group_id = ($row[$startcol + 4] !== null) ? (int) $row[$startcol + 4] : null;
$this->resetModified(); $this->resetModified();
$this->setNew(false); $this->setNew(false);
@ -198,7 +324,7 @@ abstract class BaseCcShowSchedule extends BaseObject implements Persistent
$this->ensureConsistency(); $this->ensureConsistency();
} }
return $startcol + 3; // 3 = CcShowSchedulePeer::NUM_COLUMNS - CcShowSchedulePeer::NUM_LAZY_LOAD_COLUMNS). return $startcol + 5; // 5 = CcShowSchedulePeer::NUM_COLUMNS - CcShowSchedulePeer::NUM_LAZY_LOAD_COLUMNS).
} catch (Exception $e) { } catch (Exception $e) {
throw new PropelException("Error populating CcShowSchedule object", $e); throw new PropelException("Error populating CcShowSchedule object", $e);
@ -532,6 +658,12 @@ abstract class BaseCcShowSchedule extends BaseObject implements Persistent
return $this->getDbShowId(); return $this->getDbShowId();
break; break;
case 2: case 2:
return $this->getDbShowDay();
break;
case 3:
return $this->getDbPosition();
break;
case 4:
return $this->getDbGroupId(); return $this->getDbGroupId();
break; break;
default: default:
@ -560,7 +692,9 @@ abstract class BaseCcShowSchedule extends BaseObject implements Persistent
$result = array( $result = array(
$keys[0] => $this->getDbId(), $keys[0] => $this->getDbId(),
$keys[1] => $this->getDbShowId(), $keys[1] => $this->getDbShowId(),
$keys[2] => $this->getDbGroupId(), $keys[2] => $this->getDbShowDay(),
$keys[3] => $this->getDbPosition(),
$keys[4] => $this->getDbGroupId(),
); );
if ($includeForeignObjects) { if ($includeForeignObjects) {
if (null !== $this->aCcShow) { if (null !== $this->aCcShow) {
@ -604,6 +738,12 @@ abstract class BaseCcShowSchedule extends BaseObject implements Persistent
$this->setDbShowId($value); $this->setDbShowId($value);
break; break;
case 2: case 2:
$this->setDbShowDay($value);
break;
case 3:
$this->setDbPosition($value);
break;
case 4:
$this->setDbGroupId($value); $this->setDbGroupId($value);
break; break;
} // switch() } // switch()
@ -632,7 +772,9 @@ abstract class BaseCcShowSchedule extends BaseObject implements Persistent
if (array_key_exists($keys[0], $arr)) $this->setDbId($arr[$keys[0]]); if (array_key_exists($keys[0], $arr)) $this->setDbId($arr[$keys[0]]);
if (array_key_exists($keys[1], $arr)) $this->setDbShowId($arr[$keys[1]]); if (array_key_exists($keys[1], $arr)) $this->setDbShowId($arr[$keys[1]]);
if (array_key_exists($keys[2], $arr)) $this->setDbGroupId($arr[$keys[2]]); if (array_key_exists($keys[2], $arr)) $this->setDbShowDay($arr[$keys[2]]);
if (array_key_exists($keys[3], $arr)) $this->setDbPosition($arr[$keys[3]]);
if (array_key_exists($keys[4], $arr)) $this->setDbGroupId($arr[$keys[4]]);
} }
/** /**
@ -646,6 +788,8 @@ abstract class BaseCcShowSchedule extends BaseObject implements Persistent
if ($this->isColumnModified(CcShowSchedulePeer::ID)) $criteria->add(CcShowSchedulePeer::ID, $this->id); if ($this->isColumnModified(CcShowSchedulePeer::ID)) $criteria->add(CcShowSchedulePeer::ID, $this->id);
if ($this->isColumnModified(CcShowSchedulePeer::SHOW_ID)) $criteria->add(CcShowSchedulePeer::SHOW_ID, $this->show_id); if ($this->isColumnModified(CcShowSchedulePeer::SHOW_ID)) $criteria->add(CcShowSchedulePeer::SHOW_ID, $this->show_id);
if ($this->isColumnModified(CcShowSchedulePeer::SHOW_DAY)) $criteria->add(CcShowSchedulePeer::SHOW_DAY, $this->show_day);
if ($this->isColumnModified(CcShowSchedulePeer::POSITION)) $criteria->add(CcShowSchedulePeer::POSITION, $this->position);
if ($this->isColumnModified(CcShowSchedulePeer::GROUP_ID)) $criteria->add(CcShowSchedulePeer::GROUP_ID, $this->group_id); if ($this->isColumnModified(CcShowSchedulePeer::GROUP_ID)) $criteria->add(CcShowSchedulePeer::GROUP_ID, $this->group_id);
return $criteria; return $criteria;
@ -709,6 +853,8 @@ abstract class BaseCcShowSchedule extends BaseObject implements Persistent
public function copyInto($copyObj, $deepCopy = false) public function copyInto($copyObj, $deepCopy = false)
{ {
$copyObj->setDbShowId($this->show_id); $copyObj->setDbShowId($this->show_id);
$copyObj->setDbShowDay($this->show_day);
$copyObj->setDbPosition($this->position);
$copyObj->setDbGroupId($this->group_id); $copyObj->setDbGroupId($this->group_id);
$copyObj->setNew(true); $copyObj->setNew(true);
@ -809,6 +955,8 @@ abstract class BaseCcShowSchedule extends BaseObject implements Persistent
{ {
$this->id = null; $this->id = null;
$this->show_id = null; $this->show_id = null;
$this->show_day = null;
$this->position = null;
$this->group_id = null; $this->group_id = null;
$this->alreadyInSave = false; $this->alreadyInSave = false;
$this->alreadyInValidation = false; $this->alreadyInValidation = false;

View File

@ -26,7 +26,7 @@ abstract class BaseCcShowSchedulePeer {
const TM_CLASS = 'CcShowScheduleTableMap'; const TM_CLASS = 'CcShowScheduleTableMap';
/** The total number of columns. */ /** The total number of columns. */
const NUM_COLUMNS = 3; const NUM_COLUMNS = 5;
/** The number of lazy-loaded columns. */ /** The number of lazy-loaded columns. */
const NUM_LAZY_LOAD_COLUMNS = 0; const NUM_LAZY_LOAD_COLUMNS = 0;
@ -37,6 +37,12 @@ abstract class BaseCcShowSchedulePeer {
/** the column name for the SHOW_ID field */ /** the column name for the SHOW_ID field */
const SHOW_ID = 'cc_show_schedule.SHOW_ID'; const SHOW_ID = 'cc_show_schedule.SHOW_ID';
/** the column name for the SHOW_DAY field */
const SHOW_DAY = 'cc_show_schedule.SHOW_DAY';
/** the column name for the POSITION field */
const POSITION = 'cc_show_schedule.POSITION';
/** the column name for the GROUP_ID field */ /** the column name for the GROUP_ID field */
const GROUP_ID = 'cc_show_schedule.GROUP_ID'; const GROUP_ID = 'cc_show_schedule.GROUP_ID';
@ -56,12 +62,12 @@ abstract class BaseCcShowSchedulePeer {
* e.g. self::$fieldNames[self::TYPE_PHPNAME][0] = 'Id' * e.g. self::$fieldNames[self::TYPE_PHPNAME][0] = 'Id'
*/ */
private static $fieldNames = array ( private static $fieldNames = array (
BasePeer::TYPE_PHPNAME => array ('DbId', 'DbShowId', 'DbGroupId', ), BasePeer::TYPE_PHPNAME => array ('DbId', 'DbShowId', 'DbShowDay', 'DbPosition', 'DbGroupId', ),
BasePeer::TYPE_STUDLYPHPNAME => array ('dbId', 'dbShowId', 'dbGroupId', ), BasePeer::TYPE_STUDLYPHPNAME => array ('dbId', 'dbShowId', 'dbShowDay', 'dbPosition', 'dbGroupId', ),
BasePeer::TYPE_COLNAME => array (self::ID, self::SHOW_ID, self::GROUP_ID, ), BasePeer::TYPE_COLNAME => array (self::ID, self::SHOW_ID, self::SHOW_DAY, self::POSITION, self::GROUP_ID, ),
BasePeer::TYPE_RAW_COLNAME => array ('ID', 'SHOW_ID', 'GROUP_ID', ), BasePeer::TYPE_RAW_COLNAME => array ('ID', 'SHOW_ID', 'SHOW_DAY', 'POSITION', 'GROUP_ID', ),
BasePeer::TYPE_FIELDNAME => array ('id', 'show_id', 'group_id', ), BasePeer::TYPE_FIELDNAME => array ('id', 'show_id', 'show_day', 'position', 'group_id', ),
BasePeer::TYPE_NUM => array (0, 1, 2, ) BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, )
); );
/** /**
@ -71,12 +77,12 @@ abstract class BaseCcShowSchedulePeer {
* e.g. self::$fieldNames[BasePeer::TYPE_PHPNAME]['Id'] = 0 * e.g. self::$fieldNames[BasePeer::TYPE_PHPNAME]['Id'] = 0
*/ */
private static $fieldKeys = array ( private static $fieldKeys = array (
BasePeer::TYPE_PHPNAME => array ('DbId' => 0, 'DbShowId' => 1, 'DbGroupId' => 2, ), BasePeer::TYPE_PHPNAME => array ('DbId' => 0, 'DbShowId' => 1, 'DbShowDay' => 2, 'DbPosition' => 3, 'DbGroupId' => 4, ),
BasePeer::TYPE_STUDLYPHPNAME => array ('dbId' => 0, 'dbShowId' => 1, 'dbGroupId' => 2, ), BasePeer::TYPE_STUDLYPHPNAME => array ('dbId' => 0, 'dbShowId' => 1, 'dbShowDay' => 2, 'dbPosition' => 3, 'dbGroupId' => 4, ),
BasePeer::TYPE_COLNAME => array (self::ID => 0, self::SHOW_ID => 1, self::GROUP_ID => 2, ), BasePeer::TYPE_COLNAME => array (self::ID => 0, self::SHOW_ID => 1, self::SHOW_DAY => 2, self::POSITION => 3, self::GROUP_ID => 4, ),
BasePeer::TYPE_RAW_COLNAME => array ('ID' => 0, 'SHOW_ID' => 1, 'GROUP_ID' => 2, ), BasePeer::TYPE_RAW_COLNAME => array ('ID' => 0, 'SHOW_ID' => 1, 'SHOW_DAY' => 2, 'POSITION' => 3, 'GROUP_ID' => 4, ),
BasePeer::TYPE_FIELDNAME => array ('id' => 0, 'show_id' => 1, 'group_id' => 2, ), BasePeer::TYPE_FIELDNAME => array ('id' => 0, 'show_id' => 1, 'show_day' => 2, 'position' => 3, 'group_id' => 4, ),
BasePeer::TYPE_NUM => array (0, 1, 2, ) BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, )
); );
/** /**
@ -150,10 +156,14 @@ abstract class BaseCcShowSchedulePeer {
if (null === $alias) { if (null === $alias) {
$criteria->addSelectColumn(CcShowSchedulePeer::ID); $criteria->addSelectColumn(CcShowSchedulePeer::ID);
$criteria->addSelectColumn(CcShowSchedulePeer::SHOW_ID); $criteria->addSelectColumn(CcShowSchedulePeer::SHOW_ID);
$criteria->addSelectColumn(CcShowSchedulePeer::SHOW_DAY);
$criteria->addSelectColumn(CcShowSchedulePeer::POSITION);
$criteria->addSelectColumn(CcShowSchedulePeer::GROUP_ID); $criteria->addSelectColumn(CcShowSchedulePeer::GROUP_ID);
} else { } else {
$criteria->addSelectColumn($alias . '.ID'); $criteria->addSelectColumn($alias . '.ID');
$criteria->addSelectColumn($alias . '.SHOW_ID'); $criteria->addSelectColumn($alias . '.SHOW_ID');
$criteria->addSelectColumn($alias . '.SHOW_DAY');
$criteria->addSelectColumn($alias . '.POSITION');
$criteria->addSelectColumn($alias . '.GROUP_ID'); $criteria->addSelectColumn($alias . '.GROUP_ID');
} }
} }

View File

@ -8,10 +8,14 @@
* *
* @method CcShowScheduleQuery orderByDbId($order = Criteria::ASC) Order by the id column * @method CcShowScheduleQuery orderByDbId($order = Criteria::ASC) Order by the id column
* @method CcShowScheduleQuery orderByDbShowId($order = Criteria::ASC) Order by the show_id column * @method CcShowScheduleQuery orderByDbShowId($order = Criteria::ASC) Order by the show_id column
* @method CcShowScheduleQuery orderByDbShowDay($order = Criteria::ASC) Order by the show_day column
* @method CcShowScheduleQuery orderByDbPosition($order = Criteria::ASC) Order by the position column
* @method CcShowScheduleQuery orderByDbGroupId($order = Criteria::ASC) Order by the group_id column * @method CcShowScheduleQuery orderByDbGroupId($order = Criteria::ASC) Order by the group_id column
* *
* @method CcShowScheduleQuery groupByDbId() Group by the id column * @method CcShowScheduleQuery groupByDbId() Group by the id column
* @method CcShowScheduleQuery groupByDbShowId() Group by the show_id column * @method CcShowScheduleQuery groupByDbShowId() Group by the show_id column
* @method CcShowScheduleQuery groupByDbShowDay() Group by the show_day column
* @method CcShowScheduleQuery groupByDbPosition() Group by the position column
* @method CcShowScheduleQuery groupByDbGroupId() Group by the group_id column * @method CcShowScheduleQuery groupByDbGroupId() Group by the group_id column
* *
* @method CcShowScheduleQuery leftJoin($relation) Adds a LEFT JOIN clause to the query * @method CcShowScheduleQuery leftJoin($relation) Adds a LEFT JOIN clause to the query
@ -27,10 +31,14 @@
* *
* @method CcShowSchedule findOneByDbId(int $id) Return the first CcShowSchedule filtered by the id column * @method CcShowSchedule findOneByDbId(int $id) Return the first CcShowSchedule filtered by the id column
* @method CcShowSchedule findOneByDbShowId(int $show_id) Return the first CcShowSchedule filtered by the show_id column * @method CcShowSchedule findOneByDbShowId(int $show_id) Return the first CcShowSchedule filtered by the show_id column
* @method CcShowSchedule findOneByDbShowDay(string $show_day) Return the first CcShowSchedule filtered by the show_day column
* @method CcShowSchedule findOneByDbPosition(int $position) Return the first CcShowSchedule filtered by the position column
* @method CcShowSchedule findOneByDbGroupId(int $group_id) Return the first CcShowSchedule filtered by the group_id column * @method CcShowSchedule findOneByDbGroupId(int $group_id) Return the first CcShowSchedule filtered by the group_id column
* *
* @method array findByDbId(int $id) Return CcShowSchedule objects filtered by the id column * @method array findByDbId(int $id) Return CcShowSchedule objects filtered by the id column
* @method array findByDbShowId(int $show_id) Return CcShowSchedule objects filtered by the show_id column * @method array findByDbShowId(int $show_id) Return CcShowSchedule objects filtered by the show_id column
* @method array findByDbShowDay(string $show_day) Return CcShowSchedule objects filtered by the show_day column
* @method array findByDbPosition(int $position) Return CcShowSchedule objects filtered by the position column
* @method array findByDbGroupId(int $group_id) Return CcShowSchedule objects filtered by the group_id column * @method array findByDbGroupId(int $group_id) Return CcShowSchedule objects filtered by the group_id column
* *
* @package propel.generator.campcaster.om * @package propel.generator.campcaster.om
@ -189,6 +197,68 @@ abstract class BaseCcShowScheduleQuery extends ModelCriteria
return $this->addUsingAlias(CcShowSchedulePeer::SHOW_ID, $dbShowId, $comparison); return $this->addUsingAlias(CcShowSchedulePeer::SHOW_ID, $dbShowId, $comparison);
} }
/**
* Filter the query on the show_day column
*
* @param string|array $dbShowDay The value to use as filter.
* Accepts an associative array('min' => $minValue, 'max' => $maxValue)
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
* @return CcShowScheduleQuery The current query, for fluid interface
*/
public function filterByDbShowDay($dbShowDay = null, $comparison = null)
{
if (is_array($dbShowDay)) {
$useMinMax = false;
if (isset($dbShowDay['min'])) {
$this->addUsingAlias(CcShowSchedulePeer::SHOW_DAY, $dbShowDay['min'], Criteria::GREATER_EQUAL);
$useMinMax = true;
}
if (isset($dbShowDay['max'])) {
$this->addUsingAlias(CcShowSchedulePeer::SHOW_DAY, $dbShowDay['max'], Criteria::LESS_EQUAL);
$useMinMax = true;
}
if ($useMinMax) {
return $this;
}
if (null === $comparison) {
$comparison = Criteria::IN;
}
}
return $this->addUsingAlias(CcShowSchedulePeer::SHOW_DAY, $dbShowDay, $comparison);
}
/**
* Filter the query on the position column
*
* @param int|array $dbPosition The value to use as filter.
* Accepts an associative array('min' => $minValue, 'max' => $maxValue)
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
* @return CcShowScheduleQuery The current query, for fluid interface
*/
public function filterByDbPosition($dbPosition = null, $comparison = null)
{
if (is_array($dbPosition)) {
$useMinMax = false;
if (isset($dbPosition['min'])) {
$this->addUsingAlias(CcShowSchedulePeer::POSITION, $dbPosition['min'], Criteria::GREATER_EQUAL);
$useMinMax = true;
}
if (isset($dbPosition['max'])) {
$this->addUsingAlias(CcShowSchedulePeer::POSITION, $dbPosition['max'], Criteria::LESS_EQUAL);
$useMinMax = true;
}
if ($useMinMax) {
return $this;
}
if (null === $comparison) {
$comparison = Criteria::IN;
}
}
return $this->addUsingAlias(CcShowSchedulePeer::POSITION, $dbPosition, $comparison);
}
/** /**
* Filter the query on the group_id column * Filter the query on the group_id column
* *

View File

@ -18,7 +18,7 @@ require_once (dirname(__FILE__).'/../../conf.php');
* ); * );
* $cron->closeCrontab(); * $cron->closeCrontab();
* </pre> * </pre>
* @package Campcaster * @package Airtime
* @subpackage StorageServer.Cron * @subpackage StorageServer.Cron
*/ */
class Cron { class Cron {
@ -211,4 +211,4 @@ class Cron {
return $this->cronfile.' "'.str_replace('"','\"',serialize($this->params)).'"'; return $this->cronfile.' "'.str_replace('"','\"',serialize($this->params)).'"';
} }
} }
?> ?>

View File

@ -2,7 +2,7 @@
/** /**
* Cron jobs handling abstract class * Cron jobs handling abstract class
* *
* @package Campcaster * @package Airtime
* @subpackage StorageServer.Cron * @subpackage StorageServer.Cron
*/ */
class CronJob class CronJob
@ -14,4 +14,4 @@ class CronJob
{ {
} }
} }
?> ?>

View File

@ -11,7 +11,7 @@ define('CRON_EMPTY', 4);
* This class lets you manipulate a user's crontab. * This class lets you manipulate a user's crontab.
* It lets you add delete update entries easily. * It lets you add delete update entries easily.
* *
* @package Campcaster * @package Airtime
* @subpackage StorageServer.Cron * @subpackage StorageServer.Cron
*/ */
class Crontab class Crontab
@ -281,4 +281,4 @@ class Crontab
return $returnar; return $returnar;
} }
} }
?> ?>

View File

@ -1,6 +1,6 @@
<?php <?php
/** /**
* @package Campcaster * @package Airtime
* @subpackage StorageServer * @subpackage StorageServer
* @copyright 2010 Sourcefabric O.P.S. * @copyright 2010 Sourcefabric O.P.S.
* @license http://www.gnu.org/licenses/gpl.txt * @license http://www.gnu.org/licenses/gpl.txt
@ -114,4 +114,4 @@ $playlistFormat = array(
? ?
ls:filename Text auto ls:filename Text auto
*/ */
?> ?>

View File

@ -1,8 +1,11 @@
<?php <?php
require_once(__DIR__.'/../../3rd_party/php/propel/runtime/lib/Propel.php'); require_once(__DIR__.'/../../3rd_party/php/propel/runtime/lib/Propel.php');
// Initialize Propel with the runtime configuration // Initialize Propel with the runtime configuration
Propel::init(__DIR__."/../propel-db/build/conf/campcaster-conf.php");
// Add the generated 'classes' directory to the include path //Example how to use PDO:
//Propel::init(__DIR__."/../propel-db/build/conf/airtime-conf.php");
//Add the generated 'classes' directory to the include path
set_include_path(__DIR__."/../propel-db/build/classes" . PATH_SEPARATOR . get_include_path()); set_include_path(__DIR__."/../propel-db/build/classes" . PATH_SEPARATOR . get_include_path());
$con = Propel::getConnection("campcaster"); $con = Propel::getConnection("campcaster");
@ -19,4 +22,4 @@ $sql3 = "SELECT TIMESTAMP '2011-01-01 00:00:00.000' + INTERVAL '01:00:00.123456'
$result3 = $con->query($sql3); $result3 = $con->query($sql3);
var_dump($result3->fetchAll()); var_dump($result3->fetchAll());
?> ?>

View File

@ -4,7 +4,7 @@ require_once(dirname(__FILE__).'/../LocStor.php');
/** /**
* XML-RPC interface for LocStor class * XML-RPC interface for LocStor class
* *
* @package Campcaster * @package Airtime
* @subpackage StorageServer * @subpackage StorageServer
* @copyright 2010 Sourcefabric O.P.S. * @copyright 2010 Sourcefabric O.P.S.
* @license http://www.gnu.org/licenses/gpl.txt * @license http://www.gnu.org/licenses/gpl.txt
@ -12,7 +12,7 @@ require_once(dirname(__FILE__).'/../LocStor.php');
class XR_LocStor extends LocStor { class XR_LocStor extends LocStor {
/* ----------------------------------------------------------- getVersion */ /* ----------------------------------------------------------- getVersion */
/** /**
* Dummy method - only returns Campcaster version * Dummy method - only returns Airtime version
* *
* The XML-RPC name of this method is "locstor.getVersion". * The XML-RPC name of this method is "locstor.getVersion".
* *
@ -242,7 +242,7 @@ class XR_LocStor extends LocStor {
* (returned by subsequent storeAudioClipClose call) * (returned by subsequent storeAudioClipClose call)
* </li> * </li>
* <li> metadata : string - metadata XML string * <li> metadata : string - metadata XML string
* (as defined in Campcaster::Core::AudioClip Class Reference, * (as defined in Airtime::Core::AudioClip Class Reference,
* examples are in storageServer/var/tests/*.xml) * examples are in storageServer/var/tests/*.xml)
* </li> * </li>
* <li> fname : string - human readable mnemonic file name * <li> fname : string - human readable mnemonic file name
@ -3830,4 +3830,4 @@ class XR_LocStor extends LocStor {
} // class XR_LocStor } // class XR_LocStor
?> ?>

View File

@ -23,7 +23,7 @@
* </ul> * </ul>
* *
* @see XR_LocStor * @see XR_LocStor
* @package Campcaster * @package Airtime
* @subpackage storageServer * @subpackage storageServer
*/ */
@ -96,4 +96,4 @@ fclose($fp);
fclose($putdata); fclose($putdata);
header("HTTP/1.1 200"); header("HTTP/1.1 200");
?> ?>

View File

@ -61,7 +61,7 @@ $locStor = new XR_LocStor();
$methods = array( $methods = array(
'test' => 'Tests toupper and checks sessid, params: '. 'test' => 'Tests toupper and checks sessid, params: '.
'teststring, sessid.', 'teststring, sessid.',
'getVersion' => 'Get version of Campcaster.', 'getVersion' => 'Get version of Airtime.',
// 'authenticate' => 'Checks authentication.', // 'authenticate' => 'Checks authentication.',
'login' => 'Login to storage.', 'login' => 'Login to storage.',
'logout' => 'Logout from storage.', 'logout' => 'Logout from storage.',
@ -169,4 +169,4 @@ foreach ($methods as $method => $description) {
$s = new XML_RPC_Server($defs); $s = new XML_RPC_Server($defs);
?> ?>

View File

@ -8,6 +8,7 @@
<th><span class="album">Album</span></th> <th><span class="album">Album</span></th>
<th><span class="track">Track</span></th> <th><span class="track">Track</span></th>
<th><span class="length">Length</span></th> <th><span class="length">Length</span></th>
<th><span class="type">Type</span></th>
</tr> </tr>
<?php <?php
echo $this->partialLoop('library/libraryTablePartial.phtml', $this->files); echo $this->partialLoop('library/libraryTablePartial.phtml', $this->files);
@ -20,3 +21,12 @@
} }
?> ?>
<?php
echo $this->paginationControl($this->paginator,
'Sliding',
'library/paginator.phtml');
?>

View File

@ -5,4 +5,5 @@
<td><?php echo $this->album_title ?></td> <td><?php echo $this->album_title ?></td>
<td><?php echo $this->track_number ?></td> <td><?php echo $this->track_number ?></td>
<td><?php echo $this->length ?></td> <td><?php echo $this->length ?></td>
<td><?php echo $this->ftype ?></td>
</tr> </tr>

View File

@ -0,0 +1,56 @@
<div class="paginationControl">
<p>
<?php if ($this->pageCount): ?>
<?php echo $this->firstItemNumber; ?> - <?php echo $this->lastItemNumber; ?>
of <?php echo $this->totalItemCount; ?>
</p>
<p>
<!-- First page link -->
<?php if (isset($this->previous)): ?>
<a href="<?php echo $this->url(array('page' => $this->first)); ?>">
First
</a> |
<?php else: ?>
<span class="disabled">First</span> |
<?php endif; ?>
<!-- Previous page link -->
<?php if (isset($this->previous)): ?>
<a href="<?php echo $this->url(array('page' => $this->previous)); ?>">
&lt; Previous
</a> |
<?php else: ?>
<span class="disabled">&lt; Previous</span> |
<?php endif; ?>
<!-- current pages links -->
<?php foreach ($this->pagesInRange as $page): ?>
<?php if ($this->current != $page): ?>
<a href="<?php echo $this->url(array('page' => $page));?>"><?php echo $page; ?></a>
<?php else: ?>
<?php echo $page; ?>
<?php endif; ?>
<?php endforeach; ?>
<!-- Next page link -->
<?php if (isset($this->next)): ?>
<a href="<?php echo $this->url(array('page' => $this->next)); ?>">
Next &gt;
</a> |
<?php else: ?>
<span class="disabled">Next &gt;</span> |
<?php endif; ?>
<!-- Last page link -->
<?php if (isset($this->next)): ?>
<a href="<?php echo $this->url(array('page' => $this->last)); ?>">
Last
</a>
<?php else: ?>
<span class="disabled">Last</span>
<?php endif; ?>
<?php endif; ?>
</p>
</div>

View File

@ -0,0 +1,2 @@
<label for="quick_search">Search:</label>
<input id="quick_search" name="quick_search" type="text" value = "<?php echo $this->qs_value ?>"></input>

View File

@ -1,2 +1,3 @@
<?php <?php
echo $this->partialLoop('library/libraryTablePartial.phtml', $this->files);
echo $this->partialLoop('library/libraryTablePartial.phtml', $this->files);

View File

@ -2,8 +2,8 @@
<script> <script>
$(document).ready(function() { $(document).ready(function() {
$("#list0").playlistViewer(); $("#list1").playlistViewer();
}); });
</script> </script>
<div id="list0"></div> <div id="list1"></div>
</div> </div>

View File

@ -1,6 +1,7 @@
<?php <?php
$this->form->setAction($this->url());
echo $this->form; echo $this->form;
echo var_dump($this->md);
?> ?>
<span id="search_add">Add</span>
<span id="search_submit">Submit</span>

View File

@ -1 +0,0 @@
<?php echo $this->field; ?>

View File

@ -0,0 +1 @@
<br /><br /><center>View script for controller <b>Search</b> and script/action name <b>newgroup</b></center>

View File

@ -1,9 +1,9 @@
project.home = /home/naomiaro/dev-campcaster/campcaster project.home = /path/to/airtime
project.build = ${project.home}/build project.build = ${project.home}/build
#Database driver #Database driver
propel.database = pgsql propel.database = pgsql
propel.database.url = pgsql:host=localhost dbname=campcaster user=campcaster password=campcaster propel.database.url = pgsql:host=localhost dbname=airtime user=airtime password=airtime
#Project name #Project name
propel.project = campcaster propel.project = campcaster

View File

@ -153,6 +153,8 @@
<table name="cc_show_schedule" phpName="CcShowSchedule"> <table name="cc_show_schedule" phpName="CcShowSchedule">
<column name="id" phpName="DbId" type="INTEGER" primaryKey="true" autoIncrement="true" required="true"/> <column name="id" phpName="DbId" type="INTEGER" primaryKey="true" autoIncrement="true" required="true"/>
<column name="show_id" phpName="DbShowId" type="INTEGER" required="true"/> <column name="show_id" phpName="DbShowId" type="INTEGER" required="true"/>
<column name="show_day" phpName="DbShowDay" type="DATE" required="true"/>
<column name="position" phpName="DbPosition" type="INTEGER" required="false"/>
<column name="group_id" phpName="DbGroupId" type="INTEGER" required="true"/> <column name="group_id" phpName="DbGroupId" type="INTEGER" required="true"/>
<foreign-key foreignTable="cc_show" name="cc_perm_show_fkey" onDelete="CASCADE"> <foreign-key foreignTable="cc_show" name="cc_perm_show_fkey" onDelete="CASCADE">
<reference local="show_id" foreign="id"/> <reference local="show_id" foreign="id"/>

View File

@ -224,6 +224,8 @@ CREATE TABLE "cc_show_schedule"
( (
"id" serial NOT NULL, "id" serial NOT NULL,
"show_id" INTEGER NOT NULL, "show_id" INTEGER NOT NULL,
"show_day" DATE NOT NULL,
"position" INTEGER,
"group_id" INTEGER NOT NULL, "group_id" INTEGER NOT NULL,
PRIMARY KEY ("id") PRIMARY KEY ("id")
); );

View File

@ -21,3 +21,27 @@ CREATE FUNCTION calculate_position() RETURNS trigger AS
CREATE TRIGGER calculate_position AFTER INSERT OR DELETE ON cc_playlistcontents CREATE TRIGGER calculate_position AFTER INSERT OR DELETE ON cc_playlistcontents
FOR EACH ROW EXECUTE PROCEDURE calculate_position(); FOR EACH ROW EXECUTE PROCEDURE calculate_position();
----------------------------------------------------------------------------------
--show_content()
----------------------------------------------------------------------------------
DROP FUNCTION show_content() CASCADE;
CREATE FUNCTION show_content() RETURNS trigger AS
'
BEGIN
IF(TG_OP=''INSERT'') THEN
UPDATE cc_show_schedule SET position = (position + 1)
WHERE (id = new.id AND position >= new.position AND id != new.id);
END IF;
IF(TG_OP=''DELETE'') THEN
UPDATE cc_show_schedule SET position = (position - 1)
WHERE (id = old.id AND position > old.position);
END IF;
RETURN NULL;
END;
'
LANGUAGE 'plpgsql';
CREATE TRIGGER show_content AFTER INSERT OR DELETE ON cc_show_schedule
FOR EACH ROW EXECUTE PROCEDURE show_content();

2
debian/rules vendored
View File

@ -139,7 +139,7 @@ override_dh_install:
override_dh_fixperms: override_dh_fixperms:
dh_fixperms dh_fixperms
# #
chmod +x debian/campcaster-data/usr/share/campcaster/www/storageServer/var/install/campcaster-user.php chmod +x debian/campcaster-data/usr/share/campcaster/www/storageServer/var/install/airtime-user.php
chmod -x debian/campcaster-data/usr/share/campcaster/www/storageServer/var/cron/Crontab.php \ chmod -x debian/campcaster-data/usr/share/campcaster/www/storageServer/var/cron/Crontab.php \
debian/campcaster-data/usr/share/campcaster/www/storageServer/var/cron/CronJob.php \ debian/campcaster-data/usr/share/campcaster/www/storageServer/var/cron/CronJob.php \
debian/campcaster-data/usr/share/campcaster/www/htmlUI/var/templates/popup/PLAYLIST.downloadExportedFile.tpl \ debian/campcaster-data/usr/share/campcaster/www/htmlUI/var/templates/popup/PLAYLIST.downloadExportedFile.tpl \

View File

@ -14,13 +14,13 @@ Setting Up Your VHOST
The following is a sample VHOST you might want to consider for your project. The following is a sample VHOST you might want to consider for your project.
<VirtualHost *:80> <VirtualHost *:80>
DocumentRoot "/home/naomiaro/campcaster-refactor/campcaster/public" DocumentRoot "/home/naomiaro/campcaster-refactor/airtime/public"
ServerName campcaster.local ServerName airtime.local
# This should be omitted in the production environment # This should be omitted in the production environment
SetEnv APPLICATION_ENV development SetEnv APPLICATION_ENV development
<Directory "/home/naomiaro/campcaster-refactor/campcaster/public"> <Directory "/home/naomiaro/campcaster-refactor/airtime/public">
Options Indexes MultiViews FollowSymLinks Options Indexes MultiViews FollowSymLinks
AllowOverride All AllowOverride All
Order allow,deny Order allow,deny

View File

@ -17,9 +17,9 @@ if (isset($arr["DOCUMENT_ROOT"]) && ($arr["DOCUMENT_ROOT"] != "") ) {
function printUsage() function printUsage()
{ {
echo "\n"; echo "\n";
echo "campcaster-user\n"; echo "airtime-user\n";
echo "===============\n"; echo "===============\n";
echo " This program allows you to manage Campcaster users.\n"; echo " This program allows you to manage Airtime users.\n";
echo "\n"; echo "\n";
echo "OPTIONS:\n"; echo "OPTIONS:\n";
echo " --addupdate <username> <password>\n"; echo " --addupdate <username> <password>\n";
@ -99,4 +99,4 @@ if (PEAR::isError($r)) {
die($r->getMessage()); die($r->getMessage());
} }
exit(0); exit(0);
?> ?>

View File

@ -1,23 +1,23 @@
#!/bin/bash #!/bin/bash
#------------------------------------------------------------------------------- #-------------------------------------------------------------------------------
# Copyright (c) 2010 Sourcefabric O.P.S. # Copyright (c) 2010 Airtime O.P.S.
# #
# This file is part of the Campcaster project. # This file is part of the Airtime project.
# http://campcaster.sourcefabric.org/ # http://campcaster.sourcefabric.org/
# To report bugs, send an e-mail to bugs@campware.org # To report bugs, send an e-mail to bugs@campware.org
# #
# Campcaster is free software; you can redistribute it and/or modify # Airtime is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by # it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or # the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version. # (at your option) any later version.
# #
# Campcaster is distributed in the hope that it will be useful, # Airtime is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of # but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details. # GNU General Public License for more details.
# #
# You should have received a copy of the GNU General Public License # You should have received a copy of the GNU General Public License
# along with Campcaster; if not, write to the Free Software # along with Airtime; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
# #
#------------------------------------------------------------------------------- #-------------------------------------------------------------------------------
@ -404,7 +404,7 @@ if [ "$storage_is_local" = "yes" ]; then
grep -q 'ls_scheduler_storage_pass' $install_etc/campcaster-scheduler.xml grep -q 'ls_scheduler_storage_pass' $install_etc/campcaster-scheduler.xml
if [ $? = 0 ]; then if [ $? = 0 ]; then
SCHEDULER_STORAGE_PASS=`pwgen -N1 -c -n -s` SCHEDULER_STORAGE_PASS=`pwgen -N1 -c -n -s`
php -q $install_var_ls/storageServer/var/install/campcaster-user.php \ php -q $install_var_ls/storageServer/var/install/airtime-user.php \
--addupdate scheduler ${SCHEDULER_STORAGE_PASS} --addupdate scheduler ${SCHEDULER_STORAGE_PASS}
sed -i -e "s/ls_scheduler_storage_pass/${SCHEDULER_STORAGE_PASS}/" \ sed -i -e "s/ls_scheduler_storage_pass/${SCHEDULER_STORAGE_PASS}/" \
$install_etc/campcaster-scheduler.xml $install_etc/campcaster-scheduler.xml

View File

@ -1,6 +1,6 @@
<?php <?php
/** /**
* @package Campcaster * @package Airtime
* @subpackage StorageServer * @subpackage StorageServer
* @copyright 2010 Sourcefabric O.P.S. * @copyright 2010 Sourcefabric O.P.S.
* @license http://www.gnu.org/licenses/gpl.txt * @license http://www.gnu.org/licenses/gpl.txt
@ -15,7 +15,6 @@ if (isset($arr["DOCUMENT_ROOT"]) && ($arr["DOCUMENT_ROOT"] != "") ) {
exit(1); exit(1);
} }
echo "******************************* Install Begin ********************************\n";
require_once(dirname(__FILE__).'/../application/configs/conf.php'); require_once(dirname(__FILE__).'/../application/configs/conf.php');
require_once(dirname(__FILE__).'/../application/models/GreenBox.php'); require_once(dirname(__FILE__).'/../application/models/GreenBox.php');
@ -23,6 +22,12 @@ require_once(dirname(__FILE__).'/../application/models/GreenBox.php');
require_once(dirname(__FILE__)."/installInit.php"); require_once(dirname(__FILE__)."/installInit.php");
// Need to check that we are superuser before running this. // Need to check that we are superuser before running this.
if(exec("whoami") != "root"){
echo "Must be root user.\n";
exit(1);
}
echo "******************************* Install Begin ********************************\n";
echo " *** Database Installation ***\n"; echo " *** Database Installation ***\n";
@ -63,7 +68,7 @@ if ($langIsInstalled == '0') {
echo " * Creating database tables\n"; echo " * Creating database tables\n";
// Put Propel sql files in Database // Put Propel sql files in Database
$command = __DIR__."/../library/propel/generator/bin/propel-gen ../build/ insert-sql"; $command = __DIR__."/../library/propel/generator/bin/propel-gen ../build/ insert-sql 2>propel-error.log";
//echo $command."\n"; //echo $command."\n";
@exec($command, $output, $results); @exec($command, $output, $results);
@ -201,7 +206,7 @@ install_setDirPermissions($CC_CONFIG["storageDir"]);
//echo " Done.\n"; //echo " Done.\n";
echo " * Importing sample audio clips \n"; echo " * Importing sample audio clips \n";
$command = __DIR__."/../utils/campcaster-import --copy ../audio_samples/ > /dev/null"; $command = __DIR__."/../utils/airtime-import --copy ../audio_samples/ > /dev/null";
@exec($command, $output, $results); @exec($command, $output, $results);
echo "****************************** Install Complete ******************************\n"; echo "****************************** Install Complete ******************************\n";

View File

@ -1,6 +1,6 @@
<?php <?php
/** /**
* @package Campcaster * @package Airtime
* @copyright 2010 Sourcefabric O.P.S. * @copyright 2010 Sourcefabric O.P.S.
* @license http://www.gnu.org/licenses/gpl.txt * @license http://www.gnu.org/licenses/gpl.txt
*/ */
@ -236,4 +236,4 @@ echo "************************************\n";
echo "* StorageServer Uninstall Complete *\n"; echo "* StorageServer Uninstall Complete *\n";
echo "************************************\n"; echo "************************************\n";
?> ?>

View File

@ -2,21 +2,21 @@
#------------------------------------------------------------------------------- #-------------------------------------------------------------------------------
# Copyright (c) 2010 Sourcefabric O.P.S. # Copyright (c) 2010 Sourcefabric O.P.S.
# #
# This file is part of the Campcaster project. # This file is part of the Airtime project.
# http://campcaster.sourcefabric.org/ # http://campcaster.sourcefabric.org/
# #
# Campcaster is free software; you can redistribute it and/or modify # Airtime is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by # it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or # the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version. # (at your option) any later version.
# #
# Campcaster is distributed in the hope that it will be useful, # Airtime is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of # but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details. # GNU General Public License for more details.
# #
# You should have received a copy of the GNU General Public License # You should have received a copy of the GNU General Public License
# along with Campcaster; if not, write to the Free Software # along with Airtime; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
# #
#------------------------------------------------------------------------------- #-------------------------------------------------------------------------------

View File

@ -2,21 +2,21 @@
#------------------------------------------------------------------------------- #-------------------------------------------------------------------------------
# Copyright (c) 2010 Sourcefabric O.P.S. # Copyright (c) 2010 Sourcefabric O.P.S.
# #
# This file is part of the Campcaster project. # This file is part of the Airtime project.
# http://campcaster.campware.org/ # http://campcaster.sourcefabric.org/
# #
# Campcaster is free software; you can redistribute it and/or modify # Airtime is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by # it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or # the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version. # (at your option) any later version.
# #
# Campcaster is distributed in the hope that it will be useful, # Airtime is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of # but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details. # GNU General Public License for more details.
# #
# You should have received a copy of the GNU General Public License # You should have received a copy of the GNU General Public License
# along with Campcaster; if not, write to the Free Software # along with Airtime; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
# #
#------------------------------------------------------------------------------- #-------------------------------------------------------------------------------

View File

@ -2,21 +2,21 @@
# getID3 - read and writes tags in media files - see getid3.readme.txt # getID3 - read and writes tags in media files - see getid3.readme.txt
# getID3 by James Heinrich <getid3@users.sourceforge.net> # getID3 by James Heinrich <getid3@users.sourceforge.net>
# #
# This file is part of the Campcaster project. # This file is part of the Airtime project.
# Copyright (c) 2010 Sourcefabric O.P.S. # Copyright (c) 2010 Sourcefabric O.P.S.
# #
# Campcaster is free software; you can redistribute it and/or modify # Airtime is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by # it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or # the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version. # (at your option) any later version.
# #
# Campcaster is distributed in the hope that it will be useful, # Airtime is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of # but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details. # GNU General Public License for more details.
# #
# You should have received a copy of the GNU General Public License # You should have received a copy of the GNU General Public License
# along with Campcaster; if not, write to the Free Software # along with Airtime; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
# #
# @configure_input@ # @configure_input@

View File

@ -1,21 +1,21 @@
dnl----------------------------------------------------------------------------- dnl-----------------------------------------------------------------------------
dnl Copyright (c) 2010 Sourcefabric O.P.S. dnl Copyright (c) 2010 Sourcefabric O.P.S.
dnl dnl
dnl This file is part of the Campcaster project. dnl This file is part of the Airtime project.
dnl http://campcaster.sourcefabric.org/ dnl http://campcaster.sourcefabric.org/
dnl dnl
dnl Campcaster is free software; you can redistribute it and/or modify dnl Airtime is free software; you can redistribute it and/or modify
dnl it under the terms of the GNU General Public License as published by dnl it under the terms of the GNU General Public License as published by
dnl the Free Software Foundation; either version 2 of the License, or dnl the Free Software Foundation; either version 2 of the License, or
dnl (at your option) any later version. dnl (at your option) any later version.
dnl dnl
dnl Campcaster is distributed in the hope that it will be useful, dnl Airtime is distributed in the hope that it will be useful,
dnl but WITHOUT ANY WARRANTY; without even the implied warranty of dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
dnl GNU General Public License for more details. dnl GNU General Public License for more details.
dnl dnl
dnl You should have received a copy of the GNU General Public License dnl You should have received a copy of the GNU General Public License
dnl along with Campcaster; if not, write to the Free Software dnl along with Airtime; if not, write to the Free Software
dnl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA dnl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
dnl dnl
dnl----------------------------------------------------------------------------- dnl-----------------------------------------------------------------------------

View File

@ -2,20 +2,20 @@
# doxygen.config # doxygen.config
# Copyright (c) 2010 Sourcefabric O.P.S. # Copyright (c) 2010 Sourcefabric O.P.S.
# #
# This file is part of the Campcaster project. # This file is part of the Airtime project.
# #
# Campcaster is free software; you can redistribute it and/or modify # Airtime is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by # it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or # the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version. # (at your option) any later version.
# #
# Campcaster is distributed in the hope that it will be useful, # Airtime is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of # but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details. # GNU General Public License for more details.
# #
# You should have received a copy of the GNU General Public License # You should have received a copy of the GNU General Public License
# along with Campcaster; if not, write to the Free Software # along with Airtime; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
# #
#------------------------------------------------------------------------------- #-------------------------------------------------------------------------------

View File

@ -0,0 +1,48 @@
function addRemove(el) {
var id, span;
id = $(el).attr("id").split("_").pop();
span = $('<span id="search_remove_'+id+'">Remove</span>').click(function(){
$(this).parent().parent().remove();
});
$(el).find("dl input").after(span);
}
function ajaxAddRow() {
var group_id;
group_id = $(this).parent().parent().attr("id").split("_").pop();
var url = '/Search/newfield/format/json';
$.post(url, {group: group_id}, function(json) {
var newRow = $(json.html).find("#fieldset-row_"+json.row);
$("#fieldset-group_"+group_id+" dl:first").append(newRow);
});
}
function ajaxAddGroup() {
var url = '/Search/newgroup/format/json';
$.post(url, function(json) {
$(".zend_form").append(json.html);
$('[id$="search_add_row"]').click(ajaxAddRow);
});
}
function setUpSearch() {
$("#search_add_group").click(ajaxAddGroup);
$('[id$="search_add_row"]').click(ajaxAddRow);
$('[id^="fieldset-row_"]').each(function(i, el){
addRemove(el);
});
}

View File

@ -66,6 +66,7 @@ function setUpLibrary() {
$("#library_display tr:first-child span.album").data({'ob': 'dc:source', 'order' : 'asc'}); $("#library_display tr:first-child span.album").data({'ob': 'dc:source', 'order' : 'asc'});
$("#library_display tr:first-child span.track").data({'ob': 'ls:track_num', 'order' : 'asc'}); $("#library_display tr:first-child span.track").data({'ob': 'ls:track_num', 'order' : 'asc'});
$("#library_display tr:first-child span.length").data({'ob': 'dcterms:extent', 'order' : 'asc'}); $("#library_display tr:first-child span.length").data({'ob': 'dcterms:extent', 'order' : 'asc'});
$("#library_display tr:first-child span.type").data({'ob': 'dcterms:extent', 'order' : 'asc'});
$("#library_display tr:first-child span").click(function(){ $("#library_display tr:first-child span").click(function(){
var url = "/Library/contents/format/html", var url = "/Library/contents/format/html",

View File

@ -0,0 +1,28 @@
function setUpQuickSearch() {
$("#library_quick_search input").keyup(function(ev){
var url, string;
//alert(x);
url = "/Library/quick-search/format/json";
string = $(this).val();
$.post(url, {search: string}, function(json){
var html, data;
//hacky way until I can figure out paginator better.
html = json.html.replace(/quick-search\/format\/json/g, "index");
var el = $(html);
data = el.find("tr:not(:first-child)");
setLibraryContents(data);
var lib = $("#library_content");
lib.find("div.paginationControl").remove();
lib.append(el[2]);
});
});
}

View File

@ -1,5 +1,6 @@
$(document).ready(function() { $(document).ready(function() {
setUpQuickSearch();
setUpLibrary(); setUpLibrary();
setUpSPL(); setUpSPL();

View File

@ -255,7 +255,7 @@ function eventMenu(action, el, pos) {
length = event.end.getTime() - event.start.getTime(); length = event.end.getTime() - event.start.getTime();
h = length / (1000*60*60); h = Math.floor(length / (1000*60*60));
m = (length % (1000*60*60)) / (1000*60); m = (length % (1000*60*60)) / (1000*60);
s = ((length % (1000*60*60)) % (1000*60)) / 1000; s = ((length % (1000*60*60)) % (1000*60)) / 1000;

View File

@ -1,65 +0,0 @@
function addRemove(el) {
var id, span;
id = $(el).attr("id").split("_").pop();
span = $('<span id="search_remove_'+id+'">Remove</span>').click(function(){
$(this).parent().parent().remove();
});
$(el).find("dl input").after(span);
}
function ajaxAddField() {
var id = $("#search_next_id").val();
var url = '/Search/newfield';
url = url + '/format/html';
url = url + '/id/' + id;
$.post(url, function(newElement) {
var el = $(newElement);
addRemove(el);
$(".zend_form").append(el);
$("#search_next_id").val(++id);
});
}
function searchLibrary() {
var url, data;
url = '/Search/display/format/json';
data = $("form").serializeArray();
$.post(url, data, function(json){
if(json.form) {
$("#search")
.empty()
.append(json.form);
}
if(json.results) {
$("#library_display tr:not(:first-child)").remove();
$("#library_display tbody").append(json.results);
//in campcaster/library.js
addLibraryItemEvents();
}
});
}
function setUpSearch() {
$("#search_add").click(ajaxAddField);
$("#search_submit").click(searchLibrary);
$('[id^="fieldset-row_"]').each(function(i, el){
addRemove(el);
});
}

View File

@ -21,7 +21,6 @@
$(cc.currentElem).append(prevDiv); $(cc.currentElem).append(prevDiv);
var currParentDiv = document.createElement('div'); var currParentDiv = document.createElement('div');
currParentDiv.setAttribute("style", "background-color:#bbbbbb;");
$(cc.currentElem).append(currParentDiv); $(cc.currentElem).append(currParentDiv);
var currDiv = document.createElement('div'); var currDiv = document.createElement('div');
@ -145,7 +144,7 @@
} }
function getScheduleFromServer(){ function getScheduleFromServer(){
$.ajax({ url: "http://localhost/Schedule/get-current-playlist/format/json", dataType:"json", success:function(data){ $.ajax({ url: "/Schedule/get-current-playlist/format/json", dataType:"json", success:function(data){
parseItems(data.entries); parseItems(data.entries);
}}); }});
setTimeout(getScheduleFromServer, 5000); setTimeout(getScheduleFromServer, 5000);

View File

@ -20,8 +20,8 @@ from urlparse import urlparse
def api_client_factory(config): def api_client_factory(config):
if config["api_client"] == "campcaster": if config["api_client"] == "airtime":
return CampcasterApiClient(config) return AirTimeApiClient(config)
elif config["api_client"] == "obp": elif config["api_client"] == "obp":
return ObpApiClient(config) return ObpApiClient(config)
else: else:
@ -100,15 +100,15 @@ class ApiClientInterface:
# nil # nil
################################################################################ ################################################################################
# Campcaster API Client # Airtime API Client
################################################################################ ################################################################################
class CampcasterApiClient(ApiClientInterface): class AirTimeApiClient(ApiClientInterface):
def __init__(self, config): def __init__(self, config):
self.config = config self.config = config
def __get_campcaster_version(self, verbose = True): def __get_airtime_version(self, verbose = True):
logger = logging.getLogger() logger = logging.getLogger()
url = self.config["base_url"] + self.config["api_base"] + self.config["version_url"] url = self.config["base_url"] + self.config["api_base"] + self.config["version_url"]
url = url.replace("%%api_key%%", self.config["api_key"]) url = url.replace("%%api_key%%", self.config["api_key"])
@ -120,7 +120,7 @@ class CampcasterApiClient(ApiClientInterface):
logger.debug("Data: %s", data) logger.debug("Data: %s", data)
response_json = json.read(data) response_json = json.read(data)
version = response_json['version'] version = response_json['version']
logger.debug("Campcaster Version %s detected", version) logger.debug("Airtime Version %s detected", version)
except Exception, e: except Exception, e:
try: try:
if e[1] == 401: if e[1] == 401:
@ -137,7 +137,7 @@ class CampcasterApiClient(ApiClientInterface):
if e[1] == 404: if e[1] == 404:
if (verbose): if (verbose):
print '#####################################' print '#####################################'
print '# Unable to contact the Campcaster-API' print '# Unable to contact the Airtime-API'
print '# ' + url print '# ' + url
print '#####################################' print '#####################################'
return False return False
@ -145,7 +145,7 @@ class CampcasterApiClient(ApiClientInterface):
pass pass
version = 0 version = 0
logger.error("Unable to detect Campcaster Version - %s, Response: %s", e, response) logger.error("Unable to detect Airtime Version - %s, Response: %s", e, response)
return version return version
@ -168,22 +168,22 @@ class CampcasterApiClient(ApiClientInterface):
def is_server_compatible(self, verbose = True): def is_server_compatible(self, verbose = True):
version = self.__get_campcaster_version(verbose) version = self.__get_airtime_version(verbose)
if (version == 0 or version == False): if (version == 0 or version == False):
if (verbose): if (verbose):
print 'Unable to get Campcaster version number.' print 'Unable to get Airtime version number.'
print print
return False return False
elif (version[0:4] != "1.6."): elif (version[0:4] != "1.6."):
if (verbose): if (verbose):
print 'Campcaster version: ' + str(version) print 'Airtime version: ' + str(version)
print 'pypo not compatible with this version of Campcaster.' print 'pypo not compatible with this version of Airtime.'
print print
return False return False
else: else:
if (verbose): if (verbose):
print 'Campcaster version: ' + str(version) print 'Airtime version: ' + str(version)
print 'pypo is compatible with this version of Campcaster.' print 'pypo is compatible with this version of Airtime.'
print print
return True return True

View File

@ -1,9 +1,9 @@
import campcaster_api_client import airtime_api_client
import obp_api_client import obp_api_client
def create_api_client(config): def create_api_client(config):
if config["api_client"] == "campcaster": if config["api_client"] == "airtime":
return campcaster_api_client.CampcasterApiClient(config) return campcaster_api_client.AirtimeApiClient(config)
elif config["api_client"] == "obp": elif config["api_client"] == "obp":
return obp_api_client.ObpApiClient(config) return obp_api_client.ObpApiClient(config)

View File

@ -5,9 +5,9 @@
# Set the type of client you are using. # Set the type of client you are using.
# Currently supported types: # Currently supported types:
# 1) "obp" = Open Broadcast Platform # 1) "obp" = Open Broadcast Platform
# 2) "campcaster" # 2) "airtime"
# #
api_client = "campcaster" api_client = "airtime"
############################################ ############################################
# Directories / Hosts # # Directories / Hosts #
@ -66,7 +66,7 @@ cue_style = 'pre'
################################################################################ ################################################################################
##################### #####################
# Campcaster Config # # Airtime Config #
##################### #####################
# Value needed to access the API # Value needed to access the API
api_key = 'AAA' api_key = 'AAA'

View File

@ -1,97 +0,0 @@
<?php
require_once '../../application/configs/conf.php';
require_once 'DB.php';
require_once '../../application/models/Playlist.php';
require_once '../../application/models/StoredFile.php';
require_once(__DIR__.'/../../library/propel/runtime/lib/Propel.php');
// Initialize Propel with the runtime configuration
Propel::init(__DIR__."/../../application/configs/propel-config.php");
// Add the generated 'classes' directory to the include path
set_include_path(__DIR__."/../../application/models" . PATH_SEPARATOR . get_include_path());
$dsn = $CC_CONFIG['dsn'];
$CC_DBC = DB::connect($dsn, TRUE);
if (PEAR::isError($CC_DBC)) {
echo "ERROR: ".$CC_DBC->getMessage()." ".$CC_DBC->getUserInfo()."\n";
exit(1);
}
$CC_DBC->setFetchMode(DB_FETCHMODE_ASSOC);
$playlistName = "pypo_playlist_test";
$minutesFromNow = 1;
echo " ************************************************************** \n";
echo " This script schedules a playlist to play $minutesFromNow minute(s) from now.\n";
echo " This is a utility to help you debug the scheduler.\n";
echo " ************************************************************** \n";
echo "\n";
echo "Deleting playlists with the name '$playlistName'...";
// Delete any old playlists
$pl2 = Playlist::findPlaylistByName($playlistName);
foreach ($pl2 as $playlist) {
//var_dump($playlist);
$playlist->delete();
}
echo "done.\n";
// Create a new playlist
echo "Creating new playlist '$playlistName'...";
$pl = new Playlist();
$pl->create($playlistName);
// Add a media clip
$mediaFile = StoredFile::findByOriginalName("ACDC_-_Back_In_Black-sample.ogg");
if (is_null($mediaFile)) {
echo "Adding test audio clip to the database.\n";
$v = array("filepath" => __DIR__."/../../audio_samples/OpSound/ACDC_-_Back_In_Black-sample.ogg");
$mediaFile = StoredFile::Insert($v);
if (PEAR::isError($mediaFile)) {
var_dump($mediaFile);
exit();
}
}
$pl->addAudioClip($mediaFile->getId());
$mediaFile = StoredFile::findByOriginalName("Peter Rudenko - Opening.mp3");
if (is_null($mediaFile)) {
echo "Adding test audio clip to the database.\n";
$v = array("filepath" => __DIR__."/../../audio_samples/OpSound/Peter Rudenko - Opening.mp3");
$mediaFile = StoredFile::Insert($v);
if (PEAR::isError($mediaFile)) {
var_dump($mediaFile);
exit();
}
}
$pl->addAudioClip($mediaFile->getId());
echo "done.\n";
//$pl2 = Playlist::findPlaylistByName("pypo_playlist_test");
//var_dump($pl2);
// Get current time
// In the format YYYY-MM-DD HH:MM:SS.nnnnnn
$startTime = date("Y-m-d H:i:s");
$endTime = date("Y-m-d H:i:s", time()+(60*60));
echo "Removing everything from the scheduler between $startTime and $endTime...";
// Scheduler: remove any playlists for the next hour
Schedule::RemoveItemsInRange($startTime, $endTime);
// Check for succcess
$scheduleClear = Schedule::isScheduleEmptyInRange($startTime, "01:00:00");
if (!$scheduleClear) {
echo "\nERROR: Schedule could not be cleared.\n\n";
var_dump(Schedule::GetItems($startTime, $endTime));
exit;
}
echo "done.\n";
// Schedule the playlist for two minutes from now
echo "Scheduling new playlist...\n";
$playTime = date("Y-m-d H:i:s", time()+(60*$minutesFromNow));
$scheduleGroup = new ScheduleGroup();
$scheduleGroup->add($playTime, null, $pl->getId());
echo " SUCCESS: Playlist scheduled at $playTime\n\n";
?>

View File

@ -2,25 +2,25 @@
#------------------------------------------------------------------------------- #-------------------------------------------------------------------------------
# Copyright (c) 2010 Sourcefabric O.P.S. # Copyright (c) 2010 Sourcefabric O.P.S.
# #
# This file is part of the Campcaster project. # This file is part of the Airtime project.
# http://campcaster.sourcefabric.org/ # http://campcaster.sourcefabric.org/
# #
# Campcaster is free software; you can redistribute it and/or modify # Airtime is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by # it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or # the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version. # (at your option) any later version.
# #
# Campcaster is distributed in the hope that it will be useful, # Airtime is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of # but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details. # GNU General Public License for more details.
# #
# You should have received a copy of the GNU General Public License # You should have received a copy of the GNU General Public License
# along with Campcaster; if not, write to the Free Software # along with Airtime; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
# #
#------------------------------------------------------------------------------- #-------------------------------------------------------------------------------
#------------------------------------------------------------------------------- #-------------------------------------------------------------------------------
# This script cleans audio files in the Campcaster storageServer. # This script cleans audio files in the Airtime storageServer.
php -q CleanStor.php "$@" || exit 1 php -q CleanStor.php "$@" || exit 1

View File

@ -2,26 +2,26 @@
#------------------------------------------------------------------------------- #-------------------------------------------------------------------------------
# Copyright (c) 2010 Sourcefabric O.P.S. # Copyright (c) 2010 Sourcefabric O.P.S.
# #
# This file is part of the Campcaster project. # This file is part of the Airtime project.
# http://campcaster.sourcefabric.org/ # http://campcaster.sourcefabric.org/
# #
# Campcaster is free software; you can redistribute it and/or modify # Airtime is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by # it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or # the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version. # (at your option) any later version.
# #
# Campcaster is distributed in the hope that it will be useful, # Airtime is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of # but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details. # GNU General Public License for more details.
# #
# You should have received a copy of the GNU General Public License # You should have received a copy of the GNU General Public License
# along with Campcaster; if not, write to the Free Software # along with Airtime; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
# #
#------------------------------------------------------------------------------- #-------------------------------------------------------------------------------
#------------------------------------------------------------------------------- #-------------------------------------------------------------------------------
# This script creates a tgz archive of the Campcaster storage. # This script creates a tgz archive of the Airtime storage.
# #
# To get usage help, try the -h option # To get usage help, try the -h option
#------------------------------------------------------------------------------- #-------------------------------------------------------------------------------
@ -44,7 +44,7 @@ destfile="storage$datestr.tar"
#------------------------------------------------------------------------------- #-------------------------------------------------------------------------------
printUsage() printUsage()
{ {
echo "This script creates a tgz archive of the Campcaster storage."; echo "This script creates a tgz archive of the Airtime storage.";
echo "parameters:"; echo "parameters:";
echo ""; echo "";
echo " -d, --destination Destination directory [default:$tmpmaindir]."; echo " -d, --destination Destination directory [default:$tmpmaindir].";
@ -91,7 +91,7 @@ tmpdir=`mktemp -d $tmpmaindir/tmp.XXXXXX`
echo "Backuping to $destdir/$destfile :" echo "Backuping to $destdir/$destfile :"
echo "Dumping database ..." echo "Dumping database ..."
cd $phpdir cd $phpdir
php -q campcaster_backup.php > $tmpdir/$dbxml php -q airtime_backup.php > $tmpdir/$dbxml
echo "Packaging stored files ..." echo "Packaging stored files ..."
cd $phpdir cd $phpdir
storpath=`php -q getStorPath.php` storpath=`php -q getStorPath.php`

View File

@ -2,26 +2,26 @@
#------------------------------------------------------------------------------- #-------------------------------------------------------------------------------
# Copyright (c) 2010 Sourcefabric O.P.S. # Copyright (c) 2010 Sourcefabric O.P.S.
# #
# This file is part of the Campcaster project. # This file is part of the Airtime project.
# http://campcaster.sourcefabric.org/ # http://campcaster.sourcefabric.org/
# #
# Campcaster is free software; you can redistribute it and/or modify # Airtime is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by # it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or # the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version. # (at your option) any later version.
# #
# Campcaster is distributed in the hope that it will be useful, # Airtime is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of # but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details. # GNU General Public License for more details.
# #
# You should have received a copy of the GNU General Public License # You should have received a copy of the GNU General Public License
# along with Campcaster; if not, write to the Free Software # along with Airtime; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
# #
#------------------------------------------------------------------------------- #-------------------------------------------------------------------------------
#------------------------------------------------------------------------------- #-------------------------------------------------------------------------------
# This script imports audio files to the Campcaster storageServer. # This script imports audio files to the Airtime storageServer.
# #
# To get usage help, try the -h option # To get usage help, try the -h option
#------------------------------------------------------------------------------- #-------------------------------------------------------------------------------
@ -40,4 +40,4 @@ invokePwd=$PWD
#echo $invokePwd #echo $invokePwd
cd $phpdir cd $phpdir
php -q campcaster-import.php --dir "$invokePwd" "$@" || exit 1 php -q airtime-import.php --dir "$invokePwd" "$@" || exit 1

View File

@ -2,7 +2,7 @@
/** /**
* Mass import of audio files. * Mass import of audio files.
* *
* @package Campcaster * @package Airtime
* @subpackage StorageAdmin * @subpackage StorageAdmin
* @copyright 2010 Sourcefabric O.P.S. * @copyright 2010 Sourcefabric O.P.S.
* @license http://www.gnu.org/licenses/gpl.txt * @license http://www.gnu.org/licenses/gpl.txt
@ -27,7 +27,7 @@ function camp_import_error_handler()
function printUsage() function printUsage()
{ {
global $CC_CONFIG; global $CC_CONFIG;
echo "There are two ways to import audio files into Campcaster: linking\n"; echo "There are two ways to import audio files into Airtime: linking\n";
echo "or copying.\n"; echo "or copying.\n";
echo "\n"; echo "\n";
echo "Linking has the advantage that it will not duplicate any files,\n"; echo "Linking has the advantage that it will not duplicate any files,\n";
@ -40,13 +40,13 @@ function printUsage()
echo "your files.\n"; echo "your files.\n";
echo "\n"; echo "\n";
echo "Usage:\n"; echo "Usage:\n";
echo " campcaster-import [OPTIONS] FILES_OR_DIRS\n"; echo " airtime-import [OPTIONS] FILES_OR_DIRS\n";
echo "\n"; echo "\n";
echo "Options:\n"; echo "Options:\n";
echo " -l, --link Link to specified files.\n"; echo " -l, --link Link to specified files.\n";
echo " Saves storage space, but you cannot move, delete,\n"; echo " Saves storage space, but you cannot move, delete,\n";
echo " or rename the original files, otherwise there will\n"; echo " or rename the original files, otherwise there will\n";
echo " be dead air when Campcaster tries to play the file.\n"; echo " be dead air when Airtime tries to play the file.\n";
echo "\n"; echo "\n";
echo " -c, --copy Copy the specified files.\n"; echo " -c, --copy Copy the specified files.\n";
echo " This is useful if you are importing from removable media.\n"; echo " This is useful if you are importing from removable media.\n";
@ -228,7 +228,7 @@ function camp_import_audio_file($p_filepath, $p_importMode = null, $p_testOnly =
$DEBUG_IMPORT = false; $DEBUG_IMPORT = false;
echo "========================\n"; echo "========================\n";
echo "Campcaster Import Script\n"; echo "Airtime Import Script\n";
echo "========================\n"; echo "========================\n";
$g_errors = 0; $g_errors = 0;
//print_r($argv); //print_r($argv);
@ -238,11 +238,11 @@ if ($DEBUG_IMPORT) {
$testonly = false; $testonly = false;
$importMode = "link"; $importMode = "link";
$files = array("/path/to/your/test/file.mp3"); $files = array("/path/to/your/test/file.mp3");
$dsn = array('username' => 'campcaster', $dsn = array('username' => 'airtime',
'password' => 'campcaster', 'password' => 'airtime',
'hostspec' => 'localhost', 'hostspec' => 'localhost',
'phptype' => 'pgsql', 'phptype' => 'pgsql',
'database' => 'campcaster'); 'database' => 'airtime');
} else { } else {
$dsn = $CC_CONFIG['dsn']; $dsn = $CC_CONFIG['dsn'];
} }
@ -350,4 +350,4 @@ if ($g_errors > 0) {
echo " *** Total: ".($g_fileCount+$g_duplicates)." files in $time seconds = $speed files/second.\n"; echo " *** Total: ".($g_fileCount+$g_duplicates)." files in $time seconds = $speed files/second.\n";
echo "==========================================================================\n"; echo "==========================================================================\n";
?> ?>

View File

@ -2,26 +2,26 @@
#------------------------------------------------------------------------------- #-------------------------------------------------------------------------------
# Copyright (c) 2010 Sourcefabric O.P.S. # Copyright (c) 2010 Sourcefabric O.P.S.
# #
# This file is part of the Campcaster project. # This file is part of the Airtime project.
# http://campcaster.sourcefabric.org/ # http://campcaster.sourcefabric.org/
# #
# Campcaster is free software; you can redistribute it and/or modify # Airtime is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by # it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or # the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version. # (at your option) any later version.
# #
# Campcaster is distributed in the hope that it will be useful, # Airtime is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of # but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details. # GNU General Public License for more details.
# #
# You should have received a copy of the GNU General Public License # You should have received a copy of the GNU General Public License
# along with Campcaster; if not, write to the Free Software # along with Airtime; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
# #
#------------------------------------------------------------------------------- #-------------------------------------------------------------------------------
#------------------------------------------------------------------------------- #-------------------------------------------------------------------------------
# This script restores the data which was backed up with campcaster-backup. # This script restores the data which was backed up with airtime-backup.
# #
# To get usage help, try the -h option # To get usage help, try the -h option
#------------------------------------------------------------------------------- #-------------------------------------------------------------------------------
@ -42,7 +42,7 @@ tarfile0="xmls.tar"
#------------------------------------------------------------------------------- #-------------------------------------------------------------------------------
printUsage() printUsage()
{ {
echo "This script restores the data which was backed up with campcaster-backup." echo "This script restores the data which was backed up with airtime-backup."
echo "parameters:"; echo "parameters:";
echo ""; echo "";
echo " -f, --file File with the backed up data, required."; echo " -f, --file File with the backed up data, required.";

View File

@ -2,22 +2,22 @@
#------------------------------------------------------------------------------- #-------------------------------------------------------------------------------
# Copyright (c) 2010 Sourcefabric O.P.S. # Copyright (c) 2010 Sourcefabric O.P.S.
# #
# This file is part of the Campcaster project. # This file is part of the Airtime project.
# http://campcaster.sourcefabric.org/ # http://campcaster.sourcefabric.org/
# To report bugs, send an e-mail to bugs@campware.org # To report bugs, send an e-mail to bugs@campware.org
# #
# Campcaster is free software; you can redistribute it and/or modify # Airtime is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by # it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or # the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version. # (at your option) any later version.
# #
# Campcaster is distributed in the hope that it will be useful, # Airtime is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of # but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details. # GNU General Public License for more details.
# #
# You should have received a copy of the GNU General Public License # You should have received a copy of the GNU General Public License
# along with Campcaster; if not, write to the Free Software # along with Airtime; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
# #
#------------------------------------------------------------------------------- #-------------------------------------------------------------------------------

View File

@ -3,22 +3,22 @@
#------------------------------------------------------------------------------- #-------------------------------------------------------------------------------
# Copyright (c) 2010 Sourcefabric O.P.S. # Copyright (c) 2010 Sourcefabric O.P.S.
# #
# This file is part of the Campcaster project. # This file is part of the Airtime project.
# http://campcaster.sourcefabric.org/ # http://campcaster.sourcefabric.org/
# To report bugs, send an e-mail to bugs@campware.org # To report bugs, send an e-mail to bugs@campware.org
# #
# Campcaster is free software; you can redistribute it and/or modify # Airtime is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by # it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or # the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version. # (at your option) any later version.
# #
# Campcaster is distributed in the hope that it will be useful, # Airtime is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of # but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details. # GNU General Public License for more details.
# #
# You should have received a copy of the GNU General Public License # You should have received a copy of the GNU General Public License
# along with Campcaster; if not, write to the Free Software # along with Airtime; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
# #
# #