예제 #1
0
	$zpinfo = C::t('#hejin_toupiao#hjtp_zuopins')->fetch_by_id($zid);
	if($zid){
		include_once ("page.class.php");
		$page=$_GET['page'];
		$tplist = C::t('#hejin_toupiao#hjtp_tpjles')->fetch_zid_all($zid);
		$totail = count($tplist);
		$number = 40;
		$url = $SELF.'?action=plugins&operation=config&do=' . $_GET['do'] . '&identifier=hejin_toupiao&pmod=toupiao&model=tpjles&zid='.$zid.'&page={page}';
		$my_page=new PageClass($totail,$number,$page,$url);//参数设定:总记录,每页显示的条数,当前页,连接的地址
		$startnum = $my_page->page_limit;
		$count = $my_page->myde_size;


		$stlists = C::t('#hejin_toupiao#hjtp_tpjles')->fetch_zid_limit($zid,$startnum,$count);

		$page_string = $my_page->myde_write();

		include template('hejin_toupiao:admin/tpjles');
	}
}

//删除作品投票记录
elseif($model == 'deltpjl'){
	if($_GET['formhash']==formhash()){
	if($_GET['tjid']){
		$tjid = intval($_GET['tjid']);
		$zid = intval($_GET['zid']);
		$page = intval($_GET['page'])?intval($_GET['page']):1;
		$deltpjls = C::t('#hejin_toupiao#hjtp_tpjles')->delete_by_id($tjid);
		if($deltpjls){
			$zuopin = C::t('#hejin_toupiao#hjtp_zuopins')->fetch_by_id($zid);
예제 #2
0
파일: ajax.php 프로젝트: sujinw/webPHP

$sql = "select `pic` from `mypic` limit $nextpagestart,$pagesize";
$query =mysql_query($sql);
while($row = mysql_fetch_array($query)){
	//内容
?>
<img src="<?php 
echo $row["pic"];
?>
" alt="" width="200" height="200">
<?
}



//分页
if($page ==$maxnum){
	include('page.class.php');
	$sqlsum = "select `id` from `mypic`";
	$querysum = mysql_query($sqlsum);

	//数据总数
	$total = mysql_num_rows($querysum);
	//参数对应位置:总记录,每页显示的条数,当前页,连接的地址
	$my_page=new PageClass($total,$pagesize,$page,'?page={page}');
	//输出页码
	echo $my_page->myde_write();
	exit;
}
?>
예제 #3
0
파일: index.php 프로젝트: hewenhua/falcon
                                        $newlevel = "中";
                                    } elseif ($row['level'] == 3) {
                                        $newlevel = "高";
                                    } else {
                                        $newlevel = "NULL";
                                    }
                                    if ($row['remove'] == 0) {
                                        $newremove = "未隔离";
                                    } elseif ($row['remove'] == 1) {
                                        $newremove = "已隔离";
                                    } else {
                                        $newremove = "NULL";
                                    }
                                    $rows[] = array("id" => $row['id'], "ip" => trim($row['ip']), "content" => $row['content'], "source" => trim($row['source']), "level" => $newlevel, "remove" => $newremove, "date" => $row['date']);
                                }
                                $pag = $my_page->myde_write();
                                $t->assign('all', $rows);
                                $t->assign('page', $pag);
                                echo $t->output('html/main.html');
                            }
                        }
                    }
                }
            }
        }
    }
} else {
    header("Location: login.php");
}
?>
</div>