기본 정보를 제외한 추가 항목에 대해 회원 정보/비공개 기능 추가

git-svn-id: http://xe-core.googlecode.com/svn/sandbox@3695 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
zero 2008-02-18 12:33:38 +00:00
parent 354a48d7b0
commit 530b41c31b
16 changed files with 126 additions and 34 deletions

View file

@ -315,6 +315,12 @@
$obj->lang = $val->column_title;
$obj->required = $val->required=='Y'?true:false;
$filter_output[] = $obj;
unset($open_obj);
$open_obj->name = 'open_'.$val->column_name;
$open_obj->required = false;
$filter_output[] = $open_obj;
}
return $filter_output;
@ -331,10 +337,18 @@
$extend_form_list = $this->getJoinFormlist();
if(!$extend_form_list) return;
// 관리자이거나 자기 자신이 아니면 비공개의 경우 무조건 패스해버림
$logged_info = Context::get('logged_info');
foreach($extend_form_list as $srl => $item) {
$column_name = $item->column_name;
$value = $member_info->{$column_name};
if($logged_info->is_admin != 'Y' && $logged_info->member_srl != $member_info->member_srl && $member_info->{'open_'.$column_name}!='Y') {
$extend_form_list[$srl]->is_private = true;
continue;
}
// 추가 확장폼의 종류에 따라 값을 변경
switch($item->column_type) {
case 'checkbox' :
@ -351,6 +365,9 @@
}
$extend_form_list[$srl]->value = $value;
if($member_info->{'open_'.$column_name}=='Y') $extend_form_list[$srl]->is_opened = true;
else $extend_form_list[$srl]->is_opened = false;
}
return $extend_form_list;
}

View file

@ -99,28 +99,45 @@
.memberInfoTable th, .memberInfoTable td { border-top:1px solid #eaebe7; padding:.5em;}
.memberInfoTable th { background:#f5f5f3; text-align:left; padding:.5em 1em;}
.memberInfoTable td { border-left:1px solid #eaebe7;}
.memberInfoTable td input { border:1px solid; border-color:#a6a6a6 #d8d8d8 #d8d8d8 #a6a6a6; padding:3px; height:1em; line-height:1em; background:#fbfbfb; vertical-align:middle; float:left; margin-right:.5em; margin-bottom:.5em; color:#666666;}
.memberInfoTable td input { border:1px solid; border-color:#a6a6a6 #d8d8d8 #d8d8d8 #a6a6a6; padding:3px; height:1em; line-height:1em; background:#fbfbfb; vertical-align:middle; margin-right:.5em; margin-bottom:.5em; color:#666666;}
.memberInfoTable td input.radio, .memberInfoTable td input.check { border:none; padding:0; margin:0; background:none; margin-top:.4em;}
.memberInfoTable td input.w4em { width:4em;}
.memberInfoTable td input.w2em { width:2em;}
.memberInfoTable td select { float:left; margin-right:.5em;}
.memberInfoTable td select { margin-right:.5em;}
.memberInfoTable td checkbox { border:0; }
.memberInfoTable td .fl { margin-right:.5em;}
.memberInfoTable td br { clear:both;}
.memberInfoTable td p { float:left; font-size:.9em; color:#999999; padding-top:.5em; margin-right:.5em;}
.memberInfoTable td label { float:left; color:#3f4040; padding-top:.3em; margin-right:.5em;}
.memberInfoTable td p { font-size:.9em; color:#999999; padding-top:.5em; margin-right:.5em;}
.memberInfoTable td label { color:#3f4040; padding-top:.3em; margin-right:.5em;}
.memberInfoTable td ul { list-style:none; }
.memberInfoTable td .checkbox { border:none; }
/* 아이디, 이름, 이메일 주소 중복 체크후 중복되면 출력되는 메세지의 className */
.memberInfoTable td .checkValue { margin-top:5px; font-weight:bold; color:#444444; }
/* modify/ insert member info */
.memberImage { clear:both; }
.memberImage .info { margin-bottom:1.5em; float:left; margin-right:1em;}
.memberImage .form { float:left; }
.memberImage .form input { height:1.5em; margin:0 .3em 0 0; padding:0;}
.checkbox li { float:left; margin-right:2em; }
.checkbox li input { border:none; }
.str_birthday { cursor:pointer; float:left; width:80px; border:1px solid; border-color:#a6a6a6 #d8d8d8 #d8d8d8 #a6a6a6; height:1em; padding:3px 3px 3px 18px; margin-right:.3em;}
.krZip .address2 { clear:both; margin-top:10px;}
.extendDesc { clear:both; margin-top:0; font-size:.9em; color:#999999; }
.extendPublic { clear:both; margin-top:5px; padding:0; font-size:.9em; color:#999999; }
.extendPublic input { padding:0; margin:0; }
.publicItem { display:block; margin-top:5px;}
.publicItem input { margin:0; padding:0;}
.publicItem label { font-weight:normal; margin:0; padding:0; color:#666666;}
span.publicItem { display:inline; margin:0; font-weight:normal; color:#666666; }
span.privateItem { display:inline; margin:0; font-weight:normal; color:#666666; }
.agreementBox { border:1px solid #AAAAAA; margin:.5em 0 0 0; padding:1em; border-bottom:none; height:200px; overflow-y:scroll;}
.agreementButton { background-color:#EEEEEE; padding:1em; border:1px solid #AAAAAA; border-top:none;}

View file

@ -83,23 +83,29 @@
{@ $dummy_chk = 0 }
<!--@foreach($extend_form_list as $key => $val)-->
<tr <!--@if($dummy_chk==0)-->class="first-child" {@ $dummy_chk = 1; }<!--@end-->>
<th>{htmlspecialchars($val->column_title)}</th>
<th>
{htmlspecialchars($val->column_title)}
</th>
<td>
<!--@if($val->column_type=='tel' && $val->value[0] && $val->value[1] && $val->value[2])-->
{htmlspecialchars($val->value[0])}
<!--@if($val->value[1])-->-<!--@end-->
{htmlspecialchars($val->value[1])}
<!--@if($val->value[2])-->-<!--@end-->
{htmlspecialchars($val->value[2])}
<!--@elseif($val->column_type=='kr_zip')-->
{htmlspecialchars($val->value[0])}<!--@if($val->value[1]&&$val->value[0])--><br /><!--@end-->{htmlspecialchars($val->value[1])}
<!--@elseif($val->column_type=='checkbox' && is_array($val->value))-->
{htmlspecialchars(implode(", ",$val->value))}&nbsp;
<!--@elseif($val->column_type=='date' && $val->value)-->
{zdate($val->value, "Y-m-d")}&nbsp;
<!--@else-->
{nl2br(htmlspecialchars($val->value))}&nbsp;
<!--@end-->
<!--@if($val->is_private)-->
<span class="privateItem">{$lang->private}</span>
<!--@else-->
<!--@if($val->column_type=='tel' && $val->value[0] && $val->value[1] && $val->value[2])-->
{htmlspecialchars($val->value[0])}
<!--@if($val->value[1])-->-<!--@end-->
{htmlspecialchars($val->value[1])}
<!--@if($val->value[2])-->-<!--@end-->
{htmlspecialchars($val->value[2])}
<!--@elseif($val->column_type=='kr_zip')-->
{htmlspecialchars($val->value[0])}<!--@if($val->value[1]&&$val->value[0])--><br /><!--@end-->{htmlspecialchars($val->value[1])}
<!--@elseif($val->column_type=='checkbox' && is_array($val->value))-->
{htmlspecialchars(implode(", ",$val->value))}&nbsp;
<!--@elseif($val->column_type=='date' && $val->value)-->
{zdate($val->value, "Y-m-d")}&nbsp;
<!--@else-->
{nl2br(htmlspecialchars($val->value))}&nbsp;
<!--@end-->
<!--@end-->
</td>
</tr>
<!--@end-->

View file

@ -149,6 +149,10 @@
<th scope="row">
{htmlspecialchars($val->column_title)}
<!--@if($val->required=='Y')-->*<!--@end-->
<div class="publicItem">
<input type="checkbox" class="checkbox" name="open_{$val->column_name}" <!--@if($val->is_opened)-->checked="checked"<!--@end--> value="Y" id="open_{$val->column_name}" />
<label for="open_{$val->column_name}">{$lang->public}</label>
</div>
</th>
<td>
<!-- 일반 text -->

View file

@ -41,23 +41,38 @@
</tr>
<tr>
<th scope="row">{$lang->user_name} *</th>
<td><input type="text" name="user_name" value="" /> <p>{$lang->about_user_name}</p></td>
<td>
<input type="text" name="user_name" value="" />
<p>{$lang->about_user_name}</p>
</td>
</tr>
<tr>
<th scope="row">{$lang->nick_name} *</th>
<td><input type="text" name="nick_name" value="" /> <p>{$lang->about_nick_name}</p></td>
<td>
<input type="text" name="nick_name" value="" />
<p>{$lang->about_nick_name}</p>
</td>
</tr>
<tr>
<th scope="row">{$lang->email_address} *</th>
<td><input type="text" name="email_address" value="" /> <p>{$lang->about_email_address}</p></td>
<td>
<input type="text" name="email_address" value="" />
<p>{$lang->about_email_address}</p>
</td>
</tr>
<tr>
<th scope="row">{$lang->homepage}</th>
<td><input type="text" name="homepage" value="" /> <p>{$lang->about_homepage}</p></td>
<td>
<input type="text" name="homepage" value="" />
<p>{$lang->about_homepage}</p>
</td>
</tr>
<tr>
<th scope="row">{$lang->blog}</th>
<td><input type="text" name="blog" value="" /> <p>{$lang->about_blog_url}</p></td>
<td>
<input type="text" name="blog" value="" />
<p>{$lang->about_blog_url}</p>
</td>
</tr>
<tr>
<th scope="row">{$lang->birthday}</th>
@ -70,7 +85,7 @@
</tr>
<tr>
<th scope="row">{$lang->allow_mailing}</th>
<td><input type="checkbox" name="allow_mailing" value="Y" checked="checked" /> <p>{$lang->about_allow_mailing}</p></td>
<td><input type="checkbox" class="checkbox" name="allow_mailing" value="Y" checked="checked" /> <p>{$lang->about_allow_mailing}</p></td>
</tr>
</table>
@ -86,6 +101,10 @@
<th scope="row">
{htmlspecialchars($val->column_title)}
<!--@if($val->required=='Y')-->*<!--@end-->
<div class="publicItem">
<input type="checkbox" class="checkbox" name="open_{$val->column_name}" value="Y" id="open_{$val->column_name}" />
<label for="open_{$val->column_name}">{$lang->public}</label>
</div>
</th>
<td>
<!-- 일반 text -->

View file

@ -0,0 +1,7 @@
@charset "utf-8";
.publicItem { display:block; margin-top:5px;}
.publicItem input { margin:0; padding:0;}
.publicItem label { font-weight:normal; margin:0; padding:0; color:#666666;}
span.publicItem { display:inline; margin:0; font-weight:normal; color:#666666; }

View file

@ -1,5 +1,6 @@
<!--#include("header.html")-->
<!--%import("filter/insert.xml")-->
<!--%import("css/member_admin.css")-->
<form id="fo_insert_member" action="./" method="get" onsubmit="return procFilter(this, insert)">
<input type="hidden" name="page" value="{$page}" />
@ -150,10 +151,12 @@
<!--@if($val->is_active=='Y')-->
<tr>
<th scope="row">
<!--@if($val->required=='Y')-->
*
<!--@end-->
{$val->column_title}
{htmlspecialchars($val->column_title)}
<!--@if($val->required=='Y')-->*<!--@end-->
<div class="publicItem">
<input type="checkbox" class="checkbox" name="open_{$val->column_name}" <!--@if($val->is_opened)-->checked="checked"<!--@end--> value="Y" id="open_{$val->column_name}" />
<label for="open_{$val->column_name}">{$lang->public}</label>
</div>
</th>
<td>
<!-- 일반 text -->

View file

@ -59,9 +59,7 @@ function completeMemberCheckValue(ret_obj, response_tags, e) {
if(! (dummy = xGetElementById(dummy_id)) ) {
dummy = xCreateElement('DIV');
dummy.id = dummy_id;
dummy.style.display = "none";
dummy.style.clear = 'both';
dummy.style.marginTop = '10px';
dummy.className = "checkValue";
obj.parentNode.insertBefore(dummy, obj.lastChild);
}

View file

@ -145,7 +145,7 @@
<!--@if($extend_form_list)-->
<!--@foreach($extend_form_list as $key => $val)-->
<tr>
<th scope="row">{htmlspecialchars($val->column_title)}</th>
<th scope="row">{htmlspecialchars($val->column_title)}<!--@if($val->is_opened)--> <span class="publicItem">({$lang->public})</span><!--@end--></th>
<td>
<!--@if($val->column_type=='tel')-->
{htmlspecialchars($val->value[0])}