mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-22 14:41:29 +01:00
Small restructuring for speed.
This commit is contained in:
parent
cd18ede17e
commit
1edb9cfbaf
@ -356,53 +356,24 @@
|
||||
|
||||
function getMonthText($name, $selected=0)
|
||||
{
|
||||
$out = '<select name="'.$name.'">'."\n";
|
||||
$out = '';
|
||||
$c_monthnames = count($this->monthnames);
|
||||
for($i=0;$i<$c_monthnames;$i++)
|
||||
{
|
||||
$out .= '<option value="'.$i.'"';
|
||||
if($selected==$i)
|
||||
{
|
||||
$out .= ' SELECTED';
|
||||
$out .= '<option value="'.$i.'"'.($selected!=$i?'':' selected').'>'.($this->monthnames[$i]!=''?lang($this->monthnames[$i]):'').'</option>'."\n";
|
||||
}
|
||||
$out .= '>';
|
||||
if($this->monthnames[$i]!='')
|
||||
{
|
||||
$out .= lang($this->monthnames[$i]);
|
||||
}
|
||||
else
|
||||
{
|
||||
$out .= '';
|
||||
}
|
||||
$out .= '</option>'."\n";
|
||||
}
|
||||
$out .= '</select>'."\n";
|
||||
return $out;
|
||||
return '<select name="'.$name.'">'."\n".$out.'</select>'."\n";
|
||||
}
|
||||
|
||||
function getDays($name, $selected=0)
|
||||
{
|
||||
$out = '<select name="'.$name.'">'."\n";
|
||||
$out = '';
|
||||
|
||||
for($i=0;$i<32;$i++)
|
||||
{
|
||||
if($i==0)
|
||||
{
|
||||
$val = '';
|
||||
$out .= '<option value="'.($i?$i:'').'"'.($selected!=$i?'':' selected').'>'.($i?$i:'').'</option>'."\n";
|
||||
}
|
||||
else
|
||||
{
|
||||
$val = $i;
|
||||
}
|
||||
$out .= '<option value="'.$val.'"';
|
||||
if($selected==$i)
|
||||
{
|
||||
$out .= ' SELECTED';
|
||||
}
|
||||
$out .= '>'.$val.'</option>'."\n";
|
||||
}
|
||||
$out .= '</select>'."\n";
|
||||
return $out;
|
||||
return '<select name="'.$name.'">'."\n".$out.'</select>'."\n";
|
||||
}
|
||||
|
||||
function getYears($name, $selected = 0, $startYear = 0, $endyear = 0)
|
||||
|
Loading…
Reference in New Issue
Block a user