Example #1
0
function GetCrlf()
{
    return GetPlatform() == 'win' ? "\r\n" : "\n";
}
Example #2
0
    }
    // Update Users Configuration
    $data[$exten] = $extension;
    // Reformat the $data
    $data = removeNonIntSections($data);
    $data = removeEmptyPasswords($data);
    // Save the file
    $fonb->write_users($data);
    header("Location: users.php");
    exit;
}
### VIEW the edit user form
// Creat the listusers object
$Json = array();
$Json['EditExtension'] = $users[$exten];
$Json['EditExtension']['Platform'] = GetPlatform();
$Json['Departments'] = $fonb->getDepartments();
//$Json['RingGroups'] = getRingGroups();
$Json['RingGroups'] = RingGroupsOf($exten);
//$Json['Queues'] = getQueues();
$Json['Queues'] = QueuesOf($exten);
$Json['DeletedExtensions'] = getDeletedExtensions();
$Json['Extensions'] = MustacheReformatExtensions(getExtensions());
$Json['License'] = $fonb->getTotalUsersAllowed();
if ($_GET['encode'] == 'json') {
    echo json_encode($Json);
    exit;
}
// Get the Handlebars Template
$EditUserTemplateFilePath = realpath("../templates/admin/edituser.html");
if ($EditUserTemplateFilePath === false) {