Current File : /home/karenpetzb/application/modules/backoffice/views/scripts/footer/doc.phtml |
<div class="table-box">
<form action="<?php echo $this->baseUrl; ?>/backoffice/footer/adddoc" method="post" name="addDoc" enctype="multipart/form-data" >
<table class="table">
<thead>
<tr>
<th class="col-md-4" colspan="2"><?php echo $this->titlePage; ?></th>
</tr>
</thead>
<tbody>
<?php echo $this->render("alert_tr.phtml"); ?>
<tr class="nostriped">
<td class="col-md-4"><i class="glyphicon glyphicon-asterisk"></i> Document</td>
<td class="col-md-8"><input type="file" name="file" id ="file" size="50" ><i>Extensions : pdf</i></td>
</tr>
<tr class="nostriped">
<td colspan="2" class="text-center">
<button class="btn btn-success" type="submit" name="add"><i class="glyphicon glyphicon-plus"></i> Ajouter</button>
</td>
</tr>
</tbody>
</table>
</form>
</div>
<div class="clearfix"></div>
<div class="table-box">
<table class="display table" id="optionTable" width="100%">
<thead>
<tr>
<th>Documents</th>
</tr>
</thead>
<tbody>
<?php
$files = glob("doc/*.pdf");
$count = 0;
for ($i=0; $i <sizeof($files); $i++) {
?>
<tr>
<td>
<form action="<?php echo $this->baseUrl; ?>/backoffice/footer/deldoc" method="post" id="delDocForm<?php echo $count;?>">
<div class="col-md-8 no-space-top"><a href="<?php echo '/'.$files[$i]; ?>" target="_blank"><?php echo '/'.$files[$i]; ?></a></div>
<div class="col-md-4 no-space-top">
<input type="hidden" name="doc" value="<?php echo $files[$i]; ?>" >
<div class="btn-group">
<button class="btn btn-danger btn-modal" type="button" data-toggle="ajaxModalSubmitDelete" data-form="delDocForm<?php echo $count;?>" ><i class="glyphicon glyphicon-trash"></i> Supprimer</button>
</div>
</div>
</form>
</td>
</tr>
<?php $count++; } ?>
</tbody>
</table>
</div>