| @@ 6561-6600 (lines=40) @@ | ||
| 6558 | $arrHide = array ( |
|
| 6559 | $id |
|
| 6560 | ); |
|
| 6561 | for ($i = 0; $i < count($arrLP); $i++) { |
|
| 6562 | if ($action != 'add') { |
|
| 6563 | if ( |
|
| 6564 | ( |
|
| 6565 | $arrLP[$i]['item_type'] == 'dokeos_module' || |
|
| 6566 | $arrLP[$i]['item_type'] == 'dokeos_chapter' || |
|
| 6567 | $arrLP[$i]['item_type'] == 'dir' |
|
| 6568 | ) && |
|
| 6569 | !in_array($arrLP[$i]['id'], $arrHide) && |
|
| 6570 | !in_array($arrLP[$i]['parent_item_id'], $arrHide) |
|
| 6571 | ) { |
|
| 6572 | $selectParent->addOption( |
|
| 6573 | $arrLP[$i]['title'], |
|
| 6574 | $arrLP[$i]['id'], |
|
| 6575 | ['style' => 'padding-left: ' . (20 + $arrLP[$i]['depth'] * 20) . 'px'] |
|
| 6576 | ); |
|
| 6577 | ||
| 6578 | if ($parent == $arrLP[$i]['id']) { |
|
| 6579 | $selectParent->setSelected($arrLP[$i]['id']); |
|
| 6580 | } |
|
| 6581 | } else { |
|
| 6582 | $arrHide[] = $arrLP[$i]['id']; |
|
| 6583 | } |
|
| 6584 | } else { |
|
| 6585 | if ( |
|
| 6586 | $arrLP[$i]['item_type'] == 'dokeos_module' || |
|
| 6587 | $arrLP[$i]['item_type'] == 'dokeos_chapter' || |
|
| 6588 | $arrLP[$i]['item_type'] == 'dir' |
|
| 6589 | ) { |
|
| 6590 | $selectParent->addOption( |
|
| 6591 | $arrLP[$i]['title'], |
|
| 6592 | $arrLP[$i]['id'], ['style' => 'padding-left: ' . (20 + $arrLP[$i]['depth'] * 20) . 'px'] |
|
| 6593 | ); |
|
| 6594 | ||
| 6595 | if ($parent == $arrLP[$i]['id']) { |
|
| 6596 | $selectParent->setSelected($arrLP[$i]['id']); |
|
| 6597 | } |
|
| 6598 | } |
|
| 6599 | } |
|
| 6600 | } |
|
| 6601 | if (is_array($arrLP)) { |
|
| 6602 | reset($arrLP); |
|
| 6603 | } |
|
| @@ 6979-7011 (lines=33) @@ | ||
| 6976 | ); |
|
| 6977 | ||
| 6978 | //$parent_item_id = $_SESSION['parent_item_id']; |
|
| 6979 | for ($i = 0; $i < count($arrLP); $i++) { |
|
| 6980 | if ($action != 'add') { |
|
| 6981 | if (($arrLP[$i]['item_type'] == 'dokeos_module' || $arrLP[$i]['item_type'] == 'dokeos_chapter' || $arrLP[$i]['item_type'] == 'dir') && !in_array($arrLP[$i]['id'], $arrHide) && !in_array($arrLP[$i]['parent_item_id'], $arrHide)) { |
|
| 6982 | $selectParent->addOption( |
|
| 6983 | $arrLP[$i]['title'], |
|
| 6984 | $arrLP[$i]['id'], |
|
| 6985 | ['style' => 'padding-left: ' . (20 + $arrLP[$i]['depth'] * 20) . 'px'] |
|
| 6986 | ); |
|
| 6987 | ||
| 6988 | if ($parent == $arrLP[$i]['id']) { |
|
| 6989 | $selectParent->setSelected($arrLP[$i]['id']); |
|
| 6990 | } |
|
| 6991 | } else { |
|
| 6992 | $arrHide[] = $arrLP[$i]['id']; |
|
| 6993 | } |
|
| 6994 | } else { |
|
| 6995 | if ( |
|
| 6996 | $arrLP[$i]['item_type'] == 'dokeos_module' || |
|
| 6997 | $arrLP[$i]['item_type'] == 'dokeos_chapter' || |
|
| 6998 | $arrLP[$i]['item_type'] == 'dir' |
|
| 6999 | ) { |
|
| 7000 | $selectParent->addOption( |
|
| 7001 | $arrLP[$i]['title'], |
|
| 7002 | $arrLP[$i]['id'], |
|
| 7003 | ['style' => 'padding-left: ' . (20 + $arrLP[$i]['depth'] * 20) . 'px'] |
|
| 7004 | ); |
|
| 7005 | ||
| 7006 | if ($parent == $arrLP[$i]['id']) { |
|
| 7007 | $selectParent->setSelected($arrLP[$i]['id']); |
|
| 7008 | } |
|
| 7009 | } |
|
| 7010 | } |
|
| 7011 | } |
|
| 7012 | if (is_array($arrLP)) { |
|
| 7013 | reset($arrLP); |
|
| 7014 | } |
|
| @@ 7172-7212 (lines=41) @@ | ||
| 7169 | $id |
|
| 7170 | ); |
|
| 7171 | ||
| 7172 | for ($i = 0; $i < count($arrLP); $i++) { |
|
| 7173 | if ($action != 'add') { |
|
| 7174 | if ( |
|
| 7175 | ( |
|
| 7176 | $arrLP[$i]['item_type'] == 'dokeos_module' || |
|
| 7177 | $arrLP[$i]['item_type'] == 'dokeos_chapter' || |
|
| 7178 | $arrLP[$i]['item_type'] == 'dir' |
|
| 7179 | ) && |
|
| 7180 | !in_array($arrLP[$i]['id'], $arrHide) && |
|
| 7181 | !in_array($arrLP[$i]['parent_item_id'], $arrHide) |
|
| 7182 | ) { |
|
| 7183 | $selectParent->addOption( |
|
| 7184 | $arrLP[$i]['title'], |
|
| 7185 | $arrLP[$i]['id'], |
|
| 7186 | ['style' => 'padding-left: ' . (20 + $arrLP[$i]['depth'] * 20) . 'px'] |
|
| 7187 | ); |
|
| 7188 | ||
| 7189 | if ($parent == $arrLP[$i]['id']) { |
|
| 7190 | $selectParent->setSelected($arrLP[$i]['id']); |
|
| 7191 | } |
|
| 7192 | } else { |
|
| 7193 | $arrHide[] = $arrLP[$i]['id']; |
|
| 7194 | } |
|
| 7195 | } else { |
|
| 7196 | if ( |
|
| 7197 | $arrLP[$i]['item_type'] == 'dokeos_module' || |
|
| 7198 | $arrLP[$i]['item_type'] == 'dokeos_chapter' || |
|
| 7199 | $arrLP[$i]['item_type'] == 'dir' |
|
| 7200 | ) { |
|
| 7201 | $selectParent->addOption( |
|
| 7202 | $arrLP[$i]['title'], |
|
| 7203 | $arrLP[$i]['id'], |
|
| 7204 | ['style' => 'padding-left: ' . (20 + $arrLP[$i]['depth'] * 20) . 'px'] |
|
| 7205 | ); |
|
| 7206 | ||
| 7207 | if ($parent == $arrLP[$i]['id']) { |
|
| 7208 | $selectParent->setSelected($arrLP[$i]['id']); |
|
| 7209 | } |
|
| 7210 | } |
|
| 7211 | } |
|
| 7212 | } |
|
| 7213 | ||
| 7214 | if ($arrLP != null) { |
|
| 7215 | reset($arrLP); |
|
| @@ 7938-7974 (lines=37) @@ | ||
| 7935 | ||
| 7936 | $parent_item_id = isset($_SESSION['parent_item_id']) ? $_SESSION['parent_item_id'] : 0; |
|
| 7937 | ||
| 7938 | for ($i = 0; $i < count($arrLP); $i++) { |
|
| 7939 | if ($action != 'add') { |
|
| 7940 | if ( |
|
| 7941 | ( |
|
| 7942 | $arrLP[$i]['item_type'] == 'dokeos_module' || |
|
| 7943 | $arrLP[$i]['item_type'] == 'dokeos_chapter' || |
|
| 7944 | $arrLP[$i]['item_type'] == 'dir' |
|
| 7945 | ) && |
|
| 7946 | !in_array($arrLP[$i]['id'], $arrHide) && |
|
| 7947 | !in_array($arrLP[$i]['parent_item_id'], $arrHide) |
|
| 7948 | ) { |
|
| 7949 | $selectParent->addOption( |
|
| 7950 | $arrLP[$i]['title'], |
|
| 7951 | $arrLP[$i]['id'], |
|
| 7952 | ['style' => 'padding-left: ' . (20 + $arrLP[$i]['depth'] * 20) . 'px;'] |
|
| 7953 | ); |
|
| 7954 | ||
| 7955 | if ($parent == $arrLP[$i]['id']) { |
|
| 7956 | $selectParent->setSelected($arrLP[$i]['id']); |
|
| 7957 | } |
|
| 7958 | } else { |
|
| 7959 | $arrHide[] = $arrLP[$i]['id']; |
|
| 7960 | } |
|
| 7961 | } else { |
|
| 7962 | if ($arrLP[$i]['item_type'] == 'dokeos_module' || $arrLP[$i]['item_type'] == 'dokeos_chapter' || $arrLP[$i]['item_type'] == 'dir') { |
|
| 7963 | $selectParent->addOption( |
|
| 7964 | $arrLP[$i]['title'], |
|
| 7965 | $arrLP[$i]['id'], |
|
| 7966 | ['style' => 'padding-left: ' . (20 + $arrLP[$i]['depth'] * 20) . 'px'] |
|
| 7967 | ); |
|
| 7968 | ||
| 7969 | if ($parent_item_id == $arrLP[$i]['id']) { |
|
| 7970 | $selectParent->setSelected($arrLP[$i]['id']); |
|
| 7971 | } |
|
| 7972 | } |
|
| 7973 | } |
|
| 7974 | } |
|
| 7975 | ||
| 7976 | if (is_array($arrLP)) { |
|
| 7977 | reset($arrLP); |
|
| @@ 8148-8187 (lines=40) @@ | ||
| 8145 | $id |
|
| 8146 | ); |
|
| 8147 | ||
| 8148 | for ($i = 0; $i < count($arrLP); $i++) { |
|
| 8149 | if ($action != 'add') { |
|
| 8150 | if ( |
|
| 8151 | ( |
|
| 8152 | $arrLP[$i]['item_type'] == 'dokeos_module' || |
|
| 8153 | $arrLP[$i]['item_type'] == 'dokeos_chapter' || |
|
| 8154 | $arrLP[$i]['item_type'] == 'dir' |
|
| 8155 | ) && |
|
| 8156 | !in_array($arrLP[$i]['id'], $arrHide) && |
|
| 8157 | !in_array($arrLP[$i]['parent_item_id'], $arrHide) |
|
| 8158 | ) { |
|
| 8159 | $parentSelect->addOption( |
|
| 8160 | $arrLP[$i]['title'], |
|
| 8161 | $arrLP[$i]['id'], |
|
| 8162 | ['style' => 'padding-left: ' . (($arrLP[$i]['depth'] * 10) + 20) . 'px;'] |
|
| 8163 | ); |
|
| 8164 | ||
| 8165 | if ($parent == $arrLP[$i]['id']) { |
|
| 8166 | $parentSelect->setSelected($arrLP[$i]['id']); |
|
| 8167 | } |
|
| 8168 | } else { |
|
| 8169 | $arrHide[] = $arrLP[$i]['id']; |
|
| 8170 | } |
|
| 8171 | } else { |
|
| 8172 | if ( |
|
| 8173 | $arrLP[$i]['item_type'] == 'dokeos_module' || |
|
| 8174 | $arrLP[$i]['item_type'] == 'dokeos_chapter' || $arrLP[$i]['item_type'] == 'dir' |
|
| 8175 | ) { |
|
| 8176 | $parentSelect->addOption( |
|
| 8177 | $arrLP[$i]['title'], |
|
| 8178 | $arrLP[$i]['id'], |
|
| 8179 | ['style' => 'padding-left: ' . (($arrLP[$i]['depth'] * 10) + 20) . 'px;'] |
|
| 8180 | ); |
|
| 8181 | ||
| 8182 | if ($parent == $arrLP[$i]['id']) { |
|
| 8183 | $parentSelect->setSelected($arrLP[$i]['id']); |
|
| 8184 | } |
|
| 8185 | } |
|
| 8186 | } |
|
| 8187 | } |
|
| 8188 | ||
| 8189 | if (is_array($arrLP)) { |
|
| 8190 | reset($arrLP); |
|