Example #1
0
 function draw(&$row, $fields)
 {
     if (isset($this->format)) {
         $this->value = date($this->format, strtotime($this->value));
     }
     parent::draw($row, $fields);
 }
Example #2
0
 function draw(&$row, $fields)
 {
     global $_CAMILA;
     $formula = $this->report->queries[$this->field];
     $wTable = substr($formula, 0, strpos($formula, ','));
     $field = substr($formula, strlen($wTable) + 1);
     $query = substr($field, strpos($field, ',') + 1);
     $field = substr($field, 0, strpos($field, ','));
     $url = camila_worktable_get_table_id($wTable);
     $ttemp = new MiniTemplator();
     $ttemp->setTemplateString($query);
     foreach ($fields as $key) {
         if ($key->value != '') {
             $ttemp->setVariable($key->title, $key->value, true);
         } else {
             $ttemp->setVariable($key->title, '0', true);
         }
     }
     $ttemp->generateOutputToString($query);
     if ($field == camila_get_translation('camila.worktable.query.count')) {
         $fields = array('camila_session_id' => $_REQUEST['PHPSESSID'], 'camila_xml' => '', 'filter' => $query, 'camila_export_no_table_data' => 'y');
         $this->value = str_replace(array("\r", "\r\n", "\n"), '', strip_tags($this->httpGet($_SERVER['SERVER_NAME'], $_SERVER['SERVER_PORT'], '/' . CAMILA_APP_DIR . '/' . $url, $fields, array('PHPSESSID2' => $_REQUEST['PHPSESSID']))));
     } else {
         $this->value = camila_get_translation('camila.worktable.query.count') . ' not yet supported :-(';
     }
     parent::draw($row, $fields);
 }
Example #3
0
 function draw(&$row, $fields)
 {
     if ($this->value != '' && $this->value != '0000-00-00') {
         global $_CAMILA;
         //          $fmt = '';
         //          $f = Array();
         //          $m = camila_get_translation('camila.dateformat.monthpos');
         //          $d = camila_get_translation('camila.dateformat.daypos');
         //          $y = camila_get_translation('camila.dateformat.yearpos');
         //          $f[$m] = 'm';
         //          $f[$d] = 'd';
         //          $f[$y] = 'Y';
         //          ksort($f);
         //          reset($f);
         //          $count = 0;
         //          while (list($k, $v) = each($f)) {
         //              $fmt.=$v;
         //              if ($count<2)
         //                  $fmt.=camila_get_translation('camila.dateformat.separator');
         //              $count++;
         //          }
         $this->value = $_CAMILA['db']->UserDate($this->value, $_CAMILA['date_format']);
     } else {
         $this->value = '';
     }
     parent::draw($row, $fields);
 }
Example #4
0
 function phpdbform_rep_field_dummy($field, $title, $value)
 {
     parent::report_field($field, $title);
     $this->value = $value;
     $this->type = "dummy";
     $this->align = "left";
 }
Example #5
0
 function draw(&$row, $fields)
 {
     global $_CAMILA;
     if ($this->value == '00000000000000' || $this->value == '0000-00-00 00:00:00') {
         $this->value = '';
     }
     if ($this->value != '') {
         $this->value = $_CAMILA['db']->UserTimeStamp($this->value, $_CAMILA['date_format'] . ' ' . $this->timeformat);
     }
     parent::draw($row, $fields);
 }
Example #6
0
 function draw(&$row, $fields)
 {
     global $_CAMILA;
     $formula = $this->report->formulas[$this->field];
     $ttemp = new MiniTemplator();
     $ttemp->setTemplateString($formula);
     foreach ($fields as $key) {
         if ($key->value != '') {
             $ttemp->setVariable($key->title, $key->value, true);
         } else {
             $ttemp->setVariable($key->title, '0', true);
         }
     }
     $ttemp->generateOutputToString($formula);
     $m = new EvalMath();
     $this->value = $m->evaluate($formula);
     parent::draw($row, $fields);
 }
Example #7
0
 function draw(&$row, $fields)
 {
     $size = $this->value;
     if ($size >= 1073741824) {
         $size = round($size / 1073741824 * 100) / 100 . ' GB';
     } elseif ($size >= 1048576) {
         $size = round($size / 1048576 * 100) / 100 . ' MB';
     } elseif ($size >= 1024) {
         $size = round($size / 1024 * 100) / 100 . ' KB';
     } else {
         $size = $size . ' B';
     }
     if ($size == 0) {
         $size = '-';
     }
     $this->value = str_replace('.', camila_get_translation('camila.decimal.separator'), $size);
     parent::draw($row, $fields);
 }
Example #8
0
 function report_icon($field, $title)
 {
     $this->orderable = false;
     parent::report_field($field, $title);
 }
Example #9
0
 function draw(&$row, $fields)
 {
     parent::draw($row, $fields);
 }
Example #10
0
 function draw(&$row, $fields)
 {
     $this->value = str_replace('.', camila_get_translation('camila.decimal.separator'), $this->value);
     parent::draw($row, $fields);
 }
Example #11
0
 function report_string($field, $title)
 {
     parent::report_field($field, $title);
 }