묻고답하기
page_full_width" class="col-xs-12" |cond="$__Context->page_full_width">
$obj->belong = $vars->belong;
채용정보 모듈을 수정하려고 하는데, 변수를 db에 어떻게 등록하는건가요?
2013.10.29 03:31
recruit.controller.php 파일에서
function procRecruitInsertApplicant() { $logged_info = Context::get('logged_info'); $bAnonymous = false; if(!$logged_info) $bAnonymous = true; $vars = Context::getRequestVars(); $obj->module_srl = $vars->module_srl; $obj->document_srl = $vars->document_srl; $obj->comment_srl = $vars->comment_srl; $obj->email_address = $vars->email_address; $obj->content = removeHackTag($vars->self_introduction); $obj->kind = $vars->kind; $obj->belong = $vars->belong;$obj->kind = $vars->kind;
$obj->belong = $vars->belong;
이 부분을 제가 추가한 것이거든요... 그래도 안되고...
확장변수 추가 함수에서..
function _insertApplicantExtraVars($comment_srl) { $vars = Context::getRequestVars(); $args->comment_srl = strval($comment_srl); $args->module_srl = $this->module_srl; $args->applicant_name = strval($vars->applicant_name); $args->birth = date('YmdHis', strtotime($vars->birthday)); $args->phone_no = $vars->phone_number; $diff = abs(time()-strtotime($vars->birthday)); $args->age = intval($diff / (365*60*60*24)); $logged_info = Context::get('logged_info'); $args->kind = $vars->kind; $args->academic_association = $vars->academic_association; $args->fee = $vars->fee; if(!$logged_info) $args->member_srl = 0; else $args->member_srl = $logged_info->member_srl; $output = executeQuery('recruit.insertApplicantExtraVars', $args); return $output; }
$args->kind = $vars->kind;
$args->academic_association = $vars->academic_association;
$args->fee = $vars->fee;
이 부분을 추가했는데 그래도 안되네요...
쿼리명령어를 실행한다고 나오길래..
insertApplicationExtraVars.xml 파일을
<query id="insertApplicantExtraVars" action="insert"> <tables> <table name="recruit_application" /> </tables> <columns> <column name="comment_srl" var="comment_srl" filter="number" default="0" notnull="notnull" /> <column name="module_srl" var="module_srl" filter="number" default="0" notnull="notnull" /> <column name="member_srl" var="member_srl" filter="number" default="0" notnull="notnull" /> <column name="applicant_name" var="applicant_name"/> <column name="birth" var="birth"/> <column name="age" var="age" filter="number"/> <column name="phone_no" var="phone_no"/> <column name="kind" var="kind"/> <column name="academic_association" var="academic_association"/> <column name="fee" var="fee"/> <column name="belonging" var="belonging"/> <column name="department" var="department"/> <column name="position" var="position"/> <column name="address" var="address"/> <column name="mobile" var="mobile"/> <column name="fax" var="fax"/> <column name="firstlunch" var="firstlunch"/> <column name="firstdinner" var="firstdinner"/> <column name="secondlunch" var="secondlunch"/> </columns> </query>이렇게 모두 수정했는데요.. 도무지 먹질 않네요.. 뭐가.. 어디가 잘못인걸까요?