迅睿开源框架是一款PHP8高性能·简单易用的PHP开源开发框架, 基于MIT开源许可协议发布,不限制商业使用,以多端互联为设计理念, 支持的微信公众号、小程序、APP客户端、移动端网站、PC网站等多终端式管理系统。
业务经理
微信扫描以上二维码
028-61286886
在线咨询
如何限制栏目下只能发布1篇信息?
{if \Phpcmf\Service::M()->table_site('news')->where('catid', 栏目id)->counts() >= 1} 已经有人发布了 {else} 发布 {/if}
{if \Phpcmf\Service::M()->table_site('news')->where('catid', 栏目id)->where("uid", $member.uid)->counts() >= 1} 已经有人发布了 {else} 发布 {/if}
{if \Phpcmf\Service::M()->table_site('news')->where('catid', 栏目id)->counts() >= 1} 已经有人发布了 {else} 发布 {/if}{if \Phpcmf\Service::M()->table_site('news')->where('catid', 栏目id)->where("uid", $member.uid)->counts() >= 1} 已经有人发布了 {else} 发布 {/if}加一个当前用户变量