$row['id'], 'permalink' => @$row['permalink'], 'title' => trigger_event('AP_render_content', $row['title']), 'content' => trigger_event('AP_render_content', $row['content']), 'standalone' => ($row['standalone'] == 'true') ); // Utilisateurs autorisés if (!empty($row['users'])) { $authorized_users = explode(',', $row['users']); if (!is_admin() and $conf['additional_pages']['user_perm'] and !in_array($user['status'], $authorized_users)) { if ($page['ap_homepage']) return; page_forbidden(l10n('You are not authorized to access the requested page')); } } // Groupe autorisé if (!empty($row['groups'])) { $q = 'SELECT * FROM ' . USER_GROUP_TABLE . ' WHERE user_id = ' . $user['id'] . ' AND group_id IN (' . $row['groups'] . ');'; $array = mysql_fetch_array(pwg_query($q)); if (!is_admin() and $conf['additional_pages']['group_perm'] and empty($array)) { if ($page['ap_homepage']) return; page_forbidden(l10n('You are not authorized to access the requested page')); } } if ($page['additional_page']['standalone']) { echo $page['additional_page']['content']; exit; } add_event_handler('loc_end_index', 'ap_set_index'); function ap_set_index() { global $template, $page, $conf; $template->assign(array( 'TITLE' => $page['additional_page']['title'], 'PLUGIN_INDEX_CONTENT_BEGIN' => $page['additional_page']['content'], ) ); if ($conf['additional_pages']['show_home'] and !$page['ap_homepage']) { $template->assign('PLUGIN_INDEX_ACTIONS' , '