Ejemplo n.º 1
0
 function getResultats($get = '')
 {
     if (!$_REQUEST['dt_sortie']) {
         $_REQUEST['dt_sortie'] = date('Y-m-d');
     }
     $_SESSION['dt_sortie'] = $_REQUEST['dt_sortie'];
     $req = new clResultQuery();
     $param['table'] = PSORTIS;
     $param['cw'] = "WHERE dt_sortie LIKE '" . $_REQUEST['dt_sortie'] . "%' ORDER BY nom";
     $res = $req->Execute("Fichier", "getPatients", $param, "ResultQuery");
     if ($res['INDIC_SVC'][2] > 1) {
         $s = 's';
     } else {
         $s = '';
     }
     global $debTemps;
     $finTemps = temps();
     $temps = $finTemps - $debTemps;
     $af = "<br/><i>" . $res['INDIC_SVC'][2] . " résultat{$s} en " . sprintf('%.2f', $temps) . "s</i>";
     //eko ( $res ) ;
     for ($i = 0; isset($res['idpatient'][$i]); $i++) {
         $af .= $this->genFichePassage($res, $i);
     }
     if ($get) {
         return $af;
     } else {
         $this->af .= $af;
     }
 }
Ejemplo n.º 2
0
 function addLog($type, $description, $idcible = '')
 {
     global $session;
     global $debTemps;
     global $nbRequetes;
     global $tpRequetes;
     if ($description != "Configuration|cron" and $description != "Importation") {
         $date = new clDate();
         $data['idapplication'] = IDAPPLICATION;
         if (isset($session)) {
             $data['iduser'] = $session->getUid();
         } else {
             $data['iduser'] = $_SESSION['informations']['iduser'] ? $_SESSION['informations']['iduser'] : "******";
         }
         if ($idcible) {
             $data['idcible'] = $idcible;
         }
         $data['type'] = $type;
         $data['ip'] = $_SERVER['REMOTE_ADDR'];
         $data['date'] = $date->getDatetime();
         $data['description'] = $description;
         $finTemps = temps();
         $tpPage = $finTemps - $debTemps;
         $data['tempsPage'] = $tpPage;
         $data['tempsSQL'] = $tpRequetes;
         $data['nombreSQL'] = $nbRequetes + 1;
         // Appel de la classe Requete.
         $requete = new clRequete(BASEXHAM, TABLELOGS, $data);
         // Exécution de la requete.
         $res = $requete->addRecord();
         // Limitation du nombre de lignes dans la table logs... Désactivé, mais fonctionne parfaitement.
         //$mini = $res['cur_id'] - 150 ;
         //$res = $requete->delRecord ( "idlog<=$mini" ) ;
     }
 }
Ejemplo n.º 3
0
// Description :
// La connexion à la base de donnée, le chargement des classes,
// le chargement des fonctions sont définis ici. L'ouverture de
// session se fait aussi à ce niveau.
// Ouverture de la session.
@session_start();
ini_set('default_charset', 'iso-8859-1');
//ob_flush ( ) ; flush ( ) ;
// fonction permettant de récupérer le temps écoulé depuis l'époque UNIX ( 1 - 1 1970 )
function temps()
{
    $time = microtime();
    $tableau = explode(" ", $time);
    return $tableau[1] + $tableau[0];
}
$debTemps = temps();
if (!isset($stopAffichage)) {
    $stopAffichage = '';
}
// Importation.
include "define.php";
//include_once ( URLLOCAL."classes_ext/adodb-time.inc.php" ) ;
if (PROXY) {
    //lapin:jambon@192.168.1.2:3128
    require_once URLLOCAL . 'classes_ext/proxy.class.php';
    $tabMatch = array();
    if (preg_match('/([^:]+):([^@]+)@([^:]+):([^:]+)/', PROXY, $tabMatch)) {
        $user = $tabMatch[1];
        $pass = $tabMatch[2];
        $host = $tabMatch[3];
        $port = $tabMatch[4];
Ejemplo n.º 4
0
        echo $contenu;
    }
}
#*************************************************************
?>
<div style="clear:both"> </div>
        <footer>
            <?php 
feed_link();
?>
<hr/><?php 
echo config_link() . '<em><a href="https://github.com/broncowdd/SnippetVamp" title="' . msg('fork SnippetVamp on github') . '">' . $config['app_name'] . ' ' . $config['version'] . '</a></em> ' . msg('by');
?>
 <a href="http://warriordudimanche.net">Bronco</a> - <?php 
echo msg('generated in');
echo ' ', round(temps() - $start, 3);
?>
 s
            <br/><?php 
echo alert_last_version_if_necessary();
?>
        </footer>

<script src="jquip.min.js"></script>
<?php 
if (file_exists('highlight.js')) {
    ?>
 <link rel="stylesheet" href="styles/<?php 
    e('highlight_theme');
    ?>
.css"> <script src="highlight.js"></script><script>hljs.initHighlightingOnLoad();</script>  <?php 
Ejemplo n.º 5
0
        </thead>
        <tbody>
        <?php 
foreach ($classement as $key => $val) {
    ?>
        <tr>
            <th scope="row"><?php 
    echo $i++;
    ?>
</th>
            <td class="text-center"><?php 
    echo $key;
    ?>
</td>
            <td class="text-center"><?php 
    echo temps($val);
    ?>
</td>
            <?php 
}
?>
        </tr>
        </tbody>
    </table>
    </div>
    ​
</div>
</body>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/js/bootstrap.min.js"></script>
</html>