Пример #1
0
    echo "<tr id='blankDipRow' class='nascosto'>";
    echo "<td><input type='text' id='FETCHmatUtente' class='defwidth' value=''></td>";
    echo "<td><input type='text' id='DIPcognomeUtente' class='defwidth' value=''></td>";
    echo "<td><input type='text' id='DIPnomeUtente' class='defwidth' value=''></td>";
    echo "<td><button id='ADDdip' class='btn btn-sm btn-success DIP-CD'>ADD</button></td>";
    echo "<td><button id='DELdip' class='btn btn-sm btn-warning DIP-CD'>DEL</button></td>";
    echo "</tr>";
    echo "<tr id='DipRow'>";
    echo "<td><input type='text' id='FETCHmatUtente' class='defwidth' value=''></td>";
    echo "<td><input type='text' id='DIPcognomeUtente' class='defwidth' value=''></td>";
    echo "<td><input type='text' id='DIPnomeUtente' class='defwidth' value=''></td>";
    echo "<td><button id='ADDdip' class='btn btn-sm btn-success DIP-CD'>ADD</button></td>";
    echo "<td><button id='DELdip' class='btn btn-sm btn-warning DIP-CD'>DEL</button></td>";
    echo "</tr>";
    echo "</tbody>\n          </table>\n          <button id='newRow' class='btn btn-md btn-success'>Add Row</button>\n          </div>";
    stampaHintDiv();
}
if (isset($_POST['editDIP'])) {
    echo "\n    <ul>\n    <li id='filter'><button class='btn btn-info btn-sm' data-toggle='collapse' data-target='#filters'>CERCA DIPENDENTE PER:</button></li>\n               <li>\n                  <ul id='filters' class='collapse'>\n                    <li>\n                        <div class='form-group'>\n                        <label for='cercaXmatricola'>Matricola</label><br>\n                        <input id='cercaXmatricola' class='filtro' type='text' value='' data-toggle='tooltip' data-placement='bottom' title='Inserisci la matricola'>\n                        <button id='cercaDIPXmatricolaButton' class='btn btn-xs btn-info buttonFilter'>GO</button>\n                        </div>\n                    </li>   \n                    <li>\n                        <div class='form-group'>\n                        <label for='cercaXcognome'>Cognome</label><br>\n                        <input id='cercaXcognome' type='text'class='filtro' value='' data-toggle='tooltip' data-placement='bottom' title='Inserisci il cognome'>\n                        <button id='cercaXcognomeButton' class='btn btn-xs btn-info buttonFilter'>GO</button>\n                        </div>\n                    </li>\n                  </ul>\n                 </li>\n    </ul>\n   ";
}
if (isset($_POST['newTYPE'])) {
    echo "\n        <div id='newType' class='table-responsive'>\n                          <table class='table'>\n                             <thead>\n                                 <tr>\n                                 <th>DESCRIZIONE</th><th>+</th><th>-</th>\n                                 </tr>\n                             </thead>\n                             <tbody>";
    echo "<tr id='blankTypeRow' class='nascosto'>";
    echo "<td><input type='text' id='description' class='' value=''></td>";
    echo "<td><button id='ADDtype' class='btn btn-sm btn-success TYPE-CD'>ADD</button></td>";
    echo "<td><button id='DELtype' class='btn btn-sm btn-warning TYPE-CD'>DEL</button></td>";
    echo "</tr>";
    echo "<tr id='typeRow'>";
    echo "<td><input type='text' id='description' class='' value=''></td>";
    echo "<td><button id='ADDtype' class='btn btn-sm btn-success TYPE-CD'>ADD</button></td>";
    echo "<td><button id='DELtype' class='btn btn-sm btn-warning TYPE-CD'>DEL</button></td>";
Пример #2
0
 public function stampaImacDaParametroXedit($token, $param)
 {
     if ($param == 'protocollo') {
         $query = "SELECT im.nProtocollo,im.ticket,im.matUtente,im.stato,dip.cognome,dip.nome AS nome,im.tipoRichiesta,tipo.nome AS descrizione,im.pathFile,im.note,im.dataApertura \n                        FROM imac AS im JOIN dipendenti AS dip ON im.matUtente=dip.matricola JOIN tipo_richiesta AS tipo ON im.tipoRichiesta=tipo.id  WHERE im.nProtocollo='" . $token . "' ORDER BY im.nProtocollo DESC";
     } else {
         if ($param == 'ticket') {
             $query = "SELECT im.nProtocollo,im.ticket,im.matUtente,im.stato,dip.cognome,dip.nome AS nome,im.tipoRichiesta,tipo.nome AS descrizione,im.pathFile,im.note,im.dataApertura\n                        FROM imac AS im JOIN dipendenti AS dip ON im.matUtente=dip.matricola JOIN tipo_richiesta AS tipo ON im.tipoRichiesta=tipo.id WHERE im.ticket='" . $token . "' ORDER BY im.nProtocollo DESC";
         } else {
             if ($param == 'matricola') {
                 $query = "SELECT im.nProtocollo,im.ticket,im.matUtente,im.stato,dip.cognome,dip.nome AS nome,im.tipoRichiesta,tipo.nome AS descrizione,im.pathFile,im.note,im.dataApertura\n                        FROM imac AS im JOIN dipendenti AS dip ON im.matUtente=dip.matricola JOIN tipo_richiesta AS tipo ON im.tipoRichiesta=tipo.id WHERE im.matUtente='" . $token . "' ORDER BY im.nProtocollo DESC";
             }
         }
     }
     if (!($res = $this->DBconn->query($query))) {
         echo $this->DBconn->error;
     } else {
         if ($res->num_rows >= 1) {
             $option = new TIPO();
             echo "<div id='imacListEdit' class='table-responsive'>\n                          <table class='table'>\n                             <thead>\n                                 <tr>\n                                 <th>PROTOCOLLO</th><th>TICKET</th><th>MATRICOLA</th><th>COGNOME,NOME</th><th>STATO</th><th>TIPO</th><th>NOTE</th><th>FILE</th><th>New File</th><th>DATA</th><th>EDIT</th><th>DEL</th>\n                                 </tr>\n                             </thead>\n                             <tbody>";
             while ($row = $res->fetch_assoc()) {
                 echo "<tr>";
                 echo "<td><span class='NPROTOCOLLO' id='nProtocollo'>" . $row['nProtocollo'] . "</span></td>";
                 echo "<td><input type='text' class='TICKET numero' id='ticket' value='" . $row['ticket'] . "'></td>";
                 echo "<td><input type='text' class='MATRICOLA' id='matricola' value='" . $row['matUtente'] . "'></td>";
                 echo "<td><input type='text' class='COGNOME,NOME' id='cognome_nome' value='" . $row['cognome'] . "," . $row['nome'] . "'></td>";
                 echo "<td>";
                 $this->stampaStatoCombo($row['stato']);
                 echo "</td>";
                 //echo "<td><span class='STATO' id='stato'>".$row['stato']."</span></td>";
                 echo "<td>";
                 $option->stampaSelectedComboType($row['tipoRichiesta']);
                 echo "</td>";
                 //echo "<td><span class='TIPO' id='tipo'>".$row['descrizione']."</span></td>";
                 echo "<td><input type='text' class='' id='note' value='" . $row['note'] . "'></td>";
                 if ($row['pathFile'] != '') {
                     echo "<td><button class='PATHFILE btn btn-sm btn-info' id='" . $row['nProtocollo'] . "'>--></button>";
                 } else {
                     echo "<td><button class='noFILE btn btn-sm btn-danger disabled'>X</button></td>";
                 }
                 echo "<td><button class='addPATHFILE btn btn-sm btn-info' id='addNewFile'>ADD new file</button><span class='nascosto newFileUppato'></span></td>";
                 //echo "<td><a class='PATHFILE' id='pathfile' href='#".$row['pathFile']."'>".$row['pathFile']."</a></td>";
                 //
                 echo "<td><input type='text' id='FETCHdata' class='DATA' value='" . $row['dataApertura'] . "'></td>";
                 echo "<td><button id='EDITimac' class='btn btn-sm btn-success IMAC-CD'>V</button></td>";
                 echo "<td><button id='DELimac' class='btn btn-sm btn-danger IMAC-CD'>X</button></td>";
                 echo "</tr>";
             }
             echo "</tbody>\n                          </table>\n                          </div>";
             stampaHintDiv();
         } else {
             echo "<span class='alert alert-danger'>Nessun risultato per il filtro impostato!</span>";
         }
     }
 }