# vikbooking/trunk/libraries/html/widget/control/open.php

VikBooking Hotel Booking Engine &amp; PMS, version trunk. 40 lines.

- Page: https://pluginprobe.com/plugins/vikbooking/trunk/code/libraries/html/widget/control/open.php
- Raw: https://pluginprobe.com/plugins/vikbooking/trunk/raw/libraries/html/widget/control/open.php
- Modified: 2021-06-15T15:29:02+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/vikbooking/trunk/code/libraries/html/widget/control/open.php#L10-L20`.

```php
<?php
/** 
 * @package   	VikBooking - Libraries
 * @subpackage 	html.widget
 * @author    	E4J s.r.l.
 * @copyright 	Copyright (C) 2018 E4J s.r.l. All Rights Reserved.
 * @license  	http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
 * @link 		https://vikwp.com
 */

// No direct access
defined('ABSPATH') or die('No script kiddies please!');

$label  = isset($displayData['label']) 			? $displayData['label'] 		: '';
$desc  	= isset($displayData['description']) 	? $displayData['description'] 	: '';
$id 	= isset($displayData['id'])				? $displayData['id'] 			: '';
$req 	= isset($displayData['required']) 		? $displayData['required']		: 0;

$label = JText::translate($label);

if ($desc)
{
	$desc = JText::translate($desc);

	// make sure the description and the label don't contain the same text
	if ($desc != $label)
	{
		$label = VikApplication::getInstance()->textPopover(array(
			'title' 	=> $label,
			'content' 	=> $desc,
		));
	}
}

?>
<p>
	<label
		for="<?php echo esc_attr($id); ?>"
	><?php echo $label; ?><?php echo ($req ? '*' : ''); ?>:</label>

```
