Changeset 6525
- Timestamp:
- Apr 11, 2008, 3:54:40 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
OpenPNE/trunk/webapp/modules/admin/lib/db_admin.php
r6522 r6525 733 733 734 734 /** 735 * メンバーIDリスト取得(絞り込み対応) 735 * c_profile 内データによるメンバーIDリスト絞り込み 736 * 737 * 渡されたメンバーIDの配列を条件に従い絞り込んだものを返す 738 * 739 * @return array 736 740 */ 737 function _db_admin_c_member_id_list($cond_list, $order = null) 738 { 739 $ids = db_admin_c_member_id_list4cond_c_member($cond_list, $order); 740 741 function db_admin_c_member_id_list4cond_c_profile($ids, $cond_list, $order) 742 { 741 743 $type = explode('-', $order); 744 742 745 // ランクでソートとポイントでソートは同等 743 746 if ($type[0] == 'RANK') { … … 745 748 } 746 749 747 // ポイントで絞り込み 748 if (isset($cond_list['s_point']) || isset($cond_list['e_point'])) { 749 $ids = db_admin_c_member_id_list4cond_pne_point($ids, $cond_list); 750 } 751 752 // メールアドレスで絞り込み 753 if (!empty($cond_list['is_pc_address']) || !empty($cond_list['is_ktai_address'])) { 754 $ids = db_admin_c_member_id_list4cond_mail_address($ids, $cond_list); 755 } 756 757 //各プロフィールごとで絞り結果をマージする(ソートオーダーつき) 758 $_sql = 'SELECT name, form_type, c_profile_id FROM c_profile'; 759 $profile = db_get_all($_sql); 760 761 if ( $profile ) { 750 // 各プロフィールごとに絞り込み 751 $sql = 'SELECT name, form_type, c_profile_id FROM c_profile'; 752 $profile = db_get_all($sql); 753 754 if ($profile) { 762 755 foreach ($profile as $value) { 763 756 if(!empty($cond_list[$value['name']]) 764 && ($value['form_type'] == 'radio' || $value['form_type'] == 'select')) {757 && ($value['form_type'] == 'radio' || $value['form_type'] == 'select')) { 765 758 $sql = 'SELECT c_member_id FROM c_member_profile WHERE c_profile_option_id = ?'; 766 759 $params = array($cond_list[$value['name']]); … … 768 761 $ids = array_intersect($ids, $temp_ids); 769 762 } 763 770 764 if($value['name'] == $type[0]) { 771 765 $sql = 'SELECT c_member_id FROM c_member_profile WHERE c_profile_id = ?'; … … 773 767 if ($value['form_type'] == 'radio' 774 768 || $value['form_type'] == 'select' 775 || $value['form_type'] == 'checkbox' 776 ) { 769 || $value['form_type'] == 'checkbox') { 777 770 $sql .= ' ORDER BY c_profile_option_id'; 778 771 } else { … … 795 788 $ids = array_intersect($temp_ids, $ids); 796 789 } 797 798 } 799 } 790 } 791 } 792 793 return $ids; 794 } 795 796 /** 797 * メンバーIDリスト取得(絞り込み対応) 798 */ 799 function _db_admin_c_member_id_list($cond_list, $order = null) 800 { 801 $ids = db_admin_c_member_id_list4cond_c_member($cond_list, $order); 802 803 // ポイントで絞り込み 804 if (isset($cond_list['s_point']) || isset($cond_list['e_point'])) { 805 $ids = db_admin_c_member_id_list4cond_pne_point($ids, $cond_list); 806 } 807 808 // メールアドレスで絞り込み 809 if (!empty($cond_list['is_pc_address']) || !empty($cond_list['is_ktai_address'])) { 810 $ids = db_admin_c_member_id_list4cond_mail_address($ids, $cond_list); 811 } 812 813 // プロフィール項目で絞り込み 814 $ids = db_admin_c_member_id_list4cond_c_profile($ids, $cond_list, $order); 800 815 801 816 return $ids;
Note: See TracChangeset
for help on using the changeset viewer.