home *** CD-ROM | disk | FTP | other *** search
/ PC Basics 53 / PC Basics Issue 53.iso / Software / Internet / Invboard.exe / PC Basics 53 / Invboard / upload / sources / Admin / admin_skin.php < prev   
Encoding:
PHP Script  |  2002-06-12  |  26.4 KB  |  920 lines

  1. <?php
  2.  
  3. /*
  4. +--------------------------------------------------------------------------
  5. |   IBFORUMS v1
  6. |   ========================================
  7. |   by Matthew Mecham and David Baxter
  8. |   (c) 2001,2002 IBForums
  9. |   http://www.ibforums.com
  10. |   ========================================
  11. |   Web: http://www.ibforums.com
  12. |   Email: phpboards@ibforums.com
  13. |   Licence Info: phpib-licence@ibforums.com
  14. +---------------------------------------------------------------------------
  15. |
  16. |   > Admin HTML stuff library
  17. |   > Script written by Matt Mecham
  18. |   > Date started: 1st march 2002
  19. |
  20. +--------------------------------------------------------------------------
  21. */
  22.  
  23.  
  24. class admin_skin {
  25.  
  26.     var $base_url;
  27.     var $img_url;
  28.     var $has_title;
  29.     var $td_widths = array();
  30.     var $td_header = array();
  31.     var $td_colspan;
  32.     
  33.     function admin_skin() {
  34.         global $INFO, $IN;
  35.         
  36.         $this->base_url = $INFO['board_url']."/admin.".$INFO['php_ext']."?adsess=".$IN['AD_SESS'];
  37.         $this->img_url  = $INFO['html_url'].'/sys-img';
  38.         
  39.     }
  40.     
  41.     //+--------------------------------------------------------------------
  42.     //+--------------------------------------------------------------------
  43.     // Javascript elements
  44.     //+--------------------------------------------------------------------
  45.     //+--------------------------------------------------------------------
  46.     
  47.     function js_checkdelete()
  48.     {
  49.     
  50.         return "
  51.                 <script language='javascript'>
  52.                 <!--
  53.                 function checkdelete(theURL) {
  54.                 
  55.                     final_url = \"{$this->base_url}&\" + theURL;
  56.                     
  57.                     if ( confirm('Are you sure you wish to remove this?\\nIt cannot be undone!') )
  58.                     {
  59.                         document.location.href=final_url;
  60.                     }
  61.                     else
  62.                     {
  63.                         alert('Ok, remove cancelled!');
  64.                     }
  65.                 }
  66.                 //-->
  67.                 </script>
  68.                 ";
  69.     }
  70.     
  71.     
  72.     
  73.     function js_no_specialchars()
  74.     {
  75.         return "
  76.                 <script language='javascript'>
  77.                 <!--
  78.                 function no_specialchars(type) {
  79.                 
  80.                   var name;
  81.                 
  82.                   if (type == 'sets')
  83.                   {
  84.                       var field = document.theAdminForm.sname;
  85.                       name = 'Skin Set Title';
  86.                   }
  87.                   
  88.                   if (type == 'wrapper')
  89.                   {
  90.                       var field = document.theAdminForm.name;
  91.                       name = 'Wrapper Title';
  92.                   }
  93.                   
  94.                   if (type == 'csssheet')
  95.                   {
  96.                       var field = document.theAdminForm.name;
  97.                       name = 'StyleSheet Title';
  98.                   }
  99.                   
  100.                   if (type == 'templates')
  101.                   {
  102.                       var field = document.theAdminForm.skname;
  103.                       name = 'Template Set Name';
  104.                   }
  105.                   
  106.                   if (type == 'images')
  107.                   {
  108.                       var field = document.theAdminForm.setname;
  109.                       name = 'Image & Macro Set Title';
  110.                   }
  111.                 
  112.                   var valid = 'abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890.():;~+-_';
  113.                   var ok = 1;
  114.                   var temp;
  115.                   
  116.                   for (var i=0; i < field.value.length; i++) {
  117.                       temp = \"\" + field.value.substring(i,i+1);
  118.                       if (valid.indexOf(temp) == \"-1\")
  119.                       {
  120.                           ok = 0;
  121.                       }
  122.                   }
  123.                   if (ok == 0)
  124.                   {
  125.                       alert('Invalid entry for: ' + name + ', you can only use alphanumerics and the following special characters.\\n. ( ) : ; ~ + - _');
  126.                       return false;
  127.                   } else {
  128.                       return true;
  129.                   }
  130.                 }
  131.                 //-->
  132.                 </script>
  133.                 ";
  134.     }
  135.     
  136.     
  137.     //+--------------------------------------------------------------------
  138.     //+--------------------------------------------------------------------
  139.     // FORM ELEMENTS
  140.     //+--------------------------------------------------------------------
  141.     //+--------------------------------------------------------------------
  142.     
  143.     function start_form($hiddens="", $name='theAdminForm', $js="") {
  144.         global $IN, $INFO;
  145.     
  146.         $form = "<form action='{$this->base_url}' method='post' name='$name' $js>
  147.                  <input type='hidden' name='adsess' value='{$IN['AD_SESS']}'>";
  148.         
  149.         if (is_array($hiddens))
  150.         {
  151.             foreach ($hiddens as $k => $v) {
  152.                 $form .= "\n<input type='hidden' name='{$v[0]}' value='{$v[1]}'>";
  153.             }
  154.         }
  155.         
  156.         return $form;
  157.         
  158.     }
  159.     
  160.     //+--------------------------------------------------------------------
  161.     
  162.     function form_hidden($hiddens="") {
  163.     
  164.         if (is_array($hiddens))
  165.         {
  166.             foreach ($hiddens as $k => $v) {
  167.                 $form .= "\n<input type='hidden' name='{$v[0]}' value='{$v[1]}'>";
  168.             }
  169.         }
  170.         
  171.         return $form;
  172.     }
  173.     
  174.     
  175.     //+--------------------------------------------------------------------
  176.     
  177.     function end_form($text = "", $js = "")
  178.     {
  179.         // If we have text, we print another row of TD elements with a submit button
  180.         
  181.         $html    = "";
  182.         $colspan = "";
  183.         
  184.         if ($text != "")
  185.         {
  186.             if ($this->td_colspan > 0)
  187.             {
  188.                 $colspan = " colspan='".$this->td_colspan."' ";
  189.             }
  190.             
  191.             $html .= "<tr><td align='center' id='tdrow2'".$colspan."><input type='submit' value='$text'".$js." id='button' accesskey='s'></td></tr>\n";
  192.         }
  193.         
  194.         $html .= "</form>";
  195.         
  196.         return $html;
  197.         
  198.     }
  199.     
  200.     //+--------------------------------------------------------------------
  201.     
  202.     function form_input($name, $value="", $type='text', $js="") {
  203.     
  204.         if ($js != "")
  205.         {
  206.             $js = ' '.$js.' ';
  207.         }
  208.     
  209.         return "<input type='$type' name='$name' value='$value' style='width:95%'".$js." id='textinput'>";
  210.         
  211.     }
  212.     
  213.     //+--------------------------------------------------------------------
  214.     
  215.     function form_textarea($name, $value="", $cols='60', $rows='5', $wrap='soft') {
  216.     
  217.         return "<textarea name='$name' cols='$cols' rows='$rows' wrap='$wrap' id='multitext'>$value</textarea>";
  218.         
  219.     }
  220.     
  221.     //+--------------------------------------------------------------------
  222.     
  223.     function form_dropdown($name, $list=array(), $default_val="", $js="") {
  224.     
  225.         if ($js != "")
  226.         {
  227.             $js = ' '.$js.' ';
  228.         }
  229.     
  230.         $html = "<select name='$name'".$js." id='dropdown'>\n";
  231.         
  232.         foreach ($list as $k => $v)
  233.         {
  234.         
  235.             $selected = "";
  236.             
  237.             if ( ($default_val != "") and ($v[0] == $default_val) )
  238.             {
  239.                 $selected = ' selected';
  240.             }
  241.             
  242.             $html .= "<option value='".$v[0]."'".$selected.">".$v[1]."</option>\n";
  243.         }
  244.         
  245.         $html .= "</select>\n\n";
  246.         
  247.         return $html;
  248.     
  249.     
  250.     }
  251.     
  252.     //+--------------------------------------------------------------------
  253.     
  254.     function form_yes_no( $name, $default_val="" ) {
  255.     
  256.         $yes = "Yes   <input type='radio' name='$name' value='1' id='green'>";
  257.         $no  = "<input type='radio' name='$name' value='0' id='red'>   No";
  258.         
  259.         
  260.         if ($default_val == 1)
  261.         {
  262.             $yes = "Yes   <input type='radio' name='$name' value='1' checked id='green'>";
  263.         }
  264.         else
  265.         {
  266.             $no  = "<input type='radio' name='$name' value='0' checked id='red'>   No";
  267.         }
  268.         
  269.         
  270.         return $yes.'   '.$no;
  271.         
  272.     }
  273.     
  274.     //+--------------------------------------------------------------------
  275.     
  276.     function build_group_perms( $read='*', $write='*', $reply='*' ) {
  277.         global $DB;
  278.         
  279.         
  280.         $html = "
  281.         
  282.                 <script language='Javascript1.1'>
  283.                 <!--
  284.                 
  285.                 function check_all(str_part) {
  286.                 
  287.                     var f = document.theAdminForm;
  288.                 
  289.                     for (var i = 0 ; i < f.elements.length; i++)
  290.                     {
  291.                         var e = f.elements[i];
  292.                         
  293.                         if ( (e.name != 'READ_ALL') && (e.name != 'REPLY_ALL') && (e.name != 'START_ALL') && (e.type == 'checkbox') && (! e.disabled) )
  294.                         {
  295.                             s = e.name;
  296.                             a = s.substring(0, 4);
  297.                             
  298.                             if (a == str_part)
  299.                             {
  300.                                 e.checked = true;
  301.                             }
  302.                         }
  303.                     }
  304.                 }
  305.                 
  306.                 function obj_checked(IDnumber) {
  307.                 
  308.                     var f = document.theAdminForm;
  309.                     
  310.                     str_part = '';
  311.                     
  312.                     if (IDnumber == 1) { str_part = 'READ' }
  313.                     if (IDnumber == 2) { str_part = 'REPL' }
  314.                     if (IDnumber == 3) { str_part = 'STAR' }
  315.                     
  316.                     totalboxes = 0;
  317.                     total_on   = 0;
  318.                     
  319.                     for (var i = 0 ; i < f.elements.length; i++)
  320.                     {
  321.                         var e = f.elements[i];
  322.                         
  323.                         if ( (e.name != 'READ_ALL') && (e.name != 'REPLY_ALL') && (e.name != 'START_ALL') && (e.type == 'checkbox') )
  324.                         {
  325.                             s = e.name;
  326.                             a = s.substring(0, 4);
  327.                             
  328.                             if (a == str_part)
  329.                             {
  330.                                 totalboxes++;
  331.                                 
  332.                                 if (e.checked)
  333.                                 {
  334.                                     total_on++;
  335.                                 }
  336.                             }
  337.                         }
  338.                     }
  339.                     
  340.                     if (totalboxes == total_on)
  341.                     {
  342.                         if (IDnumber == 1) { f.READ_ALL.checked  = true; }
  343.                         if (IDnumber == 2) { f.REPLY_ALL.checked = true; }
  344.                         if (IDnumber == 3) { f.START_ALL.checked = true; }
  345.                     }
  346.                     else
  347.                     {
  348.                         if (IDnumber == 1) { f.READ_ALL.checked  = false; }
  349.                         if (IDnumber == 2) { f.REPLY_ALL.checked = false; }
  350.                         if (IDnumber == 3) { f.START_ALL.checked = false; }
  351.                     }
  352.                     
  353.                 }
  354.                 
  355.                 //-->
  356.                 
  357.                 </script>
  358.                 
  359.                 ";
  360.                 
  361.                 
  362.         
  363.         $html .= "<table cellspacing='0' cellpadding='2' width='100%' border='0' align='center' border='0'>
  364.                   <tr>
  365.                   <td width='40%'><b><i>Member Group</i></b></td>
  366.                   <td width='30%'><b>Read Topics</b></td>
  367.                   <td width='30%'><b>Reply to Topics</b></td>
  368.                   <td width='30%'><b>Start Topics</b></td>
  369.                   </tr>
  370.                   <tr>
  371.                      <td align='left'><span style='color:red'>ALL MEMBER GROUPS</span><br>(current and future)</td>\n";
  372.         
  373.         //+-------------------------------------------------------------------------
  374.                      
  375.         if ($read == '*')
  376.         {
  377.             $html .= "<td align='center' id='memgroup'><input type='checkbox' onClick='check_all(\"READ\")' name='READ_ALL' value='1' checked></td>\n";
  378.         }
  379.         else
  380.         {
  381.             $html .= "<td align='center' id='memgroup'><input type='checkbox' onClick='check_all(\"READ\")' name='READ_ALL' value='1'></td>\n";
  382.         }
  383.         
  384.         //+-------------------------------------------------------------------------
  385.         
  386.         if ($reply == '*')
  387.         {
  388.             $html .= "<td align='center' id='mggreen'><input type='checkbox' onClick='check_all(\"REPL\")' name='REPLY_ALL' value='1' checked></td>\n";
  389.         }
  390.         else
  391.         {
  392.             $html .= "<td align='center' id='mggreen'><input type='checkbox' onClick='check_all(\"REPL\")' name='REPLY_ALL' value='1'></td>\n";
  393.         }
  394.         
  395.         //+-------------------------------------------------------------------------
  396.         
  397.         if ($write == '*')
  398.         {
  399.             $html .= "<td align='center' id='mgred'><input type='checkbox' onClick='check_all(\"STAR\")' name='START_ALL' value='1' checked></td>\n";
  400.         }
  401.         else
  402.         {
  403.             $html .= "<td align='center' id='mgred'><input type='checkbox' onClick='check_all(\"STAR\")' name='START_ALL' value='1'></td>\n";
  404.         }
  405.         
  406.         //+-------------------------------------------------------------------------
  407.                      
  408.                      
  409.         $html .= "</tr>
  410.                   <tr>
  411.                   <td colspan='4'><br><b><i>OR</i> adjust the member groups individually below</b><br> </td>
  412.                   </tr>
  413.                   <tr>\n";
  414.                  
  415.         $DB->query("SELECT g_id, g_title FROM ibf_groups ORDER BY g_title ASC");
  416.                  
  417.                  
  418.         while ( $data = $DB->fetch_row() )
  419.         {
  420.             
  421.             $html .= "<tr>
  422.                         <td align='right'><b>{$data['g_title']}</b></td>\n";
  423.                         
  424.             if ($read == '*')
  425.             {
  426.                 $html .= "<td align='center' id='memgroup'>Read <input type='checkbox' name='READ_{$data['g_id']}' value='1' checked onclick=\"obj_checked(1)\"></td>";
  427.             }
  428.             else if ( preg_match( "/(^|,)".$data['g_id']."(,|$)/", $read ) )
  429.             {
  430.                 $html .= "<td align='center' id='memgroup'>Read <input type='checkbox' name='READ_{$data['g_id']}' value='1' checked onclick=\"obj_checked(1)\"></td>";
  431.             }
  432.             else
  433.             {
  434.                 $html .= "<td align='center' id='memgroup'>Read <input type='checkbox' name='READ_{$data['g_id']}' value='1' onclick=\"obj_checked(1)\"></td>";
  435.             }
  436.             
  437.             //+----------------------------------------------------------------------------------------
  438.             
  439.             if ($reply == '*')
  440.             {
  441.                 $html .= "<td align='center' id='mggreen'>Reply <input type='checkbox' name='REPLY_{$data['g_id']}' value='1' checked onclick=\"obj_checked(2)\"></td>";
  442.             }
  443.             else if ( preg_match( "/(?:^|,)".$data['g_id']."(?:,|$)/", $reply ) )
  444.             {
  445.                 $html .= "<td align='center' id='mggreen'>Reply <input type='checkbox' name='REPLY_{$data['g_id']}' value='1' onclick=\"obj_checked(2)\" checked></td>";
  446.             }
  447.             else
  448.             {
  449.                 $html .= "<td align='center' id='mggreen'>Reply <input type='checkbox' name='REPLY_{$data['g_id']}' value='1' onclick=\"obj_checked(2)\"></td>";
  450.             }
  451.             
  452.             //+----------------------------------------------------------------------------------------
  453.             
  454.             if ($write == '*')
  455.             {
  456.                 $html .= "<td align='center' id='mgred'>Start <input type='checkbox' name='START_{$data['g_id']}' value='1' checked onclick=\"obj_checked(3)\"></td>";
  457.             }
  458.             else if ( preg_match( "/(?:^|,)".$data['g_id']."(?:,|$)/", $write ) )
  459.             {
  460.                 $html .= "<td align='center' id='mgred'>Start <input type='checkbox' name='START_{$data['g_id']}' value='1' checked onclick=\"obj_checked(3)\"></td>";
  461.             }
  462.             else
  463.             {
  464.                 $html .= "<td align='center' id='mgred'>Start <input type='checkbox' name='START_{$data['g_id']}' value='1' onclick=\"obj_checked(3)\"></td>";
  465.             }
  466.             
  467.             $html .= "</tr><tr><td colspan='4' style='height:3px'> </td></tr>\n\n";
  468.         }
  469.         
  470.         $html .= "</table>\n\n";
  471.     
  472.         return $html;
  473.         
  474.     }
  475.     
  476.     
  477.     //+--------------------------------------------------------------------
  478.     //+--------------------------------------------------------------------
  479.     // SCREEN ELEMENTS
  480.     //+--------------------------------------------------------------------
  481.     //+--------------------------------------------------------------------
  482.     
  483.     function add_subtitle($title="",$id="subtitle", $colspan="") {
  484.         
  485.         if ($colspan != "")
  486.         {
  487.             $colspan = " colspan='$colspan' ";
  488.         }
  489.         
  490.         return "\n<tr><td id='$id'".$colspan.">$title</td><tr>\n";
  491.         
  492.     }
  493.     
  494.     //+--------------------------------------------------------------------
  495.     
  496.     function start_table( $title="") {
  497.     
  498.     
  499.         if ($title != "")
  500.         {
  501.             $this->has_title = 1;
  502.             $html .= "<tr>
  503.                         <td id='subtitle'>• $title</td>
  504.                       <tr>
  505.                       <td>
  506.                           <table cellpadding='8' cellspacing='0' width='100%' align='center' border='0' id='tablewrap'>
  507.                      ";
  508.         }
  509.     
  510.     
  511.     
  512.         $html .= "<tr>
  513.                   <td>
  514.                 <table width='100%' cellspacing='1' cellpadding='0' align='center' border='0' id='table1'>
  515.                  <tr>
  516.                   <td>
  517.                    <table width='100%' cellspacing='2' cellpadding='3' align='center' border='0'>";
  518.         
  519.         
  520.         if (isset($this->td_header[0]))
  521.         {
  522.             $html .= "<tr>\n";
  523.             
  524.             foreach ($this->td_header as $td)
  525.             {
  526.                 if ($td[1] != "")
  527.                 {
  528.                     $width = " width='{$td[1]}' ";
  529.                 }
  530.                 else
  531.                 {
  532.                     $width = "";
  533.                 }
  534.                 
  535.                 $html .= "<td id='tdtop'".$width."align='center'>{$td[0]}</td>\n";
  536.                 
  537.                 $this->td_colspan++;
  538.             }
  539.             
  540.             $html.= "</tr>\n";
  541.         }
  542.         
  543.         return $html;
  544.         
  545.     }
  546.     
  547.     //+--------------------------------------------------------------------
  548.     
  549.     
  550.     function add_td_row( $array, $css="" ) {
  551.     
  552.         if (is_array($array))
  553.         {
  554.             $html = "<tr>\n";
  555.             
  556.             $count = count($array);
  557.             
  558.             $this->td_colspan = $count;
  559.             
  560.             for ($i = 0; $i < $count ; $i++ )
  561.             {
  562.             
  563.                 $td_col = $i % 2 ? 'tdrow2' : 'tdrow1';
  564.                 
  565.                 if ($css != "")
  566.                 {
  567.                     $td_col = $css;
  568.                 }
  569.             
  570.                 if (is_array($array[$i]))
  571.                 {
  572.                     $text    = $array[$i][0];
  573.                     $colspan = $array[$i][1];
  574.                     
  575.                     $html .= "<td id='$td_col' colspan='$colspan' id='$css'>".$text."</td>\n";
  576.                 }
  577.                 else
  578.                 {
  579.                     $html .= "<td id='$td_col'>".$array[$i]."</td>\n";
  580.                 }
  581.             }
  582.             
  583.             $html .= "</tr>\n";
  584.             
  585.             return $html;
  586.         }
  587.         
  588.     }
  589.     
  590.     //+--------------------------------------------------------------------
  591.     
  592.     function add_td_basic($text="",$align="left",$id="tdrow1") {
  593.     
  594.         $html    = "";
  595.         $colspan = "";
  596.         
  597.         if ($text != "")
  598.         {
  599.             if ($this->td_colspan > 0)
  600.             {
  601.                 $colspan = " colspan='".$this->td_colspan."' ";
  602.             }
  603.             
  604.             
  605.             $html .= "<tr><td align='$align' id='$id'".$colspan.">$text</td></tr>\n";
  606.         }
  607.         
  608.         return $html;
  609.     
  610.     }
  611.     
  612.     //+--------------------------------------------------------------------
  613.     
  614.     function add_td_spacer() {
  615.     
  616.         if ($this->td_colspan > 0)
  617.         {
  618.             $colspan = " colspan='".$this->td_colspan."' ";
  619.         }
  620.     
  621.         return "<tr><td".$colspan."><img src='html/sys-img/blank.gif' height='7' width='1'></td></tr>";
  622.     
  623.     }
  624.     
  625.     
  626.     
  627.     //+--------------------------------------------------------------------
  628.     
  629.     function end_table() {
  630.     
  631.         $this->td_header = array();  // Reset TD headers
  632.     
  633.         if ($this->has_title == 1)
  634.         {
  635.             $this->has_title = 0;
  636.             
  637.             return "</table></td></tr></table></td></tr></table></td></tr>";
  638.         }
  639.         else
  640.         {
  641.             return "</table></td></tr></table></td></tr>";
  642.         }
  643.         
  644.     }
  645.     
  646.     
  647.     //+--------------------------------------------------------------------
  648.     
  649.     
  650.             
  651.     
  652.     
  653.     //+--------------------------------------------------------------------
  654.     //+--------------------------------------------------------------------
  655.     
  656.     
  657.     
  658.     function print_top($title="",$desc="") {
  659.     
  660.         return "<html>
  661.                   <head><title>Menu</title>
  662.                   <meta http-equiv=\"Cache-Control\" content=\"no-cache, must-revalidate\">
  663.                   <meta http-equiv=\"Pragma\" content=\"no-cache\">
  664.                   <meta http-equiv=\"Expires\" content=\"Mon, 26 Jul 1997 05:00:00 GMT\">
  665.                   <style type='text/css'>
  666.                       TABLE, TR, TD     { font-family:Verdana, Arial;font-size: 10px; color:#333333 }
  667.                     BODY      { font: 10px Verdana; color:#333333 }
  668.                     a:link, a:visited, a:active  { color:#000055 }
  669.                     a:hover                      { color:#333377;text-decoration:underline }
  670.                     
  671.                     #title  { font-size:10px; font-weight:bold; line-height:150%; color:#FFFFFF; height: 26px; background-image: url({$this->img_url}/tile_back.gif); }
  672.                     #title  a:link, #title  a:visited, #title  a:active { text-decoration: underline; color : #FFFFFF; font-size:11px }
  673.                     
  674.                     #detail { font-family: Arial; font-size:11px; color: #333333 }
  675.                     
  676.                      #large { font-family: verdana, arial; font-size:20px; color:#4C77B6; font-weight:bold; letter-spacing:-1px }
  677.                      
  678.                     #subtitle { font-family: Arial,Verdana; font-size:18px; color:#FF9900; font-weight:bold }
  679.                     
  680.                     #table1 {  background-color:#FFFFFF; width:100%; align:center; border:1px solid black }
  681.                     
  682.                     #tdrow1 { background-color:#EEF2F7 }
  683.                     
  684.                     #subforum { background-color:#DFE6EF }
  685.                     
  686.                     #tdrow2 { background-color:#F5F9FD }
  687.                     
  688.                     #catrow { font-weight:bold; height:24px; line-height:150%; color:#4C77B6; background-image: url({$this->img_url}/tile_sub.gif); }
  689.                     #catrow2 { font-size:10px; font-weight:bold; line-height:150%; color:#4C77B6; background-color:#D3DFEF; }
  690.                     
  691.                     #tablewrap {  border:1px dashed #777777; background-color:#F5F9FD }
  692.                     
  693.                     #copy { color:#555555; font-size:9px }
  694.                     
  695.                     #tdtop  { font-weight:bold; height:24px; line-height:150%; color:#FFFFFF; background-image: url({$this->img_url}/tile_back.gif); }
  696.                     
  697.                     #memgroup { border:1px solid #777777 }
  698.                     
  699.                     #mgred   { border:1px solid #777777; background-color: #f5cdcd }
  700.                     #mggreen { border:1px solid #777777; background-color: #caf2d9 }
  701.                     
  702.                     #green    { background-color: #caf2d9 }
  703.                     #red      { background-color: #f5cdcd }
  704.                     
  705.                     #button   { background-color: #4C77B6; color: #FFFFFF; font-family:Verdana, Arial; font-size:11px }
  706.                     
  707.                     #textinput { background-color: #FFFFFF; color:╩#000000; font-family:Verdana, Arial; font-size:10px }
  708.                     
  709.                     #dropdown { background-color: #F5F9FD; color:╩#000000; font-family:Verdana, Arial; font-size:10px }
  710.                     
  711.                     #multitext { background-color: #F5F9FD; color:╩#000000; font-family:Verdana, Arial; font-size:10px }
  712.                     
  713.                   </style>
  714.                   </head>
  715.                  <body marginheight='0' marginwidth='0' leftmargin='0' topmargin='0' bgcolor='#E7E7E7'>
  716.                  <table cellspacing='3' cellpadding='2' width='100%' align='center' border='0' bgcolor='#E7E7E7'>
  717.                  <tr>
  718.                   <td>
  719.                    <table cellspacing='3' cellpadding='2' width='100%' align='center' border='0' bgcolor='#FFFFFF' style='border:thin solid black'>
  720.                     <tr>
  721.                       <td align='center' id='title'>Invision Board Administration</td>
  722.                     </tr>
  723.                       <tr>
  724.                        <td valign='top' bgcolor='#FFFFFF'>
  725.                        <table cellspacing='0' cellpadding='2' border='0' align='center' width='100%' height='100%' bgcolor='#FFFFFF'>
  726.                          <tr>
  727.                          <td id='large'>$title</td>
  728.                           </tr>
  729.                          <td>$desc<br> </td>
  730.                          </tr>";
  731.                          
  732.     }
  733.     
  734.     //+--------------------------------------------------------------------
  735.     
  736.     function print_foot() {
  737.         
  738.         return "        </td>
  739.                        </tr>
  740.                       </table>
  741.                   </td>
  742.                   </tr>
  743.                   </table>
  744.                   </td>
  745.                  </tr>
  746.                  <tr><td align='center' id='copy'>© 2002 Invision Board (www.invisionboard.com)</td></tr>
  747.                  </table>
  748.                  </body>
  749.                  </html>";
  750.     }
  751.     
  752.     
  753.     //+--------------------------------------------------------------------
  754.     
  755.     
  756.     
  757.     
  758.     //{ background-color:#C2CFDF; font-weight:bold; font-size:12px; color:#000055 }
  759.     
  760.     
  761.     function menu_top() {
  762.         global $INFO;
  763.     
  764.         return "<html>
  765.                   <head><title>Menu</title>
  766.                   <style type='text/css'>
  767.                       TABLE, TR, TD     { font-family:Verdana, Arial;font-size: 9px; color:#333333 }
  768.                     BODY      { font: 9px Verdana; color:#333333 }
  769.                     a:link, a:visited, a:active  { color:#333355 }
  770.                     a:hover                      { color:#333355;text-decoration:underline }
  771.                     
  772.                     #title  { font-size:10px; font-weight:bold; line-height:150%; color:#FFFFFF; height: 24px; background-image: url({$this->img_url}/tile_back.gif); }
  773.                     #title  a:link, #title  a:visited, #title  a:active { text-decoration: none; color : #555555 }
  774.                     
  775.                     #detail { font-family: Arial; font-size:7.5pt; color: #333333; background-color:#EEF2F7 }
  776.                     
  777.                     #cattitle  { font-size:10px; font-weight:bold; line-height:150%; color:#4C77B6; background-color:#C4DCF7; height: 24px; background-image: url({$this->img_url}/tile_sub.gif); }
  778.                     #cattitle  a:link, #cattitle  a:visited, #cattitle  a:active { text-decoration: underline; color : #4C77B6; }
  779.                     
  780.                   </style>
  781.                   </head>
  782.                  <body marginheight='0' marginwidth='0' leftmargin='0' topmargin='0' bgcolor='#E7E7E7'>
  783.                  <table cellspacing='3' cellpadding='2' width='100%' align='center' border='0' bgcolor='#E7E7E7'>
  784.                  <tr>
  785.                   <td>
  786.                    <table cellspacing='1' cellpadding='2' width='100%' align='center' border='0' bgcolor='#FFFFFF' style='border:thin solid black'>
  787.                     <tr>
  788.                       <td align='center'>
  789.                           <table cellspacing='0' cellpadding='0' width='100%' align='center' border='0' bgcolor='#FFFFFF'>
  790.                            <tr>
  791.                              <td align='center' id='title'><img src='{$this->img_url}/ad-logo.jpg' border='0'></td>
  792.                         </tr>
  793.                         <tr>
  794.                              <td align='center' id='cattitle'>Administration Menu</td>
  795.                          </tr>
  796.                         </table>
  797.                       </td>
  798.                      </tr>
  799.                     <tr>
  800.                      <td valign='top' bgcolor='#FFFFFF' align='center'>
  801.                       
  802.                       <a href='{$this->base_url}&act=menu&show=all' target='menu'>Expand All</a> | <a href='{$this->base_url}&act=menu&show=none' target='menu'>Reduce All</a>
  803.                       <br>
  804.                       <a href='{$this->base_url}&act=index' target='body'>ACP Home</a> | <a href='{$INFO['board_url']}/index.{$INFO['php_ext']}' target='_blank'>Board Home</a>
  805.                      </td>
  806.                       </tr>
  807.                       <tr>
  808.                        <td valign='top' bgcolor='#FFFFFF'>
  809.                        <table cellspacing='0' cellpadding='2' border='0' align='center' width='100%' height='100%' bgcolor='#FFFFFF'>
  810.                          <tr>
  811.                          <td>";
  812.                          
  813.     }
  814.     
  815.     //+--------------------------------------------------------------------
  816.     
  817.     function menu_foot() {
  818.         
  819.         return "        </td>
  820.                        </tr>
  821.                       </table>
  822.                   </td>
  823.                   </tr>
  824.                   </table>
  825.                   </tr>
  826.                  </td>
  827.                  </table>
  828.                  </body>
  829.                  </html>";
  830.     }
  831.     
  832.     
  833.     //+--------------------------------------------------------------------
  834.     
  835.  
  836.     function menu_cat_expanded($name="", $links="", $id = "") {
  837.         global $IN;
  838.     
  839.         return "<a name='cat$id'></a>
  840.                 <table cellpadding='0 cellspacing='0' width='100%' border='0' align='center' style='border:1px solid #333333'>
  841.                 <tr>
  842.                  <td id='cattitle'>
  843.                      <table cellspacing='1' cellpadding='3' border='0' width='100%'>
  844.                       <tr>
  845.                        <td align='left' valign='middle' id='cattitle'>  <a href='{$this->base_url}&act=menu&show={$IN['show']}&out=$id' target='menu'><img src='{$this->img_url}/minus.gif' border='0' alt='Collapse Category' title='Collapse Category'></a></td>
  846.                        <td align='left' valign='middle' id='cattitle'>  <a href='{$this->base_url}&act=menu&show={$IN['show']}&out=$id' target='menu'><span style='color:#000000'>$name</span></a></td>
  847.                      </tr>
  848.                     </table>
  849.                  </td>
  850.                 </tr>
  851.                 $links
  852.                 </table>
  853.                 <br>";
  854.                 
  855.     
  856.     }
  857.     
  858.     //+--------------------------------------------------------------------
  859.     
  860.     
  861.     function menu_cat_collapsed($name="", $id = "", $desc="") {
  862.         global $IN;
  863.     
  864.         return "<table cellpadding='0 cellspacing='2' width='100%' border='0' align='center' style='border:1px solid #777777'>
  865.                 <tr>
  866.                  <td id='cattitle'>
  867.                      <table cellspacing='0' cellpadding='3' border='0' width='100%'>
  868.                       <tr>
  869.                        <td align='left' valign='middle' id='cattitle'>  <a href='{$this->base_url}&act=menu&show=,{$IN['show']},$id' target='menu'><img src='{$this->img_url}/plus.gif' border='0' alt='Expand Category' title='Expand Category'></a></td>
  870.                        <td align='left' valign='middle' id='cattitle'>  <a href='{$this->base_url}&act=menu&show=,{$IN['show']},$id#cat$id' target='menu'>$name</a></td>
  871.                      </tr>
  872.                     </table>
  873.                  </td>
  874.                  </tr>
  875.                  <tr>
  876.                  <td id='detail'>$desc</td>
  877.                 </tr>
  878.                 </table>
  879.                 <br>";
  880.     
  881.     }
  882.     
  883.     //+--------------------------------------------------------------------
  884.     
  885.     function menu_cat_link($url="", $name="") {
  886.     
  887.         return "<tr><td bgcolor='#EEF2F7' valign='middle' style='height:16px'>  <img src='{$this->img_url}/item.gif' border='0' alt='' valign='absmiddle'> <a href='{$this->base_url}&$url' target='body' style='text-decoration:none'>$name</a></td></tr>";
  888.     
  889.     }
  890.     
  891.     
  892.     //+--------------------------------------------------------------------
  893.     
  894.     function frame_set() {
  895.         global $IN, $ibforums;
  896.         
  897.         $frames = "<html>
  898.                         <head><title>Invision Board Administration Center</title></head>
  899.                        <frameset cols='185, *' frameborder='no' border='0' framespacing='0'>
  900.                             <frameset rows='*, 80' frameborder='no' border='0' framespacing='0'>
  901.                               <frame name='menu' noresize scrolling='auto' src='{$this->base_url}&act=menu'>
  902.                               <frame name='acp'  noresize scrolling='no' src='http://www.invisionboard.com/offsite/?version={$ibforums->version}'>
  903.                          </frameset>
  904.                            <frame name='body' noresize scrolling='auto' src='{$this->base_url}&act=index'>
  905.                        </frameset>
  906.                    </html>";
  907.                    
  908.         return $frames;
  909.                       
  910.     }
  911.  
  912.  
  913. }
  914.  
  915.  
  916.  
  917.  
  918.  
  919.  
  920. ?>