@ -0,0 +1,76 @@ |
|||
<div class="row"> |
|||
<div class="col-12"> |
|||
<div class="section-title">Aggiungi file</div> |
|||
</div> |
|||
<div class="col-12"> |
|||
|
|||
<div class="sheet-box p-4"> |
|||
|
|||
<?php |
|||
if($_POST['go']){ |
|||
|
|||
if($_FILES['files']){ |
|||
$files = reArrayFiles($_FILES['files']); |
|||
foreach ($files as $index => $file) { |
|||
if(is_uploaded_file($file['tmp_name'])){ |
|||
$filename = preg_replace('/[^a-zA-Z0-9\-\._]/','', $file['name']); |
|||
$filesize = ($file['size'] < 1000000) ? round($file['size'] / 1000)."k" : round($file['size'] / 1000000)."M"; |
|||
$title = $_POST['titles'][$index]; |
|||
$path = $_POST['path']; |
|||
|
|||
move_uploaded_file($file['tmp_name'], "..$path/$filename"); |
|||
$qf=mysqli_query($conn, "INSERT INTO files VALUES(null, '$title', '$filename', '".$path."', NOW(), '$filesize')"); |
|||
} |
|||
} |
|||
} |
|||
|
|||
echo '<div class="col-10 text-center mx-auto my-5"> |
|||
<p><i class="fa fa-check-circle font-alert p-4"></i></p> |
|||
File aggiunto correttamente! |
|||
</div>'; |
|||
|
|||
|
|||
}else{ |
|||
?> |
|||
<form method="post" enctype="multipart/form-data"> |
|||
<div class="row"> |
|||
<div class="col-12"> |
|||
<span class="font-12">Carica in</span> |
|||
<select name="path"> |
|||
<option value="/docs/modulistica/pubblica">Modulistica pubblica</option> |
|||
<option value="/docs/modulistica/privata">Modulistica privata</option> |
|||
</select> |
|||
</div> |
|||
|
|||
<div class="col-12"> |
|||
<span class="font-12">Files</span> |
|||
<div class="files-list"> |
|||
<div class="list"> |
|||
<div class="row master"> |
|||
<div class="col-8"> |
|||
<input type="text" name="titles[]" placeholder="Nome del file"> |
|||
</div> |
|||
<div class="col-4"> |
|||
<input type="file" name="files[]"> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<button class="button button-small add-file"><i class="fa fa-plus"></i> aggiungi riga</button> |
|||
</div> |
|||
|
|||
</div> |
|||
<div class="col-12 text-right"> |
|||
<button type="submit" name="go" value="1">Aggiungi file</button> |
|||
</div> |
|||
</div> |
|||
</form> |
|||
|
|||
<?php |
|||
} |
|||
?> |
|||
|
|||
</div> |
|||
|
|||
</div> |
|||
</div> |
|||
|
@ -0,0 +1,128 @@ |
|||
<div class="row"> |
|||
<div class="col-12"> |
|||
<div class="section-title">Elimina notizia</div> |
|||
</div> |
|||
<div class="col-12"> |
|||
|
|||
<div class="sheet-box p-4"> |
|||
|
|||
<?php |
|||
if($_POST['go']){ |
|||
|
|||
$append = array(); |
|||
|
|||
$qa=mysqli_query($conn, "SELECT append FROM news WHERE id=".trim($getQ[3])); |
|||
$ra=mysqli_fetch_array($qa); |
|||
$currentAppend = explode(',',$ra['append']); |
|||
|
|||
$fullAppend = $currentAppend; |
|||
|
|||
if($_POST['filesDel']){ |
|||
foreach ($_POST['filesDel'] as $fileID) { |
|||
if (($index = array_search($fileID, $fullAppend)) !== false) { |
|||
unset($fullAppend[$index]); |
|||
$qtf=mysqli_query($conn, "SELECT * FROM files WHERE id=".$fileID); |
|||
$rtf=mysqli_fetch_array($qtf); |
|||
@unlink("..".$rtf['path']."/".$rtf['filename']); |
|||
$qtf=mysqli_query($conn, "DELETE FROM files WHERE id=".$fileID); |
|||
} |
|||
} |
|||
} |
|||
|
|||
$q=mysqli_query($conn, "DELETE FROM news WHERE id=".trim($getQ[3])); |
|||
|
|||
echo '<div class="col-10 text-center mx-auto my-5"> |
|||
<p><i class="fa fa-check-circle font-alert p-4"></i></p> |
|||
Notizia eliminata correttamente! |
|||
</div>'; |
|||
|
|||
}else{ |
|||
|
|||
if($getQ[3]){ |
|||
|
|||
$q=mysqli_query($conn, "SELECT * FROM news WHERE id = ".trim($getQ[3])); |
|||
$r=mysqli_fetch_array($q); |
|||
|
|||
?> |
|||
<form method="post" enctype="multipart/form-data"> |
|||
<div class="row"> |
|||
<div class="col-12 col-sm-6"> |
|||
<span class="font-12">Data</span> |
|||
<p><?= conv_date($r['date']);?></p> |
|||
</div> |
|||
<div class="col-12"> |
|||
<span class="font-12 text-grey">Titolo notizia</span> |
|||
<p><?= $r['title'];?></p> |
|||
</div> |
|||
<div class="col-12 pb-2"> |
|||
<span class="font-12 text-grey">Testo notizia</span> |
|||
<p><?= $r['text'];?></p> |
|||
</div> |
|||
|
|||
<div class="col-12"> |
|||
<span class="font-12">Allegato/i</span> |
|||
<div class="files-list"> |
|||
<div class="admin-list"> |
|||
<?php |
|||
$qca=mysqli_query($conn, "SELECT * FROM files WHERE id IN(".$r['append'].")"); |
|||
$cnt=0; |
|||
while($rca=mysqli_fetch_array($qca)){ |
|||
$cnt++; |
|||
$bg = ($cnt%2) ? "bg-light-grey" : "bg-white"; |
|||
echo "<div class=\"admin-list-item $bg\"><span>".$rca['title']."</span> |
|||
<div class=\"right\"> |
|||
<input type=\"checkbox\" value=\"".$rca['id']."\" id=\"check_".$rca['id']."\" name=\"filesDel[]\" checked> |
|||
<label for=\"check_".$rca['id']."\" class=\"font-10 px-3\">Elimina</label> |
|||
</div></div>"; |
|||
} |
|||
?> |
|||
</div> |
|||
</div> |
|||
|
|||
</div> |
|||
<div class="col-12 text-right"> |
|||
<button type="submit" name="go" value="1">Elimina notizia</button> |
|||
</div> |
|||
</div> |
|||
</form> |
|||
|
|||
<?php |
|||
}else{ |
|||
|
|||
?> |
|||
<form method="post" class="form-mod" data-path="<?= $BASE_URL;?>/sheets/news/del"> |
|||
<div class="col-12 col-sm-10 mx-auto"> |
|||
<div class="row"> |
|||
<div class="col"> |
|||
<span class="font-12">Seleziona una notizia</span> |
|||
</div> |
|||
</div> |
|||
<div class="row"> |
|||
<div class="col"> |
|||
<select name="id" class="id"> |
|||
<?php |
|||
$qn=mysqli_query($conn, "SELECT * FROM news ORDER BY date DESC"); |
|||
while($rn=mysqli_fetch_array($qn)){ |
|||
echo "<option value=\"".$rn['id']."\">".conv_date($rn['date'])." - ".$rn['title']."</option>"; |
|||
} |
|||
?> |
|||
</select> |
|||
</div> |
|||
<div class="col-auto"> |
|||
<button type="submit">Elimina</button> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</form> |
|||
|
|||
<?php |
|||
|
|||
} |
|||
} |
|||
?> |
|||
|
|||
</div> |
|||
|
|||
</div> |
|||
</div> |
|||
|
Before Width: | Height: | Size: 3.6 MiB After Width: | Height: | Size: 3.6 MiB |
Before Width: | Height: | Size: 25 KiB After Width: | Height: | Size: 25 KiB |
After Width: | Height: | Size: 19 KiB |
After Width: | Height: | Size: 21 KiB |
Before Width: | Height: | Size: 434 KiB After Width: | Height: | Size: 434 KiB |
After Width: | Height: | Size: 61 KiB |
After Width: | Height: | Size: 2.4 KiB |
After Width: | Height: | Size: 17 KiB |
@ -1,16 +0,0 @@ |
|||
Email:dslaky@gmail.com |
|||
<br>Email:0 |
|||
<br>Email CC:0 |
|||
<br>Subject:Reset dei dati di accesso |
|||
<br><br>CONTENT: |
|||
<html><head><style> |
|||
body{font-family: sans, Arial; margin: 0px; font-size: 10pt;} |
|||
td{font-family: sans-serif; font-size: 10pt;} |
|||
</style><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"></head><body bgcolor="#4e984a"><center> |
|||
<table border="0" width="720" cellspadding="20"> |
|||
<tr><td align="center" colspan="2"> |
|||
<img src="http://ordine.dev/images/logo-white.png" alt="Ordine dei Farmacisti di Salerno" width="150"><br><br></td></tr> |
|||
<tr><td align="left" style="padding:5px; color: white" ><b>Reset dei dati di accesso</b></td> |
|||
<td align="right" style="padding:5px; color: white" >11/02/2018</td></tr> |
|||
<tr><td style="border-top: 8px solid #FFFFFF;border-left: 1px solid #FFFFFF;border-right: 1px solid #FFFFFF;border-bottom: 8px solid #FFFFFF;border-radius:5px;-moz-border-radius:5px;-webkit-border-radius:5px; padding:10px;line-height:23px" bgcolor="white" colspan="2">Ricevi questa mail perchè hai richiesto il reset dei tuoi dati di accesso, ti sono stati assegnati dei nuovi dati di accesso, se vuoi modificarli accedi al tuo account e fai click su "Modifica dati di accesso".<br><br><b>Riepilogo dati</b><br>Username: dslaky<br>Password: f31602d155<br>Email: dslaky@gmail.com<br>N. iscrizione: 1921</td></tr><tr><td colspan="2" align="center" style="text-align:justify; font-size:8pt; color: white"><br>Questa e-mail contiene informazioni di proprietà e di natura confidenziale. Se non siete il destinatario corretto di questo messaggio, vi ricordiamo che ogni diffusione, distribuzione o copia di questo messaggio è severamente proibita. Se avete ricevuto questo messaggio per errore, siete pregati di cancellarlo immediatamente. Quanto precede ai fini del rispetto del D.L. n. 196/03 sulla tutela dei dati personali.<br>-<br>This e-mail (and any attachments) is strictly confidential and for use only by intendend recipients. If you are not an intended recipients, we point you that any diffusion, distribution or copy of this message is severely forbidden. If you have received t his message by mistake please destroy it immediately (under the observance of D.L. n. 196/03 which protects personal data).<br>Rispetta l'ambiente. Non stampare questa mail se non è necessaria.</td></tr></table></center></body></html> |
|||
|