header('Content-Type: text/html; charset=utf-8'); include 'islogin.php'; include '../common/db.php'; include '../common/Pager.pdo.class.php'; include '../common/util.php'; if (isset($_GET['id'])) { mysql_query('delete from dfdyyspx_xxbm where xxbm_id=' . $_GET['id'], $conn); } if (isset($_POST['delall'])) { $ids = implode(',', $_POST['delall']); $del = "delete from dfdyyspx_xxbm where xxbm_id in ({$ids})"; mysql_query($del, $conn); } $currpage = isset($_GET['p']) ? $_GET['p'] : 1; $pager = new Pager($pdo, 'dfdyyspx_xxbm', 'xxbm_id desc', "1=1", 10, $currpage, '*'); $result = $pager->query(); ?> <!doctype html> <html> <head> <meta charset="utf-8" /> <title>欢迎光临-河南艺术培训基地-官方网站-后台管理系统Ver1.0</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" type="text/css" href="index.css" /> <script type="text/javascript" src="js/jquery.js"></script> <script type="text/javascript"> <!-- $(document).ready(function(){ function init(){ var h = $(document).height()-50; $("#imiddle").css("height",h);
<div id="imiddle_center"> <table style="margin-top:5px" bgcolor="#999999" width="95%" border="0" align="center" cellpadding="5" cellspacing="1"> <tr> <th width="5%" height="35" bgcolor="#F3F3F3">ID</th> <th width="25%" height="35" bgcolor="#F3F3F3">标题</th> <th width="25%" bgcolor="#F3F3F3">内容</th> <th width="25%" bgcolor="#F3F3F3">图片效果</th> <th width="5%" bgcolor="#F3F3F3">查看次数</th> <th width="10%" bgcolor="#F3F3F3">操作</th> </tr> <?php $i = 0; $color = "#FbFbFb"; foreach ($pager->query() as $v) { if (++$i % 2 == 0) { $color = '#FFFFFF'; } else { $color = '#FBFBFB'; } ?> <tr bgcolor="<?php echo $color; ?> " onmouseover="this.bgColor='#fcf9cd'" onmouseout="this.bgColor='<?php echo $color; ?> '"> <td align="center"><?php echo $v[0];
loader_import('saf.Misc.TableHeader'); if (!isset($cgi->offset)) { $cgi->offset = 0; } $pg = new Pager($cgi->offset); $pg->url = site_current() . '?table=' . urlencode($cgi->table) . '&orderBy=' . urlencode($cgi->orderBy) . '&sort=' . urlencode($cgi->sort); // build query $sql = 'select * from ' . $cgi->table; if ($cgi->orderBy) { $sql .= ' order by ' . $cgi->orderBy; if ($cgi->sort) { $sql .= ' ' . $cgi->sort; } } // execute $res = $pg->query($sql); if ($res === false) { die($pg->error); } $tbl = db_table($cgi->table); $tbl->getInfo(); foreach ($tbl->info as $key) { $key = (array) $key; $key = array_shift($key); $headers[] = new TableHeader($key, ucwords(str_replace('_', ' ', $key))); } function myadm_shorten($value) { if (strlen($value) > 32) { $value = htmlentities(substr($value, 0, 29)) . '...'; } elseif (empty($value)) {