Zeile 3 | Zeile 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 2454 2006-11-28 17:30:16Z CraKteR $
| * $Id: adminfunctions.php 3311 2007-09-13 13:55:27Z chris $
|
*/
$cssselectors = array(
| */
$cssselectors = array(
|
Zeile 84 | Zeile 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 106 | Zeile 107 |
---|
echo "<body class=\"main_body\">\n"; } if($donav != 0)
|
echo "<body class=\"main_body\">\n"; } if($donav != 0)
|
{
| {
|
echo buildacpnav(); } }
| echo buildacpnav(); } }
|
Zeile 119 | Zeile 120 |
---|
$links = array($links); } foreach($links as $key => $val)
|
$links = array($links); } foreach($links as $key => $val)
|
{
| {
|
echo $val; } echo "</td></tr>";
| echo $val; } echo "</td></tr>";
|
Zeile 191 | Zeile 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(); if($value != "") {
| $bgcolor = getaltbg(); if($value != "") {
|
Zeile 199 | Zeile 200 |
---|
$width2 = " width=\"$width2\""; } else
|
$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 226 | Zeile 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); if($autocomplete != 1) { $ac = " autocomplete=\"off\""; }
| { $bgcolor = getaltbg(); $value = htmlspecialchars_uni($value); if($autocomplete != 1) { $ac = " autocomplete=\"off\""; }
|
if($value != '') { $value = " value=\"{$value}\"";
| if($value != '') { $value = " value=\"{$value}\"";
|
Zeile 263 | Zeile 264 |
---|
if($value != '') { $value = " value=\"{$value}\"";
|
if($value != '') { $value = " value=\"{$value}\"";
|
}
| }
|
echo "<tr>\n<td class=\"$bgcolor\" valign=\"top\" width=\"40%\">$title</td>\n<td class=\"$bgcolor\" valign=\"top\" width=\"60%\"><input type=\"password\" class=\"inputbox\" name=\"$name\" size=\"$size\"$ac$value /></td>\n</tr>\n"; } function maketextareacode($title, $name, $value="", $rows="4", $columns="40")
| echo "<tr>\n<td class=\"$bgcolor\" valign=\"top\" width=\"40%\">$title</td>\n<td class=\"$bgcolor\" valign=\"top\" width=\"60%\"><input type=\"password\" class=\"inputbox\" name=\"$name\" size=\"$size\"$ac$value /></td>\n</tr>\n"; } function maketextareacode($title, $name, $value="", $rows="4", $columns="40")
|
Zeile 370 | Zeile 371 |
---|
if(!is_array($options)) { $options = array($options);
|
if(!is_array($options)) { $options = array($options);
|
}
| }
|
foreach($options as $value => $label) { if($value == $selected)
| foreach($options as $value => $label) { if($value == $selected)
|
Zeile 379 | Zeile 380 |
---|
} else {
|
} 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 { $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 479 | Zeile 439 |
---|
echo "<tr>\n<td>".$lang->font_size."</td>\n<td><input type=\"text\" name=\"css[$selector][font-size]\" value=\"".htmlspecialchars_uni($css['font-size'])."\" size=\"25\" class=\"$highlight\" /></td>\n</tr>\n"; echo "<tr>\n<td>".$lang->font_style."</td>\n<td><input type=\"text\" name=\"css[$selector][font-style]\" value=\"".htmlspecialchars_uni($css['font-style'])."\" size=\"25\" class=\"$highlight\" /></td>\n</tr>\n"; echo "<tr>\n<td>".$lang->font_weight."</td>\n<td><input type=\"text\" name=\"css[$selector][font-weight]\" value=\"".htmlspecialchars_uni($css['font-weight'])."\" size=\"25\" class=\"$highlight\" /></td>\n</tr>\n";
|
echo "<tr>\n<td>".$lang->font_size."</td>\n<td><input type=\"text\" name=\"css[$selector][font-size]\" value=\"".htmlspecialchars_uni($css['font-size'])."\" size=\"25\" class=\"$highlight\" /></td>\n</tr>\n"; echo "<tr>\n<td>".$lang->font_style."</td>\n<td><input type=\"text\" name=\"css[$selector][font-style]\" value=\"".htmlspecialchars_uni($css['font-style'])."\" size=\"25\" class=\"$highlight\" /></td>\n</tr>\n"; echo "<tr>\n<td>".$lang->font_weight."</td>\n<td><input type=\"text\" name=\"css[$selector][font-weight]\" value=\"".htmlspecialchars_uni($css['font-weight'])."\" size=\"25\" class=\"$highlight\" /></td>\n</tr>\n";
|
}
| }
|
echo "</table>\n"; echo "</td>\n"; echo "<td class=\"altbg1\" width=\"50%\ valign=\"top\">\n";
| echo "</table>\n"; echo "</td>\n"; echo "<td class=\"altbg1\" width=\"50%\ valign=\"top\">\n";
|
Zeile 546 | Zeile 506 |
---|
echo "<table width=\"100%\">\n"; echo "<tr>\n<td>".$lang->background."</td>\n<td><input type=\"text\" name=\"css[editor][background]\" value=\"".htmlspecialchars_uni($css['editor']['background'])."\" size=\"25\" class=\"inputbox\"/></td>\n</tr>\n"; echo "<tr>\n<td>".$lang->border."</td>\n<td><input type=\"text\" name=\"css[editor][border]\" value=\"".htmlspecialchars_uni($css['editor']['border'])."\" size=\"25\" class=\"inputbox\"/></td>\n</tr>\n";
|
echo "<table width=\"100%\">\n"; echo "<tr>\n<td>".$lang->background."</td>\n<td><input type=\"text\" name=\"css[editor][background]\" value=\"".htmlspecialchars_uni($css['editor']['background'])."\" size=\"25\" class=\"inputbox\"/></td>\n</tr>\n"; echo "<tr>\n<td>".$lang->border."</td>\n<td><input type=\"text\" name=\"css[editor][border]\" value=\"".htmlspecialchars_uni($css['editor']['border'])."\" size=\"25\" class=\"inputbox\"/></td>\n</tr>\n";
|
echo "</table>\n"; echo "</td>\n";
| echo "</table>\n"; echo "</td>\n";
|
echo "<td class=\"altbg1\" width=\"50%\">\n"; echo "<table width=\"100%\">\n"; echo "<tr>\n<td>".$lang->background."</td>\n<td><input type=\"text\" name=\"css[editor_control_bar][background]\" value=\"".htmlspecialchars_uni($css['editor_control_bar']['background'])."\" size=\"25\" class=\"inputbox\"/></td>\n</tr>\n";
| echo "<td class=\"altbg1\" width=\"50%\">\n"; echo "<table width=\"100%\">\n"; echo "<tr>\n<td>".$lang->background."</td>\n<td><input type=\"text\" name=\"css[editor_control_bar][background]\" value=\"".htmlspecialchars_uni($css['editor_control_bar']['background'])."\" size=\"25\" class=\"inputbox\"/></td>\n</tr>\n";
|
Zeile 650 | Zeile 610 |
---|
starttable(); tableheader($lang->reputation_system, "", 3); echo "<tr>\n<td class=\"subheader\" align=\"center\">".$lang->positive_reputation_count."</td><td class=\"subheader\" align=\"center\">".$lang->neutral_reputation_count."</td><td class=\"subheader\" align=\"center\">".$lang->negative_reputation_count."</td>\n</tr>\n";
|
starttable(); tableheader($lang->reputation_system, "", 3); echo "<tr>\n<td class=\"subheader\" align=\"center\">".$lang->positive_reputation_count."</td><td class=\"subheader\" align=\"center\">".$lang->neutral_reputation_count."</td><td class=\"subheader\" align=\"center\">".$lang->negative_reputation_count."</td>\n</tr>\n";
|
echo "<tr>\n";
| echo "<tr>\n";
|
echo "<td class=\"altbg1\" width=\"33%\" valign=\"top\">\n"; echo "<table width=\"100%\">\n"; echo "<tr>\n<td>".$lang->font_color."</td>\n<td><input type=\"text\" name=\"css[reputation_positive][color]\" value=\"".htmlspecialchars_uni($css['reputation_positive']['color'])."\" size=\"25\" class=\"inputbox\"/></td>\n</tr>\n";
|
echo "<td class=\"altbg1\" width=\"33%\" valign=\"top\">\n"; echo "<table width=\"100%\">\n"; echo "<tr>\n<td>".$lang->font_color."</td>\n<td><input type=\"text\" name=\"css[reputation_positive][color]\" value=\"".htmlspecialchars_uni($css['reputation_positive']['color'])."\" size=\"25\" class=\"inputbox\"/></td>\n</tr>\n";
|
echo "</table>\n"; echo "</td>\n";
| echo "</table>\n"; echo "</td>\n";
|
echo "<td class=\"altbg1\" width=\"33%\" valign=\"top\">\n"; echo "<table width=\"100%\">\n"; echo "<tr>\n<td>".$lang->font_color."</td>\n<td><input type=\"text\" name=\"css[reputation_neutral][color]\" value=\"".htmlspecialchars_uni($css['reputation_neutral']['color'])."\" size=\"25\" class=\"inputbox\"/></td>\n</tr>\n";
|
echo "<td class=\"altbg1\" width=\"33%\" valign=\"top\">\n"; echo "<table width=\"100%\">\n"; echo "<tr>\n<td>".$lang->font_color."</td>\n<td><input type=\"text\" name=\"css[reputation_neutral][color]\" value=\"".htmlspecialchars_uni($css['reputation_neutral']['color'])."\" size=\"25\" class=\"inputbox\"/></td>\n</tr>\n";
|
echo "</table>\n";
| echo "</table>\n";
|
echo "</td>\n"; echo "<td class=\"altbg1\" width=\"33%\" valign=\"top\">\n"; echo "<table width=\"100%\">\n";
| echo "</td>\n"; echo "<td class=\"altbg1\" width=\"33%\" valign=\"top\">\n"; echo "<table width=\"100%\">\n";
|
Zeile 673 | Zeile 633 |
---|
echo "<table width=\"100%\">\n"; echo "<tr>\n<td>".$lang->background."</td>\n<td><input type=\"text\" name=\"css[trow_reputation_positive][background]\" value=\"".htmlspecialchars_uni($css['trow_reputation_positive']['background'])."\" size=\"25\" class=\"inputbox\"/></td>\n</tr>\n"; echo "<tr>\n<td>".$lang->font_color."</td>\n<td><input type=\"text\" name=\"css[trow_reputation_positive][color]\" value=\"".htmlspecialchars_uni($css['trow_reputation_positive']['color'])."\" size=\"25\" class=\"inputbox\"/></td>\n</tr>\n";
|
echo "<table width=\"100%\">\n"; echo "<tr>\n<td>".$lang->background."</td>\n<td><input type=\"text\" name=\"css[trow_reputation_positive][background]\" value=\"".htmlspecialchars_uni($css['trow_reputation_positive']['background'])."\" size=\"25\" class=\"inputbox\"/></td>\n</tr>\n"; echo "<tr>\n<td>".$lang->font_color."</td>\n<td><input type=\"text\" name=\"css[trow_reputation_positive][color]\" value=\"".htmlspecialchars_uni($css['trow_reputation_positive']['color'])."\" size=\"25\" class=\"inputbox\"/></td>\n</tr>\n";
|
echo "</table>\n"; echo "</td>\n"; echo "<td class=\"altbg1\" width=\"33%\" valign=\"top\">\n"; echo "<table width=\"100%\">\n";
| echo "</table>\n"; echo "</td>\n"; echo "<td class=\"altbg1\" width=\"33%\" valign=\"top\">\n"; echo "<table width=\"100%\">\n";
|
echo "<tr>\n<td>".$lang->background."</td>\n<td><input type=\"text\" name=\"css[trow_reputation_neutral][background]\" value=\"".htmlspecialchars_uni($css['trow_reputation_neutral']['background'])."\" size=\"25\" class=\"inputbox\"/></td>\n</tr>\n"; echo "<tr>\n<td>".$lang->font_color."</td>\n<td><input type=\"text\" name=\"css[trow_reputation_neutral][color]\" value=\"".htmlspecialchars_uni($css['trow_reputation_neutral']['color'])."\" size=\"25\" class=\"inputbox\"/></td>\n</tr>\n"; echo "</table>\n";
| echo "<tr>\n<td>".$lang->background."</td>\n<td><input type=\"text\" name=\"css[trow_reputation_neutral][background]\" value=\"".htmlspecialchars_uni($css['trow_reputation_neutral']['background'])."\" size=\"25\" class=\"inputbox\"/></td>\n</tr>\n"; echo "<tr>\n<td>".$lang->font_color."</td>\n<td><input type=\"text\" name=\"css[trow_reputation_neutral][color]\" value=\"".htmlspecialchars_uni($css['trow_reputation_neutral']['color'])."\" size=\"25\" class=\"inputbox\"/></td>\n</tr>\n"; echo "</table>\n";
|
Zeile 685 | Zeile 645 |
---|
echo "<table width=\"100%\">\n"; echo "<tr>\n<td>".$lang->background."</td>\n<td><input type=\"text\" name=\"css[trow_reputation_negative][background]\" value=\"".htmlspecialchars_uni($css['trow_reputation_negative']['background'])."\" size=\"25\" class=\"inputbox\"/></td>\n</tr>\n"; echo "<tr>\n<td>".$lang->font_color."</td>\n<td><input type=\"text\" name=\"css[trow_reputation_negative][color]\" value=\"".htmlspecialchars_uni($css['trow_reputation_negative']['color'])."\" size=\"25\" class=\"inputbox\"/></td>\n</tr>\n";
|
echo "<table width=\"100%\">\n"; echo "<tr>\n<td>".$lang->background."</td>\n<td><input type=\"text\" name=\"css[trow_reputation_negative][background]\" value=\"".htmlspecialchars_uni($css['trow_reputation_negative']['background'])."\" size=\"25\" class=\"inputbox\"/></td>\n</tr>\n"; echo "<tr>\n<td>".$lang->font_color."</td>\n<td><input type=\"text\" name=\"css[trow_reputation_negative][color]\" value=\"".htmlspecialchars_uni($css['trow_reputation_negative']['color'])."\" size=\"25\" class=\"inputbox\"/></td>\n</tr>\n";
|
echo "</table>\n";
| echo "</table>\n";
|
echo "</td>\n"; echo "</tr>\n"; endtable();
| echo "</td>\n"; echo "</tr>\n"; endtable();
|
Zeile 756 | Zeile 716 |
---|
$content_buffer .= "</tr>\n"; $content_buffer .= "</table>\n"; $content_buffer .= "</td>\n";
|
$content_buffer .= "</tr>\n"; $content_buffer .= "</table>\n"; $content_buffer .= "</td>\n";
|
} echo "<tr>\n";
| } echo "<tr>\n";
|
echo $header_buffer; echo "</tr>\n"; echo "<tr>\n";
| echo $header_buffer; echo "</tr>\n"; echo "<tr>\n";
|
Zeile 766 | Zeile 726 |
---|
$submit = makebuttoncode($lang->save_changes, $lang->save_changes, "submit"); tablesubheader("<div style=\"float: right;\">$submit</div>", "", 2, "left"); endtable();
|
$submit = makebuttoncode($lang->save_changes, $lang->save_changes, "submit"); tablesubheader("<div style=\"float: right;\">$submit</div>", "", 2, "left"); endtable();
|
}
| }
|
function endtable() { echo "</table>\n";
| function endtable() { echo "</table>\n";
|
Zeile 775 | Zeile 735 |
---|
} function endform($submit="", $reset="") {
|
} function endform($submit="", $reset="") {
|
if($submit || $reset)
| if($submit || $reset)
|
{ echo "<div align=\"center\">\n<div class=\"formbuttons\">\n"; } if($submit)
|
{ echo "<div align=\"center\">\n<div class=\"formbuttons\">\n"; } if($submit)
|
{
| {
|
echo makebuttoncode($submit, $submit, "submit"); } if($reset)
|
echo makebuttoncode($submit, $submit, "submit"); } if($reset)
|
{
| {
|
echo makebuttoncode($reset, $reset, "reset"); } if($submit || $reset)
| echo makebuttoncode($reset, $reset, "reset"); } if($submit || $reset)
|
Zeile 792 | Zeile 752 |
---|
echo "</div>\n</div>"; } echo "</form>\n";
|
echo "</div>\n</div>"; } echo "</form>\n";
|
}
| }
|
function makewarning($text) { echo "<p class=\"warning\">\n".$text."\n</p>\n"; }
|
function makewarning($text) { echo "<p class=\"warning\">\n".$text."\n</p>\n"; }
|
|
|
function cperror($message="") { global $lang;
|
function cperror($message="") { global $lang;
|
|
|
// If there is no message, use the default error message. if(empty($message)) { $error = $lang->error_msg;
|
// If there is no message, use the default error message. if(empty($message)) { $error = $lang->error_msg;
|
}
| }
|
// Are there multiple errors or is there just one? if(is_array($message))
|
// Are there multiple errors or is there just one? if(is_array($message))
|
{
| {
|
$error = "<ul>\n"; foreach($message as $item) {
| $error = "<ul>\n"; foreach($message as $item) {
|
Zeile 828 | Zeile 788 |
---|
starttable("65%"); tableheader($lang->cp_error_header); makelabelcode($error);
|
starttable("65%"); tableheader($lang->cp_error_header); makelabelcode($error);
|
endtable();
| endtable();
|
cpfooter(); exit; }
| cpfooter(); exit; }
|
Zeile 891 | Zeile 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." © 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." © 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 934 | Zeile 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";
| echo "</tr>\n"; echo "</table>\n"; echo "</td>\n</tr>\n</table>\n"; echo "<br />\n";
|
$navoptions = ""; }
| $navoptions = ""; }
|
Zeile 955 | Zeile 916 |
---|
{ echo "<td>\n<select onchange=\"navJump(this.options[this.selectedIndex].value, this.form)\">\n"; echo "<option value=\"\">$name</option>\n<option value=\"\"> </option>\n";
|
{ echo "<td>\n<select onchange=\"navJump(this.options[this.selectedIndex].value, this.form)\">\n"; echo "<option value=\"\">$name</option>\n<option value=\"\"> </option>\n";
|
echo $navselects;
| echo $navselects;
|
echo "</select>\n</td>\n"; } else
|
echo "</select>\n</td>\n"; } else
|
{
| {
|
echo $navselects; echo "<hr>"; }
| echo $navselects; echo "<hr>"; }
|
Zeile 972 | Zeile 933 |
---|
if(!is_array($values)) { $values = array($values);
|
if(!is_array($values)) { $values = array($values);
|
}
| }
|
foreach($values as $action => $title) { $options .= "<option value=\"$action\">$title</option>\n";
| foreach($values as $action => $title) { $options .= "<option value=\"$action\">$title</option>\n";
|
Zeile 1001 | Zeile 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(
| if(!is_array($cforumcache)) { $options = array(
|
Zeile 1056 | Zeile 1017 |
---|
} $forumselect .= ">$depth$startforum[name]</option>"; $depth .= "--";
|
} $forumselect .= ">$depth$startforum[name]</option>"; $depth .= "--";
|
}
if(is_array($cforumcache['pid'][$fid])) {
| }
if(is_array($cforumcache['pid'][$fid])) {
|
foreach($cforumcache['pid'][$fid] as $forum) { forumselect($name, $selected, $forum[fid], $depth, $shownone, $extra, $extra2);
| foreach($cforumcache['pid'][$fid] as $forum) { forumselect($name, $selected, $forum[fid], $depth, $shownone, $extra, $extra2);
|
Zeile 1119 | Zeile 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 1152 | Zeile 1113 |
---|
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 1226 | Zeile 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 1555 | Zeile 1559 |
---|
if($canpostattachments[$usergroup['gid']] == "yes") { $pattachments = "yes";
|
if($canpostattachments[$usergroup['gid']] == "yes") { $pattachments = "yes";
|
} else {
| } else {
|
$pattachments = "no"; } if(!$preplies && !$pthreads)
| $pattachments = "no"; } if(!$preplies && !$pthreads)
|
Zeile 2130 | Zeile 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 2166 | Zeile 2170 |
---|
else { $dropdown .= "<option value=\"{$d}\">{$d}</option>\n";
|
else { $dropdown .= "<option value=\"{$d}\">{$d}</option>\n";
|
}
| }
|
} $dropdown .= "</select>\n";
| } $dropdown .= "</select>\n";
|
Zeile 2182 | Zeile 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 2191 | Zeile 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 2200 | Zeile 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 2216 | Zeile 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 2237 | Zeile 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 2246 | Zeile 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 2265 | Zeile 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 2417 | Zeile 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]; }
|
} ?>
| } ?>
|