[+] EDITØR MODE [+]
htdocs
>
public
>
www
>
lavori.php
Edit File: lavori.php
<?php include_once 'common.php'; $servername = "hostingmysql323.register.it"; $username = "gregorio"; $password = "fontana2015"; $dbname = "fontanaarchitetti"; // Create connection $conn = new mysqli($servername, $username, $password, $dbname); // Check connection if ($conn->connect_error) { die("Connection failed: " . $conn->connect_error); } ?> <!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><!-- Begin Cookie Consent plugin by Silktide - http://silktide.com/cookieconsent --> <script type="text/javascript"> window.cookieconsent_options = {"message":"Questo sito utilizza cookie di terze parti. Chiudendo questo banner, scorrendo questa pagina, cliccando su un link o proseguendo la navigazione in altra maniera, acconsenti all'uso dei cookie.","dismiss":"Accetta","learnMore":"Maggiori informazioni","link":"http://fontana-architetti.it/crediti.php","theme":"dark-top"}; </script> <script type="text/javascript" src="//s3.amazonaws.com/cc.silktide.com/cookieconsent.latest.min.js"></script> <!-- End Cookie Consent plugin --> <!-- ------------------------------------------------META------------------------------------------------ --> <meta name="viewport" content="width=device-width, initial-scale=1.0" /> <meta http-equiv="cache-control" content="max-age=0" /> <meta http-equiv="cache-control" content="no-cache" /> <meta http-equiv="expires" content="0" /> <meta http-equiv="expires" content="Tue, 01 Jan 1980 1:00:00 GMT" /> <meta http-equiv="pragma" content="no-cache" /> <!-- ------------------------------------------------CSS------------------------------------------------ --> <link rel="stylesheet" href="css/home.css" /> <link rel="stylesheet" href="css/menu.css" /> <link rel="stylesheet" type="text/css" href="css/cookieBar.css" /> </head> <body> <div id='root'> <div class='box_l' id='top_bar'> <div class='box_r' id='cerca'></div> </div> <div id='titoli'> <div id="head_l"> <div id="head_l_text"><h2><?php echo $lang['PROGETTI_'.$_GET['cat']]; ?></h2></div> </div> <?php $idd= $_GET['idd']; if($idd == "prog"){ echo '<a href="progetti.php"><div id="cer"> </div></a> <a href="progetti.php"><div id="dietro"><h3>BACK</h3></div></a>'; }else if ($idd == "conc"){ echo '<a href="concorsi.php"><div id="cer"> </div></a> <a href="concorsi.php"><div id="dietro"><h3>BACK</h3></div></a>'; } ?> <div id="head_r"><a href="index.php"><img src="img/logo_small.jpg" class="r"></a></div> </div> <div id='testo_elenco'> <?php $categoria = $_GET['cat']; $idd= $_GET['idd']; $sql = 'SELECT * FROM '.$idd.' WHERE tipo = "'.$categoria.'" AND vis = "1" ORDER BY data DESC'; $result = $conn->query($sql); $currentDate = false; if ($result->num_rows > 0) { while($row = $result->fetch_assoc()) { if ($row['data'] != $currentDate){ echo "<h4>" .$row['data']. "</h4>"; $currentDate = $row['data']; } $idg = $row['id']; echo '<a href="scheda.php?id_prog='.$row['id'].'&cat='.$categoria.'&idd='.$idd.'"> <p class="corto"><b>'.strip_tags($row['titolo_'.$lang["LANG"]], "<b><strong><i><em>"). '</b><br/>' .strip_tags($row['recap_'.$lang["LANG"]], "<b><strong><i><em>").'</p>'; //CONTROLLA PRESENZA IMMAGINI PER OGNI SINGOLO PROGETTO CONTANDO LE VOCI PER CATEGORIE DI IMMAGINI $sql2 = 'SELECT *,COUNT(*) FROM gallery WHERE cat = "'.$idd.'" AND id_gal = "'.$idg.'" GROUP BY tipo'; $result2 = $conn->query($sql2); while($row = $result2->fetch_assoc()) { //echo $row['id_gal'].': '.$row['tipo'].': '.$row['COUNT(*)'].'<br/>'; //se esiste disegna simbolo if ($row['tipo'] == "1" and $row['COUNT(*)'] > "0"){ echo '<img src="img/button_1.jpg" class="b" width="12px"/>'; } if ($row['tipo'] == "2" and $row['COUNT(*)'] > "0"){ echo '<img src="img/button_2.jpg" class="b" width="12px"/>'; } if ($row['tipo'] == "3" and $row['COUNT(*)'] > "0"){ echo '<img src="img/button_3.jpg" class="b" width="12px"/>'; } if ($row['tipo'] == "4" and $row['COUNT(*)'] > "0"){ echo '<img src="img/button_4.jpg" class="b" width="12px"/>'; } }; echo '</a><br/><br/>';} } else { echo '<p> Non sono presenti progetti in questa categoria </p>'; } $conn->close(); ?></div> <div id='menu'> <ul> <li><a href="chi_siamo.php"><?php echo $lang['MENU_CHISIAMO']; ?></a></li> <li><a href="progetti.php"><?php echo $lang['MENU_PROGETTI']; ?></a></li> <li><a href="concorsi.php"><?php echo $lang['MENU_CONCORSI']; ?></a></li> <li><a href="pubblicazioni.php"><?php echo $lang['MENU_PUBBLICAZIONI']; ?></a></li> <li><a href="episodi.php"><?php echo $lang['MENU_EPISODI']; ?></a></li> <li><a href="clienti.php"><?php echo $lang['MENU_CLIENTI']; ?></a></li> <li><a href="contatti.php"><?php echo $lang['MENU_CONTATTI']; ?></a></li> <li><a href="crediti.php"><?php echo $lang['MENU_CREDITI']; ?></a></li> </ul> </div> </div> </body> </html>
Method:
fopen()
file_put_contents()
stream_context_create()
Simpan
Rename:
Rename