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