Browse Source

Polished selector and file upload

master
OliverParoczai 4 years ago
parent
commit
87d339d62d
  1. 7
      admin/dataupload.php
  2. 6
      header.php

7
admin/dataupload.php

@ -12,7 +12,7 @@
</div>
<!-- Input Group -->
<div class="row clearfix">
<form class="col-lg-12 col-md-12 col-sm-12 col-xs-12" method="POST" action="#" enctype="multipart/form-data">
<form class="col-lg-12 col-md-12 col-sm-12 col-xs-12" method="POST" action="#" id="uploadform" enctype="multipart/form-data">
<div class="card">
<div class="header">
<?php
@ -108,9 +108,11 @@
<button type="button" class="btn bg-indigo waves-effect" onclick="document.getElementById('formfile').click();" style="vertical-align: text-top;">
<i class="material-icons">upload</i>
</button>
<a href="<?php echo $curdir; ?>API/request.php?type=image&subtype=<?php if($type == 2){ echo "company"; }else{ echo "school"; } ?>&id=<?php echo $selschvals["id"]; ?>" download="<?php if($type == 2){ echo "vallalat"; }else{ echo "iskola"; } ?>foto">
<button type="button" class="btn bg-green waves-effect" style="vertical-align: text-top;">
<i class="material-icons">download</i>
</button>
</a>
</div>
</div>
</div>
@ -327,5 +329,8 @@
$('.masked-input').find('.phone-number').inputmask('+36 99/999-9999', { placeholder: '+__ __/___-____' });
$('.masked-input').find('.postal-code').inputmask('9999', { placeholder: '____' });
});
document.getElementById("formfile").onchange = function() {
document.getElementById("uploadform").submit.click();
};
</script>
<?php mysqli_free_result($result); include "../footer.php"; ?>

6
header.php

@ -197,10 +197,10 @@ if(!isset($liteload) && $loggedin == false && $isadmin && $type != 1 && $type !=
$username = "Vendég";
$type = "0";
$sql = "SELECT * FROM `acctypes` WHERE `id` = '".$type."'";
mysqli_free_result($result);
$result = $conn->query($sql);
$sqlvals = $result->fetch_assoc();
$fulltype = $sqlvals["name_hun"];
mysqli_free_result($result);
}
?>
@ -362,6 +362,7 @@ if(!isset($liteload) && $loggedin == false && $isadmin && $type != 1 && $type !=
</li>
<!-- #END# Notifications -->
<!-- Tasks -->
<?php if(isset($connctdcmps) || isset($connctdschids)){ ?>
<li class="dropdown">
<a href="javascript:void(0);" class="dropdown-toggle" data-toggle="dropdown" role="button">
<i class="material-icons">business</i>
@ -443,6 +444,9 @@ if(!isset($liteload) && $loggedin == false && $isadmin && $type != 1 && $type !=
</ul>
</li>
<!-- #END# Tasks -->
<?php }else{
$ssname = "Nincs iskola kiválasztva";
} ?>
</ul>
</div>
</div>

Loading…
Cancel
Save