-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathj00501a_cmf_settings.class.php
81 lines (66 loc) · 2.59 KB
/
j00501a_cmf_settings.class.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
<?php
/**
* Core file.
*
* @author Vince Wooll <[email protected]>
*
* @version Jomres 9.21.4
*
* @copyright 2005-2021 Vince Wooll
* Jomres (tm) PHP, CSS & Javascript files are released under both MIT and GPL2 licenses. This means that you can choose the license that best suits your project, and use it accordingly
**/
// ################################################################
defined('_JOMRES_INITCHECK') or die('');
// ################################################################
/**
* @package Jomres\Core\Minicomponents
*
* Property Configuration page tabs. Offers booking form related configuration options.
*
*/
class j00501a_cmf_settings
{
/**
*
* Constructor
*
* Main functionality of the Minicomponent
*
*
*
*/
public function __construct($componentArgs)
{
// Must be in all minicomponents. Minicomponents with templates that can contain editable text should run $this->template_touch() else just return
$MiniComponents = jomres_singleton_abstract::getInstance('mcHandler');
if ($MiniComponents->template_touch) {
$this->template_touchable = false;
return;
}
$configurationPanel = $componentArgs[ 'configurationPanel' ];
$mrConfig = getPropertySpecificSettings();
if ($mrConfig[ 'is_real_estate_listing' ] == 1) {
return;
}
if (!isset($mrConfig['api_privacy_off'] )) {
$mrConfig['api_privacy_off'] = 0;
$query = "INSERT INTO #__jomres_settings (property_uid,akey,value) VALUES ('".(int) get_showtime("property_uid")."','api_privacy_off','".$mrConfig['api_privacy_off']."')";
doInsertSql($query, jr_gettext('_JOMRES_MR_AUDIT_EDIT_PROPERTY_SETTINGS', '_JOMRES_MR_AUDIT_EDIT_PROPERTY_SETTINGS', false));
}
$yesno = array();
$yesno[] = jomresHTML::makeOption( '0', jr_gettext('_CMF_API_PRIVACY_ON','_CMF_API_PRIVACY_ON') );
$yesno[] = jomresHTML::makeOption( '1', jr_gettext('_CMF_API_PRIVACY_OFF','_CMF_API_PRIVACY_OFF') );
$lists = array();
$lists['api_privacy_off'] = jomresHTML::selectList( $yesno, 'cfg_api_privacy_off', 'class="inputbox" size="1"', 'value', 'text', $mrConfig['api_privacy_off'] );
$configurationPanel->startPanel(jr_gettext('_OAUTH_SCOPE_CHANNEL_MANAGEMENT','_OAUTH_SCOPE_CHANNEL_MANAGEMENT',false,false));
$configurationPanel->setleft(jr_gettext('_CMF_API_PRIVACY','_CMF_API_PRIVACY',false,false));
$configurationPanel->setmiddle($lists['api_privacy_off']);
$configurationPanel->setright(jr_gettext('_CMF_API_PRIVACY_DESC','_CMF_API_PRIVACY_DESC',false,false));
$configurationPanel->insertSetting();
$configurationPanel->endPanel();
}
public function getRetVals()
{
return null;
}
}