コード例 #1
0
ファイル: Help.php プロジェクト: paShaman/Scala
 /**
  * получаем список точек для combobox
  */
 public function action_list_pos_group()
 {
     $res = Model_Dot::getGroups(['search' => $this->_search, 'ids' => $this->_ids]);
     if (empty($res)) {
         $this->jsonResult(false);
     }
     $return = [];
     foreach ($res as $item) {
         $return[] = ['name' => $item['GROUP_NAME'], 'value' => $item['GROUP_ID']];
     }
     $this->jsonResult(true, $return);
 }
コード例 #2
0
ファイル: Control.php プロジェクト: paShaman/Scala
 /**
  * добавляем точки к конкретной группе
  */
 public function action_add_dots_to_group()
 {
     $posIds = $this->request->post('pos_ids');
     $groupId = $this->request->post('group_id');
     $result = Model_Dot::addDotsToGroup($groupId, $posIds);
     if (!empty($result)) {
         $this->jsonResult(false);
     }
     $this->jsonResult(true);
 }