get_results($sql); if ($wpdb->num_rows > 0) { foreach ($questions as $question) { $question_id = $question->id; $question_name = stripslashes($question->question); $question_values = stripslashes($question->response); $question_type = stripslashes($question->question_type); $required = stripslashes($question->required); $sequence = $question->sequence; $required_text = $question->required_text; $admin_only = $question->admin_only; $system_name = $question->system_name; if ($question->system_name !=''){ $system_question = true; } else { $system_question = false; } $wp_user = $question->wp_user; if ( function_exists( 'espresso_member_data' ) ) { if (function_exists( 'espresso_is_admin' ) ) { // If the user doesn't have admin access get only user's own question groups if ( !espresso_is_admin() ) { if ( espresso_member_data('id') != $wp_user ) { echo '

' . __('Sorry, you do not have permission to edit this question group.', 'event_espresso') . '

'; return; } } } } ?>

">

'.__('Attention: This is a "System Question", some settings may be disabled.','event_espresso').'

'; } ?>
'TEXT','text'=> __('Text','event_espresso')), array('id'=>'TEXTAREA','text'=> __('Text Area','event_espresso')), array('id'=>'SINGLE','text'=> __('Radio Button','event_espresso')), array('id'=>'DROPDOWN','text'=> __('Drop Down','event_espresso')), array('id'=>'MULTIPLE','text'=> __('Checkbox','event_espresso')), //array('id'=>'DATE','text'=> __('Date Picker','event_espresso')) ); if ($system_question == true){ $q_values=array(array('id'=>'TEXT','text'=> __('Text','event_espresso'))); } echo select_input( 'question_type', $q_values, $question_type, 'id="question_type"'); ?>

'Y','text'=> __('Yes','event_espresso')), array('id'=>'N','text'=> __('No','event_espresso')) ); if ($system_question == true && ($system_name =='fname'||$system_name =='lname'||$system_name =='email')){ $values=array(array('id'=>'Y','text'=> __('Yes','event_espresso'))); } echo select_input('required', $values, $required); ?>
'Y','text'=> __('Yes','event_espresso')), array('id'=>'N','text'=> __('No','event_espresso')) ); if ($system_question == true && ($system_name =='fname'||$system_name =='lname'||$system_name =='email')){ $values=array(array('id'=>'N','text'=> __('No','event_espresso'))); } echo select_input('admin_only', $values, $admin_only); ?>