| @@ 6554-6593 (lines=40) @@ | ||
| 6551 | $arrHide = array ( |
|
| 6552 | $id |
|
| 6553 | ); |
|
| 6554 | for ($i = 0; $i < count($arrLP); $i++) { |
|
| 6555 | if ($action != 'add') { |
|
| 6556 | if ( |
|
| 6557 | ( |
|
| 6558 | $arrLP[$i]['item_type'] == 'dokeos_module' || |
|
| 6559 | $arrLP[$i]['item_type'] == 'dokeos_chapter' || |
|
| 6560 | $arrLP[$i]['item_type'] == 'dir' |
|
| 6561 | ) && |
|
| 6562 | !in_array($arrLP[$i]['id'], $arrHide) && |
|
| 6563 | !in_array($arrLP[$i]['parent_item_id'], $arrHide) |
|
| 6564 | ) { |
|
| 6565 | $selectParent->addOption( |
|
| 6566 | $arrLP[$i]['title'], |
|
| 6567 | $arrLP[$i]['id'], |
|
| 6568 | ['style' => 'padding-left: ' . (20 + $arrLP[$i]['depth'] * 20) . 'px'] |
|
| 6569 | ); |
|
| 6570 | ||
| 6571 | if ($parent == $arrLP[$i]['id']) { |
|
| 6572 | $selectParent->setSelected($arrLP[$i]['id']); |
|
| 6573 | } |
|
| 6574 | } else { |
|
| 6575 | $arrHide[] = $arrLP[$i]['id']; |
|
| 6576 | } |
|
| 6577 | } else { |
|
| 6578 | if ( |
|
| 6579 | $arrLP[$i]['item_type'] == 'dokeos_module' || |
|
| 6580 | $arrLP[$i]['item_type'] == 'dokeos_chapter' || |
|
| 6581 | $arrLP[$i]['item_type'] == 'dir' |
|
| 6582 | ) { |
|
| 6583 | $selectParent->addOption( |
|
| 6584 | $arrLP[$i]['title'], |
|
| 6585 | $arrLP[$i]['id'], ['style' => 'padding-left: ' . (20 + $arrLP[$i]['depth'] * 20) . 'px'] |
|
| 6586 | ); |
|
| 6587 | ||
| 6588 | if ($parent == $arrLP[$i]['id']) { |
|
| 6589 | $selectParent->setSelected($arrLP[$i]['id']); |
|
| 6590 | } |
|
| 6591 | } |
|
| 6592 | } |
|
| 6593 | } |
|
| 6594 | if (is_array($arrLP)) { |
|
| 6595 | reset($arrLP); |
|
| 6596 | } |
|
| @@ 6972-7004 (lines=33) @@ | ||
| 6969 | ); |
|
| 6970 | ||
| 6971 | //$parent_item_id = $_SESSION['parent_item_id']; |
|
| 6972 | for ($i = 0; $i < count($arrLP); $i++) { |
|
| 6973 | if ($action != 'add') { |
|
| 6974 | 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)) { |
|
| 6975 | $selectParent->addOption( |
|
| 6976 | $arrLP[$i]['title'], |
|
| 6977 | $arrLP[$i]['id'], |
|
| 6978 | ['style' => 'padding-left: ' . (20 + $arrLP[$i]['depth'] * 20) . 'px'] |
|
| 6979 | ); |
|
| 6980 | ||
| 6981 | if ($parent == $arrLP[$i]['id']) { |
|
| 6982 | $selectParent->setSelected($arrLP[$i]['id']); |
|
| 6983 | } |
|
| 6984 | } else { |
|
| 6985 | $arrHide[] = $arrLP[$i]['id']; |
|
| 6986 | } |
|
| 6987 | } else { |
|
| 6988 | if ( |
|
| 6989 | $arrLP[$i]['item_type'] == 'dokeos_module' || |
|
| 6990 | $arrLP[$i]['item_type'] == 'dokeos_chapter' || |
|
| 6991 | $arrLP[$i]['item_type'] == 'dir' |
|
| 6992 | ) { |
|
| 6993 | $selectParent->addOption( |
|
| 6994 | $arrLP[$i]['title'], |
|
| 6995 | $arrLP[$i]['id'], |
|
| 6996 | ['style' => 'padding-left: ' . (20 + $arrLP[$i]['depth'] * 20) . 'px'] |
|
| 6997 | ); |
|
| 6998 | ||
| 6999 | if ($parent == $arrLP[$i]['id']) { |
|
| 7000 | $selectParent->setSelected($arrLP[$i]['id']); |
|
| 7001 | } |
|
| 7002 | } |
|
| 7003 | } |
|
| 7004 | } |
|
| 7005 | if (is_array($arrLP)) { |
|
| 7006 | reset($arrLP); |
|
| 7007 | } |
|
| @@ 7165-7205 (lines=41) @@ | ||
| 7162 | $id |
|
| 7163 | ); |
|
| 7164 | ||
| 7165 | for ($i = 0; $i < count($arrLP); $i++) { |
|
| 7166 | if ($action != 'add') { |
|
| 7167 | if ( |
|
| 7168 | ( |
|
| 7169 | $arrLP[$i]['item_type'] == 'dokeos_module' || |
|
| 7170 | $arrLP[$i]['item_type'] == 'dokeos_chapter' || |
|
| 7171 | $arrLP[$i]['item_type'] == 'dir' |
|
| 7172 | ) && |
|
| 7173 | !in_array($arrLP[$i]['id'], $arrHide) && |
|
| 7174 | !in_array($arrLP[$i]['parent_item_id'], $arrHide) |
|
| 7175 | ) { |
|
| 7176 | $selectParent->addOption( |
|
| 7177 | $arrLP[$i]['title'], |
|
| 7178 | $arrLP[$i]['id'], |
|
| 7179 | ['style' => 'padding-left: ' . (20 + $arrLP[$i]['depth'] * 20) . 'px'] |
|
| 7180 | ); |
|
| 7181 | ||
| 7182 | if ($parent == $arrLP[$i]['id']) { |
|
| 7183 | $selectParent->setSelected($arrLP[$i]['id']); |
|
| 7184 | } |
|
| 7185 | } else { |
|
| 7186 | $arrHide[] = $arrLP[$i]['id']; |
|
| 7187 | } |
|
| 7188 | } else { |
|
| 7189 | if ( |
|
| 7190 | $arrLP[$i]['item_type'] == 'dokeos_module' || |
|
| 7191 | $arrLP[$i]['item_type'] == 'dokeos_chapter' || |
|
| 7192 | $arrLP[$i]['item_type'] == 'dir' |
|
| 7193 | ) { |
|
| 7194 | $selectParent->addOption( |
|
| 7195 | $arrLP[$i]['title'], |
|
| 7196 | $arrLP[$i]['id'], |
|
| 7197 | ['style' => 'padding-left: ' . (20 + $arrLP[$i]['depth'] * 20) . 'px'] |
|
| 7198 | ); |
|
| 7199 | ||
| 7200 | if ($parent == $arrLP[$i]['id']) { |
|
| 7201 | $selectParent->setSelected($arrLP[$i]['id']); |
|
| 7202 | } |
|
| 7203 | } |
|
| 7204 | } |
|
| 7205 | } |
|
| 7206 | ||
| 7207 | if ($arrLP != null) { |
|
| 7208 | reset($arrLP); |
|
| @@ 7931-7967 (lines=37) @@ | ||
| 7928 | ||
| 7929 | $parent_item_id = isset($_SESSION['parent_item_id']) ? $_SESSION['parent_item_id'] : 0; |
|
| 7930 | ||
| 7931 | for ($i = 0; $i < count($arrLP); $i++) { |
|
| 7932 | if ($action != 'add') { |
|
| 7933 | if ( |
|
| 7934 | ( |
|
| 7935 | $arrLP[$i]['item_type'] == 'dokeos_module' || |
|
| 7936 | $arrLP[$i]['item_type'] == 'dokeos_chapter' || |
|
| 7937 | $arrLP[$i]['item_type'] == 'dir' |
|
| 7938 | ) && |
|
| 7939 | !in_array($arrLP[$i]['id'], $arrHide) && |
|
| 7940 | !in_array($arrLP[$i]['parent_item_id'], $arrHide) |
|
| 7941 | ) { |
|
| 7942 | $selectParent->addOption( |
|
| 7943 | $arrLP[$i]['title'], |
|
| 7944 | $arrLP[$i]['id'], |
|
| 7945 | ['style' => 'padding-left: ' . (20 + $arrLP[$i]['depth'] * 20) . 'px;'] |
|
| 7946 | ); |
|
| 7947 | ||
| 7948 | if ($parent == $arrLP[$i]['id']) { |
|
| 7949 | $selectParent->setSelected($arrLP[$i]['id']); |
|
| 7950 | } |
|
| 7951 | } else { |
|
| 7952 | $arrHide[] = $arrLP[$i]['id']; |
|
| 7953 | } |
|
| 7954 | } else { |
|
| 7955 | if ($arrLP[$i]['item_type'] == 'dokeos_module' || $arrLP[$i]['item_type'] == 'dokeos_chapter' || $arrLP[$i]['item_type'] == 'dir') { |
|
| 7956 | $selectParent->addOption( |
|
| 7957 | $arrLP[$i]['title'], |
|
| 7958 | $arrLP[$i]['id'], |
|
| 7959 | ['style' => 'padding-left: ' . (20 + $arrLP[$i]['depth'] * 20) . 'px'] |
|
| 7960 | ); |
|
| 7961 | ||
| 7962 | if ($parent_item_id == $arrLP[$i]['id']) { |
|
| 7963 | $selectParent->setSelected($arrLP[$i]['id']); |
|
| 7964 | } |
|
| 7965 | } |
|
| 7966 | } |
|
| 7967 | } |
|
| 7968 | ||
| 7969 | if (is_array($arrLP)) { |
|
| 7970 | reset($arrLP); |
|
| @@ 8141-8180 (lines=40) @@ | ||
| 8138 | $id |
|
| 8139 | ); |
|
| 8140 | ||
| 8141 | for ($i = 0; $i < count($arrLP); $i++) { |
|
| 8142 | if ($action != 'add') { |
|
| 8143 | if ( |
|
| 8144 | ( |
|
| 8145 | $arrLP[$i]['item_type'] == 'dokeos_module' || |
|
| 8146 | $arrLP[$i]['item_type'] == 'dokeos_chapter' || |
|
| 8147 | $arrLP[$i]['item_type'] == 'dir' |
|
| 8148 | ) && |
|
| 8149 | !in_array($arrLP[$i]['id'], $arrHide) && |
|
| 8150 | !in_array($arrLP[$i]['parent_item_id'], $arrHide) |
|
| 8151 | ) { |
|
| 8152 | $parentSelect->addOption( |
|
| 8153 | $arrLP[$i]['title'], |
|
| 8154 | $arrLP[$i]['id'], |
|
| 8155 | ['style' => 'padding-left: ' . (($arrLP[$i]['depth'] * 10) + 20) . 'px;'] |
|
| 8156 | ); |
|
| 8157 | ||
| 8158 | if ($parent == $arrLP[$i]['id']) { |
|
| 8159 | $parentSelect->setSelected($arrLP[$i]['id']); |
|
| 8160 | } |
|
| 8161 | } else { |
|
| 8162 | $arrHide[] = $arrLP[$i]['id']; |
|
| 8163 | } |
|
| 8164 | } else { |
|
| 8165 | if ( |
|
| 8166 | $arrLP[$i]['item_type'] == 'dokeos_module' || |
|
| 8167 | $arrLP[$i]['item_type'] == 'dokeos_chapter' || $arrLP[$i]['item_type'] == 'dir' |
|
| 8168 | ) { |
|
| 8169 | $parentSelect->addOption( |
|
| 8170 | $arrLP[$i]['title'], |
|
| 8171 | $arrLP[$i]['id'], |
|
| 8172 | ['style' => 'padding-left: ' . (($arrLP[$i]['depth'] * 10) + 20) . 'px;'] |
|
| 8173 | ); |
|
| 8174 | ||
| 8175 | if ($parent == $arrLP[$i]['id']) { |
|
| 8176 | $parentSelect->setSelected($arrLP[$i]['id']); |
|
| 8177 | } |
|
| 8178 | } |
|
| 8179 | } |
|
| 8180 | } |
|
| 8181 | ||
| 8182 | if (is_array($arrLP)) { |
|
| 8183 | reset($arrLP); |
|