好!欢迎访问迷津渡口 现在时间是: 天气 °C ~ °C

迷津渡口

越感到迷惑 越接近真理

emlog MVC解构10--Model模型之Comment_Model

评论模型Comment_Model是和用户交互的重要保证:

属性表:

private $db内部数据库连接对象,用于在数据库存取评论数据

方法表:

方法注释
function __construct()构造方法,新建数据库连接对象
function getComments($spot=0,$blogId=null,$hide=null,$page=null)获取评论列表,参数$spot模式有三种0:前台,1:后台,2:手机,$blogId是日志的唯一ID,$hide是是否隐藏,'y'/'n',$page是页码,返回日志评论的数组
function getOneComment($commentId)获取单个评论,参数$commentId是评论唯一ID,$nl2br是否将\n换成<br>,返回单个评论的数组
function getCommentNum($blogId=null,$hide=null)获取评论的数量,参数$blogId是日志唯一ID,$hide是是否隐藏,'y'/'n',返回日志评论的数量
function delComment($commentId)删除某个评论包括它的子评论,参数$commentId是评论唯一ID
function delCommentByIp($ip)删除某个ip提交的评论,参数$ip是提交评论的IP
function hideComment($commentId)隐藏某个评论包括它的子评论,参数$commentId是评论唯一ID
function showComment($commentId)审核或者重新发布某个评论,参数$commentId是评论唯一ID,效果是$hide从'n'改为'y'
function replyComment($blogId,$pid,$content,$hide)回复评论,参数$blogId是日志的唯一ID,$pid是父评论ID,$content是评论内容,$hide是是否隐藏
function batchComment($action,$comments)
批量处理评论,参数$action可以为'delcom'表示删除评论,'hidecom'表示隐藏评论,'showcom'表示显示或审核评论,$comments是一个包含多个评论ID的数组
function updateCommentNum($blogId)更新评论数量,参数$blogId是日志唯一ID,也可以是包含多个日志ID的数组,返回日志评论数量
function addComment($name,$content,$mail,$url,$imgcode,$blogId,$pid)添加评论,参数$name是评论者名称,$content是评论内容,$mail是评论者邮箱,$url是评论者个人网站,$imgcode是评论者头像,$blogId是日志ID,$pid是父评论ID
function updateComment($commentData,$commentId)更新评论,参数$commentData是包含新评论数据的数组,$commentId是评论的ID
function isCommentExist($blogId,$name,$content)判断评论是否存在,参数$blogId是日志唯一ID,$name是评论者,$content是评论内容
function isYoursComment($cid)判断是否有权限对评论进行操作,$cid为评论唯一ID
function isNameAndMailValid($name,$mail)判断评论者名称和邮箱是否有效,参数$name为评论者,$mail为邮箱
function isLogCanComment($blogId)判断日志是否允许评论,参数$blogId为日志ID
function isCommentTooFast()判断是否评论频率过高,预防攻击
function setCommentCookie($name,$mail,$url)设置评论cookie,参数$name为评论者名称,$mail为评论者邮箱,$url为评论者个人网站网址


点赞0
 标签: emlog mvc comment_model
   支持一下
挤眼 亲亲 咆哮 开心 想想 可怜 糗大了 委屈 哈哈 小声点 右哼哼 左哼哼 疑问 坏笑 赚钱啦 悲伤 耍酷 勾引 厉害 握手 耶 嘻嘻 害羞 鼓掌 馋嘴 抓狂 抱抱 围观 威武 给力
 点赞
 签到
 表情
 图片
 代码
提交评论

清空信息
关闭评论
digisolnc
 digisolnc 2019-04-25 00:06回复
#182
<a href="http://www.jupickuplines.com/nike-kd-7-kvinners-gr%C3%A5-oransje-obuvl">nike kd 7 kvinners gr氓 oransje</a> <a href="http://www.saleuggboot.com/nike-foamposite-orange-pink-shoesh">nike foamposite orange pink</a> <a href="http://www.fragmanizletv.com/nike-zoom-pegasus-34-femminile-rosso-verde-scarpei">nike zoom pegasus 34 femminile rosso verde</a> <a href="http://www.swisshomeas.com/nike-air-presto-ultra-flyknit-grau-on-feet-schuhej">nike air presto ultra flyknit grau on feet</a> <a href="http://www.marinersdiary.com/vanderbilt-baseball-hat-nike-hath">vanderbilt baseball hat nike</a> <a href="http://www.bourseasie.com/nike-blazer-noir-kaufen-chaussuresh">nike blazer noir kaufen</a>
digisolnc http://www.digisolnc.com/
sozoteki
 sozoteki 2019-04-24 18:18回复
#181
<a href="http://www.ankaraoyunevi.com/nike-shox-current-gul-himmelbl%C3%A5-skok">nike shox current gul himmelbl氓</a> <a href="http://www.iotlsebring.com/nike-air-zoom-structure-18-svart-obuvi">nike air zoom structure 18 svart</a> <a href="http://www.joshsingleton.com/mujer-air-jordan-future-grid-zapatosl">mujer air jordan future grid</a> <a href="http://www.amesecolombia.com/ray-ban-aviator-3025-mirror-silver-sunglassesh">ray ban aviator 3025 mirror silver</a> <a href="http://www.flatshotgame.com/north-carolina-tar-heels-top-of-the-world-ncaa-main-adjustable-cap-hatj">north carolina tar heels top of the world ncaa main adjustable cap</a> <a href="http://www.myrumpun.com/nike-internationalist-nero-argento-scarpej">nike internationalist nero argento</a>
sozoteki http://www.sozoteki.com/
guesthousesas
 guesthousesas 2019-04-24 02:47回复
#180
<a href="http://www.agriind.com/limited-kellen-davis-youth-jersey-new-york-giants-87-home-royal-blue-nflb">limited kellen davis youth jersey new york giants 87 home royal blue</a> <a href="http://www.rapheroes.com/adidas-superstar-w-rose-shoesc">adidas superstar w rose</a> <a href="http://www.odubmusic.com/orange-black-mens-nike-shox-tlx-shoes-skog">orange black mens nike shox tlx shoes</a> <a href="http://www.kidbleach.com/kd-trey-5-grey-hoodie-sportse">kd trey 5 grey hoodie</a> <a href="http://www.shoppula.com/billig-nike-free-3.0-v2-dam%C3%A4nner-gold-runningd">billig nike free 3.0 v2 dam盲nner gold</a> <a href="http://www.kanpourakuen.com/elite-cris-carter-jersey-minnesota-vikings-80-grey-shadow-nfle">elite cris carter jersey minnesota vikings 80 grey shadow</a>
guesthousesas http://www.guesthousesas.com/
dmvantalya
 dmvantalya 2019-04-24 00:19回复
#179
<a href="http://www.dbievents.com/menn-mizuno-wave-prophecy-5-gull-obuvk">menn mizuno wave prophecy 5 gull</a> <a href="http://www.ilankocaeli.com/adidas-neo-high-bl%C3%A5-hvit-obuvi">adidas neo high bl氓 hvit</a> <a href="http://www.msignworx.com/nike-cortez-mujeres-todas-blanco-zapatosl">nike cortez mujeres todas blanco</a> <a href="http://www.dianegrams.com/nike-free-socfly-triple-nero-highsnobiety-scarpeh">nike free socfly triple nero highsnobiety</a> <a href="http://www.jobstodayng.com/nike-mercurial-red-white-shoesk">nike mercurial red white</a> <a href="http://www.hardcoreboris.com/ray-ban-wayfarer-rb2140f-1016-sunglassesh">ray ban wayfarer rb2140f 1016</a>
[url=http://www.dmvantalya.com/]dmvantalya[/url]
volcom badger hat
 volcom badger hat 2019-04-23 06:32回复
#178
<a href="http://www.wordsting.com/gul-converse-sko-skol">gul converse sko</a> <a href="http://www.buildtwitter.com/adidas-kvinners-gazelle-svart-obuvk">adidas kvinners gazelle svart</a> <a href="http://www.procrastivity.com/air-jordan-6-infrarosso-1991-scarpei">air jordan 6 infrarosso 1991</a> <a href="http://www.rastadread.com/nike-lebron-ambassador-9-p%C3%BArpura-jade-zapatosh">nike lebron ambassador 9 p煤rpura jade</a> <a href="http://www.govtjobsstore.com/adidas-stan-smith-gr%C3%A5-lyser%C3%B8d-skok">adidas stan smith gr氓 lyser酶d</a> <a href="http://www.alofilmizle.com/nike-all-r%C3%B8d-huarache-mennns-obuvi">nike all r酶d huarache mennns</a>
volcom badger hat http://www.sheeradiance.com/volcom-badger-hat-hatk
theislandbody
 theislandbody 2019-04-22 21:44回复
#177
<a href="http://www.shiftcampus.com/kvinders-asics-gel-noosa-tri-8-s%C3%B8lv-sort-skoh">kvinders asics gel noosa tri 8 s酶lv sort</a> <a href="http://www.fiestanetwork.com/nike-air-max-97-femmes-rouge-argent-chaussuresh">nike air max 97 femmes rouge argent</a> <a href="http://www.sunbeltsaves.com/brixton-busker-cap-hatl">brixton busker cap</a> <a href="http://www.drmastella.com/femmes-nike-kyrie-2-bleu-rouge-chaussuresh">femmes nike kyrie 2 bleu rouge</a> <a href="http://www.khzrubber.com/mujeres-nike-blazer-oro-naranja-zapatosk">mujeres nike blazer oro naranja</a> <a href="http://www.jkdeskisehir.com/womens-air-jordan-retro-2-yellow-blue-shoesi">womens air jordan retro 2 yellow blue</a>
theislandbody http://www.theislandbody.com/
braceshops
 braceshops 2019-04-22 11:31回复
#176
<a href="http://www.castalresources.net/nike-hyperdunk-2016-p%C3%BArpura-amarillo-butye">nike hyperdunk 2016 p煤rpura amarillo</a> <a href="http://www.cattivacosmetics.net/nike-free-run-4.0-v3-cachi-fluorescent-verde-butya">nike free run 4.0 v3 cachi fluorescent verde</a> <a href="http://www.causses.net/adidas-protator-through-the-years-gone-obuvb">adidas protator through the years gone</a> <a href="http://www.cconmausa.net/adidas-nitrocharge-schwarz-neon-orange-scarpec">adidas nitrocharge schwarz neon orange</a> <a href="http://www.centralplainslifts.net/kvinders-nike-lunarglide-7-r%C3%B8d-lyser%C3%B8d-schuhef">kvinders nike lunarglide 7 r酶d lyser酶d</a> <a href="http://www.chateaulalinde.net/nike-tiempo-legend-totti-for-vente-jacksonville-scarpec">nike tiempo legend totti for vente jacksonville</a>
braceshops http://www.braceshops.net/
simplesolaire
 simplesolaire 2019-04-22 00:15回复
#175
<a href="http://www.lonmorris.net/adidas-prossoator-lz-uk-butya">adidas prossoator lz uk</a> <a href="http://www.lovegreatdeals.net/nike-air-max-neon-gituttio-acquistare-schuheg">nike air max neon gituttio acquistare</a> <a href="http://www.lyricensemble.net/nike-free-trainer-5.0-nkg-plata-blanco-butyf">nike free trainer 5.0 nkg plata blanco</a> <a href="http://www.magascene.net/air-jordan-18-noir-royal-bleu-hair-butya">air jordan 18 noir royal bleu hair</a> <a href="http://www.mallgame.net/adidas-tubular-runner-r%C3%B8d-lyser%C3%B8d-obuvb">adidas tubular runner r酶d lyser酶d</a> <a href="http://www.matthewstone.net/nike-air-zoom-total-90-for-vendita-texas-scarped">nike air zoom total 90 for vendita texas</a>
simplesolaire http://www.simplesolaire.net/
pragaoviedo
 pragaoviedo 2019-04-21 05:50回复
#174
<a href="http://www.momoange.com/nike-cortez-vert-gris-chaussuresh">nike cortez vert gris</a> <a href="http://www.buscomimotor.com/nike-hommes-noir-kaishi-fonctionnement-chaussures-chaussuresj">nike hommes noir kaishi fonctionnement chaussures</a> <a href="http://www.bestzixiutang.com/nike-air-max-stefan-janoski-rot-schuhek">nike air max stefan janoski rot</a> <a href="http://www.pmatrading.com/nba-jerseys-north-carolina-tar-heels-5-ty-lawson-baby-white-college-jersey-nflh">nba jerseys north carolina tar heels 5 ty lawson baby white college jersey</a> <a href="http://www.beckyhasaplan.com/nike-air-max-90-svart-l%C3%A6r-svart-croc-obuvi">nike air max 90 svart l忙r svart croc</a> <a href="http://www.meetspotme.com/nike-free-run-5.0-men-size-green-shoesj">nike free run 5.0 men size green</a>
pragaoviedo http://www.pragaoviedo.com/
genievres
 genievres 2019-04-20 20:02回复
#173
<a href="http://www.profancyshop.com/air-jordan-imminent-hvit-s%C3%B8lv-obuvi">air jordan imminent hvit s酶lv</a> <a href="http://www.lmcgroep.com/adidas-rose-amarillo-cielo-azul-zapatosp">adidas rose amarillo cielo azul</a> <a href="http://www.nowaitnails.com/nike-free-tr-kvinders-gr%C3%B8n-sort-skol">nike free tr kvinders gr酶n sort</a> <a href="http://www.xmrujo.com/air-jordan-retro-1-femminile-verde-nero-scarpeh">air jordan retro 1 femminile verde nero</a> <a href="http://www.sevenguard.com/nike-flyknit-lunar-1-maschio-grigio-scarpei">nike flyknit lunar 1 maschio grigio</a> <a href="http://www.escortsue.com/nike-kd-9-grau-schwarz-schuheh">nike kd 9 grau schwarz</a>
genievres http://www.genievres.com/
顶部留言底部
 00:00/00:00
我想和你虚度时光 - 花房姑娘(9)
  1. 我想和你虚度时光
  2. 花房姑娘
  3. 恋恋风尘
  4. 我喜爱一切不彻底的事物
  5. 我的心里是满的
  6. Long Way
  7. 给少年的歌
  8. 晴日共剪窗
  9. 天上的月你的脸