*** empty log message ***
This commit is contained in:
parent
fd7d616a61
commit
b479e82348
|
@ -1,4 +1,4 @@
|
|||
<?php
|
||||
require_once dirname(__FILE__).'/var/conf.php';
|
||||
header('LOCATION: var/html/'.UI_BROWSER);
|
||||
header ('LOCATION: var/html/'.UI_BROWSER);
|
||||
?>
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
|
||||
|
||||
Author : $Author: sebastian $
|
||||
Version : $Revision: 1.1 $
|
||||
Version : $Revision: 1.2 $
|
||||
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/htmlUI/var/Attic/conf.php,v $
|
||||
|
||||
------------------------------------------------------------------------------*/
|
||||
|
@ -122,4 +122,5 @@ define('UI_QFORM_REQUIREDNOTE', 'templates/form_parts/requirednote.tpl');
|
|||
define('UI_QFORM_ERROR', 'templates/form_parts/error.tpl');
|
||||
define('UI_SEARCH_MAX_ROWS', 8);
|
||||
define('UI_SEARCH_MIN_ROWS', 2);
|
||||
define('UI_REGEX_URL', '/^(ht|f)tps?:\/\/[^ ]+$/');
|
||||
?>
|
|
@ -5,7 +5,7 @@
|
|||
* @author Thomas Schulz <ths@4bconsult.de>
|
||||
* @author Alexey Borzov <borz_off@cs.msu.su>
|
||||
*
|
||||
* $Id: SmartyDynamic_example.php,v 1.1 2005/02/03 16:55:35 sebastian Exp $
|
||||
* $Id: SmartyDynamic_example.php,v 1.2 2005/02/08 11:06:17 sebastian Exp $
|
||||
*/
|
||||
|
||||
require_once 'HTML/QuickForm.php';
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
* @author Bertrand Mansion <bmansion@mamasam.com>
|
||||
* @author Thomas Schulz <ths@4bconsult.de>
|
||||
*
|
||||
* $Id: SmartyStatic_example.php,v 1.1 2005/02/03 16:55:35 sebastian Exp $
|
||||
* $Id: SmartyStatic_example.php,v 1.2 2005/02/08 11:06:17 sebastian Exp $
|
||||
*/
|
||||
|
||||
require_once 'HTML/QuickForm.php';
|
||||
|
|
|
@ -38,7 +38,7 @@ if (is_array($_REQUEST['popup'])){
|
|||
|
||||
};
|
||||
|
||||
$Smarty->assign('statusbar', $uiBrowser->getStationInfo());
|
||||
$Smarty->assign('statusbar', $uiBrowser->getStationInfo($ui_fmask['systemPrefs']));
|
||||
|
||||
if ($uiBrowser->userid) {
|
||||
$Smarty->assign('showMenuTop', TRUE);
|
||||
|
@ -140,7 +140,7 @@ if ($uiBrowser->userid) {
|
|||
break;
|
||||
|
||||
case "getInfo":
|
||||
$Smarty->assign('fInfo', $uiBrowser->getInfo($uiBrowser->id));
|
||||
$Smarty->assign('fInfo', $uiBrowser->getInfo($uiBrowser->id, 'text'));
|
||||
$Smarty->assign('showFile', TRUE);
|
||||
break;
|
||||
|
||||
|
|
|
@ -51,11 +51,12 @@ class uiBrowser extends uiBase {
|
|||
}
|
||||
|
||||
|
||||
function getStationInfo()
|
||||
function getStationInfo(&$mask)
|
||||
{
|
||||
$a['frequency'] = $this->gb->loadGroupPref($this->sessid, 'StationPrefs', 'frequency');
|
||||
$a['stationName'] = $this->gb->loadGroupPref($this->sessid, 'StationPrefs', 'stationName');
|
||||
$a['stationLogoPath'] = $this->gb->loadGroupPref($this->sessid, 'StationPrefs', 'stationLogoPath');
|
||||
foreach ($mask as $key=>$val) {
|
||||
if ($val['type']=='text')
|
||||
$a[$val['element']] = is_string($this->gb->loadGroupPref($this->sessid, 'StationPrefs', $val['element'])) ? $this->gb->loadGroupPref($this->sessid, 'StationPrefs', $val['element']) : NULL;
|
||||
}
|
||||
|
||||
return $a;
|
||||
}
|
||||
|
@ -313,54 +314,29 @@ class uiBrowser extends uiBase {
|
|||
foreach ($mask['mData']['tabs']['group']['group'] as $k=>$v) {
|
||||
foreach ($mask['mData']['pages'][$v] as $val){
|
||||
$options[$val['element']] = $val['element'];
|
||||
if (isset($val['relation']))
|
||||
$col2[$val['element']] = $mask['relations'][$val['relation']];
|
||||
else
|
||||
$col2[$val['element']] = $mask['relations']['standard'];
|
||||
};
|
||||
};
|
||||
|
||||
$col1 = $options;
|
||||
|
||||
for($n=1; $n<=UI_SEARCH_MAX_ROWS; $n++) {
|
||||
$advRow = array(
|
||||
array(
|
||||
'element' => 's1',
|
||||
'type' => 'static',
|
||||
'text' => "<div id='searchRow_$n'>"
|
||||
),
|
||||
$n>$rowsBegin ? array(
|
||||
'element' => 's1_style',
|
||||
'type' => 'static',
|
||||
'text' => "<style type='text/css'>#searchRow_$n {visibility : hidden; height : 0px;}</style>"
|
||||
) : NULL,
|
||||
array(
|
||||
'element' => 'searchBy['.$n.']',
|
||||
'type' => 'select',
|
||||
'label' => 'Search by',
|
||||
'groupit' => TRUE,
|
||||
'options' => $options,
|
||||
),
|
||||
array(
|
||||
'element' => 'relation['.$n.']',
|
||||
'type' => 'select',
|
||||
'groupit' => TRUE,
|
||||
'options' => $mask['searchform.relations'],
|
||||
'selected' => '=',
|
||||
),
|
||||
array(
|
||||
'element' => 'criteria['.$n.']',
|
||||
'type' => 'text',
|
||||
'groupit' => TRUE
|
||||
),
|
||||
array(
|
||||
'group' => array('searchBy['.$n.']', 'relation['.$n.']', 'criteria['.$n.']'),
|
||||
'name' => NULL,
|
||||
'label' => NULL,
|
||||
'seperator' => ' ',
|
||||
'appendName'=> NULL
|
||||
),
|
||||
$n>$rowsBegin ? array(
|
||||
'element' => 's2',
|
||||
'type' => 'static',
|
||||
'text' => "</div id='searchRow_$n'>"
|
||||
) : NULL,
|
||||
);
|
||||
$this->_parseArr2Form($form, $advRow);
|
||||
unset ($group);
|
||||
|
||||
$form->addElement('static', 's1', NULL, "<div id='searchRow_$n'>");
|
||||
|
||||
if ($n>$rowsBegin) $form->addElement('static', 's1_style', NULL, "<style type='text/css'>#searchRow_$n {visibility : hidden; height : 0px;}</style>");
|
||||
$sel = &$form->createElement('hierselect', "row_$n", NULL);
|
||||
$sel->setOptions(array($col1, $col2));
|
||||
$group[] = &$sel;
|
||||
$group[] = &$form->createElement('text', 'criteria['.$n.']', NULL);
|
||||
$group[] = &$form->createElement('button', "dropRow_$n", 'Drop', array('onClick' => "document.getElementById('searchRow_$n').style.visibility = 'hidden'; document.getElementById('searchRow_$n').style.height = '0px'"));
|
||||
$form->addGroup($group);
|
||||
|
||||
$form->addElement('static', 's2', NULL, "</div id='searchRow_$n'>");
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -52,7 +52,7 @@ $ui_fmask = array(
|
|||
array(
|
||||
'rule' => 'regex',
|
||||
'element' => 'stationURL',
|
||||
'format' => '/^[0-9]{5}$/',
|
||||
'format' => UI_REGEX_URL,
|
||||
'rulemsg' => 'URL seems not to be valid'
|
||||
),
|
||||
array(
|
||||
|
@ -170,25 +170,25 @@ $ui_fmask = array(
|
|||
'element' => 'Title',
|
||||
'type' => 'text',
|
||||
'label' => 'Title',
|
||||
'required'=> TRUE,
|
||||
'required' => TRUE
|
||||
),
|
||||
array(
|
||||
'element' => 'Creator',
|
||||
'type' => 'text',
|
||||
'label' => 'Creator',
|
||||
'required'=> TRUE,
|
||||
'required' => TRUE
|
||||
),
|
||||
array(
|
||||
'element' => 'Type_Genre',
|
||||
'type' => 'text',
|
||||
'label' => 'Type_Genre',
|
||||
'required'=> TRUE,
|
||||
'required' => TRUE,
|
||||
),
|
||||
array(
|
||||
'element' => 'Format',
|
||||
'type' => 'select',
|
||||
'label' => 'Format',
|
||||
'required'=> TRUE,
|
||||
'required' => TRUE,
|
||||
'options' => array(
|
||||
'File' => 'File',
|
||||
'live stream' => 'Live Stream',
|
||||
|
@ -200,7 +200,7 @@ $ui_fmask = array(
|
|||
'element' => 'Format_Extent',
|
||||
'type' => 'text',
|
||||
'label' => 'Format_Extent',
|
||||
'required'=> TRUE,
|
||||
'required' => TRUE,
|
||||
),
|
||||
),
|
||||
'Music_Basic' => array(
|
||||
|
@ -418,6 +418,7 @@ $ui_fmask = array(
|
|||
'element' => 'Title',
|
||||
'type' => 'text',
|
||||
'label' => 'Title',
|
||||
'relation' => 1
|
||||
),
|
||||
array(
|
||||
'element' => 'Coverage',
|
||||
|
@ -717,8 +718,8 @@ $ui_fmask = array(
|
|||
array('group' => array('addRow', 'doSearch')
|
||||
),
|
||||
),
|
||||
'searchform.relations' =>
|
||||
array(
|
||||
'relations' => array(
|
||||
'standard' => array(
|
||||
'full' => 'full',
|
||||
'partial' => 'partial',
|
||||
'prefix' => 'prefix',
|
||||
|
@ -728,6 +729,13 @@ $ui_fmask = array(
|
|||
'>' => '>',
|
||||
'>=' => '>='
|
||||
),
|
||||
1 => array(
|
||||
'full' => 'full',
|
||||
'partial' => 'partial',
|
||||
'prefix' => 'prefix',
|
||||
'=' => '='
|
||||
),
|
||||
),
|
||||
'languages' => array(
|
||||
array(
|
||||
'element' => 'langid',
|
||||
|
|
|
@ -463,18 +463,19 @@ class uiHandler extends uiBase {
|
|||
$form = new HTML_QuickForm('validation', UI_STANDARD_FORM_METHOD, UI_HANDLER);
|
||||
$this->_parseArr2Form($form, $mask, 'server');
|
||||
if (!$form->validate()) {
|
||||
$_SESSION['retransferFormData'] = $formdata;
|
||||
$_SESSION['retransferFormData'] = $_REQUEST;
|
||||
return FALSE;
|
||||
}
|
||||
## test for uploadet files bacause HTMLQuickForm::validate() ignores them ####
|
||||
foreach($mask as $k) {
|
||||
if ($k['type']=='file' && $k['required']==TRUE) {
|
||||
if ($formdata[$k['element']]['error']) {
|
||||
$_SESSION['retransferFormData'] = $formdata;
|
||||
if ($_FILES[$k['element']]['error']) {
|
||||
$_SESSION['retransferFormData'] = array_merge($_REQUEST, $_FILES);
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
reset($mask);
|
||||
return TRUE;
|
||||
}
|
||||
|
@ -488,7 +489,12 @@ class uiHandler extends uiBase {
|
|||
if ($this->_validateForm($formdata, $mask)) {
|
||||
|
||||
foreach($mask as $key=>$val) {
|
||||
if ($this->_isTextInput ($val['type'], $mask)) $this->gb->saveGroupPref($this->sessid, 'StationPrefs', $val['element'], $formdata[$val['element']]);
|
||||
if ($this->_isTextInput ($val['type'], $mask)) {
|
||||
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']);
|
||||
}
|
||||
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->alertMsg = $this->tra('Error uploading Logo');
|
||||
|
|
Loading…
Reference in New Issue