File tree Expand file tree Collapse file tree 4 files changed +19
-2
lines changed
Expand file tree Collapse file tree 4 files changed +19
-2
lines changed Original file line number Diff line number Diff line change 22header ('Content-Type: application/json ' );
33
44require_once '../../videos/configuration.php ' ;
5+
6+ if (!User::isAdmin ()) {
7+ forbiddenPage ('You must be Admin ' );
8+ }
9+
510allowOrigin ();
611$ obj = new stdClass ();
712$ obj ->error = true ;
Original file line number Diff line number Diff line change 44
55require_once '../../videos/configuration.php ' ;
66
7+ if (!User::isAdmin ()) {
8+ forbiddenPage (__ ('You cannot do this ' ));
9+ }
10+
711// Fetch request parameters with safety checks
812$ startDate = !empty ($ _REQUEST ['startDate ' ]) ? $ _REQUEST ['startDate ' ] . ' 00:00:00 ' : null ;
913$ endDate = !empty ($ _REQUEST ['endDate ' ]) ? $ _REQUEST ['endDate ' ] . ' 23:59:59 ' : null ;
Original file line number Diff line number Diff line change 33require_once $ global ['systemRootPath ' ] . 'plugin/AD_Server/Objects/VastCampaigns.php ' ;
44header ('Content-Type: application/json ' );
55
6+ if (!User::isAdmin ()) {
7+ forbiddenPage ('You must be Admin ' );
8+ }
9+
610$ rows = VastCampaigns::getAll ();
711?>
8- {"data": <?php echo json_encode ($ rows ); ?> }
12+ {"data": <?php echo json_encode ($ rows ); ?> }
Original file line number Diff line number Diff line change 33require_once $ global ['systemRootPath ' ] . 'plugin/AD_Server/Objects/VastCampaignsVideos.php ' ;
44header ('Content-Type: application/json ' );
55
6+ if (!User::isAdmin ()) {
7+ forbiddenPage ('You must be Admin ' );
8+ }
9+
610$ rows = VastCampaignsVideos::getAllFromCampaign (intval (@$ _POST ['id ' ]), true );
711?>
8- {"data": <?php echo json_encode ($ rows ); ?> }
12+ {"data": <?php echo json_encode ($ rows ); ?> }
You can’t perform that action at this time.
0 commit comments