|
@@ -97,117 +97,6 @@ class UserAcl {
|
|
|
return $this->_proces_tree_flat;
|
|
return $this->_proces_tree_flat;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- private function _createUsedProcesMap() {// TODO: RM
|
|
|
|
|
- if (!empty($this->_proces_used_ids)) {
|
|
|
|
|
- return;
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- $this->_proces_used_ids = $this->_cache_read('_proces_used_ids');
|
|
|
|
|
- $this->_proces_used_map = $this->_cache_read('_proces_used_map');
|
|
|
|
|
- if ($this->_proces_used_ids != null && $this->_proces_used_map != null) {
|
|
|
|
|
- return;
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- $this->_proces_used_ids = array();// find path from proces_id connected with user to the end of process
|
|
|
|
|
- $this->_proces_used_map = array();
|
|
|
|
|
- $dbg = false;
|
|
|
|
|
-
|
|
|
|
|
- $ID_PROCESOW_USERA = $this->getProcesIds();
|
|
|
|
|
- if (empty($ID_PROCESOW_USERA)) {
|
|
|
|
|
- return;
|
|
|
|
|
- }
|
|
|
|
|
- $CRM_PROCESS_TREE = $this->getProcesTree();
|
|
|
|
|
- // ! rekursywnie szukam sciezek procesow powiazanych dla usera procesow
|
|
|
|
|
- foreach ($ID_PROCESOW_USERA as $proces_id) {
|
|
|
|
|
- $this->_proces_used_ids[$proces_id] = true;
|
|
|
|
|
- if ($dbg) echo '<div style="border:1px solid blue;background-color:#eee;">' . "<b>find_rec(CRM_PROCESS_TREE, {$proces_id}, 'init') {</b>\n";
|
|
|
|
|
- $CRM_PROCES_USERA_UZYTY_FIND = array();
|
|
|
|
|
- $this->find_in_tree_parent_rec($CRM_PROCESS_TREE, $proces_id, $CRM_PROCES_USERA_UZYTY_FIND, $dbg);
|
|
|
|
|
- if ($dbg) echo '</div>';
|
|
|
|
|
- $this->_proces_used_ids[$proces_id] = true;//trzeba dodac sam proces, bo go brakuje w indeksach
|
|
|
|
|
- $this->_proces_used_map[$proces_id][] = $proces_id;//trzeba dodac sam proces, bo go brakowalo w indeksach
|
|
|
|
|
- if (is_array($CRM_PROCES_USERA_UZYTY_FIND)) {
|
|
|
|
|
- foreach ($CRM_PROCES_USERA_UZYTY_FIND as $INDEX => $proces_id_found ) {
|
|
|
|
|
- $this->_proces_used_ids[$proces_id_found] = true;
|
|
|
|
|
- $this->_proces_used_map[$proces_id][] = $proces_id_found;//tworze mape procesow od glownego w dol
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
- $this->_proces_used_ids = array_keys($this->_proces_used_ids);
|
|
|
|
|
-
|
|
|
|
|
- $this->_cache_save('_proces_used_ids', $this->_proces_used_ids);
|
|
|
|
|
- $this->_cache_save('_proces_used_map', $this->_proces_used_map);
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- public function getUsedProcesMap() {// TODO: RM, used in ProcesMenu (testy) - use view instead
|
|
|
|
|
- $this->_createUsedProcesMap();
|
|
|
|
|
- return $this->_proces_used_map;
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- public function getUsedProcesIds($procesID = null) {// TODO: RM, used in ProcesMenu
|
|
|
|
|
- $this->_createUsedProcesMap();
|
|
|
|
|
- $usedProcesListIds = $this->_proces_used_ids;
|
|
|
|
|
-
|
|
|
|
|
- if ($procesID > 0) {
|
|
|
|
|
- $map = $this->getUsedProcesMap();
|
|
|
|
|
- if (!array_key_exists($procesID, $map)) {
|
|
|
|
|
- return false;
|
|
|
|
|
- }
|
|
|
|
|
- $usedProcesListIds = $map[$procesID];
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- return $usedProcesListIds;
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- public function getUsedProcesInitIds($zasobId = 0) {// TODO: RM, used in ProcesMenu
|
|
|
|
|
- if ($zasobId > 0) {
|
|
|
|
|
- $pInitListRaw = $this->getProcesInitList($zasobId);
|
|
|
|
|
- if (!empty($pInitListRaw)) {
|
|
|
|
|
- $pInitListRaw = array_values($pInitListRaw);
|
|
|
|
|
- $pInitListRaw = array_unique($pInitListRaw);
|
|
|
|
|
- }
|
|
|
|
|
- return $pInitListRaw;
|
|
|
|
|
- } else {
|
|
|
|
|
- $usedProcesInitList = $this->getUsedProcesInitList();
|
|
|
|
|
- return array_keys($usedProcesInitList);
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- public function getUsedProcesInitList() {// TODO: RM, used in ProcesMenu
|
|
|
|
|
- if (!empty($this->_proces_init_used)) {
|
|
|
|
|
- return $this->_proces_init_used;
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- $map = $this->getUsedProcesMap();
|
|
|
|
|
- if (!empty($map)) {
|
|
|
|
|
- $db = DB::getDB();
|
|
|
|
|
- $sql = "select `ID`, `DESC`
|
|
|
|
|
- from `CRM_PROCES`
|
|
|
|
|
- where `TYPE`='PROCES_INIT' and `ID` in (" . implode(",", array_keys($map)) . ") ";
|
|
|
|
|
- $res = $db->query($sql);
|
|
|
|
|
- while ($r = $db->fetch($res)) {
|
|
|
|
|
- $this->_proces_init_used[$r->ID] = $r->DESC;
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
- return $this->_proces_init_used;
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- function find_in_tree_parent_rec(&$tree, $parent_id, &$ret_array = array(), $dbg = false, $rec_limit = 1) {// TODO: RM used in _createUsedProcesMap
|
|
|
|
|
- if ($dbg) { echo '<p style="margin:0;">' . "find_in_tree_parent_rec(tree, $parent_id, ret, $dbg, $rec_limit) find_in_tree_parent_rec_return: [" . implode(', ', $find_in_tree_parent_rec_return) . "] found(" . in_array($parent_id, $ret_array) . ")" .'</p>'; }
|
|
|
|
|
-
|
|
|
|
|
- if (isset($tree[$parent_id])) {
|
|
|
|
|
- foreach ($tree[$parent_id] as $IND => $CHILD) {
|
|
|
|
|
- if (in_array($CHILD, $ret_array)) {
|
|
|
|
|
- continue;
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- $ret_array[] = $CHILD;
|
|
|
|
|
- if ($dbg) { echo '<p style="margin:0;">' . "-- find_in_tree_parent_rec(tree, $parent_id, ret, $dbg, $rec_limit) crm_proces_usera_uzyty: [" . implode(', ', $ret_array) . "]" .'</p>'; }
|
|
|
|
|
- $this->find_in_tree_parent_rec($tree, $CHILD, $ret_array, $dbg, $rec_limit);
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
function _cache_init() {
|
|
function _cache_init() {
|
|
|
if (!$this->_use_cache) return;
|
|
if (!$this->_use_cache) return;
|
|
|
|
|
|
|
@@ -410,54 +299,52 @@ class UserAcl {
|
|
|
|
|
|
|
|
$this->setFilterIdProces($procesID);//$this->_cache_save('permsByProcesID', $procesID);
|
|
$this->setFilterIdProces($procesID);//$this->_cache_save('permsByProcesID', $procesID);
|
|
|
|
|
|
|
|
- if (1) {
|
|
|
|
|
- $sqlIdProcesListSql = $this->getUsedUserProcesIdsSql();
|
|
|
|
|
-
|
|
|
|
|
- $userAccessForTables = array();
|
|
|
|
|
- $sql = <<<SQL
|
|
|
|
|
- select tpvg.`ID_TABLE`
|
|
|
|
|
- , tpvg.`ID_DATABASE` as `db`
|
|
|
|
|
- , tpvg.`TABLE_NAME` as `name`
|
|
|
|
|
- , tpvg.`TABLE_LABEL` as `label`
|
|
|
|
|
- , tpvg.`TABLE_DESCRIPTION` as `opis`
|
|
|
|
|
- from `CRM_PROCES_idx_TABLE_TO_PROCES_GROUPED_VIEW` as tpvg
|
|
|
|
|
- where tpvg.`ID_PROCES` in({$sqlIdProcesListSql})
|
|
|
|
|
- group by tpvg.`ID_TABLE`
|
|
|
|
|
|
|
+ $sqlIdProcesListSql = $this->getUsedUserProcesIdsSql();
|
|
|
|
|
+
|
|
|
|
|
+ $userAccessForTables = array();
|
|
|
|
|
+ $sql = <<<SQL
|
|
|
|
|
+ select tpvg.`ID_TABLE`
|
|
|
|
|
+ , tpvg.`ID_DATABASE` as `db`
|
|
|
|
|
+ , tpvg.`TABLE_NAME` as `name`
|
|
|
|
|
+ , tpvg.`TABLE_LABEL` as `label`
|
|
|
|
|
+ , tpvg.`TABLE_DESCRIPTION` as `opis`
|
|
|
|
|
+ from `CRM_PROCES_idx_TABLE_TO_PROCES_GROUPED_VIEW` as tpvg
|
|
|
|
|
+ where tpvg.`ID_PROCES` in({$sqlIdProcesListSql})
|
|
|
|
|
+ group by tpvg.`ID_TABLE`
|
|
|
SQL;
|
|
SQL;
|
|
|
- //echo'<pre>$userAccessForTables - $sql ';print_r($sql);echo'</pre>';
|
|
|
|
|
- $db = DB::getDB();
|
|
|
|
|
- $res = $db->query($sql);
|
|
|
|
|
- while ($h = $db->fetch_assoc($res)) {
|
|
|
|
|
- $userAccessForTables[$h['ID_TABLE']] = $h;
|
|
|
|
|
- }
|
|
|
|
|
- DBG::_('DBG_SCH', '1', "userAccessForTables", $userAccessForTables, __CLASS__, __FUNCTION__, __LINE__ );
|
|
|
|
|
- foreach ($userAccessForTables as $idTable => $tableConfig) {
|
|
|
|
|
- if (!array_key_exists($idTable, $foundTbls)) {
|
|
|
|
|
- $foundTbls[$idTable] = $tableConfig;
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ //echo'<pre>$userAccessForTables - $sql ';print_r($sql);echo'</pre>';
|
|
|
|
|
+ $db = DB::getDB();
|
|
|
|
|
+ $res = $db->query($sql);
|
|
|
|
|
+ while ($h = $db->fetch_assoc($res)) {
|
|
|
|
|
+ $userAccessForTables[$h['ID_TABLE']] = $h;
|
|
|
|
|
+ }
|
|
|
|
|
+ DBG::_('DBG_SCH', '1', "userAccessForTables", $userAccessForTables, __CLASS__, __FUNCTION__, __LINE__ );
|
|
|
|
|
+ foreach ($userAccessForTables as $idTable => $tableConfig) {
|
|
|
|
|
+ if (!array_key_exists($idTable, $foundTbls)) {
|
|
|
|
|
+ $foundTbls[$idTable] = $tableConfig;
|
|
|
}
|
|
}
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
- $userAccessForUrls = array();
|
|
|
|
|
- $sql = <<<SQL
|
|
|
|
|
- select upvg.`ID_URL`
|
|
|
|
|
- , upvg.`URL_LINK` as `link`
|
|
|
|
|
- , upvg.`URL_LABEL` as `label`
|
|
|
|
|
- , upvg.`URL_DESC` as `opis`
|
|
|
|
|
- from `CRM_PROCES_idx_URL_TO_PROCES_VIEW` as upvg
|
|
|
|
|
- where upvg.`ID_PROCES` in({$sqlIdProcesListSql})
|
|
|
|
|
- group by upvg.`ID_URL`
|
|
|
|
|
|
|
+ $userAccessForUrls = array();
|
|
|
|
|
+ $sql = <<<SQL
|
|
|
|
|
+ select upvg.`ID_URL`
|
|
|
|
|
+ , upvg.`URL_LINK` as `link`
|
|
|
|
|
+ , upvg.`URL_LABEL` as `label`
|
|
|
|
|
+ , upvg.`URL_DESC` as `opis`
|
|
|
|
|
+ from `CRM_PROCES_idx_URL_TO_PROCES_VIEW` as upvg
|
|
|
|
|
+ where upvg.`ID_PROCES` in({$sqlIdProcesListSql})
|
|
|
|
|
+ group by upvg.`ID_URL`
|
|
|
SQL;
|
|
SQL;
|
|
|
- //echo'<pre>$userAccessForUrls - $sql ';print_r($sql);echo'</pre>';
|
|
|
|
|
- $db = DB::getDB();
|
|
|
|
|
- $res = $db->query($sql);
|
|
|
|
|
- while ($h = $db->fetch_assoc($res)) {
|
|
|
|
|
- $userAccessForUrls[$h['ID_URL']] = $h;
|
|
|
|
|
- }
|
|
|
|
|
- //echo'<pre>$userAccessForUrls ';print_r($userAccessForUrls);echo'</pre>';
|
|
|
|
|
- DBG::_('DBG_SCH', '2', "userAccessForUrls", $userAccessForUrls, __CLASS__, __FUNCTION__, __LINE__ );
|
|
|
|
|
- foreach ($userAccessForUrls as $idUrl => $vUrlConfig) {
|
|
|
|
|
- $foundUrls[$idUrl] = $vUrlConfig['opis'];
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ //echo'<pre>$userAccessForUrls - $sql ';print_r($sql);echo'</pre>';
|
|
|
|
|
+ $db = DB::getDB();
|
|
|
|
|
+ $res = $db->query($sql);
|
|
|
|
|
+ while ($h = $db->fetch_assoc($res)) {
|
|
|
|
|
+ $userAccessForUrls[$h['ID_URL']] = $h;
|
|
|
|
|
+ }
|
|
|
|
|
+ //echo'<pre>$userAccessForUrls ';print_r($userAccessForUrls);echo'</pre>';
|
|
|
|
|
+ DBG::_('DBG_SCH', '2', "userAccessForUrls", $userAccessForUrls, __CLASS__, __FUNCTION__, __LINE__ );
|
|
|
|
|
+ foreach ($userAccessForUrls as $idUrl => $vUrlConfig) {
|
|
|
|
|
+ $foundUrls[$idUrl] = $vUrlConfig['opis'];
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
$this->_cache_save('foundUrls', $foundUrls);
|
|
$this->_cache_save('foundUrls', $foundUrls);
|
|
@@ -555,11 +442,53 @@ SQL;
|
|
|
return $maxUpdateDate;
|
|
return $maxUpdateDate;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ /**
|
|
|
|
|
+ * Ids List of Proces Init for user (skip filters)
|
|
|
|
|
+ */
|
|
|
|
|
+ public function getUserProcesInitIds() {
|
|
|
|
|
+ $procesInitList = $this->getUserProcesInitList();
|
|
|
|
|
+ return array_keys($procesInitList);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ /**
|
|
|
|
|
+ * List of Proces Init for user (skip filters)
|
|
|
|
|
+ */
|
|
|
|
|
+ public function getUserProcesInitList() {
|
|
|
|
|
+ $userProcesInitList = array();
|
|
|
|
|
+ $idUserGroupList = User::getGroupsIds();
|
|
|
|
|
+ $sqlIdUserGroupList = implode(",", $idUserGroupList);
|
|
|
|
|
+ $sqlIdProcesListSql = <<<SQL
|
|
|
|
|
+ select gi.`ID_PROCES`
|
|
|
|
|
+ from `CRM_PROCES_idx_GROUP_to_PROCES` gi
|
|
|
|
|
+ where gi.`ID_GROUP` in({$sqlIdUserGroupList})
|
|
|
|
|
+SQL;
|
|
|
|
|
+ $fetchUserProcesInitListSql = <<<SQL
|
|
|
|
|
+ select p.`ID`, p.`DESC`
|
|
|
|
|
+ from `CRM_PROCES_idx` i
|
|
|
|
|
+ join `CRM_PROCES` p on(p.`ID`=i.`idx_PROCES_INIT_ID`)
|
|
|
|
|
+ where i.`ID_PROCES` in({$sqlIdProcesListSql})
|
|
|
|
|
+ group by p.`ID`
|
|
|
|
|
+ order by p.`SORT_PRIO`
|
|
|
|
|
+SQL;
|
|
|
|
|
+ $db = DB::getDB();
|
|
|
|
|
+ $res = $db->query($fetchUserProcesInitListSql);
|
|
|
|
|
+ while ($r = $db->fetch($res)) {
|
|
|
|
|
+ $userProcesInitList[$r->ID] = $r->DESC;
|
|
|
|
|
+ }
|
|
|
|
|
+ return $userProcesInitList;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ /**
|
|
|
|
|
+ * Ids List of Proces Init for user (use filters)
|
|
|
|
|
+ */
|
|
|
public function getUsedUserProcesInitIds() {
|
|
public function getUsedUserProcesInitIds() {
|
|
|
$usedProcesInitList = $this->getUsedUserProcesInitList();
|
|
$usedProcesInitList = $this->getUsedUserProcesInitList();
|
|
|
return array_keys($usedProcesInitList);
|
|
return array_keys($usedProcesInitList);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ /**
|
|
|
|
|
+ * List of Proces Init for user (use filters)
|
|
|
|
|
+ */
|
|
|
public function getUsedUserProcesInitList() {
|
|
public function getUsedUserProcesInitList() {
|
|
|
$filterIdProces = $this->getFilterIdProces();
|
|
$filterIdProces = $this->getFilterIdProces();
|
|
|
if ($filterIdProces > 0) {
|
|
if ($filterIdProces > 0) {
|
|
@@ -567,21 +496,78 @@ SQL;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
$sqlIdProcesListSql = $this->getUsedUserProcesIdsSql();
|
|
$sqlIdProcesListSql = $this->getUsedUserProcesIdsSql();
|
|
|
- $getUsedProcesInitListSql = <<<SQL
|
|
|
|
|
|
|
+ $fetchUsedProcesInitListSql = <<<SQL
|
|
|
select p.`ID`, p.`DESC`
|
|
select p.`ID`, p.`DESC`
|
|
|
from `CRM_PROCES` p
|
|
from `CRM_PROCES` p
|
|
|
where p.`ID` in({$sqlIdProcesListSql})
|
|
where p.`ID` in({$sqlIdProcesListSql})
|
|
|
and p.`TYPE`='PROCES_INIT'
|
|
and p.`TYPE`='PROCES_INIT'
|
|
|
- group by p.`ID`
|
|
|
|
|
order by p.`SORT_PRIO`
|
|
order by p.`SORT_PRIO`
|
|
|
SQL;
|
|
SQL;
|
|
|
$usedProcesInitList = array();
|
|
$usedProcesInitList = array();
|
|
|
$db = DB::getDB();
|
|
$db = DB::getDB();
|
|
|
- $res = $db->query($getUsedProcesInitListSql);
|
|
|
|
|
|
|
+ $res = $db->query($fetchUsedProcesInitListSql);
|
|
|
while ($r = $db->fetch($res)) {
|
|
while ($r = $db->fetch($res)) {
|
|
|
$usedProcesInitList[$r->ID] = $r->DESC;
|
|
$usedProcesInitList[$r->ID] = $r->DESC;
|
|
|
}
|
|
}
|
|
|
return $usedProcesInitList;
|
|
return $usedProcesInitList;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ /**
|
|
|
|
|
+ * Ids List of Proces Init for given tabel (skip filters)
|
|
|
|
|
+ */
|
|
|
|
|
+ public function getTableProcesInitIds($idTable) {// TODO: use in TableAjax
|
|
|
|
|
+ $procesInitList = $this->getTableProcesInitList($idTable);
|
|
|
|
|
+ return array_keys($procesInitList);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ /**
|
|
|
|
|
+ * List of Proces Init for given table (skip filters)
|
|
|
|
|
+ */
|
|
|
|
|
+ public function getTableProcesInitList($idTable) {// TODO: use in TableAjax
|
|
|
|
|
+ $tableProcesInitList = array();
|
|
|
|
|
+ $sqlIdProcesListSql = <<<SQL
|
|
|
|
|
+ select tpv.`ID_PROCES`
|
|
|
|
|
+ from `CRM_PROCES_idx_TABLE_TO_PROCES_VIEW` tpv
|
|
|
|
|
+ where tpv.`ID_TABLE`='{$idTable}'
|
|
|
|
|
+SQL;
|
|
|
|
|
+ $fetchTableProcesInitListSql = <<<SQL
|
|
|
|
|
+ select p.`ID`, p.`DESC`
|
|
|
|
|
+ from `CRM_PROCES_idx` i
|
|
|
|
|
+ join `CRM_PROCES` p on(p.`ID`=i.`idx_PROCES_INIT_ID`)
|
|
|
|
|
+ where i.`ID_PROCES` in({$sqlIdProcesListSql})
|
|
|
|
|
+ group by p.`ID`
|
|
|
|
|
+ order by p.`SORT_PRIO`
|
|
|
|
|
+SQL;
|
|
|
|
|
+ $tableProcesInitList = array();
|
|
|
|
|
+ $db = DB::getDB();
|
|
|
|
|
+ $res = $db->query($fetchTableProcesInitListSql);
|
|
|
|
|
+ while ($r = $db->fetch($res)) {
|
|
|
|
|
+ $tableProcesInitList[$r->ID] = $r->DESC;
|
|
|
|
|
+ }
|
|
|
|
|
+ return $tableProcesInitList;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ public function canExecuteProcesInit($idProcesInit) {
|
|
|
|
|
+ $canExecuteProcesInit = false;
|
|
|
|
|
+ $idProcesInit = (int)$idProcesInit;
|
|
|
|
|
+ if (!$idProcesInit) return false;
|
|
|
|
|
+ $idUserGroupList = User::getGroupsIds();
|
|
|
|
|
+ $sqlIdUserGroupList = implode(",", $idUserGroupList);
|
|
|
|
|
+ $checkProcesAccessSql = <<<SQL
|
|
|
|
|
+ select count(*) as cnt
|
|
|
|
|
+ from `CRM_PROCES_idx_GROUP_to_PROCES` gi
|
|
|
|
|
+ join `CRM_PROCES` p on(p.`ID`=gi.`ID_PROCES` and p.`TYPE`='PROCES_INIT')
|
|
|
|
|
+ where gi.`ID_GROUP` in({$sqlIdUserGroupList})
|
|
|
|
|
+ and gi.`ID_PROCES`='{$idProcesInit}'
|
|
|
|
|
+SQL;
|
|
|
|
|
+ $db = DB::getDB();
|
|
|
|
|
+ $res = $db->query($checkProcesAccessSql);
|
|
|
|
|
+ if ($r = $db->fetch($res)) {
|
|
|
|
|
+ if ($r->cnt > 0) {
|
|
|
|
|
+ $canExecuteProcesInit = true;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ return $canExecuteProcesInit;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
}
|
|
}
|