function display($content, $conf)
    {
        $this->pi_loadLL();
        $this->conf = $conf;
        $this->pi_setPiVarDefaults();
        //debug($conf);
        $content = '
			<div id="menuOutils">
			     <p id="agenda"><img src="fileadmin/templates/images/icones/agenda.gif" align="middle"/><a href="../webcalendar/login.php?typo_l=' . $GLOBALS["TSFE"]->fe_user->user["username"] . '&typo_p=' . base64_encode($GLOBALS["TSFE"]->fe_user->user["password"]) . '">Agenda</a></p>
			     <p id="liens"><img src="fileadmin/templates/images/icones/liens.gif" align="middle"/><a href="?id=2733">Liens</a></p>
			     <p id="sig"><img src="fileadmin/templates/images/icones/sig.gif" align="middle"/><a href="#">SIG</a></p>
			     <p id="annuaire"><img src="fileadmin/templates/images/icones/annuaire.gif" align="middle"/><a href="?id=2706">Annuaire</a></p>
			</div>
			<div id="pratique">';
        $uid_util = $GLOBALS["TSFE"]->fe_user->user["uid"];
        if ($uid_util) {
            //$this->pi_USER_INT_obj=1;	// Configuring so caching is not expected. This value means that no cHash params are ever set. We do this, because it's a USER_INT object!
            $content .= '<p>';
            $content .= $this->DispFav($this->conf['fixedLinksCats'] ? "category IN (" . $this->conf['fixedLinksCats'] . ")" : " 1 ");
            $content .= '</p>';
            /*			$content.='			
            				<tr height="10">
            				<td align="center" valign="middle" height="10"><img src="./fileadmin/templates/IMAGES/filet_appli.gif" alt="" height="2" width="176" border="0"></td>
            				</tr>'; */
            $tb_links = RecupLib("tx_vm19userlinks_ulinks", "user_id", "link_ids", $uid_util, " AND deleted!=1");
            if ($tb_links != "") {
                $content .= '</table>';
                $content .= str_replace("###TITRE###", $this->pi_getLL("liensu", "Liens ut"), $this->entet_table);
                $content .= $this->DispFav("uid IN (" . $tb_links . ")");
                $content .= "</td></tr>";
            }
            //$content.=$GLOBALS["TSFE"]->fe_user->user["username"];
            $content .= "</table>";
            //		$content.=time();
            return $content;
        }
    }
 function DispCP($tb_links)
 {
     $sqlIN = $this->conf['fixedLinksCats'] ? "category NOT IN (" . $this->conf['fixedLinksCats'] . ")" : "1";
     $query = "SELECT * from tt_links where {$sqlIN} AND deleted!=1 AND hidden!=1 AND pid=" . $this->pidulinks . " order by category";
     $res = mysql(TYPO3_db, $query);
     if (mysql_num_rows($res) > 0) {
         $ret .= '<FORM action="' . $this->pi_getPageLink($GLOBALS["TSFE"]->id) . '" name="' . $this->prefixId . 'fname" method="POST">
                             <INPUT type="hidden" name="' . $this->prefixId . '[ValidCP]" value="OK">';
         $ret .= '<table border="0">';
         $vtb_links = array();
         if ($tb_links) {
             $vtb_links = explode(",", $tb_links);
         }
         while ($row = mysql_fetch_array($res)) {
             $ncat = RecupLib("tt_links_cat", "uid", "title", $row['category']);
             if ($catc != $ncat) {
                 $catc = $ncat;
                 $ret .= '<tr><td colspan="2"><b>' . $catc . '</b></td></tr>';
             }
             $ret .= '<tr><td>';
             $ret .= '<input type="checkbox" name="' . $this->prefixId . '[u_links][]" value="' . $row[uid] . '" ' . (in_array($row[uid], $vtb_links) ? "checked" : "") . '>';
             $ret .= '</td><td align="center">';
             $ret .= '<a href="' . $row['url'] . '" target="_blank" title="' . $row['title'] . " " . $row['note'] . '">';
             $ret .= $this->srcimg($row['image'], $row['uid'], $row['title']) . "</a></td>";
             $ret .= '<td><a href="' . $row['url'] . '" target="' . (strstr($row['url'], "http://") ? "_blank" : "_self") . '" title="' . $row['note'] . '">' . $row['title'] . '</a></td>';
             $ret .= '</tr>';
         }
         $ret .= '</table>';
         $ret .= '<INPUT ' . $this->pi_classParam("submit-button") . ' type="submit" name="' . $this->prefixId . '[submit_button]" value="' . $this->pi_getLL("validprefs", "Valid preferences") . '"></form>';
     } else {
         //pas de liens actifs
         $ret .= "<br/>" . $this->pi_getLL("no_act_links", "Aucun lien spécifique disponible") . "<br/>";
     }
     return $ret;
 }
Beispiel #3
0
$title = "Cartographie";
$db = true;
include "setup.php";
include_once PROOT . "/libs/lei_fct.inc";
// fonctions php
require_once "dl3tree.inc";
// fichier partag�contenant l'objet permettant de g��er des arboresences
//debug ("_REQUEST");
//debug ("_SESSION");
checkfontlist(PROOT . "/maps");
//include_once(PROOT."/libs/conf.php"); fait ds le setup
// sur le proto, on n'affiche la carte que si on est logg? avec un profil >=1 et que le code profil
$bool_map_disp = !empty($_SESSION['me']) && $_SESSION['profile'] >= 1 || $anonym_disp_maps;
$smarty->assign('bool_map_disp', $bool_map_disp);
$smarty->assign('bool_lei_stat', RecupLib("conf", "name", "value", "lei_stat"));
$smarty->assign('url_lei_stat', RecupLib("conf", "name", "value", "url_lei_stat"));
if (isset($_REQUEST['x'])) {
    $click_x = $_REQUEST['x'];
    $click_y = $_REQUEST['y'];
} else {
    $click_x = $click_y = false;
}
// enlevé: ne servait que quand on arrivait sur la carto pour la première fois
// maintenant c'est le zoom pardéfaut qui est sélectionné
//if (!isset($_REQUEST['action']))  $_REQUEST['action'] = "travel";
$zoom_factor = 1;
// défaut
if (isset($_REQUEST['purge']) and $_REQUEST['purge'] == 'all') {
    $_SESSION['track'] = array();
}
if (isset($_REQUEST['filtre'])) {
    $timec = floor($parc_length / 100 / $_SESSION['vitmoy']) / 10;
    $tb_infparc .= "<br/><br/><b>&#149; Temps</b> du parcours \"recalcul&eacute;\" par le SIG, avec une vitesse moyenne de " . $_SESSION['vitmoy'] . " km/h: <b> " . $timec . " h </b>";
    $tb_infparc .= '<br><input name="parcours_time_cvalue" type="checkbox" value="' . $timec . '" ' . ($tbValChp['parcours_time'] > 0 ? "" : "checked") . '/> <b>enregistrer ce temps</b> pour ce parcours';
    $tb_infparc .= "<br/><small><u>N.B. :</u>la vitesse moyenne d'une discipline est reparametrable, demandez a l'administrateur systeme</small>";
    if ($deniv_ok) {
        $tb_infparc .= "<br/><br/><b>&#149; Denivele</b> du parcours \"recalculee\" par le SIG (en m) :<b> " . $denivtot . "</b>";
        // genere une chcbox, pr�och� si valeur en bdd =0; non coch� sinon
        $tb_infparc .= '<br><input name="parcours_deniv_cvalue" type="checkbox" value="' . $denivtot . '" ' . ($tbValChp['parcours_deniv'] > 0 ? "" : "checked") . '/> <b>enregistrer cette valeur</b> de denivele pour ce parcours';
    }
    $tb_infparc .= "<br/<br/><small>les valeurs recalcul�s par le SIG peuvent diff�er ce ces mesur�s sur le terrain. C'est pourquoi il est possible de les ressaisir manuellement ci-dessous</small>";
    $tb_infparc .= '<br/<br/><input type="reset" value="ANNULER LES MODIFICATIONS" class="redbutton"> <br/><input type="submit" onclick="ChgMeth(); document.f.action=\'maj_table.php\'; document.f.submit()" class="redbutton" name="toto" value="!! ENREGISTRER LES MODIFICATIONS D\'ATTRIBUTS DE CE PARCOURS !!"/>&nbsp;';
    $tb_infparc .= "</td><tr></table>";
    //
}
// fin si on est en edition
$usercid = RecupLib("users", "login", "user_id", $_SESSION['me']);
$booluscreaconnect = $tbValChp['parcours_uscrea'] == $usercid || $_SESSION['admin'];
// bouton edition affich�
if ($booluscreaconnect && !$_REQUEST['editpc']) {
    $tb_infparc .= '<input id="edithid" type="hidden" name="editpc" value="">
	<input type="submit"  onclick="document.getElementById(\'edithid\').value=\'true\'; document.f.submit()" class="redbutton" name="toto" value="!! MODIFIER LES ATTRIBUTS DE CE PARCOURS !!"/>';
}
$tb_infparc .= '<TABLE class="table">';
$tb_infparc .= '<thead><th>Attribut</th><th>Valeur</th></thead>';
// Cr�tion et Initialisation des propri�� des objets PYAobj
$reqLChp = "SELECT NM_CHAMP from {$TBDname} where NM_TABLE='parcours' AND NM_CHAMP!='{$NmChDT}' AND (TYPEAFF!='HID' OR (TT_PDTMAJ!='' AND TT_PDTMAJ!= NULL)) ORDER BY ORDAFF, LIBELLE";
$rq1 = db_query($reqLChp) or die("req 2 invalide");
//foreach ($ECT as $PYAObj) {
while ($CcChp = db_fetch_row($rq1)) {
    // boucles sur les champs
    $PYAObj = new PYAobj();
InitPage(true); // initialise en envoyant les balises de début <HTML> etc ...
?>
<span class="titrered20px"> 
Etat provisoire des administrateurs d'UF</span>
<table><thead>
<th>Nom</th>
<th>UF gérée</th>
<th>ID</th>
<th>Mot de passe</th>
<th>Email</th>
</thead>
<?
$NmChpId=($authType=="ldapsweb" ? "PER_LCIDLDAP" : "PER_LCIDPERS");
$rplc=msq("select * from ENV_POSSEDE,PERSONNE where POS_NUPERS=PER_NUPERS AND POS_COPROFIL='$prof'"); 
while ($rw=mysql_fetch_array($rplc)) {
	echo "<tr>";
	echo "<td>".$rw[PER_LLPRENOMPERS]." ".$rw[PER_LLNOMPERS]."</td>\n";
	echo "<td>".RecupLib("UNITE_FONCTION","UFO_NUUNITE","UFO_LLUNITE",$rw[POS_NUUNITE])."</td>\n";
	echo "<td>".$rw[$NmChpId]."</td>\n";
	echo "<td>".($authType=="ldapsweb" ? "géré par le LDAP" : $rw[POS_LMPASSWD])."</td>\n";
	echo "<td>".DispCustHT($rw[PER_MAILPERS])."</td></tr>\n";
	} // fin boucle

?>
</table>
</body>
</html>



<?php

$debug = true;
$disp = false;
$title = "Export";
$db = true;
include "setup.php";
$parc_name_fn = RecupLib("parcours", "parcours_id", "parcours_name", $_REQUEST["parcours_id"]);
// PWWW est d�ini dans setup.php
$parc_name_fn = $_REQUEST["parcours_id"] . "_" . strtr($parc_name_fn, " éèêàä", "_eeeaa");
// nom du fichier sans caract�es �la con
if ($_REQUEST['fexpf'] == 'shp') {
    $parc_name_fn_wpath = PWWW . "/temp/" . $parc_name_fn;
    // commande test� sur test :pgsql2shp -g parcours_geom -f toto etoil 'select parcours_geom,parcours_name from parcours where parcours_id=2147'
    // commande test� PROD : /usr/lib/postgresql/8.0/bin/pgsql2shp -h localhost -u www-data -P w3c -g parcours_geom -f  /var/www/etoilcom/www//temp/2474_cattey_11 etoil 'select parcours_geom,parcours_name from parcours where parcours_id=2474'
    if (file_exists(PATH2SHP2PGSQL_TEST)) {
        $PATH2SHP2PGSQL = PATH2SHP2PGSQL_TEST;
    } elseif (file_exists(PATH2SHP2PGSQL_PROD)) {
        $PATH2SHP2PGSQL = PATH2SHP2PGSQL_PROD;
        $argoptions = " -h localhost -u www-data -P w3c ";
    } else {
        die("Export en shp impossible: ne trouve pas l'utilitaire SHP2PGSQL; v�ifier la config avec les constantes PATH2SHP2PGSQL_TEST ou PATH2SHP2PGSQL_PROD dans le fichier setup.php");
    }
    $cmd = $PATH2SHP2PGSQL . $argoptions . " -g parcours_geom -f {$parc_name_fn_wpath} {$dbname} 'select parcours_geom,parcours_name from parcours where parcours_id=" . $_REQUEST["parcours_id"] . "'";
    //	echo $cmd."\n";
    $out = shell_exec($cmd);
    //	echo "sortie:\n".$out."\n";
    $cmd = "zip -j -q {$parc_name_fn_wpath} {$parc_name_fn_wpath}.*";
    // -j: ne stocke pas le chemin, -q=quiet
    $out = shell_exec($cmd);
    //	echo "sortie:\n".$out."\n";
function MajWatsNiou($exttablename, $typcontent, $NmChpTitle = "title", $timestartstop = true)
{
    global $WhereComm, $WhereSStime, $tableName, $hiddenP, $deletedP;
    // calcul de la page où sont les liens
    if ($typcontent == "vm19_hnlinks") {
        // pour les liens on met l'url direct
        $idpl = RecupLib("tt_content", "list_type", "pid", "vm19_hnlinks_pi1", "", " Ctype='list'");
        $tabarbo = RecupArbo($idpl);
        $tabarbid = ",";
        if (is_array($tabarbo)) {
            foreach ($tabarbo as $id => $hed) {
                $tabarbid .= substr($id, 2) . ",";
            }
        }
    }
    $req = "SELECT * FROM {$exttablename} WHERE 1 {$WhereComm} " . ($timestartstop ? $WhereSStime : "");
    $res = msq($req);
    while ($rep = mysql_fetch_array($res)) {
        if (($rep[$NmChpTitle] != "" || rtrim(strip_tags($rep[bodytext])) != "") && ($exttablename != "tt_content" || $rep[CType] != "list")) {
            /* si titre non vide
            		ou que le corps du tt_content est non vide (pour �iminer les plugins et les lignes de s�aration html) 
            		ou que le tt_content n'est pas un plugin (CType!=list)
            		la fonction tronqstrww coupe intelligemment la chaine sans couper les mots*/
            if ($rep[$NmChpTitle] == "") {
                $rep[$NmChpTitle] = tronqstrww(strip_tags($rep[bodytext]), 44);
            } else {
                $rep[$NmChpTitle] = tronqstrww(strip_tags($rep[$NmChpTitle]), 44);
            }
            // des fois le titre aussi d�asse
            $hiddenP = 0;
            // on se sert de variables globales
            $deletedP = 0;
            // des que dans la fonction reeentrante ci-dessous on tombe sur une page hidden, on mets ces flages
            if ($typcontent != "vm19_hnlinks") {
                // recup de la page ou est le new
                $tabarbo = RecupArbo($rep[pid]);
                $tabarbid = ",";
                if (is_array($tabarbo)) {
                    foreach ($tabarbo as $id => $hed) {
                        $tabarbid .= substr($id, 2) . ",";
                    }
                }
            }
            // pour les chiffres cl�, c'est carrement plus balaise
            if ($typcontent == "vm19keynumbers") {
                $u_code = RecupLib("tx_vm19keynumbers_unities", "uid", "unity_code", $rep[unity]);
                $f = explode("|", $u_code);
                if (strstr($u_code, "|")) {
                    // existe une s�aration format#unit�
                    $f = explode("|", $u_code);
                    $unite = $f[0];
                    $nbdec = $f[1];
                    $dec_sep = $f[2] != '' ? $f[2] : ',';
                    $mil_sep = $f[3] != '' ? $f[3] : '';
                } else {
                    $unite = $u_code;
                    $nbdec = 1;
                    $dec_sep = ",";
                    $mil_sep = "";
                }
                $k_value = number_format($rep[k_value], $nbdec, $dec_sep, $mil_sep) . "&nbsp;" . $unite;
                $title = addslashes($rep[k_value] . " " . $f[0] . " " . $rep[$NmChpTitle]);
            } elseif ($typcontent == "vm19_hnlinks") {
                $title = addslashes($rep[$NmChpTitle] . "|" . $rep['url_url']);
            } else {
                $title = addslashes($rep[$NmChpTitle]);
            }
            if ($title == "" || $title == " " || $title == " [...]" || $title == "[...]") {
                $title = "Sans titre";
            }
            $SET = "sorting=69,pid=" . ($tabarbo[0] > 0 ? $tabarbo[0] : $rep[pid]) . ", tstamp={$rep['tstamp']},crdate={$rep['crdate']}," . ($timestartstop ? "starttime=" . $rep['starttime'] . ",endtime=" . $rep['endtime'] . "," : "") . "hidden={$hiddenP},deleted={$deletedP},title='{$title}',tabidarbo='" . $tabarbid . "',\r\n\t\t\ttabstrarbo='" . addslashes(serialize($tabarbo)) . "', typcontent='{$typcontent}'";
            msq("INSERT INTO {$tableName} SET uid={$rep['uid']}, " . $SET);
        }
        // fin si titre non vide
    }
}
     parcours_equipt character varying DEFAULT 1,
     parcours_interet character varying DEFAULT 1,
     parcours_topo text,
     parcours_photo character varying,
     parcours_balisage integer DEFAULT 1,
     parcours_valid integer DEFAULT 0,
     parcours_source integer DEFAULT 0,
     parcours_dtcrea timestamp without time zone,
     parcours_dtmaj timestamp without time zone,
     parcours_uscrea character varying,
     parcours_usmaj character varying,
     parcours_environmt character varying DEFAULT 1,
 */
 $parcours_discp = "5";
 // cyclotourisme
 $vitmoy = RecupLib("disciplines", "disc_id", "disc_vitmoy", $parcours_discp);
 $srcg_id = 3;
 // CG19, CycloT
 $usermajcartoctcg19 = "smilgram";
 $i = 0;
 echo "vitmoy: {$vitmoy} <br/>";
 echo "IMPORT DES TRACES CT CG19<BR/>";
 $qu_sel = "select * from zimptmp_ctcg19";
 $rep = $db->s_query($qu_sel);
 while ($row = pg_fetch_assoc($rep)) {
     $i++;
     $parcours_name = $_REQUEST[nom_ctcg19] . " " . addslashes($row[nom]) . " (" . $i . ")";
     $req_ins = "insert into parcours (\n\t\tparcours_name,\n\t\tparcours_user,\n\t\tparcours_discp,\n\t\tparcours_geom,\n\t\tparcours_desc,\n\t\tparcours_source,\n\t\tparcours_idsource,\n\t\tparcours_dtcrea,\n\t\tparcours_dtmaj,\n\t\tparcours_uscrea,\n\t\tparcours_usmaj,\n\t\tparcours_marqimp)\n\t\tVALUES (\n\t\t'" . $parcours_name . "',\n\t\t'" . $usermajcartoctcg19 . "',\n\t\t" . $parcours_discp . ",\n\t\t'" . $row[the_geom] . "',\n\t\t'identifiant SIG CT 19 :" . $row[gid] . "',\n\t\t" . $srcg_id . ",\n\t\t'" . $row[gid] . "',\n\t\t'" . date('Y-m-d') . "',\n\t\t'" . date('Y-m-d') . "',\n\t\t1,1,\n\t\t'" . $_REQUEST[actionname] . "_" . $_REQUEST[marqimp] . "'\n\t\t)";
     $resins = $db->s_query($req_ins) or die("req ins {$req_ins} INVALIDE");
     $querup = "update parcours set parcours_length=Length2D(parcours_geom), parcours_start=StartPoint(parcours_geom),parcours_time=ceil(Length2D(parcours_geom)/" . $vitmoy * 1000 . ") where parcours.oid=" . pg_last_oid($resins) . ";";
     $resup = $db->s_query($querup) or die("req up {$querup} INVALIDE");
 function aff1text($rwt, $indent_n = 1)
 {
     $strt2d .= '<p style="padding-left:' . $indent_n * $this->text_indent . 'px">';
     switch ($rwt["rtt_attach_type"]) {
         case "MOD":
             $atttxt = "modifi&#233; par ";
             break;
         case "ABR":
             $atttxt = "abrog&#233; par ";
             break;
         case "REPL":
             $atttxt = "remplac&#233; par ";
             break;
         case "ANN":
             $atttxt = "annul&#233; par ";
             break;
         case "TRP":
             $atttxt = "transpos&#233; par ";
             break;
         case "APP":
             $atttxt = "appliqu&#233; par ";
             break;
         default:
             $atttxt = "";
     }
     if ($rwt["hidden"] != 1 && !$this->affok[$rwt['uid']]) {
         // affiche que si pas caché et si texte pas deja affiché
         if ($atttxt != "") {
             $strt2d .= '<span class="reg_modpar">' . $atttxt . " :<br/></span>";
         }
         $indent_n++;
         $strt2d .= '<span class="reg_natdat">' . '<a name="Anc' . $rwt["uid"] . '" title="uid=' . $rwt["uid"] . '">&#149; </a>' . ($rwt["url"] != "" ? '<a href="' . $rwt["url"] . '" target="_blank">' : "") . utf8_deconne(RecupLib("tx_vm19hnreglementation_nature", "uid", "title", $rwt["nature"])) . ($rwt["dat_approb"] > 0 ? " du " . getDateF($rwt["dat_approb"]) : "") . ($rwt["url"] != "" ? '</a>' : "") . " </span>";
         $strt2d .= $rwt["title"] != "" ? '<span class="reg_title">' . utf8_deconne($rwt["title"]) . "</span>" : "";
         $strt2d .= $rwt["number"] != "" ? '<br/><span class="reg_number">Num&#233;ro ' . $rwt["number"] . "</span>" : "";
         $strt2d .= $rwt["publication"] != "" ? '<br/><span class="reg_publication">Publi&#233; ' . utf8_deconne($rwt["publication"]) . "</span>" : "";
         $strt2d .= $rwt["fich_joint"] != "" ? '<br/><span class="reg_publication">T&#233;l&#233;charger le texte : <a href="' . $this->ChemUpLoads . $rwt["fich_joint"] . "\">" . $rwt["fich_joint"] . "</a></span>" : "";
         $strt2d .= $rwt["desc_2bf7363fc2"] != "" ? '<br/><span class="reg_desc"><a href="#" onclick="togdispt3t(this)" id=a3t' . $rwt["uid"] . ">\n\t\t\t<img src=\"" . $this->ChemImg . "f_right12.gif\" id=i3t" . $rwt["uid"] . "><em> Description </em></a>\n\t\t\t<div id=t3t" . $rwt["uid"] . " class=\"stDL3Thidd\">" . utf8_deconne($rwt["desc_2bf7363fc2"]) . "</div></span>" : "";
         $strt2d .= '<br/><span class="reg_fxhr">------------------------</span></p>';
     }
     //
     $sqlf = "SELECT * FROM tx_vm19hnreglementation_textes WHERE parent_text=" . $rwt["uid"] . " AND deleted=0 AND (starttime=0 OR starttime >= " . time() . ") AND (endtime=0 OR endtime <= " . time() . ") ORDER BY dat_approb,sorting";
     $rpat = msq($sqlf);
     //$strt2d.="<!-- $sqlf -->\n";
     while ($rwpat = mysql_fetch_array($rpat)) {
         $strt2d .= $this->aff1text($rwpat, $indent_n);
         // on réentre
     }
     $this->affok[$rwt['uid']] = true;
     // indique que texte deja affiché, pour pas qu'il s'affiche 2 fois.
     //$strt2d.="<HR/>";
     return $strt2d;
 }
		else {
			$ss_InfoUser[errlogin]="Aucun profil spécifique n'existe pour cette personne, ou le mot de passe est incorrect";
			} // fin si profil n'existe pas ou passwd faux
	} // fin test type d'auth
	if ($authOK) {
		$ss_InfoUser[COPROFIL]=RecupLib("ENV_POSSEDE","POS_NUPERS", "POS_COPROFIL", $NUPERS);
		$ss_InfoUser[LLPROFIL]=RecupLib("ENV_PROFIL","PRO_COPROFIL", "PRO_LLPROFIL", $ss_InfoUser[COPROFIL]);
		if ($ss_InfoUser[COPROFIL]=="UF_ADM" || $ss_InfoUser[COPROFIL]=="UF_LS") {// Si le user est administrateur d'UF
			$ss_InfoUser[NUUNITEG]=RecupLib("ENV_POSSEDE","POS_NUPERS", "POS_NUUNITE", $NUPERS); 
			$ss_InfoUser[LLPROFIL].=" ".RecupLib("UNITE_FONCTION","UFO_NUUNITE","UFO_LLUNITE",$ss_InfoUser[NUUNITEG]);
			}
		else { // sinon récupère l'UF de rattachement de la personne
			$ss_InfoUser[NUUNITEG]=RecupLib("INFOS_DRH","DRH_NUPERSO", "DRH_NUUNITE", $NUPERS); 
			}
			
		$ss_InfoUser[NUPERS]=$NUPERS; 
		$ss_InfoUser[TITRE]=RecupLib("PERSONNE","PER_NUPERS", "PER_LMTITREPER", $NUPERS);
		$ss_InfoUser[PRENOM]=RecupLib("PERSONNE","PER_NUPERS", "PER_LLPRENOMPERS", $NUPERS);
		$ss_InfoUser[NOM]=RecupLib("PERSONNE","PER_NUPERS", "PER_LLNOMPERS", $NUPERS);
		$ss_InfoUser[errlogin]=""; // pas d'erreur
	}	
} //fin si id existe
else {
	$ss_InfoUser[errlogin]="Cet identifiant ne correspond à aucune personne de la base";
} // fin test Id NUPERS exista dans la base

//echovar("ss_InfoUser");
session_register("ss_InfoUser");
header ("location: index.php?nav=".($ss_InfoUser[errlogin]!="" ? "identification.php&arg_clean=1" : "navigation.php&arg_clean=no"));
?>
Beispiel #11
0
 function add_parcours($name, $user, $discp, $geom, $level = 0, $time = 0, $marqimp = "toto")
 {
     if ($marqimp == "toto") {
         $marqimp = date('d-m-y');
     }
     $line = implode(",", $geom);
     $user_id = RecupLib("users", "login", "user_id", $user);
     if (!$user_id) {
         $user_id = 1;
     }
     $query = "insert into parcours (parcours_name,parcours_user,parcours_uscrea,parcours_discp,parcours_geom,parcours_level,parcours_time,parcours_dtcrea,parcours_marqimp) values ";
     $query .= "('" . addslashes($name) . "','" . addslashes($user) . "' , {$user_id} , '" . addslashes($discp) . "',GeomFromEWKT('SRID=-1;LINESTRING({$line})'),'" . addslashes($level) . "',{$time}, '" . date('Y-m-d') . "', '{$marqimp}');";
     $resins = $this->s_query($query);
     if (!$resins) {
         $this->mes[] = "Requete: {$query} \n error: " . pg_last_error();
         return false;
     } else {
         if ($_SESSION['vitmoy'] == 0 || $_SESSION['vitmoy'] == "") {
             $_SESSION['vitmoy'] = 80;
         }
         // 80=~ 5km/h
         $last_oid = pg_last_oid($resins);
         $query = "update parcours set parcours_length=Length2D(parcours_geom), parcours_start=StartPoint(parcours_geom),parcours_time=ceil(Length2D(parcours_geom)/" . $_SESSION['vitmoy'] * 1000 . ") where parcours.oid=" . pg_last_oid($resins) . ";";
         //echo $query;
         $resup = $this->s_query($query);
         if (!$resup) {
             $this->mes[] = "Requete: {$query} \n error: " . pg_last_error();
             return false;
         } else {
             return true;
         }
     }
 }
    $reqo = "SELECT * from RUR ORDER BY RUR_url";
    $urlC = -1;
    $reso = msq($reqo);
    while ($row = mysql_fetch_array($reso)) {
        if ($urlC == -1) {
            $urlC = $row[RUR_url];
        }
        if ($row[RUR_url] != $urlC) {
            // on change...
            $resu = msq("select * from URL where URL_id={$urlC}");
            $rowu = mysql_fetch_array($resu);
            echo "Url: ";
            print_r($rowu);
            echo "affect: " . implode(",", $tbrub) . "<BR/>";
            $db = mysql_select_db($mysql_db_dest);
            msq("INSERT INTO tx_vm19hnlinks_urls SET pid=" . $tbrub[0] . ",tstamp=" . time() . ",crdate=" . time() . ",sorting=256,url_url='" . $rowu[URL_url] . "',url_title='" . addslashes($rowu[URL_titre]) . "',url_desc='" . addslashes($rowu[URL_desc]) . "',url_kwords='" . addslashes($rowu[URL_kwords]) . "',url_mailwb='" . $rowu[URL_mail_wb] . "',url_othercateg='" . implode(",", $tbrub) . "'");
            $db = mysql_select_db($mysql_db_orig);
            $urlC = $row[RUR_url];
            unset($tbrub);
        }
        $tbrub[] = RecupLib("RUBRIQUES", "RUB_id", "RUB_pid", $row[RUR_rub]) or die("rubrique PID de {$row['RUR_rub']} inexistante");
        /*							
        		$db = mysql_select_db ($mysql_db_dest);
        		msq("INSERT INTO pages SET urltype=1,doktype=254,title='".addslashes($row[RUB_titre])."',sorting=256,pid=$pid,tx_impexp_origuid=$id_nvenregt");
        		$lastuid=mysql_insert_id();
        		echo (" ## dernier Id: $lastuid <BR/>");
        		$db = mysql_select_db ($mysql_db_orig);
        		msq("UPDATE RUBRIQUES SET RUB_pid=$lastuid WHERE RUB_id=".$row[RUB_id]);
        */
    }
}
Beispiel #13
0
        		$db = mysql_select_db ($mysql_db_dest);
        		msq("INSERT INTO pages SET urltype=1,doktype=254,title='".addslashes($row[RUB_titre])."',sorting=256,pid=$pid,tx_impexp_origuid=$id_nvenregt");
        		$lastuid=mysql_insert_id();
        		echo (" ## dernier Id: $lastuid <BR/>");
        		$db = mysql_select_db ($mysql_db_orig);
        		msq("UPDATE RUBRIQUES SET RUB_pid=$lastuid WHERE RUB_id=".$row[RUB_id]);
        */
    }
    // fin boucle sur la table RTR ie rubriques...
    // maintenant on MAJ les id parents (si diff ed vide) avec les nvlles Id
    $db = mysql_select_db($mysql_db_dest);
    $rqmajnid = "SELECT uid, parent_text FROM tx_vm19hnreglementation_textes where parent_text != ''";
    $rp = msq($rqmajnid);
    while ($rwmajnid = mysql_fetch_array($rp)) {
        $db = mysql_select_db($mysql_db_orig);
        $nidp = RecupLib("TEXTE", "TEXTE_id", "TEXTE_nid", $rwmajnid[parent_text]);
        $db = mysql_select_db($mysql_db_dest);
        msq("UPDATE tx_vm19hnreglementation_textes SET parent_text={$nidp} WHERE uid={$rwmajnid['uid']}");
    }
} elseif ($_GET[action] == 3) {
    //msq("DELETE FROM pages where tx_impexp_origuid=".$id_nvenregt[$_GET[action]]);
    // title, level, code
    $db = mysql_select_db($mysql_db_orig);
    $reqo = "SELECT * from NATURE ORDER BY NAT_niveau";
    echo $reqo;
    $reso = msq($reqo);
    while ($row = mysql_fetch_array($reso)) {
        $db = mysql_select_db($mysql_db_dest);
        msq("INSERT INTO tx_vm19hnreglementation_nature SET pid={$pid_root_nat}, title='{$row['NAT_lbnature']}', level={$row['NAT_niveau']}, code='{$row['NAT_conature']}'");
    }
}
        for ($l=0;$l<$enum_cnt;$l++) {
          echo $enum[$l]." - ";      
          }
        echo "<BR>";
        }
     } // fin si �um
   if ($AFFALL=="vrai" && $_SESSION[db_type]=="mysql") echo "Flags MySql:".mysql_field_flags ($resf, $j)."<BR>";
   echo "</TD>";
   
   $LIBELLE=RecupLib($TBDname,"NM_CHAMP","LIBELLE",$NM_CHAMP);
   echo "<TD>".($LIBELLE!="" ? $LIBELLE : "&nbsp;")."</TD>";
   $TYPEAFF=RecupLib($TBDname,"NM_CHAMP","TYPEAFF",$NM_CHAMP);
   echo "<TD>".$TYPEAFF."</TD>";
   $VALEURS=RecupLib($TBDname,"NM_CHAMP","VALEURS",$NM_CHAMP);
   echo "<TD>".($VALEURS!="" ? $VALEURS : "&nbsp;")."</TD>";      
   $COMMENT=RecupLib($TBDname,"NM_CHAMP",$GLOBALS["NmChpComment"],$NM_CHAMP);
   echo "<TD>".($COMMENT!="" ? $COMMENT : "&nbsp;")."</TD>";      
   
   echo "</TR>";
   } // fin boucle sur les champs de la table
 echo "</TABLE>";
 echo '<p><a href="admdesct.php?lc_NM_TABLE='.$NM_TABLE.'">Editer les propriétés de cette table</a></p>';
 // en MAJ on enl�e les champs plus existants
 if ($CREATION=="MAJ") {
     $rqLCE=db_query("SELECT NM_CHAMP from $TBDname where NM_TABLE='$NM_TABLE' AND NM_CHAMP!='$NmChDT'");
     while ($rpLCE=db_fetch_row($rqLCE)) {
         // si champ n'existe plus l'enl�e
         if (!in_array($rpLCE[0],$tbNM_CHAMP)) { 
             db_query("DELETE FROM $TBDname where NM_TABLE='$NM_TABLE' AND NM_CHAMP='$rpLCE[0]'");
             echo "<br>Champ <b>$rpLCE[0] <u>supprimé</u></b> de la table de description! <BR>";
             } // fin si a supprimer
<?
	require("../infos.php");	
	InitPage(true,"Calendrier","../"); // initialise
	$llicp=RecupLib("ICP","ICP_COICP","ICP_LLICP",$coicp);
?>
<table width="300" border="0">
<tr><td align="center" colspan="2">
<span class="TRM"><?php 
echo $llicp;
?>
</span>
<? EchoTitIm1("CALENDRIER"); ?>
<br><br>
<img src="../../images/travaux_icp.jpg" align="center" border="0" width="300" height="205" alt="">
<br><br>
Les reponsables décident du calendrier des <b><?php 
echo $llicp;
?>
 </b>et leurs montures les attendent patiemment ...
<br><br>
En fait, désolé, mais cette page est actuellement en cours de réalisation ...
<br><br>
</td></tr></table>
</div>
</body>
</html>
 $onglets .= '</ul><br>';
 $tpl->set_var('onglets', $onglets);
 // on affiche les infos sur l'entité
 $CIL = InitPOReq($sql, $DBName);
 $tmp = '<table>';
 // l'user a t'il accès en lecture pour les champs spéciaux
 //
 $access = $user->HaveAccess($data['CATEGORIES_CAT_ID'], 'R');
 if ($access == 'false') {
     $access = $user->HaveAccess($data['CATEGORIES_CAT_ID'], 'W');
 }
 if ($access == 'false') {
     $access = $user->HaveAccess($data['CATEGORIES_CAT_ID'], 'A');
 }
 // récupère le nom (éventuel) de la table virtuelle décrivant les champs spéciaux
 $vtb_name = RecupLib("CATEGORIES", "CAT_ID", "CAT_VTBNAME", $data['CATEGORIES_CAT_ID']);
 foreach ($CIL as $pobj) {
     $NmChamp = $pobj->NmChamp;
     if ($vtb_name && strstr($NmChamp, "PROPRIETE")) {
         $CIL[$NmChamp]->NmTable = $vtb_name;
         $CIL[$NmChamp]->InitPO();
     }
     $CIL[$NmChamp]->ValChp = $data[$NmChamp];
     $CIL[$NmChamp]->TypEdit = 'C';
     // on affiche pas les champs cachés
     if ($CIL[$NmChamp]->Typaff_l != '' && $CIL[$NmChamp]->TypeAff != "HID" && ($CIL[$NmChamp]->TypEdit != "C" || $CIL[$NmChamp]->ValChp != "")) {
         // on vire les champs qui ne doivent pas etre affiché (droit ou inutiles)
         $display = true;
         if ($NmChamp == 'ENT_PARENTID' || $NmChamp == 'CATEGORIES_CAT_ID') {
             $display = false;
         }
Beispiel #17
0
	a:hover { color: #990033 }
	a:active  { color: #990033 }
	a:link { color: #990033 }
	a:visited { color: #990033 }		
</style>
</head>
<body bgcolor="#ffffff" leftmargin="0" marginwidth="0" topmargin="0" marginheight="0" STYLE="scrollbar-base-color:#330066 ;scrollbar-arrow-color:#FFFFFF;
scrollbar-Track-Color:#6C30AC">
<?
$SpM=10; // espace vertical en pixels entre les menus
// titre de la rubrique ppale courante
$WidthTot=145;
 ?>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr><td colspan="2" class="normalred11px" style="padding-left: 5px"><?php 
echo $titrubp = RecupLib("ENV_MENUS", "MEN_NUMENUS", "MEN_LLBULLE", $nrp0);
?>
</td></tr>

<? // menus de niveau 2
// $ss_InfoUser[COPROFIL] code profil user
// $nrp0 n° de la rubrique parente


$rsMn2=msq("SELECT * from ENV_MENUS where (MEN_COPROFILS LIKE '%$ss_InfoUser[COPROFIL]%'  OR MEN_COPROFILS LIKE '%*%') AND MEN_NBNIVEAU=2 AND MEN_NUPARENT=$nrp0 ORDER BY MEN_ORDREAFF");
while ($rwm2=mysql_fetch_array($rsMn2)) {
	?>
	<!-- spacer au-dessus de chaque rubrique width="<?php 
echo $WidthTot - 30;
?>
"-->