diff --git a/livesupport/modules/htmlUI/var/Smarty/ChangeLog b/livesupport/modules/htmlUI/var/Smarty/ChangeLog index ddb96d346..a84378d67 100644 --- a/livesupport/modules/htmlUI/var/Smarty/ChangeLog +++ b/livesupport/modules/htmlUI/var/Smarty/ChangeLog @@ -2979,7 +2979,7 @@ * libs/Smarty.class.php libs/Smarty_Compiler.class.php: - added CVS $Id: ChangeLog,v 1.2 2005/02/23 22:57:14 sebastian Exp $ + added CVS $Id: ChangeLog,v 1.3 2005/02/24 14:00:15 sebastian Exp $ 2003-03-31 Messju Mohr diff --git a/livesupport/modules/htmlUI/var/Smarty/libs/Config_File.class.php b/livesupport/modules/htmlUI/var/Smarty/libs/Config_File.class.php index 1e2e960aa..140d4f176 100644 --- a/livesupport/modules/htmlUI/var/Smarty/libs/Config_File.class.php +++ b/livesupport/modules/htmlUI/var/Smarty/libs/Config_File.class.php @@ -25,7 +25,7 @@ * @package Smarty */ -/* $Id: Config_File.class.php,v 1.2 2005/02/23 22:57:14 sebastian Exp $ */ +/* $Id: Config_File.class.php,v 1.3 2005/02/24 14:00:15 sebastian Exp $ */ /** * Config file reading class diff --git a/livesupport/modules/htmlUI/var/Smarty/libs/Smarty.class.php b/livesupport/modules/htmlUI/var/Smarty/libs/Smarty.class.php index bebf28c16..4a25b9028 100755 --- a/livesupport/modules/htmlUI/var/Smarty/libs/Smarty.class.php +++ b/livesupport/modules/htmlUI/var/Smarty/libs/Smarty.class.php @@ -30,7 +30,7 @@ * @version 2.6.6 */ -/* $Id: Smarty.class.php,v 1.2 2005/02/23 22:57:14 sebastian Exp $ */ +/* $Id: Smarty.class.php,v 1.3 2005/02/24 14:00:15 sebastian Exp $ */ /** * DIR_SEP isn't used anymore, but third party apps might diff --git a/livesupport/modules/htmlUI/var/Smarty/libs/Smarty_Compiler.class.php b/livesupport/modules/htmlUI/var/Smarty/libs/Smarty_Compiler.class.php index ac6524c05..5ad55d8b7 100644 --- a/livesupport/modules/htmlUI/var/Smarty/libs/Smarty_Compiler.class.php +++ b/livesupport/modules/htmlUI/var/Smarty/libs/Smarty_Compiler.class.php @@ -26,7 +26,7 @@ * @package Smarty */ -/* $Id: Smarty_Compiler.class.php,v 1.2 2005/02/23 22:57:14 sebastian Exp $ */ +/* $Id: Smarty_Compiler.class.php,v 1.3 2005/02/24 14:00:15 sebastian Exp $ */ /** * Template compiling class diff --git a/livesupport/modules/htmlUI/var/Smarty/libs/plugins/outputfilter.localizer.php b/livesupport/modules/htmlUI/var/Smarty/libs/plugins/postfilter.localizer.php similarity index 69% rename from livesupport/modules/htmlUI/var/Smarty/libs/plugins/outputfilter.localizer.php rename to livesupport/modules/htmlUI/var/Smarty/libs/plugins/postfilter.localizer.php index 97f1ec610..b3ca8d38d 100755 --- a/livesupport/modules/htmlUI/var/Smarty/libs/plugins/outputfilter.localizer.php +++ b/livesupport/modules/htmlUI/var/Smarty/libs/plugins/postfilter.localizer.php @@ -14,16 +14,17 @@ * Author: Media Development Loan Fund * ------------------------------------------------------------- */ - function smarty_outputfiler_localizer_tra($matches) + function smarty_postfiler_localizer_tra($matches) { foreach ($matches as $match) { $key = substr($match, 2, strpos(substr($match, 2), '#')); + return tra(preg_replace('/%%/', '', $match)); } } - function smarty_outputfilter_localizer($compiled, &$smarty) + function smarty_postfilter_localizer($compiled, &$smarty) { - $pattern = '/##.*##/U'; - return preg_replace_callback($pattern, 'smarty_outputfiler_localizer_tra', $compiled); + $pattern = '/%%.*%%/U'; + return preg_replace_callback($pattern, 'smarty_postfiler_localizer_tra', $compiled); } ?> diff --git a/livesupport/modules/htmlUI/var/conf.php b/livesupport/modules/htmlUI/var/conf.php index 35a690dd3..0c3e04894 100644 --- a/livesupport/modules/htmlUI/var/conf.php +++ b/livesupport/modules/htmlUI/var/conf.php @@ -23,7 +23,7 @@ Author : $Author: sebastian $ - Version : $Revision: 1.14 $ + Version : $Revision: 1.15 $ Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/htmlUI/var/Attic/conf.php,v $ ------------------------------------------------------------------------------*/ diff --git a/livesupport/modules/htmlUI/var/formmask/general.inc.php b/livesupport/modules/htmlUI/var/formmask/general.inc.php index 0f50cc1f6..046cbc4fa 100755 --- a/livesupport/modules/htmlUI/var/formmask/general.inc.php +++ b/livesupport/modules/htmlUI/var/formmask/general.inc.php @@ -1,11 +1,11 @@ array( + 'stationPrefs' => array( array( 'element' => 'act', 'type' => 'hidden', - 'constant' => 'editSystemPrefs' + 'constant' => 'changeStationPrefs' ), array( 'element' => 'basics', @@ -18,7 +18,12 @@ $ui_fmask = array( 'type' => 'text', 'label' => 'Maximum File Size for Upload', 'required' => TRUE, - 'default' => strtr(ini_get('upload_max_filesize'), array('M'=>'000000', 'k'=>'000')) + 'rule' => 'numeric', + 'attributes' => array( + 'onClick' => 'alert ("Note: System Maximum is set to '. + strtr(ini_get('upload_max_filesize'), array('M'=>'000000', 'k'=>'000')) + .' in php.ini\n You cannot override this here.")' + ) ), array( 'rule' => 'nopunctuation', @@ -360,6 +365,19 @@ $ui_fmask = array( 'playlist' => 'Playlist' ) ), + array( + 'element' => 'limit', + 'type' => 'select', + 'label' => 'Rows per Page', + 'options' => array( + 1 => 1, + 5 => 5, + 10 => 10, + 25 => 25, + 50 => 50, + 100 => 100 + ) + ), array( 'element' => 'clear', 'type' => 'button', diff --git a/livesupport/modules/htmlUI/var/html/ui_browser.php b/livesupport/modules/htmlUI/var/html/ui_browser.php index ad204a706..1607ef121 100644 --- a/livesupport/modules/htmlUI/var/html/ui_browser.php +++ b/livesupport/modules/htmlUI/var/html/ui_browser.php @@ -95,7 +95,7 @@ if ($uiBrowser->userid) { case "SEARCH": if (is_array($uiBrowser->SEARCH->criteria) ){ - $Smarty->assign('searchres', $uiBrowser->SEARCH->results); + $Smarty->assign('searchres', $uiBrowser->SEARCH->results); $Smarty->assign('showSearchRes', TRUE); }; @@ -142,9 +142,9 @@ if ($uiBrowser->userid) { $Smarty->assign('showFile', TRUE); break; - case "editSystemPrefs": - $Smarty->assign('dynform', $uiBrowser->editSystemPrefs($ui_fmask['systemPrefs'])); - $Smarty->assign('editSystemPrefs', TRUE); + case "changeStationPrefs": + $Smarty->assign('dynform', $uiBrowser->changeStationPrefs($ui_fmask['stationPrefs'])); + $Smarty->assign('changeStationPrefs', TRUE); break; case "PL.display": diff --git a/livesupport/modules/htmlUI/var/html/ui_handler.php b/livesupport/modules/htmlUI/var/html/ui_handler.php index 9a88eca80..bf63f65e6 100644 --- a/livesupport/modules/htmlUI/var/html/ui_handler.php +++ b/livesupport/modules/htmlUI/var/html/ui_handler.php @@ -1,4 +1,4 @@ -removeGroupMember($_REQUEST); break; - case "editSystemPrefs": - $uiHandler->editSystemPrefs(array_merge($_REQUEST, $_FILES), $ui_fmask["systemPrefs"]); + case "changeStationPrefs": + $uiHandler->changeStationPrefs(array_merge($_REQUEST, $_FILES), $ui_fmask["stationPrefs"]); break; case "editMetaData": diff --git a/livesupport/modules/htmlUI/var/templates/systemPrefs.tpl b/livesupport/modules/htmlUI/var/templates/changeStationPrefs.tpl similarity index 100% rename from livesupport/modules/htmlUI/var/templates/systemPrefs.tpl rename to livesupport/modules/htmlUI/var/templates/changeStationPrefs.tpl diff --git a/livesupport/modules/htmlUI/var/templates/examples/smarty-dynamic-fancygroup.tpl b/livesupport/modules/htmlUI/var/templates/examples/smarty-dynamic-fancygroup.tpl index e7b9f7c7a..7384f8fd2 100644 --- a/livesupport/modules/htmlUI/var/templates/examples/smarty-dynamic-fancygroup.tpl +++ b/livesupport/modules/htmlUI/var/templates/examples/smarty-dynamic-fancygroup.tpl @@ -1,4 +1,4 @@ - + diff --git a/livesupport/modules/htmlUI/var/templates/examples/smarty-dynamic-green.tpl b/livesupport/modules/htmlUI/var/templates/examples/smarty-dynamic-green.tpl index 2b35355f4..6788dcaa8 100644 --- a/livesupport/modules/htmlUI/var/templates/examples/smarty-dynamic-green.tpl +++ b/livesupport/modules/htmlUI/var/templates/examples/smarty-dynamic-green.tpl @@ -1,4 +1,4 @@ - + {$element.label}: diff --git a/livesupport/modules/htmlUI/var/templates/examples/smarty-dynamic.tpl b/livesupport/modules/htmlUI/var/templates/examples/smarty-dynamic.tpl index 89d8f1a40..862eb90cd 100644 --- a/livesupport/modules/htmlUI/var/templates/examples/smarty-dynamic.tpl +++ b/livesupport/modules/htmlUI/var/templates/examples/smarty-dynamic.tpl @@ -1,5 +1,5 @@ - + Smarty template for Array renderer diff --git a/livesupport/modules/htmlUI/var/templates/fileBrowse/objects.tpl b/livesupport/modules/htmlUI/var/templates/fileBrowse/objects.tpl index 648465f32..b76d674c8 100755 --- a/livesupport/modules/htmlUI/var/templates/fileBrowse/objects.tpl +++ b/livesupport/modules/htmlUI/var/templates/fileBrowse/objects.tpl @@ -2,14 +2,14 @@ {include file="sub/x.tpl"} - {if count($structure.listdata)} - + - + {if count($structure.listdata)} {foreach from=$structure.listdata item=i} diff --git a/livesupport/modules/htmlUI/var/templates/masterpanel.tpl b/livesupport/modules/htmlUI/var/templates/masterpanel.tpl index a45268668..b0a0ef60f 100755 --- a/livesupport/modules/htmlUI/var/templates/masterpanel.tpl +++ b/livesupport/modules/htmlUI/var/templates/masterpanel.tpl @@ -40,8 +40,8 @@ {include file="editMetaData.tpl"} {/if} -{if $editSystemPrefs} - {include file="systemPrefs.tpl"} +{if $changeStationPrefs} + {include file="changeStationPrefs.tpl"} {/if} {if $playlist} diff --git a/livesupport/modules/htmlUI/var/templates/menu_top.tpl b/livesupport/modules/htmlUI/var/templates/menu_top.tpl index 3778b832f..a390edbd1 100755 --- a/livesupport/modules/htmlUI/var/templates/menu_top.tpl +++ b/livesupport/modules/htmlUI/var/templates/menu_top.tpl @@ -8,5 +8,5 @@ {tra 0='[Subjects]'} - [SystemPrefs] + [StationPrefs] \ No newline at end of file diff --git a/livesupport/modules/htmlUI/var/templates/scratchPad.tpl b/livesupport/modules/htmlUI/var/templates/scratchPad.tpl index 5fa1e154e..1bc4336f9 100755 --- a/livesupport/modules/htmlUI/var/templates/scratchPad.tpl +++ b/livesupport/modules/htmlUI/var/templates/scratchPad.tpl @@ -1,7 +1,8 @@ {*Smarty template*} +{include file="script/scratchPad.js.tpl"}
-
ScratchPad +
%%ScratchPad%% {if is_array($SCRATCHPAD)}
diff --git a/livesupport/modules/htmlUI/var/templates/script/clock.js.tpl b/livesupport/modules/htmlUI/var/templates/script/clock.js.tpl index 54cec28c6..06f4ae17e 100644 --- a/livesupport/modules/htmlUI/var/templates/script/clock.js.tpl +++ b/livesupport/modules/htmlUI/var/templates/script/clock.js.tpl @@ -45,16 +45,19 @@ function work() { if (!document.layers && !document.all && !document.getElementById) return; var runTime = new Date(); - var dn = "AM"; var shours = hours; var sminutes = minutes; var sseconds = seconds; - if (shours >= 12) - { - dn = "PM"; - shours-=12; - } - if (!shours) shours = 12; + + //if (shours >= 12) + //{ + // dn = "PM"; //change here for 12h format// + // shours-=12; + //} + //if (!shours) shours = 12; + //var dn = "AM"; + var dn= '' + sminutes=twoDigit(sminutes); sseconds=twoDigit(sseconds); shours =twoDigit(shours ); @@ -122,16 +125,19 @@ function lwork() { if (!document.layers && !document.all && !document.getElementById) return; var runTime = new Date(); - var dn = "AM"; var shours = lhours; var sminutes = lminutes; var sseconds = lseconds; - if (shours >= 12) - { - dn = "PM"; - shours-=12; - } - if (!shours) shours = 12; + + //if (shours >= 12) + //{ + // dn = "PM"; //change here for 12h format// + // shours-=12; + //} + //if (!shours) shours = 12; + //var dn = "AM"; + var dn= '' + sminutes=twoDigit(sminutes); sseconds=twoDigit(sseconds); shours =twoDigit(shours ); diff --git a/livesupport/modules/htmlUI/var/templates/script/myKontextMenue.js.tpl b/livesupport/modules/htmlUI/var/templates/script/myKontextMenue.js.tpl index 617a3ff04..aa83763f0 100755 --- a/livesupport/modules/htmlUI/var/templates/script/myKontextMenue.js.tpl +++ b/livesupport/modules/htmlUI/var/templates/script/myKontextMenue.js.tpl @@ -8,7 +8,7 @@ nn6=(document.getElementById && !document.all)?1:0; menuStatus = 0; document.onmouseup = hideMenu; document.write(''); -menuWidth = 0, +menuWidth = 160, menuHeight = 0; function menu(id) { diff --git a/livesupport/modules/htmlUI/var/templates/statusbar.tpl b/livesupport/modules/htmlUI/var/templates/statusbar.tpl index baf6ce605..13b4c38aa 100755 --- a/livesupport/modules/htmlUI/var/templates/statusbar.tpl +++ b/livesupport/modules/htmlUI/var/templates/statusbar.tpl @@ -1,30 +1,30 @@ -{include file="script/clock.js.tpl"} -
- -
- server time -
- -
- -
- local time -
- -
- -
- -
- -
- {$SYSTEMPREFS.stationName} -
- {$SYSTEMPREFS.frequency} -
- -
- {include file="userinfo.tpl"} -
- -
+{include file="script/clock.js.tpl"} +
+ +
+ server time +
+ +
+ +
+ local time +
+ +
+ +
+ +
+ +
+ {$STATIONPREFS.stationName} +
+ {$STATIONPREFS.frequency} +
+ +
+ {include file="userinfo.tpl"} +
+ +
diff --git a/livesupport/modules/htmlUI/var/ui_base.inc.php b/livesupport/modules/htmlUI/var/ui_base.inc.php index 5a8efea57..d708e78f1 100644 --- a/livesupport/modules/htmlUI/var/ui_base.inc.php +++ b/livesupport/modules/htmlUI/var/ui_base.inc.php @@ -82,7 +82,8 @@ class uiBase } $this->dbc->setFetchMode(DB_FETCHMODE_ASSOC); $this->gb =& new GreenBox($this->dbc, $config); - $this->config = $config; + $this->config =& $config; + $this->config['accessRawAudioUrl'] = $config['storageUrlPath'].'/xmlrpc/simpleGet.php'; $this->sessid = $_REQUEST[$config['authCookieName']]; $this->userid = $this->gb->getSessUserId($this->sessid); $this->login = $this->gb->getSessLogin($this->sessid); @@ -92,20 +93,28 @@ class uiBase $this->fid = $this->type=='Folder' ? $this->id : $this->pid; $this->InputTextStandardAttrib = array('size' =>UI_INPUT_STANDARD_SIZE, 'maxlength'=>UI_INPUT_STANDARD_MAXLENGTH); - $this->SYSTEMPREFS =& $_SESSION[UI_STATIONINFO_SESSNAME]; - $this->SCRATCHPAD =& new uiScratchPad($this); - $this->SEARCH =& new uiSearch($this); - $this->PLAYLIST =& new uiPlaylist($this); + $this->STATIONPREFS =& $_SESSION[UI_STATIONINFO_SESSNAME]; + $this->SCRATCHPAD =& new uiScratchPad($this); + $this->SEARCH =& new uiSearch($this); + $this->PLAYLIST =& new uiPlaylist($this); } - function loadSystemPrefs(&$mask) + function loadStationPrefs(&$mask) { - if (!is_array($this->SYSTEMPREFS)) { + if (!is_array($this->STATIONPREFS)) { foreach ($mask as $key=>$val) { - if ($val['isPref']) - $this->SYSTEMPREFS[$val['element']] = is_string($this->gb->loadGroupPref(NULL, 'StationPrefs', $val['element'])) ? $this->gb->loadGroupPref($this->sessid, 'StationPrefs', $val['element']) : NULL; + if ($val['isPref']) { + if (is_string($setting = $this->gb->loadGroupPref(NULL, 'StationPrefs', $val['element']))) { + $this->STATIONPREFS[$val['element']] = $setting; + } else { + $miss = TRUE; + } + } + } + if ($miss && $this->login) { + $this->_retMsg('Note: Station Preferences not setup.'); } } } diff --git a/livesupport/modules/htmlUI/var/ui_browser.class.php b/livesupport/modules/htmlUI/var/ui_browser.class.php index aaf885a7b..af42d9627 100644 --- a/livesupport/modules/htmlUI/var/ui_browser.class.php +++ b/livesupport/modules/htmlUI/var/ui_browser.class.php @@ -154,7 +154,7 @@ class uiBrowser extends uiBase { function uploadFileM(&$mask, $id) { $form = new HTML_QuickForm('uploadFileM', UI_STANDARD_FORM_METHOD, UI_HANDLER); - $form->setMaxFileSize($this->SYSTEMPREFS['stationMaxfilesize']); + $form->setMaxFileSize($this->STATIONPREFS['stationMaxfilesize']); $form->setConstants(array('id' => $id, 'act' => 'uploadFileM')); $this->_parseArr2Form($form, $mask); @@ -174,7 +174,7 @@ class uiBrowser extends uiBase { function uploadFile(&$mask, $id, $replace=FALSE) { $form = new HTML_QuickForm('uploadFile', UI_STANDARD_FORM_METHOD, UI_HANDLER); - $form->setMaxFileSize($this->SYSTEMPREFS['stationMaxfilesize']); + $form->setMaxFileSize($this->STATIONPREFS['stationMaxfilesize']); $form->setConstants(array('id' => $id, 'act' => $replace ? 'replaceFile' : 'uploadFile')); $this->_parseArr2Form($form, $mask); @@ -403,9 +403,9 @@ class uiBrowser extends uiBase { - function editSystemPrefs(&$mask) + function changeStationPrefs(&$mask) { - $form = new HTML_QuickForm('systemPrefs', UI_STANDARD_FORM_METHOD, UI_HANDLER); + $form = new HTML_QuickForm('changeStationPrefs', UI_STANDARD_FORM_METHOD, UI_HANDLER); foreach($mask as $key=>$val) { $p = $this->gb->loadGroupPref($this->sessid, 'StationPrefs', $val['element']); diff --git a/livesupport/modules/htmlUI/var/ui_browser_init.php b/livesupport/modules/htmlUI/var/ui_browser_init.php index 2ebb31f95..43dd9af2d 100644 --- a/livesupport/modules/htmlUI/var/ui_browser_init.php +++ b/livesupport/modules/htmlUI/var/ui_browser_init.php @@ -1,66 +1,68 @@ -load_filter('output', 'trimwhitespace'); -$Smarty->load_filter('post', 'template_marker'); -$Smarty->load_filter('output', 'localizer'); - - -## some basic things ################################################ -$Smarty->assign('UI_BROWSER', UI_BROWSER); -$Smarty->assign('UI_HANDLER', UI_HANDLER); -$Smarty->assign('ACT', $_REQUEST['act']); -$Smarty->assign('START', array( - 'id' => &$uiBrowser->id, - 'pid' => &$uiBrowser->pid, - 'fid' => &$uiBrowser->fid - )); -$Smarty->assign('USER', array('sessid' => &$uiBrowser->sessid, - 'userid' => &$uiBrowser->userid, - 'login' => &$uiBrowser->login - )); -$uiBrowser->loadSystemPrefs($ui_fmask['systemPrefs']); -$Smarty->assign('SYSTEMPREFS', $uiBrowser->SYSTEMPREFS); - - -## retransfer incomplete formdata from SESSION to POST-data ######### -if (is_array($_SESSION['retransferFormData'])){ - foreach($_SESSION['retransferFormData'] as $k=>$v){ - $_POST[$k] = $v; - } - unset($_SESSION['retransferFormData']); -} -?> +load_filter('output', 'trimwhitespace'); +$Smarty->load_filter('post', 'template_marker'); +$Smarty->load_filter('post', 'localizer'); + + +## some basic things ################################################ +$Smarty->assign('UI_BROWSER', UI_BROWSER); +$Smarty->assign('UI_HANDLER', UI_HANDLER); +$Smarty->assign('ACT', $_REQUEST['act']); +$Smarty->assign('CONFIG', $config); +$Smarty->assign('START', array( + 'id' => &$uiBrowser->id, + 'pid' => &$uiBrowser->pid, + 'fid' => &$uiBrowser->fid, + 'sessid' => &$uiBrowser->sessid + )); +$Smarty->assign('USER', array('sessid' => &$uiBrowser->sessid, + 'userid' => &$uiBrowser->userid, + 'login' => &$uiBrowser->login + )); +$uiBrowser->loadStationPrefs($ui_fmask['stationPrefs']); +$Smarty->assign('STATIONPREFS', $uiBrowser->STATIONPREFS); + + +## retransfer incomplete formdata from SESSION to POST-data ######### +if (is_array($_SESSION['retransferFormData'])){ + foreach($_SESSION['retransferFormData'] as $k=>$v){ + $_POST[$k] = $v; + } + unset($_SESSION['retransferFormData']); +} +?> \ No newline at end of file diff --git a/livesupport/modules/htmlUI/var/ui_handler.class.php b/livesupport/modules/htmlUI/var/ui_handler.class.php index 2856ee3f9..9fbeacc34 100644 --- a/livesupport/modules/htmlUI/var/ui_handler.class.php +++ b/livesupport/modules/htmlUI/var/ui_handler.class.php @@ -134,7 +134,7 @@ class uiHandler extends uiBase { return FALSE; } if (!$this->_validateForm($formdata, $mask)) { - $this->redirUrl = UI_BROWSER."?act=addWebstream&id=".$id; + $this->redirUrl = UI_BROWSER."?act=uploadFile&id=".$id; return FALSE; } $tmpgunid = md5(microtime().$_SERVER['SERVER_ADD3R'].rand()."org.mdlf.livesupport"); @@ -544,32 +544,31 @@ class uiHandler extends uiBase { } - function editSystemPrefs(&$formdata, &$mask) + function changeStationPrefs(&$formdata, &$mask) { $this->redirUrl = UI_BROWSER; - if ($this->_validateForm($formdata, $mask)) { - foreach($mask as $key=>$val) { - if ($val['isPref']) { - if (strlen($formdata[$val['element']])) - $this->gb->saveGroupPref($this->sessid, 'StationPrefs', $val['element'], $formdata[$val['element']]); - else - $this->gb->delGroupPref($this->sessid, 'StationPrefs', $val['element']); - $this->SYSTEMPREFS[$val['element']] = is_string($this->gb->loadGroupPref(NULL, 'StationPrefs', $val['element'])) ? $this->gb->loadGroupPref($this->sessid, 'StationPrefs', $val['element']) : NULL; - } - if ($val['type'] == 'file' && $formdata[$val['element']]['name']) { - if (FALSE === @move_uploaded_file($formdata[$val['element']]['tmp_name'], $this->gb->loadGroupPref($this->sessid, 'StationPrefs', 'stationLogoPath'))) - $this->_retMsg('Error uploading Logo'); - return; - } - } - - $this->_retMsg('Settings saved'); - return TRUE; - } else { + if ($this->_validateForm($formdata, $mask) == FALSE) { $this->_retMsg('Error saving Settings'); return FALSE; } + foreach($mask as $key=>$val) { + if ($val['isPref']) { + if (strlen($formdata[$val['element']])) + $this->gb->saveGroupPref($this->sessid, 'StationPrefs', $val['element'], $formdata[$val['element']]); + else + $this->gb->delGroupPref($this->sessid, 'StationPrefs', $val['element']); + $this->STATIONPREFS[$val['element']] = is_string($this->gb->loadGroupPref(NULL, 'StationPrefs', $val['element'])) ? $this->gb->loadGroupPref($this->sessid, 'StationPrefs', $val['element']) : NULL; + } + if ($val['type'] == 'file' && $formdata[$val['element']]['name']) { + if (FALSE === @move_uploaded_file($formdata[$val['element']]['tmp_name'], $this->gb->loadGroupPref($this->sessid, 'StationPrefs', 'stationLogoPath'))) + $this->_retMsg('Error uploading Logo'); + return; + } + } + + $this->_retMsg('Settings saved'); + return TRUE; } } ?> \ No newline at end of file diff --git a/livesupport/modules/htmlUI/var/ui_scratchpad.class.php b/livesupport/modules/htmlUI/var/ui_scratchpad.class.php index 6e447a1b3..50be9b375 100755 --- a/livesupport/modules/htmlUI/var/ui_scratchpad.class.php +++ b/livesupport/modules/htmlUI/var/ui_scratchpad.class.php @@ -65,7 +65,7 @@ class uiScratchPad function addItem($id) { - if(!$this->Base->SYSTEMPREFS[UI_SCRATCHPAD_MAXLENGTH_KEY]) { + if(!$this->Base->STATIONPREFS[UI_SCRATCHPAD_MAXLENGTH_KEY]) { $this->Base->_retMsg('ScratchPad length is not set in System Preferences, so it cannot be used.'); return false; } @@ -81,7 +81,7 @@ class uiScratchPad } } $sp = array_merge(array($item), is_array($sp) ? $sp : NULL); - for ($n=0; $n<$this->Base->SYSTEMPREFS[UI_SCRATCHPAD_MAXLENGTH_KEY]; $n++) { + for ($n=0; $n<$this->Base->STATIONPREFS[UI_SCRATCHPAD_MAXLENGTH_KEY]; $n++) { if (is_array($sp[$n])) $this->items[$n] = $sp[$n]; } } diff --git a/livesupport/modules/htmlUI/var/ui_search.class.php b/livesupport/modules/htmlUI/var/ui_search.class.php index 23fe02ac8..e375dd9bd 100755 --- a/livesupport/modules/htmlUI/var/ui_search.class.php +++ b/livesupport/modules/htmlUI/var/ui_search.class.php @@ -7,7 +7,6 @@ class uiSearch $this->results =& $_SESSION[UI_SEARCH_SESSNAME]['results']; $this->criteria =& $_SESSION[UI_SEARCH_SESSNAME]['criteria']; $this->reloadUrl = UI_BROWSER.'?popup[]=_reload_parent&popup[]=_close'; - $this->criteria['limit'] = 3; } function setReload() @@ -57,12 +56,14 @@ class uiSearch { $this->results = NULL; $this->criteria['conditions'] = NULL; - $this->criteria['offset'] = NULL; + $this->criteria['offset'] = NULL; - $this->criteria['operator'] = $formdata['operator']; - $this->criteria['filetype'] = $formdata['filetype']; - $this->criteria['form']['operator'] = $formdata['operator']; + $this->criteria['operator'] = $formdata['operator']; + $this->criteria['filetype'] = $formdata['filetype']; + $this->criteria['limit'] = $formdata['limit']; + $this->criteria['form']['operator'] = $formdata['operator']; ## $criteria['form'] is used for retransfer to form ## $this->criteria['form']['filetype'] = $formdata['filetype']; + $this->criteria['form']['limit'] = $formdata['limit']; foreach ($formdata as $key=>$val) { if (is_array($val) && strlen($val[2])) { @@ -86,14 +87,27 @@ class uiSearch foreach ($results['results'] as $rec) { $this->results['items'][] = $this->Base->_getMetaInfo($this->Base->gb->_idFromGunid($rec)); } + $this->pagination($results); + } + + + function pagination(&$results) + { $this->results['count'] = $results['cnt']; $this->results['next'] = $results['cnt'] > $this->criteria['offset'] + $this->criteria['limit'] ? TRUE : FALSE; $this->results['prev'] = $this->criteria['offset'] > 0 ? TRUE : FALSE; - for ($n = 0; $n < (ceil($results['cnt'] / $this->criteria['limit'])); $n++) { - $this->results['pages'][$n] = $n+1; + + $p = 1; + for ($n = 1; $n <= ceil($results['cnt'] / $this->criteria['limit']); $n = $n+$p) { + $p = bcpow(10, floor($n/10)); echo "$p
"; + $this->results['pages'][$n-1] = $n; } + + array_pop($this->results['pages']); + $this->results['pages'][ceil($results['cnt'] / $this->criteria['limit'])-1] = '>>'; } + function reOrder($by) { $this->criteria['offset'] = NULL;
Title Type - {if $GLOBALS.pid}[go up]{/if} +   + {if $START.pid}[go up]{/if}
{$i.type} -  [rename] +  [move]  [copy]  [permissions] -
-   + {if $i.type != 'Folder'} -  [Access] -  [vMData] -  [Analyze] -   +
+  [MDataXML] +  [MDataForm] {if $i.type eq 'webstream'} - [Replace] +  [Replace] {elseif $i.type eq 'audioclip'} - [Replace] +  [Replace] +  [Access] +  [RawAnalyze] {/if} -  [eMData] -  [SP] + {/if}