Torna indietro   Hardware Upgrade Forum > Software > Programmazione

Marvel's Wolverine, la recensione: Logan torna protagonista in un'avventura brutale e intensa
Marvel's Wolverine, la recensione: Logan torna protagonista in un'avventura brutale e intensa
Marvel's Wolverine porta Logan in un'avventura inedita, violenta e fortemente narrativa, costruita attorno alla sua natura di combattente e al difficile rapporto con il proprio passato. Insomniac Games punta su combattimenti spettacolari, progressione e personalizzazione, inserendo l'azione in un mondo segnato dalla persecuzione dei mutanti. Un viaggio intenso, che alterna mattanza, esplorazione e momenti sorprendentemente emotivi.
DJI Romo 2: tante novità lo rendono un robot completo
DJI Romo 2: tante novità lo rendono un robot completo
Romo 2 è la seconda generazione di robot lavapavimenti di DJI, un modello che si caratterizza per la precisione nel sistema di navigazione e per il funzionamento particolarmente silenzioso. Con le modifiche introdotte in questa seconda versione, e un posizionamento di prezzo più allineato alla concorrenza, rappresenta una valida alternativa sul mercato delle soluzioni di pulizia domestica
Sony Bravia 9 II: il True RGB alla prova, dove l'LCD sfida l'OLED
Sony Bravia 9 II: il True RGB alla prova, dove l'LCD sfida l'OLED
Il primo Sony con retroilluminazione True RGB alla prova del banco di misura e dei contenuti: luminanza enorme, colori accurati in HDR e un antiriflesso molto efficace. I limiti sono due sole HDMI 2.1 e il blooming fuori asse
Tutti gli articoli Tutte le news

Vai al Forum
Rispondi
 
Strumenti
Old 28-04-2016, 09:35   #1
zebmckey
Member
 
Iscritto dal: Apr 2016
Messaggi: 72
[php] turno lavoratori

Salve gente,
vorrei creare un programmino che mi dia la possibilità di fare i servizi. Vorrei che le persone vengano inserite nei turni in base al giorno della settimana. Mi spiego: i turni sono: feriali (dal lunedi al giovedi), turno del venerdi, turno del sabato, turno festivo. Chiaramente le persone vanno inserite per anzianità, e tra un servizio ed un'altro devono passare 4 giorni almeno.
Le tabelle le ho già fatte, il form per inserite gli utenti che faranno i servizi anche. Mi sono bloccato su come fare:
1 - creare la suddivisone delle date;
2 - creare la query che mi da come risultato la persona che monta quel giorno.
Chi avesse voglia di darmi un'aiuto possiamo creare un gruppo di lavoro. posso rendere tutto disponibile e sarà tutto opensource.
Grazie

Ultima modifica di zebmckey : 28-04-2016 alle 09:56.
zebmckey è offline   Rispondi citando il messaggio o parte di esso
Old 02-05-2016, 14:39   #2
zebmckey
Member
 
Iscritto dal: Apr 2016
Messaggi: 72
Chiedo scusa se solo oggi mi faccio risentire, ma per problemi non mi è stato possibile.
Il sistema è su Centos 6
httpd-2.2.15-47.el6.centos.4.x86_64
mysql-5.1.73-5.el6_7.1.x86_64
php-5.3.3-46.el6_7.1.x86_64

di seguito il database
Codice:
-- MySQL dump 10.13  Distrib 5.1.73, for redhat-linux-gnu (x86_64)
--
-- Host: localhost    Database: servizi
-- ------------------------------------------------------
-- Server version	5.1.73

/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;

--
-- Table structure for table `assenze`
--

DROP TABLE IF EXISTS `assenze`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `assenze` (
  `id_assenza` int(11) NOT NULL AUTO_INCREMENT,
  `id_utente` int(11) NOT NULL,
  `tipo` varchar(45) DEFAULT NULL,
  `data_da` date DEFAULT NULL,
  `data_al` date DEFAULT NULL,
  PRIMARY KEY (`id_assenza`),
  KEY `utente_ind` (`id_utente`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `assenze`
--

LOCK TABLES `assenze` WRITE;
/*!40000 ALTER TABLE `assenze` DISABLE KEYS */;
/*!40000 ALTER TABLE `assenze` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `grado`
--

DROP TABLE IF EXISTS `grado`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `grado` (
  `id_grado` int(11) NOT NULL AUTO_INCREMENT,
  `grado` varchar(45) DEFAULT NULL,
  PRIMARY KEY (`id_grado`)
) ENGINE=InnoDB AUTO_INCREMENT=24 DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `grado`
--

LOCK TABLES `grado` WRITE;
/*!40000 ALTER TABLE `grado` DISABLE KEYS */;
/*!40000 ALTER TABLE `grado` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `recupero`
--

DROP TABLE IF EXISTS `recupero`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `recupero` (
  `id_recupero` int(11) NOT NULL AUTO_INCREMENT,
  `id_grado` int(11) NOT NULL,
  `id_utente` int(11) NOT NULL,
  `id_servizio` int(11) NOT NULL,
  `dataservizio` date DEFAULT NULL,
  PRIMARY KEY (`id_recupero`),
  KEY `utente_ind` (`id_utente`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `recupero`
--

LOCK TABLES `recupero` WRITE;
/*!40000 ALTER TABLE `recupero` DISABLE KEYS */;
/*!40000 ALTER TABLE `recupero` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `tipo_servizio`
--

DROP TABLE IF EXISTS `tipo_servizio`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `tipo_servizio` (
  `id_servizio` int(11) NOT NULL AUTO_INCREMENT,
  `servizio` varchar(45) DEFAULT NULL,
  PRIMARY KEY (`id_servizio`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `tipo_servizio`
--

LOCK TABLES `tipo_servizio` WRITE;
/*!40000 ALTER TABLE `tipo_servizio` DISABLE KEYS */;
/*!40000 ALTER TABLE `tipo_servizio` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `turno1fes`
--

DROP TABLE IF EXISTS `turno1fes`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `turno1fes` (
  `id_t1` int(11) NOT NULL AUTO_INCREMENT,
  `id_grado` int(11) NOT NULL,
  `id_utente` int(11) NOT NULL,
  `id_servizio` int(11) NOT NULL,
  `data` date DEFAULT NULL,
  PRIMARY KEY (`id_t1`),
  KEY `utente_ind` (`id_utente`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `turno1fes`
--

LOCK TABLES `turno1fes` WRITE;
/*!40000 ALTER TABLE `turno1fes` DISABLE KEYS */;
/*!40000 ALTER TABLE `turno1fes` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `turno2PF`
--

DROP TABLE IF EXISTS `turno2PF`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `turno2PF` (
  `id_t2` int(11) NOT NULL AUTO_INCREMENT,
  `id_grado` int(11) NOT NULL,
  `id_utente` int(11) NOT NULL,
  `id_servizio` int(11) NOT NULL,
  `data` date DEFAULT NULL,
  PRIMARY KEY (`id_t2`),
  KEY `utente_ind` (`id_utente`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `turno2PF`
--

LOCK TABLES `turno2PF` WRITE;
/*!40000 ALTER TABLE `turno2PF` DISABLE KEYS */;
/*!40000 ALTER TABLE `turno2PF` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `turno3V`
--

DROP TABLE IF EXISTS `turno3V`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `turno3V` (
  `id_t3` int(11) NOT NULL AUTO_INCREMENT,
  `id_grado` int(11) NOT NULL,
  `id_utente` int(11) NOT NULL,
  `id_servizio` int(11) NOT NULL,
  `data` date DEFAULT NULL,
  PRIMARY KEY (`id_t3`),
  KEY `utente_ind` (`id_utente`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `turno3V`
--

LOCK TABLES `turno3V` WRITE;
/*!40000 ALTER TABLE `turno3V` DISABLE KEYS */;
/*!40000 ALTER TABLE `turno3V` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `turno4fer`
--

DROP TABLE IF EXISTS `turno4fer`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `turno4fer` (
  `id_t4` int(11) NOT NULL AUTO_INCREMENT,
  `id_grado` int(11) NOT NULL,
  `id_utente` int(11) NOT NULL,
  `id_servizio` int(11) NOT NULL,
  `data` date DEFAULT NULL,
  PRIMARY KEY (`id_t4`),
  KEY `utente_ind` (`id_utente`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `turno4fer`
--

LOCK TABLES `turno4fer` WRITE;
/*!40000 ALTER TABLE `turno4fer` DISABLE KEYS */;
/*!40000 ALTER TABLE `turno4fer` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `turno5SF`
--

DROP TABLE IF EXISTS `turno5SF`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `turno5SF` (
  `id_t5` int(11) NOT NULL AUTO_INCREMENT,
  `id_grado` int(11) NOT NULL,
  `id_utente` int(11) NOT NULL,
  `id_servizio` int(11) NOT NULL,
  `data` date DEFAULT NULL,
  PRIMARY KEY (`id_t5`),
  KEY `utente_ind` (`id_utente`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `turno5SF`
--

LOCK TABLES `turno5SF` WRITE;
/*!40000 ALTER TABLE `turno5SF` DISABLE KEYS */;
/*!40000 ALTER TABLE `turno5SF` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `utente`
--

DROP TABLE IF EXISTS `utente`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `utente` (
  `id_utente` int(11) NOT NULL AUTO_INCREMENT,
  `id_grado` int(11) NOT NULL,
  `cognome` varchar(45) DEFAULT NULL,
  `nome` varchar(45) DEFAULT NULL,
  `anzianita` date NOT NULL,
  `id_servizio` int(11) NOT NULL,
  PRIMARY KEY (`id_utente`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `utente`
--

LOCK TABLES `utente` WRITE;
/*!40000 ALTER TABLE `utente` DISABLE KEYS */;
/*!40000 ALTER TABLE `utente` ENABLE KEYS */;
UNLOCK TABLES;
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;

/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;

-- Dump completed on 2016-05-02 13:49:58
al momento ho fatto solo i file per l'inserimento del personale
Le tabelle grado e servizio le devo ancora popolare.

Codice:
<html>
<body>
   <table width="420" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#CCCCCC">
   <tr>
   <form name="personale_form" method="post" action="act_utente.php">
   <td>
   <table width="100%" border="0" cellpadding="3" cellspacing="1" bgcolor="#FFDEAD">

   <tr>
   <td colspan="4" style="text-align:center"><strong>Inserimento Dati </strong></td>
   </tr>

    <tr>
   <td>Grado</td>
   <td>:</td>
   <td style="width: 279px"><select name="mod_grado" >
   <option value="000" selected="selected">[Seleziona]</option>
   <optgroup label="Ufficiali">
   <option value="1">Gen.C.A. </option>
   <option value="2">Gen.Div. </option>
   <option value="3">Gen.B. </option>
   <option value="4">Col. </option>
   <option value="5">Ten.Col. </option>
   <option value="6">Magg. </option>
   <option value="7">Cap. </option>
   <option value="8">Ten. </option>
   <option value="9">S.Ten. </option>
   <optgroup label="Marescialli">
   <option value="10">1&deg Mar.Luogt. </option>
   <option value="11">1&deg Mar. </option>
   <option value="12">Mar.Ca. </option>
   <option value="13">Mar.Ord. </option>
   <option value="14">Mar. </option>
   <optgroup label="Sergenti">
   <option value="15">Serg.Magg.Ca. </option>
   <option value="16">Serg. Magg. </option>
   <option value="17">Serg. </option>
   <optgroup label="Truppa">
   <option value="18">C.le Magg.Ca.Sc. </option>
   <option value="19">C.le Magg.Ca. </option>
   <option value="20">C.le Magg.Sc. </option>
   <option value="21">1&deg C.le Magg. </option>
   <option value="22">C.le Magg. </option>
   <option value="23">C.le </option>
   </select>&nbsp;
   </td>
   </tr>


   <tr>
   <td>Cognome</td>
   <td>:</td>
   <td style="width: 279px"><input name="mod_cognome" type="text" id="mod_cognome">&nbsp;
   </td>
   </tr>

   <tr>
   <td>Nome</td>
   <td>:</td>
   <td style="width: 279px"><input name="mod_nome" type="text" id="mod_nome">&nbsp;
   </td>
   </tr>
   <tr>
   <td>Anzianita'</td>
   <td>:</td>
   <td style="width: 279px"><input name="mod_anz" type="data" id="mod_anz">&nbsp;
   </td>
   </tr>

   <tr>
   <td>Servizio</td>
   <td>:</td>
   <td style="width: 279px"><select name="mod_serv" >
   <option value="000" selected="selected">[Seleziona]</option>
   <option value="1">Ufficiale di ispezione</option>
   <option value="2">Ufficiale di picchetto</option>
   <option value="3">Sottufficiale di ispezione </option>
   <option value="4">Comandante della guardia</option>
   </select>&nbsp;
   </td>
   </tr>

   <td>&nbsp;</td>
   <td>&nbsp;</td>
   <td style="width: 279px" class="style1"><input type="submit" name="Submit" value="Inserisci"></td>
   <td>&nbsp;</td>
   </tr>
   </table>
   </table>
   <br>
   <br>

 </body>
</html>
Codice PHP:
<?php
include("dati.txt");
//variabili
   
$grado=$_POST['mod_grado'];
   
$cognome=$_POST['mod_cognome'];
   
$cognome=strtoupper($cognome);
   
$nome=$_POST['mod_nome'];
   
$nome=strtoupper($nome);
   
$anz=$_POST['mod_anz']
   
$servizio=$_POST['mod_serv']
   
$link=mysql_connect("$db_host","$db_login","$db_pass") or die ("Non riesco a connettermi a $db_host");

mysql_select_db ($database$link)
        or die (
"Non riesco a selezionare il db $database<br>");

$pers="INSERT INTO utente (id_utente, id_grado, cognome, nome) VALUES ('', '$grado', '$cognome', '$nome', '$anz', '$servizio')";
mysql_query ($pers$link)
        or die (
"Non riesco ad eseguire la query $pers");

                Echo 
"I Dati sono stati archiviati con successo nel DataBase $database";
mysql_close ($link);
?>
adesso in base al personale che inserirò devo creare una query che rispetti alcuni parametri, che sono:
1. chi non ha effettuato il servizio
2. tra chi non è montato mi dia un'ordine in base all'anzinità
3. se la data è festiva dal più anziano al più giovane, se feriale dal più giovane al più anziano.
La vedo dura intanto vado avanti e man mano metterò i vari aggiornamenti.
Grazie
zebmckey è offline   Rispondi citando il messaggio o parte di esso
Old 02-05-2016, 15:20   #3
les2
Senior Member
 
L'Avatar di les2
 
Iscritto dal: Mar 2001
Città: MI
Messaggi: 1801
ciao, ora è più facile poterti aiutare

di dove sei?
(se fossimo vicini diventerebbe ancora più facile)

Ciao
__________________
italiarec.com forum italiano di registrazione e mixaggio
estilocaballero.es ssdoptimizer.eu cambioeuro.eu doflamingo.com studiolegalesangalli.com stilegentiluomo.it italiarec.com italiarec.it arteincasa.it
les2 è offline   Rispondi citando il messaggio o parte di esso
Old 02-05-2016, 15:21   #4
les2
Senior Member
 
L'Avatar di les2
 
Iscritto dal: Mar 2001
Città: MI
Messaggi: 1801
hai già fatto un'analisi del tutto?
perchè noi sicuramente ti proporremmo soluzioni leggermente diverse
__________________
italiarec.com forum italiano di registrazione e mixaggio
estilocaballero.es ssdoptimizer.eu cambioeuro.eu doflamingo.com studiolegalesangalli.com stilegentiluomo.it italiarec.com italiarec.it arteincasa.it
les2 è offline   Rispondi citando il messaggio o parte di esso
Old 02-05-2016, 22:42   #5
zebmckey
Member
 
Iscritto dal: Apr 2016
Messaggi: 72
Quote:
Originariamente inviato da les2 Guarda i messaggi
hai già fatto un'analisi del tutto?
perchè noi sicuramente ti proporremmo soluzioni leggermente diverse
Io sono di Treviso. Se avete idee diverse ben vengano sviluppiamole insieme
zebmckey è offline   Rispondi citando il messaggio o parte di esso
Old 03-05-2016, 13:13   #6
zebmckey
Member
 
Iscritto dal: Apr 2016
Messaggi: 72
Ho apprtato degli aggiornamenti nel file sql , chiaramente ho dovuto modificare anche i file html e php.
turni-di-lavoro su github
zebmckey è offline   Rispondi citando il messaggio o parte di esso
Old 24-05-2016, 07:59   #7
zebmckey
Member
 
Iscritto dal: Apr 2016
Messaggi: 72
Continuo con il mio lavoretto ,anche se purtroppo a singhiozzi per carico lavorativo.
non riesco a risolvere un piccolo problema
Codice PHP:
// Gestione dell'output dati
echo "<table border=1>
        <tr><td>ID</td>
        <td>Grado</td>
        <td>Cognome</td>
        <td>Nome</td>
        <td>Data di Nascita </td>
        <td>Anzianita di grado</td>
        <td>Servizio</td>
        <td>Stato</td></tr>"
;
while(
$row mysql_fetch_array($resultMYSQL_ASSOC)){
        
$ID $row["id_utente"];
        
$grado $row["grado"];
        
$cognome $row["cognome"];
        
$nome $row["nome"];
        
$data_nascita $row["data_nascita"];
        
$anzianita $row["anzianita"];
        
$servizio $row["servizio"];
        
$esente $row["esente"];
        echo 
"<tr>";
        echo 
"<td>$ID</td>";
        echo 
"<td>$grado</td>";
        echo 
"<td>$cognome</td>";
        echo 
"<td>$nome</td>";
        echo 
"<td>$data_nascita</td>";
        echo 
"<td>$anzianita</td>";
        echo 
"<td>$servizio</td>";
//      echo "<td>$esente</td>";
if $esente=='A'{
        echo (
'<td><a href="motivoassenza.php?id=' $ID '">' $esente '</a></td>');
else 
$esente=='P'
        
echo "<td>$esente</td>";
              }
        echo 
"</tr>";
}

echo 
"</table>"
Vorrei che la variabile $esente sia visibile come collegamento solo se è uguale ad "A" se invece è "P" deve rimanere normale senza nessun link.
Chiaramente il codice sopra non funziona. Come posso fare?
zebmckey è offline   Rispondi citando il messaggio o parte di esso
Old 24-05-2016, 08:22   #8
zebmckey
Member
 
Iscritto dal: Apr 2016
Messaggi: 72
Ok risolto!
Codice PHP:
//      echo "<td>$esente</td>";
if ($esente == A){
        echo (
'<td><a href="motivoassenza.php?id=' $ID '">' $esente '</a></td>');
                }
/*else ($esente == P){
        echo "<td>$esente</td>";
                }
*/      
echo "</tr>";

togliendo "else" mi appare solo se il risultato della variabile è = ad "A" con il relativo link.
Questa può essere una soluzione. Se riesco a vedere anche la "P" non sarebbe male.
zebmckey è offline   Rispondi citando il messaggio o parte di esso
Old 25-05-2016, 14:50   #9
les2
Senior Member
 
L'Avatar di les2
 
Iscritto dal: Mar 2001
Città: MI
Messaggi: 1801
ciao Zeb, scusa il ritardo non ti ho più filato
riprendo il tuo precedente commento (stai sbagliando un pelo la sintassi):


if ('A'==$esente) {
echo ('<td><a href="motivoassenza.php?id=' . $ID . '">' . $esente . '</a></td>');
} else if ('P'==$esente) {
echo "<td>$esente</td>";
}


e attento alle parentesi, chiudile in line dove le apri altrimenti non si capisce
__________________
italiarec.com forum italiano di registrazione e mixaggio
estilocaballero.es ssdoptimizer.eu cambioeuro.eu doflamingo.com studiolegalesangalli.com stilegentiluomo.it italiarec.com italiarec.it arteincasa.it
les2 è offline   Rispondi citando il messaggio o parte di esso
Old 26-05-2016, 09:16   #10
zebmckey
Member
 
Iscritto dal: Apr 2016
Messaggi: 72
Grazieee, porca pupazza che errore da pivello

Quote:
Originariamente inviato da les2 Guarda i messaggi
ciao Zeb, scusa il ritardo non ti ho più filato
riprendo il tuo precedente commento (stai sbagliando un pelo la sintassi):


if ('A'==$esente) {
echo ('<td><a href="motivoassenza.php?id=' . $ID . '">' . $esente . '</a></td>');
} else if ('P'==$esente) {
echo "<td>$esente</td>";
}


e attento alle parentesi, chiudile in line dove le apri altrimenti non si capisce
zebmckey è offline   Rispondi citando il messaggio o parte di esso
 Rispondi


Marvel's Wolverine, la recensione: Logan torna protagonista in un'avventura brutale e intensa Marvel's Wolverine, la recensione: Logan torna p...
DJI Romo 2: tante novità lo rendono un robot completo DJI Romo 2: tante novità lo rendono un ro...
Sony Bravia 9 II: il True RGB alla prova, dove l'LCD sfida l'OLED Sony Bravia 9 II: il True RGB alla prova, dove l...
Geely EX5, un mese al volante: il SUV elettrico cinese che ci ha sorpreso (quasi) senza riserve Geely EX5, un mese al volante: il SUV elettrico ...
Mova Z70 Ultra Roller Complete: motore potente, rullo di lavaggio e l'IA a guidare Mova Z70 Ultra Roller Complete: motore potente, ...
Dopo 23 anni di silenzio, Warcraft 3 spi...
Roblox sfida l'ecosistema gaming: app st...
OpenAI accusata di plagio dai migliori m...
Altro attacco hacker dell'IA: gli agenti...
Stiamo davvero perdendo il controllo del...
Microsoft perde un pilastro: Frank Shaw ...
Diablo V annunciato a sorpresa: il colpo...
Meno di 5 euro per il 5G: l'offerta Kena...
World of Warcraft: Forever è il Classic+...
La Serie A con DAZN e Amazon Prime con l...
Giochi Ubisoft su Steam senza Ubisoft Co...
Miami Beach ha autorizzato la maxi opera...
Apple regala un altro anno di funzioni s...
Alla fine è successo davvero: Vol...
Il meglio di Amazon del weekend in uno s...
Chromium
GPU-Z
OCCT
LibreOffice Portable
Opera One Portable
Opera One 106
CCleaner Portable
CCleaner Standard
Cpu-Z
Driver NVIDIA GeForce 546.65 WHQL
SmartFTP
Trillian
Google Chrome Portable
Google Chrome 120
VirtualBox
Tutti gli articoli Tutte le news Tutti i download

Strumenti

Regole
Non Puoi aprire nuove discussioni
Non Puoi rispondere ai messaggi
Non Puoi allegare file
Non Puoi modificare i tuoi messaggi

Il codice vB è On
Le Faccine sono On
Il codice [IMG] è On
Il codice HTML è Off
Vai al Forum


Tutti gli orari sono GMT +1. Ora sono le: 15:18.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
Served by www3v