Beispiel #1
0
function plug_icons($d)
{
    Head::add('csscode', icons_css());
    Head::add('jscode', icons_js());
    //echo js_code('addjs(\'\',\''.icons_js().'\',\'\')');
    $ret .= lj('popbt', 'popup_plup___icons_icons*edit_new', picto('add'));
    $ret .= btd('cbk', '') . br();
    $ret .= divd('pctpanel', icons_read()) . br();
    $ret .= msqlink('system', 'program_pictos');
    return $ret;
}
         @reset($icon_defined_special);
         while (list($key, $data) = @each($icon_defined_special)) {
             if (isset($lang[$data['lang_key']])) {
                 // reset a prec value
                 if ($icon_defined_special[$key]['icon'] == $icon) {
                     $icon_defined_special[$key]['icon'] = '';
                 }
                 // set the new values
                 if (@in_array($key, $icon_ids)) {
                     $icon_defined_special[$key]['icon'] = $icon;
                 }
             }
         }
         // generate the file
         icons_write();
         icons_read();
         // back to the main list
         $mode = '';
         $submit = false;
     }
 }
 // detail
 if ($mode == 'edit') {
     // template
     $template->set_filenames(array('body' => 'admin_icons_edit_body.tpl'));
     // header
     $template->assign_vars(array('L_TITLE' => $lang['Icons_settings'], 'L_TITLE_EXPLAIN' => $lang['Icons_settings_explain'], 'L_LANG' => $lang['Icons_lang_key'], 'L_LANG_EXPLAIN' => $lang['Icons_lang_key_explain'], 'L_ICON' => $lang['Icons_icon_key'], 'L_ICON_EXPLAIN' => $lang['Icons_icon_key_explain'], 'L_AUTH' => $lang['Icons_auth'], 'L_AUTH_EXPLAIN' => $lang['Icons_auth_explain'], 'L_DEFAULT' => $lang['Icons_defaults'], 'L_DEFAULT_EXPLAIN' => $lang['Icons_defaults_explain'], 'L_SUBMIT' => $lang['Submit'], 'L_REFRESH' => $lang['Refresh'], 'L_CANCEL' => $lang['Cancel']));
     // get the icon url
     $url = $icon_url;
     if (isset($images[$icon_url])) {
         $url = $images[$icon_url];