| @@ 2217-2234 (lines=18) @@ | ||
| 2214 | return 'Admin'; |
|
| 2215 | } |
|
| 2216 | ||
| 2217 | function get_subreseller_info($parent_id){ |
|
| 2218 | if(!empty($parent_id)){ |
|
| 2219 | $str=$parent_id.","; |
|
| 2220 | }else{ |
|
| 2221 | $str=null; |
|
| 2222 | } |
|
| 2223 | $query = "select id from accounts where reseller_id = '$parent_id' AND deleted =0 AND type=1"; |
|
| 2224 | $result = $this->CI->db->query($query); |
|
| 2225 | if($result->num_rows() > 0){ |
|
| 2226 | $result = $result->result_array(); |
|
| 2227 | foreach ($result as $data){ |
|
| 2228 | if(!empty($data['id'])){ |
|
| 2229 | $str.=$this->get_subreseller_info($data['id']); |
|
| 2230 | } |
|
| 2231 | } |
|
| 2232 | } |
|
| 2233 | return $str; |
|
| 2234 | } |
|
| 2235 | function get_parent_info($child_id,$parent_id){ |
|
| 2236 | if(!empty($child_id)){ |
|
| 2237 | $str=$child_id.","; |
|
| @@ 2235-2252 (lines=18) @@ | ||
| 2232 | } |
|
| 2233 | return $str; |
|
| 2234 | } |
|
| 2235 | function get_parent_info($child_id,$parent_id){ |
|
| 2236 | if(!empty($child_id)){ |
|
| 2237 | $str=$child_id.","; |
|
| 2238 | }else{ |
|
| 2239 | $str=null; |
|
| 2240 | } |
|
| 2241 | if($child_id > 0){ |
|
| 2242 | $query = "select reseller_id from accounts where id = '$child_id'"; |
|
| 2243 | $result = $this->CI->db->query($query); |
|
| 2244 | if($result->num_rows() > 0){ |
|
| 2245 | $parent_info = (array)$result->first_row(); |
|
| 2246 | if($parent_info['reseller_id'] != $parent_id){ |
|
| 2247 | $str.=$this->get_parent_info($parent_info['reseller_id'],$parent_id); |
|
| 2248 | } |
|
| 2249 | } |
|
| 2250 | } |
|
| 2251 | return $str; |
|
| 2252 | } |
|
| 2253 | function get_did_accountid($select,$table,$where){ |
|
| 2254 | $accountinfo=$this->CI->session->userdata('accountinfo'); |
|
| 2255 | $this->CI->db->where('note',$where); |
|