ecshop版本比较.docx
《ecshop版本比较.docx》由会员分享,可在线阅读,更多相关《ecshop版本比较.docx(46页珍藏版)》请在冰点文库上搜索。
ecshop版本比较
EcShopV272修改版与EcShopV272原版的比较
注:
下面文本中红色的部分就是修改过的文件(EcShopV272修改版)
1.ecshop/article_cat.php原文件:
修改后的
2.ecshop/brand.php原文件:
修改后的
3.ecshop/category.php原文件:
修改后的
原文件:
修改后:
4.ecshop/exchange.php原文件:
修改后:
5.ecshop/flow.php原文件:
修改后:
6.ecshop/goods.php原文件:
修改后的文件
/*商品购买记录*/
/*$sql='SELECTu.user_name,og.goods_number,oi.add_time,IF(oi.order_statusIN(2,3,4),0,1)ASorder_status'.
'FROM'.$ecs->table('order_info').'ASoiLEFTJOIN'.$ecs->table('users').'ASuONoi.user_id=u.user_id,'.$ecs->table('order_goods').'ASog'.
'WHEREoi.order_id=og.order_idAND'.time().'-oi.add_time<2592000ANDog.goods_id='.$goods_id.'ORDERBYoi.add_timeDESCLIMIT'.(($page>1)?
($page-1):
0)*5.',5';
$bought_notes=$db->getAll($sql);*/
$sql='SELECTu.user_name,og.goods_number,oi.add_time,IF(oi.order_statusIN(2,3,4),0,1)ASorder_status'.
'FROM'.$ecs->table('order_info').'ASoiLEFTJOIN'.$ecs->table('users').'ASuONoi.user_id=u.user_id,'.$ecs->table('order_goods').'ASog'.
'WHEREoi.order_id=og.order_idANDog.goods_id='.$goods_id.'ORDERBYoi.add_timeDESCLIMIT'.(($page>1)?
($page-1):
0)*5.',5';
$bought_notes=$db->getAll($sql);
foreach($bought_notesas$key=>$val)
{
$bought_notes[$key]['add_time']=local_date("Y-m-dG:
i:
s",$val['add_time']);
}
/*$sql='SELECTcount(*)'.
'FROM'.$ecs->table('order_info').'ASoiLEFTJOIN'.$ecs->table('users').'ASuONoi.user_id=u.user_id,'.$ecs->table('order_goods').'ASog'.
'WHEREoi.order_id=og.order_idAND'.time().'-oi.add_time<2592000ANDog.goods_id='.$goods_id;*/
$sql='SELECTcount(*)'.
'FROM'.$ecs->table('order_info').'ASoiLEFTJOIN'.$ecs->table('users').'ASuONoi.user_id=u.user_id,'.$ecs->table('order_goods').'ASog'.
'WHEREoi.order_id=og.order_idANDog.goods_id='.$goods_id;
$count=$db->getOne($sql);
/*商品购买记录分页样式*/
原文件:
修改后:
7.ecshop/group_buy.php原文件
修改后:
8.ecshop/pick_out.php原文件
修改后:
9.ecshop/search.php原文件
修改后:
10.ecshop/user.php
(1)原文件:
修改后:
(2)在原版976行的下面加:
//若编辑,插入当前编辑时间;若添加,插入当前添加时间
if($address['address_id']>0)
{
$updatetime=date('Y-m-dH:
i:
s');
$address['updatetime']=$updatetime;
}else
{
$createtime=date('Y-m-dH:
i:
s');
$address['createtime']=$createtime;
}
就是修改后的版本
(3)原版本
修改后:
11.ecshop/admin/flashplay.php原文件:
修改后:
12.ecshop/admin/goods.php原文件:
13.ecshop/goods_batch.php原文件:
修改后:
14.ecshop/admin/index.php原文件:
修改后:
15.ecshop/admin/magazine_list.php原文件:
(1)
修改后文件:
(2)原文件:
修改后:
16.ecshop/admin/order.php原文件
修改后:
17.修改后的版本比原版本多出的文件:
ecshop/admin/PHPExcel.php,PHP瀵煎嚭Excel.xls,stock.php
18.ecshop/admin/sms.php原文件:
修改后:
19.ecshop/admin/users.php原版本从553行—572行:
/*------------------------------------------------------*/
//--收货地址查看
/*------------------------------------------------------*/
elseif($_REQUEST['act']=='address_list')
{
$id=isset($_GET['id'])?
intval($_GET['id']):
0;
$sql="SELECTa.*,c.region_nameAScountry_name,p.region_nameASprovince,ct.region_nameAScity_name,d.region_nameASdistrict_name".
"FROM".$ecs->table('user_address')."asa".
"LEFTJOIN".$ecs->table('region')."AScONc.region_id=a.country".
"LEFTJOIN".$ecs->table('region')."ASpONp.region_id=a.province".
"LEFTJOIN".$ecs->table('region')."ASctONct.region_id=a.city".
"LEFTJOIN".$ecs->table('region')."ASdONd.region_id=a.district".
"WHEREuser_id='$id'";
$address=$db->getAll($sql);
$smarty->assign('address',$address);
assign_query_info();
$smarty->assign('ur_here',$_LANG['address_list']);
$smarty->assign('action_link',array('text'=>$_LANG['03_users_list'],'href'=>'users.php?
act=list&'.list_link_postfix()));
$smarty->display('user_address_list.htm');
}
修改后:
(用红色的替换上面蓝色的,就是修改后的版本)
/*------------------------------------------------------*/
//--收货地址查看
/*------------------------------------------------------*/
elseif($_REQUEST['act']=='address_list')
{
if(isset($_REQUEST['kwname'])||isset($_REQUEST['kwtel']))
{
$kwname=$_REQUEST['kwname'];
//echo$kwname;return;
$kwtel=$_REQUEST['kwtel'];
$sql="SELECTa.*,c.region_nameAScountry_name,p.region_nameASprovince_name,ct.region_nameAScity_name,d.region_nameASdistrict_name".
"FROM".$ecs->table('user_address')."asa".
"LEFTJOIN".$ecs->table('region')."AScONc.region_id=a.country".
"LEFTJOIN".$ecs->table('region')."ASpONp.region_id=a.province".
"LEFTJOIN".$ecs->table('region')."ASctONct.region_id=a.city".
"LEFTJOIN".$ecs->table('region')."ASdONd.region_id=a.district".
"WHERE(consigneeLIKE'%".$kwname."%')AND(tel='$kwtel'ORmobile='$kwtel')";
$address=$db->getAll($sql);
//echo"
";print_r($address);echo"
";return;
//$smarty->assign('user_id',$id);
$smarty->assign('noshowadd',1);
$smarty->assign('address',$address);
assign_query_info();
$smarty->assign('ur_here',$_LANG['address_list']);
$smarty->assign('action_link',array('text'=>$_LANG['03_users_list'],'href'=>'users.php?
act=list&'.list_link_postfix()));
$smarty->display('user_address_list.htm');
}else
{
$id=isset($_GET['id'])?
intval($_GET['id']):
0;
$sql="SELECTa.*,c.region_nameAScountry_name,p.region_nameASprovince_name,ct.region_nameAScity_name,d.region_nameASdistrict_name".
"FROM".$ecs->table('user_address')."asa".
"LEFTJOIN".$ecs->table('region')."AScONc.region_id=a.country".
"LEFTJOIN".$ecs->table('region')."ASpONp.region_id=a.province".
"LEFTJOIN".$ecs->table('region')."ASctONct.region_id=a.city".
"LEFTJOIN".$ecs->table('region')."ASdONd.region_id=a.district".
"WHEREuser_id='$id'";
$address=$db->getAll($sql);
//echo"
";print_r($address);echo"
";return;
//$smarty->assign('user_id',$id);
$smarty->assign('address',$address);
assign_query_info();
$smarty->assign('ur_here',$_LANG['address_list']);
$smarty->assign('action_link',array('text'=>$_LANG['03_users_list'],'href'=>'users.php?
act=list&'.list_link_postfix()));
$smarty->display('user_address_list.htm');
}
}
/*------------------------------------------------------*/
//--收货地址模糊查询,最终查所属会员
/*------------------------------------------------------*/
elseif($_REQUEST['act']=='address_list2')
{
if(isset($_REQUEST['shadd']))
{
$shadd=$_REQUEST['shadd'];
//echo$shadd;return;
$sql="SELECTa.*,c.region_nameAScountry_name,p.region_nameASprovince_name,ct.region_nameAScity_name,d.region_nameASdistrict_name".
"FROM".$ecs->table('user_address')."asa".
"LEFTJOIN".$ecs->table('region')."AScONc.region_id=a.country".
"LEFTJOIN".$ecs->table('region')."ASpONp.region_id=a.province".
"LEFTJOIN".$ecs->table('region')."ASctONct.region_id=a.city".
"LEFTJOIN".$ecs->table('region')."ASdONd.region_id=a.district".
"WHERE(addressLIKE'%".$shadd."%')";
$address=$db->getAll($sql);
//echo"
";print_r($address);echo"
";return;
//$smarty->assign('user_id',$id);
$smarty->assign('noshowadd',1);
$smarty->assign('address',$address);
assign_query_info();
$smarty->assign('ur_here',$_LANG['address_list']);
$smarty->assign('action_link',array('text'=>$_LANG['03_users_list'],'href'=>'users.php?
act=list&'.list_link_postfix()));
$smarty->display('user_address_list.htm');
}else
{
$id=isset($_GET['id'])?
intval($_GET['id']):
0;
$sql="SELECTa.*,c.region_nameAScountry_name,p.region_nameASprovince_name,ct.region_nameAScity_name,d.region_nameASdistrict_name".
"FROM".$ecs->table('user_address')."asa".
"LEFTJOIN".$ecs->table('region')."AScONc.region_id=a.country".
"LEFTJOIN".$ecs->table('region')."ASpONp.region_id=a.province".
"LEFTJOIN".$ecs->table('region')."ASctONct.region_id=a.city".
"LEFTJOIN".$ecs->table('region')."ASdONd.region_id=a.district".
"WHEREuser_id='$id'";
$address=$db->getAll($sql);
//echo"
";print_r($address);echo"
";return;
//$smarty->assign('user_id',$id);
$smarty->assign('address',$address);
assign_query_info();
$smarty->assign('ur_here',$_LANG['address_list']);
$smarty->assign('action_link',array('text'=>$_LANG['03_users_list'],'href'=>'users.php?
act=list&'.list_link_postfix()));
$smarty->display('user_address_list.htm');
}
}
/*------------------------------------------------------*/
//--指定ID的收货地址显示
/*------------------------------------------------------*/
elseif($_REQUEST['act']=='address_one')
{
$id=isset($_GET['id'])?
intval($_GET['id']):
0;
//echo$id;return;
$sql="SELECTa.*,c.region_nameAScountry_name,p.region_nameASprovince_name,ct.region_nameAScity_name,d.region_nameASdistrict_name".
"FROM".$ecs->table('user_address')."asa".
"LEFTJOIN".$ecs->table('region')."AScONc.region_id=a.country".
"LEFTJOIN".$ecs->table('region')."ASpONp.region_id=a.province".
"LEFTJOIN".$ecs->table('region')."ASctONct.region_id=a.city".
"LEFTJOIN".$ecs->table('region')."ASdONd.region_id=a.district".
"WHEREaddress_id='$id'";
//$address=$db->getAll($sql);
$address=$db->getRow($sql);
//echo"
";print_r($address);echo"
";return;
$_SESSION['old_address']=$address;
//echo"
";print_r($_SESSION['old_address']);echo"
";return;
/*取得区域名*/
/*$sql="SELECTconcat(IFNULL(c.regi