{
	require_once($_SERVER["DOCUMENT_ROOT"]."/freetrix/modules/main/classes/general/xml.php");
	$objXML = new CDataXML();

	$xmlsrc = '<?xml version="1.0" encoding="UTF-8"?>
<playlist version="1" xmlns="http://xspf.org/ns/0/">
<trackList>';
	for ($i = 0, $l = count($ids); $i < $l; $i++)
	{
		$id = $ids[$i];
		$arTrack = Array(
			'title' => getPostVal('title', $id),
			'author' => getPostVal('author', $id),
			'location' => getPostVal('location', $id),
			'image' => getPostVal('image', $id),
			'duration' => getPostVal('duration', $id)
		);

		$xmlsrc .= "\n\t<track>\n";
		$xmlsrc .= getXMLNode('title', $arTrack['title']);
		$xmlsrc .= getXMLNode('creator', $arTrack['author']);
		$xmlsrc .= getXMLNode('location', $arTrack['location']);
		$xmlsrc .= getXMLNode('image', $arTrack['image']);
		$xmlsrc .= getXMLNode('duration', $arTrack['duration']);
		$xmlsrc .= "\t</track>";

		$arTracks[] = $arTrack;
	}
	$xmlsrc .= "\n</trackList>\n</playlist>";

	if (!defined("FX_UTF"))
$abs_path = $DOC_ROOT . $path;
$bCreate = !file_exists($abs_path);
if ($bCreate && (!$USER->CanDoFileOperation('fm_create_new_file', $arPath) || !$USER->CanDoOperation('fileman_edit_existent_files')) || !$bCreate && (!$USER->CanDoFileOperation('fm_edit_existent_file', $arPath) || !$USER->CanDoOperation('fileman_admin_files'))) {
    $APPLICATION->AuthForm(GetMessage("ACCESS_DENIED"));
}
$arTracks = array();
/* * * * * * * * * * * * * * POST * * * * * * * * * * * * * */
if ($REQUEST_METHOD == "POST" && $_REQUEST['save'] == 'Y') {
    require_once $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/main/classes/general/xml.php";
    $objXML = new CDataXML();
    $xmlsrc = '<?xml version="1.0" encoding="UTF-8"?>
<playlist version="1" xmlns="http://xspf.org/ns/0/">
<trackList>';
    for ($i = 0, $l = count($ids); $i < $l; $i++) {
        $id = $ids[$i];
        $arTrack = array('title' => getPostVal('title', $id), 'author' => getPostVal('author', $id), 'location' => getPostVal('location', $id), 'image' => getPostVal('image', $id), 'duration' => getPostVal('duration', $id));
        $xmlsrc .= "\n\t<track>\n";
        $xmlsrc .= getXMLNode('title', $arTrack['title']);
        $xmlsrc .= getXMLNode('creator', $arTrack['author']);
        $xmlsrc .= getXMLNode('location', $arTrack['location']);
        $xmlsrc .= getXMLNode('image', $arTrack['image']);
        $xmlsrc .= getXMLNode('duration', $arTrack['duration']);
        $xmlsrc .= "\t</track>";
        $arTracks[] = $arTrack;
    }
    $xmlsrc .= "\n</trackList>\n</playlist>";
    if (!defined("BX_UTF")) {
        $xmlsrc = $GLOBALS["APPLICATION"]->ConvertCharset($xmlsrc, 'Windows-1251', 'UTF-8');
    }
    if (!check_bitrix_sessid()) {
        $strWarning = GetMessage('PLAYLIST_EDIT_SESSION_EXPIRED');