From: Harvie Date: Mon, 20 Dec 2010 01:10:32 +0000 (+0100) Subject: Added script for importing DDS to kyberia X-Git-Url: https://git.harvie.cz/?a=commitdiff_plain;h=4bcea04631f7a8687878244ac986121aefbe09c0;p=mirrors%2FPrograms.git Added script for importing DDS to kyberia --- diff --git a/bash/dewey_decimal_system/kybca-import.php b/bash/dewey_decimal_system/kybca-import.php new file mode 100755 index 0000000..f9243ba --- /dev/null +++ b/bash/dewey_decimal_system/kybca-import.php @@ -0,0 +1,39 @@ +#!/usr/bin/php + $value) { + $new=$key; + while((!is_numeric($new)) || $new < 2) $new=aaddNode(array( + 'node_parent' => $id, 'node_name' => apostrof($key), 'node_content' => apostrof($key), + 'template_id' => 2, 'node_system_access' => $depth>1?'public':'moderated', 'node_external_access' => 'yes' + )); + $tree[$new]=$tree[$key]; unset($tree[$key]); //rename key to new + $tree[$new] = recursive_add($tree[$new],$new,$depth+1); + } + //foreach($tree as $key => $value) $tree[$key] = recursive_add($tree[$key],$key); + return $tree; +} + +$dds = recursive_add($dds['dds'],4738157,0); +echo '
'; print_r($dds); echo '
';