function compute_formula($p_handle) { while (!feof($p_handle)) { $buffer = trim(fgets($p_handle)); // $a=(Impress::check_formula($buffer) == true)?"$buffer ok<br>":'<font color="red">'.'Pas ok '.$buffer."</font><br>"; // echo $a; // blank line are skipped if (strlen(trim($buffer)) == 0) { continue; } // skip comment if (strpos($buffer, '#') === true) { continue; } // buffer contains a formula A$=.... // We need to eval it $a = Impress::parse_formula($this->db, "{$buffer}", $buffer, $this->from, $this->to, false); $b = str_replace("\$", "\$this->", $a); if (eval("{$b};") === false) { echo_debug(__FILE__, __LINE__, "Code failed with {$b}"); } } // end read form line per line }
function date_to_x($date) { echo_debug("Converting {$date}<br>"); return $this->date_stamp_to_x(format_date("U", $date)); }
error('Magic found'); } if ($index < 1) { $index = 1; dwrite('Index out of bound (less than 1)', S_ERROR); } if ($index > 9) { $index = 9; dwrite('Index out of bound (more than 9)', S_ERROR); } for ($i = 1; $i <= 9; $i++) { if ($i == $index) { echo "[{$i}]"; } else { if (inGET('gimmedebug')) { echo ' <a href="?index=' . $i . '&gimmedebug=1">' . $i . '</a> '; } else { echo ' <a href="?index=' . $i . '">' . $i . '</a> '; } } } ?> :.</strong> <?php dwrite('[End]'); if (DEBUG) { echo_debug(); } ?> </body> </html>