invoice.php
52 lines
| 1 | <?php |
| 2 | /** |
| 3 | * @package VikAppointments |
| 4 | * @subpackage core |
| 5 | * @author E4J s.r.l. |
| 6 | * @copyright Copyright (C) 2021 E4J s.r.l. All Rights Reserved. |
| 7 | * @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL |
| 8 | * @link https://vikwp.com |
| 9 | */ |
| 10 | |
| 11 | // No direct access |
| 12 | defined('ABSPATH') or die('No script kiddies please!'); |
| 13 | |
| 14 | /** |
| 15 | * Layout variables |
| 16 | * ----------------- |
| 17 | * @param integer id The ID of the invoice. |
| 18 | * @param string number The invoice unique number. |
| 19 | * @param string file The file (URI) to which the invoice is linked. |
| 20 | * @param string name An optional file name to use. |
| 21 | */ |
| 22 | extract($displayData); |
| 23 | |
| 24 | if (!isset($name)) |
| 25 | { |
| 26 | // missing name, extract it from the file name |
| 27 | $name = preg_split("/[\/\\\\]/", $file); |
| 28 | $name = preg_replace("/\.pdf$/", '', end($name)); |
| 29 | } |
| 30 | |
| 31 | ?> |
| 32 | |
| 33 | <div class="vap-archive-fileblock"> |
| 34 | |
| 35 | <div class="vap-archive-fileicon"> |
| 36 | <img src="<?php echo VAPASSETS_ADMIN_URI . 'images/invoice@big.png'; ?>" /> |
| 37 | </div> |
| 38 | |
| 39 | <div class="vap-archive-filename"> |
| 40 | <a href="<?php echo $file; ?>?t=<?php echo time(); ?>" target="_blank"> |
| 41 | <?php echo $number; ?> |
| 42 | </a> |
| 43 | |
| 44 | <br /> |
| 45 | |
| 46 | <small class="break-word"><?php echo $name; ?></small> |
| 47 | </div> |
| 48 | |
| 49 | <input type="checkbox" style="display:none;" id="cb<?php echo md5($number . $name); ?>" name="cid[]" value="<?php echo $id; ?>" onchange="<?php echo VAPApplication::getInstance()->checkboxOnClick(); ?>" /> |
| 50 | |
| 51 | </div> |
| 52 |