home *** CD-ROM | disk | FTP | other *** search
/ Enter 2004 June / ENTER.ISO / files / xampp-win32-1.4.5-installer.exe / xampp / phpmyadmin.css.php < prev    next >
Encoding:
PHP Script  |  2003-12-30  |  13.2 KB  |  247 lines

  1. <?php
  2. /* $Id: phpmyadmin.css.php,v 2.4 2003/12/30 18:24:11 rabus Exp $ */
  3. // vim: expandtab sw=4 ts=4 sts=4:
  4.  
  5. chdir('..');
  6. $is_minimum_common = TRUE;
  7. require_once('./libraries/grab_globals.lib.php');
  8. require_once('./libraries/common.lib.php');
  9. require_once('./libraries/sqlparser.lib.php');
  10.  
  11. // Gets the default font sizes
  12. // garvin: TODO: Should be optimized to not include the whole common.lib.php bunch
  13. // but only functions used to determine browser heritage.
  14. PMA_setFontSizes();
  15.  
  16. $ctype = 'css';
  17. require_once('./libraries/header_http.inc.php');
  18.  
  19. if (!isset($js_frame)) {
  20.     $js_frame = 'left';
  21. }
  22.  
  23. if ($js_frame == 'left') {
  24. /************************************************************************************
  25.  * LEFT FRAME
  26.  ************************************************************************************/
  27.  
  28.     /**
  29.      * Add styles for positioned layers
  30.      */
  31.     if (isset($num_dbs) && $num_dbs == '0') {
  32.     ?>
  33. /* No layer effects neccessary */
  34. div     {font-family: <?php echo $left_font_family; ?>; font-size: <?php echo $font_size; ?>; color: #000000}
  35. .heada  {font-family: <?php echo $left_font_family; ?>; font-size: <?php echo $font_size; ?>; color: #000000}
  36. .parent {font-family: <?php echo $left_font_family; ?>; color: #000000; text-decoration: none}
  37. .item, .item:active, .item:hover, .tblItem, .tblItem:active {font-family: <?php echo $left_font_family; ?>; font-size: <?php echo $font_smaller; ?>; color: #333399; text-decoration: none}
  38. .tblItem:hover {color: #FF0000; text-decoration: underline}
  39.     <?php
  40.     } else {
  41.         if (isset($js_capable) && $js_capable != '0') {
  42.             // Brian Birtles : This is not the ideal method of doing this
  43.             // but under the 7th June '00 Mozilla build (and many before
  44.             // it) Mozilla did not treat text between <style> tags as
  45.             // style information unless it was written with the one call
  46.             // to write().
  47.             if (isset($js_isDOM) && $js_isDOM != '0') {
  48.             ?>
  49. /* Layer effects neccessary: capable && is_DOM is set. We found a recent CSS-Browser */
  50. div {font-family: <?php echo $left_font_family; ?>; font-size: <?php echo $font_size; ?>; color: #000000}
  51. .heada {font-family: <?php echo $left_font_family; ?>; font-size: <?php echo $font_size; ?>; color: #000000}
  52. .headaCnt {font-family: <?php echo $left_font_family; ?>; font-size: <?php echo $font_smaller; ?>; color: #000000}
  53. .parent {font-family: <?php echo $left_font_family; ?>; color: #000000; text-decoration: none; display: block}
  54. .child {font-family: <?php echo $left_font_family; ?>; font-size: <?php echo $font_smaller; ?>; color: #333399; text-decoration: none; display: none}
  55. .item, .item:active, .item:hover, .tblItem, .tblItem:active {font-size: <?php echo $font_smaller; ?>; color: #333399; text-decoration: none}
  56. .tblItem:hover {color: #FF0000; text-decoration: underline}
  57.             <?php
  58.             } else {
  59.             ?>
  60. /* Layer effeccts neccessary: capable, but no is_DOM. We found an older CSS-Browser */
  61. div {font-family: <?php echo $left_font_family; ?>; font-size: <?php echo $font_size; ?>; color: #000000}
  62. .heada {font-family: <?php echo $left_font_family; ?>; font-size: <?php echo $font_size; ?>; color: #000000}
  63. .headaCnt {font-family: <?php echo $left_font_family; ?>; font-size: <?php echo $font_smaller; ?>; color: #000000}
  64.             <?php
  65.                 if (isset($js_isIE4) && $js_isIE4 != '0') {
  66.                 ?>
  67. /* Additional effects for IE4 */
  68. .parent {font-family: <?php echo $left_font_family; ?>; color: #000000; text-decoration: none; display: block}
  69. .child {font-family: <?php echo $left_font_family; ?>; font-size: <?php echo $font_smaller; ?>; color: #333399; text-decoration: none; display: none}
  70. .item, .item:active, .item:hover, .tblItem, .tblItem:active {font-size: <?php echo $font_smaller; ?>; color: #333399; text-decoration: none}
  71. .tblItem:hover {color: #FF0000; text-decoration: underline}
  72.                 <?php
  73.                 }
  74.                  else {
  75.                 ?>
  76. /* Additional effects for NON-IE4 */
  77. .parent {font-family: <?php echo $left_font_family; ?>; color: #000000; text-decoration: none; position: absolute; visibility: hidden}
  78. .child {font-family: <?php echo $left_font_family; ?>; font-size: <?php echo $font_smaller; ?>; color: #333399; position: absolute; visibility: hidden}
  79. .item, .tblItem {font-family: <?php echo $left_font_family; ?>; font-size: <?php echo $font_smaller; ?>; color: #333399; text-decoration: none}
  80.                 <?php
  81.                 }
  82.             }
  83.         } else {
  84.         ?>
  85. /* Additional effects for left frame not required or not possible because of lacking CSS-capability. */
  86. div {font-family: <?php echo $left_font_family; ?>; font-size: <?php echo $font_size; ?>; color: #000000}
  87. .heada {font-family: <?php echo $left_font_family; ?>; font-size: <?php echo $font_size; ?>; color: #000000}
  88. .headaCnt {font-family: <?php echo $left_font_family; ?>; font-size: <?php echo $font_smaller; ?>; color: #000000}
  89. .parent {font-family: <?php echo $left_font_family; ?>; color: #000000; text-decoration: none}
  90. .child {font-family: <?php echo $left_font_family; ?>; font-size: <?php echo $font_smaller; ?>; color: #333399; text-decoration: none}
  91. .item, .item:active, .item:hover, .tblItem, .tblItem:active {font-size: <?php echo $font_smaller; ?>; color: #333399; text-decoration: none}
  92. .tblItem:hover {color: #FF0000; text-decoration: underline}
  93.         <?php
  94.         }
  95.     }
  96.     ?>
  97. /* Always enabled stylesheets (left frame) */
  98. body {font-family: <?php echo $left_font_family; ?>; font-size: <?php echo $font_size; ?>}
  99. input   {font-family: <?php echo $left_font_family; ?>; font-size: <?php echo $font_size; ?>}
  100. select  {font-family: <?php echo $left_font_family; ?>; font-size: <?php echo $font_size; ?>; background-color: #ffffff; color: #000000}
  101.     <?php
  102. } elseif ($js_frame == 'print') {
  103. /************************************************************************************
  104.  * PRINT VIEW
  105.  ************************************************************************************/
  106.  
  107.     ?>
  108. /* For printview */
  109. body  {font-family: <?php echo $right_font_family; ?>; font-size: <?php echo $font_size; ?>; color: #000000; background-color: #ffffff}
  110. h1    {font-family: <?php echo $right_font_family; ?>; font-size: <?php echo $font_biggest; ?>; font-weight: bold}
  111. table {border-width:1px; border-color:#000000; border-style:solid; border-collapse:collapse; border-spacing:0}
  112. th    {font-family: <?php echo $right_font_family; ?>; font-size: <?php echo $font_size; ?>; font-weight: bold; color: #000000; background-color: #ffffff; border-width:1px; border-color:#000000; border-style:solid; padding:2px}
  113. td    {font-family: <?php echo $right_font_family; ?>; font-size: <?php echo $font_size; ?>; color: #000000; background-color: #ffffff; border-width:1px; border-color:#000000; border-style:solid; padding:2px}
  114.     <?php
  115. } else {
  116. /************************************************************************************
  117.  * RIGHT FRAME
  118.  ************************************************************************************/
  119.  
  120. ?>
  121. /* Always enabled stylesheets (right frame) */
  122. body {
  123.     font-family: <?php echo $right_font_family; ?>;
  124.     font-size: <?php echo $font_size; ?>;
  125.     color: #000000;
  126.     <?php
  127.     if ($GLOBALS['cfg']['RightBgImage'] == '') {
  128.         // calls from a css file are relative to itself, so use ../images
  129.         echo '    background-image: url(../images/vertical_line.png);' . "\n"
  130.              . '    background-repeat: repeat-y;' . "\n";
  131.     } else {
  132.         echo '    background-image: url(' . $GLOBALS['cfg']['RightBgImage'] . ');' . "\n";
  133.     } // end if... else...
  134.     ?>
  135.     background-color: <?php echo $GLOBALS['cfg']['RightBgColor'] . "\n"; ?>
  136. }
  137.  
  138. pre, tt         {font-size: <?php echo $font_size; ?>}
  139. th              {font-family: <?php echo $right_font_family; ?>; font-size: <?php echo $font_size; ?>; font-weight: bold; color: #000000; background-color: <?php echo $GLOBALS['cfg']['ThBgcolor']; ?>}
  140. td              {font-family: <?php echo $right_font_family; ?>; font-size: <?php echo $font_size; ?>}
  141. form            {font-family: <?php echo $right_font_family; ?>; font-size: <?php echo $font_size; ?>}
  142. input           {font-family: <?php echo $right_font_family; ?>; font-size: <?php echo $font_size; ?>}
  143. input.textfield {font-family: <?php echo $right_font_family; ?>; font-size: <?php echo $font_size; ?>; color: #000000; background-color: #FFFFFF}
  144. select          {font-family: <?php echo $right_font_family; ?>; font-size: <?php echo $font_size; ?>; color: #000000; background-color: #FFFFFF}
  145. textarea        {font-family: <?php echo $right_font_family; ?>; font-size: <?php echo $font_size; ?>; color: #000000; background-color: #FFFFFF}
  146. h1              {font-family: <?php echo $right_font_family; ?>; font-size: <?php echo $font_biggest; ?>; font-weight: bold}
  147. h2              {font-family: <?php echo $right_font_family; ?>; font-size: <?php echo $font_bigger; ?>; font-weight: bold}
  148. h3              {font-family: <?php echo $right_font_family; ?>; font-size: <?php echo $font_size; ?>; font-weight: bold}
  149. a:link          {font-family: <?php echo $right_font_family; ?>; font-size: <?php echo $font_size; ?>; text-decoration: none; color: #0000FF}
  150. a:visited       {font-family: <?php echo $right_font_family; ?>; font-size: <?php echo $font_size; ?>; text-decoration: none; color: #0000FF}
  151. a:hover         {font-family: <?php echo $right_font_family; ?>; font-size: <?php echo $font_size; ?>; text-decoration: underline; color: #FF0000}
  152. a.nav:link      {font-family: <?php echo $right_font_family; ?>; color: #000000}
  153. a.nav:visited   {font-family: <?php echo $right_font_family; ?>; color: #000000}
  154. a.nav:hover     {font-family: <?php echo $right_font_family; ?>; color: #FF0000}
  155. a.h1:link       {font-family: <?php echo $right_font_family; ?>; font-size: <?php echo $font_biggest; ?>; font-weight: bold; color: #000000}
  156. a.h1:active     {font-family: <?php echo $right_font_family; ?>; font-size: <?php echo $font_biggest; ?>; font-weight: bold; color: #000000}
  157. a.h1:visited    {font-family: <?php echo $right_font_family; ?>; font-size: <?php echo $font_biggest; ?>; font-weight: bold; color: #000000}
  158. a.h1:hover      {font-family: <?php echo $right_font_family; ?>; font-size: <?php echo $font_biggest; ?>; font-weight: bold; color: #FF0000}
  159. a.h2:link       {font-family: <?php echo $right_font_family; ?>; font-size: <?php echo $font_bigger; ?>; font-weight: bold; color: #000000}
  160. a.h2:active     {font-family: <?php echo $right_font_family; ?>; font-size: <?php echo $font_bigger; ?>; font-weight: bold; color: #000000}
  161. a.h2:visited    {font-family: <?php echo $right_font_family; ?>; font-size: <?php echo $font_bigger; ?>; font-weight: bold; color: #000000}
  162. a.h2:hover      {font-family: <?php echo $right_font_family; ?>; font-size: <?php echo $font_bigger; ?>; font-weight: bold; color: #FF0000}
  163. a.drop:link     {font-family: <?php echo $right_font_family; ?>; color: #ff0000}
  164. a.drop:visited  {font-family: <?php echo $right_font_family; ?>; color: #ff0000}
  165. a.drop:hover    {font-family: <?php echo $right_font_family; ?>; color: #ffffff; background-color:#ff0000; text-decoration: none}
  166. dfn             {font-style: normal}
  167. dfn:hover       {font-style: normal; cursor: help}
  168. .nav            {font-family: <?php echo $right_font_family; ?>; color: #000000}
  169. .warning        {font-family: <?php echo $right_font_family; ?>; font-size: <?php echo $font_size; ?>; font-weight: bold; color: #FF0000}
  170. td.topline      {font-size: 1px}
  171. td.tab          {
  172.     border-top: 1px solid #999;
  173.     border-right: 1px solid #666;
  174.     border-left: 1px solid #999;
  175.     border-bottom: none;
  176.     border-radius: 2px;
  177.     -moz-border-radius: 2px;
  178. }
  179. table.tabs      {
  180.     border-top: none;
  181.     border-right: none;
  182.     border-left: none;
  183.     border-bottom: 1px solid #666;
  184. }
  185.  
  186. fieldset {
  187.     border:     #686868 solid 1px;
  188.     padding:    0.5em;
  189. }
  190. fieldset fieldset {
  191.     margin:     0.8em;
  192. }
  193.  
  194. button.mult_submit {
  195.     border: none;
  196.     background-color: transparent;
  197. }
  198.  
  199. .pdflayout {
  200.     overflow:         hidden;
  201.     clip:             inherit;
  202.     background-color: #FFFFFF;
  203.     display:          none;
  204.     border:           1px solid #000000;
  205.     position:         relative;
  206. }
  207.  
  208. .pdflayout_table {
  209.     background:       <?php echo $GLOBALS['cfg']['ThBgcolor']; ?>;
  210.     color:            #000000;
  211.     overflow:         hidden;
  212.     clip:             inherit;
  213.     z-index:          2;
  214.     display:          inline;
  215.     visibility:       inherit;
  216.     cursor:           move;
  217.     position:         absolute;
  218.     font-size:        <?php echo $font_smaller; ?>;
  219.     border:           1px dashed #000000;
  220. }
  221.  
  222. .print{font-family:arial;font-size:8pt;}
  223.  
  224. /* MySQL Parser */
  225. .syntax {font-family: sans-serif; font-size: <?php echo $font_smaller; ?>;}
  226. .syntax_comment            { padding-left: 4pt; padding-right: 4pt;}
  227. .syntax_digit              {}
  228. .syntax_digit_hex          {}
  229. .syntax_digit_integer      {}
  230. .syntax_digit_float        {}
  231. .syntax_punct              {}
  232. .syntax_alpha              {}
  233. .syntax_alpha_columnType   {text-transform: uppercase;}
  234. .syntax_alpha_columnAttrib {text-transform: uppercase;}
  235. .syntax_alpha_reservedWord {text-transform: uppercase; font-weight: bold;}
  236. .syntax_alpha_functionName {text-transform: uppercase;}
  237. .syntax_alpha_identifier   {}
  238. .syntax_alpha_charset      {}
  239. .syntax_alpha_variable     {}
  240. .syntax_quote              {white-space: pre;}
  241. .syntax_quote_backtick     {}
  242.     <?php
  243.     echo PMA_SQP_buildCssData();
  244. }
  245. ?>
  246.  
  247.