Jump to content

zioarnold

Members
  • Posts

    6
  • Joined

  • Last visited

Posts posted by zioarnold

  1. <style type="text/css">
        .label {
            background-color: #d1dade;
            color: #5e5e5e;
            font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
            font-size: 10px;
            font-weight: 600;
            padding: 3px 8px;
            text-shadow: none;
        }
    
        .badge {
            background-color: #d1dade;
            color: #5e5e5e;
            font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
            font-size: 11px;
            font-weight: 600;
            padding-bottom: 4px;
            padding-left: 6px;
            padding-right: 6px;
            text-shadow: none;
        }
    
        .label-primary,
        .badge-primary {
            background-color: #1ab394;
            color: #FFFFFF;
        }
    
        .label-success,
        .badge-success {
            background-color: #1c84c6;
            color: #FFFFFF;
        }
    
        .label-warning,
        .badge-warning {
            background-color: #f8ac59;
            color: #FFFFFF;
        }
    
        .label-warning-light,
        .badge-warning-light {
            background-color: #f8ac59;
            color: #ffffff;
        }
    
        .label-danger,
        .badge-danger {
            background-color: #ed5565;
            color: #FFFFFF;
        }
    
        .label-info,
        .badge-info {
            background-color: #23c6c8;
            color: #FFFFFF;
        }
    
        .label-inverse,
        .badge-inverse {
            background-color: #262626;
            color: #FFFFFF;
        }
    
        .label-white,
        .badge-white {
            background-color: #FFFFFF;
            color: #5E5E5E;
        }
    
        .label-white,
        .badge-disable {
            background-color: #2A2E36;
            color: #8B91A0;
        }
    </style>
    <script> $('#myCarousel').carousel({interval: 3000})</script>
    <div id="myCarousel" class="carousel">
        <ol class="carousel-indicators" style="visibility: hidden">
            <li data-target="#myCarousel" data-slider-to="0" class="active"></li>
            <li data-target="#myCarousel" data-slider-to="1"></li>
        </ol>
        <div class="carousel-inner">
            <div class="item">
                <!---->
                <div class="wrapper wrapper-content animated fadeInRight">
                    <div class="row">
                        <div class="col-lg-12">
                            <div class="ibox float-e-margins">
                                <h2><strong>Processi Schedulatori Non Completati</strong></h2>
                                <div class="ibox-content">
                                    <table class="footable table table-stripped default breakpoints" #scheduler>
                                        <thead>
                                        <tr>
                                            <th class="footable-visible footable-first-column footable-sortable">
                                                Mappa<span
                                                    class="footable-sort-indicator"></span></th>
                                            <th class="footable-visible  footable-sortable">Conteggio<span
                                                    class="footable-sort-indicator"></span></th>
                                            <th class="footable-visible  footable-sortable">Data<span
                                                    class="footable-sort-indicator"></span></th>
                                            <th class="footable-visible footable-last-column footable-sortable">
                                                Stato<span
                                                    class="footable-sort-indicator"></span></th>
                                        </tr>
                                        </thead>
                                        <tbody>
                                        <tr *ngFor="let monitor of schedulerList; let scheduList = index;"
                                            style="display: table-row;">
                                            <td class="footable-visible footable-first-column">{{monitor.mappa}}</td>
                                            <td class="footable-visible">{{monitor.conteggio}}</td>
                                            <td class="footable-visible">{{monitor.dataCreazione | date: 'dd/MM/yyyy'}}</td>
                                            <td class="footable-visible">
                                                <span [ngClass]="{'label label-danger': monitor.stato=='ERROR'}||
                                                                {'label label-primary':monitor.stato =='RUNNING'}||
                                                        {'label label-success':monitor.stato=='READY'}">{{monitor.stato}}
                                                </span>
                                            </td>
                                        </tr>
                                        </tbody>
                                    </table>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
                <!---->
            </div>
            <div class="item active">
                <!---->
                <div class="wrapper wrapper-content animated fadeInRight">
                    <div class="row">
                        <div class="col-lg-12">
                            <div class="ibox float-e-margins">
                                <h2><strong>Monitor Conservazione</strong></h2>
                                <div class="ibox-content">
                                    <table class="footable table table-stripped default breakpoints" #openreports>
                                        <thead>
                                        <tr>
                                            <th class="footable-visible footable-first-column footable-sortable">
                                                Cliente<span
                                                    class="footable-sort-indicator"></span></th>
                                            <th class="footable-visible  footable-sortable">
                                                Totale<span
                                                    class="footable-sort-indicator"></span></th>
                                            <th class="footable-visible  footable-sortable">
                                                Data Creazione<span
                                                    class="footable-sort-indicator"></span></th>
                                            <th class="footable-visible footable-last-column footable-sortable">
                                                Giorni<span
                                                    class="footable-sort-indicator"></span></th>
                                        </tr>
                                        </thead>
                                        <tbody>
                                        <tr *ngFor="let reports of openReportsList; let reportsList = index;"
                                            style="display: table-row;">
                                            <td class="footable-visible footable-first-column">{{reports.cliente}}</td>
                                            <td class="footable-visible">{{reports.totale}}</td>
                                            <td class="footable-visible">{{reports.dataCreazione | date: 'dd/MM/yyyy'}}</td>
                                            <td class="footable-visible footable-last-column">{{reports.giorni}}</td>
                                        </tr>
                                        </tbody>
                                    </table>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
                <!---->
            </div>
        </div>
        <a href="#myCarousel" class="carousel-control right" data-slide="next">
            <span class="icon-next"></span>
        </a>
        <a href="#myCarousel" class="carousel-control left" data-slide="prev">
            <span class="icon-prev"></span>
        </a>
    </div>
    
    
    

    Greetings friends, I have this templateUrl. The problem consist on page loading...

    So when I try to comment openResultsList the shedulerList shows data correctly.

    When I try to use both list to show, it show nothing...

     

    In addition openResultsList it has an array from different url (that return json array) instead of schedulerList

    import {Component, ViewChild, ElementRef, AfterViewInit} from "@angular/core";
    import {SchedulerService} from "./scheduler.service";
    import {SearchResult} from "../utils/search.result";
    
    declare var $: any;
    
    @Component({
        moduleId: module.id,
        selector: 'monitor-scheduler',
        templateUrl: 'scheduler-page.component.html'
    })
    export class SchedulerPageComponent implements AfterViewInit {
        schedulerList: SearchResult = new SearchResult();
        openReportsList: SearchResult = new SearchResult();
        constructor(private schedulerService: SchedulerService) {
    
            this.schedulerService.getScheduleList().then(
                result => this.schedulerList = result,
                error => console.log(error));
    
            this.schedulerService.getAllOpenReports().then(
                res => this.openReportsList = res,
                error => console.log(error));
        }
    
        @ViewChild('scheduler') scheduler: ElementRef;
        @ViewChild('openreports') openreports: ElementRef;
    
        ngAfterViewInit() {
    
            $(this.scheduler.nativeElement).footable();
            $(this.openreports.nativeElement).footable();
        }
    }
    
    

    In above type script file, the result and res are initialized... Ok.

    What I doing wrong?

  2. FIXED Thanks!

    SELECT
       PE.nome_paziente AS Nome,
       PE.cognome_paziente AS Cognome,
       PE.indirizzo_paziente AS Indirizzo,
       PE.data_nascita_paziente AS DataNascita,
       E.descrizione AS NomeEsame,
       PE.data_esame AS DataEsame,
       PE.ora_esame AS OraEsame,
       U.tipo_urgenza AS NomeUrgenza,
       O.nome_ospedale AS NomeOpsedale 
    FROM
       prenota_esame AS PE
    LEFT JOIN
       esame as E
          ON E.id_esame = PE.cod_esame
    LEFT JOIN
       urgenza as U
         ON U.id_urgenza = PE.cod_urgenza  
    LEFT JOIN
       ospedale as O
         ON O.id_ospedale = PE.cod_ospedale
    ORDER BY
       id_prenotazione  DESC LIMIT 1
    
  3. Greetings what's wrong with this script ?

    SELECT
      PE.nome_paziente         AS Nome,
      PE.cognome_paziente      AS Cognome,
      PE.indirizzo_paziente    AS Indirizzo,
      PE.data_nascita_paziente AS DataNascita,
      E.descrizione            AS NomeEsame,
      PE.data_esame            AS DataEsame,
      PE.ora_esame             AS OraEsame,
      U.tipo_urgenza           AS NomeUrgenza,
      O.nome_ospedale          AS NomeOpsedale
    FROM
      prenota_esame PE,
      esame E,
      urgenza U,
      ospedale O
        INNER JOIN esame E
          ON PE.cod_esame = E.id_esame
        INNER JOIN urgenza U
          ON PE.cod_urgenza = U.id_urgenza
        INNER JOIN ospedale O
          ON PE.cod_ospedale = O.id_ospedale
    ORDER BY
      id_prenotazione DESC
    LIMIT 1;
    

    Here below u see the DB Dictionary...

    post-199207-0-03198900-1465658278_thumb.png

    post-199207-0-16843000-1465658280_thumb.png

  4. Greetings collegues,

    having these codes below:

    This reading the data from MySQL DB and fill it on select (don't screw the teachers are pretending to use this method)
    The next one is the query. The problem is if I try to select for example 2016. In my phpMyAdmin database I retrieve the value 2032. So to select some data I need to make some difference about 16 - and it works. THe problem is the registration. When I try to insert a new user (student whatever it is) and if I select 1985 on my DB results 0000, meanwhile the insert something anno_maturita = $casellaAnnoScolastico - 16 (it works).

    <select name="casellaAnnoScolastico" title="Anno Maturità">
                                <?php
                                include "../connect/connetti.php";
                                $conn = new mysqli("localhost", "root", "", "archivio_studenti");
                                echo '<option value="none">Nessuno</option>';
                                $query = "SELECT ID, anno
                                  FROM annoscolastico
                                  ORDER BY ID ASC ";
                                $result = mysqli_query($conn, $query);
                                while ($row = $result->fetch_assoc()) {
                                    unset($id, $name);
                                    $id = $row['ID'];
                                    $anno = $row['anno'];
                                    echo '<option value="' . $id . '">' . $anno . '</option>';
                                }
                                ?>
                            </select>
    
    $query = "INSERT INTO utenti_studenti (nome, cognome, password ,via_piazza,n_civico,cap,
    localita, anno_maturita, voto_maturita, email, telefono , confermato, cod_azienda)
    			  VALUES ('$nome','$cognome','$password','$via_piazza','$n_civico','$codice_cap',
    			  '$comune','$casellaAnnoScolastico'-16,'$votoMaturita','$email','$telefono', 1, '$casellaAzienda')";
    $risultato = mysqli_query(new mysqli("localhost", "root", "", "archivio_studenti"),
        $query);
    INSERT INTO utenti_studenti (nome, cognome, password, via_piazza, n_civico, cap,
                                 localita, anno_maturita, voto_maturita, email, telefono,
                                 confermato, cod_indirizzo_studio, cod_azienda, cod_facolta)
    VALUES('phpstorm', 'jetbrains', 123123123, 'via', '15', 151515, 'Munchen', '2016'-16, 100, 'email@email.it', 393462133945, 0, NULL,
       NULL, NULL);
    
    
  5. <?php
    include "connetti.php";
    session_start();
    $query = "SELECT id_studente, nome, cognome, anno_maturita, voto_maturita
     		  FROM utenti_studenti
     		  WHERE utenti_studenti.confermato = 0";
    $risultato = @mysql_query($query);
    if (mysql_num_rows($risultato) == 0) {
        echo("Nessun elemento trovato");
        header("refresh:3;url=AreaAmministratore.phtml");
        exit();
    } ?>
    <html>
    <head>
        <title>Annuario Studenti</title>
        <link rel="stylesheet" href="cssUtils/aggiungi_properties.css"/>
        <script type="text/javascript" src="jsUtils/jsUtils_annuario/annuario_properties.js"></script>
    </head>
    <body>
    <form method='post' action='confermaStudenti.php' name='aggiornaStatoStudente'>
        <div align='center'>
            <table class='tg'>
                <tr>
                    <th class='tg' style='color: #000;'>ID</th>
                    <th class='tg' style='color: black'>Nome</th>
                    <th class='tg' style='color: black'>Cognome</th>
                    <th class='tg' style='color: black'>Anno Maturita</th>
                    <th class='tg' style='color: black'>Voto Maturita</th>
                    <th class='tg' style='color: black'>Accetta</th>
                </tr><?php
                while ($row = @mysql_fetch_assoc($risultato)) {
                    echo "
                <tr align='center'>
                    <td class='tg' style='color: black'>" . $row['id_studente'] . "</td>
                    <td class='tg' style='color: black'>" . $row['nome'] . "</td>
                    <td class='tg' style='color: black'>" . $row['cognome'] . "</td>
                    <td class='tg' style='color: black'>" . $row['anno_maturita'] . "</td>
                    <td class='tg' style='color: black'>" . $row['voto_maturita'] . "</td>
                    <td class='tg' style='color: black'>" . "<input type=\"hidden\" name=\"rifiuta\"/><input type=\"checkbox\" name=\"accetta\"/>" . "</td>
                </tr>";
                } ?>
            </table>
        </div>
    
        <div align='center'>
            <a href='AreaAmministratore.phtml'>Torna indietro.</a>
            <input type='submit' value='Prosegui'/>
        </div>
    </form>
    </html>
    
    
    <?php
    session_start();
    include("connetti.php");
    if (isset($_POST["accetta"])) {
        $accetta = 1;
    } else {
        $accetta = 0;
    }
    if ($accetta) {
        $cognome = $_POST['cognome'];
        $nome = $_POST['nome'];
        $id_studente = $_POST['id_studente'];
        $query = "UPDATE utenti_studenti SET confermato='1' WHERE nome='$nome'
    AND cognome='$cognome'
    AND id_studente='$id_studente'";
    
        $risultato = @mysql_query($query) or die('<p align="center">Errore!</p>' . mysql_error());
        echo("<script>alert('La modifica eseguita')</script>");
        header("refresh:0;url='AreaAmministratore.phtml'");
    } else {
        echo "<script>alert('Errore');</script>";
        header("refresh:0;url='AreaAmministratore.phtml'");
        exit();
    }
    ?>
    

    Greetings guys, could you help me with those codes above? Cuz I can't understand why it doesn't work...

     

    So I have an table with the users that not confirmed. So to confirm them I've made checkbox, so on the other side I have a control if the checkbox is checked so I need to update some values on my database right ?

    Well it doesn't work.... :(

×
×
  • Create New...