Create more photo fields

1

Hello! I made the following code in a partnership that adds photos to a form, however it is going to image 18, being separated from 6 in 6 photos per page with a footer. I need you to generate 2 more pages with 6 photos each so that you get a total of 30 photos in the form completely. Thanks for the help.

<!DOCTYPE html> 

                      

    <title>Stalker</title>

    <base href='<?php echo BASE; ?>' />

    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta name="robots" content="noindex,nofollow" />
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="mobile-web-app-capable" content="yes">
    <link rel='shortcut icon' type='image/x-icon' href='public/images/logo_bd.png' />

    <script>

        function printDiv(divName) {

            var printContents = document.getElementById(divName).innerHTML;
            var originalContents = document.body.innerHTML;
            document.body.innerHTML = printContents;
            window.print();
            document.body.innerHTML = originalContents;

        }

    </script>

    <style>
        *{
            font-family: arial;
        }
        table{
            width: 1024px;
        }

        .img-vist{

            width: 500px;
            margin: 10px;
            float: left;
            text-align: center;

        }

        .foto_rel{

            border: 1px solid;
            border-bottom: 0;
            width: 358px !important;

        }

        img{

            width: 100%;
            height: 100%;

        }

        img.cabecalho_logo_cliente{
            width: 150px;
            height: 100px;
            margin-top: 2px;


        }
        img.cabecalho_logo_stalker{

            width: 150px;
            height: 100px;

        }

        table{

            width: 775px;
            border-spacing: 10px;
            border-collapse: separate;
            border-style: solid;
            border-width: 1px;
            font-size: 12px;

        }
        .desc_fotos {

            text-align: center;
            font-size: 12px;
            border-top: 1px solid;
            margin-top: -4px;
            border-bottom: 1px solid;
            border-right: 1px solid;

        }

        #table2{

            width: 775px;
            border-spacing: 10px;
            border-collapse: separate;
            border-style: solid;
            border-width: 1px;
            font-size: 12px;

        }
        body{
            width: 786px;
        }
    </style>


    <script>

        var base = "<?php echo BASE; ?>";

    </script>

</head>

<body>

    <table bgcolor="#f8fcae">

        <td colspan ="2" style="width: 447px; text-align:center">

            <font size="3" color="black">

                <h2 style="text-align: center;width: 750px;margin: 0; padding: 0">

                    RELATÓRIO EMERGENCIAL

                </h2>

            </font><br>

        <tr>

            <td nowrap="nowrap">

                <div style="float: left;"> 

                    <font size="4" color="black">SITE</font>

                </div>

                <div style="border: 1px solid;margin-left: 120px;white-space: normal;
                    padding: 5px 50px;padding-bottom: 5px;
                    border-top: -1px;border-bottom: -1px;background: white; width: 40%">

                    <?php echo $this->view->final['NOME_SITE']; ?> 

                </div>

            </td>


            <td nowrap="nowrap">

                <div style="float: left;">

                    <font size="4" color="black">DATA</font>

                </div>

                <div style=" border: 1px solid;margin-left: 120px;                    
                    padding: 5px 30px;padding-bottom: 5px;
                    border-top: 10;border-bottom: 10;background: white; width: 40%">       <!--widht regula largura do campo à direita-->

                        <?php echo $this->view->final_nome['data']; ?>                     <!--margin-left movimenta o campo esquerda direita
                                                                                            padding *px *px regula altura e largura-->
                </div>

            </td>

        </tr>

        <tr>

            <td nowrap="nowrap">

                <div style="float: left;"> 

                    <font size="4" color="black">EMPRESA</font>

                </div>

                <div style="border: 1px solid;margin-left: 120px;
                    padding: 5px 30px;padding-bottom: 5px;
                    border-top: 10;border-bottom: 10;background: white; width: 50%">

                        STALKER ENGENHARIA LTDA

                </div>

            </td>

            <td nowrap="nowrap">

                <div style="float: left;">

                    <font size="4" color="black">MUNICÍPIO</font>

                </div>

                <div style=" border: 1px solid;margin-left: 120px;                    
                    padding: 5px 30px;padding-bottom: 5px;
                    border-top: 10;border-bottom: 10;background: white; width: 40%">       <!--widht regula largura do campo à direita-->

                        <?php echo "{$this->view->final['Município']}"; ?>                <!--margin-left movimenta o campo esquerda direita
                                                                                           padding *px *px regula largura e altura para baixo e direita-->

                </div>

            </td>

        </tr>

        <tr>

            <td nowrap="nowrap">

                <div style="float: left;"> 

                    <font size="4" color="black">ENDEREÇO</font>

                </div>

                <div style="border: 1px solid;margin-left: 120px;word-wrap: break-word;
                    padding: 5px 30px;padding-bottom: 5px;
                    border-top: 10;border-bottom: 10;background: white; width: 50%">

                        <?php echo "{$this->view->final['Endereço']}"; ?>

                </div>

            </td>    

            <td nowrap="nowrap">

                <div style="float: left;">

                    <font size="4" color="black">UF</font>

                </div>

                <div style=" border: 1px solid;margin-left: 120px;                    
                    padding: 5px 30px;padding-bottom: 5px;
                    border-top: 10;border-bottom: 10;background: white; width: 40%">        <!--widht regula largura do campo à direita-->

                        <?php echo "{$this->view->final['UF']}"; ?>
                                                                                            <!--margin-left movimenta o campo esquerda direita-->
                </div>

            </td>

        </tr>

    </table>



    <?php 

        for ($f = 0; $f <= sizeof($this->view->fotos_x); $f++):

        $ccont++;

        if($contador++ % 6 == 0):                                           //contador de imagens por pagina

    ?> 

    <table style="border-spacing: 0; margin-top: 10px;margin-bottom: 10px;">

        <tr>

            <td style="width: 447px; text-align: center">  

                <font size="3" color="black">

                    VISTORIA DE INFRAESTRUTURA

                </font>

            </td>

        </tr>

    </table>










        <?php endif; ?>

        <?php if($this->view->fotos_x[$f]['val']): ?>

    <div style="float: left;width: 360px;<?php echo $contador % 2 != 0 ? "margin-right: 52px;" : null; ?>
        height: 309px;margin-bottom: 50px;">

    <?php echo $this->view->fotos_x[$f]['val']; ?>

        <div class='desc_fotos'>                                            <!-- Descricao das fotos -->

            <div style="float: left;border: 1px solid;
            padding: 5px 5px;padding-bottom: 6px;                           // Div. de Descricao das fotos     
            border-top: 0;border-bottom: 0;">

                <?php echo "Fig. " . $ccont; ?> 

            </div>

            <div style="margin-top: 5px;height: 18px;">

                <?php echo $this->view->fotos_x[$f]['titulo'] != null ? 
                    $this->view->fotos_x[$f]['titulo'] : $this->view->fotos_x[$f]['titulo_foto']; ?>

            </div> 

        </div>




    </div>

        <?php else: ?>

     <div style="float: left;width: 360px; <?php echo $contador % 2 != 0 ? "margin-right: 52px;" : null; ?>
        height: 309px;border: 1px solid;margin-bottom: 30px;">
    </div> 














        <?php endif; ?>

        <?php if($contador > 1 && $contador % 6 == 0): ?>

        <table style="border: 1px solid;border-spacing: 0">

            <tr>

                <td>

                    SITE: <?php echo $this->view->final['NOME_SITE']; ?> ENDEREÇO: <?php echo "{$this->view->final['Endereço']}"; ?>

                </td>

            </tr>

        </table>

        <?php endif; ?>

    <?php endfor; ?>



</body>

    
asked by anonymous 26.10.2017 / 15:12

0 answers