}
    $pdf->SetTextColor(0);
    $pdf->Ln();
}
//-----------------------------------------------------
// Follow_Up
$pdf->SetFont('DejaVu', 'B', 9);
$pdf->Cell(0, 7, 'Accès action', 1, 0, 'C');
$pdf->Ln();
$pdf->SetFont('DejaVu', '', 6);
$Res = $cn->exec_sql("select ac_id, ac_description from action   order by ac_description ");
$Max = Database::num_row($Res);
for ($i = 0; $i < $Max; $i++) {
    $l_line = Database::fetch_array($Res, $i);
    $pdf->Cell(90, 6, $l_line['ac_description']);
    $right = $SecUser->check_action($l_line['ac_id']);
    switch ($right) {
        case 0:
            $pdf->SetTextColor(255, 0, 34);
            $pdf->Cell(30, 6, "Pas d'accès");
            break;
        case 1:
        case 2:
            $pdf->SetTextColor(54, 233, 0);
            $pdf->Cell(30, 6, "Accès");
            break;
    }
    $pdf->SetTextColor(0);
    $pdf->Ln();
}
$fDate = date('dmy-HI');
Beispiel #2
0
     $dom->appendChild($tl_id);
     echo $dom->saveXML();
     return;
 }
 $todo = new Todo_List($cn);
 $todo->set_parameter("id", $id);
 $todo->load();
 if ($g_user->login != $todo->get_parameter("owner")) {
     header('Content-type: text/xml; charset=UTF-8');
     $dom = new DOMDocument('1.0', 'UTF-8');
     $tl_id = $dom->createElement('content', _("Cette note n'est pas à vous"));
     $dom->appendChild($tl_id);
     echo $dom->saveXML();
     return;
 }
 if ($g_user->check_action(SHARENOTE) == 0) {
     header('Content-type: text/xml; charset=UTF-8');
     $dom = new DOMDocument('1.0', 'UTF-8');
     $tl_id = $dom->createElement('content', _("Accès interdit"));
     $dom->appendChild($tl_id);
     echo $dom->saveXML();
     return;
 }
 ob_start();
 echo HtmlInput::title_box(_('Liste utilisateurs'), "shared_" . $id);
 $todo->display_user();
 echo '<p style="text-align:center">';
 echo HtmlInput::submit('close' . $id, 'Ferme', " onclick=\"\$('shared_{$id}').remove();\"");
 echo '</p>';
 $result = ob_get_clean();
 //
Beispiel #3
0
require_once NOALYSS_INCLUDE . '/class_database.php';
require_once NOALYSS_INCLUDE . '/ac_common.php';
require_once NOALYSS_INCLUDE . '/class_document.php';
require_once NOALYSS_INCLUDE . '/class_dossier.php';
$gDossier = dossier::id();
$cn = new Database($gDossier);
$action = isset($_REQUEST['a']) ? $_REQUEST['a'] : 'sh';
require_once NOALYSS_INCLUDE . '/class_user.php';
global $g_user;
$g_user = new User($cn);
$g_user->Check();
$g_user->check_dossier($gDossier);
set_language();
/* Show the document */
if ($action == 'sh') {
    if ($g_user->check_action(VIEWDOC) == 1) {
        // retrieve the document
        $doc = new Document($cn, $_REQUEST['d_id']);
        $doc->Send();
    }
}
/* remove the document */
if ($action == 'rm') {
    $json = '{"d_id":"-1"}';
    if ($g_user->check_action(RMDOC) == 1) {
        $doc = new Document($cn, $_REQUEST['d_id']);
        $doc->remove();
        $json = sprintf('{"d_id":"%s"}', $_REQUEST['d_id']);
    }
    header("Content-type: text/html; charset: utf8", true);
    print $json;
Beispiel #4
0
    fwrite($file_loginput, ";\n");
    fwrite($file_loginput, '$_POST[\'gDossier\']=$gDossierLogInput;');
    fwrite($file_loginput, "\n");
    fwrite($file_loginput, '$_GET[\'gDossier\']=$gDossierLogInput;');
    fwrite($file_loginput, "\n");
    fwrite($file_loginput, ' $_REQUEST=array_merge($_GET,$_POST);');
    fwrite($file_loginput, "\n");
    fwrite($file_loginput, "include '" . basename(__FILE__) . "';\n");
    fclose($file_loginput);
}
switch ($op) {
    /* ------------------------------------------------------------ */
    /* Remove a attribut */
    /* ------------------------------------------------------------ */
    case 'rmfa':
        if ($g_user->check_action(FICCAT) == 0) {
            exit;
        }
        ob_start();
        if (!isset($_GET['ad_id']) || isNumber($_GET['ad_id']) == 0) {
            throw new Exception(_("Parametre ad_id est invalide"), 11);
        }
        $ad_id = $_GET['ad_id'];
        try {
            $cn->start();
            $fa = new Fiche_Attr($cn, $ad_id);
            $fa->delete();
            $cn->commit();
        } catch (Exception $e) {
            $cn->rollback();
            echo $e->getMessage();
Beispiel #5
0
        $html = escape_xml($html);
        header('Content-type: text/xml; charset=UTF-8');
        echo <<<EOF
<?xml version="1.0" encoding="UTF-8"?>
<data>
<code>{$html}</code>
</data>
EOF;
        break;
        /* rem a cat of document */
    /* rem a cat of document */
    case 'rem_cat_doc':
        require_once NOALYSS_INCLUDE . '/class_document_type.php';
        // if user can not return error message
        $message = "";
        if ($g_user->check_action(PARCATDOC) == 0) {
            $html = "nok";
            $message = _('Action non autorisée');
            header('Content-type: text/xml; charset=UTF-8');
            echo <<<EOF
<?xml version="1.0" encoding="UTF-8"?>
<data>
<dtid>{$html}</dtid>
<message>{$message}</message>                                
</data>
EOF;
            return;
        }
        // remove the cat if no action
        $count_md = $cn->get_value('select count(*) from document_modele where md_type=$1', array($dt_id));
        $count_a = $cn->get_value('select count(*) from action_gestion where ag_type=$1', array($dt_id));
Beispiel #6
0
    echo <<<EOF
<?xml version="1.0" encoding="UTF-8"?>
<data>
<ctl>{$div}</ctl>
<code>{$html}</code>
</data>
EOF;
    exit;
}
$html = var_export($_REQUEST, true);
switch ($action) {
    ///////////////////////////////////////////////////////////////////////////
    //  remove op
    ///////////////////////////////////////////////////////////////////////////
    case 'rmop':
        if ($access == 'W' && $g_user->check_action(RMOPER) == 1) {
            ob_start();
            /* get the ledger */
            try {
                $cn->start();
                $oLedger = new Acc_Ledger($cn, $ledger);
                $oLedger->jr_id = $_REQUEST['jr_id'];
                $oLedger->delete();
                $cn->commit();
                echo _("Opération Effacée");
            } catch (Exception $e) {
                $e->getMessage();
                $cn->rollback;
            }
            $html = ob_get_contents();
            ob_end_clean();