Skip to content

Commit

Permalink
Merge pull request #89 from damares86/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
damares86 authored Jan 20, 2023
2 parents 3b9d5d3 + 04b769f commit f9314e4
Show file tree
Hide file tree
Showing 7 changed files with 32 additions and 8 deletions.
9 changes: 8 additions & 1 deletion admin/core/fetchFile.php
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,14 @@ function autoloader($class){
$output.=' <tr>
<td>'.$title.'</td>
<td>'.$filename.'</td>
<td><a href="../uploads/'.$filename.'">'.$file_filelink.'</a></td>
<td>
<a href="../uploads/'.$filename.'" class="btn btn-primary btn-icon-split">
<span class="icon text-white-50">
<i class="fas fa-link"></i>
</span>
<span class="text">'.$file_filelink.'</span>
</a>
</td>
<td>
<a href="index.php?man=files&op=edit&idToMod='.$row['id'].'" class="btn btn-warning btn-icon-split">
Expand Down
11 changes: 7 additions & 4 deletions admin/core/mngFile.php
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,12 @@ function autoloader($class){
}
$file->title=$_POST['title'];


if (isset($_POST['fileSel'])&&$_FILES['myfile']['size'] == 0 ){
header("Location: ../index.php?man=files&op=show&msg=fileEmpty");
exit;
}

if($file->update()){
if(isset($_POST['fileSel'])){

Expand All @@ -117,10 +123,7 @@ function autoloader($class){
$filepath = "../../uploads/". $filename ."";

if(unlink($filepath) || !file_exists(($filepath))){
if ($_FILES['myfile']['size'] == 0 ){
header("Location: ../index.php?man=files&op=show&msg=fileEmpty");
exit;
}

$file->file=$_FILES['myfile']['tmp_name'];
$file->title=$_POST['title'];
$file->filename=$_FILES['myfile']['name'];
Expand Down
14 changes: 13 additions & 1 deletion admin/inc/dbdata.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,23 +26,32 @@
<div class="form-group">
<label for="host">Server host (es. localhost) <span class="text-danger font-weight-bold">*</span></label>
<input id="host" class="form-control" name="host" value="" required autofocus>
<div class="invalid-feedback">
Server host is required
</div>
</div>
<div class="form-group">
<label for="dbname">Database name <span class="text-danger font-weight-bold">*</span></label>
<input id="dbname" class="form-control" name="dbname" value="" required autofocus>
<div class="invalid-feedback">
Database name is required
</div>
</div>
<div class="form-group">
<label for="username">Database user <span class="text-danger font-weight-bold">*</span></label>
<input id="username" class="form-control" name="username" value="" required autofocus>
<div class="invalid-feedback">
Database user is required
</div>
</div>
<div class="form-group">
<label for="db_password">Database Password <span class="text-danger font-weight-bold">*</span></label>
<input id="db_password" type="password" class="form-control" name="db_password" required data-eye>
<div class="invalid-feedback">
Password is required
Database Password is required
</div>
</div>
<hr>
Expand All @@ -56,6 +65,9 @@
<div class="form-group">
<label for="email">Your admin email <span class="text-danger font-weight-bold">*</span></label>
<input id="email" class="form-control" name="email" value="" required autofocus>
<div class="invalid-feedback">
Email is required
</div>
</div>
<div class="form-group">
Expand Down
2 changes: 1 addition & 1 deletion admin/inc/func/regPageCustom.php
Original file line number Diff line number Diff line change
Expand Up @@ -560,7 +560,7 @@ function show(i) {
}
if($quotesActive==1){
?>
<label><input type="radio" name="block<?=$i?>[]" value="q<?=$i?>" <?=$$quotes?>> Quotes</label>
<label><input type="radio" name="block<?=$i?>[]" value="q<?=$i?>" <?=$$quotes?>> <?=$regpage_quote?></label>
<?php
}

Expand Down
2 changes: 1 addition & 1 deletion admin/inc/version.php
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<?php
$mc_version="6.8";
$mc_version="6.9";
?>
1 change: 1 addition & 0 deletions admin/locale/en/site_en.php
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@
$regpage_choose_gall = "Choose an existing gallery";
$regpage_post = "Last posts";
$regpage_post_desc = "Shows the last three posts from the blog";
$regpage_quote = "Quotes";
$regpage_contacts = "Contacts";
$regpage_maps = "Position on map";
$regpage_maps_title = "Insert your position on map";
Expand Down
1 change: 1 addition & 0 deletions admin/locale/it/site_it.php
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@
$regpage_choose_gall = "Scegli una galleria";
$regpage_post = "Ultimi post";
$regpage_post_desc = "Mostra gli ultimi tre post dal blog";
$regpage_quote = "Citazioni";
$regpage_contacts = "Contatti";
$regpage_maps = "Posizione sulla mappa";
$regpage_maps_title = "Inserimento posizione sulla mappa";
Expand Down

0 comments on commit f9314e4

Please sign in to comment.