title: Fullcalendar give the cell background color dynamically
body: <p>There is a fuvar_status field in my sql table. Now, the fullcalendar cells have a static color.</p>
  
  <p>What i want is: if the fuvar_status is 0, the background will be #ff0000, or the fuvar_status is 1, the bg will be an another color.</p>
  
  <p>How to write this in the, and javascript file?</p>
  
  <p>My php, that gets the records from sql:</p>
  
  <pre><code>&lt;?php
  include_once("connect.php");
  
  $sql = 
  "
      SELECT 
  
          fuvar.fuvar_id,
          fuvar.fuvar_date,
          fuvar.fuvar_status,
          fuvar.fuvar_kerulet,
          gyarto.gyarto_nev,
          Varosok.VarosNev
  
      FROM fuvar
  
      LEFT JOIN gyarto ON fuvar.fuvar_honnan = gyarto.gyarto_id
      LEFT JOIN Varosok ON fuvar.fuvar_hova = Varosok.VarosID
  
      LIMIT 50
  
  ";
  
  // WHERE status != Lezárt fuvar 
  
  $get = mysqli_query($kapcs, $sql) or die("SQL ERROR 1 - " . mysqli_error($kapcs));
  if(mysqli_num_rows($get) &gt; 0 )
  {
      $VarosNev = array();
      $gyarto_nev = array();
      $fuvar_date = array();
      $fuvar_id = array();
  
      while( $e = mysqli_fetch_array($get))
      {
          if($e['fuvar_kerulet'] == "0" ) { $VarosNev[] = $e['VarosNev']; }
          else { $VarosNev[] = $e['VarosNev'] .' '. $e['fuvar_kerulet']; }
  
          $gyarto_nev[] = $e['gyarto_nev'];
          $fuvar_date[] = $e['fuvar_date'];
          $fuvar_id[] = $e['fuvar_id'];
      }
      $res = array
      (
          'VarosNev' =&gt; $VarosNev,
          'gyarto_nev' =&gt; $gyarto_nev, 
          'fuvar_date' =&gt; $fuvar_date, 
          'fuvar_id' =&gt; $fuvar_id,
      );
      echo json_encode($res);
  }
  ?&gt;
  </code></pre>
  
  <p>Javascript, generate events:</p>
  
  <pre><code>for (i = 0; i &lt; hossz; i++) 
              {
                  if (eventArray.fuvar_id[i] != '') 
                  {
                      valami.push({
                          title: eventArray.gyarto_nev[i] +'\n'+eventArray.VarosNev[i],
                          backgroundColor: '#03674e',
                          start: eventArray.fuvar_date[i],
                          url: '/fuvar-szerkesztes/' + eventArray.fuvar_id[i]
                      });
                  } 
                  else 
                  {
                      valami.push({
                          title: eventArray.gyarto_nev[i] +'\n'+eventArray.VarosNev[i],
                          backgroundColor: '#03674e',
                          start: eventArray.fuvar_date[i],
                      });
                  }
              }
  </code></pre>