Admin HTML stuff library | > Script written by Matt Mecham | > Date started: 1st march 2002 | +-------------------------------------------------------------------------- */ class admin_skin { var $base_url; var $img_url; var $has_title; var $td_widths = array(); var $td_header = array(); var $td_colspan; function admin_skin() { global $INFO, $IN; $this->base_url = $INFO['board_url']."/admin.".$INFO['php_ext']."?adsess=".$IN['AD_SESS']; $this->img_url = $INFO['html_url'].'/sys-img'; } //+-------------------------------------------------------------------- //+-------------------------------------------------------------------- // Javascript elements //+-------------------------------------------------------------------- //+-------------------------------------------------------------------- function js_help_link($help="") { return "( base_url}&act=quickhelp&id=$help','Help','width=250,height=400,resizable=yes,scrollbars=yes');\">Quick Help )"; } function js_template_tools() { return " "; } function js_checkdelete() { return " "; } function js_no_specialchars() { return " "; } //+-------------------------------------------------------------------- //+-------------------------------------------------------------------- // FORM ELEMENTS //+-------------------------------------------------------------------- //+-------------------------------------------------------------------- function start_form($hiddens="", $name='theAdminForm', $js="") { global $IN, $INFO; $form = "
"; if (is_array($hiddens)) { foreach ($hiddens as $k => $v) { $form .= "\n"; } } return $form; } //+-------------------------------------------------------------------- function form_hidden($hiddens="") { if (is_array($hiddens)) { foreach ($hiddens as $k => $v) { $form .= "\n"; } } return $form; } //+-------------------------------------------------------------------- function end_form($text = "", $js = "") { // If we have text, we print another row of TD elements with a submit button $html = ""; $colspan = ""; if ($text != "") { if ($this->td_colspan > 0) { $colspan = " colspan='".$this->td_colspan."' "; } $html .= "\n"; } $html .= "
"; return $html; } //+-------------------------------------------------------------------- function form_upload($name="FILE_UPLOAD", $js="") { if ($js != "") { $js = ' '.$js.' '; } return ""; } //+-------------------------------------------------------------------- function form_input($name, $value="", $type='text', $js="") { if ($js != "") { $js = ' '.$js.' '; } return ""; } function form_simple_input($name, $value="", $size='5') { return ""; } //+-------------------------------------------------------------------- function form_textarea($name, $value="", $cols='60', $rows='5', $wrap='soft') { return ""; } //+-------------------------------------------------------------------- function form_dropdown($name, $list=array(), $default_val="", $js="") { if ($js != "") { $js = ' '.$js.' '; } $html = "\n\n"; return $html; } //+-------------------------------------------------------------------- function form_yes_no( $name, $default_val="" ) { $yes = "Yes   "; $no = "   No"; if ($default_val == 1) { $yes = "Yes   "; } else { $no = "   No"; } return $yes.'   '.$no; } //+-------------------------------------------------------------------- function build_group_perms( $read='*', $write='*', $reply='*', $upload='*' ) { global $DB; $html = " "; $html .= "\n"; //+------------------------------------------------------------------------- if ($read == '*') { $html .= "\n"; } else { $html .= "\n"; } //+------------------------------------------------------------------------- if ($reply == '*') { $html .= "\n"; } else { $html .= "\n"; } //+------------------------------------------------------------------------- if ($write == '*') { $html .= "\n"; } else { $html .= "\n"; } if ($upload == '*') { $html .= "\n"; } else { $html .= "\n"; } //+------------------------------------------------------------------------- $html .= "\n"; $DB->query("SELECT g_id, g_title FROM ibf_groups ORDER BY g_title ASC"); while ( $data = $DB->fetch_row() ) { $html .= "\n"; if ($read == '*') { $html .= ""; } else if ( preg_match( "/(^|,)".$data['g_id']."(,|$)/", $read ) ) { $html .= ""; } else { $html .= ""; } //+---------------------------------------------------------------------------------------- if ($reply == '*') { $html .= ""; } else if ( preg_match( "/(?:^|,)".$data['g_id']."(?:,|$)/", $reply ) ) { $html .= ""; } else { $html .= ""; } //+---------------------------------------------------------------------------------------- if ($write == '*') { $html .= ""; } else if ( preg_match( "/(?:^|,)".$data['g_id']."(?:,|$)/", $write ) ) { $html .= ""; } else { $html .= ""; } //+---------------------------------------------------------------------------------------- if ($upload == '*') { $html .= ""; } else if ( preg_match( "/(?:^|,)".$data['g_id']."(?:,|$)/", $upload ) ) { $html .= ""; } else { $html .= ""; } $html .= "\n\n"; } $html .= "
Member Group Read Topics Reply to Topics Start Topics Can Upload
ALL MEMBER GROUPS
(current and future)

OR adjust the member groups individually below
 
{$data['g_title']} »Read Read Read Reply Reply Reply Start Start Start Upload Upload Upload 
 
\n\n"; return $html; } //+-------------------------------------------------------------------- //+-------------------------------------------------------------------- // SCREEN ELEMENTS //+-------------------------------------------------------------------- //+-------------------------------------------------------------------- function add_subtitle($title="",$id="subtitle", $colspan="") { if ($colspan != "") { $colspan = " colspan='$colspan' "; } return "\n$title\n"; } //+-------------------------------------------------------------------- function start_table( $title="", $desc="") { if ($desc != "") { $desc = "
    $desc"; } if ($title != "") { $this->has_title = 1; $html .= " • $title $desc "; } $html .= "
"; if (isset($this->td_header[0])) { $html .= "\n"; foreach ($this->td_header as $td) { if ($td[1] != "") { $width = " width='{$td[1]}' "; } else { $width = ""; } $html .= "\n"; $this->td_colspan++; } $html.= "\n"; } return $html; } //+-------------------------------------------------------------------- function add_td_row( $array, $css="" ) { if (is_array($array)) { $html = "\n"; $count = count($array); $this->td_colspan = $count; for ($i = 0; $i < $count ; $i++ ) { $td_col = $i % 2 ? 'tdrow2' : 'tdrow1'; if ($css != "") { $td_col = $css; } if (is_array($array[$i])) { $text = $array[$i][0]; $colspan = $array[$i][1]; $html .= "\n"; } else { $html .= "\n"; } } $html .= "\n"; return $html; } } //+-------------------------------------------------------------------- function add_td_basic($text="",$align="left",$id="tdrow1") { $html = ""; $colspan = ""; if ($text != "") { if ($this->td_colspan > 0) { $colspan = " colspan='".$this->td_colspan."' "; } $html .= "\n"; } return $html; } //+-------------------------------------------------------------------- function add_td_spacer() { if ($this->td_colspan > 0) { $colspan = " colspan='".$this->td_colspan."' "; } return ""; } //+-------------------------------------------------------------------- function end_table() { $this->td_header = array(); // Reset TD headers if ($this->has_title == 1) { $this->has_title = 0; return "
{$td[0]}
".$text."".$array[$i]."
$text
"; } else { return ""; } } //+-------------------------------------------------------------------- //+-------------------------------------------------------------------- //+-------------------------------------------------------------------- function get_css() { return ""; } function print_top($title="",$desc="") { $css = $this->get_css(); return " Menu $css
Invision Board Administration
"; } function wrap_nav($links) { return "
$title
$desc
 
$links
"; } //+-------------------------------------------------------------------- function print_foot() { return "
© 2002 Invision Board (www.invisionboard.com) "; } //+-------------------------------------------------------------------- //{ background-color:#C2CFDF; font-weight:bold; font-size:12px; color:#000055 } function menu_top() { global $INFO; return " Menu
Administration Menu
Expand All | Reduce All
ACP Home | Board Home
"; } //+-------------------------------------------------------------------- function menu_foot() { return "
"; } //+-------------------------------------------------------------------- function menu_cat_expanded($name="", $links="", $id = "") { global $IN; return " $links
  Collapse Category   $name

"; } //+-------------------------------------------------------------------- function menu_cat_collapsed($name="", $id = "", $desc="") { global $IN; return "
  Expand Category   $name
$desc

"; } //+-------------------------------------------------------------------- function menu_cat_link($url="", $name="") { return "   $name"; } //+-------------------------------------------------------------------- function frame_set() { global $IN, $ibforums; $frames = " Invision Board Administration Center "; return $frames; } } ?>