Browse Source

Polished selector and file upload

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

13
admin/dataupload.php

@ -12,7 +12,7 @@
</div> </div>
<!-- Input Group --> <!-- Input Group -->
<div class="row clearfix"> <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="card">
<div class="header"> <div class="header">
<?php <?php
@ -108,9 +108,11 @@
<button type="button" class="btn bg-indigo waves-effect" onclick="document.getElementById('formfile').click();" style="vertical-align: text-top;"> <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> <i class="material-icons">upload</i>
</button> </button>
<button type="button" class="btn bg-green waves-effect" style="vertical-align: text-top;"> <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">
<i class="material-icons">download</i> <button type="button" class="btn bg-green waves-effect" style="vertical-align: text-top;">
</button> <i class="material-icons">download</i>
</button>
</a>
</div> </div>
</div> </div>
</div> </div>
@ -327,5 +329,8 @@
$('.masked-input').find('.phone-number').inputmask('+36 99/999-9999', { placeholder: '+__ __/___-____' }); $('.masked-input').find('.phone-number').inputmask('+36 99/999-9999', { placeholder: '+__ __/___-____' });
$('.masked-input').find('.postal-code').inputmask('9999', { placeholder: '____' }); $('.masked-input').find('.postal-code').inputmask('9999', { placeholder: '____' });
}); });
document.getElementById("formfile").onchange = function() {
document.getElementById("uploadform").submit.click();
};
</script> </script>
<?php mysqli_free_result($result); include "../footer.php"; ?> <?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"; $username = "Vendég";
$type = "0"; $type = "0";
$sql = "SELECT * FROM `acctypes` WHERE `id` = '".$type."'"; $sql = "SELECT * FROM `acctypes` WHERE `id` = '".$type."'";
mysqli_free_result($result);
$result = $conn->query($sql); $result = $conn->query($sql);
$sqlvals = $result->fetch_assoc(); $sqlvals = $result->fetch_assoc();
$fulltype = $sqlvals["name_hun"]; $fulltype = $sqlvals["name_hun"];
mysqli_free_result($result);
} }
?> ?>
@ -362,6 +362,7 @@ if(!isset($liteload) && $loggedin == false && $isadmin && $type != 1 && $type !=
</li> </li>
<!-- #END# Notifications --> <!-- #END# Notifications -->
<!-- Tasks --> <!-- Tasks -->
<?php if(isset($connctdcmps) || isset($connctdschids)){ ?>
<li class="dropdown"> <li class="dropdown">
<a href="javascript:void(0);" class="dropdown-toggle" data-toggle="dropdown" role="button"> <a href="javascript:void(0);" class="dropdown-toggle" data-toggle="dropdown" role="button">
<i class="material-icons">business</i> <i class="material-icons">business</i>
@ -443,6 +444,9 @@ if(!isset($liteload) && $loggedin == false && $isadmin && $type != 1 && $type !=
</ul> </ul>
</li> </li>
<!-- #END# Tasks --> <!-- #END# Tasks -->
<?php }else{
$ssname = "Nincs iskola kiválasztva";
} ?>
</ul> </ul>
</div> </div>
</div> </div>

Loading…
Cancel
Save