diff --git a/.zfproject.xml b/.zfproject.xml
index 9aa1d3fdd..358200d6b 100644
--- a/.zfproject.xml
+++ b/.zfproject.xml
@@ -78,6 +78,9 @@
+
+
+
@@ -86,6 +89,7 @@
+
@@ -289,6 +293,17 @@
+
+
+
+
+
+
+
+
+
+
+
diff --git a/application/Bootstrap.php b/application/Bootstrap.php
index 8c4d878f3..b9389ca7b 100644
--- a/application/Bootstrap.php
+++ b/application/Bootstrap.php
@@ -30,7 +30,8 @@ if (PEAR::isError($CC_DBC)) {
}
$CC_DBC->setFetchMode(DB_FETCHMODE_ASSOC);
-Zend_Session::start();
+//Zend_Session::start();
+Zend_Validate::setDefaultNamespaces("Zend");
class Bootstrap extends Zend_Application_Bootstrap_Bootstrap
{
diff --git a/application/configs/airtime-conf.php b/application/configs/airtime-conf.php
index 144676b10..907c5efe1 100644
--- a/application/configs/airtime-conf.php
+++ b/application/configs/airtime-conf.php
@@ -1,6 +1,6 @@
array (
@@ -17,4 +17,4 @@ $conf = array (
'generator_version' => '1.5.2',
);
$conf['classmap'] = include(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'classmap-airtime-conf.php');
-return $conf;
\ No newline at end of file
+return $conf;
diff --git a/application/configs/navigation.php b/application/configs/navigation.php
index 56cd97696..1fc2ada39 100644
--- a/application/configs/navigation.php
+++ b/application/configs/navigation.php
@@ -10,10 +10,23 @@
$pages = array(
array(
'label' => 'Now Playing',
- 'module' => 'Nowplaying',
- 'controller' => 'index',
- 'action' => 'index',
- 'order' => -100 //make sure home is the first page
+ 'uri' => 'javascript:void(null)',
+ 'pages' => array(
+ array(
+ 'label' => 'Current',
+ 'module' => 'default',
+ 'controller' => 'Nowplaying',
+ 'action' => 'index',
+ 'resource' => 'Nowplaying'
+ ),
+ array(
+ 'label' => 'Daily View',
+ 'module' => 'default',
+ 'controller' => 'Nowplaying',
+ 'action' => 'day-view',
+ 'resource' => 'Nowplaying'
+ )
+ )
),
array(
'label' => 'Schedule',
diff --git a/application/controllers/NowplayingController.php b/application/controllers/NowplayingController.php
index 21741574b..4545787d4 100644
--- a/application/controllers/NowplayingController.php
+++ b/application/controllers/NowplayingController.php
@@ -6,27 +6,38 @@ class NowplayingController extends Zend_Controller_Action
public function init()
{
$ajaxContext = $this->_helper->getHelper('AjaxContext');
- $ajaxContext->addActionContext('get-data-grid-data', 'json')
- ->initContext();
+ $ajaxContext->addActionContext('get-data-grid-data', 'json')
+ ->initContext();
}
public function indexAction()
{
$this->view->headScript()->appendFile('/js/datatables/js/jquery.dataTables.min.js','text/javascript');
$this->view->headScript()->appendFile('/js/playlist/nowplayingdatagrid.js','text/javascript');
+ $this->view->headScript()->appendFile('/js/playlist/nowview.js','text/javascript');
}
public function getDataGridDataAction()
{
$viewType = $this->_request->getParam('view');
- $this->view->entries = Application_Model_Nowplaying::GetDataGridData($viewType);
+ $dateString = $this->_request->getParam('date');
+ $this->view->entries = Application_Model_Nowplaying::GetDataGridData($viewType, $dateString);
}
public function livestreamAction()
{
//use bare bones layout (no header bar or menu)
- $this->_helper->layout->setLayout('bare');
+ $this->_helper->layout->setLayout('bare');
}
+
+ public function dayViewAction()
+ {
+ $this->view->headScript()->appendFile('/js/datatables/js/jquery.dataTables.min.js','text/javascript');
+ $this->view->headScript()->appendFile('/js/playlist/nowplayingdatagrid.js','text/javascript');
+ $this->view->headScript()->appendFile('/js/playlist/dayview.js','text/javascript');
+ }
+
+
}
@@ -35,3 +46,5 @@ class NowplayingController extends Zend_Controller_Action
+
+
diff --git a/application/controllers/ScheduleController.php b/application/controllers/ScheduleController.php
index 9dfa22f63..13cdc8d7f 100644
--- a/application/controllers/ScheduleController.php
+++ b/application/controllers/ScheduleController.php
@@ -47,7 +47,7 @@ class ScheduleController extends Zend_Controller_Action
$end = $this->_getParam('end', null);
$userInfo = Zend_Auth::getInstance()->getStorage()->read();
- $user = new User($userInfo->id, $userInfo->type);
+ $user = new User($userInfo->id);
if($user->isAdmin())
$editable = true;
else
@@ -128,7 +128,7 @@ class ScheduleController extends Zend_Controller_Action
$showInstanceId = $this->_getParam('showInstanceId');
$userInfo = Zend_Auth::getInstance()->getStorage()->read();
- $user = new User($userInfo->id, $userInfo->type);
+ $user = new User($userInfo->id);
if($user->isAdmin()) {
$show = new ShowInstance($showInstanceId);
@@ -146,7 +146,7 @@ class ScheduleController extends Zend_Controller_Action
$showInstanceId = $this->_getParam('showInstanceId');
$userInfo = Zend_Auth::getInstance()->getStorage()->read();
- $user = new User($userInfo->id, $userInfo->type);
+ $user = new User($userInfo->id);
if($user->isAdmin()) {
$show = new ShowInstance($showInstanceId);
@@ -162,7 +162,7 @@ class ScheduleController extends Zend_Controller_Action
$showInstanceId = $this->_getParam('id');
$userInfo = Zend_Auth::getInstance()->getStorage()->read();
- $user = new User($userInfo->id, $userInfo->type);
+ $user = new User($userInfo->id);
if($user->isAdmin()) {
$show = new ShowInstance($showInstanceId);
@@ -176,7 +176,7 @@ class ScheduleController extends Zend_Controller_Action
$today_timestamp = date("Y-m-d H:i:s");
$userInfo = Zend_Auth::getInstance()->getStorage()->read();
- $user = new User($userInfo->id, $userInfo->type);
+ $user = new User($userInfo->id);
$show = new ShowInstance($id);
@@ -214,7 +214,7 @@ class ScheduleController extends Zend_Controller_Action
}
$userInfo = Zend_Auth::getInstance()->getStorage()->read();
- $user = new User($userInfo->id, $userInfo->type);
+ $user = new User($userInfo->id);
$show = new ShowInstance($showInstanceId);
if($user->isHost($show->getShowId())) {
@@ -233,7 +233,7 @@ class ScheduleController extends Zend_Controller_Action
{
$showInstanceId = $this->_getParam('id');
$userInfo = Zend_Auth::getInstance()->getStorage()->read();
- $user = new User($userInfo->id, $userInfo->type);
+ $user = new User($userInfo->id);
$show = new ShowInstance($showInstanceId);
if($user->isHost($show->getShowId()))
@@ -263,7 +263,7 @@ class ScheduleController extends Zend_Controller_Action
$search = $this->_getParam('search', null);
$userInfo = Zend_Auth::getInstance()->getStorage()->read();
- $user = new User($userInfo->id, $userInfo->type);
+ $user = new User($userInfo->id);
$show = new ShowInstance($showInstanceId);
if($user->isHost($show->getShowId())) {
diff --git a/application/controllers/UserController.php b/application/controllers/UserController.php
index 9700f2077..2cb2db0b4 100644
--- a/application/controllers/UserController.php
+++ b/application/controllers/UserController.php
@@ -5,43 +5,89 @@ class UserController extends Zend_Controller_Action
public function init()
{
- $ajaxContext = $this->_helper->getHelper('AjaxContext');
- $ajaxContext->addActionContext('get-hosts', 'json')
- ->initContext();
+ $ajaxContext = $this->_helper->getHelper('AjaxContext');
+ $ajaxContext->addActionContext('get-hosts', 'json')
+ ->addActionContext('get-user-data-table-info', 'json')
+ ->addActionContext('get-user-data', 'json')
+ ->addActionContext('remove-user', 'json')
+ ->initContext();
}
public function indexAction()
{
-
}
public function addUserAction()
- {
- $request = $this->getRequest();
- $form = new Application_Form_AddUser();
-
- if ($request->isPost()) {
- if ($form->isValid($request->getPost())) {
-
- $formdata = $form->getValues();
- User::addUser($formdata);
- $form->reset();
- }
- }
-
- $this->view->form = $form;
+ {
+
+
+ $this->view->headScript()->appendFile('/js/datatables/js/jquery.dataTables.js','text/javascript');
+ $this->view->headScript()->appendFile('/js/airtime/user/user.js','text/javascript');
+ $request = $this->getRequest();
+ $form = new Application_Form_AddUser();
+
+ if ($request->isPost()) {
+ if ($form->isValid($request->getPost())) {
+
+ $formdata = $form->getValues();
+ if ($form->validateLogin($formdata)){
+ $user = new User($formdata['user_id']);
+ $user->setFirstName($formdata['first_name']);
+ $user->setLastName($formdata['last_name']);
+ $user->setLogin($formdata['login']);
+ if ($formdata['password'] != "xxxxxx")
+ $user->setPassword($formdata['password']);
+ $user->setType($formdata['type']);
+ $user->save();
+
+ $form->reset();
+ }
+ }
+ }
+
+ $this->view->form = $form;
}
public function getHostsAction()
{
- $search = $this->_getParam('term');
-
- $this->view->hosts = User::getHosts($search);
+ $search = $this->_getParam('term');
+ $this->view->hosts = User::getHosts($search);
}
+ public function getUserDataTableInfoAction()
+ {
+ $post = $this->getRequest()->getPost();
+ $users = User::getUsersDataTablesInfo($post);
+
+
+ die(json_encode($users));
+ }
+
+ public function getUserDataAction()
+ {
+ $id = $this->_getParam('id');
+ $this->view->entries = User::GetUserData($id);
+ }
+
+ public function removeUserAction()
+ {
+ // action body
+ $id = $this->_getParam('id');
+ $user = new User($id);
+
+ $this->view->entries = $user->delete();
+ }
+
+
}
+
+
+
+
+
+
diff --git a/application/forms/AddUser.php b/application/forms/AddUser.php
index 5fa76dcdb..f6bd24980 100644
--- a/application/forms/AddUser.php
+++ b/application/forms/AddUser.php
@@ -5,56 +5,78 @@ class Application_Form_AddUser extends Zend_Form
public function init()
{
- // Add login element
- $this->addElement('text', 'login', array(
- 'label' => 'Username:',
- 'required' => true,
- 'filters' => array('StringTrim'),
- 'validators' => array('NotEmpty')
- ));
-
- // Add password element
- $this->addElement('text', 'password', array(
- 'label' => 'Password:',
- 'required' => true,
- 'filters' => array('StringTrim'),
- 'validators' => array('NotEmpty')
- ));
-
- // Add first name element
- $this->addElement('text', 'first_name', array(
- 'label' => 'Firstname:',
- 'required' => true,
- 'filters' => array('StringTrim'),
- 'validators' => array('NotEmpty')
- ));
-
- // Add last name element
- $this->addElement('text', 'last_name', array(
- 'label' => 'Lastname:',
- 'required' => true,
- 'filters' => array('StringTrim'),
- 'validators' => array('NotEmpty')
- ));
-
- //Add type select
- $this->addElement('select', 'type', array(
- 'required' => true,
- 'multiOptions' => array(
- "A" => "admin",
+ /*
+ $this->addElementPrefixPath('Application_Validate',
+ '../application/validate',
+ 'validate');
+ * */
+
+ $hidden = new Zend_Form_Element_Hidden('user_id');
+ $hidden->setAttrib('style', 'display: none;');
+ $this->addElement($hidden);
+
+ $login = new Zend_Form_Element_Text('login');
+ $login->setLabel('Username:');
+ $login->setAttrib('class', 'input_text');
+ $login->setRequired(true);
+ $login->addFilter('StringTrim');
+ //$login->addValidator('UserNameValidate');
+ $this->addElement($login);
+
+ $password = new Zend_Form_Element_Password('password');
+ $password->setLabel('Password:');
+ $password->setAttrib('class', 'input_text');
+ $password->setRequired(true);
+ $password->addFilter('StringTrim');
+ $password->addValidator('NotEmpty');
+ $this->addElement($password);
+
+ $firstName = new Zend_Form_Element_Text('first_name');
+ $firstName->setLabel('Firstname:');
+ $firstName->setAttrib('class', 'input_text');
+ $firstName->setRequired(true);
+ $firstName->addFilter('StringTrim');
+ $firstName->addValidator('NotEmpty');
+ $this->addElement($firstName);
+
+ $lastName = new Zend_Form_Element_Text('last_name');
+ $lastName->setLabel('Lastname:');
+ $lastName->setAttrib('class', 'input_text');
+ $lastName->setRequired(true);
+ $lastName->addFilter('StringTrim');
+ $lastName->addValidator('NotEmpty');
+ $this->addElement($lastName);
+
+ $select = new Zend_Form_Element_Select('type');
+ $select->setAttrib('class', 'input_select');
+ $select->setAttrib('style', 'width: 40%');
+ $select->setMultiOptions(array(
+ "A" => "admin",
"H" => "host",
- "G" => "guest",
- ),
- ));
-
- // Add the submit button
- $this->addElement('submit', 'submit', array(
- 'ignore' => true,
- 'label' => 'Submit',
- ));
-
+ "G" => "guest",
+ ));
+ $select->setRequired(true);
+ $this->addElement($select);
+
+ $submit = new Zend_Form_Element_Submit('submit');
+ $submit->setAttrib('class', 'ui-button ui-state-default right-floated');
+ $submit->setIgnore(true);
+ $submit->setLabel('submit');
+ $this->addElement($submit);
+ }
+
+ public function validateLogin($data){
+
+ if (strlen($data['user_id']) == 0){
+ $count = CcSubjsQuery::create()->filterByDbLogin($data['login'])->count();
+
+ if ($count != 0){
+ $this->getElement('login')->setErrors(array("login name is not unique."));
+ return false;
+ }
+ }
+
+ return true;
}
-
-
}
diff --git a/application/models/DateHelper.php b/application/models/DateHelper.php
index 6dff44715..6c44dd055 100644
--- a/application/models/DateHelper.php
+++ b/application/models/DateHelper.php
@@ -12,6 +12,10 @@ class Application_Model_DateHelper
return date("Y-m-d H:i:s", $this->_timestamp);
}
+ function setDate($dateString){
+ $this->_timestamp = strtotime($dateString);
+ }
+
function getNowDayStartDiff(){
$dayStartTS = strtotime(date("Y-m-d", $this->_timestamp));
return $this->_timestamp - $dayStartTS;
diff --git a/application/models/Nowplaying.php b/application/models/Nowplaying.php
index 9aeb549d2..a3441c47d 100644
--- a/application/models/Nowplaying.php
+++ b/application/models/Nowplaying.php
@@ -42,13 +42,14 @@ class Application_Model_Nowplaying
return $rows;
}
- public static function GetDataGridData($viewType){
-
- $date = Schedule::GetSchedulerTime();
- $timeNow = $date->getDate();
+ public static function GetDataGridData($viewType, $dateString){
+ //echo $dateString;
if ($viewType == "now"){
+ $date = new Application_Model_DateHelper;
+ $timeNow = $date->getDate();
+
/* When do "ORDER BY x DESC LIMIT 5" to ensure that we get the last 5 previously scheduled items.
* However using DESC, puts our scheduled items in reverse order, so we need to reverse it again
* with array_reverse.
@@ -57,6 +58,9 @@ class Application_Model_Nowplaying
$current = Schedule::Get_Scheduled_Item_Data($timeNow, 0);
$next = Schedule::Get_Scheduled_Item_Data($timeNow, 1, 10, "24 hours");
} else {
+ $date = new Application_Model_DateHelper;
+ $date->setDate($dateString);
+ $timeNow = $date->getDate();
$previous = array_reverse(Schedule::Get_Scheduled_Item_Data($timeNow, -1, "ALL", $date->getNowDayStartDiff()." seconds"));
$current = Schedule::Get_Scheduled_Item_Data($timeNow, 0);
diff --git a/application/models/Schedule.php b/application/models/Schedule.php
index 1383f4b23..d1f9830be 100644
--- a/application/models/Schedule.php
+++ b/application/models/Schedule.php
@@ -419,21 +419,6 @@ class Schedule {
return $rows;
}
-
- /**
- * Returns the date of the server in the format
- * "YYYY-MM-DD HH:mm:SS".
- *
- * Note: currently assuming that Web Server and Scheduler are on the
- * same host.
- *
- * @return date Current server time.
- */
- public static function GetSchedulerTime() {
- $date = new Application_Model_DateHelper;
- return $date;
- }
-
/**
* Returns data related to the scheduled items.
*
@@ -447,7 +432,7 @@ class Schedule {
return array();
}
- $date = Schedule::GetSchedulerTime();
+ $date = new Application_Model_DateHelper;
$timeNow = $date->getDate();
return array("env"=>APPLICATION_ENV,
"schedulerTime"=>gmdate("Y-m-d H:i:s"),
diff --git a/application/models/StoredFile.php b/application/models/StoredFile.php
index 3e8149d90..c4d379b3a 100644
--- a/application/models/StoredFile.php
+++ b/application/models/StoredFile.php
@@ -1797,7 +1797,7 @@ class StoredFile {
return StoredFile::searchFiles($fromTable, $datatables);
}
- private static function searchFiles($fromTable, $data)
+ public static function searchFiles($fromTable, $data)
{
global $CC_CONFIG, $CC_DBC;
diff --git a/application/models/Users.php b/application/models/Users.php
index bcc8c5a8b..6cb618cbc 100644
--- a/application/models/Users.php
+++ b/application/models/Users.php
@@ -2,41 +2,92 @@
class User {
- private $_userRole;
- private $_userId;
+ private $_userInstance;
- public function __construct($userId, $userType='G')
+ public function __construct($userId)
{
- $this->_userRole = $userType;
- $this->_userId = $userId;
+ if (strlen($userId)==0){
+ $this->_userInstance = $this->createUser();
+ } else {
+ $this->_userInstance = CcSubjsQuery::create()->findPK($userId);
+ }
}
- public function getType() {
- return $this->userRole;
- }
-
public function getId() {
- return $this->_userId;
+ return $this->_userInstance->getDbId();
}
public function isHost($showId) {
- return CcShowHostsQuery::create()->filterByDbShow($showId)->filterByDbHost($this->_userId)->count() > 0;
+ $userId = $this->_userInstance->getDbId();
+ return CcShowHostsQuery::create()->filterByDbShow($showId)->filterByDbHost($userId)->count() > 0;
}
public function isAdmin() {
- return $this->_userRole === 'A';
+ return $this->_userInstance->getDbType() === 'A';
}
+
+ public function setLogin($login){
+ $user = $this->_userInstance;
+ $user->setDbLogin($login);
+ }
+
+ public function setPassword($password){
+ $user = $this->_userInstance;
+ $user->setDbPass(md5($password));
+ }
+
+ public function setFirstName($firstName){
+ $user = $this->_userInstance;
+ $user->setDbFirstName($firstName);
+ }
+
+ public function setLastName($lastName){
+ $user = $this->_userInstance;
+ $user->setDbLastName($lastName);
+ }
+
+ public function setType($type){
+ $user = $this->_userInstance;
+ $user->setDbType($type);
+ }
+
+ public function getLogin(){
+ $user = $this->_userInstance;
+ return $user->getDbLogin();
+ }
+
+ public function getPassword(){
+ $user = $this->_userInstance;
+ return $user->getDbPass();
+ }
+
+ public function getFirstName(){
+ $user = $this->_userInstance;
+ return $user->getDbFirstName();
+ }
+
+ public function getLastName(){
+ $user = $this->_userInstance;
+ return $user->getDbLastName();
+ }
+
+ public function getType(){
+ $user = $this->_userInstance;
+ return $user->getDbType();
+ }
+
+ public function save(){
+ $this->_userInstance->save();
+ }
+
+ public function delete(){
+ if (!$this->_userInstance->isDeleted())
+ $this->_userInstance->delete();
+ }
- public static function addUser($data) {
-
- $user = new CcSubjs();
- $user->setDbLogin($data['login']);
- $user->setDbPass(md5($data['password']));
- $user->setDbFirstName($data['first_name']);
- $user->setDbLastName($data['last_name']);
- $user->setDbType($data['type']);
- $user->save();
-
+ private function createUser() {
+ $user = new CcSubjs();
+ return $user;
}
public static function getUsers($type, $search=NULL) {
@@ -71,5 +122,21 @@ class User {
public static function getHosts($search=NULL) {
return User::getUsers(array('H', 'A'), $search);
}
+
+ public static function getUsersDataTablesInfo($datatables_post) {
+
+ $fromTable = "cc_subjs";
+ return StoredFile::searchFiles($fromTable, $datatables_post);
+ }
+
+ public static function getUserData($id){
+ global $CC_DBC;
+
+ $sql = "SELECT login, first_name, last_name, type, id"
+ ." FROM cc_subjs"
+ ." WHERE id = $id";
+
+ return $CC_DBC->GetRow($sql);
+ }
}
diff --git a/application/models/airtime/map/CcSubjsTableMap.php b/application/models/airtime/map/CcSubjsTableMap.php
index 14b132c41..2d644a515 100644
--- a/application/models/airtime/map/CcSubjsTableMap.php
+++ b/application/models/airtime/map/CcSubjsTableMap.php
@@ -46,6 +46,9 @@ class CcSubjsTableMap extends TableMap {
$this->addColumn('LAST_NAME', 'DbLastName', 'VARCHAR', true, 255, '');
$this->addColumn('LASTLOGIN', 'DbLastlogin', 'TIMESTAMP', false, null, null);
$this->addColumn('LASTFAIL', 'DbLastfail', 'TIMESTAMP', false, null, null);
+ $this->addColumn('SKYPE_CONTACT', 'DbSkypeContact', 'VARCHAR', false, 255, null);
+ $this->addColumn('JABBER_CONTACT', 'DbJabberContact', 'VARCHAR', false, 255, null);
+ $this->addColumn('EMAIL', 'DbEmail', 'VARCHAR', false, 255, null);
// validators
} // initialize()
diff --git a/application/models/airtime/om/BaseCcSubjs.php b/application/models/airtime/om/BaseCcSubjs.php
index bc90d9504..3ddc3313c 100644
--- a/application/models/airtime/om/BaseCcSubjs.php
+++ b/application/models/airtime/om/BaseCcSubjs.php
@@ -77,6 +77,24 @@ abstract class BaseCcSubjs extends BaseObject implements Persistent
*/
protected $lastfail;
+ /**
+ * The value for the skype_contact field.
+ * @var string
+ */
+ protected $skype_contact;
+
+ /**
+ * The value for the jabber_contact field.
+ * @var string
+ */
+ protected $jabber_contact;
+
+ /**
+ * The value for the email field.
+ * @var string
+ */
+ protected $email;
+
/**
* @var array CcAccess[] Collection to store aggregation of CcAccess objects.
*/
@@ -277,6 +295,36 @@ abstract class BaseCcSubjs extends BaseObject implements Persistent
}
}
+ /**
+ * Get the [skype_contact] column value.
+ *
+ * @return string
+ */
+ public function getDbSkypeContact()
+ {
+ return $this->skype_contact;
+ }
+
+ /**
+ * Get the [jabber_contact] column value.
+ *
+ * @return string
+ */
+ public function getDbJabberContact()
+ {
+ return $this->jabber_contact;
+ }
+
+ /**
+ * Get the [email] column value.
+ *
+ * @return string
+ */
+ public function getDbEmail()
+ {
+ return $this->email;
+ }
+
/**
* Set the value of [id] column.
*
@@ -495,6 +543,66 @@ abstract class BaseCcSubjs extends BaseObject implements Persistent
return $this;
} // setDbLastfail()
+ /**
+ * Set the value of [skype_contact] column.
+ *
+ * @param string $v new value
+ * @return CcSubjs The current object (for fluent API support)
+ */
+ public function setDbSkypeContact($v)
+ {
+ if ($v !== null) {
+ $v = (string) $v;
+ }
+
+ if ($this->skype_contact !== $v) {
+ $this->skype_contact = $v;
+ $this->modifiedColumns[] = CcSubjsPeer::SKYPE_CONTACT;
+ }
+
+ return $this;
+ } // setDbSkypeContact()
+
+ /**
+ * Set the value of [jabber_contact] column.
+ *
+ * @param string $v new value
+ * @return CcSubjs The current object (for fluent API support)
+ */
+ public function setDbJabberContact($v)
+ {
+ if ($v !== null) {
+ $v = (string) $v;
+ }
+
+ if ($this->jabber_contact !== $v) {
+ $this->jabber_contact = $v;
+ $this->modifiedColumns[] = CcSubjsPeer::JABBER_CONTACT;
+ }
+
+ return $this;
+ } // setDbJabberContact()
+
+ /**
+ * Set the value of [email] column.
+ *
+ * @param string $v new value
+ * @return CcSubjs The current object (for fluent API support)
+ */
+ public function setDbEmail($v)
+ {
+ if ($v !== null) {
+ $v = (string) $v;
+ }
+
+ if ($this->email !== $v) {
+ $this->email = $v;
+ $this->modifiedColumns[] = CcSubjsPeer::EMAIL;
+ }
+
+ return $this;
+ } // setDbEmail()
+
/**
* Indicates whether the columns in this object are only set to default values.
*
@@ -555,6 +663,9 @@ abstract class BaseCcSubjs extends BaseObject implements Persistent
$this->last_name = ($row[$startcol + 5] !== null) ? (string) $row[$startcol + 5] : null;
$this->lastlogin = ($row[$startcol + 6] !== null) ? (string) $row[$startcol + 6] : null;
$this->lastfail = ($row[$startcol + 7] !== null) ? (string) $row[$startcol + 7] : null;
+ $this->skype_contact = ($row[$startcol + 8] !== null) ? (string) $row[$startcol + 8] : null;
+ $this->jabber_contact = ($row[$startcol + 9] !== null) ? (string) $row[$startcol + 9] : null;
+ $this->email = ($row[$startcol + 10] !== null) ? (string) $row[$startcol + 10] : null;
$this->resetModified();
$this->setNew(false);
@@ -563,7 +674,7 @@ abstract class BaseCcSubjs extends BaseObject implements Persistent
$this->ensureConsistency();
}
- return $startcol + 8; // 8 = CcSubjsPeer::NUM_COLUMNS - CcSubjsPeer::NUM_LAZY_LOAD_COLUMNS).
+ return $startcol + 11; // 11 = CcSubjsPeer::NUM_COLUMNS - CcSubjsPeer::NUM_LAZY_LOAD_COLUMNS).
} catch (Exception $e) {
throw new PropelException("Error populating CcSubjs object", $e);
@@ -1012,6 +1123,15 @@ abstract class BaseCcSubjs extends BaseObject implements Persistent
case 7:
return $this->getDbLastfail();
break;
+ case 8:
+ return $this->getDbSkypeContact();
+ break;
+ case 9:
+ return $this->getDbJabberContact();
+ break;
+ case 10:
+ return $this->getDbEmail();
+ break;
default:
return null;
break;
@@ -1043,6 +1163,9 @@ abstract class BaseCcSubjs extends BaseObject implements Persistent
$keys[5] => $this->getDbLastName(),
$keys[6] => $this->getDbLastlogin(),
$keys[7] => $this->getDbLastfail(),
+ $keys[8] => $this->getDbSkypeContact(),
+ $keys[9] => $this->getDbJabberContact(),
+ $keys[10] => $this->getDbEmail(),
);
return $result;
}
@@ -1098,6 +1221,15 @@ abstract class BaseCcSubjs extends BaseObject implements Persistent
case 7:
$this->setDbLastfail($value);
break;
+ case 8:
+ $this->setDbSkypeContact($value);
+ break;
+ case 9:
+ $this->setDbJabberContact($value);
+ break;
+ case 10:
+ $this->setDbEmail($value);
+ break;
} // switch()
}
@@ -1130,6 +1262,9 @@ abstract class BaseCcSubjs extends BaseObject implements Persistent
if (array_key_exists($keys[5], $arr)) $this->setDbLastName($arr[$keys[5]]);
if (array_key_exists($keys[6], $arr)) $this->setDbLastlogin($arr[$keys[6]]);
if (array_key_exists($keys[7], $arr)) $this->setDbLastfail($arr[$keys[7]]);
+ if (array_key_exists($keys[8], $arr)) $this->setDbSkypeContact($arr[$keys[8]]);
+ if (array_key_exists($keys[9], $arr)) $this->setDbJabberContact($arr[$keys[9]]);
+ if (array_key_exists($keys[10], $arr)) $this->setDbEmail($arr[$keys[10]]);
}
/**
@@ -1149,6 +1284,9 @@ abstract class BaseCcSubjs extends BaseObject implements Persistent
if ($this->isColumnModified(CcSubjsPeer::LAST_NAME)) $criteria->add(CcSubjsPeer::LAST_NAME, $this->last_name);
if ($this->isColumnModified(CcSubjsPeer::LASTLOGIN)) $criteria->add(CcSubjsPeer::LASTLOGIN, $this->lastlogin);
if ($this->isColumnModified(CcSubjsPeer::LASTFAIL)) $criteria->add(CcSubjsPeer::LASTFAIL, $this->lastfail);
+ if ($this->isColumnModified(CcSubjsPeer::SKYPE_CONTACT)) $criteria->add(CcSubjsPeer::SKYPE_CONTACT, $this->skype_contact);
+ if ($this->isColumnModified(CcSubjsPeer::JABBER_CONTACT)) $criteria->add(CcSubjsPeer::JABBER_CONTACT, $this->jabber_contact);
+ if ($this->isColumnModified(CcSubjsPeer::EMAIL)) $criteria->add(CcSubjsPeer::EMAIL, $this->email);
return $criteria;
}
@@ -1217,6 +1355,9 @@ abstract class BaseCcSubjs extends BaseObject implements Persistent
$copyObj->setDbLastName($this->last_name);
$copyObj->setDbLastlogin($this->lastlogin);
$copyObj->setDbLastfail($this->lastfail);
+ $copyObj->setDbSkypeContact($this->skype_contact);
+ $copyObj->setDbJabberContact($this->jabber_contact);
+ $copyObj->setDbEmail($this->email);
if ($deepCopy) {
// important: temporarily setNew(false) because this affects the behavior of
@@ -2111,6 +2252,9 @@ abstract class BaseCcSubjs extends BaseObject implements Persistent
$this->last_name = null;
$this->lastlogin = null;
$this->lastfail = null;
+ $this->skype_contact = null;
+ $this->jabber_contact = null;
+ $this->email = null;
$this->alreadyInSave = false;
$this->alreadyInValidation = false;
$this->clearAllReferences();
diff --git a/application/models/airtime/om/BaseCcSubjsPeer.php b/application/models/airtime/om/BaseCcSubjsPeer.php
index 202711cbd..3743a4aab 100644
--- a/application/models/airtime/om/BaseCcSubjsPeer.php
+++ b/application/models/airtime/om/BaseCcSubjsPeer.php
@@ -26,7 +26,7 @@ abstract class BaseCcSubjsPeer {
const TM_CLASS = 'CcSubjsTableMap';
/** The total number of columns. */
- const NUM_COLUMNS = 8;
+ const NUM_COLUMNS = 11;
/** The number of lazy-loaded columns. */
const NUM_LAZY_LOAD_COLUMNS = 0;
@@ -55,6 +55,15 @@ abstract class BaseCcSubjsPeer {
/** the column name for the LASTFAIL field */
const LASTFAIL = 'cc_subjs.LASTFAIL';
+ /** the column name for the SKYPE_CONTACT field */
+ const SKYPE_CONTACT = 'cc_subjs.SKYPE_CONTACT';
+
+ /** the column name for the JABBER_CONTACT field */
+ const JABBER_CONTACT = 'cc_subjs.JABBER_CONTACT';
+
+ /** the column name for the EMAIL field */
+ const EMAIL = 'cc_subjs.EMAIL';
+
/**
* An identiy map to hold any loaded instances of CcSubjs objects.
* This must be public so that other peer classes can access this when hydrating from JOIN
@@ -71,12 +80,12 @@ abstract class BaseCcSubjsPeer {
* e.g. self::$fieldNames[self::TYPE_PHPNAME][0] = 'Id'
*/
private static $fieldNames = array (
- BasePeer::TYPE_PHPNAME => array ('DbId', 'DbLogin', 'DbPass', 'DbType', 'DbFirstName', 'DbLastName', 'DbLastlogin', 'DbLastfail', ),
- BasePeer::TYPE_STUDLYPHPNAME => array ('dbId', 'dbLogin', 'dbPass', 'dbType', 'dbFirstName', 'dbLastName', 'dbLastlogin', 'dbLastfail', ),
- BasePeer::TYPE_COLNAME => array (self::ID, self::LOGIN, self::PASS, self::TYPE, self::FIRST_NAME, self::LAST_NAME, self::LASTLOGIN, self::LASTFAIL, ),
- BasePeer::TYPE_RAW_COLNAME => array ('ID', 'LOGIN', 'PASS', 'TYPE', 'FIRST_NAME', 'LAST_NAME', 'LASTLOGIN', 'LASTFAIL', ),
- BasePeer::TYPE_FIELDNAME => array ('id', 'login', 'pass', 'type', 'first_name', 'last_name', 'lastlogin', 'lastfail', ),
- BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, )
+ BasePeer::TYPE_PHPNAME => array ('DbId', 'DbLogin', 'DbPass', 'DbType', 'DbFirstName', 'DbLastName', 'DbLastlogin', 'DbLastfail', 'DbSkypeContact', 'DbJabberContact', 'DbEmail', ),
+ BasePeer::TYPE_STUDLYPHPNAME => array ('dbId', 'dbLogin', 'dbPass', 'dbType', 'dbFirstName', 'dbLastName', 'dbLastlogin', 'dbLastfail', 'dbSkypeContact', 'dbJabberContact', 'dbEmail', ),
+ BasePeer::TYPE_COLNAME => array (self::ID, self::LOGIN, self::PASS, self::TYPE, self::FIRST_NAME, self::LAST_NAME, self::LASTLOGIN, self::LASTFAIL, self::SKYPE_CONTACT, self::JABBER_CONTACT, self::EMAIL, ),
+ BasePeer::TYPE_RAW_COLNAME => array ('ID', 'LOGIN', 'PASS', 'TYPE', 'FIRST_NAME', 'LAST_NAME', 'LASTLOGIN', 'LASTFAIL', 'SKYPE_CONTACT', 'JABBER_CONTACT', 'EMAIL', ),
+ BasePeer::TYPE_FIELDNAME => array ('id', 'login', 'pass', 'type', 'first_name', 'last_name', 'lastlogin', 'lastfail', 'skype_contact', 'jabber_contact', 'email', ),
+ BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, )
);
/**
@@ -86,12 +95,12 @@ abstract class BaseCcSubjsPeer {
* e.g. self::$fieldNames[BasePeer::TYPE_PHPNAME]['Id'] = 0
*/
private static $fieldKeys = array (
- BasePeer::TYPE_PHPNAME => array ('DbId' => 0, 'DbLogin' => 1, 'DbPass' => 2, 'DbType' => 3, 'DbFirstName' => 4, 'DbLastName' => 5, 'DbLastlogin' => 6, 'DbLastfail' => 7, ),
- BasePeer::TYPE_STUDLYPHPNAME => array ('dbId' => 0, 'dbLogin' => 1, 'dbPass' => 2, 'dbType' => 3, 'dbFirstName' => 4, 'dbLastName' => 5, 'dbLastlogin' => 6, 'dbLastfail' => 7, ),
- BasePeer::TYPE_COLNAME => array (self::ID => 0, self::LOGIN => 1, self::PASS => 2, self::TYPE => 3, self::FIRST_NAME => 4, self::LAST_NAME => 5, self::LASTLOGIN => 6, self::LASTFAIL => 7, ),
- BasePeer::TYPE_RAW_COLNAME => array ('ID' => 0, 'LOGIN' => 1, 'PASS' => 2, 'TYPE' => 3, 'FIRST_NAME' => 4, 'LAST_NAME' => 5, 'LASTLOGIN' => 6, 'LASTFAIL' => 7, ),
- BasePeer::TYPE_FIELDNAME => array ('id' => 0, 'login' => 1, 'pass' => 2, 'type' => 3, 'first_name' => 4, 'last_name' => 5, 'lastlogin' => 6, 'lastfail' => 7, ),
- BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, )
+ BasePeer::TYPE_PHPNAME => array ('DbId' => 0, 'DbLogin' => 1, 'DbPass' => 2, 'DbType' => 3, 'DbFirstName' => 4, 'DbLastName' => 5, 'DbLastlogin' => 6, 'DbLastfail' => 7, 'DbSkypeContact' => 8, 'DbJabberContact' => 9, 'DbEmail' => 10, ),
+ BasePeer::TYPE_STUDLYPHPNAME => array ('dbId' => 0, 'dbLogin' => 1, 'dbPass' => 2, 'dbType' => 3, 'dbFirstName' => 4, 'dbLastName' => 5, 'dbLastlogin' => 6, 'dbLastfail' => 7, 'dbSkypeContact' => 8, 'dbJabberContact' => 9, 'dbEmail' => 10, ),
+ BasePeer::TYPE_COLNAME => array (self::ID => 0, self::LOGIN => 1, self::PASS => 2, self::TYPE => 3, self::FIRST_NAME => 4, self::LAST_NAME => 5, self::LASTLOGIN => 6, self::LASTFAIL => 7, self::SKYPE_CONTACT => 8, self::JABBER_CONTACT => 9, self::EMAIL => 10, ),
+ BasePeer::TYPE_RAW_COLNAME => array ('ID' => 0, 'LOGIN' => 1, 'PASS' => 2, 'TYPE' => 3, 'FIRST_NAME' => 4, 'LAST_NAME' => 5, 'LASTLOGIN' => 6, 'LASTFAIL' => 7, 'SKYPE_CONTACT' => 8, 'JABBER_CONTACT' => 9, 'EMAIL' => 10, ),
+ BasePeer::TYPE_FIELDNAME => array ('id' => 0, 'login' => 1, 'pass' => 2, 'type' => 3, 'first_name' => 4, 'last_name' => 5, 'lastlogin' => 6, 'lastfail' => 7, 'skype_contact' => 8, 'jabber_contact' => 9, 'email' => 10, ),
+ BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, )
);
/**
@@ -171,6 +180,9 @@ abstract class BaseCcSubjsPeer {
$criteria->addSelectColumn(CcSubjsPeer::LAST_NAME);
$criteria->addSelectColumn(CcSubjsPeer::LASTLOGIN);
$criteria->addSelectColumn(CcSubjsPeer::LASTFAIL);
+ $criteria->addSelectColumn(CcSubjsPeer::SKYPE_CONTACT);
+ $criteria->addSelectColumn(CcSubjsPeer::JABBER_CONTACT);
+ $criteria->addSelectColumn(CcSubjsPeer::EMAIL);
} else {
$criteria->addSelectColumn($alias . '.ID');
$criteria->addSelectColumn($alias . '.LOGIN');
@@ -180,6 +192,9 @@ abstract class BaseCcSubjsPeer {
$criteria->addSelectColumn($alias . '.LAST_NAME');
$criteria->addSelectColumn($alias . '.LASTLOGIN');
$criteria->addSelectColumn($alias . '.LASTFAIL');
+ $criteria->addSelectColumn($alias . '.SKYPE_CONTACT');
+ $criteria->addSelectColumn($alias . '.JABBER_CONTACT');
+ $criteria->addSelectColumn($alias . '.EMAIL');
}
}
diff --git a/application/models/airtime/om/BaseCcSubjsQuery.php b/application/models/airtime/om/BaseCcSubjsQuery.php
index a38e68049..857fbcdf4 100644
--- a/application/models/airtime/om/BaseCcSubjsQuery.php
+++ b/application/models/airtime/om/BaseCcSubjsQuery.php
@@ -14,6 +14,9 @@
* @method CcSubjsQuery orderByDbLastName($order = Criteria::ASC) Order by the last_name column
* @method CcSubjsQuery orderByDbLastlogin($order = Criteria::ASC) Order by the lastlogin column
* @method CcSubjsQuery orderByDbLastfail($order = Criteria::ASC) Order by the lastfail column
+ * @method CcSubjsQuery orderByDbSkypeContact($order = Criteria::ASC) Order by the skype_contact column
+ * @method CcSubjsQuery orderByDbJabberContact($order = Criteria::ASC) Order by the jabber_contact column
+ * @method CcSubjsQuery orderByDbEmail($order = Criteria::ASC) Order by the email column
*
* @method CcSubjsQuery groupByDbId() Group by the id column
* @method CcSubjsQuery groupByDbLogin() Group by the login column
@@ -23,6 +26,9 @@
* @method CcSubjsQuery groupByDbLastName() Group by the last_name column
* @method CcSubjsQuery groupByDbLastlogin() Group by the lastlogin column
* @method CcSubjsQuery groupByDbLastfail() Group by the lastfail column
+ * @method CcSubjsQuery groupByDbSkypeContact() Group by the skype_contact column
+ * @method CcSubjsQuery groupByDbJabberContact() Group by the jabber_contact column
+ * @method CcSubjsQuery groupByDbEmail() Group by the email column
*
* @method CcSubjsQuery leftJoin($relation) Adds a LEFT JOIN clause to the query
* @method CcSubjsQuery rightJoin($relation) Adds a RIGHT JOIN clause to the query
@@ -67,6 +73,9 @@
* @method CcSubjs findOneByDbLastName(string $last_name) Return the first CcSubjs filtered by the last_name column
* @method CcSubjs findOneByDbLastlogin(string $lastlogin) Return the first CcSubjs filtered by the lastlogin column
* @method CcSubjs findOneByDbLastfail(string $lastfail) Return the first CcSubjs filtered by the lastfail column
+ * @method CcSubjs findOneByDbSkypeContact(string $skype_contact) Return the first CcSubjs filtered by the skype_contact column
+ * @method CcSubjs findOneByDbJabberContact(string $jabber_contact) Return the first CcSubjs filtered by the jabber_contact column
+ * @method CcSubjs findOneByDbEmail(string $email) Return the first CcSubjs filtered by the email column
*
* @method array findByDbId(int $id) Return CcSubjs objects filtered by the id column
* @method array findByDbLogin(string $login) Return CcSubjs objects filtered by the login column
@@ -76,6 +85,9 @@
* @method array findByDbLastName(string $last_name) Return CcSubjs objects filtered by the last_name column
* @method array findByDbLastlogin(string $lastlogin) Return CcSubjs objects filtered by the lastlogin column
* @method array findByDbLastfail(string $lastfail) Return CcSubjs objects filtered by the lastfail column
+ * @method array findByDbSkypeContact(string $skype_contact) Return CcSubjs objects filtered by the skype_contact column
+ * @method array findByDbJabberContact(string $jabber_contact) Return CcSubjs objects filtered by the jabber_contact column
+ * @method array findByDbEmail(string $email) Return CcSubjs objects filtered by the email column
*
* @package propel.generator.airtime.om
*/
@@ -374,6 +386,72 @@ abstract class BaseCcSubjsQuery extends ModelCriteria
return $this->addUsingAlias(CcSubjsPeer::LASTFAIL, $dbLastfail, $comparison);
}
+ /**
+ * Filter the query on the skype_contact column
+ *
+ * @param string $dbSkypeContact The value to use as filter.
+ * Accepts wildcards (* and % trigger a LIKE)
+ * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
+ *
+ * @return CcSubjsQuery The current query, for fluid interface
+ */
+ public function filterByDbSkypeContact($dbSkypeContact = null, $comparison = null)
+ {
+ if (null === $comparison) {
+ if (is_array($dbSkypeContact)) {
+ $comparison = Criteria::IN;
+ } elseif (preg_match('/[\%\*]/', $dbSkypeContact)) {
+ $dbSkypeContact = str_replace('*', '%', $dbSkypeContact);
+ $comparison = Criteria::LIKE;
+ }
+ }
+ return $this->addUsingAlias(CcSubjsPeer::SKYPE_CONTACT, $dbSkypeContact, $comparison);
+ }
+
+ /**
+ * Filter the query on the jabber_contact column
+ *
+ * @param string $dbJabberContact The value to use as filter.
+ * Accepts wildcards (* and % trigger a LIKE)
+ * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
+ *
+ * @return CcSubjsQuery The current query, for fluid interface
+ */
+ public function filterByDbJabberContact($dbJabberContact = null, $comparison = null)
+ {
+ if (null === $comparison) {
+ if (is_array($dbJabberContact)) {
+ $comparison = Criteria::IN;
+ } elseif (preg_match('/[\%\*]/', $dbJabberContact)) {
+ $dbJabberContact = str_replace('*', '%', $dbJabberContact);
+ $comparison = Criteria::LIKE;
+ }
+ }
+ return $this->addUsingAlias(CcSubjsPeer::JABBER_CONTACT, $dbJabberContact, $comparison);
+ }
+
+ /**
+ * Filter the query on the email column
+ *
+ * @param string $dbEmail The value to use as filter.
+ * Accepts wildcards (* and % trigger a LIKE)
+ * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
+ *
+ * @return CcSubjsQuery The current query, for fluid interface
+ */
+ public function filterByDbEmail($dbEmail = null, $comparison = null)
+ {
+ if (null === $comparison) {
+ if (is_array($dbEmail)) {
+ $comparison = Criteria::IN;
+ } elseif (preg_match('/[\%\*]/', $dbEmail)) {
+ $dbEmail = str_replace('*', '%', $dbEmail);
+ $comparison = Criteria::LIKE;
+ }
+ }
+ return $this->addUsingAlias(CcSubjsPeer::EMAIL, $dbEmail, $comparison);
+ }
+
/**
* Filter the query by a related CcAccess object
*
diff --git a/application/validate/UserNameValidate.php b/application/validate/UserNameValidate.php
new file mode 100644
index 000000000..b6ff6ec92
--- /dev/null
+++ b/application/validate/UserNameValidate.php
@@ -0,0 +1,26 @@
+ "'%value%' is already taken"
+ );
+
+ public function isValid($value)
+ {
+ $this->_setValue($value);
+
+ $count = CcSubjsQuery::create()->filterByDbLogin($value)->count();
+
+ if ($count != 0) {
+ $this->_error(self::LOGIN);
+ return false;
+ }
+
+ return true;
+ }
+}
+
+?>
diff --git a/application/views/scripts/nowplaying/day-view.phtml b/application/views/scripts/nowplaying/day-view.phtml
new file mode 100644
index 000000000..3f23200ab
--- /dev/null
+++ b/application/views/scripts/nowplaying/day-view.phtml
@@ -0,0 +1,2 @@
+
+
diff --git a/application/views/scripts/nowplaying/index.phtml b/application/views/scripts/nowplaying/index.phtml
index b7faa8336..11d775d98 100644
--- a/application/views/scripts/nowplaying/index.phtml
+++ b/application/views/scripts/nowplaying/index.phtml
@@ -1,2 +1 @@
-
diff --git a/application/views/scripts/schedule/edit-show.phtml b/application/views/scripts/schedule/edit-show.phtml
new file mode 100644
index 000000000..3efef5486
--- /dev/null
+++ b/application/views/scripts/schedule/edit-show.phtml
@@ -0,0 +1,15 @@
+
+
+ what ?>
+
+
+ when ?>
+ repeats ?>
+
+
+ who ?>
+
+
+ style ?>
+
+
diff --git a/application/views/scripts/user/add-user.phtml b/application/views/scripts/user/add-user.phtml
index 161c48f78..5a809ac1f 100644
--- a/application/views/scripts/user/add-user.phtml
+++ b/application/views/scripts/user/add-user.phtml
@@ -1,3 +1,35 @@
-form;
+
+
+ Manage users
+
+
+
+
+
+
+
+
+
+ id |
+ Name |
+ Role |
+ Delete |
+
+
+
+
+
+
+
+
+
+
diff --git a/application/views/scripts/user/get-user-data-table-info.phtml b/application/views/scripts/user/get-user-data-table-info.phtml
new file mode 100644
index 000000000..64b099bc2
--- /dev/null
+++ b/application/views/scripts/user/get-user-data-table-info.phtml
@@ -0,0 +1 @@
+
View script for controller User and script/action name getUserDataTableInfo
\ No newline at end of file
diff --git a/application/views/scripts/user/get-user-data.phtml b/application/views/scripts/user/get-user-data.phtml
new file mode 100644
index 000000000..f9696f033
--- /dev/null
+++ b/application/views/scripts/user/get-user-data.phtml
@@ -0,0 +1,3 @@
+entries;
+?>
diff --git a/application/views/scripts/user/remove-user.phtml b/application/views/scripts/user/remove-user.phtml
new file mode 100644
index 000000000..845092689
--- /dev/null
+++ b/application/views/scripts/user/remove-user.phtml
@@ -0,0 +1,3 @@
+entries;
+?>
diff --git a/build/schema.xml b/build/schema.xml
index 5757c7996..0bac4bd57 100644
--- a/build/schema.xml
+++ b/build/schema.xml
@@ -264,6 +264,9 @@
+
+
+
diff --git a/build/sql/schema.sql b/build/sql/schema.sql
index a1ed0f9ca..fb6b548ce 100644
--- a/build/sql/schema.sql
+++ b/build/sql/schema.sql
@@ -402,6 +402,9 @@ CREATE TABLE "cc_subjs"
"last_name" VARCHAR(255) default '' NOT NULL,
"lastlogin" TIMESTAMP,
"lastfail" TIMESTAMP,
+ "skype_contact" VARCHAR(255),
+ "jabber_contact" VARCHAR(255),
+ "email" VARCHAR(255),
PRIMARY KEY ("id"),
CONSTRAINT "cc_subjs_id_idx" UNIQUE ("id"),
CONSTRAINT "cc_subjs_login_idx" UNIQUE ("login")
diff --git a/public/css/styles.css b/public/css/styles.css
index cfc4d9399..070512a5f 100644
--- a/public/css/styles.css
+++ b/public/css/styles.css
@@ -516,6 +516,25 @@ dl.inline-list dd {
padding: 0.2em 1em;
margin-right:3px;
}
+.dataTables_filter input {
+ background: url("images/search_auto_bg.png") no-repeat scroll 0 0 #DDDDDD;
+ text-indent: 25px;
+ width: 60%;
+ border: 1px solid #5B5B5B;
+ height: 23px;
+ margin: 0;
+ padding: 0;
+}
+.dataTables_length select {
+ background-color: #DDDDDD;
+ border: 1px solid #5B5B5B;
+ font-family: Arial,Helvetica,sans-serif;
+ font-size: 12px;
+ height: 25px;
+ margin: 0;
+ padding: 2px 2px 2px 0;
+ vertical-align: top;
+}
/*----END Data Table----*/
@@ -1088,7 +1107,7 @@ button, input {
font-size: 1.7em;
padding-bottom: 16px;
}
-.user-management .dataTables_filter .auto-search {
+.user-management .dataTables_filter input {
width: 378px;
}
.user-data.simple-formblock dd {
@@ -1121,3 +1140,4 @@ button, input {
#ui-datepicker-div { z-index: 10 !important }
+
diff --git a/public/js/airtime/user/user.js b/public/js/airtime/user/user.js
new file mode 100644
index 000000000..03edafc8a
--- /dev/null
+++ b/public/js/airtime/user/user.js
@@ -0,0 +1,72 @@
+function populateForm(entries){
+ //$('#user_details').show();
+
+ $('.errors').remove();
+
+ $('#user_id').val(entries.id);
+ $('#login').val(entries.login);
+ $('#first_name').val(entries.first_name);
+ $('#last_name').val(entries.last_name);
+ $('#type').val(entries.type);
+
+ if (entries.id.length != 0){
+ $('#login').attr('readonly', 'readonly');
+ $('#password').val("xxxxxx");
+ } else {
+ $('#login').removeAttr('readonly');
+ $('#password').val("");
+ }
+}
+
+function rowClickCallback(row_id){
+ $.ajax({ url: '/User/get-user-data/id/'+ row_id +'/format/json', dataType:"json", success:function(data){
+ populateForm(data.entries);
+ }});
+}
+
+function removeUserCallback(row_id, nRow){
+ $.ajax({ url: '/User/remove-user/id/'+ row_id +'/format/json', dataType:"text", success:function(data){
+ var o = $('#users_datatable').dataTable().fnDeleteRow(nRow);
+ }});
+}
+
+function rowCallback( nRow, aData, iDisplayIndex ){
+ $(nRow).click(function(){rowClickCallback(aData[0])});
+ $('td:eq(2)', nRow).append( '').children('span').click(function(e){e.stopPropagation(); removeUserCallback(aData[0], nRow)});
+
+ return nRow;
+}
+
+$(document).ready(function() {
+ $('#users_datatable').dataTable( {
+ "bProcessing": true,
+ "bServerSide": true,
+ "sAjaxSource": "/User/get-user-data-table-info/format/json",
+ "fnServerData": function ( sSource, aoData, fnCallback ) {
+ $.ajax( {
+ "dataType": 'json',
+ "type": "POST",
+ "url": sSource,
+ "data": aoData,
+ "success": fnCallback
+ } );
+ },
+ "fnRowCallback": rowCallback,
+ "aoColumns": [
+ /* Id */ { "sName": "id", "bSearchable": false, "bVisible": false },
+ /* user name */ { "sName": "login" },
+ /* user type */ { "sName": "type", "bSearchable": false },
+ /* del button */ { "sName": "null as delete", "bSearchable": false, "bSortable": false}
+ ],
+ "bJQueryUI": true,
+ "bAutoWidth": false,
+ "bLengthChange": false
+ });
+
+ //$('#user_details').hide();
+
+ var newUser = {login:"", first_name:"", last_name:"", type:"G", id:""};
+
+ $('#add_user_button').click(function(){populateForm(newUser)});
+
+});
diff --git a/public/js/playlist/dayview.js b/public/js/playlist/dayview.js
new file mode 100644
index 000000000..7deba409e
--- /dev/null
+++ b/public/js/playlist/dayview.js
@@ -0,0 +1 @@
+var viewType = "day";
diff --git a/public/js/playlist/nowplayingdatagrid.js b/public/js/playlist/nowplayingdatagrid.js
index 6dbe741a6..ec003fbfc 100644
--- a/public/js/playlist/nowplayingdatagrid.js
+++ b/public/js/playlist/nowplayingdatagrid.js
@@ -3,17 +3,17 @@ var datagridData;
function getDateText(obj){
var str = obj.aData[ obj.iDataColumn ].toString();
- if (str.indexOf(" ") != -1){
- return changeTimePrecision(str.substring(0, str.indexOf(" ")));
- }
+ datetime = str.split(" ");
+ if (datetime.length == 2)
+ return datetime[0];
return str;
}
function getTimeText(obj){
var str = obj.aData[ obj.iDataColumn ].toString();
- if (str.indexOf(" ") != -1){
- return changeTimePrecision(str.substring(str.indexOf(" ")+1));
- }
+ datetime = str.split(" ");
+ if (datetime.length == 2)
+ return changeTimePrecision(datetime[1]);
return str;
}
@@ -23,16 +23,16 @@ function changeTimePrecisionInit(obj){
}
function changeTimePrecision(str){
- if (str.indexOf(".") != -1){
- if (str.length - str.indexOf(".") > 2)
- var extraLength = str.length - str.indexOf(".") -3;
- return str.substring(0, str.length - extraLength);
- }
- return str;
+
+ var temp = str.split(".")
+ if (temp.length == 2){
+ if (temp[1].length > 2)
+ return temp[0]+"."+temp[1].substr(0, 2);
+ }
+ return str;
}
function notifySongEnd(){
- //alert("length " + datagridData.rows.length);
for (var i=0; i