<?
$csspath='themes/dialog/'.($Channel['theme']?$Channel['theme']:$setting['theme']);
$tplpath="plugins/toolbar";
$toolbars=$CSS=$ONLOAD=$JS='';
$closeobj=$toolbarkeyA=$toolbarkeyB=$toolbarkeyC=$ONLOAD=$SWFLOAD=array();
$dh=opendir($tplpath);
$fdata=@readover($tplpath.'/list.txt');
$spliter='';
$lastK='';
if($fdata){
  foreach(explode(',',$fdata) as $k){
    if($k=='video' || $lastK=='video'){
      $k && $lastK=$k;
    }
    if($k){
      $lastK=$k;
      unset($Con);
      @include_once($tplpath.'/'.$k.'.php');
      if($Con){
        $toolbarkeyS[]=$k;
        if($Con['onload'])$ONLOAD[$Con['onload']]=$Con['onload'];
        if($Con['swfload'])$SWFLOAD[$Con['swfload']]=$Con['swfload'];
        $JS.=$Con['js']?"\n".$Con['js']:'';
        $CSS.=$Con['css']?"\n".$Con['css']:'';
        $HTML.=$Con['html']?"\n".$Con['html']:'';
        $Con['img']=str_replace('./',$tplpath.'/',$Con['img']);
        $Con['img']=str_replace('*/',"images/$dialogstyle/",$Con['img']);
        $toolbarkeyA[]=$Con['title'];
        $toolbarkeyB[]=$Con['onclick'];
        $toolbarkeyC[]=$Con['img'];
      }
    }else{
      $toolbarkeyA[]='';
      $toolbarkeyB[]='';
      $toolbarkeyC[]='';
    }
  }
}
closedir($dh);
?>