function index($sid) { if (!is_user_logined()) { redirect('/auth/login'); } if (!$this->survey_m->is_owned(get_loginid(), $sid)) { redirect('/auth/login'); } if ($this->session->userdata('auth_code') >= '7') { } $this->loadView($sid); }
function s($sid, $seqno) { $preview = $this->input->get("preview"); if ($preview != "true") { if (!$this->check_survey_status($sid)) { $data = array('message' => "Survey is closed."); echo $this->load->view('/preview/page_view_404', $data, true); return; } // if (!$this->check_ip($this->input->ip_address(), $sid)) { // echo "duplicate ip login error."; // return; // } if (!$this->check_max_response($sid)) { $data = array('message' => "Survey is closed. (response count is over than max.)"); echo $this->load->view('/preview/page_view_404', $data, true); return; } if (!$this->check_cut_offdate($sid)) { $data = array('message' => "Survey is closed. (cut off date is over)"); echo $this->load->view('/preview/page_view_404', $data, true); return; } } $pages = $this->page_m->get_pages($sid); $total_page_cnt_of_sid = sizeof($pages); if (is_numeric($seqno) == false) { return; } if ($seqno < 0) { $seqno = 0; } if ($seqno == 0) { $html = $this->_make_welcome_page($sid); echo $html; return; } if ($seqno > $total_page_cnt_of_sid) { $html = $this->_make_thankyou_page($sid); echo $html; //count taken value if (is_user_logined()) { $this->count_taken($sid); } return; } $cur_page = $pages[$seqno - 1]; echo $this->_make_page_html($cur_page['pid']); }
function get_contents($qtid) { if (!is_user_logined()) { redirect('/auth/login'); } $aoList = $this->answer_option_m->get_answer_options($qtid); $contents = ''; if (sizeof($aoList) > 0) { $contents = $this->load->view('answer_option/title', '', true); } foreach ($aoList as $ao) { $contents .= $this->get_ao_content($ao['aoid'], $ao['type']); } echo $contents; }
function change_password() { if (!is_user_logined()) { redirect('/auth/login'); } $old = $this->input->post('oldPassword'); $new = $this->input->post('newPassword'); // $confirm = $this->input->post('confirmPassword'); $uid = get_loginid(); if ($this->users_m->is_valid_password($uid, $old)) { $info = $this->users_m->get_all_by_id($uid); $this->users_m->reset_password($info->email, $new); } redirect('/dashboard'); }
function index() { if (!is_user_logined()) { redirect('/auth/login'); } if ($this->session->userdata('auth_code') >= '7') { } $sort = "none"; $surveys = $this->survey_m->getSurveys(get_loginid(), $sort); $templateData = array('name' => 'mysurvey'); $data = array('Title' => 'My Surveys', 'surveys' => $surveys); $this->load->view('template/beginheader', $templateData); $this->load->view('template/header'); $this->load->view('mysurvey_v', $data); $this->load->view('template/footer'); $this->load->view('template/endfooter', $templateData); }
function copy() { if (!is_user_logined()) { redirect('/auth/login'); } $title = $this->input->post("title"); $sid = $this->input->post("survey"); if (!$this->survey_m->is_owned(get_loginid(), $sid)) { redirect('/auth/login'); } if ($title) { $this->db->trans_start(); $sid = $this->survey_m->copy_survey(get_loginid(), $sid, $title); $this->db->trans_complete(); echo $sid; } }
function index() { // // // 설정 // $config['mailtype'] = "html"; // $config['charset'] = "euc-kr"; // $config['protocol'] = "smtp"; // $config['smtp_host'] = "ssl://smtp.googlemail.com"; // $config['smtp_port'] = 465; // $config['smtp_user'] = "******"; // $config['smtp_pass'] = "******"; // $config['smtp_timeout'] = 10; // // // $this->load->library('email', $config); // $this->email->set_newline("\r\n"); // $this->email->clear(); // $this->email->from("*****@*****.**", "관리자"); // $this->email->to("*****@*****.**"); // $this->email->subject("회원가입을 축하드립니다."); // $this->email->message('XXXXXXXXXXXXXXXXXXX'); // // // if (!$this->email->send()) // echo "실패"; // else // echo "성공"; // if (!is_user_logined()) { redirect('/auth/login'); } $loginid = get_loginid(); if ($this->session->userdata('auth_code') >= '7') { } $data = $this->users_m->get_all_by_id($loginid); $response = $this->survey_m->get_respondent_cnt_by_uid($loginid); $templateData = array('name' => 'dashboard', 'fullName' => $data->name, 'email' => $data->email, 'response' => $response, 'taken' => $data->taken); $viewData = array('Title' => 'Dashboard', 'userName' => $data->name, 'eMail' => $data->email, 'Number' => $loginid); $this->load->view('template/beginheader', $templateData); $this->load->view('template/header'); $this->load->view('dashboard_v', $viewData); $this->load->view('template/footer'); $this->load->view('template/endfooter', $templateData); }
function delpage($sid, $pid) { if (!is_user_logined()) { redirect('/auth/login'); } if (!$this->survey_m->is_owned(get_loginid(), $sid)) { redirect('/auth/login'); } $sid = $this->page_m->get_sid($pid); if ($sid != null) { $this->page_m->del_one_page($pid); redirect('/surveyedit/index/' . $sid); } }
function index() { if (!is_user_logined()) { redirect('/auth/login'); } }
function move_question($direction, $sid, $qid) { if (!is_user_logined()) { redirect('/auth/login'); } if (!$this->survey_m->is_owned(get_loginid(), $sid)) { redirect('/auth/login'); } $this->db->trans_start(); if ($direction == "up") { $this->question_m->move_up_question($qid); } else { $this->question_m->move_down_question($qid); } $this->db->trans_complete(); redirect('/surveyedit/index/' . $sid); }