source: trunk/reference-skin/write.php @ 972

Revision 972, 1.8 KB checked in by ditto, 5 years ago (diff)

글쓰기 폼 작업

Line 
1<form method="post" enctype="multipart/form-data">
2<dl>
3<? if ($guest): ?>
4        <dt>이름</dt>
5        <dd><input type="text" name="author" value="<?=$post->author?>" /></dd>
6
7        <dt>암호</dt>
8        <dd><input type="password" name="password" /></dd>
9<? endif; ?>
10
11        <dt>제목</dt>
12        <dd><input type="text" name="title" size="50" value="<?=$post->title?>" /></dd>
13
14<? if ($categories): ?>
15        <dt>분류</dt>
16        <dd>
17                <select name="category">
18                <? foreach ($categories as $category): ?>
19                        <option value="<?=$category->id?>" <?=$category->selected?>><?=$category->name?></option>
20                <? endforeach; ?>
21                </select>
22        </dd>
23<? endif; ?>
24
25        <dt>기타 옵션</dt>
26        <dd>
27                <? if ($admin): ?>
28                <input type="checkbox" name="notice" value="1" <?=$notice_checked?> /> 공지사항
29                <? endif; ?>
30                <input type="checkbox" name="secret" value="1" <?=$secret_checked?> /> 비밀글
31        </dd>
32
33        <dt>내용</dt>
34        <dd><textarea name="body" cols="40" rows="12"><?=$post->body?></textarea></dd>
35
36        <? foreach ($additional_fields as $field): ?>
37        <dt><?=$field->name?></dt>
38        <dd><?=$field->output?></dd>
39        <? endforeach; ?>
40</dl>
41
42<? if ($uploadable): ?>
43        <h2>파일 올리기</h2>
44        <p>최대 업로드 크기: <?=$upload_limit?></p>
45        <ul id="uploads">
46        <? foreach ($attachments as $attachment): ?>
47                <li><?=$attachment->filename?> <input type="checkbox" name="delete[]" value="<?=$attachment->id?>" /> 삭제</li>
48        <? endforeach; ?>
49                <li><input type="file" name="upload[]" size="50" /></li>
50        </ul>
51        <p><a href="#" onclick="addFileEntry()">파일 추가...</a></p>
52<? endif; ?>
53
54<? if ($editing): ?>
55        <input type="submit" value="수정하기" />
56<? else: ?>
57        <input type="submit" value="글쓰기" />
58<? endif; ?>
59</form>
60
61<div id="meta-nav">
62<a href="<?=$link_list?>">목록보기</a>
63<? if ($link_cancel): ?><a href="<?=$link_cancel?>">돌아가기</a><? endif; ?>
64</div>
Note: See TracBrowser for help on using the repository browser.