*** empty log message ***
This commit is contained in:
parent
10421b1a46
commit
e5120cbf0b
18 changed files with 135 additions and 72 deletions
|
@ -90,8 +90,8 @@ switch($_REQUEST['act']){
|
|||
$uiHandler->SUBJECTS->removeSubj($_REQUEST);
|
||||
break;
|
||||
|
||||
case "SUBJECTS.addSubj2Group":
|
||||
$uiHandler->SUBJECTS->addSubj2Group($_REQUEST);
|
||||
case "SUBJECTS.addSubj2Gr":
|
||||
$uiHandler->SUBJECTS->addSubj2Gr($_REQUEST);
|
||||
break;
|
||||
|
||||
case "SUBJECTS.removeSubjFromGr":
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
{include file="sub/mouseover.tpl"}
|
||||
onClick="hidealttextnow(); return contextmenu('{$i.id}'
|
||||
onClick="return contextmenu('{$i.id}'
|
||||
, 'SP.addItem'
|
||||
|
||||
{if $i.type|lower == 'audioclip'}
|
||||
|
|
|
@ -8,10 +8,10 @@
|
|||
<table style="width: 535px;">
|
||||
<tr class="blue_head">
|
||||
<td style="width: 30px"><input type="checkbox" name="all" onClick="collector_switchAll('SEARCHRESULTS')"></td>
|
||||
<td style="width: 160px"><a href="#" onClick="hpopup('{$UI_HANDLER}?act={$_act_prefix}.reOrder&by=title', 'order');" id="blue_head">##Title##</a></td>
|
||||
<td style="width: 134px"><a href="#" onClick="hpopup('{$UI_HANDLER}?act={$_act_prefix}.reOrder&by=creator', 'order');" id="blue_head">##Creator##</a></td>
|
||||
<td style="width: 89px"><a href="#" onClick="hpopup('{$UI_HANDLER}?act={$_act_prefix}.reOrder&by=extent', 'order');" id="blue_head">##Duration##</a></td>
|
||||
<td style="width: 37px; border: 0"><a href="#" onClick="hpopup('{$UI_HANDLER}?act={$_act_prefix}.reOrder&by=type', 'order');" id="blue_head">##Type##</a></td>
|
||||
<td style="width: 200px"><a href="#" onClick="hpopup('{$UI_HANDLER}?act={$_act_prefix}.reOrder&by=title', 'order');" id="blue_head">##Title##</a></td>
|
||||
<td style="width: 195px"><a href="#" onClick="hpopup('{$UI_HANDLER}?act={$_act_prefix}.reOrder&by=creator', 'order');" id="blue_head">##Creator##</a></td>
|
||||
<td><a href="#" onClick="hpopup('{$UI_HANDLER}?act={$_act_prefix}.reOrder&by=extent', 'order');" id="blue_head">##Duration##</a></td>
|
||||
<td style="width: 41px; border: 0; text-align: center"><a href="#" onClick="hpopup('{$UI_HANDLER}?act={$_act_prefix}.reOrder&by=type', 'order');" id="blue_head">##Type##</a></td>
|
||||
</tr>
|
||||
{foreach from=$_results.items item=i}
|
||||
<!-- start item -->
|
||||
|
@ -25,8 +25,10 @@
|
|||
{/if}
|
||||
</td>
|
||||
<td {include file="library/actionhandler.tpl"}>{$i.creator}</td>
|
||||
<td {include file="library/actionhandler.tpl"}>{assign var="_duration" value=$i.duration}{niceTime in=$_duration}</td>
|
||||
<td {include file="library/actionhandler.tpl"} style="border: 0"><img src="img/{$i.type|lower}.gif" border="0" alt="{$i.type|lower|capitalize}" /></td>
|
||||
<td {include file="library/actionhandler.tpl"} style="text-align: right">{assign var="_duration" value=$i.duration}{niceTime in=$_duration}</td>
|
||||
<td {include file="library/actionhandler.tpl"} style="border: 0; text-align: center">
|
||||
<img src="img/{$i.type|lower}.gif" border="0" alt="{$i.type|lower|capitalize}" {include file="sub/mouseover.tpl"} />
|
||||
</td>
|
||||
</tr>
|
||||
<!-- end item -->
|
||||
{/foreach}
|
||||
|
@ -76,4 +78,5 @@
|
|||
##No match found.##
|
||||
{/if}
|
||||
|
||||
{assign var="_PL_activeId" value=NULL}
|
||||
{assign var="_PL_activeId" value=null}
|
||||
{assign var="_duration" value=null}
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
</head>
|
||||
<body>
|
||||
<center>
|
||||
<!--
|
||||
<table height="100%" width="100%"><tr><td><center>
|
||||
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" width="50" height="50" id="preloader" align="middle">
|
||||
<param name="allowScriptAccess" value="sameDomain" />
|
||||
|
@ -11,5 +12,7 @@
|
|||
<param name="bgcolor" value="#ffffff" />
|
||||
<embed src="img/preloader.swf" quality="high" bgcolor="#ffffff" width="50" height="50" name="preloader" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />
|
||||
</object>
|
||||
-->
|
||||
<img src="img/progress.gif" height="100px">
|
||||
</center>
|
||||
</td></tr></table>
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
<ul>
|
||||
<li><a href="{$UI_BROWSER}?act=changeStationPrefs">##Station Settings##</a></li>
|
||||
<li><a href="{$UI_BROWSER}?act=SUBJECTS">##User/Groups##</a></li>
|
||||
<li><a href="{$UI_BROWSER}?act=fileList&id={$START.fid}">##File List##</a></li>
|
||||
<!-- <li><a href="{$UI_BROWSER}?act=fileList&id={$START.fid}">##File List##</a></li> -->
|
||||
</ul>
|
||||
</li>
|
||||
{/if}
|
||||
|
|
|
@ -1,2 +1 @@
|
|||
{include file="sub/mouseover.tpl"}
|
||||
onClick="hidealttextnow(); return contextmenu('{$i.attrs.id}', {if $i.type|lower == "audioclip"}'listen', '{$i.gunid}', {/if} 'PL.removeItem')"
|
||||
onClick="return contextmenu('{$i.attrs.id}', {if $i.type|lower == "audioclip"}'listen', '{$i.gunid}', {/if} 'PL.removeItem')"
|
||||
|
|
|
@ -16,10 +16,10 @@
|
|||
<script type="text/javascript">
|
||||
document.forms['PL'].elements['all'].checked = false;
|
||||
</script>
|
||||
<td style="width: 155px">##Name##</td>
|
||||
<td style="width: 69px">##Duration##</td>
|
||||
<td style="width: 178px">##Artist##</td>
|
||||
<td style="width: 107px;">##Type##</td>
|
||||
<td style="width: 200px">##Name##</td>
|
||||
<td> ##Duration##</td>
|
||||
<td style="width: 200px">##Artist##</td>
|
||||
<td style="width: 30px;">##Type##</td>
|
||||
<td style="width: 30px; border: 0">##Move##</td>
|
||||
</tr>
|
||||
<!-- end repeat after 14 columns -->
|
||||
|
@ -34,11 +34,15 @@
|
|||
<tr class="{cycle values='blue1, blue2'}">
|
||||
<td><input type="checkbox" class="checkbox" name="{$i.attrs.id}"/></td>
|
||||
<td {include file="playlist/actionhandler.tpl"}>{$i.title}</td>
|
||||
<td {include file="playlist/actionhandler.tpl"}>{$i.duration}</td>
|
||||
<td {include file="playlist/actionhandler.tpl"} style="text-align: right">
|
||||
{assign var="_duration" value=$i.duration}{niceTime in=$_duration}
|
||||
</td>
|
||||
<td {include file="playlist/actionhandler.tpl"}>{$i.creator}</td>
|
||||
<td {include file="playlist/actionhandler.tpl"}>{$i.type|lower|capitalize}</td>
|
||||
<td {include file="playlist/actionhandler.tpl"}>
|
||||
<img src="img/{$i.type}.gif" border="0" alt="{$i.type|capitalize}" {include file="sub/mouseover.tpl"} />
|
||||
</td>
|
||||
<td style="border: 0">
|
||||
<a href="#" onClick="hpopup('{$UI_HANDLER}?act=PL.moveItem&id={$i.attrs.id}&pos={$pos-1}')"><img src="img/bt_top_xsm.gif" alt="##move up##" vspace=1 hspace=1/></a>
|
||||
<a href="#" onClick="hpopup('{$UI_HANDLER}?act=PL.moveItem&id={$i.attrs.id}&pos={$pos-1}')"><img src="img/bt_top_xsm.gif" alt="##move up##" vspace=1 hspace=1/></a>
|
||||
<a href="#" onClick="hpopup('{$UI_HANDLER}?act=PL.moveItem&id={$i.attrs.id}&pos={$pos+1}')"><img src="img/bt_bottom_xsm.gif" alt="##move down##" vspace=1 hspace=1/></a>
|
||||
</td>
|
||||
</tr>
|
||||
|
@ -75,4 +79,4 @@
|
|||
|
||||
<!-- end playlist editor -->
|
||||
|
||||
|
||||
{assign var="_duration" value=null}
|
||||
|
|
|
@ -32,7 +32,7 @@ function SCHEDULE_submit()
|
|||
function SCHEDULE_snap2Hour()
|
||||
{
|
||||
{/literal}
|
||||
document.forms["schedule"].elements["time[H]"].value = "{$SCHEDULER->scheduleAt.hour}";
|
||||
document.forms["schedule"].elements["time[H]"].value = "{$SCHEDULER->scheduleAt.hour|string_format:'%d'}";
|
||||
document.forms["schedule"].elements["time[i]"].value = "0";
|
||||
document.forms["schedule"].elements["time[s]"].value = "0";
|
||||
{literal}
|
||||
|
|
|
@ -42,7 +42,7 @@
|
|||
{$i.start}-{$i.end}
|
||||
{$i.creator}
|
||||
</div>
|
||||
<div style="background-color: #FF6F1F; height: 3px" onClick="return contextmenu('year={$SCHEDULER->curr.year}&month={$SCHEDULER->curr.month}&day={$SCHEDULER->curr.day}&hour={getHour time=$i.end}&minute={getMinute time=$i.end}&second={getSecond time=$i.end plus=1}', 'SCHEDULER.addItem')"></div>
|
||||
{* <div style="background-color: #FF6F1F; height: 3px" onClick="return contextmenu('year={$SCHEDULER->curr.year}&month={$SCHEDULER->curr.month}&day={$SCHEDULER->curr.day}&hour={getHour time=$i.end}&minute={getMinute time=$i.end}&second={getSecond time=$i.end plus=1}', 'SCHEDULER.addItem')"></div> *}
|
||||
{/foreach}
|
||||
|
||||
</td>
|
||||
|
|
|
@ -54,7 +54,7 @@
|
|||
<p>{$i.start|truncate:5:""} - {$i.end|truncate:5:""}</p>
|
||||
<p>{$i.creator}</p>
|
||||
</div>
|
||||
<div style="background-color: #FF6F1F; height: 3px" onClick="return contextmenu('year={$_day.year}&month={$_day.month}&day={$_day.day}&hour={getHour time=$i.end}&minute={getMinute time=$i.end}&second={getSecond time=$i.end}', 'SCHEDULER.addItem')"></div>
|
||||
{* <div style="background-color: #FF6F1F; height: 3px" onClick="return contextmenu('year={$_day.year}&month={$_day.month}&day={$_day.day}&hour={getHour time=$i.end}&minute={getMinute time=$i.end}&second={getSecond time=$i.end}', 'SCHEDULER.addItem')"></div> *}
|
||||
{/foreach}
|
||||
</td>
|
||||
{else}
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
{include file="sub/mouseover.tpl"}
|
||||
onClick="hidealttextnow(); return contextmenu('{$i.id}'
|
||||
onClick="return contextmenu('{$i.id}'
|
||||
, 'SP.removeItem'
|
||||
|
||||
{if $i.type == 'audioclip'}
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
<td style="width: 30px"><input type="checkbox" name="all" onClick="collector_switchAll('SP')"></td>
|
||||
<td style="width: 95px"><a href="#" onClick="hpopup('{$UI_HANDLER}?act=SP.reOrder&by=title', 'order');" id="blue_head">##Title##</a></td>
|
||||
<td style="width: 69px"><a href="#" onClick="hpopup('{$UI_HANDLER}?act=SP.reOrder&by=title', 'order');" id="blue_head">##Duration##</td>
|
||||
<td style="width: 41px; border: 0"><a href="#" onClick="hpopup('{$UI_HANDLER}?act=SP.reOrder&by=title', 'order');" id="blue_head">##Type##</td>
|
||||
<td style="width: 41px; border: 0; text-align: center"><a href="#" onClick="hpopup('{$UI_HANDLER}?act=SP.reOrder&by=title', 'order');" id="blue_head">##Type##</td>
|
||||
</tr>
|
||||
<!-- end table header -->
|
||||
|
||||
|
@ -41,8 +41,10 @@
|
|||
{$i.title|truncate:12:'...':true}
|
||||
{/if} {* on some reason object call doesn´t like usage of array *}
|
||||
</td> {assign var="_duration" value=$i.duration}
|
||||
<td {include file="scratchpad/actionhandler.tpl"}>{niceTime in=$_duration}</td>
|
||||
<td {include file="scratchpad/actionhandler.tpl"} style="border: 0"><img src="img/{$i.type}.gif" border="0" alt="{$i.type|capitalize}" /></td>
|
||||
<td {include file="scratchpad/actionhandler.tpl"} style="text-align: right">{niceTime in=$_duration}</td>
|
||||
<td {include file="scratchpad/actionhandler.tpl"} style="border: 0; text-align: center">
|
||||
<img src="img/{$i.type}.gif" border="0" alt="{$i.type|capitalize}" {include file="sub/mouseover.tpl"} />
|
||||
</td>
|
||||
</tr>
|
||||
<!-- end item -->
|
||||
{/foreach}
|
||||
|
@ -66,8 +68,8 @@
|
|||
</select>
|
||||
<script type="text/javascript">
|
||||
document.forms['SP'].elements['SP_multiaction'].options[0].selected = true;
|
||||
//document.forms['SP'].elements['all'].checked = false;
|
||||
//collector_switchAll('SP');
|
||||
document.forms['SP'].elements['all'].checked = false;
|
||||
collector_switchAll('SP');
|
||||
</script>
|
||||
<a href="#" onClick="collector_clearAll('SP', 'SP.removeItem')" id="blue_head">##Clear##</a>
|
||||
</div>
|
||||
|
@ -76,4 +78,5 @@
|
|||
</form>
|
||||
<!-- end scratch pad -->
|
||||
|
||||
{assign var="_PL_activeId" value=NULL}
|
||||
{assign var="_PL_activeId" value=null}
|
||||
{assign var="_duration" value=null}
|
|
@ -3,15 +3,19 @@
|
|||
|
||||
function collector_submit(formname, action)
|
||||
{
|
||||
var href = '{/literal}{$UI_HANDLER}{literal}?act='+action;
|
||||
var href = '';
|
||||
var n;
|
||||
|
||||
for (n=0; n < (document.forms[formname].elements.length); n++) {
|
||||
if (document.forms[formname].elements[n].checked && document.forms[formname].elements[n].name!='all') {
|
||||
if (document.forms[formname].elements[n].checked && document.forms[formname].elements[n].name != 'all') {
|
||||
href = href + '&id[]=' + document.forms[formname].elements[n].name;
|
||||
}
|
||||
}
|
||||
hpopup(href);
|
||||
|
||||
if (href == '')
|
||||
return false;
|
||||
|
||||
hpopup({/literal}'{$UI_HANDLER}{literal}?act=' + action + href);
|
||||
}
|
||||
|
||||
function collector_switchAll(formname)
|
||||
|
|
|
@ -109,8 +109,8 @@
|
|||
contextmenuHtml = contextmenuHtml + "<li><a class='contextmenu' href='{$UI_BROWSER}?act=SUBJECTS.manageGroupMember&"+param+"' "+oF+"> ##Manage group members## </a></li>";
|
||||
break;
|
||||
|
||||
case "SUBJECTS.addSubj2Group":
|
||||
contextmenuHtml = contextmenuHtml + "<li><a class='contextmenu' href='#' onClick=\"hpopup('{$UI_HANDLER}?act=SUBJECTS.addSubj2Group&"+param+"')\" "+oF+"> ##Add to group## </a></li>";
|
||||
case "SUBJECTS.addSubj2Gr":
|
||||
contextmenuHtml = contextmenuHtml + "<li><a class='contextmenu' href='#' onClick=\"hpopup('{$UI_HANDLER}?act=SUBJECTS.addSubj2Gr&"+param+"')\" "+oF+"> ##Add to group## </a></li>";
|
||||
break;
|
||||
|
||||
case "SUBJECTS.removeSubjFromGr":
|
||||
|
|
|
@ -14,8 +14,8 @@
|
|||
<form name="GRP">
|
||||
<tr class="blue_head">
|
||||
<td style="width: 30px"><input type="checkbox" name="all" onClick="collector_switchAll('GRP')"></td>
|
||||
<td style="width: 164px">##Name##</td>
|
||||
<td style="width: 41px; border: 0">##Type##</td>
|
||||
<td style="width: 164px">##Login##</td>
|
||||
<td style="width: 41px; border: 0; text-align: center">##Type##</td>
|
||||
</tr>
|
||||
|
||||
{assign var="_member" value=$SUBJECTS->getGroupMember($_REQUEST.id)}
|
||||
|
@ -25,7 +25,7 @@
|
|||
onClick="return contextmenu('login={urlencode str=$i.login}&gname={urlencode str=$_gname}', 'SUBJECTS.removeSubjFromGr')">
|
||||
<td><input type="checkbox" class="checkbox" name="{$i.id}"/></td>
|
||||
<td>{$i.login}</td>
|
||||
<td style="border: 0"><img src="img/{$i.type}.gif" border="0" alt="{$i.type|capitalize}" /></td>
|
||||
<td style="border: 0; text-align: center"><img src="img/{$i.type|lower}.png" border="0" alt="{$i.type|capitalize}" /></td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
{else}
|
||||
|
@ -35,11 +35,13 @@
|
|||
</table>
|
||||
</div>
|
||||
<div class="footer" style="width:250px;">
|
||||
<a href="" onClick="collector_submit('GRP', this.value)" id="blue_head">##Add selected##</a>
|
||||
<a href="" onClick="collector_submit('GRP', 'SUBJECTS.removeSubjFromGr&gname={urlencode str=$_gname}')" id="blue_head">##Remove selected##</a>
|
||||
</div>
|
||||
</div>
|
||||
<!-- end current group member -->
|
||||
|
||||
|
||||
|
||||
<!-- start add group member -->
|
||||
<div class="container_elements" style="float: right">
|
||||
<h1>##Add Members##</h1>
|
||||
|
@ -50,7 +52,7 @@
|
|||
<!-- start table header -->
|
||||
<tr class="blue_head">
|
||||
<td style="width: 30px"><input type="checkbox" name="all" onClick="collector_switchAll('NOGRP')"></td>
|
||||
<td style="width: 164px">##Name##</td>
|
||||
<td style="width: 164px">##Login##</td>
|
||||
<td style="width: 41px; border: 0">##Type##</td>
|
||||
</tr>
|
||||
<!-- end table header -->
|
||||
|
@ -62,8 +64,8 @@
|
|||
<!-- start item -->
|
||||
<tr class="{cycle values='blue1, blue2'}">
|
||||
<td><input type="checkbox" class="checkbox" name="{$i.id}"/></td>
|
||||
<td onClick="return contextmenu('login={urlencode str=$i.login}&gname={urlencode str=$_gname}', 'SUBJECTS.addSubj2Group')">{$i.login}</td>
|
||||
<td style="border: 0"><img src="img/{$i.type}.gif" border="0" alt="{$i.type|capitalize}" /></td>
|
||||
<td onClick="return contextmenu('login={urlencode str=$i.login}&gname={urlencode str=$_gname}', 'SUBJECTS.addSubj2Gr')">{$i.login}</td>
|
||||
<td style="border: 0; text-align: center"><img src="img/{$i.type|lower}.png" border="0" alt="{$i.type|capitalize}" /></td>
|
||||
</tr>
|
||||
<!-- end item -->
|
||||
{/if}
|
||||
|
@ -76,7 +78,7 @@
|
|||
</table>
|
||||
</div>
|
||||
<div class="footer" style="width:250px;">
|
||||
<a href="" onClick="collector_submit('GRP', this.value)" id="blue_head">##Add selected##</a>
|
||||
<a href="" onClick="collector_submit('NOGRP', 'SUBJECTS.addSubj2Gr&gname={urlencode str=$_gname}')" id="blue_head">##Add selected##</a>
|
||||
</div>
|
||||
</div>
|
||||
<!-- end add group member -->
|
||||
|
|
|
@ -5,24 +5,25 @@
|
|||
<table style="width: 574px;">
|
||||
|
||||
<tr class="blue_head">
|
||||
<td style="width: 189px">##Name##</td>
|
||||
<td style="width: 85px;">##Members##</td>
|
||||
<td style="width: 85px; border: 0">##Type##</td>
|
||||
<td>##Login##</td>
|
||||
<td style="width: 40px; text-align: center">##Members##</td>
|
||||
<td style="width: 40px; border: 0; text-align: center">##Type##</td>
|
||||
</tr>
|
||||
|
||||
{foreach from=$SUBJECTS->getSubjectsWCnt() item=i}
|
||||
{if $i.type|lower == 'g'}{assign var="_type" value="group"}{else}{assign var="_type" value="user"}{/if}
|
||||
<tr class="{cycle values='blue1, blue2'}"
|
||||
onClick="return contextmenu('id={$i.id}&login={urlencode str=$i.login}', {if $i.type|lower eq 'g'}'SUBJECTS.manageGroupMember', {else}'SUBJECTS.chgPasswd', {/if} 'SUBJECTS.removeSubj')"
|
||||
>
|
||||
<td>{$i.login}</td>
|
||||
<td>
|
||||
<td style="width: 30px; text-align: center;">
|
||||
{if $i.type|lower == 'g'}
|
||||
{$i.cnt}
|
||||
{else}
|
||||
-
|
||||
{/if}
|
||||
</td>
|
||||
<td style="border: 0"><img src="img/{$i.type|lower}.gif" border="0" alt="{$i.type|capitalize}" /></td>
|
||||
<td style="border: 0; text-align: center;"><img src="img/{$_type}.png" border="0" alt="{$_type|capitalize}" /></td>
|
||||
|
||||
</tr>
|
||||
{/foreach}
|
||||
|
@ -37,3 +38,5 @@
|
|||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{assign var="_type" value=null}
|
||||
|
|
|
@ -101,26 +101,42 @@ class uiScheduler extends uiCalendar
|
|||
|
||||
$week = $this->getWeekEntrys();
|
||||
## search for next entry
|
||||
foreach ($week[$this->scheduleAt['day']] as $entry) {
|
||||
if (strtotime($entry[0]['start']) >= strtotime($this->scheduleAt['hour'].':'.$this->scheduleAt['minute'].':'.$this->scheduleAt['second'])) {
|
||||
list($this->scheduleNext['hour'], $this->scheduleNext['minute'], $this->scheduleNext['second']) = explode(':', strftime('%H:%M:%S', strtotime($entry[0]['start'])-1));
|
||||
break;
|
||||
if (count($week[$this->scheduleAt['day']]) >= 1) {
|
||||
foreach ($week[$this->scheduleAt['day']] as $entry) {
|
||||
if (strtotime($entry[0]['start']) >= strtotime($this->scheduleAt['hour'].':'.$this->scheduleAt['minute'].':'.$this->scheduleAt['second'])) {
|
||||
list($this->scheduleNext['hour'], $this->scheduleNext['minute'], $this->scheduleNext['second']) = explode(':', strftime('%H:%M:%S', strtotime($entry[0]['start'])-1));
|
||||
break;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
## start at midnight
|
||||
$this->scheduleNext['hour'] = 0;
|
||||
$this->scheduleNext['minute'] = 0;
|
||||
$this->scheduleNext['second'] = 0;
|
||||
}
|
||||
|
||||
reset ($week);
|
||||
## search for previous entry
|
||||
foreach (array_reverse($week[$this->scheduleAt['day']]) as $entry) {
|
||||
if (strtotime($entry[0]['end']) <= strtotime($this->scheduleAt['hour'].':'.$this->scheduleAt['minute'].':'.$this->scheduleAt['second'])) {
|
||||
list($this->schedulePrev['hour'], $this->schedulePrev['minute'], $this->schedulePrev['second']) = explode(':', strftime('%H:%M:%S', strtotime($entry[0]['end'])+1));
|
||||
break;
|
||||
if (count($week[$this->scheduleAt['day']]) >= 1) {
|
||||
foreach (array_reverse($week[$this->scheduleAt['day']]) as $entry) {
|
||||
if (strtotime($entry[0]['end']) <= strtotime($this->scheduleAt['hour'].':'.$this->scheduleAt['minute'].':'.$this->scheduleAt['second'])) {
|
||||
list($this->schedulePrev['hour'], $this->schedulePrev['minute'], $this->schedulePrev['second']) = explode(':', strftime('%H:%M:%S', strtotime($entry[0]['end'])+1));
|
||||
break;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
## start at midnight
|
||||
$this->schedulePrev['hour'] = 0;
|
||||
$this->schedulePrev['minute'] = 0;
|
||||
$this->schedulePrev['second'] = 0;
|
||||
}
|
||||
|
||||
#print_r($this->schedulePrev);
|
||||
#print_r($this->scheduleNext);
|
||||
|
||||
}
|
||||
|
||||
|
||||
function getWeekEntrys()
|
||||
{
|
||||
## build array within all entrys of current week ##
|
||||
|
|
|
@ -43,29 +43,29 @@ class uiSubjects
|
|||
*
|
||||
* @param formdata array('login', 'pass')
|
||||
*/
|
||||
function addSubj(&$formdata)
|
||||
function addSubj(&$request)
|
||||
{
|
||||
include dirname(__FILE__). '/formmask/subjects.php';
|
||||
$this->setRedir();
|
||||
|
||||
if ($this->Base->_validateForm($formdata, $mask[$formdata['passwd'] ? 'addUser' : 'addGroup']) !== TRUE) {
|
||||
if ($this->Base->_validateForm($request, $mask[$request['passwd'] ? 'addUser' : 'addGroup']) !== TRUE) {
|
||||
return FALSE;
|
||||
}
|
||||
if ($this->Base->gb->checkPerm($this->Base->userid, 'subjects') !== TRUE) {
|
||||
$this->Base->_retMsg('Access denied.');
|
||||
return FALSE;
|
||||
}
|
||||
if ($this->Base->gb->getSubjId($formdata['login'])) {
|
||||
$this->Base->_retMsg('User or group "$1" already exists.', $formdata['login']);
|
||||
if ($this->Base->gb->getSubjId($request['login'])) {
|
||||
$this->Base->_retMsg('User or group "$1" already exists.', $request['login']);
|
||||
$this->Base->redirUrl = $_SERVER['HTTP_REFERER'];
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if (PEAR::isError($res = $this->Base->gb->addSubj($formdata['login'], ($formdata['passwd']==='' ? NULL : $formdata['passwd'])))) {
|
||||
if (PEAR::isError($res = $this->Base->gb->addSubj($request['login'], ($request['passwd']==='' ? NULL : $request['passwd'])))) {
|
||||
$this->Base->_retMsg($res->getMessage());
|
||||
return FALSE;
|
||||
}
|
||||
if (UI_VERBOSE) $this->Base->_retMsg('Subject $1 added.', $formdata['login']);
|
||||
if (UI_VERBOSE) $this->Base->_retMsg('Subject $1 added.', $request['login']);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
@ -77,7 +77,7 @@ class uiSubjects
|
|||
*
|
||||
* @param login string, login name of removed user
|
||||
*/
|
||||
function removeSubj($request)
|
||||
function removeSubj(&$request)
|
||||
{
|
||||
$this->setReload();
|
||||
|
||||
|
@ -127,7 +127,7 @@ class uiSubjects
|
|||
* @param pass string, new password
|
||||
* @param pass2 string, retype of new password
|
||||
*/
|
||||
function chgPasswd($request)
|
||||
function chgPasswd(&$request)
|
||||
{
|
||||
$this->setRedir();
|
||||
|
||||
|
@ -204,7 +204,6 @@ class uiSubjects
|
|||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* addSubj2Group
|
||||
*
|
||||
|
@ -215,9 +214,23 @@ class uiSubjects
|
|||
* @param gname string
|
||||
* @param reid string, local id of managed group, just needed for redirect
|
||||
*/
|
||||
function addSubj2Group(&$request)
|
||||
function addSubj2Gr(&$request)
|
||||
{
|
||||
$this->Base->redirUrl = UI_BROWSER.'?popup[]=_reload_parent&popup[]=_close';
|
||||
$this->setReload();
|
||||
|
||||
if (!$request['login'] && !$request['id']) {
|
||||
$this->Base->_retMsg('Nothing selected.');
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
## loop for multiple action
|
||||
if (is_array($request['id'])) {
|
||||
foreach ($request['id'] as $val) {
|
||||
$req = array('login' => $this->Base->gb->getSubjName($val), 'gname' => $request['gname']);
|
||||
$this->addSubj2Gr($req);
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
if ($this->Base->gb->checkPerm($this->Base->userid, 'subjects') !== TRUE){
|
||||
$this->Base->_retMsg('Access denied.');
|
||||
|
@ -243,6 +256,21 @@ class uiSubjects
|
|||
function removeSubjFromGr(&$request)
|
||||
{
|
||||
$this->setReload();
|
||||
|
||||
if (!$request['login'] && !$request['id']) {
|
||||
$this->Base->_retMsg('Nothing selected.');
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
## loop for multiple action
|
||||
if (is_array($request['id'])) {
|
||||
foreach ($request['id'] as $val) {
|
||||
$req = array('login' => $this->Base->gb->getSubjName($val), 'gname' => $request['gname']);
|
||||
$this->removeSubjFromGr($req);
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
if ($this->Base->gb->checkPerm($this->Base->userid, 'subjects') !== TRUE){
|
||||
$this->Base->_retMsg('Access denied.');
|
||||
return FALSE;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue