include_once(CXSYSTEMSCRIPTS.'/classes/cxdir.class.php'); include_once(CXCUSTOMERSCRIPTS.'/modules/cxcms/wiki_lib.inc.php'); $buffer = ''; $index_main['titel'] = 'CX CMS - Hilfe'; $index_main['id'] = '9113help'; $helpgroup = (isset($index_main['levels']['1'])) ? $index_main['levels']['1'] : 'customer'; $actlang = (isset($index_main['levels']['2'])) ? $index_main['levels']['2'] : 'DE'; if (!($reg->getright($session->getuser(), 'cxcms', 'allowed', 'help'.$helpgroup.'doc', 'booltrue') )) { $buffer = system_htmlcomp_class('error',trans('cxcms.help.notallowed')); } else { //Alle möglichen Hilfedateien aus dem Filesystem holen $structfile = CXCUSTOMERSTORAGE.'/cxcms/help/'.$helpgroup.'__'.$actlang.'.struc'; $docstruct = array(); if (file_exists($structfile)) { $readbuffer = file($structfile); if (is_array($readbuffer)) foreach($readbuffer as $line) { $docstruct[trim($line)] = trim($line); } } $helpfiles = array(); $allmodules = $reg->getallkeys('/system/modules'); foreach($allmodules as $modname=>$modid) { $fl = new cxdir(CXCUSTOMERSCRIPTS.'/modules/'.$modname.'/help','*__'.$actlang.'.hlp','f',false); $fl->go(); foreach($fl as $filename) { $key=substr(basename($filename),0,strpos(basename($filename),'__')); $orikey = $key; if (! isset($docstruct[$key])) continue; $help = cxlib_readhelpfile($modname,$key,$actlang); $helpfiles[$key]['f'] = substr(basename($filename),0,strpos(basename($filename),'__')); $helpfiles[$key]['m'] = $modname; $helpfiles[$key]['l'] = $help['label']; $helpfiles[$key]['g'] = $help['groups']; } $fl = new cxdir(CXCUSTOMERSTORAGE.'/'.$modname.'/help','*__'.$actlang.'.hlp','f',false); $fl->go(); foreach($fl as $filename) { $key=substr(basename($filename),0,strpos(basename($filename),'__')); $orikey = $key; if (! isset($docstruct[$key])) continue; $help = cxlib_readhelpfile($modname,$key,$actlang); if (isset($helpfiles[$help['ori']])) { unset($helpfiles[$help['ori']]); } $helpfiles[$key]['f'] = substr(basename($filename),0,strpos(basename($filename),'__')); $helpfiles[$key]['m'] = $modname; $helpfiles[$key]['l'] = $help['label']; $helpfiles[$key]['g'] = $help['groups']; } } ksort($helpfiles); $thehtml = ''; $pdfinfos = array(); $chapterlist = array(0,0,0,0,0,0,0,0,0,0,0); $chapternames= array(' ',' ',' ',' ',' ',' ',' ',' '); $thehtml .= '
'.cxlib_wiki2html($fdata['m'],$help['wiki']).'
'."\n"; } $thehtml .= '