Esempio n. 1
0
    header("Location: {$URL['login']}");
    exit;
}
if (!$pn) {
    $pn = 1;
}
/* DB접속 */
$dbh = dbconnect();
$start_num = ($pn - 1) * $max_list;
$end_num = $pn * $max_list;
/* 전체 설문수 */
$query = "select count(poll_idx) from poll_data";
$sth = dbquery($dbh, $query);
list($total_count) = dbselect($sth);
/* 페이지 계산 */
list($pagelist, $page_count) = make_page_list("{$URL['list']}?m=list", $max_list, $total_count, $pn);
$total_page = $page_count;
$article_num = $total_count - $pn * $max_list + $max_list;
print_header();
echo "\n<br>\n<script language=JavaScript>\nfunction result_window(idx)\n{\n\twindow.open('{$URL['result']}?m=view&idx='+idx, 'result','width=400,height=400,marginwidth=0,marginheight=0,resizable=1,scrollbars=1');  \n}   \n</script>\n<table border=0 width=600 cellspacing=0 cellpadding=0>\n<tr width=100%>\n   <td colspan=8 align=right><font size=2>\n    전체 : <font color=RED>{$total_count}</font> &nbsp; \n    현재페이지 : <font color=RED>{$pn} / {$total_page}</font>\n    </font>&nbsp;\n   </td>\n</tr>\n<tr><td align=right>\n<!--본문 테이블 시작 -->\n\n<table border=1 bordercolor=white bordercolorlight=silver cellpadding=2 cellspacing=0 width=100%>\n<tr bgcolor=#f6f6f6> \n  <th width=30><font size=2>번호</font></th>\n  <th><font size=2>제목</font></th>\n  <th width=45><font size=2>문항수</font></th>\n  <th width=80><font size=2>시작일</font></th>\n  <th width=80><font size=2>종료일</font></th>\n  <th width=85><font size=2>기타</font></th>\n</tr>\n";
/* 데이터 $max_list 만큼 뽑아서 @LIST_DATA 에 저장. */
$query = "select * from poll_data order by poll_idx desc limit {$start_num},{$max_list}";
$sth = dbquery($dbh, $query);
$i = 0;
while ($field = dbselect($sth)) {
    list($poll_idx, $question, $sdate, $edate, $status, $answer_no, $answer[1], $answer[2], $answer[3], $answer[4], $answer[5], $answer[6], $answer[7], $answer[8], $answer[9], $answer[10]) = $field;
    $answer_list = "";
    for ($i = 1; $i <= $answer_no; $i++) {
        $answer_list .= "[{$i}]{$answer[$i]}\n";
    }
    if ($status == 1) {
Esempio n. 2
0
<?php

/*
	명함관리 (명함목록출력)
	2001.06 by Jungjoon Oh
*/
print_header("명함 목록");
print_location_bar($location_bar);
list($pagelist, $page_count) = make_page_list("{$URL['list']}?m={$m}&group={$group}&id={$id}&where={$where}&k={$keyword}", $max_list, $total_count, $pn);
$total_page = $page_count;
echo "\n<br>\n<table width=700 border=0 cellspacing=1 cellpadding=4 bgcolor=#FFFFFF align=center>\n    <tr bgcolor=#FFFFFF width=100%>\n       <td colspan=8 align=right><font size=2>\n       <font color=BLUE>* 이름이나 회사명을 클릭하시면 자세한 내용을 볼수있습니다.</font> &nbsp; &nbsp; &nbsp; &nbsp; \n        전체 : <font color=RED>{$total_count}</font> &nbsp; \n        현재페이지 : <font color=RED>{$pn} / {$total_page}</font></font>\n       </td>\n    </tr>\n    <tr bgcolor=#BBDDFF> \n      <th><font size=2>번호</font></th>\n      <th><font size=2>분류</font></th>\n      <th><font size=2>이름</font></th>\n      <th><font size=2>회사</font></th>\n      <th><font size=2>부서</font></th>\n      <th><font size=2>직함</font></th>\n      <th><font size=2>전화</font></th>\n      <th><font size=2>등록일</font></th>\n    </tr>\n";
if (!$LIST_DATA) {
    echo "\n    <tr bgcolor=#F0F0F0> \n      <td colspan=8 align=center>\n        <font size=2>등록된 데이터가 없습니다.</font>\n      </td>\n   </tr>\n";
} else {
    $article_num = $total_count - $pn * $max_list + $max_list;
    foreach ($LIST_DATA as $list) {
        list($nc_index, $nc_id, $nc_group, $nc_name, $nc_company, $nc_depart, $nc_title, $nc_tel, $nc_date, $nc_email) = explode("|", $list);
        if ($nc_email) {
            $nc_name = "<a href=\"mailto:{$nc_email}\">{$nc_name}</a>";
        }
        echo "\n    <tr bgcolor=#F0F0F0> \n      <td align=center><font size=2>\n          <a href=\"{$URL['read']}?m=read&idx={$nc_index}&{$from_string}\">\n          {$article_num}</a></font></td>\n      <td align=center><font size=2>{$GROUP_NAME[$nc_group]}</font></td>\n      <td align=center><font size=2>{$nc_name}</font>\n      </td>\n      <td align=center><font size=2>\n          <a href=\"{$URL['read']}?m=read&idx={$nc_index}&{$from_string}\">\n          {$nc_company}</a></font>\n      </td>\n      <td align=center><font size=2>{$nc_depart}</font></td>\n      <td align=center><font size=2>{$nc_title}</font></td>\n      <td align=center><font size=2>{$nc_tel}</font></td>\n      <td align=center><font size=2>{$nc_date}</font></td>\n    </tr>\n";
        // 글번호 하나씩 감소
        $article_num--;
    }
    // foreach
}
echo "\n    <tr bgcolor=#FFFFFF>\n       <td colspan=8 align=center><font size=2>{$pagelist}</a>\n       </td>\n    </tr>\n    <tr bgcolor=#FFFFFF>\n       <td colspan=8 align=right><a href=\"{$URL['write_form']}\">\n       {$BUTTON['write']}</a> &nbsp;\n       </td>\n    </tr>\n</table>\n<script language=JavaScript>\n<!--\nfunction checkForm(form)\n{\n\tif(form.k.value==''){\n\t\talert('검색어를 입력하세요.     ');\n\t\tform.k.focus();\n\t\treturn false;\n\t}\n\treturn true;\n}\n//-->\n</script>\n\n<table width=700 align=center>\n<form action=\"{$URL['search']}\" method=GET name=f onSubmit=\"return checkForm(document.f);\">\n<tr><td colspan=2><hr size=1</td></tr>\n<tr><td width=30% align=right><font size=2><b>검 색 어:</b></font></td>\n    <td width=70%>\n        <input type=text name=k value=\"{$k}\" size=21 maxlength=20>\n\t<input type=submit value=\"  검색  \">\n\t<select name=\"group\">\n\t<option value=\"\">분류</option>\n\t<option value=1>기업</option>\n\t<option value=2>언론사</option>\n\t<option value=3>정계</option>\n\t<option value=4>학교</option>\n\t<option value=5>개인</option>\n\t<option value=9>기타</option>\n    </td>\n</tr>\n<tr><td align=right><font size=2><b>검색대상:</b></font></td>\n    <td><font size=2>\n        <input type=radio name=where value=\"name\" checked>이름 &nbsp; \n        <input type=radio name=where value=\"company\">회사명 &nbsp; \n        <input type=radio name=where value=\"depart\">부서명 &nbsp; \n        <input type=radio name=where value=\"title\">직함 &nbsp; \n        <input type=radio name=where value=\"id\">등록자ID\n        </font>\n    </td>\n</tr>\n</form>\n</table>\n";
print_footer();
exit;
Esempio n. 3
0
<?php

/*
	게시판 (글목록 출력)
	2001.06 by Jungjoon Oh
*/
require $header;
list($pagelist, $page_count) = make_page_list("{$URL[$from]}?m={$m}&db={$db}&{$from_string}", $max_list, $total_count, $pn);
$total_page = $page_count;
echo "\n<br>\n<table width=700 border=0 cellspacing=1 cellpadding=4 bgcolor=#FFFFFF align=center>\n    <tr bgcolor=#FFFFFF width=100%>\n       <td colspan=8 align=right><font size=2>\n        전체 : <font color=RED>{$total_count}</font> &nbsp; \n        현재페이지 : <font color=RED>{$pn} / {$total_page}</font></font>\n       </td>\n    </tr>\n    <tr bgcolor=#BBDDFF> \n      <th width=50><font size=2>번호</font></th>\n      <th><font size=2>제목</font></th>\n      <th width=100><font size=2>글쓴이</font></th>\n      <th width=80><font size=2>날짜</font></th>\n      <th width=50><font size=2>조회</font></th>\n    </tr>\n";
if (!$LIST_DATA) {
    echo "\n    <tr bgcolor=#F0F0F0> \n      <td colspan=8 align=center>\n        <font size=2>등록된 데이터가 없습니다.</font>\n      </td>\n   </tr>\n";
} else {
    $article_num = $total_count - $pn * $max_list + $max_list;
    foreach ($LIST_DATA as $list) {
        list($idx, $replynum, $name, $email, $hit, $date, $subject, $filename) = explode("|", $list);
        if ($email) {
            $name = "<a href=\"mailto:{$email}\">{$name}</a>";
        }
        $subject_space = "";
        if ($replynum > 1) {
            $subject_space .= "&nbsp;&nbsp;☞";
        }
        if ($filename) {
            $filelink = " {$BUTTON['disk']}";
        } else {
            $filelink = "";
        }
        if ($k) {
            if ($w == 'subject' || $w == 'both') {
                $subject = ereg_replace($k, "<font color=RED><b>{$k}</b></font>", $subject);