本文整理汇总了PHP中formdata_from_db函数的典型用法代码示例。如果您正苦于以下问题:PHP formdata_from_db函数的具体用法?PHP formdata_from_db怎么用?PHP formdata_from_db使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了formdata_from_db函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: ConferenceSetup
function ConferenceSetup()
{
global $mysqli;
$session =& $_SESSION['ConferenceSetup'];
$smarty = smarty_init(dirname(__FILE__) . '/templates');
// Init message (Message)
$Message = isset($_REQUEST['msg']) ? $_REQUEST['msg'] : "";
// Init form data (Extension)
if (@$_REQUEST['submit'] == 'save') {
$Conference = formdata_from_post();
$Errors = formdata_validate($Conference);
if (count($Errors) == 0) {
formdata_save($Conference);
asterisk_UpdateConf('confbridge.conf');
asterisk_Reload();
header("Location: ConferenceSetup.php?msg=MODIFY_CONFERENCE");
die;
}
} else {
$Conference = formdata_from_db($_SESSION['_USER']['PK_Extension']);
}
// Init Available Accounts (Accounts)
$query = "\n\t\tSELECT\n\t\t\tExtensions.PK_Extension,\n\t\t\tExtension,\n Name\n\t\tFROM\n\t\t\tExtensions\n\t\tWHERE\n\t\t\tExtensions.Type IN ('Virtual', 'SipPhone')\n\t\tORDER BY Extension\n\t";
$result = $mysqli->query($query) or die($mysqli->error . $query);
$Accounts = array();
while ($row = $result->fetch_assoc()) {
$Accounts[] = $row;
}
$smarty->assign('Conference', $Conference);
$smarty->assign('Accounts', $Accounts);
$smarty->assign('Message', $Message);
$smarty->assign('Errors', $Errors);
return $smarty->fetch('ConferenceSetup.tpl');
}
示例2: NetworkSettings
function NetworkSettings()
{
$session =& $_SESSION['NetworkSettings'];
$smarty = smarty_init(dirname(__FILE__) . '/templates');
$Message = isset($_REQUEST['msg']) ? $_REQUEST['msg'] : "";
if (!empty($_REQUEST['submit'])) {
$Settings = formdata_from_post();
$Errors = formdata_validate($Settings, $variables);
if (count($Errors) == 0) {
$Message = 'SAVED_NETWORK_SETTINGS';
formdata_save($Settings);
set_network_interfaces($Settings);
asterisk_UpdateConf('sip.conf');
//asterisk_Reload();
}
$OldSettings = array_merge(formdata_from_db(), get_network_interfaces());
foreach ($OldSettings as $variable => $value) {
if (!isset($Settings[$variable])) {
$Settings[$variable] = $value;
}
}
} else {
$Settings = formdata_from_db();
}
$Interface = get_network_interfaces();
$smarty->assign('Errors', $Errors);
$smarty->assign('Message', $Message);
$smarty->assign('Settings', array_merge($Settings, $Interface));
return $smarty->fetch('NetworkSettings.tpl');
}
示例3: Extensions_DialTone_Modify
function Extensions_DialTone_Modify()
{
global $mysqli;
$session =& $_SESSION['Extensions_SimpleConf_Modify'];
$smarty = smarty_init(dirname(__FILE__) . '/templates');
// Init message (Message)
$Message = isset($_REQUEST['msg']) ? $_REQUEST['msg'] : "";
if (@$_REQUEST['submit'] == 'save') {
$Extension = formdata_from_post();
$Errors = formdata_validate($Extension);
if (count($Errors) == 0) {
if ($Extension['PK_Extension'] != '') {
$msg = 'MODIFY_DIALTONE_EXTENSION';
} else {
$msg = 'ADD_DIALTONE_EXTENSION';
}
$id = formdata_save($Extension);
header("Location: Extensions_List.php?hilight={$id}&msg={$msg}");
die;
}
} elseif (@$_REQUEST['PK_Extension'] != "") {
$Extension = formdata_from_db($_REQUEST['PK_Extension']);
} else {
$Extension = formdata_from_default();
}
$smarty->assign('Extension', $Extension);
$smarty->assign('Errors', $Errors);
return $smarty->fetch('Extensions_DialTone_Modify.tpl');
}
示例4: SystemClockSettings
function SystemClockSettings()
{
$session =& $_SESSION['SystemClockSettings'];
$smarty = smarty_init(dirname(__FILE__) . '/templates');
$Message = isset($_REQUEST['msg']) ? $_REQUEST['msg'] : "";
if (!empty($_REQUEST['submit'])) {
$Settings = formdata_from_post();
$Settings['Current_TimeZone'] = $Settings['TimeZones'][0];
$Settings['DisableNTP'] = $Settings['DisableNTPLast'];
$Errors = formdata_validate($Settings, $variables);
if (count($Errors) == 0) {
$Message = 'SAVED_SYSTEMCLOCK_SETTINGS';
formdata_save($Settings);
}
$OldSettings = formdata_from_db();
foreach ($OldSettings as $variable => $value) {
if (!isset($Settings[$variable])) {
$Settings[$variable] = $value;
}
}
} else {
$Settings = formdata_from_db();
}
$TimeZones = get_timezone_list();
$smarty->assign('Errors', $Errors);
$smarty->assign('Message', $Message);
$smarty->assign('Settings', $Settings);
$smarty->assign('TimeZones', $TimeZones);
$smarty->assign('CurrentTime', date("F j, Y, g:i a"));
return $smarty->fetch('SystemClockSettings.tpl');
}
示例5: Extensions_Queue_Modify
function Extensions_Queue_Modify()
{
global $mysqli;
$session =& $_SESSION['Extensions_Queue_Modify'];
$smarty = smarty_init(dirname(__FILE__) . '/templates');
// Init message (Message)
$Message = isset($_REQUEST['msg']) ? $_REQUEST['msg'] : "";
// Init Available ringing strategies (RingStrategies)
$query = "SELECT PK_RingStrategy, Name, Description FROM RingStrategies";
$result = $mysqli->query($query) or die($mysqli->error . $query);
$RingStrategies = array();
while ($row = $result->fetch_assoc()) {
$RingStrategies[] = $row;
}
// Init Available Members (Members)
$query = "\n\t\tSELECT\n\t\t\tExtensions.PK_Extension,\n\t\t\tExtension,\n Name\n\t\tFROM\n\t\t\tExtensions\n\t\tWHERE\n\t\t\tExtensions.Type IN ('Virtual', 'SipPhone')\n\t\tORDER BY Extension\n\t";
$result = $mysqli->query($query) or die($mysqli->error . $query);
$Members = array();
while ($row = $result->fetch_assoc()) {
$Members[] = $row;
}
// Init available Sounds (SoundsFiles)
$query = "\n\t\tSELECT\n\t\t\tPK_SoundFile,\n\t\t\tSoundFiles.Name,\n\t\t\tSoundFiles.Description,\n\t\t\tSoundLanguages.Name AS Language\n\t\tFROM\n\t\t\tSoundFiles\n\t\t\tINNER JOIN SoundEntries ON FK_SoundEntry = PK_SoundEntry\n\t\t\tINNER JOIN SoundFolders ON FK_SoundFolder = PK_SoundFolder\n\t\t\tINNER JOIN SoundLanguages ON FK_SoundLanguage = PK_SoundLanguage\n\t\tWHERE\n\t\t\tSoundFolders.Name = 'Call Queues'\n\t\tORDER BY\n\t\t\tSoundLanguages.Name ASC,\n\t\t\tSoundFiles.Name ASC\n\t";
$result = $mysqli->query($query) or die($mysqli->error);
$SoundFiles = array();
while ($row = $result->fetch_assoc()) {
$SoundFiles[$row['Language']][$row['PK_SoundFile']] = $row['Name'];
}
// Init available moh groups
$query = "SELECT * FROM Moh_Groups ORDER BY Name ASC";
$result = $mysqli->query($query) or die($mysqli->error);
$MohGroups = array();
while ($row = $result->fetch_assoc()) {
$MohGroups[] = $row;
}
// Init form data (Queue)
if (@$_REQUEST['submit'] == 'save') {
$Queue = formdata_from_post();
$Errors = formdata_validate($Queue);
if (count($Errors) == 0) {
$id = formdata_save($Queue);
asterisk_UpdateConf('queues.conf');
asterisk_Reload();
header("Location: Extensions_List.php?msg=MODIFY_QUEUE_EXTENSION&hilight={$id}");
die;
}
} elseif (@$_REQUEST['PK_Extension'] != "") {
$Queue = formdata_from_db($_REQUEST['PK_Extension']);
} else {
$Queue = array('MemberRingTime' => '16', 'NextWaitTime' => '5', 'WrapUpTime' => '30', 'PlayMohInQueue' => '1', 'AnnounceFrequency' => '90', 'FK_Sound_PickupAnnouncement' => '4552', 'FK_Sound_YouAreNext' => '4401', 'FK_Sound_ThereAre' => '4249', 'FK_Sound_CallsWaiting' => '4394', 'FK_Sound_HoldTime' => '4351', 'FK_Sound_Minutes' => '4361', 'FK_Sound_ThankYou' => '4243');
}
$smarty->assign('Queue', $Queue);
$smarty->assign('RingStrategies', $RingStrategies);
$smarty->assign('SoundFiles', $SoundFiles);
$smarty->assign('MohGroups', $MohGroups);
$smarty->assign('Members', $Members);
$smarty->assign('Message', $Message);
$smarty->assign('Errors', $Errors);
return $smarty->fetch('Extensions_Queue_Modify.tpl');
}
示例6: Extensions_Action_Modify
function Extensions_Action_Modify()
{
global $mysqli;
$session =& $_SESSION['IVR_Action_Modify_record_digits'];
$smarty = smarty_init(dirname(__FILE__) . '/templates');
if (@$_REQUEST['submit'] == 'save') {
$Action = formdata_from_post();
$Errors = formdata_validate($Action);
if (count($Errors) == 0) {
$id = formdata_save($Action);
header("Location: IVR_Actions.php?PK_Menu={$Action['FK_Menu']}&hilight={$id}");
die;
}
} elseif (@$_REQUEST['PK_Action'] != "") {
$Action = formdata_from_db($_REQUEST['PK_Action']);
} else {
$Action = formdata_from_default();
}
// Get available vars
$query = "SELECT DISTINCT(Variable) FROM IVR_Action_Params";
$result = $mysqli->query($query) or die($mysqli->error . $query);
while ($row = $result->fetch_row()) {
if (!empty($row[0])) {
$Variables[] = $row[0];
}
}
$smarty->assign('Action', $Action);
$smarty->assign('Variables', $Variables);
return $smarty->fetch('IVR_Actions_Modify.record_digits.tpl');
}
示例7: Groups_Popup_Create
function Groups_Popup_Create()
{
global $mysqli;
$smarty = smarty_init(dirname(__FILE__) . '/templates');
// Init form data (Group, Errors)
if (@$_REQUEST['submit'] == 'save') {
$Group = formdata_from_post();
$Errors = formdata_validate($Group);
if (count($Errors) == 0) {
$id = formdata_save($Group);
return '
<script type="text/javascript" src="../script/jquery.selectboxes.js"></script>
<script>
$("#Groups", opener.document).addOption("' . $id . '", "' . $Group['Name'] . '");
window.close();
</script>
';
}
} else {
if ($_REQUEST['PK_Group'] != "") {
$Group = formdata_from_db($_REQUEST['PK_Group']);
}
}
// Init Availabe Extensions
$query = "\n\t\tSELECT\n\t\t\tExtensions.PK_Extension AS PK_Extension,\n\t\t\tExtension,\n\t\t\tName\n\t\tFROM\n\t\t\tExtensions\n\t\tWHERE\n\t\t\tType IN ('Virtual','SipPhone')\n\t\tORDER BY\n\t\t\tExtension ASC\n\t";
$result = $mysqli->query($query) or die($mysqli->error . $query);
$Extensions = array();
while ($row = $result->fetch_assoc()) {
$Extensions[] = $row;
}
$smarty->assign('Errors', $Errors);
$smarty->assign('Group', $Group);
$smarty->assign('Extensions', $Extensions);
return $smarty->fetch('Groups_Popup_Create.tpl');
}
示例8: Groups_Modify
function Groups_Modify()
{
global $mysqli;
$smarty = smarty_init(dirname(__FILE__) . '/templates');
// Init form data (Group, Errors)
if (@$_REQUEST['submit'] == 'save') {
$Group = formdata_from_post();
$Errors = formdata_validate($Group);
if (count($Errors) == 0) {
$id = formdata_save($Group);
header("Location: Groups_List.php?msg=MODIFY_GROUP&hilight={$id}");
die;
}
} else {
if ($_REQUEST['PK_Group'] != "") {
$Group = formdata_from_db($_REQUEST['PK_Group']);
}
}
// Init Availabe Extensions
$query = "\n\t\tSELECT\n\t\t\tExtensions.PK_Extension AS PK_Extension,\n\t\t\tExtension,\n Name\n\t\tFROM\n\t\t\tExtensions\n\t\tWHERE\n\t\t\tType IN ('Virtual','SipPhone')\n\t\tORDER BY\n\t\t\tExtension ASC\n\t";
$result = $mysqli->query($query) or die($mysqli->error . $query);
$Extensions = array();
while ($row = $result->fetch_assoc()) {
$Extensions[] = $row;
}
$smarty->assign('Errors', $Errors);
$smarty->assign('Group', $Group);
$smarty->assign('Extensions', $Extensions);
return $smarty->fetch('Groups_Modify.tpl');
}
示例9: IVR_Menus_Modify
function IVR_Menus_Modify()
{
global $mysqli;
$session =& $_SESSION['IVR_Menus_Modify'];
$smarty = smarty_init(dirname(__FILE__) . '/templates');
if (@$_REQUEST['submit'] == 'save') {
$Menu = formdata_from_post();
$Errors = formdata_validate($Action);
if (count($Errors) == 0) {
if ($Menu['PK_Menu'] != '') {
$msg = 'MODIFY_MENU';
} else {
$msg = 'ADD_MENU';
}
$id = formdata_save($Menu);
header("Location: IVR_Menus.php?PK_Menu={$id}&msg={$msg}");
die;
}
} elseif (@$_REQUEST['PK_Menu'] != "") {
$Menu = formdata_from_db($_REQUEST['PK_Menu']);
} else {
$Menu = formdata_from_default();
}
$smarty->assign('Menu', $Menu);
$smarty->assign('Errors', $Errors);
return $smarty->fetch('IVR_Menus_Modify.tpl');
}
示例10: MOH_Groups_Modify
function MOH_Groups_Modify()
{
global $mysqli;
$session =& $_SESSION['MOH_Groups_Modify'];
$smarty = smarty_init(dirname(__FILE__) . '/templates');
// Init message (Message)
$Message = isset($_REQUEST['msg']) ? $_REQUEST['msg'] : "";
if (@$_REQUEST['submit'] == 'save') {
$Group = formdata_from_post();
$Errors = formdata_validate($Group);
if (count($Errors) == 0) {
if ($Group['PK_Group'] != '') {
$msg = 'MODIFY_MOH_GROUP';
} else {
$msg = 'ADD_MOH_GROUP';
}
$id = formdata_save($Group);
asterisk_UpdateConf('musiconhold.conf');
asterisk_Reload();
header("Location: MOH_Groups_List.php?hilight={$id}&msg={$msg}");
die;
}
} elseif (@$_REQUEST['PK_Group'] != "") {
$Group = formdata_from_db($_REQUEST['PK_Group']);
} else {
$Group = formdata_from_default();
}
$smarty->assign('Group', $Group);
$smarty->assign('Errors', $Errors);
return $smarty->fetch('MOH_Groups_Modify.tpl');
}
示例11: Account_Modify
function Account_Modify()
{
$session =& $_SESSION['Account_Modify'];
$smarty = smarty_init(dirname(__FILE__) . '/templates');
// Init message (Message)
$Message = isset($_REQUEST['msg']) ? $_REQUEST['msg'] : "";
// Init form data (Extension)
if (@$_REQUEST['submit'] == 'save') {
$Extension = formdata_from_post();
$Errors = formdata_validate($Extension);
if (count($Errors) == 0) {
$id = formdata_save($Extension);
asterisk_UpdateConf('sip.conf');
asterisk_UpdateConf('voicemail.conf');
asterisk_Reload();
header("Location: Account_Modify.php?msg=MODIFY_EXTENSION&hilight={$id}");
die;
}
} else {
$Extension = formdata_from_db($_SESSION['_USER']['PK_Extension']);
}
$smarty->assign('Extension', $Extension);
$smarty->assign('Message', $Message);
$smarty->assign('Errors', $Errors);
return $smarty->fetch('Account_Modify.tpl');
}
示例12: SoundLanguages_Modify
function SoundLanguages_Modify()
{
$session =& $_SESSION['Templates_Modify'];
$smarty = smarty_init(dirname(__FILE__) . '/templates');
// Init message (Message)
$Message = isset($_REQUEST['msg']) ? $_REQUEST['msg'] : "";
if (@$_REQUEST['submit'] == 'save') {
$SoundLanguage = formdata_from_post();
$Errors = formdata_validate($Rule);
if (count($Errors) == 0) {
if ($SoundLanguage['PK_SoundLanguage'] == '') {
$id = formdata_save($SoundLanguage);
header("Location: SoundLanguages_List.php?msg=CREATE_LANGUAGE&hilight={$id}");
die;
} else {
$id = formdata_save($SoundLanguage);
header("Location: SoundLanguages_List.php?msg=MODIFY_LANGUAGE&hilight={$id}");
die;
}
}
} elseif ($_REQUEST['PK_SoundLanguage'] != "") {
$SoundLanguage = formdata_from_db($_REQUEST['PK_SoundLanguage']);
}
$smarty->assign('SoundLanguage', $SoundLanguage);
$smarty->assign('Message', $Message);
return $smarty->fetch('SoundLanguages_Modify.tpl');
}
示例13: IVR_Options_Modify
function IVR_Options_Modify()
{
global $mysqli;
$session =& $_SESSION['IVR_Options_Modify'];
$smarty = smarty_init(dirname(__FILE__) . '/templates');
if (@$_REQUEST['submit'] == 'save') {
$Option = formdata_from_post();
$Errors = formdata_validate($Action);
if (count($Errors) == 0) {
if ($Option['PK_Option'] != '') {
$msg = 'MODIFY_OPTION';
} else {
$msg = 'ADD_OPTION';
}
$id = formdata_save($Option);
header("Location: IVR_Options_List.php?PK_Menu={$Option['FK_Menu']}&hilight={$id}&msg={$msg}");
die;
}
} elseif (@$_REQUEST['PK_Option'] != "") {
$Option = formdata_from_db($_REQUEST['PK_Option']);
} else {
$Option = formdata_from_default();
}
// Get available menus
$Menus = array();
$query = "SELECT PK_Menu, Name FROM IVR_Menus ORDER BY Name";
$result = $mysqli->query($query) or die($mysqli->error . $query);
while ($row = $result->fetch_assoc()) {
$menu = $row;
$query2 = "SELECT * FROM IVR_Actions WHERE FK_Menu = '{$menu['PK_Menu']}' ORDER BY `Order`";
$result2 = $mysqli->query($query2) or die($mysqli->error . $query2);
while ($row2 = $result2->fetch_assoc()) {
$action = $row2;
$query3 = "SELECT * FROM IVR_Action_Params WHERE FK_Action = {$action['PK_Action']}";
$result3 = $mysqli->query($query3) or die($mysqli->error . $query3);
while ($row3 = $result3->fetch_assoc()) {
$action['Param'][$row3['Name']] = $row3['Value'];
$action['Var'][$row3['Name']] = $row3['Variable'];
}
$menu['Actions'][] = $action;
}
$Menus[] = $menu;
}
// Get used keys
$UsedKeys = array();
$query = "SELECT `Key` FROM IVR_Options WHERE PK_Option != '{$Option['PK_Option']}' AND FK_Menu={$Option['FK_Menu']}";
$result = $mysqli->query($query) or die($mysqli->error . $query);
while ($row = $result->fetch_assoc()) {
$UsedKeys[] = $row['Key'];
}
$smarty->assign('Menus', $Menus);
$smarty->assign('Option', $Option);
$smarty->assign('UsedKeys', $UsedKeys);
return $smarty->fetch('IVR_Options_Modify.tpl');
}
示例14: SoundFiles_Modify
function SoundFiles_Modify()
{
global $mysqli;
$session =& $_SESSION['SoundFiles_Modify'];
$smarty = smarty_init(dirname(__FILE__) . '/templates');
// Init message (Message)
$Message = isset($_REQUEST['msg']) ? $_REQUEST['msg'] : "";
if (@$_REQUEST['submit'] == 'save') {
$SoundFile = formdata_from_post();
$Errors = formdata_validate($SoundFile);
if (count($Errors) == 0) {
$id = formdata_save($SoundFile);
header("Location: SoundEntries_List.php?msg=MODIFY_ENTRY&hilight={$SoundFile['FK_SoundEntry']}");
die;
}
} elseif ($_REQUEST['PK_SoundFile'] != "") {
$SoundFile = formdata_from_db($_REQUEST['PK_SoundFile']);
}
$query = "SELECT PK_SoundFolder, Name FROM SoundFolders ORDER BY Name";
$result = $mysqli->query($query) or die($mysqli->error);
while ($row = $result->fetch_assoc()) {
$SoundFolders[] = $row;
}
$query = "SELECT PK_SoundLanguage, Name FROM SoundLanguages ORDER BY Name";
$result = $mysqli->query($query) or die($mysqli->error);
while ($row = $result->fetch_assoc()) {
$SoundLanguages[] = $row;
}
if ($_REQUEST['PK_SoundEntry'] != "") {
$PK_SoundEntry = $_REQUEST['PK_SoundEntry'];
} elseif ($SoundFile['PK_SoundFile'] != "") {
$PK_SoundEntry = $SoundFile['FK_SoundEntry'];
}
if ($_REQUEST['PK_SoundLanguage'] != "") {
$PK_SoundLanguage = $_REQUEST['PK_SoundLanguage'];
} elseif ($SoundFile['PK_SoundFile'] != "") {
$PK_SoundLanguage = $SoundFile['FK_SoundLanguage'];
}
if ($PK_SoundEntry != "") {
$query = "SELECT FK_SoundFolder FROM SoundEntries WHERE PK_SoundEntry = {$PK_SoundEntry} LIMIT 1";
$result = $mysqli->query($query) or die($mysqli->error . $query);
$row = $result->fetch_array();
$PK_SoundFolder = $row[0];
}
$smarty->assign('SoundFile', $SoundFile);
$smarty->assign('SoundFolders', $SoundFolders);
$smarty->assign('SoundLanguages', $SoundLanguages);
$smarty->assign('PK_SoundEntry', $PK_SoundEntry);
$smarty->assign('PK_SoundLanguage', $PK_SoundLanguage);
$smarty->assign('PK_SoundFolder', $PK_SoundFolder);
$smarty->assign('Message', $Message);
$smarty->assign('Errors', $Errors);
return $smarty->fetch('SoundFiles_Modify.tpl');
}
示例15: VoipProviders_Modify
function VoipProviders_Modify()
{
global $mysqli;
$session =& $_SESSION['VoipProviders_Modify'];
$smarty = smarty_init(dirname(__FILE__) . '/templates');
// myprint($_REQUEST);
// Init message (Message)
$Message = isset($_REQUEST['msg']) ? $_REQUEST['msg'] : "";
// Init Available DTMF Modes (DTMFModes)
$query = "SELECT PK_DTMFMode, Name, Description FROM DTMFModes";
$result = $mysqli->query($query) or die($mysqli->errno());
$DTMFModes = array();
while ($row = $result->fetch_assoc()) {
$DTMFModes[] = $row;
}
// Init available codecs (Codecs)
$query = "SELECT PK_Codec, Name, Description, Recomended FROM Codecs";
$result = $mysqli->query($query) or die($mysqli->error);
$Codecs = array();
while ($row = $result->fetch_assoc()) {
$Codecs[] = $row;
}
// Init available outgoing rules (Rules)
$query = "SELECT * FROM OutgoingRules ORDER BY Name";
$result = $mysqli->query($query) or die($mysqli->errno());
$Rules = array();
while ($row = $result->fetch_assoc()) {
$Rules[] = $row;
}
// Init form data (Providers)
if ($_REQUEST['submit'] == 'save') {
$Provider = formdata_from_post();
$Errors = formdata_validate($Provider);
if (count($Errors) == 0) {
$id = formdata_save($Provider);
asterisk_UpdateConf('sip.conf');
asterisk_UpdateConf('extensions.conf');
asterisk_Reload();
header("Location: VoipProviders_List.php?msg=MODIFY_SIP_PROVIDER&hilight={$id}");
die;
}
} elseif ($_REQUEST['PK_SipProvider'] != "") {
$Provider = formdata_from_db($_REQUEST['PK_SipProvider']);
} else {
$Provider = formdata_from_default();
}
$smarty->assign('Provider', $Provider);
$smarty->assign('DTMFModes', $DTMFModes);
$smarty->assign('Codecs', $Codecs);
$smarty->assign('Message', $Message);
$smarty->assign('Errors', $Errors);
$smarty->assign('Rules', $Rules);
return $smarty->fetch('VoipProviders_Modify.tpl');
}