本文整理汇总了PHP中PwUpload::countUploadedFile方法的典型用法代码示例。如果您正苦于以下问题:PHP PwUpload::countUploadedFile方法的具体用法?PHP PwUpload::countUploadedFile怎么用?PHP PwUpload::countUploadedFile使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PwUpload
的用法示例。
在下文中一共展示了PwUpload::countUploadedFile方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: check
/**
* @see PwUploadAction.check
*/
public function check()
{
if (!$this->user->isExists()) {
return new PwError('login.not');
}
if (!$this->forum->isForum()) {
return new PwError('FORUM_IS_NOT_EXISTS');
}
if (($result = $this->forum->allowUpload($this->user)) !== true) {
return new PwError('BBS:forum.permissions.upload.allow', array('{grouptitle}' => $this->user->getGroupInfo('name')));
}
if (!$this->forum->foruminfo['allow_upload'] && !$this->user->getPermission('allow_upload')) {
return new PwError('permission.upload.allow', array('{grouptitle}' => $this->user->getGroupInfo('name')));
}
if ($uploadPerday = $this->user->getPermission('uploads_perday')) {
$count = PwUpload::countUploadedFile() + count($this->flashatt);
$todayupload = $this->user->info['lastpost'] < Pw::getTdtime() ? 0 : $this->user->info['todayupload'];
if ($count > 0 && $count + $todayupload > $uploadPerday) {
return new PwError('permission.upload.nums.perday', array('{nums}' => $uploadPerday));
}
}
return true;
}