Prerelease 28.09.2017
Change Installer Add function control SCCP Version.
This commit is contained in:
parent
c7b60b11cc
commit
f157110e8d
|
@ -22,6 +22,7 @@
|
||||||
* - WiFi Config (Bulk Deployment Utility for Cisco 7921, 7925, 7926)?????
|
* - WiFi Config (Bulk Deployment Utility for Cisco 7921, 7925, 7926)?????
|
||||||
* - Change internal use Field to _Field (new fiture support in chan_sccp )
|
* - Change internal use Field to _Field (new fiture support in chan_sccp )
|
||||||
* + Change Installer ?? (test )
|
* + Change Installer ?? (test )
|
||||||
|
* + DND Mode
|
||||||
* - suport kvstore ?????
|
* - suport kvstore ?????
|
||||||
* - Shared Line ????
|
* - Shared Line ????
|
||||||
* - bug Fix
|
* - bug Fix
|
||||||
|
@ -1085,8 +1086,6 @@ class Sccp_manager extends \FreePBX_Helpers implements \BMO {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$res = 0;
|
|
||||||
|
|
||||||
return $res;
|
return $res;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -191,8 +191,11 @@ class Sccp extends \FreePBX\modules\Core\Driver {
|
||||||
$select[] = array('value' => 'reject', 'text' => 'Reject');
|
$select[] = array('value' => 'reject', 'text' => 'Reject');
|
||||||
$select[] = array('value' => 'silent', 'text' => 'Silent');
|
$select[] = array('value' => 'silent', 'text' => 'Silent');
|
||||||
$select[] = array('value' => 'UserDefined', 'text' => 'UserDefined');
|
$select[] = array('value' => 'UserDefined', 'text' => 'UserDefined');
|
||||||
$tt = _("Do Not Disturb.");
|
$tt = _("DND: Means how will dnd react when it is set on the device level dnd can have three states: off / busy(reject) / silent / UserDefined").'<br>'.
|
||||||
$tmparr['dnd'] = array('prompttext' => _('DND'), 'value' => 'user', 'tt' => $tt, 'select' => $select, 'level' => 1, 'type' => 'radio');
|
_("UserDefined - dnd that cycles through all three states off -> reject -> silent -> off (this is the normal behaviour)").'<br>'.
|
||||||
|
_("Reject - Usesr can only switch off and on (in reject/busy mode)").'<br>'.
|
||||||
|
_("Silent - Usesr can only switch off and on (in silent mode)");
|
||||||
|
$tmparr['dnd'] = array('prompttext' => _('DND'), 'value' => 'UserDefined', 'tt' => $tt, 'select' => $select, 'level' => 1, 'type' => 'radio');
|
||||||
|
|
||||||
unset($select);
|
unset($select);
|
||||||
$select[] = array('value' => 'yes', 'text' => 'Yes');
|
$select[] = array('value' => 'yes', 'text' => 'Yes');
|
||||||
|
|
|
@ -52,12 +52,24 @@ class Sccp extends \FreePBX\modules\Core\Driver {
|
||||||
$sql = 'INSERT INTO sccpline (name, id';
|
$sql = 'INSERT INTO sccpline (name, id';
|
||||||
$sqlv = 'values ("'.$id.'", "'.$id.'"';
|
$sqlv = 'values ("'.$id.'", "'.$id.'"';
|
||||||
foreach($this->data_fld as $key => $val) {
|
foreach($this->data_fld as $key => $val) {
|
||||||
|
switch ($key) {
|
||||||
|
case 'dnd':
|
||||||
|
$sql .= ', '.$key;
|
||||||
|
if (!empty($settings[$val]['value'])){
|
||||||
|
$sqlv .= ", '".$settings[$val]['value']."' ";
|
||||||
|
} else {
|
||||||
|
$sqlv .= ", NULL ";
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
default:
|
||||||
if (!empty($settings[$val]) ) {
|
if (!empty($settings[$val]) ) {
|
||||||
if (!empty($settings[$val]['value'])){
|
if (!empty($settings[$val]['value'])){
|
||||||
$sql .= ', '.$key;
|
$sql .= ', '.$key;
|
||||||
$sqlv .= ", '".$settings[$val]['value']."' ";
|
$sqlv .= ", '".$settings[$val]['value']."' ";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
$sql .= ") ".$sqlv.");";
|
$sql .= ") ".$sqlv.");";
|
||||||
$sth = $this->database->prepare($sql);
|
$sth = $this->database->prepare($sql);
|
||||||
|
@ -137,7 +149,7 @@ class Sccp extends \FreePBX\modules\Core\Driver {
|
||||||
"flag" => $flag++
|
"flag" => $flag++
|
||||||
),
|
),
|
||||||
"dnd" => array(
|
"dnd" => array(
|
||||||
"value" => "UserDefined",
|
"value" => "",
|
||||||
"flag" => $flag++
|
"flag" => $flag++
|
||||||
),
|
),
|
||||||
"silencesuppression" => array(
|
"silencesuppression" => array(
|
||||||
|
@ -190,9 +202,12 @@ class Sccp extends \FreePBX\modules\Core\Driver {
|
||||||
$select[] = array('value' => 'off', 'text' => 'Off');
|
$select[] = array('value' => 'off', 'text' => 'Off');
|
||||||
$select[] = array('value' => 'reject', 'text' => 'Reject');
|
$select[] = array('value' => 'reject', 'text' => 'Reject');
|
||||||
$select[] = array('value' => 'silent', 'text' => 'Silent');
|
$select[] = array('value' => 'silent', 'text' => 'Silent');
|
||||||
$select[] = array('value' => 'UserDefined', 'text' => 'UserDefined');
|
$select[] = array('value' => '', 'text' => 'UserDefined');
|
||||||
$tt = _("Do Not Disturb.");
|
$tt = _("DND: Means how will dnd react when it is set on the device level dnd can have three states: off / busy(reject) / silent / UserDefined").'<br>'.
|
||||||
$tmparr['dnd'] = array('prompttext' => _('DND'), 'value' => 'user', 'tt' => $tt, 'select' => $select, 'level' => 1, 'type' => 'radio');
|
_("UserDefined - dnd that cycles through all three states off -> reject -> silent -> off (this is the normal behaviour)").'<br>'.
|
||||||
|
_("Reject - Usesr can only switch off and on (in reject/busy mode)").'<br>'.
|
||||||
|
_("Silent - Usesr can only switch off and on (in silent mode)");
|
||||||
|
$tmparr['dnd'] = array('prompttext' => _('DND'), 'value' => '', 'tt' => $tt, 'select' => $select, 'level' => 1, 'type' => 'radio');
|
||||||
|
|
||||||
unset($select);
|
unset($select);
|
||||||
$select[] = array('value' => 'yes', 'text' => 'Yes');
|
$select[] = array('value' => 'yes', 'text' => 'Yes');
|
||||||
|
|
137
install.php
137
install.php
|
@ -16,46 +16,45 @@ $db_config_v0 = array('sccpdevmodel' => array('enabled' => array('create' => "IN
|
||||||
'sccpdevice' => array(
|
'sccpdevice' => array(
|
||||||
'_hwlang' => array('create' => 'varchar(12) NULL DEFAULT NULL'),
|
'_hwlang' => array('create' => 'varchar(12) NULL DEFAULT NULL'),
|
||||||
// 'useRedialMenu' => array('create' => "VARCHAR(5) NULL DEFAULT 'no' AFTER `_hwlang`"),
|
// 'useRedialMenu' => array('create' => "VARCHAR(5) NULL DEFAULT 'no' AFTER `_hwlang`"),
|
||||||
// 'dtmfmode' => array('create' => "VARCHAR(10) default 'outofband'", 'modyfy' => "VARCHAR(10)", 'def_modyfy'=> 'outofband'),
|
// 'dtmfmode' => array('create' => "VARCHAR(10) default 'outofband'", 'modify' => "VARCHAR(10)", 'def_modify'=> 'outofband'),
|
||||||
'deny' => array('create' => 'VARCHAR(100) NULL DEFAULT NULL','modyfy' => "VARCHAR(100)"),
|
'deny' => array('create' => 'VARCHAR(100) NULL DEFAULT NULL','modify' => "VARCHAR(100)"),
|
||||||
'permit' => array('create' => 'VARCHAR(100) NULL DEFAULT NULL','modyfy' => "VARCHAR(100)"),
|
'permit' => array('create' => 'VARCHAR(100) NULL DEFAULT NULL','modify' => "VARCHAR(100)"),
|
||||||
'backgroundImage' => array('create' => 'VARCHAR(255) NULL DEFAULT NULL','modyfy' => "VARCHAR(255)"),
|
'backgroundImage' => array('create' => 'VARCHAR(255) NULL DEFAULT NULL','modify' => "VARCHAR(255)"),
|
||||||
'ringtone' => array('create' => 'VARCHAR(255) NULL DEFAULT NULL','modyfy' => "VARCHAR(255)"),
|
'ringtone' => array('create' => 'VARCHAR(255) NULL DEFAULT NULL','modify' => "VARCHAR(255)"),
|
||||||
|
|
||||||
'transfer' =>array('def_modyfy' => "on"),
|
'transfer' =>array('def_modify' => "on"),
|
||||||
'cfwdall' =>array('def_modyfy' => "on"),
|
'cfwdall' =>array('def_modify' => "on"),
|
||||||
'cfwdbusy' =>array('def_modyfy' => "on"),
|
'cfwdbusy' =>array('def_modify' => "on"),
|
||||||
'directrtp' =>array('def_modyfy' => "off"),
|
'directrtp' =>array('def_modify' => "off"),
|
||||||
'dndFeature' =>array('def_modyfy' => "on"),
|
'dndFeature' =>array('def_modify' => "on"),
|
||||||
'earlyrtp' =>array('def_modyfy' => "on"),
|
'earlyrtp' =>array('def_modify' => "on"),
|
||||||
'audio_tos'=>array('def_modyfy' => "0xB8"),
|
'audio_tos'=>array('def_modify' => "0xB8"),
|
||||||
'audio_cos'=>array('def_modyfy' => "6"),
|
'audio_cos'=>array('def_modify' => "6"),
|
||||||
'video_tos'=>array('def_modyfy' => "0x88"),
|
'video_tos'=>array('def_modify' => "0x88"),
|
||||||
'video_cos'=>array('def_modyfy' => "5"),
|
'video_cos'=>array('def_modify' => "5"),
|
||||||
|
|
||||||
'mwilamp' =>array('def_modyfy' => "on"),
|
'mwilamp' =>array('def_modify' => "on"),
|
||||||
'mwioncall' =>array('def_modyfy' => "on"),
|
'mwioncall' =>array('def_modify' => "on"),
|
||||||
'private' =>array('def_modyfy' => "on"),
|
'private' =>array('def_modify' => "on"),
|
||||||
'privacy' =>array('def_modyfy' => "off"),
|
'privacy' =>array('def_modify' => "off"),
|
||||||
'nat' =>array('def_modyfy' => "auto"),
|
'nat' =>array('def_modify' => "auto"),
|
||||||
'softkeyset' =>array('def_modyfy' => "softkeyset")
|
'softkeyset' =>array('def_modify' => "softkeyset")
|
||||||
),
|
),
|
||||||
|
|
||||||
'sccpline' => array('namedcallgroup' =>array('create' => "VARCHAR(100) NULL DEFAULT NULL AFTER `setvar`", 'modyfy' => "VARCHAR(100)"),
|
'sccpline' => array('namedcallgroup' =>array('create' => "VARCHAR(100) NULL DEFAULT NULL AFTER `setvar`", 'modify' => "VARCHAR(100)"),
|
||||||
'namedpickupgroup' =>array('create' => "VARCHAR(100) NULL DEFAULT NULL AFTER `namedcallgroup`", 'modyfy' => "VARCHAR(100)"),
|
'namedpickupgroup' =>array('create' => "VARCHAR(100) NULL DEFAULT NULL AFTER `namedcallgroup`", 'modify' => "VARCHAR(100)"),
|
||||||
'adhocNumber' =>array('create' => "VARCHAR(45) NULL DEFAULT NULL AFTER `namedpickupgroup`"),
|
'adhocNumber' =>array('create' => "VARCHAR(45) NULL DEFAULT NULL AFTER `namedpickupgroup`"),
|
||||||
'meetme' =>array('create' => "VARCHAR(5) NULL DEFAULT NULL AFTER `adhocNumber`"),
|
'meetme' =>array('create' => "VARCHAR(5) NULL DEFAULT NULL AFTER `adhocNumber`"),
|
||||||
'meetmenum' =>array('create' => "VARCHAR(45) NULL DEFAULT NULL AFTER `meetme`"),
|
'meetmenum' =>array('create' => "VARCHAR(45) NULL DEFAULT NULL AFTER `meetme`"),
|
||||||
'meetmeopts' =>array('create' => "VARCHAR(45) NULL DEFAULT NULL AFTER `meetmenum`"),
|
'meetmeopts' =>array('create' => "VARCHAR(45) NULL DEFAULT NULL AFTER `meetmenum`"),
|
||||||
'regexten' =>array('create' => "VARCHAR(45) NULL DEFAULT NULL AFTER `meetmeopts`"),
|
'regexten' =>array('create' => "VARCHAR(45) NULL DEFAULT NULL AFTER `meetmeopts`"),
|
||||||
'incominglimit' =>array('def_modyfy' => "2"),
|
'incominglimit' =>array('def_modify' => "2"),
|
||||||
'transfer' =>array('def_modyfy' => "on"),
|
'transfer' =>array('def_modify' => "on"),
|
||||||
'vmnum' =>array('def_modyfy' => "*97"),
|
'vmnum' =>array('def_modify' => "*97"),
|
||||||
'musicclass' =>array('def_modyfy' => "default"),
|
'musicclass' =>array('def_modify' => "default"),
|
||||||
'echocancel' =>array('def_modyfy' => "on"),
|
'echocancel' =>array('def_modify' => "on"),
|
||||||
'silencesuppression' =>array('def_modyfy' => "off"),
|
'silencesuppression' =>array('def_modify' => "off"),
|
||||||
'dndFeature' =>array('create' => 'VARCHAR( 12 ) DEFAULT "on" AFTER `amaflags`', 'modyfy' => "VARCHAR(12)", 'def_modyfy' =>"on"),
|
'dnd' =>array('create' => 'VARCHAR( 12 ) DEFAULT "reject" AFTER `amaflags`', 'modify' => "VARCHAR(12)", 'def_modify' =>"reject")
|
||||||
'dnd' =>array('create' => 'VARCHAR( 12 ) DEFAULT "reject" AFTER `amaflags`', 'modyfy' => "VARCHAR(12)", 'def_modyfy' =>"reject")
|
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -75,36 +74,35 @@ $db_config_v3 = array('sccpdevmodel' => array('enabled' => array('create' => "IN
|
||||||
'_hwlang' => array('create' => 'varchar(12) NULL DEFAULT NULL'),
|
'_hwlang' => array('create' => 'varchar(12) NULL DEFAULT NULL'),
|
||||||
'useRedialMenu' => array('create' => "VARCHAR(5) NULL DEFAULT 'no' AFTER `_hwlang`"),
|
'useRedialMenu' => array('create' => "VARCHAR(5) NULL DEFAULT 'no' AFTER `_hwlang`"),
|
||||||
|
|
||||||
// 'dtmfmode' => array('create' => "VARCHAR(10) default 'outofband'", 'modyfy' => "VARCHAR(10)", 'def_modyfy'=> 'outofband'),
|
// 'dtmfmode' => array('create' => "VARCHAR(10) default 'outofband'", 'modify' => "VARCHAR(10)", 'def_modify'=> 'outofband'),
|
||||||
'dtmfmode' => array('drop' => "yes"),
|
'dtmfmode' => array('drop' => "yes"),
|
||||||
|
|
||||||
'deny' => array('create' => 'VARCHAR(100) NULL DEFAULT NULL','modyfy' => "VARCHAR(100)"),
|
'deny' => array('create' => 'VARCHAR(100) NULL DEFAULT NULL','modify' => "VARCHAR(100)"),
|
||||||
'permit' => array('create' => 'VARCHAR(100) NULL DEFAULT NULL','modyfy' => "VARCHAR(100)"),
|
'permit' => array('create' => 'VARCHAR(100) NULL DEFAULT NULL','modify' => "VARCHAR(100)"),
|
||||||
'backgroundImage' => array('create' => 'VARCHAR(255) NULL DEFAULT NULL','modyfy' => "VARCHAR(255)"),
|
'backgroundImage' => array('create' => 'VARCHAR(255) NULL DEFAULT NULL','modify' => "VARCHAR(255)"),
|
||||||
'ringtone' => array('create' => 'VARCHAR(255) NULL DEFAULT NULL','modyfy' => "VARCHAR(255)"),
|
'ringtone' => array('create' => 'VARCHAR(255) NULL DEFAULT NULL','modify' => "VARCHAR(255)"),
|
||||||
|
|
||||||
'transfer' =>array('def_modyfy' => "on"),
|
'transfer' =>array('def_modify' => "on"),
|
||||||
'cfwdall' =>array('def_modyfy' => "on"),
|
'cfwdall' =>array('def_modify' => "on"),
|
||||||
'cfwdbusy' =>array('def_modyfy' => "on"),
|
'cfwdbusy' =>array('def_modify' => "on"),
|
||||||
'directrtp' =>array('def_modyfy' => "off"),
|
'directrtp' =>array('def_modify' => "off"),
|
||||||
'dndFeature' =>array('def_modyfy' => "on"),
|
'dndFeature' =>array('def_modify' => "on"),
|
||||||
'earlyrtp' =>array('def_modyfy' => "on"),
|
'earlyrtp' =>array('def_modify' => "on"),
|
||||||
'audio_tos'=>array('def_modyfy' => "0xB8"),
|
'audio_tos'=>array('def_modify' => "0xB8"),
|
||||||
'audio_cos'=>array('def_modyfy' => "6"),
|
'audio_cos'=>array('def_modify' => "6"),
|
||||||
'video_tos'=>array('def_modyfy' => "0x88"),
|
'video_tos'=>array('def_modify' => "0x88"),
|
||||||
'video_cos'=>array('def_modyfy' => "5"),
|
'video_cos'=>array('def_modify' => "5"),
|
||||||
'trustphoneip'=>array('drop' => "yes"),
|
'trustphoneip'=>array('drop' => "yes"),
|
||||||
|
|
||||||
'mwilamp' =>array('def_modyfy' => "on"),
|
'mwilamp' =>array('def_modify' => "on"),
|
||||||
'mwioncall' =>array('def_modyfy' => "on"),
|
'mwioncall' =>array('def_modify' => "on"),
|
||||||
'private' =>array('def_modyfy' => "on"),
|
'private' =>array('def_modify' => "on"),
|
||||||
'privacy' =>array('def_modyfy' => "off"),
|
'privacy' =>array('def_modify' => "off"),
|
||||||
'nat' =>array('def_modyfy' => "auto"),
|
'nat' =>array('def_modify' => "auto"),
|
||||||
'softkeyset' =>array('def_modyfy' => "softkeyset")
|
'softkeyset' =>array('def_modify' => "softkeyset")
|
||||||
),
|
),
|
||||||
|
'sccpline' => array('namedcallgroup' =>array('create' => "VARCHAR(100) NULL DEFAULT NULL AFTER `setvar`", 'modify' => "VARCHAR(100)"),
|
||||||
'sccpline' => array('namedcallgroup' =>array('create' => "VARCHAR(100) NULL DEFAULT NULL AFTER `setvar`", 'modyfy' => "VARCHAR(100)"),
|
'namedpickupgroup' =>array('create' => "VARCHAR(100) NULL DEFAULT NULL AFTER `namedcallgroup`", 'modify' => "VARCHAR(100)"),
|
||||||
'namedpickupgroup' =>array('create' => "VARCHAR(100) NULL DEFAULT NULL AFTER `namedcallgroup`", 'modyfy' => "VARCHAR(100)"),
|
|
||||||
'adhocNumber' =>array('create' => "VARCHAR(45) NULL DEFAULT NULL AFTER `namedpickupgroup`"),
|
'adhocNumber' =>array('create' => "VARCHAR(45) NULL DEFAULT NULL AFTER `namedpickupgroup`"),
|
||||||
'meetme' =>array('create' => "VARCHAR(5) NULL DEFAULT NULL AFTER `adhocNumber`"),
|
'meetme' =>array('create' => "VARCHAR(5) NULL DEFAULT NULL AFTER `adhocNumber`"),
|
||||||
'meetmenum' =>array('create' => "VARCHAR(45) NULL DEFAULT NULL AFTER `meetme`"),
|
'meetmenum' =>array('create' => "VARCHAR(45) NULL DEFAULT NULL AFTER `meetme`"),
|
||||||
|
@ -115,14 +113,13 @@ $db_config_v3 = array('sccpdevmodel' => array('enabled' => array('create' => "IN
|
||||||
'audio_cos' => array('drop' => "yes"),
|
'audio_cos' => array('drop' => "yes"),
|
||||||
'video_tos' => array('drop' => "yes"),
|
'video_tos' => array('drop' => "yes"),
|
||||||
'video_cos' => array('drop' => "yes"),
|
'video_cos' => array('drop' => "yes"),
|
||||||
'incominglimit' =>array('def_modyfy' => "2"),
|
'incominglimit' =>array('def_modify' => "2"),
|
||||||
'transfer' =>array('def_modyfy' => "on"),
|
'transfer' =>array('def_modify' => "on"),
|
||||||
'vmnum' =>array('def_modyfy' => "*97"),
|
'vmnum' =>array('def_modify' => "*97"),
|
||||||
'musicclass' =>array('def_modyfy' => "default"),
|
'musicclass' =>array('def_modify' => "default"),
|
||||||
'echocancel' =>array('def_modyfy' => "on"),
|
'echocancel' =>array('def_modify' => "on"),
|
||||||
'silencesuppression' =>array('def_modyfy' => "off"),
|
'silencesuppression' =>array('def_modify' => "off"),
|
||||||
'dndFeature' =>array('create' => 'VARCHAR( 12 ) DEFAULT "on" AFTER `amaflags`', 'modyfy' => "VARCHAR(12)", 'def_modyfy' =>"on"),
|
'dnd' =>array('create' => 'VARCHAR( 12 ) DEFAULT "reject" AFTER `amaflags`', 'modify' => "VARCHAR(12)", 'def_modify' =>"reject")
|
||||||
'dnd' =>array('create' => 'VARCHAR( 12 ) DEFAULT "reject" AFTER `amaflags`', 'modyfy' => "VARCHAR(12)", 'def_modyfy' =>"reject")
|
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -239,11 +236,11 @@ if (!empty($version)) {
|
||||||
$fld_id = $tabl_data[0];
|
$fld_id = $tabl_data[0];
|
||||||
if (!empty($tab_modify[$fld_id])) {
|
if (!empty($tab_modify[$fld_id])) {
|
||||||
$db_config[$tabl_name][$fld_id]['status'] = 'yes';
|
$db_config[$tabl_name][$fld_id]['status'] = 'yes';
|
||||||
if (!empty($tab_modify[$fld_id]['def_modyfy'])) {
|
if (!empty($tab_modify[$fld_id]['def_modify'])) {
|
||||||
if (strtoupper($tab_modify[$fld_id]['def_modyfy']) == strtoupper($tabl_data[4])) {
|
if (strtoupper($tab_modify[$fld_id]['def_modify']) == strtoupper($tabl_data[4])) {
|
||||||
$db_config[$tabl_name][$fld_id]['def_mod_stat'] = 'no';
|
$db_config[$tabl_name][$fld_id]['def_mod_stat'] = 'no';
|
||||||
}
|
}
|
||||||
if ( strtoupper ($tab_modify[$fld_id]['modyfy']) == strtoupper($tabl_data[1])) {
|
if ( strtoupper ($tab_modify[$fld_id]['modify']) == strtoupper($tabl_data[1])) {
|
||||||
$db_config[$tabl_name][$fld_id]['mod_stat'] = 'no';
|
$db_config[$tabl_name][$fld_id]['mod_stat'] = 'no';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -267,19 +264,19 @@ if (!empty($version)) {
|
||||||
$sql_modify .= 'CHANGE COLUMN `'.$row_fld.'` `'. $row_data['rename'].'` '.$row_data['create'].', ';
|
$sql_modify .= 'CHANGE COLUMN `'.$row_fld.'` `'. $row_data['rename'].'` '.$row_data['create'].', ';
|
||||||
|
|
||||||
}
|
}
|
||||||
if (!empty($row_data['modyfy'])) {
|
if (!empty($row_data['modify'])) {
|
||||||
if (empty($row_data['mod_stat'])) {
|
if (empty($row_data['mod_stat'])) {
|
||||||
if (!empty($row_data['create'])) {
|
if (!empty($row_data['create'])) {
|
||||||
$sql_modify .= "CHANGE COLUMN `".$row_fld."` `".$row_fld."` ".$row_data['create'].", ";
|
$sql_modify .= "CHANGE COLUMN `".$row_fld."` `".$row_fld."` ".$row_data['create'].", ";
|
||||||
} else {
|
} else {
|
||||||
$sql_modify .= "CHANGE COLUMN `".$row_fld."` `".$row_fld."` ".$row_data['modyfy']." DEFAULT '".$row_data['def_modyfy']."', ";
|
$sql_modify .= "CHANGE COLUMN `".$row_fld."` `".$row_fld."` ".$row_data['modify']." DEFAULT '".$row_data['def_modify']."', ";
|
||||||
}
|
}
|
||||||
$row_data['def_mod_stat'] = 'no';
|
$row_data['def_mod_stat'] = 'no';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!empty($row_data['def_modyfy'])) {
|
if (!empty($row_data['def_modify'])) {
|
||||||
if (empty($row_data['def_mod_stat'])) {
|
if (empty($row_data['def_mod_stat'])) {
|
||||||
$sql_modify .= "ALTER COLUMN `".$row_fld."` SET DEFAULT '".$row_data['def_modyfy']."', ";
|
$sql_modify .= "ALTER COLUMN `".$row_fld."` SET DEFAULT '".$row_data['def_modify']."', ";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!empty($row_data['drop'])) {
|
if (!empty($row_data['drop'])) {
|
||||||
|
|
|
@ -5,65 +5,19 @@
|
||||||
* and open the template in the editor.
|
* and open the template in the editor.
|
||||||
*/
|
*/
|
||||||
// vim: set ai ts=4 sw=4 ft=phtml:
|
// vim: set ai ts=4 sw=4 ft=phtml:
|
||||||
|
// print_r($this->sccpvalues['sccp_comatable']);
|
||||||
// $var_hw_config = $this->get_db_SccpTableData("get_sccpdevice_byid", array('id' => 'SEPB8BEBF224790'));
|
|
||||||
global $astman;
|
|
||||||
$ast_out = $astman->Command("sccp show version");
|
|
||||||
if (preg_match("/Release.*\(/", $ast_out['data'] , $matches)) {
|
|
||||||
$ast_out = explode(' ', substr($matches[0],9,-1));
|
|
||||||
$res = 0;
|
|
||||||
if ($ast_out[0] >= '4.3.0'){
|
|
||||||
$res = 1;
|
|
||||||
}
|
|
||||||
if (!empty($ast_out[1]) && $ast_out[1] == 'develop'){
|
|
||||||
$res = 10;
|
|
||||||
if (!empty($ast_out[3]) && $ast_out[3] >= '702487a'){
|
|
||||||
$res += 1;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
$res = 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
print_r(base_convert('702487a', 16, 10));
|
|
||||||
print_r('<br>');
|
|
||||||
print_r($version);
|
|
||||||
print_r('<br>');
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<form autocomplete="off" name="frm_general" id="frm_general" class="fpbx-submit" action="" method="post">
|
<form autocomplete="off" name="frm_general" id="frm_general" class="fpbx-submit" action="" method="post">
|
||||||
<input type="hidden" name="category" value="generalform">
|
<input type="hidden" name="category" value="generalform">
|
||||||
<input type="hidden" name="Submit" value="Submit">
|
<input type="hidden" name="Submit" value="Submit">
|
||||||
<?php
|
<?php
|
||||||
// print_r($this-> sccp_conf_init);
|
|
||||||
// print_r(@parse_ini_file($this->sccppath["sccp_conf"], true));
|
|
||||||
// print_r(\FreePBX::LoadConfig()->getConfig('sccp.conf'));
|
|
||||||
// print_r($this->FreePBX->LoadConfig('sccp.conf'));
|
|
||||||
// $this->sccp_create_tftp_XML();
|
|
||||||
// print_r($this->get_db_SccpTableData('SccpDevice'));
|
|
||||||
// print_r('<br>');
|
|
||||||
// print_r($this->sccp_get_active_devise());
|
|
||||||
// print_r(music_list());
|
|
||||||
// print_r($this->sccppath["sccp_conf"]);
|
|
||||||
// print_r($this-> getMyConfig('softkeyset'));
|
|
||||||
/*
|
|
||||||
$dev_tech ="sccp";
|
|
||||||
$drivers = FreePBX::Core()->getAllDrivers();
|
|
||||||
if(isset($drivers[$dev_tech])) {
|
|
||||||
$devopts = $drivers[$dev_tech]->getDevice('1234');
|
|
||||||
} else {
|
|
||||||
$devopts = array();
|
|
||||||
}
|
|
||||||
print_r($devopts);
|
|
||||||
*/
|
|
||||||
|
|
||||||
echo $this->ShowGroup('sccp_general',1);
|
echo $this->ShowGroup('sccp_general',1);
|
||||||
echo $this->ShowGroup('sccp_net',1);
|
echo $this->ShowGroup('sccp_net',1);
|
||||||
echo $this->ShowGroup('sccp_lang',1);
|
echo $this->ShowGroup('sccp_lang',1);
|
||||||
echo $this->ShowGroup('sccp_qos_config',1);
|
echo $this->ShowGroup('sccp_qos_config',1);
|
||||||
echo $this->ShowGroup('sccp_extpath_config',1);
|
echo $this->ShowGroup('sccp_extpath_config',1);
|
||||||
// $this->sccp_db_save_setting();
|
|
||||||
// $this->sccp_create_sccp_init();
|
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue