function swfaddress_title($title) { if (!is_msie()) { $names = swfaddress_path_names(); for ($i = 0; $i < count($names); $i++) { $title .= ' / ' . strtoupper(substr($names[$i], 0, 1)) . substr($names[$i], 1); } } echo $title; }
/** * \brief Default page header for each page * * \param p_theme default theme * \param $p_script * \param $p_script2 another js script * Must be called only once * \return none */ function html_page_start($p_theme = "", $p_script = "", $p_script2 = "") { // check not called twiced static $already_call = 0; if ($already_call == 1) { return; } $already_call = 1; $cn = new Database(); if ($p_theme != "") { $Res = $cn->exec_sql("select the_filestyle from theme\n where the_name='" . $p_theme . "'"); if (Database::num_row($Res) == 0) { $style = "style-classic.css"; } else { $s = Database::fetch_array($Res, 0); $style = $s['the_filestyle']; } } else { $style = "style-classic.css"; } // end if $title = "NOALYSS"; if (isset($_REQUEST['ac'])) { if (strpos($_REQUEST['ac'], '/') != 0) { $m = explode('/', $_REQUEST['ac']); $title = $m[count($m) - 1] . " " . $title; } else { $title = $_REQUEST['ac'] . " " . $title; } } $is_msie = is_msie(); if ($is_msie == 0) { echo '<!doctype html>'; printf("\n"); echo '<meta name="viewport" content="width=device-width, initial-scale=1.0">'; printf("\n"); } else { echo '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 FINAL//EN" >'; printf("\n"); } echo "<HTML>"; if ($p_script2 != "") { $p_script2 = '<script src="' . $p_script2 . '?version=' . SVNINFO . '" type="text/javascript"></script>'; } $style = trim($style); echo "<HEAD>"; if ($is_msie == 1) { echo ' <meta http-equiv="x-ua-compatible" content="IE=edge"/>'; } echo "\n <TITLE>{$title}</TITLE>\n\t<link rel=\"icon\" type=\"image/ico\" href=\"favicon.ico\" />\n <META http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\">\n <LINK REL=\"stylesheet\" type=\"text/css\" href=\"" . $style . "?version=" . SVNINFO . "\" media=\"screen\"/>\n <link rel=\"stylesheet\" type=\"text/css\" href=\"./style-print.css?version=" . SVNINFO . "\" media=\"print\"/>" . $p_script2 . "\n "; echo '<script language="javascript" src="js/calendar.js"></script> <script type="text/javascript" src="js/lang/calendar-en.js"></script> <script language="javascript" src="js/calendar-setup.js"></script> <LINK REL="stylesheet" type="text/css" href="./calendar-blue.css" media="screen"> '; echo load_all_script(); echo ' </HEAD> '; echo "<BODY {$p_script}>"; echo '<div id="info_div"></div>'; echo '<div id="error_div">' . HtmlInput::title_box(_("Erreur"), 'error_div', 'hide') . '<div id="error_content_div">' . '</div>' . '<p style="text-align:center">' . HtmlInput::button_action('Valider', '$(\'error_div\').style.visibility=\'hidden\';$(\'error_content_div\').innerHTML=\'\';') . '</p>' . '</div>'; // language if (isset($_SESSION['g_lang'])) { set_language(); } }
} } echo $Ledger->button_new_operation(); echo '</div>'; return; } } // ------------------------------ /* Display a blank form or a form with predef operation */ // ------------------------------ $array = isset($_POST['correct']) || isset($correct) ? $_POST : null; $Ledger = new Acc_Ledger_Sold($cn, 0); // // pre defined operation // if (is_msie() == 0) { echo '<div style="position:absolute" class="content">'; } else { echo '<div class="content">'; } if (!isset($_REQUEST['p_jrn'])) { $def_ledger = $Ledger->get_first('ven', 2); if (empty($def_ledger)) { exit('Pas de journal disponible'); } $Ledger->id = $def_ledger['jrn_def_id']; } else { $Ledger->id = $_REQUEST['p_jrn']; } if (isset($_REQUEST['p_jrn_predef'])) { $Ledger->id = $_REQUEST['p_jrn_predef'];