打造简单的PHP&MYSQL留言板



SELECT [t0].[a_id], [t0].[a_site], [t0].[a_model], [t0].[a_type], [t0].[a_special], [t0].[a_name], [t0].[a_from], [t0].[a_from_url], [t0].[a_author], [t0].[a_editor], [t0].[a_describe], [t0].[a_content], [t0].[a_create_date], [t0].[a_tag], [t0].[a_hits], [t0].[a_commend], [t0].[a_istop], [t0].[a_isimg], [t0].[a_cacheimg], [t0].[a_imgurls], [t0].[a_imgurl], [t0].[a_ismedia], [t0].[a_mediaurl], [t0].[a_iscomment], [t0].[a_isRecycle], [t0].[a_weight], [t0].[a_weights], [t0].[a_status], [t0].[a_url], [t0].[a_file_path], [t0].[a_contentfile], [t0].[a_comment], [t0].[a_ispass], [t0].[a_bury], [t0].[a_dig], [t0].[a_score], [t0].[a_rank], [t0].[a_diguser], [t0].[a_buryuser], [t0].[a_viewip], [t0].[a_lastviewdate], [t0].[a_neworimageorvideo], [t0].[class_id], [t0].[class_type], [t0].[class_name], [t0].[class_show_name], [t0].[class_parent_id], [t0].[class_id_path], [t0].[class_name_path], [t0].[class_show_name_path], [t0].[class_depth], [t0].[class_order], [t0].[class_content], [t0].[class_img], [t0].[a_model_name] FROM [dbo].[mvc_content_view] AS [t0] WHERE ([t0].[a_id] = @p0) AND ([t0].[a_type] = @p1) -- @p0: Input BigInt (Size = 0; Prec = 0; Scale = 0) [3427] -- @p1: Input BigInt (Size = 0; Prec = 0; Scale = 0) [222] -- Context: SqlProvider(Sql2008) Model: AttributedMetaModel Build: 3.5.30729.1 SELECT TOP (1) [t0].[a_id], [t0].[a_site], [t0].[a_model], [t0].[a_type], [t0].[a_special], [t0].[a_name], [t0].[a_from], [t0].[a_from_url], [t0].[a_author], [t0].[a_editor], [t0].[a_describe], [t0].[a_content], [t0].[a_create_date], [t0].[a_tag], [t0].[a_hits], [t0].[a_commend], [t0].[a_istop], [t0].[a_isimg], [t0].[a_cacheimg], [t0].[a_imgurls], [t0].[a_imgurl], [t0].[a_ismedia], [t0].[a_mediaurl], [t0].[a_iscomment], [t0].[a_isRecycle], [t0].[a_weight], [t0].[a_weights], [t0].[a_status], [t0].[a_url], [t0].[a_file_path], [t0].[a_contentfile], [t0].[a_comment], [t0].[a_ispass], [t0].[a_bury], [t0].[a_dig], [t0].[a_score], [t0].[a_rank], [t0].[a_diguser], [t0].[a_buryuser], [t0].[a_viewip], [t0].[a_lastviewdate], [t0].[a_neworimageorvideo], [t0].[class_id], [t0].[class_type], [t0].[class_name], [t0].[class_show_name], [t0].[class_parent_id], [t0].[class_id_path], [t0].[class_name_path], [t0].[class_show_name_path], [t0].[class_depth], [t0].[class_order], [t0].[class_content], [t0].[class_img], [t0].[a_model_name] FROM [dbo].[mvc_content_view] AS [t0] WHERE ([t0].[a_type] = @p0) AND ([t0].[a_id] < @p1) ORDER BY [t0].[a_id] DESC -- @p0: Input BigInt (Size = 0; Prec = 0; Scale = 0) [222] -- @p1: Input BigInt (Size = 0; Prec = 0; Scale = 0) [3427] -- Context: SqlProvider(Sql2008) Model: AttributedMetaModel Build: 3.5.30729.1 SELECT TOP (1) [t0].[a_id], [t0].[a_site], [t0].[a_model], [t0].[a_type], [t0].[a_special], [t0].[a_name], [t0].[a_from], [t0].[a_from_url], [t0].[a_author], [t0].[a_editor], [t0].[a_describe], [t0].[a_content], [t0].[a_create_date], [t0].[a_tag], [t0].[a_hits], [t0].[a_commend], [t0].[a_istop], [t0].[a_isimg], [t0].[a_cacheimg], [t0].[a_imgurls], [t0].[a_imgurl], [t0].[a_ismedia], [t0].[a_mediaurl], [t0].[a_iscomment], [t0].[a_isRecycle], [t0].[a_weight], [t0].[a_weights], [t0].[a_status], [t0].[a_url], [t0].[a_file_path], [t0].[a_contentfile], [t0].[a_comment], [t0].[a_ispass], [t0].[a_bury], [t0].[a_dig], [t0].[a_score], [t0].[a_rank], [t0].[a_diguser], [t0].[a_buryuser], [t0].[a_viewip], [t0].[a_lastviewdate], [t0].[a_neworimageorvideo], [t0].[class_id], [t0].[class_type], [t0].[class_name], [t0].[class_show_name], [t0].[class_parent_id], [t0].[class_id_path], [t0].[class_name_path], [t0].[class_show_name_path], [t0].[class_depth], [t0].[class_order], [t0].[class_content], [t0].[class_img], [t0].[a_model_name] FROM [dbo].[mvc_content_view] AS [t0] WHERE ([t0].[a_type] = @p0) AND ([t0].[a_id] > @p1) ORDER BY [t0].[a_id] -- @p0: Input BigInt (Size = 0; Prec = 0; Scale = 0) [222] -- @p1: Input BigInt (Size = 0; Prec = 0; Scale = 0) [3427] -- Context: SqlProvider(Sql2008) Model: AttributedMetaModel Build: 3.5.30729.1 SELECT [t0].[a_id], [t0].[a_site], [t0].[a_model], [t0].[a_type], [t0].[a_special], [t0].[a_name], [t0].[a_from], [t0].[a_from_url], [t0].[a_author], [t0].[a_editor], [t0].[a_describe], [t0].[a_content], [t0].[a_create_date], [t0].[a_tag], [t0].[a_hits], [t0].[a_commend], [t0].[a_istop], [t0].[a_isimg], [t0].[a_cacheimg], [t0].[a_imgurls], [t0].[a_imgurl], [t0].[a_ismedia], [t0].[a_mediaurl], [t0].[a_iscomment], [t0].[a_isRecycle], [t0].[a_weight], [t0].[a_weights], [t0].[a_status], [t0].[a_url], [t0].[a_file_path], [t0].[a_contentfile], [t0].[a_comment], [t0].[a_ispass], [t0].[a_bury], [t0].[a_dig], [t0].[a_score], [t0].[a_rank], [t0].[a_diguser], [t0].[a_buryuser], [t0].[a_viewip], [t0].[a_lastviewdate], [t0].[a_neworimageorvideo] FROM [dbo].[mvc_content] AS [t0] WHERE ([t0].[a_id] = @p0) AND ([t0].[a_type] = @p1) -- @p0: Input BigInt (Size = 0; Prec = 0; Scale = 0) [3427] -- @p1: Input BigInt (Size = 0; Prec = 0; Scale = 0) [222] -- Context: SqlProvider(Sql2008) Model: AttributedMetaModel Build: 3.5.30729.1 UPDATE [dbo].[mvc_content] SET [a_hits] = @p19 WHERE ([a_id] = @p0) AND ([a_site] = @p1) AND ([a_model] = @p2) AND ([a_type] = @p3) AND ([a_special] = @p4) AND ([a_name] = @p5) AND ([a_from] = @p6) AND ([a_from_url] IS NULL) AND ([a_author] IS NULL) AND ([a_editor] IS NULL) AND ([a_describe] IS NULL) AND ([a_content] = @p7) AND ([a_create_date] = @p8) AND ([a_tag] = @p9) AND ([a_hits] = @p10) AND (NOT ([a_commend] = 1)) AND (NOT ([a_istop] = 1)) AND (NOT ([a_isimg] = 1)) AND ([a_cacheimg] IS NULL) AND ([a_imgurls] IS NULL) AND ([a_imgurl] = @p11) AND (NOT ([a_ismedia] = 1)) AND ([a_mediaurl] IS NULL) AND (NOT ([a_iscomment] = 1)) AND (NOT ([a_isRecycle] = 1)) AND ([a_weight] = @p12) AND ([a_status] = @p13) AND ([a_url] IS NULL) AND ([a_file_path] IS NULL) AND ([a_contentfile] IS NULL) AND ([a_comment] = @p14) AND ([a_ispass] = @p15) AND ([a_bury] = @p16) AND ([a_dig] = @p17) AND ([a_score] = @p18) AND ([a_diguser] IS NULL) AND ([a_buryuser] IS NULL) AND ([a_viewip] IS NULL) AND ([a_lastviewdate] IS NULL) AND ([a_neworimageorvideo] IS NULL) SELECT [t1].[a_weights], [t1].[a_rank] FROM [dbo].[mvc_content] AS [t1] WHERE ((@@ROWCOUNT) > 0) AND ([t1].[a_id] = @p20) -- @p0: Input BigInt (Size = 0; Prec = 0; Scale = 0) [3427] -- @p1: Input BigInt (Size = 0; Prec = 0; Scale = 0) [197] -- @p2: Input BigInt (Size = 0; Prec = 0; Scale = 0) [24] -- @p3: Input BigInt (Size = 0; Prec = 0; Scale = 0) [222] -- @p4: Input BigInt (Size = 0; Prec = 0; Scale = 0) [0] -- @p5: Input NVarChar (Size = 17; Prec = 0; Scale = 0) [打造简单的PHP&MYSQL留言板] -- @p6: Input NVarChar (Size = 3; Prec = 0; Scale = 0) [354] -- @p7: Input NVarChar (Size = 16959; Prec = 0; Scale = 0) [

数据库结构:(库名:lyb)

表一: admin
字段: id(int11)   name(varchvr)   password(varchvr)

表二: lo
字段: id(int11)   username(varchvr)  sex(varchvr)  qq(varchvr)  email(varchvr)  info(text)  ip(varchvr)  submit_time(datetime)

1、conn.php(连接数据库文件)

<?php
mysql_connect("localhost","root","");//连接数据库
mysql_select_db("lyb");//选择数据库
?>

2、header.php(公用头部文件)

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>银子留言板 Version 1.0</title>
</head>
<link href="css.css" rel="stylesheet" type="text/css" />
<body>
<div id="head">
    <div id="head_l">
        <ul>
            <li><a href="index.php">偶要看留言</a></li>
            <li><a href="post.php">偶要发表</a></li>
            <?php
            session_start();
            if($_SESSION["key"]==1){//如果获取的SESSION为1则显示管理项
            ?>
            <li><a href="adminexit.php">退出管理</a></li>
            <?
            }
            else
            {
            ?>
            <li><a href="admin.php">偶要管理</a></li>
            <?}?>
        </ul>
    </div>
    <div id="head_r">银子留言板 Version 1.0</div>
</div>

3、footer.php(公用底部文件)

<?php
$counterFile="conter.xml";
function displayCounter($counterFile){
$fp  =  fopen($counterFile,"rw");
$num =  fgets($fp,5);
$num += 1;
print "<div id=\"footer\">银子留言板 Version 1.0&nbsp;&nbsp;&nbsp;您是第&nbsp;"."$num"."&nbsp;位无聊的银</div>";
exec("rm -rf $counterFile");
exec("echo $num > $counterFile");
}
if(!file_exists($counterFile)){
exec("echo 0 > $counterFile");
}
displayCounter($counterFile);
?>

</body>
</html>

4、index.php(首页)

<?php
require_once("conn.php");
require_once("header.php");
session_start();

//分页代码开始
$pagesize = 10;//设置每页显示条数
$rs = mysql_query("select count(*) from lo");//取得记录总数,计算总页数用
$myrow = mysql_fetch_array($rs);
$numrows = $myrow[0];//计算总记录

$pages = intval($numrows/$pagesize);
if($numrows%$pagesize)$pages++;//设置页数
if(isset($_GET['page']))
    {
        $page = intval($_GET['page']);
    }
    else
    {
        $page = 1;//设为第一页
    }
$offset = $pagesize*($page-1);//计算记录偏移量
//分页代码结束


$sql = "select id,username,sex,qq,email,info,ip,DATE_FORMAT(submit_time, '%Y年%m月%d日 %T' ) from lo order by id desc limit $offset,$pagesize";//用到了DATE-FORMAT格式化日期格式
$result = mysql_query($sql);
$num = mysql_num_rows($result);

if($num>0){
    while($row = mysql_fetch_array($result))
    {
    //echo print_r($row);
        if($row[2]=="男")//这个使性别改成你想要的名称^_^
        {
            $sex = "帅锅";
        }
        else
        {
            $sex = "美女";
        }


?>

<div id="show">
    <p class="num">第 [<?= $row[0] ?>] 条留言<p>
    <p class="unline">留言人:<span class="blue"><?= $row[1]?></span>&nbsp;&nbsp;性别:<?= $sex ?>&nbsp;&nbsp;留言时间:<?= $row[7] ?>&nbsp;<? if($row[3]) {?>&nbsp;<a href="http://wpa.qq.com/msgrd?V=1&Uin=<?= $row[3] ?>&Site=http://www.loai.cn&Menu=yes"><img src="img/qq.gif" alt="<?= $row[3]?>" /></a><? } ?><? if($row[4]){ ?>&nbsp;<a href="mailto:<?= $row[4] ?>"><img src="img/email.gif" alt="<?= $row[4]?>" /></a>&nbsp;<? }?><? if($_SESSION["key"]==1){ ?>&nbsp;IP:<?= $row[6] ?>&nbsp;&nbsp;<a href="update.php?wuleying&id=<?= $row[0]?>">更改</a>&nbsp;<a href="delete.php?wuleying&id=<?= $row[0]?>">删除</a><?}?></a></p>
    <p class="blue">留言内容:</p>
    <div id="show_info"><?= nl2br(htmlspecialchars($row[5])) ?></div>
</div>
<?php
    }
}
else
    {
        echo "<div id=\"show\">无数据......</div>";
    }
?>

<div id="show_page">
<p>
<?php
$first=1;
$prev=$page-1;
$next=$page+1;
$last=$pages;
if($page==1&&$pages>1)
{
    echo "首页&nbsp;|&nbsp;";
    echo "上一页&nbsp;|&nbsp;";
    echo "<a href=\"index.php?page=".$next."\">下一页</a>&nbsp;|&nbsp;";
    echo "<a href=\"index.php?page=".$last."\">尾页</a>&nbsp;|&nbsp;";
}
elseif($page>=1&&$page!=$pages&&$num>0)
{
    echo "<a href=\"index.php?page=".$first."\">首页</a>&nbsp;|&nbsp;";
    echo "<a href=\"index.php?page=".$prev."\">上一页</a>&nbsp;|&nbsp;";
    echo "<a href=\"index.php?page=".$next."\">下一页</a>&nbsp;|&nbsp;";
    echo "<a href=\"index.php?page=".$last."\">尾页</a>&nbsp;|&nbsp;";
}
elseif($page==$pages&&$page!=1)
{
    echo "<a href=\"index.php?page=".$first."\">首页</a>&nbsp;|&nbsp;";
    echo "<a href=\"index.php?page=".$prev."\">上一页</a>&nbsp;|&nbsp;";
    echo "下一页&nbsp;|&nbsp;";
    echo "尾页&nbsp;|&nbsp;";
}
elseif($page==$pages)
{
    echo "首页&nbsp;|&nbsp;";
    echo "上一页&nbsp;|&nbsp;";
    echo "下一页&nbsp;|&nbsp;";
    echo "尾页&nbsp;|&nbsp;";   
}
else
{
    echo "首页&nbsp;|&nbsp;";
    echo "上一页&nbsp;|&nbsp;";
    echo "下一页&nbsp;|&nbsp;";
    echo "尾页&nbsp;|&nbsp;";
}
?>
共&nbsp;<span><?= $pages ?></span>&nbsp;页&nbsp;|&nbsp;当前第&nbsp;<span><?= $page ?></span>&nbsp;页&nbsp;|&nbsp;共&nbsp;<span><?=$numrows ?></span>&nbsp条留言</p>
</div>


<?php
mysql_close();
?>

<?php
require_once("footer.php");
?>

5、post.php(提交留言页面)

<?
require_once("header.php");
?>
<div id="input">
<form method="post" action="input.php" name="form1">
    <h1>提交留言</h1>
    <p>姓名 :<input type="text" name="name" size="20" class="y" />&nbsp;</p>
    <p>性别 :<input name="sex" type="radio" value="男" checked/>&nbsp;帅锅&nbsp;<input type="radio" name="sex" value="女"/>&nbsp;美女</p>
    <p>Q Q :<input type="text" name="qq" class="y" />&nbsp;(可选填)</p>
    <p>Email:<input type="text" name="email" class="y" />&nbsp;(可选填)</p>
    <p>留言内容:</p>
    <p><textarea name="info" rows="5" cols="40"></textarea></p>
    <p class="cen">
        <input type="submit" value="偶填好了" />
        <input type="reset" value="偶要重写">
    </p>
    <p class="cen1">银子留言板 Version 1.0</p>
</form>
</div>
</body>
</html>

6、input.php(插入留言)

<?php
require_once("conn.php");


$username = $_POST['name'];
$sex = $_POST['sex'];
$qq = $_POST['qq'];
$email = $_POST['email'];
$info = $_POST['info'];

if (strrpos($username,"<")!==false || strrpos($username,">")!==false||strrpos($username,"@")!==false||strrpos($username,"\"")!==false||strrpos($username,"'")!==false||strrpos($username,"_")!==false)
{
    echo "<script>alert('名称不能有特殊字符!');location.href='post.php';</script>";
    exit();
}

if (!ereg("^[0-9]{0,}$",$qq))//用正则检查QQ格式
{
    echo "<script>alert('OICQ信息有错误!必须是数字!');location.href='post.php';</script>";
    exit();
}

if($email)
{//如果填写了邮箱就用正则检查邮箱格式
    if (!ereg("^[a-zA-Z0-9_\-\.]+@[a-zA-Z0-9\-]+\.[a-zA-Z0-9\-\.]+$",$email))
    {
        echo "<script>alert('email格式不正确!');location.href='post.php';</script>";
        exit();
    }
}

if(!$username)
{
    echo "<script>alert('名称不能为空哦!');location.href='post.php';</script>";
    exit();
}
elseif(!$info)
{
    echo "<script>alert('留言不能为空哦!');location.href='post.php';</script>";
    exit();
}
else
{
    $ip = getenv('REMOTE_ADDR');//获取客户端IP地址

    $sql = "insert into lo (username,sex,qq,email,info,ip,submit_time) values ('$username','$sex','$qq','$email','$info','$ip',NOW())";

    $result = mysql_query($sql);

    mysql_close();

    echo "<script>alert('提交成功!返回首页');location.href='index.php';</script>";
}
?>

7、update.php(修改留言页)

<?php
session_start();
require_once('conn.php');
require_once('header.php');


if($_SESSION["key"]==1)
{
$id = $_GET['id'];
$sql = "select * from lo where id= ".$id;
$result = mysql_query($sql);
$row = mysql_fetch_array($result);

?>

<div id="update">
    <form action="updatepost.php?wuleying&id=<?= $row[0] ?>" method="post">
        <h1>修改留言</h1>
        <p>姓名:<input type="text" value="<?= $row[1]?>" name="name" class="y"></input></p>
        <p>留言:</p>
        <p><textarea  name="info" rows="5" cols="35"><?= $row[5] ?></textarea></p>
        <p class="cen"><input type="submit" value="偶要修改" /></p>
        <p class="cen1">银子留言板 Version 1.0</p>
    </form>

<div>


<?php
}
else
{
header('location:index.php');
}
?>

8、updatepost(修改提交页)

<?php
require_once('conn.php');

$username = $_POST['name'];
$info = $_POST['info'];
$id = $_GET['id'];
//echo $id;

$sql = "update lo set username= '".$username."',info='".$info."' where id=".$id;
mysql_query($sql);

echo "<script>alert('修改成功!');location.href='index.php';</script>";
?>

9、delete.php(删除留言页)

<?php
session_start();
require_once('conn.php');

$id=$_GET['id'];

if($_SESSION["key"]==1)
{
$sql = "delete from lo where id=".$id;
mysql_query($sql);
echo "<script>location.href='index.php'</script>";
}
else
{
header('location:index.php');
}
?>

10、admin.php(管理登录页)

<?php
require_once('conn.php');
require_once('header.php');
?>

<div id="admin">
    <form method="post" action="adminpost.php">
    <h1>管理员登录</h1>
        <p>姓名 : <input type="text" name="name" size="20" class="y" />&nbsp;</p>
        <p>密码 : <input type="password" name="password" size="20" class="y" />&nbsp;</p>
        <p class="cen"><input type="submit" value="管理员登录" /></p>
        <p class="cen1">银子留言板 Version 1.0</p>
    </form>
</div>

11、adminpost.php(管理验证页)

<?php
session_start();
require_once('conn.php');

$name = $_POST['name'];
$password = $_POST['password'];

$sql = "select * from admin where name='".$name."'";
$result = mysql_query($sql);
$num = mysql_num_rows($result);

if (strrpos($name,"<")!==false || strrpos($name,">")!==false||strrpos($name,"@")!==false||strrpos($name,"\"")!==false||strrpos($name,"'")!==false||strrpos($name,"_")!==false)
{
    echo "<script>alert('不能有特殊字符!');location.href='admin.php';</script>";
}

if($num)
{//如果用户存在,就检查密码是否正确
    $rs = mysql_fetch_array($result);
    if($rs[2]!=$password)
    {
        echo "<script>alert('密码不正确,请确认后输入!');location.href='admin.php';</script>";
    }
    else
    {//用户名,密码都正确,注册SESSION变量,然后跳转到首页
        $_SESSION["key"]=1;
        echo "<script>alert('登录成功!');location.href='index.php';</script>";
    }
}
else
{//如果没有这个用户
    echo "<script>alert('没有这个用户,请确认后输入!');location.href='admin.php';</script>";
}
?>

12、adminexit.php(退出管理页)

<?php
session_start();
$_SESSION["key"] = 0;//使SESSION不为1,0为游客,1为管理员

header('location:index.php');
?>

只是些基本的东东,像MD5加密,UBB,表情图片,添加管理员账号,回复留言(-_!!)等我都没加上去,有兴趣的同学可以完善下,不足的地方请指出^_^

管理员账号:wuleying  密码:123456

源文件下载:wuleying_gbook.rar

] -- @p8: Input DateTime (Size = 0; Prec = 0; Scale = 0) [2007-10-1 16:44:13] -- @p9: Input NVarChar (Size = 19; Prec = 0; Scale = 0) [打造,简单,PHP,MYSQL,留言板] -- @p10: Input BigInt (Size = 0; Prec = 0; Scale = 0) [7813] -- @p11: Input NVarChar (Size = 0; Prec = 0; Scale = 0) [] -- @p12: Input BigInt (Size = 0; Prec = 0; Scale = 0) [0] -- @p13: Input Int (Size = 0; Prec = 0; Scale = 0) [0] -- @p14: Input BigInt (Size = 0; Prec = 0; Scale = 0) [0] -- @p15: Input Int (Size = 0; Prec = 0; Scale = 0) [0] -- @p16: Input BigInt (Size = 0; Prec = 0; Scale = 0) [0] -- @p17: Input BigInt (Size = 0; Prec = 0; Scale = 0) [0] -- @p18: Input Float (Size = 0; Prec = 0; Scale = 0) [0] -- @p19: Input BigInt (Size = 0; Prec = 0; Scale = 0) [7814] -- @p20: Input BigInt (Size = 0; Prec = 0; Scale = 0) [3427] -- Context: SqlProvider(Sql2008) Model: AttributedMetaModel Build: 3.5.30729.1 SELECT TOP (10) [t0].[a_id], [t0].[a_site], [t0].[a_model], [t0].[a_type], [t0].[a_special], [t0].[a_name], [t0].[a_from], [t0].[a_from_url], [t0].[a_author], [t0].[a_editor], [t0].[a_describe], [t0].[a_content], [t0].[a_create_date], [t0].[a_tag], [t0].[a_hits], [t0].[a_commend], [t0].[a_istop], [t0].[a_isimg], [t0].[a_cacheimg], [t0].[a_imgurls], [t0].[a_imgurl], [t0].[a_ismedia], [t0].[a_mediaurl], [t0].[a_iscomment], [t0].[a_isRecycle], [t0].[a_weight], [t0].[a_weights], [t0].[a_status], [t0].[a_url], [t0].[a_file_path], [t0].[a_contentfile], [t0].[a_comment], [t0].[a_ispass], [t0].[a_bury], [t0].[a_dig], [t0].[a_score], [t0].[a_rank], [t0].[a_diguser], [t0].[a_buryuser], [t0].[a_viewip], [t0].[a_lastviewdate], [t0].[a_neworimageorvideo], [t0].[class_id], [t0].[class_type], [t0].[class_name], [t0].[class_show_name], [t0].[class_parent_id], [t0].[class_id_path], [t0].[class_name_path], [t0].[class_show_name_path], [t0].[class_depth], [t0].[class_order], [t0].[class_content], [t0].[class_img], [t0].[a_model_name] FROM [dbo].[mvc_content_view] AS [t0] WHERE ([t0].[a_type] IN (@p0, @p1, @p2, @p3, @p4)) AND (NOT ([t0].[a_isRecycle] = 1)) ORDER BY [t0].[a_id] DESC -- @p0: Input BigInt (Size = 0; Prec = 0; Scale = 0) [222] -- @p1: Input BigInt (Size = 0; Prec = 0; Scale = 0) [274] -- @p2: Input BigInt (Size = 0; Prec = 0; Scale = 0) [275] -- @p3: Input BigInt (Size = 0; Prec = 0; Scale = 0) [276] -- @p4: Input BigInt (Size = 0; Prec = 0; Scale = 0) [277] -- Context: SqlProvider(Sql2008) Model: AttributedMetaModel Build: 3.5.30729.1 SELECT TOP (10) [t0].[a_id], [t0].[a_site], [t0].[a_model], [t0].[a_type], [t0].[a_special], [t0].[a_name], [t0].[a_from], [t0].[a_from_url], [t0].[a_author], [t0].[a_editor], [t0].[a_describe], [t0].[a_content], [t0].[a_create_date], [t0].[a_tag], [t0].[a_hits], [t0].[a_commend], [t0].[a_istop], [t0].[a_isimg], [t0].[a_cacheimg], [t0].[a_imgurls], [t0].[a_imgurl], [t0].[a_ismedia], [t0].[a_mediaurl], [t0].[a_iscomment], [t0].[a_isRecycle], [t0].[a_weight], [t0].[a_weights], [t0].[a_status], [t0].[a_url], [t0].[a_file_path], [t0].[a_contentfile], [t0].[a_comment], [t0].[a_ispass], [t0].[a_bury], [t0].[a_dig], [t0].[a_score], [t0].[a_rank], [t0].[a_diguser], [t0].[a_buryuser], [t0].[a_viewip], [t0].[a_lastviewdate], [t0].[a_neworimageorvideo], [t0].[class_id], [t0].[class_type], [t0].[class_name], [t0].[class_show_name], [t0].[class_parent_id], [t0].[class_id_path], [t0].[class_name_path], [t0].[class_show_name_path], [t0].[class_depth], [t0].[class_order], [t0].[class_content], [t0].[class_img], [t0].[a_model_name] FROM [dbo].[mvc_content_view] AS [t0] WHERE ([t0].[a_type] IN (@p0, @p1, @p2, @p3, @p4)) AND (NOT ([t0].[a_isRecycle] = 1)) ORDER BY [t0].[a_id] DESC -- @p0: Input BigInt (Size = 0; Prec = 0; Scale = 0) [222] -- @p1: Input BigInt (Size = 0; Prec = 0; Scale = 0) [274] -- @p2: Input BigInt (Size = 0; Prec = 0; Scale = 0) [275] -- @p3: Input BigInt (Size = 0; Prec = 0; Scale = 0) [276] -- @p4: Input BigInt (Size = 0; Prec = 0; Scale = 0) [277] -- Context: SqlProvider(Sql2008) Model: AttributedMetaModel Build: 3.5.30729.1 SELECT TOP (10) [t0].[a_id], [t0].[a_site], [t0].[a_model], [t0].[a_type], [t0].[a_special], [t0].[a_name], [t0].[a_from], [t0].[a_from_url], [t0].[a_author], [t0].[a_editor], [t0].[a_describe], [t0].[a_content], [t0].[a_create_date], [t0].[a_tag], [t0].[a_hits], [t0].[a_commend], [t0].[a_istop], [t0].[a_isimg], [t0].[a_cacheimg], [t0].[a_imgurls], [t0].[a_imgurl], [t0].[a_ismedia], [t0].[a_mediaurl], [t0].[a_iscomment], [t0].[a_isRecycle], [t0].[a_weight], [t0].[a_weights], [t0].[a_status], [t0].[a_url], [t0].[a_file_path], [t0].[a_contentfile], [t0].[a_comment], [t0].[a_ispass], [t0].[a_bury], [t0].[a_dig], [t0].[a_score], [t0].[a_rank], [t0].[a_diguser], [t0].[a_buryuser], [t0].[a_viewip], [t0].[a_lastviewdate], [t0].[a_neworimageorvideo], [t0].[class_id], [t0].[class_type], [t0].[class_name], [t0].[class_show_name], [t0].[class_parent_id], [t0].[class_id_path], [t0].[class_name_path], [t0].[class_show_name_path], [t0].[class_depth], [t0].[class_order], [t0].[class_content], [t0].[class_img], [t0].[a_model_name] FROM [dbo].[mvc_content_view] AS [t0] WHERE ([t0].[a_type] IN (@p0, @p1, @p2, @p3, @p4)) AND (NOT ([t0].[a_isRecycle] = 1)) ORDER BY [t0].[a_hits] DESC, [t0].[a_id] DESC -- @p0: Input BigInt (Size = 0; Prec = 0; Scale = 0) [222] -- @p1: Input BigInt (Size = 0; Prec = 0; Scale = 0) [274] -- @p2: Input BigInt (Size = 0; Prec = 0; Scale = 0) [275] -- @p3: Input BigInt (Size = 0; Prec = 0; Scale = 0) [276] -- @p4: Input BigInt (Size = 0; Prec = 0; Scale = 0) [277] -- Context: SqlProvider(Sql2008) Model: AttributedMetaModel Build: 3.5.30729.1