' . $user->lang['TRIGGER_FORUM'] . '' : ''; $f_ids = array(); foreach ($options['f_ids'] as $f_id => $void) { $f_ids[] = $f_id; } $s_forums = $trigger_option . make_forum_select($f_ids); $template->assign_var('S_FORUMS', $s_forums); // Grab the list of permission options $sql_founder = ($user->data['user_type'] == USER_FOUNDER) ? ' AND founder_only <> 1' : ''; $sql = "SELECT auth_option_id, auth_option FROM " . ACL_OPTIONS_TABLE . " WHERE auth_option LIKE 'f_%' AND auth_option <> 'f_' $sql_founder"; $result = $db->sql_query($sql); // Output all permissions while ($row = $db->sql_fetchrow($result)) { $l_auth_option = (!empty($user->lang['acl_' . $row['auth_option']])) ? $user->lang['acl_' . $row['auth_option']] : $row['auth_option']; // Default to ignore if (!isset($options[$row['auth_option']])) { $options[$row['auth_option']] = '*'; } switch (strval($options[$row['auth_option']])) { case '*': $template->assign_block_vars('eva_options', array('S_IGNORE' => true)); break; case '1': $template->assign_block_vars('eva_options', array('S_YES' => true)); break; case '-1': $template->assign_block_vars('eva_options', array('S_UNSET' => true)); break; case '0': $template->assign_block_vars('eva_options', array('S_NO' => true)); break; } $template->alter_block_array('eva_options', array( 'L_OPTION' => $l_auth_option, 'OPTION' => $row['auth_option'] ), true, 'change'); } $db->sql_freeresult($result); // Return true since some output was generated return true; } /** * This function turns the request data into an array to store with the event. */ function retrieve_options($provided_info) { global $db, $user; // Grab the list of options ... $sql_founder = ($user->data['user_type'] == USER_FOUNDER) ? ' AND founder_only <> 1' : ''; $sql = "SELECT auth_option_id, auth_option FROM " . ACL_OPTIONS_TABLE . " WHERE auth_option LIKE 'u_%' AND auth_option <> 'u_' $sql_founder"; $result = $db->sql_query($sql); $options = array(); while ($row = $db->sql_fetchrow($result)) { $val = request_var('eva_auth_' . $row['auth_option'], '*'); if ($val != '*') { $options[$row['auth_option']] = intval($val); } } $db->sql_freeresult($result); $options['f_ids'] = request_var('eva_f_ids', array(0 => 0)); if ($options['f_ids'] == array(0)) { return array(EVT_ERROR, $user->lang['SELECT_FORUM']); } if (!sizeof($options)) { return array(EVT_ERROR, $user->lang['SELECT_PERMISSION']); } return array(EVT_SUCCESS, $options); } } ?>