code stringlengths 1 2.01M | repo_name stringlengths 3 62 | path stringlengths 1 267 | language stringclasses 231 values | license stringclasses 13 values | size int64 1 2.01M |
|---|---|---|---|---|---|
<?php
/**
* ECSHOP 標籤管理語言項
* ============================================================================
* 版權所有 2005-2010 上海商派網絡科技有限公司,並保留所有權利。
* 網站地址: http://www.ecshop.com;
* ----------------------------------------------------------------------------
* 這不是一個自由軟件!您只能在不用於商業目的的前提下對程序代碼進行修改和
* 使用;不允許對程序代碼以任何形式任何目的的再發佈。
* ============================================================================
* $Author: liuhui $
* $Id: tag_manage.php 17063 2010-03-25 06:35:46Z liuhui $
*/
$_LANG['tag_manage'] = '標籤管理';
$_LANG['tag_id'] = '編號';
$_LANG['tag_words'] = '標籤名稱';
$_LANG['add_tag'] = '添加標籤';
$_LANG['user_id'] = '會員名';
$_LANG['goods_id'] = '商品名稱';
$_LANG['drop_tags'] = '批量刪除';
$_LANG['tagword_exist'] = '標籤 %s 已經存在!';
$_LANG['tag_list'] = '標籤列表';
$_LANG['tag_edit'] = '編輯標籤';
$_LANG['goods_name'] = '商品名稱';
$_LANG['name_search'] = '根據商品編號、名稱或貨號搜索商品';
$_LANG['tag_edit_success'] = '更新標籤成功';
$_LANG['tag_add_success'] = '添加標籤成功';
$_LANG['pls_select_goods'] = '請選擇商品';
$_LANG['no_select_tag'] = '您現在沒有需要刪除的標籤';
$_LANG['drop_success'] = '您已經成功的刪除了 %d 個標籤';
$_LANG['back_list'] = '返回標籤列表';
/* JS語言項 */
$_LANG['drop_confirm'] = '您確定要刪除這條記錄嗎?';
$_LANG['js_languages']['tag_name_not_empty'] = '標籤名稱不能為空!';
?>
| zzshop | trunk/languages/zh_tw/admin/tag_manage.php | PHP | asf20 | 1,716 |
<?php
/**
* ECSHOP 管理中心起始頁語言文件
* ============================================================================
* 版權所有 2005-2010 上海商派網絡科技有限公司,並保留所有權利。
* 網站地址: http://www.ecshop.com;
* ----------------------------------------------------------------------------
* 這不是一個自由軟件!您只能在不用於商業目的的前提下對程序代碼進行修改和
* 使用;不允許對程序代碼以任何形式任何目的的再發佈。
* ============================================================================
* $Author: liuhui $
* $Id: index.php 17063 2010-03-25 06:35:46Z liuhui $
*/
$_LANG['shop_guide'] = '開店嚮導';
$_LANG['set_navigator'] = '設置導航欄';
$_LANG['about'] = '關於 ECSHOP';
$_LANG['preview'] = '查看網店';
$_LANG['menu'] = '菜單';
$_LANG['help'] = '幫助';
$_LANG['signout'] = '退出';
$_LANG['profile'] = '個人設置';
$_LANG['view_message'] = '管理員留言';
$_LANG['send_msg'] = '發送留言';
$_LANG['toggle_calculator'] = '計算器';
$_LANG['expand_all'] = '展開';
$_LANG['collapse_all'] = '閉合';
$_LANG['no_help'] = '暫時還沒有該部分內容';
$_LANG['license_free'] = '非授權用戶';
$_LANG['license_commercial'] = '綠卡用戶';
$_LANG['license_invalid'] = '未授權用戶';
$_LANG['license_failed'] = '非法用戶';
$_LANG['license_oem'] = '授權商業用戶';
$_LANG['license_oemtest'] = '體驗用戶';
//
$_LANG['license_Q'] = '商業';
$_LANG['license_G'] = '商業';
$_LANG['license_L'] = '臨時';
$_LANG['license_S'] = '商業';
$_LANG['license_O'] = '企業';
$_LANG['license_T'] = '體驗';
$_LANG['license_no'] = '免費';
$_LANG['license_test'] = '免費';
$_LANG['js_languages']['expand_all'] = '展開';
$_LANG['js_languages']['collapse_all'] = '閉合';
/*------------------------------------------------------ */
//-- 計算器
/*------------------------------------------------------ */
$_LANG['calculator'] = '計算器';
$_LANG['clear_calculator'] = '清除';
$_LANG['backspace'] = '退格';
/*------------------------------------------------------ */
//-- 起始頁
/*------------------------------------------------------ */
$_LANG['pm_title'] = '留言標題';
$_LANG['pm_username'] = '留言者';
$_LANG['pm_time'] = '留言時間';
$_LANG['order_stat'] = '訂單統計信息';
$_LANG['unconfirmed'] = '未確認訂單:';
$_LANG['await_ship'] = '待發貨訂單:';
$_LANG['await_pay'] = '待支付訂單:';
$_LANG['finished'] = '已成交訂單數:';
$_LANG['new_booking'] = '新缺貨登記:';
$_LANG['new_reimburse'] = '退款申請:';
$_LANG['goods_stat'] = '實體商品統計信息';
$_LANG['virtual_card_stat'] = '虛擬卡商品統計';
$_LANG['goods_count'] = '商品總數:';
$_LANG['sales_count'] = '促銷商品數:';
$_LANG['new_goods'] = '新品推薦數:';
$_LANG['recommed_goods'] = '精品推薦數:';
$_LANG['hot_goods'] = '熱銷商品數:';
$_LANG['warn_goods'] = '庫存警告商品數:';
$_LANG['clear_cache'] = '清除緩存';
$_LANG['ebao_commend'] = '易寶推薦';
$_LANG['acess_stat'] = '訪問統計';
$_LANG['acess_today'] = '今日訪問:';
$_LANG['online_users'] = '在線人數:';
$_LANG['user_count'] = '會員總數:';
$_LANG['today_register'] = '今日註冊:';
$_LANG['new_feedback'] = '最新留言:';
$_LANG['new_comments'] = '未審核評論:';
$_LANG['system_info'] = '系統信息';
$_LANG['os'] = '服務器操作系統:';
$_LANG['web_server'] = 'Web 服務器:';
$_LANG['php_version'] = 'PHP 版本:';
$_LANG['mysql_version'] = 'MySQL 版本:';
$_LANG['gd_version'] = 'GD 版本:';
$_LANG['zlib'] = 'Zlib 支持:';
$_LANG['ecs_version'] = 'ECShop 版本:';
$_LANG['install_date'] = '安裝日期:';
$_LANG['ip_version'] = 'IP 庫版本:';
$_LANG['max_filesize'] = '文件上傳的最大大小:';
$_LANG['safe_mode'] = '安全模式:';
$_LANG['safe_mode_gid'] = '安全模式GID:';
$_LANG['timezone'] = '時區設置:';
$_LANG['no_timezone'] = '無需設置';
$_LANG['socket'] = 'Socket 支持:';
$_LANG['ec_charset'] = '編碼:';
$_LANG['remove_install'] = '您還沒有刪除 install 文件夾,出於安全的考慮,我們建議您刪除 install 文件夾。';
$_LANG['remove_upgrade'] = '您還沒有刪除 upgrade 文件夾,出於安全的考慮,我們建議您刪除 upgrade 文件夾。';
$_LANG['remove_demo'] = '您還沒有刪除 demo 文件夾,出於安全的考慮,我們建議您刪除 demo 文件夾。';
$_LANG['temp_dir_cannt_read'] = '您的服務器設置了 open_base_dir 且沒有包含 %s,您將無法上傳文件。';
$_LANG['not_writable'] = '%s 目錄不可寫入,%s';
$_LANG['data_cannt_write'] = '您將無法上傳包裝、賀卡、品牌等等圖片文件。';
$_LANG['afficheimg_cannt_write'] = '您將無法上傳廣告的圖片文件。';
$_LANG['brandlogo_cannt_write'] = '您將無法上傳品牌的圖片文件。';
$_LANG['cardimg_cannt_write'] = '您將無法上傳賀卡的圖片文件。';
$_LANG['feedbackimg_cannt_write'] = '用戶將無法通過留言上傳文件。';
$_LANG['packimg_cannt_write'] = '您將無法上傳包裝的圖片文件。';
$_LANG['cert_cannt_write'] = '您將無法上傳 ICP 備案證書文件。';
$_LANG['images_cannt_write']= '您將無法上傳任何商品圖片。';
$_LANG['imagesupload_cannt_write']= '您將無法通過編輯器上傳任何圖片。';
$_LANG['tpl_cannt_write'] = '您的網站將無法瀏覽。';
$_LANG['tpl_backup_cannt_write'] = '您就無法備份當前的模版文件。';
$_LANG['order_print_canntwrite'] = 'data目錄下的order_print.html文件屬性為不可寫,您將無法修改訂單打印模板。';
$_LANG['shop_closed_tips'] = '您的商店已被暫時關閉。在設置好您的商店之後別忘記打開哦!';
$_LANG['empty_upload_tmp_dir'] = '當前的上傳臨時目錄為空,您可能無法上傳文件,請檢查 php.ini 中的設置。';
$_LANG['caches_cleared'] = '頁面緩存已經清除成功。';
/*------------------------------------------------------ */
//-- 關於我們
/*------------------------------------------------------ */
$_LANG['team_member'] = 'ECSHOP 團隊成員';
$_LANG['director'] = '項目策劃';
$_LANG['programmer'] = '程序開發';
$_LANG['ui_designer'] = '界面設計';
$_LANG['documentation'] = '文檔整理';
$_LANG['special_thanks'] = '特別感謝';
$_LANG['official_site'] = '官方網站';
$_LANG['site_url'] = '網站地址:';
$_LANG['support_center'] = '支持中心:';
$_LANG['support_forum'] = '支持論壇:';
// 郵件群發
$_LANG['mailsend_fail'] = '郵件 %s 發送失敗!';
$_LANG['mailsend_ok'] = '郵件 %s 發送成功!還有 %s 郵件未發送!';
$_LANG['mailsend_finished'] = '郵件 %s 發送成功!全部郵件發送完成!';
$_LANG['mailsend_null'] = '郵件發送列表空!';
$_LANG['mailsend_skip'] = '繼續發送下一條...';
$_LANG['email_sending'] = '正在處理郵件發送隊列...';
$_LANG['pause'] = '暫停';
$_LANG['conti'] = '繼續';
$_LANG['str'] = '已經發送了 %d 封郵件。';
//開店嚮導
$_LANG['shop_name'] = '商店名稱';
$_LANG['shop_title'] = '商店標題';
$_LANG['shop_country'] = '所在國家';
$_LANG['shop_province'] = '所在省份';
$_LANG['shop_city'] = '所在城市';
$_LANG['shop_address'] = '詳細地址';
$_LANG['shop_ship'] = '配送方式';
$_LANG['ship_name'] = '配送區域名稱';
$_LANG['ship_country'] = '國家';
$_LANG['ship_province'] = '省份';
$_LANG['ship_city'] = '城市';
$_LANG['ship_district'] = '縣/區';
$_LANG['shop_pay'] = '支付方式';
$_LANG['select_please'] = '請選擇...';
$_LANG['good_name'] = '商品名稱';
$_LANG['good_number'] = '商品數量';
$_LANG['good_category'] = '商品分類';
$_LANG['good_brand'] = '商品品牌';
$_LANG['good_price'] = '商品價格';
$_LANG['good_brief'] = '商品描述';
$_LANG['good_image'] = '上傳商品圖片';
$_LANG['is_new'] = '新品';
$_LANG['is_best'] = '精品';
$_LANG['is_hot'] = '熱賣';
$_LANG['good_intro'] = '加入推薦';
$_LANG['skip'] = '完成嚮導';
$_LANG['next_step'] = '下一步';
$_LANG['ur_add'] = '開店嚮導-添加商品';
$_LANG['ur_config'] = '開店嚮導-設置網店';
$_LANG['shop_basic_first'] = "設置商店的一些基本信息<em>商店的名字、地址、配送方式、支付方式等</em>";
$_LANG['shop_basic_second'] = "給商店添加一些商品<em>商品的名稱、數量、分類、品牌、價格、描述等</em>";
$_LANG['shop_basic_third'] = "恭喜您,您的網店可以使用了!<em>下面是一些常用功能的鏈接聚合。您關閉本頁後,依然可以在左側菜單相關項目中找到</em>";
$_LANG['add_good'] = '添加商品';
$_LANG['add_category'] = '添加商品分類';
$_LANG['add_type'] = '商品類型';
$_LANG['add_favourable'] = '添加優惠活動';
$_LANG['shop_config'] = '商店設置';
$_LANG['select_template'] = '選擇模板';
$_LANG['shop_back_in'] = '進入網店後台';
$_LANG['goods_img_too_big'] = '商品圖片文件太大了(最大值:%s),無法上傳。';
$_LANG['invalid_goods_img'] = '商品圖片格式不正確!';
//JS語言
$_LANG['js_languages']['shop_name_not_null'] = '商店名稱不能為空';
$_LANG['js_languages']['good_name_not_null'] = '商品名稱不能為空';
$_LANG['js_languages']['good_category_not_null'] = '商品分類不能為空';
$_LANG['js_languages']['good_number_not_number'] = '商品數量不是數值';
$_LANG['js_languages']['good_price_not_number'] = '商品價格不是數值';
/*後台語言項*/
$_LANG['send_mail_off'] = '自動發送郵件關閉';
?>
| zzshop | trunk/languages/zh_tw/admin/index.php | PHP | asf20 | 9,792 |
<?php
/**
* ECSHOP SQL查詢語言項
* ============================================================================
* 版權所有 2005-2010 上海商派網絡科技有限公司,並保留所有權利。
* 網站地址: http://www.ecshop.com;
* ----------------------------------------------------------------------------
* 這不是一個自由軟件!您只能在不用於商業目的的前提下對程序代碼進行修改和
* 使用;不允許對程序代碼以任何形式任何目的的再發佈。
* ============================================================================
* $Author: liuhui $
* $Id: sql.php 17063 2010-03-25 06:35:46Z liuhui $
*/
$_LANG['title'] = '運行 SQL 查詢';
$_LANG['error'] = '出錯了';
$_LANG['succeed'] = 'SQL 語句已成功運行';
$_LANG['no_data'] = '返回結果為空';
$_LANG['note'] = '執行SQL將直接操作數據庫,請謹慎使用';
$_LANG['query'] = '提交查詢';
$_LANG['no_data'] = '返回結果為空';
/*JS 語言項*/
$_LANG['js_languages']['sql_not_null'] = 'SQL語句為空';
?> | zzshop | trunk/languages/zh_tw/admin/sql.php | PHP | asf20 | 1,093 |
<?php
/**
* ECSHOP 文章管理語言項
* ============================================================================
* 版權所有 2005-2010 上海商派網絡科技有限公司,並保留所有權利。
* 網站地址: http://www.ecshop.com;
* ----------------------------------------------------------------------------
* 這不是一個自由軟件!您只能在不用於商業目的的前提下對程序代碼進行修改和
* 使用;不允許對程序代碼以任何形式任何目的的再發佈。
* ============================================================================
* $Author: liuhui $
* $Id: article.php 17095 2010-04-12 10:26:10Z liuhui $
*/
$_LANG['title'] ='文章標題';
$_LANG['cat'] ='文章分類';
$_LANG['reserve'] = '保留';
$_LANG['article_type'] ='文章重要性';
$_LANG['author'] ='文章作者';
$_LANG['email'] ='作者email';
$_LANG['keywords'] ='關鍵字';
$_LANG['lable_description'] ='網頁描述';
$_LANG['content'] ='文章內容';
$_LANG['is_open'] ='是否顯示';
$_LANG['article_id'] ='編號';
$_LANG['add_time'] ='添加日期';
$_LANG['upload_file'] ='上傳文件';
$_LANG['file_url'] ='或輸入文件地址';
$_LANG['invalid_file'] = '上傳文件格式不正確';
$_LANG['article_name_exist'] = '有相同的文章名稱存在!';
$_LANG['select_plz'] = '請選擇...';
$_LANG['external_links'] = '外部鏈接';
$_LANG['top'] ='置頂';
$_LANG['common'] ='普通';
$_LANG['isopen'] ='顯示';
$_LANG['isclose'] ='不顯示';
$_LANG['no_article'] = '您現在還沒有任何文章';
$_LANG['no_select_article'] = '您沒有選擇任何文章';
$_LANG['no_select_act'] = '請選擇文章分類!';
$_LANG['display'] = '顯示文章內容';
$_LANG['download'] = '下載文件';
$_LANG['both'] = '既顯示文章內容又下載文件';
$_LANG['button_remove'] ='批量刪除';
$_LANG['button_hide'] ='批量隱藏';
$_LANG['button_show'] ='批量顯示';
$_LANG['move_to'] = '轉移到分類';
$_LANG['article_edit'] = '編輯文章內容';
$_LANG['tab_general'] = '通用信息';
$_LANG['tab_content'] = '文章內容';
$_LANG['tab_goods'] = '關聯商品';
$_LANG['link_goods'] = '跟該文章關聯的商品';
$_LANG['keyword'] = '關鍵字';
/* 提示信息 */
$_LANG['title_exist'] ='文章 %s 已經存在';
$_LANG['back_list'] ='返回文章列表';
$_LANG['continue_add'] ='繼續添加新文章';
$_LANG['articleadd_succeed'] ='文章已經添加成功';
$_LANG['articleedit_succeed'] ='文章 %s 成功編輯';
$_LANG['articleedit_fail'] ='文章編輯失敗';
$_LANG['no_title'] ='沒有輸入文章標題';
$_LANG['drop_confirm'] = '您確認要刪除這篇文章嗎?';
$_LANG['batch_handle_ok'] = '批量操作成功';
/*JS 語言項*/
$_LANG['js_languages']['no_title'] = '沒有文章標題';
$_LANG['js_languages']['no_cat'] = '沒有選擇文章分類';
$_LANG['js_languages']['not_allow_add'] = '系統保留分類,不允許在該分類添加文章';
$_LANG['js_languages']['drop_confirm'] = '您確定要刪除文章嗎?';
$_LANG['all_cat'] = '全部分類';
?> | zzshop | trunk/languages/zh_tw/admin/article.php | PHP | asf20 | 3,149 |
<?php
/**
* ECSHOP 程序說明
* ===========================================================
* 版權所有 2005-2010 上海商派網絡科技有限公司,並保留所有權利。
* 網站地址: http://www.ecshop.com;
* ----------------------------------------------------------
* 這不是一個自由軟件!您只能在不用於商業目的的前提下對程序代碼進行修改和
* 使用;不允許對程序代碼以任何形式任何目的的再發佈。
* ==========================================================
* $Author: liuhui $
* $Id: affiliate_ck.php 17063 2010-03-25 06:35:46Z liuhui $
*/
$_LANG['order_id'] = '訂單號';
$_LANG['affiliate_separate'] = '分成';
$_LANG['affiliate_cancel'] = '取消';
$_LANG['affiliate_rollback'] = '撤銷';
$_LANG['log_info'] = '操作信息';
$_LANG['edit_ok'] = '操作成功';
$_LANG['edit_fail'] = '操作失敗';
$_LANG['separate_info'] = '訂單號 %s, 分成:金錢 %s 積分 %s';
$_LANG['separate_info2'] = '用戶ID %s ( %s ), 分成:金錢 %s 積分 %s';
$_LANG['sch_order'] = '搜索訂單號';
$_LANG['sch_stats']['name'] = '操作狀態';
$_LANG['sch_stats']['info'] = '按操作狀態查找:';
$_LANG['sch_stats']['all'] = '全部';
$_LANG['sch_stats'][0] = '等待處理';
$_LANG['sch_stats'][1] = '已分成';
$_LANG['sch_stats'][2] = '取消分成';
$_LANG['sch_stats'][3] = '已撤銷';
$_LANG['order_stats']['name'] = '訂單狀態';
$_LANG['order_stats'][0] = '未確認';
$_LANG['order_stats'][1] = '已確認';
$_LANG['order_stats'][2] = '已取消';
$_LANG['order_stats'][3] = '無效';
$_LANG['order_stats'][4] = '退貨';
$_LANG['js_languages']['cancel_confirm'] = '您確定要取消分成嗎?此操作不能撤銷。';
$_LANG['js_languages']['rollback_confirm'] = '您確定要撤銷此次分成嗎?';
$_LANG['js_languages']['separate_confirm'] = '您確定要分成嗎?';
$_LANG['loginfo'][0] = '用戶id:';
$_LANG['loginfo'][1] = '現金:';
$_LANG['loginfo'][2] = '積分:';
$_LANG['loginfo']['cancel'] = '分成被管理員取消!';
$_LANG['separate_type'] = '分成類型';
$_LANG['separate_by'][0] = '推薦註冊分成';
$_LANG['separate_by'][1] = '推薦訂單分成';
$_LANG['separate_by'][-1] = '推薦註冊分成';
$_LANG['separate_by'][-2] = '推薦訂單分成';
$_LANG['show_affiliate_orders'] = '此列表顯示此用戶推薦的訂單信息。';
$_LANG['back_note'] = '返回會員編輯頁面';
?> | zzshop | trunk/languages/zh_tw/admin/affiliate_ck.php | PHP | asf20 | 2,485 |
<?php
/**
* ECSHOP 時間JS語言文件
* ============================================================================
* 版權所有 2005-2010 上海商派網絡科技有限公司,並保留所有權利。
* 網站地址: http://www.ecshop.com;
* ----------------------------------------------------------------------------
* 這不是一個自由軟件!您只能在不用於商業目的的前提下對程序代碼進行修改和
* 使用;不允許對程序代碼以任何形式任何目的的再發佈。
* ============================================================================
* $Author: liuhui $
* $Id: calendar.php 17063 2010-03-25 06:35:46Z liuhui $
*/
/* 時間JS語言項 */
$_LANG['calendar_lang']['Sunday'] = '星期日';
$_LANG['calendar_lang']['Monday'] = '星期一';
$_LANG['calendar_lang']['Tuesday'] = '星期二';
$_LANG['calendar_lang']['Wednesday'] = '星期三';
$_LANG['calendar_lang']['Thursday'] = '星期四';
$_LANG['calendar_lang']['Friday'] = '星期五';
$_LANG['calendar_lang']['Saturday'] = '星期六';
$_LANG['calendar_lang']['Sun'] = '日';
$_LANG['calendar_lang']['Mon'] = '一';
$_LANG['calendar_lang']['Tue'] = '二';
$_LANG['calendar_lang']['Wed'] = '三';
$_LANG['calendar_lang']['Thu'] = '四';
$_LANG['calendar_lang']['Fri'] = '五';
$_LANG['calendar_lang']['Sat'] = '六';
$_LANG['calendar_lang']['January'] = '一月';
$_LANG['calendar_lang']['February'] = '二月';
$_LANG['calendar_lang']['March'] = '三月';
$_LANG['calendar_lang']['April'] = '四月';
$_LANG['calendar_lang']['May'] = '五月';
$_LANG['calendar_lang']['June'] = '六月';
$_LANG['calendar_lang']['July'] = '七月';
$_LANG['calendar_lang']['Aguest'] = '八月';
$_LANG['calendar_lang']['September'] = '九月';
$_LANG['calendar_lang']['October'] = '十月';
$_LANG['calendar_lang']['November'] = '十一月';
$_LANG['calendar_lang']['December'] = '十二月';
$_LANG['calendar_lang']['Jan'] = '一月';
$_LANG['calendar_lang']['Feb'] = '二月';
$_LANG['calendar_lang']['Mar'] = '三月';
$_LANG['calendar_lang']['Apr'] = '四月';
$_LANG['calendar_lang']['May'] = '五月';
$_LANG['calendar_lang']['Jun'] = '六月';
$_LANG['calendar_lang']['Jul'] = '七月';
$_LANG['calendar_lang']['Agu'] = '八月';
$_LANG['calendar_lang']['Sep'] = '九月';
$_LANG['calendar_lang']['Oct'] = '十月';
$_LANG['calendar_lang']['Nov'] = '十一月';
$_LANG['calendar_lang']['Dec'] = '十二月';
$_LANG['calendar_lang']['calendar_help'] = '幫助';
$_LANG['calendar_lang']['calendar_about1'] = "選擇日期:\\r\\n- 點擊 \\xab, \\xbb 按鈕選擇年份\\r\\n- 點擊 ";
$_LANG['calendar_lang']['calendar_about2'] = " 按鈕選擇月份\\r\\n- 長按以上按鈕可從菜單中快速選擇年份或月份";
$_LANG['calendar_lang']['calendar_about_time'] = "\\r\\n\\r\\n選擇時間:\\r\\n- 點擊小時或分鐘可使改數值加一\\r\\n- 按住Shift鍵點擊小時或分鐘可使改數值減一\\r\\n- 點擊拖動鼠標可進行快速選擇";
$_LANG['calendar_lang']['prev_year'] = "上一年 (按住出菜單)";
$_LANG['calendar_lang']['prev_month'] = "上一月 (按住出菜單)";
$_LANG['calendar_lang']['go_today'] = "轉到今日";
$_LANG['calendar_lang']['next_month'] = "下一月 (按住出菜單)";
$_LANG['calendar_lang']['next_year'] = "下一年 (按住出菜單)";
$_LANG['calendar_lang']['sel_date'] = "選擇日期";
$_LANG['calendar_lang']['drag_to_move'] = "拖動";
$_LANG['calendar_lang']['part_today'] = "(今日)";
$_LANG['calendar_lang']['day_first'] = "最左邊顯示";
$_LANG['calendar_lang']['calendar_close'] = "關閉";
$_LANG['calendar_lang']['calendar_today'] = "今日";
$_LANG['calendar_lang']['time_part'] = "(Shift-)點擊鼠標或拖動改變值";
$_LANG['calendar_lang']['calendar_wk'] = "周";
$_LANG['calendar_lang']['calendar_day'] = "日";
$_LANG['calendar_lang']['calendar_time'] = "時間";
?> | zzshop | trunk/languages/zh_tw/calendar.php | PHP | asf20 | 3,940 |
<?php
/**
* ECSHOP 程序說明
* ===========================================================
* 版權所有 2005-2010 上海商派網絡科技有限公司,並保留所有權利。
* 網站地址: http://www.ecshop.com;
* ----------------------------------------------------------
* 這不是一個自由軟件!您只能在不用於商業目的的前提下對程序代碼進行修改和
* 使用;不允許對程序代碼以任何形式任何目的的再發佈。
* ==========================================================
* $Author: liuhui $
* $Id: demo.php 17063 2010-03-25 06:35:46Z liuhui $
*/
?> | zzshop | trunk/languages/zh_tw/demo.php | PHP | asf20 | 637 |
<?php
/**
* ECSHOP EMS插件的語言文件
* ============================================================================
* 版權所有 2005-2010 上海商派網絡科技有限公司,並保留所有權利。
* 網站地址: http://www.ecshop.com;
* ----------------------------------------------------------------------------
* 這不是一個自由軟件!您只能在不用於商業目的的前提下對程序代碼進行修改和
* 使用;不允許對程序代碼以任何形式任何目的的再發佈。
* ============================================================================
* $Author: liuhui $
* $Id: ems.php 17063 2010-03-25 06:35:46Z liuhui $
*/
$_LANG['ems'] = 'EMS 國內郵政特快專遞';
$_LANG['ems_express_desc'] = 'EMS 國內郵政特快專遞描述內容';
$_LANG['item_fee'] = '單件商品費用:';
$_LANG['base_fee'] = '500克以內費用:';
$_LANG['step_fee'] = '續重每500克或其零數:';
?> | zzshop | trunk/languages/zh_tw/shipping/ems.php | PHP | asf20 | 1,035 |
<?php
/**
* ECSHOP 郵政快遞包裹插件的語言文件
* ============================================================================
* 版權所有 2005-2010 上海商派網絡科技有限公司,並保留所有權利。
* 網站地址: http://www.ecshop.com;
* ----------------------------------------------------------------------------
* 這不是一個自由軟件!您只能在不用於商業目的的前提下對程序代碼進行修改和
* 使用;不允許對程序代碼以任何形式任何目的的再發佈。
* ============================================================================
* $Author: liuhui $
* $Id: post_express.php 17063 2010-03-25 06:35:46Z liuhui $
*/
$_LANG['post_express'] = '郵政快遞包裹';
$_LANG['post_express_desc'] = '郵政快遞包裹的描述內容。';
$_LANG['base_fee'] = '1000克以內費用:';
$_LANG['item_fee'] = '單件商品費用:';
$_LANG['step_fee'] = '5000克以內續重每500克費用:';
$_LANG['step_fee1'] = '5001克以上續重500克費用:';
?> | zzshop | trunk/languages/zh_tw/shipping/post_express.php | PHP | asf20 | 1,125 |
<?php
/**
* ECSHOP 中通速遞插件的語言文件
* ============================================================================
* 版權所有 2005-2010 上海商派網絡科技有限公司,並保留所有權利。
* 網站地址: http://www.ecshop.com;
* ----------------------------------------------------------------------------
* 這不是一個自由軟件!您只能在不用於商業目的的前提下對程序代碼進行修改和
* 使用;不允許對程序代碼以任何形式任何目的的再發佈。
* ============================================================================
* $Author: liuhui $
* $Id: zto.php 17063 2010-03-25 06:35:46Z liuhui $
*/
$_LANG['zto'] = '中通速遞';
$_LANG['zto_desc'] = '中通快遞的相關說明。保價費按照申報價值的2%交納,但是,保價費不低於100元,保價金額不得高於10000元,保價金額超過10000元的,超過的部分無效';
$_LANG['base_fee'] = '首重費用';
$_LANG['step_fee'] = '續重費用';
$_LANG['item_fee'] = '單件商品費用:';
?> | zzshop | trunk/languages/zh_tw/shipping/zto.php | PHP | asf20 | 1,103 |
<?php
/**
* ECSHOP 申通快遞插件的語言文件
* ============================================================================
* 版權所有 2005-2010 上海商派網絡科技有限公司,並保留所有權利。
* 網站地址: http://www.ecshop.com;
* ----------------------------------------------------------------------------
* 這不是一個自由軟件!您只能在不用於商業目的的前提下對程序代碼進行修改和
* 使用;不允許對程序代碼以任何形式任何目的的再發佈。
* ============================================================================
* $Author: liuhui $
* $Id: sto_express.php 17063 2010-03-25 06:35:46Z liuhui $
*/
$_LANG['sto_express'] = '申通快遞';
$_LANG['sto_express_desc'] = '江、浙、滬地區首重為15元/KG,其他地區18元/KG, 續重均為5-6元/KG, 雲南地區為8元';
$_LANG['base_fee'] = '1000克以內費用';
$_LANG['item_fee'] = '單件商品費用:';
$_LANG['step_fee'] = '續重每1000克或其零數的費用';
$_LANG['shipping_print'] = '<table border="0" cellspacing="0" cellpadding="0" style="width:18.9cm;">
<tr>
<td colspan="3" style="height:2cm;"> </td>
</tr>
<tr>
<td style="width:8cm; height:4cm; padding-top:0.3cm;" align="center" valign="middle">
<table border="0" cellspacing="0" cellpadding="0" style="width:7.5cm;" align="center">
<tr>
<td style="width:2.3cm;"> </td>
<td style="height:1.5cm;">{$shop_address}</td>
</tr>
<tr>
<td> </td>
<td style="height:0.9cm;">{$shop_name}</td>
</tr>
<tr>
<td> </td>
<td style="height:0.9cm;">{$shop_name}</td>
</tr>
<tr>
<td> </td>
<td style="height:0.9cm;">{$service_phone}</td>
</tr>
</table>
</td>
<td style="width:8cm; height:4cm; padding-top:0.3cm;" align="center" valign="middle">
<table border="0" cellspacing="0" cellpadding="0" style="width:7.5cm;" align="center">
<tr>
<td style="width:2.3cm;"> </td>
<td style="height:1.5cm;">{$order.address}</td>
</tr>
<tr>
<td> </td>
<td style="height:0.9cm;"></td>
</tr>
<tr>
<td> </td>
<td style="height:0.9cm;">{$order.consignee}</td>
</tr>
<tr>
<td> </td>
<td style="height:0.9cm;">{$order.tel}</td>
</tr>
</table>
</td>
<td rowspan="2" style="width:3cm;"> </td>
</tr>
<tr>
<td colspan="2" style="height:3.5cm;"> </td>
</tr>
</table>';
?> | zzshop | trunk/languages/zh_tw/shipping/sto_express.php | PHP | asf20 | 2,602 |
<?php
/**
* ECSHOP 郵政掛號印刷品插件的語言文件
* ============================================================================
* 版權所有 2005-2010 上海商派網絡科技有限公司,並保留所有權利。
* 網站地址: http://www.ecshop.com;
* ----------------------------------------------------------------------------
* 這不是一個自由軟件!您只能在不用於商業目的的前提下對程序代碼進行修改和
* 使用;不允許對程序代碼以任何形式任何目的的再發佈。
* ============================================================================
* $Author: liuhui $
* $Id: presswork.php 17063 2010-03-25 06:35:46Z liuhui $
*/
$_LANG['presswork'] = '郵政掛號印刷品';
$_LANG['presswork_desc'] = '郵政掛號印刷品的描述內容。';
?> | zzshop | trunk/languages/zh_tw/shipping/presswork.php | PHP | asf20 | 856 |
<?php
/**
* ECSHOP 上門取貨插件的語言文件
* ============================================================================
* 版權所有 2005-2010 上海商派網絡科技有限公司,並保留所有權利。
* 網站地址: http://www.ecshop.com;
* ----------------------------------------------------------------------------
* 這不是一個自由軟件!您只能在不用於商業目的的前提下對程序代碼進行修改和
* 使用;不允許對程序代碼以任何形式任何目的的再發佈。
* ============================================================================
* $Author: liuhui $
* $Id: cac.php 17063 2010-03-25 06:35:46Z liuhui $
*/
$_LANG['cac'] = '上門取貨';
$_LANG['cac_desc'] = '買家自己到商家指定地點取貨';
?> | zzshop | trunk/languages/zh_tw/shipping/cac.php | PHP | asf20 | 820 |
<?php
/**
* ECSHOP 運費到付插件語言文件
* ============================================================================
* 版權所有 2005-2010 上海商派網絡科技有限公司,並保留所有權利。
* 網站地址: http://www.ecshop.com;
* ----------------------------------------------------------------------------
* 這不是一個自由軟件!您只能在不用於商業目的的前提下對程序代碼進行修改和
* 使用;不允許對程序代碼以任何形式任何目的的再發佈。
* ============================================================================
* $Author: liuhui $
* $Id: fpd.php 17063 2010-03-25 06:35:46Z liuhui $
*/
$_LANG['fpd'] = '運費到付';
$_LANG['fpd_desc'] = '所購商品到達即付運費';
?> | zzshop | trunk/languages/zh_tw/shipping/fpd.php | PHP | asf20 | 808 |
<?php
/**
* ECSHOP 城際快遞插件的語言文件
* ============================================================================
* 版權所有 2005-2010 上海商派網絡科技有限公司,並保留所有權利。
* 網站地址: http://www.ecshop.com;
* ----------------------------------------------------------------------------
* 這不是一個自由軟件!您只能在不用於商業目的的前提下對程序代碼進行修改和
* 使用;不允許對程序代碼以任何形式任何目的的再發佈。
* ============================================================================
* $Author: liuhui $
* $Id: city_express.php 17063 2010-03-25 06:35:46Z liuhui $
*/
$_LANG['city_express'] = '城際快遞';
$_LANG['city_express_desc'] = '配送的運費是固定的';
$_LANG['base_fee'] = '基本費用:';
$_LANG['item_fee'] = '單件商品費用:';
?>
| zzshop | trunk/languages/zh_tw/shipping/city_express.php | PHP | asf20 | 931 |
<?php
/**
* ECSHOP 圓通速遞插件的語言文件
* ============================================================================
* 版權所有 2005-2010 上海商派網絡科技有限公司,並保留所有權利。
* 網站地址: http://www.ecshop.com;
* ----------------------------------------------------------------------------
* 這不是一個自由軟件!您只能在不用於商業目的的前提下對程序代碼進行修改和
* 使用;不允許對程序代碼以任何形式任何目的的再發佈。
* ============================================================================
* $Author: liuhui $
* $Id: yto.php 17063 2010-03-25 06:35:46Z liuhui $
*/
$_LANG['yto'] = '圓通速遞';
$_LANG['yto_desc'] = '上海圓通物流(速遞)有限公司經過多年的網絡快速發展,在中國速遞行業中一直處於領先地位。為了能更好的發展國際快件市場,加快與國際市場的接軌,強化圓通的整體實力,圓通已在東南亞、歐美、中東、北美洲、非洲等許多城市運作國際快件業務';
$_LANG['base_fee'] = '首重費用';
$_LANG['step_fee'] = '續重費用';
$_LANG['item_fee'] = '單件商品費用:';
$_LANG['shipping_print'] = '<table border="0" cellspacing="0" cellpadding="0" style="width:18.6cm; height:11.3cm;">
<tr>
<td valign="top" style="width:7.2cm;">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td style="height:1.5cm;"> </td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td colspan="4" style="height:0.4cm;"></td>
</tr>
<tr>
<td style="width:1cm; height:1cm;"> </td>
<td style="width:2.4cm;">{$shop_name}</td>
<td style="width:1cm; height:1cm;"> </td>
<td>{$city}</td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td colspan="6" style="height:0.4cm;"> </td>
</tr>
<tr>
<td style="width:1.6cm;">{$province}</td>
<td style="width:0.8cm; height:0.6cm;"></td>
<td style="width:1.6cm;">{$city}</td>
<td style="width:0.8cm;"></td>
<td style="width:1.6cm;"> </td>
<td style="width:0.8cm;"></td>
</tr>
<tr>
<td colspan="6" style="height:1cm;">{$shop_address}</td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td style="height:0.4cm;"></td>
</tr>
<tr>
<td style="height:1cm;">{$shop_name}</td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td style="height:0.8cm; width:0.8cm;"> </td>
<td style="width:2.8cm;">{$service_phone}</td>
<td style="height:0.8cm; width:0.8cm;"> </td>
<td style="width:2.8cm;"> </td>
</tr>
</table>
</td>
<td valign="top" style="width:7.2cm;">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td style="height:2.9cm;"> </td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td style="height:1cm; width:1.2cm;"> </td>
<td style="width:2.4cm;">{$order.consignee}</td>
<td style="height:1cm; width:1.2cm;"> </td>
<td style="width:2.4cm;">{$order.region}</td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td colspan="6" style="height:0.4cm;"> </td>
</tr>
<tr>
<td style="width:1.6cm;">{$province}</td>
<td style="width:0.8cm; height:0.6cm;"></td>
<td style="width:1.6cm;">{$city}</td>
<td style="width:0.8cm;"></td>
<td style="width:1.6cm;"></td>
<td style="width:0.8cm;"></td>
</tr>
<tr>
<td colspan="6" style="height:1cm;">{$order.address}</td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td style="height:0.4cm;"></td>
</tr>
<tr>
<td style="height:1cm;">{$order.consignee}</td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td style="height:0.8cm; width:0.8cm;"> </td>
<td style="width:2.8cm;"></td>
<td style="height:0.8cm; width:0.8cm;"> </td>
<td style="width:2.8cm;">{$order.mobile}</td>
</tr>
</table>
</td>
<td valign="top" style="width:4.2cm;">
</td>
</tr>
</table>';
?> | zzshop | trunk/languages/zh_tw/shipping/yto.php | PHP | asf20 | 4,783 |
<?php
/**
* ECSHOP 順豐速運插件的語言文件
* ============================================================================
* 版權所有 2005-2010 上海商派網絡科技有限公司,並保留所有權利。
* 網站地址: http://www.ecshop.com;
* ----------------------------------------------------------------------------
* 這不是一個自由軟件!您只能在不用於商業目的的前提下對程序代碼進行修改和
* 使用;不允許對程序代碼以任何形式任何目的的再發佈。
* ============================================================================
* $Author: liuhui $
* $Id: sf_express.php 17063 2010-03-25 06:35:46Z liuhui $
*/
global $_LANG;
$_LANG['sf_express'] = '順豐速運 ';
$_LANG['sf_express_desc'] = '江、浙、滬地區首重15元/KG,續重2元/KG,其餘城市首重20元/KG';
$_LANG['base_fee'] = '1000克以內費用';
$_LANG['item_fee'] = '單件商品費用:';
$_LANG['step_fee'] = '續重每1000克或其零數的費用';
$_LANG['shipping_print'] = '<table style="width:18.8cm; height:3cm;" border="0" cellspacing="0" cellpadding="0">
<tr>
<td> </td>
</tr>
</table>
<table style="width:18.8cm;" border="0" cellspacing="0" cellpadding="0">
<tr>
<td style="width:9.4cm" valign="top">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td valign="middle" style="width:1.5cm; height:0.8cm;"> </td>
<td width="85%">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td valign="middle" style="width:5cm; height:0.8cm;">{$shop_name}</td>
<td valign="middle"> </td>
<td valign="middle" style="width:1.8cm; height:0.8cm;">{$order.order_sn}</td>
</tr>
</table>
</td>
</tr>
<tr valign="middle">
<td> </td>
<td class="h">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td style="width:1.3cm; height:0.8cm;">{$province}</td>
<td> </td>
<td style="width:1.3cm; height:0.8cm;">{$city}</td>
<td> </td>
<td style="width:1.3cm; height:0.8cm;"> </td>
<td> </td>
<td style="width:1.3cm; height:0.8cm;"> </td>
<td> </td>
</tr>
</table>
</td>
</tr>
<tr valign="middle">
<td> </td>
<td class="h">{$shop_address}</td>
</tr>
<tr valign="middle">
<td> </td>
<td class="h"> </td>
</tr>
<tr valign="middle">
<td> </td>
<td class="h">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td> </td>
<td style="width:1.5cm; height:0.8cm;"> </td>
<td> </td>
<td style="width:3.5cm; height:0.8cm;">{$service_phone}</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
<td style="width:9.4cm;" valign="top">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td valign="middle" style="width:1.5cm; height:0.8cm;"> </td>
<td width="85%">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td valign="middle" style="width:5cm; height:0.8cm;">{$order.consignee}</td>
<td valign="middle"> </td>
<td valign="middle" style="width:1.8cm; height:0.8cm;"> </td>
</tr>
</table>
</td>
</tr>
<tr valign="middle">
<td> </td>
<td class="h">{$order.region}</td>
</tr>
<tr valign="middle">
<td> </td>
<td class="h">{$order.address}</td>
</tr>
<tr valign="middle">
<td> </td>
<td class="h"> </td>
</tr>
<tr valign="middle">
<td> </td>
<td class="h">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td style="width:1.7cm;"> </td>
<td style="width:1.5cm; height:0.8cm;"> </td>
<td style="width:1.7cm;"> </td>
<td style="width:3.5cm; height:0.8cm;">{$order.tel}</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
<table style="width:18.8cm; height:6.5cm;" border="0" cellspacing="0" cellpadding="0">
<tr>
<td valign="top" style="width:7.4cm;">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td colspan="2" style="height:0.5cm;"></td>
</tr>
<tr>
<td rowspan="2" style="width:4.9cm;"> </td>
<td style="height:0.8cm;">
<table width="100%" border="0" cellspacing="0" cellpadding="0" style="height:0.8cm;">
<tr>
<td style="width:1cm;"> </td>
<td> </td>
</tr>
</table>
</td>
</tr>
<tr>
<td style="height:1.3cm;">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td style="height:0.7cm;"> </td>
</tr>
<tr>
<td> </td>
</tr>
</table>
</td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0" style="height:1.5cm">
<tr>
<td> </td>
</tr>
</table>
</td>
<td valign="top" style="width:11.4cm;"> </td>
</tr>
</table>';
?> | zzshop | trunk/languages/zh_tw/shipping/sf_express.php | PHP | asf20 | 4,982 |
<?php
/**
* ECSHOP 郵局平郵插件的語言文件
* ============================================================================
* 版權所有 2005-2010 上海商派網絡科技有限公司,並保留所有權利。
* 網站地址: http://www.ecshop.com;
* ----------------------------------------------------------------------------
* 這不是一個自由軟件!您只能在不用於商業目的的前提下對程序代碼進行修改和
* 使用;不允許對程序代碼以任何形式任何目的的再發佈。
* ============================================================================
* $Author: liuhui $
* $Id: post_mail.php 17063 2010-03-25 06:35:46Z liuhui $
*/
$_LANG['post_mail'] = '郵局平郵';
$_LANG['post_mail_desc'] = '郵局平郵的描述內容。';
$_LANG['pack_fee'] = '包裝費用:';
$_LANG['base_fee'] = '1000克以內費用:';
$_LANG['item_fee'] = '單件商品費用:';
$_LANG['step_fee'] = '5000克以內續重每1000克費用:';
$_LANG['step_fee1'] = '5001克以上續重1000克費用:';
?> | zzshop | trunk/languages/zh_tw/shipping/post_mail.php | PHP | asf20 | 1,139 |
<?php
/**
* ECSHOP 固定運費插件的語言文件
* ============================================================================
* 版權所有 2005-2010 上海商派網絡科技有限公司,並保留所有權利。
* 網站地址: http://www.ecshop.com;
* ----------------------------------------------------------------------------
* 這不是一個自由軟件!您只能在不用於商業目的的前提下對程序代碼進行修改和
* 使用;不允許對程序代碼以任何形式任何目的的再發佈。
* ============================================================================
* $Author: liuhui $
* $Id: flat.php 17063 2010-03-25 06:35:46Z liuhui $
*/
$_LANG['flat'] = '市內快遞';
$_LANG['flat_desc'] = '固定運費的配送方式內容';
$_LANG['base_fee'] = '基本費用:';
$_LANG['item_fee'] = '單件商品費用:';
?> | zzshop | trunk/languages/zh_tw/shipping/flat.php | PHP | asf20 | 915 |
<?php
/**
* ECSHOP 用戶中心語言項
* ============================================================================
* 版權所有 2005-2010 上海商派網絡科技有限公司,並保留所有權利。
* 網站地址: http://www.ecshop.com;
* ----------------------------------------------------------------------------
* 這不是一個自由軟件!您只能在不用於商業目的的前提下對程序代碼進行修改和
* 使用;不允許對程序代碼以任何形式任何目的的再發佈。
* ============================================================================
* $Author: liuhui $
* $Id: user.php 17063 2010-03-25 06:35:46Z liuhui $
*/
$_LANG['require_login'] = '非法入口。<br />必須登錄才能完成操作。';
$_LANG['no_records'] = '沒有記錄';
$_LANG['shot_message'] = "短消息";
/* 用戶菜單 */
$_LANG['label_welcome'] = '歡迎頁';
$_LANG['label_profile'] = '用戶信息';
$_LANG['label_order'] = '我的訂單';
$_LANG['label_address'] = '收貨地址';
$_LANG['label_message'] = '我的留言';
$_LANG['label_tag'] = '我的標籤';
$_LANG['label_collection'] = '我的收藏';
$_LANG['label_bonus'] = '我的紅包';
$_LANG['label_comment'] = '我的評論';
$_LANG['label_affiliate'] = '我的推薦';
$_LANG['label_group_buy'] = '我的團購';
$_LANG['label_booking'] = '缺貨登記';
$_LANG['label_user_surplus'] = '資金管理';
$_LANG['label_track_packages'] = '跟蹤包裹';
$_LANG['label_transform_points'] = '積分兌換';
$_LANG['label_logout'] = '退出';
/* 會員餘額(預付款) */
$_LANG['add_surplus_log'] = '查看帳戶明細';
$_LANG['view_application'] = '查看申請記錄';
$_LANG['surplus_pro_type'] = '類型';
$_LANG['repay_money'] = '提現金額';
$_LANG['money'] = '金額';
$_LANG['surplus_type_0'] = '充值';
$_LANG['surplus_type_1'] = '提現';
$_LANG['deposit_money'] = '充值金額';
$_LANG['process_notic'] = '會員備註';
$_LANG['admin_notic'] = '管理員備註';
$_LANG['submit_request'] = '提交申請';
$_LANG['process_time'] = '操作時間';
$_LANG['use_time'] = '使用時間';
$_LANG['is_paid'] = '狀態';
$_LANG['is_confirm'] = '已完成';
$_LANG['un_confirm'] = '未確認';
$_LANG['pay'] = '付款';
$_LANG['is_cancel'] = '取消';
$_LANG['account_inc'] = '增加';
$_LANG['account_dec'] = '減少';
$_LANG['change_desc'] = '備註';
$_LANG['surplus_amount'] = '您的充值金額為:';
$_LANG['payment_name'] = '您選擇的支付方式為:';
$_LANG['payment_fee'] = '支付手續費用為:';
$_LANG['payment_desc'] = '支付方式描述:';
$_LANG['current_surplus'] = '您當前的可用資金為:';
$_LANG['unit_yuan'] = '元';
$_LANG['for_free'] = '贈品免費';
$_LANG['surplus_amount_error'] = '您要申請提現的金額超過了您現有的餘額,此操作將不可進行!';
$_LANG['surplus_appl_submit'] = '您的提現申請已成功提交,請等待管理員的審核!';
$_LANG['process_false'] = '此次操作失敗,請返回重試!';
$_LANG['confirm_remove_account'] = '您確定要刪除此條記錄嗎?';
$_LANG['back_page_up'] = '返回上一頁';
$_LANG['back_account_log'] = '返回帳戶明細列表';
$_LANG['amount_gt_zero'] = '請在「金額」欄輸入大於0的數字';
$_LANG['select_payment_pls'] = '請選擇支付方式';
//JS語言項
$_LANG['account_js']['surplus_amount_empty'] = '請輸入您要操作的金額數量!';
$_LANG['account_js']['surplus_amount_error'] = '您輸入的金額數量格式不正確!';
$_LANG['account_js']['process_desc'] = '請輸入您此次操作的備註信息!';
$_LANG['account_js']['payment_empty'] = '請選擇支付方式!';
/* 缺貨登記 */
$_LANG['oos_booking'] = '缺貨登記';
$_LANG['booking_goods_name'] = '訂購商品名';
$_LANG['booking_amount'] = '訂購數量';
$_LANG['booking_time'] = '登記時間';
$_LANG['process_desc'] = '處理備註';
$_LANG['describe'] = '訂購描述';
$_LANG['contact_username'] = '聯繫人';
$_LANG['contact_phone'] = '聯繫電話';
$_LANG['submit_booking_goods'] = '提交缺貨登記';
$_LANG['booking_success'] = '您的商品訂購已經成功提交!';
$_LANG['booking_rec_exist'] = '此商品您已經進行過缺貨登記了!';
$_LANG['back_booking_list'] = '返回缺貨登記列表';
$_LANG['not_dispose'] = '未處理';
$_LANG['no_goods_id'] = '請指定商品ID';
//JS語言項
$_LANG['booking_js']['booking_amount_empty'] = '請輸入您要訂購的商品數量!';
$_LANG['booking_js']['booking_amount_error'] = '您輸入的訂購數量格式不正確!';
$_LANG['booking_js']['describe_empty'] = '請輸入您的訂購描述信息!';
$_LANG['booking_js']['contact_username_empty'] = '請輸入聯繫人姓名!';
$_LANG['booking_js']['email_empty'] = '請輸入聯繫人的電子郵件地址!';
$_LANG['booking_js']['email_error'] = '您輸入的電子郵件地址格式不正確!';
$_LANG['booking_js']['contact_phone_empty'] = '請輸入聯繫人的電話!';
/* 個人資料 */
$_LANG['confirm_submit'] = ' 確 定 ';
$_LANG['member_rank'] = '會員等級';
$_LANG['member_discount'] = '會員折扣';
$_LANG['rank_integral'] = '等級積分';
$_LANG['consume_integral'] = '消費積分';
$_LANG['account_balance'] = '賬戶餘額';
$_LANG['user_bonus'] = '用戶紅包';
$_LANG['user_bonus_info'] = '共計 %d 個,價值 %s';
$_LANG['not_bonus'] = '沒有紅包';
$_LANG['add_user_bonus'] = '添加一個紅包';
$_LANG['bonus_number'] = '紅包序列號';
$_LANG['old_password'] = '原密碼';
$_LANG['new_password'] = '新密碼';
$_LANG['confirm_password'] = '確認密碼';
$_LANG['bonus_sn_exist'] = '此紅包號碼已經被佔用了!';
$_LANG['bonus_sn_not_exist'] = '此紅包號碼不存在!';
$_LANG['add_bonus_sucess'] = '添加新的紅包操作成功!';
$_LANG['add_bonus_false'] = '添加新的紅包操作失敗!';
$_LANG['not_login'] = '用戶未登錄。無法完成操作';
$_LANG['profile_lnk'] = '查看我的個人資料';
$_LANG['edit_email_failed'] = '編輯電子郵件地址失敗!';
$_LANG['edit_profile_success'] = '您的個人資料已經成功修改!';
$_LANG['edit_profile_failed'] = '修改個人資料操作失敗!';
$_LANG['oldpassword_error'] = '您輸入的舊密碼有誤!請確認再後輸入!';
//JS語言項
$_LANG['profile_js']['bonus_sn_empty'] = '請輸入您要添加的紅包號碼!';
$_LANG['profile_js']['bonus_sn_error'] = '您輸入的紅包號碼格式不正確!';
$_LANG['profile_js']['email_empty'] = '請輸入您的電子郵件地址!';
$_LANG['profile_js']['email_error'] = '您輸入的電子郵件地址格式不正確!';
$_LANG['profile_js']['old_password_empty'] = '請輸入您的原密碼!';
$_LANG['profile_js']['new_password_empty'] = '請輸入您的新密碼!';
$_LANG['profile_js']['confirm_password_empty'] = '請輸入您的確認密碼!';
$_LANG['profile_js']['both_password_error'] = '您現兩次輸入的密碼不一致!';
$_LANG['profile_js']['msg_blank'] = '不能為空';
$_LANG['profile_js']['no_select_question'] = '- 您沒有完成密碼提示問題的操作';
/* 支付方式 */
$_LANG['pay_name'] = '名稱';
$_LANG['pay_desc'] = '描述';
$_LANG['pay_fee'] = '手續費';
/* 收貨地址 */
$_LANG['consignee_name'] = '收貨人姓名';
$_LANG['country_province'] = '配送區域';
$_LANG['please_select'] = '請選擇';
$_LANG['city_district'] = '城市/地區';
$_LANG['email_address'] = '電子郵件地址';
$_LANG['detailed_address'] = '詳細地址';
$_LANG['postalcode'] = '郵政編碼';
$_LANG['phone'] = '電話';
$_LANG['mobile'] = '手機';
$_LANG['backup_phone'] = '手機';
$_LANG['sign_building'] = '標誌建築';
$_LANG['deliver_goods_time'] = '最佳送貨時間';
$_LANG['default'] = '默認';
$_LANG['default_address'] = '默認地址';
$_LANG['yes'] = '是';
$_LANG['no'] = '否';
$_LANG['country'] = '國家';
$_LANG['province'] = '省份';
$_LANG['city'] = '城市';
$_LANG['area'] = '所在區域';
$_LANG['search_ship'] = '查看支持的配送方式';
$_LANG['del_address_false'] = '刪除收貨地址失敗!';
$_LANG['add_address_success'] = '添加新地址成功!';
$_LANG['edit_address_success'] = '您的收貨地址信息已成功更新!';
$_LANG['address_list_lnk'] = '返回地址列表';
$_LANG['add_address'] = '新增收貨地址';
$_LANG['confirm_edit'] = '確認修改';
$_LANG['confirm_drop_address'] = '你確認要刪除該收貨地址嗎?';
/* 會員密碼找回 */
$_LANG['username_and_email'] = '請輸入您註冊的用戶名和註冊時填寫的電子郵件地址。';
$_LANG['enter_new_password'] = '請輸入您的新密碼';
$_LANG['username_no_email'] = '您填寫的用戶名與電子郵件地址不匹配,請重新輸入!';
$_LANG['fail_send_password'] = '發送郵件出錯,請與管理員聯繫!';
$_LANG['send_success'] = '重置密碼的郵件已經發到您的郵箱:';
$_LANG['parm_error'] = '參數錯誤,請返回!';
$_LANG['edit_password_failure'] = '您輸入的原密碼不正確!';
$_LANG['edit_password_success'] = '您的新密碼已設置成功!';
$_LANG['username_not_match_email'] = '用戶名與電子郵件地址不匹配,請重新輸入!';
$_LANG['get_question_username'] = '请输入您注册的用户名以取得您的密碼提示問題。';
$_LANG['no_passwd_question'] = '您沒有設置密碼提示問題,無法通過這種方式找回密碼。';
$_LANG['input_answer'] = '請根據您註冊時設置的密碼問題輸入設置的答案';
$_LANG['wrong_passwd_answer'] = '您輸入的密碼答案是錯誤的';
//JS語言項
$_LANG['password_js']['user_name_empty'] = '請輸入您的用戶名!';
$_LANG['password_js']['email_address_empty'] = '請輸入您的電子郵件地址!';
$_LANG['password_js']['email_address_error'] = '您輸入的電子郵件地址格式不正確!';
$_LANG['password_js']['new_password_empty'] = '請輸入您的新密碼!';
$_LANG['password_js']['confirm_password_empty'] = '請輸入您的確認密碼!';
$_LANG['password_js']['both_password_error'] = '您兩次輸入的密碼不一致!';
/* 會員留言 */
$_LANG['message_title'] = '主題';
$_LANG['message_time'] = '留言時間';
$_LANG['reply_time'] = '回復時間';
$_LANG['shopman_reply'] = '店主回復';
$_LANG['send_message'] = '發表留言';
$_LANG['message_type'] = '留言類型';
$_LANG['message_content'] = '留言內容';
$_LANG['submit_message'] = '提交留言';
$_LANG['upload_img'] = '上傳文件';
$_LANG['img_name'] = '圖片名稱';
/* 留言類型 */
$_LANG['type'][M_MESSAGE] = '留言';
$_LANG['type'][M_COMPLAINT] = '投訴';
$_LANG['type'][M_ENQUIRY] = '詢問';
$_LANG['type'][M_CUSTOME] = '售後';
$_LANG['type'][M_BUY] = '求購';
$_LANG['type'][M_BUSINESS] = '商家留言';
$_LANG['add_message_success'] = '發表留言成功';
$_LANG['message_list_lnk'] = '返回留言列表';
$_LANG['msg_title_empty'] = '留言標題為空';
$_LANG['upload_file_limit'] = '文件大小超過了限制 %dKB';
$_LANG['img_type_tips'] = '<font color="red">小提示:</font>';
$_LANG['img_type_list'] = '您可以上傳以下格式的文件:<br />gif、jpg、png、word、excel、txt、zip、ppt、pdf';
$_LANG['view_upload_file'] = '查看上傳的文件';
$_LANG['upload_file_type'] = '您上傳的文件類型不正確,請重新上傳!';
$_LANG['upload_file_error'] = '文件上傳出現錯誤,請重新上傳!';
$_LANG['message_empty'] = '您現在還沒有留言!';
$_LANG['msg_success'] = '您的留言已成功提交!';
$_LANG['confirm_remove_msg'] = '你確實要徹底刪除這條留言嗎?';
/* 會員紅包 */
$_LANG['bonus_is_used'] = '你輸入的紅包你已經領取過了!';
$_LANG['bonus_is_used_by_other'] = '你輸入的紅包已經被其他人領取!';
$_LANG['bonus_add_success'] = '您已經成功的添加了一個新的紅包!';
$_LANG['bonus_not_exist'] = '你輸入的紅包不存在';
$_LANG['user_bonus_empty'] = '您現在還沒有紅包';
$_LANG['add_bonus_sucess'] = '添加新的紅包操作成功!';
$_LANG['add_bonus_false'] = '添加新的紅包操作失敗!';
$_LANG['bonus_add_expire'] = '該紅包已經過期!';
$_LANG['bonus_use_expire'] = '該紅包已經過了使用期!';
/* 會員訂單 */
$_LANG['order_list_lnk'] = '我的訂單列表';
$_LANG['order_number'] = '訂單編號';
$_LANG['order_addtime'] = '下單時間';
$_LANG['order_money'] = '訂單總金額';
$_LANG['order_status'] = '訂單狀態';
$_LANG['first_order'] = '主訂單';
$_LANG['second_order'] = '從訂單';
$_LANG['merge_order'] = '合併訂單';
$_LANG['no_priv'] = '你沒有權限操作他人訂單';
$_LANG['buyer_cancel'] = '用戶取消';
$_LANG['cancel'] = '取消訂單';
$_LANG['pay_money'] = '付款';
$_LANG['view_order'] = '查看訂單';
$_LANG['received'] = '確認收貨';
$_LANG['ss_received'] = '已完成';
$_LANG['confirm_cancel'] = '您確認要取消該訂單嗎?取消後此訂單將視為無效訂單';
$_LANG['merge_ok'] = '訂單合併成功!';
$_LANG['merge_invalid_order'] = '對不起,您選擇合併的訂單不允許進行合併的操作。';
$_LANG['select'] = '請選擇...';
$_LANG['order_not_pay'] = "你的訂單狀態為 %s ,不需要付款";
$_LANG['order_sn_empty'] = '合併主訂單號不能為空';
$_LANG['merge_order_notice'] = '訂單合併是在發貨前將相同狀態的訂單合併成一新的訂單。<br />收貨地址,送貨方式等以主定單為準。';
$_LANG['order_exist'] = '該訂單不存在!';
$_LANG['order_is_group_buy'] = '[團購]';
$_LANG['gb_deposit'] = '(保證金)';
$_LANG['order_is_exchange'] = '[積分商城]';
$_LANG['notice_gb_order_amount'] = '(備註:團購如果有保證金,第一次只需支付保證金和相應的支付費用)';
$_LANG['business_message'] = '發送/查看商家留言';
$_LANG['pay_order_by_surplus'] = '追加使用餘額支付訂單:%s';
$_LANG['return_surplus_on_cancel'] = '取消訂單 %s,退回支付訂單時使用的預付款';
$_LANG['return_integral_on_cancel'] = '取消訂單 %s,退回支付訂單時使用的積分';
/* 訂單狀態 */
$_LANG['os'][OS_UNCONFIRMED] = '未確認';
$_LANG['os'][OS_CONFIRMED] = '已確認';
$_LANG['os'][OS_SPLITED] = '已確認';
$_LANG['os'][OS_SPLITING_PART] = '已確認';
$_LANG['os'][OS_CANCELED] = '已取消';
$_LANG['os'][OS_INVALID] = '無效';
$_LANG['os'][OS_RETURNED] = '退貨';
$_LANG['ss'][SS_UNSHIPPED] = '未發貨';
$_LANG['ss'][SS_PREPARING] = '配貨中';
$_LANG['ss'][SS_SHIPPED] = '已發貨';
$_LANG['ss'][SS_RECEIVED] = '收貨確認';
$_LANG['ss'][SS_SHIPPED_PART] = '已發貨(部分商品)';
$_LANG['ss'][SS_SHIPPED_ING] = '配貨中'; // 已分單
$_LANG['ps'][PS_UNPAYED] = '未付款';
$_LANG['ps'][PS_PAYING] = '付款中';
$_LANG['ps'][PS_PAYED] = '已付款';
$_LANG['shipping_not_need'] = '無需使用配送方式';
$_LANG['current_os_not_unconfirmed'] = '當前訂單狀態不是「未確認」。';
$_LANG['current_os_already_confirmed'] = '當前訂單已經被確認,無法取消,請與店主聯繫。';
$_LANG['current_ss_not_cancel'] = '只有在未發貨狀態下才能取消,你可以與店主聯繫。';
$_LANG['current_ps_not_cancel'] = '只有未付款狀態才能取消,要取消請聯繫店主。';
$_LANG['confirm_received'] = '你確認已經收到貨物了嗎?';
/* 合併訂單及訂單詳情 */
$_LANG['merge_order_success'] = '合併的訂單的操作已成功!';
$_LANG['merge_order_failed'] = '合併的訂單的操作失敗!請返回重試!';
$_LANG['order_sn_not_null'] = '請填寫要合併的訂單號';
$_LANG['two_order_sn_same'] = '要合併的兩個訂單號不能相同';
$_LANG['order_not_exist'] = "訂單 %s 不存在";
$_LANG['os_not_unconfirmed_or_confirmed'] = " %s 的訂單狀態不是「未確認」或「已確認」";
$_LANG['ps_not_unpayed'] = "訂單 %s 的付款狀態不是「未付款」";
$_LANG['ss_not_unshipped'] = "訂單 %s 的發貨狀態不是「未發貨」";
$_LANG['order_user_not_same'] = '要合併的兩個訂單不是同一個用戶下的';
$_LANG['from_order_sn'] = '第一個訂單號:';
$_LANG['to_order_sn'] = '第二個訂單號:';
$_LANG['merge'] = '合併';
$_LANG['notice_order_sn'] = '當兩個訂單不一致時,合併後的訂單信息(如:支付方式、配送方式、包裝、賀卡、紅包等)以第二個為準。';
$_LANG['subtotal'] = '小計';
$_LANG['goods_price'] = '商品價格';
$_LANG['goods_attr'] = '屬性';
$_LANG['use_balance'] = '使用餘額';
$_LANG['order_postscript'] = '訂單附言';
$_LANG['order_number'] = '訂單號';
$_LANG['consignment'] = '發貨單';
$_LANG['shopping_money'] = '商品總價';
$_LANG['invalid_order_id'] = '訂單號錯誤';
$_LANG['shipping'] = '配送方式';
$_LANG['payment'] = '支付方式';
$_LANG['use_pack'] = '使用包裝';
$_LANG['use_card'] = '使用賀卡';
$_LANG['order_total_fee'] = '訂單總金額';
$_LANG['order_money_paid'] = '已付款金額';
$_LANG['order_amount'] = '應付款金額';
$_LANG['accessories'] = '配件';
$_LANG['largess'] = '贈品';
$_LANG['use_more_surplus'] = '追加使用餘額';
$_LANG['max_surplus'] = '(您的帳戶餘額:%s)';
$_LANG['button_submit'] = '確定';
$_LANG['order_detail'] = '訂單詳情';
$_LANG['error_surplus_invalid'] = '您輸入的數字不正確!';
$_LANG['error_order_is_paid'] = '該訂單不需要付款!';
$_LANG['error_surplus_not_enough'] = '您的帳戶餘額不足!';
/* 訂單狀態 */
$_LANG['detail_order_sn'] = '訂單號';
$_LANG['detail_order_status'] = '訂單狀態';
$_LANG['detail_pay_status'] = '付款狀態';
$_LANG['detail_shipping_status'] = '配送狀態';
$_LANG['detail_order_sn'] = '訂單號';
$_LANG['detail_to_buyer'] = '賣家留言';
$_LANG['confirm_time'] = '確認於 %s';
$_LANG['pay_time'] = '付款於 %s';
$_LANG['shipping_time'] = '發貨於 %s';
$_LANG['select_payment'] = '所選支付方式';
$_LANG['order_amount'] = '應付款金額';
$_LANG['update_address'] = '更新收貨人信息';
$_LANG['virtual_card_info'] = '虛擬卡信息';
/* 取回密碼 */
$_LANG['back_home_lnk'] = '返回首頁';
$_LANG['get_password_lnk'] = '返回獲取密碼頁面';
$_LANG['get_password_by_question'] = '密碼問題找回密碼';
$_LANG['get_password_by_mail'] = '註冊郵件找回密碼';
$_LANG['back_retry_answer'] = '返回重試';
/* 登錄 註冊 */
$_LANG['label_username'] = '用戶名';
$_LANG['label_email'] = 'email';
$_LANG['label_password'] = '密碼';
$_LANG['label_confirm_password'] = '確認密碼';
$_LANG['label_password_intensity'] = '密碼強度';
$_LANG['want_login'] = '我已有賬號,我要登錄';
$_LANG['other_msn'] = 'MSN';
$_LANG['other_qq'] = 'QQ';
$_LANG['other_office_phone'] = '辦公電話';
$_LANG['other_home_phone'] = '家庭電話';
$_LANG['other_mobile_phone'] = '手機';
$_LANG['remember'] = '請保存我這次的登錄信息。';
$_LANG['msg_un_blank'] = '用戶名不能為空';
$_LANG['msg_un_length'] = '用戶名最長不得超過7個漢字';
$_LANG['msg_un_format'] = '用戶名含有非法字符';
$_LANG['msg_un_registered'] = '用戶名已經存在,請重新輸入';
$_LANG['msg_can_rg'] = '可以註冊';
$_LANG['msg_email_blank'] = '郵件地址不能為空';
$_LANG['msg_email_registered'] = '郵箱已存在,請重新輸入';
$_LANG['msg_email_format'] = '郵件地址不合法';
$_LANG['login_success'] = '登錄成功';
$_LANG['confirm_login'] = '確認登錄';
$_LANG['profile_lnk'] = '查看我的個人信息';
$_LANG['login_failure'] = '用戶名或密碼錯誤';
$_LANG['relogin_lnk'] = '重新登錄';
$_LANG['sex'] = '性 別';
$_LANG['male'] = '男';
$_LANG['female'] = '女';
$_LANG['secrecy'] = '保密';
$_LANG['birthday'] = '出生日期';
$_LANG['logout'] = '您已經成功的退出了。';
$_LANG['username_empty'] = '用戶名為空';
$_LANG['username_invalid'] = '用戶名 %s 含有敏感字符';
$_LANG['username_exist'] = '用戶名 %s 已經存在';
$_LANG['username_not_allow'] = '用戶名 %s 不允許註冊';
$_LANG['confirm_register'] = '確認註冊';
$_LANG['agreement'] = "我已看過並接受《<a href=\"article.php?cat_id=-1\" style=\"color:blue\" target=\"_blank\">用戶協議</a>》";
$_LANG['email_empty'] = 'email為空';
$_LANG['email_invalid'] = '%s 不是合法的email地址';
$_LANG['email_exist'] = '%s 已經存在';
$_LANG['email_not_allow'] = 'Email %s 不允許註冊';
$_LANG['register'] = '註冊新用戶名';
$_LANG['register_success'] = '用戶名 %s 註冊成功';
$_LANG['passwd_question'] = '密碼提示問題';
$_LANG['sel_question'] = '請選擇提示問題';
$_LANG['passwd_answer'] = '密碼問題答案';
$_LANG['passwd_balnk'] = '密碼中不能包含空格';
/* 用戶中心默認頁面 */
$_LANG['welcome_to'] = '歡迎您回到';
$_LANG['last_time'] = '您的上一次登錄時間';
$_LANG['your_account'] = '您的賬戶';
$_LANG['your_notice'] = '用戶提醒';
$_LANG['your_surplus'] = '餘額';
$_LANG['credit_line'] = '信用額度';
$_LANG['your_bonus'] = '紅包';
$_LANG['your_message'] = '留言';
$_LANG['your_order'] = '訂單';
$_LANG['your_integral'] = '積分';
$_LANG['your_level'] = '您的等級是 %s ';
$_LANG['next_level'] = ',您還差 %s 積分達到 %s ';
$_LANG['attention'] = '關注';
$_LANG['no_attention'] = '取消關注';
$_LANG['del_attention'] = '確認取消此商品的關注麼?';
$_LANG['add_to_attention'] = '確定將此商品加入關注列表麼?';
$_LANG['label_need_image'] = '是否顯示商品圖片:';
$_LANG['need'] = '顯示';
$_LANG['need_not'] = '不顯示';
$_LANG['horizontal'] = '橫排';
$_LANG['verticle'] = '豎排';
$_LANG['generate'] = '生成代碼';
$_LANG['label_goods_num'] = '顯示商品數量:';
$_LANG['label_arrange'] = '選擇商品排列方式:';
$_LANG['label_rows_num'] = '排列顯示條目數:';
$_LANG['label_charset'] = '選擇編碼:';
$_LANG['charset']['utf8'] = '國際化編碼(utf8)';
$_LANG['charset']['zh_cn'] = '簡體中文';
$_LANG['charset']['zh_tw'] = '繁體中文';
$_LANG['goods_num_must_be_int'] = '商品數量應該是整數';
$_LANG['goods_num_must_over_0'] = '商品數量應該大於0';
$_LANG['rows_num_must_be_int'] = '排列顯示條目數應該是整數';
$_LANG['rows_num_must_over_0'] = '排列顯示條目數應該大於0';
$_LANG['last_month_order'] = '您最近30天內提交了';
$_LANG['order_unit'] = '個訂單';
$_LANG['please_received'] = '以下訂單已發貨,請注意查收';
$_LANG['your_auction'] = '您竟拍到了<strong>%s</strong> ,現在去 <a href="auction.php?act=view&id=%s"><span style="color:#06c;text-decoration:underline;">購買</span></a>';
$_LANG['your_snatch'] = '您奪寶奇兵竟拍到了<strong>%s</strong> ,現在去 <a href="snatch.php?act=main&id=%s"><span style="color:#06c;text-decoration:underline;">購買</span></a>';
/* 我的標籤 */
$_LANG['no_tag'] = '暫時沒有標籤';
$_LANG['confirm_drop_tag'] = '您確認要刪除此標籤嗎?';
/* user_passport.dwt js語言文件 */
$_LANG['passport_js']['username_empty'] = '- 用戶名不能為空。';
$_LANG['passport_js']['username_shorter'] = '- 用戶名長度不能少於 3 個字符。';
$_LANG['passport_js']['username_invalid'] = '- 用戶名只能是由字母數字以及下劃線組成。';
$_LANG['passport_js']['password_empty'] = '- 登錄密碼不能為空。';
$_LANG['passport_js']['password_shorter'] = '- 登錄密碼不能少於 6 個字符。';
$_LANG['passport_js']['confirm_password_invalid'] = '- 兩次輸入密碼不一致';
$_LANG['passport_js']['email_empty'] = '- Email 為空';
$_LANG['passport_js']['email_invalid'] = '- Email 不是合法的地址';
$_LANG['passport_js']['agreement'] = '- 您沒有接受協議';
$_LANG['passport_js']['msn_invalid'] = '- msn地址不是一個有效的郵件地址';
$_LANG['passport_js']['qq_invalid'] = '- QQ號碼不是一個有效的號碼';
$_LANG['passport_js']['home_phone_invalid'] = '- 家庭電話不是一個有效號碼';
$_LANG['passport_js']['office_phone_invalid'] = '- 辦公電話不是一個有效號碼';
$_LANG['passport_js']['mobile_phone_invalid'] = '- 手機號碼不是一個有效號碼';
$_LANG['passport_js']['msg_un_blank'] = '* 用戶名不能為空';
$_LANG['passport_js']['msg_un_length'] = '* 用戶名最長不得超過7個漢字';
$_LANG['passport_js']['msg_un_format'] = '* 用戶名含有非法字符';
$_LANG['passport_js']['msg_un_registered'] = '* 用戶名已經存在,請重新輸入';
$_LANG['passport_js']['msg_can_rg'] = '* 可以註冊';
$_LANG['passport_js']['msg_email_blank'] = '* 郵件地址不能為空';
$_LANG['passport_js']['msg_email_registered'] = '* 郵箱已存在,請重新輸入';
$_LANG['passport_js']['msg_email_format'] = '* 郵件地址不合法';
$_LANG['passport_js']['msg_blank'] = '不能為空';
$_LANG['passport_js']['no_select_question'] = '- 您還完成密碼提示問題的操作';
$_LANG['passport_js']['passwd_balnk'] = '- 密碼中不能包含空格';
/* user_clips.dwt js 語言文件 */
$_LANG['clips_js']['msg_title_empty'] = '留言標題為空';
$_LANG['clips_js']['msg_content_empty'] = '留言內容為空';
$_LANG['clips_js']['msg_title_limit'] = '留言標題不能超過200個字';
/* 合併訂單js */
$_LANG['merge_order_js']['from_order_empty'] = '請選擇要合併的從訂單';
$_LANG['merge_order_js']['to_order_empty'] = '請選擇要合併的主訂單';
$_LANG['merge_order_js']['order_same'] = '主訂單和從訂單相同,請重新選擇';
$_LANG['merge_order_js']['confirm_merge'] = '您確實要合併這兩個訂單嗎?';
/* 將用戶訂單中商品加入購物車 */
$_LANG['order_id_empty'] = '未指定訂單號';
$_LANG['return_to_cart_success'] = '訂單中商品已經成功加入購物車中';
/* 保存用戶訂單收貨地址 */
$_LANG['consigness_empty'] = '收貨人姓名為空';
$_LANG['address_empty'] = '收貨地址詳情為空';
$_LANG['require_unconfirmed'] = '該訂單狀態下不能再修改地址';
/* 紅包詳情 */
$_LANG['bonus_sn'] = '紅包序號';
$_LANG['bonus_name'] = '紅包名稱';
$_LANG['bonus_amount'] = '紅包金額';
$_LANG['min_goods_amount'] = '最小訂單金額';
$_LANG['bonus_end_date'] = '截至使用日期';
$_LANG['bonus_status'] = '紅包狀態';
$_LANG['not_start'] = '未開始';
$_LANG['overdue'] = '已過期';
$_LANG['not_use'] = '未使用';
$_LANG['had_use'] = '已使用';
/* 用戶推薦 */
$_LANG['affiliate_mode'] = '分成模式';
$_LANG['affiliate_detail'] = '分成明細';
$_LANG['affiliate_member'] = '我推薦的會員';
$_LANG['affiliate_code'] = '推薦代碼';
$_LANG['firefox_copy_alert'] = "您的firefox安全限制限制您進行剪貼板操作,請打開』about:config』將signed.applets.codebase_principal_support』設置為true』之後重試";
$_LANG['affiliate_type'][0] = '推薦註冊分成';
$_LANG['affiliate_type'][1] = '推薦訂單分成';
$_LANG['affiliate_type'][-1] = '推薦註冊分成';
$_LANG['affiliate_type'][-2] = '推薦訂單分成';
$_LANG['affiliate_codetype'] = '格式';
$_LANG['affiliate_introduction'] = '分成模式介紹';
$_LANG['affiliate_intro'][0] = ' 本網店為鼓勵推薦新用戶註冊,現開展<b>推薦註冊分成</b>活動,活動流程如下:
1、將本站提供給您的推薦代碼,發送到論壇、博客上。
2、訪問者點擊鏈接,訪問網店。
3、在訪問者點擊鏈接的 <b>%d%s</b> 內,若該訪問者在本站註冊,即認定該用戶是您推薦的,您將獲得等級積分 <b>%d</b> 的獎勵 (當您的等級積分超過 <b>%d</b> 時,不再獲得獎勵)。
4、該用戶今後在本站的一切消費,您均能獲得一定比例的提成。目前實行的提成總額為訂單金額的 <b>%s</b> 、積分的 <b>%s</b> ,分配給您、推薦您的人等,具體分配規則請參閱 <b><a href="#myrecommend">我推薦的會員</a></b>。
5、提成由管理員人工審核發放,請您耐心等待。
6、您可以通過分成明細來查看您的介紹、分成情況。';
$_LANG['affiliate_intro'][1] = ' 本網店為鼓勵推薦新用戶註冊,現開展<b>推薦訂單分成</b>活動,活動流程如下:
1、在瀏覽商品時,點擊推薦此商品,獲得推薦代碼,將其發送到論壇、博客上。
2、訪問者點擊鏈接,訪問網店。
3、在訪問者點擊鏈接的 <b>%d%s</b> 內,若該訪問者在本站有訂單,即認定該訂單是您推薦的。
4、您將獲得該訂單金額的 <b>%s</b> 、積分的 <b>%s</b>的獎勵。
5、提成由管理員人工審核發放,請您耐心等待。
6、您可以通過分成明細來查看您的介紹、分成情況。';
$_LANG['level_point_all'] = '積分分成總額百分比';
$_LANG['level_money_all'] = '現金分成總額百分比';
$_LANG['level_register_all'] = '註冊積分分成數';
$_LANG['level_register_up'] = '等級積分分成上限';
$_LANG['affiliate_stats'][0] = '等待處理';
$_LANG['affiliate_stats'][1] = '已分成';
$_LANG['affiliate_stats'][2] = '取消分成';
$_LANG['affiliate_stats'][3] = '已撤銷';
$_LANG['affiliate_stats'][4] = '等待買家付款';
$_LANG['level_point'] = '積分分成百分比';
$_LANG['level_money'] = '現金分成百分比';
$_LANG['affiliate_status'] = '分成狀態';
$_LANG['affiliate_point'] = '積分分成';
$_LANG['affiliate_money'] = '現金分成';
$_LANG['affiliate_expire'] = '有效時間';
$_LANG['affiliate_lever'] = '等級';
$_LANG['affiliate_num'] = '人數';
$_LANG['affiliate_view'] = '效果';
$_LANG['affiliate_code'] = '代碼';
$_LANG['register_affiliate'] = '推薦會員ID %s ( %s ) 註冊送積分';
$_LANG['register_points'] = '註冊送積分';
$_LANG['validate_ok'] = '%s 您好,您email %s 已通過驗證';
$_LANG['validate_fail'] = '驗證失敗,請確認你的驗證鏈接是否正確';
$_LANG['validate_mail_ok'] = '驗證郵件發送成功';
$_LANG['not_validated'] = '您還沒有通過郵件認證';
$_LANG['resend_hash_mail'] = '點此發送認證郵件';
$_LANG['query_status'] = '查詢狀態';
$_LANG['change_payment'] = '改用其他在線支付方式';
$_LANG['copy_to_clipboard'] = '已拷貝至剪貼板。';
$_LANG['expire_unit']['hour'] = '小時';
$_LANG['expire_unit']['day'] = '天';
$_LANG['expire_unit']['week'] = '周';
$_LANG['recommend_webcode'] = '網頁簽名代碼';
$_LANG['recommend_bbscode'] = '論壇簽名代碼';
$_LANG['im_code'] = '聊天分享';
$_LANG['code_copy'] = '複製代碼·';
$_LANG['show_good_to_you'] = '推薦給你一個好東西';
/* 積分兌換 */
$_LANG['transform_points'] = '積分兌換';
$_LANG['invalid_points'] = '你輸入的積分是不一個合法值';
$_LANG['invalid_input'] = '無效';
$_LANG['overflow_points'] = '您輸入的兌換積分超過您的實際積分';
$_LANG['to_pay_points'] = '恭喜您, 你%s論壇%s兌換了%s的商城消費積分';
$_LANG['to_rank_points'] = '恭喜您, 你%s論壇%s兌換了%s的商城等級積分';
$_LANG['from_pay_points'] = '恭喜您, 你%s的商城消費積分兌換%s論壇%s';
$_LANG['from_rank_points'] = '恭喜您, 你%s論壇%s兌換了%s的商城消費積分';
$_LANG['cur_points'] = '您的當前積分';
$_LANG['rule_list'] = '兌換規則';
$_LANG['transform'] = '兌換';
$_LANG['rate_is'] = '比例為';
$_LANG['rule'] = '兌換規則';
$_LANG['transform_num'] = '兌換數量';
$_LANG['transform_result'] = '兌換結果';
$_LANG['bbs'] = '論壇';
$_LANG['exchange_amount'] = '支出';
$_LANG['exchange_desamount'] = '收入';
$_LANG['exchange_ratio'] = '兌換比率';
$_LANG['exchange_points'][0] = '商城等級積分';
$_LANG['exchange_points'][1] = '商城消費積分';
$_LANG['exchange_action'] = '換';
$_LANG['exchange_js']['deny'] = '禁止兌換';
$_LANG['exchange_js']['balance'] = '您的{%s}餘額不足,請重新輸入';
$_LANG['exchange_deny'] = '該積分不允許兌換';
$_LANG['exchange_success'] = '恭喜您, 你用%s個%s兌換了%s個%s';
$_LANG['exchange_error_1'] = 'UCenter提交積分兌換時發生錯誤';
$_LANG['rank_points'] = '商城等級積分';
$_LANG['pay_points'] = '商城消費積分';
/* 密碼強度 */
$_LANG['pwd_lower'] = '弱';
$_LANG['pwd_middle'] = '中';
$_LANG['pwd_high'] = '強';
$_LANG['user_reg_info'][0] = '如果您不是會員,請註冊';
$_LANG['user_reg_info'][1] = '友情提示';
$_LANG['user_reg_info'][2] = '不註冊為會員也可在本店購買商品';
$_LANG['user_reg_info'][8] = '不註冊為會員也不可以在本店購買商品';
$_LANG['user_reg_info'][3] = '但註冊之後您可以';
$_LANG['user_reg_info'][4] = '保存您的個人資料';
$_LANG['user_reg_info'][5] = '收藏您關注的商品';
$_LANG['user_reg_info'][6] = '享受會員積分制度';
$_LANG['user_reg_info'][7] = '訂閱本店商品信息';
$_LANG['add_bonus'] = '添加紅包';
/* 密碼找回問題 */
$_LANG['passwd_questions']['friend_birthday'] = '我最好朋友的生日?';
$_LANG['passwd_questions']['old_address'] = '我兒時居住地的地址?';
$_LANG['passwd_questions']['motto'] = '我的座右銘是?';
$_LANG['passwd_questions']['favorite_movie'] = '我最喜歡的電影?';
$_LANG['passwd_questions']['favorite_song'] = '我最喜歡的歌曲?';
$_LANG['passwd_questions']['favorite_food'] = '我最喜歡的食物?';
$_LANG['passwd_questions']['interest'] = '我最大的愛好?';
$_LANG['passwd_questions']['favorite_novel'] = '我最喜歡的小說?';
$_LANG['passwd_questions']['favorite_equipe'] = '我最喜歡的運動隊?';
?>
| zzshop | trunk/languages/zh_tw/user.php | PHP | asf20 | 34,319 |
<?php
/**
* ECSHOP 前台語言文件
* ============================================================================
* 版權所有 2005-2010 上海商派網絡科技有限公司,並保留所有權利。
* 網站地址: http://www.ecshop.com;
* ----------------------------------------------------------------------------
* 這不是一個自由軟件!您只能在不用於商業目的的前提下對程序代碼進行修改和
* 使用;不允許對程序代碼以任何形式任何目的的再發佈。
* ============================================================================
* $Author: liuhui $
* $Id: common.php 17063 2010-03-25 06:35:46Z liuhui $
*/
/* 用戶登錄語言項 */
$_LANG['empty_username_password'] = '對不起,您必須完整填寫用戶名和密碼。';
$_LANG['shot_message'] = "短消息";
/* 公共語言項 */
$_LANG['sys_msg'] = '系統提示';
$_LANG['catalog'] = '目錄';
$_LANG['please_view_order_detail'] = '商品已發貨,詳情請到用戶中心訂單詳情查看';
$_LANG['user_center'] = '用戶中心';
$_LANG['shop_closed'] = '本店盤點中,請您稍後再來...';
$_LANG['shop_register_closed'] = '該網店暫停註冊';
$_LANG['shop_upgrade'] = "本店升級中,管理員從 <a href=\"admin/\">管理中心</a> 登錄後,系統會自動完成升級";
$_LANG['js_languages']['process_request'] = '正在處理您的請求...';
$_LANG['process_request'] = '正在處理您的請求...';
$_LANG['please_waiting'] = '請稍等, 正在載入中...';
$_LANG['icp_number'] = 'ICP備案證書號';
$_LANG['plugins_not_found'] = "插件 %s 無法定位";
$_LANG['home'] = '首頁';
$_LANG['back_up_page'] = '返回上一頁';
$_LANG['close_window'] = '關閉窗口';
$_LANG['back_home'] = '返回首頁';
$_LANG['ur_here'] = '當前位置:';
$_LANG['all_goods'] = '全部商品';
$_LANG['all_recommend'] = "全部推薦";
$_LANG['all_attribute'] = "全部";
$_LANG['promotion_goods'] = '促銷商品';
$_LANG['best_goods'] = '精品推薦';
$_LANG['new_goods'] = '新品上市';
$_LANG['hot_goods'] = '熱銷商品';
$_LANG['view_cart'] = '查看購物車';
$_LANG['catalog'] = '所有分類';
$_LANG['regist_login'] = '註冊/登錄';
$_LANG['profile'] = '個人資料';
$_LANG['query_info'] = "共執行 %d 個查詢,用時 %f 秒,在線 %d 人";
$_LANG['gzip_enabled'] = ',Gzip 已啟用';
$_LANG['gzip_disabled'] = ',Gzip 已禁用';
$_LANG['memory_info'] = ',佔用內存 %0.3f MB';
$_LANG['cart_info'] = '您的購物車中有 %d 件商品,總計金額 %s。';
$_LANG['shopping_and_other'] = '購買過此商品的人還購買過';
$_LANG['bought_notes'] = '購買記錄';
$_LANG['later_bought_amounts'] = '近期成交數量';
$_LANG['bought_time'] = '購買時間';
$_LANG['turnover'] = '成交';
$_LANG['no_notes'] = '還沒有人購買過此商品';
$_LANG['shop_price'] = '本店售價:';
$_LANG['market_price'] = '市場價格:';
$_LANG['goods_brief'] = '商品描述:';
$_LANG['goods_album'] = '商品相冊';
$_LANG['promote_price'] = "促銷價:";
$_LANG['fittings_price'] = '配件價格:';
$_LANG['collect'] = '加入收藏夾';
$_LANG['add_to_cart'] = '加入購物車';
$_LANG['return_to_cart'] = '放回購物車';
$_LANG['search_goods'] = '商品搜索';
$_LANG['search'] = '搜索';
$_LANG['wholesale_search'] = '搜索批發商品';
$_LANG['article_title'] = '文章標題';
$_LANG['article_author'] = '作者';
$_LANG['article_add_time'] = '添加日期';
$_LANG['relative_file'] = '[ 相關下載 ]';
$_LANG['category'] = '分類';
$_LANG['brand'] = '品牌';
$_LANG['price_min'] = '最小價格';
$_LANG['price_max'] = '最大價格';
$_LANG['goods_name'] = '商品名稱';
$_LANG['goods_attr'] = '商品屬性';
$_LANG['goods_price_ladder'] = '價格階梯';
$_LANG['ladder_price'] = '批發價格';
$_LANG['shop_prices'] = '本店價';
$_LANG['market_prices'] = '市場價';
$_LANG['deposit'] = '團購保證金';
$_LANG['amount'] = '商品總價';
$_LANG['number'] = '購買數量';
$_LANG['handle'] = '操作';
$_LANG['add'] = '添加';
$_LANG['edit'] = '編輯';
$_LANG['drop'] = '刪除';
$_LANG['view'] = '查看';
$_LANG['modify'] = '修改';
$_LANG['is_cancel'] = '取消';
$_LANG['amend_amount'] = '修改數量';
$_LANG['end'] = '結束';
$_LANG['require_field'] = '(必填)';
$_LANG['search_result'] = '搜索結果';
$_LANG['order_number'] = '訂單號';
$_LANG['consignment'] = '發貨單';
$_LANG['activities'] = '商品正在進行的活動';
$_LANG['remark_package'] = '超值禮包';
$_LANG['old_price'] = '原 價:';
$_LANG['package_price'] = '禮包價:';
$_LANG['then_old_price'] = '節 省:';
$_LANG['free_goods'] = '免運費商品';
$_LANG['searchkeywords_notice'] = '匹配多個關鍵字全部,可用 "空格" 或 "AND" 連接。如 win32 AND unix<br />匹配多個關鍵字其中部分,可用"+"或 "OR" 連接。如 win32 OR unix';
$_LANG['hidden_outstock'] = '隱藏已脫銷的商品';
$_LANG['keywords'] = '關鍵字';
$_LANG['sc_ds'] = '搜索簡介';
$_LANG['button_search'] = '立即搜索';
$_LANG['no_search_result'] = '無法搜索到您要找的商品!';
$_LANG['all_category'] = '所有分類';
$_LANG['all_brand'] = '所有品牌';
$_LANG['all_option'] = '請選擇';
$_LANG['extension'] = '擴展選項';
$_LANG['gram'] = '克';
$_LANG['kilogram'] = '千克';
$_LANG['goods_sn'] = '商品貨號:';
$_LANG['goods_brand'] = '商品品牌:';
$_LANG['goods_weight'] = '商品重量:';
$_LANG['goods_number'] = '商品庫存:';
$_LANG['goods_give_integral'] = '購買此商品贈送:';
$_LANG['goods_integral'] = '購買此商品可使用:';
$_LANG['goods_free_shipping'] = '此商品為免運費商品,計算配送金額時將不計入配送費用';
$_LANG['goods_bonus'] = '購買此商品可獲得紅包:';
$_LANG['goods_rank'] = '用戶評價:';
$_LANG['goods_compare'] = '商品比較';
$_LANG['properties'] = '商品屬性:';
$_LANG['brief'] = '簡要介紹:';
$_LANG['add_time'] = '上架時間:';
$_LANG['residual_time'] = '剩餘時間:';
$_LANG['day'] = '天';
$_LANG['hour'] = '小時';
$_LANG['minute'] = '分鐘';
$_LANG['compare'] = '比較';
$_LANG['volume_price'] = '購買數量達到以下區間時可享受以下優惠價格';
$_LANG['number_to'] = '購買數量達到';
$_LANG['article_list'] = '文章列表';
/* 商品比較JS語言項 */
$_LANG['compare_js']['button_compare'] = '比較選定商品';
$_LANG['compare_js']['exist'] = '您已經選擇了%s';
$_LANG['compare_js']['count_limit'] = '最多只能選擇4個商品進行對比';
$_LANG['compare_js']['goods_type_different'] = '\"%s\"和已選擇商品類型不同無法進行對比';
$_LANG['bonus'] = '優惠券:';
$_LANG['no_comments'] = '暫時還沒有任何用戶評論';
$_LANG['give_comments_rank'] = '給出';
$_LANG['comments_rank'] = '評價';
$_LANG['comment_num'] = "用戶評論 %d 條記錄";
$_LANG['login_please'] = '由於您還沒有登錄,因此您還不能使用該功能。';
$_LANG['collect_existed'] = '該商品已經存在於您的收藏夾中。';
$_LANG['collect_success'] = '該商品已經成功地加入了您的收藏夾。';
$_LANG['copyright'] = "© 2005-%s %s 版權所有,並保留所有權利。";
$_LANG['no_ads_id'] = '沒有指定廣告的ID以及跳轉的URL地址!';
$_LANG['remove_collection_confirm'] = '您確定要從收藏夾中刪除選定的商品嗎?';
$_LANG['err_change_attr'] = '沒有找到指定的商品或者沒有找到指定的商品屬性。';
$_LANG['collect_goods'] = '收藏商品';
$_LANG['plus'] = '加';
$_LANG['minus'] = '減';
$_LANG['yes'] = '是';
$_LANG['no'] = '否';
$_LANG['same_attrbiute_goods'] = '相同%s的商品';
/* TAG */
$_LANG['button_submit_tag'] = '添加我的標記';
$_LANG['tag_exists'] = '您已經為該商品添加過一個標記,請不要重複提交.';
$_LANG['tag_cloud'] = '標籤雲';
$_LANG['tag_anonymous'] = '對不起,只有註冊會員並且正常登錄以後才能提交標記。';
$_LANG['tag_cloud_desc'] = '標籤雲(Tag cloud)是用以表示一個網站中的內容標籤。 標籤(tag、關鍵詞)是一種更為靈活、有趣的商品分類方式,您可以為每個商品添加一個或多個標籤,那麼可以通過點擊這個標籤查看商品其他會員提交的與您的標籤一樣的商品,能夠讓您使用最快的方式查找某一個標籤的所有網店商品。比方說點擊「紅色」這個標籤,就可以打開這樣的一個頁面,顯示所有的以「紅色」 為標籤的網店商品';
/* AJAX 相關 */
$_LANG['invalid_captcha'] = '對不起,您輸入的驗證碼不正確。';
$_LANG['goods_exists'] = '對不起,您的購物車中已經存在相同的商品。';
$_LANG['fitting_goods_exists'] = '對不起,您的購物車中已經添加了該配件。';
$_LANG['invalid_number'] = '對不起,您輸入了一個非法的商品數量。';
$_LANG['not_on_sale'] = '對不起,該商品已經下架。';
$_LANG['no_basic_goods'] = '對不起,您希望將該商品做為配件購買,可是購物車中還沒有該商品的基本件。';
$_LANG['cannt_alone_sale'] = '對不起,該商品不能單獨銷售。';
$_LANG['shortage'] = "對不起,該商品已經庫存不足暫停銷售。\n你現在要進行缺貨登記來預訂該商品嗎?";
$_LANG['shortage_little'] = "該商品已經庫存不足。已將您的購貨數量修改為 %d。\n您現在要去購物車嗎?";
$_LANG['oos_tips'] = '該商品已經庫存不足。您現在要進行缺貨登記嗎?';
$_LANG['addto_cart_success_1'] = "該商品已添加到購物車,您現在還需要繼續購物嗎?\n如果您希望馬上結算,請點擊「確定」按鈕。\n如果您希望繼續購物,請點擊「取消」按鈕。";
$_LANG['addto_cart_success_2'] = "該商品已添加到購物車,您現在還需要繼續購物嗎?\n如果您希望繼續購物,請點擊「確定」按鈕。\n如果您希望馬上結算,請點擊「取消」按鈕。";
$_LANG['no_keywords'] = "請輸入搜索關鍵字!";
/* 分頁排序 */
$_LANG['exchange_sort']['goods_id'] = '按上架時間排序';
$_LANG['exchange_sort']['exchange_integral'] = '按積分排序';
$_LANG['exchange_sort']['last_update'] = '按更新时间排序';
$_LANG['sort']['goods_id'] = '按上架時間排序';
$_LANG['sort']['shop_price'] = '按價格排序';
$_LANG['sort']['last_update'] = '按更新时间排序';
$_LANG['order']['DESC'] = '倒序';
$_LANG['order']['ASC'] = '正序';
$_LANG['pager_1'] = '總計 ';
$_LANG['pager_2'] = ' 個記錄';
$_LANG['pager_3'] = ',共 ';
$_LANG['pager_4'] = ' 頁。';
$_LANG['page_first'] = '第一頁';
$_LANG['page_prev'] = '上一頁';
$_LANG['page_next'] = '下一頁';
$_LANG['page_last'] = '最末頁';
$_LANG['btn_display'] = '顯示方式';
/* 投票 */
$_LANG['vote_times'] = '參與人次';
$_LANG['vote_ip_same'] = '對不起,您已經投過票了!';
$_LANG['submit_vote'] = '投票';
$_LANG['submit_reset'] = '重選';
$_LANG['vote_success'] = '恭喜你,投票成功';
/* 評論 */
$_LANG['cmt_submit_done'] = '您的評論已成功發表, 感謝您的參與!';
$_LANG['cmt_submit_wait'] = "您的評論已成功發表, 請等待管理員的審核!";
$_LANG['cmt_lang']['cmt_empty_username'] = '請輸入您的用戶名稱';
$_LANG['cmt_lang']['cmt_empty_email'] = '請輸入您的電子郵件地址';
$_LANG['cmt_lang']['cmt_error_email'] = '電子郵件地址格式不正確';
$_LANG['cmt_lang']['cmt_empty_content'] = '您沒有輸入評論的內容';
$_LANG['cmt_spam_warning'] = '您至少在30秒後才可以繼續發表評論!';
$_LANG['cmt_lang']['captcha_not_null'] = '驗證碼不能為空!';
$_LANG['cmt_lang']['cmt_invalid_comments'] = '無效的評論內容!';
$_LANG['invalid_comments'] = '無效的評論內容!';
$_LANG['error_email'] = '電子郵件地址格式不正確!';
$_LANG['admin_username'] = "管理員:";
$_LANG['reply_comment'] = '回復';
$_LANG['comment_captcha'] = '驗證碼';
$_LANG['comment_login'] = '只有註冊會員才能發表評論,請您登錄後再發表評論';
$_LANG['comment_custom'] = '評論失敗。只有在本店購買過商品的註冊會員才能發表評論。';
$_LANG['comment_brought'] = '評論失敗。只有購買過此商品的註冊用戶才能評論該商品。';
$_LANG['anonymous'] = '匿名用戶';
/* 其他信息 */
$_LANG['js_languages']['goodsname_not_null'] = '商品名不能為空!';
/* 商品比較 */
$_LANG['compare_remove'] = '移除';
$_LANG['compare_no_goods'] = '您沒有選定任何需要比較的商品或者比較的商品數少於 2 個。';
$_LANG['no_user_name'] = '該用戶名不存在';
$_LANG['undifine_rank'] = '沒有定義會員等級';
$_LANG['not_login'] = '您還沒有登陸';
$_LANG['half_info'] = '信息不全,請填寫所有信息';
$_LANG['no_id'] = '沒有商品ID';
$_LANG['save_success'] = '修改成功';
$_LANG['drop_consignee_confirm'] = '您確定要刪除該收貨人信息嗎?';
/* 奪寶奇兵 */
$_LANG['snatch_js']['price_not_null'] = '價格不能為空';
$_LANG['snatch_js']['price_not_number'] = '價格只能是數字';
$_LANG['snatch_list'] = '奪寶奇兵列表';
$_LANG['not_in_range'] = '你只能在%d到%d之間出價';
$_LANG['also_bid'] = '你已經出過價格 %s 了';
$_LANG['lack_pay_points'] = '你積分不夠,不能出價';
$_LANG['snatch'] = '奪寶奇兵';
$_LANG['snatch_is_end'] = '活動已經結束';
$_LANG['snatch_start_time'] = '本次活動從 %s 到 %s 截止';
$_LANG['price_extent'] = '出價範圍為';
$_LANG['user_to_use_up'] = '用戶可多次出價,每次消耗';
$_LANG['snatch_victory_desc'] = '當本期活動截止時,系統將從所有競價獎品的用戶中,選出在所有競價中出價最低、且沒有其他出價與該價格重複的用戶(即最低且唯一競價),成為該款獎品的獲勝者.';
$_LANG['price_less_victory'] = '如果用戶獲勝的價格低於';
$_LANG['price_than_victory'] = '將能按當期競拍價購得該款獎品;如果用戶獲勝的價格高於';
$_LANG['or_can'] = '則能以';
$_LANG['shopping_product'] = '購買該款獎品';
$_LANG['victory_price_product'] = '獲勝用戶將能按當期競拍價購得該款獎品.';
$_LANG['now_not_snatch'] = '當前沒有活動';
$_LANG['my_integral'] = '我的積分';
$_LANG['bid'] = '出價';
$_LANG['me_bid'] = '我要出價';
$_LANG['me_now_bid'] = '我的出價';
$_LANG['only_price'] = '唯一價格';
$_LANG['view_snatch_result'] = '活動結果';
$_LANG['victory_user'] = '獲獎用戶';
$_LANG['price_bid'] = '所出價格';
$_LANG['bid_time'] = '出價時間';
$_LANG['not_victory_user'] = '沒有獲獎用戶';
$_LANG['snatch_log'] = '參加奪寶奇兵%s ';
$_LANG['not_for_you'] = '你不是獲勝者,不能購買';
$_LANG['order_placed'] = '您已經下過訂單了,如果您想重新購買,請先取消原來的訂單';
/* 購物流程中的前臺部份 */
$_LANG['select_spe'] = '請選擇商品屬性';
/* 購物流程中的訂單部分 */
$_LANG['price'] = '價格';
$_LANG['name'] = '名稱';
$_LANG['describe'] = '描述';
$_LANG['fee'] = '費用';
$_LANG['free_money'] = '免費額度';
$_LANG['img'] = '圖片';
$_LANG['no_pack'] = '不要包裝';
$_LANG['no_card'] = '不要賀卡';
$_LANG['bless_note'] = '祝福語';
$_LANG['use_integral'] = '使用積分';
$_LANG['can_use_integral'] = '您當前的可用積分為';
$_LANG['noworder_can_integral'] = '本訂單最多可以使用';
$_LANG['use_surplus'] = '使用餘額';
$_LANG['your_surplus'] = '您當前的可用餘額為';
$_LANG['pay_fee'] = '支付手續費';
$_LANG['insure_fee'] = '保價費用';
$_LANG['need_insure'] = '配送是否需要保價';
$_LANG['cod'] = '配送決定';
$_LANG['curr_stauts'] = '當前狀態';
$_LANG['use_bonus'] = '使用紅包';
$_LANG['use_bonus_kill'] = '使用線下紅包';
$_LANG['invoice'] = '開發票';
$_LANG['invoice_type'] = '發票類型';
$_LANG['invoice_title'] = '發票抬頭';
$_LANG['invoice_content'] = '發票內容';
$_LANG['order_postscript'] = '訂單附言';
$_LANG['booking_process'] = '缺貨處理';
$_LANG['complete_acquisition'] = '該訂單完成後,您將獲得';
$_LANG['with_price'] = '以及價值';
$_LANG['de'] = '的';
$_LANG['bonus'] = '紅包';
$_LANG['goods_all_price'] = '商品總價';
$_LANG['discount'] = '折扣';
$_LANG['tax'] = '發票稅額';
$_LANG['shipping_fee'] = '配送費用';
$_LANG['pack_fee'] = '包裝費用';
$_LANG['card_fee'] = '賀卡費用';
$_LANG['total_fee'] = '應付款金額';
$_LANG['self_site'] = '本站';
$_LANG['order_gift_integral'] = '訂單 %s 贈送的積分';
$_LANG['order_payed_sms'] = '訂單 %s 付款了。收貨人:%s;電話:%s。';
/* 缺貨處理 */
$_LANG['oos'][OOS_WAIT] = '等待所有商品備齊後再發';
$_LANG['oos'][OOS_CANCEL] = '取消訂單';
$_LANG['oos'][OOS_CONSULT] = '與店主協商';
/* 評論部分 */
$_LANG['username'] = '用戶名';
$_LANG['email'] = '電子郵件地址';
$_LANG['comment_rank'] = '評價等級';
$_LANG['comment_content'] = '評論內容';
$_LANG['submit_comment'] = '提交評論';
$_LANG['button_reset'] = '重置表單';
$_LANG['goods_comment'] = '商品評論';
$_LANG['article_comment'] = '文章評論';
/* 支付確認部分 */
$_LANG['pay_status'] = '支付狀態';
$_LANG['pay_not_exist'] = '此支付方式不存在或者參數錯誤!';
$_LANG['pay_disabled'] = '此支付方式還沒有被啟用!';
$_LANG['pay_success'] = '您此次的支付操作已成功!';
$_LANG['pay_fail'] = '支付操作失敗,請返回重試!';
/* 文章部分 */
$_LANG['new_article'] = '最新文章';
$_LANG['shop_notice'] = '商店公告';
$_LANG['order_already_received'] = '此訂單已經確認過了,感謝您在本站購物,歡迎再次光臨。';
$_LANG['order_invalid'] = '您提交的訂單不正確。';
$_LANG['act_ok'] = '謝謝您通知我們您已收到貨,感謝您在本站購物,歡迎再次光臨。';
$_LANG['receive'] = '收貨確認';
$_LANG['buyer'] = '買家';
$_LANG['next_article'] = '下一篇';
$_LANG['prev_article'] = '上一篇';
/* 虛擬商品 */
$_LANG['virtual_goods_ship_fail'] = '自動發貨失敗,請盡快聯繫商家重新發貨';
/* 選購中心 */
$_LANG['pick_out'] = '選購中心';
$_LANG['fit_count'] = "共有 %s 件商品符合條件";
$_LANG['goods_type'] = "商品類型";
$_LANG['remove_all'] = '移除所有';
$_LANG['advanced_search'] = '高級搜索';
$_LANG['activity'] = '本商品正在進行';
$_LANG['order_not_exists'] = "非常抱歉,沒有找到指定的訂單。請和網站管理員聯繫。";
$_LANG['promotion_time'] = '的時間為%s到%s,趕快來搶吧!';
/* 倒計時 */
$_LANG['goods_js']['day'] = '天';
$_LANG['goods_js']['hour'] = '小時';
$_LANG['goods_js']['minute'] = '分鐘';
$_LANG['goods_js']['second'] = '秒';
$_LANG['goods_js']['end'] = '結束';
$_LANG['favourable'] = '優惠活動';
/* 團購部分語言項 */
$_LANG['group_buy'] = '團購活動';
$_LANG['group_buy_goods'] = '團購商品';
$_LANG['gb_goods_name'] = '團購商品:';
$_LANG['gb_start_date'] = '開始時間:';
$_LANG['gb_end_date'] = '結束時間:';
$_LANG['gbs_pre_start'] = '該團購活動尚未開始,請繼續關注。';
$_LANG['gbs_under_way'] = '該團購活動正在火熱進行中,距離結束時間還有:';
$_LANG['gbs_finished'] = '該團購活動已結束,正在等待處理...';
$_LANG['gbs_succeed'] = '該團購活動已成功結束!';
$_LANG['gbs_fail'] = '該團購活動已結束,沒有成功。';
$_LANG['gb_price_ladder'] = '價格階梯:';
$_LANG['gb_ladder_amount'] = '數量';
$_LANG['gb_ladder_price'] = '價格';
$_LANG['gb_deposit'] = '保證金:';
$_LANG['gb_restrict_amount'] = '限購數量:';
$_LANG['gb_gift_integral'] = '贈送積分:';
$_LANG['gb_cur_price'] = '當前價格:';
$_LANG['gb_valid_goods'] = '當前定購數量:';
$_LANG['gb_final_price'] = '成交價格:';
$_LANG['gb_final_amount'] = '成交數量:';
$_LANG['gb_notice_login'] = '提示:您需要先註冊成為本站會員並且登錄後,才能參加商品團購!';
$_LANG['gb_error_goods_lacking'] = '對不起,商品庫存不足,請您修改數量!';
$_LANG['gb_error_status'] = '對不起,該團購活動已經結束或尚未開始,現在不能參加!';
$_LANG['gb_error_login'] = '對不起,您沒有登錄,不能參加團購,請您先登錄!';
$_LANG['group_goods_empty'] = '當前沒有團購活動';
/* 拍賣部分語言項 */
$_LANG['auction'] = '拍賣活動';
$_LANG['act_status'] = '活動狀態';
$_LANG['au_current_price'] = '當前價格';
$_LANG['act_start_time'] = '開始時間';
$_LANG['act_end_time'] = '結束時間';
$_LANG['au_start_price'] = '起拍價';
$_LANG['au_end_price'] = '一口價';
$_LANG['au_amplitude'] = '加價幅度';
$_LANG['au_deposit'] = '保證金';
$_LANG['no_auction'] = '當前沒有拍賣活動';
$_LANG['au_pre_start'] = '該拍賣活動尚未開始';
$_LANG['au_under_way'] = '該拍賣活動正在進行中,距離結束時間還有:';
$_LANG['au_under_way_1'] = '該拍賣活動正在進行中';
$_LANG['au_bid_user_count'] = '已出價人數';
$_LANG['au_last_bid_price'] = '最後出價';
$_LANG['au_last_bid_user'] = '最後出價的買家';
$_LANG['au_last_bid_time'] = '最後出價時間';
$_LANG['au_finished'] = '該拍賣活動已結束';
$_LANG['au_bid_user'] = '買家';
$_LANG['au_bid_price'] = '出價';
$_LANG['au_bid_time'] = '時間';
$_LANG['au_bid_status'] = '狀態';
$_LANG['no_bid_log'] = '暫時沒有買家出價';
$_LANG['au_bid_ok'] = '領先';
$_LANG['au_i_want_bid'] = '我要出價';
$_LANG['button_bid'] = '出價';
$_LANG['button_buy'] = '立即購買';
$_LANG['au_not_under_way'] = '拍賣活動已結束,不能再出價了';
$_LANG['au_bid_price_error'] = '請輸入正確的價格';
$_LANG['au_bid_after_login'] = '您只有註冊成為會員並且登錄之後才能出價';
$_LANG['au_bid_repeat_user'] = '您已經是這個商品的最高出價人了';
$_LANG['au_your_lowest_price'] = '您的出價不能低於 %s';
$_LANG['au_user_money_short'] = '您的可用資金不足,請先到用戶中心充值';
$_LANG['au_unfreeze_deposit'] = '解凍拍賣活動的保證金:%s';
$_LANG['au_freeze_deposit'] = '凍結拍賣活動的保證金:%s';
$_LANG['au_not_finished'] = '該拍賣活動尚未結束,不能購買';
$_LANG['au_order_placed'] = '您已經下過訂單了,如果您想重新購買,請先取消原來的訂單';
$_LANG['au_no_bid'] = '該拍賣活動沒有人出價,不能購買';
$_LANG['au_final_bid_not_you'] = '您不是最高出價者,不能購買';
$_LANG['au_buy_after_login'] = '請您先登錄';
$_LANG['au_is_winner'] = '恭喜您,您已經贏得了該商品的購買權。請點擊下面的購買按鈕將您的寶貝買回家吧。';
/* 批發部分語言項 */
$_LANG['ws_user_rank'] = '您的等级暂时无法查看批发方案';
$_LANG['ws_login_please'] = '請您先登錄';
$_LANG['ws_return_home'] = '返回首頁';
$_LANG['wholesale'] = '批發';
$_LANG['no_wholesale'] = '沒有批發商品';
$_LANG['ws_price'] = '批發價';
$_LANG['ws_subtotal'] = '小計';
$_LANG['ws_invalid_goods_number'] = '請輸入正確的數量';
$_LANG['ws_attr_not_matching'] = '您選擇的商品屬性不存在,請參照批發價格單選擇';
$_LANG['ws_goods_number_not_enough'] = '您購買的數量沒有達到批發的最小數量,請參照批發價格單';
$_LANG['ws_goods_attr_exists'] = '該商品已經在購物車中,不能再次加入';
$_LANG['ws_remark'] = '請輸入您的聯繫方式、付款方式和配送方式等信息';
$_LANG['ws_order_submitted'] = '您的訂單已提交成功,請記住您的訂單號: %s。';
$_LANG['ws_price_list'] = '價格單';
/* 积分兑换部分语言项 */
$_LANG['exchange'] = '積分商城';
$_LANG['exchange_integral'] = '消耗積分:';
$_LANG['exchange_goods'] = '立刻兌換';
$_LANG['eg_error_login'] = '對不起,您沒有登陸,不能參加兌換,請您先登錄!';
$_LANG['eg_error_status'] = '對不起,該商品已經取消,現在不能兌換!';
$_LANG['eg_error_integral'] = '對不起,您現有的積分值不夠兌換本商品!';
$_LANG['notice_eg_integral'] = '積分商城商品需要消耗積分:';
$_LANG['eg_error_number'] = '對不起,該商品庫存不足,現在不能兌換!';
/* 會員登錄註冊 */
$_LANG['member_name'] = '會員';
$_LANG['password'] = '密碼';
$_LANG['confirm_password'] = '確認密碼';
$_LANG['sign_up'] = '註冊新會員';
$_LANG['forgot_password'] = '您忘記密碼了嗎?';
$_LANG['hello'] = '您好';
$_LANG['welcome_return'] = '歡迎您回來';
$_LANG['now_account'] = '您的賬戶中現在有';
$_LANG['balance'] = '餘額';
$_LANG['along_with'] = '以及';
$_LANG['preferential'] = '優惠券';
$_LANG['edit_user_info'] = '進入用戶中心';
$_LANG['logout'] = '退出';
$_LANG['user_logout'] = '退出';
$_LANG['welcome'] = '歡迎光臨本店';
$_LANG['user_login'] = '會員登陸';
$_LANG['login_now'] = '立即登陸';
$_LANG['reg_now'] = '立即註冊';
/* 商品品牌頁 */
$_LANG['official_site'] = '官方網站:';
$_LANG['brand_category'] = '分類瀏覽:';
$_LANG['all_category'] = '所有分類';
/* 商品分類頁 */
$_LANG['goods_filter'] = '商品篩選';
/* cls_image類的語言項 */
$_LANG['directory_readonly'] = '目錄 % 不存在或不可寫';
$_LANG['invalid_upload_image_type'] = '不是允許的圖片格式';
$_LANG['upload_failure'] = '文件 %s 上傳失敗。';
$_LANG['missing_gd'] = '沒有安裝GD庫';
$_LANG['missing_orgin_image'] = '找不到原始圖片 %s ';
$_LANG['nonsupport_type'] = '不支持該圖像格式 %s ';
$_LANG['creating_failure'] = '創建圖片失敗';
$_LANG['writting_failure'] = '圖片寫入失敗';
$_LANG['empty_watermark'] = '水印文件參數不能為空';
$_LANG['missing_watermark'] = '找不到水印文件%s';
$_LANG['create_watermark_res'] = '創建水印圖片資源失敗。水印圖片類型為%s';
$_LANG['create_origin_image_res'] = '創建原始圖片資源失敗,原始圖片類型%s';
$_LANG['invalid_image_type'] = '無法識別水印圖片 %s ';
$_LANG['file_unavailable'] = '文件 %s 不存在或不可讀';
/* 郵件發送錯誤信息 */
$_LANG['smtp_setting_error'] = '郵件服務器設置信息不完整';
$_LANG['smtp_connect_failure'] = '無法連接到郵件服務器 %s';
$_LANG['smtp_login_failure'] = '郵件服務器驗證帳號或密碼不正確';
$_LANG['smtp_refuse'] = '服務器拒絕發送該郵件';
$_LANG['sendemail_false'] = "郵件發送失敗,請與網站管理員聯繫!";
$_LANG['disabled_fsockopen'] = 'fsockopen函數被禁用';
$_LANG['topic_goods_empty'] = '當前沒有專題商品';
$_LANG['email_list_ok'] = '訂閱';
$_LANG['email_list_cancel'] = '退訂';
$_LANG['email_invalid'] = '郵件地址非法!';
$_LANG['email_alreadyin_list'] = '郵件地址已經存在於列表中!';
$_LANG['email_notin_list'] = '郵件地址不在列表中!';
$_LANG['email_re_check'] = '已經重新發送驗證郵件,請查收並確認!';
$_LANG['email_check'] = '請查收郵件進行確認操作!';
$_LANG['email_not_alive'] = '此郵件地址是未驗證狀態,不需要退訂!';
$_LANG['check_mail'] = '驗證郵件';
$_LANG['check_mail_content'] = "%s 您好:<br><br>這是由%s發送的郵件訂閱驗證郵件,點擊以下的鏈接地址,完成驗證操作。<br><a href=\"%s\" target=\"_blank\">%s</a>\n<br><br>%s<br>%s";
$_LANG['email_checked'] = '郵件已經被確認!';
$_LANG['hash_wrong'] = '驗證串錯誤!請核對驗證串或輸入email地址重新發送驗證串!';
$_LANG['email_canceled'] = '郵件已經被退定!';
$_LANG['goods_click_count'] = '商品點擊數';
$_LANG['p_y']['link_start'] = '<a href="http://www.ecshop.com" target="_blank" style=" font-family:Verdana; font-size:11px;">';
$_LANG['p_y']['link_p'] = 'Powe';
$_LANG['p_y']['link_r'] = 'red ';
$_LANG['p_y']['link_b'] = 'by ';
$_LANG['p_y']['main_start'] = '<strong><span style="color: #3366FF">';
$_LANG['p_y']['main_e'] = 'E';
$_LANG['p_y']['main_c'] = 'CSho';
$_LANG['p_y']['main_p'] = 'p</span>';
$_LANG['p_y']['v_s'] = '<span style="color: #FF9966">';
$_LANG['p_y']['v'] = VERSION;
$_LANG['p_y']['link_end'] = '</span></strong></a>';
/* 虛擬卡 */
$_LANG['card_sn'] = '卡片序號';
$_LANG['card_password'] = '卡片密碼';
$_LANG['end_date'] = '截至日期';
$_LANG['virtual_card_oos'] = '虛擬卡已缺貨';
/* 訂單狀態查詢 */
$_LANG['invalid_order_sn'] = '無效訂單號';
$_LANG['order_status'] = '訂單狀態';
$_LANG['shipping_date'] = '發貨時間';
$_LANG['query_order'] = '查詢該訂單號';
$_LANG['order_query_toofast'] = '您的提交頻率太高,歇會兒再查吧。';
$_LANG['online_info'] = '當前共有 %s 人在線';
/* 按鈕 */
$_LANG['btn_direct_buy'] = '直接購買';
$_LANG['btn_buy'] = '購買';
$_LANG['btn_collect'] = '收藏';
$_LANG['btn_add_to_cart'] = '加入購物車';
$_LANG['btn_add_to_collect'] = '添加收藏';
$_LANG['stock_up'] = '缺貨';
$_LANG['hot_search'] = '熱門搜索';
$_LANG['please_select_attr'] = '你加入購物車的商品有不同型號可選,你是否要立即跳轉到商品詳情選擇型號?';
/* 促銷信息欄 */
$_LANG['snatch_promotion'] = '[奪寶]';
$_LANG['group_promotion'] = '[團購]';
$_LANG['auction_promotion'] = '[拍賣]';
$_LANG['favourable_promotion'] = '[優惠]';
$_LANG['wholesale_promotion'] = '[批發]';
$_LANG['package_promotion'] = '[禮包]';
/* feed推送 */
$_LANG['feed_user_buy'] = "購買了";
$_LANG['feed_user_comment'] = "評論了";
$_LANG['feed_goods_price'] = "商品價格";
$_LANG['feed_goods_desc'] = "商品描述";
/* 留言板 */
$_LANG['shopman_comment'] = '商品評論';
$_LANG['message_ping'] = '評';
$_LANG['message_board'] = "留言板";
$_LANG['post_message'] = "我要留言";
$_LANG['message_title'] = '主題';
$_LANG['message_time'] = '留言時間';
$_LANG['reply_time'] = '回復時間';
$_LANG['shop_owner_reply'] = '店主回復';
$_LANG['message_board_type'] = '留言類型';
$_LANG['message_content'] = '留言內容';
$_LANG['message_anonymous'] = '匿名留言';
$_LANG['message_type'][M_MESSAGE] = '留言';
$_LANG['message_type'][M_COMPLAINT] = '投訴';
$_LANG['message_type'][M_ENQUIRY] = '詢問';
$_LANG['message_type'][M_CUSTOME] = '售後';
$_LANG['message_type'][M_BUY] = '求購';
$_LANG['message_type'][M_BUSINESS] = '商家留言';
$_LANG['message_type'][M_COMMENT] = '評論';
$_LANG['message_board_js']['msg_empty_email'] = '請輸入您的電子郵件地址';
$_LANG['message_board_js']['msg_error_email'] = '電子郵件地址格式不正確';
$_LANG['message_board_js']['msg_title_empty'] = '留言標題為空';
$_LANG['message_board_js']['msg_content_empty'] = '留言內容為空';
$_LANG['message_board_js']['msg_captcha_empty'] = '驗證碼為空';
$_LANG['message_board_js']['msg_title_limit'] = '留言標題不能超過200個字';
$_LANG['message_submit_wait'] = '您的留言已成功發表,請等待管理員的審核!';
$_LANG['message_submit_done'] = '發表留言成功';
$_LANG['message_board_close'] = "暫停留言板功能";
$_LANG['upload_file_limit'] = '文件大小超過了限制 %dKB';
$_LANG['message_list_lnk'] = '返回留言列表';
/* 報價單 */
$_LANG['quotation'] = "報價單";
$_LANG['print_quotation'] = "打印報價單";
$_LANG['goods_inventory'] = "庫存";
$_LANG['goods_category'] = "商品分類";
$_LANG['shopman_reply'] = '管理員回復';
/* 相冊JS語言項 */
$_LANG['gallery_js']['close_window'] = '您是否關閉當前窗口';
$_LANG['submit'] = '提 交';
$_LANG['reset'] = '重 置';
$_LANG['order_query'] = '訂單查詢';
$_LANG['shipping_query'] = '發貨查詢';
$_LANG['view_history'] = '瀏覽歷史';
$_LANG['clear_history'] = '[清空]';
$_LANG['no_history'] = '您已清空最近流覽過的商品';
$_LANG['goods_tag'] = '商品標籤';
$_LANG['releate_goods'] = '相關商品';
$_LANG['goods_list'] = '商品列表';
$_LANG['favourable_goods'] = '收藏該商品';
$_LANG['accessories_releate'] = '相關配件';
$_LANG['article_releate'] = '相關文章';
$_LANG['email_subscribe'] = '郵件訂閱';
$_LANG['consignee_info'] = '收貨人信息';
$_LANG['user_comment'] = '用戶評論';
$_LANG['total'] = '共';
$_LANG['user_comment_num'] = '條評論';
$_LANG['auction_goods'] = '拍賣商品';
$_LANG['auction_goods_info'] = '拍賣商品詳情';
$_LANG['article_cat'] = '文章分類';
$_LANG['online_vote'] = '在線調查';
$_LANG['new_price'] = '最新出價';
$_LANG['promotion_info'] = '促銷信息';
$_LANG['price_grade'] = '價格範圍';
$_LANG['your_choice'] = '您的選擇';
$_LANG['system_info'] = '系統信息';
$_LANG['all_tags'] = '所有標籤';
$_LANG['activity_list'] = '活動列表';
$_LANG['package_list'] = '禮包列表';
$_LANG['treasure_info'] = '寶貝詳情';
$_LANG['activity_desc'] = '活動描述';
$_LANG['activity_intro'] = '活動介紹';
$_LANG['get_password'] = '找回密碼';
$_LANG['fee_total'] = '費用總計';
$_LANG['other_info'] = '其它信息';
$_LANG['user_balance'] = '會員餘額';
$_LANG['wholesale_goods_cart'] = '批發商品購物車';
$_LANG['wholesale_goods_list'] = '批發商品列表';
$_LANG['bid_record'] = '出價記錄';
$_LANG['shipping_method'] = '配送方式';
$_LANG['payment_method'] = '支付方式';
$_LANG['goods_package'] = '商品包裝';
$_LANG['goods_card'] = '祝福賀卡';
$_LANG['groupbuy_intro'] = '團購說明';
$_LANG['groupbuy_goods_info'] = '團購商品詳情';
$_LANG['act_time'] = '起止時間';
$_LANG['top10'] = '銷售排行';
/* 優惠活動 */
$_LANG['label_act_name'] = '優惠活動名稱:';
$_LANG['label_start_time'] = '優惠開始時間:';
$_LANG['label_end_time'] = '優惠結束時間:';
$_LANG['label_user_rank'] = '享受優惠的會員等級:';
$_LANG['not_user'] = '非會員';
$_LANG['label_act_range'] = '優惠範圍:';
$_LANG['far_all'] = '全部商品';
$_LANG['far_category'] = '以下分類';
$_LANG['far_brand'] = '以下品牌';
$_LANG['far_goods'] = '以下商品';
$_LANG['label_min_amount'] = '金額下限:';
$_LANG['label_max_amount'] = '金額上限:';
$_LANG['notice_max_amount'] = '0表示沒有上限';
$_LANG['label_act_type'] = '優惠方式:';
$_LANG['fat_goods'] = '享受贈品(特惠品)';
$_LANG['fat_price'] = '享受現金減免';
$_LANG['fat_discount'] = '享受價格折扣';
$_LANG['orgtotal'] = '原始價格';
$_LANG['heart_buy'] = '心動不如行動';
/* 其他模板涉及常用语言项 */
$_LANG['label_regist'] = '用戶註冊';
$_LANG['label_login'] = '用戶登錄';
$_LANG['label_profile'] = '用戶信息';
$_LANG['label_collection'] = '我的收藏';
$_LANG['article_list'] = '文章列表';
$_LANG['Preferences_price'] = '優惠價格';
$_LANG['divided_into'] = '分成規則';
?> | zzshop | trunk/languages/zh_tw/common.php | PHP | asf20 | 35,604 |
<?php
/**
* ECSHOP 生成验证码
* ============================================================================
* 版权所有 2005-2010 上海商派网络科技有限公司,并保留所有权利。
* 网站地址: http://www.ecshop.com;
* ----------------------------------------------------------------------------
* 这不是一个自由软件!您只能在不用于商业目的的前提下对程序代码进行修改和
* 使用;不允许对程序代码以任何形式任何目的的再发布。
* ============================================================================
* $Author: liuhui $
* $Id: captcha.php 17063 2010-03-25 06:35:46Z liuhui $
*/
define('IN_ECS', true);
define('INIT_NO_SMARTY', true);
require(dirname(__FILE__) . '/includes/init.php');
require(ROOT_PATH . 'includes/cls_captcha.php');
$img = new captcha(ROOT_PATH . 'data/captcha/', $_CFG['captcha_width'], $_CFG['captcha_height']);
@ob_end_clean(); //清除之前出现的多余输入
if (isset($_REQUEST['is_login']))
{
$img->session_word = 'captcha_login';
}
$img->generate_image();
?> | zzshop | trunk/captcha.php | PHP | asf20 | 1,123 |
<?php
/**
* ECSHOP 处理收回确认的页面
* ============================================================================
* 版权所有 2005-2010 上海商派网络科技有限公司,并保留所有权利。
* 网站地址: http://www.ecshop.com;
* ----------------------------------------------------------------------------
* 这不是一个自由软件!您只能在不用于商业目的的前提下对程序代码进行修改和
* 使用;不允许对程序代码以任何形式任何目的的再发布。
* ============================================================================
* $Author: liuhui $
* $Id: receive.php 17063 2010-03-25 06:35:46Z liuhui $
*/
define('IN_ECS', true);
require(dirname(__FILE__) . '/includes/init.php');
/* 取得参数 */
$order_id = !empty($_REQUEST['id']) ? intval($_REQUEST['id']) : 0; // 订单号
$consignee = !empty($_REQUEST['con']) ? rawurldecode(trim($_REQUEST['con'])) : ''; // 收货人
/* 查询订单信息 */
$sql = 'SELECT * FROM ' . $ecs->table('order_info') . " WHERE order_id = '$order_id'";
$order = $db->getRow($sql);
if (empty($order))
{
$msg = $_LANG['order_not_exists'];
}
/* 检查订单 */
elseif ($order['shipping_status'] == SS_RECEIVED)
{
$msg = $_LANG['order_already_received'];
}
elseif ($order['shipping_status'] != SS_SHIPPED)
{
$msg = $_LANG['order_invalid'];
}
elseif ($order['consignee'] != $consignee)
{
$msg = $_LANG['order_invalid'];
}
else
{
/* 修改订单发货状态为“确认收货” */
$sql = "UPDATE " . $ecs->table('order_info') . " SET shipping_status = '" . SS_RECEIVED . "' WHERE order_id = '$order_id'";
$db->query($sql);
/* 记录日志 */
order_action($order['order_sn'], $order['order_status'], SS_RECEIVED, $order['pay_status'], '', $_LANG['buyer']);
$msg = $_LANG['act_ok'];
}
/* 显示模板 */
assign_template();
$position = assign_ur_here();
$smarty->assign('page_title', $position['title']); // 页面标题
$smarty->assign('ur_here', $position['ur_here']); // 当前位置
$smarty->assign('categories', get_categories_tree()); // 分类树
$smarty->assign('helps', get_shop_help()); // 网店帮助
assign_dynamic('receive');
$smarty->assign('msg', $msg);
$smarty->display('receive.dwt');
?> | zzshop | trunk/receive.php | PHP | asf20 | 2,374 |
<?php
/**
* ECSHOP 留言板
* ============================================================================
* 版权所有 2005-2010 上海商派网络科技有限公司,并保留所有权利。
* 网站地址: http://www.ecshop.com;
* ----------------------------------------------------------------------------
* 这不是一个自由软件!您只能在不用于商业目的的前提下对程序代码进行修改和
* 使用;不允许对程序代码以任何形式任何目的的再发布。
* ============================================================================
* $Author: liuhui $
* $Id: message.php 17063 2010-03-25 06:35:46Z liuhui $
*/
define('IN_ECS', true);
require(dirname(__FILE__) . '/includes/init.php');
if (empty($_CFG['message_board']))
{
show_message($_LANG['message_board_close']);
}
$action = isset($_REQUEST['act']) ? trim($_REQUEST['act']) : 'default';
if ($action == 'act_add_message')
{
include_once(ROOT_PATH . 'includes/lib_clips.php');
/* 验证码防止灌水刷屏 */
if ((intval($_CFG['captcha']) & CAPTCHA_MESSAGE) && gd_version() > 0)
{
include_once('includes/cls_captcha.php');
$validator = new captcha();
if (!$validator->check_word($_POST['captcha']))
{
show_message($_LANG['invalid_captcha']);
}
}
else
{
/* 没有验证码时,用时间来限制机器人发帖或恶意发评论 */
if (!isset($_SESSION['send_time']))
{
$_SESSION['send_time'] = 0;
}
$cur_time = gmtime();
if (($cur_time - $_SESSION['send_time']) < 30) // 小于30秒禁止发评论
{
show_message($_LANG['cmt_spam_warning']);
}
}
$user_name = '';
if (empty($_POST['anonymous']) && !empty($_SESSION['user_name']))
{
$user_name = $_SESSION['user_name'];
}
elseif (!empty($_POST['anonymous']) && !isset($_POST['user_name']))
{
$user_name = $_LANG['anonymous'];
}
elseif (empty($_POST['user_name']))
{
$user_name = $_LANG['anonymous'];
}
else
{
$user_name = htmlspecialchars(trim($_POST['user_name']));
}
$user_id = !empty($_SESSION['user_id']) ? $_SESSION['user_id'] : 0;
$message = array(
'user_id' => $user_id,
'user_name' => $user_name,
'user_email' => isset($_POST['user_email']) ? htmlspecialchars(trim($_POST['user_email'])) : '',
'msg_type' => isset($_POST['msg_type']) ? intval($_POST['msg_type']) : 0,
'msg_title' => isset($_POST['msg_title']) ? trim($_POST['msg_title']) : '',
'msg_content' => isset($_POST['msg_content']) ? trim($_POST['msg_content']) : '',
'order_id' => 0,
'msg_area' => 1,
'upload' => array()
);
if (add_message($message))
{
if (intval($_CFG['captcha']) & CAPTCHA_MESSAGE)
{
unset($_SESSION[$validator->session_word]);
}
else
{
$_SESSION['send_time'] = $cur_time;
}
$msg_info = $_CFG['message_check'] ? $_LANG['message_submit_wait'] : $_LANG['message_submit_done'];
show_message($msg_info, $_LANG['message_list_lnk'], 'message.php');
}
else
{
$err->show($_LANG['message_list_lnk'], 'message.php');
}
}
if ($action == 'default')
{
assign_template();
$position = assign_ur_here(0, $_LANG['message_board']);
$smarty->assign('page_title', $position['title']); // 页面标题
$smarty->assign('ur_here', $position['ur_here']); // 当前位置
$smarty->assign('helps', get_shop_help()); // 网店帮助
$smarty->assign('categories', get_categories_tree()); // 分类树
$smarty->assign('top_goods', get_top10()); // 销售排行
$smarty->assign('cat_list', cat_list(0, 0, true, 2, false));
$smarty->assign('brand_list', get_brand_list());
$smarty->assign('promotion_info', get_promotion_info());
$smarty->assign('enabled_mes_captcha', (intval($_CFG['captcha']) & CAPTCHA_MESSAGE));
$sql = "SELECT COUNT(*) FROM " .$GLOBALS['ecs']->table('comment')." WHERE STATUS =1 AND comment_type =0 ";
$record_count = $db->getOne($sql);
$sql = "SELECT COUNT(*) FROM " .$GLOBALS['ecs']->table('feedback')." WHERE `msg_area`='1' AND `msg_status` = '1' ";
$record_count += $db->getOne($sql);
/* 获取留言的数量 */
$page = isset($_REQUEST['page']) ? intval($_REQUEST['page']) : 1;
$pagesize = get_library_number('message_list', 'message_board');
$pager = get_pager('message.php', array(), $record_count, $page, $pagesize);
$msg_lists = get_msg_list($pagesize, $pager['start']);
assign_dynamic('message_board');
$smarty->assign('rand', mt_rand());
$smarty->assign('msg_lists', $msg_lists);
$smarty->assign('pager', $pager);
$smarty->display('message_board.dwt');
}
/**
* 获取留言的详细信息
*
* @param integer $num
* @param integer $start
*
* @return array
*/
function get_msg_list($num, $start)
{
/* 获取留言数据 */
$msg = array();
$mysql_ver = $GLOBALS['db']->version();
if($mysql_ver > '3.2.3')
{
$sql = "(SELECT 'comment' AS tablename, comment_id AS ID, content AS msg_content, null AS msg_title, add_time AS msg_time, id_value AS id_value, comment_rank AS comment_rank, null AS message_img, user_name AS user_name, '6' AS msg_type ";
$sql .= " FROM " .$GLOBALS['ecs']->table('comment');
$sql .= "WHERE STATUS =1 AND comment_type =0) ";
$sql .= " UNION ";
$sql .= "(SELECT 'feedback' AS tablename, msg_id AS ID, msg_content AS msg_content, msg_title AS msg_title, msg_time AS msg_time, null AS id_value, null AS comment_rank, message_img AS message_img, user_name AS user_name, msg_type AS msg_type ";
$sql .= " FROM " .$GLOBALS['ecs']->table('feedback');
$sql .= " WHERE `msg_area`='1' AND `msg_status` = '1') ";
$sql .= " ORDER BY msg_time DESC ";
}
else
{
$con_sql = "SELECT 'comment' AS tablename, comment_id AS ID, content AS msg_content, null AS msg_title, add_time AS msg_time, id_value AS id_value, comment_rank AS comment_rank, null AS message_img, user_name AS user_name, '6' AS msg_type ";
$con_sql .= " FROM " .$GLOBALS['ecs']->table('comment');
$con_sql .= "WHERE STATUS =1 AND comment_type =0 ";
$fee_sql = "SELECT 'feedback' AS tablename, msg_id AS ID, msg_content AS msg_content, msg_title AS msg_title, msg_time AS msg_time, null AS id_value, null AS comment_rank, message_img AS message_img, user_name AS user_name, msg_type AS msg_type ";
$fee_sql .= " FROM " .$GLOBALS['ecs']->table('feedback');
$fee_sql .= " WHERE `msg_area`='1' AND `msg_status` = '1' ";
$cre_con = "CREATE TEMPORARY TABLE tmp_table ".$con_sql;
$GLOBALS['db']->query($cre_con);
$cre_con = "INSERT INTO tmp_table ".$fee_sql;
$GLOBALS['db']->query($cre_con);
$sql = "SELECT * FROM " .$GLOBALS['ecs']->table('tmp_table') . " ORDER BY msg_time DESC ";
}
$res = $GLOBALS['db']->SelectLimit($sql, $num, $start);
while ($rows = $GLOBALS['db']->fetchRow($res))
{
for($i = 0; $i < count($rows); $i++)
{
$msg[$rows['msg_time']]['user_name'] = htmlspecialchars($rows['user_name']);
$msg[$rows['msg_time']]['msg_content'] = str_replace('\r\n', '<br />', htmlspecialchars($rows['msg_content']));
$msg[$rows['msg_time']]['msg_content'] = str_replace('\n', '<br />', $msg[$rows['msg_time']]['msg_content']);
$msg[$rows['msg_time']]['msg_time'] = local_date($GLOBALS['_CFG']['time_format'], $rows['msg_time']);
$msg[$rows['msg_time']]['msg_type'] = $GLOBALS['_LANG']['message_type'][$rows['msg_type']];
$msg[$rows['msg_time']]['msg_title'] = nl2br(htmlspecialchars($rows['msg_title']));
$msg[$rows['msg_time']]['message_img'] = $rows['message_img'];
$msg[$rows['msg_time']]['tablename'] = $rows['tablename'];
if(isset($rows['order_id']))
{
$msg[$rows['msg_time']]['order_id'] = $rows['order_id'];
}
$msg[$rows['msg_time']]['comment_rank'] = $rows['comment_rank'];
$msg[$rows['msg_time']]['id_value'] = $rows['id_value'];
/*如果id_value为true为商品评论,根据商品id取出商品名称*/
if($rows['id_value'])
{
$sql_goods = "SELECT goods_name FROM ".$GLOBALS['ecs']->table('goods');
$sql_goods .= "WHERE goods_id= ".$rows['id_value'];
$goods_res = $GLOBALS['db']->getRow($sql_goods);
$msg[$rows['msg_time']]['goods_name'] = $goods_res['goods_name'];
$msg[$rows['msg_time']]['goods_url'] = build_uri('goods', array('gid' => $rows['id_value']), $goods_res['goods_name']);
}
}
$msg[$rows['msg_time']]['tablename'] = $rows['tablename'];
$id = $rows['ID'];
$reply = array();
if(isset($msg[$rows['msg_time']]['tablename']))
{
$table_name = $msg[$rows['msg_time']]['tablename'];
if ($table_name == 'feedback')
{
$sql = "SELECT user_name AS re_name, user_email AS re_email, msg_time AS re_time, msg_content AS re_content ,parent_id".
" FROM " .$GLOBALS['ecs']->table('feedback') .
" WHERE parent_id = '" . $id. "'";
}
else
{
$sql = 'SELECT user_name AS re_name, email AS re_email, add_time AS re_time, content AS re_content ,parent_id
FROM ' . $GLOBALS['ecs']->table('comment') .
" WHERE parent_id = $id ";
}
$reply = $GLOBALS['db']->getRow($sql);
if ($reply)
{
$msg[$rows['msg_time']]['re_name'] = $reply['re_name'];
$msg[$rows['msg_time']]['re_email'] = $reply['re_email'];
$msg[$rows['msg_time']]['re_time'] = local_date($GLOBALS['_CFG']['time_format'], $reply['re_time']);
$msg[$rows['msg_time']]['re_content'] = nl2br(htmlspecialchars($reply['re_content']));
}
}
}
return $msg;
}
?>
| zzshop | trunk/message.php | PHP | asf20 | 10,648 |
<?php
/**
* ECSHOP 批发前台文件
* ============================================================================
* 版权所有 2005-2010 上海商派网络科技有限公司,并保留所有权利。
* 网站地址: http://www.ecshop.com;
* ----------------------------------------------------------------------------
* 这不是一个自由软件!您只能在不用于商业目的的前提下对程序代码进行修改和
* 使用;不允许对程序代码以任何形式任何目的的再发布。
* ============================================================================
* @author: scott ye <scott.yell@gmail.com>
* @version: v2.x
* ---------------------------------------------
* $Author: liuhui $
* $Id: wholesale.php 17063 2010-03-25 06:35:46Z liuhui $
*/
define('IN_ECS', true);
require(dirname(__FILE__) . '/includes/init.php');
/* 如果没登录,提示登录 */
if ($_SESSION['user_rank'] <= 0)
{
show_message($_LANG['ws_user_rank'], $_LANG['ws_return_home'], 'index.php');
}
/*------------------------------------------------------ */
//-- act 操作项的初始化
/*------------------------------------------------------ */
if (empty($_REQUEST['act']))
{
$_REQUEST['act'] = 'list';
}
/*------------------------------------------------------ */
//-- 批发活动列表
/*------------------------------------------------------ */
if ($_REQUEST['act'] == 'list')
{
$search_category = empty($_REQUEST['search_category']) ? 0 : intval($_REQUEST['search_category']);
$search_keywords = isset($_REQUEST['search_keywords']) ? trim($_REQUEST['search_keywords']) : '';
$param = array(); // 翻页链接所带参数列表
/* 查询条件:当前用户的会员等级(搜索关键字) */
$where = " WHERE g.goods_id = w.goods_id
AND w.enabled = 1
AND CONCAT(',', w.rank_ids, ',') LIKE '" . '%,' . $_SESSION['user_rank'] . ',%' . "' ";
/* 搜索 */
/* 搜索类别 */
if ($search_category)
{
$where .= " AND g.cat_id = '$search_category' ";
$param['search_category'] = $search_category;
$smarty->assign('search_category', $search_category);
}
/* 搜索商品名称和关键字 */
if ($search_keywords)
{
$where .= " AND (g.keywords LIKE '%$search_keywords%'
OR g.goods_name LIKE '%$search_keywords%') ";
$param['search_keywords'] = $search_keywords;
$smarty->assign('search_keywords', $search_keywords);
}
/* 取得批发商品总数 */
$sql = "SELECT COUNT(*) FROM " . $ecs->table('wholesale') . " AS w, " . $ecs->table('goods') . " AS g " . $where;
$count = $db->getOne($sql);
if ($count > 0)
{
$default_display_type = $_CFG['show_order_type'] == '0' ? 'list' : 'text';
$display = (isset($_REQUEST['display']) && in_array(trim(strtolower($_REQUEST['display'])), array('list', 'text'))) ? trim($_REQUEST['display']) : (isset($_COOKIE['ECS']['display']) ? $_COOKIE['ECS']['display'] : $default_display_type);
$display = in_array($display, array('list', 'text')) ? $display : 'text';
setcookie('ECS[display]', $display, gmtime() + 86400 * 7);
/* 取得每页记录数 */
$size = isset($_CFG['page_size']) && intval($_CFG['page_size']) > 0 ? intval($_CFG['page_size']) : 10;
/* 计算总页数 */
$page_count = ceil($count / $size);
/* 取得当前页 */
$page = isset($_REQUEST['page']) && intval($_REQUEST['page']) > 0 ? intval($_REQUEST['page']) : 1;
$page = $page > $page_count ? $page_count : $page;
/* 取得当前页的批发商品 */
$wholesale_list = wholesale_list($size, $page, $where);
$smarty->assign('wholesale_list', $wholesale_list);
$param['act'] = 'list';
$pager = get_pager('wholesale.php', array_reverse ($param, TRUE), $count, $page, $size);
$pager['display'] = $display;
$smarty->assign('pager', $pager);
/* 批发商品购物车 */
$smarty->assign('cart_goods', isset($_SESSION['wholesale_goods']) ? $_SESSION['wholesale_goods'] : array());
}
/* 模板赋值 */
assign_template();
$position = assign_ur_here();
$smarty->assign('page_title', $position['title']); // 页面标题
$smarty->assign('ur_here', $position['ur_here']); // 当前位置
$smarty->assign('categories', get_categories_tree()); // 分类树
$smarty->assign('helps', get_shop_help()); // 网店帮助
$smarty->assign('top_goods', get_top10()); // 销售排行
assign_dynamic('wholesale');
/* 显示模板 */
$smarty->display('wholesale_list.dwt');
}
/*------------------------------------------------------ */
//-- 下载价格单
/*------------------------------------------------------ */
elseif ($_REQUEST['act'] == 'price_list')
{
$data = $_LANG['goods_name'] . "\t" . $_LANG['goods_attr'] . "\t" . $_LANG['number'] . "\t" . $_LANG['ws_price'] . "\t\n";
$sql = "SELECT * FROM " . $ecs->table('wholesale') .
"WHERE enabled = 1 AND CONCAT(',', rank_ids, ',') LIKE '" . '%,' . $_SESSION['user_rank'] . ',%' . "'";
$res = $db->query($sql);
while ($row = $db->fetchRow($res))
{
$price_list = unserialize($row['prices']);
foreach ($price_list as $attr_price)
{
if ($attr_price['attr'])
{
$sql = "SELECT attr_value FROM " . $ecs->table('goods_attr') .
" WHERE goods_attr_id " . db_create_in($attr_price['attr']);
$goods_attr = join(',', $db->getCol($sql));
}
else
{
$goods_attr = '';
}
foreach ($attr_price['qp_list'] as $qp)
{
$data .= $row['goods_name'] . "\t" . $goods_attr . "\t" . $qp['quantity'] . "\t" . $qp['price'] . "\t\n";
}
}
}
header("Content-type: application/vnd.ms-excel; charset=utf-8");
header("Content-Disposition: attachment; filename=price_list.xls");
if (EC_CHARSET == 'utf-8')
{
echo ecs_iconv('UTF8', 'GB2312', $data);
}
else
{
echo $data;
}
}
/*------------------------------------------------------ */
//-- 加入购物车
/*------------------------------------------------------ */
elseif ($_REQUEST['act'] == 'add_to_cart')
{
/* 取得参数 */
$act_id = intval($_POST['act_id']);
$goods_number = $_POST['goods_number'][$act_id];
$attr_id = isset($_POST['attr_id']) ? $_POST['attr_id'] : array();
if(isset($attr_id[$act_id]))
{
$goods_attr = $attr_id[$act_id];
}
/* 用户提交必须全部通过检查,才能视为完成操作 */
/* 检查数量 */
if (empty($goods_number) || (is_array($goods_number) && array_sum($goods_number) <= 0))
{
show_message($_LANG['ws_invalid_goods_number']);
}
/* 确定购买商品列表 */
$goods_list = array();
if (is_array($goods_number))
{
foreach ($goods_number as $key => $value)
{
if (!$value)
{
unset($goods_number[$key], $goods_attr[$key]);
continue;
}
$goods_list[] = array('number' => $goods_number[$key], 'goods_attr' => $goods_attr[$key]);
}
}
else
{
$goods_list[0] = array('number' => $goods_number, 'goods_attr' => '');
}
/* 取批发相关数据 */
$wholesale = wholesale_info($act_id);
/* 检查session中该商品,该属性是否存在 */
if (isset($_SESSION['wholesale_goods']))
{
foreach ($_SESSION['wholesale_goods'] as $goods)
{
if ($goods['goods_id'] == $wholesale['goods_id'])
{
if (empty($goods_attr))
{
show_message($_LANG['ws_goods_attr_exists']);
}
elseif (in_array($goods['goods_attr_id'], $goods_attr))
{
show_message($_LANG['ws_goods_attr_exists']);
}
}
}
}
/* 获取购买商品的批发方案的价格阶梯 (一个方案多个属性组合、一个属性组合、一个属性、无属性) */
$attr_matching = false;
foreach ($wholesale['price_list'] as $attr_price)
{
// 没有属性
if (empty($attr_price['attr']))
{
$attr_matching = true;
$goods_list[0]['qp_list'] = $attr_price['qp_list'];
break;
}
// 有属性
elseif (($key = is_attr_matching($goods_list, $attr_price['attr'])) !== false)
{
$attr_matching = true;
$goods_list[$key]['qp_list'] = $attr_price['qp_list'];
}
}
if (!$attr_matching)
{
show_message($_LANG['ws_attr_not_matching']);
}
/* 检查数量是否达到最低要求 */
foreach ($goods_list as $goods_key => $goods)
{
if ($goods['number'] < $goods['qp_list'][0]['quantity'])
{
show_message($_LANG['ws_goods_number_not_enough']);
}
else
{
$goods_price = 0;
foreach ($goods['qp_list'] as $qp)
{
if ($goods['number'] >= $qp['quantity'])
{
$goods_list[$goods_key]['goods_price'] = $qp['price'];
}
else
{
break;
}
}
}
}
/* 写入session */
foreach ($goods_list as $goods_key => $goods)
{
// 属性名称
$goods_attr_name = '';
if (!empty($goods['goods_attr']))
{
foreach ($goods['goods_attr'] as $attr)
{
$goods_attr_name .= $attr['attr_name'] . ':' . $attr['attr_val'] . ' ';
}
}
// 总价
$total = $goods['number'] * $goods['goods_price'];
$_SESSION['wholesale_goods'][] = array(
'goods_id' => $wholesale['goods_id'],
'goods_name' => $wholesale['goods_name'],
'goods_attr_id' => $goods['goods_attr'],
'goods_attr' => $goods_attr_name,
'goods_number' => $goods['number'],
'goods_price' => $goods['goods_price'],
'subtotal' => $total,
'formated_goods_price' => price_format($goods['goods_price'], false),
'formated_subtotal' => price_format($total, false),
'goods_url' => build_uri('goods', array('gid' => $wholesale['goods_id']), $wholesale['goods_name']),
);
}
unset($goods_attr, $attr_id, $goods_list, $wholesale, $goods_attr_name);
/* 刷新页面 */
ecs_header("Location: ./wholesale.php\n");
exit;
}
/*------------------------------------------------------ */
//-- 从购物车删除
/*------------------------------------------------------ */
elseif ($_REQUEST['act'] == 'drop_goods')
{
$key = intval($_REQUEST['key']);
if (isset($_SESSION['wholesale_goods'][$key]))
{
unset($_SESSION['wholesale_goods'][$key]);
}
/* 刷新页面 */
ecs_header("Location: ./wholesale.php\n");
exit;
}
/*------------------------------------------------------ */
//-- 提交订单
/*------------------------------------------------------ */
elseif ($_REQUEST['act'] == 'submit_order')
{
include_once(ROOT_PATH . 'includes/lib_order.php');
/* 检查购物车中是否有商品 */
if (count($_SESSION['wholesale_goods']) == 0)
{
show_message($_LANG['no_goods_in_cart']);
}
/* 检查备注信息 */
if (empty($_POST['remark']))
{
show_message($_LANG['ws_remark']);
}
/* 计算商品总额 */
$goods_amount = 0;
foreach ($_SESSION['wholesale_goods'] as $goods)
{
$goods_amount += $goods['subtotal'];
}
$order = array(
'postscript' => htmlspecialchars($_POST['remark']),
'user_id' => $_SESSION['user_id'],
'add_time' => gmtime(),
'order_status' => OS_UNCONFIRMED,
'shipping_status' => SS_UNSHIPPED,
'pay_status' => PS_UNPAYED,
'goods_amount' => $goods_amount,
'order_amount' => $goods_amount,
);
/* 插入订单表 */
$error_no = 0;
do
{
$order['order_sn'] = get_order_sn(); //获取新订单号
$GLOBALS['db']->autoExecute($GLOBALS['ecs']->table('order_info'), $order, 'INSERT');
$error_no = $GLOBALS['db']->errno();
if ($error_no > 0 && $error_no != 1062)
{
die($GLOBALS['db']->errorMsg());
}
}
while ($error_no == 1062); //如果是订单号重复则重新提交数据
$new_order_id = $db->insert_id();
$order['order_id'] = $new_order_id;
/* 插入订单商品 */
foreach ($_SESSION['wholesale_goods'] as $goods)
{
//如果存在货品
$product_id = 0;
if (!empty($goods['goods_attr_id']))
{
$goods_attr_id = array();
foreach ($goods['goods_attr_id'] as $value)
{
$goods_attr_id[$value['attr_id']] = $value['attr_val_id'];
}
ksort($goods_attr_id);
$goods_attr = implode('|', $goods_attr_id);
$sql = "SELECT product_id FROM " . $ecs->table('products') . " WHERE goods_attr = '$goods_attr' AND goods_id = '" . $goods['goods_id'] . "'";
$product_id = $db->getOne($sql);
}
$sql = "INSERT INTO " . $ecs->table('order_goods') . "( " .
"order_id, goods_id, goods_name, goods_sn, product_id, goods_number, market_price, ".
"goods_price, goods_attr, is_real, extension_code, parent_id, is_gift) ".
" SELECT '$new_order_id', goods_id, goods_name, goods_sn, '$product_id','$goods[goods_number]', market_price, ".
"'$goods[goods_price]', '$goods[goods_attr]', is_real, extension_code, 0, 0 ".
" FROM " .$ecs->table('goods') .
" WHERE goods_id = '$goods[goods_id]'";
$db->query($sql);
}
/* 给商家发邮件 */
if ($_CFG['service_email'] != '')
{
$tpl = get_mail_template('remind_of_new_order');
$smarty->assign('order', $order);
$smarty->assign('shop_name', $_CFG['shop_name']);
$smarty->assign('send_date', date($_CFG['time_format']));
$content = $smarty->fetch('str:' . $tpl['template_content']);
send_mail($_CFG['shop_name'], $_CFG['service_email'], $tpl['template_subject'], $content, $tpl['is_html']);
}
/* 如果需要,发短信 */
if ($_CFG['sms_order_placed'] == '1' && $_CFG['sms_shop_mobile'] != '')
{
include_once('includes/cls_sms.php');
$sms = new sms();
$msg = $_LANG['order_placed_sms'];
$sms->send($_CFG['sms_shop_mobile'], sprintf($msg, $order['consignee'], $order['tel']), 0);
}
/* 清空购物车 */
unset($_SESSION['wholesale_goods']);
/* 提示 */
show_message(sprintf($_LANG['ws_order_submitted'], $order['order_sn']), $_LANG['ws_return_home'], 'index.php');
}
/**
* 取得某页的批发商品
* @param int $size 每页记录数
* @param int $page 当前页
* @param string $where 查询条件
* @return array
*/
function wholesale_list($size, $page, $where)
{
$list = array();
$sql = "SELECT w.*, g.goods_thumb, g.goods_name as goods_name " .
"FROM " . $GLOBALS['ecs']->table('wholesale') . " AS w, " .
$GLOBALS['ecs']->table('goods') . " AS g " . $where .
" AND w.goods_id = g.goods_id ";
$res = $GLOBALS['db']->selectLimit($sql, $size, ($page - 1) * $size);
while ($row = $GLOBALS['db']->fetchRow($res))
{
if (empty($row['goods_thumb']))
{
$row['goods_thumb'] = $GLOBALS['_CFG']['no_picture'];
}
$row['goods_url'] = build_uri('goods', array('gid'=>$row['goods_id']), $row['goods_name']);
$properties = get_goods_properties($row['goods_id']);
$row['goods_attr'] = $properties['pro'];
$price_ladder = get_price_ladder($row['goods_id']);
$row['price_ladder'] = $price_ladder;
$list[] = $row;
}
return $list;
}
/**
* 商品价格阶梯
* @param int $goods_id 商品ID
* @return array
*/
function get_price_ladder($goods_id)
{
/* 显示商品规格 */
$goods_attr_list = array_values(get_goods_attr($goods_id));
$sql = "SELECT prices FROM " . $GLOBALS['ecs']->table('wholesale') .
"WHERE goods_id = " . $goods_id;
$row = $GLOBALS['db']->getRow($sql);
$arr = array();
$_arr = unserialize($row['prices']);
if (is_array($_arr))
{
foreach(unserialize($row['prices']) as $key => $val)
{
// 显示属性
if (!empty($val['attr']))
{
foreach ($val['attr'] as $attr_key => $attr_val)
{
// 获取当前属性 $attr_key 的信息
$goods_attr = array();
foreach ($goods_attr_list as $goods_attr_val)
{
if ($goods_attr_val['attr_id'] == $attr_key)
{
$goods_attr = $goods_attr_val;
break;
}
}
// 重写商品规格的价格阶梯信息
if (!empty($goods_attr))
{
$arr[$key]['attr'][] = array(
'attr_id' => $goods_attr['attr_id'],
'attr_name' => $goods_attr['attr_name'],
'attr_val' => (isset($goods_attr['goods_attr_list'][$attr_val]) ? $goods_attr['goods_attr_list'][$attr_val] : ''),
'attr_val_id' => $attr_val
);
}
}
}
// 显示数量与价格
foreach($val['qp_list'] as $index => $qp)
{
$arr[$key]['qp_list'][$qp['quantity']] = price_format($qp['price']);
}
}
}
return $arr;
}
/**
* 商品属性是否匹配
* @param array $goods_list 用户选择的商品
* @param array $reference 参照的商品属性
* @return bool
*/
function is_attr_matching(&$goods_list, $reference)
{
foreach ($goods_list as $key => $goods)
{
// 需要相同的元素个数
if (count($goods['goods_attr']) != count($reference))
{
break;
}
// 判断用户提交与批发属性是否相同
$is_check = true;
if (is_array($goods['goods_attr']))
{
foreach ($goods['goods_attr'] as $attr)
{
if (!(array_key_exists($attr['attr_id'], $reference) && $attr['attr_val_id'] == $reference[$attr['attr_id']]))
{
$is_check = false;
break;
}
}
}
if ($is_check)
{
return $key;
break;
}
}
// foreach ($goods_attr as $attr_id => $goods_attr_id)
// {
// if (isset($reference[$attr_id]) && $reference[$attr_id] != 0 && $reference[$attr_id] != $goods_attr_id)
// {
// return false;
// }
// }
return false;
}
///**
// * 购物车中的商品属性与当前购买的商品属性是否匹配
// * @param array $goods_attr 用户选择的商品属性
// * @param array $reference 参照的商品属性
// * @return bool
// */
//function is_attr_same($goods_attr, $reference)
//{
// /* 比较元素个数是否相同 */
// if (count($goods_attr) == count($reference)) {
// }
//
// return true;
//}
?>
| zzshop | trunk/wholesale.php | PHP | asf20 | 20,690 |
<?php
/**
* ECSHOP 商品分类
* ============================================================================
* 版权所有 2005-2010 上海商派网络科技有限公司,并保留所有权利。
* 网站地址: http://www.ecshop.com;
* ----------------------------------------------------------------------------
* 这不是一个自由软件!您只能在不用于商业目的的前提下对程序代码进行修改和
* 使用;不允许对程序代码以任何形式任何目的的再发布。
* ============================================================================
* $Author: liuhui $
* $Id: category.php 17156 2010-05-10 03:50:47Z liuhui $
*/
define('IN_ECS', true);
require(dirname(__FILE__) . '/includes/init.php');
if ((DEBUG_MODE & 2) != 2)
{
$smarty->caching = true;
}
/*------------------------------------------------------ */
//-- INPUT
/*------------------------------------------------------ */
/* 获得请求的分类 ID */
if (isset($_REQUEST['id']))
{
$cat_id = intval($_REQUEST['id']);
}
elseif (isset($_REQUEST['category']))
{
$cat_id = intval($_REQUEST['category']);
}
else
{
/* 如果分类ID为0,则返回首页 */
ecs_header("Location: ./\n");
exit;
}
/* 初始化分页信息 */
$page = isset($_REQUEST['page']) && intval($_REQUEST['page']) > 0 ? intval($_REQUEST['page']) : 1;
$size = isset($_CFG['page_size']) && intval($_CFG['page_size']) > 0 ? intval($_CFG['page_size']) : 10;
$brand = isset($_REQUEST['brand']) && intval($_REQUEST['brand']) > 0 ? intval($_REQUEST['brand']) : 0;
$price_max = isset($_REQUEST['price_max']) && intval($_REQUEST['price_max']) > 0 ? intval($_REQUEST['price_max']) : 0;
$price_min = isset($_REQUEST['price_min']) && intval($_REQUEST['price_min']) > 0 ? intval($_REQUEST['price_min']) : 0;
$filter_attr_str = isset($_REQUEST['filter_attr']) ? trim($_REQUEST['filter_attr']) : '0';
$filter_attr_str = urldecode($filter_attr_str);
$filter_attr = empty($filter_attr_str) ? '' : explode('.', trim($filter_attr_str));
/* 排序、显示方式以及类型 */
$default_display_type = $_CFG['show_order_type'] == '0' ? 'list' : ($_CFG['show_order_type'] == '1' ? 'grid' : 'text');
$default_sort_order_method = $_CFG['sort_order_method'] == '0' ? 'DESC' : 'ASC';
$default_sort_order_type = $_CFG['sort_order_type'] == '0' ? 'goods_id' : ($_CFG['sort_order_type'] == '1' ? 'shop_price' : 'last_update');
$sort = (isset($_REQUEST['sort']) && in_array(trim(strtolower($_REQUEST['sort'])), array('goods_id', 'shop_price', 'last_update'))) ? trim($_REQUEST['sort']) : $default_sort_order_type;
$order = (isset($_REQUEST['order']) && in_array(trim(strtoupper($_REQUEST['order'])), array('ASC', 'DESC'))) ? trim($_REQUEST['order']) : $default_sort_order_method;
$display = (isset($_REQUEST['display']) && in_array(trim(strtolower($_REQUEST['display'])), array('list', 'grid', 'text'))) ? trim($_REQUEST['display']) : (isset($_COOKIE['ECS']['display']) ? $_COOKIE['ECS']['display'] : $default_display_type);
setcookie('ECS[display]', $display, gmtime() + 86400 * 7);
/*------------------------------------------------------ */
//-- PROCESSOR
/*------------------------------------------------------ */
/* 页面的缓存ID */
$cache_id = sprintf('%X', crc32($cat_id . '-' . $display . '-' . $sort .'-' . $order .'-' . $page . '-' . $size . '-' . $_SESSION['user_rank'] . '-' .
$_CFG['lang'] .'-'. $brand. '-' . $price_max . '-' .$price_min . '-' . $filter_attr_str));
if (!$smarty->is_cached('category.dwt', $cache_id))
{
/* 如果页面没有被缓存则重新获取页面的内容 */
$children = get_children($cat_id);
$cat = get_cat_info($cat_id); // 获得分类的相关信息
if (!empty($cat))
{
$smarty->assign('keywords', htmlspecialchars($cat['keywords']));
$smarty->assign('description', htmlspecialchars($cat['cat_desc']));
$smarty->assign('cat_style', htmlspecialchars($cat['style']));
}
else
{
/* 如果分类不存在则返回首页 */
ecs_header("Location: ./\n");
exit;
}
/* 赋值固定内容 */
if ($brand > 0)
{
$sql = "SELECT brand_name FROM " .$GLOBALS['ecs']->table('brand'). " WHERE brand_id = '$brand'";
$brand_name = $db->getOne($sql);
}
else
{
$brand_name = '';
}
/* 获取价格分级 */
if ($cat['grade'] == 0 && $cat['parent_id'] != 0)
{
$cat['grade'] = get_parent_grade($cat_id); //如果当前分类级别为空,取最近的上级分类
}
if ($cat['grade'] > 1)
{
/* 需要价格分级 */
/*
算法思路:
1、当分级大于1时,进行价格分级
2、取出该类下商品价格的最大值、最小值
3、根据商品价格的最大值来计算商品价格的分级数量级:
价格范围(不含最大值) 分级数量级
0-0.1 0.001
0.1-1 0.01
1-10 0.1
10-100 1
100-1000 10
1000-10000 100
4、计算价格跨度:
取整((最大值-最小值) / (价格分级数) / 数量级) * 数量级
5、根据价格跨度计算价格范围区间
6、查询数据库
可能存在问题:
1、
由于价格跨度是由最大值、最小值计算出来的
然后再通过价格跨度来确定显示时的价格范围区间
所以可能会存在价格分级数量不正确的问题
该问题没有证明
2、
当价格=最大值时,分级会多出来,已被证明存在
*/
$sql = "SELECT min(g.shop_price) AS min, max(g.shop_price) as max ".
" FROM " . $ecs->table('goods'). " AS g ".
" WHERE ($children OR " . get_extension_goods($children) . ') AND g.is_delete = 0 AND g.is_on_sale = 1 AND g.is_alone_sale = 1 ';
//获得当前分类下商品价格的最大值、最小值
$row = $db->getRow($sql);
// 取得价格分级最小单位级数,比如,千元商品最小以100为级数
$price_grade = 0.0001;
for($i=-2; $i<= log10($row['max']); $i++)
{
$price_grade *= 10;
}
//跨度
$dx = ceil(($row['max'] - $row['min']) / ($cat['grade']) / $price_grade) * $price_grade;
if($dx == 0)
{
$dx = $price_grade;
}
for($i = 1; $row['min'] > $dx * $i; $i ++);
for($j = 1; $row['min'] > $dx * ($i-1) + $price_grade * $j; $j++);
$row['min'] = $dx * ($i-1) + $price_grade * ($j - 1);
for(; $row['max'] >= $dx * $i; $i ++);
$row['max'] = $dx * ($i) + $price_grade * ($j - 1);
$sql = "SELECT (FLOOR((g.shop_price - $row[min]) / $dx)) AS sn, COUNT(*) AS goods_num ".
" FROM " . $ecs->table('goods') . " AS g ".
" WHERE ($children OR " . get_extension_goods($children) . ') AND g.is_delete = 0 AND g.is_on_sale = 1 AND g.is_alone_sale = 1 '.
" GROUP BY sn ";
$price_grade = $db->getAll($sql);
foreach ($price_grade as $key=>$val)
{
$temp_key = $key + 1;
$price_grade[$temp_key]['goods_num'] = $val['goods_num'];
$price_grade[$temp_key]['start'] = $row['min'] + round($dx * $val['sn']);
$price_grade[$temp_key]['end'] = $row['min'] + round($dx * ($val['sn'] + 1));
$price_grade[$temp_key]['price_range'] = $price_grade[$temp_key]['start'] . ' - ' . $price_grade[$temp_key]['end'];
$price_grade[$temp_key]['formated_start'] = price_format($price_grade[$temp_key]['start']);
$price_grade[$temp_key]['formated_end'] = price_format($price_grade[$temp_key]['end']);
$price_grade[$temp_key]['url'] = build_uri('category', array('cid'=>$cat_id, 'bid'=>$brand, 'price_min'=>$price_grade[$temp_key]['start'], 'price_max'=> $price_grade[$temp_key]['end'], 'filter_attr'=>$filter_attr_str), $cat['cat_name']);
/* 判断价格区间是否被选中 */
if (isset($_REQUEST['price_min']) && $price_grade[$temp_key]['start'] == $price_min && $price_grade[$temp_key]['end'] == $price_max)
{
$price_grade[$temp_key]['selected'] = 1;
}
else
{
$price_grade[$temp_key]['selected'] = 0;
}
}
$price_grade[0]['start'] = 0;
$price_grade[0]['end'] = 0;
$price_grade[0]['price_range'] = $_LANG['all_attribute'];
$price_grade[0]['url'] = build_uri('category', array('cid'=>$cat_id, 'bid'=>$brand, 'price_min'=>0, 'price_max'=> 0, 'filter_attr'=>$filter_attr_str), $cat['cat_name']);
$price_grade[0]['selected'] = empty($price_max) ? 1 : 0;
$smarty->assign('price_grade', $price_grade);
}
/* 品牌筛选 */
$sql = "SELECT b.brand_id, b.brand_name, COUNT(*) AS goods_num ".
"FROM " . $GLOBALS['ecs']->table('brand') . "AS b, ".
$GLOBALS['ecs']->table('goods') . " AS g LEFT JOIN ". $GLOBALS['ecs']->table('goods_cat') . " AS gc ON g.goods_id = gc.goods_id " .
"WHERE g.brand_id = b.brand_id AND ($children OR " . 'gc.cat_id ' . db_create_in(array_unique(array_merge(array($cat_id), array_keys(cat_list($cat_id, 0, false))))) . ") AND b.is_show = 1 " .
" AND g.is_on_sale = 1 AND g.is_alone_sale = 1 AND g.is_delete = 0 ".
"GROUP BY b.brand_id HAVING goods_num > 0 ORDER BY b.sort_order, b.brand_id ASC";
$brands = $GLOBALS['db']->getAll($sql);
foreach ($brands AS $key => $val)
{
$temp_key = $key + 1;
$brands[$temp_key]['brand_name'] = $val['brand_name'];
$brands[$temp_key]['url'] = build_uri('category', array('cid' => $cat_id, 'bid' => $val['brand_id'], 'price_min'=>$price_min, 'price_max'=> $price_max, 'filter_attr'=>$filter_attr_str), $cat['cat_name']);
/* 判断品牌是否被选中 */
if ($brand == $brands[$key]['brand_id'])
{
$brands[$temp_key]['selected'] = 1;
}
else
{
$brands[$temp_key]['selected'] = 0;
}
}
$brands[0]['brand_name'] = $_LANG['all_attribute'];
$brands[0]['url'] = build_uri('category', array('cid' => $cat_id, 'bid' => 0, 'price_min'=>$price_min, 'price_max'=> $price_max, 'filter_attr'=>$filter_attr_str), $cat['cat_name']);
$brands[0]['selected'] = empty($brand) ? 1 : 0;
$smarty->assign('brands', $brands);
/* 属性筛选 */
$ext = ''; //商品查询条件扩展
if ($cat['filter_attr'] > 0)
{
$cat_filter_attr = explode(',', $cat['filter_attr']); //提取出此分类的筛选属性
$all_attr_list = array();
foreach ($cat_filter_attr AS $key => $value)
{
$sql = "SELECT a.attr_name FROM " . $ecs->table('attribute') . " AS a, " . $ecs->table('goods_attr') . " AS ga, " . $ecs->table('goods') . " AS g WHERE ($children OR " . get_extension_goods($children) . ") AND a.attr_id = ga.attr_id AND g.goods_id = ga.goods_id AND g.is_delete = 0 AND g.is_on_sale = 1 AND g.is_alone_sale = 1 AND a.attr_id='$value'";
if($temp_name = $db->getOne($sql))
{
$all_attr_list[$key]['filter_attr_name'] = $temp_name;
$sql = "SELECT a.attr_id, MIN(a.goods_attr_id ) AS goods_id, a.attr_value AS attr_value FROM " . $ecs->table('goods_attr') . " AS a, " . $ecs->table('goods') .
" AS g" .
" WHERE ($children OR " . get_extension_goods($children) . ') AND g.goods_id = a.goods_id AND g.is_delete = 0 AND g.is_on_sale = 1 AND g.is_alone_sale = 1 '.
" AND a.attr_id='$value' ".
" GROUP BY a.attr_value";
$attr_list = $db->getAll($sql);
$temp_arrt_url_arr = array();
for ($i = 0; $i < count($cat_filter_attr); $i++) //获取当前url中已选择属性的值,并保留在数组中
{
$temp_arrt_url_arr[$i] = !empty($filter_attr[$i]) ? $filter_attr[$i] : 0;
}
$temp_arrt_url_arr[$key] = 0; //“全部”的信息生成
$temp_arrt_url = implode('.', $temp_arrt_url_arr);
$all_attr_list[$key]['attr_list'][0]['attr_value'] = $_LANG['all_attribute'];
$all_attr_list[$key]['attr_list'][0]['url'] = build_uri('category', array('cid'=>$cat_id, 'bid'=>$brand, 'price_min'=>$price_min, 'price_max'=>$price_max, 'filter_attr'=>$temp_arrt_url), $cat['cat_name']);
$all_attr_list[$key]['attr_list'][0]['selected'] = empty($filter_attr[$key]) ? 1 : 0;
foreach ($attr_list as $k => $v)
{
$temp_key = $k + 1;
$temp_arrt_url_arr[$key] = $v['goods_id']; //为url中代表当前筛选属性的位置变量赋值,并生成以‘.’分隔的筛选属性字符串
$temp_arrt_url = implode('.', $temp_arrt_url_arr);
$all_attr_list[$key]['attr_list'][$temp_key]['attr_value'] = $v['attr_value'];
$all_attr_list[$key]['attr_list'][$temp_key]['url'] = build_uri('category', array('cid'=>$cat_id, 'bid'=>$brand, 'price_min'=>$price_min, 'price_max'=>$price_max, 'filter_attr'=>$temp_arrt_url), $cat['cat_name']);
if (!empty($filter_attr[$key]) AND $filter_attr[$key] == $v['goods_id'])
{
$all_attr_list[$key]['attr_list'][$temp_key]['selected'] = 1;
}
else
{
$all_attr_list[$key]['attr_list'][$temp_key]['selected'] = 0;
}
}
}
}
$smarty->assign('filter_attr_list', $all_attr_list);
/* 扩展商品查询条件 */
if (!empty($filter_attr))
{
$ext_sql = "SELECT DISTINCT(b.goods_id) FROM " . $ecs->table('goods_attr') . " AS a, " . $ecs->table('goods_attr') . " AS b " . "WHERE ";
$ext_group_goods = array();
foreach ($filter_attr AS $k => $v) // 查出符合所有筛选属性条件的商品id */
{
if (is_numeric($v) && $v !=0 )
{
$sql = $ext_sql . "b.attr_value = a.attr_value AND b.attr_id = " . $cat_filter_attr[$k] ." AND a.goods_attr_id = " . $v;
$ext_group_goods = $db->getColCached($sql);
$ext .= ' AND ' . db_create_in($ext_group_goods, 'g.goods_id');
}
}
}
}
assign_template('c', array($cat_id));
$position = assign_ur_here($cat_id, $brand_name);
$smarty->assign('page_title', $position['title']); // 页面标题
$smarty->assign('ur_here', $position['ur_here']); // 当前位置
$smarty->assign('categories', get_categories_tree($cat_id)); // 分类树
$smarty->assign('helps', get_shop_help()); // 网店帮助
$smarty->assign('top_goods', get_top10()); // 销售排行
$smarty->assign('show_marketprice', $_CFG['show_marketprice']);
$smarty->assign('category', $cat_id);
$smarty->assign('brand_id', $brand);
$smarty->assign('price_max', $price_max);
$smarty->assign('price_min', $price_min);
$smarty->assign('filter_attr', $filter_attr_str);
$smarty->assign('feed_url', ($_CFG['rewrite'] == 1) ? "feed-c$cat_id.xml" : 'feed.php?cat=' . $cat_id); // RSS URL
if ($brand > 0)
{
$arr['all'] = array('brand_id' => 0,
'brand_name' => $GLOBALS['_LANG']['all_goods'],
'brand_logo' => '',
'goods_num' => '',
'url' => build_uri('category', array('cid'=>$cat_id), $cat['cat_name'])
);
}
else
{
$arr = array();
}
$brand_list = array_merge($arr, get_brands($cat_id, 'category'));
$smarty->assign('data_dir', DATA_DIR);
$smarty->assign('brand_list', $brand_list);
$smarty->assign('promotion_info', get_promotion_info());
/* 调查 */
$vote = get_vote();
if (!empty($vote))
{
$smarty->assign('vote_id', $vote['id']);
$smarty->assign('vote', $vote['content']);
}
$smarty->assign('best_goods', get_category_recommend_goods('best', $children, $brand, $price_min, $price_max, $ext));
$smarty->assign('promotion_goods', get_category_recommend_goods('promote', $children, $brand, $price_min, $price_max, $ext));
$smarty->assign('hot_goods', get_category_recommend_goods('hot', $children, $brand, $price_min, $price_max, $ext));
$count = get_cagtegory_goods_count($children, $brand, $price_min, $price_max, $ext);
$max_page = ($count> 0) ? ceil($count / $size) : 1;
if ($page > $max_page)
{
$page = $max_page;
}
$goodslist = category_get_goods($children, $brand, $price_min, $price_max, $ext, $size, $page, $sort, $order);
if($display == 'grid')
{
if(count($goodslist) % 2 != 0)
{
$goodslist[] = array();
}
}
$smarty->assign('goods_list', $goodslist);
$smarty->assign('category', $cat_id);
$smarty->assign('script_name', 'category');
assign_pager('category', $cat_id, $count, $size, $sort, $order, $page, '', $brand, $price_min, $price_max, $display, $filter_attr_str); // 分页
assign_dynamic('category'); // 动态内容
}
$smarty->display('category.dwt', $cache_id);
/*------------------------------------------------------ */
//-- PRIVATE FUNCTION
/*------------------------------------------------------ */
/**
* 获得分类的信息
*
* @param integer $cat_id
*
* @return void
*/
function get_cat_info($cat_id)
{
return $GLOBALS['db']->getRow('SELECT cat_name, keywords, cat_desc, style, grade, filter_attr, parent_id FROM ' . $GLOBALS['ecs']->table('category') .
" WHERE cat_id = '$cat_id'");
}
/**
* 获得分类下的商品
*
* @access public
* @param string $children
* @return array
*/
function category_get_goods($children, $brand, $min, $max, $ext, $size, $page, $sort, $order)
{
$display = $GLOBALS['display'];
$where = "g.is_on_sale = 1 AND g.is_alone_sale = 1 AND ".
"g.is_delete = 0 AND ($children OR " . get_extension_goods($children) . ')';
if ($brand > 0)
{
$where .= "AND g.brand_id=$brand ";
}
if ($min > 0)
{
$where .= " AND g.shop_price >= $min ";
}
if ($max > 0)
{
$where .= " AND g.shop_price <= $max ";
}
/* 获得商品列表 */
$sql = 'SELECT g.goods_id, g.goods_name, g.goods_name_style, g.market_price, g.is_new, g.is_best, g.is_hot, g.shop_price AS org_price, ' .
"IFNULL(mp.user_price, g.shop_price * '$_SESSION[discount]') AS shop_price, g.promote_price, g.goods_type, " .
'g.promote_start_date, g.promote_end_date, g.goods_brief, g.goods_thumb , g.goods_img ' .
'FROM ' . $GLOBALS['ecs']->table('goods') . ' AS g ' .
'LEFT JOIN ' . $GLOBALS['ecs']->table('member_price') . ' AS mp ' .
"ON mp.goods_id = g.goods_id AND mp.user_rank = '$_SESSION[user_rank]' " .
"WHERE $where $ext ORDER BY $sort $order";
$res = $GLOBALS['db']->selectLimit($sql, $size, ($page - 1) * $size);
$arr = array();
while ($row = $GLOBALS['db']->fetchRow($res))
{
if ($row['promote_price'] > 0)
{
$promote_price = bargain_price($row['promote_price'], $row['promote_start_date'], $row['promote_end_date']);
}
else
{
$promote_price = 0;
}
/* 处理商品水印图片 */
$watermark_img = '';
if ($promote_price != 0)
{
$watermark_img = "watermark_promote_small";
}
elseif ($row['is_new'] != 0)
{
$watermark_img = "watermark_new_small";
}
elseif ($row['is_best'] != 0)
{
$watermark_img = "watermark_best_small";
}
elseif ($row['is_hot'] != 0)
{
$watermark_img = 'watermark_hot_small';
}
if ($watermark_img != '')
{
$arr[$row['goods_id']]['watermark_img'] = $watermark_img;
}
$arr[$row['goods_id']]['goods_id'] = $row['goods_id'];
if($display == 'grid')
{
$arr[$row['goods_id']]['goods_name'] = $GLOBALS['_CFG']['goods_name_length'] > 0 ? sub_str($row['goods_name'], $GLOBALS['_CFG']['goods_name_length']) : $row['goods_name'];
}
else
{
$arr[$row['goods_id']]['goods_name'] = $row['goods_name'];
}
$arr[$row['goods_id']]['name'] = $row['goods_name'];
$arr[$row['goods_id']]['goods_brief'] = $row['goods_brief'];
$arr[$row['goods_id']]['goods_style_name'] = add_style($row['goods_name'],$row['goods_name_style']);
$arr[$row['goods_id']]['market_price'] = price_format($row['market_price']);
$arr[$row['goods_id']]['shop_price'] = price_format($row['shop_price']);
$arr[$row['goods_id']]['type'] = $row['goods_type'];
$arr[$row['goods_id']]['promote_price'] = ($promote_price > 0) ? price_format($promote_price) : '';
$arr[$row['goods_id']]['goods_thumb'] = get_image_path($row['goods_id'], $row['goods_thumb'], true);
$arr[$row['goods_id']]['goods_img'] = get_image_path($row['goods_id'], $row['goods_img']);
$arr[$row['goods_id']]['url'] = build_uri('goods', array('gid'=>$row['goods_id']), $row['goods_name']);
}
return $arr;
}
/**
* 获得分类下的商品总数
*
* @access public
* @param string $cat_id
* @return integer
*/
function get_cagtegory_goods_count($children, $brand = 0, $min = 0, $max = 0, $ext='')
{
$where = "g.is_on_sale = 1 AND g.is_alone_sale = 1 AND g.is_delete = 0 AND ($children OR " . get_extension_goods($children) . ')';
if ($brand > 0)
{
$where .= " AND g.brand_id = $brand ";
}
if ($min > 0)
{
$where .= " AND g.shop_price >= $min ";
}
if ($max > 0)
{
$where .= " AND g.shop_price <= $max ";
}
/* 返回商品总数 */
return $GLOBALS['db']->getOne('SELECT COUNT(*) FROM ' . $GLOBALS['ecs']->table('goods') . " AS g WHERE $where $ext");
}
/**
* 取得最近的上级分类的grade值
*
* @access public
* @param int $cat_id //当前的cat_id
*
* @return int
*/
function get_parent_grade($cat_id)
{
static $res = NULL;
if ($res === NULL)
{
$data = read_static_cache('cat_parent_grade');
if ($data === false)
{
$sql = "SELECT parent_id, cat_id, grade ".
" FROM " . $GLOBALS['ecs']->table('category');
$res = $GLOBALS['db']->getAll($sql);
write_static_cache('cat_parent_grade', $res);
}
else
{
$res = $data;
}
}
if (!$res)
{
return 0;
}
$parent_arr = array();
$grade_arr = array();
foreach ($res as $val)
{
$parent_arr[$val['cat_id']] = $val['parent_id'];
$grade_arr[$val['cat_id']] = $val['grade'];
}
while ($parent_arr[$cat_id] >0 && $grade_arr[$cat_id] == 0)
{
$cat_id = $parent_arr[$cat_id];
}
return $grade_arr[$cat_id];
}
?>
| zzshop | trunk/category.php | PHP | asf20 | 24,827 |
<?php
/**
* ECSHOP 专题前台
* ============================================================================
* 版权所有 2005-2010 上海商派网络科技有限公司,并保留所有权利。
* 网站地址: http://www.ecshop.com;
* ----------------------------------------------------------------------------
* 这不是一个自由软件!您只能在不用于商业目的的前提下对程序代码进行修改和
* 使用;不允许对程序代码以任何形式任何目的的再发布。
* ============================================================================
* @author: webboy <laupeng@163.com>
* @version: v2.1
* ---------------------------------------------
*/
define('IN_ECS', true);
require(dirname(__FILE__) . '/includes/init.php');
if ((DEBUG_MODE & 2) != 2)
{
$smarty->caching = true;
}
$topic_id = empty($_REQUEST['topic_id']) ? 0 : intval($_REQUEST['topic_id']);
$sql = "SELECT template FROM " . $ecs->table('topic') .
"WHERE topic_id = '$topic_id' and " . gmtime() . " >= start_time and " . gmtime() . "<= end_time";
$topic = $db->getRow($sql);
if(empty($topic))
{
/* 如果没有找到任何记录则跳回到首页 */
ecs_header("Location: ./\n");
exit;
}
$templates = empty($topic['template']) ? 'topic.dwt' : $topic['template'];
$cache_id = sprintf('%X', crc32($_SESSION['user_rank'] . '-' . $_CFG['lang'] . '-' . $topic_id));
if (!$smarty->is_cached($templates, $cache_id))
{
$sql = "SELECT * FROM " . $ecs->table('topic') . " WHERE topic_id = '$topic_id'";
$topic = $db->getRow($sql);
$topic['data'] = addcslashes($topic['data'], "'");
$tmp = @unserialize($topic["data"]);
$arr = (array)$tmp;
$goods_id = array();
foreach ($arr AS $key=>$value)
{
foreach($value AS $k => $val)
{
$opt = explode('|', $val);
$arr[$key][$k] = $opt[1];
$goods_id[] = $opt[1];
}
}
$sql = 'SELECT g.goods_id, g.goods_name, g.goods_name_style, g.market_price, g.is_new, g.is_best, g.is_hot, g.shop_price AS org_price, ' .
"IFNULL(mp.user_price, g.shop_price * '$_SESSION[discount]') AS shop_price, g.promote_price, " .
'g.promote_start_date, g.promote_end_date, g.goods_brief, g.goods_thumb , g.goods_img ' .
'FROM ' . $GLOBALS['ecs']->table('goods') . ' AS g ' .
'LEFT JOIN ' . $GLOBALS['ecs']->table('member_price') . ' AS mp ' .
"ON mp.goods_id = g.goods_id AND mp.user_rank = '$_SESSION[user_rank]' " .
"WHERE " . db_create_in($goods_id, 'g.goods_id');
$res = $GLOBALS['db']->query($sql);
$sort_goods_arr = array();
while ($row = $GLOBALS['db']->fetchRow($res))
{
if ($row['promote_price'] > 0)
{
$promote_price = bargain_price($row['promote_price'], $row['promote_start_date'], $row['promote_end_date']);
$row['promote_price'] = $promote_price > 0 ? price_format($promote_price) : '';
}
else
{
$row['promote_price'] = '';
}
if ($row['shop_price'] > 0)
{
$row['shop_price'] = price_format($row['shop_price']);
}
else
{
$row['shop_price'] = '';
}
$row['url'] = build_uri('goods', array('gid'=>$row['goods_id']), $row['goods_name']);
$row['goods_style_name'] = add_style($row['goods_name'], $row['goods_name_style']);
$row['short_name'] = $GLOBALS['_CFG']['goods_name_length'] > 0 ?
sub_str($row['goods_name'], $GLOBALS['_CFG']['goods_name_length']) : $row['goods_name'];
$row['goods_thumb'] = get_image_path($row['goods_id'], $row['goods_thumb'], true);
$row['short_style_name'] = add_style($row['short_name'], $row['goods_name_style']);
foreach ($arr AS $key => $value)
{
foreach ($value AS $val)
{
if ($val == $row['goods_id'])
{
$key = $key == 'default' ? $_LANG['all_goods'] : $key;
$sort_goods_arr[$key][] = $row;
}
}
}
}
/* 模板赋值 */
assign_template();
$position = assign_ur_here();
$smarty->assign('page_title', $position['title']); // 页面标题
$smarty->assign('ur_here', $position['ur_here'] . '> ' . $topic['title']); // 当前位置
$smarty->assign('show_marketprice', $_CFG['show_marketprice']);
$smarty->assign('sort_goods_arr', $sort_goods_arr); // 商品列表
$smarty->assign('topic', $topic); // 专题信息
$smarty->assign('keywords', $topic['keywords']); // 专题信息
$smarty->assign('description', $topic['description']); // 专题信息
$smarty->assign('title_pic', $topic['title_pic']); // 分类标题图片地址
$smarty->assign('base_style', '#' . $topic['base_style']); // 基本风格样式颜色
$template_file = empty($topic['template']) ? 'topic.dwt' : $topic['template'];
}
/* 显示模板 */
$smarty->display($templates, $cache_id);
?> | zzshop | trunk/topic.php | PHP | asf20 | 5,385 |
<?php
/**
* ECSHOP 支付配送DEMO
* ============================================================================
* 版权所有 2005-2010 上海商派网络科技有限公司,并保留所有权利。
* 网站地址: http://www.ecshop.com;
* ----------------------------------------------------------------------------
* 这不是一个自由软件!您只能在不用于商业目的的前提下对程序代码进行修改和
* 使用;不允许对程序代码以任何形式任何目的的再发布。
* ============================================================================
* $Author: liuhui $
* $Id: myship.php 17063 2010-03-25 06:35:46Z liuhui $
*/
define('IN_ECS', true);
require(dirname(__FILE__) . '/includes/init.php');
require_once(ROOT_PATH . 'includes/lib_order.php');
include_once(ROOT_PATH . 'includes/lib_transaction.php');
/* 载入语言文件 */
require_once(ROOT_PATH . 'languages/' .$_CFG['lang']. '/shopping_flow.php');
require_once(ROOT_PATH . 'languages/' .$_CFG['lang']. '/user.php');
/*------------------------------------------------------ */
//-- INPUT
/*------------------------------------------------------ */
if ($_SESSION['user_id'] > 0)
{
$consignee_list = get_consignee_list($_SESSION['user_id']);
$choose['country'] = isset($_POST['country']) ? $_POST['country'] : $consignee_list[0]['country'];
$choose['province'] = isset($_POST['province']) ? $_POST['province'] : $consignee_list[0]['province'];
$choose['city'] = isset($_POST['city']) ? $_POST['city'] : $consignee_list[0]['city'];
$choose['district'] = isset($_POST['district']) ? $_POST['district'] : (isset($consignee_list[0]['district']) ? $consignee_list[0]['district'] : 0 );
}
else
{
$choose['country'] = isset($_POST['country']) ? $_POST['country'] : $_CFG['shop_country'];
$choose['province'] = isset($_POST['province']) ? $_POST['province'] : 2;
$choose['city'] = isset($_POST['city']) ? $_POST['city'] : 35;
$choose['district'] = isset($_POST['district']) ? $_POST['district'] : 417;
}
/*------------------------------------------------------ */
//-- PROCESSOR
/*------------------------------------------------------ */
assign_template();
assign_dynamic('myship');
$position = assign_ur_here(0, $_LANG['shopping_myship']);
$smarty->assign('page_title', $position['title']); // 页面标题
$smarty->assign('ur_here', $position['ur_here']); // 当前位置
$smarty->assign('helps', get_shop_help()); // 网店帮助
$smarty->assign('lang', $_LANG);
$smarty->assign('choose', $choose);
$province_list[NULL] = get_regions(1, $choose['country']);
$city_list[NULL] = get_regions(2, $choose['province']);
$district_list[NULL] = get_regions(3, $choose['city']);
$smarty->assign('province_list', $province_list);
$smarty->assign('city_list', $city_list);
$smarty->assign('district_list', $district_list);
/* 取得国家列表、商店所在国家、商店所在国家的省列表 */
$smarty->assign('country_list', get_regions());
/* 取得配送列表 */
$region = array($choose['country'], $choose['province'], $choose['city'], $choose['district']);
$shipping_list = available_shipping_list($region);
$cart_weight_price = 0;
$insure_disabled = true;
$cod_disabled = true;
foreach ($shipping_list AS $key => $val)
{
$shipping_cfg = unserialize_config($val['configure']);
$shipping_fee = shipping_fee($val['shipping_code'], unserialize($val['configure']),
$cart_weight_price['weight'], $cart_weight_price['amount']);
$shipping_list[$key]['format_shipping_fee'] = price_format($shipping_fee, false);
$shipping_list[$key]['fee'] = $shipping_fee;
$shipping_list[$key]['free_money'] = price_format($shipping_cfg['free_money'], false);
$shipping_list[$key]['insure_formated'] = strpos($val['insure'], '%') === false ?
price_format($val['insure'], false) : $val['insure'];
}
$smarty->assign('shipping_list', $shipping_list);
$smarty->display('myship.dwt');
?> | zzshop | trunk/myship.php | PHP | asf20 | 4,140 |
<?php
/**
* ECSHOP 生成商品列表
* ============================================================================
* 版权所有 2005-2010 上海商派网络科技有限公司,并保留所有权利。
* 网站地址: http://www.ecshop.com;
* ----------------------------------------------------------------------------
* 这不是一个自由软件!您只能在不用于商业目的的前提下对程序代码进行修改和
* 使用;不允许对程序代码以任何形式任何目的的再发布。
* ============================================================================
* $Author: liuhui $
* $Id: goods_script.php 17063 2010-03-25 06:35:46Z liuhui $
*/
define('IN_ECS', true);
define('INIT_NO_USERS', true);
require(dirname(__FILE__) . '/includes/init.php');
if ((DEBUG_MODE & 2) != 2)
{
$smarty->caching = true;
}
$charset = empty($_GET['charset']) ? EC_CHARSET : $_GET['charset'];
$type = empty($_GET['type']) ? '' : 'collection';
if (strtolower($charset) == 'gb2312')
{
$charset = 'gbk';
}
header('content-type: application/x-javascript; charset=' . ($charset == 'UTF8' ? 'utf-8' : $charset));
/*------------------------------------------------------ */
//-- 判断是否存在缓存,如果存在则调用缓存,反之读取相应内容
/*------------------------------------------------------ */
/* 缓存编号 */
$cache_id = sprintf('%X', crc32($_SERVER['QUERY_STRING']));
$tpl = ROOT_PATH . DATA_DIR . '/goods_script.html';
if (!$smarty->is_cached($tpl, $cache_id))
{
$time = gmtime();
$sql='';
/* 根据参数生成查询语句 */
if ($type == '')
{
$sitename = !empty($_GET['sitename']) ? $_GET['sitename'] : '';
$_from = (!empty($_GET['charset']) && $_GET['charset'] != 'UTF8')? urlencode(ecs_iconv('UTF-8', 'GBK', $sitename)) : urlencode(@$sitename);
$goods_url = $ecs->url() . 'affiche.php?ad_id=-1&from=' . $_from . '&goods_id=';
$sql = 'SELECT goods_id, goods_name, market_price, goods_thumb, RAND() AS rnd, ' .
"IF(is_promote = 1 AND '$time' >= promote_start_date AND ".
"'$time' <= promote_end_date, promote_price, shop_price) AS goods_price " .
'FROM ' . $ecs->table('goods') . ' AS g ' .
"WHERE is_delete = '0' AND is_on_sale = '1' AND is_alone_sale = '1' ";
if (!empty($_GET['cat_id']))
{
$sql .= ' AND ' . get_children(intval($_GET['cat_id']));
}
if (!empty($_GET['brand_id']))
{
$sql .= " AND brand_id = '" . intval($_GET['brand_id']) . "'";
}
if (!empty($_GET['intro_type']))
{
$_GET['intro_type'] = trim($_GET['intro_type']);
if ($_GET['intro_type'] == 'is_best' || $_GET['intro_type'] == 'is_new' || $_GET['intro_type'] == 'is_hot' || $_GET['intro_type'] == 'is_promote' || $_GET['intro_type'] == 'is_random')
{
if ($_GET['intro_type'] == 'is_random')
{
$sql .= ' ORDER BY rnd';
}
else
{
if ($_GET['intro_type'] == 'is_promote')
{
$sql .= " AND promote_start_date <= '$time' AND promote_end_date >= '$time'";
}
$sql .= " AND " . $_GET['intro_type'] . " = 1 ORDER BY add_time DESC";
}
}
}
}
elseif ($type == 'collection')
{
$uid = (int)$_GET['u'];
$goods_url = $ecs->url() . "goods.php?u=$uid&id=";
$sql = "SELECT g.goods_id, g.goods_name, g.market_price, g.goods_thumb, IF(g.is_promote = 1 AND '$time' >= g.promote_start_date AND ".
"'$time' <= g.promote_end_date, g.promote_price, g.shop_price) AS goods_price FROM " . $ecs->table('goods') . " g LEFT JOIN " . $ecs->table('collect_goods') . " c ON g.goods_id = c.goods_id " .
" WHERE c.user_id = '$uid'";
}
$sql .= " LIMIT " . (!empty($_GET['goods_num']) ? intval($_GET['goods_num']) : 10);
$res = $db->query($sql);
$goods_list = array();
while ($goods = $db->fetchRow($res))
{
// 转换编码
$goods['goods_price'] = price_format($goods['goods_price']);
if ($charset != EC_CHARSET)
{
if (EC_CHARSET == 'gbk')
{
$tmp_goods_name = htmlentities($goods['goods_name'], ENT_QUOTES, 'gb2312');
}
else
{
$tmp_goods_name = htmlentities($goods['goods_name'], ENT_QUOTES, EC_CHARSET);
}
$goods['goods_name'] = ecs_iconv(EC_CHARSET, $charset, $tmp_goods_name);
$goods['goods_price'] = ecs_iconv(EC_CHARSET, $charset, $goods['goods_price']);
}
$goods['goods_name'] = $GLOBALS['_CFG']['goods_name_length'] > 0 ? sub_str($goods['goods_name'], $GLOBALS['_CFG']['goods_name_length']) : $goods['goods_name'];
$goods['goods_thumb'] = get_image_path($goods['goods_id'], $goods['goods_thumb'], true);
$goods_list[] = $goods;
}
/* 排列方式 */
$arrange = empty($_GET['arrange']) || !in_array($_GET['arrange'], array('h', 'v')) ? 'h' : $_GET['arrange'];
/* 排列显示条目个数 */
$goods_num = !empty($_GET['goods_num']) ? intval($_GET['goods_num']) : 10;
$rows_num = !empty($_GET['rows_num']) ? intval($_GET['rows_num']) : '1';
if($arrange == 'h')
{
$goods_items = array_chunk($goods_list,$rows_num);
}
else
{
$columns_num = ceil($goods_num / $rows_num);
$goods_items = array_chunk($goods_list,$columns_num);
}
$smarty->assign('goods_list', $goods_items);
/* 是否需要图片 */
$need_image = empty($_GET['need_image']) || $_GET['need_image'] == 'true' ? 1 : 0;
$smarty->assign('need_image', $need_image);
/* 图片大小 */
$smarty->assign('thumb_width', intval($_CFG['thumb_width']));
$smarty->assign('thumb_height', intval($_CFG['thumb_height']));
/* 网站根目录 */
$smarty->assign('url', $ecs->url());
/* 商品页面连接 */
$smarty->assign('goods_url', $goods_url);
}
$output = $smarty->fetch($tpl, $cache_id);
$output = str_replace("\r", '', $output);
$output = str_replace("\n", '', $output);
echo "document.write('$output');";
?>
| zzshop | trunk/goods_script.php | PHP | asf20 | 6,523 |
<?php
/**
* ECSHOP 生成商品列表
* ============================================================================
* 版权所有 2005-2010 上海商派网络科技有限公司,并保留所有权利。
* 网站地址: http://www.ecshop.com;
* ----------------------------------------------------------------------------
* 这不是一个自由软件!您只能在不用于商业目的的前提下对程序代码进行修改和
* 使用;不允许对程序代码以任何形式任何目的的再发布。
* ============================================================================
* $Author: liuhui $
* $Id: affiliate.php 17063 2010-03-25 06:35:46Z liuhui $
*/
define('IN_ECS', true);
require(dirname(__FILE__) . '/includes/init.php');
if ((DEBUG_MODE & 2) != 2)
{
$smarty->caching = true;
}
//$charset = empty($_GET['charset']) ? 'UTF8' : $_GET['charset'];
$display_mode = empty($_GET['display_mode']) ? 'javascript' : $_GET['display_mode'];
if ( $display_mode == 'javascript' )
{
header('content-type: application/x-javascript; charset=' . ($charset == 'UTF8' ? 'utf-8' : $charset));
}
/*------------------------------------------------------ */
//-- 判断是否存在缓存,如果存在则调用缓存,反之读取相应内容
/*------------------------------------------------------ */
/* 缓存编号 */
$cache_id = sprintf('%X', crc32($_SERVER['QUERY_STRING']));
$goodsid = intval($_GET['gid']);
$userid = intval($_GET['u']);
$type = intval($_GET['type']);
$tpl = ROOT_PATH . DATA_DIR . '/affiliate.html';
if (!$smarty->is_cached($tpl, $cache_id))
{
$time = gmtime();
/* 根据参数生成查询语句 */
$goods_url = $ecs->url() . "goods.php?u=$userid&id=";
$goods = get_goods_info($goodsid);
$goods['goods_thumb'] = (strpos($goods['goods_thumb'], 'http://') === false && strpos($goods['goods_thumb'], 'https://') === false) ? $ecs->url() . $goods['goods_thumb'] : $goods['goods_thumb'];
$goods['goods_img'] = (strpos($goods['goods_img'], 'http://') === false && strpos($goods['goods_img'], 'https://') === false) ? $ecs->url() . $goods['goods_img'] : $goods['goods_img'];
$goods['shop_price'] = price_format($goods['shop_price']);
/*if ($charset != 'UTF8')
{
$goods['goods_name'] = ecs_iconv('UTF8', $charset, htmlentities($goods['goods_name'], ENT_QUOTES, 'UTF-8'));
$goods['shop_price'] = ecs_iconv('UTF8', $charset, $goods['shop_price']);
}*/
$smarty->assign('goods', $goods);
$smarty->assign('userid', $userid);
$smarty->assign('type', $type);
$smarty->assign('url', $ecs->url());
$smarty->assign('goods_url', $goods_url);
}
$output = $smarty->fetch($tpl, $cache_id);
$output = str_replace("\r", '', $output);
$output = str_replace("\n", '', $output);
if ( $display_mode == 'javascript' )
{
echo "document.write('$output');";
}
else if ( $display_mode == 'iframe' )
{
echo $output;
}
?> | zzshop | trunk/affiliate.php | PHP | asf20 | 3,013 |
<?php
/**
* ECSHOP 积分商城
* ============================================================================
* 版权所有 2005-2010 上海商派网络科技有限公司,并保留所有权利。
* 网站地址: http://www.ecshop.com;
* ----------------------------------------------------------------------------
* 这不是一个自由软件!您只能在不用于商业目的的前提下对程序代码进行修改和
* 使用;不允许对程序代码以任何形式任何目的的再发布。
* ============================================================================
* $Author: liuhui $
* $Id: exchange.php 17063 2010-03-25 06:35:46Z liuhui $
*/
define('IN_ECS', true);
require(dirname(__FILE__) . '/includes/init.php');
if ((DEBUG_MODE & 2) != 2)
{
$smarty->caching = true;
}
/*------------------------------------------------------ */
//-- act 操作项的初始化
/*------------------------------------------------------ */
if (empty($_REQUEST['act']))
{
$_REQUEST['act'] = 'list';
}
/*------------------------------------------------------ */
//-- PROCESSOR
/*------------------------------------------------------ */
/*------------------------------------------------------ */
//-- 积分兑换商品列表
/*------------------------------------------------------ */
if ($_REQUEST['act'] == 'list')
{
/* 初始化分页信息 */
$page = isset($_REQUEST['page']) && intval($_REQUEST['page']) > 0 ? intval($_REQUEST['page']) : 1;
$size = isset($_CFG['page_size']) && intval($_CFG['page_size']) > 0 ? intval($_CFG['page_size']) : 10;
$cat_id = isset($_REQUEST['cat_id']) && intval($_REQUEST['cat_id']) > 0 ? intval($_REQUEST['cat_id']) : 0;
$integral_max = isset($_REQUEST['integral_max']) && intval($_REQUEST['integral_max']) > 0 ? intval($_REQUEST['integral_max']) : 0;
$integral_min = isset($_REQUEST['integral_min']) && intval($_REQUEST['integral_min']) > 0 ? intval($_REQUEST['integral_min']) : 0;
/* 排序、显示方式以及类型 */
$default_display_type = $_CFG['show_order_type'] == '0' ? 'list' : ($_CFG['show_order_type'] == '1' ? 'grid' : 'text');
$default_sort_order_method = $_CFG['sort_order_method'] == '0' ? 'DESC' : 'ASC';
$default_sort_order_type = $_CFG['sort_order_type'] == '0' ? 'goods_id' : ($_CFG['sort_order_type'] == '1' ? 'exchange_integral' : 'last_update');
$sort = (isset($_REQUEST['sort']) && in_array(trim(strtolower($_REQUEST['sort'])), array('goods_id', 'exchange_integral', 'last_update'))) ? trim($_REQUEST['sort']) : $default_sort_order_type;
$order = (isset($_REQUEST['order']) && in_array(trim(strtoupper($_REQUEST['order'])), array('ASC', 'DESC'))) ? trim($_REQUEST['order']) : $default_sort_order_method;
$display = (isset($_REQUEST['display']) && in_array(trim(strtolower($_REQUEST['display'])), array('list', 'grid', 'text'))) ? trim($_REQUEST['display']) : (isset($_COOKIE['ECS']['display']) ? $_COOKIE['ECS']['display'] : $default_display_type);
setcookie('ECS[display]', $display, gmtime() + 86400 * 7);
/* 页面的缓存ID */
$cache_id = sprintf('%X', crc32($cat_id . '-' . $display . '-' . $sort .'-' . $order .'-' . $page . '-' . $size . '-' . $_SESSION['user_rank'] . '-' .
$_CFG['lang'] . '-' . $integral_max . '-' .$integral_min));
if (!$smarty->is_cached('exchange.dwt', $cache_id))
{
/* 如果页面没有被缓存则重新获取页面的内容 */
$children = get_children($cat_id);
$cat = get_cat_info($cat_id); // 获得分类的相关信息
if (!empty($cat))
{
$smarty->assign('keywords', htmlspecialchars($cat['keywords']));
$smarty->assign('description', htmlspecialchars($cat['cat_desc']));
}
assign_template();
$position = assign_ur_here('exchange');
$smarty->assign('page_title', $position['title']); // 页面标题
$smarty->assign('ur_here', $position['ur_here']); // 当前位置
$smarty->assign('categories', get_categories_tree()); // 分类树
$smarty->assign('helps', get_shop_help()); // 网店帮助
$smarty->assign('top_goods', get_top10()); // 销售排行
$smarty->assign('promotion_info', get_promotion_info()); // 促销活动信息
/* 调查 */
$vote = get_vote();
if (!empty($vote))
{
$smarty->assign('vote_id', $vote['id']);
$smarty->assign('vote', $vote['content']);
}
$ext = ''; //商品查询条件扩展
//$smarty->assign('best_goods', get_exchange_recommend_goods('best', $children, $integral_min, $integral_max));
//$smarty->assign('new_goods', get_exchange_recommend_goods('new', $children, $integral_min, $integral_max));
$smarty->assign('hot_goods', get_exchange_recommend_goods('hot', $children, $integral_min, $integral_max));
$count = get_exchange_goods_count($children, $integral_min, $integral_max);
$max_page = ($count> 0) ? ceil($count / $size) : 1;
if ($page > $max_page)
{
$page = $max_page;
}
$goodslist = exchange_get_goods($children, $integral_min, $integral_max, $ext, $size, $page, $sort, $order);
if($display == 'grid')
{
if(count($goodslist) % 2 != 0)
{
$goodslist[] = array();
}
}
$smarty->assign('goods_list', $goodslist);
$smarty->assign('category', $cat_id);
$smarty->assign('integral_max', $integral_max);
$smarty->assign('integral_min', $integral_min);
assign_pager('exchange', $cat_id, $count, $size, $sort, $order, $page, '', '', $integral_min, $integral_max, $display); // 分页
assign_dynamic('exchange_list'); // 动态内容
}
$smarty->assign('feed_url', ($_CFG['rewrite'] == 1) ? "feed-typeexchange.xml" : 'feed.php?type=exchange'); // RSS URL
$smarty->display('exchange_list.dwt', $cache_id);
}
/*------------------------------------------------------ */
//-- 积分兑换商品详情
/*------------------------------------------------------ */
elseif ($_REQUEST['act'] == 'view')
{
$goods_id = isset($_REQUEST['id']) ? intval($_REQUEST['id']) : 0;
$cache_id = $goods_id . '-' . $_SESSION['user_rank'] . '-' . $_CFG['lang'] . '-exchange';
$cache_id = sprintf('%X', crc32($cache_id));
if (!$smarty->is_cached('exchange_goods.dwt', $cache_id))
{
$smarty->assign('image_width', $_CFG['image_width']);
$smarty->assign('image_height', $_CFG['image_height']);
$smarty->assign('helps', get_shop_help()); // 网店帮助
$smarty->assign('id', $goods_id);
$smarty->assign('type', 0);
$smarty->assign('cfg', $_CFG);
/* 获得商品的信息 */
$goods = get_exchange_goods_info($goods_id);
if ($goods === false)
{
/* 如果没有找到任何记录则跳回到首页 */
ecs_header("Location: ./\n");
exit;
}
else
{
if ($goods['brand_id'] > 0)
{
$goods['goods_brand_url'] = build_uri('brand', array('bid'=>$goods['brand_id']), $goods['goods_brand']);
}
$goods['goods_style_name'] = add_style($goods['goods_name'], $goods['goods_name_style']);
$smarty->assign('goods', $goods);
$smarty->assign('goods_id', $goods['goods_id']);
$smarty->assign('categories', get_categories_tree()); // 分类树
/* meta */
$smarty->assign('keywords', htmlspecialchars($goods['keywords']));
$smarty->assign('description', htmlspecialchars($goods['goods_brief']));
assign_template();
/* 上一个商品下一个商品 */
$sql = "SELECT eg.goods_id FROM " .$ecs->table('exchange_goods'). " AS eg," . $GLOBALS['ecs']->table('goods') . " AS g WHERE eg.goods_id = g.goods_id AND eg.goods_id > " . $goods['goods_id'] . " AND eg.is_exchange = 1 AND g.is_delete = 0 LIMIT 1";
$prev_gid = $db->getOne($sql);
if (!empty($prev_gid))
{
$prev_good['url'] = build_uri('exchange_goods', array('gid' => $prev_gid), $goods['goods_name']);
$smarty->assign('prev_good', $prev_good);//上一个商品
}
$sql = "SELECT max(eg.goods_id) FROM " . $ecs->table('exchange_goods') . " AS eg," . $GLOBALS['ecs']->table('goods') . " AS g WHERE eg.goods_id = g.goods_id AND eg.goods_id < ".$goods['goods_id'] . " AND eg.is_exchange = 1 AND g.is_delete = 0";
$next_gid = $db->getOne($sql);
if (!empty($next_gid))
{
$next_good['url'] = build_uri('exchange_goods', array('gid' => $next_gid), $goods['goods_name']);
$smarty->assign('next_good', $next_good);//下一个商品
}
/* current position */
$position = assign_ur_here('exchange', $goods['goods_name']);
$smarty->assign('page_title', $position['title']); // 页面标题
$smarty->assign('ur_here', $position['ur_here']); // 当前位置
$properties = get_goods_properties($goods_id); // 获得商品的规格和属性
$smarty->assign('properties', $properties['pro']); // 商品属性
$smarty->assign('specification', $properties['spe']); // 商品规格
$smarty->assign('pictures', get_goods_gallery($goods_id)); // 商品相册
assign_dynamic('exchange_goods');
}
}
$smarty->display('exchange_goods.dwt', $cache_id);
}
/*------------------------------------------------------ */
//-- 兑换
/*------------------------------------------------------ */
elseif ($_REQUEST['act'] == 'buy')
{
/* 查询:判断是否登录 */
if (!isset($back_act) && isset($GLOBALS['_SERVER']['HTTP_REFERER']))
{
$back_act = strpos($GLOBALS['_SERVER']['HTTP_REFERER'], 'exchange.php?') ? $GLOBALS['_SERVER']['HTTP_REFERER'] : './index.php';
}
/* 查询:判断是否登录 */
if ($_SESSION['user_id'] <= 0)
{
show_message($_LANG['eg_error_login'], array($_LANG['back_up_page']), array($back_act), 'error');
}
/* 查询:取得参数:商品id */
$goods_id = isset($_POST['goods_id']) ? intval($_POST['goods_id']) : 0;
if ($goods_id <= 0)
{
ecs_header("Location: ./\n");
exit;
}
/* 查询:取得兑换商品信息 */
$goods = get_exchange_goods_info($goods_id);
if (empty($goods))
{
ecs_header("Location: ./\n");
exit;
}
/* 查询:检查兑换商品是否有库存 */
if($goods['goods_number'] == 0 && $_CFG['use_storage'] == 1)
{
show_message($_LANG['eg_error_number'], array($_LANG['back_up_page']), array($back_act), 'error');
}
/* 查询:检查兑换商品是否是取消 */
if ($goods['is_exchange'] == 0)
{
show_message($_LANG['eg_error_status'], array($_LANG['back_up_page']), array($back_act), 'error');
}
$user_info = get_user_info($_SESSION['user_id']);
$user_points = $user_info['pay_points']; // 用户的积分总数
if ($goods['exchange_integral'] > $user_points)
{
show_message($_LANG['eg_error_integral'], array($_LANG['back_up_page']), array($back_act), 'error');
}
/* 查询:取得规格 */
$specs = '';
foreach ($_POST as $key => $value)
{
if (strpos($key, 'spec_') !== false)
{
$specs .= ',' . intval($value);
}
}
$specs = trim($specs, ',');
/* 查询:如果商品有规格则取规格商品信息 配件除外 */
if (!empty($specs))
{
$_specs = explode(',', $specs);
$product_info = get_products_info($goods_id, $_specs);
}
if (empty($product_info))
{
$product_info = array('product_number' => '', 'product_id' => 0);
}
//查询:商品存在规格 是货品 检查该货品库存
if((!empty($specs)) && ($product_info['product_number'] == 0) && ($_CFG['use_storage'] == 1))
{
show_message($_LANG['eg_error_number'], array($_LANG['back_up_page']), array($back_act), 'error');
}
/* 查询:查询规格名称和值,不考虑价格 */
$attr_list = array();
$sql = "SELECT a.attr_name, g.attr_value " .
"FROM " . $ecs->table('goods_attr') . " AS g, " .
$ecs->table('attribute') . " AS a " .
"WHERE g.attr_id = a.attr_id " .
"AND g.goods_attr_id " . db_create_in($specs);
$res = $db->query($sql);
while ($row = $db->fetchRow($res))
{
$attr_list[] = $row['attr_name'] . ': ' . $row['attr_value'];
}
$goods_attr = join(chr(13) . chr(10), $attr_list);
/* 更新:清空购物车中所有团购商品 */
include_once(ROOT_PATH . 'includes/lib_order.php');
clear_cart(CART_EXCHANGE_GOODS);
/* 更新:加入购物车 */
$number = 1;
$cart = array(
'user_id' => $_SESSION['user_id'],
'session_id' => SESS_ID,
'goods_id' => $goods['goods_id'],
'product_id' => $product_info['product_id'],
'goods_sn' => addslashes($goods['goods_sn']),
'goods_name' => addslashes($goods['goods_name']),
'market_price' => $goods['market_price'],
'goods_price' => 0,//$goods['exchange_integral']
'goods_number' => $number,
'goods_attr' => addslashes($goods_attr),
'goods_attr_id' => $specs,
'is_real' => $goods['is_real'],
'extension_code' => addslashes($goods['extension_code']),
'parent_id' => 0,
'rec_type' => CART_EXCHANGE_GOODS,
'is_gift' => 0
);
$db->autoExecute($ecs->table('cart'), $cart, 'INSERT');
/* 记录购物流程类型:团购 */
$_SESSION['flow_type'] = CART_EXCHANGE_GOODS;
$_SESSION['extension_code'] = 'exchange_goods';
$_SESSION['extension_id'] = $goods_id;
/* 进入收货人页面 */
ecs_header("Location: ./flow.php?step=consignee\n");
exit;
}
/*------------------------------------------------------ */
//-- PRIVATE FUNCTION
/*------------------------------------------------------ */
/**
* 获得分类的信息
*
* @param integer $cat_id
*
* @return void
*/
function get_cat_info($cat_id)
{
return $GLOBALS['db']->getRow('SELECT keywords, cat_desc, style, grade, filter_attr, parent_id FROM ' . $GLOBALS['ecs']->table('category') .
" WHERE cat_id = '$cat_id'");
}
/**
* 获得分类下的商品
*
* @access public
* @param string $children
* @return array
*/
function exchange_get_goods($children, $min, $max, $ext, $size, $page, $sort, $order)
{
$display = $GLOBALS['display'];
$where = "eg.is_exchange = 1 AND g.is_delete = 0 AND ".
"($children OR " . get_extension_goods($children) . ')';
if ($min > 0)
{
$where .= " AND eg.exchange_integral >= $min ";
}
if ($max > 0)
{
$where .= " AND eg.exchange_integral <= $max ";
}
/* 获得商品列表 */
$sql = 'SELECT g.goods_id, g.goods_name, g.goods_name_style, eg.exchange_integral, ' .
'g.goods_type, g.goods_brief, g.goods_thumb , g.goods_img, eg.is_hot ' .
'FROM ' . $GLOBALS['ecs']->table('exchange_goods') . ' AS eg, ' .$GLOBALS['ecs']->table('goods') . ' AS g ' .
"WHERE eg.goods_id = g.goods_id AND $where $ext ORDER BY $sort $order";
$res = $GLOBALS['db']->selectLimit($sql, $size, ($page - 1) * $size);
$arr = array();
while ($row = $GLOBALS['db']->fetchRow($res))
{
/* 处理商品水印图片 */
$watermark_img = '';
// if ($row['is_new'] != 0)
// {
// $watermark_img = "watermark_new_small";
// }
// elseif ($row['is_best'] != 0)
// {
// $watermark_img = "watermark_best_small";
// }
// else
if ($row['is_hot'] != 0)
{
$watermark_img = 'watermark_hot_small';
}
if ($watermark_img != '')
{
$arr[$row['goods_id']]['watermark_img'] = $watermark_img;
}
$arr[$row['goods_id']]['goods_id'] = $row['goods_id'];
if($display == 'grid')
{
$arr[$row['goods_id']]['goods_name'] = $GLOBALS['_CFG']['goods_name_length'] > 0 ? sub_str($row['goods_name'], $GLOBALS['_CFG']['goods_name_length']) : $row['goods_name'];
}
else
{
$arr[$row['goods_id']]['goods_name'] = $row['goods_name'];
}
$arr[$row['goods_id']]['name'] = $row['goods_name'];
$arr[$row['goods_id']]['goods_brief'] = $row['goods_brief'];
$arr[$row['goods_id']]['goods_style_name'] = add_style($row['goods_name'],$row['goods_name_style']);
$arr[$row['goods_id']]['exchange_integral'] = $row['exchange_integral'];
$arr[$row['goods_id']]['type'] = $row['goods_type'];
$arr[$row['goods_id']]['goods_thumb'] = get_image_path($row['goods_id'], $row['goods_thumb'], true);
$arr[$row['goods_id']]['goods_img'] = get_image_path($row['goods_id'], $row['goods_img']);
$arr[$row['goods_id']]['url'] = build_uri('exchange_goods', array('gid'=>$row['goods_id']), $row['goods_name']);
}
return $arr;
}
/**
* 获得分类下的商品总数
*
* @access public
* @param string $cat_id
* @return integer
*/
function get_exchange_goods_count($children, $min = 0, $max = 0, $ext='')
{
$where = "eg.is_exchange = 1 AND g.is_delete = 0 AND ($children OR " . get_extension_goods($children) . ')';
if ($min > 0)
{
$where .= " AND eg.exchange_integral >= $min ";
}
if ($max > 0)
{
$where .= " AND eg.exchange_integral <= $max ";
}
$sql = 'SELECT COUNT(*) FROM ' . $GLOBALS['ecs']->table('exchange_goods') . ' AS eg, ' .
$GLOBALS['ecs']->table('goods') . " AS g WHERE eg.goods_id = g.goods_id AND $where $ext";
/* 返回商品总数 */
return $GLOBALS['db']->getOne($sql);
}
/**
* 获得指定分类下的推荐商品
*
* @access public
* @param string $type 推荐类型,可以是 best, new, hot, promote
* @param string $cats 分类的ID
* @param integer $min 商品积分下限
* @param integer $max 商品积分上限
* @param string $ext 商品扩展查询
* @return array
*/
function get_exchange_recommend_goods($type = '', $cats = '', $min =0, $max = 0, $ext='')
{
$price_where = ($min > 0) ? " AND g.shop_price >= $min " : '';
$price_where .= ($max > 0) ? " AND g.shop_price <= $max " : '';
$sql = 'SELECT g.goods_id, g.goods_name, g.goods_name_style, eg.exchange_integral, ' .
'g.goods_brief, g.goods_thumb, goods_img, b.brand_name ' .
'FROM ' . $GLOBALS['ecs']->table('exchange_goods') . ' AS eg ' .
'LEFT JOIN ' . $GLOBALS['ecs']->table('goods') . ' AS g ON g.goods_id = eg.goods_id ' .
'LEFT JOIN ' . $GLOBALS['ecs']->table('brand') . ' AS b ON b.brand_id = g.brand_id ' .
'WHERE eg.is_exchange = 1 AND g.is_delete = 0 ' . $price_where . $ext;
$num = 0;
$type2lib = array('best'=>'exchange_best', 'new'=>'exchange_new', 'hot'=>'exchange_hot');
$num = get_library_number($type2lib[$type], 'exchange_list');
switch ($type)
{
case 'best':
$sql .= ' AND eg.is_best = 1';
break;
case 'new':
$sql .= ' AND eg.is_new = 1';
break;
case 'hot':
$sql .= ' AND eg.is_hot = 1';
break;
}
if (!empty($cats))
{
$sql .= " AND (" . $cats . " OR " . get_extension_goods($cats) .")";
}
$order_type = $GLOBALS['_CFG']['recommend_order'];
$sql .= ($order_type == 0) ? ' ORDER BY g.sort_order, g.last_update DESC' : ' ORDER BY RAND()';
$res = $GLOBALS['db']->selectLimit($sql, $num);
$idx = 0;
$goods = array();
while ($row = $GLOBALS['db']->fetchRow($res))
{
$goods[$idx]['id'] = $row['goods_id'];
$goods[$idx]['name'] = $row['goods_name'];
$goods[$idx]['brief'] = $row['goods_brief'];
$goods[$idx]['brand_name'] = $row['brand_name'];
$goods[$idx]['short_name'] = $GLOBALS['_CFG']['goods_name_length'] > 0 ?
sub_str($row['goods_name'], $GLOBALS['_CFG']['goods_name_length']) : $row['goods_name'];
$goods[$idx]['exchange_integral'] = $row['exchange_integral'];
$goods[$idx]['thumb'] = get_image_path($row['goods_id'], $row['goods_thumb'], true);
$goods[$idx]['goods_img'] = get_image_path($row['goods_id'], $row['goods_img']);
$goods[$idx]['url'] = build_uri('exchange_goods', array('gid' => $row['goods_id']), $row['goods_name']);
$goods[$idx]['short_style_name'] = add_style($goods[$idx]['short_name'], $row['goods_name_style']);
$idx++;
}
return $goods;
}
/**
* 获得积分兑换商品的详细信息
*
* @access public
* @param integer $goods_id
* @return void
*/
function get_exchange_goods_info($goods_id)
{
$time = gmtime();
$sql = 'SELECT g.*, c.measure_unit, b.brand_id, b.brand_name AS goods_brand, eg.exchange_integral, eg.is_exchange ' .
'FROM ' . $GLOBALS['ecs']->table('goods') . ' AS g ' .
'LEFT JOIN ' . $GLOBALS['ecs']->table('exchange_goods') . ' AS eg ON g.goods_id = eg.goods_id ' .
'LEFT JOIN ' . $GLOBALS['ecs']->table('category') . ' AS c ON g.cat_id = c.cat_id ' .
'LEFT JOIN ' . $GLOBALS['ecs']->table('brand') . ' AS b ON g.brand_id = b.brand_id ' .
"WHERE g.goods_id = '$goods_id' AND g.is_delete = 0 " .
'GROUP BY g.goods_id';
$row = $GLOBALS['db']->getRow($sql);
if ($row !== false)
{
/* 处理商品水印图片 */
$watermark_img = '';
if ($row['is_new'] != 0)
{
$watermark_img = "watermark_new";
}
elseif ($row['is_best'] != 0)
{
$watermark_img = "watermark_best";
}
elseif ($row['is_hot'] != 0)
{
$watermark_img = 'watermark_hot';
}
if ($watermark_img != '')
{
$row['watermark_img'] = $watermark_img;
}
/* 修正重量显示 */
$row['goods_weight'] = (intval($row['goods_weight']) > 0) ?
$row['goods_weight'] . $GLOBALS['_LANG']['kilogram'] :
($row['goods_weight'] * 1000) . $GLOBALS['_LANG']['gram'];
/* 修正上架时间显示 */
$row['add_time'] = local_date($GLOBALS['_CFG']['date_format'], $row['add_time']);
/* 修正商品图片 */
$row['goods_img'] = get_image_path($goods_id, $row['goods_img']);
$row['goods_thumb'] = get_image_path($goods_id, $row['goods_thumb'], true);
return $row;
}
else
{
return false;
}
}
?>
| zzshop | trunk/exchange.php | PHP | asf20 | 24,376 |
<?php
/**
* ECSHOP SOHU BLOG widget
* ============================================================================
* 版权所有 2005-2010 上海商派网络科技有限公司,并保留所有权利。
* 网站地址: http://www.ecshop.com;
* ----------------------------------------------------------------------------
* 这不是一个自由软件!您只能在不用于商业目的的前提下对程序代码进行修改和
* 使用;不允许对程序代码以任何形式任何目的的再发布。
* ============================================================================
* $Author: liuhui $
* $Id: blog_sohu.php 17063 2010-03-25 06:35:46Z liuhui $
*/
define('IN_ECS', true);
define('INIT_NO_USERS', true);
define('INIT_NO_SMARTY', true);
require(dirname(dirname(__FILE__)) . '/includes/init.php');
include_once(ROOT_PATH . 'includes/cls_json.php');
$num = !empty($_GET['num']) ? intval($_GET['num']) : 10;
if ($num <= 0 || $num > 10)
{
$num = 10;
}
$json = new JSON;
$result = $db->getAll("SELECT goods_id, goods_name, shop_price, promote_price, promote_start_date, promote_end_date, goods_brief, goods_thumb FROM " . $ecs->table('goods') . " WHERE is_on_sale = 1 AND is_alone_sale = 1 AND is_delete = 0 ORDER BY rand() LIMIT 0, $num");
$idx = 0;
$content['domain'] = 'http://' . $_SERVER['SERVER_NAME'];
$goods = array();
foreach ($result as $row)
{
if ($row['promote_price'] > 0)
{
$promote_price = bargain_price($row['promote_price'], $row['promote_start_date'], $row['promote_end_date']);
$goods[$idx]['promote_price'] = $promote_price > 0 ? price_format($promote_price) : '';
}
else
{
$goods[$idx]['promote_price'] = '';
}
$goods[$idx]['goods_id'] = $row['goods_id'];
$goods[$idx]['goods_name'] = $row['goods_name'];
$goods[$idx]['shop_price'] = price_format($row['shop_price']);
$goods[$idx]['goods_brief'] = $row['goods_brief'];
$goods[$idx]['goods_thumb'] = empty($row['goods_thumb']) ? $GLOBALS['_CFG']['no_picture'] : $row['goods_thumb'];
$idx++;
}
$content['goods'] = $goods;
die($json->encode($content));
?> | zzshop | trunk/widget/blog_sohu.php | PHP | asf20 | 2,179 |
<?php
/**
* ECSHOP 商品比较程序
* ============================================================================
* 版权所有 2005-2010 上海商派网络科技有限公司,并保留所有权利。
* 网站地址: http://www.ecshop.com;
* ----------------------------------------------------------------------------
* 这不是一个自由软件!您只能在不用于商业目的的前提下对程序代码进行修改和
* 使用;不允许对程序代码以任何形式任何目的的再发布。
* ============================================================================
* $Author: liuhui $
* $Id: compare.php 17063 2010-03-25 06:35:46Z liuhui $
*/
define('IN_ECS', true);
require(dirname(__FILE__) . '/includes/init.php');
if (!empty($_REQUEST['goods']) && is_array($_REQUEST['goods']) && count($_REQUEST['goods']) > 1)
{
$where = db_create_in($_REQUEST['goods'], 'id_value');
$sql = "SELECT id_value , AVG(comment_rank) AS cmt_rank, COUNT(*) AS cmt_count" .
" FROM " .$ecs->table('comment') .
" WHERE $where AND comment_type = 0".
' GROUP BY id_value ';
$query = $db->query($sql);
$cmt = array();
while ($row = $db->fetch_array($query))
{
$cmt[$row['id_value']] = $row;
}
$where = db_create_in($_REQUEST['goods'], 'g.goods_id');
$sql = "SELECT g.goods_id, g.goods_type, g.goods_name, g.shop_price, g.goods_weight, g.goods_thumb, g.goods_brief, ".
"a.attr_name, v.attr_value, a.attr_id, b.brand_name, ".
"IFNULL(mp.user_price, g.shop_price * '$_SESSION[discount]') AS rank_price " .
"FROM " .$ecs->table('goods'). " AS g ".
"LEFT JOIN " . $ecs->table('goods_attr'). " AS v ON v.goods_id = g.goods_id ".
"LEFT JOIN " . $ecs->table('attribute') . " AS a ON a.attr_id = v.attr_id " .
"LEFT JOIN " . $ecs->table('brand') . " AS b ON g.brand_id = b.brand_id " .
"LEFT JOIN " . $ecs->table('member_price') . " AS mp ".
"ON mp.goods_id = g.goods_id AND mp.user_rank = '$_SESSION[user_rank]' ".
"WHERE g.is_delete = 0 AND $where ".
"ORDER BY a.attr_id";
$res = $db->query($sql);
$arr = array();
$ids = $_REQUEST['goods'];
$attr_name = array();
$type_id = 0;
while ($row = $db->fetchRow($res))
{
$goods_id = $row['goods_id'];
$type_id = $row['goods_type'];
$arr[$goods_id]['goods_id'] = $goods_id;
$arr[$goods_id]['url'] = build_uri('goods', array('gid' => $goods_id), $row['goods_name']);
$arr[$goods_id]['goods_name'] = $row['goods_name'];
$arr[$goods_id]['shop_price'] = price_format($row['shop_price']);
$arr[$goods_id]['rank_price'] = price_format($row['rank_price']);
$arr[$goods_id]['goods_weight'] = (intval($row['goods_weight']) > 0) ?
ceil($row['goods_weight']) . $_LANG['kilogram'] : ceil($row['goods_weight'] * 1000) . $_LANG['gram'];
$arr[$goods_id]['goods_thumb'] = get_image_path($row['goods_id'], $row['goods_thumb'], true);
$arr[$goods_id]['goods_brief'] = $row['goods_brief'];
$arr[$goods_id]['brand_name'] = $row['brand_name'];
$arr[$goods_id]['properties'][$row['attr_id']]['name'] = $row['attr_name'];
if (!empty($arr[$goods_id]['properties'][$row['attr_id']]['value']))
{
$arr[$goods_id]['properties'][$row['attr_id']]['value'] .= ',' . $row['attr_value'];
}
else
{
$arr[$goods_id]['properties'][$row['attr_id']]['value'] = $row['attr_value'];
}
if (!isset($arr[$goods_id]['comment_rank']))
{
$arr[$goods_id]['comment_rank'] = isset($cmt[$goods_id]) ? ceil($cmt[$goods_id]['cmt_rank']) : 0;
$arr[$goods_id]['comment_number'] = isset($cmt[$goods_id]) ? $cmt[$goods_id]['cmt_count'] : 0;
$arr[$goods_id]['comment_number'] = sprintf($_LANG['comment_num'], $arr[$goods_id]['comment_number']);
}
$tmp = $ids;
$key = array_search($goods_id, $tmp);
if ($key !== null && $key !== false)
{
unset($tmp[$key]);
}
$arr[$goods_id]['ids'] = !empty($tmp) ? "goods[]=" . implode('&goods[]=', $tmp) : '';
}
$sql = "SELECT attr_id,attr_name FROM " . $ecs->table('attribute') . " WHERE cat_id='$type_id' ORDER BY attr_id";
$attribute = array();
$query = $db->query($sql);
while ($rt = $db->fetch_array($query))
{
$attribute[$rt['attr_id']] = $rt['attr_name'];
}
$smarty->assign('attribute', $attribute);
$smarty->assign('goods_list', $arr);
}
else
{
show_message($_LANG['compare_no_goods']);
exit;
}
assign_template();
$position = assign_ur_here(0, $_LANG['goods_compare']);
$smarty->assign('page_title', $position['title']); // 页面标题
$smarty->assign('ur_here', $position['ur_here']); // 当前位置
$smarty->assign('categories', get_categories_tree()); // 分类树
$smarty->assign('helps', get_shop_help()); // 网店帮助
assign_dynamic('compare');
$smarty->display('compare.dwt');
?> | zzshop | trunk/compare.php | PHP | asf20 | 5,341 |
<?php
/**
* ECSHOP 广告处理文件
* ============================================================================
* 版权所有 2005-2010 上海商派网络科技有限公司,并保留所有权利。
* 网站地址: http://www.ecshop.com;
* ----------------------------------------------------------------------------
* 这不是一个自由软件!您只能在不用于商业目的的前提下对程序代码进行修改和
* 使用;不允许对程序代码以任何形式任何目的的再发布。
* ============================================================================
* $Author: liuhui $
* $Id: affiche.php 17063 2010-03-25 06:35:46Z liuhui $
*/
define('IN_ECS', true);
define('INIT_NO_SMARTY', true);
require(dirname(__FILE__) . '/includes/init.php');
/* 没有指定广告的id及跳转地址 */
if (empty($_GET['ad_id']))
{
ecs_header("Location: index.php\n");
exit;
}
else
{
$ad_id = intval($_GET['ad_id']);
}
/* act 操作项的初始化*/
$_GET['act'] = !empty($_GET['act']) ? trim($_GET['act']) : '';
if ($_GET['act'] == 'js')
{
/* 编码转换 */
if (empty($_GET['charset']))
{
$_GET['charset'] = 'UTF8';
}
header('Content-type: application/x-javascript; charset=' . ($_GET['charset'] == 'UTF8' ? 'utf-8' : $_GET['charset']));
$url = $ecs->url();
$str = "";
/* 取得广告的信息 */
$sql = 'SELECT ad.ad_id, ad.ad_name, ad.ad_link, ad.ad_code '.
'FROM ' . $ecs->table('ad') . ' AS ad ' .
'LEFT JOIN ' . $ecs->table('ad_position') . ' AS p ON ad.position_id = p.position_id '.
"WHERE ad.ad_id = '$ad_id' and " . gmtime() . " >= ad.start_time and " . gmtime() . "<= ad.end_time";
$ad_info = $db->getRow($sql);
if (!empty($ad_info))
{
/* 转换编码 */
if ($_GET['charset'] != 'UTF8')
{
$ad_info['ad_name'] = ecs_iconv('UTF8', $_GET['charset'], $ad_info['ad_name']);
$ad_info['ad_code'] = ecs_iconv('UTF8', $_GET['charset'], $ad_info['ad_code']);
}
/* 初始化广告的类型和来源 */
$_GET['type'] = !empty($_GET['type']) ? intval($_GET['type']) : 0;
$_GET['from'] = !empty($_GET['from']) ? urlencode($_GET['from']) : '';
$str = '';
switch ($_GET['type'])
{
case '0':
/* 图片广告 */
$src = (strpos($ad_info['ad_code'], 'http://') === false && strpos($ad_info['ad_code'], 'https://') === false) ? $url . DATA_DIR . "/afficheimg/$ad_info[ad_code]" : $ad_info['ad_code'];
$str = '<a href="' .$url. 'affiche.php?ad_id=' .$ad_info['ad_id']. '&from=' .$_GET['from']. '&uri=' .urlencode($ad_info['ad_link']). '" target="_blank">' .
'<img src="' . $src . '" border="0" alt="' . $ad_info['ad_name'] . '" /></a>';
break;
case '1':
/* Falsh广告 */
$src = (strpos($ad_info['ad_code'], 'http://') === false && strpos($ad_info['ad_code'], 'https://') === false) ? $url . DATA_DIR . '/afficheimg/' . $ad_info['ad_code'] : $ad_info['ad_code'];
$str = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0"> <param name="movie" value="'.$src.'"><param name="quality" value="high"><embed src="'.$src.'" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash"></embed></object>';
break;
case '2':
/* 代码广告 */
$str = $ad_info['ad_code'];
break;
case 3:
/* 文字广告 */
$str = '<a href="' .$url. 'affiche.php?ad_id=' .$ad_info['ad_id']. '&from=' .$_GET['from']. '&uri=' .urlencode($ad_info['ad_link']). '" target="_blank">' . nl2br(htmlspecialchars(addslashes($ad_info['ad_code']))). '</a>';
break;
}
}
echo "document.writeln('$str');";
}
else
{
/* 获取投放站点的名称 */
$site_name = !empty($_GET['from']) ? $_GET['from'] : addslashes($_LANG['self_site']);
/* 商品的ID */
$goods_id = !empty($_GET['goods_id']) ? intval($_GET['goods_id']) : 0;
/* 存入SESSION中,购物后一起存到订单数据表里 */
$_SESSION['from_ad'] = $ad_id;
$_SESSION['referer'] = stripslashes($site_name);
/* 如果是商品的站外JS */
if ($ad_id == '-1')
{
$sql = "SELECT count(*) FROM " . $ecs->table('adsense') . " WHERE from_ad = '-1' AND referer = '" . $site_name . "'";
if($db->getOne($sql) > 0)
{
$sql = "UPDATE " . $ecs->table('adsense') . " SET clicks = clicks + 1 WHERE from_ad = '-1' AND referer = '" . $site_name . "'";
}
else
{
$sql = "INSERT INTO " . $ecs->table('adsense') . "(from_ad, referer, clicks) VALUES ('-1', '" . $site_name . "', '1')";
}
$db->query($sql);
//$db->autoReplace($ecs->table('adsense'), array('from_ad' => -1, 'referer' => $site_name, 'clicks' => 1), array('clicks' => 1));
$sql = "SELECT goods_name FROM " .$ecs->table('goods'). " WHERE goods_id = $goods_id";
$res = $db->query($sql);
$row = $db->fetchRow($res);
$uri = build_uri('goods', array('gid' => $goods_id), $row['goods_name']);
ecs_header("Location: $uri\n");
exit;
}
else
{
/* 更新站内广告的点击次数 */
$db->query('UPDATE ' . $ecs->table('ad') . " SET click_count = click_count + 1 WHERE ad_id = '$ad_id'");
$sql = "SELECT count(*) FROM " . $ecs->table('adsense') . " WHERE from_ad = '" . $ad_id . "' AND referer = '" . $site_name . "'";
if($db->getOne($sql) > 0)
{
$sql = "UPDATE " . $ecs->table('adsense') . " SET clicks = clicks + 1 WHERE from_ad = '" . $ad_id . "' AND referer = '" . $site_name . "'";
}
else
{
$sql = "INSERT INTO " . $ecs->table('adsense') . "(from_ad, referer, clicks) VALUES ('" . $ad_id . "', '" . $site_name . "', '1')";
}
$db->query($sql);
/* 跳转到广告的链接页面 */
if (!empty($_GET['uri']))
{
$uri = (strpos($_GET['uri'], 'http://') === false && strpos($_GET['uri'], 'https://') === false) ? $ecs->http() . urldecode($_GET['uri']) : urldecode($_GET['uri']);
}
else
{
$uri = $ecs->url();
}
ecs_header("Location: $uri\n");
exit;
}
}
?> | zzshop | trunk/affiche.php | PHP | asf20 | 6,785 |
<?php
/**
* ECSHOP 超值礼包列表
* ============================================================================
* 版权所有 2005-2010 上海商派网络科技有限公司,并保留所有权利。
* 网站地址: http://www.ecshop.com;
* ----------------------------------------------------------------------------
* 这不是一个自由软件!您只能在不用于商业目的的前提下对程序代码进行修改和
* 使用;不允许对程序代码以任何形式任何目的的再发布。
* ============================================================================
* $Author: liubo $
* $Id: activity.php 16056 2009-05-21 05:44:14Z liubo $
*/
define('IN_ECS', true);
require(dirname(__FILE__) . '/includes/init.php');
require_once(ROOT_PATH . 'includes/lib_order.php');
include_once(ROOT_PATH . 'includes/lib_transaction.php');
/* 载入语言文件 */
require_once(ROOT_PATH . 'languages/' .$_CFG['lang']. '/shopping_flow.php');
require_once(ROOT_PATH . 'languages/' .$_CFG['lang']. '/user.php');
require_once(ROOT_PATH . 'languages/' .$_CFG['lang']. '/admin/package.php');
/*------------------------------------------------------ */
//-- PROCESSOR
/*------------------------------------------------------ */
assign_template();
assign_dynamic('package');
$position = assign_ur_here(0, $_LANG['shopping_package']);
$smarty->assign('page_title', $position['title']); // 页面标题
$smarty->assign('ur_here', $position['ur_here']); // 当前位置
/* 读出所有礼包信息 */
$now = gmtime();
$sql = "SELECT * FROM " . $ecs->table('goods_activity'). " WHERE `start_time` <= '$now' AND `end_time` >= '$now' AND `act_type` = '4' ORDER BY `end_time`";
$res = $db->query($sql);
$list = array();
while ($row = $db->fetchRow($res))
{
$row['start_time'] = local_date('Y-m-d H:i', $row['start_time']);
$row['end_time'] = local_date('Y-m-d H:i', $row['end_time']);
$ext_arr = unserialize($row['ext_info']);
unset($row['ext_info']);
if ($ext_arr)
{
foreach ($ext_arr as $key=>$val)
{
$row[$key] = $val;
}
}
$sql = "SELECT pg.package_id, pg.goods_id, pg.goods_number, pg.admin_id, ".
" g.goods_sn, g.goods_name, g.market_price, g.goods_thumb, ".
" IFNULL(mp.user_price, g.shop_price * '$_SESSION[discount]') AS rank_price " .
" FROM " . $GLOBALS['ecs']->table('package_goods') . " AS pg ".
" LEFT JOIN ". $GLOBALS['ecs']->table('goods') . " AS g ".
" ON g.goods_id = pg.goods_id ".
" LEFT JOIN " . $GLOBALS['ecs']->table('member_price') . " AS mp ".
"ON mp.goods_id = g.goods_id AND mp.user_rank = '$_SESSION[user_rank]' ".
" WHERE pg.package_id = " . $row['act_id']. " ".
" ORDER BY pg.goods_id";
$goods_res = $GLOBALS['db']->getAll($sql);
$subtotal = 0;
foreach($goods_res as $key => $val)
{
$goods_res[$key]['goods_thumb'] = get_image_path($val['goods_id'], $val['goods_thumb'], true);
$goods_res[$key]['market_price'] = price_format($val['market_price']);
$goods_res[$key]['rank_price'] = price_format($val['rank_price']);
$subtotal += $val['rank_price'] * $val['goods_number'];
}
$row['goods_list'] = $goods_res;
$row['subtotal'] = price_format($subtotal);
$row['saving'] = price_format(($subtotal - $row['package_price']));
$row['package_price'] = price_format($row['package_price']);
$list[] = $row;
}
$smarty->assign('list', $list);
$smarty->assign('helps', get_shop_help()); // 网店帮助
$smarty->assign('lang', $_LANG);
$smarty->assign('feed_url', ($_CFG['rewrite'] == 1) ? "feed-typepackage.xml" : 'feed.php?type=package'); // RSS URL
$smarty->display('package.dwt');
| zzshop | trunk/package.php | PHP | asf20 | 3,965 |
/*
Template Name: ECSHOP Default
Template URI: http://www.ecshop.com/
Description: 默认升级咖啡版.
Version: 2.7.2
Author: ECSHOP Team
Author URI: http://www.ecshop.com/
Logo filename: logo.gif
Template Type: typecoffee_0
*/
/* ====================
公共样式
==================== */
body{background:#fff; font-size:12px; font-family:"宋体",Verdana, Arial; line-height:150%; margin:5px 0 0 0; padding:0; color:#404040;}
div{margin:0 auto; padding:0;}
h1,h2,h3,h4,h5,h6,ul,li,dl,dt,dd,form,img,p{
margin:0; padding:0; border:none; list-style-type:none;
}
.block{
width:960px; height:auto;
}
.f_l{float:left;}
.f_r{float:right;}
.tl{ text-align:left;}
.tc{ text-align:center;}
.tr{ text-align:right;}
.dis{display:block;}
.inline{display:inline;}
.none{display:none;}
.dashed{background:url(images/lineBg.gif) repeat-x left top; color:#3f3f3f; padding:2px 0 3px 12px;}
.clearfix:after{
content:"."; display:block; height:0; clear:both;
visibility:hidden;
}
*html .clearfix{
height:1%;
}
*+html .clearfix{
height:1%;
}
/*英文强制换行*/
.word{word-break:break-all;}
/*边框*/
.B_blue{border:1px solid #f0e3de;}
.B_input{border:1px solid #9d5d4e;}
.inputBg{border:1px solid #b3b3b3; background:url(images/inputbg.gif) repeat-x left top; height:18px;}
/*字体颜色*/
.f1{color:#ff6666;}
.f2{color:#006bd0; font-weight:bold; margin-right:15px;}
.f3{color:#9e9e9e;}
.f4{color:#fe596a;}
.f4_b{color:#fe596a; font-weight:bold;}
.f5{ font-size:14px; font-weight:bold;}
.f6{color:#814c3b;}
.market{ font-size:14px; text-decoration:line-through;}
.shop{color:#fe596a; font-size:14px; font-weight:600;}
.market_s{text-decoration:line-through;}
.shop_s{color:#fe596a;}
/*按钮部分*/
.bnt_blue{
background:url(images/coffee/bg.gif) no-repeat 0px 0px; width:52px; height:21px;
text-align:center; line-height:21px; color:#fff; border:none; cursor:pointer;
}
.bnt_blue_1{
background:url(images/coffee/bg.gif) no-repeat 0px -663px; width:77px; height:21px;
text-align:center; line-height:21px; color:#fff; border:none; cursor:pointer;
}
.bnt_blue_2{
background:url(images/coffee/bg.gif) no-repeat 0px -696px; width:139px; height:21px;
text-align:center; line-height:21px; color:#fff; border:none; cursor:pointer;
}
.bnt_bonus{
background:url(images/coffee/bg.gif) no-repeat -56px 0px; width:52px; height:21px;
text-align:center; line-height:21px; color:#fff; border:none; cursor:pointer;
}
/*模块容器*/
.box{background:#f1f1f1; padding-bottom:2px; overflow:hidden;}
.box_1{border:1px solid #ead7cf; background-color:#fff;}
.box_2{border:1px solid #ead7cf; background:url(images/coffee/box_2Bg.gif) repeat-x top left;
background-color:#f9f3f0; overflow:hidden;
}
.boxCenterList{padding:8px;}
/*模块标题*/
h3{height:33px; line-height:33px; font-size:12px; background:url(images/coffee/h3title.gif) repeat-x left top; text-align:right;
padding:0 12px; font-weight:100;
}
h3.border{border:1px solid #c5e4ff; border-bottom:none;}
h3 img{position:relative; top:7px;}
h3 span{float:left; background:url(images/coffee/bg.gif) no-repeat 0px -570px;width:auto; height:33px; line-height:33px; text-align:left;
font-weight:bold; color:#b98877; padding-left:12px;}
h5{height:26px; line-height:26px; text-align:right; background-color:#f8f2ef; font-size:12px;
color:#814c3b; padding:0 10px 0 0;
}
h5 span{float:left; font-weight:bold; background:url(images/coffee/bg.gif) no-repeat 0 -616px; padding-left:25px;}
h6{height:23px; line-height:23px; text-align:right; font-size:12px; background:#f2e3df; color:#814c3b;
border:1px solid #fff; padding-right:10px;
}
h6 span{float:left; padding-left:15px;}
/*页面留白*/
.blank{height:8px; line-height:8px; clear:both; visibility:hidden;}
.blank5{height:5px; line-height:5px;/* _margin:-3px 0;*/ clear:both; visibility:hidden;}
/*布局*/
.AreaL{width:200px; float:left; margin-right:10px;}
.AreaR{width:750px; float:left;}
/* ====================
导航部分
==================== */
/*顶部管理型导航*/
.log{height:50px;}
.log li{float:left;}
.log .userInfo{*margin-right:10px; /*width:300px;*/ text-align:left;}
.log .userInfo a{color:#814c3b; text-decoration:none;}
.log li img{position:relative; top:5px;}
#topNav{background:url(images/coffee/topNavBg.gif) no-repeat left top; height:31px;
line-height:31px; color:#bebfc1; padding:0px 15px; margin:0px 10px; position:relative;
}
#topNav .topNavR{background:url(images/coffee/topNavR.gif) no-repeat; width:5px; height:31px;
position:absolute; top:0px; right:0px;
}
#topNav a{color:#814c3b; text-decoration:none;}
/*页面主导航*/
#mainNav{padding:0 25px; width:910px;}
#mainNav a{display:block; height:26p; float:left; line-height:26px; text-align:center;
padding:0 15px; background:url(images/coffee/NavBg.gif) no-repeat 0 -29px; position:relative;
margin-right:2px; color:#814c3b; text-decoration:none;
}
#mainNav a span{width:3px; height:26px; background:url(images/coffee/NavBg.gif) no-repeat 0 -88px;
position:absolute; top:0px; right:0px;
}
#mainNav a:hover{display:block; height:26p; float:left; line-height:26px; text-align:center;
padding:0 15px; background:url(images/coffee/NavBg.gif) no-repeat 0 0; position:relative;
margin-right:2px; color:#fff; text-decoration:none;
}
#mainNav .cur{display:block; height:26p; float:left; line-height:26px; text-align:center;
padding:0 15px; background:url(images/coffee/NavBg.gif) no-repeat 0 0; position:relative;
margin-right:2px; color:#fff; text-decoration:none; font-weight:bold;
}
#mainNav a:hover span,#mainNav .cur span{width:3px; height:26px; background:url(images/coffee/NavBg.gif) no-repeat 0 -59px;
position:absolute; top:0px; right:0px;
}
/*搜索*/
#search{border:1px solid #7f4a3b; background:url(images/coffee/searchBg.gif) repeat-x left top; width:918px;
padding:0px 20px; height:36px; line-height:36px;
}
#search a{color:#fff; text-decoration:none;}
#search .keys{background:url(images/coffee/bg.gif) no-repeat 0 -28px;
color:#fff; padding-left:40px;
}
#search .go{background:url(images/bnt_search.gif); border:none; width:52px; height:19px;/* position:relative; top:2px; utf8下*/}
/*当前位置*/
#ur_here{border:1px solid #ebd9d1; border-top:none; background:url(images/coffee/uh_bg.gif) repeat-x left top;
height:36px; line-height:36px; padding:0 12px;
}
#ur_here a{color:#814c3b; text-decoration:none;}
/* ====================
模块
==================== */
/*购物车*/
.cart{background:url(images/coffee/catBg.gif) no-repeat left top; padding:15px 10px 15px 50px;
color:#814c3b; height:50px; _padding:12px 10px 15px 50px;
}
.cart a{color:#814c3b; text-decoration:none;}
.cart a:hover{color:#ff6600; text-decoration:underline;}
/*商品分类*/
#category_tree{border:4px solid #fcf8f7; background-color:#fff;}
#category_tree dl{margin:6px;}
#category_tree dt{background:url(images/lineBg.gif) repeat-x left bottom;
color:#3f3f3f; padding:2px 0 3px 12px;
}
#category_tree dt a{background:url(images/coffee/bg.gif) no-repeat 0 -69px;
color:#3f3f3f; padding-left:15px; text-decoration:none;
}
#category_tree dd{padding:3px 0 3px 10px;}
#category_tree dd a{color:#404040; text-decoration:none;}
#category_tree dd a:hover{color:#ff6600; text-decoration:none;}
/*销售排行*/
.top10Tit{background:url(images/coffee/bg.gif) no-repeat 0px -85px; height:30px;}
.top10List{border:1px solid #f0e3de; background-color:#fff; margin:0px 4px 4px 4px;}
.top10List ul{border-bottom:1px solid #f0e3de; position:relative;}
.top10List .iteration{position:absolute; top:6px; left:6px;}
.top10List .iteration1{padding-left:3px;}
.top10List li.topimg{width:35px; height:35px;}
.top10List .samllimg{width:35px; height:35px; margin-bottom:4px;}
.top10List li{padding:3px 3px 3px 23px; float:left;}
/*linkCOLOR*/
.top10List li a,#mallNews .NewsList li a,.boxCenterList li a{color:#3f3f3f; text-decoration:none;}
.top10List li a:hover,#mallNews .NewsList li a:hover,.boxCenterList li a:hover{color:#ff6600; text-decoration:none;}
/*首页焦点图*/
#focus{border-right:1px solid #ebd9d1; padding:8px; background:url(images/coffee/foucsBg.gif) repeat-x left top;}
#mallNews{width:230px; padding:8px 8px 0px 8px; background:url(images/coffee/foucsBg.gif) repeat-x left top;}
#mallNews .NewsTit{background:url(images/coffee/bg.gif) 0px -132px; height:23px;}
#mallNews .NewsList{background:#FFFFFF; padding:8px;}
#mallNews .NewsList ul{margin-top:10px;}
#mallNews .NewsList li{background:url(images/coffee/bg.gif) no-repeat 0px -167px; padding:0px 0px 0px 10px;
text-align:left;
}
/*今日特价和品牌*/
#sales{width:500px; background:url(images/coffee/salesBg.gif) repeat-x left bottom;
border-bottom:2px solid #f0f1f3; background-color:#faf3f0;
}
#sales h1{font-size:12px; background:url(images/coffee/salesTitBg.gif) no-repeat; height:33px; text-align:right;}
#sales h1 img{position:relative; top:10px; right:8px;}
#sales .goodBox{margin:10px 0px 10px 10px; _margin-left:5px;}
#sales .goodBox .goodList p{text-align:left; color:#3f3f3f;}
#sales .goodBox .goodList p a{color:#3f3f3f; text-decoration:none;}
#sales .goodBox .goodList p a:hover{color:#ff6600; text-decoration:none;}
#sales .goodList{width:110px; margin:0px 5px 0px 5px; float:left;}
#sales .goodList img{background:url(images/coffee/salesGoodBg.gif) no-repeat; width:100px; height:100px; padding:5px;
}
#sales .goodList p{ margin-top:3px; text-align:center;}
#brands{width:247px; height:199px; *height:201px; padding:1px 0 0 1px; position:relative;}
#brands .brandsMore{position:absolute; left:178px; bottom:10px;
width:65px; height:41px;
}
#brands .brandsMore img{border:none; width:65px; height:41px;}
#brands img{width:78px; height:40px; border:1px solid #ebd9d1;}
#brands a{color:#0069cd; text-decoration:none; margin:2px 1px; display:block; float:left;}
.brandsIe6{_width:250px;}/*在ie6下特价商品不存在的话品牌推荐永远靠右显示*/
/*精品推荐,新品上市,热卖商品*/
.centerPadd{padding:5px 8px 8px 8px; overflow:hidden;}
.itemTit{height:30px; background:url(images/coffee/bg.gif) no-repeat 0px -195px; padding-left:190px; text-align:right;
/*margin-bottom:-3px; _margin-bottom:-2px;*/
}
.itemTit.New{background:url(images/coffee/bg.gif) no-repeat 0px -225px;}
.itemTit.Hot{background:url(images/coffee/bg.gif) no-repeat 0px -256px;}
.itemTit img{position:relative; top:7px;}
.itemTit h2{float:left; height:27px; background:url(images/coffee/itemH2Bg.gif) repeat-x left top; border:1px solid #f0e3de;
font-size:12px; text-align:center; color:#3f2d2d; font-weight:100; padding:0px 10px; line-height:28px; margin:0 6px 0 0;
border-bottom:none; position:relative; bottom:-3px; display:inline; white-space:nowrap;
}
.itemTit h2 a{color:#3f2d2d; text-decoration:none;}
.itemTit .h2bg{height:27px; line-height:28px; border:none; background:none;
font-size:12px; text-align:center; color:#814c3b; font-weight:100; padding:0px 10px;
display:inline; white-space:nowrap;
}
.itemTit .h2bg a{color:#814c3b; text-decoration:none;}
.centerPadd .goodsBox{border:1px solid #f0e3de; background:#fff; padding:12px 0px 0px 17px; *padding:12px 0px 0px 17px;
_padding:12px 0px 0px 0px;}
.centerPadd .goodsBox .more{text-align:right; clear:both; margin:0 8px 8px 0;}
/*单个商品*/
.goodsItem{width:110px; float:left; position:relative; overflow:hidden; margin:0px 14px 15px 14px;}
.goodsItem .goodsimg{width:100px; height:100px; border:4px solid #faf3f0; margin-bottom:4px;}
.goodsItem img{width:52px; height:17px;}
.goodsItem p{text-align:left; color:#3f3f3f;}
.goodsItem p a{color:#3f3f3f; text-decoration:none;}
.goodsItem p a:hover{color:#ff6600; text-decoration:none;}
.goodsItem span{width:40px; height:40px; position:absolute;left:0px; top:0px;}
.goodsItem span.best{background:url(images/coffee/bg.gif) no-repeat 0px -304px;}
.goodsItem span.news{background:url(images/coffee/bg.gif) no-repeat -75px -304px;}
.goodsItem span.hot{background:url(images/coffee/bg.gif) no-repeat -161px -304px;}
/*帮助*/
.helpTitBg{background:url(images/coffee/helpTitBg.gif) repeat-x left top; text-align:left; border:1px solid #ebd9d1; background-color:#fff;
padding:0 0 10px 15px;
}
.helpTitBg dl{float:left; margin-right:30px; _margin-right:20px; _width:130px;}
.helpTitBg dt{background:url(images/coffee/bg.gif) no-repeat 0px -570px;width:auto; height:33px; line-height:33px; text-align:left;
font-weight:bold; color:#b98877; padding-left:12px; margin-bottom:8px;}
.helpTitBg dt a{font-weight:bold; color:#b98877; text-decoration:none;}
.helpTitBg dd a{color:#3f3f3f; text-decoration:none; background:url(images/coffee/bg.gif) no-repeat 0px -170px; padding:0px 0px 0px 10px;}
/*相关商品*/
.boxCenterList ul{height:1%; margin-bottom:5px;}
.boxCenterList li{float:left; width:120px;}
.boxCenterList li.goodsimg{width:48px; margin-right:10px;}
.boxCenterList li.goodsimg img{width:48px; height:48px; display:block;}
/*相关文章(其它带有小三角点的文字列表共用)*/
.RelaArticle a,.alone{background:url(images/coffee/bg.gif) no-repeat 0px -170px; padding:0px 0px 0px 10px; color:#3f3f3f; text-decoration:none;}
.RelaArticle a:hover{background:url(images/coffee/bg.gif) no-repeat 0px -170px; padding:0px 0px 0px 10px; color:#ff6600; text-decoration:none;}
/*浏览历史,收藏*/
.history h2{height:26px; line-height:26px; padding:0px 10px 0 20px; text-align:center; font-size:12px;
background:url(images/coffee/bg.gif) no-repeat 0px -466px; float:left; color:#814c3b;
margin:6px 5px 0 0; border:1px solid #f0e3de; border-bottom:none; background-color:#FFFFFF;
}
.history .h2bg{height:26px; line-height:26px; padding:0px 10px 0 20px; text-align:center; font-size:12px;
background:url(images/coffee/bg.gif) no-repeat 0px -508px; float:left; color:#a0a0a0;
margin:6px 5px 0 0; border:none;
}
#history li{width:100%;}
#clear_history a{background:none; padding:0px; color:#3f3f3f; text-decoration:none;float:right;cursor:pointer;}
.colle a{background:none; padding:0px; color:#3f3f3f; text-decoration:none;}
.colle a:hover{background:none; padding:0px; color:#ff6600; text-decoration:none;}
/* ====================
商品详情页面部分模块
==================== */
#goodsInfo{background:#f2f2f2; padding:8px; _height:1%;}
#goodsInfo .imgInfo{width:230px; float:left; margin-right:10px; overflow:hidden;}
#goodsInfo .imgInfo .thumb{width:230px; height:230px; display:block;}/*商品详情图片*/
#goodsInfo span{width:4px; height:48px; background:url(images/coffee/bg.gif) no-repeat 0 -527px; float:left;}
#goodsInfo span.spanR{width:4px; height:48px; background:url(images/coffee/bg.gif) no-repeat -5px -527px; float:right;}
#goodsInfo .gallery{width:204px; float:left; margin-left:10px; _margin-left:5px; overflow:hidden;}
#goodsInfo .gallery ul{width:auto;}
#goodsInfo .gallery li{float:left; width:48px; margin:0 2px;}
#goodsInfo .gallery li img{width:46px; height:46px; display:block;}
/*文字信息*/
#goodsInfo .textInfo{background:#fff; width:473px; float:left; padding:10px;}
#goodsInfo .textInfo p{font-size:14px; font-weight:bold; padding:0 5px 5px 8px;}
#goodsInfo .textInfo ul{border-top:1px solid #ccc;}
#goodsInfo .textInfo li{background:url(images/lineBg.gif) repeat-x left bottom; padding:0px 8px; _height:1%;}
#goodsInfo .textInfo li.padd{padding:7px 0px 7px 8px;}
#goodsInfo .textInfo li dd{width:50%; float:left; padding:7px 0px;}
#goodsInfo .textInfo li dd.ddR{border-left:1px solid #eeecec; width:48%; padding-left:8px;}
#goodsInfo .textInfo li dd.ddL{border-right:1px solid #eeecec;}
#goodsInfo .textInfo a{color:#006bce; text-decoration:underline;}
#goodsInfo .textInfo .loop{background:#f7f7f7; margin-top:8px;}
/*用户评论*/
.ie6{padding-left:25px; _padding-left:15px; height:1%;}/*购买此商品的人还购买的商品*/
.comments li{background:url(images/lineBg.gif) repeat-x left bottom; padding:3px 8px; width:97%; _height:1%; text-align:left; position:relative;
margin-bottom:8px;
}
.comments li img{position:absolute; right:0px; top:3px;}
.comments li p{margin:3px auto; text-align:left;}
.commentsList{border:1px solid #ccc; background:#f7f7f7; padding:10px;}
.commentsList .inputBorder{border:1px solid #ccc; background:#fff;}
.captcha{margin-left:0px; position:relative; top:-1px; *margin-left:8px; *position:relative; top:3px; cursor:pointer;}
/* ====================
品牌推荐
==================== */
/*品牌列表*/
#brandList{background:url(images/brandBg.gif) repeat-y top center; margin-top:12px; height:1%;}
#brandList .brandBox{width:240px; _width:236px; float:left; margin:0 5px 20px 5px; text-align:center; overflow:hidden; height:160px;}
#brandList .brandBox .brandLogo{width:188px; height:52px; overflow:hidden;}
#brandList .brandBox h4{height:23px; line-height:23px; background:#e9e9e9; margin:15px 0 8px 0; padding:0 10px; text-align:right;
font-weight:100; font-size:12px;
}
#brandList .brandBox h4 span,#brandList .brandBox h4 span a{float:left; font-weight:bold; color:#3f3f3f; text-decoration:none;}
#brandList p{text-align:left; margin-bottom:5px; color:#909090; padding:8px;}
#brandList p.brandCategory,#brandList p.brandCategory a{text-align:left; color:#006acd; text-decoration:none;}
#brandList .brandArticle{border:1px dashed #d9d9d9; background:#f8f8f8; text-align:left;}
.brandCategoryA a{ margin-right:15px;}
/* ====================
用户中心
==================== */
.box_1 .userCenterBox{border:4px solid #fcf8f7; background-color:#fff;}
.usBox{background:#f2f2f2; border:1px solid #e2e2e2; padding:15px; width:928px;}
.usBox_1{background:#fff; text-align:left; width:297px; height:208px; padding:43px 153px 60px 123px;}
.usBox_1 .logtitle{height:30px; background:url(images/ur_bg.gif) no-repeat 0px 0px;}
.us_Submit{border:none; width:115px; height:40px; background:url(images/bnt_ur_log.gif);}
.us_Submit_reg{border:none; width:113px; height:40px; background:url(images/bnt_ur_reg.gif);}
.usTxt{width:265px; height:267px; padding:43px 0 0 90px; background:#f2f2f2; float:right;
text-align:left; background:url(images/ur_bg1.gif) no-repeat 0 50%; line-height:23px;
}
.usTxt img{margin-top:15px;}
/*注册*/
.usBox_2{background:#fff; text-align:left; padding:43px 153px 60px 123px;}
.usBox_2 .regtitle{height:30px; background:url(images/ur_bg.gif) no-repeat 0px -34px;}
.actionSub a{color:#006acc; text-decoration:underline;
background:url(images/ur_bg.gif) no-repeat 0px -68px; padding-left:14px;
}
.box_1 .userCenterBox .userMenu a{display:block; height:25px; line-height:25px; background:url(images/menuBg.gif) no-repeat 0 -30px;
color:#3f3f3f; text-decoration:none; margin:0 0 3px 10px; padding-left:3px;
}
.box_1 .userCenterBox .userMenu a.curs{background:url(images/menuBg.gif) no-repeat 0 0px; font-weight:bold;}
.box_1 .userCenterBox .userMenu a img{ margin-right:3px;}
.msgBottomBorder{clear:both; background:url(images/lineBg.gif) repeat-x left bottom; padding-bottom:8px; margin-bottom:8px;}
/* ====================
商品分类页面
==================== */
/*属性组合搜索*/
.screeBox{padding:10px;}
.screeBox a{color:#404040;}
.screeBox span{background:#e6cec5; padding:3px 5px; margin:0 3px;}
.sort a{ position:relative; bottom:5px;}
.sort input{position:relative; top:3px;}
/*商品列表显示方式*/
.goodsList{ padding:10px 10px 0 10px;}
.goodsList ul{ margin-bottom:10px;}
.goodsList ul#bgcolor{background:#fbfbfb; border-top:1px dashed #e8e8e8; border-bottom:1px dashed #e8e8e8;}
.goodsList li{float:left; padding-top:8px;}
.goodsList li.thumb{width:80px; text-align:center;}
.goodsList li.thumb img{width:50px; height:50px; border:1px solid #ccc; padding:1px;}
.goodsList li.goodsName{width:290px; margin-right:10px;}
.goodsList li.action{float:right; margin-left:10px;}
.goodsList li.action a.abg{background:url(images/coffee/bg.gif) no-repeat 0px -735px; padding-left:18px; position:relative; bottom:5px;}
/* ====================
团购
==================== */
.group{background:#f2f2f2; padding:8px;}
.group li{float:left; background:#fff; padding:8px;}
/* ====================
购物流程
==================== */
.flowBox{border:1px solid #ebd9d1; border-top:2px solid #b5877d;}
.flowBox table{ margin:5px auto;}
/*2.62在购物车里面显示相关配件*/
.flowGoodsFittings{padding:10px;}
.flowGoodsFittings ul{height:1%; margin:5px 4px; float:left;}
.flowGoodsFittings li{float:left; width:120px;}
.flowGoodsFittings li.goodsimg{width:48px; margin-right:10px;}
.flowGoodsFittings li.goodsimg img{width:48px; height:48px; display:block;}
/* ====================
文章列表页-2009.6.8
==================== */
.article_search{margin:8px 0;}
.article_search .inputBg{width:300px;}
/* ====================
打印报价单
==================== */
.quotation{ margin:20px auto 20px auto; text-align:center;}
/*翻页*/
.pagebar{height:20px; float:right;}
.pagebar img{position:relative; top:2px;}
.pagebar a{display:block; float:left; margin:0 2px; color:#814c3b; text-decoration:none;}
.pagebar a:hover{color:#ff5a6a; text-decoration:none;}
.pagebar .page_now{display:block; float:left; margin:0 5px; color:#ff5a6a; font-weight:bold; background:#fff;}
#pager a{color:#814c3b; text-decoration:none;}
/*底部导航+友情链接*/
#bottomNav{width:958px;}
.bNavList{border:1px solid #fff; background:#f7f0ef; height:27px; line-height:27px; padding:0 12px;}
.links{border:1px solid #fff; background:#f7f0ef; padding:0 12px;}
.bNavList a,.links a{color:#814c3b; text-decoration:none;}
.bNavList img{_position:relative; top:8px;}
.links img{width:88px; height:30px; margin:5px;}
/*版权*/
#footer{background:url(images/logo1.gif) no-repeat 5% 50%; padding-left:200px; width:760px; margin:10px auto;}
#footer .text{background:url(images/footerLine.gif) no-repeat left center; padding-left:50px; *padding-bottom:20px;}
#footer .text a{color:#404040; text-decoration:none;}
/* ======商品比较浮动块 ====== */
#compareBox {
width:128px;
background:url(images/compareBg.gif) no-repeat top center;
background-color:#edf8ff;
padding:35px 0 8px 0;
border: 1px solid #c5e4ff;
position: absolute;
right:1px;
top:200px;
}
#compareBox input {
width:52px; height:13px;
border:none;
background:url(images/compareSub.gif) no-repeat;
}
#compareList {
margin:0px 0px 8px 0px;
padding:0px;
width:120px;
background:#FFFFFF;
border:1px solid #d6ecff;
}
#compareList li {
color: #333;
text-align:left;
background: #fff;
padding: 3px 5px;
margin: 3px 0;
}
#compareList li img {
float:right;
padding-top:4px;
}
/*购物车提示点击更新按钮式样2.6.2版本添加*/
.messageli {
list-style-type:none;
padding:5px;
color:red
}
.messagediv {
font-size:12px;
position:absolute;
border:1px solid #FFD700;
text-align:center;
padding:5px;
background-color:#FFFACD;
filter:alpha(opacity=50);
-moz-opacity:0.7;
opacity: 0.7;
}
/* 积分兑换样式修改 */
.point li{
float:left;
width:300px;
} | zzshop | trunk/themes/default/style_coffee.css | CSS | asf20 | 24,311 |
/*
Template Name: ECSHOP Default
Template URI: http://www.ecshop.com/
Description: 默认升级绿色版.
Version: 2.7.2
Author: ECSHOP Team
Author URI: http://www.ecshop.com/
Logo filename: logo.gif
Template Type: typegreen_0
*/
/* ====================
公共样式
==================== */
body{background:#fff; font-size:12px; font-family:"宋体",Verdana, Arial; line-height:150%; margin:5px 0 0 0; padding:0; color:#404040;}
div{margin:0 auto; padding:0;}
h1,h2,h3,h4,h5,h6,ul,li,dl,dt,dd,form,img,p{
margin:0; padding:0; border:none; list-style-type:none;
}
.block{
width:960px; height:auto;
}
.f_l{float:left;}
.f_r{float:right;}
.tl{ text-align:left;}
.tc{ text-align:center;}
.tr{ text-align:right;}
.dis{display:block;}
.inline{display:inline;}
.none{display:none;}
.dashed{background:url(images/lineBg.gif) repeat-x left top; color:#3f3f3f; padding:2px 0 3px 12px;}
.clearfix:after{
content:"."; display:block; height:0; clear:both;
visibility:hidden;
}
*html .clearfix{
height:1%;
}
*+html .clearfix{
height:1%;
}
/*英文强制换行*/
.word{word-break:break-all;}
/*边框*/
.B_blue{border:1px solid #ddf89b;}
.B_input{border:1px solid #82bc11;}
.inputBg{border:1px solid #b3b3b3; background:url(images/inputbg.gif) repeat-x left top; height:18px;}
/*字体颜色*/
.f1{color:#ff6666;}
.f2{color:#006bd0; font-weight:bold; margin-right:15px;}
.f3{color:#9e9e9e;}
.f4{color:#fe596a;}
.f4_b{color:#fe596a; font-weight:bold;}
.f5{ font-size:14px; font-weight:bold;}
.f6{color:#3f3f3f;}
.market{ font-size:14px; text-decoration:line-through;}
.shop{color:#fe596a; font-size:14px; font-weight:600;}
.market_s{text-decoration:line-through;}
.shop_s{color:#fe596a;}
/*按钮部分*/
.bnt_blue{
background:url(images/green/bg.gif) no-repeat 0px 0px; width:52px; height:21px;
text-align:center; line-height:21px; color:#fff; border:none; cursor:pointer;
}
.bnt_blue_1{
background:url(images/green/bg.gif) no-repeat 0px -663px; width:77px; height:21px;
text-align:center; line-height:21px; color:#fff; border:none; cursor:pointer;
}
.bnt_blue_2{
background:url(images/green/bg.gif) no-repeat 0px -696px; width:139px; height:21px;
text-align:center; line-height:21px; color:#fff; border:none; cursor:pointer;
}
.bnt_bonus{
background:url(images/green/bg.gif) no-repeat -56px 0px; width:52px; height:21px;
text-align:center; line-height:21px; color:#fff; border:none; cursor:pointer;
}
/*模块容器*/
.box{background:#f1f1f1; padding-bottom:2px; overflow:hidden;}
.box_1{border:1px solid #ddf89b; background-color:#fff;}
.box_2{border:1px solid #ddf89b; background:url(images/green/box_2Bg.gif) repeat-x top left;
background-color:#f6fbe6; overflow:hidden;
}
.boxCenterList{padding:8px;}
/*模块标题*/
h3{height:33px; line-height:33px; font-size:12px; background:url(images/green/h3title.gif) repeat-x left top; text-align:right;
padding:0 12px; font-weight:100;
}
h3.border{border:1px solid #c5e4ff; border-bottom:none;}
h3 img{position:relative; top:7px;}
h3 span{float:left; background:url(images/green/bg.gif) no-repeat 0px -570px;width:auto; height:33px; line-height:33px; text-align:left;
font-weight:bold; color:#85c927; padding-left:12px;}
h5{height:26px; line-height:26px; text-align:right; background-color:#f5fbe4; font-size:12px;
color:#508908; padding:0 10px 0 0;
}
h5 span{float:left; font-weight:bold; background:url(images/green/bg.gif) no-repeat 0 -616px; padding-left:25px;}
h6{height:23px; line-height:23px; text-align:right; font-size:12px; background:#f5fbe4; color:#508908;
border:1px solid #fff; padding-right:10px;
}
h6 span{float:left; padding-left:15px;}
/*页面留白*/
.blank{height:8px; line-height:8px; clear:both; visibility:hidden;}
.blank5{height:5px; line-height:5px;/* _margin:-3px 0;*/ clear:both; visibility:hidden;}
/*布局*/
.AreaL{width:200px; float:left; margin-right:10px;}
.AreaR{width:750px; float:left;}
/* ====================
导航部分
==================== */
/*顶部管理型导航*/
.log{height:50px;}
.log li{float:left;}
.log .userInfo{*margin-right:10px; /*width:300px;*/ text-align:left;}
.log .userInfo a{color:#508908; text-decoration:none;}
.log li img{position:relative; top:5px;}
#topNav{background:url(images/green/topNavBg.gif) no-repeat left top; height:31px;
line-height:31px; color:#508908; padding:0px 15px; margin:0px 10px; position:relative;
}
#topNav .topNavR{background:url(images/green/topNavR.gif) no-repeat; width:5px; height:31px;
position:absolute; top:0px; right:0px;
}
#topNav a{color:#508908; text-decoration:none;}
/*页面主导航*/
#mainNav{padding:0 25px; width:910px;}
#mainNav a{display:block; height:26p; float:left; line-height:26px; text-align:center;
padding:0 15px; background:url(images/green/NavBg.gif) no-repeat 0 -29px; position:relative;
margin-right:2px; color:#508908; text-decoration:none;
}
#mainNav a span{width:3px; height:26px; background:url(images/green/NavBg.gif) no-repeat 0 -88px;
position:absolute; top:0px; right:0px;
}
#mainNav a:hover{display:block; height:26p; float:left; line-height:26px; text-align:center;
padding:0 15px; background:url(images/green/NavBg.gif) no-repeat 0 0; position:relative;
margin-right:2px; color:#fff; text-decoration:none;
}
#mainNav .cur{display:block; height:26p; float:left; line-height:26px; text-align:center;
padding:0 15px; background:url(images/green/NavBg.gif) no-repeat 0 0; position:relative;
margin-right:2px; color:#fff; text-decoration:none; font-weight:bold;
}
#mainNav a:hover span,#mainNav .cur span{width:3px; height:26px; background:url(images/green/NavBg.gif) no-repeat 0 -59px;
position:absolute; top:0px; right:0px;
}
/*搜索*/
#search{border:1px solid #9dbd50; background:url(images/green/searchBg.gif) repeat-x left top; width:918px;
padding:0px 20px; height:36px; line-height:36px;
}
#search a{color:#fff; text-decoration:none;}
#search .keys{background:url(images/green/bg.gif) no-repeat 0 -28px;
color:#fff; padding-left:40px;
}
#search .go{background:url(images/bnt_search.gif); border:none; width:52px; height:19px;/* position:relative; top:2px; utf8下*/}
/*当前位置*/
#ur_here{border:1px solid #ddf89b; border-top:none; background:url(images/green/uh_bg.gif) repeat-x left top;
height:31px; line-height:31px; padding:0 12px;
}
#ur_here a{color:#3f3f3f; text-decoration:none;}
/* ====================
模块
==================== */
/*购物车*/
.cart{background:url(images/green/catBg.gif) no-repeat left top; padding:15px 10px 15px 50px;
color:#006bcd; height:50px; _padding:12px 10px 15px 50px;
}
.cart a{color:#508908; text-decoration:none;}
.cart a:hover{color:#274402; text-decoration:underline;}
/*商品分类*/
#category_tree{border:4px solid #f6fbe6; background-color:#fff;}
#category_tree dl{margin:6px;}
#category_tree dt{background:url(images/lineBg.gif) repeat-x left bottom;
color:#3f3f3f; padding:2px 0 3px 12px;
}
#category_tree dt a{background:url(images/green/bg.gif) no-repeat 0 -69px;
color:#3f3f3f; padding-left:15px; text-decoration:none;
}
#category_tree dd{padding:3px 0 3px 10px;}
#category_tree dd a{color:#404040; text-decoration:none;}
#category_tree dd a:hover{color:#ff6600; text-decoration:none;}
/*销售排行*/
.top10Tit{background:url(images/green/bg.gif) no-repeat 0px -85px; height:30px;}
.top10List{border:1px solid #edfac4; background-color:#fff; margin:0px 4px 4px 4px;}
.top10List ul{border-bottom:1px solid #edfac4; position:relative;}
.top10List .iteration{position:absolute; top:6px; left:6px;}
.top10List .iteration1{padding-left:3px;}
.top10List li.topimg{width:35px; height:35px;}
.top10List .samllimg{width:35px; height:35px; margin-bottom:4px;}
.top10List li{padding:3px 3px 3px 23px; float:left;}
/*linkCOLOR*/
.top10List li a,#mallNews .NewsList li a,.boxCenterList li a{color:#3f3f3f; text-decoration:none;}
.top10List li a:hover,#mallNews .NewsList li a:hover,.boxCenterList li a:hover{color:#ff6600; text-decoration:none;}
/*首页焦点图*/
#focus{border-right:1px solid #ddf5b1; padding:8px; background:url(images/green/foucsBg.gif) repeat-x left top;}
#mallNews{width:230px; padding:8px 8px 0px 8px; background:url(images/green/foucsBg.gif) repeat-x left top;}
#mallNews .NewsTit{background:url(images/green/bg.gif) 0px -132px; height:23px;}
#mallNews .NewsList{background:#FFFFFF; padding:8px;}
#mallNews .NewsList ul{margin-top:10px;}
#mallNews .NewsList li{background:url(images/green/bg.gif) no-repeat 0px -167px; padding:0px 0px 0px 10px;
text-align:left;
}
/*今日特价和品牌*/
#sales{width:500px; background:url(images/green/salesBg.gif) repeat-x left bottom;
border-bottom:2px solid #f0f1f3; background-color:#f6fbe5;
}
#sales h1{font-size:12px; background:url(images/green/salesTitBg.gif) no-repeat; height:33px; text-align:right;}
#sales h1 img{position:relative; top:10px; right:8px;}
#sales .goodBox{margin:10px 0px 10px 10px; _margin-left:5px;}
#sales .goodBox .goodList p{text-align:left; color:#3f3f3f;}
#sales .goodBox .goodList p a{color:#3f3f3f; text-decoration:none;}
#sales .goodBox .goodList p a:hover{color:#ff6600; text-decoration:none;}
#sales .goodList{width:110px; margin:0px 5px 0px 5px; float:left;}
#sales .goodList img{background:url(images/green/salesGoodBg.gif) no-repeat; width:100px; height:100px; padding:5px;
}
#sales .goodList p{ margin-top:3px; text-align:center;}
#brands{width:247px; height:199px; *height:201px; padding:1px 0 0 1px; position:relative;}
#brands .brandsMore{position:absolute; left:178px; bottom:10px;
width:65px; height:41px;
}
#brands .brandsMore img{border:none; width:65px; height:41px;}
#brands img{width:78px; height:40px; border:1px solid #f3fbe3;}
#brands a{color:#0069cd; text-decoration:none; margin:2px 1px; display:block; float:left;}
.brandsIe6{_width:250px;}/*在ie6下特价商品不存在的话品牌推荐永远靠右显示*/
/*精品推荐,新品上市,热卖商品*/
.centerPadd{padding:5px 8px 8px 8px; overflow:hidden;}
.itemTit{height:30px; background:url(images/green/bg.gif) no-repeat 0px -195px; padding-left:190px; text-align:right;
/*margin-bottom:-3px; _margin-bottom:-2px;*/
}
.itemTit.New{background:url(images/green/bg.gif) no-repeat 0px -225px;}
.itemTit.Hot{background:url(images/green/bg.gif) no-repeat 0px -256px;}
.itemTit img{position:relative; top:7px;}
.itemTit h2{float:left; height:27px; background:url(images/green/itemH2Bg.gif) repeat-x left top; border:1px solid #e7f9c7;
font-size:12px; text-align:center; color:#3f3f3f; font-weight:100; padding:0px 10px; line-height:28px; margin:0 6px 0 0;
border-bottom:none; position:relative; bottom:-3px; display:inline; white-space:nowrap;
}
.itemTit h2 a{color:#3f3f3f; text-decoration:none;}
.itemTit .h2bg{height:27px; line-height:28px; border:none; background:none;
font-size:12px; text-align:center; color:#508908; font-weight:100; padding:0px 10px;
display:inline; white-space:nowrap;
}
.itemTit .h2bg a{color:#508908; text-decoration:none;}
.centerPadd .goodsBox{border:1px solid #e7f9c7; background:#fff; padding:12px 0px 0px 17px; *padding:12px 0px 0px 17px;
_padding:12px 0px 0px 0px;}
.centerPadd .goodsBox .more{text-align:right; clear:both; margin:0 8px 8px 0;}
/*单个商品*/
.goodsItem{width:110px; float:left; position:relative; overflow:hidden; margin:0px 14px 15px 14px;}
.goodsItem .goodsimg{width:100px; height:100px; border:4px solid #f6fbe6; margin-bottom:4px;}
.goodsItem img{width:52px; height:17px;}
.goodsItem p{text-align:left; color:#3f3f3f;}
.goodsItem p a{color:#3f3f3f; text-decoration:none;}
.goodsItem p a:hover{color:#ff6600; text-decoration:none;}
.goodsItem span{width:40px; height:40px; position:absolute;left:0px; top:0px;}
.goodsItem span.best{background:url(images/green/bg.gif) no-repeat 0px -304px;}
.goodsItem span.news{background:url(images/green/bg.gif) no-repeat -75px -304px;}
.goodsItem span.hot{background:url(images/green/bg.gif) no-repeat -161px -304px;}
/*帮助*/
.helpTitBg{background:url(images/green/helpTitBg.gif) repeat-x left top; text-align:left; border:1px solid #ddf5b1; background-color:#fff;
padding:0 0 10px 15px;
}
.helpTitBg dl{float:left; margin-right:30px; _margin-right:20px; _width:130px;}
.helpTitBg dt{background:url(images/green/bg.gif) no-repeat 0px -570px;width:auto; height:33px; line-height:33px; text-align:left;
font-weight:bold; color:#93cc44; padding-left:12px; margin-bottom:8px;}
.helpTitBg dt a{font-weight:bold; color:#93cc44; text-decoration:none;}
.helpTitBg dd a{color:#3f3f3f; text-decoration:none; background:url(images/green/bg.gif) no-repeat 0px -170px; padding:0px 0px 0px 10px;}
/*相关商品*/
.boxCenterList ul{height:1%; margin-bottom:5px;}
.boxCenterList li{float:left; width:120px;}
.boxCenterList li.goodsimg{width:48px; margin-right:10px;}
.boxCenterList li.goodsimg img{width:48px; height:48px; display:block;}
/*相关文章(其它带有小三角点的文字列表共用)*/
.RelaArticle a,.alone{background:url(images/green/bg.gif) no-repeat 0px -170px; padding:0px 0px 0px 10px; color:#3f3f3f; text-decoration:none;}
.RelaArticle a:hover{background:url(images/green/bg.gif) no-repeat 0px -170px; padding:0px 0px 0px 10px; color:#ff6600; text-decoration:none;}
/*浏览历史,收藏*/
.history h2{height:26px; line-height:26px; padding:0px 10px 0 20px; text-align:center; font-size:12px;
background:url(images/green/bg.gif) no-repeat 0px -466px; float:left; color:#508908;
margin:6px 5px 0 0; border:1px solid #e7f9c7; border-bottom:none; background-color:#FFFFFF;
}
.history .h2bg{height:26px; line-height:26px; padding:0px 10px 0 20px; text-align:center; font-size:12px;
background:url(images/green/bg.gif) no-repeat 0px -508px; float:left; color:#a0a0a0;
margin:6px 5px 0 0; border:none;
}
#history li{width:100%;}
#clear_history a{background:none; padding:0px; color:#3f3f3f; text-decoration:none;float:right;cursor:pointer;}
.colle a{background:none; padding:0px; color:#3f3f3f; text-decoration:none;}
.colle a:hover{background:none; padding:0px; color:#ff6600; text-decoration:none;}
/* ====================
商品详情页面部分模块
==================== */
#goodsInfo{background:#f2f2f2; padding:8px; _height:1%;}
#goodsInfo .imgInfo{width:230px; float:left; margin-right:10px; overflow:hidden;}
#goodsInfo .imgInfo .thumb{width:230px; height:230px; display:block;}/*商品详情图片*/
#goodsInfo span{width:4px; height:48px; background:url(images/green/bg.gif) no-repeat 0 -527px; float:left;}
#goodsInfo span.spanR{width:4px; height:48px; background:url(images/green/bg.gif) no-repeat -5px -527px; float:right;}
#goodsInfo .gallery{width:204px; float:left; margin-left:10px; _margin-left:5px; overflow:hidden;}
#goodsInfo .gallery ul{width:auto;}
#goodsInfo .gallery li{float:left; width:48px; margin:0 2px;}
#goodsInfo .gallery li img{width:46px; height:46px; display:block;}
/*文字信息*/
#goodsInfo .textInfo{background:#fff; width:473px; float:left; padding:10px;}
#goodsInfo .textInfo p{font-size:14px; font-weight:bold; padding:0 5px 5px 8px;}
#goodsInfo .textInfo ul{border-top:1px solid #ccc;}
#goodsInfo .textInfo li{background:url(images/lineBg.gif) repeat-x left bottom; padding:0px 8px; _height:1%;}
#goodsInfo .textInfo li.padd{padding:7px 0px 7px 8px;}
#goodsInfo .textInfo li dd{width:50%; float:left; padding:7px 0px;}
#goodsInfo .textInfo li dd.ddR{border-left:1px solid #eeecec; width:48%; padding-left:8px;}
#goodsInfo .textInfo li dd.ddL{border-right:1px solid #eeecec;}
#goodsInfo .textInfo a{color:#006bce; text-decoration:underline;}
#goodsInfo .textInfo .loop{background:#f7f7f7; margin-top:8px;}
/*用户评论*/
.ie6{padding-left:25px; _padding-left:15px; height:1%;}/*购买此商品的人还购买的商品*/
.comments li{background:url(images/lineBg.gif) repeat-x left bottom; padding:3px 8px; width:97%; _height:1%; text-align:left; position:relative;
margin-bottom:8px;
}
.comments li img{position:absolute; right:0px; top:3px;}
.comments li p{margin:3px auto; text-align:left;}
.commentsList{border:1px solid #ccc; background:#f7f7f7; padding:10px;}
.commentsList .inputBorder{border:1px solid #ccc; background:#fff;}
.captcha{margin-left:0px; position:relative; top:-1px; *margin-left:8px; *position:relative; top:3px; cursor:pointer;}
/* ====================
品牌推荐
==================== */
/*品牌列表*/
#brandList{background:url(images/brandBg.gif) repeat-y top center; margin-top:12px; height:1%;}
#brandList .brandBox{width:240px; _width:236px; float:left; margin:0 5px 20px 5px; text-align:center; overflow:hidden; height:160px;}
#brandList .brandBox .brandLogo{width:188px; height:52px; overflow:hidden;}
#brandList .brandBox h4{height:23px; line-height:23px; background:#e9e9e9; margin:15px 0 8px 0; padding:0 10px; text-align:right;
font-weight:100; font-size:12px;
}
#brandList .brandBox h4 span,#brandList .brandBox h4 span a{float:left; font-weight:bold; color:#3f3f3f; text-decoration:none;}
#brandList p{text-align:left; margin-bottom:5px; color:#909090; padding:8px;}
#brandList p.brandCategory,#brandList p.brandCategory a{text-align:left; color:#006acd; text-decoration:none;}
#brandList .brandArticle{border:1px dashed #d9d9d9; background:#f8f8f8; text-align:left;}
.brandCategoryA a{ margin-right:15px;}
/* ====================
用户中心
==================== */
.box_1 .userCenterBox{border:4px solid #fbfef2; background-color:#fff;}
.usBox{background:#f2f2f2; border:1px solid #e2e2e2; padding:15px; width:928px;}
.usBox_1{background:#fff; text-align:left; width:297px; height:208px; padding:43px 153px 60px 123px;}
.usBox_1 .logtitle{height:30px; background:url(images/ur_bg.gif) no-repeat 0px 0px;}
.us_Submit{border:none; width:115px; height:40px; background:url(images/bnt_ur_log.gif);}
.us_Submit_reg{border:none; width:113px; height:40px; background:url(images/bnt_ur_reg.gif);}
.usTxt{width:265px; height:267px; padding:43px 0 0 90px; background:#f2f2f2; float:right;
text-align:left; background:url(images/ur_bg1.gif) no-repeat 0 50%; line-height:23px;
}
.usTxt img{margin-top:15px;}
/*注册*/
.usBox_2{background:#fff; text-align:left; padding:43px 153px 60px 123px;}
.usBox_2 .regtitle{height:30px; background:url(images/ur_bg.gif) no-repeat 0px -34px;}
.actionSub a{color:#006acc; text-decoration:underline;
background:url(images/ur_bg.gif) no-repeat 0px -68px; padding-left:14px;
}
.box_1 .userCenterBox .userMenu a{display:block; height:25px; line-height:25px; background:url(images/menuBg.gif) no-repeat 0 -30px;
color:#3f3f3f; text-decoration:none; margin:0 0 3px 10px; padding-left:3px;
}
.box_1 .userCenterBox .userMenu a.curs{background:url(images/menuBg.gif) no-repeat 0 0px; font-weight:bold;}
.box_1 .userCenterBox .userMenu a img{ margin-right:3px;}
.msgBottomBorder{clear:both; background:url(images/lineBg.gif) repeat-x left bottom; padding-bottom:8px; margin-bottom:8px;}
/* ====================
商品分类页面
==================== */
/*属性组合搜索*/
.screeBox{padding:10px;}
.screeBox a{color:#404040;}
.screeBox span{background:#91d3f7; padding:3px 5px; margin:0 3px;}
.sort a{ position:relative; bottom:5px;}
.sort input{position:relative; top:3px;}
/*商品列表显示方式*/
.goodsList{ padding:10px 10px 0 10px;}
.goodsList ul{ margin-bottom:10px;}
.goodsList ul#bgcolor{background:#fbfbfb; border-top:1px dashed #e8e8e8; border-bottom:1px dashed #e8e8e8;}
.goodsList li{float:left; padding-top:8px;}
.goodsList li.thumb{width:80px; text-align:center;}
.goodsList li.thumb img{width:50px; height:50px; border:1px solid #ccc; padding:1px;}
.goodsList li.goodsName{width:290px; margin-right:10px;}
.goodsList li.action{float:right; margin-left:10px;}
.goodsList li.action a.abg{background:url(images/green/bg.gif) no-repeat 0px -735px; padding-left:18px; position:relative; bottom:5px;}
/* ====================
团购
==================== */
.group{background:#f2f2f2; padding:8px;}
.group li{float:left; background:#fff; padding:8px;}
/* ====================
购物流程
==================== */
.flowBox{border:1px solid #ddf5b1; border-top:2px solid #9dbd50;}
.flowBox table{ margin:5px auto;}
/*2.62在购物车里面显示相关配件*/
.flowGoodsFittings{padding:10px;}
.flowGoodsFittings ul{height:1%; margin:5px 4px; float:left;}
.flowGoodsFittings li{float:left; width:120px;}
.flowGoodsFittings li.goodsimg{width:48px; margin-right:10px;}
.flowGoodsFittings li.goodsimg img{width:48px; height:48px; display:block;}
/* ====================
文章列表页-2009.6.8
==================== */
.article_search{margin:8px 0;}
.article_search .inputBg{width:300px;}
/* ====================
打印报价单
==================== */
.quotation{ margin:20px auto 20px auto; text-align:center;}
/*翻页*/
.pagebar{height:20px; float:right;}
.pagebar img{position:relative; top:2px;}
.pagebar a{display:block; float:left; margin:0 2px; color:#0066cc; text-decoration:none;}
.pagebar a:hover{color:#ff5a6a; text-decoration:none;}
.pagebar .page_now{display:block; float:left; margin:0 5px; color:#ff5a6a; font-weight:bold; background:#fff;}
#pager a{color:#0066cc; text-decoration:none;}
/*底部导航+友情链接*/
#bottomNav{width:958px;}
.bNavList{border:1px solid #fff; background:#f7f9e4; height:27px; line-height:27px; padding:0 12px;}
.links{border:1px solid #fff; background:#f7f9e4; padding:0 12px;}
.bNavList a,.links a{color:#508908; text-decoration:none;}
.bNavList img{_position:relative; top:8px;}
.links img{width:88px; height:30px; margin:5px;}
/*版权*/
#footer{background:url(images/logo1.gif) no-repeat 5% 50%; padding-left:200px; width:760px; margin:10px auto;}
#footer .text{background:url(images/footerLine.gif) no-repeat left center; padding-left:50px; *padding-bottom:20px;}
#footer .text a{color:#404040; text-decoration:none;}
/* ======商品比较浮动块 ====== */
#compareBox {
width:128px;
background:url(images/compareBg.gif) no-repeat top center;
background-color:#edf8ff;
padding:35px 0 8px 0;
border: 1px solid #c5e4ff;
position: absolute;
right:1px;
top:200px;
}
#compareBox input {
width:52px; height:13px;
border:none;
background:url(images/compareSub.gif) no-repeat;
}
#compareList {
margin:0px 0px 8px 0px;
padding:0px;
width:120px;
background:#FFFFFF;
border:1px solid #d6ecff;
}
#compareList li {
color: #333;
text-align:left;
background: #fff;
padding: 3px 5px;
margin: 3px 0;
}
#compareList li img {
float:right;
padding-top:4px;
}
/*购物车提示点击更新按钮式样2.6.2版本添加*/
.messageli {
list-style-type:none;
padding:5px;
color:red
}
.messagediv {
font-size:12px;
position:absolute;
border:1px solid #FFD700;
text-align:center;
padding:5px;
background-color:#FFFACD;
filter:alpha(opacity=50);
-moz-opacity:0.7;
opacity: 0.7;
}
/* 积分兑换样式修改 */
.point li{
float:left;
width:300px;
} | zzshop | trunk/themes/default/style_green.css | CSS | asf20 | 24,265 |
/*
Template Name: ECSHOP Default
Template URI: http://www.ecshop.com/
Description: 默认升级粉红版.
Version: 2.7.2
Author: ECSHOP Team
Author URI: http://www.ecshop.com/
Logo filename: logo.gif
Template Type: typepink_0
*/
/* ====================
公共样式
==================== */
body{background:#fff; font-size:12px; font-family:"宋体",Verdana, Arial; line-height:150%; margin:5px 0 0 0; padding:0; color:#404040;}
div{margin:0 auto; padding:0;}
h1,h2,h3,h4,h5,h6,ul,li,dl,dt,dd,form,img,p{
margin:0; padding:0; border:none; list-style-type:none;
}
.block{
width:960px; height:auto;
}
.f_l{float:left;}
.f_r{float:right;}
.tl{ text-align:left;}
.tc{ text-align:center;}
.tr{ text-align:right;}
.dis{display:block;}
.inline{display:inline;}
.none{display:none;}
.dashed{background:url(images/lineBg.gif) repeat-x left top; color:#3f3f3f; padding:2px 0 3px 12px;}
.clearfix:after{
content:"."; display:block; height:0; clear:both;
visibility:hidden;
}
*html .clearfix{
height:1%;
}
*+html .clearfix{
height:1%;
}
/*英文强制换行*/
.word{word-break:break-all;}
/*边框*/
.B_blue{border:1px solid #fcc9d8;}
.B_input{border:1px solid #ee6b79;}
.inputBg{border:1px solid #b3b3b3; background:url(images/inputbg.gif) repeat-x left top; height:18px;}
/*字体颜色*/
.f1{color:#ff6666;}
.f2{color:#006bd0; font-weight:bold; margin-right:15px;}
.f3{color:#9e9e9e;}
.f4{color:#fe596a;}
.f4_b{color:#fe596a; font-weight:bold;}
.f5{ font-size:14px; font-weight:bold;}
.f6{color:#3f3f3f;}
.market{ font-size:14px; text-decoration:line-through;}
.shop{color:#fe596a; font-size:14px; font-weight:600;}
.market_s{text-decoration:line-through;}
.shop_s{color:#fe596a;}
/*按钮部分*/
.bnt_blue{
background:url(images/pink/bg.gif) no-repeat 0px 0px; width:52px; height:21px;
text-align:center; line-height:21px; color:#fff; border:none; cursor:pointer;
}
.bnt_blue_1{
background:url(images/pink/bg.gif) no-repeat 0px -663px; width:77px; height:21px;
text-align:center; line-height:21px; color:#fff; border:none; cursor:pointer;
}
.bnt_blue_2{
background:url(images/pink/bg.gif) no-repeat 0px -696px; width:139px; height:21px;
text-align:center; line-height:21px; color:#fff; border:none; cursor:pointer;
}
.bnt_bonus{
background:url(images/pink/bg.gif) no-repeat -56px 0px; width:52px; height:21px;
text-align:center; line-height:21px; color:#fff; border:none; cursor:pointer;
}
/*模块容器*/
.box{background:#f1f1f1; padding-bottom:2px; overflow:hidden;}
.box_1{border:1px solid #f1bfc0; background-color:#fff;}
.box_2{border:1px solid #f1bfc0; background:url(images/pink/box_2Bg.gif) repeat-x top left;
background-color:#fef7f9; overflow:hidden;
}
.boxCenterList{padding:8px;}
/*模块标题*/
h3{height:33px; line-height:33px; font-size:12px; background:url(images/pink/h3title.gif) repeat-x left top; text-align:right;
padding:0 12px; font-weight:100;
}
h3.border{border:1px solid #c5e4ff; border-bottom:none;}
h3 img{position:relative; top:7px;}
h3 span{float:left; background:url(images/pink/bg.gif) no-repeat 0px -570px;width:auto; height:33px; line-height:33px; text-align:left;
font-weight:bold; color:#cb0f26; padding-left:12px;}
h5{height:26px; line-height:26px; text-align:right; background-color:#f8f2ef; font-size:12px;
color:#f0778d; padding:0 10px 0 0;
}
h5 span{float:left; font-weight:bold; background:url(images/pink/bg.gif) no-repeat 0 -616px; padding-left:25px;}
h6{height:23px; line-height:23px; text-align:right; font-size:12px; background:#fef0f4; color:#cb0f26;
border:1px solid #fff; padding-right:10px;
}
h6 span{float:left; padding-left:15px;}
/*页面留白*/
.blank{height:8px; line-height:8px; clear:both; visibility:hidden;}
.blank5{height:5px; line-height:5px;/* _margin:-3px 0;*/ clear:both; visibility:hidden;}
/*布局*/
.AreaL{width:200px; float:left; margin-right:10px;}
.AreaR{width:750px; float:left;}
/* ====================
导航部分
==================== */
/*顶部管理型导航*/
.log{height:50px;}
.log li{float:left;}
.log .userInfo{*margin-right:10px; /*width:300px;*/ text-align:left;}
.log .userInfo a{color:#cb0f26; text-decoration:none;}
.log li img{position:relative; top:5px;}
#topNav{background:url(images/pink/topNavBg.gif) no-repeat left top; height:31px;
line-height:31px; color:#bebfc1; padding:0px 15px; margin:0px 10px; position:relative;
}
#topNav .topNavR{background:url(images/pink/topNavR.gif) no-repeat; width:5px; height:31px;
position:absolute; top:0px; right:0px;
}
#topNav a{color:#cb0f26; text-decoration:none;}
/*页面主导航*/
#mainNav{padding:0 25px; width:910px;}
#mainNav a{display:block; height:26p; float:left; line-height:26px; text-align:center;
padding:0 15px; background:url(images/pink/NavBg.gif) no-repeat 0 -29px; position:relative;
margin-right:2px; color:#cb0f26; text-decoration:none;
}
#mainNav a span{width:3px; height:26px; background:url(images/pink/NavBg.gif) no-repeat 0 -88px;
position:absolute; top:0px; right:0px;
}
#mainNav a:hover{display:block; height:26p; float:left; line-height:26px; text-align:center;
padding:0 15px; background:url(images/pink/NavBg.gif) no-repeat 0 0; position:relative;
margin-right:2px; color:#fff; text-decoration:none;
}
#mainNav .cur{display:block; height:26p; float:left; line-height:26px; text-align:center;
padding:0 15px; background:url(images/pink/NavBg.gif) no-repeat 0 0; position:relative;
margin-right:2px; color:#fff; text-decoration:none; font-weight:bold;
}
#mainNav a:hover span,#mainNav .cur span{width:3px; height:26px; background:url(images/pink/NavBg.gif) no-repeat 0 -59px;
position:absolute; top:0px; right:0px;
}
/*搜索*/
#search{border:1px solid #da4957; background:url(images/pink/searchBg.gif) repeat-x left top; width:918px;
padding:0px 20px; height:36px; line-height:36px;
}
#search a{color:#fff; text-decoration:none;}
#search .keys{background:url(images/pink/bg.gif) no-repeat 0 -28px;
color:#fff; padding-left:40px;
}
#search .go{background:url(images/bnt_search.gif); border:none; width:52px; height:19px;/* position:relative; top:2px; utf8下*/}
/*当前位置*/
#ur_here{border:1px solid #f0989a; border-top:none; background:url(images/pink/uh_bg.gif) repeat-x left top;
height:36px; line-height:36px; padding:0 12px;
}
#ur_here a{color:#6c6e69; text-decoration:none;}
/* ====================
模块
==================== */
/*购物车*/
.cart{background:url(images/pink/catBg.gif) no-repeat left top; padding:15px 10px 15px 50px;
color:#006bcd; height:50px; _padding:12px 10px 15px 50px;
}
.cart a{color:#cb0f26; text-decoration:none;}
.cart a:hover{color:#ff6600; text-decoration:underline;}
/*商品分类*/
#category_tree{border:4px solid #fef7f9; background-color:#fff;}
#category_tree dl{margin:6px;}
#category_tree dt{background:url(images/lineBg.gif) repeat-x left bottom;
color:#3f3f3f; padding:2px 0 3px 12px;
}
#category_tree dt a{background:url(images/pink/bg.gif) no-repeat 0 -69px;
color:#3f3f3f; padding-left:15px; text-decoration:none;
}
#category_tree dd{padding:3px 0 3px 10px;}
#category_tree dd a{color:#404040; text-decoration:none;}
#category_tree dd a:hover{color:#ff6600; text-decoration:none;}
/*销售排行*/
.top10Tit{background:url(images/pink/bg.gif) no-repeat 0px -85px; height:30px;}
.top10List{border:1px solid #fce6ec; background-color:#fff; margin:0px 4px 4px 4px;}
.top10List ul{border-bottom:1px solid #fce6ec; position:relative;}
.top10List .iteration{position:absolute; top:6px; left:6px;}
.top10List .iteration1{padding-left:3px;}
.top10List li.topimg{width:35px; height:35px;}
.top10List .samllimg{width:35px; height:35px; margin-bottom:4px;}
.top10List li{padding:3px 3px 3px 23px; float:left;}
/*linkCOLOR*/
.top10List li a,#mallNews .NewsList li a,.boxCenterList li a{color:#3f3f3f; text-decoration:none;}
.top10List li a:hover,#mallNews .NewsList li a:hover,.boxCenterList li a:hover{color:#ff6600; text-decoration:none;}
/*首页焦点图*/
#focus{border-right:1px solid #f1bfc0; padding:8px; background:url(images/pink/foucsBg.gif) repeat-x left top;}
#mallNews{width:230px; padding:8px 8px 0px 8px; background:url(images/pink/foucsBg.gif) repeat-x left top;}
#mallNews .NewsTit{background:url(images/pink/bg.gif) 0px -132px; height:23px;}
#mallNews .NewsList{background:#FFFFFF; padding:8px;}
#mallNews .NewsList ul{margin-top:10px;}
#mallNews .NewsList li{background:url(images/pink/bg.gif) no-repeat 0px -167px; padding:0px 0px 0px 10px;
text-align:left;
}
/*今日特价和品牌*/
#sales{width:500px; background:url(images/pink/salesBg.gif) repeat-x left bottom;
border-bottom:2px solid #f0f1f3; background-color:#fef9fa;
}
#sales h1{font-size:12px; background:url(images/pink/salesTitBg.gif) no-repeat; height:33px; text-align:right;}
#sales h1 img{position:relative; top:10px; right:8px;}
#sales .goodBox{margin:10px 0px 10px 10px; _margin-left:5px;}
#sales .goodBox .goodList p{text-align:left; color:#3f3f3f;}
#sales .goodBox .goodList p a{color:#3f3f3f; text-decoration:none;}
#sales .goodBox .goodList p a:hover{color:#ff6600; text-decoration:none;}
#sales .goodList{width:110px; margin:0px 5px 0px 5px; float:left;}
#sales .goodList img{background:url(images/pink/salesGoodBg.gif) no-repeat; width:100px; height:100px; padding:5px;
}
#sales .goodList p{ margin-top:3px; text-align:center;}
#brands{width:247px; height:199px; *height:201px; padding:1px 0 0 1px; position:relative;}
#brands .brandsMore{position:absolute; left:178px; bottom:10px;
width:65px; height:41px;
}
#brands .brandsMore img{border:none; width:65px; height:41px;}
#brands img{width:78px; height:40px; border:1px solid #f1bfc0;}
#brands a{color:#0069cd; text-decoration:none; margin:2px 1px; display:block; float:left;}
.brandsIe6{_width:250px;}/*在ie6下特价商品不存在的话品牌推荐永远靠右显示*/
/*精品推荐,新品上市,热卖商品*/
.centerPadd{padding:5px 8px 8px 8px; overflow:hidden;}
.itemTit{height:30px; background:url(images/pink/bg.gif) no-repeat 0px -195px; padding-left:190px; text-align:right;
/*margin-bottom:-3px; _margin-bottom:-2px;*/
}
.itemTit.New{background:url(images/pink/bg.gif) no-repeat 0px -225px;}
.itemTit.Hot{background:url(images/pink/bg.gif) no-repeat 0px -256px;}
.itemTit img{position:relative; top:7px;}
.itemTit h2{float:left; height:27px; background:url(images/pink/itemH2Bg.gif) repeat-x left top; border:1px solid #fce6ec;
font-size:12px; text-align:center; color:#3f3f3f; font-weight:100; padding:0px 10px; line-height:28px; margin:0 6px 0 0;
border-bottom:none; position:relative; bottom:-3px; display:inline; white-space:nowrap;
}
.itemTit h2 a{color:#3f3f3f; text-decoration:none;}
.itemTit .h2bg{height:27px; line-height:28px; border:none; background:none;
font-size:12px; text-align:center; color:#cb0f26; font-weight:100; padding:0px 10px;
display:inline; white-space:nowrap;
}
.itemTit .h2bg a{color:#cb0f26; text-decoration:none;}
.centerPadd .goodsBox{border:1px solid #fce6ec; background:#fff; padding:12px 0px 0px 17px; *padding:12px 0px 0px 17px;
_padding:12px 0px 0px 0px;}
.centerPadd .goodsBox .more{text-align:right; clear:both; margin:0 8px 8px 0;}
/*单个商品*/
.goodsItem{width:110px; float:left; position:relative; overflow:hidden; margin:0px 14px 15px 14px;}
.goodsItem .goodsimg{width:100px; height:100px; border:4px solid #fef9fa; margin-bottom:4px;}
.goodsItem img{width:52px; height:17px;}
.goodsItem p{text-align:left; color:#3f3f3f;}
.goodsItem p a{color:#3f3f3f; text-decoration:none;}
.goodsItem p a:hover{color:#ff6600; text-decoration:none;}
.goodsItem span{width:40px; height:40px; position:absolute;left:0px; top:0px;}
.goodsItem span.best{background:url(images/pink/bg.gif) no-repeat 0px -304px;}
.goodsItem span.news{background:url(images/pink/bg.gif) no-repeat -75px -304px;}
.goodsItem span.hot{background:url(images/pink/bg.gif) no-repeat -161px -304px;}
/*帮助*/
.helpTitBg{background:url(images/pink/helpTitBg.gif) repeat-x left top; text-align:left; border:1px solid #fddae7; background-color:#fff;
padding:0 0 10px 15px;
}
.helpTitBg dl{float:left; margin-right:30px; _margin-right:20px; _width:130px;}
.helpTitBg dt{background:url(images/pink/bg.gif) no-repeat 0px -570px;width:auto; height:33px; line-height:33px; text-align:left;
font-weight:bold; color:#f0778d; padding-left:12px; margin-bottom:8px;}
.helpTitBg dt a{font-weight:bold; color:#f0778d; text-decoration:none;}
.helpTitBg dd a{color:#3f3f3f; text-decoration:none; background:url(images/pink/bg.gif) no-repeat 0px -170px; padding:0px 0px 0px 10px;}
/*相关商品*/
.boxCenterList ul{height:1%; margin-bottom:5px;}
.boxCenterList li{float:left; width:120px;}
.boxCenterList li.goodsimg{width:48px; margin-right:10px;}
.boxCenterList li.goodsimg img{width:48px; height:48px; display:block;}
/*相关文章(其它带有小三角点的文字列表共用)*/
.RelaArticle a,.alone{background:url(images/pink/bg.gif) no-repeat 0px -170px; padding:0px 0px 0px 10px; color:#3f3f3f; text-decoration:none;}
.RelaArticle a:hover{background:url(images/pink/bg.gif) no-repeat 0px -170px; padding:0px 0px 0px 10px; color:#ff6600; text-decoration:none;}
/*浏览历史,收藏*/
.history h2{height:26px; line-height:26px; padding:0px 10px 0 20px; text-align:center; font-size:12px;
background:url(images/pink/bg.gif) no-repeat 0px -466px; float:left; color:#cb0f26;
margin:6px 5px 0 0; border:1px solid #feeff2; border-bottom:none; background-color:#FFFFFF;
}
.history .h2bg{height:26px; line-height:26px; padding:0px 10px 0 20px; text-align:center; font-size:12px;
background:url(images/pink/bg.gif) no-repeat 0px -508px; float:left; color:#a0a0a0;
margin:6px 5px 0 0; border:none;
}
#history li{width:100%;}
#clear_history a{background:none; padding:0px; color:#3f3f3f; text-decoration:none;float:right;cursor:pointer;}
.colle a{background:none; padding:0px; color:#3f3f3f; text-decoration:none;}
.colle a:hover{background:none; padding:0px; color:#ff6600; text-decoration:none;}
/* ====================
商品详情页面部分模块
==================== */
#goodsInfo{background:#f2f2f2; padding:8px; _height:1%;}
#goodsInfo .imgInfo{width:230px; float:left; margin-right:10px; overflow:hidden;}
#goodsInfo .imgInfo .thumb{width:230px; height:230px; display:block;}/*商品详情图片*/
#goodsInfo span{width:4px; height:48px; background:url(images/pink/bg.gif) no-repeat 0 -527px; float:left;}
#goodsInfo span.spanR{width:4px; height:48px; background:url(images/pink/bg.gif) no-repeat -5px -527px; float:right;}
#goodsInfo .gallery{width:204px; float:left; margin-left:10px; _margin-left:5px; overflow:hidden;}
#goodsInfo .gallery ul{width:auto;}
#goodsInfo .gallery li{float:left; width:48px; margin:0 2px;}
#goodsInfo .gallery li img{width:46px; height:46px; display:block;}
/*文字信息*/
#goodsInfo .textInfo{background:#fff; width:473px; float:left; padding:10px;}
#goodsInfo .textInfo p{font-size:14px; font-weight:bold; padding:0 5px 5px 8px;}
#goodsInfo .textInfo ul{border-top:1px solid #ccc;}
#goodsInfo .textInfo li{background:url(images/lineBg.gif) repeat-x left bottom; padding:0px 8px; _height:1%;}
#goodsInfo .textInfo li.padd{padding:7px 0px 7px 8px;}
#goodsInfo .textInfo li dd{width:50%; float:left; padding:7px 0px;}
#goodsInfo .textInfo li dd.ddR{border-left:1px solid #eeecec; width:48%; padding-left:8px;}
#goodsInfo .textInfo li dd.ddL{border-right:1px solid #eeecec;}
#goodsInfo .textInfo a{color:#006bce; text-decoration:underline;}
#goodsInfo .textInfo .loop{background:#f7f7f7; margin-top:8px;}
/*用户评论*/
.ie6{padding-left:25px; _padding-left:15px; height:1%;}/*购买此商品的人还购买的商品*/
.comments li{background:url(images/lineBg.gif) repeat-x left bottom; padding:3px 8px; width:97%; _height:1%; text-align:left; position:relative;
margin-bottom:8px;
}
.comments li img{position:absolute; right:0px; top:3px;}
.comments li p{margin:3px auto; text-align:left;}
.commentsList{border:1px solid #ccc; background:#f7f7f7; padding:10px;}
.commentsList .inputBorder{border:1px solid #ccc; background:#fff;}
.captcha{margin-left:0px; position:relative; top:-1px; *margin-left:8px; *position:relative; top:3px; cursor:pointer;}
/* ====================
品牌推荐
==================== */
/*品牌列表*/
#brandList{background:url(images/brandBg.gif) repeat-y top center; margin-top:12px; height:1%;}
#brandList .brandBox{width:240px; _width:236px; float:left; margin:0 5px 20px 5px; text-align:center; overflow:hidden; height:160px;}
#brandList .brandBox .brandLogo{width:188px; height:52px; overflow:hidden;}
#brandList .brandBox h4{height:23px; line-height:23px; background:#e9e9e9; margin:15px 0 8px 0; padding:0 10px; text-align:right;
font-weight:100; font-size:12px;
}
#brandList .brandBox h4 span,#brandList .brandBox h4 span a{float:left; font-weight:bold; color:#3f3f3f; text-decoration:none;}
#brandList p{text-align:left; margin-bottom:5px; color:#909090; padding:8px;}
#brandList p.brandCategory,#brandList p.brandCategory a{text-align:left; color:#006acd; text-decoration:none;}
#brandList .brandArticle{border:1px dashed #d9d9d9; background:#f8f8f8; text-align:left;}
.brandCategoryA a{ margin-right:15px;}
/* ====================
用户中心
==================== */
.box_1 .userCenterBox{border:4px solid #fef7f9; background-color:#fff;}
.usBox{background:#f2f2f2; border:1px solid #e2e2e2; padding:15px; width:928px;}
.usBox_1{background:#fff; text-align:left; width:297px; height:208px; padding:43px 153px 60px 123px;}
.usBox_1 .logtitle{height:30px; background:url(images/ur_bg.gif) no-repeat 0px 0px;}
.us_Submit{border:none; width:115px; height:40px; background:url(images/bnt_ur_log.gif);}
.us_Submit_reg{border:none; width:113px; height:40px; background:url(images/bnt_ur_reg.gif);}
.usTxt{width:265px; height:267px; padding:43px 0 0 90px; background:#f2f2f2; float:right;
text-align:left; background:url(images/ur_bg1.gif) no-repeat 0 50%; line-height:23px;
}
.usTxt img{margin-top:15px;}
/*注册*/
.usBox_2{background:#fff; text-align:left; padding:43px 153px 60px 123px;}
.usBox_2 .regtitle{height:30px; background:url(images/ur_bg.gif) no-repeat 0px -34px;}
.actionSub a{color:#006acc; text-decoration:underline;
background:url(images/ur_bg.gif) no-repeat 0px -68px; padding-left:14px;
}
.box_1 .userCenterBox .userMenu a{display:block; height:25px; line-height:25px; background:url(images/menuBg.gif) no-repeat 0 -30px;
color:#3f3f3f; text-decoration:none; margin:0 0 3px 10px; padding-left:3px;
}
.box_1 .userCenterBox .userMenu a.curs{background:url(images/menuBg.gif) no-repeat 0 0px; font-weight:bold;}
.box_1 .userCenterBox .userMenu a img{ margin-right:3px;}
.msgBottomBorder{clear:both; background:url(images/lineBg.gif) repeat-x left bottom; padding-bottom:8px; margin-bottom:8px;}
/* ====================
商品分类页面
==================== */
/*属性组合搜索*/
.screeBox{padding:10px;}
.screeBox a{color:#404040;}
.screeBox span{background:#fcc9d8; padding:3px 5px; margin:0 3px; color:#cb0f26;}
.sort a{ position:relative; bottom:5px;}
.sort input{position:relative; top:3px;}
/*商品列表显示方式*/
.goodsList{ padding:10px 10px 0 10px;}
.goodsList ul{ margin-bottom:10px;}
.goodsList ul#bgcolor{background:#fbfbfb; border-top:1px dashed #e8e8e8; border-bottom:1px dashed #e8e8e8;}
.goodsList li{float:left; padding-top:8px;}
.goodsList li.thumb{width:80px; text-align:center;}
.goodsList li.thumb img{width:50px; height:50px; border:1px solid #ccc; padding:1px;}
.goodsList li.goodsName{width:290px; margin-right:10px;}
.goodsList li.action{float:right; margin-left:10px;}
.goodsList li.action a.abg{background:url(images/pink/bg.gif) no-repeat 0px -735px; padding-left:18px; position:relative; bottom:5px;}
/* ====================
团购
==================== */
.group{background:#f2f2f2; padding:8px;}
.group li{float:left; background:#fff; padding:8px;}
/* ====================
购物流程
==================== */
.flowBox{border:1px solid #f1bfc0; border-top:2px solid #f0989a;}
.flowBox table{ margin:5px auto;}
/*2.62在购物车里面显示相关配件*/
.flowGoodsFittings{padding:10px;}
.flowGoodsFittings ul{height:1%; margin:5px 4px; float:left;}
.flowGoodsFittings li{float:left; width:120px;}
.flowGoodsFittings li.goodsimg{width:48px; margin-right:10px;}
.flowGoodsFittings li.goodsimg img{width:48px; height:48px; display:block;}
/* ====================
文章列表页-2009.6.8
==================== */
.article_search{margin:8px 0;}
.article_search .inputBg{width:300px;}
/* ====================
打印报价单
==================== */
.quotation{ margin:20px auto 20px auto; text-align:center;}
/*翻页*/
.pagebar{height:20px; float:right;}
.pagebar img{position:relative; top:2px;}
.pagebar a{display:block; float:left; margin:0 2px; color:#cb0f26; text-decoration:none;}
.pagebar a:hover{color:#ff5a6a; text-decoration:none;}
.pagebar .page_now{display:block; float:left; margin:0 5px; color:#ff5a6a; font-weight:bold; background:#fff;}
#pager a{color:#cb0f26; text-decoration:none;}
/*底部导航+友情链接*/
#bottomNav{width:958px;}
.bNavList{border:1px solid #fff; background:#fef7f9; height:27px; line-height:27px; padding:0 12px;}
.links{border:1px solid #fff; background:#fef7f9; padding:0 12px;}
.bNavList a,.links a{color:#cb0f26; text-decoration:none;}
.bNavList img{_position:relative; top:8px;}
.links img{width:88px; height:30px; margin:5px;}
/*版权*/
#footer{background:url(images/logo1.gif) no-repeat 5% 50%; padding-left:200px; width:760px; margin:10px auto;}
#footer .text{background:url(images/footerLine.gif) no-repeat left center; padding-left:50px; *padding-bottom:20px;}
#footer .text a{color:#404040; text-decoration:none;}
/* ======商品比较浮动块 ====== */
#compareBox {
width:128px;
background:url(images/compareBg.gif) no-repeat top center;
background-color:#edf8ff;
padding:35px 0 8px 0;
border: 1px solid #c5e4ff;
position: absolute;
right:1px;
top:200px;
}
#compareBox input {
width:52px; height:13px;
border:none;
background:url(images/compareSub.gif) no-repeat;
}
#compareList {
margin:0px 0px 8px 0px;
padding:0px;
width:120px;
background:#FFFFFF;
border:1px solid #d6ecff;
}
#compareList li {
color: #333;
text-align:left;
background: #fff;
padding: 3px 5px;
margin: 3px 0;
}
#compareList li img {
float:right;
padding-top:4px;
}
/*购物车提示点击更新按钮式样2.6.2版本添加*/
.messageli {
list-style-type:none;
padding:5px;
color:red
}
.messagediv {
font-size:12px;
position:absolute;
border:1px solid #FFD700;
text-align:center;
padding:5px;
background-color:#FFFACD;
filter:alpha(opacity=50);
-moz-opacity:0.7;
opacity: 0.7;
}
/* 积分兑换样式修改 */
.point li{
float:left;
width:300px;
} | zzshop | trunk/themes/default/style_pink.css | CSS | asf20 | 24,234 |
/*
Template Name: ECSHOP Default
Template URI: http://www.ecshop.com/
Description: 默认升级版.
Version: 2.7.2
Author: ECSHOP Team
Author URI: http://www.ecshop.com/
Logo filename: logo.gif
Template Type: type_0
*/
/* ====================
公共样式
==================== */
body{background:#fff; font-size:12px; font-family:"宋体",Verdana, Arial; line-height:150%; margin:5px 0 0 0; padding:0; color:#404040;}
div{margin:0 auto; padding:0;}
h1,h2,h3,h4,h5,h6,ul,li,dl,dt,dd,form,img,p{
margin:0; padding:0; border:none; list-style-type:none;
}
.block{
width:960px; height:auto;
}
.f_l{float:left;}
.f_r{float:right;}
.tl{ text-align:left;}
.tc{ text-align:center;}
.tr{ text-align:right;}
.dis{display:block;}
.inline{display:inline;}
.none{display:none;}
.dashed{background:url(images/lineBg.gif) repeat-x left top; color:#3f3f3f; padding:2px 0 3px 12px;}
.clearfix:after{
content:"."; display:block; height:0; clear:both;
visibility:hidden;
}
*html .clearfix{
height:1%;
}
*+html .clearfix{
height:1%;
}
/*英文强制换行*/
.word{word-break:break-all;}
/*边框*/
.B_blue{border:1px solid #c5e4ff;}
.B_input{border:1px solid #0f97ed;}
.inputBg{border:1px solid #b3b3b3; background:url(images/inputbg.gif) repeat-x left top; height:18px;}
/*字体颜色*/
.f1{color:#ff6666;}
.f2{color:#006bd0; font-weight:bold; margin-right:15px;}
.f3{color:#9e9e9e;}
.f4{color:#fe596a;}
.f4_b{color:#fe596a; font-weight:bold;}
.f5{ font-size:14px; font-weight:bold;}
.f6{color:#006bd0;}
.market{ font-size:14px; text-decoration:line-through;}
.shop{color:#fe596a; font-size:14px; font-weight:600;}
.market_s{text-decoration:line-through;}
.shop_s{color:#fe596a;}
/*按钮部分*/
.bnt_blue{
background:url(images/bg.gif) no-repeat 0px 0px; width:52px; height:21px;
text-align:center; line-height:21px; color:#fff; border:none; cursor:pointer;
}
.bnt_blue_1{
background:url(images/bg.gif) no-repeat 0px -663px; width:77px; height:21px;
text-align:center; line-height:21px; color:#fff; border:none; cursor:pointer;
}
.bnt_blue_2{
background:url(images/bg.gif) no-repeat 0px -696px; width:139px; height:21px;
text-align:center; line-height:21px; color:#fff; border:none; cursor:pointer;
}
.bnt_bonus{
background:url(images/bg.gif) no-repeat -56px 0px; width:52px; height:21px;
text-align:center; line-height:21px; color:#fff; border:none; cursor:pointer;
}
/*模块容器*/
.box{background:#f1f1f1; padding-bottom:2px; overflow:hidden;}
.box_1{border:1px solid #c5e4ff; background-color:#fff;}
.box_2{border:1px solid #c5e4ff; background:url(images/box_2Bg.gif) repeat-x top left;
background-color:#edf8fe; overflow:hidden;
}
.boxCenterList{padding:8px;}
/*模块标题*/
h3{height:33px; line-height:33px; font-size:12px; background:url(images/h3title.gif) repeat-x left top; text-align:right;
padding:0 12px; font-weight:100;
}
h3.border{border:1px solid #c5e4ff; border-bottom:none;}
h3 img{position:relative; top:7px;}
h3 span{float:left; background:url(images/bg.gif) no-repeat 0px -570px;width:auto; height:33px; line-height:33px; text-align:left;
font-weight:bold; color:#56a5ee; padding-left:12px;}
h5{height:26px; line-height:26px; text-align:right; background-color:#edf7ff; font-size:12px;
color:#56a5ee; padding:0 10px 0 0;
}
h5 span{float:left; font-weight:bold; background:url(images/bg.gif) no-repeat 0 -616px; padding-left:25px;}
h6{height:23px; line-height:23px; text-align:right; font-size:12px; background:#edf7ff; color:#3f3f3f;
border:1px solid #fff; padding-right:10px;
}
h6 span{float:left; padding-left:15px;}
/*页面留白*/
.blank{height:8px; line-height:8px; clear:both; visibility:hidden;}
.blank5{height:5px; line-height:5px;/* _margin:-3px 0;*/ clear:both; visibility:hidden;}
/*布局*/
.AreaL{width:200px; float:left; margin-right:10px;}
.AreaR{width:750px; float:left;}
/* ====================
导航部分
==================== */
/*顶部管理型导航*/
.log{height:50px;}
.log li{float:left;}
.log .userInfo{*margin-right:10px; /*width:300px;*/ text-align:left;}
.log .userInfo a{color:#006acd; text-decoration:none;}
.log li img{position:relative; top:5px;}
#topNav{background:url(images/topNavBg.gif) no-repeat left top; height:31px;
line-height:31px; color:#bebfc1; padding:0px 15px; margin:0px 10px; position:relative;
}
#topNav .topNavR{background:url(images/topNavR.gif) no-repeat; width:5px; height:31px;
position:absolute; top:0px; right:0px;
}
#topNav a{color:#006ad0; text-decoration:none;}
/*页面主导航*/
#mainNav{padding:0 25px; width:910px;}
#mainNav a{display:block; height:26p; float:left; line-height:26px; text-align:center;
padding:0 15px; background:url(images/NavBg.gif) no-repeat 0 -29px; position:relative;
margin-right:2px; color:#026acb; text-decoration:none;
}
#mainNav a span{width:3px; height:26px; background:url(images/NavBg.gif) no-repeat 0 -88px;
position:absolute; top:0px; right:0px;
}
#mainNav a:hover{display:block; height:26p; float:left; line-height:26px; text-align:center;
padding:0 15px; background:url(images/NavBg.gif) no-repeat 0 0; position:relative;
margin-right:2px; color:#fff; text-decoration:none;
}
#mainNav .cur{display:block; height:26p; float:left; line-height:26px; text-align:center;
padding:0 15px; background:url(images/NavBg.gif) no-repeat 0 0; position:relative;
margin-right:2px; color:#fff; text-decoration:none; font-weight:bold;
}
#mainNav a:hover span,#mainNav .cur span{width:3px; height:26px; background:url(images/NavBg.gif) no-repeat 0 -59px;
position:absolute; top:0px; right:0px;
}
/*搜索*/
#search{border:1px solid #5cb4e6; background:url(images/searchBg.gif) repeat-x left top; width:918px;
padding:0px 20px; height:36px; line-height:36px;
}
#search a{color:#fff; text-decoration:none;}
#search .keys{background:url(images/bg.gif) no-repeat 0 -28px;
color:#fff; padding-left:40px;
}
#search .go{background:url(images/bnt_search.gif); border:none; width:52px; height:19px;/* position:relative; top:2px; utf8下*/}
/*当前位置*/
#ur_here{border:1px solid #c5e4ff; border-top:none; background:url(images/uh_bg.gif) repeat-x left top;
height:36px; line-height:36px; padding:0 12px;
}
#ur_here a{color:#006cce; text-decoration:none;}
/* ====================
模块
==================== */
/*购物车*/
.cart{background:url(images/catBg.gif) no-repeat left top; padding:15px 10px 15px 50px;
color:#006bcd; height:50px; _padding:12px 10px 15px 50px;
}
.cart a{color:#006bcd; text-decoration:none;}
.cart a:hover{color:#006bcd; text-decoration:underline;}
/*商品分类*/
#category_tree{border:4px solid #f1faff; background-color:#fff;}
#category_tree dl{margin:6px;}
#category_tree dt{background:url(images/lineBg.gif) repeat-x left bottom;
color:#3f3f3f; padding:2px 0 3px 12px;
}
#category_tree dt a{background:url(images/bg.gif) no-repeat 0 -69px;
color:#3f3f3f; padding-left:15px; text-decoration:none;
}
#category_tree dd{padding:3px 0 3px 10px;}
#category_tree dd a{color:#404040; text-decoration:none;}
#category_tree dd a:hover{color:#ff6600; text-decoration:none;}
/*销售排行*/
.top10Tit{background:url(images/bg.gif) no-repeat 0px -85px; height:30px;}
.top10List{border:1px solid #d7ecfd; background-color:#fff; margin:0px 4px 4px 4px;}
.top10List ul{border-bottom:1px solid #e2f3fd; position:relative;}
.top10List .iteration{position:absolute; top:6px; left:6px;}
.top10List .iteration1{padding-left:3px;}
.top10List li.topimg{width:35px; height:35px;}
.top10List .samllimg{width:35px; height:35px; margin-bottom:4px;}
.top10List li{padding:3px 3px 3px 23px; float:left;}
/*linkCOLOR*/
.top10List li a,#mallNews .NewsList li a,.boxCenterList li a{color:#3f3f3f; text-decoration:none;}
.top10List li a:hover,#mallNews .NewsList li a:hover,.boxCenterList li a:hover{color:#ff6600; text-decoration:none;}
/*首页焦点图*/
#focus{border-right:1px solid #c5e4ff; padding:8px; background:url(images/foucsBg.gif) repeat-x left top;}
#mallNews{width:230px; padding:8px 8px 0px 8px; background:url(images/foucsBg.gif) repeat-x left top;}
#mallNews .NewsTit{background:url(images/bg.gif) 0px -132px; height:23px;}
#mallNews .NewsList{background:#FFFFFF; padding:8px;}
#mallNews .NewsList ul{margin-top:10px;}
#mallNews .NewsList li{background:url(images/bg.gif) no-repeat 0px -167px; padding:0px 0px 0px 10px;
text-align:left;
}
/*今日特价和品牌*/
#sales{width:500px; background:url(images/salesBg.gif) repeat-x left bottom;
border-bottom:2px solid #f0f1f3; background-color:#eef8ff;
}
#sales h1{font-size:12px; background:url(images/salesTitBg.gif) no-repeat; height:33px; text-align:right;}
#sales h1 img{position:relative; top:10px; right:8px;}
#sales .goodBox{margin:10px 0px 10px 10px; _margin-left:5px;}
#sales .goodBox .goodList p{text-align:left; color:#3f3f3f;}
#sales .goodBox .goodList p a{color:#3f3f3f; text-decoration:none;}
#sales .goodBox .goodList p a:hover{color:#ff6600; text-decoration:none;}
#sales .goodList{width:110px; margin:0px 5px 0px 5px; float:left;}
#sales .goodList img{background:url(images/salesGoodBg.gif) no-repeat; width:100px; height:100px; padding:5px;
}
#sales .goodList p{ margin-top:3px; text-align:center;}
#brands{width:247px; height:199px; *height:201px; padding:1px 0 0 1px; position:relative;}
#brands .brandsMore{position:absolute; left:178px; bottom:10px;
width:65px; height:41px;
}
#brands .brandsMore img{border:none; width:65px; height:41px;}
#brands img{width:78px; height:40px;border:1px solid #c5e4ff;}
#brands a{color:#0069cd; text-decoration:none; margin:2px 1px; display:block; float:left;}
.brandsIe6{_width:250px;}/*在ie6下特价商品不存在的话品牌推荐永远靠右显示*/
/*精品推荐,新品上市,热卖商品*/
.centerPadd{padding:5px 8px 8px 8px; overflow:hidden;}
.itemTit{height:30px; background:url(images/bg.gif) no-repeat 0px -195px; padding-left:190px; text-align:right;
/*margin-bottom:-3px; _margin-bottom:-2px;*/
}
.itemTit.New{background:url(images/bg.gif) no-repeat 0px -225px;}
.itemTit.Hot{background:url(images/bg.gif) no-repeat 0px -256px;}
.itemTit img{position:relative; top:7px;}
.itemTit h2{float:left; height:27px; background:url(images/itemH2Bg.gif) repeat-x left top; border:1px solid #d6ecff;
font-size:12px; text-align:center; color:#3f3f3f; font-weight:100; padding:0px 10px; line-height:28px; margin:0 6px 0 0;
border-bottom:none; position:relative; bottom:-3px; display:inline; white-space:nowrap;
}
.itemTit h2 a{color:#3f3f3f; text-decoration:none;}
.itemTit .h2bg{height:27px; line-height:28px; border:none; background:none;
font-size:12px; text-align:center; color:#006ace; font-weight:100; padding:0px 10px;
display:inline; white-space:nowrap;
}
.itemTit .h2bg a{color:#006ace; text-decoration:none;}
.centerPadd .goodsBox{border:1px solid #d6ecff; background:#fff; padding:12px 0px 0px 17px; *padding:12px 0px 0px 17px;
_padding:12px 0px 0px 0px;}
.centerPadd .goodsBox .more{text-align:right; clear:both; margin:0 8px 8px 0;}
/*单个商品*/
.goodsItem{width:110px; float:left; position:relative; overflow:hidden; margin:0px 14px 15px 14px;}
.goodsItem .goodsimg{width:100px; height:100px; border:4px solid #eef8ff; margin-bottom:4px;}
.goodsItem img{width:52px; height:17px;}
.goodsItem p{text-align:left; color:#3f3f3f;}
.goodsItem p a{color:#3f3f3f; text-decoration:none;}
.goodsItem p a:hover{color:#ff6600; text-decoration:none;}
.goodsItem span{width:40px; height:40px; position:absolute;left:0px; top:0px;}
.goodsItem span.best{background:url(images/bg.gif) no-repeat 0px -304px;}
.goodsItem span.news{background:url(images/bg.gif) no-repeat -75px -304px;}
.goodsItem span.hot{background:url(images/bg.gif) no-repeat -161px -304px;}
/*帮助*/
.helpTitBg{background:url(images/helpTitBg.gif) repeat-x left top; text-align:left; border:1px solid #c5e4ff; background-color:#fff;
padding:0 0 10px 15px;
}
.helpTitBg dl{float:left; margin-right:30px; _margin-right:20px; _width:130px;}
.helpTitBg dt{background:url(images/bg.gif) no-repeat 0px -570px;width:auto; height:33px; line-height:33px; text-align:left;
font-weight:bold; color:#56a5ee; padding-left:12px; margin-bottom:8px;}
.helpTitBg dt a{font-weight:bold; color:#56a5ee; text-decoration:none;}
.helpTitBg dd a{color:#006acd; text-decoration:none; background:url(images/bg.gif) no-repeat 0px -170px; padding:0px 0px 0px 10px;}
/*相关商品*/
.boxCenterList ul{height:1%; margin-bottom:5px;}
.boxCenterList li{float:left; width:120px;}
.boxCenterList li.goodsimg{width:48px; margin-right:10px;}
.boxCenterList li.goodsimg img{width:48px; height:48px; display:block;}
/*相关文章(其它带有小三角点的文字列表共用)*/
.RelaArticle a,.alone{background:url(images/bg.gif) no-repeat 0px -170px; padding:0px 0px 0px 10px; color:#3f3f3f; text-decoration:none;}
.RelaArticle a:hover{background:url(images/bg.gif) no-repeat 0px -170px; padding:0px 0px 0px 10px; color:#ff6600; text-decoration:none;}
/*浏览历史,收藏*/
.history h2{height:26px; line-height:26px; padding:0px 10px 0 20px; text-align:center; font-size:12px;
background:url(images/bg.gif) no-repeat 0px -466px; float:left; color:#57a7f0;
margin:6px 5px 0 0; border:1px solid #c5e3ff; border-bottom:none; background-color:#FFFFFF;
}
.history .h2bg{height:26px; line-height:26px; padding:0px 10px 0 20px; text-align:center; font-size:12px;
background:url(images/bg.gif) no-repeat 0px -508px; float:left; color:#a0a0a0;
margin:6px 5px 0 0; border:none;
}
#history li{width:100%;}
#clear_history a{background:none; padding:0px; color:#3f3f3f; text-decoration:none;float:right;cursor:pointer;}
.colle a{background:none; padding:0px; color:#3f3f3f; text-decoration:none;}
.colle a:hover{background:none; padding:0px; color:#ff6600; text-decoration:none;}
/* ====================
商品详情页面部分模块
==================== */
#goodsInfo{background:#f2f2f2; padding:8px; _height:1%;}
#goodsInfo .imgInfo{width:230px; float:left; margin-right:10px; overflow:hidden;}
#goodsInfo .imgInfo .thumb{width:230px; height:230px; display:block;}/*商品详情图片*/
#goodsInfo span{width:4px; height:48px; background:url(images/bg.gif) no-repeat 0 -527px; float:left;}
#goodsInfo span.spanR{width:4px; height:48px; background:url(images/bg.gif) no-repeat -5px -527px; float:right;}
#goodsInfo .gallery{width:204px; float:left; margin-left:10px; _margin-left:5px; overflow:hidden;}
#goodsInfo .gallery ul{width:auto;}
#goodsInfo .gallery li{float:left; width:48px; margin:0 2px;}
#goodsInfo .gallery li img{width:46px; height:46px; display:block;}
/*文字信息*/
#goodsInfo .textInfo{background:#fff; width:473px; float:left; padding:10px;}
#goodsInfo .textInfo p{font-size:14px; font-weight:bold; padding:0 5px 5px 8px;}
#goodsInfo .textInfo ul{border-top:1px solid #ccc;}
#goodsInfo .textInfo li{background:url(images/lineBg.gif) repeat-x left bottom; padding:0px 8px; _height:1%;}
#goodsInfo .textInfo li.padd{padding:7px 0px 7px 8px;}
#goodsInfo .textInfo li dd{width:50%; float:left; padding:7px 0px;}
#goodsInfo .textInfo li dd.ddR{border-left:1px solid #eeecec; width:48%; padding-left:8px;}
#goodsInfo .textInfo li dd.ddL{border-right:1px solid #eeecec;}
#goodsInfo .textInfo a{color:#006bce; text-decoration:underline;}
#goodsInfo .textInfo .loop{background:#f7f7f7; margin-top:8px;}
/*用户评论*/
.ie6{padding-left:25px; _padding-left:15px; height:1%;}/*购买此商品的人还购买的商品*/
.comments li{background:url(images/lineBg.gif) repeat-x left bottom; padding:3px 8px; width:97%; _height:1%; text-align:left; position:relative;
margin-bottom:8px;
}
.comments li img{position:absolute; right:0px; top:3px;}
.comments li p{margin:3px auto; text-align:left;}
.commentsList{border:1px solid #ccc; background:#f7f7f7; padding:10px;}
.commentsList .inputBorder{border:1px solid #ccc; background:#fff;}
.captcha{margin-left:0px; position:relative; top:-1px; *margin-left:8px; *position:relative; top:3px; cursor:pointer;}
/* ====================
品牌推荐
==================== */
/*品牌列表*/
#brandList{background:url(images/brandBg.gif) repeat-y top center; margin-top:12px; height:1%;}
#brandList .brandBox{width:240px; _width:236px; float:left; margin:0 5px 20px 5px; text-align:center; overflow:hidden; height:160px;}
#brandList .brandBox .brandLogo{width:188px; height:52px; overflow:hidden;}
#brandList .brandBox h4{height:23px; line-height:23px; background:#e9e9e9; margin:15px 0 8px 0; padding:0 10px; text-align:right;
font-weight:100; font-size:12px;
}
#brandList .brandBox h4 span,#brandList .brandBox h4 span a{float:left; font-weight:bold; color:#3f3f3f; text-decoration:none;}
#brandList p{text-align:left; margin-bottom:5px; color:#909090; padding:8px;}
#brandList p.brandCategory,#brandList p.brandCategory a{text-align:left; color:#006acd; text-decoration:none;}
#brandList .brandArticle{border:1px dashed #d9d9d9; background:#f8f8f8; text-align:left;}
.brandCategoryA a{ margin-right:15px;}
/* ====================
用户中心
==================== */
.box_1 .userCenterBox{border:4px solid #f1faff; background-color:#fff;}
.usBox{background:#f2f2f2; border:1px solid #e2e2e2; padding:15px; width:928px;}
.usBox_1{background:#fff; text-align:left; width:297px; height:208px; padding:43px 153px 60px 123px;}
.usBox_1 .logtitle{height:30px; background:url(images/ur_bg.gif) no-repeat 0px 0px;}
.us_Submit{border:none; width:115px; height:40px; background:url(images/bnt_ur_log.gif);}
.us_Submit_reg{border:none; width:113px; height:40px; background:url(images/bnt_ur_reg.gif);}
.usTxt{width:265px; height:267px; padding:43px 0 0 90px; background:#f2f2f2; float:right;
text-align:left; background:url(images/ur_bg1.gif) no-repeat 0 50%; line-height:23px;
}
.usTxt img{margin-top:15px;}
/*注册*/
.usBox_2{background:#fff; text-align:left; padding:43px 153px 60px 123px;}
.usBox_2 .regtitle{height:30px; background:url(images/ur_bg.gif) no-repeat 0px -34px;}
.actionSub a{color:#006acc; text-decoration:underline;
background:url(images/ur_bg.gif) no-repeat 0px -68px; padding-left:14px;
}
.box_1 .userCenterBox .userMenu a{display:block; height:25px; line-height:25px; background:url(images/menuBg.gif) no-repeat 0 -30px;
color:#3f3f3f; text-decoration:none; margin:0 0 3px 10px; padding-left:3px;
}
.box_1 .userCenterBox .userMenu a.curs{background:url(images/menuBg.gif) no-repeat 0 0px; font-weight:bold;}
.box_1 .userCenterBox .userMenu a img{ margin-right:3px;}
.msgBottomBorder{clear:both; background:url(images/lineBg.gif) repeat-x left bottom; padding-bottom:8px; margin-bottom:8px;}
/* ====================
商品分类页面
==================== */
/*属性组合搜索*/
.screeBox{padding:10px;}
.screeBox a{color:#404040;}
.screeBox span{background:#91d3f7; padding:3px 5px; margin:0 3px;}
.sort a{ position:relative; bottom:5px;}
.sort input{position:relative; top:3px;}
/*商品列表显示方式*/
.goodsList{ padding:10px 10px 0 10px;}
.goodsList ul{ margin-bottom:10px;}
.goodsList ul#bgcolor{background:#fbfbfb; border-top:1px dashed #e8e8e8; border-bottom:1px dashed #e8e8e8;}
.goodsList li{float:left; padding-top:8px;}
.goodsList li.thumb{width:80px; text-align:center;}
.goodsList li.thumb img{width:50px; height:50px; border:1px solid #ccc; padding:1px;}
.goodsList li.goodsName{width:290px; margin-right:10px;}
.goodsList li.action{float:right; margin-left:10px;}
.goodsList li.action a.abg{background:url(images/bg.gif) no-repeat 0px -735px; padding-left:18px; position:relative; bottom:5px;}
/* ====================
团购
==================== */
.group{background:#f2f2f2; padding:8px;}
.group li{float:left; background:#fff; padding:8px;}
/* ====================
购物流程
==================== */
.flowBox{border:1px solid #c8e6fe; border-top:2px solid #9fd2ff;}
.flowBox table{ margin:5px auto;}
/*2.62在购物车里面显示相关配件*/
.flowGoodsFittings{padding:10px;}
.flowGoodsFittings ul{height:1%; margin:5px 4px; float:left;}
.flowGoodsFittings li{float:left; width:120px;}
.flowGoodsFittings li.goodsimg{width:48px; margin-right:10px;}
.flowGoodsFittings li.goodsimg img{width:48px; height:48px; display:block;}
/* ====================
文章列表页-2009.6.8
==================== */
.article_search{margin:8px 0;}
.article_search .inputBg{width:300px;}
/* ====================
打印报价单
==================== */
.quotation{ margin:20px auto 20px auto; text-align:center;}
/*翻页*/
.pagebar{height:20px; float:right;}
.pagebar img{position:relative; top:2px;}
.pagebar a{display:block; float:left; margin:0 2px; color:#0066cc; text-decoration:none;}
.pagebar a:hover{color:#ff5a6a; text-decoration:none;}
.pagebar .page_now{display:block; float:left; margin:0 5px; color:#ff5a6a; font-weight:bold; background:#fff;}
#pager a{color:#0066cc; text-decoration:none;}
/*底部导航+友情链接*/
#bottomNav{width:958px;}
.bNavList{border:1px solid #fff; background:#eef6f9; height:27px; line-height:27px; padding:0 12px;}
.links{border:1px solid #fff; background:#eef6f9; padding:0 12px;}
.bNavList a,.links a{color:#006acd; text-decoration:none;}
.bNavList img{_position:relative; top:8px;}
.links img{width:88px; height:30px; margin:5px;}
/*版权*/
#footer{background:url(images/logo1.gif) no-repeat 5% 50%; padding-left:200px; width:760px; margin:10px auto;}
#footer .text{background:url(images/footerLine.gif) no-repeat left center; padding-left:50px; *padding-bottom:20px;}
#footer .text a{color:#404040; text-decoration:none;}
/* ======商品比较浮动块 ====== */
#compareBox {
width:128px;
background:url(images/compareBg.gif) no-repeat top center;
background-color:#edf8ff;
padding:35px 0 8px 0;
border: 1px solid #c5e4ff;
position: absolute;
right:1px;
top:200px;
}
#compareBox input {
width:52px; height:13px;
border:none;
background:url(images/compareSub.gif) no-repeat;
}
#compareList {
margin:0px 0px 8px 0px;
padding:0px;
width:120px;
background:#FFFFFF;
border:1px solid #d6ecff;
}
#compareList li {
color: #333;
text-align:left;
background: #fff;
padding: 3px 5px;
margin: 3px 0;
}
#compareList li img {
float:right;
padding-top:4px;
}
/*购物车提示点击更新按钮式样2.6.2版本添加*/
.messageli {
list-style-type:none;
padding:5px;
color:red
}
.messagediv {
font-size:12px;
position:absolute;
border:1px solid #FFD700;
text-align:center;
padding:5px;
background-color:#FFFACD;
filter:alpha(opacity=50);
-moz-opacity:0.7;
opacity: 0.7;
}
/* 积分兑换样式修改 */
.point li{
float:left;
width:300px;
} | zzshop | trunk/themes/default/style.css | CSS | asf20 | 23,983 |
/*
Template Name: ECSHOP Default
Template URI: http://www.ecshop.com/
Description: The default ECSHOP template.
Version: 1.0
Author: ECSHOP Team
Author URI: http://www.ecshop.com/
Logo filename: logo.gif
*/
* html {
filter:expression(document.execCommand("BackgroundImageCache", false, true));
/* fix IE6 background flicker */
}
body {
font: 12px, Arial, Helvetica, sans-serif;
color: #808080;
}
.clearfix:after{
content:"."; display:block; height:0; clear:both;
visibility:hidden;
}
*html .clearfix,*+html .clearfix{
height:1%;
}
img {border: 0px;}
form {
margin: 0px;
padding: 0px;
}
div, td, p {
font: 12px verdana, arail;
line-height: 150%;
}
input, select, textarea {
font: 12px "Courier New";
}
a:visited, a:link {
color: #808080;
text-decoration: none;
}
a:hover {
color: #2359B1;
}
.clear {
clear: both;
}
#globalWrapper {
width: 826px;
margin: 0px auto;
}
#wrapper {
float: left;
width: 802px;
overflow: hidden;
}
#page-left {
float: left;
width: 170px;
padding: 0px 1px;
overflow: hidden;
}
#page-middle {
float: left;
width: 466px;
overflow: hidden;
}
#page-right {
float: left;
width: 162px;
padding: 0px 1px;
overflow: hidden;
}
#container {
width: 802px;
border-bottom: 1px solid #CCC;
background: url(images/content-bg.gif) repeat-y;
margin: 0px auto;
}
#container2 {
border-bottom: #CCC solid 1px;
width: 802px;
background: url(images/content-bg2.gif) repeat-y;
padding-left: 1px;
margin: 0px auto;
}
#container3 {
border-bottom: #CCC solid 1px;
width: 802px;
background: url(images/content-bg3.gif) repeat-y;
margin: 0px auto;
}
#container4 {
border-bottom: #CCC solid 1px;
width: 802px;
background: url(images/content-bg4.gif) repeat-y;
margin: 0px auto;
}
#page-header {
border: 1px solid #DADADA;
}
#cell-logo {
background-color: #F5F5F5;
}
#cell-nav {
background-color: #2359B1;
height: 35px;
padding-left: 15px;
font-size: 14px;
color: white;
}
#cell-nav ul {
padding: 0px;
margin: 0px;
list-style-type: none;
}
#cell-nav li {
float: left;
padding: 2px 30px;
border-right: 1px dotted #FFF;
}
#cell-nav a:visited, #cell-nav a:link {
color: white;
}
#cell-nav a:hover {
color: #F2F2F2;
}
#search-bar {
background-color: #F5F5F5;
border-top-width: 3px;
border-right-width: 1px;
border-left-width: 1px;
border-top-style: solid;
border-right-style: solid;
border-bottom-style: none;
border-left-style: solid;
border-top-color: #DADADA;
border-right-color: #DADADA;
border-left-color: #DADADA;
display: table;
width: 800px;
height:28px;
}
#search-bar #search-left {
position:absolute;
}
#search-bar #search-right {
float:right;
position:relative;
right:0;
}
#search-bar img, #search-bar input {
vertical-align: middle;
}
.textbox {
border: 1px solid #959595;
padding: 0 2px;
}
.textbox-light {
border: 1px solid #CECECE;
padding: 0 2px;
}
#main-table {
background-color: #DADADA;
table-layout: fixed;
width: 100%;
}
#main-table td {
background-color: #FFF;
}
#formLogin ul {
padding: 0px;
margin: 8px 8px 8px 30px;
}
#formLogin li {
color: #2359B1;
line-height: 16px;
padding: 3px 0;
}
.cell-cat {
background-color: #FFFFFF;
padding: 3px;
}
#cat-div {
background-color: #FFFFFF;
background-image: url(images/cat_bg.jpg);
background-repeat: repeat-x;
padding: 10px;
margin: 3px;
}
#cat-div ul {
padding: 2px;
margin: 0;
list-style-type: none;
}
#cat-div li {
padding-left: 15px;
background-image: url(images/cat_arrow.gif);
background-repeat: no-repeat;
background-position: 0px 5px;
line-height: 180%;
}
#cat-div li .parent-cat {
font-weight: bold;
}
#cat-div a:visited, #cat-div a:link {
color: #333;
text-decoration: none;
}
#cat-div a:hover {
color: #007ED6;
text-decoration: none;
}
.title-div {
background-image: url(images/cell_title_bg.gif);
background-repeat: repeat-x;
border-bottom: 1px solid #DADADA;
border-top: 1px solid #DADADA;
font-size: 14px; text-align:left;
_height:1%;
}
.title-div-tit {
background-image: url(images/cell_title_bg.gif);
background-repeat: repeat-x;
border-bottom: 1px solid #DADADA;
border-top: 1px solid #DADADA;
font-size: 14px; text-align:left;
_height:1%;
}
.title-div-tit ul{float:right; list-style-type:none; margin:0px 8px 0px 0px; font-size:12px;}
.title-div-tit ul li{float:left; margin-right:5px; line-height:40px;}
.title-div-tit img{float:left;}
#footer-table {
background-image: url(images/cell_title_bg.gif);
background-repeat: repeat-x;
border: 1px solid #DADADA;
}
#footer-logo {
background-image: url(images/footer_bg.gif);
}
.content-div {
padding: 5px;
}
.goods-price {
color: #E44087;
}
.market-price {
background: url(images/line_through.gif) repeat-x center 8px;
}
.goods-table {
background-color: #DADADA;
width: 140px;
height:200px;
text-align: center;
margin: 5px;
}
.goods-table td {
vertical-align:top;
background-color: #FFF;
}
.article-list {
padding: 2px;
margin: 0px;
list-style-type: none;
}
.article-list li {
background-image: url(images/news_arrow.gif);
background-repeat: no-repeat;
background-position: 0px 3px;
padding-left: 1.5em;
border-bottom: 1px dashed #808080;
line-height: 180%;
white-space:nowrap;
width:200px;
text-overflow:ellipsis;
overflow:hidden;
}
.top-list {
padding: 2px;
margin: 0px;
list-style-type: none;
}
.top-list li {
padding-left: 1em;
line-height: 130%;
}
.history-list {
padding: 0 0 0 1.5em ;
margin: 0;
}
.goods-list {
background-color: #DADADA;
width: 98%;
margin: 3px;
}
.goods-list td {
background-color: #FFF;
}
.cart-div {
margin: 3px;
padding: 10px;
background-image: url(images/cart_bg.gif);
background-repeat: repeat-x;
}
#login-news {
width: 800px;
overflow: hidden;
border-right: 1px solid #DADADA;
border-left: 1px solid #DADADA;
}
#login {
float: left;
width: 170px;
}
.cell-news {
background: url(images/news_bg.gif) repeat-x center bottom;
float: left;
width: 242px;
height: 170px;
}
#tab-title {
clear:both;
background:url(images/tab_title.gif) no-repeat left bottom;
height:40px;
}
.tab-front,
.tab-back {
font-weight: bold;
line-height: 26px;
height: 26px;
display: inline;
margin: 8px -7px 0 8px;
padding:0 10px;
float:left;
border: 1px solid #00508F;
border-bottom-width: 0;
cursor: pointer;
}
.tab-front {
color: #4262AC;
background: url(images/tab_front.gif) repeat-x;
}
.tab-back {
color:#FFF;
background: url(images/tab_back.gif) repeat-x;
}
.cell-normal {
background-image: url(images/news_bg.gif);
background-repeat: repeat-x;
}
#flow-region {
padding-bottom: 20px;
}
#flow-region th {
background: #F0F0F0;
padding: 4px 0;
}
#pager {
text-align: right;
padding: 3px 12px;
}
img.thumb {
margin: 10px 0;
}
td.help-cat {
background-color: #FFFFFF;
background-image: url(images/cell_title_bg.gif);
background-repeat: repeat-x;
font-size: 14px;
padding-top: 4px;
}
td.help-cat img {
vertical-align: middle;
}
div.addto_cart {
margin-top: 5px;
padding: 5px;
border-top: 1px dotted #DADADA;
}
div.addto_cart img {
vertical-align: middle;
}
#compareLink { text-decoration: underline; }
form.sort {
padding: 15px 5px 5px;
text-align: right;
}
form.sort img {
vertical-align: middle;
}
span.modify {
line-height: 32px;
float: right;
padding-right: 10px;
margin-top: 10px;
font-size: 14px;
}
#loader {
background-color: #FFFFCC;
border: 1px solid #CC0000;
position: fixed;
color: #CC0000;
z-index: 1000;
left: 0px;
bottom: 0px;
padding: 5px 15px;
/*display: none;*/
filter: progid:DXImageTransform.Microsoft.BasicImage(opacity=.65);
opacity: 0.65;
}
* html #loader {
position: absolute;
}
a#catalog-list {
background: url(images/arrow_catalog.gif) no-repeat right top;
padding-right: 10px;
}
a:hover#catalog-list {
background: url(images/arrow_catalog.gif) no-repeat right -12px;
}
.catalog-div {
border: 1px solid #808080; background: #FFF; display: none; position: absolute; padding: 5px 20px;margin:0;z-index:999;
}
.catalog-div ul{
padding: 0px;
margin: 0px;
list-style: none;
}
.catalog-div li {
white-space:nowrap;
}
.catalog-div .top-cate {
border-bottom: 1px solid #DADADA; font-weight:bold; margin: 3px auto;
}
.catalog-div .snd-cate {
padding-left: 1em;
}
span.notice {
color: #F00;
}
span.promote {
position: absolute;
z-index: 1;
opacity: 0.5;
width: 100px;
height: 100px;
background: url(images/watermark_promote.gif) 50px 70px no-repeat;
}
* +html .photo_largar {
display:inline !important;
}
.photo_largar {
position: relative;
display:block;
}
img.new {
position: absolute;
right: 10px;
top: 0;
}
span.hot {
position: absolute;
z-index: 1;
opacity: 0.5;
width: 100px;
height: 100px;
background: url(images/watermark_new.gif) 50px 70px no-repeat;
}
span.best {
position: absolute;
z-index: 1;
opacity: 0.5;
width: 100px;
height: 100px;
background: url(images/watermark_best.gif) 50px 70px no-repeat;
}
#compareBox {
width:130px;
background: #FFF;
padding: 10px 3px 5px;
border: 1px solid #999;
position: absolute;
right:1px;
top:200px;
opacity: 0.8;
filter: progid:DXImageTransform.Microsoft.BasicImage(opacity=0.8);
}
#compareBox input {
color: #FFF;
background: #000;
width: 120px;
padding-top: 3px;
margin-bottom: 5px;
border: 1px solid #000;
}
#compareList {
margin:0px;
padding:0px;
width:120px;
}
#compareList li {
color: #333;
text-align:left;
background: #F1F1F1;
padding: 3px 5px;
border: 1px solid #999;
margin: 3px 0;
}
#compareList li img {
float:right;
padding-top:4px;
}
#myship-list {
background: #F1F1F1;
padding: 5px 20px;
margin-top: 20px;
}
#myship {
margin: 0 auto 30px auto;
}
#myship .myship-title {
background: #DADADA;
}
#myship td {
border-bottom: 1px dotted #DADADA;
padding: 5px 10px;
}
#myship .colum2 {
background: #F1F1F1;
}
#myship .colum1 {
background: #F7F7F7;
}
#price-grade {
list-style: none;
margin: 0;
padding: 0;
}
#price-grade li {
font: 12px Arial;
background: url(images/arrow_orange.gif) no-repeat left center;
padding-left: 10px;
margin: 0 0 5px 8px;
}
#price-grade #price-grade-current {
color: #333;
background: url(images/arrow_black.gif) no-repeat left center;
}
#pwd_lower, #pwd_middle, #pwd_high {
border-bottom: 2px solid #DADADA;
}
.activity-list {
margin: 10px auto;
border-collapse: collapse;
border: 1px solid #DADADA;
border-top: 3px solid #7fbee1;
}
.activity-list th {
text-align: left;
vertical-align: top;
background: #F1F1F1;
width: 140px;
padding: 3px 10px;
}
.activity-list td {
vertical-align: top;
padding: 3px 10px;
}
.activity-list td a {
color: #2359B1;
}
.activity-list td a:hover {
text-decoration: underline;
}
/*4.18 系统同tag*/
#tag_box { border:1px #ccc dashed; border-right:none; border-left:none; margin:8px 0;}
#tag_box ul { padding:0; margin:0 0 10px; display:block!important; display:inline-block; overflow:hidden!important; overflow:auto;}
#tag_box ul li { padding-left:14px; list-style:circle inside;}
#tag_box .img li { float:left; text-align:center; list-style:none; width:33%; padding:0 0 8px;}
#tag_box ul li img { width:100px; height:100px;}
#tag_box ul li a {line-height:1.7em;}
#tag_box .img li a { display:block; line-height:1.7em;}
#tag_box h3 { color: #0066FF; margin:0; font-size:12px; text-indent:2em; height:2em; line-height:2em;}
#tag_box a {
color: #666666;
text-decoration: underline;
}
#tag_box a:hover {
text-decoration: none;
}
.register-closed{text-align:center;}
.pages, .threadflow { float: left; border: 1px solid #E6E6E2; background: #F5F5F0; height: 24px; line-height: 26px; color: #878787; overflow: hidden; }
.pages a, .pages strong, .pages em, .pages kbd, #multipage .pages em { float: left; padding: 0 4px; line-height:26px; }
.pages a:hover { background-color: #FFF; }
.pages strong { font-weight: bold; color: #FF3A00; background: #E8C9B7; }
.pages a.prev, .pages a.next { line-height: 24px; font-family: Verdana, Arial, Helvetica, sans-serif; }
.pages a.next { padding: 0 15px; }
.pages kbd { border-left: 1px solid #E6E6E2; margin: 0; }
* html .pages kbd { padding: 1px 8px; }
.pages kbd input { border: 1px solid #E6E6E2; margin-top: 3px !important; * > margin-top: 1px !important; margin: 1px 4px 0 3px; padding: 0 2px; height: 17px; }
.pages kbd>input { margin-bottom: 2px; } | zzshop | trunk/themes/default_old/style.css | CSS | asf20 | 13,170 |
<?php
/**
* ECSHOP 购物流程
* ============================================================================
* 版权所有 2005-2010 上海商派网络科技有限公司,并保留所有权利。
* 网站地址: http://www.ecshop.com;
* ----------------------------------------------------------------------------
* 这不是一个自由软件!您只能在不用于商业目的的前提下对程序代码进行修改和
* 使用;不允许对程序代码以任何形式任何目的的再发布。
* ============================================================================
* $Author: liuhui $
* $Id: flow.php 17164 2010-05-24 01:42:50Z liuhui $
*/
define('IN_ECS', true);
require(dirname(__FILE__) . '/includes/init.php');
require(ROOT_PATH . 'includes/lib_order.php');
/* 载入语言文件 */
require_once(ROOT_PATH . 'languages/' .$_CFG['lang']. '/user.php');
require_once(ROOT_PATH . 'languages/' .$_CFG['lang']. '/shopping_flow.php');
/*------------------------------------------------------ */
//-- INPUT
/*------------------------------------------------------ */
if (!isset($_REQUEST['step']))
{
$_REQUEST['step'] = "cart";
}
/*------------------------------------------------------ */
//-- PROCESSOR
/*------------------------------------------------------ */
assign_template();
assign_dynamic('flow');
$position = assign_ur_here(0, $_LANG['shopping_flow']);
$smarty->assign('page_title', $position['title']); // 页面标题
$smarty->assign('ur_here', $position['ur_here']); // 当前位置
$smarty->assign('categories', get_categories_tree()); // 分类树
$smarty->assign('helps', get_shop_help()); // 网店帮助
$smarty->assign('lang', $_LANG);
$smarty->assign('show_marketprice', $_CFG['show_marketprice']);
$smarty->assign('data_dir', DATA_DIR); // 数据目录
/*------------------------------------------------------ */
//-- 添加商品到购物车
/*------------------------------------------------------ */
if ($_REQUEST['step'] == 'add_to_cart')
{
include_once('includes/cls_json.php');
$_POST['goods'] = json_str_iconv($_POST['goods']);
if (!empty($_REQUEST['goods_id']) && empty($_POST['goods']))
{
if (!is_numeric($_REQUEST['goods_id']) || intval($_REQUEST['goods_id']) <= 0)
{
ecs_header("Location:./\n");
}
$goods_id = intval($_REQUEST['goods_id']);
exit;
}
$result = array('error' => 0, 'message' => '', 'content' => '', 'goods_id' => '');
$json = new JSON;
if (empty($_POST['goods']))
{
$result['error'] = 1;
die($json->encode($result));
}
$goods = $json->decode($_POST['goods']);
/* 检查:如果商品有规格,而post的数据没有规格,把商品的规格属性通过JSON传到前台 */
if (empty($goods->spec) AND empty($goods->quick))
{
$sql = "SELECT a.attr_id, a.attr_name, a.attr_type, ".
"g.goods_attr_id, g.attr_value, g.attr_price " .
'FROM ' . $GLOBALS['ecs']->table('goods_attr') . ' AS g ' .
'LEFT JOIN ' . $GLOBALS['ecs']->table('attribute') . ' AS a ON a.attr_id = g.attr_id ' .
"WHERE a.attr_type != 0 AND g.goods_id = '" . $goods->goods_id . "' " .
'ORDER BY a.sort_order, g.attr_price, g.goods_attr_id';
$res = $GLOBALS['db']->getAll($sql);
if (!empty($res))
{
$spe_arr = array();
foreach ($res AS $row)
{
$spe_arr[$row['attr_id']]['attr_type'] = $row['attr_type'];
$spe_arr[$row['attr_id']]['name'] = $row['attr_name'];
$spe_arr[$row['attr_id']]['attr_id'] = $row['attr_id'];
$spe_arr[$row['attr_id']]['values'][] = array(
'label' => $row['attr_value'],
'price' => $row['attr_price'],
'format_price' => price_format($row['attr_price'], false),
'id' => $row['goods_attr_id']);
}
$i = 0;
$spe_array = array();
foreach ($spe_arr AS $row)
{
$spe_array[]=$row;
}
$result['error'] = ERR_NEED_SELECT_ATTR;
$result['goods_id'] = $goods->goods_id;
$result['parent'] = $goods->parent;
$result['message'] = $spe_array;
die($json->encode($result));
}
}
/* 更新:如果是一步购物,先清空购物车 */
if ($_CFG['one_step_buy'] == '1')
{
clear_cart();
}
/* 检查:商品数量是否合法 */
if (!is_numeric($goods->number) || intval($goods->number) <= 0)
{
$result['error'] = 1;
$result['message'] = $_LANG['invalid_number'];
}
/* 更新:购物车 */
else
{
// 更新:添加到购物车
if (addto_cart($goods->goods_id, $goods->number, $goods->spec, $goods->parent))
{
if ($_CFG['cart_confirm'] > 2)
{
$result['message'] = '';
}
else
{
$result['message'] = $_CFG['cart_confirm'] == 1 ? $_LANG['addto_cart_success_1'] : $_LANG['addto_cart_success_2'];
}
$result['content'] = insert_cart_info();
$result['one_step_buy'] = $_CFG['one_step_buy'];
}
else
{
$result['message'] = $err->last_message();
$result['error'] = $err->error_no;
$result['goods_id'] = stripslashes($goods->goods_id);
if (is_array($goods->spec))
{
$result['product_spec'] = implode(',', $goods->spec);
}
else
{
$result['product_spec'] = $goods->spec;
}
}
}
$result['confirm_type'] = !empty($_CFG['cart_confirm']) ? $_CFG['cart_confirm'] : 2;
die($json->encode($result));
}
elseif ($_REQUEST['step'] == 'link_buy')
{
$goods_id = intval($_GET['goods_id']);
if (!cart_goods_exists($goods_id,array()))
{
addto_cart($goods_id);
}
ecs_header("Location:./flow.php\n");
exit;
}
elseif ($_REQUEST['step'] == 'login')
{
include_once('languages/'. $_CFG['lang']. '/user.php');
/*
* 用户登录注册
*/
if ($_SERVER['REQUEST_METHOD'] == 'GET')
{
$smarty->assign('anonymous_buy', $_CFG['anonymous_buy']);
/* 检查是否有赠品,如果有提示登录后重新选择赠品 */
$sql = "SELECT COUNT(*) FROM " . $ecs->table('cart') .
" WHERE session_id = '" . SESS_ID . "' AND is_gift > 0";
if ($db->getOne($sql) > 0)
{
$smarty->assign('need_rechoose_gift', 1);
}
/* 检查是否需要注册码 */
$captcha = intval($_CFG['captcha']);
if (($captcha & CAPTCHA_LOGIN) && (!($captcha & CAPTCHA_LOGIN_FAIL) || (($captcha & CAPTCHA_LOGIN_FAIL) && $_SESSION['login_fail'] > 2)) && gd_version() > 0)
{
$smarty->assign('enabled_login_captcha', 1);
$smarty->assign('rand', mt_rand());
}
if ($captcha & CAPTCHA_REGISTER)
{
$smarty->assign('enabled_register_captcha', 1);
$smarty->assign('rand', mt_rand());
}
}
else
{
include_once('includes/lib_passport.php');
if (!empty($_POST['act']) && $_POST['act'] == 'signin')
{
$captcha = intval($_CFG['captcha']);
if (($captcha & CAPTCHA_LOGIN) && (!($captcha & CAPTCHA_LOGIN_FAIL) || (($captcha & CAPTCHA_LOGIN_FAIL) && $_SESSION['login_fail'] > 2)) && gd_version() > 0)
{
if (empty($_POST['captcha']))
{
show_message($_LANG['invalid_captcha']);
}
/* 检查验证码 */
include_once('includes/cls_captcha.php');
$validator = new captcha();
$validator->session_word = 'captcha_login';
if (!$validator->check_word($_POST['captcha']))
{
show_message($_LANG['invalid_captcha']);
}
}
if ($user->login($_POST['username'], $_POST['password'],isset($_POST['remember'])))
{
update_user_info(); //更新用户信息
recalculate_price(); // 重新计算购物车中的商品价格
/* 检查购物车中是否有商品 没有商品则跳转到首页 */
$sql = "SELECT COUNT(*) FROM " . $ecs->table('cart') . " WHERE session_id = '" . SESS_ID . "' ";
if ($db->getOne($sql) > 0)
{
ecs_header("Location: flow.php?step=checkout\n");
}
else
{
ecs_header("Location:index.php\n");
}
exit;
}
else
{
$_SESSION['login_fail']++;
show_message($_LANG['signin_failed'], '', 'flow.php?step=login');
}
}
elseif (!empty($_POST['act']) && $_POST['act'] == 'signup')
{
if ((intval($_CFG['captcha']) & CAPTCHA_REGISTER) && gd_version() > 0)
{
if (empty($_POST['captcha']))
{
show_message($_LANG['invalid_captcha']);
}
/* 检查验证码 */
include_once('includes/cls_captcha.php');
$validator = new captcha();
if (!$validator->check_word($_POST['captcha']))
{
show_message($_LANG['invalid_captcha']);
}
}
if (register(trim($_POST['username']), trim($_POST['password']), trim($_POST['email'])))
{
/* 用户注册成功 */
ecs_header("Location: flow.php?step=consignee\n");
exit;
}
else
{
$err->show();
}
}
else
{
// TODO: 非法访问的处理
}
}
}
elseif ($_REQUEST['step'] == 'consignee')
{
/*------------------------------------------------------ */
//-- 收货人信息
/*------------------------------------------------------ */
include_once('includes/lib_transaction.php');
if ($_SERVER['REQUEST_METHOD'] == 'GET')
{
/* 取得购物类型 */
$flow_type = isset($_SESSION['flow_type']) ? intval($_SESSION['flow_type']) : CART_GENERAL_GOODS;
/*
* 收货人信息填写界面
*/
if (isset($_REQUEST['direct_shopping']))
{
$_SESSION['direct_shopping'] = 1;
}
/* 取得国家列表、商店所在国家、商店所在国家的省列表 */
$smarty->assign('country_list', get_regions());
$smarty->assign('shop_country', $_CFG['shop_country']);
$smarty->assign('shop_province_list', get_regions(1, $_CFG['shop_country']));
/* 获得用户所有的收货人信息 */
if ($_SESSION['user_id'] > 0)
{
$consignee_list = get_consignee_list($_SESSION['user_id']);
if (count($consignee_list) < 5)
{
/* 如果用户收货人信息的总数小于 5 则增加一个新的收货人信息 */
$consignee_list[] = array('country' => $_CFG['shop_country'], 'email' => isset($_SESSION['email']) ? $_SESSION['email'] : '');
}
}
else
{
if (isset($_SESSION['flow_consignee'])){
$consignee_list = array($_SESSION['flow_consignee']);
}
else
{
$consignee_list[] = array('country' => $_CFG['shop_country']);
}
}
$smarty->assign('name_of_region', array($_CFG['name_of_region_1'], $_CFG['name_of_region_2'], $_CFG['name_of_region_3'], $_CFG['name_of_region_4']));
$smarty->assign('consignee_list', $consignee_list);
/* 取得每个收货地址的省市区列表 */
$province_list = array();
$city_list = array();
$district_list = array();
foreach ($consignee_list as $region_id => $consignee)
{
$consignee['country'] = isset($consignee['country']) ? intval($consignee['country']) : 0;
$consignee['province'] = isset($consignee['province']) ? intval($consignee['province']) : 0;
$consignee['city'] = isset($consignee['city']) ? intval($consignee['city']) : 0;
$province_list[$region_id] = get_regions(1, $consignee['country']);
$city_list[$region_id] = get_regions(2, $consignee['province']);
$district_list[$region_id] = get_regions(3, $consignee['city']);
}
$smarty->assign('province_list', $province_list);
$smarty->assign('city_list', $city_list);
$smarty->assign('district_list', $district_list);
/* 返回收货人页面代码 */
$smarty->assign('real_goods_count', exist_real_goods(0, $flow_type) ? 1 : 0);
}
else
{
/*
* 保存收货人信息
*/
$consignee = array(
'address_id' => empty($_POST['address_id']) ? 0 : intval($_POST['address_id']),
'consignee' => empty($_POST['consignee']) ? '' : trim($_POST['consignee']),
'country' => empty($_POST['country']) ? '' : $_POST['country'],
'province' => empty($_POST['province']) ? '' : $_POST['province'],
'city' => empty($_POST['city']) ? '' : $_POST['city'],
'district' => empty($_POST['district']) ? '' : $_POST['district'],
'email' => empty($_POST['email']) ? '' : $_POST['email'],
'address' => empty($_POST['address']) ? '' : $_POST['address'],
'zipcode' => empty($_POST['zipcode']) ? '' : make_semiangle(trim($_POST['zipcode'])),
'tel' => empty($_POST['tel']) ? '' : make_semiangle(trim($_POST['tel'])),
'mobile' => empty($_POST['mobile']) ? '' : make_semiangle(trim($_POST['mobile'])),
'sign_building' => empty($_POST['sign_building']) ? '' : $_POST['sign_building'],
'best_time' => empty($_POST['best_time']) ? '' : $_POST['best_time'],
);
if ($_SESSION['user_id'] > 0)
{
include_once(ROOT_PATH . 'includes/lib_transaction.php');
/* 如果用户已经登录,则保存收货人信息 */
$consignee['user_id'] = $_SESSION['user_id'];
save_consignee($consignee, true);
}
/* 保存到session */
$_SESSION['flow_consignee'] = stripslashes_deep($consignee);
ecs_header("Location: flow.php?step=checkout\n");
exit;
}
}
elseif ($_REQUEST['step'] == 'drop_consignee')
{
/*------------------------------------------------------ */
//-- 删除收货人信息
/*------------------------------------------------------ */
include_once('includes/lib_transaction.php');
$consignee_id = intval($_GET['id']);
if (drop_consignee($consignee_id))
{
ecs_header("Location: flow.php?step=consignee\n");
exit;
}
else
{
show_message($_LANG['not_fount_consignee']);
}
}
elseif ($_REQUEST['step'] == 'checkout')
{
/*------------------------------------------------------ */
//-- 订单确认
/*------------------------------------------------------ */
/* 取得购物类型 */
$flow_type = isset($_SESSION['flow_type']) ? intval($_SESSION['flow_type']) : CART_GENERAL_GOODS;
/* 团购标志 */
if ($flow_type == CART_GROUP_BUY_GOODS)
{
$smarty->assign('is_group_buy', 1);
}
/* 积分兑换商品 */
elseif ($flow_type == CART_EXCHANGE_GOODS)
{
$smarty->assign('is_exchange_goods', 1);
}
else
{
//正常购物流程 清空其他购物流程情况
$_SESSION['flow_order']['extension_code'] = '';
}
/* 检查购物车中是否有商品 */
$sql = "SELECT COUNT(*) FROM " . $ecs->table('cart') .
" WHERE session_id = '" . SESS_ID . "' " .
"AND parent_id = 0 AND is_gift = 0 AND rec_type = '$flow_type'";
if ($db->getOne($sql) == 0)
{
show_message($_LANG['no_goods_in_cart'], '', '', 'warning');
}
/*
* 检查用户是否已经登录
* 如果用户已经登录了则检查是否有默认的收货地址
* 如果没有登录则跳转到登录和注册页面
*/
if (empty($_SESSION['direct_shopping']) && $_SESSION['user_id'] == 0)
{
/* 用户没有登录且没有选定匿名购物,转向到登录页面 */
ecs_header("Location: flow.php?step=login\n");
exit;
}
$consignee = get_consignee($_SESSION['user_id']);
/* 检查收货人信息是否完整 */
if (!check_consignee_info($consignee, $flow_type))
{
/* 如果不完整则转向到收货人信息填写界面 */
ecs_header("Location: flow.php?step=consignee\n");
exit;
}
$_SESSION['flow_consignee'] = $consignee;
$smarty->assign('consignee', $consignee);
/* 对商品信息赋值 */
$cart_goods = cart_goods($flow_type); // 取得商品列表,计算合计
$smarty->assign('goods_list', $cart_goods);
/* 对是否允许修改购物车赋值 */
if ($flow_type != CART_GENERAL_GOODS || $_CFG['one_step_buy'] == '1')
{
$smarty->assign('allow_edit_cart', 0);
}
else
{
$smarty->assign('allow_edit_cart', 1);
}
/*
* 取得购物流程设置
*/
$smarty->assign('config', $_CFG);
/*
* 取得订单信息
*/
$order = flow_order_info();
$smarty->assign('order', $order);
/* 计算折扣 */
if ($flow_type != CART_EXCHANGE_GOODS && $flow_type != CART_GROUP_BUY_GOODS)
{
$discount = compute_discount();
$smarty->assign('discount', $discount['discount']);
$favour_name = empty($discount['name']) ? '' : join(',', $discount['name']);
$smarty->assign('your_discount', sprintf($_LANG['your_discount'], $favour_name, price_format($discount['discount'])));
}
/*
* 计算订单的费用
*/
$total = order_fee($order, $cart_goods, $consignee);
$smarty->assign('total', $total);
$smarty->assign('shopping_money', sprintf($_LANG['shopping_money'], $total['formated_goods_price']));
$smarty->assign('market_price_desc', sprintf($_LANG['than_market_price'], $total['formated_market_price'], $total['formated_saving'], $total['save_rate']));
/* 取得配送列表 */
$region = array($consignee['country'], $consignee['province'], $consignee['city'], $consignee['district']);
$shipping_list = available_shipping_list($region);
$cart_weight_price = cart_weight_price($flow_type);
$insure_disabled = true;
$cod_disabled = true;
// 查看购物车中是否全为免运费商品,若是则把运费赋为零
$sql = 'SELECT count(*) FROM ' . $ecs->table('cart') . " WHERE `session_id` = '" . SESS_ID. "' AND `extension_code` != 'package_buy' AND `is_shipping` = 0";
$shipping_count = $db->getOne($sql);
foreach ($shipping_list AS $key => $val)
{
$shipping_cfg = unserialize_config($val['configure']);
$shipping_fee = ($shipping_count == 0 AND $cart_weight_price['free_shipping'] == 1) ? 0 : shipping_fee($val['shipping_code'], unserialize($val['configure']),
$cart_weight_price['weight'], $cart_weight_price['amount'], $cart_weight_price['number']);
$shipping_list[$key]['format_shipping_fee'] = price_format($shipping_fee, false);
$shipping_list[$key]['shipping_fee'] = $shipping_fee;
$shipping_list[$key]['free_money'] = price_format($shipping_cfg['free_money'], false);
$shipping_list[$key]['insure_formated'] = strpos($val['insure'], '%') === false ?
price_format($val['insure'], false) : $val['insure'];
/* 当前的配送方式是否支持保价 */
if ($val['shipping_id'] == $order['shipping_id'])
{
$insure_disabled = ($val['insure'] == 0);
$cod_disabled = ($val['support_cod'] == 0);
}
}
$smarty->assign('shipping_list', $shipping_list);
$smarty->assign('insure_disabled', $insure_disabled);
$smarty->assign('cod_disabled', $cod_disabled);
/* 取得支付列表 */
if ($order['shipping_id'] == 0)
{
$cod = true;
$cod_fee = 0;
}
else
{
$shipping = shipping_info($order['shipping_id']);
$cod = $shipping['support_cod'];
if ($cod)
{
/* 如果是团购,且保证金大于0,不能使用货到付款 */
if ($flow_type == CART_GROUP_BUY_GOODS)
{
$group_buy_id = $_SESSION['extension_id'];
if ($group_buy_id <= 0)
{
show_message('error group_buy_id');
}
$group_buy = group_buy_info($group_buy_id);
if (empty($group_buy))
{
show_message('group buy not exists: ' . $group_buy_id);
}
if ($group_buy['deposit'] > 0)
{
$cod = false;
$cod_fee = 0;
/* 赋值保证金 */
$smarty->assign('gb_deposit', $group_buy['deposit']);
}
}
if ($cod)
{
$shipping_area_info = shipping_area_info($order['shipping_id'], $region);
$cod_fee = $shipping_area_info['pay_fee'];
}
}
else
{
$cod_fee = 0;
}
}
// 给货到付款的手续费加<span id>,以便改变配送的时候动态显示
$payment_list = available_payment_list(1, $cod_fee);
if(isset($payment_list))
{
foreach ($payment_list as $key => $payment)
{
if ($payment['is_cod'] == '1')
{
$payment_list[$key]['format_pay_fee'] = '<span id="ECS_CODFEE">' . $payment['format_pay_fee'] . '</span>';
}
/* 如果有易宝神州行支付 如果订单金额大于300 则不显示 */
if ($payment['pay_code'] == 'yeepayszx' && $total['amount'] > 300)
{
unset($payment_list[$key]);
}
/* 如果有余额支付 */
if ($payment['pay_code'] == 'balance')
{
/* 如果未登录,不显示 */
if ($_SESSION['user_id'] == 0)
{
unset($payment_list[$key]);
}
else
{
if ($_SESSION['flow_order']['pay_id'] == $payment['pay_id'])
{
$smarty->assign('disable_surplus', 1);
}
}
}
}
}
$smarty->assign('payment_list', $payment_list);
/* 取得包装与贺卡 */
if ($total['real_goods_count'] > 0)
{
/* 只有有实体商品,才要判断包装和贺卡 */
if (!isset($_CFG['use_package']) || $_CFG['use_package'] == '1')
{
/* 如果使用包装,取得包装列表及用户选择的包装 */
$smarty->assign('pack_list', pack_list());
}
/* 如果使用贺卡,取得贺卡列表及用户选择的贺卡 */
if (!isset($_CFG['use_card']) || $_CFG['use_card'] == '1')
{
$smarty->assign('card_list', card_list());
}
}
$user_info = user_info($_SESSION['user_id']);
/* 如果使用余额,取得用户余额 */
if ((!isset($_CFG['use_surplus']) || $_CFG['use_surplus'] == '1')
&& $_SESSION['user_id'] > 0
&& $user_info['user_money'] > 0)
{
// 能使用余额
$smarty->assign('allow_use_surplus', 1);
$smarty->assign('your_surplus', $user_info['user_money']);
}
/* 如果使用积分,取得用户可用积分及本订单最多可以使用的积分 */
if ((!isset($_CFG['use_integral']) || $_CFG['use_integral'] == '1')
&& $_SESSION['user_id'] > 0
&& $user_info['pay_points'] > 0
&& ($flow_type != CART_GROUP_BUY_GOODS && $flow_type != CART_EXCHANGE_GOODS))
{
// 能使用积分
$smarty->assign('allow_use_integral', 1);
$smarty->assign('order_max_integral', flow_available_points()); // 可用积分
$smarty->assign('your_integral', $user_info['pay_points']); // 用户积分
}
/* 如果使用红包,取得用户可以使用的红包及用户选择的红包 */
if ((!isset($_CFG['use_bonus']) || $_CFG['use_bonus'] == '1')
&& ($flow_type != CART_GROUP_BUY_GOODS && $flow_type != CART_EXCHANGE_GOODS))
{
// 取得用户可用红包
$user_bonus = user_bonus($_SESSION['user_id'], $total['goods_price']);
if (!empty($user_bonus))
{
foreach ($user_bonus AS $key => $val)
{
$user_bonus[$key]['bonus_money_formated'] = price_format($val['type_money'], false);
}
$smarty->assign('bonus_list', $user_bonus);
}
// 能使用红包
$smarty->assign('allow_use_bonus', 1);
}
/* 如果使用缺货处理,取得缺货处理列表 */
if (!isset($_CFG['use_how_oos']) || $_CFG['use_how_oos'] == '1')
{
if (is_array($GLOBALS['_LANG']['oos']) && !empty($GLOBALS['_LANG']['oos']))
{
$smarty->assign('how_oos_list', $GLOBALS['_LANG']['oos']);
}
}
/* 如果能开发票,取得发票内容列表 */
if ((!isset($_CFG['can_invoice']) || $_CFG['can_invoice'] == '1')
&& isset($_CFG['invoice_content'])
&& trim($_CFG['invoice_content']) != '' && $flow_type != CART_EXCHANGE_GOODS)
{
$inv_content_list = explode("\n", str_replace("\r", '', $_CFG['invoice_content']));
$smarty->assign('inv_content_list', $inv_content_list);
$inv_type_list = array();
foreach ($_CFG['invoice_type']['type'] as $key => $type)
{
if (!empty($type))
{
$inv_type_list[$type] = $type . ' [' . floatval($_CFG['invoice_type']['rate'][$key]) . '%]';
}
}
$smarty->assign('inv_type_list', $inv_type_list);
}
/* 保存 session */
$_SESSION['flow_order'] = $order;
}
elseif ($_REQUEST['step'] == 'select_shipping')
{
/*------------------------------------------------------ */
//-- 改变配送方式
/*------------------------------------------------------ */
include_once('includes/cls_json.php');
$json = new JSON;
$result = array('error' => '', 'content' => '', 'need_insure' => 0);
/* 取得购物类型 */
$flow_type = isset($_SESSION['flow_type']) ? intval($_SESSION['flow_type']) : CART_GENERAL_GOODS;
/* 获得收货人信息 */
$consignee = get_consignee($_SESSION['user_id']);
/* 对商品信息赋值 */
$cart_goods = cart_goods($flow_type); // 取得商品列表,计算合计
if (empty($cart_goods) || !check_consignee_info($consignee, $flow_type))
{
$result['error'] = $_LANG['no_goods_in_cart'];
}
else
{
/* 取得购物流程设置 */
$smarty->assign('config', $_CFG);
/* 取得订单信息 */
$order = flow_order_info();
$order['shipping_id'] = intval($_REQUEST['shipping']);
$regions = array($consignee['country'], $consignee['province'], $consignee['city'], $consignee['district']);
$shipping_info = shipping_area_info($order['shipping_id'], $regions);
/* 计算订单的费用 */
$total = order_fee($order, $cart_goods, $consignee);
$smarty->assign('total', $total);
/* 取得可以得到的积分和红包 */
$smarty->assign('total_integral', cart_amount(false, $flow_type) - $total['bonus'] - $total['integral_money']);
$smarty->assign('total_bonus', price_format(get_total_bonus(), false));
/* 团购标志 */
if ($flow_type == CART_GROUP_BUY_GOODS)
{
$smarty->assign('is_group_buy', 1);
}
$result['cod_fee'] = $shipping_info['pay_fee'];
if (strpos($result['cod_fee'], '%') === false)
{
$result['cod_fee'] = price_format($result['cod_fee'], false);
}
$result['need_insure'] = ($shipping_info['insure'] > 0 && !empty($order['need_insure'])) ? 1 : 0;
$result['content'] = $smarty->fetch('library/order_total.lbi');
}
echo $json->encode($result);
exit;
}
elseif ($_REQUEST['step'] == 'select_insure')
{
/*------------------------------------------------------ */
//-- 选定/取消配送的保价
/*------------------------------------------------------ */
include_once('includes/cls_json.php');
$json = new JSON;
$result = array('error' => '', 'content' => '', 'need_insure' => 0);
/* 取得购物类型 */
$flow_type = isset($_SESSION['flow_type']) ? intval($_SESSION['flow_type']) : CART_GENERAL_GOODS;
/* 获得收货人信息 */
$consignee = get_consignee($_SESSION['user_id']);
/* 对商品信息赋值 */
$cart_goods = cart_goods($flow_type); // 取得商品列表,计算合计
if (empty($cart_goods) || !check_consignee_info($consignee, $flow_type))
{
$result['error'] = $_LANG['no_goods_in_cart'];
}
else
{
/* 取得购物流程设置 */
$smarty->assign('config', $_CFG);
/* 取得订单信息 */
$order = flow_order_info();
$order['need_insure'] = intval($_REQUEST['insure']);
/* 保存 session */
$_SESSION['flow_order'] = $order;
/* 计算订单的费用 */
$total = order_fee($order, $cart_goods, $consignee);
$smarty->assign('total', $total);
/* 取得可以得到的积分和红包 */
$smarty->assign('total_integral', cart_amount(false, $flow_type) - $total['bonus'] - $total['integral_money']);
$smarty->assign('total_bonus', price_format(get_total_bonus(), false));
/* 团购标志 */
if ($flow_type == CART_GROUP_BUY_GOODS)
{
$smarty->assign('is_group_buy', 1);
}
$result['content'] = $smarty->fetch('library/order_total.lbi');
}
echo $json->encode($result);
exit;
}
elseif ($_REQUEST['step'] == 'select_payment')
{
/*------------------------------------------------------ */
//-- 改变支付方式
/*------------------------------------------------------ */
include_once('includes/cls_json.php');
$json = new JSON;
$result = array('error' => '', 'content' => '', 'need_insure' => 0, 'payment' => 1);
/* 取得购物类型 */
$flow_type = isset($_SESSION['flow_type']) ? intval($_SESSION['flow_type']) : CART_GENERAL_GOODS;
/* 获得收货人信息 */
$consignee = get_consignee($_SESSION['user_id']);
/* 对商品信息赋值 */
$cart_goods = cart_goods($flow_type); // 取得商品列表,计算合计
if (empty($cart_goods) || !check_consignee_info($consignee, $flow_type))
{
$result['error'] = $_LANG['no_goods_in_cart'];
}
else
{
/* 取得购物流程设置 */
$smarty->assign('config', $_CFG);
/* 取得订单信息 */
$order = flow_order_info();
$order['pay_id'] = intval($_REQUEST['payment']);
$payment_info = payment_info($order['pay_id']);
$result['pay_code'] = $payment_info['pay_code'];
/* 保存 session */
$_SESSION['flow_order'] = $order;
/* 计算订单的费用 */
$total = order_fee($order, $cart_goods, $consignee);
$smarty->assign('total', $total);
/* 取得可以得到的积分和红包 */
$smarty->assign('total_integral', cart_amount(false, $flow_type) - $total['bonus'] - $total['integral_money']);
$smarty->assign('total_bonus', price_format(get_total_bonus(), false));
/* 团购标志 */
if ($flow_type == CART_GROUP_BUY_GOODS)
{
$smarty->assign('is_group_buy', 1);
}
$result['content'] = $smarty->fetch('library/order_total.lbi');
}
echo $json->encode($result);
exit;
}
elseif ($_REQUEST['step'] == 'select_pack')
{
/*------------------------------------------------------ */
//-- 改变商品包装
/*------------------------------------------------------ */
include_once('includes/cls_json.php');
$json = new JSON;
$result = array('error' => '', 'content' => '', 'need_insure' => 0);
/* 取得购物类型 */
$flow_type = isset($_SESSION['flow_type']) ? intval($_SESSION['flow_type']) : CART_GENERAL_GOODS;
/* 获得收货人信息 */
$consignee = get_consignee($_SESSION['user_id']);
/* 对商品信息赋值 */
$cart_goods = cart_goods($flow_type); // 取得商品列表,计算合计
if (empty($cart_goods) || !check_consignee_info($consignee, $flow_type))
{
$result['error'] = $_LANG['no_goods_in_cart'];
}
else
{
/* 取得购物流程设置 */
$smarty->assign('config', $_CFG);
/* 取得订单信息 */
$order = flow_order_info();
$order['pack_id'] = intval($_REQUEST['pack']);
/* 保存 session */
$_SESSION['flow_order'] = $order;
/* 计算订单的费用 */
$total = order_fee($order, $cart_goods, $consignee);
$smarty->assign('total', $total);
/* 取得可以得到的积分和红包 */
$smarty->assign('total_integral', cart_amount(false, $flow_type) - $total['bonus'] - $total['integral_money']);
$smarty->assign('total_bonus', price_format(get_total_bonus(), false));
/* 团购标志 */
if ($flow_type == CART_GROUP_BUY_GOODS)
{
$smarty->assign('is_group_buy', 1);
}
$result['content'] = $smarty->fetch('library/order_total.lbi');
}
echo $json->encode($result);
exit;
}
elseif ($_REQUEST['step'] == 'select_card')
{
/*------------------------------------------------------ */
//-- 改变贺卡
/*------------------------------------------------------ */
include_once('includes/cls_json.php');
$json = new JSON;
$result = array('error' => '', 'content' => '', 'need_insure' => 0);
/* 取得购物类型 */
$flow_type = isset($_SESSION['flow_type']) ? intval($_SESSION['flow_type']) : CART_GENERAL_GOODS;
/* 获得收货人信息 */
$consignee = get_consignee($_SESSION['user_id']);
/* 对商品信息赋值 */
$cart_goods = cart_goods($flow_type); // 取得商品列表,计算合计
if (empty($cart_goods) || !check_consignee_info($consignee, $flow_type))
{
$result['error'] = $_LANG['no_goods_in_cart'];
}
else
{
/* 取得购物流程设置 */
$smarty->assign('config', $_CFG);
/* 取得订单信息 */
$order = flow_order_info();
$order['card_id'] = intval($_REQUEST['card']);
/* 保存 session */
$_SESSION['flow_order'] = $order;
/* 计算订单的费用 */
$total = order_fee($order, $cart_goods, $consignee);
$smarty->assign('total', $total);
/* 取得可以得到的积分和红包 */
$smarty->assign('total_integral', cart_amount(false, $flow_type) - $order['bonus'] - $total['integral_money']);
$smarty->assign('total_bonus', price_format(get_total_bonus(), false));
/* 团购标志 */
if ($flow_type == CART_GROUP_BUY_GOODS)
{
$smarty->assign('is_group_buy', 1);
}
$result['content'] = $smarty->fetch('library/order_total.lbi');
}
echo $json->encode($result);
exit;
}
elseif ($_REQUEST['step'] == 'change_surplus')
{
/*------------------------------------------------------ */
//-- 改变余额
/*------------------------------------------------------ */
include_once('includes/cls_json.php');
$surplus = floatval($_GET['surplus']);
$user_info = user_info($_SESSION['user_id']);
if ($user_info['user_money'] + $user_info['credit_line'] < $surplus)
{
$result['error'] = $_LANG['surplus_not_enough'];
}
else
{
/* 取得购物类型 */
$flow_type = isset($_SESSION['flow_type']) ? intval($_SESSION['flow_type']) : CART_GENERAL_GOODS;
/* 取得购物流程设置 */
$smarty->assign('config', $_CFG);
/* 获得收货人信息 */
$consignee = get_consignee($_SESSION['user_id']);
/* 对商品信息赋值 */
$cart_goods = cart_goods($flow_type); // 取得商品列表,计算合计
if (empty($cart_goods) || !check_consignee_info($consignee, $flow_type))
{
$result['error'] = $_LANG['no_goods_in_cart'];
}
else
{
/* 取得订单信息 */
$order = flow_order_info();
$order['surplus'] = $surplus;
/* 计算订单的费用 */
$total = order_fee($order, $cart_goods, $consignee);
$smarty->assign('total', $total);
/* 团购标志 */
if ($flow_type == CART_GROUP_BUY_GOODS)
{
$smarty->assign('is_group_buy', 1);
}
$result['content'] = $smarty->fetch('library/order_total.lbi');
}
}
$json = new JSON();
die($json->encode($result));
}
elseif ($_REQUEST['step'] == 'change_integral')
{
/*------------------------------------------------------ */
//-- 改变积分
/*------------------------------------------------------ */
include_once('includes/cls_json.php');
$points = floatval($_GET['points']);
$user_info = user_info($_SESSION['user_id']);
/* 取得订单信息 */
$order = flow_order_info();
$flow_points = flow_available_points(); // 该订单允许使用的积分
$user_points = $user_info['pay_points']; // 用户的积分总数
if ($points > $user_points)
{
$result['error'] = $_LANG['integral_not_enough'];
}
elseif ($points > $flow_points)
{
$result['error'] = sprintf($_LANG['integral_too_much'], $flow_points);
}
else
{
/* 取得购物类型 */
$flow_type = isset($_SESSION['flow_type']) ? intval($_SESSION['flow_type']) : CART_GENERAL_GOODS;
$order['integral'] = $points;
/* 获得收货人信息 */
$consignee = get_consignee($_SESSION['user_id']);
/* 对商品信息赋值 */
$cart_goods = cart_goods($flow_type); // 取得商品列表,计算合计
if (empty($cart_goods) || !check_consignee_info($consignee, $flow_type))
{
$result['error'] = $_LANG['no_goods_in_cart'];
}
else
{
/* 计算订单的费用 */
$total = order_fee($order, $cart_goods, $consignee);
$smarty->assign('total', $total);
$smarty->assign('config', $_CFG);
/* 团购标志 */
if ($flow_type == CART_GROUP_BUY_GOODS)
{
$smarty->assign('is_group_buy', 1);
}
$result['content'] = $smarty->fetch('library/order_total.lbi');
$result['error'] = '';
}
}
$json = new JSON();
die($json->encode($result));
}
elseif ($_REQUEST['step'] == 'change_bonus')
{
/*------------------------------------------------------ */
//-- 改变红包
/*------------------------------------------------------ */
include_once('includes/cls_json.php');
$result = array('error' => '', 'content' => '');
/* 取得购物类型 */
$flow_type = isset($_SESSION['flow_type']) ? intval($_SESSION['flow_type']) : CART_GENERAL_GOODS;
/* 获得收货人信息 */
$consignee = get_consignee($_SESSION['user_id']);
/* 对商品信息赋值 */
$cart_goods = cart_goods($flow_type); // 取得商品列表,计算合计
if (empty($cart_goods) || !check_consignee_info($consignee, $flow_type))
{
$result['error'] = $_LANG['no_goods_in_cart'];
}
else
{
/* 取得购物流程设置 */
$smarty->assign('config', $_CFG);
/* 取得订单信息 */
$order = flow_order_info();
$bonus = bonus_info(intval($_GET['bonus']));
if ((!empty($bonus) && $bonus['user_id'] == $_SESSION['user_id']) || $_GET['bonus'] == 0)
{
$order['bonus_id'] = $_GET['bonus'];
}
else
{
$order['bonus_id'] = 0;
$result['error'] = $_LANG['invalid_bonus'];
}
/* 计算订单的费用 */
$total = order_fee($order, $cart_goods, $consignee);
$smarty->assign('total', $total);
/* 团购标志 */
if ($flow_type == CART_GROUP_BUY_GOODS)
{
$smarty->assign('is_group_buy', 1);
}
$result['content'] = $smarty->fetch('library/order_total.lbi');
}
$json = new JSON();
die($json->encode($result));
}
elseif ($_REQUEST['step'] == 'change_needinv')
{
/*------------------------------------------------------ */
//-- 改变发票的设置
/*------------------------------------------------------ */
include_once('includes/cls_json.php');
$result = array('error' => '', 'content' => '');
$json = new JSON();
$_GET['inv_type'] = !empty($_GET['inv_type']) ? json_str_iconv(urldecode($_GET['inv_type'])) : '';
$_GET['invPayee'] = !empty($_GET['invPayee']) ? json_str_iconv(urldecode($_GET['invPayee'])) : '';
$_GET['inv_content'] = !empty($_GET['inv_content']) ? json_str_iconv(urldecode($_GET['inv_content'])) : '';
/* 取得购物类型 */
$flow_type = isset($_SESSION['flow_type']) ? intval($_SESSION['flow_type']) : CART_GENERAL_GOODS;
/* 获得收货人信息 */
$consignee = get_consignee($_SESSION['user_id']);
/* 对商品信息赋值 */
$cart_goods = cart_goods($flow_type); // 取得商品列表,计算合计
if (empty($cart_goods) || !check_consignee_info($consignee, $flow_type))
{
$result['error'] = $_LANG['no_goods_in_cart'];
die($json->encode($result));
}
else
{
/* 取得购物流程设置 */
$smarty->assign('config', $_CFG);
/* 取得订单信息 */
$order = flow_order_info();
if (isset($_GET['need_inv']) && intval($_GET['need_inv']) == 1)
{
$order['need_inv'] = 1;
$order['inv_type'] = trim(stripslashes($_GET['inv_type']));
$order['inv_payee'] = trim(stripslashes($_GET['inv_payee']));
$order['inv_content'] = trim(stripslashes($_GET['inv_content']));
}
else
{
$order['need_inv'] = 0;
$order['inv_type'] = '';
$order['inv_payee'] = '';
$order['inv_content'] = '';
}
/* 计算订单的费用 */
$total = order_fee($order, $cart_goods, $consignee);
$smarty->assign('total', $total);
/* 团购标志 */
if ($flow_type == CART_GROUP_BUY_GOODS)
{
$smarty->assign('is_group_buy', 1);
}
die($smarty->fetch('library/order_total.lbi'));
}
}
elseif ($_REQUEST['step'] == 'change_oos')
{
/*------------------------------------------------------ */
//-- 改变缺货处理时的方式
/*------------------------------------------------------ */
/* 取得订单信息 */
$order = flow_order_info();
$order['how_oos'] = intval($_GET['oos']);
/* 保存 session */
$_SESSION['flow_order'] = $order;
}
elseif ($_REQUEST['step'] == 'check_surplus')
{
/*------------------------------------------------------ */
//-- 检查用户输入的余额
/*------------------------------------------------------ */
$surplus = floatval($_GET['surplus']);
$user_info = user_info($_SESSION['user_id']);
if (($user_info['user_money'] + $user_info['credit_line'] < $surplus))
{
die($_LANG['surplus_not_enough']);
}
exit;
}
elseif ($_REQUEST['step'] == 'check_integral')
{
/*------------------------------------------------------ */
//-- 检查用户输入的余额
/*------------------------------------------------------ */
$points = floatval($_GET['integral']);
$user_info = user_info($_SESSION['user_id']);
$flow_points = flow_available_points(); // 该订单允许使用的积分
$user_points = $user_info['pay_points']; // 用户的积分总数
if ($points > $user_points)
{
die($_LANG['integral_not_enough']);
}
if ($points > $flow_points)
{
die(sprintf($_LANG['integral_too_much'], $flow_points));
}
exit;
}
/*------------------------------------------------------ */
//-- 完成所有订单操作,提交到数据库
/*------------------------------------------------------ */
elseif ($_REQUEST['step'] == 'done')
{
include_once('includes/lib_clips.php');
include_once('includes/lib_payment.php');
/* 取得购物类型 */
$flow_type = isset($_SESSION['flow_type']) ? intval($_SESSION['flow_type']) : CART_GENERAL_GOODS;
/* 检查购物车中是否有商品 */
$sql = "SELECT COUNT(*) FROM " . $ecs->table('cart') .
" WHERE session_id = '" . SESS_ID . "' " .
"AND parent_id = 0 AND is_gift = 0 AND rec_type = '$flow_type'";
if ($db->getOne($sql) == 0)
{
show_message($_LANG['no_goods_in_cart'], '', '', 'warning');
}
/* 检查商品库存 */
/* 如果使用库存,且下订单时减库存,则减少库存 */
if ($_CFG['use_storage'] == '1' && $_CFG['stock_dec_time'] == SDT_PLACE)
{
$cart_goods_stock = get_cart_goods();
$_cart_goods_stock = array();
foreach ($cart_goods_stock['goods_list'] as $value)
{
$_cart_goods_stock[$value['rec_id']] = $value['goods_number'];
}
flow_cart_stock($_cart_goods_stock);
unset($cart_goods_stock, $_cart_goods_stock);
}
/*
* 检查用户是否已经登录
* 如果用户已经登录了则检查是否有默认的收货地址
* 如果没有登录则跳转到登录和注册页面
*/
if (empty($_SESSION['direct_shopping']) && $_SESSION['user_id'] == 0)
{
/* 用户没有登录且没有选定匿名购物,转向到登录页面 */
ecs_header("Location: flow.php?step=login\n");
exit;
}
$consignee = get_consignee($_SESSION['user_id']);
/* 检查收货人信息是否完整 */
if (!check_consignee_info($consignee, $flow_type))
{
/* 如果不完整则转向到收货人信息填写界面 */
ecs_header("Location: flow.php?step=consignee\n");
exit;
}
$_POST['how_oos'] = isset($_POST['how_oos']) ? intval($_POST['how_oos']) : 0;
$_POST['card_message'] = isset($_POST['card_message']) ? htmlspecialchars($_POST['card_message']) : '';
$_POST['inv_type'] = !empty($_POST['inv_type']) ? htmlspecialchars($_POST['inv_type']) : '';
$_POST['inv_payee'] = isset($_POST['inv_payee']) ? htmlspecialchars($_POST['inv_payee']) : '';
$_POST['inv_content'] = isset($_POST['inv_content']) ? htmlspecialchars($_POST['inv_content']) : '';
$_POST['postscript'] = isset($_POST['postscript']) ? htmlspecialchars($_POST['postscript']) : '';
$order = array(
'shipping_id' => intval($_POST['shipping']),
'pay_id' => intval($_POST['payment']),
'pack_id' => isset($_POST['pack']) ? intval($_POST['pack']) : 0,
'card_id' => isset($_POST['card']) ? intval($_POST['card']) : 0,
'card_message' => trim($_POST['card_message']),
'surplus' => isset($_POST['surplus']) ? floatval($_POST['surplus']) : 0.00,
'integral' => isset($_POST['integral']) ? intval($_POST['integral']) : 0,
'bonus_id' => isset($_POST['bonus']) ? intval($_POST['bonus']) : 0,
'need_inv' => empty($_POST['need_inv']) ? 0 : 1,
'inv_type' => $_POST['inv_type'],
'inv_payee' => trim($_POST['inv_payee']),
'inv_content' => $_POST['inv_content'],
'postscript' => trim($_POST['postscript']),
'how_oos' => isset($_LANG['oos'][$_POST['how_oos']]) ? addslashes($_LANG['oos'][$_POST['how_oos']]) : '',
'need_insure' => isset($_POST['need_insure']) ? intval($_POST['need_insure']) : 0,
'user_id' => $_SESSION['user_id'],
'add_time' => gmtime(),
'order_status' => OS_UNCONFIRMED,
'shipping_status' => SS_UNSHIPPED,
'pay_status' => PS_UNPAYED,
'agency_id' => get_agency_by_regions(array($consignee['country'], $consignee['province'], $consignee['city'], $consignee['district']))
);
/* 扩展信息 */
if (isset($_SESSION['flow_type']) && intval($_SESSION['flow_type']) != CART_GENERAL_GOODS)
{
$order['extension_code'] = $_SESSION['extension_code'];
$order['extension_id'] = $_SESSION['extension_id'];
}
else
{
$order['extension_code'] = '';
$order['extension_id'] = 0;
}
/* 检查积分余额是否合法 */
$user_id = $_SESSION['user_id'];
if ($user_id > 0)
{
$user_info = user_info($user_id);
$order['surplus'] = min($order['surplus'], $user_info['user_money'] + $user_info['credit_line']);
if ($order['surplus'] < 0)
{
$order['surplus'] = 0;
}
// 查询用户有多少积分
$flow_points = flow_available_points(); // 该订单允许使用的积分
$user_points = $user_info['pay_points']; // 用户的积分总数
$order['integral'] = min($order['integral'], $user_points, $flow_points);
if ($order['integral'] < 0)
{
$order['integral'] = 0;
}
}
else
{
$order['surplus'] = 0;
$order['integral'] = 0;
}
/* 检查红包是否存在 */
if ($order['bonus_id'] > 0)
{
$bonus = bonus_info($order['bonus_id']);
if (empty($bonus) || $bonus['user_id'] != $user_id || $bonus['order_id'] > 0 || $bonus['min_goods_amount'] > cart_amount(true, $flow_type))
{
$order['bonus_id'] = 0;
}
}
elseif (isset($_POST['bonus_sn']))
{
$bonus_sn = trim($_POST['bonus_sn']);
$bonus = bonus_info(0, $bonus_sn);
$now = gmtime();
if (empty($bonus) || $bonus['user_id'] > 0 || $bonus['order_id'] > 0 || $bonus['min_goods_amount'] > cart_amount(true, $flow_type) || $now > $bonus['use_end_date'])
{
}
else
{
if ($user_id > 0)
{
$sql = "UPDATE " . $ecs->table('user_bonus') . " SET user_id = '$user_id' WHERE bonus_id = '$bonus[bonus_id]' LIMIT 1";
$db->query($sql);
}
$order['bonus_id'] = $bonus['bonus_id'];
$order['bonus_sn'] = $bonus_sn;
}
}
/* 订单中的商品 */
$cart_goods = cart_goods($flow_type);
if (empty($cart_goods))
{
show_message($_LANG['no_goods_in_cart'], $_LANG['back_home'], './', 'warning');
}
/* 检查商品总额是否达到最低限购金额 */
if ($flow_type == CART_GENERAL_GOODS && cart_amount(true, CART_GENERAL_GOODS) < $_CFG['min_goods_amount'])
{
show_message(sprintf($_LANG['goods_amount_not_enough'], price_format($_CFG['min_goods_amount'], false)));
}
/* 收货人信息 */
foreach ($consignee as $key => $value)
{
$order[$key] = addslashes($value);
}
/* 订单中的总额 */
$total = order_fee($order, $cart_goods, $consignee);
$order['bonus'] = $total['bonus'];
$order['goods_amount'] = $total['goods_price'];
$order['discount'] = $total['discount'];
$order['surplus'] = $total['surplus'];
$order['tax'] = $total['tax'];
// 购物车中的商品能享受红包支付的总额
$discount_amout = compute_discount_amount();
// 红包和积分最多能支付的金额为商品总额
$temp_amout = $order['goods_amount'] - $discount_amout;
if ($temp_amout <= 0)
{
$order['bonus_id'] = 0;
}
/* 配送方式 */
if ($order['shipping_id'] > 0)
{
$shipping = shipping_info($order['shipping_id']);
$order['shipping_name'] = addslashes($shipping['shipping_name']);
}
$order['shipping_fee'] = $total['shipping_fee'];
$order['insure_fee'] = $total['shipping_insure'];
/* 支付方式 */
if ($order['pay_id'] > 0)
{
$payment = payment_info($order['pay_id']);
$order['pay_name'] = addslashes($payment['pay_name']);
}
$order['pay_fee'] = $total['pay_fee'];
$order['cod_fee'] = $total['cod_fee'];
/* 商品包装 */
if ($order['pack_id'] > 0)
{
$pack = pack_info($order['pack_id']);
$order['pack_name'] = addslashes($pack['pack_name']);
}
$order['pack_fee'] = $total['pack_fee'];
/* 祝福贺卡 */
if ($order['card_id'] > 0)
{
$card = card_info($order['card_id']);
$order['card_name'] = addslashes($card['card_name']);
}
$order['card_fee'] = $total['card_fee'];
$order['order_amount'] = number_format($total['amount'], 2, '.', '');
/* 如果全部使用余额支付,检查余额是否足够 */
if ($payment['pay_code'] == 'balance' && $order['order_amount'] > 0)
{
if($order['surplus'] >0) //余额支付里如果输入了一个金额
{
$order['order_amount'] = $order['order_amount'] + $order['surplus'];
$order['surplus'] = 0;
}
if ($order['order_amount'] > ($user_info['user_money'] + $user_info['credit_line']))
{
show_message($_LANG['balance_not_enough']);
}
else
{
$order['surplus'] = $order['order_amount'];
$order['order_amount'] = 0;
}
}
/* 如果订单金额为0(使用余额或积分或红包支付),修改订单状态为已确认、已付款 */
if ($order['order_amount'] <= 0)
{
$order['order_status'] = OS_CONFIRMED;
$order['confirm_time'] = gmtime();
$order['pay_status'] = PS_PAYED;
$order['pay_time'] = gmtime();
$order['order_amount'] = 0;
}
$order['integral_money'] = $total['integral_money'];
$order['integral'] = $total['integral'];
if ($order['extension_code'] == 'exchange_goods')
{
$order['integral_money'] = 0;
$order['integral'] = $total['exchange_integral'];
}
$order['from_ad'] = !empty($_SESSION['from_ad']) ? $_SESSION['from_ad'] : '0';
$order['referer'] = !empty($_SESSION['referer']) ? addslashes($_SESSION['referer']) : '';
/* 记录扩展信息 */
if ($flow_type != CART_GENERAL_GOODS)
{
$order['extension_code'] = $_SESSION['extension_code'];
$order['extension_id'] = $_SESSION['extension_id'];
}
$affiliate = unserialize($_CFG['affiliate']);
if(isset($affiliate['on']) && $affiliate['on'] == 1 && $affiliate['config']['separate_by'] == 1)
{
//推荐订单分成
$parent_id = get_affiliate();
if($user_id == $parent_id)
{
$parent_id = 0;
}
}
elseif(isset($affiliate['on']) && $affiliate['on'] == 1 && $affiliate['config']['separate_by'] == 0)
{
//推荐注册分成
$parent_id = 0;
}
else
{
//分成功能关闭
$parent_id = 0;
}
$order['parent_id'] = $parent_id;
/* 插入订单表 */
$error_no = 0;
do
{
$order['order_sn'] = get_order_sn(); //获取新订单号
$GLOBALS['db']->autoExecute($GLOBALS['ecs']->table('order_info'), $order, 'INSERT');
$error_no = $GLOBALS['db']->errno();
if ($error_no > 0 && $error_no != 1062)
{
die($GLOBALS['db']->errorMsg());
}
}
while ($error_no == 1062); //如果是订单号重复则重新提交数据
$new_order_id = $db->insert_id();
$order['order_id'] = $new_order_id;
/* 插入订单商品 */
$sql = "INSERT INTO " . $ecs->table('order_goods') . "( " .
"order_id, goods_id, goods_name, goods_sn, product_id, goods_number, market_price, ".
"goods_price, goods_attr, is_real, extension_code, parent_id, is_gift, goods_attr_id) ".
" SELECT '$new_order_id', goods_id, goods_name, goods_sn, product_id, goods_number, market_price, ".
"goods_price, goods_attr, is_real, extension_code, parent_id, is_gift, goods_attr_id".
" FROM " .$ecs->table('cart') .
" WHERE session_id = '".SESS_ID."' AND rec_type = '$flow_type'";
$db->query($sql);
/* 修改拍卖活动状态 */
if ($order['extension_code']=='auction')
{
$sql = "UPDATE ". $ecs->table('goods_activity') ." SET is_finished='2' WHERE act_id=".$order['extension_id'];
$db->query($sql);
}
/* 处理余额、积分、红包 */
if ($order['user_id'] > 0 && $order['surplus'] > 0)
{
log_account_change($order['user_id'], $order['surplus'] * (-1), 0, 0, 0, sprintf($_LANG['pay_order'], $order['order_sn']));
}
if ($order['user_id'] > 0 && $order['integral'] > 0)
{
log_account_change($order['user_id'], 0, 0, 0, $order['integral'] * (-1), sprintf($_LANG['pay_order'], $order['order_sn']));
}
if ($order['bonus_id'] > 0 && $temp_amout > 0)
{
use_bonus($order['bonus_id'], $new_order_id);
}
/* 如果使用库存,且下订单时减库存,则减少库存 */
if ($_CFG['use_storage'] == '1' && $_CFG['stock_dec_time'] == SDT_PLACE)
{
change_order_goods_storage($order['order_id'], true, SDT_PLACE);
}
/* 给商家发邮件 */
/* 增加是否给客服发送邮件选项 */
if ($_CFG['send_service_email'] && $_CFG['service_email'] != '')
{
$tpl = get_mail_template('remind_of_new_order');
$smarty->assign('order', $order);
$smarty->assign('goods_list', $cart_goods);
$smarty->assign('shop_name', $_CFG['shop_name']);
$smarty->assign('send_date', date($_CFG['time_format']));
$content = $smarty->fetch('str:' . $tpl['template_content']);
send_mail($_CFG['shop_name'], $_CFG['service_email'], $tpl['template_subject'], $content, $tpl['is_html']);
}
/* 如果需要,发短信 */
if ($_CFG['sms_order_placed'] == '1' && $_CFG['sms_shop_mobile'] != '')
{
include_once('includes/cls_sms.php');
$sms = new sms();
$msg = $order['pay_status'] == PS_UNPAYED ?
$_LANG['order_placed_sms'] : $_LANG['order_placed_sms'] . '[' . $_LANG['sms_paid'] . ']';
$sms->send($_CFG['sms_shop_mobile'], sprintf($msg, $order['consignee'], $order['tel']), 0);
}
/* 如果订单金额为0 处理虚拟卡 */
if ($order['order_amount'] <= 0)
{
$sql = "SELECT goods_id, goods_name, goods_number AS num FROM ".
$GLOBALS['ecs']->table('cart') .
" WHERE is_real = 0 AND extension_code = 'virtual_card'".
" AND session_id = '".SESS_ID."' AND rec_type = '$flow_type'";
$res = $GLOBALS['db']->getAll($sql);
$virtual_goods = array();
foreach ($res AS $row)
{
$virtual_goods['virtual_card'][] = array('goods_id' => $row['goods_id'], 'goods_name' => $row['goods_name'], 'num' => $row['num']);
}
if ($virtual_goods AND $flow_type != CART_GROUP_BUY_GOODS)
{
/* 虚拟卡发货 */
if (virtual_goods_ship($virtual_goods,$msg, $order['order_sn'], true))
{
/* 如果没有实体商品,修改发货状态,送积分和红包 */
$sql = "SELECT COUNT(*)" .
" FROM " . $ecs->table('order_goods') .
" WHERE order_id = '$order[order_id]' " .
" AND is_real = 1";
if ($db->getOne($sql) <= 0)
{
/* 修改订单状态 */
update_order($order['order_id'], array('shipping_status' => SS_SHIPPED, 'shipping_time' => gmtime()));
/* 如果订单用户不为空,计算积分,并发给用户;发红包 */
if ($order['user_id'] > 0)
{
/* 取得用户信息 */
$user = user_info($order['user_id']);
/* 计算并发放积分 */
$integral = integral_to_give($order);
log_account_change($order['user_id'], 0, 0, intval($integral['rank_points']), intval($integral['custom_points']), sprintf($_LANG['order_gift_integral'], $order['order_sn']));
/* 发放红包 */
send_order_bonus($order['order_id']);
}
}
}
}
}
/* 清空购物车 */
clear_cart($flow_type);
/* 清除缓存,否则买了商品,但是前台页面读取缓存,商品数量不减少 */
clear_all_files();
/* 插入支付日志 */
$order['log_id'] = insert_pay_log($new_order_id, $order['order_amount'], PAY_ORDER);
/* 取得支付信息,生成支付代码 */
if ($order['order_amount'] > 0)
{
$payment = payment_info($order['pay_id']);
include_once('includes/modules/payment/' . $payment['pay_code'] . '.php');
$pay_obj = new $payment['pay_code'];
$pay_online = $pay_obj->get_code($order, unserialize_config($payment['pay_config']));
$order['pay_desc'] = $payment['pay_desc'];
$smarty->assign('pay_online', $pay_online);
}
if(!empty($order['shipping_name']))
{
$order['shipping_name']=trim(stripcslashes($order['shipping_name']));
}
/* 订单信息 */
$smarty->assign('order', $order);
$smarty->assign('total', $total);
$smarty->assign('goods_list', $cart_goods);
$smarty->assign('order_submit_back', sprintf($_LANG['order_submit_back'], $_LANG['back_home'], $_LANG['goto_user_center'])); // 返回提示
user_uc_call('add_feed', array($order['order_id'], BUY_GOODS)); //推送feed到uc
unset($_SESSION['flow_consignee']); // 清除session中保存的收货人信息
unset($_SESSION['flow_order']);
unset($_SESSION['direct_shopping']);
}
/*------------------------------------------------------ */
//-- 更新购物车
/*------------------------------------------------------ */
elseif ($_REQUEST['step'] == 'update_cart')
{
if (isset($_POST['goods_number']) && is_array($_POST['goods_number']))
{
flow_update_cart($_POST['goods_number']);
}
show_message($_LANG['update_cart_notice'], $_LANG['back_to_cart'], 'flow.php');
exit;
}
/*------------------------------------------------------ */
//-- 删除购物车中的商品
/*------------------------------------------------------ */
elseif ($_REQUEST['step'] == 'drop_goods')
{
$rec_id = intval($_GET['id']);
flow_drop_cart_goods($rec_id);
ecs_header("Location: flow.php\n");
exit;
}
/* 把优惠活动加入购物车 */
elseif ($_REQUEST['step'] == 'add_favourable')
{
/* 取得优惠活动信息 */
$act_id = intval($_POST['act_id']);
$favourable = favourable_info($act_id);
if (empty($favourable))
{
show_message($_LANG['favourable_not_exist']);
}
/* 判断用户能否享受该优惠 */
if (!favourable_available($favourable))
{
show_message($_LANG['favourable_not_available']);
}
/* 检查购物车中是否已有该优惠 */
$cart_favourable = cart_favourable();
if (favourable_used($favourable, $cart_favourable))
{
show_message($_LANG['favourable_used']);
}
/* 赠品(特惠品)优惠 */
if ($favourable['act_type'] == FAT_GOODS)
{
/* 检查是否选择了赠品 */
if (empty($_POST['gift']))
{
show_message($_LANG['pls_select_gift']);
}
/* 检查是否已在购物车 */
$sql = "SELECT goods_name" .
" FROM " . $ecs->table('cart') .
" WHERE session_id = '" . SESS_ID . "'" .
" AND rec_type = '" . CART_GENERAL_GOODS . "'" .
" AND is_gift = '$act_id'" .
" AND goods_id " . db_create_in($_POST['gift']);
$gift_name = $db->getCol($sql);
if (!empty($gift_name))
{
show_message(sprintf($_LANG['gift_in_cart'], join(',', $gift_name)));
}
/* 检查数量是否超过上限 */
$count = isset($cart_favourable[$act_id]) ? $cart_favourable[$act_id] : 0;
if ($favourable['act_type_ext'] > 0 && $count + count($_POST['gift']) > $favourable['act_type_ext'])
{
show_message($_LANG['gift_count_exceed']);
}
/* 添加赠品到购物车 */
foreach ($favourable['gift'] as $gift)
{
if (in_array($gift['id'], $_POST['gift']))
{
add_gift_to_cart($act_id, $gift['id'], $gift['price']);
}
}
}
elseif ($favourable['act_type'] == FAT_DISCOUNT)
{
add_favourable_to_cart($act_id, $favourable['act_name'], cart_favourable_amount($favourable) * (100 - $favourable['act_type_ext']) / 100);
}
elseif ($favourable['act_type'] == FAT_PRICE)
{
add_favourable_to_cart($act_id, $favourable['act_name'], $favourable['act_type_ext']);
}
/* 刷新购物车 */
ecs_header("Location: flow.php\n");
exit;
}
elseif ($_REQUEST['step'] == 'clear')
{
$sql = "DELETE FROM " . $ecs->table('cart') . " WHERE session_id='" . SESS_ID . "'";
$db->query($sql);
ecs_header("Location:./\n");
}
elseif ($_REQUEST['step'] == 'drop_to_collect')
{
if ($_SESSION['user_id'] > 0)
{
$rec_id = intval($_GET['id']);
$goods_id = $db->getOne("SELECT goods_id FROM " .$ecs->table('cart'). " WHERE rec_id = '$rec_id' AND session_id = '" . SESS_ID . "' ");
$count = $db->getOne("SELECT goods_id FROM " . $ecs->table('collect_goods') . " WHERE user_id = '$_SESSION[user_id]' AND goods_id = '$goods_id'");
if (empty($count))
{
$time = gmtime();
$sql = "INSERT INTO " .$GLOBALS['ecs']->table('collect_goods'). " (user_id, goods_id, add_time)" .
"VALUES ('$_SESSION[user_id]', '$goods_id', '$time')";
$db->query($sql);
}
flow_drop_cart_goods($rec_id);
}
ecs_header("Location: flow.php\n");
exit;
}
/* 验证红包序列号 */
elseif ($_REQUEST['step'] == 'validate_bonus')
{
$bonus_sn = trim($_REQUEST['bonus_sn']);
if (is_numeric($bonus_sn))
{
$bonus = bonus_info(0, $bonus_sn);
}
else
{
$bonus = array();
}
// if (empty($bonus) || $bonus['user_id'] > 0 || $bonus['order_id'] > 0)
// {
// die($_LANG['bonus_sn_error']);
// }
// if ($bonus['min_goods_amount'] > cart_amount())
// {
// die(sprintf($_LANG['bonus_min_amount_error'], price_format($bonus['min_goods_amount'], false)));
// }
// die(sprintf($_LANG['bonus_is_ok'], price_format($bonus['type_money'], false)));
$bonus_kill = price_format($bonus['type_money'], false);
include_once('includes/cls_json.php');
$result = array('error' => '', 'content' => '');
/* 取得购物类型 */
$flow_type = isset($_SESSION['flow_type']) ? intval($_SESSION['flow_type']) : CART_GENERAL_GOODS;
/* 获得收货人信息 */
$consignee = get_consignee($_SESSION['user_id']);
/* 对商品信息赋值 */
$cart_goods = cart_goods($flow_type); // 取得商品列表,计算合计
if (empty($cart_goods) || !check_consignee_info($consignee, $flow_type))
{
$result['error'] = $_LANG['no_goods_in_cart'];
}
else
{
/* 取得购物流程设置 */
$smarty->assign('config', $_CFG);
/* 取得订单信息 */
$order = flow_order_info();
if (((!empty($bonus) && $bonus['user_id'] == $_SESSION['user_id']) || ($bonus['type_money'] > 0 && empty($bonus['user_id']))) && $bonus['order_id'] <= 0)
{
//$order['bonus_kill'] = $bonus['type_money'];
$now = gmtime();
if ($now > $bonus['use_end_date'])
{
$order['bonus_id'] = '';
$result['error']=$_LANG['bonus_use_expire'];
}
else
{
$order['bonus_id'] = $bonus['bonus_id'];
$order['bonus_sn'] = $bonus_sn;
}
}
else
{
//$order['bonus_kill'] = 0;
$order['bonus_id'] = '';
$result['error'] = $_LANG['invalid_bonus'];
}
/* 计算订单的费用 */
$total = order_fee($order, $cart_goods, $consignee);
$smarty->assign('total', $total);
/* 团购标志 */
if ($flow_type == CART_GROUP_BUY_GOODS)
{
$smarty->assign('is_group_buy', 1);
}
$result['content'] = $smarty->fetch('library/order_total.lbi');
}
$json = new JSON();
die($json->encode($result));
}
/*------------------------------------------------------ */
//-- 添加礼包到购物车
/*------------------------------------------------------ */
elseif ($_REQUEST['step'] == 'add_package_to_cart')
{
include_once('includes/cls_json.php');
$_POST['package_info'] = json_str_iconv($_POST['package_info']);
$result = array('error' => 0, 'message' => '', 'content' => '', 'package_id' => '');
$json = new JSON;
if (empty($_POST['package_info']))
{
$result['error'] = 1;
die($json->encode($result));
}
$package = $json->decode($_POST['package_info']);
/* 如果是一步购物,先清空购物车 */
if ($_CFG['one_step_buy'] == '1')
{
clear_cart();
}
/* 商品数量是否合法 */
if (!is_numeric($package->number) || intval($package->number) <= 0)
{
$result['error'] = 1;
$result['message'] = $_LANG['invalid_number'];
}
else
{
/* 添加到购物车 */
if (add_package_to_cart($package->package_id, $package->number))
{
if ($_CFG['cart_confirm'] > 2)
{
$result['message'] = '';
}
else
{
$result['message'] = $_CFG['cart_confirm'] == 1 ? $_LANG['addto_cart_success_1'] : $_LANG['addto_cart_success_2'];
}
$result['content'] = insert_cart_info();
$result['one_step_buy'] = $_CFG['one_step_buy'];
}
else
{
$result['message'] = $err->last_message();
$result['error'] = $err->error_no;
$result['package_id'] = stripslashes($package->package_id);
}
}
$result['confirm_type'] = !empty($_CFG['cart_confirm']) ? $_CFG['cart_confirm'] : 2;
die($json->encode($result));
}
else
{
/* 标记购物流程为普通商品 */
$_SESSION['flow_type'] = CART_GENERAL_GOODS;
/* 如果是一步购物,跳到结算中心 */
if ($_CFG['one_step_buy'] == '1')
{
ecs_header("Location: flow.php?step=checkout\n");
exit;
}
/* 取得商品列表,计算合计 */
$cart_goods = get_cart_goods();
$smarty->assign('goods_list', $cart_goods['goods_list']);
$smarty->assign('total', $cart_goods['total']);
//购物车的描述的格式化
$smarty->assign('shopping_money', sprintf($_LANG['shopping_money'], $cart_goods['total']['goods_price']));
$smarty->assign('market_price_desc', sprintf($_LANG['than_market_price'],
$cart_goods['total']['market_price'], $cart_goods['total']['saving'], $cart_goods['total']['save_rate']));
// 显示收藏夹内的商品
if ($_SESSION['user_id'] > 0)
{
require_once(ROOT_PATH . 'includes/lib_clips.php');
$collection_goods = get_collection_goods($_SESSION['user_id']);
$smarty->assign('collection_goods', $collection_goods);
}
/* 取得优惠活动 */
$favourable_list = favourable_list($_SESSION['user_rank']);
usort($favourable_list, 'cmp_favourable');
$smarty->assign('favourable_list', $favourable_list);
/* 计算折扣 */
$discount = compute_discount();
$smarty->assign('discount', $discount['discount']);
$favour_name = empty($discount['name']) ? '' : join(',', $discount['name']);
$smarty->assign('your_discount', sprintf($_LANG['your_discount'], $favour_name, price_format($discount['discount'])));
/* 增加是否在购物车里显示商品图 */
$smarty->assign('show_goods_thumb', $GLOBALS['_CFG']['show_goods_in_cart']);
/* 增加是否在购物车里显示商品属性 */
$smarty->assign('show_goods_attribute', $GLOBALS['_CFG']['show_attr_in_cart']);
/* 购物车中商品配件列表 */
//取得购物车中基本件ID
$sql = "SELECT goods_id " .
"FROM " . $GLOBALS['ecs']->table('cart') .
" WHERE session_id = '" . SESS_ID . "' " .
"AND rec_type = '" . CART_GENERAL_GOODS . "' " .
"AND is_gift = 0 " .
"AND extension_code <> 'package_buy' " .
"AND parent_id = 0 ";
$parent_list = $GLOBALS['db']->getCol($sql);
$fittings_list = get_goods_fittings($parent_list);
$smarty->assign('fittings_list', $fittings_list);
}
$smarty->assign('currency_format', $_CFG['currency_format']);
$smarty->assign('integral_scale', $_CFG['integral_scale']);
$smarty->assign('step', $_REQUEST['step']);
assign_dynamic('shopping_flow');
$smarty->display('flow.dwt');
/*------------------------------------------------------ */
//-- PRIVATE FUNCTION
/*------------------------------------------------------ */
/**
* 获得用户的可用积分
*
* @access private
* @return integral
*/
function flow_available_points()
{
$sql = "SELECT SUM(g.integral * c.goods_number) ".
"FROM " . $GLOBALS['ecs']->table('cart') . " AS c, " . $GLOBALS['ecs']->table('goods') . " AS g " .
"WHERE c.session_id = '" . SESS_ID . "' AND c.goods_id = g.goods_id AND c.is_gift = 0 AND g.integral > 0 " .
"AND c.rec_type = '" . CART_GENERAL_GOODS . "'";
$val = intval($GLOBALS['db']->getOne($sql));
return integral_of_value($val);
}
/**
* 更新购物车中的商品数量
*
* @access public
* @param array $arr
* @return void
*/
function flow_update_cart($arr)
{
/* 处理 */
foreach ($arr AS $key => $val)
{
$val = intval(make_semiangle($val));
if ($val <= 0 && !is_numeric($key))
{
continue;
}
//查询:
$sql = "SELECT `goods_id`, `goods_attr_id`, `product_id`, `extension_code` FROM" .$GLOBALS['ecs']->table('cart').
" WHERE rec_id='$key' AND session_id='" . SESS_ID . "'";
$goods = $GLOBALS['db']->getRow($sql);
$sql = "SELECT g.goods_name, g.goods_number ".
"FROM " .$GLOBALS['ecs']->table('goods'). " AS g, ".
$GLOBALS['ecs']->table('cart'). " AS c ".
"WHERE g.goods_id = c.goods_id AND c.rec_id = '$key'";
$row = $GLOBALS['db']->getRow($sql);
//查询:系统启用了库存,检查输入的商品数量是否有效
if (intval($GLOBALS['_CFG']['use_storage']) > 0 && $goods['extension_code'] != 'package_buy')
{
if ($row['goods_number'] < $val)
{
show_message(sprintf($GLOBALS['_LANG']['stock_insufficiency'], $row['goods_name'],
$row['goods_number'], $row['goods_number']));
exit;
}
/* 是货品 */
$goods['product_id'] = trim($goods['product_id']);
if (!empty($goods['product_id']))
{
$sql = "SELECT product_number FROM " .$GLOBALS['ecs']->table('products'). " WHERE goods_id = '" . $goods['goods_id'] . "' AND product_id = '" . $goods['product_id'] . "'";
$product_number = $GLOBALS['db']->getOne($sql);
if ($product_number < $val)
{
show_message(sprintf($GLOBALS['_LANG']['stock_insufficiency'], $row['goods_name'],
$product_number['product_number'], $product_number['product_number']));
exit;
}
}
}
elseif (intval($GLOBALS['_CFG']['use_storage']) > 0 && $goods['extension_code'] == 'package_buy')
{
if (judge_package_stock($goods['goods_id'], $val))
{
show_message($GLOBALS['_LANG']['package_stock_insufficiency']);
exit;
}
}
/* 查询:检查该项是否为基本件 以及是否存在配件 */
/* 此处配件是指添加商品时附加的并且是设置了优惠价格的配件 此类配件都有parent_id goods_number为1 */
$sql = "SELECT b.goods_number, b.rec_id
FROM " .$GLOBALS['ecs']->table('cart') . " a, " .$GLOBALS['ecs']->table('cart') . " b
WHERE a.rec_id = '$key'
AND a.session_id = '" . SESS_ID . "'
AND a.extension_code <> 'package_buy'
AND b.parent_id = a.goods_id
AND b.session_id = '" . SESS_ID . "'";
$offers_accessories_res = $GLOBALS['db']->query($sql);
//订货数量大于0
if ($val > 0)
{
/* 判断是否为超出数量的优惠价格的配件 删除*/
$row_num = 1;
while ($offers_accessories_row = $GLOBALS['db']->fetchRow($offers_accessories_res))
{
if ($row_num > $val)
{
$sql = "DELETE FROM " . $GLOBALS['ecs']->table('cart') .
" WHERE session_id = '" . SESS_ID . "' " .
"AND rec_id = '" . $offers_accessories_row['rec_id'] ."' LIMIT 1";
$GLOBALS['db']->query($sql);
}
$row_num ++;
}
/* 处理超值礼包 */
if ($goods['extension_code'] == 'package_buy')
{
//更新购物车中的商品数量
$sql = "UPDATE " .$GLOBALS['ecs']->table('cart').
" SET goods_number = '$val' WHERE rec_id='$key' AND session_id='" . SESS_ID . "'";
}
/* 处理普通商品或非优惠的配件 */
else
{
$attr_id = empty($goods['goods_attr_id']) ? array() : explode(',', $goods['goods_attr_id']);
$goods_price = get_final_price($goods['goods_id'], $val, true, $attr_id);
//更新购物车中的商品数量
$sql = "UPDATE " .$GLOBALS['ecs']->table('cart').
" SET goods_number = '$val', goods_price = '$goods_price' WHERE rec_id='$key' AND session_id='" . SESS_ID . "'";
}
}
//订货数量等于0
else
{
/* 如果是基本件并且有优惠价格的配件则删除优惠价格的配件 */
while ($offers_accessories_row = $GLOBALS['db']->fetchRow($offers_accessories_res))
{
$sql = "DELETE FROM " . $GLOBALS['ecs']->table('cart') .
" WHERE session_id = '" . SESS_ID . "' " .
"AND rec_id = '" . $offers_accessories_row['rec_id'] ."' LIMIT 1";
$GLOBALS['db']->query($sql);
}
$sql = "DELETE FROM " .$GLOBALS['ecs']->table('cart').
" WHERE rec_id='$key' AND session_id='" .SESS_ID. "'";
}
$GLOBALS['db']->query($sql);
}
/* 删除所有赠品 */
$sql = "DELETE FROM " . $GLOBALS['ecs']->table('cart') . " WHERE session_id = '" .SESS_ID. "' AND is_gift <> 0";
$GLOBALS['db']->query($sql);
}
/**
* 检查订单中商品库存
*
* @access public
* @param array $arr
*
* @return void
*/
function flow_cart_stock($arr)
{
foreach ($arr AS $key => $val)
{
$val = intval(make_semiangle($val));
if ($val <= 0)
{
continue;
}
$sql = "SELECT `goods_id`, `goods_attr_id`, `extension_code` FROM" .$GLOBALS['ecs']->table('cart').
" WHERE rec_id='$key' AND session_id='" . SESS_ID . "'";
$goods = $GLOBALS['db']->getRow($sql);
$sql = "SELECT g.goods_name, g.goods_number, c.product_id ".
"FROM " .$GLOBALS['ecs']->table('goods'). " AS g, ".
$GLOBALS['ecs']->table('cart'). " AS c ".
"WHERE g.goods_id = c.goods_id AND c.rec_id = '$key'";
$row = $GLOBALS['db']->getRow($sql);
//系统启用了库存,检查输入的商品数量是否有效
if (intval($GLOBALS['_CFG']['use_storage']) > 0 && $goods['extension_code'] != 'package_buy')
{
if ($row['goods_number'] < $val)
{
show_message(sprintf($GLOBALS['_LANG']['stock_insufficiency'], $row['goods_name'],
$row['goods_number'], $row['goods_number']));
exit;
}
/* 是货品 */
$row['product_id'] = trim($row['product_id']);
if (!empty($row['product_id']))
{
$sql = "SELECT product_number FROM " .$GLOBALS['ecs']->table('products'). " WHERE goods_id = '" . $goods['goods_id'] . "' AND product_id = '" . $row['product_id'] . "'";
$product_number = $GLOBALS['db']->getOne($sql);
if ($product_number < $val)
{
show_message(sprintf($GLOBALS['_LANG']['stock_insufficiency'], $row['goods_name'],
$row['goods_number'], $row['goods_number']));
exit;
}
}
}
elseif (intval($GLOBALS['_CFG']['use_storage']) > 0 && $goods['extension_code'] == 'package_buy')
{
if (judge_package_stock($goods['goods_id'], $val))
{
show_message($GLOBALS['_LANG']['package_stock_insufficiency']);
exit;
}
}
}
}
/**
* 删除购物车中的商品
*
* @access public
* @param integer $id
* @return void
*/
function flow_drop_cart_goods($id)
{
/* 取得商品id */
$sql = "SELECT * FROM " .$GLOBALS['ecs']->table('cart'). " WHERE rec_id = '$id'";
$row = $GLOBALS['db']->getRow($sql);
if ($row)
{
//如果是超值礼包
if ($row['extension_code'] == 'package_buy')
{
$sql = "DELETE FROM " . $GLOBALS['ecs']->table('cart') .
" WHERE session_id = '" . SESS_ID . "' " .
"AND rec_id = '$id' LIMIT 1";
}
//如果是普通商品,同时删除所有赠品及其配件
elseif ($row['parent_id'] == 0 && $row['is_gift'] == 0)
{
/* 检查购物车中该普通商品的不可单独销售的配件并删除 */
$sql = "SELECT c.rec_id
FROM " . $GLOBALS['ecs']->table('cart') . " AS c, " . $GLOBALS['ecs']->table('group_goods') . " AS gg, " . $GLOBALS['ecs']->table('goods'). " AS g
WHERE gg.parent_id = '" . $row['goods_id'] . "'
AND c.goods_id = gg.goods_id
AND c.parent_id = '" . $row['goods_id'] . "'
AND c.extension_code <> 'package_buy'
AND gg.goods_id = g.goods_id
AND g.is_alone_sale = 0";
$res = $GLOBALS['db']->query($sql);
$_del_str = $id . ',';
while ($id_alone_sale_goods = $GLOBALS['db']->fetchRow($res))
{
$_del_str .= $id_alone_sale_goods['rec_id'] . ',';
}
$_del_str = trim($_del_str, ',');
$sql = "DELETE FROM " . $GLOBALS['ecs']->table('cart') .
" WHERE session_id = '" . SESS_ID . "' " .
"AND (rec_id IN ($_del_str) OR parent_id = '$row[goods_id]' OR is_gift <> 0)";
}
//如果不是普通商品,只删除该商品即可
else
{
$sql = "DELETE FROM " . $GLOBALS['ecs']->table('cart') .
" WHERE session_id = '" . SESS_ID . "' " .
"AND rec_id = '$id' LIMIT 1";
}
$GLOBALS['db']->query($sql);
}
flow_clear_cart_alone();
}
/**
* 删除购物车中不能单独销售的商品
*
* @access public
* @return void
*/
function flow_clear_cart_alone()
{
/* 查询:购物车中所有不可以单独销售的配件 */
$sql = "SELECT c.rec_id, gg.parent_id
FROM " . $GLOBALS['ecs']->table('cart') . " AS c
LEFT JOIN " . $GLOBALS['ecs']->table('group_goods') . " AS gg ON c.goods_id = gg.goods_id
LEFT JOIN" . $GLOBALS['ecs']->table('goods') . " AS g ON c.goods_id = g.goods_id
WHERE c.session_id = '" . SESS_ID . "'
AND c.extension_code <> 'package_buy'
AND gg.parent_id > 0
AND g.is_alone_sale = 0";
$res = $GLOBALS['db']->query($sql);
$rec_id = array();
while ($row = $GLOBALS['db']->fetchRow($res))
{
$rec_id[$row['rec_id']][] = $row['parent_id'];
}
if (empty($rec_id))
{
return;
}
/* 查询:购物车中所有商品 */
$sql = "SELECT DISTINCT goods_id
FROM " . $GLOBALS['ecs']->table('cart') . "
WHERE session_id = '" . SESS_ID . "'
AND extension_code <> 'package_buy'";
$res = $GLOBALS['db']->query($sql);
$cart_good = array();
while ($row = $GLOBALS['db']->fetchRow($res))
{
$cart_good[] = $row['goods_id'];
}
if (empty($cart_good))
{
return;
}
/* 如果购物车中不可以单独销售配件的基本件不存在则删除该配件 */
$del_rec_id = '';
foreach ($rec_id as $key => $value)
{
foreach ($value as $v)
{
if (in_array($v, $cart_good))
{
continue 2;
}
}
$del_rec_id = $key . ',';
}
$del_rec_id = trim($del_rec_id, ',');
if ($del_rec_id == '')
{
return;
}
/* 删除 */
$sql = "DELETE FROM " . $GLOBALS['ecs']->table('cart') ."
WHERE session_id = '" . SESS_ID . "'
AND rec_id IN ($del_rec_id)";
$GLOBALS['db']->query($sql);
}
/**
* 比较优惠活动的函数,用于排序(把可用的排在前面)
* @param array $a 优惠活动a
* @param array $b 优惠活动b
* @return int 相等返回0,小于返回-1,大于返回1
*/
function cmp_favourable($a, $b)
{
if ($a['available'] == $b['available'])
{
if ($a['sort_order'] == $b['sort_order'])
{
return 0;
}
else
{
return $a['sort_order'] < $b['sort_order'] ? -1 : 1;
}
}
else
{
return $a['available'] ? -1 : 1;
}
}
/**
* 取得某用户等级当前时间可以享受的优惠活动
* @param int $user_rank 用户等级id,0表示非会员
* @return array
*/
function favourable_list($user_rank)
{
/* 购物车中已有的优惠活动及数量 */
$used_list = cart_favourable();
/* 当前用户可享受的优惠活动 */
$favourable_list = array();
$user_rank = ',' . $user_rank . ',';
$now = gmtime();
$sql = "SELECT * " .
"FROM " . $GLOBALS['ecs']->table('favourable_activity') .
" WHERE CONCAT(',', user_rank, ',') LIKE '%" . $user_rank . "%'" .
" AND start_time <= '$now' AND end_time >= '$now'" .
" AND act_type = '" . FAT_GOODS . "'" .
" ORDER BY sort_order";
$res = $GLOBALS['db']->query($sql);
while ($favourable = $GLOBALS['db']->fetchRow($res))
{
$favourable['start_time'] = local_date($GLOBALS['_CFG']['time_format'], $favourable['start_time']);
$favourable['end_time'] = local_date($GLOBALS['_CFG']['time_format'], $favourable['end_time']);
$favourable['formated_min_amount'] = price_format($favourable['min_amount'], false);
$favourable['formated_max_amount'] = price_format($favourable['max_amount'], false);
$favourable['gift'] = unserialize($favourable['gift']);
foreach ($favourable['gift'] as $key => $value)
{
$favourable['gift'][$key]['formated_price'] = price_format($value['price'], false);
$sql = "SELECT COUNT(*) FROM " . $GLOBALS['ecs']->table('goods') . " WHERE is_on_sale = 1 AND goods_id = ".$value['id'];
$is_sale = $GLOBALS['db']->getOne($sql);
if(!$is_sale)
{
unset($favourable['gift'][$key]);
}
}
$favourable['act_range_desc'] = act_range_desc($favourable);
$favourable['act_type_desc'] = sprintf($GLOBALS['_LANG']['fat_ext'][$favourable['act_type']], $favourable['act_type_ext']);
/* 是否能享受 */
$favourable['available'] = favourable_available($favourable);
if ($favourable['available'])
{
/* 是否尚未享受 */
$favourable['available'] = !favourable_used($favourable, $used_list);
}
$favourable_list[] = $favourable;
}
return $favourable_list;
}
/**
* 根据购物车判断是否可以享受某优惠活动
* @param array $favourable 优惠活动信息
* @return bool
*/
function favourable_available($favourable)
{
/* 会员等级是否符合 */
$user_rank = $_SESSION['user_rank'];
if (strpos(',' . $favourable['user_rank'] . ',', ',' . $user_rank . ',') === false)
{
return false;
}
/* 优惠范围内的商品总额 */
$amount = cart_favourable_amount($favourable);
/* 金额上限为0表示没有上限 */
return $amount >= $favourable['min_amount'] &&
($amount <= $favourable['max_amount'] || $favourable['max_amount'] == 0);
}
/**
* 取得优惠范围描述
* @param array $favourable 优惠活动
* @return string
*/
function act_range_desc($favourable)
{
if ($favourable['act_range'] == FAR_BRAND)
{
$sql = "SELECT brand_name FROM " . $GLOBALS['ecs']->table('brand') .
" WHERE brand_id " . db_create_in($favourable['act_range_ext']);
return join(',', $GLOBALS['db']->getCol($sql));
}
elseif ($favourable['act_range'] == FAR_CATEGORY)
{
$sql = "SELECT cat_name FROM " . $GLOBALS['ecs']->table('category') .
" WHERE cat_id " . db_create_in($favourable['act_range_ext']);
return join(',', $GLOBALS['db']->getCol($sql));
}
elseif ($favourable['act_range'] == FAR_GOODS)
{
$sql = "SELECT goods_name FROM " . $GLOBALS['ecs']->table('goods') .
" WHERE goods_id " . db_create_in($favourable['act_range_ext']);
return join(',', $GLOBALS['db']->getCol($sql));
}
else
{
return '';
}
}
/**
* 取得购物车中已有的优惠活动及数量
* @return array
*/
function cart_favourable()
{
$list = array();
$sql = "SELECT is_gift, COUNT(*) AS num " .
"FROM " . $GLOBALS['ecs']->table('cart') .
" WHERE session_id = '" . SESS_ID . "'" .
" AND rec_type = '" . CART_GENERAL_GOODS . "'" .
" AND is_gift > 0" .
" GROUP BY is_gift";
$res = $GLOBALS['db']->query($sql);
while ($row = $GLOBALS['db']->fetchRow($res))
{
$list[$row['is_gift']] = $row['num'];
}
return $list;
}
/**
* 购物车中是否已经有某优惠
* @param array $favourable 优惠活动
* @param array $cart_favourable购物车中已有的优惠活动及数量
*/
function favourable_used($favourable, $cart_favourable)
{
if ($favourable['act_type'] == FAT_GOODS)
{
return isset($cart_favourable[$favourable['act_id']]) &&
$cart_favourable[$favourable['act_id']] >= $favourable['act_type_ext'] &&
$favourable['act_type_ext'] > 0;
}
else
{
return isset($cart_favourable[$favourable['act_id']]);
}
}
/**
* 添加优惠活动(赠品)到购物车
* @param int $act_id 优惠活动id
* @param int $id 赠品id
* @param float $price 赠品价格
*/
function add_gift_to_cart($act_id, $id, $price)
{
$sql = "INSERT INTO " . $GLOBALS['ecs']->table('cart') . " (" .
"user_id, session_id, goods_id, goods_sn, goods_name, market_price, goods_price, ".
"goods_number, is_real, extension_code, parent_id, is_gift, rec_type ) ".
"SELECT '$_SESSION[user_id]', '" . SESS_ID . "', goods_id, goods_sn, goods_name, market_price, ".
"'$price', 1, is_real, extension_code, 0, '$act_id', '" . CART_GENERAL_GOODS . "' " .
"FROM " . $GLOBALS['ecs']->table('goods') .
" WHERE goods_id = '$id'";
$GLOBALS['db']->query($sql);
}
/**
* 添加优惠活动(非赠品)到购物车
* @param int $act_id 优惠活动id
* @param string $act_name 优惠活动name
* @param float $amount 优惠金额
*/
function add_favourable_to_cart($act_id, $act_name, $amount)
{
$sql = "INSERT INTO " . $GLOBALS['ecs']->table('cart') . "(" .
"user_id, session_id, goods_id, goods_sn, goods_name, market_price, goods_price, ".
"goods_number, is_real, extension_code, parent_id, is_gift, rec_type ) ".
"VALUES('$_SESSION[user_id]', '" . SESS_ID . "', 0, '', '$act_name', 0, ".
"'" . (-1) * $amount . "', 1, 0, '', 0, '$act_id', '" . CART_GENERAL_GOODS . "')";
$GLOBALS['db']->query($sql);
}
/**
* 取得购物车中某优惠活动范围内的总金额
* @param array $favourable 优惠活动
* @return float
*/
function cart_favourable_amount($favourable)
{
/* 查询优惠范围内商品总额的sql */
$sql = "SELECT SUM(c.goods_price * c.goods_number) " .
"FROM " . $GLOBALS['ecs']->table('cart') . " AS c, " . $GLOBALS['ecs']->table('goods') . " AS g " .
"WHERE c.goods_id = g.goods_id " .
"AND c.session_id = '" . SESS_ID . "' " .
"AND c.rec_type = '" . CART_GENERAL_GOODS . "' " .
"AND c.is_gift = 0 " .
"AND c.goods_id > 0 ";
/* 根据优惠范围修正sql */
if ($favourable['act_range'] == FAR_ALL)
{
// sql do not change
}
elseif ($favourable['act_range'] == FAR_CATEGORY)
{
/* 取得优惠范围分类的所有下级分类 */
$id_list = array();
$cat_list = explode(',', $favourable['act_range_ext']);
foreach ($cat_list as $id)
{
$id_list = array_merge($id_list, array_keys(cat_list(intval($id), 0, false)));
}
$sql .= "AND g.cat_id " . db_create_in($id_list);
}
elseif ($favourable['act_range'] == FAR_BRAND)
{
$id_list = explode(',', $favourable['act_range_ext']);
$sql .= "AND g.brand_id " . db_create_in($id_list);
}
else
{
$id_list = explode(',', $favourable['act_range_ext']);
$sql .= "AND g.goods_id " . db_create_in($id_list);
}
/* 优惠范围内的商品总额 */
return $GLOBALS['db']->getOne($sql);
}
?> | zzshop | trunk/flow.php | PHP | asf20 | 99,615 |
<?php
/**
* ECSHOP 证书反查文件
* ============================================================================
* 版权所有 2005-2010 上海商派网络科技有限公司,并保留所有权利。
* 网站地址: http://www.ecshop.com;
* ----------------------------------------------------------------------------
* 这不是一个自由软件!您只能在不用于商业目的的前提下对程序代码进行修改和
* 使用;不允许对程序代码以任何形式任何目的的再发布。
* ============================================================================
* $Author: wangleisvn $
* $Id: index.php 16075 2009-05-22 02:19:40Z wangleisvn $
*/
define('IN_ECS', true);
require(dirname(__FILE__) . '/includes/init.php');
/*------------------------------------------------------ */
//-- 证书反查
/*------------------------------------------------------ */
if (!empty($_POST['session_id']))
{
$_POST['session_id'] = trim($_POST['session_id']);
$sql = "SELECT sesskey FROM " . $ecs->table('sessions') . " WHERE sesskey = '" . $_POST['session_id'] . "' ";
$sesskey = $db->getOne($sql);
if ($sesskey != '')
{
exit('{"res":"succ","msg":"","info":""}');
}
else
{
exit('{"res":"fail","msg":"error:000002","info":""}');
}
}
else
{
exit('{"res":"fail","msg":"error:000001","info":""}');
}
?> | zzshop | trunk/certi.php | PHP | asf20 | 1,428 |
<?php
/**
* ECSHOP 品牌专区
* ============================================================================
* 版权所有 2005-2010 上海商派网络科技有限公司,并保留所有权利。
* 网站地址: http://www.ecshop.com;
* ----------------------------------------------------------------------------
* 这不是一个自由软件!您只能在不用于商业目的的前提下对程序代码进行修改和
* 使用;不允许对程序代码以任何形式任何目的的再发布。
* ============================================================================
* $Author: testyang $
* $Id: brands.php 15013 2008-10-23 09:31:42Z testyang $
*/
define('IN_ECS', true);
require(dirname(__FILE__) . '/includes/init.php');
$b_id = !empty($_GET['b_id']) ? intval($_GET['b_id']) : 0;
if ($b_id > 0)
{
if (empty($_GET['order_price']))
{
$order_rule = ' ORDER BY g.shop_price ASC, g.sort_order';
}
else
{
$order_rule = ' ORDER BY g.shop_price DESC, g.sort_order';
}
$brands_array = assign_brand_goods($b_id, 0, 0, $order_rule);
$brands_array['brand']['name'] = encode_output($brands_array['brand']['name']);
$smarty->assign('brands_array' , $brands_array);
$num = count($brands_array['goods']);
if ($num > 0)
{
$page_num = '10';
$page = !empty($_GET['page']) ? intval($_GET['page']) : 1;
$pages = ceil($num / $page_num);
if ($page <= 0)
{
$page = 1;
}
if ($pages == 0)
{
$pages = 1;
}
if ($page > $pages)
{
$page = $pages;
}
$i = 1;
foreach ($brands_array['goods'] as $goods_data)
{
if (($i > ($page_num * ($page - 1 ))) && ($i <= ($page_num * $page)))
{
$price = empty($goods_info['promote_price_org']) ? $goods_data['shop_price'] : $goods_data['promote_price'];
//$wml_data .= "<a href='goods.php?id={$goods_data['id']}'>".encode_output($goods_data['name'])."</a>[".encode_output($price)."]<br/>";
$data[] = array('i' => $i , 'price' => encode_output($price) , 'id' => $goods_data['id'] , 'name' => encode_output($goods_data['name']));
}
$i++;
}
$smarty->assign('goods_data', $data);
$pagebar = get_wap_pager($num, $page_num, $page, 'brands.php?b_id=' . $b_id.'&order_price='.(empty($order_price)?0:$order_price), 'page');
$smarty->assign('pagebar', $pagebar);
}
}
$brands_array = get_brands();
if (count($brands_array) > 1)
{
foreach ($brands_array as $key => $brands_data)
{
$brands_array[$key]['brand_name'] = encode_output($brands_data['brand_name']);
}
$smarty->assign('brand_id', $b_id);
$smarty->assign('other_brands', $brands_array);
}
$smarty->assign('footer', get_footer());
$smarty->display('brands.html');
?> | zzshop | trunk/mobile/brands.php | PHP | asf20 | 3,021 |
<?php
/**
* ECSHOP 商品页
* ============================================================================
* 版权所有 2005-2010 上海商派网络科技有限公司,并保留所有权利。
* 网站地址: http://www.ecshop.com;
* ----------------------------------------------------------------------------
* 这不是一个自由软件!您只能在不用于商业目的的前提下对程序代码进行修改和
* 使用;不允许对程序代码以任何形式任何目的的再发布。
* ============================================================================
* $Author: testyang $
* $Id: goods.php 15013 2008-10-23 09:31:42Z testyang $
*/
define('IN_ECS', true);
require(dirname(__FILE__) . '/includes/init.php');
$goods_id = !empty($_GET['id']) ? intval($_GET['id']) : '';
$act = !empty($_GET['act']) ? $_GET['act'] : '';
$_LANG['kilogram'] = '千克';
$_LANG['gram'] = '克';
$_LANG['home'] = '首页';
$_LANG['goods_attr'] = '';
$smarty->assign('goods_id', $goods_id);
$goods_info = get_goods_info($goods_id);
$goods_info['goods_name'] = encode_output($goods_info['goods_name']);
$goods_info['goods_brief'] = encode_output($goods_info['goods_brief']);
$goods_info['promote_price'] = encode_output($goods_info['promote_price']);
$goods_info['market_price'] = encode_output($goods_info['market_price']);
$goods_info['shop_price'] = encode_output($goods_info['shop_price']);
$goods_info['shop_price_formated'] = encode_output($goods_info['shop_price_formated']);
$goods_info['goods_number'] = encode_output($goods_info['goods_number']);
$smarty->assign('goods_info', $goods_info);
$shop_price = $goods_info['shop_price'];
$smarty->assign('rank_prices', get_user_rank_prices($goods_id, $shop_price)); // 会员等级价格
$smarty->assign('footer', get_footer());
/* 查看商品图片操作 */
if ($act == 'view_img')
{
$smarty->display('goods_img.html');
exit();
}
/* 检查是否有商品品牌 */
if (!empty($goods_info['brand_id']))
{
$brand_name = $db->getOne("SELECT brand_name FROM " . $ecs->table('brand') . " WHERE brand_id={$goods_info['brand_id']}");
$smarty->assign('brand_name', encode_output($brand_name));
}
/* 显示分类名称 */
$cat_array = get_parent_cats($goods_info['cat_id']);
krsort($cat_array);
$cat_str = '';
foreach ($cat_array as $key => $cat_data)
{
$cat_array[$key]['cat_name'] = encode_output($cat_data['cat_name']);
$cat_str .= "<a href='category.php?c_id={$cat_data['cat_id']}'>" . encode_output($cat_data['cat_name']) . "</a>->";
}
$smarty->assign('cat_array', $cat_array);
$properties = get_goods_properties($goods_id); // 获得商品的规格和属性
$smarty->assign('specification', $properties['spe']); // 商品规格
$comment = assign_comment($goods_id, 0);
$smarty->assign('comment', $comment);
$smarty->display('goods.html');
/**
* 获得指定商品的各会员等级对应的价格
*
* @access public
* @param integer $goods_id
* @return array
*/
function get_user_rank_prices($goods_id, $shop_price)
{
$sql = "SELECT rank_id, IFNULL(mp.user_price, r.discount * $shop_price / 100) AS price, r.rank_name, r.discount " .
'FROM ' . $GLOBALS['ecs']->table('user_rank') . ' AS r ' .
'LEFT JOIN ' . $GLOBALS['ecs']->table('member_price') . " AS mp ".
"ON mp.goods_id = '$goods_id' AND mp.user_rank = r.rank_id " .
"WHERE r.show_price = 1 OR r.rank_id = '$_SESSION[user_rank]'";
$res = $GLOBALS['db']->query($sql);
$arr = array();
while ($row = $GLOBALS['db']->fetchRow($res))
{
$arr[$row['rank_id']] = array(
'rank_name' => htmlspecialchars($row['rank_name']),
'price' => price_format($row['price']));
}
return $arr;
}
?> | zzshop | trunk/mobile/goods.php | PHP | asf20 | 3,916 |
<?php
/**
* ECSHOP 搜索程序
* ============================================================================
* 版权所有 2005-2010 上海商派网络科技有限公司,并保留所有权利。
* 网站地址: http://www.ecshop.com;
* ----------------------------------------------------------------------------
* 这不是一个自由软件!您只能在不用于商业目的的前提下对程序代码进行修改和
* 使用;不允许对程序代码以任何形式任何目的的再发布。
* ============================================================================
* $Author: sxc_shop $
* $Id: search.php 16908 2009-12-18 08:25:08Z sxc_shop $
*/
define('IN_ECS', true);
if (empty($_GET['encode']))
{
$string = array_merge($_GET, $_POST);
if (get_magic_quotes_gpc())
{
require(dirname(__FILE__) . '/../includes/lib_base.php');
//require(dirname(__FILE__) . '/includes/lib_common.php');
$string = stripslashes_deep($string);
}
$string['search_encode_time'] = time();
$string = str_replace('+', '%2b', base64_encode(serialize($string)));
header("Location: search.php?encode=$string\n");
exit;
}
else
{
$string = base64_decode(trim($_GET['encode']));
if ($string !== false)
{
$string = unserialize($string);
if ($string !== false)
{
/* 用户在重定向的情况下当作一次访问 */
if (!empty($string['search_encode_time']))
{
if (time() > $string['search_encode_time'] + 2)
{
define('INGORE_VISIT_STATS', true);
}
}
else
{
define('INGORE_VISIT_STATS', true);
}
}
else
{
$string = array();
}
}
else
{
$string = array();
}
}
require(dirname(__FILE__) . '/includes/init.php');
$_REQUEST = array_merge($_REQUEST, addslashes_deep($string));
$_REQUEST['act'] = !empty($_REQUEST['act']) ? trim($_REQUEST['act']) : '';
/*------------------------------------------------------ */
//-- 高级搜索
/*------------------------------------------------------ */
if ($_REQUEST['act'] == 'advanced_search')
{
$goods_type = !empty($_REQUEST['goods_type']) ? intval($_REQUEST['goods_type']) : 0;
$attributes = get_seachable_attributes($goods_type);
$smarty->assign('goods_type_selected', $goods_type);
$smarty->assign('goods_type_list', $attributes['cate']);
$smarty->assign('goods_attributes', $attributes['attr']);
assign_template();
assign_dynamic('search');
$position = assign_ur_here(0, $_LANG['advanced_search']);
$smarty->assign('page_title', $position['title']); // 页面标题
$smarty->assign('ur_here', $position['ur_here']); // 当前位置
$smarty->assign('categories', get_categories_tree()); // 分类树
$smarty->assign('helps', get_shop_help()); // 网店帮助
$smarty->assign('top_goods', get_top10()); // 销售排行
$smarty->assign('promotion_info', get_promotion_info());
$smarty->assign('cat_list', cat_list(0, 0, true, 2, false));
$smarty->assign('brand_list', get_brand_list());
$smarty->assign('action', 'form');
$smarty->assign('use_storage', $_CFG['use_storage']);
$smarty->display('search.dwt');
exit;
}
/*------------------------------------------------------ */
//-- 搜索结果
/*------------------------------------------------------ */
else
{
$_REQUEST['keywords'] = !empty($_REQUEST['keywords']) ? trim($_REQUEST['keywords']) : '';
$_REQUEST['brand'] = !empty($_REQUEST['brand']) ? intval($_REQUEST['brand']) : 0;
$_REQUEST['category'] = !empty($_REQUEST['category']) ? intval($_REQUEST['category']) : 0;
$_REQUEST['min_price'] = !empty($_REQUEST['min_price']) ? intval($_REQUEST['min_price']) : 0;
$_REQUEST['max_price'] = !empty($_REQUEST['max_price']) ? intval($_REQUEST['max_price']) : 0;
$_REQUEST['goods_type'] = !empty($_REQUEST['goods_type']) ? intval($_REQUEST['goods_type']) : 0;
$_REQUEST['sc_ds'] = !empty($_REQUEST['sc_ds']) ? intval($_REQUEST['sc_ds']) : 0;
$_REQUEST['outstock'] = !empty($_REQUEST['outstock']) ? 1 : 0;
$action = '';
if (isset($_REQUEST['action']) && $_REQUEST['action'] == 'form')
{
/* 要显示高级搜索栏 */
$adv_value['keywords'] = htmlspecialchars(stripcslashes($_REQUEST['keywords']));
$adv_value['brand'] = $_REQUEST['brand'];
$adv_value['min_price'] = $_REQUEST['min_price'];
$adv_value['max_price'] = $_REQUEST['max_price'];
$adv_value['category'] = $_REQUEST['category'];
$attributes = get_seachable_attributes($_REQUEST['goods_type']);
/* 将提交数据重新赋值 */
foreach ($attributes['attr'] AS $key => $val)
{
if (!empty($_REQUEST['attr'][$val['id']]))
{
if ($val['type'] == 2)
{
$attributes['attr'][$key]['value']['from'] = !empty($_REQUEST['attr'][$val['id']]['from']) ? trim($_REQUEST['attr'][$val['id']]['from']) : '';
$attributes['attr'][$key]['value']['to'] = !empty($_REQUEST['attr'][$val['id']]['to']) ? trim($_REQUEST['attr'][$val['id']]['to']) : '';
}
else
{
$attributes['attr'][$key]['value'] = !empty($_REQUEST['attr'][$val['id']]) ? trim($_REQUEST['attr'][$val['id']]) : '';
}
}
}
if ($_REQUEST['sc_ds'])
{
$smarty->assign('scck', 'checked');
}
$smarty->assign('adv_val', $adv_value);
$smarty->assign('goods_type_list', $attributes['cate']);
$smarty->assign('goods_attributes', $attributes['attr']);
$smarty->assign('goods_type_selected', $_REQUEST['goods_type']);
$smarty->assign('cat_list', cat_list(0, $adv_value['category'], true, 2, false));
$smarty->assign('brand_list', get_brand_list());
$smarty->assign('action', 'form');
$smarty->assign('use_storage', $_CFG['use_storage']);
$action = 'form';
}
/* 初始化搜索条件 */
$keywords = '';
$tag_where = '';
if (!empty($_REQUEST['keywords']))
{
$arr = array();
if (stristr($_REQUEST['keywords'], ' AND ') !== false)
{
/* 检查关键字中是否有AND,如果存在就是并 */
$arr = explode('AND', $_REQUEST['keywords']);
$operator = " AND ";
}
elseif (stristr($_REQUEST['keywords'], ' OR ') !== false)
{
/* 检查关键字中是否有OR,如果存在就是或 */
$arr = explode('OR', $_REQUEST['keywords']);
$operator = " OR ";
}
elseif (stristr($_REQUEST['keywords'], ' + ') !== false)
{
/* 检查关键字中是否有加号,如果存在就是或 */
$arr = explode('+', $_REQUEST['keywords']);
$operator = " OR ";
}
else
{
/* 检查关键字中是否有空格,如果存在就是并 */
$arr = explode(' ', $_REQUEST['keywords']);
$operator = " AND ";
}
$keywords = 'AND (';
$goods_ids = array();
foreach ($arr AS $key => $val)
{
if ($key > 0 && $key < count($arr) && count($arr) > 1)
{
$keywords .= $operator;
}
$val = mysql_like_quote(trim($val));
$sc_dsad = $_REQUEST['sc_ds'] ? " OR goods_desc LIKE '%$val%'" : '';
$keywords .= "(goods_name LIKE '%$val%' OR goods_sn LIKE '%$val%' OR keywords LIKE '%$val%' $sc_dsad)";
$sql = 'SELECT DISTINCT goods_id FROM ' . $ecs->table('tag') . " WHERE tag_words LIKE '%$val%' ";
$res = $db->query($sql);
while ($row = $db->FetchRow($res))
{
$goods_ids[] = $row['goods_id'];
}
$db->autoReplace($ecs->table('keywords'), array('date' => local_date('Y-m-d'),
'searchengine' => 'ecshop', 'keyword' => $val, 'count' => 1), array('count' => 1));
}
$keywords .= ')';
$goods_ids = array_unique($goods_ids);
$tag_where = implode(',', $goods_ids);
if (!empty($tag_where))
{
$tag_where = 'OR g.goods_id ' . db_create_in($tag_where);
}
}
$category = !empty($_REQUEST['category']) ? intval($_REQUEST['category']) : 0;
$categories = ($category > 0) ? ' AND ' . get_children($category) : '';
$brand = $_REQUEST['brand'] ? " AND brand_id = '$_REQUEST[brand]'" : '';
$outstock = !empty($_REQUEST['outstock']) ? " AND g.goods_number > 0 " : '';
$min_price = $_REQUEST['min_price'] != 0 ? " AND g.shop_price >= '$_REQUEST[min_price]'" : '';
$max_price = $_REQUEST['max_price'] != 0 || $_REQUEST['min_price'] < 0 ? " AND g.shop_price <= '$_REQUEST[max_price]'" : '';
/* 排序、显示方式以及类型 */
$default_display_type = $_CFG['show_order_type'] == '0' ? 'list' : ($_CFG['show_order_type'] == '1' ? 'grid' : 'text');
$default_sort_order_method = $_CFG['sort_order_method'] == '0' ? 'DESC' : 'ASC';
$default_sort_order_type = $_CFG['sort_order_type'] == '0' ? 'goods_id' : ($_CFG['sort_order_type'] == '1' ? 'shop_price' : 'last_update');
$sort = (isset($_REQUEST['sort']) && in_array(trim(strtolower($_REQUEST['sort'])), array('goods_id', 'shop_price', 'last_update'))) ? trim($_REQUEST['sort']) : $default_sort_order_type;
$order = (isset($_REQUEST['order']) && in_array(trim(strtoupper($_REQUEST['order'])), array('ASC', 'DESC'))) ? trim($_REQUEST['order']) : $default_sort_order_method;
$display = (isset($_REQUEST['display']) && in_array(trim(strtolower($_REQUEST['display'])), array('list', 'grid', 'text'))) ? trim($_REQUEST['display']) : (isset($_SESSION['display_search']) ? $_SESSION['display_search'] : $default_display_type);
$_SESSION['display_search'] = $display;
$page = !empty($_REQUEST['page']) && intval($_REQUEST['page']) > 0 ? intval($_REQUEST['page']) : 1;
$size = !empty($_CFG['page_size']) && intval($_CFG['page_size']) > 0 ? intval($_CFG['page_size']) : 10;
$intromode = ''; //方式,用于决定搜索结果页标题图片
if (!empty($_REQUEST['intro']))
{
switch ($_REQUEST['intro'])
{
case 'best':
$intro = ' AND g.is_best = 1';
$intromode = 'best';
$ur_here = $_LANG['best_goods'];
break;
case 'new':
$intro = ' AND g.is_new = 1';
$intromode ='new';
$ur_here = $_LANG['new_goods'];
break;
case 'hot':
$intro = ' AND g.is_hot = 1';
$intromode = 'hot';
$ur_here = $_LANG['hot_goods'];
break;
case 'promotion':
$time = gmtime();
$intro = " AND g.promote_price > 0 AND g.promote_start_date <= '$time' AND g.promote_end_date >= '$time'";
$intromode = 'promotion';
$ur_here = $_LANG['promotion_goods'];
break;
default:
$intro = '';
}
}
else
{
$intro = '';
}
/*------------------------------------------------------ */
//-- 属性检索
/*------------------------------------------------------ */
$attr_in = '';
$attr_num = 0;
$attr_url = '';
$attr_arg = array();
if (!empty($_REQUEST['attr']))
{
$sql = "SELECT goods_id, COUNT(*) AS num FROM " . $ecs->table("goods_attr") . " WHERE 0 ";
foreach ($_REQUEST['attr'] AS $key => $val)
{
if (is_not_null($val) && is_numeric($key))
{
$attr_num++;
$sql .= " OR (1 ";
if (is_array($val))
{
$sql .= " AND attr_id = '$key'";
if (!empty($val['from']))
{
$sql .= is_numeric($val['from']) ? " AND attr_value >= " . floatval($val['from']) : " AND attr_value >= '$val[from]'";
$attr_arg["attr[$key][from]"] = $val['from'];
$attr_url .= "&attr[$key][from]=$val[from]";
}
if (!empty($val['to']))
{
$sql .= is_numeric($val['to']) ? " AND attr_value <= " . floatval($val['to']) : " AND attr_value <= '$val[to]'";
$attr_arg["attr[$key][to]"] = $val['to'];
$attr_url .= "&attr[$key][to]=$val[to]";
}
}
else
{
/* 处理选购中心过来的链接 */
$sql .= isset($_REQUEST['pickout']) ? " AND attr_id = '$key' AND attr_value = '" . $val . "' " : " AND attr_id = '$key' AND attr_value LIKE '%" . mysql_like_quote($val) . "%' ";
$attr_url .= "&attr[$key]=$val";
$attr_arg["attr[$key]"] = $val;
}
$sql .= ')';
}
}
/* 如果检索条件都是无效的,就不用检索 */
if ($attr_num > 0)
{
$sql .= " GROUP BY goods_id HAVING num = '$attr_num'";
$row = $db->getCol($sql);
if (count($row))
{
$attr_in = " AND " . db_create_in($row, 'g.goods_id');
}
else
{
$attr_in = " AND 0 ";
}
}
}
elseif (isset($_REQUEST['pickout']))
{
/* 从选购中心进入的链接 */
$sql = "SELECT DISTINCT(goods_id) FROM " . $ecs->table('goods_attr');
$col = $db->getCol($sql);
//如果商店没有设置商品属性,那么此检索条件是无效的
if (!empty($col))
{
$attr_in = " AND " . db_create_in($col, 'g.goods_id');
}
}
/* 获得符合条件的商品总数 */
$sql = "SELECT COUNT(*) FROM " .$ecs->table('goods'). " AS g ".
"WHERE g.is_delete = 0 AND g.is_on_sale = 1 AND g.is_alone_sale = 1 $attr_in ".
"AND (( 1 " . $categories . $keywords . $brand . $min_price . $max_price . $intro . $outstock ." ) ".$tag_where." )";
$count = $db->getOne($sql);
$max_page = ($count> 0) ? ceil($count / $size) : 1;
if ($page > $max_page)
{
$page = $max_page;
}
/* 查询商品 */
$sql = "SELECT g.goods_id, g.goods_name, g.market_price, g.is_new, g.is_best, g.is_hot, g.shop_price AS org_price, ".
"IFNULL(mp.user_price, g.shop_price * '$_SESSION[discount]') AS shop_price, ".
"g.promote_price, g.promote_start_date, g.promote_end_date, g.goods_thumb, g.goods_img, g.goods_brief, g.goods_type ".
"FROM " .$ecs->table('goods'). " AS g ".
"LEFT JOIN " . $GLOBALS['ecs']->table('member_price') . " AS mp ".
"ON mp.goods_id = g.goods_id AND mp.user_rank = '$_SESSION[user_rank]' ".
"WHERE g.is_delete = 0 AND g.is_on_sale = 1 AND g.is_alone_sale = 1 $attr_in ".
"AND (( 1 " . $categories . $keywords . $brand . $min_price . $max_price . $intro . $outstock . " ) ".$tag_where." ) " .
"ORDER BY $sort $order";
$res = $db->SelectLimit($sql, $size, ($page - 1) * $size);
$arr = array();
while ($row = $db->FetchRow($res))
{
if ($row['promote_price'] > 0)
{
$promote_price = bargain_price($row['promote_price'], $row['promote_start_date'], $row['promote_end_date']);
}
else
{
$promote_price = 0;
}
$arr[$row['goods_id']]['goods_id'] = $row['goods_id'];
$arr[$row['goods_id']]['goods_name'] = $row['goods_name'];
$arr[$row['goods_id']]['shop_price'] = price_format($row['shop_price']);
$arr[$row['goods_id']]['promote_price'] = ($promote_price > 0) ? price_format($promote_price) : '';
$arr[$row['goods_id']]['url'] = build_uri('goods', array('gid' => $row['goods_id']), $row['goods_name']);
}
$smarty->assign('goods_data', $arr);
$smarty->assign('keywords', htmlspecialchars(stripslashes($_REQUEST['keywords'])));
$smarty->assign('search_keywords', stripslashes($_REQUEST['keywords']));
/* 分页 */
$url_format = "search.php?category=$category&keywords=" . urlencode(stripslashes($_REQUEST['keywords'])) . "&brand=" . $_REQUEST['brand']."&action=".$action."&goods_type=" . $_REQUEST['goods_type'] . "&sc_ds=" . $_REQUEST['sc_ds'];
if (!empty($_REQUEST['intro']))
{
$url_format .= "&intro=" . $_REQUEST['intro'];
}
if (isset($_REQUEST['pickout']))
{
$url_format .= '&pickout=1';
}
$url_format .= "&min_price=" . $_REQUEST['min_price'] ."&max_price=" . $_REQUEST['max_price'] . "&sort=$sort";
$url_format .= "$attr_url&order=$order&page=";
$pager['search'] = array(
'keywords' => stripslashes(urlencode($_REQUEST['keywords'])),
'category' => $category,
'brand' => $_REQUEST['brand'],
'sort' => $sort,
'order' => $order,
'min_price' => $_REQUEST['min_price'],
'max_price' => $_REQUEST['max_price'],
'action' => $action,
'intro' => empty($_REQUEST['intro']) ? '' : trim($_REQUEST['intro']),
'goods_type' => $_REQUEST['goods_type'],
'sc_ds' => $_REQUEST['sc_ds'],
'outstock' => $_REQUEST['outstock']
);
$pager['search'] = array_merge($pager['search'], $attr_arg);
$pager = get_pager('search.php', $pager['search'], $count, $page, $size);
$smarty->assign('pager', $pager);
$pagebar = get_wap_pager($count, $size, $page, $url_format, 'page');
$smarty->assign('pagebar' , $pagebar);
$_LANG['sort']['goods_id'] = '按上架时间排序';
$_LANG['sort']['shop_price'] = '按价格排序';
$_LANG['sort']['last_update'] = '按更新时间排序';
$_LANG['order']['DESC'] = '倒序';
$_LANG['order']['ASC'] = '正序';
$smarty->assign('lang' , $_LANG);
assign_dynamic('search');
if (!empty($GLOBALS['_CFG']['search_keywords']))
{
$searchkeywords = explode(',', trim($GLOBALS['_CFG']['search_keywords']));
}
else
{
$searchkeywords = array();
}
$smarty->assign('searchkeywords', $searchkeywords);
$smarty->assign('footer', get_footer());
$smarty->display('search.html');
}
/*------------------------------------------------------ */
//-- PRIVATE FUNCTION
/*------------------------------------------------------ */
/**
*
*
* @access public
* @param
*
* @return void
*/
function is_not_null($value)
{
if (is_array($value))
{
return (!empty($value['from'])) || (!empty($value['to']));
}
else
{
return !empty($value);
}
}
/**
* 获得可以检索的属性
*
* @access public
* @params integer $cat_id
* @return void
*/
function get_seachable_attributes($cat_id = 0)
{
$attributes = array(
'cate' => array(),
'attr' => array()
);
/* 获得可用的商品类型 */
$sql = "SELECT t.cat_id, cat_name FROM " .$GLOBALS['ecs']->table('goods_type'). " AS t, ".
$GLOBALS['ecs']->table('attribute') ." AS a".
" WHERE t.cat_id = a.cat_id AND t.enabled = 1 AND a.attr_index > 0 ";
$cat = $GLOBALS['db']->getAll($sql);
/* 获取可以检索的属性 */
if (!empty($cat))
{
foreach ($cat AS $val)
{
$attributes['cate'][$val['cat_id']] = $val['cat_name'];
}
$where = $cat_id > 0 ? ' AND a.cat_id = ' . $cat_id : " AND a.cat_id = " . $cat[0]['cat_id'];
$sql = 'SELECT attr_id, attr_name, attr_input_type, attr_type, attr_values, attr_index, sort_order ' .
' FROM ' . $GLOBALS['ecs']->table('attribute') . ' AS a ' .
' WHERE a.attr_index > 0 ' .$where.
' ORDER BY cat_id, sort_order ASC';
$res = $GLOBALS['db']->query($sql);
while ($row = $GLOBALS['db']->FetchRow($res))
{
if ($row['attr_index'] == 1 && $row['attr_input_type'] == 1)
{
$row['attr_values'] = str_replace("\r", '', $row['attr_values']);
$options = explode("\n", $row['attr_values']);
$attr_value = array();
foreach ($options AS $opt)
{
$attr_value[$opt] = $opt;
}
$attributes['attr'][] = array(
'id' => $row['attr_id'],
'attr' => $row['attr_name'],
'options' => $attr_value,
'type' => 3
);
}
else
{
$attributes['attr'][] = array(
'id' => $row['attr_id'],
'attr' => $row['attr_name'],
'type' => $row['attr_index']
);
}
}
}
return $attributes;
}
?> | zzshop | trunk/mobile/search.php | PHP | asf20 | 22,284 |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>ECShop_mobile</title>
</head>
<body>
<p align='left'>
{if $article_data}
{$article_data.title}<br/>
--------------<br/>
{$article_data.content}<br/>
{else}
错误地址<br/>
{/if}
--------------<br/>
<a href="javascript:history.back(-1)">回上一页</a><br/>
<a href='index.php'>返回首页</a>
{$footer}
</p>
</body>
</html>
| zzshop | trunk/mobile/templates/article.html | HTML | asf20 | 618 |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>ECShop_mobile</title>
</head>
<body>
<p align='left'>
{$goods_info.goods_name}<br/>
--------------<br/>
{if $goods_info.brand_id}
商品品牌:<a href='brands.php?b_id={$goods_info.brand_id}'>{$brand_name}</a><br/>
{/if}
商品编号:{$goods_info.goods_sn}<br/>
商品分类:
{foreach from=$cat_array item=cat_data}
<a href='category.php?c_id={$cat_data.cat_id}'>{$cat_data.cat_name}</a>->
{/foreach}
{$goods_info.goods_name}<br/>
{if $goods_info.goods_number neq ""}商品库存:
{if $goods_info.goods_number eq 0}
已售完
{else}
{$goods_info.goods_number}
{/if}<br />
{/if}
市场价格:{$goods_info.market_price}<br/>
商品价格:{if $promote_price_org}{$goods_info.promote_price}{else}{$goods_info.shop_price_formated}{/if}<br/>
<!-- {foreach from=$rank_prices item=rank_price key=key} 会员等级对应的价格-->
<strong>{$rank_price.rank_name}:</strong><font class="shop" id="ECS_RANKPRICE_{$key}">{$rank_price.price}</font><br />
<!--{/foreach}-->
{if $goods_info.promote_price and $goods_info.gmt_end_time}促销价格:{$goods_info.promote_price}{/if}<br/>
{foreach from=$specification item=spec key=spec_key}
{$spec.name}:<br />
{if $spec.attr_type eq 1}
{foreach from=$spec.values item=value key=key}
<input type="radio" name="spec_{$spec_key}" value="{$value.id}" id="spec_value_{$value.id}" {if $key eq 0}checked{/if}/>
{$value.label} [{if $value.price gt 0}{$lang.plus}{elseif $value.price lt 0}{$lang.minus}{/if} {$value.format_price|abs}]<br />
{/foreach}
<input type="hidden" name="spec_list" value="{$key}" />
{else}
{foreach from=$spec.values item=value key=key}
<input type="checkbox" name="spec_{$spec_key}" value="{$value.id}" id="spec_value_{$value.id}"/>
{$value.label} [{if $value.price gt 0}{$lang.plus}{elseif $value.price lt 0}{$lang.minus}{/if} {$value.format_price|abs}]<br />
{/foreach}
<input type="hidden" name="spec_list" value="{$key}" />
{/if}
{/foreach}
浏览次数:{$goods_info.click_count}<br/>
商品说明:{$goods_info.goods_brief}<br/><br/>
<a href='buy.php?id={$goods_id}'>购买此商品</a><br/>
<a href='goods.php?act=view_img&id={$goods_id}'>点击查看商品图片</a><br/>
<a href='comment.php?g_id={$goods_id}'>商品评论({$comment.pager.record_count})</a><br/>
--------------<br/>
<a href="javascript:history.back(-1)">回上一页</a><br/>
<a href='index.php'>返回首页</a>
{$footer}
</p>
</body>
</html> | zzshop | trunk/mobile/templates/goods.html | HTML | asf20 | 2,761 |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>ECShop_mobile</title>
{insert_scripts files="../../js/utils.js,../js/transport.js"}
{insert_scripts files="../../js/region.js"}
<script type="text/javascript">
region.isAdmin=true;
</script>
</head>
<body>
<p align='left'>
{if $user_name}
[<a href='user.php?act=user_center'>用户中心</a>] [<a href='user.php?act=logout'>退出</a>]<br/>
{else}
[<a href='user.php?act=login'>登录</a>] [<a href='user.php?act=register'>免费注册</a>]<br/>
{/if}
{if $buy_type eq 1}
收货人信息<br />
---------------------<br />
配送区域:
<form action="order.php?act=order_lise" method="post" name="theForm" id="theForm">
<select name="country" id="selCountries" onchange="region.changed(this, 1, 'selProvinces')">
<option value="0">请选择国家</option>
<!-- {foreach from=$country_list item=country} -->
<option value="{$country.region_id}">{$country.region_name}</option>
<!-- {/foreach} -->
</select><br />
<select name="province" id="selProvinces" onchange="region.changed(this, 2, 'selCities')">
<option value="0">请选择省</option>
<!-- {foreach from=$province_list item=province} -->
<option value="{$province.region_id}">{$province.region_name}</option>
<!-- {/foreach} -->
</select><br />
<select name="city" id="selCities" onchange="region.changed(this, 3, 'selDistricts')">
<option value="0">请选择市</option>
<!-- {foreach from=$city_list item=city} -->
<option value="{$city.region_id}" >{$city.region_name}</option>
<!-- {/foreach} -->
</select><br />
<select name="district" id="selDistricts">
<option value="0">请选择区</option>
<!-- {foreach from=$district_lis item=district} -->
<option value="{$district.region_id}">{$district.region_name}</option>
<!-- {/foreach} -->
</select>
(必填)<br />
收货人姓名:<input name="consignee" type="text" class="inputBg" id="consignee" value="{$consignee.consignee|escape}" />
(必填)<br />
电子邮件地址:<input name="email" type="text" class="inputBg" id="email" value="{$consignee.email|escape}" />
(必填 <br />
详细地址:<input name="address" type="text" class="inputBg" id="address" value="{$consignee.address|escape}" />
(必填) <br />
邮政编码:<input name="zipcode" type="text" class="inputBg" id="zipcode" value="{$consignee.zipcode|escape}" /> <br />
电话:<input name="tel" type="text" class="inputBg" id="tel" value="{$consignee.tel|escape}" />
(必填) <br />
手机:<input name="mobile" type="text" class="inputBg" id="mobile" value="{$consignee.mobile|escape}" /> <br />标志建筑:<input name="sign_building" type="text" class="inputBg" id="sign_building" value="{$consignee.sign_building|escape}" /> <br />
最佳送货时间:<input name="best_time" type="text" class="inputBg" id="best_time" value="{$consignee.best_time|escape}" /> <br />
<input type="submit" name="Submit" class="bnt_blue_2" value="配送这个地址" />
<input name="address_id" type="hidden" value="{$consignee.address_id}" />
</form>
{else}
您还没有登陆,可以选择<br />
<a href='user.php?act=login'>会员登陆</a><br />
或者<a href='user.php?act=register'>注册用户</a><br />
或者<a href='buy.php?act=consignee'>不登陆直接购买</a>
{/if}
<br />
<a href="javascript:history.back(-1)">回上一页</a><br/>
<a href='index.php'>返回首页</a>
{$footer}
</p>
</body>
</html>
<script type="text/javascript">
var process_request = "正在处理您的请求...";
</script> | zzshop | trunk/mobile/templates/buy.html | HTML | asf20 | 3,980 |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>ECShop_mobile</title>
{insert_scripts files="../../js/utils.js,../js/transport.js"}
{insert_scripts files="../../js/region.js"}
<script type="text/javascript">
region.isAdmin=true;
</script>
</head>
<body>
<p align='left'>
{if $user_name}
[<a href='user.php?act=user_center'>用户中心</a>] [<a href='user.php?act=logout'>退出</a>]<br/>
{else}
[<a href='user.php?act=login'>登录</a>] [<a href='user.php?act=register'>免费注册</a>]<br/>
{/if}
<br />
<font color="#FF0000">{$tips}</font>
<br />
<br />
<a href='index.php'>返回首页</a>
{$footer}
</p>
</body>
</html>
| zzshop | trunk/mobile/templates/order_done.html | HTML | asf20 | 887 |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>ECShop_mobile</title>
</head>
<body>
<p align='left'>
站内新闻<br/>
--------------<br/>
{foreach from=$article_array item=article_data}
{$article_data.i}.<a href='article.php?act=detail&a_id={$article_data.id}'>{$article_data.title}</a><br/>
发表时间:{$article_data.add_time}<br/>
{/foreach}
{if $pagebar}
{$pagebar}<br/>
{/if}
--------------<br/>
<a href="javascript:history.back(-1)">回上一页</a><br/>
<a href='index.php'>返回首页</a>
{$footer}
</p>
</body>
</html>
| zzshop | trunk/mobile/templates/article_list.html | HTML | asf20 | 776 |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>ECShop_mobile</title>
</head>
<body>
<p align='left'>
我的订单<br/>
--------------<br/>
{foreach from=$orders item=order_data}
{$order_data.order_id}.订单号:{$order_data.order_sn}<br/>
下单时间:{$order_data.order_time},价格:{$order_data.total_fee}
订单状态:{$order_data.order_status},操作:{$order_data.handler}<br/>
--------------<br/>
{foreachelse}
暂时您没有订单<br/>
--------------<br/>
{/foreach}
{if $pagebar}
{$pagebar}<br/>
{/if}
<a href="javascript:history.back(-1)">回上一页</a><br/>
<a href='index.php'>返回首页</a>
{$footer}
</p>
</body>
</html> | zzshop | trunk/mobile/templates/order_list.html | HTML | asf20 | 902 |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>ECShop_mobile</title>
</head>
<body>
<p align='left'>
{if $all_cat}
分类列表<br/>
--------------<br/>
{foreach from=$cat_array item=cat_data}
<a href='category.php?c_id={$cat_data.id}'>{$cat_data.name}</a><br/>
{foreach from=$cat_data['cat_id'] item=ccat_data}
><a href='category.php?c_id={$ccat_data.id}'>{$ccat_data.name}</a><br/>
{/foreach}
{/foreach}
{else}
{$cat_name}的商品列表<br/>
--------------<br/>
{if $smarty.get.order_price}
当前为价格降序排列,<a href='category.php?c_id={$smarty.get.c_id}{if $smarty.get.page}&page={$smarty.get.page}{/if}'>转换成价格升序排列</a>
{else}
当前为价格升序排列,<a href='category.php?c_id={$smarty.get.c_id}&order_price=1{if $smarty.get.page}&page={$smarty.get.page}{/if}'>转换成价格降序排列</a>
{/if}<br/><br/>
{if $cat_children}
下级分类<br/>
{foreach from=$cat_children item=child_data}
<a href='category.php?c_id={$child_data.id}'>{$child_data.name}</a><br/>
{/foreach}
--------------<br/>
{/if}
{foreach from=$goods_data item=goods}
{$goods.i}.<a href='goods.php?id={$goods.id}'>{$goods.name}</a>[{$goods.price}]<br/>
{foreachelse}
暂无此类商品<br/>
{/foreach}<br/>
{if $pagebar}
{$pagebar}<br/>
{/if}
{/if}
--------------<br/>
<a href="javascript:history.back(-1)">回上一页</a><br/>
{if $pcat_array}
<a href='category.php?c_id={$pcat_array.cat_id}'>回{$pcat_array.cat_name}</a><br/>
{/if}
{if $c_id}
<a href='category.php'>回所有分类</a><br/>
{/if}
<a href='index.php'>返回首页</a>
{$footer}
</p>
</body>
</html> | zzshop | trunk/mobile/templates/category.html | HTML | asf20 | 1,877 |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>ECShop_mobile</title>
</head>
<body>
<p align='left'>
用户注册
<form action="user.php?act=act_register" method="post" name="formUser">
<table>
<tr>
<td align="right">用户名</td>
<td >
<input name="username" type="text" id="username" />
<span id="username_notice" style="color:#FF0000"> *</span>
</td>
</tr>
<tr>
<td align="right">email</td>
<td>
<input name="email" type="text" id="email" />
<span id="email_notice" style="color:#FF0000"> *</span>
</td>
</tr>
<tr>
<td align="right">密码</td>
<td>
<input name="password" type="password" id="password1" />
<span style="color:#FF0000" id="password_notice"> *</span>
</td>
</tr>
<tr>
<td align="right">确认密码</td>
<td>
<input name="confirm_password" type="password" id="conform_password" />
<span style="color:#FF0000" id="conform_password_notice"> *</span>
</td>
</tr>
<!-- {foreach from=$extend_info_list item=field} -->
<!-- {if $field.id eq 6} -->
<tr>
<td align="right">密码提示问题</td>
<td>
<select name='sel_question'>
<option value='0'>请选择密码提示问题</option>
{html_options options=$passwd_questions}
</select>
</td>
</tr>
<tr>
<td align="right" <!-- {if $field.is_need} -->id="passwd_quesetion"<!--{/if}-->>密码问题答案</td>
<td>
<input name="passwd_answer" type="text" class="inputBg" maxlengt='20'/><!-- {if $field.is_need} --><span style="color:#FF0000"> *</span><!-- {/if} -->
</td>
</tr>
<!-- {else} -->
<tr>
<td align="right" <!-- {if $field.is_need} -->id="extend_field{$field.id}i"<!--{/if}-->>{$field.reg_field_name}
<td>
<input name="extend_field{$field.id}" type="text" class="inputBg" /><!-- {if $field.is_need} --><span style="color:#FF0000"> *</span><!-- {/if} -->
</td>
</tr>
<!-- {/if} -->
<!-- {/foreach} -->
<tr>
<td colspan="2"align="left">
<span style="color:#FF0000"> 用电脑登陆时,请完善个人信息!</span><br />
<input name="act" type="hidden" value="act_register" >
<input type="hidden" name="back_act" value="{$back_act}" />
<input name="Submit" type="submit" value="立即注册">
</td>
</tr>
</table>
</form>
<a href='index.php'>返回首页</a><br />
{$footer}
</p>
</body>
</html> | zzshop | trunk/mobile/templates/user_passport.html | HTML | asf20 | 3,004 |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>ECShop_mobile</title>
{insert_scripts files="../../js/utils.js,../js/transport.js"}
{insert_scripts files="../../js/region.js"}
<script type="text/javascript">
region.isAdmin=true;
</script>
</head>
<body>
<p align='left'>
{if $user_name}
[<a href='user.php?act=user_center'>用户中心</a>] [<a href='user.php?act=logout'>退出</a>]<br/>
{else}
[<a href='user.php?act=login'>登录</a>] [<a href='user.php?act=register'>免费注册</a>]<br/>
{/if}
----------------------------------<br />
<form action="order.php?act=done" method="post" name="theForm" id="theForm" >
<!--订单信息-->
商品列表
<table width="150" border="0" cellpadding="5" cellspacing="1" bgcolor="#dddddd" style="font-size:12px">
<tr>
<th bgcolor="#ffffff">商品名称</th>
<th bgcolor="#ffffff">商品属性</th>
<th bgcolor="#ffffff">本店价</th>
<th bgcolor="#ffffff">购买数量</th>
<th bgcolor="#ffffff">小计</th>
</tr>
<!-- {foreach from=$goods_list item=goods} -->
<tr>
<td bgcolor="#ffffff">
<!-- {if $goods.goods_id gt 0 && $goods.extension_code eq 'package_buy'} -->
<a href="javascript:void(0)" onclick="setSuitShow({$goods.goods_id})" class="f6">{$goods.goods_name}<span style="color:#FF0000;">({$lang.remark_package})</span></a>
<div id="suit_{$goods.goods_id}" style="display:none">
<!-- {foreach from=$goods.package_goods_list item=package_goods_list} -->
<a href="goods.php?id={$package_goods_list.goods_id}" target="_blank" class="f6">{$package_goods_list.goods_name}</a><br />
<!-- {/foreach} -->
</div>
<!-- { else } -->
<a href="goods.php?id={$goods.goods_id}" target="_blank" class="f6">{$goods.goods_name}</a>
<!-- {if $goods.parent_id > 0} -->
<span style="color:#FF0000">(相关配件)</span>
<!-- {elseif $goods.is_gift} -->
<span style="color:#FF0000">(赠品)</span>
<!-- {/if} -->
<!-- {/if} -->
<!-- {if $goods.is_shipping} -->(<span style="color:#FF0000">免运费商品</span>)<!-- {/if} -->
</td>
<td bgcolor="#ffffff">{$goods.goods_attr|nl2br}</td>
<!-- {if $show_marketprice} -->
<td align="right" bgcolor="#ffffff">{$goods.formated_market_price}</td>
<!-- {/if} -->
<td bgcolor="#ffffff" align="right">{$goods.formated_goods_price}</td>
<td bgcolor="#ffffff" align="right">{$goods.goods_number}</td>
<td bgcolor="#ffffff" align="right">{$goods.formated_subtotal}</td>
</tr>
<!-- {/foreach} -->
<tr>
<td bgcolor="#ffffff" colspan="7">
<!-- {if $discount gt 0} -->{$your_discount}<br /><!-- {/if} -->
{$shopping_money}<!-- {if $show_marketprice} -->,{$market_price_desc}<!--{/if}-->
</td>
</tr>
</table>
----------------------------------<br />
<!--配送信息-->
收货人信息
<table width="150" border="0" cellpadding="5" cellspacing="1" bgcolor="#dddddd" style="font-size:12px">
<tr>
<td bgcolor="#ffffff">收货人姓名:</td>
<td bgcolor="#ffffff">{$consignee.consignee|escape}</td>
<td bgcolor="#ffffff">电子邮件地址:</td>
<td bgcolor="#ffffff">{$consignee.email|escape}</td>
</tr>
<!-- {if $total.real_goods_count gt 0} -->
<tr>
<td bgcolor="#ffffff">详细地址:</td>
<td bgcolor="#ffffff">{$consignee.address|escape} </td>
<td bgcolor="#ffffff">邮政编码:</td>
<td bgcolor="#ffffff">{$consignee.zipcode|escape}</td>
</tr>
<!-- {/if} -->
<tr>
<td bgcolor="#ffffff">电话:</td>
<td bgcolor="#ffffff">{$consignee.tel} </td>
<td bgcolor="#ffffff">手机:</td>
<td bgcolor="#ffffff">{$consignee.mobile|escape}</td>
</tr>
<!-- {if $total.real_goods_count gt 0} -->
<tr>
<td bgcolor="#ffffff">标志建筑:</td>
<td bgcolor="#ffffff">{$consignee.sign_building|escape} </td>
<td bgcolor="#ffffff">最佳送货时间:</td>
<td bgcolor="#ffffff">{$consignee.best_time|escape}</td>
</tr>
<!-- {/if} -->
</table>
----------------------------------<br />
<!--配送方式-->
配送方式
<table width="150" border="0" cellpadding="5" cellspacing="1" bgcolor="#dddddd" style="font-size:12px">
<tr>
<th bgcolor="#ffffff" width="5%"> </th>
<th bgcolor="#ffffff" width="25%">名称</th>
<th bgcolor="#ffffff">描述</th>
<th bgcolor="#ffffff" width="15%">费用</th>
<th bgcolor="#ffffff" width="15%">免费额度</th>
</tr>
<!-- {foreach from=$shipping_list item=shipping} 循环配送方式 -->
<tr>
<td bgcolor="#ffffff" valign="top"><input name="shipping" type="radio" value="{$shipping.shipping_id}" {if $order.shipping_id eq $shipping.shipping_id}checked="true"{/if} supportCod="{$shipping.support_cod}" insure="{$shipping.insure}" onclick="selectShipping(this)" />
</td>
<td bgcolor="#ffffff" valign="top"><strong>{$shipping.shipping_name}</strong></td>
<td bgcolor="#ffffff" valign="top">{$shipping.shipping_desc}</td>
<td bgcolor="#ffffff" align="right" valign="top">{$shipping.format_shipping_fee}</td>
<td bgcolor="#ffffff" align="right" valign="top">{$shipping.free_money}</td>
</tr>
<!-- {/foreach} 循环配送方式 -->
</table>
----------------------------------<br />
<!--支付方式-->
支付方式
<table width="150" border="0" cellpadding="5" cellspacing="1" bgcolor="#dddddd" style="font-size:12px">
<tr>
<th width="5%" bgcolor="#ffffff"> </th>
<th width="20%" bgcolor="#ffffff">{$lang.name}</th>
<th bgcolor="#ffffff">{$lang.describe}</th>
<th bgcolor="#ffffff" width="15%">{$lang.pay_fee}</th>
</tr>
<!-- {foreach from=$payment_list item=payment} -->
<!-- 循环支付方式 -->
<tr>
<td valign="top" bgcolor="#ffffff"><input type="radio" name="payment" value="{$payment.pay_id}" {if $order.pay_id eq $payment.pay_id}checked{/if} isCod="{$payment.is_cod}" onclick="selectPayment(this)" {if $cod_disabled and $payment.is_cod eq "1"}disabled="true"{/if}/></td>
<td valign="top" bgcolor="#ffffff"><strong>{$payment.pay_name}</strong></td>
<td valign="top" bgcolor="#ffffff">{$payment.pay_desc}</td>
<td align="right" bgcolor="#ffffff" valign="top">{$payment.format_pay_fee}</td>
</tr>
<!-- {/foreach} 循环支付方式 -->
</table>
<input type="submit" name="Submit" value="提交订单" />
</form>
<br />
<a href="javascript:history.back(-1)">回上一页</a><br/>
<a href='index.php'>返回首页</a>
{$footer}
</p>
</body>
</html>
| zzshop | trunk/mobile/templates/order.html | HTML | asf20 | 7,870 |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>ECShop_mobile</title>
</head>
<body>
<p align='left'>
{if $brand_id}
品牌专区-{$brands_array.brand.name}<br/>
--------------<br/>
{if $smarty.get.order_price}
当前为价格降序排列,<a href='brands.php?b_id={$smarty.get.b_id}{if $smarty.get.page}&page={$smarty.get.page}{/if}'>转换成价格升序排列</a>
{else}
当前为价格升序排列,<a href='brands.php?b_id={$smarty.get.b_id}&order_price=1{if $smarty.get.page}&page={$smarty.get.page}{/if}'>转换成价格降序排列</a>
{/if}<br/><br/>
{foreach from=$goods_data item=goods}
{$goods.i}.<a href='goods.php?id={$goods.id}'>{$goods.name}</a>[{$goods.price}]<br/>
{foreachelse}
暂无此类商品<br/>
{/foreach}<br/>
{if $pagebar}
{$pagebar}<br/>
{/if}
--------------<br/>
{/if}
{if $other_brands}
{if $brand_id}其它品牌<br/>
{else}
所有品牌<br />
{/if}
--------------<br/>
{foreach from=$other_brands item=other_data}
{if $other_data.brand_id neq $brand_id}
<a href='brands.php?b_id={$other_data.brand_id}'>{$other_data.brand_name}</a><br/>
{/if}
{/foreach}
--------------<br/>
{/if}
<a href="javascript:history.back(-1)">回上一页</a><br/>
<a href='index.php'>返回首页</a>
{$footer}
</p>
</body>
</html>
| zzshop | trunk/mobile/templates/brands.html | HTML | asf20 | 1,522 |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>ECShop_mobile</title>
</head>
<body>
<p align='left'>
{$goods_info.goods_name}<br/>
--------------<br/>
<img src='./../{$goods_info.goods_img}' alt='{$goods_info.goods_name}' /><br/>
--------------<br/>
<a href="javascript:history.back(-1)">回上一页</a><br/>
<a href='index.php'>返回首页</a>
{$footer}
</p>
</body>
</html>
| zzshop | trunk/mobile/templates/goods_img.html | HTML | asf20 | 601 |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>ECShop_mobile</title>
</head>
<body>
<p align='left'>
用户中心<br/>
--------------<br/>
<a href='user.php?act=order_list'>我的订单</a><br/>
--------------<br/>
商城推荐产品<br/>
{foreach from=$best_goods item=best_data}
<a href='goods.php?id={$best_data.id}'>{$best_data.name}</a>[{$best_data.shop_price}]<br/>
{/foreach}
--------------<br/>
<a href='index.php'>返回首页</a>
{$footer}
</p>
</body>
</html>
| zzshop | trunk/mobile/templates/user.html | HTML | asf20 | 702 |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>ECShop_mobile</title>
</head>
<body>
<p align='left'>
用户登录<br/>
--------------<br/>
{if $login_faild eq 1}
用户名或密码错误,请重新输入<br/>
{/if}
<form action="user.php?act=do_login" method="post">
用户名:<input type='text' name='username'/><br/>
密码:<input type='password' name='pwd'/><br/>
<input name="登录" type="submit" value="登录" />
</form>
<br/>
<a href='index.php'>返回首页</a>
{$footer}
</p>
</body>
</html> | zzshop | trunk/mobile/templates/login.html | HTML | asf20 | 730 |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>ECShop_mobile</title>
</head>
<body>
<p align='left'>
{if $type eq 'best'}
精品推荐<br/>
--------------<br/>
<a href='goods_list.php?type=promote'>促销</a>|<a href='goods_list.php?type=hot'>热门</a>|<a href='goods_list.php?type=new'>最新</a>
{elseif $type eq 'promote'}
商家促销<br/>
--------------<br/>
<a href='goods_list.php?type=best'>精品</a>|<a href='goods_list.php?type=hot'>热门</a>|<a href='goods_list.php?type=new'>最新</a>
{elseif $type eq 'hot'}
热门商品<br/>
--------------<br/>
<a href='goods_list.php?type=best'>精品</a>|<a href='goods_list.php?type=promote'>促销</a>|<a href='goods_list.php?type=new'>最新</a>
{else}
最新商品<br/>
--------------<br/>
<a href='goods_list.php?type=promote'>促销</a>|<a href='goods_list.php?type=hot'>热门</a>|<a href='goods_list.php?type=new'>最新</a>
{/if}
<br/><br/>
{if $smarty.get.order_price}
当前为价格降序排列,<a href='goods_list.php?type={$smarty.get.type}{if $smarty.get.page}&page={$smarty.get.page}{/if}'>转换成价格升序排列</a>
{else}
当前为价格升序排列,<a href='goods_list.php?type={$smarty.get.type}&order_price=1{if $smarty.get.page}&page={$smarty.get.page}{/if}'>转换成价格降序排列</a>
{/if}<br/><br/>
{foreach from=$goods_data item=goods}
{$goods.i}.<a href='goods.php?id={$goods.id}'>{$goods.name}</a>[{$goods.price}]<br/>
{foreachelse}
暂无此类商品<br/>
{/foreach}<br/>
{if $pagebar}
{$pagebar}<br/>
{/if}
--------------<br/>
<a href="javascript:history.back(-1)">回上一页</a><br/>
{if $type eq 'best'}
<a href='goods_list.php?type=promote'>促销</a>|<a href='goods_list.php?type=hot'>热门</a>|<a href='goods_list.php?type=new'>最新</a>
{elseif $type eq 'promote'}
<a href='goods_list.php?type=best'>精品</a>|<a href='goods_list.php?type=hot'>热门</a>|<a href='goods_list.php?type=new'>最新</a>
{elseif $type eq 'hot'}
<a href='goods_list.php?type=best'>精品</a>|<a href='goods_list.php?type=promote'>促销</a>|<a href='goods_list.php?type=new'>最新</a>
{else}
<a href='goods_list.php?type=promote'>促销</a>|<a href='goods_list.php?type=hot'>热门</a>|<a href='goods_list.php?type=new'>最新</a>
{/if}
<br/><a href='index.php'>返回首页</a>
{$footer}
</p>
</body>
</html> | zzshop | trunk/mobile/templates/goods_list.html | HTML | asf20 | 2,566 |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>ECShop_mobile</title>
</head>
<body>
<p align='left'>
{$goods_info.goods_name}<br/>
--------------<br/>
{foreach from=$comment_data item=comment}
评论:{$comment.i}.{$comment.content}<br/>
发布人:{$comment.username} {$comment.add_time}<br/>
{if $comment.re_username}
=关于此评论的回复=<br/>
{$comment.re_content}<br/>
回复人:{$comment.re_username} {$comment.re_add_time}<br/>
{/if}
{foreachelse}
暂无此商品评论<br/>
{/foreach}
{if $pagebar}
{$pagebar}<br/>
{/if}
--------------<br/>
<a href="javascript:history.back(-1)">回上一页</a><br/>
<a href='goods.php?id={$goods_id}'>回商品详细</a><br/>
<a href='index.php'>返回首页</a>
{$footer}
</p>
</body>
</html> | zzshop | trunk/mobile/templates/comment.html | HTML | asf20 | 1,041 |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>ECShop_mobile</title>
</head>
<body>
<p align='left'>
{if $user_name}
[<a href='user.php?act=user_center'>用户中心</a>] [<a href='user.php?act=logout'>退出</a>]<br/>
{else}
[<a href='user.php?act=login'>登录</a>] [<a href='user.php?act=register'>免费注册</a>]<br/>
{/if}
<img src='{$wap_logo|default:../images/wap_logo.png}' alt='LOGO' /><br/>
>>商品分类>><br/>
{foreach from=$pcat_array item=pcat_data}
<a href='category.php?c_id={$pcat_data.id}'>{$pcat_data.name}</a><br/>
{foreach from=$pcat_data['cat_id'] item=cat_data}
><a href='category.php?c_id={$cat_data.id}'>{$cat_data.name}</a><br/>
{/foreach}
{/foreach}
<br />
<a href="javascript:history.back(-1)">回上一页</a><br/>
<br />
<a href='index.php'>返回首页</a>
{$footer}
</body>
</html> | zzshop | trunk/mobile/templates/cat_all.html | HTML | asf20 | 1,089 |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>ECShop_mobile</title>
</head>
<body>
<p align='left'>
{if $user_name}
[<a href='user.php?act=user_center'>用户中心</a>] [<a href='user.php?act=logout'>退出</a>]<br/>
{else}
[<a href='user.php?act=login'>登录</a>] [<a href='user.php?act=register'>免费注册</a>]<br/>
{/if}
<img src='{$wap_logo|default:../images/wap_logo.png}' alt='LOGO' /><br/>
<form name="searchForm" method="get" action="search.php">
<input name="keywords" type="text" />
<input type="submit" value="商品搜索"/>
</form>
{if $searchkeywords}
热门搜索 :
{foreach from=$searchkeywords item=val}
<a href="search.php?keywords={$val|escape:url}">{$val}</a>
{/foreach}
{/if}
<br/>--------------<br/>
{if $best_num > 0}
[精品推荐]>><a href='goods_list.php?type=best'>更多</a><br/>
{foreach from=$best_goods item=best_data}
<a href='goods.php?id={$best_data.id}'>{$best_data.name}</a>[{$best_data.shop_price}]<br/>
{/foreach}
{/if}
<br/>--------------<br/>
{if $promote_num > 0}
[促销商品]>><a href='goods_list.php?type=promote'>更多</a><br/>
{foreach from=$promote_goods item=promote_data}
<a href='goods.php?id={$promote_data.id}'>{$promote_data.name}</a>[{$promote_data.shop_price}]<br/>
{/foreach}
{/if}
<br/>--------------<br/>
{if $hot_num > 0}
[热门商品]>><a href='goods_list.php?type=hot'>更多</a><br/>
{foreach from=$hot_goods item=hot_data}
<a href='goods.php?id={$hot_data.id}'>{$hot_data.name}</a>[{$hot_data.shop_price}]<br/>
{/foreach}
{/if}
<br/>--------------<br/>
>>商品分类>><a href='cat_all.php'>更多</a><br/><br/>
{foreach from=$pcat_array item=pcat_data}
<a href='category.php?c_id={$pcat_data.id}'>{$pcat_data.name}</a>|
{foreach from=$pcat_data['cat_id'] item=cat_data name=foo}
{if $smarty.foreach.foo.iteration <= 3}
<a href='category.php?c_id={$cat_data.id}'>{$cat_data.name}</a>
{/if}
{/foreach}
<a href='cat_all.php'>...更多</a><br/>
{/foreach}
<br/>--------------<br/>
{if $brand_array}
品牌专区>><a href='brands.php'>更多</a><br/>
{foreach from=$brand_array item=brand_data}
<a href='brands.php?b_id={$brand_data.brand_id}'>{$brand_data.brand_name}</a><br/>
{/foreach}
{/if}
<br/>--------------<br/>
[站内资讯]>><a href='article.php'>更多</a><br/>
{if $article_array}
{foreach from=$article_array item=article_data}
<a href='article.php?act=detail&a_id={$article_data.article_id}'>{$article_data.title}</a><br/>
{/foreach}
{/if}
{$footer}
</p>
</body>
</html> | zzshop | trunk/mobile/templates/index.html | HTML | asf20 | 2,873 |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>ECShop_mobile</title>
</head>
<body>
<form name="searchForm" method="get" action="search.php">
<input name="keywords" type="text" />
<input type="submit" value="商品搜索"/>
</form>
{if $searchkeywords}
热门搜索 :
{foreach from=$searchkeywords item=val}
<a href="search.php?keywords={$val|escape:url}">{$val}</a>
{/foreach}
{/if}
<br/>--------------<br/>
当前搜索关键词:{$keywords}<br/><br/>
{if $goods_data}
<form action="search.php" method="post" name="listform">
<select name="sort">
{html_options options=$lang.sort selected=$pager.search.sort}
</select>
<select name="order">
{html_options options=$lang.order selected=$pager.search.order}
</select>
<input type="submit" value="进行排序" />
<input type="hidden" name="page" value="{$pager.page}" />
{foreach from=$pager.search key=key item=item}
{if $key neq "sort" and $key neq "order"}
{if $key eq 'keywords'}
<input type="hidden" name="{$key}" value="{$item|escape:decode_url}" />
{else}
<input type="hidden" name="{$key}" value="{$item}" />
{/if}
{/if}
{/foreach}
</form>
{/if}
{foreach from=$goods_data item=goods name=goods_list}
{$smarty.foreach.goods_list.iteration}.<a href='goods.php?id={$goods.goods_id}'>{$goods.goods_name}</a>[{$goods.shop_price}]<br/>
{foreachelse}
暂无此类商品<br/>
{/foreach}<br/><br/>
{if $pagebar}
{$pagebar}<br/>
{/if}
<br/>--------------<br/>
<a href="javascript:history.back(-1)">回上一页</a><br/>
<br/><a href='index.php'>返回首页</a>
{$footer}
</body>
</html>
| zzshop | trunk/mobile/templates/search.html | HTML | asf20 | 1,892 |
<?php
/**
* ECSHOP 商品分类页
* ============================================================================
* 版权所有 2005-2010 上海商派网络科技有限公司,并保留所有权利。
* 网站地址: http://www.ecshop.com;
* ----------------------------------------------------------------------------
* 这不是一个自由软件!您只能在不用于商业目的的前提下对程序代码进行修改和
* 使用;不允许对程序代码以任何形式任何目的的再发布。
* ============================================================================
* $Author: testyang $
* $Id: category.php 15013 2008-10-23 09:31:42Z testyang $
*/
define('IN_ECS', true);
require(dirname(__FILE__) . '/includes/init.php');
$c_id = !empty($_GET['c_id']) ? intval($_GET['c_id']) : 0;
if ($c_id <= 0)
{
$pcat_array = get_categories_tree();
foreach ($pcat_array as $key => $pcat_data)
{
$pcat_array[$key]['name'] = encode_output($pcat_data['name']);
if ($pcat_data['cat_id'])
{
foreach ($pcat_data['cat_id'] as $k => $v)
{
$pcat_array[$key]['cat_id'][$k]['name'] = encode_output($v['name']);
}
}
}
$smarty->assign('cat_array' , $pcat_array);
$smarty->assign('all_cat' , 1);
}
else
{
$cat_array = get_categories_tree($c_id);
$smarty->assign('c_id', $c_id);
$cat_name = $db->getOne('SELECT cat_name FROM ' . $ecs->table('category') . ' WHERE cat_id=' . $c_id);
$smarty->assign('cat_name', encode_output($cat_name));
if (!empty($cat_array[$c_id]['cat_id']))
{
foreach ($cat_array[$c_id]['cat_id'] as $key => $child_data)
{
$cat_array[$c_id]['cat_id'][$key]['name'] = encode_output($child_data['name']);
}
$smarty->assign('cat_children', $cat_array[$c_id]['cat_id']);
}
if (empty($_GET['order_price']))
{
$order_rule = 'ORDER BY g.shop_price ASC, g.sort_order';
}
else
{
$order_rule = 'ORDER BY g.shop_price DESC, g.sort_order';
}
$cat_goods = assign_cat_goods($c_id, 0, 'wap', $order_rule);
$num = count($cat_goods['goods']);
if ($num > 0)
{
$page_num = '10';
$page = !empty($_GET['page']) ? intval($_GET['page']) : 1;
$pages = ceil($num / $page_num);
if ($page <= 0)
{
$page = 1;
}
if ($pages == 0)
{
$pages = 1;
}
if ($page > $pages)
{
$page = $pages;
}
$i = 1;
foreach ($cat_goods['goods'] as $goods_data)
{
if (($i > ($page_num * ($page - 1 ))) && ($i <= ($page_num * $page)))
{
$price = empty($goods_info['promote_price_org']) ? $goods_data['shop_price'] : $goods_data['promote_price'];
//$wml_data .= "<a href='goods.php?id={$goods_data['id']}'>".encode_output($goods_data['name'])."</a>[".encode_output($price)."]<br/>";
$data[] = array('i' => $i , 'price' => encode_output($price) , 'id' => $goods_data['id'] , 'name' => encode_output($goods_data['name']));
}
$i++;
}
$smarty->assign('goods_data', $data);
$pagebar = get_wap_pager($num, $page_num, $page, 'category.php?c_id='.$c_id.'&order_price='.(empty($order_price)?0:$order_price), 'page');
$smarty->assign('pagebar', $pagebar);
}
$pcat_array = get_parent_cats($c_id);
if (!empty($pcat_array[1]['cat_name']))
{
$pcat_array[1]['cat_name'] = encode_output($pcat_array[1]['cat_name']);
$smarty->assign('pcat_array', $pcat_array[1]);
}
$smarty->assign('cat_array', $cat_array);
}
$smarty->assign('footer', get_footer());
$smarty->display('category.html');
?> | zzshop | trunk/mobile/category.php | PHP | asf20 | 3,921 |
<?php
/**
* ECSHOP 分类聚合页
* ============================================================================
* 版权所有 2005-2010 上海商派网络科技有限公司,并保留所有权利。
* 网站地址: http://www.ecshop.com;
* ----------------------------------------------------------------------------
* 这不是一个自由软件!您只能在不用于商业目的的前提下对程序代码进行修改和
* 使用;不允许对程序代码以任何形式任何目的的再发布。
* ============================================================================
* $Author: liuhui $
* $Id: index.php 15013 2010-03-25 09:31:42Z liuhui $
*/
define('IN_ECS', true);
define('ECS_ADMIN', true);
require(dirname(__FILE__) . '/includes/init.php');
$pcat_array = get_categories_tree();
foreach ($pcat_array as $key => $pcat_data)
{
$pcat_array[$key]['name'] = encode_output($pcat_data['name']);
if ($pcat_data['cat_id'])
{
foreach ($pcat_data['cat_id'] as $k => $v)
{
$pcat_array[$key]['cat_id'][$k]['name'] = encode_output($v['name']);
}
}
}
$smarty->assign('pcat_array' , $pcat_array);
$smarty->assign('wap_logo', $_CFG['wap_logo']);
$smarty->assign('footer', get_footer());
$smarty->display("cat_all.html");
?>
| zzshop | trunk/mobile/cat_all.php | PHP | asf20 | 1,342 |
<?php
/**
* ECSHOP 商品页
* ============================================================================
* 版权所有 2005-2010 上海商派网络科技有限公司,并保留所有权利。
* 网站地址: http://www.ecshop.com;
* ----------------------------------------------------------------------------
* 这不是一个自由软件!您只能在不用于商业目的的前提下对程序代码进行修改和
* 使用;不允许对程序代码以任何形式任何目的的再发布。
* ============================================================================
* $Author: liuhui $
* $Id: order.php 15013 2008-10-23 09:31:42Z liuhui $
*/
define('IN_ECS', true);
require(dirname(__FILE__) . '/includes/init.php');
require(ROOT_PATH . 'includes/lib_order.php');
$flow_type = 0;
$_LANG['gram'] = '克';
$_LANG['kilogram'] = '千克';
$tips = '订单已经生成,如果您已经登陆,可以在用户中心查看订单详情!';
if ($_SESSION['user_id'] > 0)
{
$smarty->assign('user_name', $_SESSION['user_name']);
}
if($_REQUEST['act'] == 'order_lise')
{
/*
* 保存收货人信息
*/
$consignee = array(
'address_id' => empty($_POST['address_id']) ? 0 : intval($_POST['address_id']),
'consignee' => empty($_POST['consignee']) ? '' : trim($_POST['consignee']),
'country' => empty($_POST['country']) ? '' : $_POST['country'],
'province' => empty($_POST['province']) ? '' : $_POST['province'],
'city' => empty($_POST['city']) ? '' : $_POST['city'],
'district' => empty($_POST['district']) ? '' : $_POST['district'],
'email' => empty($_POST['email']) ? '' : $_POST['email'],
'address' => empty($_POST['address']) ? '' : $_POST['address'],
'zipcode' => empty($_POST['zipcode']) ? '' : make_semiangle(trim($_POST['zipcode'])),
'tel' => empty($_POST['tel']) ? '' : make_semiangle(trim($_POST['tel'])),
'mobile' => empty($_POST['mobile']) ? '' : make_semiangle(trim($_POST['mobile'])),
'sign_building' => empty($_POST['sign_building']) ? '' : $_POST['sign_building'],
'best_time' => empty($_POST['best_time']) ? '' : $_POST['best_time'],
);
if ($_SESSION['user_id'] > 0)
{
include_once(ROOT_PATH . 'includes/lib_transaction.php');
/* 如果用户已经登录,则保存收货人信息 */
$consignee['user_id'] = $_SESSION['user_id'];
save_consignee($consignee, true);
}
/* 保存到session */
$_SESSION['flow_consignee'] = stripslashes_deep($consignee);
/* 检查购物车中是否有商品 */
$sql = "SELECT COUNT(*) FROM " . $ecs->table('cart') .
" WHERE session_id = '" . SESS_ID . "' " .
"AND parent_id = 0 AND is_gift = 0 AND rec_type = '$flow_type'";
if ($db->getOne($sql) == 0)
{
$tips = '您的购物车中没有商品';
}
$consignee = get_consignee($_SESSION['user_id']);
$_SESSION['flow_consignee'] = $consignee;
$smarty->assign('consignee', $consignee);
/* 对商品信息赋值 */
$cart_goods = cart_goods($flow_type); // 取得商品列表,计算合计
$smarty->assign('goods_list', $cart_goods);
/*
* 取得订单信息
*/
$order = flow_order_info();
$smarty->assign('order', $order);
$_LANG['shopping_money'] = '购物金额小计 %s';
$_LANG['than_market_price'] = '比市场价 %s 节省了 %s (%s)';
/*
* 计算订单的费用
*/
$total = order_fee($order, $cart_goods, $consignee);
$smarty->assign('shopping_money', sprintf($_LANG['shopping_money'], $total['formated_goods_price']));
$smarty->assign('market_price_desc', sprintf($_LANG['than_market_price'], $total['formated_market_price'], $total['formated_saving'], $total['save_rate']));
$smarty->assign('total', $total);
/* 取得配送列表 */
$region = array($consignee['country'], $consignee['province'], $consignee['city'], $consignee['district']);
$shipping_list = available_shipping_list($region);
$cart_weight_price = cart_weight_price($flow_type);
$insure_disabled = true;
$cod_disabled = true;
// 查看购物车中是否全为免运费商品,若是则把运费赋为零
$sql = 'SELECT count(*) FROM ' . $ecs->table('cart') . " WHERE `session_id` = '" . SESS_ID. "' AND `extension_code` != 'package_buy' AND `is_shipping` = 0";
$shipping_count = $db->getOne($sql);
foreach ($shipping_list AS $key => $val)
{
$shipping_cfg = unserialize_config($val['configure']);
$shipping_fee = ($shipping_count == 0 AND $cart_weight_price['free_shipping'] == 1) ? 0 : shipping_fee($val['shipping_code'], unserialize($val['configure']),
$cart_weight_price['weight'], $cart_weight_price['amount'], $cart_weight_price['number']);
$shipping_list[$key]['format_shipping_fee'] = price_format($shipping_fee, false);
$shipping_list[$key]['shipping_fee'] = $shipping_fee;
$shipping_list[$key]['free_money'] = price_format($shipping_cfg['free_money'], false);
$shipping_list[$key]['insure_formated'] = strpos($val['insure'], '%') === false ?
price_format($val['insure'], false) : $val['insure'];
}
$smarty->assign('shipping_list', $shipping_list);
$smarty->assign('insure_disabled', $insure_disabled);
$smarty->assign('cod_disabled', $cod_disabled);
/* 取得支付列表 */
if ($order['shipping_id'] == 0)
{
$cod = true;
$cod_fee = 0;
}
else
{
$shipping = shipping_info($order['shipping_id']);
$cod = $shipping['support_cod'];
if ($cod)
{
/* 如果是团购,且保证金大于0,不能使用货到付款 */
if ($flow_type == CART_GROUP_BUY_GOODS)
{
$group_buy_id = $_SESSION['extension_id'];
if ($group_buy_id <= 0)
{
show_message('error group_buy_id');
}
$group_buy = group_buy_info($group_buy_id);
if (empty($group_buy))
{
show_message('group buy not exists: ' . $group_buy_id);
}
if ($group_buy['deposit'] > 0)
{
$cod = false;
$cod_fee = 0;
/* 赋值保证金 */
$smarty->assign('gb_deposit', $group_buy['deposit']);
}
}
if ($cod)
{
$shipping_area_info = shipping_area_info($order['shipping_id'], $region);
$cod_fee = $shipping_area_info['pay_fee'];
}
}
else
{
$cod_fee = 0;
}
}
// 给货到付款的手续费加<span id>,以便改变配送的时候动态显示
$payment_list = available_payment_list(1, $cod_fee);
if(isset($payment_list))
{
foreach ($payment_list as $key => $payment)
{
if ($payment['is_cod'] == '1')
{
$payment_list[$key]['format_pay_fee'] = '<span id="ECS_CODFEE">' . $payment['format_pay_fee'] . '</span>';
}
/* 如果有易宝神州行支付 如果订单金额大于300 则不显示 */
if ($payment['pay_code'] == 'yeepayszx' && $total['amount'] > 300)
{
unset($payment_list[$key]);
}
/* 如果有余额支付 */
if ($payment['pay_code'] == 'balance')
{
/* 如果未登录,不显示 */
if ($_SESSION['user_id'] == 0)
{
unset($payment_list[$key]);
}
else
{
if ($_SESSION['flow_order']['pay_id'] == $payment['pay_id'])
{
$smarty->assign('disable_surplus', 1);
}
}
}
}
}
$smarty->assign('payment_list', $payment_list);
$user_info = user_info($_SESSION['user_id']);
/* 如果使用余额,取得用户余额 */
if ((!isset($_CFG['use_surplus']) || $_CFG['use_surplus'] == '1')
&& $_SESSION['user_id'] > 0
&& $user_info['user_money'] > 0)
{
// 能使用余额
$smarty->assign('allow_use_surplus', 1);
$smarty->assign('your_surplus', $user_info['user_money']);
}
/* 保存 session */
$_SESSION['flow_order'] = $order;
$smarty->assign('footer', get_footer());
$smarty->display('order.html');
exit;
}
elseif($_REQUEST['act'] = 'done')
{
/*------------------------------------------------------ */
//-- 完成所有订单操作,提交到数据库
/*------------------------------------------------------ */
include_once('includes/lib_clips.php');
/* 检查购物车中是否有商品 */
$sql = "SELECT COUNT(*) FROM " . $ecs->table('cart') .
" WHERE session_id = '" . SESS_ID . "' " .
"AND parent_id = 0 AND is_gift = 0 AND rec_type = '$flow_type'";
if ($db->getOne($sql) == 0)
{
$tips = '您的购物车中没有商品';
}
/* 检查商品库存 */
/* 如果使用库存,且下订单时减库存,则减少库存 */
if ($_CFG['use_storage'] == '1' && $_CFG['stock_dec_time'] == SDT_PLACE)
{
$cart_goods_stock = get_cart_goods();
$_cart_goods_stock = array();
foreach ($cart_goods_stock['goods_list'] as $value)
{
$_cart_goods_stock[$value['rec_id']] = $value['goods_number'];
}
flow_cart_stock($_cart_goods_stock);
unset($cart_goods_stock, $_cart_goods_stock);
}
$consignee = get_consignee($_SESSION['user_id']);
$_POST['how_oos'] = isset($_POST['how_oos']) ? intval($_POST['how_oos']) : 0;
$_POST['card_message'] = isset($_POST['card_message']) ? htmlspecialchars($_POST['card_message']) : '';
$_POST['inv_type'] = !empty($_POST['inv_type']) ? htmlspecialchars($_POST['inv_type']) : '';
$_POST['inv_payee'] = isset($_POST['inv_payee']) ? htmlspecialchars($_POST['inv_payee']) : '';
$_POST['inv_content'] = isset($_POST['inv_content']) ? htmlspecialchars($_POST['inv_content']) : '';
$_POST['postscript'] = isset($_POST['postscript']) ? htmlspecialchars($_POST['postscript']) : '';
$order = array(
'shipping_id' => intval($_POST['shipping']),
'pay_id' => isset($_POST['payment']) ? intval($_POST['payment']) : '0',
'pack_id' => isset($_POST['pack']) ? intval($_POST['pack']) : 0,
'card_id' => isset($_POST['card']) ? intval($_POST['card']) : 0,
'card_message' => trim($_POST['card_message']),
'surplus' => isset($_POST['surplus']) ? floatval($_POST['surplus']) : 0.00,
'integral' => isset($_POST['integral']) ? intval($_POST['integral']) : 0,
'bonus_id' => isset($_POST['bonus']) ? intval($_POST['bonus']) : 0,
'need_inv' => empty($_POST['need_inv']) ? 0 : 1,
'inv_type' => $_POST['inv_type'],
'inv_payee' => trim($_POST['inv_payee']),
'inv_content' => $_POST['inv_content'],
'postscript' => trim($_POST['postscript']),
'how_oos' => isset($_LANG['oos'][$_POST['how_oos']]) ? addslashes($_LANG['oos'][$_POST['how_oos']]) : '',
'need_insure' => isset($_POST['need_insure']) ? intval($_POST['need_insure']) : 0,
'user_id' => $_SESSION['user_id'],
'add_time' => gmtime(),
'order_status' => OS_UNCONFIRMED,
'shipping_status' => SS_UNSHIPPED,
'pay_status' => PS_UNPAYED,
'agency_id' => get_agency_by_regions(array($consignee['country'], $consignee['province'], $consignee['city'], $consignee['district']))
);
/* 扩展信息 */
if (isset($_SESSION['flow_type']) && intval($_SESSION['flow_type']) != CART_GENERAL_GOODS)
{
$order['extension_code'] = $_SESSION['extension_code'];
$order['extension_id'] = $_SESSION['extension_id'];
}
else
{
$order['extension_code'] = '';
$order['extension_id'] = 0;
}
/* 检查积分余额是否合法 */
$user_id = $_SESSION['user_id'];
if ($user_id > 0)
{
$user_info = user_info($user_id);
$order['surplus'] = min($order['surplus'], $user_info['user_money'] + $user_info['credit_line']);
if ($order['surplus'] < 0)
{
$order['surplus'] = 0;
}
// 查询用户有多少积分
$flow_points = flow_available_points(); // 该订单允许使用的积分
$user_points = $user_info['pay_points']; // 用户的积分总数
$order['integral'] = min($order['integral'], $user_points, $flow_points);
if ($order['integral'] < 0)
{
$order['integral'] = 0;
}
}
else
{
$order['surplus'] = 0;
$order['integral'] = 0;
}
/* 订单中的商品 */
$cart_goods = cart_goods($flow_type);
if (empty($cart_goods))
{
$tips = '您的购物车中没有商品';
}
/* 收货人信息 */
foreach ($consignee as $key => $value)
{
$order[$key] = addslashes($value);
}
/* 订单中的总额 */
$total = order_fee($order, $cart_goods, $consignee);
$order['bonus'] = $total['bonus'];
$order['goods_amount'] = $total['goods_price'];
$order['discount'] = $total['discount'];
$order['surplus'] = $total['surplus'];
$order['tax'] = $total['tax'];
/* 配送方式 */
if ($order['shipping_id'] > 0)
{
$shipping = shipping_info($order['shipping_id']);
$order['shipping_name'] = addslashes($shipping['shipping_name']);
}
$order['shipping_fee'] = $total['shipping_fee'];
$order['insure_fee'] = $total['shipping_insure'];
/* 支付方式 */
if ($order['pay_id'] > 0)
{
$payment = payment_info($order['pay_id']);
$order['pay_name'] = addslashes($payment['pay_name']);
}
$order['pay_fee'] = $total['pay_fee'];
$order['cod_fee'] = $total['cod_fee'];
$order['integral_money'] = $total['integral_money'];
$order['integral'] = $total['integral'];
if ($order['extension_code'] == 'exchange_goods')
{
$order['integral_money'] = 0;
$order['integral'] = $total['exchange_integral'];
}
$order['from_ad'] = !empty($_SESSION['from_ad']) ? $_SESSION['from_ad'] : '0';
$order['referer'] = !empty($_SESSION['referer']) ? addslashes($_SESSION['referer']) : '';
$order['order_amount'] = number_format($total['amount'], 2, '.', '');
/* 如果全部使用余额支付,检查余额是否足够 */
if ($payment['pay_code'] == 'balance' && $order['order_amount'] > 0)
{
if($order['surplus'] >0) //余额支付里如果输入了一个金额
{
$order['order_amount'] = $order['order_amount'] + $order['surplus'];
$order['surplus'] = 0;
}
if ($order['order_amount'] > ($user_info['user_money'] + $user_info['credit_line']))
{
$tips = '您的余额不足以支付整个订单,以未付款方式下单';
}
else
{
$order['surplus'] = $order['order_amount'];
$order['order_amount'] = 0;
}
}
/* 如果订单金额为0(使用余额或积分或红包支付),修改订单状态为已确认、已付款 */
if ($order['order_amount'] <= 0)
{
$order['order_status'] = OS_CONFIRMED;
$order['confirm_time'] = gmtime();
$order['pay_status'] = PS_PAYED;
$order['pay_time'] = gmtime();
$order['order_amount'] = 0;
}
$order['integral_money'] = $total['integral_money'];
$order['integral'] = $total['integral'];
if ($order['extension_code'] == 'exchange_goods')
{
$order['integral_money'] = 0;
$order['integral'] = $total['exchange_integral'];
}
$order['from_ad'] = !empty($_SESSION['from_ad']) ? $_SESSION['from_ad'] : '0';
$order['referer'] = !empty($_SESSION['referer']) ? addslashes($_SESSION['referer']) : '';
/* 记录扩展信息 */
if ($flow_type != CART_GENERAL_GOODS)
{
$order['extension_code'] = $_SESSION['extension_code'];
$order['extension_id'] = $_SESSION['extension_id'];
}
$affiliate = unserialize($_CFG['affiliate']);
/* 插入订单表 */
$error_no = 0;
do
{
$order['order_sn'] = get_order_sn(); //获取新订单号
$GLOBALS['db']->autoExecute($GLOBALS['ecs']->table('order_info'), $order, 'INSERT');
$error_no = $GLOBALS['db']->errno();
if ($error_no > 0 && $error_no != 1062)
{
die($GLOBALS['db']->errorMsg());
}
}
while ($error_no == 1062); //如果是订单号重复则重新提交数据
$new_order_id = $db->insert_id();
$order['order_id'] = $new_order_id;
/* 插入订单商品 */
$sql = "INSERT INTO " . $ecs->table('order_goods') . "( " .
"order_id, goods_id, goods_name, goods_sn, goods_number, market_price, ".
"goods_price, goods_attr, is_real, extension_code, parent_id, is_gift, goods_attr_id) ".
" SELECT '$new_order_id', goods_id, goods_name, goods_sn, goods_number, market_price, ".
"goods_price, goods_attr, is_real, extension_code, parent_id, is_gift, goods_attr_id".
" FROM " .$ecs->table('cart') .
" WHERE session_id = '".SESS_ID."' AND rec_type = '$flow_type'";
$db->query($sql);
/* 处理余额、积分、红包 */
if ($order['user_id'] > 0 && $order['surplus'] > 0)
{
log_account_change($order['user_id'], $order['surplus'] * (-1), 0, 0, 0, sprintf('支付订单 %s', $order['order_sn']));
}
if ($order['user_id'] > 0 && $order['integral'] > 0)
{
log_account_change($order['user_id'], 0, 0, 0, $order['integral'] * (-1), sprintf('支付订单 %s', $order['order_sn']));
}
/* 如果使用库存,且下订单时减库存,则减少库存 */
if ($_CFG['use_storage'] == '1' && $_CFG['stock_dec_time'] == SDT_PLACE)
{
change_order_goods_storage($order['order_id'], true, SDT_PLACE);
}
/* 清空购物车 */
clear_cart($flow_type);
/* 清除缓存,否则买了商品,但是前台页面读取缓存,商品数量不减少 */
clear_all_files();
if(!empty($order['shipping_name']))
{
$order['shipping_name']=trim(stripcslashes($order['shipping_name']));
}
/* 取得支付信息,生成支付代码 */
if ($order['order_amount'] > 0)
{
$payment = payment_info($order['pay_id']);
include_once('includes/modules/payment/' . $payment['pay_code'] . '.php');
$pay_obj = new $payment['pay_code'];
$pay_online = $pay_obj->get_code($order, unserialize_config($payment['pay_config']));
$order['pay_desc'] = $payment['pay_desc'];
$smarty->assign('pay_online', $pay_online);
}
/* 订单信息 */
$smarty->assign('order', $order);
$smarty->assign('total', $total);
$smarty->assign('goods_list', $cart_goods);
$smarty->assign('order_submit_back', sprintf('您可以 %s 或去 %s', '<a href="index.php">返回首页</a>', '<a href="user.php">用户中心</a>')); // 返回提示
unset($_SESSION['flow_consignee']); // 清除session中保存的收货人信息
unset($_SESSION['flow_order']);
unset($_SESSION['direct_shopping']);
if ($_SESSION['user_id'] > 0)
{
$smarty->assign('user_name', $_SESSION['user_name']);
}
$smarty->assign('footer', get_footer());
$smarty->assign('tips', $tips);
$smarty->display('order_done.html');
exit;
}
function flow_available_points()
{
$sql = "SELECT SUM(g.integral * c.goods_number) ".
"FROM " . $GLOBALS['ecs']->table('cart') . " AS c, " . $GLOBALS['ecs']->table('goods') . " AS g " .
"WHERE c.session_id = '" . SESS_ID . "' AND c.goods_id = g.goods_id AND c.is_gift = 0 AND g.integral > 0 " .
"AND c.rec_type = '" . CART_GENERAL_GOODS . "'";
$val = intval($GLOBALS['db']->getOne($sql));
return integral_of_value($val);
}
/**
* 检查订单中商品库存
*
* @access public
* @param array $arr
*
* @return void
*/
function flow_cart_stock($arr)
{
foreach ($arr AS $key => $val)
{
$val = intval(make_semiangle($val));
if ($val <= 0)
{
continue;
}
$sql = "SELECT `goods_id`, `goods_attr_id`, `extension_code` FROM" .$GLOBALS['ecs']->table('cart').
" WHERE rec_id='$key' AND session_id='" . SESS_ID . "'";
$goods = $GLOBALS['db']->getRow($sql);
$sql = "SELECT g.goods_name, g.goods_number, c.product_id ".
"FROM " .$GLOBALS['ecs']->table('goods'). " AS g, ".
$GLOBALS['ecs']->table('cart'). " AS c ".
"WHERE g.goods_id = c.goods_id AND c.rec_id = '$key'";
$row = $GLOBALS['db']->getRow($sql);
//系统启用了库存,检查输入的商品数量是否有效
if (intval($GLOBALS['_CFG']['use_storage']) > 0 && $goods['extension_code'] != 'package_buy')
{
if ($row['goods_number'] < $val)
{
show_message(sprintf($GLOBALS['_LANG']['stock_insufficiency'], $row['goods_name'],
$row['goods_number'], $row['goods_number']));
exit;
}
/* 是货品 */
$row['product_id'] = trim($row['product_id']);
if (!empty($row['product_id']))
{
$sql = "SELECT product_number FROM " .$GLOBALS['ecs']->table('products'). " WHERE goods_id = '" . $goods['goods_id'] . "' AND product_id = '" . $row['product_id'] . "'";
$product_number = $GLOBALS['db']->getOne($sql);
if ($product_number < $val)
{
show_message(sprintf($GLOBALS['_LANG']['stock_insufficiency'], $row['goods_name'],
$row['goods_number'], $row['goods_number']));
exit;
}
}
}
elseif (intval($GLOBALS['_CFG']['use_storage']) > 0 && $goods['extension_code'] == 'package_buy')
{
if (judge_package_stock($goods['goods_id'], $val))
{
show_message($GLOBALS['_LANG']['package_stock_insufficiency']);
exit;
}
}
}
}
?> | zzshop | trunk/mobile/order.php | PHP | asf20 | 23,759 |
<?php
/**
* ECSHOP mobile前台公共函数
* ============================================================================
* 版权所有 2005-2010 上海商派网络科技有限公司,并保留所有权利。
* 网站地址: http://www.ecshop.com;
* ----------------------------------------------------------------------------
* 这不是一个自由软件!您只能在不用于商业目的的前提下对程序代码进行修改和
* 使用;不允许对程序代码以任何形式任何目的的再发布。
* ============================================================================
* $Author: liuhui $
* $Id: init.php 15013 2008-10-23 09:31:42Z liuhui $
*/
if (!defined('IN_ECS'))
{
die('Hacking attempt');
}
define('ECS_WAP', true);
error_reporting(E_ALL);
if (__FILE__ == '')
{
die('Fatal error code: 0');
}
/* 取得当前ecshop所在的根目录 */
define('ROOT_PATH', str_replace('mobile/includes/init.php', '', str_replace('\\', '/', __FILE__)));
/* 初始化设置 */
@ini_set('memory_limit', '64M');
@ini_set('session.cache_expire', 180);
@ini_set('session.use_cookies', 1);
@ini_set('session.auto_start', 0);
@ini_set('display_errors', 1);
@ini_set("arg_separator.output","&");
if (DIRECTORY_SEPARATOR == '\\')
{
@ini_set('include_path', '.;' . ROOT_PATH);
}
else
{
@ini_set('include_path', '.:' . ROOT_PATH);
}
if (file_exists(ROOT_PATH . 'data/config.php'))
{
include(ROOT_PATH . 'data/config.php');
}
else
{
include(ROOT_PATH . 'includes/config.php');
}
if (defined('DEBUG_MODE') == false)
{
define('DEBUG_MODE', 7);
}
if (PHP_VERSION >= '5.1' && !empty($timezone))
{
date_default_timezone_set($timezone);
}
$php_self = isset($_SERVER['PHP_SELF']) ? $_SERVER['PHP_SELF'] : $_SERVER['SCRIPT_NAME'];
if ('/' == substr($php_self, -1))
{
$php_self .= 'index.php';
}
define('PHP_SELF', $php_self);
require(ROOT_PATH . 'includes/cls_ecshop.php');
require(ROOT_PATH . 'includes/lib_goods.php');
require(ROOT_PATH . 'includes/lib_base.php');
require(ROOT_PATH . 'includes/lib_common.php');
require(ROOT_PATH . 'includes/lib_time.php');
require(ROOT_PATH . 'includes/lib_main.php');
require(ROOT_PATH . 'mobile/includes/lib_main.php');
require(ROOT_PATH . 'includes/inc_constant.php');
require(ROOT_PATH . 'includes/cls_error.php');
/* 对用户传入的变量进行转义操作。*/
if (!get_magic_quotes_gpc())
{
if (!empty($_GET))
{
$_GET = addslashes_deep($_GET);
}
if (!empty($_POST))
{
$_POST = addslashes_deep($_POST);
}
$_COOKIE = addslashes_deep($_COOKIE);
$_REQUEST = addslashes_deep($_REQUEST);
}
/* 创建 ECSHOP 对象 */
$ecs = new ECS($db_name, $prefix);
/* 初始化数据库类 */
require(ROOT_PATH . 'includes/cls_mysql.php');
$db = new cls_mysql($db_host, $db_user, $db_pass, $db_name);
$db_host = $db_user = $db_pass = $db_name = NULL;
/* 创建错误处理对象 */
$err = new ecs_error('message.html');
/* 载入系统参数 */
$_CFG = load_config();
/* 初始化session */
require(ROOT_PATH . 'includes/cls_session.php');
$sess = new cls_session($db, $ecs->table('sessions'), $ecs->table('sessions_data'), 'ecsid');
define('SESS_ID', $sess->get_session_id());
if (!defined('INIT_NO_SMARTY'))
{
header('Cache-control: private');
header('Content-type: text/html; charset=utf-8');
/* 创建 Smarty 对象。*/
require(ROOT_PATH . 'includes/cls_template.php');
$smarty = new cls_template;
$smarty->cache_lifetime = $_CFG['cache_time'];
$smarty->template_dir = ROOT_PATH . 'mobile/templates';
$smarty->cache_dir = ROOT_PATH . 'temp/caches';
$smarty->compile_dir = ROOT_PATH . 'temp/compiled/mobile';
if ((DEBUG_MODE & 2) == 2)
{
$smarty->direct_output = true;
$smarty->force_compile = true;
}
else
{
$smarty->direct_output = false;
$smarty->force_compile = false;
}
}
if (!defined('INIT_NO_USERS'))
{
/* 会员信息 */
$user =& init_users();
if (empty($_SESSION['user_id']))
{
if ($user->get_cookie())
{
/* 如果会员已经登录并且还没有获得会员的帐户余额、积分以及优惠券 */
if ($_SESSION['user_id'] > 0 && !isset($_SESSION['user_money']))
{
update_user_info();
}
}
else
{
$_SESSION['user_id'] = 0;
$_SESSION['user_name'] = '';
$_SESSION['email'] = '';
$_SESSION['user_rank'] = 0;
$_SESSION['discount'] = 1.00;
}
}
}
if ((DEBUG_MODE & 1) == 1)
{
error_reporting(E_ALL);
}
else
{
error_reporting(E_ALL ^ E_NOTICE);
}
if ((DEBUG_MODE & 4) == 4)
{
include(ROOT_PATH . 'includes/lib.debug.php');
}
/* 判断是否支持gzip模式 */
if (gzip_enabled())
{
ob_start('ob_gzhandler');
}
/* wap头文件 */
//if (substr($_SERVER['SCRIPT_NAME'], strrpos($_SERVER['SCRIPT_NAME'], '/')) != '/user.php')
//{}
header("Content-Type:text/html; charset=utf-8");
if (empty($_CFG['wap_config']))
{
echo "<meta http-equiv='Content-Type' content='text/html; charset=utf-8' /><title>ECShop_mobile</title></head><body><p align='left'>对不起,{$_CFG['shop_name']}暂时没有开启手机购物功能</p></body></html>";
exit();
}
?> | zzshop | trunk/mobile/includes/init.php | PHP | asf20 | 5,573 |
<?php
/**
* ECSHOP mobile前台公共函数
* ============================================================================
* 版权所有 2005-2010 上海商派网络科技有限公司,并保留所有权利。
* 网站地址: http://www.ecshop.com;
* ----------------------------------------------------------------------------
* 这不是一个自由软件!您只能在不用于商业目的的前提下对程序代码进行修改和
* 使用;不允许对程序代码以任何形式任何目的的再发布。
* ============================================================================
* $Author: testyang $
* $Id: lib_main.php 15013 2008-10-23 09:31:42Z testyang $
*/
if (!defined('IN_ECS'))
{
die('Hacking attempt');
}
/**
* 对输出编码
*
* @access public
* @param string $str
* @return string
*/
function encode_output($str)
{
// if (EC_CHARSET != 'utf-8')
// {
// $str = ecs_iconv(EC_CHARSET, 'utf-8', $str);
// }
return htmlspecialchars($str);
}
/**
* wap分页函数
*
* @access public
* @param int $num 总记录数
* @param int $perpage 每页记录数
* @param int $curr_page 当前页数
* @param string $mpurl 传入的连接地址
* @param string $pvar 分页变量
*/
function get_wap_pager($num, $perpage, $curr_page, $mpurl,$pvar)
{
$multipage = '';
if($num > $perpage)
{
$page = 2;
$offset = 1;
$pages = ceil($num / $perpage);
$all_pages = $pages;
$tmp_page = $curr_page;
$setp = strpos($mpurl, '?') === false ? "?" : '&';
if($curr_page > 1)
{
$multipage .= "<a href=\"$mpurl${setp}${pvar}=".($curr_page-1)."\">上一页</a>";
}
$multipage .= $curr_page."/".$pages;
if(($curr_page++) < $pages)
{
$multipage .= "<a href=\"$mpurl${setp}${pvar}=".$curr_page++."\">下一页</a><br/>";
}
//$multipage .= $pages > $page ? " ... <a href=\"$mpurl&$pvar=$pages\"> [$pages] >></a>" : " 页/".$all_pages."页";
//$url_array = explode("?" , $mpurl);
// $field_str = "";
// if (isset($url_array[1]))
// {
// $filed_array = explode("&" , $url_array[1]);
// if (count($filed_array) > 0)
//{
// foreach ($filed_array AS $data)
// {
// $value_array = explode("=" , $data);
// $field_str .= "<postfield name='".$value_array[0]."' value='".encode_output($value_array[1])."'/>\n";
// }
// }
// }
//$multipage .= "跳转到第<input type='text' name='pageno' format='*N' size='4' value='' maxlength='2' emptyok='true' />页<anchor>[GO]<go href='{$url_array[0]}' method='get'>{$field_str}<postfield name='".$pvar."' value='$(pageno)'/></go></anchor>";
//<postfield name='snid' value='".session_id()."'/>
}
return $multipage;
}
/**
* 返回尾文件
*
* @return string
*/
function get_footer()
{
if ($_SESSION['user_id'] > 0)
{
$footer = "<br/><a href='user.php?act=user_center'>用户中心</a>|<a href='user.php?act=logout'>退出</a>|<a href='javascript:scroll(0,0)' hidefocus='true'>回到顶部</a><br/>Copyright 2009<br/>Powered by ECShop v2.7.2";
}
else
{
$footer = "<br/><a href='user.php?act=login'>登陆</a>|<a href='user.php?act=register'>免费注册</a>|<a href='javascript:scroll(0,0)' hidefocus='true'>回到顶部</a><br/>Copyright 2009<br/>Powered by ECShop v2.7.2";
}
return $footer;
}
?> | zzshop | trunk/mobile/includes/lib_main.php | PHP | asf20 | 3,758 |
<?php
/**
* ECSHOP WAP评论页
* ============================================================================
* 版权所有 2005-2010 上海商派网络科技有限公司,并保留所有权利。
* 网站地址: http://www.ecshop.com;
* ----------------------------------------------------------------------------
* 这不是一个自由软件!您只能在不用于商业目的的前提下对程序代码进行修改和
* 使用;不允许对程序代码以任何形式任何目的的再发布。
* ============================================================================
* $Author: testyang $
* $Id: comment.php 15013 2008-10-23 09:31:42Z testyang $
*/
define('IN_ECS', true);
require(dirname(__FILE__) . '/includes/init.php');
$goods_id = !empty($_GET['g_id']) ? intval($_GET['g_id']) : exit();
if ($goods_id <= 0)
{
exit();
}
/* 读取商品信息 */
$_LANG['kilogram'] = '千克';
$_LANG['gram'] = '克';
$_LANG['home'] = '首页';
$smarty->assign('goods_id', $goods_id);
$goods_info = get_goods_info($goods_id);
$goods_info['goods_name'] = encode_output($goods_info['goods_name']);
$goods_info['goods_brief'] = encode_output($goods_info['goods_brief']);
$smarty->assign('goods_info', $goods_info);
/* 读评论信息 */
$comment = assign_comment($goods_id, 'comments');
$num = $comment['pager']['record_count'];
if ($num > 0)
{
$page_num = '10';
$page = !empty($_GET['page']) ? intval($_GET['page']) : 1;
$pages = ceil($num / $page_num);
if ($page <= 0)
{
$page = 1;
}
if ($pages == 0)
{
$pages = 1;
}
if ($page > $pages)
{
$page = $pages;
}
$i = 1;
foreach ($comment['comments'] as $key => $data)
{
if (($i > ($page_num * ($page - 1 ))) && ($i <= ($page_num * $page)))
{
$re_content = !empty($data['re_content']) ? encode_output($data['re_content']) : '';
$re_username = !empty($data['re_username']) ? encode_output($data['re_username']) : '';
$re_add_time = !empty($data['re_add_time']) ? substr($data['re_add_time'], 5, 14) : '';
$comment_data[] = array('i' => $i , 'content' => encode_output($data['content']) , 'username' => encode_output($data['username']) , 'add_time' => substr($data['add_time'], 5, 14) , 're_content' => $re_content , 're_username' => $re_username , 're_add_time' => $re_add_time);
}
$i++;
}
$smarty->assign('comment_data', $comment_data);
$pagebar = get_wap_pager($num, $page_num, $page, 'comment.php?g_id='.$goods_id, 'page');
$smarty->assign('pagebar' , $pagebar);
}
$smarty->assign('footer', get_footer());
$smarty->display('comment.html');
?> | zzshop | trunk/mobile/comment.php | PHP | asf20 | 2,768 |
<?php
/**
* ECSHOP 用户中心
* ============================================================================
* 版权所有 2005-2010 上海商派网络科技有限公司,并保留所有权利。
* 网站地址: http://www.ecshop.com;
* ----------------------------------------------------------------------------
* 这不是一个自由软件!您只能在不用于商业目的的前提下对程序代码进行修改和
* 使用;不允许对程序代码以任何形式任何目的的再发布。
* ============================================================================
* $Author: liubo $
* $Id: user.php 16643 2009-09-08 07:02:13Z liubo $
*/
define('IN_ECS', true);
require(dirname(__FILE__) . '/includes/init.php');
$act = isset($_GET['act']) ? $_GET['act'] : '';
/* 用户登陆 */
if ($act == 'do_login')
{
$user_name = !empty($_POST['username']) ? $_POST['username'] : '';
$pwd = !empty($_POST['pwd']) ? $_POST['pwd'] : '';
if (empty($user_name) || empty($pwd))
{
$login_faild = 1;
}
else
{
if ($user->check_user($user_name, $pwd) > 0)
{
$user->set_session($user_name);
$user->set_cookie($user_name);
update_user_info();
show_user_center();
}
else
{
$login_faild = 1;
}
}
}
elseif ($act == 'order_list')
{
$record_count = $db->getOne("SELECT COUNT(*) FROM " .$ecs->table('order_info'). " WHERE user_id = {$_SESSION['user_id']}");
if ($record_count > 0)
{
include_once(ROOT_PATH . 'includes/lib_transaction.php');
$page_num = '10';
$page = !empty($_GET['page']) ? intval($_GET['page']) : 1;
$pages = ceil($record_count / $page_num);
if ($page <= 0)
{
$page = 1;
}
if ($pages == 0)
{
$pages = 1;
}
if ($page > $pages)
{
$page = $pages;
}
$pagebar = get_wap_pager($record_count, $page_num, $page, 'user.php?act=order_list', 'page');
$smarty->assign('pagebar' , $pagebar);
/* 订单状态 */
$_LANG['os'][OS_UNCONFIRMED] = '未确认';
$_LANG['os'][OS_CONFIRMED] = '已确认';
$_LANG['os'][OS_SPLITED] = '已确认';
$_LANG['os'][OS_SPLITING_PART] = '已确认';
$_LANG['os'][OS_CANCELED] = '已取消';
$_LANG['os'][OS_INVALID] = '无效';
$_LANG['os'][OS_RETURNED] = '退货';
$_LANG['ss'][SS_UNSHIPPED] = '未发货';
$_LANG['ss'][SS_PREPARING] = '配货中';
$_LANG['ss'][SS_SHIPPED] = '已发货';
$_LANG['ss'][SS_RECEIVED] = '收货确认';
$_LANG['ss'][SS_SHIPPED_PART] = '已发货(部分商品)';
$_LANG['ss'][SS_SHIPPED_ING] = '配货中'; // 已分单
$_LANG['ps'][PS_UNPAYED] = '未付款';
$_LANG['ps'][PS_PAYING] = '付款中';
$_LANG['ps'][PS_PAYED] = '已付款';
$_LANG['cancel'] = '取消订单';
$_LANG['pay_money'] = '付款';
$_LANG['view_order'] = '查看订单';
$_LANG['received'] = '确认收货';
$_LANG['ss_received'] = '已完成';
$_LANG['confirm_received'] = '你确认已经收到货物了吗?';
$_LANG['confirm_cancel'] = '您确认要取消该订单吗?取消后此订单将视为无效订单';
$orders = get_user_orders($_SESSION['user_id'], $page_num, $page_num * ($page - 1));
if (!empty($orders))
{
foreach ($orders as $key => $val)
{
$orders[$key]['total_fee'] = encode_output($val['total_fee']);
}
}
//$merge = get_user_merge($_SESSION['user_id']);
$smarty->assign('orders', $orders);
}
$smarty->assign('footer', get_footer());
$smarty->display('order_list.html');
exit;
}
/* 确认收货 */
elseif ($act == 'affirm_received')
{
include_once(ROOT_PATH . 'includes/lib_transaction.php');
$order_id = isset($_GET['order_id']) ? intval($_GET['order_id']) : 0;
$_LANG['buyer'] = '买家';
if (affirm_received($order_id, $_SESSION['user_id']))
{
ecs_header("Location: user.php?act=order_list\n");
exit;
}
}
/* 退出会员中心 */
elseif ($act == 'logout')
{
if (!isset($back_act) && isset($GLOBALS['_SERVER']['HTTP_REFERER']))
{
$back_act = strpos($GLOBALS['_SERVER']['HTTP_REFERER'], 'user.php') ? './index.php' : $GLOBALS['_SERVER']['HTTP_REFERER'];
}
$user->logout();
$Loaction = 'index.php';
ecs_header("Location: $Loaction\n");
}
/* 显示会员注册界面 */
elseif ($act == 'register')
{
if (!isset($back_act) && isset($GLOBALS['_SERVER']['HTTP_REFERER']))
{
$back_act = strpos($GLOBALS['_SERVER']['HTTP_REFERER'], 'user.php') ? './index.php' : $GLOBALS['_SERVER']['HTTP_REFERER'];
}
/* 取出注册扩展字段 */
$sql = 'SELECT * FROM ' . $ecs->table('reg_fields') . ' WHERE type < 2 AND display = 1 ORDER BY dis_order, id';
$extend_info_list = $db->getAll($sql);
$smarty->assign('extend_info_list', $extend_info_list);
/* 密码找回问题 */
$_LANG['passwd_questions']['friend_birthday'] = '我最好朋友的生日?';
$_LANG['passwd_questions']['old_address'] = '我儿时居住地的地址?';
$_LANG['passwd_questions']['motto'] = '我的座右铭是?';
$_LANG['passwd_questions']['favorite_movie'] = '我最喜爱的电影?';
$_LANG['passwd_questions']['favorite_song'] = '我最喜爱的歌曲?';
$_LANG['passwd_questions']['favorite_food'] = '我最喜爱的食物?';
$_LANG['passwd_questions']['interest'] = '我最大的爱好?';
$_LANG['passwd_questions']['favorite_novel'] = '我最喜欢的小说?';
$_LANG['passwd_questions']['favorite_equipe'] = '我最喜欢的运动队?';
/* 密码提示问题 */
$smarty->assign('passwd_questions', $_LANG['passwd_questions']);
$smarty->assign('footer', get_footer());
$smarty->display('user_passport.html');
}
/* 注册会员的处理 */
elseif ($act == 'act_register')
{
include_once(ROOT_PATH . 'includes/lib_passport.php');
$username = isset($_POST['username']) ? trim($_POST['username']) : '';
$password = isset($_POST['password']) ? trim($_POST['password']) : '';
$email = isset($_POST['email']) ? trim($_POST['email']) : '';
$other['msn'] = isset($_POST['extend_field1']) ? $_POST['extend_field1'] : '';
$other['qq'] = isset($_POST['extend_field2']) ? $_POST['extend_field2'] : '';
$other['office_phone'] = isset($_POST['extend_field3']) ? $_POST['extend_field3'] : '';
$other['home_phone'] = isset($_POST['extend_field4']) ? $_POST['extend_field4'] : '';
$other['mobile_phone'] = isset($_POST['extend_field5']) ? $_POST['extend_field5'] : '';
$sel_question = empty($_POST['sel_question']) ? '' : $_POST['sel_question'];
$passwd_answer = isset($_POST['passwd_answer']) ? trim($_POST['passwd_answer']) : '';
$back_act = isset($_POST['back_act']) ? trim($_POST['back_act']) : '';
if (m_register($username, $password, $email, $other) !== false)
{
/*把新注册用户的扩展信息插入数据库*/
$sql = 'SELECT id FROM ' . $ecs->table('reg_fields') . ' WHERE type = 0 AND display = 1 ORDER BY dis_order, id'; //读出所有自定义扩展字段的id
$fields_arr = $db->getAll($sql);
$extend_field_str = ''; //生成扩展字段的内容字符串
foreach ($fields_arr AS $val)
{
$extend_field_index = 'extend_field' . $val['id'];
if(!empty($_POST[$extend_field_index]))
{
$temp_field_content = strlen($_POST[$extend_field_index]) > 100 ? mb_substr($_POST[$extend_field_index], 0, 99) : $_POST[$extend_field_index];
$extend_field_str .= " ('" . $_SESSION['user_id'] . "', '" . $val['id'] . "', '" . $temp_field_content . "'),";
}
}
$extend_field_str = substr($extend_field_str, 0, -1);
if ($extend_field_str) //插入注册扩展数据
{
$sql = 'INSERT INTO '. $ecs->table('reg_extend_info') . ' (`user_id`, `reg_field_id`, `content`) VALUES' . $extend_field_str;
$db->query($sql);
}
/* 写入密码提示问题和答案 */
if (!empty($passwd_answer) && !empty($sel_question))
{
$sql = 'UPDATE ' . $ecs->table('users') . " SET `passwd_question`='$sel_question', `passwd_answer`='$passwd_answer' WHERE `user_id`='" . $_SESSION['user_id'] . "'";
$db->query($sql);
}
$ucdata = empty($user->ucdata)? "" : $user->ucdata;
$Loaction = 'index.php';
ecs_header("Location: $Loaction\n");
}
}
/* 用户中心 */
else
{
if ($_SESSION['user_id'] > 0)
{
show_user_center();
}
else
{
$smarty->assign('footer', get_footer());
$smarty->display('login.html');
}
}
/**
* 用户中心显示
*/
function show_user_center()
{
$best_goods = get_recommend_goods('best');
if (count($best_goods) > 0)
{
foreach ($best_goods as $key => $best_data)
{
$best_goods[$key]['shop_price'] = encode_output($best_data['shop_price']);
$best_goods[$key]['name'] = encode_output($best_data['name']);
}
}
$GLOBALS['smarty']->assign('best_goods' , $best_goods);
$GLOBALS['smarty']->assign('footer', get_footer());
$GLOBALS['smarty']->display('user.html');
}
/**
* 手机注册
*/
function m_register($username, $password, $email, $other = array())
{
/* 检查username */
if (empty($username))
{
echo '用户名不能为空';
$Loaction = 'user.php?act=register';
ecs_header("Location: $Loaction\n");
return false;
}
/* 检查email */
if (empty($email))
{
echo 'emial不能为空';
$Loaction = 'user.php?act=register';
ecs_header("Location: $Loaction\n");
return false;
}
/* 检查是否和管理员重名 */
if (admin_registered($username))
{
echo '此用户已存在!';
$Loaction = 'user.php?act=register';
ecs_header("Location: $Loaction\n");
return false;
}
if (!$GLOBALS['user']->add_user($username, $password, $email))
{
echo '注册失败!';
$Loaction = 'user.php?act=register';
ecs_header("Location: $Loaction\n");
//注册失败
return false;
}
else
{
//注册成功
/* 设置成登录状态 */
$GLOBALS['user']->set_session($username);
$GLOBALS['user']->set_cookie($username);
}
//定义other合法的变量数组
$other_key_array = array('msn', 'qq', 'office_phone', 'home_phone', 'mobile_phone');
$update_data['reg_time'] = local_strtotime(local_date('Y-m-d H:i:s'));
if ($other)
{
foreach ($other as $key=>$val)
{
//删除非法key值
if (!in_array($key, $other_key_array))
{
unset($other[$key]);
}
else
{
$other[$key] = htmlspecialchars(trim($val)); //防止用户输入javascript代码
}
}
$update_data = array_merge($update_data, $other);
}
$GLOBALS['db']->autoExecute($GLOBALS['ecs']->table('users'), $update_data, 'UPDATE', 'user_id = ' . $_SESSION['user_id']);
update_user_info(); // 更新用户信息
return true;
}
?> | zzshop | trunk/mobile/user.php | PHP | asf20 | 12,203 |
<?php
/**
* ECSHOP WAP首页
* ============================================================================
* 版权所有 2005-2010 上海商派网络科技有限公司,并保留所有权利。
* 网站地址: http://www.ecshop.com;
* ----------------------------------------------------------------------------
* 这不是一个自由软件!您只能在不用于商业目的的前提下对程序代码进行修改和
* 使用;不允许对程序代码以任何形式任何目的的再发布。
* ============================================================================
* $Author: testyang $
* $Id: goods_list.php 15013 2008-10-23 09:31:42Z testyang $
*/
define('IN_ECS', true);
require(dirname(__FILE__) . '/includes/init.php');
$type = !empty($_GET['type']) ? $_GET['type'] : 'best';
if ($type != 'best' && $type != 'promote' && $type != 'hot' && $type != 'new')
{
$type = 'best';
}
$smarty->assign('type', $type);
if (empty($_GET['order_price']))
{
$order_rule = 'ORDER BY shop_price ASC, g.last_update DESC';
}
else
{
$order_rule = 'ORDER BY shop_price DESC, g.last_update DESC';
}
if ($type == 'promote')
{
$goods = wap_get_promote_goods($order_rule);
}
else
{
$goods = wap_get_recommend_goods($type, $order_rule);
}
$num = count($goods);
if ($num > 0)
{
foreach ($goods as $key => $data)
{
$sort_array[$data['id']] = $key;
}
$page_num = '10';
$page = !empty($_GET['page']) ? intval($_GET['page']) : 1;
$pages = ceil($num / $page_num);
if ($page <= 0)
{
$page = 1;
}
if ($pages == 0)
{
$pages = 1;
}
if ($page > $pages)
{
$page = $pages;
}
$i = 1;
foreach ($sort_array as $goods_key)
{
if (($i > ($page_num * ($page - 1 ))) && ($i <= ($page_num * $page)))
{
$price = empty($goods[$goods_key]['promote_price_org']) ? $goods[$goods_key]['shop_price'] : $goods[$goods_key]['promote_price'];
//$wml_data .= "<a href='goods.php?id={}'>".encode_output($goods[$goods_key]['name'])."</a>[".encode_output($price)."]<br/>";
$goods_data[] = array('i' => $i , 'price' => encode_output($price) , 'id' => $goods[$goods_key]['id'] , 'name' => encode_output($goods[$goods_key]['name']));
}
$i++;
}
$smarty->assign('goods_data', $goods_data);
$pagebar = get_wap_pager($num, $page_num, $page, 'goods_list.php?type='.$type.'&order_price='.(empty($order_price)?0:$order_price), 'page');
$smarty->assign('pagebar' , $pagebar);
}
$smarty->assign('footer', get_footer());
$smarty->display('goods_list.html');
/**
* 获得推荐商品
*
* @access public
* @param string $type 推荐类型,可以是 best, new, hot
* @param string $order_rule 指定商品排序规则
* @return array
*/
function wap_get_recommend_goods($type = '', $order_rule = '')
{
if (!in_array($type, array('best', 'new', 'hot')))
{
return array();
}
//取不同推荐对应的商品
static $type_goods = array();
if (empty($type_goods[$type]))
{
//初始化数据
$type_goods['best'] = array();
$type_goods['new'] = array();
$type_goods['hot'] = array();
$data = read_static_cache('recommend_goods');
if ($data === false)
{
$sql = 'SELECT g.goods_id, g.is_best, g.is_new, g.is_hot, g.is_promote, b.brand_name,g.sort_order ' .
' FROM ' . $GLOBALS['ecs']->table('goods') . ' AS g ' .
' LEFT JOIN ' . $GLOBALS['ecs']->table('brand') . ' AS b ON b.brand_id = g.brand_id ' .
' WHERE g.is_on_sale = 1 AND g.is_alone_sale = 1 AND g.is_delete = 0 AND (g.is_best = 1 OR g.is_new =1 OR g.is_hot = 1)'.
' ORDER BY g.sort_order, g.last_update DESC';
$goods_res = $GLOBALS['db']->getAll($sql);
//定义推荐,最新,热门,促销商品
$goods_data['best'] = array();
$goods_data['new'] = array();
$goods_data['hot'] = array();
$goods_data['brand'] = array();
if (!empty($goods_res))
{
foreach($goods_res as $data)
{
if ($data['is_best'] == 1)
{
$goods_data['best'][] = array('goods_id' => $data['goods_id'], 'sort_order' => $data['sort_order']);
}
if ($data['is_new'] == 1)
{
$goods_data['new'][] = array('goods_id' => $data['goods_id'], 'sort_order' => $data['sort_order']);
}
if ($data['is_hot'] == 1)
{
$goods_data['hot'][] = array('goods_id' => $data['goods_id'], 'sort_order' => $data['sort_order']);
}
if ($data['brand_name'] != '')
{
$goods_data['brand'][$data['goods_id']] = $data['brand_name'];
}
}
}
write_static_cache('recommend_goods', $goods_data);
}
else
{
$goods_data = $data;
}
$time = gmtime();
$order_type = $GLOBALS['_CFG']['recommend_order'];
//按推荐数量及排序取每一项推荐显示的商品 order_type可以根据后台设定进行各种条件显示
static $type_array = array();
$type2lib = array('best'=>'recommend_best', 'new'=>'recommend_new', 'hot'=>'recommend_hot');
if (empty($type_array))
{
foreach($type2lib as $key => $data)
{
if (!empty($goods_data[$key]))
{
$data_count = count($goods_data[$key]);
$num = $data_count ;
if ($order_type == 0)
{
//usort($goods_data[$key], 'goods_sort');
$rand_key = array_slice($goods_data[$key], 0, $num);
foreach($rand_key as $key_data)
{
$type_array[$key][] = $key_data['goods_id'];
}
}
else
{
$rand_key = array_rand($goods_data[$key], $num);
if ($num == 1)
{
$type_array[$key][] = $goods_data[$key][$rand_key]['goods_id'];
}
else
{
foreach($rand_key as $key_data)
{
$type_array[$key][] = $goods_data[$key][$key_data]['goods_id'];
}
}
}
}
else
{
$type_array[$key] = array();
}
}
}
//取出所有符合条件的商品数据,并将结果存入对应的推荐类型数组中
$sql = 'SELECT g.goods_id, g.goods_name, g.goods_name_style, g.market_price, g.shop_price AS org_price, g.promote_price, ' .
"IFNULL(mp.user_price, g.shop_price * '$_SESSION[discount]') AS shop_price, ".
"promote_start_date, promote_end_date, g.goods_brief, g.goods_thumb, g.goods_img, RAND() AS rnd " .
'FROM ' . $GLOBALS['ecs']->table('goods') . ' AS g ' .
"LEFT JOIN " . $GLOBALS['ecs']->table('member_price') . " AS mp ".
"ON mp.goods_id = g.goods_id AND mp.user_rank = '$_SESSION[user_rank]' ";
$type_merge = array_merge($type_array['new'], $type_array['best'], $type_array['hot']);
$type_merge = array_unique($type_merge);
$sql .= ' WHERE g.goods_id ' . db_create_in($type_merge);
$order_rule = empty($order_rule) ? ' ORDER BY g.sort_order, g.last_update DESC' : $order_rule;
$sql .= $order_rule;
$result = $GLOBALS['db']->getAll($sql);
foreach ($result AS $idx => $row)
{
if ($row['promote_price'] > 0)
{
$promote_price = bargain_price($row['promote_price'], $row['promote_start_date'], $row['promote_end_date']);
$goods[$idx]['promote_price'] = $promote_price > 0 ? price_format($promote_price) : '';
}
else
{
$goods[$idx]['promote_price'] = '';
}
$goods[$idx]['id'] = $row['goods_id'];
$goods[$idx]['name'] = $row['goods_name'];
$goods[$idx]['brief'] = $row['goods_brief'];
$goods[$idx]['brand_name'] = isset($goods_data['brand'][$row['goods_id']]) ? $goods_data['brand'][$row['goods_id']] : '';
$goods[$idx]['goods_style_name'] = add_style($row['goods_name'],$row['goods_name_style']);
$goods[$idx]['short_name'] = $GLOBALS['_CFG']['goods_name_length'] > 0 ?
sub_str($row['goods_name'], $GLOBALS['_CFG']['goods_name_length']) : $row['goods_name'];
$goods[$idx]['short_style_name'] = add_style($goods[$idx]['short_name'],$row['goods_name_style']);
$goods[$idx]['market_price'] = price_format($row['market_price']);
$goods[$idx]['shop_price'] = price_format($row['shop_price']);
$goods[$idx]['thumb'] = get_image_path($row['goods_id'], $row['goods_thumb'], true);
$goods[$idx]['goods_img'] = get_image_path($row['goods_id'], $row['goods_img']);
$goods[$idx]['url'] = build_uri('goods', array('gid' => $row['goods_id']), $row['goods_name']);
if (in_array($row['goods_id'], $type_array['best']))
{
$type_goods['best'][] = $goods[$idx];
}
if (in_array($row['goods_id'], $type_array['new']))
{
$type_goods['new'][] = $goods[$idx];
}
if (in_array($row['goods_id'], $type_array['hot']))
{
$type_goods['hot'][] = $goods[$idx];
}
}
}
return $type_goods[$type];
}
/**
* 获得促销商品
*
* @access public
* @param string $order_rule 指定商品排序规则
* @return array
*/
function wap_get_promote_goods($order_rule = '')
{
$time = gmtime();
/* 取得促销lbi的数量限制 */
$sql = 'SELECT g.goods_id, g.goods_name, g.goods_name_style, g.market_price, g.shop_price AS org_price, g.promote_price, ' .
"IFNULL(mp.user_price, g.shop_price * '$_SESSION[discount]') AS shop_price, ".
"promote_start_date, promote_end_date, g.goods_brief, g.goods_thumb, goods_img, b.brand_name, " .
"g.is_best, g.is_new, g.is_hot, g.is_promote, RAND() AS rnd " .
'FROM ' . $GLOBALS['ecs']->table('goods') . ' AS g ' .
'LEFT JOIN ' . $GLOBALS['ecs']->table('brand') . ' AS b ON b.brand_id = g.brand_id ' .
"LEFT JOIN " . $GLOBALS['ecs']->table('member_price') . " AS mp ".
"ON mp.goods_id = g.goods_id AND mp.user_rank = '$_SESSION[user_rank]' ".
'WHERE g.is_on_sale = 1 AND g.is_alone_sale = 1 AND g.is_delete = 0 ' .
" AND g.is_promote = 1 AND promote_start_date <= '$time' AND promote_end_date >= '$time' ";
$order_rule = empty($order_rule) ? 'ORDER BY g.sort_order, g.last_update DESC' : $order_rule;
$sql .= $order_rule;
$result = $GLOBALS['db']->getAll($sql);
$goods = array();
foreach ($result AS $idx => $row)
{
if ($row['promote_price'] > 0)
{
$promote_price = bargain_price($row['promote_price'], $row['promote_start_date'], $row['promote_end_date']);
$goods[$idx]['promote_price'] = $promote_price > 0 ? price_format($promote_price) : '';
}
else
{
$goods[$idx]['promote_price'] = '';
}
$goods[$idx]['id'] = $row['goods_id'];
$goods[$idx]['name'] = $row['goods_name'];
$goods[$idx]['brief'] = $row['goods_brief'];
$goods[$idx]['brand_name'] = $row['brand_name'];
$goods[$idx]['goods_style_name'] = add_style($row['goods_name'],$row['goods_name_style']);
$goods[$idx]['short_name'] = $GLOBALS['_CFG']['goods_name_length'] > 0 ? sub_str($row['goods_name'], $GLOBALS['_CFG']['goods_name_length']) : $row['goods_name'];
$goods[$idx]['short_style_name'] = add_style($goods[$idx]['short_name'],$row['goods_name_style']);
$goods[$idx]['market_price'] = price_format($row['market_price']);
$goods[$idx]['shop_price'] = price_format($row['shop_price']);
$goods[$idx]['thumb'] = get_image_path($row['goods_id'], $row['goods_thumb'], true);
$goods[$idx]['goods_img'] = get_image_path($row['goods_id'], $row['goods_img']);
$goods[$idx]['url'] = build_uri('goods', array('gid' => $row['goods_id']), $row['goods_name']);
}
return $goods;
}
?> | zzshop | trunk/mobile/goods_list.php | PHP | asf20 | 13,486 |
<?php
/**
* ECSHOP mobile首页
* ============================================================================
* 版权所有 2005-2010 上海商派网络科技有限公司,并保留所有权利。
* 网站地址: http://www.ecshop.com;
* ----------------------------------------------------------------------------
* 这不是一个自由软件!您只能在不用于商业目的的前提下对程序代码进行修改和
* 使用;不允许对程序代码以任何形式任何目的的再发布。
* ============================================================================
* $Author: liuhui $
* $Id: index.php 15013 2010-03-25 09:31:42Z liuhui $
*/
define('IN_ECS', true);
define('ECS_ADMIN', true);
require(dirname(__FILE__) . '/includes/init.php');
$best_goods = get_recommend_goods('best');
$best_num = count($best_goods);
$smarty->assign('best_num' , $best_num);
if ($best_num > 0)
{
$i = 0;
foreach ($best_goods as $key => $best_data)
{
$best_goods[$key]['shop_price'] = encode_output($best_data['shop_price']);
$best_goods[$key]['name'] = encode_output($best_data['name']);
/*if ($i > 2)
{
break;
}*/
$i++;
}
$smarty->assign('best_goods' , $best_goods);
}
/* 热门商品 */
$hot_goods = get_recommend_goods('hot');
$hot_num = count($hot_goods);
$smarty->assign('hot_num' , $hot_num);
if ($hot_num > 0)
{
$i = 0;
foreach ($hot_goods as $key => $hot_data)
{
$hot_goods[$key]['shop_price'] = encode_output($hot_data['shop_price']);
$hot_goods[$key]['name'] = encode_output($hot_data['name']);
/*if ($i > 2)
{
break;
}*/
$i++;
}
$smarty->assign('hot_goods' , $hot_goods);
}
$promote_goods = get_promote_goods();
$promote_num = count($promote_goods);
$smarty->assign('promote_num' , $promote_num);
if ($promote_num > 0)
{
$i = 0;
foreach ($promote_goods as $key => $promote_data)
{
$promote_goods[$key]['shop_price'] = encode_output($promote_data['shop_price']);
$promote_goods[$key]['name'] = encode_output($promote_data['name']);
/*if ($i > 2)
{
break;
}*/
$i++;
}
$smarty->assign('promote_goods' , $promote_goods);
}
$pcat_array = get_categories_tree();
foreach ($pcat_array as $key => $pcat_data)
{
$pcat_array[$key]['name'] = encode_output($pcat_data['name']);
if ($pcat_data['cat_id'])
{
if (count($pcat_data['cat_id']) > 3)
{
$pcat_array[$key]['cat_id'] = array_slice($pcat_data['cat_id'], 0, 3);
}
foreach ($pcat_array[$key]['cat_id'] as $k => $v)
{
$pcat_array[$key]['cat_id'][$k]['name'] = encode_output($v['name']);
}
}
}
$smarty->assign('pcat_array' , $pcat_array);
$brands_array = get_brands();
if (!empty($brands_array))
{
if (count($brands_array) > 3)
{
$brands_array = array_slice($brands_array, 0, 10);
}
foreach ($brands_array as $key => $brands_data)
{
$brands_array[$key]['brand_name'] = encode_output($brands_data['brand_name']);
}
$smarty->assign('brand_array', $brands_array);
}
$article_array = $db->GetALLCached("SELECT article_id, title FROM " . $ecs->table("article") . " WHERE cat_id != 0 AND is_open = 1 AND open_type = 0 ORDER BY article_id DESC LIMIT 0,4");
if (!empty($article_array))
{
foreach ($article_array as $key => $article_data)
{
$article_array[$key]['title'] = encode_output($article_data['title']);
}
$smarty->assign('article_array', $article_array);
}
if ($_SESSION['user_id'] > 0)
{
$smarty->assign('user_name', $_SESSION['user_name']);
}
if (!empty($GLOBALS['_CFG']['search_keywords']))
{
$searchkeywords = explode(',', trim($GLOBALS['_CFG']['search_keywords']));
}
else
{
$searchkeywords = array();
}
$smarty->assign('searchkeywords', $searchkeywords);
$smarty->assign('wap_logo', $_CFG['wap_logo']);
$smarty->assign('footer', get_footer());
$smarty->display("index.html");
?>
| zzshop | trunk/mobile/index.php | PHP | asf20 | 4,209 |
<?php
/**
* ECSHOP 文章
* ============================================================================
* 版权所有 2005-2010 上海商派网络科技有限公司,并保留所有权利。
* 网站地址: http://www.ecshop.com;
* ----------------------------------------------------------------------------
* 这不是一个自由软件!您只能在不用于商业目的的前提下对程序代码进行修改和
* 使用;不允许对程序代码以任何形式任何目的的再发布。
* ============================================================================
* $Author: liubo $
* $Id: article.php 16455 2009-07-13 09:57:19Z liubo $
*/
define('IN_ECS', true);
require(dirname(__FILE__) . '/includes/init.php');
$act = !empty($_GET['act']) ? $_GET['act'] : '';
/* 文章详细 */
if ($act == 'detail')
{
$a_id = !empty($_GET['a_id']) ? intval($_GET['a_id']) : '';
if ($a_id > 0)
{
$article_row = $db->getRow('SELECT title, content FROM ' . $ecs->table('article') . ' WHERE article_id = ' . $a_id . ' AND cat_id > 0 AND is_open = 1');
if (!empty($article_row))
{
$article_row['title'] = encode_output($article_row['title']);
$replace_tag = array('<br />' , '<br/>' , '<br>' , '</p>');
$article_row['content'] = htmlspecialchars_decode(encode_output($article_row['content']));
$article_row['content'] = str_replace($replace_tag, '{br}' , $article_row['content']);
$article_row['content'] = strip_tags($article_row['content']);
$article_row['content'] = str_replace('{br}' , '<br />' , $article_row['content']);
$smarty->assign('article_data', $article_row);
}
}
$smarty->display('article.html');
}
/* 文章列表 */
else
{
$article_num = $db->getOne("SELECT count(*) FROM " . $ecs->table('article') . " WHERE cat_id > 0 AND is_open = 1");
if ($article_num > 0)
{
$page_num = '10';
$page = !empty($_GET['page']) ? intval($_GET['page']) : 1;
$pages = ceil($article_num / $page_num);
if ($page <= 0)
{
$page = 1;
}
if ($pages == 0)
{
$pages = 1;
}
if ($page > $pages)
{
$page = $pages;
}
$pagebar = get_wap_pager($article_num, $page_num, $page, 'article.php', 'page');
$smarty->assign('pagebar', $pagebar);
include_once(ROOT_PATH . '/includes/lib_article.php');
$article_array = get_cat_articles(-1, $page, $page_num);
$i = 1;
foreach ($article_array as $key => $article_data)
{
$article_array[$key]['i'] = $i;
$article_array[$key]['title'] = encode_output($article_data['title']);
$i++;
}
$smarty->assign('article_array', $article_array);
}
$smarty->display('article_list.html');
}
?> | zzshop | trunk/mobile/article.php | PHP | asf20 | 2,991 |
<?php
/**
* ECSHOP 商品页
* ============================================================================
* 版权所有 2005-2010 上海商派网络科技有限公司,并保留所有权利。
* 网站地址: http://www.ecshop.com;
* ----------------------------------------------------------------------------
* 这不是一个自由软件!您只能在不用于商业目的的前提下对程序代码进行修改和
* 使用;不允许对程序代码以任何形式任何目的的再发布。
* ============================================================================
* $Author: testyang $
* $Id: buy.php 15013 2008-10-23 09:31:42Z testyang $
*/
define('IN_ECS', true);
include_once(dirname(__FILE__) . '/includes/init.php');
include_once(ROOT_PATH . 'includes/lib_order.php');
$act = isset($_REQUEST['act']) ? $_REQUEST['act'] : '';
if ($_SESSION['user_id'] > 0)
{
$smarty->assign('user_name', $_SESSION['user_name']);
}
if($act != 'checkout' && $act != 'consignee')
{
$goods_id = isset($_REQUEST['id']) ? $_REQUEST['id']:'';
if($goods_id)
{
clear_cart();
$_LANG['shortage'] = "对不起,该商品已经库存不足暂停销售。\n你现在要进行缺货登记来预订该商品吗?";
if(!addto_cart($goods_id))
{
echo '购买失败,请重新购买!';
}
else
{
$goods_order = 1;
ecs_header("Location: buy.php?act=checkout");
exit;
}
}
else
{
echo '参数错误!';
$Loaction = 'index.php';
ecs_header("Location: $Loaction\n");
}
}
elseif($act == 'checkout' || $act == 'consignee')
{
if ($_SESSION['user_id'] > 0)
{
$act = 'consignee';
}
if($act == 'consignee')
{
include_once('includes/lib_transaction.php');
/*
* 收货人信息填写界面
*/
if (isset($_REQUEST['direct_shopping']))
{
$_SESSION['direct_shopping'] = 1;
}
/* 取得国家列表、商店所在国家、商店所在国家的省列表 */
$smarty->assign('country_list', get_regions());
$smarty->assign('shop_country', $_CFG['shop_country']);
$smarty->assign('shop_province_list', get_regions(1, $_CFG['shop_country']));
$consignee_list = get_consignee_list($_SESSION['user_id']);
/* 取得每个收货地址的省市区列表 */
$province_list = array();
$city_list = array();
$district_list = array();
foreach ($consignee_list as $region_id => $consignee)
{
$consignee['country'] = isset($consignee['country']) ? intval($consignee['country']) : 0;
$consignee['province'] = isset($consignee['province']) ? intval($consignee['province']) : 0;
$consignee['city'] = isset($consignee['city']) ? intval($consignee['city']) : 0;
$province_list = get_regions(1, $consignee['country']);
$city_list = get_regions(2, $consignee['province']);
$district_list = get_regions(3, $consignee['city']);
}
$smarty->assign('buy_type', 1);
$smarty->assign('province_list', $province_list);
$smarty->assign('city_list', $city_list);
$smarty->assign('district_list', $district_list);
}
}
$smarty->assign('footer', get_footer());
$smarty->display('buy.html');
?> | zzshop | trunk/mobile/buy.php | PHP | asf20 | 3,673 |
<?php
/**
* ECSHOP 报价单
* ============================================================================
* 版权所有 2005-2010 上海商派网络科技有限公司,并保留所有权利。
* 网站地址: http://www.ecshop.com;
* ----------------------------------------------------------------------------
* 这不是一个自由软件!您只能在不用于商业目的的前提下对程序代码进行修改和
* 使用;不允许对程序代码以任何形式任何目的的再发布。
* ============================================================================
* $Author: liuhui $
* $Id: quotation.php 17063 2010-03-25 06:35:46Z liuhui $
*/
define('IN_ECS', true);
require(dirname(__FILE__) . '/includes/init.php');
$action = isset($_REQUEST['act']) ? trim($_REQUEST['act']) : 'default';
if ($action == 'print_quotation')
{
$smarty->template_dir = DATA_DIR;
$smarty->assign('shop_name', $_CFG['shop_title']);
$smarty->assign('cfg', $_CFG);
$where = get_quotation_where($_POST);
$sql = "SELECT g.goods_id, g.goods_name, g.shop_price, g.goods_number, c.cat_name AS goods_category".
" FROM " . $ecs->table('goods') . " AS g LEFT JOIN " . $ecs->table('category') . " AS c ON g.cat_id = c.cat_id " . $where . " AND is_on_sale = 1 AND is_alone_sale = 1";
$goods_list = $db->getAll($sql);
$user_rank = $db->getAll("SELECT * FROM " .$ecs->table('user_rank') . "WHERE show_price = 1 OR rank_id = '$_SESSION[user_rank]'");
$rank_point = 0;
if (!empty($_SESSION['user_id']))
{
$rank_point = $db->getOne("SELECT rank_points FROM " . $ecs->table('users') . " WHERE user_id = '$_SESSION[user_id]'");
}
$user_rank = calc_user_rank($user_rank, $rank_point);
$user_men = serve_user($goods_list);
$smarty->assign('extend_price', $user_rank['ext_price']);
$smarty->assign('extend_rank', $user_men);
$smarty->assign('goods_list', $goods_list);
$html = $smarty->fetch('quotation_print.html');
exit($html);
}
assign_template();
$position = assign_ur_here(0, $_LANG['quotation']);
$smarty->assign('page_title', $position['title']); // 页面标题
$smarty->assign('ur_here', $position['ur_here']); // 当前位置
$smarty->assign('cat_list', cat_list());
$smarty->assign('brand_list', get_brand_list());
if (is_null($smarty->get_template_vars('helps')))
{
$smarty->assign('helps', get_shop_help()); // 网店帮助
}
$smarty->display('quotation.dwt');
function get_quotation_where($filter)
{
include_once(ROOT_PATH . ADMIN_PATH . '/includes/lib_main.php');
$_filter = new StdClass();
$_filter->cat_id = $filter['cat_id'];
$_filter->brand_id = $filter['brand_id'];
$_filter->keyword = $filter['keyword'];
$where = get_where_sql($_filter);
return $where;
}
function calc_user_rank($rank, $rank_point)
{
$_tmprank = array();
foreach($rank as $_rank)
{
if ($_rank['show_price'])
{
$_tmprank['ext_price'][] = $_rank['rank_name'];
$_tmprank['ext_rank'][] = $_rank['discount'];
}
else
{
if (!empty($_SESSION['user_id']) && ($rank_point >= $_rank['min_points']))
{
$_tmprank['ext_price'][] = $_rank['rank_name'];
$_tmprank['ext_rank'][] = $_rank['discount'];
}
}
}
return $_tmprank;
}
function serve_user($goods_list)
{
foreach ( $goods_list as $all_list )
{
$goods_id = $all_list['goods_id'];
$price = $all_list['shop_price'];
$sql = "SELECT rank_id, IFNULL(mp.user_price, r.discount * $price / 100) AS price, r.rank_name, r.discount " .
'FROM ' . $GLOBALS['ecs']->table('user_rank') . ' AS r ' .
'LEFT JOIN ' . $GLOBALS['ecs']->table('member_price') . " AS mp ".
"ON mp.goods_id = '$goods_id' AND mp.user_rank = r.rank_id " .
"WHERE r.show_price = 1 OR r.rank_id = '$_SESSION[user_rank]'";
$res = $GLOBALS['db']->getAll($sql);
foreach ( $res as $row )
{
$arr[$row['rank_id']] = array(
'rank_name' => htmlspecialchars($row['rank_name']),
'price' => price_format($row['price']));
}
$arr_list[$goods_id] = $arr;
}
return $arr_list;
}
?> | zzshop | trunk/quotation.php | PHP | asf20 | 4,460 |
<?php
if (!defined('IN_ECS'))
{
die('Hacking attempt');
}
error_reporting(E_ALL);
if (__FILE__ == '')
{
die('Fatal error code: 0');
}
/* 取得当前ecshop所在的根目录 */
define('ROOT_PATH', str_replace('includes/init.php', '', str_replace('\\', '/', __FILE__)));
if (!file_exists(ROOT_PATH . 'data/install.lock') && !file_exists(ROOT_PATH . 'includes/install.lock')
&& !defined('NO_CHECK_INSTALL'))
{
header("Location: ./install/index.php\n");
exit;
}
/* 初始化设置 */
@ini_set('memory_limit', '64M');
@ini_set('session.cache_expire', 180);
@ini_set('session.use_trans_sid', 0);
@ini_set('session.use_cookies', 1);
@ini_set('session.auto_start', 0);
@ini_set('display_errors', 1);
if (DIRECTORY_SEPARATOR == '\\')
{
@ini_set('include_path', '.;' . ROOT_PATH);
}
else
{
@ini_set('include_path', '.:' . ROOT_PATH);
}
require(ROOT_PATH . 'data/config.php');
if (defined('DEBUG_MODE') == false)
{
define('DEBUG_MODE', 0);
}
if (PHP_VERSION >= '5.1' && !empty($timezone))
{
date_default_timezone_set($timezone);
}
$php_self = isset($_SERVER['PHP_SELF']) ? $_SERVER['PHP_SELF'] : $_SERVER['SCRIPT_NAME'];
if ('/' == substr($php_self, -1))
{
$php_self .= 'index.php';
}
define('PHP_SELF', $php_self);
require(ROOT_PATH . 'includes/inc_constant.php');
require(ROOT_PATH . 'includes/cls_ecshop.php');
require(ROOT_PATH . 'includes/cls_error.php');
require(ROOT_PATH . 'includes/lib_time.php');
require(ROOT_PATH . 'includes/lib_base.php');
require(ROOT_PATH . 'includes/lib_common.php');
require(ROOT_PATH . 'includes/lib_main.php');
require(ROOT_PATH . 'includes/lib_insert.php');
require(ROOT_PATH . 'includes/lib_goods.php');
require(ROOT_PATH . 'includes/lib_article.php');
/* 对用户传入的变量进行转义操作。*/
if (!get_magic_quotes_gpc())
{
if (!empty($_GET))
{
$_GET = addslashes_deep($_GET);
}
if (!empty($_POST))
{
$_POST = addslashes_deep($_POST);
}
$_COOKIE = addslashes_deep($_COOKIE);
$_REQUEST = addslashes_deep($_REQUEST);
}
/* 创建 ECSHOP 对象 */
$ecs = new ECS($db_name, $prefix);
define('DATA_DIR', $ecs->data_dir());
define('IMAGE_DIR', $ecs->image_dir());
/* 初始化数据库类 */
require(ROOT_PATH . 'includes/cls_mysql.php');
$db = new cls_mysql($db_host, $db_user, $db_pass, $db_name);
$db->set_disable_cache_tables(array($ecs->table('sessions'), $ecs->table('sessions_data'), $ecs->table('cart')));
$db_host = $db_user = $db_pass = $db_name = NULL;
/* 创建错误处理对象 */
$err = new ecs_error('message.dwt');
/* 载入系统参数 */
$_CFG = load_config();
/* 载入语言文件 */
require(ROOT_PATH . 'languages/' . $_CFG['lang'] . '/common.php');
if ($_CFG['shop_closed'] == 1)
{
/* 商店关闭了,输出关闭的消息 */
header('Content-type: text/html; charset='.EC_CHARSET);
die('<div style="margin: 150px; text-align: center; font-size: 14px"><p>' . $_LANG['shop_closed'] . '</p><p>' . $_CFG['close_comment'] . '</p></div>');
}
if (is_spider())
{
/* 如果是蜘蛛的访问,那么默认为访客方式,并且不记录到日志中 */
if (!defined('INIT_NO_USERS'))
{
define('INIT_NO_USERS', true);
/* 整合UC后,如果是蜘蛛访问,初始化UC需要的常量 */
if($_CFG['integrate_code'] == 'ucenter')
{
$user = & init_users();
}
}
$_SESSION = array();
$_SESSION['user_id'] = 0;
$_SESSION['user_name'] = '';
$_SESSION['email'] = '';
$_SESSION['user_rank'] = 0;
$_SESSION['discount'] = 1.00;
}
if (!defined('INIT_NO_USERS'))
{
/* 初始化session */
include(ROOT_PATH . 'includes/cls_session.php');
$sess = new cls_session($db, $ecs->table('sessions'), $ecs->table('sessions_data'));
define('SESS_ID', $sess->get_session_id());
}
if (!defined('INIT_NO_SMARTY'))
{
header('Cache-control: private');
header('Content-type: text/html; charset='.EC_CHARSET);
/* 创建 Smarty 对象。*/
require(ROOT_PATH . 'includes/cls_template.php');
$smarty = new cls_template;
$smarty->cache_lifetime = $_CFG['cache_time'];
$smarty->template_dir = ROOT_PATH . 'themes/' . $_CFG['template'];
$smarty->cache_dir = ROOT_PATH . 'temp/caches';
$smarty->compile_dir = ROOT_PATH . 'temp/compiled';
if ((DEBUG_MODE & 2) == 2)
{
$smarty->direct_output = true;
$smarty->force_compile = true;
}
else
{
$smarty->direct_output = false;
$smarty->force_compile = false;
}
$smarty->assign('lang', $_LANG);
$smarty->assign('ecs_charset', EC_CHARSET);
if (!empty($_CFG['stylename']))
{
$smarty->assign('ecs_css_path', 'themes/' . $_CFG['template'] . '/style_' . $_CFG['stylename'] . '.css');
}
else
{
$smarty->assign('ecs_css_path', 'themes/' . $_CFG['template'] . '/style.css');
}
}
if (!defined('INIT_NO_USERS'))
{
/* 会员信息 */
$user =& init_users();
if (!isset($_SESSION['user_id']))
{
/* 获取投放站点的名称 */
$site_name = isset($_GET['from']) ? $_GET['from'] : addslashes($_LANG['self_site']);
$from_ad = !empty($_GET['ad_id']) ? intval($_GET['ad_id']) : 0;
$_SESSION['from_ad'] = $from_ad; // 用户点击的广告ID
$_SESSION['referer'] = stripslashes($site_name); // 用户来源
unset($site_name);
if (!defined('INGORE_VISIT_STATS'))
{
visit_stats();
}
}
if (empty($_SESSION['user_id']))
{
if ($user->get_cookie())
{
/* 如果会员已经登录并且还没有获得会员的帐户余额、积分以及优惠券 */
if ($_SESSION['user_id'] > 0)
{
update_user_info();
}
}
else
{
$_SESSION['user_id'] = 0;
$_SESSION['user_name'] = '';
$_SESSION['email'] = '';
$_SESSION['user_rank'] = 0;
$_SESSION['discount'] = 1.00;
if (!isset($_SESSION['login_fail']))
{
$_SESSION['login_fail'] = 0;
}
}
}
/* 设置推荐会员 */
if (isset($_GET['u']))
{
set_affiliate();
}
/* session 不存在,检查cookie */
if (!empty($_COOKIE['ECS']['user_id']) && !empty($_COOKIE['ECS']['password']))
{
// 找到了cookie, 验证cookie信息
$sql = 'SELECT user_id, user_name, password ' .
' FROM ' .$ecs->table('users') .
" WHERE user_id = '" . intval($_COOKIE['ECS']['user_id']) . "' AND password = '" .$_COOKIE['ECS']['password']. "'";
$row = $db->GetRow($sql);
if (!$row)
{
// 没有找到这个记录
$time = time() - 3600;
setcookie("ECS[user_id]", '', $time, '/');
setcookie("ECS[password]", '', $time, '/');
}
else
{
$_SESSION['user_id'] = $row['user_id'];
$_SESSION['user_name'] = $row['user_name'];
update_user_info();
}
}
if (isset($smarty))
{
$smarty->assign('ecs_session', $_SESSION);
}
}
if ((DEBUG_MODE & 1) == 1)
{
error_reporting(E_ALL);
}
else
{
error_reporting(E_ALL ^ E_NOTICE);
}
if ((DEBUG_MODE & 4) == 4)
{
include(ROOT_PATH . 'includes/lib.debug.php');
}
/* 判断是否支持 Gzip 模式 */
if (!defined('INIT_NO_SMARTY') && gzip_enabled())
{
ob_start('ob_gzhandler');
}
else
{
ob_start();
}
?> | zzshop | trunk/includes/init.php | PHP | asf20 | 7,927 |
<?php
/**
* ECSHOP 支付插件排序文件
* ============================================================================
* 版权所有 2005-2010 上海商派网络科技有限公司,并保留所有权利。
* 网站地址: http://www.ecshop.com;
* ----------------------------------------------------------------------------
* 这不是一个自由软件!您只能在不用于商业目的的前提下对程序代码进行修改和
* 使用;不允许对程序代码以任何形式任何目的的再发布。
* ============================================================================
* $Author: liuhui $
* $Id: lib_compositor.php 2009-07-24 09:31:42Z liuhui $
*/
if(isset($modules))
{
/* 将财付通提升至第二个显示 */
foreach ($modules as $k =>$v)
{
if($v['pay_code'] == 'tenpay')
{
$tenpay = $modules[$k];
unset($modules[$k]);
array_unshift($modules, $tenpay);
}
}
/* 将快钱直连银行显示在快钱之后 */
foreach ($modules as $k =>$v)
{
if(strpos($v['pay_code'], 'kuaiqian')!== false)
{
$tenpay = $modules[$k];
unset($modules[$k]);
array_unshift($modules, $tenpay);
}
}
/* 将快钱提升至第一个显示 */
foreach ($modules as $k =>$v)
{
if($v['pay_code'] == 'kuaiqian')
{
$tenpay = $modules[$k];
unset($modules[$k]);
array_unshift($modules, $tenpay);
}
}
}
?> | zzshop | trunk/includes/lib_compositor.php | PHP | asf20 | 1,594 |
<?php
/**
* ECSHOP 用户交易相关函数库
* ============================================================================
* 版权所有 2005-2010 上海商派网络科技有限公司,并保留所有权利。
* 网站地址: http://www.ecshop.com;
* ----------------------------------------------------------------------------
* 这不是一个自由软件!您只能在不用于商业目的的前提下对程序代码进行修改和
* 使用;不允许对程序代码以任何形式任何目的的再发布。
* ============================================================================
* $Author: liuhui $
* $Id: lib_transaction.php 17063 2010-03-25 06:35:46Z liuhui $
*/
if (!defined('IN_ECS'))
{
die('Hacking attempt');
}
/**
* 修改个人资料(Email, 性别,生日)
*
* @access public
* @param array $profile array_keys(user_id int, email string, sex int, birthday string);
*
* @return boolen $bool
*/
function edit_profile($profile)
{
if (empty($profile['user_id']))
{
$GLOBALS['err']->add($GLOBALS['_LANG']['not_login']);
return false;
}
$cfg = array();
$cfg['username'] = $GLOBALS['db']->getOne("SELECT user_name FROM " . $GLOBALS['ecs']->table('users') . " WHERE user_id='" . $profile['user_id'] . "'");
if (isset($profile['sex']))
{
$cfg['gender'] = intval($profile['sex']);
}
if (!empty($profile['email']))
{
if (!is_email($profile['email']))
{
$GLOBALS['err']->add(sprintf($GLOBALS['_LANG']['email_invalid'], $profile['email']));
return false;
}
$cfg['email'] = $profile['email'];
}
if (!empty($profile['birthday']))
{
$cfg['bday'] = $profile['birthday'];
}
if (!$GLOBALS['user']->edit_user($cfg))
{
if ($GLOBALS['user']->error == ERR_EMAIL_EXISTS)
{
$GLOBALS['err']->add(sprintf($GLOBALS['_LANG']['email_exist'], $profile['email']));
}
else
{
$GLOBALS['err']->add('DB ERROR!');
}
return false;
}
/* 过滤非法的键值 */
$other_key_array = array('msn', 'qq', 'office_phone', 'home_phone', 'mobile_phone');
foreach ($profile['other'] as $key => $val)
{
//删除非法key值
if (!in_array($key, $other_key_array))
{
unset($profile['other'][$key]);
}
else
{
$profile['other'][$key] = htmlspecialchars(trim($val)); //防止用户输入javascript代码
}
}
/* 修改在其他资料 */
if (!empty($profile['other']))
{
$GLOBALS['db']->autoExecute($GLOBALS['ecs']->table('users'), $profile['other'], 'UPDATE', "user_id = '$profile[user_id]'");
}
return true;
}
/**
* 获取用户帐号信息
*
* @access public
* @param int $user_id 用户user_id
*
* @return void
*/
function get_profile($user_id)
{
global $user;
/* 会员帐号信息 */
$info = array();
$infos = array();
$sql = "SELECT user_name, birthday, sex, question, answer, rank_points, pay_points,user_money, user_rank,".
" msn, qq, office_phone, home_phone, mobile_phone, passwd_question, passwd_answer ".
"FROM " .$GLOBALS['ecs']->table('users') . " WHERE user_id = '$user_id'";
$infos = $GLOBALS['db']->getRow($sql);
$infos['user_name'] = addslashes($infos['user_name']);
$row = $user->get_profile_by_name($infos['user_name']); //获取用户帐号信息
$_SESSION['email'] = $row['email']; //注册SESSION
/* 会员等级 */
if ($infos['user_rank'] > 0)
{
$sql = "SELECT rank_id, rank_name, discount FROM ".$GLOBALS['ecs']->table('user_rank') .
" WHERE rank_id = '$infos[user_rank]'";
}
else
{
$sql = "SELECT rank_id, rank_name, discount, min_points".
" FROM ".$GLOBALS['ecs']->table('user_rank') .
" WHERE min_points<= " . intval($infos['rank_points']) . " ORDER BY min_points DESC";
}
if ($row = $GLOBALS['db']->getRow($sql))
{
$info['rank_name'] = $row['rank_name'];
}
else
{
$info['rank_name'] = $GLOBALS['_LANG']['undifine_rank'];
}
$cur_date = date('Y-m-d H:i:s');
/* 会员红包 */
$bonus = array();
$sql = "SELECT type_name, type_money ".
"FROM " .$GLOBALS['ecs']->table('bonus_type') . " AS t1, " .$GLOBALS['ecs']->table('user_bonus') . " AS t2 ".
"WHERE t1.type_id = t2.bonus_type_id AND t2.user_id = '$user_id' AND t1.use_start_date <= '$cur_date' ".
"AND t1.use_end_date > '$cur_date' AND t2.order_id = 0";
$bonus = $GLOBALS['db']->getAll($sql);
if ($bonus)
{
for ($i = 0, $count = count($bonus); $i < $count; $i++)
{
$bonus[$i]['type_money'] = price_format($bonus[$i]['type_money'], false);
}
}
$info['discount'] = $_SESSION['discount'] * 100 . "%";
$info['email'] = $_SESSION['email'];
$info['user_name'] = $_SESSION['user_name'];
$info['rank_points'] = isset($infos['rank_points']) ? $infos['rank_points'] : '';
$info['pay_points'] = isset($infos['pay_points']) ? $infos['pay_points'] : 0;
$info['user_money'] = isset($infos['user_money']) ? $infos['user_money'] : 0;
$info['sex'] = isset($infos['sex']) ? $infos['sex'] : 0;
$info['birthday'] = isset($infos['birthday']) ? $infos['birthday'] : '';
$info['question'] = isset($infos['question']) ? htmlspecialchars($infos['question']) : '';
$info['user_money'] = price_format($info['user_money'], false);
$info['pay_points'] = $info['pay_points'] . $GLOBALS['_CFG']['integral_name'];
$info['bonus'] = $bonus;
$info['qq'] = $infos['qq'];
$info['msn'] = $infos['msn'];
$info['office_phone']= $infos['office_phone'];
$info['home_phone'] = $infos['home_phone'];
$info['mobile_phone'] = $infos['mobile_phone'];
$info['passwd_question'] = $infos['passwd_question'];
$info['passwd_answer'] = $infos['passwd_answer'];
return $info;
}
/**
* 取得收货人地址列表
* @param int $user_id 用户编号
* @return array
*/
function get_consignee_list($user_id)
{
$sql = "SELECT * FROM " . $GLOBALS['ecs']->table('user_address') .
" WHERE user_id = '$user_id' LIMIT 5";
return $GLOBALS['db']->getAll($sql);
}
/**
* 给指定用户添加一个指定红包
*
* @access public
* @param int $user_id 用户ID
* @param string $bouns_sn 红包序列号
*
* @return boolen $result
*/
function add_bonus($user_id, $bouns_sn)
{
if (empty($user_id))
{
$GLOBALS['err']->add($GLOBALS['_LANG']['not_login']);
return false;
}
/* 查询红包序列号是否已经存在 */
$sql = "SELECT bonus_id, bonus_sn, user_id, bonus_type_id FROM " .$GLOBALS['ecs']->table('user_bonus') .
" WHERE bonus_sn = '$bouns_sn'";
$row = $GLOBALS['db']->getRow($sql);
if ($row)
{
if ($row['user_id'] == 0)
{
//红包没有被使用
$sql = "SELECT send_end_date, use_end_date ".
" FROM " . $GLOBALS['ecs']->table('bonus_type') .
" WHERE type_id = '" . $row['bonus_type_id'] . "'";
$bonus_time = $GLOBALS['db']->getRow($sql);
$now = gmtime();
if ($now > $bonus_time['use_end_date'])
{
$GLOBALS['err']->add($GLOBALS['_LANG']['bonus_use_expire']);
return false;
}
$sql = "UPDATE " .$GLOBALS['ecs']->table('user_bonus') . " SET user_id = '$user_id' ".
"WHERE bonus_id = '$row[bonus_id]'";
$result = $GLOBALS['db'] ->query($sql);
if ($result)
{
return true;
}
else
{
return $GLOBALS['db']->errorMsg();
}
}
else
{
if ($row['user_id']== $user_id)
{
//红包已经添加过了。
$GLOBALS['err']->add($GLOBALS['_LANG']['bonus_is_used']);
}
else
{
//红包被其他人使用过了。
$GLOBALS['err']->add($GLOBALS['_LANG']['bonus_is_used_by_other']);
}
return false;
}
}
else
{
//红包不存在
$GLOBALS['err']->add($GLOBALS['_LANG']['bonus_not_exist']);
return false;
}
}
/**
* 获取用户指定范围的订单列表
*
* @access public
* @param int $user_id 用户ID号
* @param int $num 列表最大数量
* @param int $start 列表起始位置
* @return array $order_list 订单列表
*/
function get_user_orders($user_id, $num = 10, $start = 0)
{
/* 取得订单列表 */
$arr = array();
$sql = "SELECT order_id, order_sn, order_status, shipping_status, pay_status, add_time, " .
"(goods_amount + shipping_fee + insure_fee + pay_fee + pack_fee + card_fee + tax - discount) AS total_fee ".
" FROM " .$GLOBALS['ecs']->table('order_info') .
" WHERE user_id = '$user_id' ORDER BY add_time DESC";
$res = $GLOBALS['db']->SelectLimit($sql, $num, $start);
while ($row = $GLOBALS['db']->fetchRow($res))
{
if ($row['order_status'] == OS_UNCONFIRMED)
{
$row['handler'] = "<a href=\"user.php?act=cancel_order&order_id=" .$row['order_id']. "\" onclick=\"if (!confirm('".$GLOBALS['_LANG']['confirm_cancel']."')) return false;\">".$GLOBALS['_LANG']['cancel']."</a>";
}
else if ($row['order_status'] == OS_SPLITED)
{
/* 对配送状态的处理 */
if ($row['shipping_status'] == SS_SHIPPED)
{
@$row['handler'] = "<a href=\"user.php?act=affirm_received&order_id=" .$row['order_id']. "\" onclick=\"if (!confirm('".$GLOBALS['_LANG']['confirm_received']."')) return false;\">".$GLOBALS['_LANG']['received']."</a>";
}
elseif ($row['shipping_status'] == SS_RECEIVED)
{
@$row['handler'] = '<span style="color:red">'.$GLOBALS['_LANG']['ss_received'] .'</span>';
}
else
{
if ($row['pay_status'] == PS_UNPAYED)
{
@$row['handler'] = "<a href=\"user.php?act=order_detail&order_id=" .$row['order_id']. '">' .$GLOBALS['_LANG']['pay_money']. '</a>';
}
else
{
@$row['handler'] = "<a href=\"user.php?act=order_detail&order_id=" .$row['order_id']. '">' .$GLOBALS['_LANG']['view_order']. '</a>';
}
}
}
else
{
$row['handler'] = '<span style="color:red">'.$GLOBALS['_LANG']['os'][$row['order_status']] .'</span>';
}
$row['shipping_status'] = ($row['shipping_status'] == SS_SHIPPED_ING) ? SS_PREPARING : $row['shipping_status'];
$row['order_status'] = $GLOBALS['_LANG']['os'][$row['order_status']] . ',' . $GLOBALS['_LANG']['ps'][$row['pay_status']] . ',' . $GLOBALS['_LANG']['ss'][$row['shipping_status']];
$arr[] = array('order_id' => $row['order_id'],
'order_sn' => $row['order_sn'],
'order_time' => local_date($GLOBALS['_CFG']['time_format'], $row['add_time']),
'order_status' => $row['order_status'],
'total_fee' => price_format($row['total_fee'], false),
'handler' => $row['handler']);
}
return $arr;
}
/**
* 取消一个用户订单
*
* @access public
* @param int $order_id 订单ID
* @param int $user_id 用户ID
*
* @return void
*/
function cancel_order($order_id, $user_id = 0)
{
/* 查询订单信息,检查状态 */
$sql = "SELECT user_id, order_id, order_sn , surplus , integral , bonus_id, order_status, shipping_status, pay_status FROM " .$GLOBALS['ecs']->table('order_info') ." WHERE order_id = '$order_id'";
$order = $GLOBALS['db']->GetRow($sql);
if (empty($order))
{
$GLOBALS['err']->add($GLOBALS['_LANG']['order_exist']);
return false;
}
// 如果用户ID大于0,检查订单是否属于该用户
if ($user_id > 0 && $order['user_id'] != $user_id)
{
$GLOBALS['err'] ->add($GLOBALS['_LANG']['no_priv']);
return false;
}
// 订单状态只能是“未确认”或“已确认”
if ($order['order_status'] != OS_UNCONFIRMED && $order['order_status'] != OS_CONFIRMED)
{
$GLOBALS['err']->add($GLOBALS['_LANG']['current_os_not_unconfirmed']);
return false;
}
//订单一旦确认,不允许用户取消
if ( $order['order_status'] == OS_CONFIRMED)
{
$GLOBALS['err']->add($GLOBALS['_LANG']['current_os_already_confirmed']);
return false;
}
// 发货状态只能是“未发货”
if ($order['shipping_status'] != SS_UNSHIPPED)
{
$GLOBALS['err']->add($GLOBALS['_LANG']['current_ss_not_cancel']);
return false;
}
// 如果付款状态是“已付款”、“付款中”,不允许取消,要取消和商家联系
if ($order['pay_status'] != PS_UNPAYED)
{
$GLOBALS['err']->add($GLOBALS['_LANG']['current_ps_not_cancel']);
return false;
}
//将用户订单设置为取消
$sql = "UPDATE ".$GLOBALS['ecs']->table('order_info') ." SET order_status = '".OS_CANCELED."' WHERE order_id = '$order_id'";
if ($GLOBALS['db']->query($sql))
{
/* 记录log */
order_action($order['order_sn'], OS_CANCELED, $order['shipping_status'], PS_UNPAYED,$GLOBALS['_LANG']['buyer_cancel'],'buyer');
/* 退货用户余额、积分、红包 */
if ($order['user_id'] > 0 && $order['surplus'] > 0)
{
$change_desc = sprintf($GLOBALS['_LANG']['return_surplus_on_cancel'], $order['order_sn']);
log_account_change($order['user_id'], $order['surplus'], 0, 0, 0, $change_desc);
}
if ($order['user_id'] > 0 && $order['integral'] > 0)
{
$change_desc = sprintf($GLOBALS['_LANG']['return_integral_on_cancel'], $order['order_sn']);
log_account_change($order['user_id'], 0, 0, 0, $order['integral'], $change_desc);
}
if ($order['user_id'] > 0 && $order['bonus_id'] > 0)
{
change_user_bonus($order['bonus_id'], $order['order_id'], false);
}
/* 如果使用库存,且下订单时减库存,则增加库存 */
if ($GLOBALS['_CFG']['use_storage'] == '1' && $GLOBALS['_CFG']['stock_dec_time'] == SDT_PLACE)
{
change_order_goods_storage($order['order_id'], false, 1);
}
/* 修改订单 */
$arr = array(
'bonus_id' => 0,
'bonus' => 0,
'integral' => 0,
'integral_money' => 0,
'surplus' => 0
);
update_order($order['order_id'], $arr);
return true;
}
else
{
die($GLOBALS['db']->errorMsg());
}
}
/**
* 确认一个用户订单
*
* @access public
* @param int $order_id 订单ID
* @param int $user_id 用户ID
*
* @return bool $bool
*/
function affirm_received($order_id, $user_id = 0)
{
/* 查询订单信息,检查状态 */
$sql = "SELECT user_id, order_sn , order_status, shipping_status, pay_status FROM ".$GLOBALS['ecs']->table('order_info') ." WHERE order_id = '$order_id'";
$order = $GLOBALS['db']->GetRow($sql);
// 如果用户ID大于 0 。检查订单是否属于该用户
if ($user_id > 0 && $order['user_id'] != $user_id)
{
$GLOBALS['err'] -> add($GLOBALS['_LANG']['no_priv']);
return false;
}
/* 检查订单 */
elseif ($order['shipping_status'] == SS_RECEIVED)
{
$GLOBALS['err'] ->add($GLOBALS['_LANG']['order_already_received']);
return false;
}
elseif ($order['shipping_status'] != SS_SHIPPED)
{
$GLOBALS['err']->add($GLOBALS['_LANG']['order_invalid']);
return false;
}
/* 修改订单发货状态为“确认收货” */
else
{
$sql = "UPDATE " . $GLOBALS['ecs']->table('order_info') . " SET shipping_status = '" . SS_RECEIVED . "' WHERE order_id = '$order_id'";
if ($GLOBALS['db']->query($sql))
{
/* 记录日志 */
order_action($order['order_sn'], $order['order_status'], SS_RECEIVED, $order['pay_status'], '', $GLOBALS['_LANG']['buyer']);
return true;
}
else
{
die($GLOBALS['db']->errorMsg());
}
}
}
/**
* 保存用户的收货人信息
* 如果收货人信息中的 id 为 0 则新增一个收货人信息
*
* @access public
* @param array $consignee
* @param boolean $default 是否将该收货人信息设置为默认收货人信息
* @return boolean
*/
function save_consignee($consignee, $default=false)
{
if ($consignee['address_id'] > 0)
{
/* 修改地址 */
$res = $GLOBALS['db']->autoExecute($GLOBALS['ecs']->table('user_address'), $consignee, 'UPDATE', 'address_id = ' . $consignee['address_id']);
}
else
{
/* 添加地址 */
$res = $GLOBALS['db']->autoExecute($GLOBALS['ecs']->table('user_address'), $consignee, 'INSERT');
$consignee['address_id'] = $GLOBALS['db']->insert_id();
}
if ($default)
{
/* 保存为用户的默认收货地址 */
$sql = "UPDATE " . $GLOBALS['ecs']->table('users') .
" SET address_id = '$consignee[address_id]' WHERE user_id = '$_SESSION[user_id]'";
$res = $GLOBALS['db']->query($sql);
}
return $res !== false;
}
/**
* 删除一个收货地址
*
* @access public
* @param integer $id
* @return boolean
*/
function drop_consignee($id)
{
$sql = "SELECT user_id FROM " .$GLOBALS['ecs']->table('user_address') . " WHERE address_id = '$id'";
$uid = $GLOBALS['db']->getOne($sql);
if ($uid != $_SESSION['user_id'])
{
return false;
}
else
{
$sql = "DELETE FROM " .$GLOBALS['ecs']->table('user_address') . " WHERE address_id = '$id'";
$res = $GLOBALS['db']->query($sql);
return $res;
}
}
/**
* 添加或更新指定用户收货地址
*
* @access public
* @param array $address
* @return bool
*/
function update_address($address)
{
$address_id = intval($address['address_id']);
unset($address['address_id']);
if ($address_id > 0)
{
/* 更新指定记录 */
$GLOBALS['db']->autoExecute($GLOBALS['ecs']->table('user_address'), $address, 'UPDATE', 'address_id = ' .$address_id . ' AND user_id = ' . $address['user_id']);
}
else
{
/* 插入一条新记录 */
$GLOBALS['db']->autoExecute($GLOBALS['ecs']->table('user_address'), $address, 'INSERT');
$address_id = $GLOBALS['db']->insert_id();
}
if (isset($address['defalut']) && $address['default'] > 0 && isset($address['user_id']))
{
$sql = "UPDATE ".$GLOBALS['ecs']->table('users') .
" SET address_id = '".$address_id."' ".
" WHERE user_id = '" .$address['user_id']. "'";
$GLOBALS['db'] ->query($sql);
}
return true;
}
/**
* 获取指订单的详情
*
* @access public
* @param int $order_id 订单ID
* @param int $user_id 用户ID
*
* @return arr $order 订单所有信息的数组
*/
function get_order_detail($order_id, $user_id = 0)
{
include_once(ROOT_PATH . 'includes/lib_order.php');
$order_id = intval($order_id);
if ($order_id <= 0)
{
$GLOBALS['err']->add($GLOBALS['_LANG']['invalid_order_id']);
return false;
}
$order = order_info($order_id);
//检查订单是否属于该用户
if ($user_id > 0 && $user_id != $order['user_id'])
{
$GLOBALS['err']->add($GLOBALS['_LANG']['no_priv']);
return false;
}
/* 对发货号处理 */
if (!empty($order['invoice_no']))
{
$shipping_code = $GLOBALS['db']->GetOne("SELECT shipping_code FROM ".$GLOBALS['ecs']->table('shipping') ." WHERE shipping_id = '$order[shipping_id]'");
$plugin = ROOT_PATH.'includes/modules/shipping/'. $shipping_code. '.php';
if (file_exists($plugin))
{
include_once($plugin);
$shipping = new $shipping_code;
$order['invoice_no'] = $shipping->query($order['invoice_no']);
}
}
/* 只有未确认才允许用户修改订单地址 */
if ($order['order_status'] == OS_UNCONFIRMED)
{
$order['allow_update_address'] = 1; //允许修改收货地址
}
else
{
$order['allow_update_address'] = 0;
}
/* 获取订单中实体商品数量 */
$order['exist_real_goods'] = exist_real_goods($order_id);
/* 如果是未付款状态,生成支付按钮 */
if ($order['pay_status'] == PS_UNPAYED &&
($order['order_status'] == OS_UNCONFIRMED ||
$order['order_status'] == OS_CONFIRMED))
{
/*
* 在线支付按钮
*/
//支付方式信息
$payment_info = array();
$payment_info = payment_info($order['pay_id']);
//无效支付方式
if ($payment_info === false)
{
$order['pay_online'] = '';
}
else
{
//取得支付信息,生成支付代码
$payment = unserialize_config($payment_info['pay_config']);
//获取需要支付的log_id
$order['log_id'] = get_paylog_id($order['order_id'], $pay_type = PAY_ORDER);
$order['user_name'] = $_SESSION['user_name'];
$order['pay_desc'] = $payment_info['pay_desc'];
/* 调用相应的支付方式文件 */
include_once(ROOT_PATH . 'includes/modules/payment/' . $payment_info['pay_code'] . '.php');
/* 取得在线支付方式的支付按钮 */
$pay_obj = new $payment_info['pay_code'];
$order['pay_online'] = $pay_obj->get_code($order, $payment);
}
}
else
{
$order['pay_online'] = '';
}
/* 无配送时的处理 */
$order['shipping_id'] == -1 and $order['shipping_name'] = $GLOBALS['_LANG']['shipping_not_need'];
/* 其他信息初始化 */
$order['how_oos_name'] = $order['how_oos'];
$order['how_surplus_name'] = $order['how_surplus'];
/* 虚拟商品付款后处理 */
if ($order['pay_status'] != PS_UNPAYED)
{
/* 取得已发货的虚拟商品信息 */
$virtual_goods = get_virtual_goods($order_id, true);
$virtual_card = array();
foreach ($virtual_goods AS $code => $goods_list)
{
/* 只处理虚拟卡 */
if ($code == 'virtual_card')
{
foreach ($goods_list as $goods)
{
if ($info = virtual_card_result($order['order_sn'], $goods))
{
$virtual_card[] = array('goods_id'=>$goods['goods_id'], 'goods_name'=>$goods['goods_name'], 'info'=>$info);
}
}
}
/* 处理超值礼包里面的虚拟卡 */
if ($code == 'package_buy')
{
foreach ($goods_list as $goods)
{
$sql = 'SELECT g.goods_id FROM ' . $GLOBALS['ecs']->table('package_goods') . ' AS pg, ' . $GLOBALS['ecs']->table('goods') . ' AS g ' .
"WHERE pg.goods_id = g.goods_id AND pg.package_id = '" . $goods['goods_id'] . "' AND extension_code = 'virtual_card'";
$vcard_arr = $GLOBALS['db']->getAll($sql);
foreach ($vcard_arr AS $val)
{
if ($info = virtual_card_result($order['order_sn'], $val))
{
$virtual_card[] = array('goods_id'=>$goods['goods_id'], 'goods_name'=>$goods['goods_name'], 'info'=>$info);
}
}
}
}
}
$var_card = deleteRepeat($virtual_card);
$GLOBALS['smarty']->assign('virtual_card', $var_card);
}
/* 确认时间 支付时间 发货时间 */
if ($order['confirm_time'] > 0 && ($order['order_status'] == OS_CONFIRMED || $order['order_status'] == OS_SPLITED || $order['order_status'] == OS_SPLITING_PART))
{
$order['confirm_time'] = sprintf($GLOBALS['_LANG']['confirm_time'], local_date($GLOBALS['_CFG']['time_format'], $order['confirm_time']));
}
else
{
$order['confirm_time'] = '';
}
if ($order['pay_time'] > 0 && $order['pay_status'] != PS_UNPAYED)
{
$order['pay_time'] = sprintf($GLOBALS['_LANG']['pay_time'], local_date($GLOBALS['_CFG']['time_format'], $order['pay_time']));
}
else
{
$order['pay_time'] = '';
}
if ($order['shipping_time'] > 0 && in_array($order['shipping_status'], array(SS_SHIPPED, SS_RECEIVED)))
{
$order['shipping_time'] = sprintf($GLOBALS['_LANG']['shipping_time'], local_date($GLOBALS['_CFG']['time_format'], $order['shipping_time']));
}
else
{
$order['shipping_time'] = '';
}
return $order;
}
/**
* 获取用户可以和并的订单数组
*
* @access public
* @param int $user_id 用户ID
*
* @return array $merge 可合并订单数组
*/
function get_user_merge($user_id)
{
include_once(ROOT_PATH . 'includes/lib_order.php');
$sql = "SELECT order_sn FROM ".$GLOBALS['ecs']->table('order_info') .
" WHERE user_id = '$user_id' " . order_query_sql('unprocessed') .
"AND extension_code = '' ".
" ORDER BY add_time DESC";
$list = $GLOBALS['db']->GetCol($sql);
$merge = array();
foreach ($list as $val)
{
$merge[$val] = $val;
}
return $merge;
}
/**
* 合并指定用户订单
*
* @access public
* @param string $from_order 合并的从订单号
* @param string $to_order 合并的主订单号
*
* @return boolen $bool
*/
function merge_user_order($from_order, $to_order, $user_id = 0)
{
if ($user_id > 0)
{
/* 检查订单是否属于指定用户 */
if (strlen($to_order) > 0)
{
$sql = "SELECT user_id FROM " .$GLOBALS['ecs']->table('order_info').
" WHERE order_sn = '$to_order'";
$order_user = $GLOBALS['db']->getOne($sql);
if ($order_user != $user_id)
{
$GLOBALS['err']->add($GLOBALS['_LANG']['no_priv']);
}
}
else
{
$GLOBALS['err']->add($GLOBALS['_LANG']['order_sn_empty']);
return false;
}
}
$result = merge_order($from_order, $to_order);
if ($result === true)
{
return true;
}
else
{
$GLOBALS['err']->add($result);
return false;
}
}
/**
* 将指定订单中的商品添加到购物车
*
* @access public
* @param int $order_id
*
* @return mix $message 成功返回true, 错误返回出错信息
*/
function return_to_cart($order_id)
{
/* 初始化基本件数量 goods_id => goods_number */
$basic_number = array();
/* 查订单商品:不考虑赠品 */
$sql = "SELECT goods_id, product_id,goods_number, goods_attr, parent_id, goods_attr_id" .
" FROM " . $GLOBALS['ecs']->table('order_goods') .
" WHERE order_id = '$order_id' AND is_gift = 0 AND extension_code <> 'package_buy'" .
" ORDER BY parent_id ASC";
$res = $GLOBALS['db']->query($sql);
$time = gmtime();
while ($row = $GLOBALS['db']->fetchRow($res))
{
// 查该商品信息:是否删除、是否上架
$sql = "SELECT goods_sn, goods_name, goods_number, market_price, " .
"IF(is_promote = 1 AND '$time' BETWEEN promote_start_date AND promote_end_date, promote_price, shop_price) AS goods_price," .
"is_real, extension_code, is_alone_sale, goods_type " .
"FROM " . $GLOBALS['ecs']->table('goods') .
" WHERE goods_id = '$row[goods_id]' " .
" AND is_delete = 0 LIMIT 1";
$goods = $GLOBALS['db']->getRow($sql);
// 如果该商品不存在,处理下一个商品
if (empty($goods))
{
continue;
}
if($row['product_id'])
{
$order_goods_product_id=$row['product_id'];
$sql="SELECT product_number from ".$GLOBALS['ecs']->table('products')."where product_id='$order_goods_product_id'";
$product_number=$GLOBALS['db']->getOne($sql);
}
// 如果使用库存,且库存不足,修改数量
if ($GLOBALS['_CFG']['use_storage'] == 1 && ($row['product_id']?($product_number<$row['goods_number']):($goods['goods_number'] < $row['goods_number'])))
{
if ($goods['goods_number'] == 0 || $product_number=== 0)
{
// 如果库存为0,处理下一个商品
continue;
}
else
{
if($row['product_id'])
{
$row['goods_number']=$product_number;
}
else
{
// 库存不为0,修改数量
$row['goods_number'] = $goods['goods_number'];
}
}
}
//检查商品价格是否有会员价格
$sql = "SELECT goods_number FROM" . $GLOBALS['ecs']->table('cart') . " " .
"WHERE session_id = '" . SESS_ID . "' " .
"AND goods_id = '" . $row['goods_id'] . "' " .
"AND rec_type = '" . CART_GENERAL_GOODS . "' LIMIT 1";
$temp_number = $GLOBALS['db']->getOne($sql);
$row['goods_number'] += $temp_number;
$attr_array = empty($row['goods_attr_id']) ? array() : explode(',', $row['goods_attr_id']);
$goods['goods_price'] = get_final_price($row['goods_id'], $row['goods_number'], true, $attr_array);
// 要返回购物车的商品
$return_goods = array(
'goods_id' => $row['goods_id'],
'goods_sn' => addslashes($goods['goods_sn']),
'goods_name' => addslashes($goods['goods_name']),
'market_price' => $goods['market_price'],
'goods_price' => $goods['goods_price'],
'goods_number' => $row['goods_number'],
'goods_attr' => empty($row['goods_attr']) ? '' : addslashes($row['goods_attr']),
'goods_attr_id' => empty($row['goods_attr_id']) ? '' : $row['goods_attr_id'],
'is_real' => $goods['is_real'],
'extension_code'=> addslashes($goods['extension_code']),
'parent_id' => '0',
'is_gift' => '0',
'rec_type' => CART_GENERAL_GOODS
);
// 如果是配件
if ($row['parent_id'] > 0)
{
// 查询基本件信息:是否删除、是否上架、能否作为普通商品销售
$sql = "SELECT goods_id " .
"FROM " . $GLOBALS['ecs']->table('goods') .
" WHERE goods_id = '$row[parent_id]' " .
" AND is_delete = 0 AND is_on_sale = 1 AND is_alone_sale = 1 LIMIT 1";
$parent = $GLOBALS['db']->getRow($sql);
if ($parent)
{
// 如果基本件存在,查询组合关系是否存在
$sql = "SELECT goods_price " .
"FROM " . $GLOBALS['ecs']->table('group_goods') .
" WHERE parent_id = '$row[parent_id]' " .
" AND goods_id = '$row[goods_id]' LIMIT 1";
$fitting_price = $GLOBALS['db']->getOne($sql);
if ($fitting_price)
{
// 如果组合关系存在,取配件价格,取基本件数量,改parent_id
$return_goods['parent_id'] = $row['parent_id'];
$return_goods['goods_price'] = $fitting_price;
$return_goods['goods_number'] = $basic_number[$row['parent_id']];
}
}
}
else
{
// 保存基本件数量
$basic_number[$row['goods_id']] = $row['goods_number'];
}
// 返回购物车:看有没有相同商品
$sql = "SELECT goods_id " .
"FROM " . $GLOBALS['ecs']->table('cart') .
" WHERE session_id = '" . SESS_ID . "' " .
" AND goods_id = '$return_goods[goods_id]' " .
" AND goods_attr = '$return_goods[goods_attr]' " .
" AND parent_id = '$return_goods[parent_id]' " .
" AND is_gift = 0 " .
" AND rec_type = '" . CART_GENERAL_GOODS . "'";
$cart_goods = $GLOBALS['db']->getOne($sql);
if (empty($cart_goods))
{
// 没有相同商品,插入
$return_goods['session_id'] = SESS_ID;
$return_goods['user_id'] = $_SESSION['user_id'];
$GLOBALS['db']->autoExecute($GLOBALS['ecs']->table('cart'), $return_goods, 'INSERT');
}
else
{
// 有相同商品,修改数量
$sql = "UPDATE " . $GLOBALS['ecs']->table('cart') . " SET " .
"goods_number = '" . $return_goods['goods_number'] . "' " .
",goods_price = '" . $return_goods['goods_price'] . "' " .
"WHERE session_id = '" . SESS_ID . "' " .
"AND goods_id = '" . $return_goods['goods_id'] . "' " .
"AND rec_type = '" . CART_GENERAL_GOODS . "' LIMIT 1";
$GLOBALS['db']->query($sql);
}
}
// 清空购物车的赠品
$sql = "DELETE FROM " . $GLOBALS['ecs']->table('cart') .
" WHERE session_id = '" . SESS_ID . "' AND is_gift = 1";
$GLOBALS['db']->query($sql);
return true;
}
/**
* 保存用户收货地址
*
* @access public
* @param array $address array_keys(consignee string, email string, address string, zipcode string, tel string, mobile stirng, sign_building string, best_time string, order_id int)
* @param int $user_id 用户ID
*
* @return boolen $bool
*/
function save_order_address($address, $user_id)
{
$GLOBALS['err']->clean();
/* 数据验证 */
empty($address['consignee']) and $GLOBALS['err']->add($GLOBALS['_LANG']['consigness_empty']);
empty($address['address']) and $GLOBALS['err']->add($GLOBALS['_LANG']['address_empty']);
$address['order_id'] == 0 and $GLOBALS['err']->add($GLOBALS['_LANG']['order_id_empty']);
if (empty($address['email']))
{
$GLOBALS['err']->add($GLOBALS['email_empty']);
}
else
{
if (!is_email($address['email']))
{
$GLOBALS['err']->add(sprintf($GLOBALS['_LANG']['email_invalid'], $address['email']));
}
}
if ($GLOBALS['err']->error_no > 0)
{
return false;
}
/* 检查订单状态 */
$sql = "SELECT user_id, order_status FROM " .$GLOBALS['ecs']->table('order_info'). " WHERE order_id = '" .$address['order_id']. "'";
$row = $GLOBALS['db']->getRow($sql);
if ($row)
{
if ($user_id > 0 && $user_id != $row['user_id'])
{
$GLOBALS['err']->add($GLOBALS['_LANG']['no_priv']);
return false;
}
if ($row['order_status'] != OS_UNCONFIRMED)
{
$GLOBALS['err']->add($GLOBALS['_LANG']['require_unconfirmed']);
return false;
}
$GLOBALS['db']->autoExecute($GLOBALS['ecs']->table('order_info'), $address, 'UPDATE', "order_id = '$address[order_id]'");
return true;
}
else
{
/* 订单不存在 */
$GLOBALS['err']->add($GLOBALS['_LANG']['order_exist']);
return false;
}
}
/**
*
* @access public
* @param int $user_id 用户ID
* @param int $num 列表显示条数
* @param int $start 显示起始位置
*
* @return array $arr 红保列表
*/
function get_user_bouns_list($user_id, $num = 10, $start = 0)
{
$sql = "SELECT u.bonus_sn, u.order_id, b.type_name, b.type_money, b.min_goods_amount, b.use_start_date, b.use_end_date ".
" FROM " .$GLOBALS['ecs']->table('user_bonus'). " AS u ,".
$GLOBALS['ecs']->table('bonus_type'). " AS b".
" WHERE u.bonus_type_id = b.type_id AND u.user_id = '" .$user_id. "'";
$res = $GLOBALS['db']->selectLimit($sql, $num, $start);
$arr = array();
$day = getdate();
$cur_date = local_mktime(23, 59, 59, $day['mon'], $day['mday'], $day['year']);
while ($row = $GLOBALS['db']->fetchRow($res))
{
/* 先判断是否被使用,然后判断是否开始或过期 */
if (empty($row['order_id']))
{
/* 没有被使用 */
if ($row['use_start_date'] > $cur_date)
{
$row['status'] = $GLOBALS['_LANG']['not_start'];
}
else if ($row['use_end_date'] < $cur_date)
{
$row['status'] = $GLOBALS['_LANG']['overdue'];
}
else
{
$row['status'] = $GLOBALS['_LANG']['not_use'];
}
}
else
{
$row['status'] = '<a href="user.php?act=order_detail&order_id=' .$row['order_id']. '" >' .$GLOBALS['_LANG']['had_use']. '</a>';
}
$row['use_startdate'] = local_date($GLOBALS['_CFG']['date_format'], $row['use_start_date']);
$row['use_enddate'] = local_date($GLOBALS['_CFG']['date_format'], $row['use_end_date']);
$arr[] = $row;
}
return $arr;
}
/**
* 获得会员的团购活动列表
*
* @access public
* @param int $user_id 用户ID
* @param int $num 列表显示条数
* @param int $start 显示起始位置
*
* @return array $arr 团购活动列表
*/
function get_user_group_buy($user_id, $num = 10, $start = 0)
{
return true;
}
/**
* 获得团购详细信息(团购订单信息)
*
*
*/
function get_group_buy_detail($user_id, $group_buy_id)
{
return true;
}
/**
* 去除虚拟卡中重复数据
*
*
*/
function deleteRepeat($array){
$_card_sn_record = array();
foreach ($array as $_k => $_v){
foreach ($_v['info'] as $__k => $__v){
if (in_array($__v['card_sn'],$_card_sn_record)){
unset($array[$_k]['info'][$__k]);
} else {
array_push($_card_sn_record,$__v['card_sn']);
}
}
}
return $array;
}
?> | zzshop | trunk/includes/lib_transaction.php | PHP | asf20 | 40,711 |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!--
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
* Copyright (C) 2003-2008 Frederico Caldeira Knabben
*
* == BEGIN LICENSE ==
*
* Licensed under the terms of any of the following licenses at your
* choice:
*
* - GNU General Public License Version 2 or later (the "GPL")
* http://www.gnu.org/licenses/gpl.html
*
* - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
* http://www.gnu.org/licenses/lgpl.html
*
* - Mozilla Public License Version 1.1 or later (the "MPL")
* http://www.mozilla.org/MPL/MPL-1.1.html
*
* == END LICENSE ==
*
* This page is used by all dialog box as the container.
-->
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="robots" content="noindex, nofollow" />
<script type="text/javascript">
// <![CDATA[
// Domain relaxation logic.
(function()
{
var d = document.domain ;
while ( true )
{
// Test if we can access a parent property.
try
{
var parentDomain = ( Args().TopWindow || E ).document.domain ;
if ( document.domain != parentDomain )
document.domain = parentDomain ;
break ;
}
catch( e ) {}
// Remove a domain part: www.mytest.example.com => mytest.example.com => example.com ...
d = d.replace( /.*?(?:\.|$)/, '' ) ;
if ( d.length == 0 )
break ; // It was not able to detect the domain.
document.domain = d ;
}
})() ;
var E = frameElement._DialogArguments.Editor ;
// It seems referencing to frameElement._DialogArguments directly would lead to memory leaks in IE.
// So let's use functions to access its members instead.
function Args()
{
return frameElement._DialogArguments ;
}
function ParentDialog( dialog )
{
return dialog ? dialog._ParentDialog : frameElement._ParentDialog ;
}
var FCK = E.FCK ;
var FCKTools = E.FCKTools ;
var FCKDomTools = E.FCKDomTools ;
var FCKDialog = E.FCKDialog ;
var FCKBrowserInfo = E.FCKBrowserInfo ;
var FCKConfig = E.FCKConfig ;
// Steal the focus so that the caret would no longer stay in the editor iframe.
window.focus() ;
// Sets the Skin CSS
document.write( FCKTools.GetStyleHtml( FCKConfig.SkinDialogCSS ) ) ;
// Sets the language direction.
var langDir = document.documentElement.dir = E.FCKLang.Dir ;
// For IE6-, the fck_dialog_ie6.js is loaded, used to fix limitations in the browser.
if ( FCKBrowserInfo.IsIE && !FCKBrowserInfo.IsIE7 )
document.write( '<' + 'script type="text/javascript" src="' + FCKConfig.SkinPath + 'fck_dialog_ie6.js"><' + '\/script>' ) ;
FCKTools.RegisterDollarFunction( window ) ;
// Resize related functions.
var Sizer = function()
{
var bAutoSize = false ;
var retval = {
// Sets whether the dialog should auto-resize according to its content's height.
SetAutoSize : function( autoSize )
{
bAutoSize = autoSize ;
this.RefreshSize() ;
},
// Fit the dialog container's layout to the inner iframe's external size.
RefreshContainerSize : function()
{
var frmMain = $( 'frmMain' ) ;
if ( frmMain )
{
// Get the container size.
var height = $( 'contents' ).offsetHeight ;
// Subtract the size of other elements.
height -= $( 'TitleArea' ).offsetHeight ;
height -= $( 'TabsRow' ).offsetHeight ;
height -= $( 'PopupButtons' ).offsetHeight ;
frmMain.style.height = Math.max( height, 0 ) + 'px' ;
}
},
// Resize and re-layout the dialog.
// Triggers the onresize event for the layout logic.
ResizeDialog : function( width, height )
{
FCKDomTools.SetElementStyles( window.frameElement,
{
'width' : width + 'px',
'height' : height + 'px'
} ) ;
// If the skin have defined a function for resize fixes, call it now.
if ( typeof window.DoResizeFixes == 'function' )
window.DoResizeFixes() ;
},
// if bAutoSize is true, automatically fit the dialog size and layout to
// accomodate the inner iframe's internal height.
// if bAutoSize is false, then only the layout logic for the dialog decorations
// is run to accomodate the inner iframe's external height.
RefreshSize : function()
{
if ( bAutoSize )
{
var frmMain = $( 'frmMain' ) ;
var innerDoc = frmMain.contentWindow.document ;
var isStrict = FCKTools.IsStrictMode( innerDoc ) ;
// Get the size of the frame contents.
var innerWidth = isStrict ? innerDoc.documentElement.scrollWidth : innerDoc.body.scrollWidth ;
var innerHeight = isStrict ? innerDoc.documentElement.scrollHeight : innerDoc.body.scrollHeight ;
// Get the current frame size.
var frameSize = FCKTools.GetViewPaneSize( frmMain.contentWindow ) ;
var deltaWidth = innerWidth - frameSize.Width ;
var deltaHeight = innerHeight - frameSize.Height ;
// If the contents fits the current size.
if ( deltaWidth <= 0 && deltaHeight <= 0 )
return ;
var dialogWidth = frameElement.offsetWidth + Math.max( deltaWidth, 0 ) ;
var dialogHeight = frameElement.offsetHeight + Math.max( deltaHeight, 0 ) ;
this.ResizeDialog( dialogWidth, dialogHeight ) ;
}
this.RefreshContainerSize() ;
}
}
/**
* Safari seems to have a bug with the time when RefreshSize() is executed - it
* thinks frmMain's innerHeight is 0 if we query the value too soon after the
* page is loaded in some circumstances. (#1316)
* TODO : Maybe this is not needed anymore after #35.
*/
if ( FCKBrowserInfo.IsSafari )
{
var originalRefreshSize = retval.RefreshSize ;
retval.RefreshSize = function()
{
FCKTools.SetTimeout( originalRefreshSize, 1, retval ) ;
}
}
/**
* IE6 has a similar bug where it sometimes thinks $('contents') has an
* offsetHeight of 0 (#2114).
*/
if ( FCKBrowserInfo.IsIE && !FCKBrowserInfo.IsIE7 )
{
var originalRefreshContainerSize = retval.RefreshContainerSize ;
retval.RefreshContainerSize = function()
{
FCKTools.SetTimeout( originalRefreshContainerSize, 1, retval ) ;
}
}
window.onresize = function()
{
retval.RefreshContainerSize() ;
}
window.SetAutoSize = FCKTools.Bind( retval, retval.SetAutoSize ) ;
return retval ;
}() ;
// Manages the throbber image that appears if the inner part of dialog is taking too long to load.
var Throbber = function()
{
var timer ;
var updateThrobber = function()
{
var throbberParent = $( 'throbberBlock' ) ;
var throbberBlocks = throbberParent.childNodes ;
var lastClass = throbberParent.lastChild.className ;
// From the last to the second one, copy the class from the previous one.
for ( var i = throbberBlocks.length - 1 ; i > 0 ; i-- )
throbberBlocks[i].className = throbberBlocks[i-1].className ;
// For the first one, copy the last class (rotation).
throbberBlocks[0].className = lastClass ;
}
return {
Show : function( waitMilliseconds )
{
// Auto-setup the Show function to be called again after the
// requested amount of time.
if ( waitMilliseconds && waitMilliseconds > 0 )
{
timer = FCKTools.SetTimeout( this.Show, waitMilliseconds, this, null, window ) ;
return ;
}
var throbberParent = $( 'throbberBlock' ) ;
if (throbberParent.childNodes.length == 0)
{
// Create the throbber blocks.
var classIds = [ 1,2,3,4,5,4,3,2 ] ;
while ( classIds.length > 0 )
throbberParent.appendChild( document.createElement( 'div' ) ).className = ' throbber_' + classIds.shift() ;
}
// Center the throbber.
var frm = $( 'contents' ) ;
var frmCoords = FCKTools.GetDocumentPosition( window, frm ) ;
var x = frmCoords.x + ( frm.offsetWidth - throbberParent.offsetWidth ) / 2 ;
var y = frmCoords.y + ( frm.offsetHeight - throbberParent.offsetHeight ) / 2 ;
throbberParent.style.left = parseInt( x, 10 ) + 'px' ;
throbberParent.style.top = parseInt( y, 10 ) + 'px' ;
// Show it.
throbberParent.style.visibility = '' ;
// Hide tabs and buttons:
$( 'Tabs' ).style.visibility = 'hidden' ;
$( 'PopupButtons' ).style.visibility = 'hidden' ;
// Setup the animation interval.
timer = setInterval( updateThrobber, 100 ) ;
},
Hide : function()
{
if ( timer )
{
clearInterval( timer ) ;
timer = null ;
}
$( 'throbberBlock' ).style.visibility = 'hidden' ;
// Show tabs and buttons:
$( 'Tabs' ).style.visibility = '' ;
$( 'PopupButtons' ).style.visibility = '' ;
}
} ;
}() ;
// Drag and drop handlers.
var DragAndDrop = function()
{
var registeredWindows = [] ;
var lastCoords ;
var currentPos ;
var cleanUpHandlers = function()
{
for ( var i = 0 ; i < registeredWindows.length ; i++ )
{
FCKTools.RemoveEventListener( registeredWindows[i].document, 'mousemove', dragMouseMoveHandler ) ;
FCKTools.RemoveEventListener( registeredWindows[i].document, 'mouseup', dragMouseUpHandler ) ;
}
}
var dragMouseMoveHandler = function( evt )
{
if ( !lastCoords )
return ;
if ( !evt )
evt = FCKTools.GetElementDocument( this ).parentWindow.event ;
// Updated the last coordinates.
var currentCoords =
{
x : evt.screenX,
y : evt.screenY
} ;
currentPos =
{
x : currentPos.x + ( currentCoords.x - lastCoords.x ),
y : currentPos.y + ( currentCoords.y - lastCoords.y )
} ;
lastCoords = currentCoords ;
frameElement.style.left = currentPos.x + 'px' ;
frameElement.style.top = currentPos.y + 'px' ;
if ( evt.preventDefault )
evt.preventDefault() ;
else
evt.returnValue = false ;
}
var dragMouseUpHandler = function( evt )
{
if ( !lastCoords )
return ;
if ( !evt )
evt = FCKTools.GetElementDocument( this ).parentWindow.event ;
cleanUpHandlers() ;
lastCoords = null ;
}
return {
MouseDownHandler : function( evt )
{
var view = null ;
if ( !evt )
{
view = FCKTools.GetElementDocument( this ).parentWindow ;
evt = view.event ;
}
else
view = evt.view ;
var target = evt.srcElement || evt.target ;
if ( target.id == 'closeButton' || target.className == 'PopupTab' || target.className == 'PopupTabSelected' )
return ;
lastCoords =
{
x : evt.screenX,
y : evt.screenY
} ;
// Save the current IFRAME position.
currentPos =
{
x : parseInt( FCKDomTools.GetCurrentElementStyle( frameElement, 'left' ), 10 ),
y : parseInt( FCKDomTools.GetCurrentElementStyle( frameElement, 'top' ), 10 )
} ;
for ( var i = 0 ; i < registeredWindows.length ; i++ )
{
FCKTools.AddEventListener( registeredWindows[i].document, 'mousemove', dragMouseMoveHandler ) ;
FCKTools.AddEventListener( registeredWindows[i].document, 'mouseup', dragMouseUpHandler ) ;
}
if ( evt.preventDefault )
evt.preventDefault() ;
else
evt.returnValue = false ;
},
RegisterHandlers : function( w )
{
registeredWindows.push( w ) ;
}
}
}() ;
// Selection related functions.
//(Became simple shortcuts after the fix for #1990)
var Selection =
{
/**
* Ensures that the editing area contains an active selection. This is a
* requirement for IE, as it looses the selection when the focus moves to other
* frames.
*/
EnsureSelection : function()
{
FCK.Selection.Restore() ;
},
/**
* Get the FCKSelection object for the editor instance.
*/
GetSelection : function()
{
return FCK.Selection ;
},
/**
* Get the selected element in the editing area (for object selections).
*/
GetSelectedElement : function()
{
return FCK.Selection.GetSelectedElement() ;
}
}
// Tab related functions.
var Tabs = function()
{
// Only element ids should be stored here instead of element references since setSelectedTab and TabDiv_OnClick
// would build circular references with the element references inside and cause memory leaks in IE6.
var oTabs = new Object() ;
var setSelectedTab = function( tabCode )
{
for ( var sCode in oTabs )
{
if ( sCode == tabCode )
$( oTabs[sCode] ).className = 'PopupTabSelected' ;
else
$( oTabs[sCode] ).className = 'PopupTab' ;
}
if ( typeof( window.frames["frmMain"].OnDialogTabChange ) == 'function' )
window.frames["frmMain"].OnDialogTabChange( tabCode ) ;
}
function TabDiv_OnClick()
{
setSelectedTab( this.TabCode ) ;
}
window.AddTab = function( tabCode, tabText, startHidden )
{
if ( typeof( oTabs[ tabCode ] ) != 'undefined' )
return ;
var eTabsRow = $( 'Tabs' ) ;
var oCell = eTabsRow.insertCell( eTabsRow.cells.length - 1 ) ;
oCell.noWrap = true ;
var oDiv = document.createElement( 'DIV' ) ;
oDiv.className = 'PopupTab' ;
oDiv.innerHTML = tabText ;
oDiv.TabCode = tabCode ;
oDiv.onclick = TabDiv_OnClick ;
oDiv.id = Math.random() ;
if ( startHidden )
oDiv.style.display = 'none' ;
eTabsRow = $( 'TabsRow' ) ;
oCell.appendChild( oDiv ) ;
if ( eTabsRow.style.display == 'none' )
{
var eTitleArea = $( 'TitleArea' ) ;
eTitleArea.className = 'PopupTitle' ;
oDiv.className = 'PopupTabSelected' ;
eTabsRow.style.display = '' ;
if ( window.onresize )
window.onresize() ;
}
oTabs[ tabCode ] = oDiv.id ;
FCKTools.DisableSelection( oDiv ) ;
} ;
window.SetSelectedTab = setSelectedTab ;
window.SetTabVisibility = function( tabCode, isVisible )
{
var oTab = $( oTabs[ tabCode ] ) ;
oTab.style.display = isVisible ? '' : 'none' ;
if ( ! isVisible && oTab.className == 'PopupTabSelected' )
{
for ( var sCode in oTabs )
{
if ( $( oTabs[sCode] ).style.display != 'none' )
{
setSelectedTab( sCode ) ;
break ;
}
}
}
} ;
}() ;
// readystatechange handler for registering drag and drop handlers in cover
// iframes, defined out here to avoid memory leak.
// Do NOT put this function as a private function as it will induce memory leak
// in IE and it's not detectable with Drip or sIEve and undetectable leaks are
// really nasty (sigh).
var onReadyRegister = function()
{
if ( this.readyState != 'complete' )
return ;
DragAndDrop.RegisterHandlers( this.contentWindow ) ;
} ;
// The business logic of the dialog, dealing with operational things like
// dialog open/dialog close/enable/disable/etc.
(function()
{
var setOnKeyDown = function( targetDocument )
{
targetDocument.onkeydown = function ( e )
{
e = e || event || this.parentWindow.event ;
switch ( e.keyCode )
{
case 13 : // ENTER
var oTarget = e.srcElement || e.target ;
if ( oTarget.tagName == 'TEXTAREA' )
return true ;
Ok() ;
return false ;
case 27 : // ESC
Cancel() ;
return false ;
}
return true ;
}
} ;
var contextMenuBlocker = function( e )
{
var sTagName = e.target.tagName ;
if ( ! ( ( sTagName == "INPUT" && e.target.type == "text" ) || sTagName == "TEXTAREA" ) )
e.preventDefault() ;
} ;
var disableContextMenu = function( targetDocument )
{
if ( FCKBrowserInfo.IsIE )
return ;
targetDocument.addEventListener( 'contextmenu', contextMenuBlocker, true ) ;
} ;
// Program entry point.
window.Init = function()
{
// Start the throbber timer.
Throbber.Show( 1000 ) ;
Sizer.RefreshContainerSize() ;
LoadInnerDialog() ;
FCKTools.DisableSelection( document.body ) ;
// Make the title area draggable.
var titleElement = $( 'header' ) ;
titleElement.onmousedown = DragAndDrop.MouseDownHandler ;
// Connect mousemove and mouseup events from dialog frame and outer window to dialog dragging logic.
DragAndDrop.RegisterHandlers( window ) ;
DragAndDrop.RegisterHandlers( Args().TopWindow ) ;
// Disable the previous dialog if it exists.
if ( ParentDialog() )
{
ParentDialog().contentWindow.SetEnabled( false ) ;
if ( FCKBrowserInfo.IsIE && !FCKBrowserInfo.IsIE7 )
{
var currentParent = ParentDialog() ;
while ( currentParent )
{
var blockerFrame = currentParent.contentWindow.$( 'blocker' ) ;
if ( blockerFrame.readyState == 'complete' )
DragAndDrop.RegisterHandlers( blockerFrame.contentWindow ) ;
else
blockerFrame.onreadystatechange = onReadyRegister ;
currentParent = ParentDialog( currentParent ) ;
}
}
else
{
var currentParent = ParentDialog() ;
while ( currentParent )
{
DragAndDrop.RegisterHandlers( currentParent.contentWindow ) ;
currentParent = ParentDialog( currentParent ) ;
}
}
}
// If this is the only dialog on screen, enable the background cover.
if ( FCKBrowserInfo.IsIE && !FCKBrowserInfo.IsIE7 )
{
var blockerFrame = FCKDialog.GetCover().firstChild ;
if ( blockerFrame.readyState == 'complete' )
DragAndDrop.RegisterHandlers( blockerFrame.contentWindow ) ;
else
blockerFrame.onreadystatechange = onReadyRegister;
}
// Add Enter/Esc hotkeys and disable context menu for the dialog.
setOnKeyDown( document ) ;
disableContextMenu( document ) ;
} ;
window.LoadInnerDialog = function()
{
if ( window.onresize )
window.onresize() ;
// First of all, translate the dialog box contents.
E.FCKLanguageManager.TranslatePage( document ) ;
// Create the IFRAME that holds the dialog contents.
$( 'innerContents' ).innerHTML = '<iframe id="frmMain" src="' + Args().Page + '" name="frmMain" frameborder="0" width="100%" height="100%" scrolling="auto" style="visibility: hidden;" allowtransparency="true"><\/iframe>' ;
} ;
window.InnerDialogLoaded = function()
{
// If the dialog has been closed before the iframe is loaded, do nothing.
if ( !frameElement.parentNode )
return null ;
Throbber.Hide() ;
var frmMain = $('frmMain') ;
var innerWindow = frmMain.contentWindow ;
var innerDoc = innerWindow.document ;
// Show the loaded iframe.
frmMain.style.visibility = '' ;
// Set the language direction.
innerDoc.documentElement.dir = langDir ;
// Sets the Skin CSS.
innerDoc.write( FCKTools.GetStyleHtml( FCKConfig.SkinDialogCSS ) ) ;
setOnKeyDown( innerDoc ) ;
disableContextMenu( innerDoc ) ;
Sizer.RefreshContainerSize();
DragAndDrop.RegisterHandlers( innerWindow ) ;
innerWindow.focus() ;
return E ;
} ;
window.SetOkButton = function( showIt )
{
$('btnOk').style.visibility = ( showIt ? '' : 'hidden' ) ;
} ;
window.Ok = function()
{
Selection.EnsureSelection() ;
var frmMain = window.frames["frmMain"] ;
if ( frmMain.Ok && frmMain.Ok() )
CloseDialog() ;
else
frmMain.focus() ;
} ;
window.Cancel = function( dontFireChange )
{
Selection.EnsureSelection() ;
return CloseDialog( dontFireChange ) ;
} ;
window.CloseDialog = function( dontFireChange )
{
Throbber.Hide() ;
// Points the src to a non-existent location to avoid loading errors later, in case the dialog
// haven't been completed loaded at this point.
if ( $( 'frmMain' ) )
$( 'frmMain' ).src = FCKTools.GetVoidUrl() ;
if ( !dontFireChange && !FCK.EditMode )
{
// All dialog windows, by default, will fire the "OnSelectionChange"
// event, no matter the Ok or Cancel button has been pressed.
// It seems that OnSelectionChange may enter on a concurrency state
// on some situations (#1965), so we should put the event firing in
// the execution queue instead of executing it immediately.
setTimeout( function()
{
FCK.Events.FireEvent( 'OnSelectionChange' ) ;
}, 0 ) ;
}
FCKDialog.OnDialogClose( window ) ;
} ;
window.SetEnabled = function( isEnabled )
{
var cover = $( 'cover' ) ;
cover.style.display = isEnabled ? 'none' : '' ;
if ( FCKBrowserInfo.IsIE && !FCKBrowserInfo.IsIE7 )
{
if ( !isEnabled )
{
// Inser the blocker IFRAME before the cover.
var blocker = document.createElement( 'iframe' ) ;
blocker.src = FCKTools.GetVoidUrl() ;
blocker.hideFocus = true ;
blocker.frameBorder = 0 ;
blocker.id = blocker.className = 'blocker' ;
cover.appendChild( blocker ) ;
}
else
{
var blocker = $( 'blocker' ) ;
if ( blocker && blocker.parentNode )
blocker.parentNode.removeChild( blocker ) ;
}
}
} ;
})() ;
// ]]>
</script>
</head>
<body onload="Init();" class="PopupBody">
<div class="contents" id="contents">
<div id="header">
<div id="TitleArea" class="PopupTitle PopupTitleBorder">
<script type="text/javascript">
// <![CDATA[
document.write( Args().Title ) ;
// ]]>
</script>
<div id="closeButton" onclick="Cancel();"></div>
</div>
<div id="TabsRow" class="PopupTabArea" style="display: none">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr id="Tabs">
<td class="PopupTabEmptyArea"> </td>
<td class="PopupTabEmptyArea" width="100%"> </td>
</tr>
</table>
</div>
</div>
<div id="innerContents"></div>
<div id="PopupButtons" class="PopupButtons">
<table border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="100%"> </td>
<td nowrap="nowrap">
<input id="btnOk" style="visibility: hidden;" type="button" value="Ok" class="Button" onclick="Ok();" fckLang="DlgBtnOK" />
<input id="btnCancel" type="button" value="Cancel" class="Button" onclick="Cancel();" fckLang="DlgBtnCancel" />
</td>
</tr>
</table>
</div>
</div>
<div class="tl"></div>
<div class="tc"></div>
<div class="tr"></div>
<div class="ml"></div>
<div class="mr"></div>
<div class="bl"></div>
<div class="bc"></div>
<div class="br"></div>
<div class="cover" id="cover" style="display:none"></div>
<div id="throbberBlock" style="position: absolute; visibility: hidden"></div>
<script type="text/javascript">
// <![CDATA[
// Set the class name for language direction.
document.body.className += ' ' + langDir ;
var cover = $( 'cover' ) ;
cover.style.backgroundColor = FCKConfig.BackgroundBlockerColor ;
FCKDomTools.SetOpacity( cover, FCKConfig.BackgroundBlockerOpacity ) ;
// ]]>
</script>
</body>
</html>
| zzshop | trunk/includes/fckeditor/editor/fckdialog.html | HTML | asf20 | 22,698 |
/*
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
* Copyright (C) 2003-2008 Frederico Caldeira Knabben
*
* == BEGIN LICENSE ==
*
* Licensed under the terms of any of the following licenses at your
* choice:
*
* - GNU General Public License Version 2 or later (the "GPL")
* http://www.gnu.org/licenses/gpl.html
*
* - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
* http://www.gnu.org/licenses/lgpl.html
*
* - Mozilla Public License Version 1.1 or later (the "MPL")
* http://www.mozilla.org/MPL/MPL-1.1.html
*
* == END LICENSE ==
*/
(function()
{
// IE6 doens't handle absolute positioning properly (it is always in quirks
// mode). This function fixes the sizes and positions of many elements that
// compose the skin (this is skin specific).
var fixSizes = window.DoResizeFixes = function()
{
var fckDlg = window.document.body ;
for ( var i = 0 ; i < fckDlg.childNodes.length ; i++ )
{
var child = fckDlg.childNodes[i] ;
switch ( child.className )
{
case 'contents' :
child.style.width = Math.max( 0, fckDlg.offsetWidth - 16 - 16 ) ; // -left -right
child.style.height = Math.max( 0, fckDlg.clientHeight - 20 - 2 ) ; // -bottom -top
break ;
case 'blocker' :
case 'cover' :
child.style.width = Math.max( 0, fckDlg.offsetWidth - 16 - 16 + 4 ) ; // -left -right + 4
child.style.height = Math.max( 0, fckDlg.clientHeight - 20 - 2 + 4 ) ; // -bottom -top + 4
break ;
case 'tr' :
child.style.left = Math.max( 0, fckDlg.clientWidth - 16 ) ;
break ;
case 'tc' :
child.style.width = Math.max( 0, fckDlg.clientWidth - 16 - 16 ) ;
break ;
case 'ml' :
child.style.height = Math.max( 0, fckDlg.clientHeight - 16 - 51 ) ;
break ;
case 'mr' :
child.style.left = Math.max( 0, fckDlg.clientWidth - 16 ) ;
child.style.height = Math.max( 0, fckDlg.clientHeight - 16 - 51 ) ;
break ;
case 'bl' :
child.style.top = Math.max( 0, fckDlg.clientHeight - 51 ) ;
break ;
case 'br' :
child.style.left = Math.max( 0, fckDlg.clientWidth - 30 ) ;
child.style.top = Math.max( 0, fckDlg.clientHeight - 51 ) ;
break ;
case 'bc' :
child.style.width = Math.max( 0, fckDlg.clientWidth - 30 - 30 ) ;
child.style.top = Math.max( 0, fckDlg.clientHeight - 51 ) ;
break ;
}
}
}
var closeButtonOver = function()
{
this.style.backgroundPosition = '-16px -687px' ;
} ;
var closeButtonOut = function()
{
this.style.backgroundPosition = '-16px -651px' ;
} ;
var fixCloseButton = function()
{
var closeButton = document.getElementById ( 'closeButton' ) ;
closeButton.onmouseover = closeButtonOver ;
closeButton.onmouseout = closeButtonOut ;
}
var onLoad = function()
{
fixSizes() ;
fixCloseButton() ;
window.attachEvent( 'onresize', fixSizes ) ;
window.detachEvent( 'onload', onLoad ) ;
}
window.attachEvent( 'onload', onLoad ) ;
})() ;
| zzshop | trunk/includes/fckeditor/editor/skins/default/fck_dialog_ie6.js | JavaScript | asf20 | 3,108 |
/*
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
* Copyright (C) 2003-2008 Frederico Caldeira Knabben
*
* == BEGIN LICENSE ==
*
* Licensed under the terms of any of the following licenses at your
* choice:
*
* - GNU General Public License Version 2 or later (the "GPL")
* http://www.gnu.org/licenses/gpl.html
*
* - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
* http://www.gnu.org/licenses/lgpl.html
*
* - Mozilla Public License Version 1.1 or later (the "MPL")
* http://www.mozilla.org/MPL/MPL-1.1.html
*
* == END LICENSE ==
*
* Styles used by the editor IFRAME and Toolbar.
*/
/*
### Basic Editor IFRAME Styles.
*/
body
{
padding: 1px;
margin: 0;
background-color: #ffffff;
}
#xEditingArea
{
border: #696969 1px solid;
}
.SourceField
{
padding: 5px;
margin: 0px;
font-family: Monospace;
}
/*
Toolbar
*/
.TB_ToolbarSet, .TB_Expand, .TB_Collapse
{
cursor: default;
background-color: #efefde;
}
.TB_ToolbarSet
{
border-top: #efefde 1px outset;
border-bottom: #efefde 1px outset;
}
.TB_ToolbarSet TD
{
font-size: 11px;
font-family: 'Microsoft Sans Serif' , Tahoma, Arial, Verdana, Sans-Serif;
}
.TB_Toolbar
{
height: 24px;
display: inline-table; /* inline = Opera jumping buttons bug */
}
.TB_Separator
{
width: 1px;
height: 16px;
margin: 2px;
background-color: #999966;
}
.TB_Start
{
background-image: url(images/toolbar.start.gif);
margin: 2px;
width: 3px;
background-repeat: no-repeat;
height: 16px;
}
.TB_End
{
display: none;
}
.TB_ExpandImg
{
background-image: url(images/toolbar.expand.gif);
background-repeat: no-repeat;
}
.TB_CollapseImg
{
background-image: url(images/toolbar.collapse.gif);
background-repeat: no-repeat;
}
.TB_SideBorder
{
background-color: #696969;
}
.TB_Expand, .TB_Collapse
{
padding: 2px 2px 2px 2px;
border: #efefde 1px outset;
}
.TB_Collapse
{
width: 5px;
}
.TB_Break
{
height: 24px; /* IE needs the height to be set, otherwise no break */
}
/*
Toolbar Button
*/
.TB_Button_On, .TB_Button_Off, .TB_Button_On_Over, .TB_Button_Off_Over, .TB_Button_Disabled
{
border: #efefde 1px solid; /* This is the default border */
height: 22px; /* The height is necessary, otherwise IE will not apply the alpha */
}
.TB_Button_On
{
border: #316ac5 1px solid;
background-color: #c1d2ee;
}
.TB_Button_On_Over, .TB_Button_Off_Over
{
border: #316ac5 1px solid;
background-color: #dff1ff;
}
.TB_Button_Off
{
filter: alpha(opacity=70); /* IE */
opacity: 0.70; /* Safari, Opera and Mozilla */
}
.TB_Button_Disabled
{
filter: gray() alpha(opacity=30); /* IE */
opacity: 0.30; /* Safari, Opera and Mozilla */
}
.TB_Button_Padding
{
visibility: hidden;
width: 3px;
height: 22px;
}
.TB_Button_Image
{
overflow: hidden;
width: 16px;
height: 16px;
margin: 3px;
background-repeat: no-repeat;
}
.TB_Button_Image img
{
position: relative;
}
.TB_Button_Off .TB_Button_Text
{
background-color: #efefde; /* Needed because of a bug on Clear Type */
}
.TB_ConnectionLine
{
background-color: #ffffff;
height: 1px;
margin-left: 1px; /* ltr */
margin-right: 1px; /* rtl */
}
.TB_Text
{
height: 22px;
}
.TB_Button_Off .TB_Text
{
background-color: #efefde ; /* Needed because of a bug on ClearType */
}
.TB_Button_On_Over .TB_Text
{
background-color: #dff1ff ; /* Needed because of a bug on ClearType */
}
/*
Menu
*/
.MN_Menu
{
border: 1px solid #8f8f73;
padding: 2px;
background-color: #ffffff;
cursor: default;
}
.MN_Menu, .MN_Menu .MN_Label
{
font-size: 11px;
font-family: 'Microsoft Sans Serif' , Tahoma, Arial, Verdana, Sans-Serif;
}
.MN_Item_Padding
{
visibility: hidden;
width: 3px;
height: 20px;
}
.MN_Icon
{
background-color: #e3e3c7;
text-align: center;
height: 20px;
}
.MN_Label
{
padding-left: 3px;
padding-right: 3px;
}
.MN_Separator
{
height: 3px;
}
.MN_Separator_Line
{
border-top: #b9b99d 1px solid;
}
.MN_Item .MN_Icon IMG
{
filter: alpha(opacity=70);
opacity: 0.70;
}
.MN_Item_Over
{
color: #ffffff;
background-color: #8f8f73;
}
.MN_Item_Over .MN_Icon
{
background-color: #737357;
}
.MN_Item_Disabled IMG
{
filter: gray() alpha(opacity=30); /* IE */
opacity: 0.30; /* Safari, Opera and Mozilla */
}
.MN_Item_Disabled .MN_Label
{
color: #b7b7b7;
}
.MN_Arrow
{
padding-right: 3px;
padding-left: 3px;
}
.MN_ConnectionLine
{
background-color: #ffffff;
}
.Menu .TB_Button_On, .Menu .TB_Button_On_Over
{
border: #8f8f73 1px solid;
background-color: #ffffff;
}
/*
### Panel Styles
*/
.FCK_Panel
{
border: #8f8f73 1px solid;
padding: 2px;
background-color: #ffffff;
}
.FCK_Panel, .FCK_Panel TD
{
font-family: 'Microsoft Sans Serif' , Tahoma, Arial, Verdana, Sans-Serif;
font-size: 11px;
}
/*
### Special Combos
*/
.SC_Panel
{
overflow: auto;
white-space: nowrap;
cursor: default;
border: 1px solid #8f8f73;
padding-left: 2px;
padding-right: 2px;
}
.SC_Panel, .SC_Panel TD
{
font-size: 11px;
font-family: 'Microsoft Sans Serif' , Tahoma, Arial, Verdana, Sans-Serif;
}
.SC_Item, .SC_ItemSelected
{
margin-top: 2px;
margin-bottom: 2px;
background-position: left center;
padding-left: 11px;
padding-right: 3px;
padding-top: 2px;
padding-bottom: 2px;
text-overflow: ellipsis;
overflow: hidden;
background-repeat: no-repeat;
border: #dddddd 1px solid;
}
.SC_Item *, .SC_ItemSelected *
{
margin-top: 0px;
margin-bottom: 0px;
}
.SC_ItemSelected
{
border: #9a9afb 1px solid;
background-image: url(images/toolbar.arrowright.gif);
}
.SC_ItemOver
{
border: #316ac5 1px solid;
}
.SC_Field
{
border: #b7b7a6 1px solid;
cursor: default;
}
.SC_FieldCaption
{
overflow: visible;
padding-right: 5px;
padding-left: 5px;
opacity: 0.75; /* Safari, Opera and Mozilla */
filter: alpha(opacity=70); /* IE */ /* -moz-opacity: 0.75; Mozilla (Old) */
height: 23px;
background-color: #efefde;
}
.SC_FieldLabel
{
white-space: nowrap;
padding: 2px;
width: 100%;
cursor: default;
background-color: #ffffff;
text-overflow: ellipsis;
overflow: hidden;
}
.SC_FieldButton
{
background-position: center center;
background-image: url(images/toolbar.buttonarrow.gif);
border-left: #b7b7a6 1px solid;
width: 14px;
background-repeat: no-repeat;
}
.SC_FieldDisabled .SC_FieldButton, .SC_FieldDisabled .SC_FieldCaption, .SC_FieldDisabled .TB_ButtonType_Text
{
opacity: 0.30; /* Safari, Opera and Mozilla */
filter: gray() alpha(opacity=30); /* IE */ /* -moz-opacity: 0.30; Mozilla (Old) */
}
.SC_FieldOver
{
border: #316ac5 1px solid;
}
.SC_FieldOver .SC_FieldButton
{
border-left: #316ac5 1px solid;
}
/*
### Color Selector Panel
*/
.ColorBoxBorder
{
border: #808080 1px solid;
position: static;
}
.ColorBox
{
font-size: 1px;
width: 10px;
position: static;
height: 10px;
}
.ColorDeselected, .ColorSelected
{
cursor: default;
}
.ColorDeselected
{
border: #ffffff 1px solid;
padding: 2px;
float: left;
}
.ColorSelected
{
border: #330066 1px solid;
padding: 2px;
float: left;
background-color: #c4cdd6;
}
| zzshop | trunk/includes/fckeditor/editor/skins/default/fck_editor.css | CSS | asf20 | 7,906 |
/*
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
* Copyright (C) 2003-2008 Frederico Caldeira Knabben
*
* == BEGIN LICENSE ==
*
* Licensed under the terms of any of the following licenses at your
* choice:
*
* - GNU General Public License Version 2 or later (the "GPL")
* http://www.gnu.org/licenses/gpl.html
*
* - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
* http://www.gnu.org/licenses/lgpl.html
*
* - Mozilla Public License Version 1.1 or later (the "MPL")
* http://www.mozilla.org/MPL/MPL-1.1.html
*
* == END LICENSE ==
*
* Styles used by the dialog boxes.
*/
html, body
{
background-color: transparent;
margin: 0px;
padding: 0px;
}
body
{
padding: 10px;
}
body, td, input, select, textarea
{
font-size: 11px;
font-family: 'Microsoft Sans Serif' , Arial, Helvetica, Verdana;
}
body, .BackColor
{
background-color: #f1f1e3;
}
.PopupBody
{
height: 100%;
width: 100%;
overflow: hidden;
background-color: transparent;
padding: 0px;
}
#header
{
cursor: move;
}
.PopupTitle
{
font-weight: bold;
font-size: 14pt;
color: #737357;
background-color: #e3e3c7;
padding: 3px 10px 3px 10px;
}
.PopupButtons
{
position: absolute;
right: 0px;
left: 0px;
bottom: 0px;
border-top: #d5d59d 1px solid;
background-color: #e3e3c7;
padding: 7px 10px 7px 10px;
}
.Button
{
border: #737357 1px solid;
color: #3b3b1f;
background-color: #c7c78f;
}
#btnOk
{
width: 100px;
}
.DarkBackground
{
background-color: #eaead1;
}
.LightBackground
{
background-color: #ffffbe;
}
.PopupTitleBorder
{
border-bottom: #d5d59d 1px solid;
}
.PopupTabArea
{
color: #737357;
background-color: #e3e3c7;
}
.PopupTabEmptyArea
{
padding-left: 10px;
border-bottom: #d5d59d 1px solid;
}
.PopupTab, .PopupTabSelected
{
border-right: #d5d59d 1px solid;
border-top: #d5d59d 1px solid;
border-left: #d5d59d 1px solid;
padding: 3px 5px 3px 5px;
color: #737357;
}
.PopupTab
{
margin-top: 1px;
border-bottom: #d5d59d 1px solid;
cursor: pointer;
cursor: hand;
}
.PopupTabSelected
{
font-weight: bold;
cursor: default;
padding-top: 4px;
border-bottom: #f1f1e3 1px solid;
background-color: #f1f1e3;
}
.PopupSelectionBox
{
border: #ff9933 1px solid !important;
background-color: #fffacd !important;
cursor: pointer;
cursor: hand;
}
#tdBrowse
{
vertical-align: bottom;
}
/**
* Dialog frame related styles.
*/
.contents
{
position: absolute;
top: 2px;
left: 16px;
right: 16px;
bottom: 20px;
background-color: #f1f1e3;
overflow: hidden;
z-index: 1;
}
.tl, .tr, .tc, .bl, .br, .bc
{
position: absolute;
background-image: url(images/sprites.png);
background-repeat: no-repeat;
}
* html .tl, * html .tr, * html .tc, * html .bl, * html .br, * html .bc
{
background-image: url(images/sprites.gif);
}
.ml, .mr
{
position: absolute;
background-image: url(images/dialog.sides.png);
background-repeat: repeat-y;
}
* html .ml, * html .mr
{
background-image: url(images/dialog.sides.gif);
}
.rtl .ml, .rtl .mr
{
position: absolute;
background-image: url(images/dialog.sides.rtl.png);
background-repeat: repeat-y;
}
* html .rtl .ml, * html .rtl .mr
{
background-image: url(images/dialog.sides.gif);
}
.tl
{
top: 0px;
left: 0px;
width: 16px;
height: 16px;
background-position: -16px -16px;
}
.rtl .tl
{
background-position: -16px -397px;
}
.tr
{
top: 0px;
right: 0px;
width: 16px;
height: 16px;
background-position: -16px -76px;
}
.rtl .tr
{
background-position: -16px -457px;
}
.tc
{
top: 0px;
right: 16px;
left: 16px;
height: 16px;
background-position: 0px -136px;
background-repeat: repeat-x;
}
.ml
{
top: 16px;
left: 0px;
width: 16px;
bottom: 51px;
background-position: 0px 0px;
}
.mr
{
top: 16px;
right: 0px;
width: 16px;
bottom: 51px;
background-position: -16px 0px;
}
.bl
{
bottom: 0px;
left: 0px;
width: 30px;
height: 51px;
background-position: -16px -196px;
}
.rtl .bl
{
background-position: -16px -517px;
}
.br
{
bottom: 0px;
right: 0px;
width: 30px;
height: 51px;
background-position: -16px -263px;
}
.rtl .br
{
background-position: -16px -584px;
}
.bc
{
bottom: 0px;
right: 30px;
left: 30px;
height: 51px;
background-position: 0px -330px;
background-repeat: repeat-x;
}
/* For IE6. Do not change it. */
* html .blocker
{
position: absolute;
width: 100%;
height: 100%;
z-index: 12;
filter: progid:DXImageTransform.Microsoft.Alpha(opacity=0);
}
/* The layer used to cover the dialog when opening a child dialog. */
.cover
{
position: absolute;
top: 0px;
left: 14px;
right: 14px;
bottom: 18px;
z-index: 11;
}
#closeButton
{
position: absolute;
right: 0px;
top: 0px;
margin-top: 5px;
margin-right: 10px;
width: 20px;
height: 20px;
cursor: pointer;
background-image: url(images/sprites.png);
background-repeat: no-repeat;
background-position: -16px -651px;
}
* html #closeButton
{
cursor: hand;
background-image: url(images/sprites.gif);
}
.rtl #closeButton
{
right: auto;
left: 10px;
margin-right: 0px;
}
#closeButton:hover
{
background-position: -16px -687px;
}
#throbberBlock
{
z-index: 10;
}
#throbberBlock div
{
float: left;
width: 8px;
height: 9px;
margin-left: 2px;
margin-right: 2px;
font-size: 1px; /* IE6 */
}
/*
Color Gradient Generator:
http://www.herethere.net/~samson/php/color_gradient/?cbegin=737357&cend=E3E3C7&steps=4
*/
.throbber_1
{
background-color: #737357;
}
.throbber_2
{
background-color: #8f8f73;
}
.throbber_3
{
background-color: #abab8f;
}
.throbber_4
{
background-color: #c7c7ab;
}
.throbber_5
{
background-color: #e3e3c7;
}
| zzshop | trunk/includes/fckeditor/editor/skins/default/fck_dialog.css | CSS | asf20 | 5,989 |
/*
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
* Copyright (C) 2003-2008 Frederico Caldeira Knabben
*
* == BEGIN LICENSE ==
*
* Licensed under the terms of any of the following licenses at your
* choice:
*
* - GNU General Public License Version 2 or later (the "GPL")
* http://www.gnu.org/licenses/gpl.html
*
* - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
* http://www.gnu.org/licenses/lgpl.html
*
* - Mozilla Public License Version 1.1 or later (the "MPL")
* http://www.mozilla.org/MPL/MPL-1.1.html
*
* == END LICENSE ==
*
* Compatibility code for Adobe AIR.
*/
if ( FCKBrowserInfo.IsAIR )
{
var FCKAdobeAIR = (function()
{
/*
* ### Private functions.
*/
var getDocumentHead = function( doc )
{
var head ;
var heads = doc.getElementsByTagName( 'head' ) ;
if( heads && heads[0] )
head = heads[0] ;
else
{
head = doc.createElement( 'head' ) ;
doc.documentElement.insertBefore( head, doc.documentElement.firstChild ) ;
}
return head ;
} ;
/*
* ### Public interface.
*/
return {
FCKeditorAPI_Evaluate : function( parentWindow, script )
{
// TODO : This one doesn't work always. The parent window will
// point to an anonymous function in this window. If this
// window is destroyied the parent window will be pointing to
// an invalid reference.
// Evaluate the script in this window.
eval( script ) ;
// Point the FCKeditorAPI property of the parent window to the
// local reference.
parentWindow.FCKeditorAPI = window.FCKeditorAPI ;
},
EditingArea_Start : function( doc, html )
{
// Get the HTML for the <head>.
var headInnerHtml = html.match( /<head>([\s\S]*)<\/head>/i )[1] ;
if ( headInnerHtml && headInnerHtml.length > 0 )
{
// Inject the <head> HTML inside a <div>.
// Do that before getDocumentHead because WebKit moves
// <link css> elements to the <head> at this point.
var div = doc.createElement( 'div' ) ;
div.innerHTML = headInnerHtml ;
// Move the <div> nodes to <head>.
FCKDomTools.MoveChildren( div, getDocumentHead( doc ) ) ;
}
doc.body.innerHTML = html.match( /<body>([\s\S]*)<\/body>/i )[1] ;
//prevent clicking on hyperlinks and navigating away
doc.addEventListener('click', function( ev )
{
ev.preventDefault() ;
ev.stopPropagation() ;
}, true ) ;
},
Panel_Contructor : function( doc, baseLocation )
{
var head = getDocumentHead( doc ) ;
// Set the <base> href.
head.appendChild( doc.createElement('base') ).href = baseLocation ;
doc.body.style.margin = '0px' ;
doc.body.style.padding = '0px' ;
},
ToolbarSet_GetOutElement : function( win, outMatch )
{
var toolbarTarget = win.parent ;
var targetWindowParts = outMatch[1].split( '.' ) ;
while ( targetWindowParts.length > 0 )
{
var part = targetWindowParts.shift() ;
if ( part.length > 0 )
toolbarTarget = toolbarTarget[ part ] ;
}
toolbarTarget = toolbarTarget.document.getElementById( outMatch[2] ) ;
},
ToolbarSet_InitOutFrame : function( doc )
{
var head = getDocumentHead( doc ) ;
head.appendChild( doc.createElement('base') ).href = window.document.location ;
var targetWindow = doc.defaultView;
targetWindow.adjust = function()
{
targetWindow.frameElement.height = doc.body.scrollHeight;
} ;
targetWindow.onresize = targetWindow.adjust ;
targetWindow.setTimeout( targetWindow.adjust, 0 ) ;
doc.body.style.overflow = 'hidden';
doc.body.innerHTML = document.getElementById( 'xToolbarSpace' ).innerHTML ;
}
} ;
})();
/*
* ### Overrides
*/
( function()
{
// Save references for override reuse.
var _Original_FCKPanel_Window_OnFocus = FCKPanel_Window_OnFocus ;
var _Original_FCKPanel_Window_OnBlur = FCKPanel_Window_OnBlur ;
var _Original_FCK_StartEditor = FCK.StartEditor ;
FCKPanel_Window_OnFocus = function( e, panel )
{
// Call the original implementation.
_Original_FCKPanel_Window_OnFocus.call( this, e, panel ) ;
if ( panel._focusTimer )
clearTimeout( panel._focusTimer ) ;
}
FCKPanel_Window_OnBlur = function( e, panel )
{
// Delay the execution of the original function.
panel._focusTimer = FCKTools.SetTimeout( _Original_FCKPanel_Window_OnBlur, 100, this, [ e, panel ] ) ;
}
FCK.StartEditor = function()
{
// Force pointing to the CSS files instead of using the inline CSS cached styles.
window.FCK_InternalCSS = FCKConfig.BasePath + 'css/fck_internal.css' ;
window.FCK_ShowTableBordersCSS = FCKConfig.BasePath + 'css/fck_showtableborders_gecko.css' ;
_Original_FCK_StartEditor.apply( this, arguments ) ;
}
})();
}
| zzshop | trunk/includes/fckeditor/editor/js/fckadobeair.js | JavaScript | asf20 | 4,995 |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!--
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
* Copyright (C) 2003-2008 Frederico Caldeira Knabben
*
* == BEGIN LICENSE ==
*
* Licensed under the terms of any of the following licenses at your
* choice:
*
* - GNU General Public License Version 2 or later (the "GPL")
* http://www.gnu.org/licenses/gpl.html
*
* - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
* http://www.gnu.org/licenses/lgpl.html
*
* - Mozilla Public License Version 1.1 or later (the "MPL")
* http://www.mozilla.org/MPL/MPL-1.1.html
*
* == END LICENSE ==
*
* Main page that holds the editor.
-->
<html>
<head>
<title>FCKeditor</title>
<meta name="robots" content="noindex, nofollow">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<!-- @Packager.RemoveLine
<meta http-equiv="Cache-Control" content="public">
@Packager.RemoveLine -->
<script type="text/javascript">
// #1645: Alert the user if opening FCKeditor in FF3 from local filesystem
// without security.fileuri.strict_origin_policy disabled.
if ( document.location.protocol == 'file:' )
{
try
{
window.parent.document.domain ;
}
catch ( e )
{
window.addEventListener( 'load', function()
{
document.body.innerHTML = '\
<div style="border: 1px red solid; font-family: arial; font-size: 12px; color: red; padding:10px;">\
<p>\
<b>Your browser security settings don\'t allow FCKeditor to be opened from\
the local filesystem.<\/b>\
<\/p>\
<p>\
Please open the <b>about:config<\/b> page and disable the\
"security.fileuri.strict_origin_policy" option; then load this page again.\
<\/p>\
<p>\
Check our <a href="http://docs.fckeditor.net/FCKeditor_2.x/Developers_Guide/FAQ#ff3perms">FAQ<\/a>\
for more information.\
<\/p>\
<\/div>' ;
}, false ) ;
}
}
// Save a reference to the default domain.
var FCK_ORIGINAL_DOMAIN ;
// Automatically detect the correct document.domain (#123).
(function()
{
var d = FCK_ORIGINAL_DOMAIN = document.domain ;
while ( true )
{
// Test if we can access a parent property.
try
{
var test = window.parent.document.domain ;
break ;
}
catch( e ) {}
// Remove a domain part: www.mytest.example.com => mytest.example.com => example.com ...
d = d.replace( /.*?(?:\.|$)/, '' ) ;
if ( d.length == 0 )
break ; // It was not able to detect the domain.
try
{
document.domain = d ;
}
catch (e)
{
break ;
}
}
})() ;
// Save a reference to the detected runtime domain.
var FCK_RUNTIME_DOMAIN = document.domain ;
var FCK_IS_CUSTOM_DOMAIN = ( FCK_ORIGINAL_DOMAIN != FCK_RUNTIME_DOMAIN ) ;
// Instead of loading scripts and CSSs using inline tags, all scripts are
// loaded by code. In this way we can guarantee the correct processing order,
// otherwise external scripts and inline scripts could be executed in an
// unwanted order (IE).
function LoadScript( url )
{
document.write( '<scr' + 'ipt type="text/javascript" src="' + url + '"><\/scr' + 'ipt>' ) ;
}
// Main editor scripts.
var sSuffix = ( /*@cc_on!@*/false ) ? 'ie' : 'gecko' ;
/* @Packager.RemoveLine
LoadScript( 'js/fckeditorcode_' + sSuffix + '.js' ) ;
@Packager.RemoveLine */
// @Packager.Remove.Start
LoadScript( '_source/fckconstants.js' ) ;
LoadScript( '_source/fckjscoreextensions.js' ) ;
if ( sSuffix == 'ie' )
LoadScript( '_source/classes/fckiecleanup.js' ) ;
LoadScript( '_source/internals/fckbrowserinfo.js' ) ;
LoadScript( '_source/internals/fckurlparams.js' ) ;
LoadScript( '_source/classes/fckevents.js' ) ;
LoadScript( '_source/classes/fckdataprocessor.js' ) ;
LoadScript( '_source/internals/fck.js' ) ;
LoadScript( '_source/internals/fck_' + sSuffix + '.js' ) ;
LoadScript( '_source/internals/fckconfig.js' ) ;
LoadScript( '_source/internals/fckdebug_empty.js' ) ;
LoadScript( '_source/internals/fckdomtools.js' ) ;
LoadScript( '_source/internals/fcktools.js' ) ;
LoadScript( '_source/internals/fcktools_' + sSuffix + '.js' ) ;
LoadScript( '_source/fckeditorapi.js' ) ;
LoadScript( '_source/classes/fckimagepreloader.js' ) ;
LoadScript( '_source/internals/fckregexlib.js' ) ;
LoadScript( '_source/internals/fcklistslib.js' ) ;
LoadScript( '_source/internals/fcklanguagemanager.js' ) ;
LoadScript( '_source/internals/fckxhtmlentities.js' ) ;
LoadScript( '_source/internals/fckxhtml.js' ) ;
LoadScript( '_source/internals/fckxhtml_' + sSuffix + '.js' ) ;
LoadScript( '_source/internals/fckcodeformatter.js' ) ;
LoadScript( '_source/internals/fckundo.js' ) ;
LoadScript( '_source/classes/fckeditingarea.js' ) ;
LoadScript( '_source/classes/fckkeystrokehandler.js' ) ;
LoadScript( 'dtd/fck_xhtml10transitional.js' ) ;
LoadScript( '_source/classes/fckstyle.js' ) ;
LoadScript( '_source/internals/fckstyles.js' ) ;
LoadScript( '_source/internals/fcklisthandler.js' ) ;
LoadScript( '_source/classes/fckelementpath.js' ) ;
LoadScript( '_source/classes/fckdomrange.js' ) ;
LoadScript( '_source/classes/fckdocumentfragment_' + sSuffix + '.js' ) ;
LoadScript( '_source/classes/fckw3crange.js' ) ;
LoadScript( '_source/classes/fckdomrange_' + sSuffix + '.js' ) ;
LoadScript( '_source/classes/fckdomrangeiterator.js' ) ;
LoadScript( '_source/classes/fckenterkey.js' ) ;
LoadScript( '_source/internals/fckdocumentprocessor.js' ) ;
LoadScript( '_source/internals/fckselection.js' ) ;
LoadScript( '_source/internals/fckselection_' + sSuffix + '.js' ) ;
LoadScript( '_source/internals/fcktablehandler.js' ) ;
LoadScript( '_source/internals/fcktablehandler_' + sSuffix + '.js' ) ;
LoadScript( '_source/classes/fckxml.js' ) ;
LoadScript( '_source/classes/fckxml_' + sSuffix + '.js' ) ;
LoadScript( '_source/commandclasses/fcknamedcommand.js' ) ;
LoadScript( '_source/commandclasses/fckstylecommand.js' ) ;
LoadScript( '_source/commandclasses/fck_othercommands.js' ) ;
LoadScript( '_source/commandclasses/fckshowblocks.js' ) ;
LoadScript( '_source/commandclasses/fckspellcheckcommand_' + sSuffix + '.js' ) ;
LoadScript( '_source/commandclasses/fcktextcolorcommand.js' ) ;
LoadScript( '_source/commandclasses/fckpasteplaintextcommand.js' ) ;
LoadScript( '_source/commandclasses/fckpastewordcommand.js' ) ;
LoadScript( '_source/commandclasses/fcktablecommand.js' ) ;
LoadScript( '_source/commandclasses/fckfitwindow.js' ) ;
LoadScript( '_source/commandclasses/fcklistcommands.js' ) ;
LoadScript( '_source/commandclasses/fckjustifycommands.js' ) ;
LoadScript( '_source/commandclasses/fckindentcommands.js' ) ;
LoadScript( '_source/commandclasses/fckblockquotecommand.js' ) ;
LoadScript( '_source/commandclasses/fckcorestylecommand.js' ) ;
LoadScript( '_source/commandclasses/fckremoveformatcommand.js' ) ;
LoadScript( '_source/internals/fckcommands.js' ) ;
LoadScript( '_source/classes/fckpanel.js' ) ;
LoadScript( '_source/classes/fckicon.js' ) ;
LoadScript( '_source/classes/fcktoolbarbuttonui.js' ) ;
LoadScript( '_source/classes/fcktoolbarbutton.js' ) ;
LoadScript( '_source/classes/fckspecialcombo.js' ) ;
LoadScript( '_source/classes/fcktoolbarspecialcombo.js' ) ;
LoadScript( '_source/classes/fcktoolbarstylecombo.js' ) ;
LoadScript( '_source/classes/fcktoolbarfontformatcombo.js' ) ;
LoadScript( '_source/classes/fcktoolbarfontscombo.js' ) ;
LoadScript( '_source/classes/fcktoolbarfontsizecombo.js' ) ;
LoadScript( '_source/classes/fcktoolbarpanelbutton.js' ) ;
LoadScript( '_source/internals/fcktoolbaritems.js' ) ;
LoadScript( '_source/classes/fcktoolbar.js' ) ;
LoadScript( '_source/classes/fcktoolbarbreak_' + sSuffix + '.js' ) ;
LoadScript( '_source/internals/fcktoolbarset.js' ) ;
LoadScript( '_source/internals/fckdialog.js' ) ;
LoadScript( '_source/classes/fckmenuitem.js' ) ;
LoadScript( '_source/classes/fckmenublock.js' ) ;
LoadScript( '_source/classes/fckmenublockpanel.js' ) ;
LoadScript( '_source/classes/fckcontextmenu.js' ) ;
LoadScript( '_source/internals/fck_contextmenu.js' ) ;
LoadScript( '_source/classes/fckhtmliterator.js' ) ;
LoadScript( '_source/classes/fckplugin.js' ) ;
LoadScript( '_source/internals/fckplugins.js' ) ;
// @Packager.Remove.End
// Base configuration file.
LoadScript( '../fckconfig.js' ) ;
</script>
<script type="text/javascript">
// Adobe AIR compatibility file.
if ( FCKBrowserInfo.IsAIR )
LoadScript( 'js/fckadobeair.js' ) ;
if ( FCKBrowserInfo.IsIE )
{
// Remove IE mouse flickering.
try
{
document.execCommand( 'BackgroundImageCache', false, true ) ;
}
catch (e)
{
// We have been reported about loading problems caused by the above
// line. For safety, let's just ignore errors.
}
// Create the default cleanup object used by the editor.
FCK.IECleanup = new FCKIECleanup( window ) ;
FCK.IECleanup.AddItem( FCKTempBin, FCKTempBin.Reset ) ;
FCK.IECleanup.AddItem( FCK, FCK_Cleanup ) ;
}
// The first function to be called on selection change must the the styles
// change checker, because the result of its processing may be used by another
// functions listening to the same event.
FCK.Events.AttachEvent( 'OnSelectionChange', function() { FCKStyles.CheckSelectionChanges() ; } ) ;
// The config hidden field is processed immediately, because
// CustomConfigurationsPath may be set in the page.
FCKConfig.ProcessHiddenField() ;
// Load the custom configurations file (if defined).
if ( FCKConfig.CustomConfigurationsPath.length > 0 )
LoadScript( FCKConfig.CustomConfigurationsPath ) ;
</script>
<script type="text/javascript">
// Load configurations defined at page level.
FCKConfig_LoadPageConfig() ;
FCKConfig_PreProcess() ;
// Load the full debug script.
if ( FCKConfig.Debug )
LoadScript( '_source/internals/fckdebug.js' ) ;
</script>
<script type="text/javascript">
var FCK_InternalCSS = FCKConfig.BasePath + 'css/fck_internal.css' ; // @Packager.RemoveLine
var FCK_ShowTableBordersCSS = FCKConfig.BasePath + 'css/fck_showtableborders_gecko.css' ; // @Packager.RemoveLine
/* @Packager.RemoveLine
// CSS minified by http://iceyboard.no-ip.org/projects/css_compressor (see _dev/css_compression.txt).
var FCK_InternalCSS = FCKTools.FixCssUrls( FCKConfig.BasePath + 'css/', 'html{min-height:100%}table.FCK__ShowTableBorders,table.FCK__ShowTableBorders td,table.FCK__ShowTableBorders th{border:#d3d3d3 1px solid}form{border:1px dotted #F00;padding:2px}.FCK__Flash{border:#a9a9a9 1px solid;background-position:center center;background-image:url(images/fck_flashlogo.gif);background-repeat:no-repeat;width:80px;height:80px}.FCK__UnknownObject{border:#a9a9a9 1px solid;background-position:center center;background-image:url(images/fck_plugin.gif);background-repeat:no-repeat;width:80px;height:80px}.FCK__Anchor{border:1px dotted #00F;background-position:center center;background-image:url(images/fck_anchor.gif);background-repeat:no-repeat;width:16px;height:15px;vertical-align:middle}.FCK__AnchorC{border:1px dotted #00F;background-position:1px center;background-image:url(images/fck_anchor.gif);background-repeat:no-repeat;padding-left:18px}a[name]{border:1px dotted #00F;background-position:0 center;background-image:url(images/fck_anchor.gif);background-repeat:no-repeat;padding-left:18px}.FCK__PageBreak{background-position:center center;background-image:url(images/fck_pagebreak.gif);background-repeat:no-repeat;clear:both;display:block;float:none;width:100%;border-top:#999 1px dotted;border-bottom:#999 1px dotted;border-right:0;border-left:0;height:5px}.FCK__InputHidden{width:19px;height:18px;background-image:url(images/fck_hiddenfield.gif);background-repeat:no-repeat;vertical-align:text-bottom;background-position:center center}.FCK__ShowBlocks p,.FCK__ShowBlocks div,.FCK__ShowBlocks pre,.FCK__ShowBlocks address,.FCK__ShowBlocks blockquote,.FCK__ShowBlocks h1,.FCK__ShowBlocks h2,.FCK__ShowBlocks h3,.FCK__ShowBlocks h4,.FCK__ShowBlocks h5,.FCK__ShowBlocks h6{background-repeat:no-repeat;border:1px dotted gray;padding-top:8px;padding-left:8px}.FCK__ShowBlocks p{background-image:url(images/block_p.png)}.FCK__ShowBlocks div{background-image:url(images/block_div.png)}.FCK__ShowBlocks pre{background-image:url(images/block_pre.png)}.FCK__ShowBlocks address{background-image:url(images/block_address.png)}.FCK__ShowBlocks blockquote{background-image:url(images/block_blockquote.png)}.FCK__ShowBlocks h1{background-image:url(images/block_h1.png)}.FCK__ShowBlocks h2{background-image:url(images/block_h2.png)}.FCK__ShowBlocks h3{background-image:url(images/block_h3.png)}.FCK__ShowBlocks h4{background-image:url(images/block_h4.png)}.FCK__ShowBlocks h5{background-image:url(images/block_h5.png)}.FCK__ShowBlocks h6{background-image:url(images/block_h6.png)}' ) ;
var FCK_ShowTableBordersCSS = FCKTools.FixCssUrls( FCKConfig.BasePath + 'css/', 'table:not([border]),table:not([border]) > tr > td,table:not([border]) > tr > th,table:not([border]) > tbody > tr > td,table:not([border]) > tbody > tr > th,table:not([border]) > thead > tr > td,table:not([border]) > thead > tr > th,table:not([border]) > tfoot > tr > td,table:not([border]) > tfoot > tr > th,table[border=\"0\"],table[border=\"0\"] > tr > td,table[border=\"0\"] > tr > th,table[border=\"0\"] > tbody > tr > td,table[border=\"0\"] > tbody > tr > th,table[border=\"0\"] > thead > tr > td,table[border=\"0\"] > thead > tr > th,table[border=\"0\"] > tfoot > tr > td,table[border=\"0\"] > tfoot > tr > th{border:#d3d3d3 1px dotted}' ) ;
@Packager.RemoveLine */
// Popup the debug window if debug mode is set to true. It guarantees that the
// first debug message will not be lost.
if ( FCKConfig.Debug )
FCKDebug._GetWindow() ;
// Load the active skin CSS.
document.write( FCKTools.GetStyleHtml( FCKConfig.SkinEditorCSS ) ) ;
// Load the language file.
FCKLanguageManager.Initialize() ;
LoadScript( 'lang/' + FCKLanguageManager.ActiveLanguage.Code + '.js' ) ;
</script>
<script type="text/javascript">
// Initialize the editing area context menu.
FCK_ContextMenu_Init() ;
FCKPlugins.Load() ;
</script>
<script type="text/javascript">
// Set the editor interface direction.
window.document.dir = FCKLang.Dir ;
</script>
<script type="text/javascript">
window.onload = function()
{
InitializeAPI() ;
if ( FCKBrowserInfo.IsIE )
FCK_PreloadImages() ;
else
LoadToolbarSetup() ;
}
function LoadToolbarSetup()
{
FCKeditorAPI._FunctionQueue.Add( LoadToolbar ) ;
}
function LoadToolbar()
{
var oToolbarSet = FCK.ToolbarSet = FCKToolbarSet_Create() ;
if ( oToolbarSet.IsLoaded )
StartEditor() ;
else
{
oToolbarSet.OnLoad = StartEditor ;
oToolbarSet.Load( FCKURLParams['Toolbar'] || 'Default' ) ;
}
}
function StartEditor()
{
// Remove the onload listener.
FCK.ToolbarSet.OnLoad = null ;
FCKeditorAPI._FunctionQueue.Remove( LoadToolbar ) ;
FCK.Events.AttachEvent( 'OnStatusChange', WaitForActive ) ;
// Start the editor.
FCK.StartEditor() ;
}
function WaitForActive( editorInstance, newStatus )
{
if ( newStatus == FCK_STATUS_ACTIVE )
{
if ( FCKBrowserInfo.IsGecko )
FCKTools.RunFunction( window.onresize ) ;
if ( !FCKConfig.PreventSubmitHandler )
_AttachFormSubmitToAPI() ;
FCK.SetStatus( FCK_STATUS_COMPLETE ) ;
// Call the special "FCKeditor_OnComplete" function that should be present in
// the HTML page where the editor is located.
if ( typeof( window.parent.FCKeditor_OnComplete ) == 'function' )
window.parent.FCKeditor_OnComplete( FCK ) ;
}
}
// Gecko browsers doesn't calculate well the IFRAME size so we must
// recalculate it every time the window size changes.
if ( FCKBrowserInfo.IsGecko && !FCKBrowserInfo.IsOpera )
{
window.onresize = function( e )
{
// Running in Chrome makes the window receive the event including subframes.
// we care only about this window. Ticket #1642.
// #2002: The originalTarget from the event can be the current document, the window, or the editing area.
if ( e && e.originalTarget !== document && e.originalTarget !== window && (!e.originalTarget.ownerDocument || e.originalTarget.ownerDocument != document ))
return ;
var oCell = document.getElementById( 'xEditingArea' ) ;
var eInnerElement = oCell.firstChild ;
if ( eInnerElement )
{
eInnerElement.style.height = '0px' ;
eInnerElement.style.height = ( oCell.scrollHeight - 2 ) + 'px' ;
}
}
}
</script>
</head>
<body>
<table width="100%" cellpadding="0" cellspacing="0" style="height: 100%; table-layout: fixed">
<tr id="xToolbarRow" style="display: none">
<td id="xToolbarSpace" style="overflow: hidden">
<table width="100%" cellpadding="0" cellspacing="0">
<tr id="xCollapsed" style="display: none">
<td id="xExpandHandle" class="TB_Expand" colspan="3">
<img class="TB_ExpandImg" alt="" src="images/spacer.gif" width="8" height="4" /></td>
</tr>
<tr id="xExpanded" style="display: none">
<td id="xTBLeftBorder" class="TB_SideBorder" style="width: 1px; display: none;"></td>
<td id="xCollapseHandle" style="display: none" class="TB_Collapse" valign="bottom">
<img class="TB_CollapseImg" alt="" src="images/spacer.gif" width="8" height="4" /></td>
<td id="xToolbar" class="TB_ToolbarSet"></td>
<td class="TB_SideBorder" style="width: 1px"></td>
</tr>
</table>
</td>
</tr>
<tr>
<td id="xEditingArea" valign="top" style="height: 100%"></td>
</tr>
</table>
</body>
</html>
| zzshop | trunk/includes/fckeditor/editor/fckeditor.original.html | HTML | asf20 | 17,712 |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!--
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
* Copyright (C) 2003-2008 Frederico Caldeira Knabben
*
* == BEGIN LICENSE ==
*
* Licensed under the terms of any of the following licenses at your
* choice:
*
* - GNU General Public License Version 2 or later (the "GPL")
* http://www.gnu.org/licenses/gpl.html
*
* - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
* http://www.gnu.org/licenses/lgpl.html
*
* - Mozilla Public License Version 1.1 or later (the "MPL")
* http://www.mozilla.org/MPL/MPL-1.1.html
*
* == END LICENSE ==
*
* Main page that holds the editor.
-->
<html>
<head>
<title>FCKeditor</title>
<meta name="robots" content="noindex, nofollow">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta http-equiv="Cache-Control" content="public">
<script type="text/javascript">
// #1645: Alert the user if opening FCKeditor in FF3 from local filesystem
// without security.fileuri.strict_origin_policy disabled.
if ( document.location.protocol == 'file:' )
{
try
{
window.parent.document.domain ;
}
catch ( e )
{
window.addEventListener( 'load', function()
{
document.body.innerHTML = '\
<div style="border: 1px red solid; font-family: arial; font-size: 12px; color: red; padding:10px;">\
<p>\
<b>Your browser security settings don\'t allow FCKeditor to be opened from\
the local filesystem.<\/b>\
<\/p>\
<p>\
Please open the <b>about:config<\/b> page and disable the\
"security.fileuri.strict_origin_policy" option; then load this page again.\
<\/p>\
<p>\
Check our <a href="http://docs.fckeditor.net/FCKeditor_2.x/Developers_Guide/FAQ#ff3perms">FAQ<\/a>\
for more information.\
<\/p>\
<\/div>' ;
}, false ) ;
}
}
// Save a reference to the default domain.
var FCK_ORIGINAL_DOMAIN ;
// Automatically detect the correct document.domain (#123).
(function()
{
var d = FCK_ORIGINAL_DOMAIN = document.domain ;
while ( true )
{
// Test if we can access a parent property.
try
{
var test = window.parent.document.domain ;
break ;
}
catch( e ) {}
// Remove a domain part: www.mytest.example.com => mytest.example.com => example.com ...
d = d.replace( /.*?(?:\.|$)/, '' ) ;
if ( d.length == 0 )
break ; // It was not able to detect the domain.
try
{
document.domain = d ;
}
catch (e)
{
break ;
}
}
})() ;
// Save a reference to the detected runtime domain.
var FCK_RUNTIME_DOMAIN = document.domain ;
var FCK_IS_CUSTOM_DOMAIN = ( FCK_ORIGINAL_DOMAIN != FCK_RUNTIME_DOMAIN ) ;
// Instead of loading scripts and CSSs using inline tags, all scripts are
// loaded by code. In this way we can guarantee the correct processing order,
// otherwise external scripts and inline scripts could be executed in an
// unwanted order (IE).
function LoadScript( url )
{
document.write( '<scr' + 'ipt type="text/javascript" src="' + url + '"><\/scr' + 'ipt>' ) ;
}
// Main editor scripts.
var sSuffix = ( /*@cc_on!@*/false ) ? 'ie' : 'gecko' ;
LoadScript( 'js/fckeditorcode_' + sSuffix + '.js' ) ;
// Base configuration file.
LoadScript( '../fckconfig.js' ) ;
</script>
<script type="text/javascript">
// Adobe AIR compatibility file.
if ( FCKBrowserInfo.IsAIR )
LoadScript( 'js/fckadobeair.js' ) ;
if ( FCKBrowserInfo.IsIE )
{
// Remove IE mouse flickering.
try
{
document.execCommand( 'BackgroundImageCache', false, true ) ;
}
catch (e)
{
// We have been reported about loading problems caused by the above
// line. For safety, let's just ignore errors.
}
// Create the default cleanup object used by the editor.
FCK.IECleanup = new FCKIECleanup( window ) ;
FCK.IECleanup.AddItem( FCKTempBin, FCKTempBin.Reset ) ;
FCK.IECleanup.AddItem( FCK, FCK_Cleanup ) ;
}
// The first function to be called on selection change must the the styles
// change checker, because the result of its processing may be used by another
// functions listening to the same event.
FCK.Events.AttachEvent( 'OnSelectionChange', function() { FCKStyles.CheckSelectionChanges() ; } ) ;
// The config hidden field is processed immediately, because
// CustomConfigurationsPath may be set in the page.
FCKConfig.ProcessHiddenField() ;
// Load the custom configurations file (if defined).
if ( FCKConfig.CustomConfigurationsPath.length > 0 )
LoadScript( FCKConfig.CustomConfigurationsPath ) ;
</script>
<script type="text/javascript">
// Load configurations defined at page level.
FCKConfig_LoadPageConfig() ;
FCKConfig_PreProcess() ;
// Load the full debug script.
if ( FCKConfig.Debug )
LoadScript( '_source/internals/fckdebug.js' ) ;
</script>
<script type="text/javascript">
// CSS minified by http://iceyboard.no-ip.org/projects/css_compressor (see _dev/css_compression.txt).
var FCK_InternalCSS = FCKTools.FixCssUrls( FCKConfig.BasePath + 'css/', 'html{min-height:100%}table.FCK__ShowTableBorders,table.FCK__ShowTableBorders td,table.FCK__ShowTableBorders th{border:#d3d3d3 1px solid}form{border:1px dotted #F00;padding:2px}.FCK__Flash{border:#a9a9a9 1px solid;background-position:center center;background-image:url(images/fck_flashlogo.gif);background-repeat:no-repeat;width:80px;height:80px}.FCK__UnknownObject{border:#a9a9a9 1px solid;background-position:center center;background-image:url(images/fck_plugin.gif);background-repeat:no-repeat;width:80px;height:80px}.FCK__Anchor{border:1px dotted #00F;background-position:center center;background-image:url(images/fck_anchor.gif);background-repeat:no-repeat;width:16px;height:15px;vertical-align:middle}.FCK__AnchorC{border:1px dotted #00F;background-position:1px center;background-image:url(images/fck_anchor.gif);background-repeat:no-repeat;padding-left:18px}a[name]{border:1px dotted #00F;background-position:0 center;background-image:url(images/fck_anchor.gif);background-repeat:no-repeat;padding-left:18px}.FCK__PageBreak{background-position:center center;background-image:url(images/fck_pagebreak.gif);background-repeat:no-repeat;clear:both;display:block;float:none;width:100%;border-top:#999 1px dotted;border-bottom:#999 1px dotted;border-right:0;border-left:0;height:5px}.FCK__InputHidden{width:19px;height:18px;background-image:url(images/fck_hiddenfield.gif);background-repeat:no-repeat;vertical-align:text-bottom;background-position:center center}.FCK__ShowBlocks p,.FCK__ShowBlocks div,.FCK__ShowBlocks pre,.FCK__ShowBlocks address,.FCK__ShowBlocks blockquote,.FCK__ShowBlocks h1,.FCK__ShowBlocks h2,.FCK__ShowBlocks h3,.FCK__ShowBlocks h4,.FCK__ShowBlocks h5,.FCK__ShowBlocks h6{background-repeat:no-repeat;border:1px dotted gray;padding-top:8px;padding-left:8px}.FCK__ShowBlocks p{background-image:url(images/block_p.png)}.FCK__ShowBlocks div{background-image:url(images/block_div.png)}.FCK__ShowBlocks pre{background-image:url(images/block_pre.png)}.FCK__ShowBlocks address{background-image:url(images/block_address.png)}.FCK__ShowBlocks blockquote{background-image:url(images/block_blockquote.png)}.FCK__ShowBlocks h1{background-image:url(images/block_h1.png)}.FCK__ShowBlocks h2{background-image:url(images/block_h2.png)}.FCK__ShowBlocks h3{background-image:url(images/block_h3.png)}.FCK__ShowBlocks h4{background-image:url(images/block_h4.png)}.FCK__ShowBlocks h5{background-image:url(images/block_h5.png)}.FCK__ShowBlocks h6{background-image:url(images/block_h6.png)}' ) ;
var FCK_ShowTableBordersCSS = FCKTools.FixCssUrls( FCKConfig.BasePath + 'css/', 'table:not([border]),table:not([border]) > tr > td,table:not([border]) > tr > th,table:not([border]) > tbody > tr > td,table:not([border]) > tbody > tr > th,table:not([border]) > thead > tr > td,table:not([border]) > thead > tr > th,table:not([border]) > tfoot > tr > td,table:not([border]) > tfoot > tr > th,table[border=\"0\"],table[border=\"0\"] > tr > td,table[border=\"0\"] > tr > th,table[border=\"0\"] > tbody > tr > td,table[border=\"0\"] > tbody > tr > th,table[border=\"0\"] > thead > tr > td,table[border=\"0\"] > thead > tr > th,table[border=\"0\"] > tfoot > tr > td,table[border=\"0\"] > tfoot > tr > th{border:#d3d3d3 1px dotted}' ) ;
// Popup the debug window if debug mode is set to true. It guarantees that the
// first debug message will not be lost.
if ( FCKConfig.Debug )
FCKDebug._GetWindow() ;
// Load the active skin CSS.
document.write( FCKTools.GetStyleHtml( FCKConfig.SkinEditorCSS ) ) ;
// Load the language file.
FCKLanguageManager.Initialize() ;
LoadScript( 'lang/' + FCKLanguageManager.ActiveLanguage.Code + '.js' ) ;
</script>
<script type="text/javascript">
// Initialize the editing area context menu.
FCK_ContextMenu_Init() ;
FCKPlugins.Load() ;
</script>
<script type="text/javascript">
// Set the editor interface direction.
window.document.dir = FCKLang.Dir ;
</script>
<script type="text/javascript">
window.onload = function()
{
InitializeAPI() ;
if ( FCKBrowserInfo.IsIE )
FCK_PreloadImages() ;
else
LoadToolbarSetup() ;
}
function LoadToolbarSetup()
{
FCKeditorAPI._FunctionQueue.Add( LoadToolbar ) ;
}
function LoadToolbar()
{
var oToolbarSet = FCK.ToolbarSet = FCKToolbarSet_Create() ;
if ( oToolbarSet.IsLoaded )
StartEditor() ;
else
{
oToolbarSet.OnLoad = StartEditor ;
oToolbarSet.Load( FCKURLParams['Toolbar'] || 'Default' ) ;
}
}
function StartEditor()
{
// Remove the onload listener.
FCK.ToolbarSet.OnLoad = null ;
FCKeditorAPI._FunctionQueue.Remove( LoadToolbar ) ;
FCK.Events.AttachEvent( 'OnStatusChange', WaitForActive ) ;
// Start the editor.
FCK.StartEditor() ;
}
function WaitForActive( editorInstance, newStatus )
{
if ( newStatus == FCK_STATUS_ACTIVE )
{
if ( FCKBrowserInfo.IsGecko )
FCKTools.RunFunction( window.onresize ) ;
if ( !FCKConfig.PreventSubmitHandler )
_AttachFormSubmitToAPI() ;
FCK.SetStatus( FCK_STATUS_COMPLETE ) ;
// Call the special "FCKeditor_OnComplete" function that should be present in
// the HTML page where the editor is located.
if ( typeof( window.parent.FCKeditor_OnComplete ) == 'function' )
window.parent.FCKeditor_OnComplete( FCK ) ;
}
}
// Gecko browsers doesn't calculate well the IFRAME size so we must
// recalculate it every time the window size changes.
if ( FCKBrowserInfo.IsGecko && !FCKBrowserInfo.IsOpera )
{
window.onresize = function( e )
{
// Running in Chrome makes the window receive the event including subframes.
// we care only about this window. Ticket #1642.
// #2002: The originalTarget from the event can be the current document, the window, or the editing area.
if ( e && e.originalTarget !== document && e.originalTarget !== window && (!e.originalTarget.ownerDocument || e.originalTarget.ownerDocument != document ))
return ;
var oCell = document.getElementById( 'xEditingArea' ) ;
var eInnerElement = oCell.firstChild ;
if ( eInnerElement )
{
eInnerElement.style.height = '0px' ;
eInnerElement.style.height = ( oCell.scrollHeight - 2 ) + 'px' ;
}
}
}
</script>
</head>
<body>
<table width="100%" cellpadding="0" cellspacing="0" style="height: 100%; table-layout: fixed">
<tr id="xToolbarRow" style="display: none">
<td id="xToolbarSpace" style="overflow: hidden">
<table width="100%" cellpadding="0" cellspacing="0">
<tr id="xCollapsed" style="display: none">
<td id="xExpandHandle" class="TB_Expand" colspan="3">
<img class="TB_ExpandImg" alt="" src="images/spacer.gif" width="8" height="4" /></td>
</tr>
<tr id="xExpanded" style="display: none">
<td id="xTBLeftBorder" class="TB_SideBorder" style="width: 1px; display: none;"></td>
<td id="xCollapseHandle" style="display: none" class="TB_Collapse" valign="bottom">
<img class="TB_CollapseImg" alt="" src="images/spacer.gif" width="8" height="4" /></td>
<td id="xToolbar" class="TB_ToolbarSet"></td>
<td class="TB_SideBorder" style="width: 1px"></td>
</tr>
</table>
</td>
</tr>
<tr>
<td id="xEditingArea" valign="top" style="height: 100%"></td>
</tr>
</table>
</body>
</html>
| zzshop | trunk/includes/fckeditor/editor/fckeditor.html | HTML | asf20 | 12,436 |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>DTD Test Page</title>
<script type="text/javascript">
// Define an object for this test page, so the assignment to FCK.DTD works
var FCK = {} ;
</script>
<script type="text/javascript" src="../_source/internals/fcktools.js"></script>
<script type="text/javascript" src="fck_xhtml10transitional.js"></script>
</head>
<body>
<h1>
DTD Contents
</h1>
<table border="1">
<script type="text/javascript">
for ( var p in FCK.DTD )
{
document.write( '<tr><td><b>' + p + '</b></td><td>' ) ;
var isFirst = true ;
for ( var c in FCK.DTD[p] )
{
if ( !isFirst )
document.write( ', ' ) ;
isFirst = false ;
document.write( c ) ;
}
document.write( '</td></tr>' ) ;
}
</script>
</table>
</body>
</html>
| zzshop | trunk/includes/fckeditor/editor/dtd/fck_dtd_test.html | HTML | asf20 | 945 |
/*
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
* Copyright (C) 2003-2008 Frederico Caldeira Knabben
*
* == BEGIN LICENSE ==
*
* Licensed under the terms of any of the following licenses at your
* choice:
*
* - GNU General Public License Version 2 or later (the "GPL")
* http://www.gnu.org/licenses/gpl.html
*
* - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
* http://www.gnu.org/licenses/lgpl.html
*
* - Mozilla Public License Version 1.1 or later (the "MPL")
* http://www.mozilla.org/MPL/MPL-1.1.html
*
* == END LICENSE ==
*
* Contains the DTD mapping for XHTML 1.0 Transitional.
* This file was automatically generated from the file: xhtml10-transitional.dtd
*/
FCK.DTD = (function()
{
var X = FCKTools.Merge ;
var A,L,J,M,N,O,D,H,P,K,Q,F,G,C,B,E,I ;
A = {isindex:1, fieldset:1} ;
B = {input:1, button:1, select:1, textarea:1, label:1} ;
C = X({a:1}, B) ;
D = X({iframe:1}, C) ;
E = {hr:1, ul:1, menu:1, div:1, blockquote:1, noscript:1, table:1, center:1, address:1, dir:1, pre:1, h5:1, dl:1, h4:1, noframes:1, h6:1, ol:1, h1:1, h3:1, h2:1} ;
F = {ins:1, del:1, script:1} ;
G = X({b:1, acronym:1, bdo:1, 'var':1, '#':1, abbr:1, code:1, br:1, i:1, cite:1, kbd:1, u:1, strike:1, s:1, tt:1, strong:1, q:1, samp:1, em:1, dfn:1, span:1}, F) ;
H = X({sub:1, img:1, object:1, sup:1, basefont:1, map:1, applet:1, font:1, big:1, small:1}, G) ;
I = X({p:1}, H) ;
J = X({iframe:1}, H, B) ;
K = {img:1, noscript:1, br:1, kbd:1, center:1, button:1, basefont:1, h5:1, h4:1, samp:1, h6:1, ol:1, h1:1, h3:1, h2:1, form:1, font:1, '#':1, select:1, menu:1, ins:1, abbr:1, label:1, code:1, table:1, script:1, cite:1, input:1, iframe:1, strong:1, textarea:1, noframes:1, big:1, small:1, span:1, hr:1, sub:1, bdo:1, 'var':1, div:1, object:1, sup:1, strike:1, dir:1, map:1, dl:1, applet:1, del:1, isindex:1, fieldset:1, ul:1, b:1, acronym:1, a:1, blockquote:1, i:1, u:1, s:1, tt:1, address:1, q:1, pre:1, p:1, em:1, dfn:1} ;
L = X({a:1}, J) ;
M = {tr:1} ;
N = {'#':1} ;
O = X({param:1}, K) ;
P = X({form:1}, A, D, E, I) ;
Q = {li:1} ;
return {
col: {},
tr: {td:1, th:1},
img: {},
colgroup: {col:1},
noscript: P,
td: P,
br: {},
th: P,
center: P,
kbd: L,
button: X(I, E),
basefont: {},
h5: L,
h4: L,
samp: L,
h6: L,
ol: Q,
h1: L,
h3: L,
option: N,
h2: L,
form: X(A, D, E, I),
select: {optgroup:1, option:1},
font: J, // Changed from L to J (see (1))
ins: P,
menu: Q,
abbr: L,
label: L,
table: {thead:1, col:1, tbody:1, tr:1, colgroup:1, caption:1, tfoot:1},
code: L,
script: N,
tfoot: M,
cite: L,
li: P,
input: {},
iframe: P,
strong: J, // Changed from L to J (see (1))
textarea: N,
noframes: P,
big: J, // Changed from L to J (see (1))
small: J, // Changed from L to J (see (1))
span: J, // Changed from L to J (see (1))
hr: {},
dt: L,
sub: J, // Changed from L to J (see (1))
optgroup: {option:1},
param: {},
bdo: L,
'var': J, // Changed from L to J (see (1))
div: P,
object: O,
sup: J, // Changed from L to J (see (1))
dd: P,
strike: J, // Changed from L to J (see (1))
area: {},
dir: Q,
map: X({area:1, form:1, p:1}, A, F, E),
applet: O,
dl: {dt:1, dd:1},
del: P,
isindex: {},
fieldset: X({legend:1}, K),
thead: M,
ul: Q,
acronym: L,
b: J, // Changed from L to J (see (1))
a: J,
blockquote: P,
caption: L,
i: J, // Changed from L to J (see (1))
u: J, // Changed from L to J (see (1))
tbody: M,
s: L,
address: X(D, I),
tt: J, // Changed from L to J (see (1))
legend: L,
q: L,
pre: X(G, C),
p: L,
em: J, // Changed from L to J (see (1))
dfn: L
} ;
})() ;
/*
Notes:
(1) According to the DTD, many elements, like <b> accept <a> elements
inside of them. But, to produce better output results, we have manually
changed the map to avoid breaking the links on pieces, having
"<b>this is a </b><a><b>link</b> test</a>", instead of
"<b>this is a <a>link</a></b><a> test</a>".
*/
| zzshop | trunk/includes/fckeditor/editor/dtd/fck_xhtml10transitional.js | JavaScript | asf20 | 4,757 |
/*
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
* Copyright (C) 2003-2008 Frederico Caldeira Knabben
*
* == BEGIN LICENSE ==
*
* Licensed under the terms of any of the following licenses at your
* choice:
*
* - GNU General Public License Version 2 or later (the "GPL")
* http://www.gnu.org/licenses/gpl.html
*
* - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
* http://www.gnu.org/licenses/lgpl.html
*
* - Mozilla Public License Version 1.1 or later (the "MPL")
* http://www.mozilla.org/MPL/MPL-1.1.html
*
* == END LICENSE ==
*
* Contains the DTD mapping for XHTML 1.0 Strict.
* This file was automatically generated from the file: xhtml10-strict.dtd
*/
FCK.DTD = (function()
{
var X = FCKTools.Merge ;
var H,I,J,K,C,L,M,A,B,D,E,G,N,F ;
A = {ins:1, del:1, script:1} ;
B = {hr:1, ul:1, div:1, blockquote:1, noscript:1, table:1, address:1, pre:1, p:1, h5:1, dl:1, h4:1, ol:1, h6:1, h1:1, h3:1, h2:1} ;
C = X({fieldset:1}, B) ;
D = X({sub:1, bdo:1, 'var':1, sup:1, br:1, kbd:1, map:1, samp:1, b:1, acronym:1, '#':1, abbr:1, code:1, i:1, cite:1, tt:1, strong:1, q:1, em:1, big:1, small:1, span:1, dfn:1}, A) ;
E = X({img:1, object:1}, D) ;
F = {input:1, button:1, textarea:1, select:1, label:1} ;
G = X({a:1}, F) ;
H = {img:1, noscript:1, br:1, kbd:1, button:1, h5:1, h4:1, samp:1, h6:1, ol:1, h1:1, h3:1, h2:1, form:1, select:1, '#':1, ins:1, abbr:1, label:1, code:1, table:1, script:1, cite:1, input:1, strong:1, textarea:1, big:1, small:1, span:1, hr:1, sub:1, bdo:1, 'var':1, div:1, object:1, sup:1, map:1, dl:1, del:1, fieldset:1, ul:1, b:1, acronym:1, a:1, blockquote:1, i:1, address:1, tt:1, q:1, pre:1, p:1, em:1, dfn:1} ;
I = X({form:1, fieldset:1}, B, E, G) ;
J = {tr:1} ;
K = {'#':1} ;
L = X(E, G) ;
M = {li:1} ;
N = X({form:1}, A, C) ;
return {
col: {},
tr: {td:1, th:1},
img: {},
colgroup: {col:1},
noscript: N,
td: I,
br: {},
th: I,
kbd: L,
button: X(B, E),
h5: L,
h4: L,
samp: L,
h6: L,
ol: M,
h1: L,
h3: L,
option: K,
h2: L,
form: X(A, C),
select: {optgroup:1, option:1},
ins: I,
abbr: L,
label: L,
code: L,
table: {thead:1, col:1, tbody:1, tr:1, colgroup:1, caption:1, tfoot:1},
script: K,
tfoot: J,
cite: L,
li: I,
input: {},
strong: L,
textarea: K,
big: L,
small: L,
span: L,
dt: L,
hr: {},
sub: L,
optgroup: {option:1},
bdo: L,
param: {},
'var': L,
div: I,
object: X({param:1}, H),
sup: L,
dd: I,
area: {},
map: X({form:1, area:1}, A, C),
dl: {dt:1, dd:1},
del: I,
fieldset: X({legend:1}, H),
thead: J,
ul: M,
acronym: L,
b: L,
a: X({img:1, object:1}, D, F),
blockquote: N,
caption: L,
i: L,
tbody: J,
address: L,
tt: L,
legend: L,
q: L,
pre: X({a:1}, D, F),
p: L,
em: L,
dfn: L
} ;
})() ;
| zzshop | trunk/includes/fckeditor/editor/dtd/fck_xhtml10strict.js | JavaScript | asf20 | 3,433 |
/*
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
* Copyright (C) 2003-2008 Frederico Caldeira Knabben
*
* == BEGIN LICENSE ==
*
* Licensed under the terms of any of the following licenses at your
* choice:
*
* - GNU General Public License Version 2 or later (the "GPL")
* http://www.gnu.org/licenses/gpl.html
*
* - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
* http://www.gnu.org/licenses/lgpl.html
*
* - Mozilla Public License Version 1.1 or later (the "MPL")
* http://www.mozilla.org/MPL/MPL-1.1.html
*
* == END LICENSE ==
*
* Chinese Traditional language file.
*/
var FCKLang =
{
// Language direction : "ltr" (left to right) or "rtl" (right to left).
Dir : "ltr",
ToolbarCollapse : "隱藏面板",
ToolbarExpand : "顯示面板",
// Toolbar Items and Context Menu
Save : "儲存",
NewPage : "開新檔案",
Preview : "預覽",
Cut : "剪下",
Copy : "複製",
Paste : "貼上",
PasteText : "貼為純文字格式",
PasteWord : "自 Word 貼上",
Print : "列印",
SelectAll : "全選",
RemoveFormat : "清除格式",
InsertLinkLbl : "超連結",
InsertLink : "插入/編輯超連結",
RemoveLink : "移除超連結",
VisitLink : "開啟超連結",
Anchor : "插入/編輯錨點",
AnchorDelete : "移除錨點",
InsertImageLbl : "影像",
InsertImage : "插入/編輯影像",
InsertFlashLbl : "Flash",
InsertFlash : "插入/編輯 Flash",
UpFileBtn : "上傳文件",
InsertTableLbl : "表格",
InsertTable : "插入/編輯表格",
InsertLineLbl : "水平線",
InsertLine : "插入水平線",
InsertSpecialCharLbl: "特殊符號",
InsertSpecialChar : "插入特殊符號",
InsertSmileyLbl : "表情符號",
InsertSmiley : "插入表情符號",
About : "關於 FCKeditor",
Bold : "粗體",
Italic : "斜體",
Underline : "底線",
StrikeThrough : "刪除線",
Subscript : "下標",
Superscript : "上標",
LeftJustify : "靠左對齊",
CenterJustify : "置中",
RightJustify : "靠右對齊",
BlockJustify : "左右對齊",
DecreaseIndent : "減少縮排",
IncreaseIndent : "增加縮排",
Blockquote : "引用文字",
CreateDiv : "新增 Div 標籤",
EditDiv : "變更 Div 標籤",
DeleteDiv : "移除 Div 標籤",
Undo : "復原",
Redo : "重複",
NumberedListLbl : "編號清單",
NumberedList : "插入/移除編號清單",
BulletedListLbl : "項目清單",
BulletedList : "插入/移除項目清單",
ShowTableBorders : "顯示表格邊框",
ShowDetails : "顯示詳細資料",
Style : "樣式",
FontFormat : "格式",
Font : "字體",
FontSize : "大小",
TextColor : "文字顏色",
BGColor : "背景顏色",
Source : "原始碼",
Find : "尋找",
Replace : "取代",
SpellCheck : "拼字檢查",
UniversalKeyboard : "萬國鍵盤",
PageBreakLbl : "分頁符號",
PageBreak : "插入分頁符號",
Form : "表單",
Checkbox : "核取方塊",
RadioButton : "選項按鈕",
TextField : "文字方塊",
Textarea : "文字區域",
HiddenField : "隱藏欄位",
Button : "按鈕",
SelectionField : "清單/選單",
ImageButton : "影像按鈕",
FitWindow : "編輯器最大化",
ShowBlocks : "顯示區塊",
// Context Menu
EditLink : "編輯超連結",
CellCM : "儲存格",
RowCM : "列",
ColumnCM : "欄",
InsertRowAfter : "向下插入列",
InsertRowBefore : "向上插入列",
DeleteRows : "刪除列",
InsertColumnAfter : "向右插入欄",
InsertColumnBefore : "向左插入欄",
DeleteColumns : "刪除欄",
InsertCellAfter : "向右插入儲存格",
InsertCellBefore : "向左插入儲存格",
DeleteCells : "刪除儲存格",
MergeCells : "合併儲存格",
MergeRight : "向右合併儲存格",
MergeDown : "向下合併儲存格",
HorizontalSplitCell : "橫向分割儲存格",
VerticalSplitCell : "縱向分割儲存格",
TableDelete : "刪除表格",
CellProperties : "儲存格屬性",
TableProperties : "表格屬性",
ImageProperties : "影像屬性",
FlashProperties : "Flash 屬性",
AnchorProp : "錨點屬性",
ButtonProp : "按鈕屬性",
CheckboxProp : "核取方塊屬性",
HiddenFieldProp : "隱藏欄位屬性",
RadioButtonProp : "選項按鈕屬性",
ImageButtonProp : "影像按鈕屬性",
TextFieldProp : "文字方塊屬性",
SelectionFieldProp : "清單/選單屬性",
TextareaProp : "文字區域屬性",
FormProp : "表單屬性",
FontFormats : "一般;已格式化;位址;標題 1;標題 2;標題 3;標題 4;標題 5;標題 6;一般 (DIV)",
// Alerts and Messages
ProcessingXHTML : "處理 XHTML 中,請稍候…",
Done : "完成",
PasteWordConfirm : "您想貼上的文字似乎是自 Word 複製而來,請問您是否要先清除 Word 的格式後再行貼上?",
NotCompatiblePaste : "此指令僅在 Internet Explorer 5.5 或以上的版本有效。請問您是否同意不清除格式即貼上?",
UnknownToolbarItem : "未知工具列項目 \"%1\"",
UnknownCommand : "未知指令名稱 \"%1\"",
NotImplemented : "尚未安裝此指令",
UnknownToolbarSet : "工具列設定 \"%1\" 不存在",
NoActiveX : "瀏覽器的安全性設定限制了本編輯器的某些功能。您必須啟用安全性設定中的「執行ActiveX控制項與外掛程式」項目,否則本編輯器將會出現錯誤並缺少某些功能",
BrowseServerBlocked : "無法開啟資源瀏覽器,請確定所有快顯視窗封鎖程式是否關閉",
DialogBlocked : "無法開啟對話視窗,請確定所有快顯視窗封鎖程式是否關閉",
VisitLinkBlocked : "無法開啟新視窗,請確定所有快顯視窗封鎖程式是否關閉",
// Dialogs
DlgBtnOK : "確定",
DlgBtnCancel : "取消",
DlgBtnClose : "關閉",
DlgBtnBrowseServer : "瀏覽伺服器端",
DlgAdvancedTag : "進階",
DlgOpOther : "<其他>",
DlgInfoTab : "資訊",
DlgAlertUrl : "請插入 URL",
// General Dialogs Labels
DlgGenNotSet : "<尚未設定>",
DlgGenId : "ID",
DlgGenLangDir : "語言方向",
DlgGenLangDirLtr : "由左而右 (LTR)",
DlgGenLangDirRtl : "由右而左 (RTL)",
DlgGenLangCode : "語言代碼",
DlgGenAccessKey : "存取鍵",
DlgGenName : "名稱",
DlgGenTabIndex : "定位順序",
DlgGenLongDescr : "詳細 URL",
DlgGenClass : "樣式表類別",
DlgGenTitle : "標題",
DlgGenContType : "內容類型",
DlgGenLinkCharset : "連結資源之編碼",
DlgGenStyle : "樣式",
// Image Dialog
DlgImgTitle : "影像屬性",
DlgImgInfoTab : "影像資訊",
DlgImgBtnUpload : "上傳至伺服器",
DlgImgURL : "URL",
DlgImgUpload : "上傳",
DlgImgAlt : "替代文字",
DlgImgWidth : "寬度",
DlgImgHeight : "高度",
DlgImgLockRatio : "等比例",
DlgBtnResetSize : "重設為原大小",
DlgImgBorder : "邊框",
DlgImgHSpace : "水平距離",
DlgImgVSpace : "垂直距離",
DlgImgAlign : "對齊",
DlgImgAlignLeft : "靠左對齊",
DlgImgAlignAbsBottom: "絕對下方",
DlgImgAlignAbsMiddle: "絕對中間",
DlgImgAlignBaseline : "基準線",
DlgImgAlignBottom : "靠下對齊",
DlgImgAlignMiddle : "置中對齊",
DlgImgAlignRight : "靠右對齊",
DlgImgAlignTextTop : "文字上方",
DlgImgAlignTop : "靠上對齊",
DlgImgPreview : "預覽",
DlgImgAlertUrl : "請輸入影像 URL",
DlgImgLinkTab : "超連結",
// Flash Dialog
DlgFlashTitle : "Flash 屬性",
DlgFlashChkPlay : "自動播放",
DlgFlashChkLoop : "重複",
DlgFlashChkMenu : "開啟選單",
DlgFlashScale : "縮放",
DlgFlashScaleAll : "全部顯示",
DlgFlashScaleNoBorder : "無邊框",
DlgFlashScaleFit : "精確符合",
// Link Dialog
DlgLnkWindowTitle : "超連結",
DlgLnkInfoTab : "超連結資訊",
DlgLnkTargetTab : "目標",
DlgLnkType : "超連接類型",
DlgLnkTypeURL : "URL",
DlgLnkTypeAnchor : "本頁錨點",
DlgLnkTypeEMail : "電子郵件",
DlgLnkProto : "通訊協定",
DlgLnkProtoOther : "<其他>",
DlgLnkURL : "URL",
DlgLnkAnchorSel : "請選擇錨點",
DlgLnkAnchorByName : "依錨點名稱",
DlgLnkAnchorById : "依元件 ID",
DlgLnkNoAnchors : "(本文件尚無可用之錨點)",
DlgLnkEMail : "電子郵件",
DlgLnkEMailSubject : "郵件主旨",
DlgLnkEMailBody : "郵件內容",
DlgLnkUpload : "上傳",
DlgLnkBtnUpload : "傳送至伺服器",
DlgLnkTarget : "目標",
DlgLnkTargetFrame : "<框架>",
DlgLnkTargetPopup : "<快顯視窗>",
DlgLnkTargetBlank : "新視窗 (_blank)",
DlgLnkTargetParent : "父視窗 (_parent)",
DlgLnkTargetSelf : "本視窗 (_self)",
DlgLnkTargetTop : "最上層視窗 (_top)",
DlgLnkTargetFrameName : "目標框架名稱",
DlgLnkPopWinName : "快顯視窗名稱",
DlgLnkPopWinFeat : "快顯視窗屬性",
DlgLnkPopResize : "可調整大小",
DlgLnkPopLocation : "網址列",
DlgLnkPopMenu : "選單列",
DlgLnkPopScroll : "捲軸",
DlgLnkPopStatus : "狀態列",
DlgLnkPopToolbar : "工具列",
DlgLnkPopFullScrn : "全螢幕 (IE)",
DlgLnkPopDependent : "從屬 (NS)",
DlgLnkPopWidth : "寬",
DlgLnkPopHeight : "高",
DlgLnkPopLeft : "左",
DlgLnkPopTop : "右",
DlnLnkMsgNoUrl : "請輸入欲連結的 URL",
DlnLnkMsgNoEMail : "請輸入電子郵件位址",
DlnLnkMsgNoAnchor : "請選擇錨點",
DlnLnkMsgInvPopName : "快顯名稱必須以「英文字母」為開頭,且不得含有空白",
// Color Dialog
DlgColorTitle : "請選擇顏色",
DlgColorBtnClear : "清除",
DlgColorHighlight : "預覽",
DlgColorSelected : "選擇",
// Smiley Dialog
DlgSmileyTitle : "插入表情符號",
// Special Character Dialog
DlgSpecialCharTitle : "請選擇特殊符號",
// Table Dialog
DlgTableTitle : "表格屬性",
DlgTableRows : "列數",
DlgTableColumns : "欄數",
DlgTableBorder : "邊框",
DlgTableAlign : "對齊",
DlgTableAlignNotSet : "<未設定>",
DlgTableAlignLeft : "靠左對齊",
DlgTableAlignCenter : "置中",
DlgTableAlignRight : "靠右對齊",
DlgTableWidth : "寬度",
DlgTableWidthPx : "像素",
DlgTableWidthPc : "百分比",
DlgTableHeight : "高度",
DlgTableCellSpace : "間距",
DlgTableCellPad : "內距",
DlgTableCaption : "標題",
DlgTableSummary : "摘要",
// Table Cell Dialog
DlgCellTitle : "儲存格屬性",
DlgCellWidth : "寬度",
DlgCellWidthPx : "像素",
DlgCellWidthPc : "百分比",
DlgCellHeight : "高度",
DlgCellWordWrap : "自動換行",
DlgCellWordWrapNotSet : "<尚未設定>",
DlgCellWordWrapYes : "是",
DlgCellWordWrapNo : "否",
DlgCellHorAlign : "水平對齊",
DlgCellHorAlignNotSet : "<尚未設定>",
DlgCellHorAlignLeft : "靠左對齊",
DlgCellHorAlignCenter : "置中",
DlgCellHorAlignRight: "靠右對齊",
DlgCellVerAlign : "垂直對齊",
DlgCellVerAlignNotSet : "<尚未設定>",
DlgCellVerAlignTop : "靠上對齊",
DlgCellVerAlignMiddle : "置中",
DlgCellVerAlignBottom : "靠下對齊",
DlgCellVerAlignBaseline : "基準線",
DlgCellRowSpan : "合併列數",
DlgCellCollSpan : "合併欄数",
DlgCellBackColor : "背景顏色",
DlgCellBorderColor : "邊框顏色",
DlgCellBtnSelect : "請選擇…",
// Find and Replace Dialog
DlgFindAndReplaceTitle : "尋找與取代",
// Find Dialog
DlgFindTitle : "尋找",
DlgFindFindBtn : "尋找",
DlgFindNotFoundMsg : "未找到指定的文字。",
// Replace Dialog
DlgReplaceTitle : "取代",
DlgReplaceFindLbl : "尋找:",
DlgReplaceReplaceLbl : "取代:",
DlgReplaceCaseChk : "大小寫須相符",
DlgReplaceReplaceBtn : "取代",
DlgReplaceReplAllBtn : "全部取代",
DlgReplaceWordChk : "全字相符",
// Paste Operations / Dialog
PasteErrorCut : "瀏覽器的安全性設定不允許編輯器自動執行剪下動作。請使用快捷鍵 (Ctrl+X) 剪下。",
PasteErrorCopy : "瀏覽器的安全性設定不允許編輯器自動執行複製動作。請使用快捷鍵 (Ctrl+C) 複製。",
PasteAsText : "貼為純文字格式",
PasteFromWord : "自 Word 貼上",
DlgPasteMsg2 : "請使用快捷鍵 (<strong>Ctrl+V</strong>) 貼到下方區域中並按下 <strong>確定</strong>",
DlgPasteSec : "因為瀏覽器的安全性設定,本編輯器無法直接存取您的剪貼簿資料,請您自行在本視窗進行貼上動作。",
DlgPasteIgnoreFont : "移除字型設定",
DlgPasteRemoveStyles : "移除樣式設定",
// Color Picker
ColorAutomatic : "自動",
ColorMoreColors : "更多顏色…",
// Document Properties
DocProps : "文件屬性",
// Anchor Dialog
DlgAnchorTitle : "命名錨點",
DlgAnchorName : "錨點名稱",
DlgAnchorErrorName : "請輸入錨點名稱",
// Speller Pages Dialog
DlgSpellNotInDic : "不在字典中",
DlgSpellChangeTo : "更改為",
DlgSpellBtnIgnore : "忽略",
DlgSpellBtnIgnoreAll : "全部忽略",
DlgSpellBtnReplace : "取代",
DlgSpellBtnReplaceAll : "全部取代",
DlgSpellBtnUndo : "復原",
DlgSpellNoSuggestions : "- 無建議值 -",
DlgSpellProgress : "進行拼字檢查中…",
DlgSpellNoMispell : "拼字檢查完成:未發現拼字錯誤",
DlgSpellNoChanges : "拼字檢查完成:未更改任何單字",
DlgSpellOneChange : "拼字檢查完成:更改了 1 個單字",
DlgSpellManyChanges : "拼字檢查完成:更改了 %1 個單字",
IeSpellDownload : "尚未安裝拼字檢查元件。您是否想要現在下載?",
// Button Dialog
DlgButtonText : "顯示文字 (值)",
DlgButtonType : "類型",
DlgButtonTypeBtn : "按鈕 (Button)",
DlgButtonTypeSbm : "送出 (Submit)",
DlgButtonTypeRst : "重設 (Reset)",
// Checkbox and Radio Button Dialogs
DlgCheckboxName : "名稱",
DlgCheckboxValue : "選取值",
DlgCheckboxSelected : "已選取",
// Form Dialog
DlgFormName : "名稱",
DlgFormAction : "動作",
DlgFormMethod : "方法",
// Select Field Dialog
DlgSelectName : "名稱",
DlgSelectValue : "選取值",
DlgSelectSize : "大小",
DlgSelectLines : "行",
DlgSelectChkMulti : "可多選",
DlgSelectOpAvail : "可用選項",
DlgSelectOpText : "顯示文字",
DlgSelectOpValue : "值",
DlgSelectBtnAdd : "新增",
DlgSelectBtnModify : "修改",
DlgSelectBtnUp : "上移",
DlgSelectBtnDown : "下移",
DlgSelectBtnSetValue : "設為預設值",
DlgSelectBtnDelete : "刪除",
// Textarea Dialog
DlgTextareaName : "名稱",
DlgTextareaCols : "字元寬度",
DlgTextareaRows : "列數",
// Text Field Dialog
DlgTextName : "名稱",
DlgTextValue : "值",
DlgTextCharWidth : "字元寬度",
DlgTextMaxChars : "最多字元數",
DlgTextType : "類型",
DlgTextTypeText : "文字",
DlgTextTypePass : "密碼",
// Hidden Field Dialog
DlgHiddenName : "名稱",
DlgHiddenValue : "值",
// Bulleted List Dialog
BulletedListProp : "項目清單屬性",
NumberedListProp : "編號清單屬性",
DlgLstStart : "起始編號",
DlgLstType : "清單類型",
DlgLstTypeCircle : "圓圈",
DlgLstTypeDisc : "圓點",
DlgLstTypeSquare : "方塊",
DlgLstTypeNumbers : "數字 (1, 2, 3)",
DlgLstTypeLCase : "小寫字母 (a, b, c)",
DlgLstTypeUCase : "大寫字母 (A, B, C)",
DlgLstTypeSRoman : "小寫羅馬數字 (i, ii, iii)",
DlgLstTypeLRoman : "大寫羅馬數字 (I, II, III)",
// Document Properties Dialog
DlgDocGeneralTab : "一般",
DlgDocBackTab : "背景",
DlgDocColorsTab : "顯色與邊界",
DlgDocMetaTab : "Meta 資料",
DlgDocPageTitle : "頁面標題",
DlgDocLangDir : "語言方向",
DlgDocLangDirLTR : "由左而右 (LTR)",
DlgDocLangDirRTL : "由右而左 (RTL)",
DlgDocLangCode : "語言代碼",
DlgDocCharSet : "字元編碼",
DlgDocCharSetCE : "中歐語系",
DlgDocCharSetCT : "正體中文 (Big5)",
DlgDocCharSetCR : "斯拉夫文",
DlgDocCharSetGR : "希臘文",
DlgDocCharSetJP : "日文",
DlgDocCharSetKR : "韓文",
DlgDocCharSetTR : "土耳其文",
DlgDocCharSetUN : "Unicode (UTF-8)",
DlgDocCharSetWE : "西歐語系",
DlgDocCharSetOther : "其他字元編碼",
DlgDocDocType : "文件類型",
DlgDocDocTypeOther : "其他文件類型",
DlgDocIncXHTML : "包含 XHTML 定義",
DlgDocBgColor : "背景顏色",
DlgDocBgImage : "背景影像",
DlgDocBgNoScroll : "浮水印",
DlgDocCText : "文字",
DlgDocCLink : "超連結",
DlgDocCVisited : "已瀏覽過的超連結",
DlgDocCActive : "作用中的超連結",
DlgDocMargins : "頁面邊界",
DlgDocMaTop : "上",
DlgDocMaLeft : "左",
DlgDocMaRight : "右",
DlgDocMaBottom : "下",
DlgDocMeIndex : "文件索引關鍵字 (用半形逗號[,]分隔)",
DlgDocMeDescr : "文件說明",
DlgDocMeAuthor : "作者",
DlgDocMeCopy : "版權所有",
DlgDocPreview : "預覽",
// Templates Dialog
Templates : "樣版",
DlgTemplatesTitle : "內容樣版",
DlgTemplatesSelMsg : "請選擇欲開啟的樣版<br> (原有的內容將會被清除):",
DlgTemplatesLoading : "讀取樣版清單中,請稍候…",
DlgTemplatesNoTpl : "(無樣版)",
DlgTemplatesReplace : "取代原有內容",
// About Dialog
DlgAboutAboutTab : "關於",
DlgAboutBrowserInfoTab : "瀏覽器資訊",
DlgAboutLicenseTab : "許可證",
DlgAboutVersion : "版本",
DlgAboutInfo : "想獲得更多資訊請至 ",
// Div Dialog
DlgDivGeneralTab : "一般",
DlgDivAdvancedTab : "進階",
DlgDivStyle : "樣式",
DlgDivInlineStyle : "CSS 樣式"
};
| zzshop | trunk/includes/fckeditor/editor/lang/zh.js | JavaScript | asf20 | 17,480 |
/*
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
* Copyright (C) 2003-2008 Frederico Caldeira Knabben
*
* == BEGIN LICENSE ==
*
* Licensed under the terms of any of the following licenses at your
* choice:
*
* - GNU General Public License Version 2 or later (the "GPL")
* http://www.gnu.org/licenses/gpl.html
*
* - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
* http://www.gnu.org/licenses/lgpl.html
*
* - Mozilla Public License Version 1.1 or later (the "MPL")
* http://www.mozilla.org/MPL/MPL-1.1.html
*
* == END LICENSE ==
*
* Chinese Simplified language file.
*/
var FCKLang =
{
// Language direction : "ltr" (left to right) or "rtl" (right to left).
Dir : "ltr",
ToolbarCollapse : "折叠工具栏",
ToolbarExpand : "展开工具栏",
// Toolbar Items and Context Menu
Save : "保存",
NewPage : "新建",
Preview : "预览",
Cut : "剪切",
Copy : "复制",
Paste : "粘贴",
PasteText : "粘贴为无格式文本",
PasteWord : "从 MS Word 粘贴",
Print : "打印",
SelectAll : "全选",
RemoveFormat : "清除格式",
InsertLinkLbl : "超链接",
InsertLink : "插入/编辑超链接",
RemoveLink : "取消超链接",
VisitLink : "打开超链接",
Anchor : "插入/编辑锚点链接",
AnchorDelete : "清除锚点链接",
InsertImageLbl : "图象",
InsertImage : "插入/编辑图象",
InsertFlashLbl : "Flash",
InsertFlash : "插入/编辑 Flash",
UpFileBtn : "上传文件",
InsertTableLbl : "表格",
InsertTable : "插入/编辑表格",
InsertLineLbl : "水平线",
InsertLine : "插入水平线",
InsertSpecialCharLbl: "特殊符号",
InsertSpecialChar : "插入特殊符号",
InsertSmileyLbl : "表情符",
InsertSmiley : "插入表情图标",
About : "关于 FCKeditor",
Bold : "加粗",
Italic : "倾斜",
Underline : "下划线",
StrikeThrough : "删除线",
Subscript : "下标",
Superscript : "上标",
LeftJustify : "左对齐",
CenterJustify : "居中对齐",
RightJustify : "右对齐",
BlockJustify : "两端对齐",
DecreaseIndent : "减少缩进量",
IncreaseIndent : "增加缩进量",
Blockquote : "块引用",
CreateDiv : "新增 Div 标籤",
EditDiv : "更改 Div 标籤",
DeleteDiv : "删除 Div 标籤",
Undo : "撤消",
Redo : "重做",
NumberedListLbl : "编号列表",
NumberedList : "插入/删除编号列表",
BulletedListLbl : "项目列表",
BulletedList : "插入/删除项目列表",
ShowTableBorders : "显示表格边框",
ShowDetails : "显示详细资料",
Style : "样式",
FontFormat : "格式",
Font : "字体",
FontSize : "大小",
TextColor : "文本颜色",
BGColor : "背景颜色",
Source : "源代码",
Find : "查找",
Replace : "替换",
SpellCheck : "拼写检查",
UniversalKeyboard : "软键盘",
PageBreakLbl : "分页符",
PageBreak : "插入分页符",
Form : "表单",
Checkbox : "复选框",
RadioButton : "单选按钮",
TextField : "单行文本",
Textarea : "多行文本",
HiddenField : "隐藏域",
Button : "按钮",
SelectionField : "列表/菜单",
ImageButton : "图像域",
FitWindow : "全屏编辑",
ShowBlocks : "显示区块",
// Context Menu
EditLink : "编辑超链接",
CellCM : "单元格",
RowCM : "行",
ColumnCM : "列",
InsertRowAfter : "下插入行",
InsertRowBefore : "上插入行",
DeleteRows : "删除行",
InsertColumnAfter : "右插入列",
InsertColumnBefore : "左插入列",
DeleteColumns : "删除列",
InsertCellAfter : "右插入单元格",
InsertCellBefore : "左插入单元格",
DeleteCells : "删除单元格",
MergeCells : "合并单元格",
MergeRight : "右合并单元格",
MergeDown : "下合并单元格",
HorizontalSplitCell : "橫拆分单元格",
VerticalSplitCell : "縱拆分单元格",
TableDelete : "删除表格",
CellProperties : "单元格属性",
TableProperties : "表格属性",
ImageProperties : "图象属性",
FlashProperties : "Flash 属性",
AnchorProp : "锚点链接属性",
ButtonProp : "按钮属性",
CheckboxProp : "复选框属性",
HiddenFieldProp : "隐藏域属性",
RadioButtonProp : "单选按钮属性",
ImageButtonProp : "图像域属性",
TextFieldProp : "单行文本属性",
SelectionFieldProp : "菜单/列表属性",
TextareaProp : "多行文本属性",
FormProp : "表单属性",
FontFormats : "普通;已编排格式;地址;标题 1;标题 2;标题 3;标题 4;标题 5;标题 6;段落(DIV)",
// Alerts and Messages
ProcessingXHTML : "正在处理 XHTML,请稍等...",
Done : "完成",
PasteWordConfirm : "您要粘贴的内容好像是来自 MS Word,是否要清除 MS Word 格式后再粘贴?",
NotCompatiblePaste : "该命令需要 Internet Explorer 5.5 或更高版本的支持,是否按常规粘贴进行?",
UnknownToolbarItem : "未知工具栏项目 \"%1\"",
UnknownCommand : "未知命令名称 \"%1\"",
NotImplemented : "命令无法执行",
UnknownToolbarSet : "工具栏设置 \"%1\" 不存在",
NoActiveX : "浏览器安全设置限制了本编辑器的某些功能。您必须启用安全设置中的“运行 ActiveX 控件和插件”,否则将出现某些错误并缺少功能。",
BrowseServerBlocked : "无法打开资源浏览器,请确认是否启用了禁止弹出窗口。",
DialogBlocked : "无法打开对话框窗口,请确认是否启用了禁止弹出窗口或网页对话框(IE)。",
VisitLinkBlocked : "无法打开新窗口,请确认是否启用了禁止弹出窗口或网页对话框(IE)。",
// Dialogs
DlgBtnOK : "确定",
DlgBtnCancel : "取消",
DlgBtnClose : "关闭",
DlgBtnBrowseServer : "浏览服务器",
DlgAdvancedTag : "高级",
DlgOpOther : "<其它>",
DlgInfoTab : "信息",
DlgAlertUrl : "请插入 URL",
// General Dialogs Labels
DlgGenNotSet : "<没有设置>",
DlgGenId : "ID",
DlgGenLangDir : "语言方向",
DlgGenLangDirLtr : "从左到右 (LTR)",
DlgGenLangDirRtl : "从右到左 (RTL)",
DlgGenLangCode : "语言代码",
DlgGenAccessKey : "访问键",
DlgGenName : "名称",
DlgGenTabIndex : "Tab 键次序",
DlgGenLongDescr : "详细说明地址",
DlgGenClass : "样式类名称",
DlgGenTitle : "标题",
DlgGenContType : "内容类型",
DlgGenLinkCharset : "字符编码",
DlgGenStyle : "行内样式",
// Image Dialog
DlgImgTitle : "图象属性",
DlgImgInfoTab : "图象",
DlgImgBtnUpload : "发送到服务器上",
DlgImgURL : "源文件",
DlgImgUpload : "上传",
DlgImgAlt : "替换文本",
DlgImgWidth : "宽度",
DlgImgHeight : "高度",
DlgImgLockRatio : "锁定比例",
DlgBtnResetSize : "恢复尺寸",
DlgImgBorder : "边框大小",
DlgImgHSpace : "水平间距",
DlgImgVSpace : "垂直间距",
DlgImgAlign : "对齐方式",
DlgImgAlignLeft : "左对齐",
DlgImgAlignAbsBottom: "绝对底边",
DlgImgAlignAbsMiddle: "绝对居中",
DlgImgAlignBaseline : "基线",
DlgImgAlignBottom : "底边",
DlgImgAlignMiddle : "居中",
DlgImgAlignRight : "右对齐",
DlgImgAlignTextTop : "文本上方",
DlgImgAlignTop : "顶端",
DlgImgPreview : "预览",
DlgImgAlertUrl : "请输入图象地址",
DlgImgLinkTab : "链接",
// Flash Dialog
DlgFlashTitle : "Flash 属性",
DlgFlashChkPlay : "自动播放",
DlgFlashChkLoop : "循环",
DlgFlashChkMenu : "启用 Flash 菜单",
DlgFlashScale : "缩放",
DlgFlashScaleAll : "全部显示",
DlgFlashScaleNoBorder : "无边框",
DlgFlashScaleFit : "严格匹配",
// Link Dialog
DlgLnkWindowTitle : "超链接",
DlgLnkInfoTab : "超链接信息",
DlgLnkTargetTab : "目标",
DlgLnkType : "超链接类型",
DlgLnkTypeURL : "超链接",
DlgLnkTypeAnchor : "页内锚点链接",
DlgLnkTypeEMail : "电子邮件",
DlgLnkProto : "协议",
DlgLnkProtoOther : "<其它>",
DlgLnkURL : "地址",
DlgLnkAnchorSel : "选择一个锚点",
DlgLnkAnchorByName : "按锚点名称",
DlgLnkAnchorById : "按锚点 ID",
DlgLnkNoAnchors : "(此文档没有可用的锚点)",
DlgLnkEMail : "地址",
DlgLnkEMailSubject : "主题",
DlgLnkEMailBody : "内容",
DlgLnkUpload : "上传",
DlgLnkBtnUpload : "发送到服务器上",
DlgLnkTarget : "目标",
DlgLnkTargetFrame : "<框架>",
DlgLnkTargetPopup : "<弹出窗口>",
DlgLnkTargetBlank : "新窗口 (_blank)",
DlgLnkTargetParent : "父窗口 (_parent)",
DlgLnkTargetSelf : "本窗口 (_self)",
DlgLnkTargetTop : "整页 (_top)",
DlgLnkTargetFrameName : "目标框架名称",
DlgLnkPopWinName : "弹出窗口名称",
DlgLnkPopWinFeat : "弹出窗口属性",
DlgLnkPopResize : "调整大小",
DlgLnkPopLocation : "地址栏",
DlgLnkPopMenu : "菜单栏",
DlgLnkPopScroll : "滚动条",
DlgLnkPopStatus : "状态栏",
DlgLnkPopToolbar : "工具栏",
DlgLnkPopFullScrn : "全屏 (IE)",
DlgLnkPopDependent : "依附 (NS)",
DlgLnkPopWidth : "宽",
DlgLnkPopHeight : "高",
DlgLnkPopLeft : "左",
DlgLnkPopTop : "右",
DlnLnkMsgNoUrl : "请输入超链接地址",
DlnLnkMsgNoEMail : "请输入电子邮件地址",
DlnLnkMsgNoAnchor : "请选择一个锚点",
DlnLnkMsgInvPopName : "弹出窗口名称必须以字母开头,并且不能含有空格。",
// Color Dialog
DlgColorTitle : "选择颜色",
DlgColorBtnClear : "清除",
DlgColorHighlight : "预览",
DlgColorSelected : "选择",
// Smiley Dialog
DlgSmileyTitle : "插入表情图标",
// Special Character Dialog
DlgSpecialCharTitle : "选择特殊符号",
// Table Dialog
DlgTableTitle : "表格属性",
DlgTableRows : "行数",
DlgTableColumns : "列数",
DlgTableBorder : "边框",
DlgTableAlign : "对齐",
DlgTableAlignNotSet : "<没有设置>",
DlgTableAlignLeft : "左对齐",
DlgTableAlignCenter : "居中",
DlgTableAlignRight : "右对齐",
DlgTableWidth : "宽度",
DlgTableWidthPx : "像素",
DlgTableWidthPc : "百分比",
DlgTableHeight : "高度",
DlgTableCellSpace : "间距",
DlgTableCellPad : "边距",
DlgTableCaption : "标题",
DlgTableSummary : "摘要",
// Table Cell Dialog
DlgCellTitle : "单元格属性",
DlgCellWidth : "宽度",
DlgCellWidthPx : "像素",
DlgCellWidthPc : "百分比",
DlgCellHeight : "高度",
DlgCellWordWrap : "自动换行",
DlgCellWordWrapNotSet : "<没有设置>",
DlgCellWordWrapYes : "是",
DlgCellWordWrapNo : "否",
DlgCellHorAlign : "水平对齐",
DlgCellHorAlignNotSet : "<没有设置>",
DlgCellHorAlignLeft : "左对齐",
DlgCellHorAlignCenter : "居中",
DlgCellHorAlignRight: "右对齐",
DlgCellVerAlign : "垂直对齐",
DlgCellVerAlignNotSet : "<没有设置>",
DlgCellVerAlignTop : "顶端",
DlgCellVerAlignMiddle : "居中",
DlgCellVerAlignBottom : "底部",
DlgCellVerAlignBaseline : "基线",
DlgCellRowSpan : "纵跨行数",
DlgCellCollSpan : "横跨列数",
DlgCellBackColor : "背景颜色",
DlgCellBorderColor : "边框颜色",
DlgCellBtnSelect : "选择...",
// Find and Replace Dialog
DlgFindAndReplaceTitle : "查找和替换",
// Find Dialog
DlgFindTitle : "查找",
DlgFindFindBtn : "查找",
DlgFindNotFoundMsg : "指定文本没有找到。",
// Replace Dialog
DlgReplaceTitle : "替换",
DlgReplaceFindLbl : "查找:",
DlgReplaceReplaceLbl : "替换:",
DlgReplaceCaseChk : "区分大小写",
DlgReplaceReplaceBtn : "替换",
DlgReplaceReplAllBtn : "全部替换",
DlgReplaceWordChk : "全字匹配",
// Paste Operations / Dialog
PasteErrorCut : "您的浏览器安全设置不允许编辑器自动执行剪切操作,请使用键盘快捷键(Ctrl+X)来完成。",
PasteErrorCopy : "您的浏览器安全设置不允许编辑器自动执行复制操作,请使用键盘快捷键(Ctrl+C)来完成。",
PasteAsText : "粘贴为无格式文本",
PasteFromWord : "从 MS Word 粘贴",
DlgPasteMsg2 : "请使用键盘快捷键(<STRONG>Ctrl+V</STRONG>)把内容粘贴到下面的方框里,再按 <STRONG>确定</STRONG>。",
DlgPasteSec : "因为你的浏览器的安全设置原因,本编辑器不能直接访问你的剪贴板内容,你需要在本窗口重新粘贴一次。",
DlgPasteIgnoreFont : "忽略 Font 标签",
DlgPasteRemoveStyles : "清理 CSS 样式",
// Color Picker
ColorAutomatic : "自动",
ColorMoreColors : "其它颜色...",
// Document Properties
DocProps : "页面属性",
// Anchor Dialog
DlgAnchorTitle : "命名锚点",
DlgAnchorName : "锚点名称",
DlgAnchorErrorName : "请输入锚点名称",
// Speller Pages Dialog
DlgSpellNotInDic : "没有在字典里",
DlgSpellChangeTo : "更改为",
DlgSpellBtnIgnore : "忽略",
DlgSpellBtnIgnoreAll : "全部忽略",
DlgSpellBtnReplace : "替换",
DlgSpellBtnReplaceAll : "全部替换",
DlgSpellBtnUndo : "撤消",
DlgSpellNoSuggestions : "- 没有建议 -",
DlgSpellProgress : "正在进行拼写检查...",
DlgSpellNoMispell : "拼写检查完成:没有发现拼写错误",
DlgSpellNoChanges : "拼写检查完成:没有更改任何单词",
DlgSpellOneChange : "拼写检查完成:更改了一个单词",
DlgSpellManyChanges : "拼写检查完成:更改了 %1 个单词",
IeSpellDownload : "拼写检查插件还没安装,你是否想现在就下载?",
// Button Dialog
DlgButtonText : "标签(值)",
DlgButtonType : "类型",
DlgButtonTypeBtn : "按钮",
DlgButtonTypeSbm : "提交",
DlgButtonTypeRst : "重设",
// Checkbox and Radio Button Dialogs
DlgCheckboxName : "名称",
DlgCheckboxValue : "选定值",
DlgCheckboxSelected : "已勾选",
// Form Dialog
DlgFormName : "名称",
DlgFormAction : "动作",
DlgFormMethod : "方法",
// Select Field Dialog
DlgSelectName : "名称",
DlgSelectValue : "选定",
DlgSelectSize : "高度",
DlgSelectLines : "行",
DlgSelectChkMulti : "允许多选",
DlgSelectOpAvail : "列表值",
DlgSelectOpText : "标签",
DlgSelectOpValue : "值",
DlgSelectBtnAdd : "新增",
DlgSelectBtnModify : "修改",
DlgSelectBtnUp : "上移",
DlgSelectBtnDown : "下移",
DlgSelectBtnSetValue : "设为初始化时选定",
DlgSelectBtnDelete : "删除",
// Textarea Dialog
DlgTextareaName : "名称",
DlgTextareaCols : "字符宽度",
DlgTextareaRows : "行数",
// Text Field Dialog
DlgTextName : "名称",
DlgTextValue : "初始值",
DlgTextCharWidth : "字符宽度",
DlgTextMaxChars : "最多字符数",
DlgTextType : "类型",
DlgTextTypeText : "文本",
DlgTextTypePass : "密码",
// Hidden Field Dialog
DlgHiddenName : "名称",
DlgHiddenValue : "初始值",
// Bulleted List Dialog
BulletedListProp : "项目列表属性",
NumberedListProp : "编号列表属性",
DlgLstStart : "开始序号",
DlgLstType : "列表类型",
DlgLstTypeCircle : "圆圈",
DlgLstTypeDisc : "圆点",
DlgLstTypeSquare : "方块",
DlgLstTypeNumbers : "数字 (1, 2, 3)",
DlgLstTypeLCase : "小写字母 (a, b, c)",
DlgLstTypeUCase : "大写字母 (A, B, C)",
DlgLstTypeSRoman : "小写罗马数字 (i, ii, iii)",
DlgLstTypeLRoman : "大写罗马数字 (I, II, III)",
// Document Properties Dialog
DlgDocGeneralTab : "常规",
DlgDocBackTab : "背景",
DlgDocColorsTab : "颜色和边距",
DlgDocMetaTab : "Meta 数据",
DlgDocPageTitle : "页面标题",
DlgDocLangDir : "语言方向",
DlgDocLangDirLTR : "从左到右 (LTR)",
DlgDocLangDirRTL : "从右到左 (RTL)",
DlgDocLangCode : "语言代码",
DlgDocCharSet : "字符编码",
DlgDocCharSetCE : "中欧",
DlgDocCharSetCT : "繁体中文 (Big5)",
DlgDocCharSetCR : "西里尔文",
DlgDocCharSetGR : "希腊文",
DlgDocCharSetJP : "日文",
DlgDocCharSetKR : "韩文",
DlgDocCharSetTR : "土耳其文",
DlgDocCharSetUN : "Unicode (UTF-8)",
DlgDocCharSetWE : "西欧",
DlgDocCharSetOther : "其它字符编码",
DlgDocDocType : "文档类型",
DlgDocDocTypeOther : "其它文档类型",
DlgDocIncXHTML : "包含 XHTML 声明",
DlgDocBgColor : "背景颜色",
DlgDocBgImage : "背景图像",
DlgDocBgNoScroll : "不滚动背景图像",
DlgDocCText : "文本",
DlgDocCLink : "超链接",
DlgDocCVisited : "已访问的超链接",
DlgDocCActive : "活动超链接",
DlgDocMargins : "页面边距",
DlgDocMaTop : "上",
DlgDocMaLeft : "左",
DlgDocMaRight : "右",
DlgDocMaBottom : "下",
DlgDocMeIndex : "页面索引关键字 (用半角逗号[,]分隔)",
DlgDocMeDescr : "页面说明",
DlgDocMeAuthor : "作者",
DlgDocMeCopy : "版权",
DlgDocPreview : "预览",
// Templates Dialog
Templates : "模板",
DlgTemplatesTitle : "内容模板",
DlgTemplatesSelMsg : "请选择编辑器内容模板<br>(当前内容将会被清除替换):",
DlgTemplatesLoading : "正在加载模板列表,请稍等...",
DlgTemplatesNoTpl : "(没有模板)",
DlgTemplatesReplace : "替换当前内容",
// About Dialog
DlgAboutAboutTab : "关于",
DlgAboutBrowserInfoTab : "浏览器信息",
DlgAboutLicenseTab : "许可证",
DlgAboutVersion : "版本",
DlgAboutInfo : "要获得更多信息请访问 ",
// Div Dialog
DlgDivGeneralTab : "常规",
DlgDivAdvancedTab : "高级",
DlgDivStyle : "样式",
DlgDivInlineStyle : "CSS 样式"
};
| zzshop | trunk/includes/fckeditor/editor/lang/zh-cn.js | JavaScript | asf20 | 17,389 |
/*
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
* Copyright (C) 2003-2008 Frederico Caldeira Knabben
*
* == BEGIN LICENSE ==
*
* Licensed under the terms of any of the following licenses at your
* choice:
*
* - GNU General Public License Version 2 or later (the "GPL")
* http://www.gnu.org/licenses/gpl.html
*
* - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
* http://www.gnu.org/licenses/lgpl.html
*
* - Mozilla Public License Version 1.1 or later (the "MPL")
* http://www.mozilla.org/MPL/MPL-1.1.html
*
* == END LICENSE ==
*
* English language file.
*/
var FCKLang =
{
// Language direction : "ltr" (left to right) or "rtl" (right to left).
Dir : "ltr",
ToolbarCollapse : "Collapse Toolbar",
ToolbarExpand : "Expand Toolbar",
// Toolbar Items and Context Menu
Save : "Save",
NewPage : "New Page",
Preview : "Preview",
Cut : "Cut",
Copy : "Copy",
Paste : "Paste",
PasteText : "Paste as plain text",
PasteWord : "Paste from Word",
Print : "Print",
SelectAll : "Select All",
RemoveFormat : "Remove Format",
InsertLinkLbl : "Link",
InsertLink : "Insert/Edit Link",
RemoveLink : "Remove Link",
VisitLink : "Open Link",
Anchor : "Insert/Edit Anchor",
AnchorDelete : "Remove Anchor",
InsertImageLbl : "Image",
InsertImage : "Insert/Edit Image",
InsertFlashLbl : "Flash",
InsertFlash : "Insert/Edit Flash",
UpFileBtn : "Upload file",
InsertTableLbl : "Table",
InsertTable : "Insert/Edit Table",
InsertLineLbl : "Line",
InsertLine : "Insert Horizontal Line",
InsertSpecialCharLbl: "Special Character",
InsertSpecialChar : "Insert Special Character",
InsertSmileyLbl : "Smiley",
InsertSmiley : "Insert Smiley",
About : "About FCKeditor",
Bold : "Bold",
Italic : "Italic",
Underline : "Underline",
StrikeThrough : "Strike Through",
Subscript : "Subscript",
Superscript : "Superscript",
LeftJustify : "Left Justify",
CenterJustify : "Center Justify",
RightJustify : "Right Justify",
BlockJustify : "Block Justify",
DecreaseIndent : "Decrease Indent",
IncreaseIndent : "Increase Indent",
Blockquote : "Blockquote",
CreateDiv : "Create Div Container",
EditDiv : "Edit Div Container",
DeleteDiv : "Remove Div Container",
Undo : "Undo",
Redo : "Redo",
NumberedListLbl : "Numbered List",
NumberedList : "Insert/Remove Numbered List",
BulletedListLbl : "Bulleted List",
BulletedList : "Insert/Remove Bulleted List",
ShowTableBorders : "Show Table Borders",
ShowDetails : "Show Details",
Style : "Style",
FontFormat : "Format",
Font : "Font",
FontSize : "Size",
TextColor : "Text Color",
BGColor : "Background Color",
Source : "Source",
Find : "Find",
Replace : "Replace",
SpellCheck : "Check Spelling",
UniversalKeyboard : "Universal Keyboard",
PageBreakLbl : "Page Break",
PageBreak : "Insert Page Break",
Form : "Form",
Checkbox : "Checkbox",
RadioButton : "Radio Button",
TextField : "Text Field",
Textarea : "Textarea",
HiddenField : "Hidden Field",
Button : "Button",
SelectionField : "Selection Field",
ImageButton : "Image Button",
FitWindow : "Maximize the editor size",
ShowBlocks : "Show Blocks",
// Context Menu
EditLink : "Edit Link",
CellCM : "Cell",
RowCM : "Row",
ColumnCM : "Column",
InsertRowAfter : "Insert Row After",
InsertRowBefore : "Insert Row Before",
DeleteRows : "Delete Rows",
InsertColumnAfter : "Insert Column After",
InsertColumnBefore : "Insert Column Before",
DeleteColumns : "Delete Columns",
InsertCellAfter : "Insert Cell After",
InsertCellBefore : "Insert Cell Before",
DeleteCells : "Delete Cells",
MergeCells : "Merge Cells",
MergeRight : "Merge Right",
MergeDown : "Merge Down",
HorizontalSplitCell : "Split Cell Horizontally",
VerticalSplitCell : "Split Cell Vertically",
TableDelete : "Delete Table",
CellProperties : "Cell Properties",
TableProperties : "Table Properties",
ImageProperties : "Image Properties",
FlashProperties : "Flash Properties",
AnchorProp : "Anchor Properties",
ButtonProp : "Button Properties",
CheckboxProp : "Checkbox Properties",
HiddenFieldProp : "Hidden Field Properties",
RadioButtonProp : "Radio Button Properties",
ImageButtonProp : "Image Button Properties",
TextFieldProp : "Text Field Properties",
SelectionFieldProp : "Selection Field Properties",
TextareaProp : "Textarea Properties",
FormProp : "Form Properties",
FontFormats : "Normal;Formatted;Address;Heading 1;Heading 2;Heading 3;Heading 4;Heading 5;Heading 6;Normal (DIV)",
// Alerts and Messages
ProcessingXHTML : "Processing XHTML. Please wait...",
Done : "Done",
PasteWordConfirm : "The text you want to paste seems to be copied from Word. Do you want to clean it before pasting?",
NotCompatiblePaste : "This command is available for Internet Explorer version 5.5 or more. Do you want to paste without cleaning?",
UnknownToolbarItem : "Unknown toolbar item \"%1\"",
UnknownCommand : "Unknown command name \"%1\"",
NotImplemented : "Command not implemented",
UnknownToolbarSet : "Toolbar set \"%1\" doesn't exist",
NoActiveX : "Your browser's security settings could limit some features of the editor. You must enable the option \"Run ActiveX controls and plug-ins\". You may experience errors and notice missing features.",
BrowseServerBlocked : "The resources browser could not be opened. Make sure that all popup blockers are disabled.",
DialogBlocked : "It was not possible to open the dialog window. Make sure all popup blockers are disabled.",
VisitLinkBlocked : "It was not possible to open a new window. Make sure all popup blockers are disabled.",
// Dialogs
DlgBtnOK : "OK",
DlgBtnCancel : "Cancel",
DlgBtnClose : "Close",
DlgBtnBrowseServer : "Browse Server",
DlgAdvancedTag : "Advanced",
DlgOpOther : "<Other>",
DlgInfoTab : "Info",
DlgAlertUrl : "Please insert the URL",
// General Dialogs Labels
DlgGenNotSet : "<not set>",
DlgGenId : "Id",
DlgGenLangDir : "Language Direction",
DlgGenLangDirLtr : "Left to Right (LTR)",
DlgGenLangDirRtl : "Right to Left (RTL)",
DlgGenLangCode : "Language Code",
DlgGenAccessKey : "Access Key",
DlgGenName : "Name",
DlgGenTabIndex : "Tab Index",
DlgGenLongDescr : "Long Description URL",
DlgGenClass : "Stylesheet Classes",
DlgGenTitle : "Advisory Title",
DlgGenContType : "Advisory Content Type",
DlgGenLinkCharset : "Linked Resource Charset",
DlgGenStyle : "Style",
// Image Dialog
DlgImgTitle : "Image Properties",
DlgImgInfoTab : "Image Info",
DlgImgBtnUpload : "Send it to the Server",
DlgImgURL : "URL",
DlgImgUpload : "Upload",
DlgImgAlt : "Alternative Text",
DlgImgWidth : "Width",
DlgImgHeight : "Height",
DlgImgLockRatio : "Lock Ratio",
DlgBtnResetSize : "Reset Size",
DlgImgBorder : "Border",
DlgImgHSpace : "HSpace",
DlgImgVSpace : "VSpace",
DlgImgAlign : "Align",
DlgImgAlignLeft : "Left",
DlgImgAlignAbsBottom: "Abs Bottom",
DlgImgAlignAbsMiddle: "Abs Middle",
DlgImgAlignBaseline : "Baseline",
DlgImgAlignBottom : "Bottom",
DlgImgAlignMiddle : "Middle",
DlgImgAlignRight : "Right",
DlgImgAlignTextTop : "Text Top",
DlgImgAlignTop : "Top",
DlgImgPreview : "Preview",
DlgImgAlertUrl : "Please type the image URL",
DlgImgLinkTab : "Link",
// Flash Dialog
DlgFlashTitle : "Flash Properties",
DlgFlashChkPlay : "Auto Play",
DlgFlashChkLoop : "Loop",
DlgFlashChkMenu : "Enable Flash Menu",
DlgFlashScale : "Scale",
DlgFlashScaleAll : "Show all",
DlgFlashScaleNoBorder : "No Border",
DlgFlashScaleFit : "Exact Fit",
// Link Dialog
DlgLnkWindowTitle : "Link",
DlgLnkInfoTab : "Link Info",
DlgLnkTargetTab : "Target",
DlgLnkType : "Link Type",
DlgLnkTypeURL : "URL",
DlgLnkTypeAnchor : "Link to anchor in the text",
DlgLnkTypeEMail : "E-Mail",
DlgLnkProto : "Protocol",
DlgLnkProtoOther : "<other>",
DlgLnkURL : "URL",
DlgLnkAnchorSel : "Select an Anchor",
DlgLnkAnchorByName : "By Anchor Name",
DlgLnkAnchorById : "By Element Id",
DlgLnkNoAnchors : "(No anchors available in the document)",
DlgLnkEMail : "E-Mail Address",
DlgLnkEMailSubject : "Message Subject",
DlgLnkEMailBody : "Message Body",
DlgLnkUpload : "Upload",
DlgLnkBtnUpload : "Send it to the Server",
DlgLnkTarget : "Target",
DlgLnkTargetFrame : "<frame>",
DlgLnkTargetPopup : "<popup window>",
DlgLnkTargetBlank : "New Window (_blank)",
DlgLnkTargetParent : "Parent Window (_parent)",
DlgLnkTargetSelf : "Same Window (_self)",
DlgLnkTargetTop : "Topmost Window (_top)",
DlgLnkTargetFrameName : "Target Frame Name",
DlgLnkPopWinName : "Popup Window Name",
DlgLnkPopWinFeat : "Popup Window Features",
DlgLnkPopResize : "Resizable",
DlgLnkPopLocation : "Location Bar",
DlgLnkPopMenu : "Menu Bar",
DlgLnkPopScroll : "Scroll Bars",
DlgLnkPopStatus : "Status Bar",
DlgLnkPopToolbar : "Toolbar",
DlgLnkPopFullScrn : "Full Screen (IE)",
DlgLnkPopDependent : "Dependent (Netscape)",
DlgLnkPopWidth : "Width",
DlgLnkPopHeight : "Height",
DlgLnkPopLeft : "Left Position",
DlgLnkPopTop : "Top Position",
DlnLnkMsgNoUrl : "Please type the link URL",
DlnLnkMsgNoEMail : "Please type the e-mail address",
DlnLnkMsgNoAnchor : "Please select an anchor",
DlnLnkMsgInvPopName : "The popup name must begin with an alphabetic character and must not contain spaces",
// Color Dialog
DlgColorTitle : "Select Color",
DlgColorBtnClear : "Clear",
DlgColorHighlight : "Highlight",
DlgColorSelected : "Selected",
// Smiley Dialog
DlgSmileyTitle : "Insert a Smiley",
// Special Character Dialog
DlgSpecialCharTitle : "Select Special Character",
// Table Dialog
DlgTableTitle : "Table Properties",
DlgTableRows : "Rows",
DlgTableColumns : "Columns",
DlgTableBorder : "Border size",
DlgTableAlign : "Alignment",
DlgTableAlignNotSet : "<Not set>",
DlgTableAlignLeft : "Left",
DlgTableAlignCenter : "Center",
DlgTableAlignRight : "Right",
DlgTableWidth : "Width",
DlgTableWidthPx : "pixels",
DlgTableWidthPc : "percent",
DlgTableHeight : "Height",
DlgTableCellSpace : "Cell spacing",
DlgTableCellPad : "Cell padding",
DlgTableCaption : "Caption",
DlgTableSummary : "Summary",
// Table Cell Dialog
DlgCellTitle : "Cell Properties",
DlgCellWidth : "Width",
DlgCellWidthPx : "pixels",
DlgCellWidthPc : "percent",
DlgCellHeight : "Height",
DlgCellWordWrap : "Word Wrap",
DlgCellWordWrapNotSet : "<Not set>",
DlgCellWordWrapYes : "Yes",
DlgCellWordWrapNo : "No",
DlgCellHorAlign : "Horizontal Alignment",
DlgCellHorAlignNotSet : "<Not set>",
DlgCellHorAlignLeft : "Left",
DlgCellHorAlignCenter : "Center",
DlgCellHorAlignRight: "Right",
DlgCellVerAlign : "Vertical Alignment",
DlgCellVerAlignNotSet : "<Not set>",
DlgCellVerAlignTop : "Top",
DlgCellVerAlignMiddle : "Middle",
DlgCellVerAlignBottom : "Bottom",
DlgCellVerAlignBaseline : "Baseline",
DlgCellRowSpan : "Rows Span",
DlgCellCollSpan : "Columns Span",
DlgCellBackColor : "Background Color",
DlgCellBorderColor : "Border Color",
DlgCellBtnSelect : "Select...",
// Find and Replace Dialog
DlgFindAndReplaceTitle : "Find and Replace",
// Find Dialog
DlgFindTitle : "Find",
DlgFindFindBtn : "Find",
DlgFindNotFoundMsg : "The specified text was not found.",
// Replace Dialog
DlgReplaceTitle : "Replace",
DlgReplaceFindLbl : "Find what:",
DlgReplaceReplaceLbl : "Replace with:",
DlgReplaceCaseChk : "Match case",
DlgReplaceReplaceBtn : "Replace",
DlgReplaceReplAllBtn : "Replace All",
DlgReplaceWordChk : "Match whole word",
// Paste Operations / Dialog
PasteErrorCut : "Your browser security settings don't permit the editor to automatically execute cutting operations. Please use the keyboard for that (Ctrl+X).",
PasteErrorCopy : "Your browser security settings don't permit the editor to automatically execute copying operations. Please use the keyboard for that (Ctrl+C).",
PasteAsText : "Paste as Plain Text",
PasteFromWord : "Paste from Word",
DlgPasteMsg2 : "Please paste inside the following box using the keyboard (<strong>Ctrl+V</strong>) and hit <strong>OK</strong>.",
DlgPasteSec : "Because of your browser security settings, the editor is not able to access your clipboard data directly. You are required to paste it again in this window.",
DlgPasteIgnoreFont : "Ignore Font Face definitions",
DlgPasteRemoveStyles : "Remove Styles definitions",
// Color Picker
ColorAutomatic : "Automatic",
ColorMoreColors : "More Colors...",
// Document Properties
DocProps : "Document Properties",
// Anchor Dialog
DlgAnchorTitle : "Anchor Properties",
DlgAnchorName : "Anchor Name",
DlgAnchorErrorName : "Please type the anchor name",
// Speller Pages Dialog
DlgSpellNotInDic : "Not in dictionary",
DlgSpellChangeTo : "Change to",
DlgSpellBtnIgnore : "Ignore",
DlgSpellBtnIgnoreAll : "Ignore All",
DlgSpellBtnReplace : "Replace",
DlgSpellBtnReplaceAll : "Replace All",
DlgSpellBtnUndo : "Undo",
DlgSpellNoSuggestions : "- No suggestions -",
DlgSpellProgress : "Spell check in progress...",
DlgSpellNoMispell : "Spell check complete: No misspellings found",
DlgSpellNoChanges : "Spell check complete: No words changed",
DlgSpellOneChange : "Spell check complete: One word changed",
DlgSpellManyChanges : "Spell check complete: %1 words changed",
IeSpellDownload : "Spell checker not installed. Do you want to download it now?",
// Button Dialog
DlgButtonText : "Text (Value)",
DlgButtonType : "Type",
DlgButtonTypeBtn : "Button",
DlgButtonTypeSbm : "Submit",
DlgButtonTypeRst : "Reset",
// Checkbox and Radio Button Dialogs
DlgCheckboxName : "Name",
DlgCheckboxValue : "Value",
DlgCheckboxSelected : "Selected",
// Form Dialog
DlgFormName : "Name",
DlgFormAction : "Action",
DlgFormMethod : "Method",
// Select Field Dialog
DlgSelectName : "Name",
DlgSelectValue : "Value",
DlgSelectSize : "Size",
DlgSelectLines : "lines",
DlgSelectChkMulti : "Allow multiple selections",
DlgSelectOpAvail : "Available Options",
DlgSelectOpText : "Text",
DlgSelectOpValue : "Value",
DlgSelectBtnAdd : "Add",
DlgSelectBtnModify : "Modify",
DlgSelectBtnUp : "Up",
DlgSelectBtnDown : "Down",
DlgSelectBtnSetValue : "Set as selected value",
DlgSelectBtnDelete : "Delete",
// Textarea Dialog
DlgTextareaName : "Name",
DlgTextareaCols : "Columns",
DlgTextareaRows : "Rows",
// Text Field Dialog
DlgTextName : "Name",
DlgTextValue : "Value",
DlgTextCharWidth : "Character Width",
DlgTextMaxChars : "Maximum Characters",
DlgTextType : "Type",
DlgTextTypeText : "Text",
DlgTextTypePass : "Password",
// Hidden Field Dialog
DlgHiddenName : "Name",
DlgHiddenValue : "Value",
// Bulleted List Dialog
BulletedListProp : "Bulleted List Properties",
NumberedListProp : "Numbered List Properties",
DlgLstStart : "Start",
DlgLstType : "Type",
DlgLstTypeCircle : "Circle",
DlgLstTypeDisc : "Disc",
DlgLstTypeSquare : "Square",
DlgLstTypeNumbers : "Numbers (1, 2, 3)",
DlgLstTypeLCase : "Lowercase Letters (a, b, c)",
DlgLstTypeUCase : "Uppercase Letters (A, B, C)",
DlgLstTypeSRoman : "Small Roman Numerals (i, ii, iii)",
DlgLstTypeLRoman : "Large Roman Numerals (I, II, III)",
// Document Properties Dialog
DlgDocGeneralTab : "General",
DlgDocBackTab : "Background",
DlgDocColorsTab : "Colors and Margins",
DlgDocMetaTab : "Meta Data",
DlgDocPageTitle : "Page Title",
DlgDocLangDir : "Language Direction",
DlgDocLangDirLTR : "Left to Right (LTR)",
DlgDocLangDirRTL : "Right to Left (RTL)",
DlgDocLangCode : "Language Code",
DlgDocCharSet : "Character Set Encoding",
DlgDocCharSetCE : "Central European",
DlgDocCharSetCT : "Chinese Traditional (Big5)",
DlgDocCharSetCR : "Cyrillic",
DlgDocCharSetGR : "Greek",
DlgDocCharSetJP : "Japanese",
DlgDocCharSetKR : "Korean",
DlgDocCharSetTR : "Turkish",
DlgDocCharSetUN : "Unicode (UTF-8)",
DlgDocCharSetWE : "Western European",
DlgDocCharSetOther : "Other Character Set Encoding",
DlgDocDocType : "Document Type Heading",
DlgDocDocTypeOther : "Other Document Type Heading",
DlgDocIncXHTML : "Include XHTML Declarations",
DlgDocBgColor : "Background Color",
DlgDocBgImage : "Background Image URL",
DlgDocBgNoScroll : "Nonscrolling Background",
DlgDocCText : "Text",
DlgDocCLink : "Link",
DlgDocCVisited : "Visited Link",
DlgDocCActive : "Active Link",
DlgDocMargins : "Page Margins",
DlgDocMaTop : "Top",
DlgDocMaLeft : "Left",
DlgDocMaRight : "Right",
DlgDocMaBottom : "Bottom",
DlgDocMeIndex : "Document Indexing Keywords (comma separated)",
DlgDocMeDescr : "Document Description",
DlgDocMeAuthor : "Author",
DlgDocMeCopy : "Copyright",
DlgDocPreview : "Preview",
// Templates Dialog
Templates : "Templates",
DlgTemplatesTitle : "Content Templates",
DlgTemplatesSelMsg : "Please select the template to open in the editor<br />(the actual contents will be lost):",
DlgTemplatesLoading : "Loading templates list. Please wait...",
DlgTemplatesNoTpl : "(No templates defined)",
DlgTemplatesReplace : "Replace actual contents",
// About Dialog
DlgAboutAboutTab : "About",
DlgAboutBrowserInfoTab : "Browser Info",
DlgAboutLicenseTab : "License",
DlgAboutVersion : "version",
DlgAboutInfo : "For further information go to",
// Div Dialog
DlgDivGeneralTab : "General",
DlgDivAdvancedTab : "Advanced",
DlgDivStyle : "Style",
DlgDivInlineStyle : "Inline Style"
};
| zzshop | trunk/includes/fckeditor/editor/lang/en.js | JavaScript | asf20 | 17,693 |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<!--
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
* Copyright (C) 2003-2008 Frederico Caldeira Knabben
*
* == BEGIN LICENSE ==
*
* Licensed under the terms of any of the following licenses at your
* choice:
*
* - GNU General Public License Version 2 or later (the "GPL")
* http://www.gnu.org/licenses/gpl.html
*
* - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
* http://www.gnu.org/licenses/lgpl.html
*
* - Mozilla Public License Version 1.1 or later (the "MPL")
* http://www.mozilla.org/MPL/MPL-1.1.html
*
* == END LICENSE ==
*
* Form dialog window.
-->
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta content="noindex, nofollow" name="robots" />
<script src="common/fck_dialog_common.js" type="text/javascript"></script>
<script type="text/javascript">
var dialog = window.parent ;
var oEditor = dialog.InnerDialogLoaded() ;
// Gets the document DOM
var oDOM = oEditor.FCK.EditorDocument ;
var oActiveEl = dialog.Selection.GetSelection().MoveToAncestorNode( 'FORM' ) ;
window.onload = function()
{
// First of all, translate the dialog box texts
oEditor.FCKLanguageManager.TranslatePage(document) ;
if ( oActiveEl )
{
GetE('txtName').value = oActiveEl.name ;
GetE('txtAction').value = oActiveEl.getAttribute( 'action', 2 ) ;
GetE('txtMethod').value = oActiveEl.method ;
}
else
oActiveEl = null ;
dialog.SetOkButton( true ) ;
dialog.SetAutoSize( true ) ;
SelectField( 'txtName' ) ;
}
function Ok()
{
if ( !oActiveEl )
{
oActiveEl = oEditor.FCK.InsertElement( 'form' ) ;
if ( oEditor.FCKBrowserInfo.IsGeckoLike )
oEditor.FCKTools.AppendBogusBr( oActiveEl ) ;
}
oActiveEl.name = GetE('txtName').value ;
SetAttribute( oActiveEl, 'action', GetE('txtAction').value ) ;
oActiveEl.method = GetE('txtMethod').value ;
return true ;
}
</script>
</head>
<body style="overflow: hidden">
<table width="100%" style="height: 100%">
<tr>
<td align="center">
<table cellspacing="0" cellpadding="0" width="80%" border="0">
<tr>
<td>
<span fcklang="DlgFormName">Name</span><br />
<input style="width: 100%" type="text" id="txtName" />
</td>
</tr>
<tr>
<td>
<span fcklang="DlgFormAction">Action</span><br />
<input style="width: 100%" type="text" id="txtAction" />
</td>
</tr>
<tr>
<td>
<span fcklang="DlgFormMethod">Method</span><br />
<select id="txtMethod">
<option value="get" selected="selected">GET</option>
<option value="post">POST</option>
</select>
</td>
</tr>
</table>
</td>
</tr>
</table>
</body>
</html>
| zzshop | trunk/includes/fckeditor/editor/dialog/fck_form.html | HTML | asf20 | 2,945 |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<!--
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
* Copyright (C) 2003-2008 Frederico Caldeira Knabben
*
* == BEGIN LICENSE ==
*
* Licensed under the terms of any of the following licenses at your
* choice:
*
* - GNU General Public License Version 2 or later (the "GPL")
* http://www.gnu.org/licenses/gpl.html
*
* - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
* http://www.gnu.org/licenses/lgpl.html
*
* - Mozilla Public License Version 1.1 or later (the "MPL")
* http://www.mozilla.org/MPL/MPL-1.1.html
*
* == END LICENSE ==
*
* Text field dialog window.
-->
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta content="noindex, nofollow" name="robots" />
<script src="common/fck_dialog_common.js" type="text/javascript"></script>
<script type="text/javascript">
var dialog = window.parent ;
var oEditor = dialog.InnerDialogLoaded() ;
// Gets the document DOM
var oDOM = oEditor.FCK.EditorDocument ;
var oActiveEl = dialog.Selection.GetSelectedElement() ;
window.onload = function()
{
// First of all, translate the dialog box texts
oEditor.FCKLanguageManager.TranslatePage(document) ;
if ( oActiveEl && oActiveEl.tagName == 'INPUT' && ( oActiveEl.type == 'text' || oActiveEl.type == 'password' ) )
{
GetE('txtName').value = oActiveEl.name ;
GetE('txtValue').value = oActiveEl.value ;
GetE('txtSize').value = GetAttribute( oActiveEl, 'size' ) ;
GetE('txtMax').value = GetAttribute( oActiveEl, 'maxLength' ) ;
GetE('txtType').value = oActiveEl.type ;
}
else
oActiveEl = null ;
dialog.SetOkButton( true ) ;
dialog.SetAutoSize( true ) ;
SelectField( 'txtName' ) ;
}
function Ok()
{
if ( isNaN( GetE('txtMax').value ) || GetE('txtMax').value < 0 )
{
alert( "Maximum characters must be a positive number." ) ;
GetE('txtMax').focus() ;
return false ;
}
else if( isNaN( GetE('txtSize').value ) || GetE('txtSize').value < 0 )
{
alert( "Width must be a positive number." ) ;
GetE('txtSize').focus() ;
return false ;
}
oEditor.FCKUndo.SaveUndoStep() ;
oActiveEl = CreateNamedElement( oEditor, oActiveEl, 'INPUT', {name: GetE('txtName').value, type: GetE('txtType').value } ) ;
SetAttribute( oActiveEl, 'value' , GetE('txtValue').value ) ;
SetAttribute( oActiveEl, 'size' , GetE('txtSize').value ) ;
SetAttribute( oActiveEl, 'maxlength', GetE('txtMax').value ) ;
return true ;
}
</script>
</head>
<body style="overflow: hidden">
<table width="100%" style="height: 100%">
<tr>
<td align="center">
<table cellspacing="0" cellpadding="0" border="0">
<tr>
<td>
<span fcklang="DlgTextName">Name</span><br />
<input id="txtName" type="text" size="20" />
</td>
<td>
</td>
<td>
<span fcklang="DlgTextValue">Value</span><br />
<input id="txtValue" type="text" size="25" />
</td>
</tr>
<tr>
<td>
<span fcklang="DlgTextCharWidth">Character Width</span><br />
<input id="txtSize" type="text" size="5" />
</td>
<td>
</td>
<td>
<span fcklang="DlgTextMaxChars">Maximum Characters</span><br />
<input id="txtMax" type="text" size="5" />
</td>
</tr>
<tr>
<td>
<span fcklang="DlgTextType">Type</span><br />
<select id="txtType">
<option value="text" selected="selected" fcklang="DlgTextTypeText">Text</option>
<option value="password" fcklang="DlgTextTypePass">Password</option>
</select>
</td>
<td>
</td>
<td>
</td>
</tr>
</table>
</td>
</tr>
</table>
</body>
</html>
| zzshop | trunk/includes/fckeditor/editor/dialog/fck_textfield.html | HTML | asf20 | 3,935 |
/*
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
* Copyright (C) 2003-2008 Frederico Caldeira Knabben
*
* == BEGIN LICENSE ==
*
* Licensed under the terms of any of the following licenses at your
* choice:
*
* - GNU General Public License Version 2 or later (the "GPL")
* http://www.gnu.org/licenses/gpl.html
*
* - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
* http://www.gnu.org/licenses/lgpl.html
*
* - Mozilla Public License Version 1.1 or later (the "MPL")
* http://www.mozilla.org/MPL/MPL-1.1.html
*
* == END LICENSE ==
*
* Scripts for the fck_select.html page.
*/
function Select( combo )
{
var iIndex = combo.selectedIndex ;
oListText.selectedIndex = iIndex ;
oListValue.selectedIndex = iIndex ;
var oTxtText = document.getElementById( "txtText" ) ;
var oTxtValue = document.getElementById( "txtValue" ) ;
oTxtText.value = oListText.value ;
oTxtValue.value = oListValue.value ;
}
function Add()
{
var oTxtText = document.getElementById( "txtText" ) ;
var oTxtValue = document.getElementById( "txtValue" ) ;
AddComboOption( oListText, oTxtText.value, oTxtText.value ) ;
AddComboOption( oListValue, oTxtValue.value, oTxtValue.value ) ;
oListText.selectedIndex = oListText.options.length - 1 ;
oListValue.selectedIndex = oListValue.options.length - 1 ;
oTxtText.value = '' ;
oTxtValue.value = '' ;
oTxtText.focus() ;
}
function Modify()
{
var iIndex = oListText.selectedIndex ;
if ( iIndex < 0 ) return ;
var oTxtText = document.getElementById( "txtText" ) ;
var oTxtValue = document.getElementById( "txtValue" ) ;
oListText.options[ iIndex ].innerHTML = HTMLEncode( oTxtText.value ) ;
oListText.options[ iIndex ].value = oTxtText.value ;
oListValue.options[ iIndex ].innerHTML = HTMLEncode( oTxtValue.value ) ;
oListValue.options[ iIndex ].value = oTxtValue.value ;
oTxtText.value = '' ;
oTxtValue.value = '' ;
oTxtText.focus() ;
}
function Move( steps )
{
ChangeOptionPosition( oListText, steps ) ;
ChangeOptionPosition( oListValue, steps ) ;
}
function Delete()
{
RemoveSelectedOptions( oListText ) ;
RemoveSelectedOptions( oListValue ) ;
}
function SetSelectedValue()
{
var iIndex = oListValue.selectedIndex ;
if ( iIndex < 0 ) return ;
var oTxtValue = document.getElementById( "txtSelValue" ) ;
oTxtValue.value = oListValue.options[ iIndex ].value ;
}
// Moves the selected option by a number of steps (also negative)
function ChangeOptionPosition( combo, steps )
{
var iActualIndex = combo.selectedIndex ;
if ( iActualIndex < 0 )
return ;
var iFinalIndex = iActualIndex + steps ;
if ( iFinalIndex < 0 )
iFinalIndex = 0 ;
if ( iFinalIndex > ( combo.options.length - 1 ) )
iFinalIndex = combo.options.length - 1 ;
if ( iActualIndex == iFinalIndex )
return ;
var oOption = combo.options[ iActualIndex ] ;
var sText = HTMLDecode( oOption.innerHTML ) ;
var sValue = oOption.value ;
combo.remove( iActualIndex ) ;
oOption = AddComboOption( combo, sText, sValue, null, iFinalIndex ) ;
oOption.selected = true ;
}
// Remove all selected options from a SELECT object
function RemoveSelectedOptions(combo)
{
// Save the selected index
var iSelectedIndex = combo.selectedIndex ;
var oOptions = combo.options ;
// Remove all selected options
for ( var i = oOptions.length - 1 ; i >= 0 ; i-- )
{
if (oOptions[i].selected) combo.remove(i) ;
}
// Reset the selection based on the original selected index
if ( combo.options.length > 0 )
{
if ( iSelectedIndex >= combo.options.length ) iSelectedIndex = combo.options.length - 1 ;
combo.selectedIndex = iSelectedIndex ;
}
}
// Add a new option to a SELECT object (combo or list)
function AddComboOption( combo, optionText, optionValue, documentObject, index )
{
var oOption ;
if ( documentObject )
oOption = documentObject.createElement("OPTION") ;
else
oOption = document.createElement("OPTION") ;
if ( index != null )
combo.options.add( oOption, index ) ;
else
combo.options.add( oOption ) ;
oOption.innerHTML = optionText.length > 0 ? HTMLEncode( optionText ) : ' ' ;
oOption.value = optionValue ;
return oOption ;
}
function HTMLEncode( text )
{
if ( !text )
return '' ;
text = text.replace( /&/g, '&' ) ;
text = text.replace( /</g, '<' ) ;
text = text.replace( />/g, '>' ) ;
return text ;
}
function HTMLDecode( text )
{
if ( !text )
return '' ;
text = text.replace( />/g, '>' ) ;
text = text.replace( /</g, '<' ) ;
text = text.replace( /&/g, '&' ) ;
return text ;
}
| zzshop | trunk/includes/fckeditor/editor/dialog/fck_select/fck_select.js | JavaScript | asf20 | 4,773 |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<!--
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
* Copyright (C) 2003-2008 Frederico Caldeira Knabben
*
* == BEGIN LICENSE ==
*
* Licensed under the terms of any of the following licenses at your
* choice:
*
* - GNU General Public License Version 2 or later (the "GPL")
* http://www.gnu.org/licenses/gpl.html
*
* - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
* http://www.gnu.org/licenses/lgpl.html
*
* - Mozilla Public License Version 1.1 or later (the "MPL")
* http://www.mozilla.org/MPL/MPL-1.1.html
*
* == END LICENSE ==
*
* Radio Button dialog window.
-->
<html>
<head>
<title>Radio Button Properties</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta content="noindex, nofollow" name="robots">
<script src="common/fck_dialog_common.js" type="text/javascript"></script>
<script type="text/javascript">
var dialog = window.parent ;
var oEditor = dialog.InnerDialogLoaded() ;
// Gets the document DOM
var oDOM = oEditor.FCK.EditorDocument ;
var oActiveEl = dialog.Selection.GetSelectedElement() ;
window.onload = function()
{
// First of all, translate the dialog box texts
oEditor.FCKLanguageManager.TranslatePage(document) ;
if ( oActiveEl && oActiveEl.tagName.toUpperCase() == 'INPUT' && oActiveEl.type == 'radio' )
{
GetE('txtName').value = oActiveEl.name ;
GetE('txtValue').value = oEditor.FCKBrowserInfo.IsIE ? oActiveEl.value : GetAttribute( oActiveEl, 'value' ) ;
GetE('txtSelected').checked = oActiveEl.checked ;
}
else
oActiveEl = null ;
dialog.SetOkButton( true ) ;
dialog.SetAutoSize( true ) ;
SelectField( 'txtName' ) ;
}
function Ok()
{
oEditor.FCKUndo.SaveUndoStep() ;
oActiveEl = CreateNamedElement( oEditor, oActiveEl, 'INPUT', {name: GetE('txtName').value, type: 'radio' } ) ;
if ( oEditor.FCKBrowserInfo.IsIE )
oActiveEl.value = GetE('txtValue').value ;
else
SetAttribute( oActiveEl, 'value', GetE('txtValue').value ) ;
var bIsChecked = GetE('txtSelected').checked ;
SetAttribute( oActiveEl, 'checked', bIsChecked ? 'checked' : null ) ; // For Firefox
oActiveEl.checked = bIsChecked ;
return true ;
}
</script>
</head>
<body style="OVERFLOW: hidden" scroll="no">
<table height="100%" width="100%">
<tr>
<td align="center">
<table border="0" cellpadding="0" cellspacing="0" width="80%">
<tr>
<td>
<span fckLang="DlgCheckboxName">Name</span><br>
<input type="text" size="20" id="txtName" style="WIDTH: 100%">
</td>
</tr>
<tr>
<td>
<span fckLang="DlgCheckboxValue">Value</span><br>
<input type="text" size="20" id="txtValue" style="WIDTH: 100%">
</td>
</tr>
<tr>
<td><input type="checkbox" id="txtSelected"><label for="txtSelected" fckLang="DlgCheckboxSelected">Checked</label></td>
</tr>
</table>
</td>
</tr>
</table>
</body>
</html>
| zzshop | trunk/includes/fckeditor/editor/dialog/fck_radiobutton.html | HTML | asf20 | 3,125 |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<!--
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
* Copyright (C) 2003-2008 Frederico Caldeira Knabben
*
* == BEGIN LICENSE ==
*
* Licensed under the terms of any of the following licenses at your
* choice:
*
* - GNU General Public License Version 2 or later (the "GPL")
* http://www.gnu.org/licenses/gpl.html
*
* - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
* http://www.gnu.org/licenses/lgpl.html
*
* - Mozilla Public License Version 1.1 or later (the "MPL")
* http://www.mozilla.org/MPL/MPL-1.1.html
*
* == END LICENSE ==
*
* Anchor dialog window.
-->
<html>
<head>
<title>Anchor Properties</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta content="noindex, nofollow" name="robots">
<script src="common/fck_dialog_common.js" type="text/javascript"></script>
<script type="text/javascript">
var dialog = window.parent ;
var oEditor = dialog.InnerDialogLoaded() ;
var FCK = oEditor.FCK ;
var FCKBrowserInfo = oEditor.FCKBrowserInfo ;
var FCKTools = oEditor.FCKTools ;
var FCKRegexLib = oEditor.FCKRegexLib ;
var oDOM = FCK.EditorDocument ;
var oFakeImage = dialog.Selection.GetSelectedElement() ;
var oAnchor ;
if ( oFakeImage )
{
if ( oFakeImage.tagName == 'IMG' && oFakeImage.getAttribute('_fckanchor') )
oAnchor = FCK.GetRealElement( oFakeImage ) ;
else
oFakeImage = null ;
}
//Search for a real anchor
if ( !oFakeImage )
{
oAnchor = FCK.Selection.MoveToAncestorNode( 'A' ) ;
if ( oAnchor )
FCK.Selection.SelectNode( oAnchor ) ;
}
window.onload = function()
{
// First of all, translate the dialog box texts
oEditor.FCKLanguageManager.TranslatePage(document) ;
if ( oAnchor )
GetE('txtName').value = oAnchor.name ;
else
oAnchor = null ;
window.parent.SetOkButton( true ) ;
window.parent.SetAutoSize( true ) ;
SelectField( 'txtName' ) ;
}
function Ok()
{
var sNewName = GetE('txtName').value ;
// Remove any illegal character in a name attribute:
// A name should start with a letter, but the validator passes anyway.
sNewName = sNewName.replace( /[^\w-_\.:]/g, '_' ) ;
if ( sNewName.length == 0 )
{
// Remove the anchor if the user leaves the name blank
if ( oAnchor )
{
// Removes the current anchor from the document using the new command
FCK.Commands.GetCommand( 'AnchorDelete' ).Execute() ;
return true ;
}
alert( oEditor.FCKLang.DlgAnchorErrorName ) ;
return false ;
}
oEditor.FCKUndo.SaveUndoStep() ;
if ( oAnchor ) // Modifying an existent anchor.
{
ReadjustLinksToAnchor( oAnchor.name, sNewName );
// Buggy explorer, bad bad browser. http://alt-tag.com/blog/archives/2006/02/ie-dom-bugs/
// Instead of just replacing the .name for the existing anchor (in order to preserve the content), we must remove the .name
// and assign .name, although it won't appear until it's specially processed in fckxhtml.js
// We remove the previous name
oAnchor.removeAttribute( 'name' ) ;
// Now we set it, but later we must process it specially
oAnchor.name = sNewName ;
return true ;
}
// Create a new anchor preserving the current selection
var aNewAnchors = oEditor.FCK.CreateLink( '#' ) ;
if ( aNewAnchors.length == 0 )
aNewAnchors.push( oEditor.FCK.InsertElement( 'a' ) ) ;
else
{
// Remove the fake href
for ( var i = 0 ; i < aNewAnchors.length ; i++ )
aNewAnchors[i].removeAttribute( 'href' ) ;
}
// More than one anchors may have been created, so interact through all of them (see #220).
for ( var i = 0 ; i < aNewAnchors.length ; i++ )
{
oAnchor = aNewAnchors[i] ;
// Set the name
if ( FCKBrowserInfo.IsIE )
{
// Setting anchor names directly in IE will trash the HTML code stored
// in FCKTempBin after undos. See #2263.
var replaceAnchor = oEditor.FCK.EditorDocument.createElement( '<a name="' +
FCKTools.HTMLEncode( sNewName ).replace( '"', '"' ) + '">' ) ;
oEditor.FCKDomTools.MoveChildren( oAnchor, replaceAnchor ) ;
oAnchor.parentNode.replaceChild( replaceAnchor, oAnchor ) ;
oAnchor = replaceAnchor ;
}
else
oAnchor.name = sNewName ;
// IE does require special processing to show the Anchor's image
// Opera doesn't allow to select empty anchors
if ( FCKBrowserInfo.IsIE || FCKBrowserInfo.IsOpera )
{
if ( oAnchor.innerHTML != '' )
{
if ( FCKBrowserInfo.IsIE )
oAnchor.className += ' FCK__AnchorC' ;
}
else
{
// Create a fake image for both IE and Opera
var oImg = oEditor.FCKDocumentProcessor_CreateFakeImage( 'FCK__Anchor', oAnchor.cloneNode(true) ) ;
oImg.setAttribute( '_fckanchor', 'true', 0 ) ;
oAnchor.parentNode.insertBefore( oImg, oAnchor ) ;
oAnchor.parentNode.removeChild( oAnchor ) ;
}
}
}
return true ;
}
// Checks all the links in the current page pointing to the current name and changes them to the new name
function ReadjustLinksToAnchor( sCurrent, sNew )
{
var oDoc = FCK.EditorDocument ;
var aLinks = oDoc.getElementsByTagName( 'A' ) ;
var sReference = '#' + sCurrent ;
// The url of the document, so we check absolute and partial references.
var sFullReference = oDoc.location.href.replace( /(#.*$)/, '') ;
sFullReference += sReference ;
var oLink ;
var i = aLinks.length - 1 ;
while ( i >= 0 && ( oLink = aLinks[i--] ) )
{
var sHRef = oLink.getAttribute( '_fcksavedurl' ) ;
if ( sHRef == null )
sHRef = oLink.getAttribute( 'href' , 2 ) || '' ;
if ( sHRef == sReference || sHRef == sFullReference )
{
oLink.href = '#' + sNew ;
SetAttribute( oLink, '_fcksavedurl', '#' + sNew ) ;
}
}
}
</script>
</head>
<body style="overflow: hidden">
<table height="100%" width="100%">
<tr>
<td align="center">
<table border="0" cellpadding="0" cellspacing="0" width="80%">
<tr>
<td>
<span fckLang="DlgAnchorName">Anchor Name</span><BR>
<input id="txtName" style="WIDTH: 100%" type="text">
</td>
</tr>
</table>
</td>
</tr>
</table>
</body>
</html>
| zzshop | trunk/includes/fckeditor/editor/dialog/fck_anchor.html | HTML | asf20 | 6,315 |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<!--
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
* Copyright (C) 2003-2008 Frederico Caldeira Knabben
*
* == BEGIN LICENSE ==
*
* Licensed under the terms of any of the following licenses at your
* choice:
*
* - GNU General Public License Version 2 or later (the "GPL")
* http://www.gnu.org/licenses/gpl.html
*
* - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
* http://www.gnu.org/licenses/lgpl.html
*
* - Mozilla Public License Version 1.1 or later (the "MPL")
* http://www.mozilla.org/MPL/MPL-1.1.html
*
* == END LICENSE ==
*
* Hidden Field dialog window.
-->
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Hidden Field Properties</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta content="noindex, nofollow" name="robots" />
<script src="common/fck_dialog_common.js" type="text/javascript"></script>
<script type="text/javascript">
var dialog = window.parent ;
var oEditor = dialog.InnerDialogLoaded() ;
var FCK = oEditor.FCK ;
// Gets the document DOM
var oDOM = FCK.EditorDocument ;
// Get the selected flash embed (if available).
var oFakeImage = dialog.Selection.GetSelectedElement() ;
var oActiveEl ;
if ( oFakeImage )
{
if ( oFakeImage.tagName == 'IMG' && oFakeImage.getAttribute('_fckinputhidden') )
oActiveEl = FCK.GetRealElement( oFakeImage ) ;
else
oFakeImage = null ;
}
window.onload = function()
{
// First of all, translate the dialog box texts
oEditor.FCKLanguageManager.TranslatePage(document) ;
if ( oActiveEl )
{
GetE('txtName').value = oActiveEl.name ;
GetE('txtValue').value = oActiveEl.value ;
}
dialog.SetOkButton( true ) ;
dialog.SetAutoSize( true ) ;
SelectField( 'txtName' ) ;
}
function Ok()
{
oEditor.FCKUndo.SaveUndoStep() ;
oActiveEl = CreateNamedElement( oEditor, oActiveEl, 'INPUT', {name: GetE('txtName').value, type: 'hidden' } ) ;
SetAttribute( oActiveEl, 'value', GetE('txtValue').value ) ;
if ( !oFakeImage )
{
oFakeImage = oEditor.FCKDocumentProcessor_CreateFakeImage( 'FCK__InputHidden', oActiveEl ) ;
oFakeImage.setAttribute( '_fckinputhidden', 'true', 0 ) ;
oActiveEl.parentNode.insertBefore( oFakeImage, oActiveEl ) ;
oActiveEl.parentNode.removeChild( oActiveEl ) ;
}
else
oEditor.FCKUndo.SaveUndoStep() ;
return true ;
}
</script>
</head>
<body style="overflow: hidden" scroll="no">
<table height="100%" width="100%">
<tr>
<td align="center">
<table border="0" class="inhoud" cellpadding="0" cellspacing="0" width="80%">
<tr>
<td>
<span fcklang="DlgHiddenName">Name</span><br />
<input type="text" size="20" id="txtName" style="width: 100%" />
</td>
</tr>
<tr>
<td>
<span fcklang="DlgHiddenValue">Value</span><br />
<input type="text" size="30" id="txtValue" style="width: 100%" />
</td>
</tr>
</table>
</td>
</tr>
</table>
</body>
</html>
| zzshop | trunk/includes/fckeditor/editor/dialog/fck_hiddenfield.html | HTML | asf20 | 3,141 |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<!--
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
* Copyright (C) 2003-2008 Frederico Caldeira Knabben
*
* == BEGIN LICENSE ==
*
* Licensed under the terms of any of the following licenses at your
* choice:
*
* - GNU General Public License Version 2 or later (the "GPL")
* http://www.gnu.org/licenses/gpl.html
*
* - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
* http://www.gnu.org/licenses/lgpl.html
*
* - Mozilla Public License Version 1.1 or later (the "MPL")
* http://www.mozilla.org/MPL/MPL-1.1.html
*
* == END LICENSE ==
*
* Special Chars Selector dialog window.
-->
<html>
<head>
<meta name="robots" content="noindex, nofollow">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<style type="text/css">
.Hand
{
cursor: pointer ;
cursor: hand ;
}
.Sample { font-size: 24px; }
</style>
<script src="common/fck_dialog_common.js" type="text/javascript"></script>
<script type="text/javascript">
var oEditor = window.parent.InnerDialogLoaded() ;
var oSample ;
function insertChar(charValue)
{
oEditor.FCKUndo.SaveUndoStep() ;
oEditor.FCK.InsertHtml( charValue || "" ) ;
window.parent.Cancel() ;
}
function over(td)
{
if ( ! oSample )
return ;
oSample.innerHTML = td.innerHTML ;
td.className = 'LightBackground SpecialCharsOver Hand' ;
}
function out(td)
{
if ( ! oSample )
return ;
oSample.innerHTML = " " ;
td.className = 'DarkBackground SpecialCharsOut Hand' ;
}
function setDefaults()
{
// Gets the sample placeholder.
oSample = document.getElementById("SampleTD") ;
// First of all, translates the dialog box texts.
oEditor.FCKLanguageManager.TranslatePage(document) ;
window.parent.SetAutoSize( true ) ;
}
</script>
</head>
<body onload="setDefaults()" style="overflow: hidden">
<table cellpadding="0" cellspacing="0" width="100%" height="100%">
<tr>
<td width="100%">
<table cellpadding="1" cellspacing="1" align="center" border="0" width="100%" height="100%">
<script type="text/javascript">
var aChars = ["!",""","#","$","%","&","\\'","(",")","*","+","-",".","/","0","1","2","3","4","5","6","7","8","9",":",";","<","=",">","?","@","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","[","]","^","_","`","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","{","|","}","~","€","‘","’","’","“","”","–","—","¡","¢","£","¤","¥","¦","§","¨","©","ª","«","¬","®","¯","°","±","²","³","´","µ","¶","·","¸","¹","º","»","¼","½","¾","¿","À","Á","Â","Ã","Ä","Å","Æ","Ç","È","É","Ê","Ë","Ì","Í","Î","Ï","Ð","Ñ","Ò","Ó","Ô","Õ","Ö","×","Ø","Ù","Ú","Û","Ü","Ý","Þ","ß","à","á","â","ã","ä","å","æ","ç","è","é","ê","ë","ì","í","î","ï","ð","ñ","ò","ó","ô","õ","ö","÷","ø","ù","ú","û","ü","ü","ý","þ","ÿ","Œ","œ","Ŵ","Ŷ","ŵ","ŷ","‚","‛","„","…","™","►","•","→","⇒","⇔","♦","≈"] ;
var cols = 20 ;
var i = 0 ;
while (i < aChars.length)
{
document.write("<TR>") ;
for(var j = 0 ; j < cols ; j++)
{
if (aChars[i])
{
document.write('<TD width="1%" class="DarkBackground SpecialCharsOut Hand" align="center" onclick="insertChar(\'' + aChars[i].replace(/&/g, "&") + '\')" onmouseover="over(this)" onmouseout="out(this)">') ;
document.write(aChars[i]) ;
}
else
document.write("<TD class='DarkBackground SpecialCharsOut'> ") ;
document.write("<\/TD>") ;
i++ ;
}
document.write("<\/TR>") ;
}
</script>
</table>
</td>
<td nowrap> </td>
<td valign="top">
<table width="40" cellpadding="0" cellspacing="0" border="0">
<tr>
<td id="SampleTD" width="40" height="40" align="center" class="DarkBackground SpecialCharsOut Sample"> </td>
</tr>
</table>
</td>
</tr>
</table>
</body>
</html>
| zzshop | trunk/includes/fckeditor/editor/dialog/fck_specialchar.html | HTML | asf20 | 4,804 |
<html>
<head>
<link rel="stylesheet" type="text/css" href="spellerStyle.css" />
<script type="text/javascript" src="controlWindow.js"></script>
<script type="text/javascript">
var spellerObject;
var controlWindowObj;
if( parent.opener ) {
spellerObject = parent.opener.speller;
}
function ignore_word() {
if( spellerObject ) {
spellerObject.ignoreWord();
}
}
function ignore_all() {
if( spellerObject ) {
spellerObject.ignoreAll();
}
}
function replace_word() {
if( spellerObject ) {
spellerObject.replaceWord();
}
}
function replace_all() {
if( spellerObject ) {
spellerObject.replaceAll();
}
}
function end_spell() {
if( spellerObject ) {
spellerObject.terminateSpell();
}
}
function undo() {
if( spellerObject ) {
spellerObject.undo();
}
}
function suggText() {
if( controlWindowObj ) {
controlWindowObj.setSuggestedText();
}
}
var FCKLang = window.parent.parent.FCKLang ; // by FredCK
function init_spell() {
// By FredCK (fckLang attributes have been added to the HTML source of this page)
window.parent.parent.OnSpellerControlsLoad( this ) ;
var controlForm = document.spellcheck;
// create a new controlWindow object
controlWindowObj = new controlWindow( controlForm );
// call the init_spell() function in the parent frameset
if( parent.frames.length ) {
parent.init_spell( controlWindowObj );
} else {
alert( 'This page was loaded outside of a frameset. It might not display properly' );
}
}
</script>
</head>
<body class="controlWindowBody" onLoad="init_spell();" style="OVERFLOW: hidden" scroll="no"> <!-- by FredCK -->
<form name="spellcheck">
<table border="0" cellpadding="0" cellspacing="0" border="0" align="center">
<tr>
<td colspan="3" class="normalLabel"><span fckLang="DlgSpellNotInDic">Not in dictionary:</span></td>
</tr>
<tr>
<td colspan="3"><input class="readonlyInput" type="text" name="misword" readonly /></td>
</tr>
<tr>
<td colspan="3" height="5"></td>
</tr>
<tr>
<td class="normalLabel"><span fckLang="DlgSpellChangeTo">Change to:</span></td>
</tr>
<tr valign="top">
<td>
<table border="0" cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="normalLabel">
<input class="textDefault" type="text" name="txtsugg" />
</td>
</tr>
<tr>
<td>
<select class="suggSlct" name="sugg" size="7" onChange="suggText();" onDblClick="replace_word();">
<option></option>
</select>
</td>
</tr>
</table>
</td>
<td> </td>
<td>
<table border="0" cellpadding="0" cellspacing="0" border="0">
<tr>
<td>
<input class="buttonDefault" type="button" fckLang="DlgSpellBtnIgnore" value="Ignore" onClick="ignore_word();">
</td>
<td> </td>
<td>
<input class="buttonDefault" type="button" fckLang="DlgSpellBtnIgnoreAll" value="Ignore All" onClick="ignore_all();">
</td>
</tr>
<tr>
<td colspan="3" height="5"></td>
</tr>
<tr>
<td>
<input class="buttonDefault" type="button" fckLang="DlgSpellBtnReplace" value="Replace" onClick="replace_word();">
</td>
<td> </td>
<td>
<input class="buttonDefault" type="button" fckLang="DlgSpellBtnReplaceAll" value="Replace All" onClick="replace_all();">
</td>
</tr>
<tr>
<td colspan="3" height="5"></td>
</tr>
<tr>
<td>
<input class="buttonDefault" type="button" name="btnUndo" fckLang="DlgSpellBtnUndo" value="Undo" onClick="undo();"
disabled>
</td>
<td> </td>
<td>
<!-- by FredCK
<input class="buttonDefault" type="button" value="Close" onClick="end_spell();">
-->
</td>
</tr>
</table>
</td>
</tr>
</table>
</form>
</body>
</html>
| zzshop | trunk/includes/fckeditor/editor/dialog/fck_spellerpages/spellerpages/controls.html | HTML | asf20 | 4,138 |
////////////////////////////////////////////////////
// spellChecker.js
//
// spellChecker object
//
// This file is sourced on web pages that have a textarea object to evaluate
// for spelling. It includes the implementation for the spellCheckObject.
//
////////////////////////////////////////////////////
// constructor
function spellChecker( textObject ) {
// public properties - configurable
// this.popUpUrl = '/speller/spellchecker.html'; // by FredCK
this.popUpUrl = 'fck_spellerpages/spellerpages/spellchecker.html'; // by FredCK
this.popUpName = 'spellchecker';
// this.popUpProps = "menu=no,width=440,height=350,top=70,left=120,resizable=yes,status=yes"; // by FredCK
this.popUpProps = null ; // by FredCK
// this.spellCheckScript = '/speller/server-scripts/spellchecker.php'; // by FredCK
//this.spellCheckScript = '/cgi-bin/spellchecker.pl';
// values used to keep track of what happened to a word
this.replWordFlag = "R"; // single replace
this.ignrWordFlag = "I"; // single ignore
this.replAllFlag = "RA"; // replace all occurances
this.ignrAllFlag = "IA"; // ignore all occurances
this.fromReplAll = "~RA"; // an occurance of a "replace all" word
this.fromIgnrAll = "~IA"; // an occurance of a "ignore all" word
// properties set at run time
this.wordFlags = new Array();
this.currentTextIndex = 0;
this.currentWordIndex = 0;
this.spellCheckerWin = null;
this.controlWin = null;
this.wordWin = null;
this.textArea = textObject; // deprecated
this.textInputs = arguments;
// private methods
this._spellcheck = _spellcheck;
this._getSuggestions = _getSuggestions;
this._setAsIgnored = _setAsIgnored;
this._getTotalReplaced = _getTotalReplaced;
this._setWordText = _setWordText;
this._getFormInputs = _getFormInputs;
// public methods
this.openChecker = openChecker;
this.startCheck = startCheck;
this.checkTextBoxes = checkTextBoxes;
this.checkTextAreas = checkTextAreas;
this.spellCheckAll = spellCheckAll;
this.ignoreWord = ignoreWord;
this.ignoreAll = ignoreAll;
this.replaceWord = replaceWord;
this.replaceAll = replaceAll;
this.terminateSpell = terminateSpell;
this.undo = undo;
// set the current window's "speller" property to the instance of this class.
// this object can now be referenced by child windows/frames.
window.speller = this;
}
// call this method to check all text boxes (and only text boxes) in the HTML document
function checkTextBoxes() {
this.textInputs = this._getFormInputs( "^text$" );
this.openChecker();
}
// call this method to check all textareas (and only textareas ) in the HTML document
function checkTextAreas() {
this.textInputs = this._getFormInputs( "^textarea$" );
this.openChecker();
}
// call this method to check all text boxes and textareas in the HTML document
function spellCheckAll() {
this.textInputs = this._getFormInputs( "^text(area)?$" );
this.openChecker();
}
// call this method to check text boxe(s) and/or textarea(s) that were passed in to the
// object's constructor or to the textInputs property
function openChecker() {
this.spellCheckerWin = window.open( this.popUpUrl, this.popUpName, this.popUpProps );
if( !this.spellCheckerWin.opener ) {
this.spellCheckerWin.opener = window;
}
}
function startCheck( wordWindowObj, controlWindowObj ) {
// set properties from args
this.wordWin = wordWindowObj;
this.controlWin = controlWindowObj;
// reset properties
this.wordWin.resetForm();
this.controlWin.resetForm();
this.currentTextIndex = 0;
this.currentWordIndex = 0;
// initialize the flags to an array - one element for each text input
this.wordFlags = new Array( this.wordWin.textInputs.length );
// each element will be an array that keeps track of each word in the text
for( var i=0; i<this.wordFlags.length; i++ ) {
this.wordFlags[i] = [];
}
// start
this._spellcheck();
return true;
}
function ignoreWord() {
var wi = this.currentWordIndex;
var ti = this.currentTextIndex;
if( !this.wordWin ) {
alert( 'Error: Word frame not available.' );
return false;
}
if( !this.wordWin.getTextVal( ti, wi )) {
alert( 'Error: "Not in dictionary" text is missing.' );
return false;
}
// set as ignored
if( this._setAsIgnored( ti, wi, this.ignrWordFlag )) {
this.currentWordIndex++;
this._spellcheck();
}
return true;
}
function ignoreAll() {
var wi = this.currentWordIndex;
var ti = this.currentTextIndex;
if( !this.wordWin ) {
alert( 'Error: Word frame not available.' );
return false;
}
// get the word that is currently being evaluated.
var s_word_to_repl = this.wordWin.getTextVal( ti, wi );
if( !s_word_to_repl ) {
alert( 'Error: "Not in dictionary" text is missing' );
return false;
}
// set this word as an "ignore all" word.
this._setAsIgnored( ti, wi, this.ignrAllFlag );
// loop through all the words after this word
for( var i = ti; i < this.wordWin.textInputs.length; i++ ) {
for( var j = 0; j < this.wordWin.totalWords( i ); j++ ) {
if(( i == ti && j > wi ) || i > ti ) {
// future word: set as "from ignore all" if
// 1) do not already have a flag and
// 2) have the same value as current word
if(( this.wordWin.getTextVal( i, j ) == s_word_to_repl )
&& ( !this.wordFlags[i][j] )) {
this._setAsIgnored( i, j, this.fromIgnrAll );
}
}
}
}
// finally, move on
this.currentWordIndex++;
this._spellcheck();
return true;
}
function replaceWord() {
var wi = this.currentWordIndex;
var ti = this.currentTextIndex;
if( !this.wordWin ) {
alert( 'Error: Word frame not available.' );
return false;
}
if( !this.wordWin.getTextVal( ti, wi )) {
alert( 'Error: "Not in dictionary" text is missing' );
return false;
}
if( !this.controlWin.replacementText ) {
return false ;
}
var txt = this.controlWin.replacementText;
if( txt.value ) {
var newspell = new String( txt.value );
if( this._setWordText( ti, wi, newspell, this.replWordFlag )) {
this.currentWordIndex++;
this._spellcheck();
}
}
return true;
}
function replaceAll() {
var ti = this.currentTextIndex;
var wi = this.currentWordIndex;
if( !this.wordWin ) {
alert( 'Error: Word frame not available.' );
return false;
}
var s_word_to_repl = this.wordWin.getTextVal( ti, wi );
if( !s_word_to_repl ) {
alert( 'Error: "Not in dictionary" text is missing' );
return false;
}
var txt = this.controlWin.replacementText;
if( !txt.value ) return false;
var newspell = new String( txt.value );
// set this word as a "replace all" word.
this._setWordText( ti, wi, newspell, this.replAllFlag );
// loop through all the words after this word
for( var i = ti; i < this.wordWin.textInputs.length; i++ ) {
for( var j = 0; j < this.wordWin.totalWords( i ); j++ ) {
if(( i == ti && j > wi ) || i > ti ) {
// future word: set word text to s_word_to_repl if
// 1) do not already have a flag and
// 2) have the same value as s_word_to_repl
if(( this.wordWin.getTextVal( i, j ) == s_word_to_repl )
&& ( !this.wordFlags[i][j] )) {
this._setWordText( i, j, newspell, this.fromReplAll );
}
}
}
}
// finally, move on
this.currentWordIndex++;
this._spellcheck();
return true;
}
function terminateSpell() {
// called when we have reached the end of the spell checking.
var msg = ""; // by FredCK
var numrepl = this._getTotalReplaced();
if( numrepl == 0 ) {
// see if there were no misspellings to begin with
if( !this.wordWin ) {
msg = "";
} else {
if( this.wordWin.totalMisspellings() ) {
// msg += "No words changed."; // by FredCK
msg += FCKLang.DlgSpellNoChanges ; // by FredCK
} else {
// msg += "No misspellings found."; // by FredCK
msg += FCKLang.DlgSpellNoMispell ; // by FredCK
}
}
} else if( numrepl == 1 ) {
// msg += "One word changed."; // by FredCK
msg += FCKLang.DlgSpellOneChange ; // by FredCK
} else {
// msg += numrepl + " words changed."; // by FredCK
msg += FCKLang.DlgSpellManyChanges.replace( /%1/g, numrepl ) ;
}
if( msg ) {
// msg += "\n"; // by FredCK
alert( msg );
}
if( numrepl > 0 ) {
// update the text field(s) on the opener window
for( var i = 0; i < this.textInputs.length; i++ ) {
// this.textArea.value = this.wordWin.text;
if( this.wordWin ) {
if( this.wordWin.textInputs[i] ) {
this.textInputs[i].value = this.wordWin.textInputs[i];
}
}
}
}
// return back to the calling window
// this.spellCheckerWin.close(); // by FredCK
if ( typeof( this.OnFinished ) == 'function' ) // by FredCK
this.OnFinished(numrepl) ; // by FredCK
return true;
}
function undo() {
// skip if this is the first word!
var ti = this.currentTextIndex;
var wi = this.currentWordIndex;
if( this.wordWin.totalPreviousWords( ti, wi ) > 0 ) {
this.wordWin.removeFocus( ti, wi );
// go back to the last word index that was acted upon
do {
// if the current word index is zero then reset the seed
if( this.currentWordIndex == 0 && this.currentTextIndex > 0 ) {
this.currentTextIndex--;
this.currentWordIndex = this.wordWin.totalWords( this.currentTextIndex )-1;
if( this.currentWordIndex < 0 ) this.currentWordIndex = 0;
} else {
if( this.currentWordIndex > 0 ) {
this.currentWordIndex--;
}
}
} while (
this.wordWin.totalWords( this.currentTextIndex ) == 0
|| this.wordFlags[this.currentTextIndex][this.currentWordIndex] == this.fromIgnrAll
|| this.wordFlags[this.currentTextIndex][this.currentWordIndex] == this.fromReplAll
);
var text_idx = this.currentTextIndex;
var idx = this.currentWordIndex;
var preReplSpell = this.wordWin.originalSpellings[text_idx][idx];
// if we got back to the first word then set the Undo button back to disabled
if( this.wordWin.totalPreviousWords( text_idx, idx ) == 0 ) {
this.controlWin.disableUndo();
}
var i, j, origSpell ;
// examine what happened to this current word.
switch( this.wordFlags[text_idx][idx] ) {
// replace all: go through this and all the future occurances of the word
// and revert them all to the original spelling and clear their flags
case this.replAllFlag :
for( i = text_idx; i < this.wordWin.textInputs.length; i++ ) {
for( j = 0; j < this.wordWin.totalWords( i ); j++ ) {
if(( i == text_idx && j >= idx ) || i > text_idx ) {
origSpell = this.wordWin.originalSpellings[i][j];
if( origSpell == preReplSpell ) {
this._setWordText ( i, j, origSpell, undefined );
}
}
}
}
break;
// ignore all: go through all the future occurances of the word
// and clear their flags
case this.ignrAllFlag :
for( i = text_idx; i < this.wordWin.textInputs.length; i++ ) {
for( j = 0; j < this.wordWin.totalWords( i ); j++ ) {
if(( i == text_idx && j >= idx ) || i > text_idx ) {
origSpell = this.wordWin.originalSpellings[i][j];
if( origSpell == preReplSpell ) {
this.wordFlags[i][j] = undefined;
}
}
}
}
break;
// replace: revert the word to its original spelling
case this.replWordFlag :
this._setWordText ( text_idx, idx, preReplSpell, undefined );
break;
}
// For all four cases, clear the wordFlag of this word. re-start the process
this.wordFlags[text_idx][idx] = undefined;
this._spellcheck();
}
}
function _spellcheck() {
var ww = this.wordWin;
// check if this is the last word in the current text element
if( this.currentWordIndex == ww.totalWords( this.currentTextIndex) ) {
this.currentTextIndex++;
this.currentWordIndex = 0;
// keep going if we're not yet past the last text element
if( this.currentTextIndex < this.wordWin.textInputs.length ) {
this._spellcheck();
return;
} else {
this.terminateSpell();
return;
}
}
// if this is after the first one make sure the Undo button is enabled
if( this.currentWordIndex > 0 ) {
this.controlWin.enableUndo();
}
// skip the current word if it has already been worked on
if( this.wordFlags[this.currentTextIndex][this.currentWordIndex] ) {
// increment the global current word index and move on.
this.currentWordIndex++;
this._spellcheck();
} else {
var evalText = ww.getTextVal( this.currentTextIndex, this.currentWordIndex );
if( evalText ) {
this.controlWin.evaluatedText.value = evalText;
ww.setFocus( this.currentTextIndex, this.currentWordIndex );
this._getSuggestions( this.currentTextIndex, this.currentWordIndex );
}
}
}
function _getSuggestions( text_num, word_num ) {
this.controlWin.clearSuggestions();
// add suggestion in list for each suggested word.
// get the array of suggested words out of the
// three-dimensional array containing all suggestions.
var a_suggests = this.wordWin.suggestions[text_num][word_num];
if( a_suggests ) {
// got an array of suggestions.
for( var ii = 0; ii < a_suggests.length; ii++ ) {
this.controlWin.addSuggestion( a_suggests[ii] );
}
}
this.controlWin.selectDefaultSuggestion();
}
function _setAsIgnored( text_num, word_num, flag ) {
// set the UI
this.wordWin.removeFocus( text_num, word_num );
// do the bookkeeping
this.wordFlags[text_num][word_num] = flag;
return true;
}
function _getTotalReplaced() {
var i_replaced = 0;
for( var i = 0; i < this.wordFlags.length; i++ ) {
for( var j = 0; j < this.wordFlags[i].length; j++ ) {
if(( this.wordFlags[i][j] == this.replWordFlag )
|| ( this.wordFlags[i][j] == this.replAllFlag )
|| ( this.wordFlags[i][j] == this.fromReplAll )) {
i_replaced++;
}
}
}
return i_replaced;
}
function _setWordText( text_num, word_num, newText, flag ) {
// set the UI and form inputs
this.wordWin.setText( text_num, word_num, newText );
// keep track of what happened to this word:
this.wordFlags[text_num][word_num] = flag;
return true;
}
function _getFormInputs( inputPattern ) {
var inputs = new Array();
for( var i = 0; i < document.forms.length; i++ ) {
for( var j = 0; j < document.forms[i].elements.length; j++ ) {
if( document.forms[i].elements[j].type.match( inputPattern )) {
inputs[inputs.length] = document.forms[i].elements[j];
}
}
}
return inputs;
}
| zzshop | trunk/includes/fckeditor/editor/dialog/fck_spellerpages/spellerpages/spellChecker.js | JavaScript | asf20 | 14,600 |