Example #1
0
 public function relationship()
 {
     $id = isset($_GET['id']) ? $_GET['id'] : '';
     $id2 = isset($_GET['id2']) ? $_GET['id2'] : '';
     $type = isset($_GET['type']) ? $_GET['type'] : 'imid';
     $count = 0;
     if (!empty($id) and !empty($id2)) {
         if ($type == 'imid') {
             $count = $this->model->get_relationship_by_imid($id, $id2);
         } elseif ($type == 'imei') {
             $count = $this->model->get_relationship_by_imei($id, $id2);
         }
     }
     $this->send_response(200, array('count' => $count));
 }