166 changed files with 417 additions and 89 deletions
@ -0,0 +1,29 @@ |
|||||
|
<?php |
||||
|
if(!$_SESSION['AUTH']){ |
||||
|
?> |
||||
|
<li> |
||||
|
<form method="post"> |
||||
|
<label class="font-10">Username</label> |
||||
|
<input type="text" name="usr" placeholder="username"> |
||||
|
|
||||
|
<label class="font-10">Password</label> |
||||
|
<input type="password" name="pwd" placeholder="password"> |
||||
|
<input type="submit" name="go" value="Accedi"> |
||||
|
</form> |
||||
|
</li> |
||||
|
<li><a href="#">Richiedi dati di accesso</a></li> |
||||
|
<li><a href="#">Recupera password</a></li> |
||||
|
|
||||
|
<?php |
||||
|
}else{ |
||||
|
?> |
||||
|
|
||||
|
<li class="text-center"> |
||||
|
<p class="h7">Accesso effettuato per:</p> |
||||
|
<p class="h7 py-1 font-bold"><?php echo $_SESSION['AUTH']['first_name']." ".$_SESSION['AUTH']['last_name'];?></p> |
||||
|
<a href="<?= $BASE_URL;?>/logout"><button type="button" class="button">LOGOUT</button></a> |
||||
|
</li> |
||||
|
|
||||
|
<?php |
||||
|
} |
||||
|
?> |
@ -1,5 +1,6 @@ |
|||||
<?php |
<?php |
||||
|
|
||||
$BASE_URL="http://".$_SERVER['HTTP_HOST'].""; |
$BASE_URL="http://".$_SERVER['HTTP_HOST'].""; |
||||
|
$ROOT = realpath($_SERVER["DOCUMENT_ROOT"]); |
||||
|
|
||||
?> |
?> |
||||
|
@ -0,0 +1,5 @@ |
|||||
|
|
||||
|
<?php |
||||
|
@include "contents/".$getQ[1].'.php'; |
||||
|
?> |
||||
|
|
@ -0,0 +1,51 @@ |
|||||
|
|
||||
|
<?php |
||||
|
if($_SESSION['AUTH']){ |
||||
|
?> |
||||
|
<div class="row pb-4"> |
||||
|
<div class="col-12"> |
||||
|
<div class="section-title">Modulistica privata</div> |
||||
|
</div> |
||||
|
|
||||
|
<div class="col-12 file-list"> |
||||
|
<div class="item-title pt-4"> |
||||
|
<div class=" row"> |
||||
|
<div class="col-6 col-sm-8 font-bold">nome del file</div> |
||||
|
<div class="col-2 font-bold">dimensione</div> |
||||
|
<div class="text-right col-4 col-sm-2 font-bold">ultima mod.</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
<?php |
||||
|
$q=mysqli_query($conn,"SELECT * FROM files WHERE path='/docs/modulistica/privata'"); |
||||
|
while($r=mysqli_fetch_array($q)){ |
||||
|
item_file($r); |
||||
|
} |
||||
|
?> |
||||
|
</div> |
||||
|
</div> |
||||
|
|
||||
|
<?php |
||||
|
} |
||||
|
?> |
||||
|
|
||||
|
<div class="row pb-4"> |
||||
|
<div class="col-12"> |
||||
|
<div class="section-title">Modulistica pubblica</div> |
||||
|
</div> |
||||
|
|
||||
|
<div class="col-12 file-list"> |
||||
|
<div class="item-title pt-4"> |
||||
|
<div class=" row"> |
||||
|
<div class="col-6 col-sm-8 font-bold">nome del file</div> |
||||
|
<div class="col-2 font-bold">dimensione</div> |
||||
|
<div class="text-right col-4 col-sm-2 font-bold">ultima mod.</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
<?php |
||||
|
$q=mysqli_query($conn,"SELECT * FROM files WHERE path='/docs/modulistica/pubblica'"); |
||||
|
while($r=mysqli_fetch_array($q)){ |
||||
|
item_file($r); |
||||
|
} |
||||
|
?> |
||||
|
</div> |
||||
|
</div> |
@ -0,0 +1 @@ |
|||||
|
|
@ -0,0 +1,3 @@ |
|||||
|
asdfgdjnbfghdn |
||||
|
g hgsfj |
||||
|
rtg |
@ -0,0 +1 @@ |
|||||
|
|
@ -0,0 +1 @@ |
|||||
|
|
@ -0,0 +1,3 @@ |
|||||
|
asdfgdjnbfghdn |
||||
|
g hgsfj |
||||
|
rtg |
@ -0,0 +1 @@ |
|||||
|
s |
@ -0,0 +1 @@ |
|||||
|
|
@ -0,0 +1,3 @@ |
|||||
|
asdfgdjnbfghdn |
||||
|
g hgsfj |
||||
|
rtg |
@ -0,0 +1 @@ |
|||||
|
s |
@ -0,0 +1,92 @@ |
|||||
|
<?php |
||||
|
|
||||
|
$q = mysqli_query($conn, "SELECT COUNT(id) FROM news"); |
||||
|
$r = mysqli_fetch_array($q); |
||||
|
|
||||
|
$totNews = $r[0]; |
||||
|
$itemsPage = 5; |
||||
|
$currentPage = $getQ[1]; |
||||
|
$totPages = $totNews/$itemsPage; |
||||
|
$pageStart = $currentPage * $itemsPage; |
||||
|
|
||||
|
if($getQ[2]){ |
||||
|
$q = mysqli_query($conn, "SELECT * FROM news WHERE id=".$getQ[2]); |
||||
|
$r = mysqli_fetch_array($q); |
||||
|
|
||||
|
?> |
||||
|
|
||||
|
|
||||
|
<div class="row news"> |
||||
|
|
||||
|
<div class="col-12"> |
||||
|
<div class="section-title">Notizie dall'Ordine</div> |
||||
|
<div class="section-text"> |
||||
|
<p class="item py-3 h6"><span class="date"><?php echo conv_date($r['date']);?></span> - <?php echo $r['title'];?></p> |
||||
|
<p class="p-2"><?php echo $r['text'];?></p> |
||||
|
|
||||
|
<?php |
||||
|
if($r['append']){ |
||||
|
echo "<div class=\"append\">"; |
||||
|
echo "<div class=\"item pt-4 font-bold\">Allegati:</div>"; |
||||
|
$qa = mysqli_query($conn, "SELECT * FROM files WHERE id IN(".$r['append'].")"); |
||||
|
while($ra = mysqli_fetch_array($qa)){ |
||||
|
$size = get_filesize($ra['path']."/".$ra['filename']); |
||||
|
if($size > 1000){$size = ($size/1000)."Mb";}else{$size = $size."Kb";} |
||||
|
echo "<div class=\"item\"><a href=\"$BASE_URL".$ra['path']."/".$ra['filename']."\" target=\"_blank\">".$ra['title'].""; |
||||
|
echo "<div class=\"size\">".$size."</div>"; |
||||
|
echo "</a></div>"; |
||||
|
} |
||||
|
echo "</div>"; |
||||
|
|
||||
|
} |
||||
|
?> |
||||
|
|
||||
|
</div> |
||||
|
</div> |
||||
|
|
||||
|
<div class="col-6 mt-4"> |
||||
|
<a onClick="javascript:history.back()"> |
||||
|
<button><i class="fa fa-angle-left"></i> Torna indietro</button> |
||||
|
</a> |
||||
|
</div> |
||||
|
<div class="col-6 mt-4 text-right"> |
||||
|
<a href="<?php echo $BASE_URL."/news";?>"> |
||||
|
<button>Vai a tutte le news <i class="fa fa-angle-right"></i></button> |
||||
|
</a> |
||||
|
</div> |
||||
|
</div> |
||||
|
|
||||
|
|
||||
|
<?php |
||||
|
}else{ |
||||
|
?> |
||||
|
|
||||
|
<div class="row news"> |
||||
|
|
||||
|
<div class="col-12"> |
||||
|
<div class="section-title">Notizie dall'Ordine</div> |
||||
|
<?php |
||||
|
$q = mysqli_query($conn, "SELECT * FROM news ORDER BY date LIMIT $pageStart,$itemsPage"); |
||||
|
while($r = mysqli_fetch_array($q)){ |
||||
|
echo "<p class=\"item\"><a href=\"$BASE_URL/news/0/".$r['id']."/".conv_url($r['title'])."\"><span class=\"date\">".conv_date($r['date'])." </span> - ".$r['title']."</a></p>"; |
||||
|
} |
||||
|
?> |
||||
|
</div> |
||||
|
|
||||
|
<div class="col-12 my-2 pages"> |
||||
|
|
||||
|
<?php |
||||
|
for($i=0;$i<$totPages;$i++){ |
||||
|
echo "<a class=\"font-12 "; |
||||
|
if($i==$currentPage){echo "selected";} |
||||
|
echo "\" href=\"$BASE_URL/news/$i\">".($i+1)."</a>"; |
||||
|
} |
||||
|
?> |
||||
|
</div> |
||||
|
|
||||
|
</div> |
||||
|
|
||||
|
<?php |
||||
|
} |
||||
|
?> |
||||
|
|
@ -1,22 +0,0 @@ |
|||||
<div class="row news"> |
|
||||
|
|
||||
<div class="col-12"> |
|
||||
<div class="section-title">Ultime notizie</div> |
|
||||
<p class="item"><a href=""><span class="date">07-12-2017 </span> - Chiusura Uffici sabato 9</a></p> |
|
||||
<p class="item"><a href=""><span class="date">07-12-2017 </span> - Chiusura Uffici sabato 9</a></p> |
|
||||
<p class="item"><a href=""><span class="date">07-12-2017 </span> - Chiusura Uffici sabato 9</a></p> |
|
||||
<p class="item"><a href=""><span class="date">07-12-2017 </span> - Chiusura Uffici sabato 9</a></p> |
|
||||
</div> |
|
||||
|
|
||||
<div class="col-12 my-2 pages"> |
|
||||
<a class="font-12 selected" href="<?php echo $BASE_URL;?>/notizie/0">1</a> |
|
||||
<a class="font-12" href="<?php echo $BASE_URL;?>/notizie/0">1</a> |
|
||||
<a class="font-12" href="<?php echo $BASE_URL;?>/notizie/0">1</a> |
|
||||
<a class="font-12" href="<?php echo $BASE_URL;?>/notizie/0">1</a> |
|
||||
<a class="font-12" href="<?php echo $BASE_URL;?>/notizie/0">1</a> |
|
||||
<a class="font-12" href="<?php echo $BASE_URL;?>/notizie/0">1</a> |
|
||||
<a class="font-12" href="<?php echo $BASE_URL;?>/notizie/0">1</a> |
|
||||
</div> |
|
||||
|
|
||||
</div> |
|
||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Some files were not shown because too many files changed in this diff
Loading…
Reference in new issue