如何添加个必填选项!急用,多谢了!
function pass($post) {global $DT_TIME, $MOD;
if(!is_array($post)) return false;
if(!$post['catid']) return $this->_(lang('message->pass_cate'));
if(strlen($post['title']) _(lang('message->pass_title'));
if($post['totime']) {
if(!is_date($post['totime'])) return $this->_(lang('message->pass_date'));
if(strtotime($post['totime'].' 23:59:59') _(lang('message->pass_todate'));
}
return true;
}
这是后台验证源码,我想增加个产品型号(MODEL)的必填选项,应该怎么插入到这段代码里面,多谢了!~~~
if(strlen($post['title']) _(lang('message->pass_title'));
下加入
if(strlen($post['MODEL']) _(lang('message->pass_title'));
其中pass_title是语言文件里的提示错误内容,自己增加
还有这个没必要在这里加,只要在发布页面模板增加个js判断就好了
[ 本帖最后由 duoluozhe 于 2012-8-16 11:26 编辑 ]
在template/default/member/my_sell.htm中
static/image/common/none.gif
未命名zzzzzzzzz.jpg (37.39 KB, 下载次数: 1)
下载附件
2012-8-16 11:25 上传
static/image/common/none.gif
未命名ssssssssss.jpg (81.01 KB, 下载次数: 4)
下载附件
2012-8-16 11:25 上传
static/image/common/none.gif
未命名wwwwwwwwwwwwwwww.jpg (23.86 KB, 下载次数: 0)
下载附件
2012-8-16 11:25 上传
多谢指导,感谢!~~我在研究研究。
原帖由 duoluozhe 于 2012-8-16 11:20 发表
if(strlen($post['title']) _(lang('message->pass_title'));
下加入
if(strlen($post['MODEL']) _(lang('message->pass_title'));
其中pass_title是语言文件里的提示错误内 ...
请问这个语言文件里的提示错误内容要添加要怎么解决?
请问怎么删除必选的注册信息,如电子邮箱,谢谢~我们这的一些小企业都没邮箱的。。。
请问怎么删除必选的注册信息,如电子邮箱,谢谢~我们这的一些小企业都没邮箱的。。。
建议别乱删邮箱 比如以后的邮件验证了 发送邮件了 密码找回了都不能用
月关海 发表于 2012-8-17 08:37
请问怎么删除必选的注册信息,如电子邮箱,谢谢~我们这的一些小企业都没邮箱的。。。 ...
一般是修改模版文件,修改php文件,不过建议邮箱一般不要动
页:
[1]