get('id');
if (isset($_GET['event_id']))
{
$id = intval($_GET['event_id']);
$result = mysql_query("SELECT DISTINCT email, cb_telephone,time
FROM (
`pts2_jevents_vevent`,`pts2_users`
INNER JOIN `pts2_comprofiler` ON `pts2_users`.`id` = `pts2_comprofiler`.`user_id`
)
INNER JOIN `pts2_vebinar_statistic` ON `pts2_vebinar_statistic`.user_id = `pts2_users`.`id`
WHERE `pts2_vebinar_statistic`.`event_id`=$id AND `pts2_jevents_vevent`.`sponsor_user`=$sponsorId");
$result1 = mysql_query("SELECT summary, dtstart,dtend FROM `pts2_jevents_vevent` INNER JOIN
`pts2_jevents_vevdetail` ON `pts2_jevents_vevent`.`ev_id`=`pts2_jevents_vevdetail`.`evdet_id`
WHERE `pts2_jevents_vevent`.`sponsor_user`=$sponsorId AND `pts2_jevents_vevent`.`ev_id`=$id");
$row1 = mysql_fetch_array($result1);
echo '
'.$row1['summary'].'
';
echo '
'.date("d.m.Y",$row1['dtstart']).'
';
echo "
Экспорт в Excel";
echo "
Email | Телефон | Время посещения | ";
while($rows = mysql_fetch_array($result))
{ if(empty($rows['email']))
$rows['email'] = ' - ';
if(empty($rows['cb_telephone']))
$rows['cb_telephone'] = ' - ';
echo ''.$rows['email'].' | '.$rows['cb_telephone'].' |
'.$rows['time'].' |
';
}
echo "
";
}
else
{
$result = mysql_query("SELECT summary, dtstart,dtend, visitors,ev_id FROM `pts2_jevents_vevent` INNER JOIN
`pts2_jevents_vevdetail` ON `pts2_jevents_vevent`.`ev_id`=`pts2_jevents_vevdetail`.`evdet_id`
WHERE `pts2_jevents_vevent`.`sponsor_user`=$sponsorId ORDER BY dtend DESC");
echo "
Комната | Время проведения | Уникальных посетителей | ";
while($rows = mysql_fetch_array($result))
{
if(empty($rows['visitors']))
$rows['visitors'] = ' - ';
echo '';
echo ''.$rows['summary'].' | ';
echo ''.date("d.m.y H:i",$rows['dtstart']).' - '.date("H:i",$rows['dtend']).' |
'.$rows['visitors'].' |
';
}
echo "
";
}
?>