안반장님 한줄메모장을 아주 유용하게 잘사용하고 있습니다.
이놈의 친구놈들이 자유게시판은 사용안하고, 쓰기편한 한줄메모장에만 글을 남기네요.ㅎㅎ
근데 회원만 글쓰기 되어있는데 회원이 아닌 사람(비회원)도 로그인안하고 글쓰기가 가능하면 좋겠는데요.
어디를 고쳐야 하는지 좀 알려주세요. 아래는 list.php 파일소스인데요.. 그리고 이거 말고도 다른파일도 수정해야하나요?
--------- 여기서부터
<?
$bbs['thumb_1_width'] = $bbs['thumb_1_width'] ? $bbs['thumb_1_width'] : 80;
$bbs['thumb_1_height']= $bbs['thumb_1_height']? $bbs['thumb_1_height']: 50;
$bbs['thumb_1_back'] = $bbs['thumb_1_back'] ? $bbs['thumb_1_back'] : 120;
$bbs['licon'] = 0;
$bbs['nicon'] = 0;
?>
<?include_once $bbs['skin'].'/_list.notice.php'?>
<form name="WriteForm" method="post" action="<?=$global['thisfile']?>" target="_write_frame_" "return WriteCheck(this);">
<input type="hidden" name="a" value="write" />
<input type="hidden" name="r" value="<?=$r?>" />
<input type="hidden" name="mid" value="<?=$mid?>" />
<input type="hidden" name="uid" value="<?=$uid?>" />
<input type="hidden" name="p" value="<?=$p?>" />
<input type="hidden" name="where" value="<?=$where?>" />
<input type="hidden" name="keyword" value="<?=$keyword?>" />
<input type="hidden" name="sort" value="<?=$sort?>" />
<input type="hidden" name="orderby" value="<?=$orderby?>" />
<input type="hidden" name="origntag" value="<?=$R['tag']?>" />
<input type="hidden" name="treecat" id="bbsCDinput" value="<?=$R['treecat']?>" />
<input type="hidden" name="tpl" value="<?=$tpl?>" />
<input type="hidden" name="add_int1" value="0">
<input type="hidden" name="name" value="<?=$my['name']?>" />
<input type="hidden" name="email" value="<?=$my['email']?>" />
<input type="hidden" name="home" value="<?=$my['home']?>" />
<input type="hidden" name="pass" value="" />
<!--dl class="emoti-writer">
<?if($my['uid']):?>
<dt>이름: </dt>
<dd>
<?if($R['id']):?>
<b><?=getName($R['id'],$R['name'],$R['nic'],$R['email'],$bbs['nprint1'],$bbs['nlink1'],$bbs['nicon1'])?></b>
<?else:?>
<b><?=getName($my['uid'],$my['name'],$my['nic'],$my['email'],$bbs['nprint1'],$bbs['nlink1'],$bbs['nicon1'])?></b>
<?endif?>
<input type="hidden" name="name" value="<?=$my['name']?>" />
<input type="hidden" name="email" value="<?=$my['email']?>" />
<input type="hidden" name="home" value="<?=$my['home']?>" />
<input type="hidden" name="pass" value="" />
</dd>
<?else:?>
<dt>발행인명</dt>
<dd><input type="text" name="name" value="<?=$R['name']?>" /></dd>
<dt>패스워드</dt>
<dd><?if($R['pass']):?><input type="hidden" name="pass" value="<?=$R['pass']?>"><input type="text" value="암호화됨" disabled="disabled" /><?else:?><input type="password" name="pass" value="" /><?endif?></dd>
<input type="hidden" name="email" value="<?=$my['email']?>" />
<input type="hidden" name="home" value="<?=$my['home']?>" />
<?endif?>
</dl-->
<table class="bbs-write-2">
<colgroup>
<col style="width:50px;" />
<col />
<col style="width:80px;" />
</colgroup>
<tbody >
<tr>
<td style="position:relative;">
<div class="emoti-box" "emoti_view()">
<img src="<?=$img['skin']?>/0.gif" id="emoti_img">
<img src="<?=$bbs['icon']?>/ico_under.gif">
</div>
<table bgcolor="dfdfdf" cellspacing="1" cellpadding="0" style="position:absolute;top:4px;display:none;" id="emoti_lay">
<tr bgcolor=white height=16 align=center>
<td width=16><img src='<?=$img['skin']?>/1.gif' style='cursor:pointer;' "emoti_insert('1')"></td>
<td width=16><img src='<?=$img['skin']?>/2.gif' style='cursor:pointer;' "emoti_insert('2')"></td>
<td width=16><img src='<?=$img['skin']?>/3.gif' style='cursor:pointer;' "emoti_insert('3')"></td>
<td width=16><img src='<?=$img['skin']?>/4.gif' style='cursor:pointer;' "emoti_insert('4')"></td>
<td width=16><img src='<?=$img['skin']?>/5.gif' style='cursor:pointer;' "emoti_insert('5')"></td>
<td width=16><img src='<?=$img['skin']?>/6.gif' style='cursor:pointer;' "emoti_insert('6')"></td>
<td width=16><img src='<?=$img['skin']?>/7.gif' style='cursor:pointer;' "emoti_insert('7')"></td>
<td width=16><img src='<?=$img['skin']?>/8.gif' style='cursor:pointer;' "emoti_insert('8')"></td>
<td width=16><img src='<?=$img['skin']?>/9.gif' style='cursor:pointer;' "emoti_insert('9')"></td>
<td width=16><img src='<?=$img['skin']?>/10.gif' style='cursor:pointer;' "emoti_insert('10')"></td>
<td width=16><img src='<?=$img['skin']?>/11.gif' style='cursor:pointer;' "emoti_insert('11')"></td>
</tr><tr bgcolor=white height=16 align=center><td width=16><img src='<?=$img['skin']?>/12.gif' style='cursor:pointer;' "emoti_insert('12')"></td>
<td width=16><img src='<?=$img['skin']?>/13.gif' style='cursor:pointer;' "emoti_insert('13')"></td>
<td width=16><img src='<?=$img['skin']?>/14.gif' style='cursor:pointer;' "emoti_insert('14')"></td>
<td width=16><img src='<?=$img['skin']?>/15.gif' style='cursor:pointer;' "emoti_insert('15')"></td>
<td width=16><img src='<?=$img['skin']?>/16.gif' style='cursor:pointer;' "emoti_insert('16')"></td>
<td width=16><img src='<?=$img['skin']?>/17.gif' style='cursor:pointer;' "emoti_insert('17')"></td>
<td width=16><img src='<?=$img['skin']?>/16.gif' style='cursor:pointer;' "emoti_insert('16')"></td>
<td width=16><img src='<?=$img['skin']?>/19.gif' style='cursor:pointer;' "emoti_insert('19')"></td>
<td width=16><img src='<?=$img['skin']?>/16.gif' style='cursor:pointer;' "emoti_insert('16')"></td>
<td width=16><img src='<?=$img['skin']?>/21.gif' style='cursor:pointer;' "emoti_insert('21')"></td>
<td width=16><img src='<?=$img['skin']?>/22.gif' style='cursor:pointer;' "emoti_insert('22')"></td>
</tr>
</table>
</td>
<?if($my['uid']):?>
<td ><textarea name="subject" rows="3" cols="95"></textarea></td>
<?else:?>
<td "location.href='./index.php?q=login&referer=<?=getNowUrl(1)?>'"><textarea name="subject" disabled rows="3" cols="95">로그인을 하셔야 등록하실 수 있습니다.</textarea></td>
<?endif?>
<td class="right"><input type="image" src="<?=$img['skin']?>/btn_comment.gif" /></td>
</tr>
</table>
</form>
<iframe name="_write_frame_" src="" width="0" height="0" frameborder="0" scrolling="no"></iframe>
<table width="770" class="bbs-list-1">
<colgroup>
<col style="width:40px;" />
<col style="width:30px;" />
<col style="" />
<col style="width:110px;" /><br /><font color="#A2A2A2">한줄메모 <?=number_format($DATNUM[0])?>개 (<?=$p?>/<?=$TOTPAE?>페이지)</font>
<col style="width:70px;" />
<col style="width:20px;" />
</colgroup>
<thead>
<tr>
<th colspan="6">
<div class="bbs-info clearfix">
<div class="info-left">
<?if($skin['treecat']):?>
<?include $path['syscore'].'post/inc/treecategory.php'?>
<?endif?>
</div>
<div class="info-right">
<?for($i = 1; $i < 6; $i++):?>
<?if(!$skin['ctg'.$i])continue?>
<select "location.href='<?=str_replace('&ctg'.$i.'='.${'ctg'.$i},'',$burl['list'])?>&ctg<?=$i?>='+this.value;">
<?=getSelectField($skin['ctg'.$i],${'ctg'.$i},1,$bbs['show_num'])?>
</select>
<?endfor?>
</div>
</div>
</th>
</tr>
</thead>
<tbody>
<?foreach($RCDDAT as $R):?>
<?$G=getQImgs($R['content'],'jpg|jpeg|gif')?>
<tr>
<td class="number">
<?if($uid!=$R['uid']):?>
<?=($DATNUM[0]-((($p-1)*$recnum)+$rec['eleno']++))?>
<?else:$rec['eleno']++?>
<img src="<?=$bbs['icon']?>/ico_now.gif" />
<?endif?>
</td>
<td class="category"><img src="<?=$img['skin']?>/<?=$R['add_int1']?>.gif" alt="이모니콘" /></td>
<td align="left" height="20" class="subject">
<?if($R['depth']):?><img src="<?=$QURL['global']?>blank.gif" width="<?=($R['depth']-1)*13?>" height="1"><img src="<?=$bbs['icon']?>/dot_re.gif" /><?endif?>
<?=getStrCut($R['subject'],$bbs['sbjcut'],'')?>
<?if($R['hidden']):?> <img src="<?=$bbs['icon']?>/ico_hidden.gif" align="absmiddle" /><?endif?>
<?if($G[0]):?> <img src="<?=$bbs['icon']?>/ico_photo.gif" align="absmiddle" /><?endif?>
<?if($R['upview']):?> <img src="<?=$bbs['icon']?>/ico_down.gif" align="absmiddle" class="hand" "getUpfileWin('<?=$R['upview']?>','<?=$mdl['contentsbox']?>','list')" /><?endif?>
<?if(@getNew($R['d_regis'],$bbs['newtime'])):?><img src="<?=$bbs['icon']?>/ico_new.gif" align="absmiddle" /><?endif?>
<?if(@getNew($R['d_update'],($bbs['newtime']*2))):?><img src="<?=$bbs['icon']?>/ico_update.gif" align="absmiddle" /><?endif?>
<?if($R['comment']):?> <a href="<?=$burl['comment'].$R['uid']?>"<?if(!$perm['view']):?> "return false;"<?endif?>><span class="comment<?if(@getNew($R['d_cment'],$bbs['newcmt'])):?>_new<?endif?>">(<?=$R['comment']?>)</span></a><?endif?>
<a href="<?=$burl['comment'].$R['uid']?>" title="댓글작성"><img src="<?=$img['skin']?>/btn_comm.gif" align="absmiddle" /></a>
</td>
<td width="80" class="name <?=$bbs['nicon']?'left':'center'?>">
<?=getName($R['id'],$R['name'],$R['nic'],$R['email'],$bbs['nprint'],$bbs['nlink'],$bbs['nicon'])?>
</td>
<td width="70" class="date"><?=getDateFormat($R['d_regis'],'xxxx-xx-xx')?></td>
<td ><a href="<?=$burl['delete'].$R['uid']?>"<?if($perm['admin']||getMine($R['id'],$my['uid'])):?> "return confirm('정말로 삭제하시겠습니까? ')"<?endif?>><img src="<?=$img['skin']?>/btn_delete.gif" alt="삭제" /></a></td>
</tr>
<?endforeach?>
</tbody>
</table>
<?if(!$DATNUM[0]):?>
<div id="bbs_none_data">조건에 해당하는 게시물이 없습니다. </div>
<?endif?>
<!-- 페이징 -->
<ul class="paging">
<?=getPageLink($bbs['pagenum'],$p,$TOTPAE,$QURL['global'].'page/default')?>
</ul>
<!-- //페이징 -->
<?if($bbs['search']):?>
<?getPlugin('_bbs/search_form')?>
<?endif?>
<script type="text/javascript">
function WriteCheck(f)
{
if (ko_myid == "")
{
alert('로그인 하셔야 등록하실 수 있습니다.');
return false;
}
if (f.name.value == "")
{
alert('\n이름을 입력해 주세요. \n');
f.name.focus();
return false;
}
if (ko_myid == "" && f.pass.value == "")
{
alert('\n비밀번호를 입력해 주셔야 합니다. \n');
f.pass.focus();
return false;
}
if (f.subject.value == "")
{
alert('제목을 입력해 주세요. ');
f.subject.focus();
return false;
}
//if(getEditCheck(f)) return false;
}
function emoti_insert(i)
{
document.getElementById('emoti_img').src = '<?=$img['skin']?>/' + i + '.gif';
document.WriteForm.add_int1.value = i;
document.getElementById('emoti_lay').style.display = 'none';
}
function emoti_view()
{
var emot = document.getElementById('emoti_lay');
if (emot.style.display == 'none')
{
emot.style.display = 'block';
}
else {
emot.style.display = 'none';
}
}
</script>
--------------------------------여기까지