Ejemplo n.º 1
0
function save_note($idaction, $idnote = 0, $id_demande = 0)
{
    global $contenu, $dbh, $charset, $id_empr;
    global $demandes_email_demandes, $pmb_type_audit;
    $date = date("Y-m-d", time());
    $req = " insert into demandes_notes \n\t\tset contenu='" . $contenu . "',\n\t\tdate_note='" . $date . "',";
    if ($idnote) {
        $req .= "num_note_parent='" . $idnote . "',";
    }
    $req .= " num_action='" . $idaction . "',";
    $req .= " notes_num_user='******', notes_type_user=1, ";
    $req .= " notes_read_gestion=1";
    pmb_mysql_query($req, $dbh);
    $req_up = "update demandes_actions set actions_read=1 where id_action='" . $idaction . "'";
    pmb_mysql_query($req_up, $dbh);
    $dmde_act = new demandes_action($id_demande, $idaction);
    $display = $dmde_act->getContenuForm();
    if ($demandes_email_demandes) {
        $dmde_act->send_alert_by_mail($id_empr, $idnote);
    }
    if ($pmb_type_audit && $idnote) {
        audit::insert_modif(AUDIT_NOTE, $idnote);
    } elseif ($pmb_type_audit && !$idnote) {
        $idnote = pmb_mysql_insert_id($dbh);
        audit::insert_creation(AUDIT_NOTE, $idnote);
    }
    // création d'une nouvelle note => alerte sur l'action + la demande
    $req_up1 = "update demandes_actions set actions_read_gestion='1' where id_action='" . $idaction . "';";
    $req_up2 = "update demandes inner join demandes_actions on demandes_actions.num_demande = demandes.id_demande set demandes.dmde_read_gestion='1' where demandes_actions.id_action='" . $idaction . "'";
    pmb_mysql_query($req_up1, $dbh);
    pmb_mysql_query($req_up2, $dbh);
    ajax_http_send_response($display);
}
Ejemplo n.º 2
0
function save_note($idaction, $idnote = 0, $id_demande = 0)
{
    global $contenu, $dbh, $charset, $id_empr;
    global $demandes_email_demandes;
    $date = date("Y-m-d", time());
    $req = " insert into demandes_notes \n\t\tset contenu='" . $contenu . "',\n\t\tdate_note='" . $date . "',";
    if ($idnote) {
        $req .= "num_note_parent='" . $idnote . "',";
    }
    $req .= " num_action='" . $idaction . "',";
    $req .= " notes_num_user='******', notes_type_user=1 ";
    mysql_query($req, $dbh);
    $req_up = "update demandes_actions set actions_read=1 where id_action='" . $idaction . "'";
    mysql_query($req_up, $dbh);
    $dmde_act = new demandes_action($id_demande, $idaction);
    $display = $dmde_act->getContenuForm();
    if ($demandes_email_demandes) {
        $dmde_act->send_alert_by_mail($id_empr, $idnote);
    }
    ajax_http_send_response($display);
}
Ejemplo n.º 3
0
<?php

// +-------------------------------------------------+
// © 2002-2004 PMB Services / www.sigb.net pmb@sigb.net et contributeurs (voir www.sigb.net)
// +-------------------------------------------------+
// $Id: liste_demande.inc.php,v 1.1 2009-10-01 13:29:24 kantin Exp $
if (stristr($_SERVER['REQUEST_URI'], ".inc.php")) {
    die("no access");
}
require_once $base_path . '/includes/templates/demandes.tpl.php';
require_once $base_path . '/classes/demandes.class.php';
require_once $base_path . '/classes/demandes_action.class.php';
print "<script type='text/javascript' src='./includes/javascript/http_request.js'></script>\n<script type='text/javascript' src='./includes/javascript/demandes.js'></script>";
$demandes = new demandes();
$demandes_action = new demandes_action($iddemande);
switch ($sub) {
    case 'see_action':
        print $demandes_action->show_list_actions();
        break;
    default:
        $demandes->show_list($idetat);
        break;
}