[ Index ]
 

Code source de CMS made simple 1.0.5

Accédez au Source d'autres logiciels libresSoutenez Angelica Josefina !

title

Body

[fermer]

/modules/FCKeditorX/ -> fck_editorarea.css.php (source)

   1  <?php
   2  header("Content-Type: text/css; charset=" . (isset($config['admin_encoding'])?$config['admin_encoding']:'UTF-8'));
   3  // header('Content-type: text/css');

   4  $CMS_ADMIN_PAGE=1;
   5  $inclfilename = '../include.php';
   6  while(!@file_exists($inclfilename)){
   7              $inclfilename = "../".$inclfilename;
   8  }
   9  @require_once($inclfilename);
  10  
  11  global $gCms;
  12  
  13  if (isset($_GET["id"]))
  14    $id = $_GET["id"];
  15  else
  16    $id = 1;
  17  $stylesT = '';
  18  foreach (get_stylesheet_media_types($id) as $media)
  19  {
  20      if ('print' != $media) // Don't attach print stylesheets
  21      {
  22          $res = get_stylesheet($id, $media);
  23          $stylesT .= $res["stylesheet"];
  24      }
  25  }
  26  // $res = get_stylesheet($id);

  27  
  28  
  29  //////////////////////////////////////

  30  //////////////////////////////////////

  31  //////////////////////////////////////

  32  
  33  // include(dirname(__FILE__).'/csstidy/css_parser.php');

  34  // 

  35  // 

  36  // $css = new csstidy();

  37  // 

  38  // 

  39  // 

  40  // $css->parse($res['stylesheet']);

  41  // 

  42  // unset($css->css["standard"]["body"]);

  43  // // echo $css->input_css;

  44  // // echo '***********************************'."\n";

  45  // $res['stylesheet'] = $css->print_code(NULL,true);

  46  // // echo '***********************************'."\n";

  47  // // echo $css->output_css_plain;

  48  // 

  49  // // $res['stylesheet'] = $css->output_css;

  50  // // $res['stylesheet'] = $css->output_css_plain;

  51  // // $res['stylesheet'] = $css->input_css;

  52  // 

  53  // print_r($css->css);

  54  
  55  //////////////////////////////////////

  56  //////////////////////////////////////

  57  //////////////////////////////////////

  58  
  59  
  60  //CLASS parser of a CSS file

  61  require_once(dirname(__FILE__).'/cssparser.inc.php');
  62  
  63  $cssparser = new cssparser();
  64  
  65  $cssparser->ParseStr($stylesT);
  66  
  67  $BodyCSS = "";
  68  $BgColor = "";
  69  
  70  
  71  $cssparser->Add("BODY", "text-align: left; background-color: #ffffff;");
  72  
  73  $BodyCSS = trim(strtoupper($gCms->modules["FCKeditorX"]['object']->GetPreference("FCKConfig.BodyCSS")));
  74  $BgColor = trim(strtoupper($gCms->modules["FCKeditorX"]['object']->GetPreference("FCKConfig.BgColor")));
  75  
  76  if (strcmp($BgColor, "DEFAULT") == 0)
  77    $BgColor = "";
  78  
  79  if (strcmp($BgColor, "") != 0)
  80    $cssparser->Add("BODY", "background-color: $BgColor;");
  81    
  82    
  83  if (strcmp($BodyCSS, "DEFAULT") == 0)
  84    $BodyCSS = "";
  85  
  86  if (strcmp($BodyCSS, "") != 0)
  87    $cssparser->Add("BODY", $BodyCSS);
  88  
  89  echo $cssparser->GetCSS();
  90  
  91  ?>


Généré le : Tue Apr 3 18:50:37 2007 par Balluche grâce à PHPXref 0.7