false, 'code' => 'session', 'msg' => fxPromoteurHubTexte('promoteur_hub_ajax_session', 0), )); exit; } $intComId = intval($_SESSION['com_id']); if (!in_array($strAction, array('event_stats', 'event_links'), true) || $intEveId <= 0) { echo json_encode(array('ok' => false, 'msg' => fxPromoteurHubTexte('promoteur_hub_ajax_invalid', 0))); exit; } if (!fxPromoteurHubComHasEvent($intComId, $intEveId)) { echo json_encode(array('ok' => false, 'msg' => fxPromoteurHubTexte('promoteur_hub_ajax_denied', 0))); exit; } if ($strAction === 'event_stats') { if (!fxPromoteurHubCanViewDashboard($intComId, $intEveId)) { echo json_encode(array('ok' => false, 'msg' => fxPromoteurHubTexte('promoteur_hub_ajax_denied', 0))); exit; } $arrBundle = fxPromoteurHubRenderEventStatsBundle($intEveId, $strLangue); echo json_encode(array( 'ok' => true, 'flash' => $arrBundle['flash'], 'html' => $arrBundle['html'], )); exit; } $arrItem = fxPromoteurHubGetEventItemForLinks($intComId, $intEveId); if ($arrItem === null) { echo json_encode(array('ok' => false, 'msg' => fxPromoteurHubTexte('promoteur_hub_ajax_not_found', 0))); exit; } echo json_encode(array( 'ok' => true, 'html' => fxPromoteurHubRenderEventPanelContent($arrItem, $strLangue), ));