• 欢迎访问苗景云的博客

<!doctype html>  

<html>  

 <head>  

 <meta http-equiv="content-type" content="text/html;charset=UTF-8"/>  

  <title>复选框全选、全不选、反选、必选一个</title>  

发布:苗景云 | 查看全文 | 浏览(1288) | 分类:IT技术&设计 | 评论(0) | 2016年11月07日
首先必须确保你是从这里下的留言版插件留言板 UTF-8 2.5版本.rar后台模块中安装好以后打开模版目录:phpcms/templates/default/guestbook/异步提交和读取你可以选择在index、register、list_type三个模版里做都行,看你自己的需要。这里就删繁就简了。我是直接在 index 模版文件下做的,所以添加留言板时的地址为:http://localhost/index.php?m=guestbook&c=index在 register 模版文件
发布:苗景云 | 查看全文 | 浏览(2543) | 分类:IT技术&设计 | 评论(0) | 2016年11月05日

废话不多说,直接上DEMO下载地址:http://download.csdn.net/detail/cometwo/9602499

参考链接:http://www.dowebok.com/134.html


发布:苗景云 | 查看全文 | 浏览(2038) | 分类:IT技术&设计 | 评论(0) | 2016年10月11日
PHPCMS自带组图功能无排序功能,特别是需要对图片和说明排序时很不方便,通过此方法可实现组图排序。工具/原料PHPCMS V9   dreamweaver方法/步骤1 新增上下移动的按钮用dreamweaver打开文件form.inc.php,文件位置:phpcms/modules/content/fields/images/form.inc.php在第八行的".L('remove_out', '', 'content
发布:苗景云 | 查看全文 | 浏览(1584) | 分类:IT技术&设计 | 评论(0) | 2016年10月11日

排名规则

发布:苗景云 | 查看全文 | 浏览(1526) | 分类:网络营销&电子商务 | 评论(0) | 2016年10月09日

首页的推荐商品包括热销推荐和促销三个文件

发布:苗景云 | 查看全文 | 浏览(1552) | 分类:IT技术&设计 | 评论(0) | 2016年09月23日

1、打开mobile/index.php,添加以下代码


//获取商品分类 

$pcat_array = get_categories_tree();

foreach ($pcat_array as $key => $pcat_data)

{

    $pcat_array[$key]['goods_list'] = get_parent_category_goods($pcat_data['id']);

发布:苗景云 | 查看全文 | 浏览(2964) | 分类:管理&经济 | 评论(0) | 2016年09月23日
1.在sq执行语句
 
ALTER TABLE `ecs_goods` ADD `sales_volume_base` INT( 10 ) UNSIGNED NOT NULL DEFAULT '0'  
 
INSERT INTO `ecs_shop_config` (`parent_id`, `code`, `type`, `store_range`, `store_dir`, `value`, `sort_order` ) VALUES ('7','show_goods_sales', 'select', '1,0', '', '1', '1');  
 
INSERT INTO `ecs_shop_config` (`parent_id`, `code`, `type`, `store_range`, `store_dir`, `value`, `sort_order` ) VALUES ('3', 'show_sales_type', 'select', '1,0', '', '1', '1');  
注意:如果你的数据表前缀不是‘ecs_’ 请自行修改
 
2./admin/includes/lib_goods.php中
 
$sql = "SELECT goods_id, goods_name, goods_type, goods_sn, shop_price, is_on_sale, is_best, is_new, is_hot, sort_order, goods_number, integral, " .  
            " (promote_price > 0 AND promote_start_date <= '$today' AND promote_end_date >= '$today') AS is_promote ".  
            " FROM " . $GLOBALS['ecs']->table('goods') . " AS g WHERE is_delete='$is_delete' $where" .  
            " ORDER BY $filter[sort_by] $filter[sort_order] ".  
            " LIMIT " . $filter['start'] . ",$filter[page_size]";  
修改为
 
        $sql = "SELECT goods_id, goods_name, goods_type, goods_sn, shop_price, is_on_sale, is_best, is_new, is_hot, sort_order, goods_number, integral, sales_volume_base, " .   
                    " (promote_price > 0 AND promote_start_date <= '$today' AND promote_end_date >= '$today') AS is_promote ".  
                    " FROM " . $GLOBALS['ecs']->table('goods') . " AS g WHERE is_delete='$is_delete' $where" .  
                    " ORDER BY $filter[sort_by] $filter[sort_order] ".  
                    " LIMIT " . $filter['start'] . ",$filter[page_size]";  
 
3./admin/templates/goods_list.htm,在
 
{if $use_storage}  
<th><a href="javascript:listTable.sort('goods_number'); ">{$lang.goods_number}</a>{$sort_goods_number}</th>  
{/if}  
后,添加
 
<th><a href="javascript:listTable.sort('sales_volume_base'); ">{$lang.sales_volume_base}</a>{$sort_sales_volume_base}</th>  
 
{if $use_storage}  
<td align="right"><span onclick="listTable.edit(this, 'edit_goods_number', {$goods.goods_id})">{$goods.goods_number}</span></td>  
{/if}  
后,添加
 
<td align="center"><span onclick="listTable.edit(this, 'edit_sales_volume_base', {$goods.goods_id})">{$goods.sales_volume_base}</span></td>  
 
4./admin/goods.php,在
 
/** 
 * 列表链接 
 * @param   bool    $is_add         是否添加(插入) 
 * @param   string  $extension_code 虚拟商品扩展代码,实体商品为空 
 * @return  array('href' => $href, 'text' => $text) 
 */  
function list_link($is_add = true, $extension_code = '')  
前,添加
 
/*------------------------------------------------------ */  
//-- 修改商品虚拟销量  
/*------------------------------------------------------ */  
elseif ($_REQUEST['act'] == 'edit_sales_volume_base')  
{  
    check_authz_json('goods_manage');  
  
    $goods_id = intval($_POST['id']);  
    $sales_volume_base = json_str_iconv(trim($_POST['val']));  
  
    if ($exc->edit("sales_volume_base = '$sales_volume_base', last_update=" .gmtime(), $goods_id))  
    {  
        clear_cache_files();  
        make_json_result(stripslashes($sales_volume_base));  
    }  
}  
5.goods.php,在
 
$smarty->assign('categories',         get_categories_tree($goods['cat_id']));  // 分类树  
后,添加
 
$smarty->assign('sales_count',        get_sales_count($goods_id));  
在末尾添加
 
/* 商品累计销量带自定义_新增加 */  
function get_sales_count($goods_id)  
{  
    /* 查询该商品的自定义销量 */  
    $sales_base = $GLOBALS['db']->getOne('SELECT sales_volume_base FROM '.$GLOBALS['ecs']->table('goods').' WHERE goods_id = '.$goods_id);  
    /* 查询该商品的实际销量 */  
    $sql = 'SELECT IFNULL(SUM(g.goods_number), 0) ' .  
        'FROM ' . $GLOBALS['ecs']->table('order_info') . ' AS o, ' .  
            $GLOBALS['ecs']->table('order_goods') . ' AS g ' .  
        "WHERE o.order_id = g.order_id " .  
        "AND o.order_status " . db_create_in(array(OS_CONFIRMED, OS_SPLITED)) .  
        "AND o.shipping_status " . db_create_in(array(SS_SHIPPED, SS_RECEIVED)) .  
        " AND o.pay_status " . db_create_in(array(PS_PAYED, PS_PAYING)) .  
        " AND g.goods_id = '$goods_id'";  
    $sales_count = $GLOBALS['db']->getOne($sql);  
    /* 商品累计销量默认显示方式 */  
    if ($GLOBALS['_CFG']['show_sales_type'])  
    {  
        $row['sales_volume_total'] =  $sales_count; //实际销量  
    }  
    else  
    {  
        $row['sales_volume_total'] =  $sales_base + $sales_count; //自定义销量+实际销量  
    }  
    return ($row['sales_volume_total']);  
}  
6.在/languages/zh_cn/admin/shop_config.php,中
 
/languages/zh_cn/admin/shop_config.php  
下,添加
 
$_LANG['cfg_name']['show_goods_sales'] = '是否显示商品累计销量';  
$_LANG['cfg_range']['show_goods_sales']['1'] = '显示';  
$_LANG['cfg_range']['show_goods_sales']['0'] = '不显示';  
$_LANG['cfg_name']['show_sales_type'] = '商品累计销量默认显示方式';  
$_LANG['cfg_range']['show_sales_type'][1] = '真实显示';  
$_LANG['cfg_range']['show_sales_type'][0] = '虚拟显示';  
 
7./languages/zh_cn/admin/goods.php,中
 
$_LANG['goods_sn_exists'] = '您输入的货号已存在,请换一个';  
后,添加
 
$_LANG['sales_volume_base'] = '虚拟销量';  
 
8./languages/zh_cn/common.php,中
 
$_LANG['divided_into'] = '分成规则';  
后,添加
 
$_LANG['sales_volume_total'] = '累计销量:';   
$_LANG['pcs'] = '件';  
 
9./themes/default/goods.dwt,在
 
<img src="images/stars{$goods.comment_rank}.gif" alt="comment rank {$goods.comment_rank}" />  
 </dd>  
后,添加
 
{if $cfg.show_goods_sales}  
<dd style="width:48%; padding-left:7px;">  
<strong>{$lang.sales_volume_total}</strong>  
<font class="shop">{$sales_count}{if $goods.measure_unit}{$goods.measure_unit}{else}{$lang.pcs}{/if}</font>  
</dd>  
{/if}  
OK,完成!


发布:苗景云 | 查看全文 | 浏览(1597) | 分类:IT技术&设计 | 评论(0) | 2016年09月22日

 在ECSHOP首页显示商品总数和本月更新数  
1)、首先修改 /index.php  找到   assign_dynamic('index'); 
在它后边添加一些代码   
$sql="select count(*) as goods_all from ". $ecs->table('goods'); //商品总数
$smarty->assign('goodsnum_all',$db->getOne($sql));  
$time_month=mktime(0,0,0,date('m')-1,1,date('Y'));   
$sql="select count(*) as goods_month from ". $ecs->table('goods') ." where last_update >= " . $time_month; //本月更新数   
$smarty->assign('goodsnum_month',$db->getOne($sql));
2)、打开首页模板文件 index.dwt,在合适的地方调用,调用代码为  本商城共有商品 {$goodsnum_all} 件,本月更新 {$goodsnum_month} 件

发布:苗景云 | 查看全文 | 浏览(1250) | 分类:IT技术&设计 | 评论(0) | 2016年09月22日

 

管理员密码忘记,通过重新安装的密码更换数据库,或者通过md5加密密文替换数据库,都一一失败,这个问题困扰了很多朋友。

发布:苗景云 | 查看全文 | 浏览(1431) | 分类:IT技术&设计 | 评论(0) | 2016年09月21日

 phpcms 图片模型组图列表获取图片尺寸需要用到getimagesize函数,不废话,直接看代码:

 

{loop $pictureurls $pic_k $r}
    {php $info = getimagesize($r[url])}
     <a href="{thumb($r[url], 700, 700, 0)}" data-author="{$r[alt]}" data-size="{$info[0]}x{$info[1]}" data-med="{thumb($r[url], 700, 700, 0)}" data-med-size="{$info[0]}x{$info[1]}"><img src="{thumb($r[url], 700, 700, 0)}" width="160" /><span>{$r[alt]}</span></a>
     {/loop}

发布:苗景云 | 查看全文 | 浏览(1421) | 分类:IT技术&设计 | 评论(0) | 2016年07月27日

 本文通过phpcms v9给栏目添加自定义英文栏目名称字段来教大家如何给栏目添加自定义字段
后台效果展示:
\
前台效果展示:
\
修改方法:
1、通过 phpmyadmin 给 v9_category 表添加英文栏目自定义字段 catname_en
\
\
2、打开 /phpcms/languages/zh-cn/admin.lang.php 文件
找到
$LANG['catname'] = '栏目名称';
在其下面添加
$LANG['catname_en'] = '栏目名称_英文';
3、打开 /phpcms/modules/admin/templates/category_add.tpl.php 文件
找到
<tr>
        <th><?php echo L('catname')?>:</th>
        <td>
        <span id="normal_add"><input type="text" name="info[catname]" id="catname" class="input-text" value=""></span>
        <span id="batch_add" style="display:none">
        <table width="100%" class="sss"><tr><td width="310"><textarea name="batch_add" maxlength="255" style="width:300px;height:60px;"></textarea></td>
        <td align="left">
        <?php echo L('batch_add_tips');?>
 </td></tr></table>
        </span>
        </td>
      </tr>

在其下面添加
<tr>
  <th><?php echo L('catname_en')?>:</th>
  <td>
    <input type="text" name="info[catname_en]" id="catname_en" class="input-text" value="">
  </td>
</tr>

4、打开 /phpcms/modules/admin/templates/category_edit.tpl.php 文件
找到
<tr>
    <th><?php echo L('catname')?>:</th>
    <td><input type="text" name="info[catname]" id="catname" class="input-text" value="<?php echo $catname;?>"></td>
</tr>

在其下面添加
<tr>
    <th><?php echo L('catname_en')?>:</th>
    <td><input type="text" name="info[catname_en]" id="catname_en" class="input-text" value="<?php echo $catname_en;?>"></td>
</tr>

5、至此已可以添加或修改英文栏目名称
调用方法:
{pc:content action="category" catid="0" num="10" siteid="$siteid" order="listorder ASC"}
<ul>
  <li><a href="{siteurl($siteid)}"><span>首页</span></a></li>
  {loop $data $r}
  <li><a href="{$r[url]}"><span>{$r[catname]} {$r[catname_en]}</span></a></li>
  {/loop}
</ul>
{/pc}

发布:苗景云 | 查看全文 | 浏览(1440) | 分类:IT技术&设计 | 评论(0) | 2016年06月28日

Diaspora

A WordPress theme

发布:苗景云 | 查看全文 | 浏览(1256) | 分类:IT技术&设计 | 评论(0) | 2016年05月23日

 火车头8.3/8.4版本提示错误 :未在本地计算机上注册 Microsoft.ACE.OLEDB.12.0 提供程序解决办法
狐狸是从8.3升级到8.4的。系统一直都是 win8.1,64位。升级后出现这个错误,解决办法就是下载了2010 Access 驱动程序

属性-兼容性-win7,安装后搞定!

如果还不行就参考下面

发布:苗景云 | 查看全文 | 浏览(1173) | 分类:IT技术&设计 | 评论(0) | 2016年05月20日

 最近重装了系统,win7 壁纸位置无法更换的,无论选择“适应”还是“填充”,最后都是拉伸。这个只能通过修改注册表解决。万恶的ghost系统!!

 

“注册表”法,请按照下面步骤进行注册表编辑操作: 
1、点击『开始』 
2、点击“运行”并键入"regedit"(不包括双引号)后确定 
3、在“注册表编辑器”中依次展开 
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\ 

发布:苗景云 | 查看全文 | 浏览(1308) | 分类:IT技术&设计 | 评论(0) | 2016年05月14日

找到member/login.html ,修改

<form method="post" action="" onSubmit="save_username();" id="myform" name="myform">

<input type="hidden" name="forward" id="forward" value="{APP_PATH}index.php?m=content&c=index&a=lists&catid=47">

发布:苗景云 | 查看全文 | 浏览(1300) | 分类:IT技术&设计 | 评论(0) | 2016年03月24日

HDWIKI开启伪静态后,搜索时翻页会出现乱码,原因是URL中包含汉字乱码。


修改方法只需要将URL规则下面的代码进行修改

RewriteRule ^.*$ index.php?$0

修改为

RewriteRule ^(.*)$ index.php?$1 [QSA,NU,PT,L] 

发布:苗景云 | 查看全文 | 浏览(1674) | 分类:IT技术&设计 | 评论(0) | 2016年03月01日

找到admin_common.js中的openwinx方法改为下面这样既可


发布:苗景云 | 查看全文 | 浏览(1612) | 分类:IT技术&设计 | 评论(0) | 2016年01月28日
« 之后的文章苗景云的博客
<< 向左走,向右走 >>
更早的文章 »