<?session_start();?>
<?require($_SERVER["DOCUMENT_ROOT"].
"/bitrix/modules/main/include/prolog_before.php";);?>
<div align="center" style="color:#03F"><b>
<?php echo date("H:i:s";);
?></b></div>
<?php
header('Content-type: application/vnd.ms-excel; charset=windows-1251;');
header('Content-disposition: attachment; filename="report_' . date("Y-m-d";) . '.xls"');
?>
<table>
<tr>
<td style="background-color: #FFFF00; text-align: left; font-weight: bold; border-right: .5pt solid black; border-bottom: 1pt solid black;">ARTICLE</td>
<td style="background-color: #FFFF00; text-align: center; font-weight: bold; border-right: .5pt solid black; border-bottom: 1pt solid black;">NAME</td>
<td style="background-color: #FFFF00; text-align: left; font-weight: bold; border-right: .5pt solid black; border-bottom: 1pt solid black;">CATALOG_PRICE</td>
<td style="background-color: #FFFF00; text-align: left; font-weight: bold; border-right: .5pt solid black; border-bottom: 1pt solid black;">PREVIEW_PICTURE</td>
<td style="background-color: #FFFF00; text-align: left; font-weight: bold; border-right: .5pt solid black; border-bottom: 1pt solid black;">DETAIL_PAGE_URL</td>
</tr>
<?
$i=1;
foreach($_SESSION['my_array']["ITEMS"] as $items)
{
$i=$i+1;
print '<tr>';
print '<td style="border-right: .5pt solid black; border-bottom: 1pt solid black;">'.$_SESSION["my_array"]["ITEMS"][$i][PROPERTIES][CML2_ARTICLE][VALUE].'</td>';
print '<td style="border-right: .5pt solid black; border-bottom: 1pt solid black;">'.$_SESSION["my_array"]["ITEMS"][$i][NAME].'</td>';
print '<td style="border-right: .5pt solid black; border-bottom: 1pt solid black;">'.$_SESSION["my_array"]["ITEMS"][$i][CATALOG_PRICE_4].'</td>';
print '<td style="border-right: .5pt solid black; border-bottom: 1pt solid black;"><img src="'.$_SESSION["my_array"]["ITEMS"][$i]["PREVIEW_PICTURE"]["SRC"].'" width="" height=""></td>';
print '<td style="border-right: .5pt solid black; border-bottom: 1pt solid black;">http://mysite.ru'.$_SESSION["my_array"]["ITEMS"][$i][DETAIL_PAGE_URL].'</td>';
print '</tr>';
}
?>
</table> |