public function __construct1($accountID) { $sMemInfo = getCookieInfo(); if (!$sMemInfo) { return false; } else { $oMemInfo = json_decode($sMemInfo); if ($oMemInfo->accountID != $accountID) { return false; } } $this->accountID = $accountID; $this->usn = $oMemInfo->usn; $this->oAccountInfo = $this->getAccountInfo($this->usn); $this->oUserInfo = $this->getUserInfo($this->usn); $this->aMemberSVC = $this->getMemberSVCInfo($this->usn); }
public function loginprocess($accountID, $passwd) { if (!$accountID || !$passwd) { return false; } if (!($usn = $this->_chkPWD($accountID, $passwd))) { return false; } else { // chk cookie if (getCookieInfo()) { $this->load->helper('cookie'); delete_cookie("codingclub_MemberInfo"); } // set cookie $this->sCookie($usn, $accountID); // set loginlog $this->_setLoginLog($usn, $accountID); return true; } }
public function request_course() { // login check $sMemInfo = getCookieInfo(); if (!$sMemInfo) { // login go header('Location: http://localhost/~leehojun/CC/codingclub/Login'); } $oMemInfo = json_decode($sMemInfo); // chk member user info // get membserinfo $user = cc_get_instance('UserClass'); $oUser = new $user($oMemInfo->accountID); if (!$oUser->oUserInfo->usn) { // user info input $this->_setUserInfo(); } else { // member_svc input // set member_svc call echo "set members_svc"; } //$this->load->view('course/request_course'); }
public function program($courseIDX) { $sUserInfo = getCookieInfo(); $oUserInfo = json_decode($sUserInfo); /** * 비 로그인 접근으로 변경 합니다. **/ // if(!$oUserInfo->usn) // { // header('Location: '.HOSTURL.'/Login?burl=club/iot'); // } if ($oUserInfo) { $aLogin['login'] = '******'; $aLogin['logout'] = ''; $aJoinStyle['join'] = 'display:none'; $aJoinStyle['mypage'] = ''; } else { $aLogin['login'] = ''; $aLogin['logout'] = 'display:none'; $aJoinStyle['join'] = ''; $aJoinStyle['mypage'] = 'display:none'; } if (!$courseIDX) { $this->junior(); } $oCourseInfo = $this->_getCourseInfo($courseIDX); $data = array('oCourseInfo' => $oCourseInfo, 'aLoginStyle' => $aLogin, 'aJoinStyle' => $aJoinStyle); $this->load->view('club/junior_program', $data); }
public function reqprogram($courseIDX = '') { // if(!$courseIDX) // { // header('Location: '.HOSTURL.'/club/junior'); // } $sUserInfo = getCookieInfo(); $oUserInfo = json_decode($sUserInfo); $aMemberGRDEConfig = cc_get_config('member_user_grde', 'member_config'); if (!$oUserInfo->usn) { header('Location: ' . HOSTURL . '/Login?burl=member/reqprogram/' . $courseIDX); } else { $user = cc_get_instance('UserClass'); $oUser = new $user($oUserInfo->accountID); } // 추후에 디비 정보를 가지로 와서 적용하는걸로 변경 해야함 -------- // $aCourse = array('course_idx1' => array('value' => '23', 'name' => '주니어메이커'), 'course_idx2' => array('value' => '24', 'name' => '주니어디자이너'), 'course_idx3' => array('value' => '26', 'name' => '앱메이커'), 'course_idx4' => array('value' => '27', 'name' => '앱디자이너'), 'course_idx5' => array('value' => '28', 'name' => 'IoT메이커')); // ---------------------------------------------------------------- // $data = array('oAccount' => $oUser->oAccountInfo, 'oUserInfo' => $oUser->oUserInfo, 'aMemberSVC' => $oUser->aMemberSVC, 'aGrdeConfig' => $aMemberGRDEConfig, 'aCourse' => $aCourse, 'courseIDX' => $courseIDX); $this->load->view('member/req_program', $data); }