panel::showPanel()
/**
 * 
 * Show a bootstrap 3 panel
 * 
 * item values
 * -----------
 * menu (array): Every main menu item values (icon, scr, title, href,btn), i.e.:
 *               $cnf['menu'][] = ['icon'=>'account','scr'=>'user_type','title'=>''User Type,'btn'=>'primary']
 *               btn: Bootstrap button types (default, primaryt, success, warning, danger)
 *               icon: Menu icon name (default mdi).
 * $cnf['title'] (str): Panel title
 * $cnf['icon'] (str): Icon name
 * $cnf['icon_set'] (str): Set of icons fa, glyphicon, mdi (mdi by default)
 * $cnf['back']: Page to return to
 * $cnf['cnf_cat'] (str): Framework keys category
 * $cnf['cnf_key'] (str): Framework keys keyword
 * $cnf['item'][] (array): Every panel item values (name,title,type)
 * 
 * item array values
 * -----------------
 * $cnf['item'][] = [cat=>'',name=>'',title=>'',scale=>'',type=>'',readonly=>true]
 * cat (str): Show a table row with category text (no input inserted)
 * name (str): Input field name
 * title (str): Input field Title
 * scale (str): Text, image, symbol after input line
 * type (str): Type of input
 * readonly (bool): true to ser input as read only
 * 
 * input types
 * -----------
 * checkbox: single checkbox item
 * radio|select: Radio or select list. Values should be passed by array, i.e:
 *               [type=>'select','options'=>[0=>['title'=>'Spain','value'=>'ES'],1=>['title'=>'France','value'=>'FR']]]
 * list: List of items |count=Number of items in list, default=array with default list of elements |hidden=array with hidden IDs, ie:
 *       [type=>'list','count'=>2',default'=>['Spain','France'],'hidden'=>[0]]
 * text|date|datetime-local|email|number|password|range|tel|time|url
 * opt: Alternative CSS input options, i.e. 'opt'=>['min'=>1,'step'=>'any']
 * 
 *
 */
     



/*
 * Two menus conf page
 * -----------------------------------------------------------------------------
 */

//Menus (icons are mdi by default) - Two option menu (at least one needed)
$cnf['menu'][] = ['icon'=>'gavel','scr'=>'legal_data','title'=>'Legal data'];
$cnf['menu'][] = ['icon'=>'web','scr'=>'web_data','title'=>'WEB info','btn'=>'primary'];


//Config legal data
if ($_scr == 'legal_data') {
    
    $cnf['title'] = 'Legal Data';
    $cnf['icon'] = 'gavel';
    
    $cnf['cnf_cat'] = 'ws';
    $cnf['cnf_key'] = 'legal_data';

    $cnf['item'][] = ['name'=>'owner','title'=>'Company name','type'=>'text'];
    $cnf['item'][] = ['name'=>'address','title'=>'Address','type'=>'text'];
    $cnf['item'][] = ['name'=>'taxid','title'=>'TAX ID','type'=>'text'];
    $cnf['item'][] = ['name'=>'phone','title'=>'Phone No','type'=>'text'];
    $cnf['item'][] = ['name'=>'email_main','title'=>'eMail General','type'=>'email'];
    $cnf['item'][] = ['name'=>'email_privacy','title'=>'eMail privacy','type'=>'email'];
}


//Config WEB data
if ($_scr == 'web_data') {
    
    $cnf['title'] = 'WEB data';
    $cnf['icon'] = 'web';
    
    $cnf['cnf_cat'] = 'ws';
    $cnf['cnf_key'] = 'web_data';

    $cnf['item'][] = ['name'=>'users','title'=>'Company users','type'=>'number'];
    $cnf['item'][] = ['name'=>'founding_year','title'=>'Founding year','type'=>'date'];
}

//Show conf menu
$wv->panel->showPanel($cnf);



/*
 * Examples of menu types
 * -----------------------------------------------------------------------------
 */

//Select example:
$opt[0] = ['title'=>'None','value'=>'0'];
$opt[1] = ['title'=>'By price','value'=>'1'];
$opt[2] = ['title'=>'By shipping','value'=>'2'];
$cnf['item'][] = ['name'=>'item_name','title'=>'Shipping type',
                      'type'=>'select','options'=>$opt];
    

//Radio example:
$opt[0] = ['title'=>'None','value'=>'0'];
$opt[1] = ['title'=>'By price','value'=>'1'];
$opt[2] = ['title'=>'By shipping','value'=>'2'];
$cnf['item'][] = ['name'=>'item_name','title'=>'Shipping type',
                  'type'=>'radio','options'=>$opt];

    
//List example:
$cnf['item'][] = ['name'=>'colors','title'=>'Colors','type'=>'list','count'=>3,
                  'default'=>['Red','Blue','Yellow'],'readonly'=>true];
    

//Cat example:
$cnf['item'][] = ['type'=>'cat','title'=>'CATEGORY TEXT'];

  
//checkbox example:
$cnf['item'][] = ['name'=>'freeship','title'=>'Free shipping',
                  'type'=>'checkbox'];

    
//Number example:
$cnf['item'][] = ['name'=>'price','title'=>'Price',
                  'scale'=>'&eur;','type'=>'number',
                  'opt'=>['min'=>0,'step'=>'any']];

    
//Text example:
$cnf['item'][] = ['name'=>'country_list',
                  'title'=>'Countries to ship to',
                  'type'=>'text','scale'=>'ISO code comma separated'];

//Number example:
$cnf['item'][] = ['name'=>'shipping_price',
                  'title'=>'Shipping Price',
                  'type'=>'number','opt'=>['min'=>0,'step'=>'any']];