case 'pdf':
        break;
    default:
        //Inclusions
        //        include ("../lib/session.php");         //Récupération des variables de sessions
        //        include ("../lib/debut_page.php");      //Construction d'une nouvelle
        //        if (isset($menu))                       //Si existant, utilisation du menu demandé
        //        {                                       //en variable
        //           include ("./$menu");
        //        }
        //        else
        //        {
        //           include ("./menu_principal.inc");    //Sinon, menu par défaut
        //        }
        require_once '../inc/main.php';
        print_page_begin($disable_full_page, $menu_file);
        flush();
}
//Fin de la sélection du mode d'affichage de la page
$id_fta_classification2 = Lib::getParameterFromRequest(ClassificationFta2Model::KEYNAME);
$action = Lib::getParameterFromRequest('action');
/* * ************
  Début Code PHP
 * *********** */
/*
 Initialisation des variables
*/
$page_default = substr(strrchr($_SERVER["PHP_SELF"], '/'), '1', '-4');
$page_action = "index.php";
//   $action = 'valider';                       //Action proposée à la page _post.php
$method = 'POST';
Exemplo n.º 2
0
 Par défaut, le nom du module est le répetoire courant
*/
//$module=substr(strrchr(`pwd`, '/'), 1);
//$module=trim($module);
/*
 Si la page peut être appelée depuis n'importe quel module,
 décommentez la ligne suivante
*/
//   $module='fta';
/* * *******
  Inclusions
 * ******* */
//include ("../lib/session.php");         //Récupération des variables de sessions
//include ("../lib/debut_page.php");      //Affichage des éléments commun à l'Intranet
require_once '../inc/main.php';
print_page_begin();
flush();
//if (isset($menu)) {                       //Si existant, utilisation du menu demandé
//    include ("./$menu");
//}               //en variable
//else {
//    include ("./menu_principal.inc");
//}  //Sinon, menu par défaut
/* * ***********
  Début Code PHP
 * *********** */
/**
 * Vérification des droits d'accès
 */
/*
 * Initilisation
<?php

/* * *******
  Inclusions
 * ******* */
require_once '../inc/main.php';
print_page_begin(TRUE, $menu_file);
/*
 Initialisation des variables
*/
$page_default = substr(strrchr($_SERVER["PHP_SELF"], '/'), '1', '-4');
$page_action = $page_default . "_post.php";
$page_pdf = $page_default . "_pdf.php";
$method = 'POST';
$html_table = "table " . "border=1 " . "width=100% " . "class=contenu ";
/*
 Récupération des données MySQL
*/
$idIntranetColumnInfo = Lib::getParameterFromRequest(IntranetColumnInfoModel::KEYNAME);
//Fourni par URL
$edit_mode = Lib::getParameterFromRequest('edit_mode');
$action = Lib::getParameterFromRequest('action');
//Récupération des droits d'accès necessaire
$fta_consultation = Acl::getValueAccesRights('fta_consultation');
$fta_modification = Acl::getValueAccesRights('fta_modification');
$owner = IntranetColumnInfoModel::getOwner();
$QUERY_STRING = $_SERVER['QUERY_STRING'];
/**
 * Initilisation
 */
$intranetColumInfoModel = new IntranetColumnInfoModel($idIntranetColumnInfo);
Exemplo n.º 4
0
function print_results($query, $advanced = false)
{
    global $perm, $sess, $HTTP_GET_VARS, $glob_userdata, $glob_search_words;
    $glob_search_words = array();
    if (!defined("SEARCH_INC")) {
        include "search/search2.inc";
    }
    if (!defined("LAY_DIRECTORY_INC")) {
        include "layout/lay_directory.inc";
    }
    if (!defined("LAY_SEARCH_INC")) {
        include "layout/lay_search.inc";
    }
    if (!defined("COMMON_PERMISSIONS_INC")) {
        include "commonapi/common_permissions.inc";
    }
    $ciu = $HTTP_GET_VARS['ciu'] == "" ? 0 : $HTTP_GET_VARS['ciu'];
    $cit = $HTTP_GET_VARS['cit'] == "" ? 0 : $HTTP_GET_VARS['cit'];
    $cic = $HTTP_GET_VARS['cic'] == "" ? 0 : $HTTP_GET_VARS['cic'];
    if ($glob_userdata['ResPerPage'] == "") {
        $glob_userdata['ResPerPage'] = DIR_MAX_SEARCH;
    }
    if ($glob_userdata['HighlightSearch'] == "") {
        $glob_userdata['HighlightSearch'] = true;
    }
    $restriction = $HTTP_GET_VARS['restriction'];
    if ($query != "") {
        $err = "";
        if ($advanced == false) {
            $query = format_query($query);
        } else {
            $query = format_query_simple($query);
        }
        // echo("freag: $query<p>");
        $users = array();
        if (!ereg('^/Experts', $restriction)) {
            $cats = execute_query($query, $sess->id, $cic, "c", $restriction, $glob_userdata['ResPerPage']);
            if (!isset($cats['error'])) {
                $trails = execute_query($query, $sess->id, $cit, "t", $restriction, $glob_userdata['ResPerPage']);
                $glob_search_words = $cats['resinfo']['words'];
            } else {
                $err = $cats['error'];
            }
            if (!is_array($err)) {
                $experts = execute_query($query, $sess->id, 0, "e", $restriction, $glob_userdata['ResPerPage']);
            }
            if (isset($experts['error']) and !is_array($err)) {
                $err = $experts['error'];
            }
        } else {
            $users = execute_query($query, $sess->id, $ciu, "t", $restriction, $glob_userdata['ResPerPage']);
            $glob_search_words = $cats['words'];
            //  die($users['resinfo']['rescount']);
            if (isset($users['error'])) {
                $err = $users['error'];
            }
            $users['resinfo']['ci'] = $ciu;
        }
    }
    print_page_begin();
    $tpl = new Template(APPLICATION_HOME . "/templates/search", "keep");
    $tpl->set_file(array("main" => "main.html"));
    $caps = get_caps($perm, '/');
    $tpl->set_var("IWANTTO", print_iwantto('/', $caps));
    //printf("Test: %d / %d / %d<p>",count($trails['results']) ,count($trails['results']) ,count($trails['results']) );
    //printf("Test: %d, %d, %d", count($cats['results']), count($trails['results']), count($users['results']));
    if (count($cats['results']) == 0 and count($trails['results']) == 0 and count($users['results']) == 0 or $query == "") {
        if (is_array($err)) {
            $tpl->set_var("CATEGORIES", print_search_error($err));
        } else {
            $tpl->set_var("CATEGORIES", implode("\n", file(TEMPLATE_ROOT . 'search/nothing_found.html')));
        }
        $tpl->set_var("TRAILS", "");
        $tpl->set_var("EXPERTS", "");
    } elseif (count($users) > 0) {
        $tpl->set_var("CATEGORIES", print_found_users($users));
        $tpl->set_var("EXPERTS", "");
        $tpl->set_var("TRAILS", "");
    } else {
        $tpl->set_var("CATEGORIES", print_found_categories($cats));
        $tpl->set_var("TRAILS", print_found_trails($trails));
        $tpl->set_var("EXPERTS", print_found_experts($experts));
    }
    $tpl->parse("main", "main");
    $tpl->p("main");
    print_page_end();
}
Exemplo n.º 5
0
<?php

/*
 * ToDo: Page à ne plus utiliser
 */
require_once '../inc/main.php';
print_page_begin(Lib::isDefined("disable_full_page"), Lib::isDefined("menu_file"));
Exemplo n.º 6
0
function slot_edit_error($errors)
{
    global $kat, $HTTP_POST_VARS, $capabilities, $nodeinfo, $id;
    $slot['id'] = $HTTP_POST_VARS['id'];
    $slot['node'] = $nodeinfo['id'];
    $slot['trail_1_path'] = $HTTP_POST_VARS['field_trail_1'];
    $slot['trail_1_text'] = $HTTP_POST_VARS['field_title_1'];
    $slot['trail_2_path'] = $HTTP_POST_VARS['field_trail_2'];
    $slot['trail_2_text'] = $HTTP_POST_VARS['field_title_2'];
    $slot['description'] = $HTTP_POST_VARS['field_description'];
    $errstrs = "<font size=\"2\" face=\"verdana, arial, helvetica\">The following errors occured:<ul>";
    foreach ($errors as $errstr) {
        $errstrs .= "<li>{$errstr}";
    }
    $errstrs .= "</ul></font>";
    print_page_begin();
    $tpl = new Template(APPLICATION_HOME . "/templates/directory", "keep");
    $tpl->set_file(array("main" => "main.html"));
    $tpl->set_var("SUBNODES", print_slot_form($nodeinfo, $slot, $errstrs));
    $tpl->set_var("TRAILS", "");
    $tpl->set_var("IWANTTO", print_iwantto($kat, $capabilities));
    $tpl->set_var("FEATURED", print_featured($kat));
    $tpl->set_var("TOPEX", print_topex($kat));
    $tpl->set_var("NEWTRAILS", print_newtrails($activekat));
    $tpl->set_var("DIDYOUKNOW", "");
    $tpl->set_var("OPENTRAIL", "");
    $tpl->parse("main", "main");
    $tpl->p("main");
    print_page_end();
    exit;
}