求教后台商品管理提交问题

2016-07-07 15:11 来源:www.chinab4c.com 作者:ecshop专家

后台商品管理(添加、修改)的提交js、
function validate(goods_id)
{
var validator = new Validator('theForm');
var goods_sn= document.forms['theForm'].elements['goods_sn'].value;

validator.required('goods_name', goods_name_not_null);
if (document.forms['theForm'].elements['cat_id'].value == 0)
{
validator.addErrorMsg(goods_cat_not_null);
}

checkVolumeData("1",validator);

validator.required('shop_price', shop_price_not_null);
validator.isNumber('shop_price', shop_price_not_number, true);
validator.isNumber('market_price', market_price_not_number, false);
if (document.forms['theForm'].elements['is_promote'].checked)
{
validator.required('promote_start_date', promote_start_not_null);
validator.required('promote_end_date', promote_end_not_null);
validator.islt('promote_start_date', 'promote_end_date', promote_not_lt);
}

if (document.forms['theForm'].elements['goods_number'] != undefined)
{
validator.isInt('goods_number', goods_number_not_int, false);
validator.isInt('warn_number', warn_number_not_int, false);
}

var callback = function(res)
{
if (res.error > 0)
{
alert("{$lang.goods_sn_exists}");
}
else
{
if(validator.passed())
{
document.forms['theForm'].submit();
}
}
}
Ajax.call('goods.php?is_ajax=1&act=check_goods_sn', "goods_sn=" + goods_sn + "&goods_id=" + goods_id, callback, "GET", "JSON");
}


是怎么走到控制器这里的?

/*------------------------------------------------------ */
//-- 插入商品 更新商品
/*------------------------------------------------------ */

elseif ($_REQUEST['act'] == 'insert' || $_REQUEST['act'] == 'update')


感激感激吖、

回答:
谁来救救我阿、
感激不尽