Vergleich admin/adminfunctions.php - 1.2.1 - 1.2.10

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 3Zeile 3
 * MyBB 1.2
* Copyright � 2006 MyBB Group, All Rights Reserved
*

 * MyBB 1.2
* Copyright � 2006 MyBB Group, All Rights Reserved
*

 * Website: http://www.mybboard.com
* License: http://www.mybboard.com/eula.html

 * Website: http://www.mybboard.net
* License: http://www.mybboard.net/eula.html

 *

 *

 * $Id: adminfunctions.php 2263 2006-09-26 09:24:25Z chris $

 * $Id: adminfunctions.php 3311 2007-09-13 13:55:27Z chris $

 */

$cssselectors = array(

 */

$cssselectors = array(

Zeile 84Zeile 84
	{
$htmltag = str_replace("<html", "<html lang=\"".$lang->settings['htmllang']."\"", $htmltag);
}

	{
$htmltag = str_replace("<html", "<html lang=\"".$lang->settings['htmllang']."\"", $htmltag);
}

 


	echo "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n";
echo $htmltag;
echo "<head>\n";

	echo "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n";
echo $htmltag;
echo "<head>\n";

Zeile 116Zeile 117
	echo "<tr><td class=\"hoptobuttons\">";
if(!is_array($links))
{

	echo "<tr><td class=\"hoptobuttons\">";
if(!is_array($links))
{

		$links[] = $links;

		$links = array($links);

	}
foreach($links as $key => $val)
{

	}
foreach($links as $key => $val)
{

Zeile 156Zeile 157
	global $bgcolor;

if($anchor)

	global $bgcolor;

if($anchor)

	{

	{

    	$anchor = "<a name=\"$anchor\">$title</a>";
}
else

    	$anchor = "<a name=\"$anchor\">$title</a>";
}
else

Zeile 173Zeile 174
	if(!is_array($titles))
{
$title[] = $titles;

	if(!is_array($titles))
{
$title[] = $titles;

	}

	}

	else
{
$colspan = 1;

	else
{
$colspan = 1;

Zeile 191Zeile 192
	echo "</tr>\n";
}
function makelabelcode($title, $value="", $colspan=1, $width1="40%", $width2="60%")

	echo "</tr>\n";
}
function makelabelcode($title, $value="", $colspan=1, $width1="40%", $width2="60%")

{
$bgcolor = getaltbg();

{
$bgcolor = getaltbg();

	if($value != "")
{
$width1 = " width=\"$width1\"";
$width2 = " width=\"$width2\"";
}
else

	if($value != "")
{
$width1 = " width=\"$width1\"";
$width2 = " width=\"$width2\"";
}
else

	{

	{

		$width1 = $width2 = "";
}
echo "<tr>\n<td class=\"$bgcolor\" colspan=\"$colspan\" valign=\"top\"$width1>$title</td>\n";
if($value != "")

		$width1 = $width2 = "";
}
echo "<tr>\n<td class=\"$bgcolor\" colspan=\"$colspan\" valign=\"top\"$width1>$title</td>\n";
if($value != "")

	{

	{

		echo "<td class=\"$bgcolor\" valign=\"top\" $width2>$value</td>\n";
}
echo "</tr>\n";

		echo "<td class=\"$bgcolor\" valign=\"top\" $width2>$value</td>\n";
}
echo "</tr>\n";

}

}

function makelinkcode($text, $url, $newwin=0, $class="")
{
if($newwin)

function makelinkcode($text, $url, $newwin=0, $class="")
{
if($newwin)

	{

	{

		$target = "target=\"_blank\"";
}
if($class)

		$target = "target=\"_blank\"";
}
if($class)

Zeile 226Zeile 227
	return " <a href=\"$url\" $target>$class</a>";
}
function makeinputcode($title, $name, $value="", $size="25", $extra="", $maxlength="", $autocomplete=1, $extra2="")

	return " <a href=\"$url\" $target>$class</a>";
}
function makeinputcode($title, $name, $value="", $size="25", $extra="", $maxlength="", $autocomplete=1, $extra2="")

{
$bgcolor = getaltbg();
$value = htmlspecialchars_uni($value);

{
$bgcolor = getaltbg();
$value = htmlspecialchars_uni($value);

	if($autocomplete != 1)
{
$ac = " autocomplete=\"off\"";

	if($autocomplete != 1)
{
$ac = " autocomplete=\"off\"";

Zeile 300Zeile 301
		$offcheck = "checked";
}
else

		$offcheck = "checked";
}
else

	{

	{

		$oncheck = "checked";
}
echo "<tr>\n<td class=\"$bgcolor\" valign=\"top\" width=\"40%\">$title</td>\n<td class=\"$bgcolor\" valign=\"top\" width=\"60%\"><label><input type=\"radio\" name=\"$name\" value=\"on\" $oncheck>&nbsp;$lang->on</label> &nbsp;&nbsp;<label><input type=\"radio\" name=\"$name\" value=\"off\" $offcheck>&nbsp;$lang->off</label></td>\n</tr>\n";

		$oncheck = "checked";
}
echo "<tr>\n<td class=\"$bgcolor\" valign=\"top\" width=\"40%\">$title</td>\n<td class=\"$bgcolor\" valign=\"top\" width=\"60%\"><label><input type=\"radio\" name=\"$name\" value=\"on\" $oncheck>&nbsp;$lang->on</label> &nbsp;&nbsp;<label><input type=\"radio\" name=\"$name\" value=\"off\" $offcheck>&nbsp;$lang->off</label></td>\n</tr>\n";

Zeile 369Zeile 370
	}
if(!is_array($options))
{

	}
if(!is_array($options))
{

		$options[] = $options;

		$options = array($options);

	}
foreach($options as $value => $label)

	}
foreach($options as $value => $label)

	{

	{

		if($value == $selected)
{
echo "<option value=\"$value\" selected=\"selected\">$label</option>\n";

		if($value == $selected)
{
echo "<option value=\"$value\" selected=\"selected\">$label</option>\n";

		}
else
{
echo "<option value=\"$value\">$label</option>\n";
}
}
echo "</select>\n</td>\n</tr>\n";
}
function makedateselect($title, $name, $day, $month, $year)
{
$dname = $name."[day]";
$mname = $name."[month]";
$yname = $name."[year]";

for($i = 1; $i <= 31; $i++)
{
if($day == $i)
{
$daylist .= "<option value=\"$i\" selected>$i</option>\n";
}

		}




















		else
{

		else
{

			$daylist .= "<option value=\"$i\">$i</option>\n";

			echo "<option value=\"$value\">$label</option>\n";

		}
}

		}
}

 
	echo "</select>\n</td>\n</tr>\n";
}





	$monthsel[$month] = "selected";
$monthlist .= "<option value=\"\">------------</option>";
$monthlist .= "<option value=\"01\" $monthsel[01]>January</option>\n";
$monthlist .= "<option value=\"02\" $monthsel[02]>February</option>\n";
$monthlist .= "<option value=\"03\" $monthsel[03]>March</option>\n";
$monthlist .= "<option value=\"04\" $monthsel[04]>April</option>\n";
$monthlist .= "<option value=\"05\" $monthsel[05]>May</option>\n";
$monthlist .= "<option value=\"06\" $monthsel[06]>June</option>\n";
$monthlist .= "<option value=\"07\" $monthsel[07]>July</option>\n";
$monthlist .= "<option value=\"08\" $monthsel[08]>August</option>\n";
$monthlist .= "<option value=\"09\" $monthsel[09]>September</option>\n";
$monthlist .= "<option value=\"10\" $monthsel[10]>October</option>\n";
$monthlist .= "<option value=\"11\" $monthsel[11]>November</option>\n";
$monthlist .= "<option value=\"12\" $monthsel[12]>December</option>\n";
$dateselect = "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\"><tr>\n";
$dateselect .= "<td><b><small>Day</small></b><br />\n<select name=\"$dname\"><option value=\"\">--</option>\n$daylist</select></td>\n";
$dateselect .= "<td><b><small>Month</small></b><br />\n<select name=\"$mname\">$monthlist</select></td>\n";
$dateselect .= "<td><b><small>Year</small></b><br />\n<input name=\"$yname\" value=\"$year\" size=\"4\"></td>\n";
$dateselect .= "</tr></table>";

$bgcolor = getaltbg();

echo "<tr>\n<td class=\"$bgcolor\" valign=\"top\" width=\"40%\">$title</td>\n<td class=\"$bgcolor\" valign=\"top\">$dateselect</tr>\n";
}

 
function makebuttoncode($name, $value, $type="submit", $onclick="", $nameid="name")
{
if($onclick != '')

function makebuttoncode($name, $value, $type="submit", $onclick="", $nameid="name")
{
if($onclick != '')

Zeile 891Zeile 851
	{
$mybbversion = $mybb->version;
}

	{
$mybbversion = $mybb->version;
}

	echo "<font size=\"1\" face=\"Verdana,Arial,Helvetica\">\n".$lang->footer_powered_by."\n<b>\n<a href=\"http://www.mybboard.com\" target=\"_blank\">MyBB</a> $mybbversion\n</b>\n<br />\n".$lang->footer_copyright." &copy; 2002-".my_date("Y")." <a href=\"http://www.mybboard.com\">MyBB Group</a>\n<br />\n".$lang->footer_stats."\n</font>\n</div>\n";

	echo "<font size=\"1\" face=\"Verdana,Arial,Helvetica\">\n".$lang->footer_powered_by."\n<b>\n<a href=\"http://www.mybboard.net\" target=\"_blank\">MyBB</a> $mybbversion\n</b>\n<br />\n".$lang->footer_copyright." &copy; 2002-".my_date("Y")." <a href=\"http://www.mybboard.net\">MyBB Group</a>\n<br />\n".$lang->footer_stats."\n</font>\n</div>\n";

	echo "</body>\n";
echo "</html>";
}

	echo "</body>\n";
echo "</html>";
}

Zeile 934Zeile 894
	echo "<ul>\n";
echo $navoptions;
echo "</ul>\n</td>\n";

	echo "<ul>\n";
echo $navoptions;
echo "</ul>\n</td>\n";

	echo "</table>\n";
echo "</td>\n</tr>\n</table>\n";
echo "<br />\n";

$navoptions = "";


	echo "</tr>\n";
echo "</table>\n";
echo "</td>\n</tr>\n</table>\n";
echo "<br />\n";

$navoptions = "";

}


}






function endnav()

function endnav()

{

{

	echo "</table>\n";
echo "</td>\n</tr>\n</table>\n";
echo "<br />\n";

	echo "</table>\n";
echo "</td>\n</tr>\n</table>\n";
echo "<br />\n";

}
function makenavgroup($name="")

}
function makenavgroup($name="")

{
global $noframes, $navoptions, $navselects;
if($noframes)

{
global $noframes, $navoptions, $navselects;
if($noframes)

Zeile 971Zeile 932
{
if(!is_array($values))
{

{
if(!is_array($values))
{

		$values[] = $values;

		$values = array($values);

	}
foreach($values as $action => $title)

	}
foreach($values as $action => $title)

	{

	{

		$options .= "<option value=\"$action\">$title</option>\n";
}
$buttononchange = "";
if($onchange)

		$options .= "<option value=\"$action\">$title</option>\n";
}
$buttononchange = "";
if($onchange)

	{
$buttononchange = " onclick=\"{$onchange} this.form.submit(); return false;\"";
$onchange .= " ";
}

	{
$buttononchange = " onclick=\"{$onchange} this.form.submit(); return false;\"";
$onchange .= " ";
}

	return "<select name=\"$name\" onchange=\"{$onchange}this.form.submit();\">\n$options</select>\n&nbsp;\n<input type=\"submit\" value=\"Go\"$buttononchange />\n";
}

	return "<select name=\"$name\" onchange=\"{$onchange}this.form.submit();\">\n$options</select>\n&nbsp;\n<input type=\"submit\" value=\"Go\"$buttononchange />\n";
}





/**
* Build a dropdown to select a forum
*

/**
* Build a dropdown to select a forum
*

Zeile 1001Zeile 962
function forumselect($name, $selected="",$fid="0",$depth="", $shownone="1", $extra="", $extra2="")
{
global $db, $forumselect, $lang, $cforumcache;

function forumselect($name, $selected="",$fid="0",$depth="", $shownone="1", $extra="", $extra2="")
{
global $db, $forumselect, $lang, $cforumcache;


if(!is_array($cforumcache))
{
$options = array(
'order_by' => 'disporder'


if(!is_array($cforumcache))
{
$options = array(
'order_by' => 'disporder'

		);
$query = $db->simple_select(TABLE_PREFIX."forums", "name, fid, pid", "", $options);
while($forum = $db->fetch_array($query))

		);
$query = $db->simple_select(TABLE_PREFIX."forums", "name, fid, pid", "", $options);
while($forum = $db->fetch_array($query))

		{

		{

			$cforumcache['pid'][$forum['pid']][$forum['fid']] = $forum;
$cforumcache['fid'][$forum['fid']] = $forum;

			$cforumcache['pid'][$forum['pid']][$forum['fid']] = $forum;
$cforumcache['fid'][$forum['fid']] = $forum;

		}

		}

	}

if(!$fid)
{
$forumselect .= "<select name=\"$name\">";
if($extra)

	}

if(!$fid)
{
$forumselect .= "<select name=\"$name\">";
if($extra)

		{

		{

			$selected1 = '';
if($selected == -1)
{

			$selected1 = '';
if($selected == -1)
{

Zeile 1033Zeile 994
			if($selected == -2)
{
$selected2 = ' selected="selected"';

			if($selected == -2)
{
$selected2 = ' selected="selected"';

			}

			}

			$forumselect .= "<option value=\"-2\"$selected2>$extra2</option>";
}
if($extra || $extra2)

			$forumselect .= "<option value=\"-2\"$selected2>$extra2</option>";
}
if($extra || $extra2)

Zeile 1119Zeile 1080
	{
$startforum = $cforumcache['fid'][$fid];
$forumchecklist .= "$depth<input type=\"checkbox\" name=\"{$name}[]\" value=\"$startforum[fid]\"";

	{
$startforum = $cforumcache['fid'][$fid];
$forumchecklist .= "$depth<input type=\"checkbox\" name=\"{$name}[]\" value=\"$startforum[fid]\"";

		if(in_array($startforum['fid'], $selected) || (is_array($selected) && in_array($forum['fid'], $selected)))

		if(is_array($selected) && (in_array($startforum['fid'], $selected) || in_array($forum['fid'], $selected)))

		{
$forumchecklist .= ' checked="checked"';
}

		{
$forumchecklist .= ' checked="checked"';
}

Zeile 1148Zeile 1109
		exit;
}
}

		exit;
}
}





function getadminpermissions($get_uid="", $get_gid="")
{
global $db, $mybb;

function getadminpermissions($get_uid="", $get_gid="")
{
global $db, $mybb;

 
	

	// Set UID and GID if none
$uid = $get_uid;
$gid = $get_gid;

	// Set UID and GID if none
$uid = $get_uid;
$gid = $get_gid;

 
	
$gid_array = array();


	if($uid === "")
{
$uid = $mybb->user['uid'];

	if($uid === "")
{
$uid = $mybb->user['uid'];

	}


	}


	if(!$gid)
{

	if(!$gid)
{

		$gid = $mybb->usergroup['gid'];














		// Prepare user's groups since the group isn't specified
$gid_array[] = (-1) * intval($mybb->user['usergroup']);
$additional_groups = explode(',', $mybb->user['additionalgroups']);
// Make sure gids are negative
foreach($additional_groups as $g)
{
$gid_array[] = (-1) * abs($g);
}
}
else
{
// Group is specified
// Make sure gid is negative
$gid = (-1) * abs($gid);

	}

	}


// Make sure gid is negative
$gid = (-1) * abs($gid);

 

// What are we trying to find?
if($get_gid && !$get_uid)
{


// What are we trying to find?
if($get_gid && !$get_uid)
{

 
		// A group only


		$options = array(
"order_by" => "uid",
"order_dir" => "ASC",
"limit" => "1"
);


		$options = array(
"order_by" => "uid",
"order_dir" => "ASC",
"limit" => "1"
);


		// A group only

 
		$query = $db->simple_select(TABLE_PREFIX."adminoptions", "*", "(uid='$gid' OR uid='0') AND permsset != ''", $options);
$perms = $db->fetch_array($query);
return $perms;
}
else
{

		$query = $db->simple_select(TABLE_PREFIX."adminoptions", "*", "(uid='$gid' OR uid='0') AND permsset != ''", $options);
$perms = $db->fetch_array($query);
return $perms;
}
else
{

 
		// A user and/or group


		$options = array(
"order_by" => "uid",
"order_dir" => "DESC"
);

		$options = array(
"order_by" => "uid",
"order_dir" => "DESC"
);

		// A user and/or group
$query = $db->simple_select(TABLE_PREFIX."adminoptions", "*", "(uid='$uid' OR uid='0' OR uid='$gid') AND permsset != ''", $options);









		
// Prepare user's groups into SQL format
$group_sql = '';
foreach($gid_array as $gid)
{
$group_sql .= " OR uid='{$gid}'";
}

$perms_group = array();
$query = $db->simple_select(TABLE_PREFIX."adminoptions", "*", "(uid='{$uid}'{$group_sql}) AND permsset != ''", $options);

		while($perm = $db->fetch_array($query))
{
// Sorting out which permission is which
if($perm['uid'] > 0)
{
$perms_user = $perm;

		while($perm = $db->fetch_array($query))
{
// Sorting out which permission is which
if($perm['uid'] > 0)
{
$perms_user = $perm;

			}


				return $perms_user;
}

			elseif($perm['uid'] < 0)

			elseif($perm['uid'] < 0)

			{
$perms_group = $perm;
}

			{
$perms_group[] = $perm;
}

			else
{
$perms_def = $perm;

			else
{
$perms_def = $perm;

 
			}
}

// Figure out group permissions...ugh.
foreach($perms_group as $gperms)
{
if(!isset($final_group_perms))
{
// Use this group as the base for admin group permissions
$final_group_perms = $gperms;
continue;
}

// Loop through each specific permission to find the highest permission
foreach($gperms as $perm_name => $perm_value)
{
if($final_group_perms[$perm_name] != 'yes' && $perm_value == 'yes')
{
$final_group_perms[$perm_name] = 'yes';
}

			}
}

// Send specific user, or group permissions before default.

			}
}

// Send specific user, or group permissions before default.

		if(isset($perms_user))
{
return $perms_user;
}
elseif(isset($perms_group))

		// If user's permission are explicitly set, they've already been returned above.
if(isset($final_group_perms))




		{

		{

			return $perms_group;

			return $final_group_perms;

		}
else
{

		}
else
{

Zeile 1226Zeile 1230
function logadmin()
{
global $mybbadmin, $db, $mybb;

function logadmin()
{
global $mybbadmin, $db, $mybb;

	$scriptname = basename($_SERVER['PHP_SELF']);

	$scriptname = basename($_SERVER['SCRIPT_NAME']);

	$qstring = explode("&", $_SERVER['QUERY_STRING']);
$sep = '';
foreach($qstring as $key => $value)

	$qstring = explode("&", $_SERVER['QUERY_STRING']);
$sep = '';
foreach($qstring as $key => $value)

Zeile 1559Zeile 1563
			else
{
$pattachments = "no";

			else
{
$pattachments = "no";

			}

			}

			if(!$preplies && !$pthreads)
{
$ppost = "no";

			if(!$preplies && !$pthreads)
{
$ppost = "no";

Zeile 1995Zeile 1999
				}
echo "<option value=\"\" style=\"font-weight: bold;\">$lang->theme_style</option>";
echo "<option value=\"edit\" selected>- $lang->edit_theme_style</option>\n";

				}
echo "<option value=\"\" style=\"font-weight: bold;\">$lang->theme_style</option>";
echo "<option value=\"edit\" selected>- $lang->edit_theme_style</option>\n";



 
			}
echo "<option value=\"\" style=\"font-weight: bold;\">$lang->other_options</option>\n";
echo "<option value=\"download\">- $lang->export_theme</option>\n";

			}
echo "<option value=\"\" style=\"font-weight: bold;\">$lang->other_options</option>\n";
echo "<option value=\"download\">- $lang->export_theme</option>\n";

Zeile 2012Zeile 2015
function make_theme_select($name, $selected="", $tid="0", $depth="")
{
global $db, $themeselect, $tcache, $tcache2;

function make_theme_select($name, $selected="", $tid="0", $depth="")
{
global $db, $themeselect, $tcache, $tcache2;

	if(!$tid)
{

	if(!$tid)
{

		$themeselect .= "<select name=\"$name\">";

		$themeselect .= "<select name=\"$name\">";

	}
if(!is_array($tcache))
{
cache_themes();
}
if(!is_array($tcache2))
{
foreach($tcache as $theme)
{
$tcache2[$theme['pid']][$theme['tid']] = $theme;
}
unset($theme);
}
if(is_array($tcache2[$tid]))
{

	}
if(!is_array($tcache))
{
cache_themes();
}
if(!is_array($tcache2))
{
foreach($tcache as $theme)
{
$tcache2[$theme['pid']][$theme['tid']] = $theme;
}
unset($theme);
}
if(is_array($tcache2[$tid]))
{

		foreach($tcache2[$tid] as $theme)
{
$sel = "";
if($theme['tid'] == $selected)

		foreach($tcache2[$tid] as $theme)
{
$sel = "";
if($theme['tid'] == $selected)

			{

			{

				$sel = "selected=\"selected\"";

				$sel = "selected=\"selected\"";

			}

			}

			$themeselect .= "<option value=\"".$theme['tid']."\" $sel>".$depth.$theme['name']."</option>";
if(is_array($tcache2[$theme['tid']]))
{

			$themeselect .= "<option value=\"".$theme['tid']."\" $sel>".$depth.$theme['name']."</option>";
if(is_array($tcache2[$theme['tid']]))
{

Zeile 2046Zeile 2049
		}
}
if(!$tid)

		}
}
if(!$tid)

	{

	{

		$themeselect .= "</select>";
}
return $themeselect;

		$themeselect .= "</select>";
}
return $themeselect;

Zeile 2131Zeile 2134
		{
$array[$key] = killempty($val);
$val = $array[$key];

		{
$array[$key] = killempty($val);
$val = $array[$key];

		}

		}

		if(empty($val))
{
unset($array[$key]);

		if(empty($val))
{
unset($array[$key]);

		}
}

		}
}

	return $array;
}


	return $array;
}


Zeile 2167Zeile 2170
		else
{
$dropdown .= "<option value=\"{$d}\">{$d}</option>\n";

		else
{
$dropdown .= "<option value=\"{$d}\">{$d}</option>\n";

		}

		}

	}
$dropdown .= "</select>\n";


	}
$dropdown .= "</select>\n";


Zeile 2183Zeile 2186
		$month = $lang->$month_lang;

if($m == $options['selected_month'])

		$month = $lang->$month_lang;

if($m == $options['selected_month'])

		{

		{

			$dropdown .= "<option selected=\"selected\" value=\"{$m}\">{$month}</option>\n";
}
else

			$dropdown .= "<option selected=\"selected\" value=\"{$m}\">{$month}</option>\n";
}
else

Zeile 2192Zeile 2195
		}
}
$dropdown .= "</select>\n";

		}
}
$dropdown .= "</select>\n";





	// Add years to the dropdown.
$this_year = my_date("Y");
$years = array();

	// Add years to the dropdown.
$this_year = my_date("Y");
$years = array();

Zeile 2201Zeile 2204
	if(array_key_exists('years_back', $options) && array_key_exists('years_ahead', $options))
{
for($y = $this_year-$options['years_back']; $y <= ($this_year+$options['years_ahead']); $y++)

	if(array_key_exists('years_back', $options) && array_key_exists('years_ahead', $options))
{
for($y = $this_year-$options['years_back']; $y <= ($this_year+$options['years_ahead']); $y++)

	    {
$years[$y] = $y;
}

	    {
$years[$y] = $y;
}

	}
else
{

	}
else
{

Zeile 2217Zeile 2220
	// And the years.
$dropdown .= "<select name=\"{$id}_year\">\n";
if(isset($options['blank_fields']) && $options['blank_fields'] == true)

	// And the years.
$dropdown .= "<select name=\"{$id}_year\">\n";
if(isset($options['blank_fields']) && $options['blank_fields'] == true)

	{

	{

		$dropdown .= "<option value=\"0\"></option>\n";
}
foreach($years as $k => $v)

		$dropdown .= "<option value=\"0\"></option>\n";
}
foreach($years as $k => $v)

	{

	{

		if($k == $options['selected_year'] || (!$options['selected_year'] && $k == $this_year && !isset($options['no_selected_year'])))
{
$dropdown .= "<option selected=\"selected\" value=\"{$k}\">{$v}</option>\n";

		if($k == $options['selected_year'] || (!$options['selected_year'] && $k == $this_year && !isset($options['no_selected_year'])))
{
$dropdown .= "<option selected=\"selected\" value=\"{$k}\">{$v}</option>\n";

Zeile 2238Zeile 2241
	{
// Build hours HTML.
$dropdown .= "<select name=\"{$id}_hours\">\n";

	{
// Build hours HTML.
$dropdown .= "<select name=\"{$id}_hours\">\n";

		if(isset($options['blank_fields']) && $options['blank_fields'] == true)
{

		if(isset($options['blank_fields']) && $options['blank_fields'] == true)
{

			$dropdown .= "<option value=\"0\"></option>\n";
}
for($h = 0; $h <= 23; $h++)

			$dropdown .= "<option value=\"0\"></option>\n";
}
for($h = 0; $h <= 23; $h++)

Zeile 2247Zeile 2250
			if($h == $options['selected_hour'])
{
$dropdown .= "<option selected=\"selected\" value=\"{$h}\">{$h}</option>\n";

			if($h == $options['selected_hour'])
{
$dropdown .= "<option selected=\"selected\" value=\"{$h}\">{$h}</option>\n";

			}
else

			}
else

			{
$dropdown .= "<option value=\"{$h}\">{$h}</option>\n";

			{
$dropdown .= "<option value=\"{$h}\">{$h}</option>\n";

			}
}
$dropdown .= "</select>\n";

			}
}
$dropdown .= "</select>\n";


// And the minutes HTML.
$dropdown .= "<select name=\"{$id}_minutes\">\n";


// And the minutes HTML.
$dropdown .= "<select name=\"{$id}_minutes\">\n";

Zeile 2266Zeile 2269
			if($min == $options['selected_minute'])
{
$dropdown .= "<option selected=\"selected\" value=\"{$min}\">{$min}</option>\n";

			if($min == $options['selected_minute'])
{
$dropdown .= "<option selected=\"selected\" value=\"{$min}\">{$min}</option>\n";

			}

			}

			else
{
$dropdown .= "<option value=\"{$min}\">{$min}</option>\n";
}
}
$dropdown .= "</select>\n";

			else
{
$dropdown .= "<option value=\"{$min}\">{$min}</option>\n";
}
}
$dropdown .= "</select>\n";

	}


	}


	return $dropdown;

}

	return $dropdown;

}

Zeile 2418Zeile 2421
		}
}
return $navigation;

		}
}
return $navigation;

 
}

function fetch_iconv_encoding($mysql_encoding)
{
$mysql_encoding = explode("_", $mysql_encoding);
switch($mysql_encoding[0])
{
case "utf8":
return "utf-8";
break;
case "latin1":
return "iso-8859-1";
break;
default:
return $mysql_encoding[0];
}

}
?>

}
?>