Salta al contenuto
  • CATEGORIES
  • La Community Connect.gt
  • Presentati alla Community
  • News Ufficiali da Connect.gt
  • Internet News
  • A Scuola Di
  • Digital Marketing
  • Intelligenza Artificiale
  • SEO & GEO
  • Web Marketing e Content
  • Google Analytics e Web Analytics
  • Google Ads & Advertising
  • YouTube
  • TikTok, Instagram e altri Social
  • Google Adsense, Affiliazioni e Guadagno
  • E-Commerce
  • Coding e Sistemistica
  • Help Center: consigli per il tuo progetto
  • Hosting e Cloud
  • Coding
  • CMS & Piattaforme Self-Hosted
  • Annunci e Collaborazioni
  • Annunci Vendita e Acquisto: Pubblicità, Domini, Link e altro
  • Collaborazioni WEB e Lavoro: offro e cerco
  • Impresa, Fisco e Leggi
  • Consulenza Legale e Professioni Web
  • Consulenza Fiscale, Imprese, Startup e P.Iva
  • Gli Off Topic
  • PC, Smartphone e altri Hardware
  • Tutti i Software
  • GT Fetish Cafè
  • Discussioni
  • 0 Non letti 0
  • Recenti
  • Hashtag
  • Popolare
  • Utenti
  • Privacy
  • Termini e condizioni
  • © 2026 Search On Media Group S.r.l.
Collassa
Connect.gt
Il network Search On
Connect.gt WMF AI Festival Accademia Advanced SEO Tool AgentCy Social Media Strategies Search Tech
Registrati Accedi
Connect.gt
Stream Interest Categorie Hashtag
P

peterminnow

@peterminnow
Non seguire Segui
Informazioni
Post
116
Discussioni
29
Condivisioni
0
Gruppi
0
Da chi è seguito
0
Chi segue
0

Post

Recenti Migliore Controverso

  • Recupera username jquery upload
    P peterminnow
    Coding

    Salve a tutti, non so se il posto giusto per un problema con Jquery File Upload e Joomla 3 ...ma provo.

    Vorrei come accennavo a recuperare la sessione di joomla nel file (classe) UploadHandler.php di Jquery File Upload che
    provando e riprovando con il classico:

    define( '_JEXEC', 1 ); define( '_VALID_MOS', 1 );
    define( 'JPATH_BASE', realpath(dirname(__FILE__) .'/' ) );
    define( 'DS', DIRECTORY_SEPARATOR );
    require_once ( JPATH_BASE .DS.'includes'.DS.'defines.php' );
    require_once ( JPATH_BASE .DS.'includes'.DS.'framework.php' ); 
    $mainframe =& JFactory::getApplication('site');
    $mainframe->initialise();  
    $user =& JFactory::getUser();
    $user->username;
    

    ma ricevo errore...come fare...qualcuno di voi a risolto questo problema?

    un accenno del file UploadHandler.php

    class UploadHandler
    {
    
        protected $options;
    
    
        protected $error_messages = array(
            1 => 'The uploaded file exceeds the upload_max_filesize directive in php.ini',
            2 => 'The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form',
            3 => 'The uploaded file was only partially uploaded',
            4 => 'No file was uploaded',
            6 => 'Missing a temporary folder',
            7 => 'Failed to write file to disk',
            8 => 'A PHP extension stopped the file upload',
            'post_max_size' => 'The uploaded file exceeds the post_max_size directive in php.ini',
            'max_file_size' => 'File is too big',
            'min_file_size' => 'File is too small',
            'accept_file_types' => 'Filetype not allowed',
            'max_number_of_files' => 'Maximum number of files exceeded',
            'max_width' => 'Image exceeds maximum width',
            'min_width' => 'Image requires a minimum width',
            'max_height' => 'Image exceeds maximum height',
            'min_height' => 'Image requires a minimum height',
            'abort' => 'File upload aborted',
            'image_resize' => 'Failed to resize image'
        );
    
        protected $image_objects = array();
    
        function __construct($options = null, $initialize = true, $error_messages = null) {
            $this->options = array(
                'script_url' => $this->get_full_url().'/',
                'upload_dir' => dirname($this->get_server_var('SCRIPT_FILENAME')).'/files/',
                'upload_url' => $this->get_full_url().'/files/',
                'user_dirs' => false,
                'mkdir_mode' => 0755,
                'param_name' => 'files',
                // Set the following option to 'POST', if your server does not support
                // DELETE requests. This is a parameter sent to the client:
                'delete_type' => 'DELETE',
                'access_control_allow_origin' => '*',
                'access_control_allow_credentials' => false,
                'access_control_allow_methods' => array(
                    'OPTIONS',
                    'HEAD',
                    'GET',
                    'POST',
                    'PUT',
                    'PATCH',
                    'DELETE'
                ),
                'access_control_allow_headers' => array(
                    'Content-Type',
                    'Content-Range',
                    'Content-Disposition'
                ),
                // Enable to provide file downloads via GET requests to the PHP script:
                //     1. Set to 1 to download files via readfile method through PHP
                //     2. Set to 2 to send a X-Sendfile header for lighttpd/Apache
                //     3. Set to 3 to send a X-Accel-Redirect header for nginx
                // If set to 2 or 3, adjust the upload_url option to the base path of
                // the redirect parameter, e.g. '/files/'.
                'download_via_php' => false,
                // Read files in chunks to avoid memory limits when download_via_php
                // is enabled, set to 0 to disable chunked reading of files:
                'readfile_chunk_size' => 10 * 1024 * 1024, // 10 MiB
                // Defines which files can be displayed inline when downloaded:
                'inline_file_types' => '/\.(gif|jpe?g|png)$/i',
                // Defines which files (based on their names) are accepted for upload:
                'accept_file_types' => '/.+$/i',
                // The php.ini settings upload_max_filesize and post_max_size
                // take precedence over the following max_file_size setting:
                'max_file_size' => null,
                'min_file_size' => 1,
                // The maximum number of files for the upload directory:
                'max_number_of_files' => null,
                // Defines which files are handled as image files:
                'image_file_types' => '/\.(gif|jpe?g|png)$/i',
                // Use exif_imagetype on all files to correct file extensions:
                'correct_image_extensions' => false,
                // Image resolution restrictions:
                'max_width' => null,
                'max_height' => null,
                'min_width' => 1,
                'min_height' => 1,
                // Set the following option to false to enable resumable uploads:
                'discard_aborted_uploads' => true,
                // Set to 0 to use the GD library to scale and orient images,
                // set to 1 to use imagick (if installed, falls back to GD),
                // set to 2 to use the ImageMagick convert binary directly:
                'image_library' => 1,
                // Uncomment the following to define an array of resource limits
                // for imagick:
                /*
                'imagick_resource_limits' => array(
                    imagick::RESOURCETYPE_MAP => 32,
                    imagick::RESOURCETYPE_MEMORY => 32
                ),
                */
                // Command or path for to the ImageMagick convert binary:
                'convert_bin' => 'convert',
                // Uncomment the following to add parameters in front of each
                // ImageMagick convert call (the limit constraints seem only
                // to have an effect if put in front):
                /*
                'convert_params' => '-limit memory 32MiB -limit map 32MiB',
                */
                // Command or path for to the ImageMagick identify binary:
                'identify_bin' => 'identify',
                'image_versions' => array(
                    // The empty image version key defines options for the original image:
                    '' => array(
                        // Automatically rotate images based on EXIF meta data:
                        'auto_orient' => true
                    ),
                    // Uncomment the following to create medium sized images:
                    /*
                    'medium' => array(
                        'max_width' => 800,
                        'max_height' => 600
                    ),
                    */
                    'thumbnail' => array(
                        // Uncomment the following to use a defined directory for the thumbnails
                        // instead of a subdirectory based on the version identifier.
                        // Make sure that this directory doesn't allow execution of files if you
                        // don't pose any restrictions on the type of uploaded files, e.g. by
                        // copying the .htaccess file from the files directory for Apache:
                        //'upload_dir' => dirname($this->get_server_var('SCRIPT_FILENAME')).'/thumb/',
                        //'upload_url' => $this->get_full_url().'/thumb/',
                        // Uncomment the following to force the max
                        // dimensions and e.g. create square thumbnails:
                        //'crop' => true,
                        'max_width' => 80,
                        'max_height' => 80
                    )
                )
            );
            if ($options) {
                $this->options = $options + $this->options;
            }
            if ($error_messages) {
                $this->error_messages = $error_messages + $this->error_messages;
            }
            if ($initialize) {
                $this->initialize();
            }
        }
    
        protected function initialize() {
            switch ($this->get_server_var('REQUEST_METHOD')) {
                case 'OPTIONS':
                case 'HEAD':
                    $this->head();
                    break;
                case 'GET':
                    $this->get();
                    break;
                case 'PATCH':
                case 'PUT':
                case 'POST':
                    $this->post();
                    break;
                case 'DELETE':
                    $this->delete();
                    break;
                default:
                    $this->header('HTTP/1.1 405 Method Not Allowed');
            }
        }
    

    Grazie, un salutone a tutti!


  • Append URL con Jquey
    P peterminnow
    Coding

    Salve ragazzi...di nuovo qui..stremato alla ricerca della soluzione!!

    Dunque......
    ho un link su una pagina php con $array[id] che vorrei
    postare appena sotto nel div di una popup...il link è formato così:

    <a href=\"#?pippo=400\" rel=\"popup_mail\" class=\"poplight\"\">APRI POPUP</a>
    

    il div nascosto che apre la popup è questo:

    <script type="text/javascript">
    $(document).ready(function(){
                                          
        //When you click on a link with class of poplight and the href starts with a # 
        $('a.poplight[href^=#]').click(function() {
            var popID = $(this).attr('rel'); //Get Popup Name
            var popURL = $(this).attr('href'); //Get Popup href to define size
                    
            //Pull Query & Variables from href URL
            var query= popURL.split('?');
            var dim= query[1].split('&');
            var popWidth = dim[0].split('=')[1]; //Gets the first query string value
    
            //Fade in the Popup and add close button
            $('#' + popID).fadeIn().css({ 'width': Number( popWidth ) }).prepend('<a href="#" class="close"><img src="close_pop.png" class="btn_close" title="Chiudi" alt="Chiudi" /></a>');
            
            //Define margin for center alignment (vertical + horizontal) - we add 80 to the height/width to accomodate for the padding + border width defined in the css
            var popMargTop = ($('#' + popID).height() + 80) / 2;
            var popMargLeft = ($('#' + popID).width() + 80) / 2;
            
            //Apply Margin to Popup
            $('#' + popID).css({ 
                'margin-top' : -popMargTop,
                'margin-left' : -popMargLeft
            });
            
            //Fade in Background
            $('body').append('<div id="fade"></div>'); //Add the fade layer to bottom of the body tag.
            $('#fade').css({'filter' : 'alpha(opacity=80)'}).fadeIn(); //Fade in the fade layer 
            
            return false;
        });
        
        
        //Close Popups and Fade Layer
        $('a.close, #fade').live('click', function() { //When clicking on the close or fade layer...
              $('#fade , .popup_block').fadeOut(function() {
                $('#fade, a.close').remove();  
        }); //fade them both out
            
            return false;
        });
    
        
    });
    </script>
    
    
    
    
    <div id="topline"></div>
    <div id="popup_mail" class="popup_block">
      <tr> 
     <td height="50" align="center">  
    <form action="fattura.php?id=$array[id]" method="POST">
    <table border="0">
      <tr>
        <td>Nome file</td>
        <td><input name="file" type="text" size="30" maxlength="30"><input name="tipo" type="text" value=".pdf" size="4" readonly="readonly"></td>
      </tr>
      <tr>
      <tr>
        <td>email</td>
        <td><input type="text" name="mail" size="30"></td>
      </tr>
      <tr>
      <tr>
      <tr>
        <td colspan="2" valign="bottom" align="center" height="30">
        
        <input type="submit" value="Invia">
        <input type="reset" value="Cancella"></td>
      </tr>
    </table>
    </form>   
        </td>
      </tr>
    </table>
    </div>
    

    ..ma non riesco a riportarmi $array[id] del link...(pre le prove almeno pippo)....come fare.....?????

    Ho provato diversi metodi con jquery....ma evidentemente non sono proprio capace...aiutatemi!!!

    ciao un saluto a tutti..Piero


  • Contenuto editor da mysql
    P peterminnow
    Coding

    Salve ragazzi...ogni tanto torno qui per un aiutino
    (del resto è uno dei forum + professionali che ci sono in giro!)
    posto subito la domanda...

    vorrei riempire una textarea con Tinymce con dei dati presi dal db mysql,
    ovviamente sul sito del progetto Tinymce esiste una soluzione (tinymce.com/tryit/listbox_splitbutton.php)
    ma che non permette di riempire anche altri campi del form che uso,
    mentre invece quella che posto appena sotto si...ma non con l'editor inserito!!!!!

    <script>
    $('#testo').change(function(event) {
                      var cosa=$('#testo').val();
                      $.ajax({
                      type: "GET",
                      url: "elenco_testi.php",
                      data: "nome="+cosa+"",
                      success: function(msg){
                             $('#testo').val(msg);
                      }
    
                 });
    
    </script>
    <select size="1" name="testo" id="testo">
    <option></option>
    <?
    $result = mysql_query("select * from tabella");
    while($array=mysql_fetch_array($result)){
    echo "<option value=\"$array[id]\">".$array[id]."</option>";
    }
    ?>
    </select>
    
    <textarea rows="3" cols="40" name="testo" id="testo"></textarea>
    

    ...grazie un saluto Peter


  • Evento Select
    P peterminnow
    Coding

    PERFETTO..........inutile aggiungere altro!!!


  • Evento Select
    P peterminnow
    Coding

    ..grazie..ma non mi funziona!!!!

    <script>
    $('#fnome').change(function(){
    $('#cnome').val( $('#cnome').prop('defaultSelected') );
    });
    $('#cnome').change(function(){
    $('#fnome').val( $('#fnome').prop('defaultSelected') );
    });
    </script>
    
    <select title="Seleziona un Fornitore" name="fnome" id="fnome" >
     <option > Tutti i Fornitori...</option>
     <option > tizio </option> <option > caio </option>
     <option > ecc </option>
     </select> 
    
     <select title="Seleziona un Cliente" name="cnome" id="cnome" >
     <option > Tutti i Clienti...</option>
     <option > tizio </option>
     <option > caio </option>
     <option > ecc </option>
     </select>
    

  • Evento Select
    P peterminnow
    Coding

    Salve ragazzi...cercavo un suggerimento sull'evento select o meglio
    come resettare una prima select dalla scelta di un'altra select e viceversa...
    posto un esempio:

    <select title="Seleziona un Fornitore" name="fnome" id="fnome" >
    <option > Tutti i Fornitori...</option>
    <option > tizio </option>
    <option > caio </option>
    <option > ecc </option>
    </select>
    
    <select title="Seleziona un Cliente" name="cnome" id="cnome" >
    <option > Tutti i Clienti...</option>
    <option > tizio </option>
    <option > caio </option>
    <option > ecc </option>
    </select>
    

    ...quindi se io seleziono una opzione sulla seconda e
    poi ripasso sulla prima la seconda si deve resettare
    .....sono stato chiaro..speriamo!!!!!

    ciao a presto Peter


  • Arrotonda 2 numeri dovo la virgola
    P peterminnow
    Coding

    ...non funziona (era implicito) per come la inserisco io nello script e non nel codice html che invece (non apparentemente) funziona benissimo!


  • Arrotonda 2 numeri dovo la virgola
    P peterminnow
    Coding

    non funziona......diciamo che non so come inserirlo!!!!


  • Arrotonda 2 numeri dovo la virgola
    P peterminnow
    Coding

    ...scusate ma ho proprio bisogno di aiuto.....
    allora per il momento sono riuscito a ridurre i decimali al totaleiva.value ma
    se eseguo la stessa cosa anche con totiva.value non funziona:

    <SCRIPT language="Javascript1.2">
    function do_it()
    {    
    if (document.forms[0].totale.value=="")
    {
    window.alert("Inserisci un valore nel campo 'Imponibile'");
    }
    if ((document.forms[0].iva.value=="")||(((document.forms[0].iva.value)*1)>100)||(((document.forms[0].iva.value)*1)<0))
    {
    window.alert("Inserisci un valore IVA tra 0% e 100%");
    }
    else
    {    
    var imp=(document.forms[0].totale.value)*1;
    var iva=(document.forms[0].iva.value)*1;
    var fciva=(document.forms[0].fciva.value)*1;
    document.forms[0].totaleiva.value=imp+(imp*(iva/100)+(fciva));
    totaleiva.value = Number(totaleiva.value).toFixed(2);
    document.forms[0].totiva.value=imp*iva/100;
    totiva.value = Number(totiva.value).toFixed(2); ///NON FUNZIONA
    if (document.forms[0].totaleiva.value=="NaN")
    {
    document.forms[0].totaleiva.value="Valore Importo / IVA non corretto";
    window.alert("Inserisci un valore NUMERICO nei campi \n 'Imponibile' e 'IVA'"); 
    document.forms[0].totale.value="0";
    document.forms[0].iva.value="20";
    
    }
    } 
    }
    </SCRIPT>
    
    
    <body>
    <table border="0" cellpadding="0" cellspacing="5" width="66%" ><tr>
    <td width="24%">Imponibile</td>
    <td width="30%">&euro;&nbsp;<input name="totale" title="Il campo accetta solo numeri" onBlur="do_it();" size="12"> es: 00.00</td>
    </tr>
    <tr>
    <td>IVA&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input name="iva" class="text" title="Il campo accetta solo numeri" onBlur="do_it();" value="21" size="7">%</td>
    <td>&euro;&nbsp;<input name="totiva" title="Il campo accetta solo numeri" onBlur="do_it();" size="12"> &nbsp;/&nbsp; <input name="fciva" title="Il campo accetta solo numeri" onBlur="do_it();" value="" size="7"></td>
    </tr>
    <tr>
      <td>Totale (IVA compresa)</td>
      <td>&euro;&nbsp;<input name="totaleiva" id="totaleiva" title="Il campo accetta solo numeri" size="12"  > es: 00.00
      </td>
    </tr>
    </table>
    </body>
    

    aiutatemiiii......:x


  • Arrotonda 2 numeri dovo la virgola
    P peterminnow
    Coding

    salve a tutti....
    sto usando queste righe per un form di calcolo iva, come potrei inserire un arrotondamento per eccesso o difetto con due sole cifre dopo la virgola?

    <SCRIPT language="Javascript1.2">
    function do_it()
    {
    if (document.forms[0].totale.value=="")
    {
    window.alert("Inserisci un valore nel campo 'Imponibile'");
    }
    if ((document.forms[0].iva.value=="")||(((document.forms[0].iva.value)*1)>100)||(((document.forms[0].iva.value)*1)<0))
    {
    window.alert("Inserisci un valore IVA tra 0% e 100%");
    }
    else
    {
    var imp=(document.forms[0].totale.value)*1;
    var iva=(document.forms[0].iva.value)*1;
    document.forms[0].totaleiva.value=imp+(imp*(iva/100));
    document.forms[0].totiva.value=imp*(iva/100);
    if (document.forms[0].totaleiva.value=="NaN")
    {
    document.forms[0].totaleiva.value="Valore Importo / IVA non corretto";
    window.alert("Inserisci un valore NUMERICO nei campi \n 'Imponibile' e 'IVA'"); 
    document.forms[0].totale.value="0";
    document.forms[0].iva.value="20";
    }
    } 
    }
    </SCRIPT>
    

    ciao e grazie a tutti


  • Select sum
    P peterminnow
    Coding

    ...scusa cosa intendi per condizione questa: where data like '%/01/$anno' ?
    poi scusa non vorrei essermi espresso male per somma intendevo, si la somma de positivi ma anche la sottrazione dei negati!!!


  • Select sum
    P peterminnow
    Coding

    Salve ragazzi, qualcuno avrebbe un suggerimento per fare la somma di una colonna della tabella con numeri positivi e negativi?
    Ad esempio se trova 10, 30, -5 = 35

    Al momento sto usando questa...ma non funziona!!!!

    $sql = "SELECT SUM(totale),data,anno FROM acquisti"
                    ." where data like '%/01/$anno'"
                    ."GROUP BY anno";
            $gennaio = mysql_result(mysql_query($sql),0);
    

  • Un solo utente per la modifica della pagina
    P peterminnow
    Coding

    ok...jquery è gia incluso nei miei script per il calcolo iva ecc.
    ...provo..ciaoo


  • Un solo utente per la modifica della pagina
    P peterminnow
    Coding

    ajax...non ci avevo pensato.....sai darmi qualche altro indizio paratico....o indirizzo per qualche idea pratica?


  • Un solo utente per la modifica della pagina
    P peterminnow
    Coding

    Diciamo che non è un fattore di tempo ma di modifica....
    sto lavorando su una serie di script per la creazione di fatture con php e mysql e ovviamente dalla lan interna si collegano più persone ed ecco che mi si presenta ovviamente il problema che se 2 persone aprono in modifica la stessa fattura....UN BEL CASINO!


  • Un solo utente per la modifica della pagina
    P peterminnow
    Coding

    Mi dici che all'apertura della pagina non si potrebbe creare qualcosa di momentaneo che impedisca ad un'altro di riaprire la stessa pagina?


  • Un solo utente per la modifica della pagina
    P peterminnow
    Coding

    ..però se io ho solo aperto la pagina del form è ancora non ho fatto alcuna modifica?..come posso prevenire che un'altro esegua modifiche prima di me?


  • Un solo utente per la modifica della pagina
    P peterminnow
    Coding

    Salve a tutti...un piccolo quesito.....
    ho realizzato una pagina con form che tramite include modifica una pagina online.....ora vorrei che se la pagina è già in modifica da un'altro tizio (o utente) tramite alert o qualcosa simile avverta dell'impossibilita di operare!....
    come si potrebbe realizzare...qualcuno potrebbe darmi qualche spunto per iniziare?

    ciao a tutti..aspetto con fiducia...Piero


  • Controllo numero su campo mysql di 2 tabelle diverse
    P peterminnow
    Coding

    si bravo anche cosi funziona....ma instanto nella notte ho elaborato questa:

    <?
    function corrispondente($id){
    $obj=new sast1com();
     $obj->connessione();
      $dati=mysql_query("select idfattura from vendite where idfattura='$id'");
      while($array=mysql_fetch_array($dati)){
      return $array[idfattura];
      }
    }
    ?>
    

    e poi nella tabella questa:

    if(corrispondente($array[id])==0)
    echo"<td align=\"center\" class=\"textDisplay1\"><a href=\"vendita_add.php?id=$array[id]\"><img src=\"images/insert_vendita.png\" border=0></a></td>";
    else echo"<td align=\"center\" class=\"textDisplay1\"><img src=\"images/acquisti_pic.png\" border=0></td>";
    

    ed il tutto sembra funzionare.....ma ora sto testando la tua xchè mi aiuta anche in altre cose.

    grazie mille..ciaoo


  • Controllo numero su campo mysql di 2 tabelle diverse
    P peterminnow
    Coding

    allora....

    ho una tabella fatture con:
    id, campo2, campo3, campo4..ecc

    poi un'altra tabella vendite con:
    id, campo2, campo3 campo4..ecc

    NB: le 2 tabelle anno solo id come campo uguale i restanti sono diversi per nome e quantità.

    Poi ho una bella paginetta che mi mostra tutto l'elenco delle fatture, dati presi dalla tabella fatture usando questa query:

    $tab1 = mysql_query("select id,fattura,datapagamento,pagato,dataemissione,progressivo,idpagamento,idcliente from fatture );
    

    a questo punto con un link sull'elenco di ogni fattura vado a fare un INSERT nella tabella vendite dove vado ad inserire solo parziali (e ovviamente anche l'id della fattura) dati della fattura che serviranno per avere una situazione contabile.

    Ora volevo far si che nella paginetta dell'elenco fatture se ho gia inserito una vendita (che ovviamente ha lo stesso id) il link che menzionavo prima con un if cambiava immagine....e quindi mi dava visivamente informazione che la fatture è già stata inserita nella contabile....ossia nella tabella vendite.

    Quindi credo che in questa famigerata paginetta occorra una query sulla tabella vendite che controlla anche sulla tabella fatture la corrispondenza dello stesso id.

    Al momento sto provando con questo:

    $obj->connessione();
    $tab1 = mysql_query("select fattura,datapagamento,rif_data_scad_importo_1,rif_data_scad_importo_2,rif_data_scad_importo_3,rif_data_scad_importo_4,pagato,id,dataemissione,progressivo,idpagamento,idcliente from fatture where SUBSTRING(dataemissione,7,10)='$array2[annoemissione]' order by progressivo desc") or die ("la query sulla tab1 nn va");
    
    $tab2 = mysql_query("SELECT fatture.id, vendite.id FROM fatture, vendite  WHERE vendite.id = fatture.id order by vendite.id desc");
    
    
    for ( $i=0; ;$i++ ) {
    $array = mysql_fetch_array($tab1);
    $array3 = mysql_fetch_array($tab2);
    
    if ( $array[id] == NULL  )
          break;
    
    if($array[progressivo]==0) echo "<tr bgcolor=\"#FFDC63\">";
    else echo "<tr>";
    echo "<td class=\"textDisplay1\">".$array3[id]."</td>";
    if($array[progressivo]==0) echo "<td align=\"center\"class=\"textDisplay1\"><strong>PRE</strong></td>";
    else echo "<td align=\"center\"class=\"textDisplay1\">".$array[progressivo]."</td>";
    echo "<td class=\"textDisplay1\">".cliente($array[idcliente])."</td>";
    echo "<td class=\"textDisplay1\">".$array[dataemissione]."</td>";
    if($array[rif_data_scad_importo_1]==$array[dataemissione]) echo "<td align=\"center\" class=\"textDisplay1\">-</td>";
    else echo "<td align=\"center\" class=\"textDisplay2\">
    <table width=\"100%\" border=\"0\" cellspacing=\"3\" cellpadding=\"0\">
      <tr>
        <td bgcolor=\"#FFFF99\" align=\"center\"><span class=\"tabred\">".$array[rif_data_scad_importo_1]."</span></td>
        <td bgcolor=\"#CCFFFF\" align=\"center\"><span class=\"tabred\">".$array[rif_data_scad_importo_2]."</span></td>
      </tr>
      <tr>
        <td bgcolor=\"#D6FFC1\" align=\"center\"><span class=\"tabred\">".$array[rif_data_scad_importo_3]."</span></td>
        <td bgcolor=\"#FFCCFF\" align=\"center\"><span class=\"tabred\">".$array[rif_data_scad_importo_4]."</span></td>
      </tr>
    </table>
    </td>";
    if($array[pagato]==1)echo "<td align=\"center\" class=\"textDisplay1\"><a href=\"mod_data_pagamento.php?id=$array[id]\">".$array[datapagamento]."</a></td>";
    else echo "<td align=\"center\" class=\"textDisplay1\"><a href=\"mod_data_pagamento.php?id=$array[id]\"><img src=\"images/no_pagato.png\" border=0></a></td>";
    
    if($array[progressivo]==0) echo"<td align=\"center\" class=\"textDisplay1\"><a href=\"pdf/crea_pdf/fattura_non_valida_ellepi.php?id=$array[id]\" target=\"_blank\"><img src=\"images/pdf_out.png\" border=0></a></td>";
    else echo"
    <td align=\"right\" class=\"textDisplay1\">&nbsp;&euro;&nbsp;".$fattura=number_format($array[fattura], 2, ',', '.')."&nbsp;</td>
    ";
    
    
    if($array3[id]>0)
    echo"<td align=\"center\" class=\"textDisplay1\"><a href=\"vendita_add.php?id=$array[id]\"><img src=\"images/acquisti_pic.png\" border=0></a></td>";
    else echo"<td align=\"center\" class=\"textDisplay1\"><a href=\"vendita_add.php?id=$array[id]\"><img src=\"images/no_pagato.png\" border=0></a></td>";
    
    
    
    
    if($array[progressivo]==0) echo"<td align=\"center\" class=\"textDisplay1\"><a href=\"pdf/crea_pdf/fattura.php?id=$array[id]\" target=\"_blank\"><img src=\"images/pdf.png\" border=0></a></td>";
    else echo"<td align=\"center\" class=\"textDisplay1\"><a href=\"pdf/crea_pdf/fattura.php?id=$array[id]\" target=\"_blank\"><img src=\"images/pdf.png\" border=0></a></td>";
    
    
    if($array[progressivo]==0) echo"<td align=\"center\" class=\"textDisplay1\"><a href=\"vedi_prefattura.php?id=$array[id]\"><img src=\"images/seleziona.png\" border=0></a></td>";
    else echo"<td align=\"center\" class=\"textDisplay1\"><a href=\"vedi_fattura.php?id=$array[id]\"><img src=\"images/seleziona.png\" border=0></a></td>";
    
    if($array[progressivo]==0) echo"<td align=\"center\" class=\"textDisplay1\"><a href=\"mod_prefattura.php?id=$array[id]\"><img src=\"images/reload.png\" border=0></a></td>";
    else echo"<td align=\"center\" class=\"textDisplay1\"><a href=\"mod_fattura.php?id=$array[id]\"><img src=\"images/tools.png\" border=0></a></td>";
    
    
    echo"<td align=\"center\" class=\"textDisplay1\"><a href=\"sel_fatture.php?id=$array[id]&op=del\" onclick=\"return(confirm('Sei sicuro di voler cancellare??'))\"><img src=\"images/cancella.png\" border=0></a></td>";
    echo "</tr>";
    
    }
    

    ...e funziona solo per il fatto che mi tira fuori l'id della tabella vendita in questa riga:

    echo "<td class=\"textDisplay1\">".$array3[id]."</td>";
    

    ma non riesco ad associarla nella riga rispettiva della fattura a quale corrisponde uguale id, ossia in questo punto:

    if($array3[id]>0)
    echo"<td align=\"center\" class=\"textDisplay1\"><a href=\"vendita_add.php?id=$array[id]\"><img src=\"images/acquisti_pic.png\" border=0></a></td>";
    else echo"<td align=\"center\" class=\"textDisplay1\"><a href=\"vendita_add.php?id=$array[id]\"><img src=\"images/no_pagato.png\" border=0></a></td>";
    

    ....non so se saro riuscito ad essre chiaro...ma almeno avremmo fatto del nostro meglio

  • Accedi

  • Non hai un account? Registrati

  • Accedi o registrati per effettuare la ricerca.
  • Primo post
    Ultimo post
Home Accedi Registrati
Menu
  • CATEGORIES
  • La Community Connect.gt
  • Presentati alla Community
  • News Ufficiali da Connect.gt
  • Internet News
  • A Scuola Di
  • Digital Marketing
  • Intelligenza Artificiale
  • SEO & GEO
  • Web Marketing e Content
  • Google Analytics e Web Analytics
  • Google Ads & Advertising
  • YouTube
  • TikTok, Instagram e altri Social
  • Google Adsense, Affiliazioni e Guadagno
  • E-Commerce
  • Coding e Sistemistica
  • Help Center: consigli per il tuo progetto
  • Hosting e Cloud
  • Coding
  • CMS & Piattaforme Self-Hosted
  • Annunci e Collaborazioni
  • Annunci Vendita e Acquisto: Pubblicità, Domini, Link e altro
  • Collaborazioni WEB e Lavoro: offro e cerco
  • Impresa, Fisco e Leggi
  • Consulenza Legale e Professioni Web
  • Consulenza Fiscale, Imprese, Startup e P.Iva
  • Gli Off Topic
  • PC, Smartphone e altri Hardware
  • Tutti i Software
  • GT Fetish Cafè
  • Discussioni
  • Non letti 0
  • Recenti
  • Hashtag
  • Popolare
  • Utenti
  • Privacy
  • Termini e condizioni
  • © 2026 Search On Media Group S.r.l.