Exemplo n.º 1
0
$migs_user->is_login(SITE_URL);
/* 
 * @ $_GET['PAGE_TITLE'] => the title you want to set
 * @ $_GET['STYLE_LOAD'] => the style you want to load
 */
$MIname = get_option('site');
$MIdesc = get_option('desc');
$_GET['PAGE_TITLE'] = '所有图片 | ' . $MIname;
require_once ABSPATH . 'includes/template/header.php';
?>
	<div id="content">
		
		<div id="x-photos">

			<?php 
$qpage = count_page(false);
$prep = $qpage['prep'];
$_GET['page'] == '' ? $paged = 1 : ($paged = $_GET['page']);
$offset = ($paged - 1) * $prep;
if ($photos = $migs_db->get_results("SELECT * FROM {$migs_db->photos} ORDER BY uid DESC LIMIT {$offset}, {$prep}")) {
    foreach ($photos as $photo) {
        ?>
					<div id="photo-item-<?php 
        echo $photo->uid;
        ?>
" class="photo-item">
						<div id="photo-<?php 
        echo $photo->uid;
        ?>
" class="x-photo">
							<a class="p-img" href="<?php 
Exemplo n.º 2
0
}
/* 
 * @ $_GET['PAGE_TITLE'] => the title you want to set
 * @ $_GET['STYLE_LOAD'] => the style you want to load
 */
$MIname = get_option('site');
$MIdesc = get_option('desc');
$_GET['PAGE_TITLE'] = '首页 | ' . $MIname;
require_once ABSPATH . 'includes/template/header.php';
?>
	<div id="content">
		
		<div id="x-photos">

			<?php 
$qpage = count_page();
$prep = $qpage['prep'];
$_GET['page'] == '' ? $paged = 1 : ($paged = $_GET['page']);
$offset = ($paged - 1) * $prep;
if ($photos = $migs_db->get_results("SELECT * FROM {$migs_db->photos} WHERE status = '1' ORDER BY uid DESC LIMIT {$offset}, {$prep}")) {
    foreach ($photos as $photo) {
        ?>
					<div id="photo-<?php 
        echo $photo->uid;
        ?>
" class="x-photo">
						<a class="p-img" href="<?php 
        echo photo_link($photo->uid);
        ?>
">
							<img src="<?php