Esempio n. 1
0
 *   GNU General Public License for more details.
 *
 *   You should have received a copy of the GNU General Public License
 *   along with NOALYSS; if not, write to the Free Software
 *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
*/
// Copyright Author Dany De Bontridder danydb@aevalys.eu
/*! \file
 * \brief Search module
 */
require_once '../include/constant.php';
require_once NOALYSS_INCLUDE . '/class_dossier.php';
include_once NOALYSS_INCLUDE . '/ac_common.php';
require_once NOALYSS_INCLUDE . '/class_acc_ledger.php';
html_page_start($_SESSION['g_theme']);
load_all_script();
$gDossier = dossier::id();
require_once NOALYSS_INCLUDE . '/class_database.php';
/* Admin. Dossier */
$cn = new Database($gDossier);
include_once NOALYSS_INCLUDE . '/class_user.php';
global $g_user;
$g_user = new User($cn);
$g_user->Check();
$act = $g_user->check_dossier($gDossier);
// AC CODE = SEARCH
if ($act == 'P') {
    redirect("extension.php?" . dossier::get(), 0);
    exit;
}
if ($act == 'X') {
Esempio n. 2
0
/**
 * \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();
    }
}