= CURDATE() "; $sql = " SELECT * FROM survey_master $where ORDER BY sv_created_at DESC LIMIT $limit "; $result = sql_query($sql); $survey_data = array(); while ($row = sql_fetch_array($result)) { $questions_count = sql_fetch("SELECT COUNT(*) as cnt FROM survey_questions WHERE sv_id = '{$row['sv_id']}'")['cnt']; $response_count = get_survey_response_count($row['sv_id'], 'completed'); $max_responses = $row['sv_max_responses']; $progress = $max_responses ? ($response_count / $max_responses) * 100 : 0; $days_left = ceil((strtotime($row['sv_end_date']) - time()) / (60 * 60 * 24)); $survey_data[] = array( 'id' => $row['sv_id'], 'title' => get_text($row['sv_title']), 'description' => get_text(cut_str(strip_tags($row['sv_description']), 100)), 'questions_count' => $questions_count, 'response_count' => $response_count, 'max_responses' => $max_responses, 'progress' => min($progress, 100), 'days_left' => $days_left, 'theme_color' => $row['sv_theme_color'] ?: '#AA20FF', 'created_by' => $row['sv_created_by'] ); } $survey_json = json_encode($survey_data, JSON_UNESCAPED_UNICODE); // CSS와 JS 파일의 버전을 파일 수정 시간으로 자동 갱신 $module_css_path = G5_THEME_PATH.'/rb.custom/survey_list/module.css'; $module_js_path = G5_THEME_PATH.'/rb.custom/survey_list/module.js'; $module_css_ver = file_exists($module_css_path) ? filemtime($module_css_path) : G5_CSS_VER; $module_js_ver = file_exists($module_js_path) ? filemtime($module_js_path) : G5_JS_VER; // 이 모듈만의 고유 ID를 생성합니다. $module_id = 'survey_list_module_'.uniqid(); ?>
'>
Survey

설문조사

다양한 설문에 참여하고 소중한 의견을 나눠주세요

진행중인 설문이 없습니다

새로운 설문이 등록되면 알려드리겠습니다.