コード例 #1
0
>
	<tr <?php 
    echo $bgcolor;
    ?>
>
		<td><?php 
    $ke = Explode("-", $entry[3]);
    echo " " . $ke[2] . ". " . $ke[1] . ". " . $ke[0] . "";
    ?>
</td>
		<td><?php 
    member_link($entry[1]);
    ?>
</td>
		<td><?php 
    member_link($entry[2]);
    ?>
</td>
		<td><?php 
    echo "{$entry['4']}";
    ?>
</td>
		<td align=right><?php 
    echo "{$entry['5']}";
    ?>
</td>
	</tr>
</tbody>
 <?php 
    $i++;
}
コード例 #2
0
ファイル: post_list.tpl.php プロジェクト: kidwm/kidbox
			<div class="no-post">
				<p>本看板目前還沒有文章。</p>
				<p>現在就<a href="<?php 
    echo OUT_PATH . $BD;
    ?>
/post" title="發表文章">搶下第一篇</a>吧!</p>
			</div>
<?php 
} else {
    ?>
			<ul id="post-board-list">
<?php 
    foreach ($row as $list) {
        $list["comment_count"] = !empty($list["comment_count"]) ? '<span class="post-comment-count">' . $list["comment_count"] . '</span>' : '';
        if ($list['post_author']) {
            $list['post_author'] = member_link(member_who($list['post_author']));
        } else {
            $list['post_author'] = $list['post_author_nicename'];
        }
        $list['category'] = '***';
        if (isset($_GET['to']) && $list['id'] == $_GET['to']) {
            ?>
				<li id="post-now-reading">
					<span class="post-list-category"><?php 
            echo $list['category'];
            ?>
</span>
					<span class="post-list-title"><?php 
            echo $list['post_title'];
            echo $list['comment_count'];
            ?>
コード例 #3
0
ファイル: comment_delete.tpl.php プロジェクト: kidwm/kidbox
<?php

$page_title = '刪除文章「' . $post . '」的這則回覆? - ' . APP_NAME;
include load_template('header');
$modify = $modify_time ? 'Modified by ' . $modify_who . ' at ' . $modify_time . ' ' : '';
$author = $author ? member_link($author) : $author_nicename;
?>
				<div id="comment-certify">
					<div id="comment-form-actions">
						<form name="comment-delete" method="POST" action="<?php 
echo OUT_PATH;
?>
action/comment_delete" id="comment-form-delete">
							<span id="comment-delete-certify">刪除文章「<?php 
echo $post;
?>
」的這則回覆?</span>
<?php 
if (!member_check()) {
    ?>
							<label id="comment-form-pass" title="輸入密碼以驗證刪除權限">Password: <?php 
    echo $input_password;
    ?>
</label>
<?php 
}
?>
							<input name="comment_delete_member" type="hidden" value="<?php 
echo $WHO;
?>
">
コード例 #4
0
ファイル: comment_list.tpl.php プロジェクト: kidwm/kidbox
			<ul id="comment-list">
<?php 
foreach ($row as $list) {
    $list['num'] = $list['num'] < 10 ? '0' . $list['num'] : $list['num'];
    $modify = $list['modify_time'] ? 'Modified by ' . $list['modify_who'] . ' at ' . $list['modify_time'] . ' ' : '';
    $list['comment_author'] = $list['comment_author'] ? member_link($list['comment_author']) : $list['comment_author_nicename'];
    $post_author = $list['post_author'] ? ' comment-post-author' : '';
    ?>
				<li class="comment-item<?php 
    echo $post_author;
    ?>
" id="comment-<?php 
    echo $list['id'];
    ?>
">
					<img class="comment-item-avatar" src="<?php 
    echo get_avatar($list['comment_author_email']);
    ?>
" alt ="<?php 
    echo $list['comment_author_nicename'];
    ?>
">
					<div class="comment-item-meta">
						<span class="comment-item-number"><a href="#comment-<?php 
    echo $list['id'];
    ?>
"><?php 
    echo $list['num'];
    ?>
</a></span>
						<span class="comment-item-ip"><img src="<?php 
コード例 #5
0
ファイル: main.inc.php プロジェクト: kidwm/kidbox
<?php 
if (!$list) {
    ?>
		<div class="no-post">
			<p>本網站目前還沒有文章。</p>
		</div>
<?php 
} else {
    ?>
			<ul id="post-last-list">
<?php 
    foreach ($list as $item) {
        $item["comment_count"] = !empty($item["comment_count"]) ? '<span class="post-comment-count">' . $item["comment_count"] . '</span>' : '';
        $item['post_board_nicename'] = $board_info[$item['post_board']]['nicename'];
        if ($item['post_update_member']) {
            $item['post_author'] = member_link(member_who($item['post_update_member']));
        } else {
            $item['post_author'] = $item['post_update_who'];
        }
        switch ($item["post_change"]) {
            case 'edit':
                $change = '<span class="post-last-change post-list-edit">修改</span>';
                break;
            case 'reply':
                $change = '<span class="post-last-change post-list-reply">回覆</span>';
                break;
            default:
                $change = '<span class="post-last-change post-list-write">發表</span>';
                break;
        }
        ?>
コード例 #6
0
function announces_listing_admin($sess, $dopon, $select, $lres, $view_number, $page, $cs, $cs1, $uoz, $rub, $pri, $keyword, $age)
{
    $cs = "4";
    $cs1 = "3";
    // dark row - name
    ?>
		<col class="col_1">
		<col class="col_2">
		<col class="col_3">
		<col class="col_4">
		<col class="col_5">
		<thead>
		  <tr class="th_main">
			<th><?php 
    echo $lres;
    ?>
</td>
			<th colspan="<?php 
    echo $cs1;
    ?>
">&nbsp;</td>
		  </tr>
		</thead>
    <?php 
    $start = $page * $view_number;
    //first announce for view
    $sort = "ann_oq = '{$dopon}' and {$select}";
    // mysql query
    // query for announces
    @($sqo = mysql_query("SELECT * FROM uniletim_announces WHERE {$sort} AND ul_group = '{$sess['4']}' ORDER BY ann_date DESC LIMIT {$start},{$view_number}")) or die($query_error);
    if (mysql_num_rows($sqo) == 0) {
        echo "<tr><td>" . _NO_ANNOUNCE . "</td></tr>\n";
    } else {
        $i = 0;
        while ($roz = mysql_fetch_row($sqo)) {
            @($sqp = mysql_query("SELECT * FROM uniletim_subsections WHERE sub_id = '{$roz['3']}' AND ul_group = '{$sess['4']}'"));
            $rop = mysql_fetch_row($sqp);
            if ($i % 2 == 0) {
                $tb_class = '';
            } else {
                $tb_class = " class=tb_dark";
            }
            // announce text
            ?>
				<tbody <?php 
            echo $tb_class;
            ?>
>
					<tr class="tb_content" <?php 
            echo $bgcolor;
            ?>
>
						<td colspan="<?php 
            echo $cs1;
            ?>
">
							<?php 
            echo $roz[7];
            ?>
						</td>
						<td align="right" <?php 
            echo $bgcolor;
            ?>
>
							<B><?php 
            echo _FROM;
            ?>
:</B><br />
							<?php 
            member_link($roz[1]);
            ?>
						</td>
					</tr>
					<tr class="tb_info">
					<form method="post" action="index.php"> 
						<td align="right" <?php 
            echo $bgcolor;
            ?>
>
							<select name="ann_sub" class="paticka">
								<OPTION value="0"><?php 
            echo _SELECT_SUB;
            ?>
</OPTION><?php 
            $pse = mysql_query("SELECT * FROM uniletim_subsections WHERE ul_group = '{$sess['4']}' ORDER BY sub_section");
            while ($row = mysql_fetch_row($pse)) {
                $psr = mysql_query("SELECT * FROM uniletim_sections WHERE sec_id = '{$row['2']}' AND ul_group = '{$sess['4']}'");
                $ror = mysql_fetch_row($psr);
                ?>
								<OPTION value="<?php 
                echo "{$row['0']}";
                ?>
"<?php 
                if ($row[0] == $roz[3]) {
                    echo " selected";
                }
                ?>
><?php 
                echo "{$ror['1']} - {$row['1']}";
                ?>
</OPTION><?php 
            }
            ?>
							</select>
					</td>
		            <td align="right" <?php 
            echo $bgcolor;
            ?>
>
		            		<input type="hidden" name="rub" value="<?php 
            echo $rub;
            ?>
"> 
		            		<input type="hidden" name="pri" value="<?php 
            echo $pri;
            ?>
"> 
		            		<input type="hidden" name="view" value="admin"> 
		            		<input type="hidden" name="sedid" value="<?php 
            echo $roz[0];
            ?>
"> 
								<input type="submit" class="paticka" value="<?php 
            echo _CHANGE . " " . _SUBSECTION;
            ?>
"> 
						</td>
                 </form> 		
                <form method="post" action="index.php?action=form&type=edit"> 				 
		       			<td align="right" <?php 
            echo $bgcolor;
            ?>
>
								<input type="hidden" name="eid" value="<?php 
            echo $roz[0];
            ?>
"> 
								<input type="submit" class="paticka" value="<?php 
            echo _CHANGE;
            ?>
"> 
        				</b></td>
        				</form>
                  <form method="post" action="index.php?rub=<?php 
            echo "{$rub}";
            ?>
&pri=<?php 
            echo "{$pri}";
            ?>
&view=admin"> 				 
		       			<td align="right" <?php 
            echo $bgcolor;
            ?>
>
								<input type="hidden" name="did" value="<?php 
            echo $roz[0];
            ?>
"> 
								<input type="submit" class="paticka" value="<?php 
            echo _DELETE;
            ?>
" onclick="return confirm('<?php 
            echo _RLY_DLT_ANNO;
            ?>
')"> 
        				</b></td>
        				</form>
         			</tr>
					<?php 
            if ($i == 10) {
                break;
            }
            $i++;
        }
    }
    ?>
		<tfoot>
		  <tr class="th_sub">
			<th><?php 
    if ($sess[5] >= "2" & $usoz != "") {
        ?>
					<a HREF="index.php?action=form&type=new&dp=<?php 
        echo "{$dopon}";
        ?>
&rub=<?php 
        echo "{$rub}";
        ?>
&pri=<?php 
        echo "{$pri}";
        ?>
&a_id=<?php 
        echo "{$uoz}";
        ?>
"><?php 
        echo _INSERT;
        ?>
</A><?php 
    } elseif ($sess[5] >= "2" & $dopon == "news") {
        ?>
					<a HREF="index.php?action=form&type=new&dp=<?php 
        echo "{$dopon}";
        ?>
"><?php 
        echo _INSERT;
        ?>
</A><?php 
    } else {
        ?>
					<a HREF="index.php?action=form&type=new&dp=<?php 
        echo "{$dopon}";
        ?>
&rub=<?php 
        echo "{$rub}";
        ?>
&pri=<?php 
        echo "{$pri}";
        ?>
"><?php 
        echo _INSERT;
        ?>
</A><?php 
    }
    ?>
			</th>
			<th colspan="<?php 
    echo $cs1;
    ?>
"align="right"><?php 
    // paging of extracts
    $id = "ann_id";
    $table = "uniletim_announces";
    if (isset($uoz)) {
        $link = "index.php?action=user&uoz={$uoz}&page=";
    } elseif (isset($pri)) {
        $link = "index.php?rub={$rub}&pri={$pri}&page=";
    } else {
        $link = "index.php?rub={$rub}&keyword={$keyword}&age={$age}&view={$view}&page=";
    }
    page_counter($id, $table, $sort, $view_number, $sess, $link, $i, $page);
    ?>
				|
  			</th>
		  </tr>
		</tfoot>

<?php 
}
コード例 #7
0
        ?>
	<tbody <?php 
        echo $tb_class;
        ?>
>
	  <tr <?php 
        echo $bgcolor;
        ?>
>
		<td><?php 
        $ke = Explode("-", $entry[3]);
        echo " " . $ke[2] . ". " . $ke[1] . ". " . $ke[0] . "";
        ?>
</td>
		<td><?php 
        member_link($entry[1]);
        ?>
</td>
		<td><?php 
        echo "{$entry['4']}";
        ?>
</td>
		<td align=right><?php 
        echo "{$entry['5']}";
        ?>
</td>
	  </tr>
	</tbody>
 <?php 
    }
    $i++;
コード例 #8
0
ファイル: member_list.tpl.php プロジェクト: kidwm/kidbox
<?php 
foreach ($row as $list) {
    ?>
				<li class="member-list-item">
					<img class="member-list-avatar" src="<?php 
    echo get_avatar($list['member_email']);
    ?>
" alt ="<?php 
    echo $list['member_nicename'];
    ?>
" title ="<?php 
    echo $list['member_nicename'];
    ?>
">
					<span class="member-list-nicename"><?php 
    echo member_link($list['id']);
    ?>
</span>
					<span class="member-list-join_time">Since <?php 
    echo $list['member_registered'];
    ?>
</span>
				</li>
<?php 
}
?>
			</ul>
<?php 
if ($total_items > $items_page) {
    $list_pages = page_list($current_page, $total_pages, 2, OUT_PATH . 'members?', 'page');
    ?>
コード例 #9
0
ファイル: lib.php プロジェクト: kidwm/kidbox
function post_view($to)
{
    $result = inget('`post_title`, `post_author`, `post_author_nicename`, `post_author_ip`, `post_author_email`, `post_content`, `post_date`, `post_modify`, `post_modify_member`, `post_modify_who`, `post_password`, `post_board`', 'posts', 'WHERE `id` = ' . $to);
    if ($row = mysql_fetch_assoc($result)) {
        $title = $row['post_title'];
        $board = board_info($row['post_board']);
        $board_nicename = $board['nicename'];
        $who = member_who();
        $ip = long2ip($row['post_author_ip']);
        if ($row['post_author']) {
            $author = member_link($row['post_author']);
            $row['post_author_nicename'] = $who[$row['post_author']]['nicename'];
            $row['post_author_email'] = $who[$row['post_author']]['email'];
        } else {
            $author = $row['post_author_nicename'];
        }
        if ($row['post_modify']) {
            $mod_time = $row['post_modify'];
            if ($row['post_modify_member']) {
                $mod_who = member_link($row['post_modify_member']);
            } else {
                $mod_who = $row['post_modify_who'];
            }
        }
        if (member_check() && $_SESSION['member']['id'] == $row['post_author'] || $row['post_author'] == 0 && !member_check() && !empty($row['post_password'])) {
            $edit = TRUE;
            $delete = TRUE;
        } else {
            $edit = FALSE;
            $delete = FALSE;
        }
        include load_template('post_view');
    } else {
        set_clue('本站並不存在此篇文章!');
        //wait for notfound implement
        include load_page('notfound');
    }
}