За последние 24 часа нас посетили 17626 программистов и 1671 робот. Сейчас ищут 1487 программистов ...

Не могу решить проблему с форумом LogicBoard 4.0 DLE Edition

Тема в разделе "Сделайте за меня", создана пользователем softwox, 16 апр 2015.

  1. softwox

    softwox Новичок

    С нами с:
    16 апр 2015
    Сообщения:
    1
    Симпатии:
    0
    По инструкции дошёл до 8го пункта [​IMG] , вставляю код и редактор обнаруживает ошибку [​IMG] . Помогите решить проблему, в PHP не разбираюсь. Вот код:
    Код (Text):
    1. <?php
    2. /*
    3. =====================================================
    4.  DataLife Engine - by SoftNews Media Group
    5. -----------------------------------------------------
    6.  http://dle-news.ru/
    7. -----------------------------------------------------
    8.  Copyright (c) 2004,2014 SoftNews Media Group
    9. =====================================================
    10.  Данный код защищен авторскими правами
    11. =====================================================
    12.  Файл: usergroup.php
    13. -----------------------------------------------------
    14.  Назначение: Настройка групп пользователей
    15. =====================================================
    16. */
    17. if( !defined( 'DATALIFEENGINE' ) OR !defined( 'LOGGED_IN' ) ) {
    18.     die( "Hacking attempt!" );
    19. }
    20.  
    21. if( $member_id['user_group'] != 1 ) {
    22.     msg( "error", $lang['addnews_denied'], $lang['db_denied'] );
    23. }
    24.  
    25. function clear_html( $txt ) {
    26.  
    27.     if(!$txt) return;
    28.  
    29.     $find = array ('/data:/i', '/about:/i', '/vbscript:/i', '/onclick/i', '/onload/i', '/onunload/i', '/onabort/i', '/onerror/i', '/onblur/i', '/onchange/i', '/onfocus/i', '/onreset/i', '/onsubmit/i', '/ondblclick/i', '/onkeydown/i', '/onkeypress/i', '/onkeyup/i', '/onmousedown/i', '/onmouseup/i', '/onmouseover/i', '/onmouseout/i', '/onselect/i', '/javascript/i', '/javascript/i' );
    30.     $replace = array ("d&#097;ta:", "&#097;bout:", "vbscript<b></b>:", "&#111;nclick", "&#111;nload", "&#111;nunload", "&#111;nabort", "&#111;nerror", "&#111;nblur", "&#111;nchange", "&#111;nfocus", "&#111;nreset", "&#111;nsubmit", "&#111;ndblclick", "&#111;nkeydown", "&#111;nkeypress", "&#111;nkeyup", "&#111;nmousedown", "&#111;nmouseup", "&#111;nmouseover", "&#111;nmouseout", "&#111;nselect", "j&#097;vascript" );
    31.  
    32.     $txt = preg_replace( $find, $replace, $txt );
    33.     $txt = preg_replace( "#<iframe#i", "&lt;iframe", $txt );
    34.     $txt = preg_replace( "#<script#i", "&lt;script", $txt );
    35.     $txt = str_replace( "<?", "&lt;?", $txt );
    36.     $txt = str_replace( "?>", "?&gt;", $txt );
    37.  
    38.     return $txt;
    39.  
    40. }
    41.  
    42. if( $action == "del" ) {
    43.    
    44.     if( $_REQUEST['user_hash'] == "" or $_REQUEST['user_hash'] != $dle_login_hash ) {
    45.        
    46.         die( "Hacking attempt! User not found" );
    47.    
    48.     }
    49.    
    50.     $id = intval( $_REQUEST['id'] );
    51.     $grouplevel = intval( $_REQUEST['grouplevel'] );
    52.    
    53.     if( $id < 6 ) msg( "error", $lang['addnews_error'], $lang['group_notdel'], "$PHP_SELF?mod=usergroup" );
    54.    
    55.     $db->query( "INSERT INTO " . USERPREFIX . "_admin_logs (name, date, ip, action, extras) values ('".$db->safesql($member_id['name'])."', '{$_TIME}', '{$_IP}', '75', '{$id}')" );
    56.  
    57.     $row = $db->super_query( "SELECT count(*) as count FROM " . USERPREFIX . "_users WHERE user_group='{$id}'" );
    58.    
    59.     if( ! $row['count'] ) {
    60.        
    61.        ########### Start. LogicBoard (DLE Edition) - ShapeShifter ###########
    62.        
    63.        $action_logicboard['group_edit'] = 2;
    64.        include ENGINE_DIR . '/modules/logicboard/group_edit.php';
    65.        
    66.        ########### End. LogicBoard (DLE Edition) - ShapeShifter ###########
    67.        
    68.         $db->query( "DELETE FROM " . USERPREFIX . "_usergroups WHERE id = '{$id}'" );
    69.         @unlink( ENGINE_DIR . '/cache/system/usergroup.php' );
    70.         clear_cache();
    71.         msg( "info", $lang['all_info'], $lang['group_del'], "$PHP_SELF?mod=usergroup" );
    72.     } else {
    73.         if( $grouplevel and $grouplevel != $id ) {
    74.          
    75.           ########### Start. LogicBoard (DLE Edition) - ShapeShifter ###########
    76.        
    77.             $action_logicboard['group_edit'] = 2;
    78.             include ENGINE_DIR . '/modules/logicboard/group_edit.php';
    79.        
    80.           ########### End. LogicBoard (DLE Edition) - ShapeShifter ###########
    81.          
    82.             $db->query( "UPDATE " . USERPREFIX . "_users set user_group='{$grouplevel}' WHERE user_group='{$id}'" );
    83.             $db->query( "DELETE FROM " . USERPREFIX . "_usergroups WHERE id = '{$id}'" );
    84.             @unlink( ENGINE_DIR . '/cache/system/usergroup.php' );
    85.             clear_cache();
    86.             msg( "info", $lang['all_info'], $lang['group_del'], "$PHP_SELF?mod=usergroup" );
    87.         } else
    88.             msg( "info", $lang['all_info'], "<form action=\"\" method=\"post\">{$lang['group_move']} <select class=\"uniform\" name=\"grouplevel\">" . get_groups( 4 ) . "</select> <input class=\"btn btn-blue\" type=\"submit\" value=\"{$lang['b_start']}\"></form>", "$PHP_SELF?mod=usergroup" );
    89.     }
    90.  
    91. } elseif( $action == "selectgroup" ) {
    92.  
    93.     msg( "info", $lang['all_info'], "<form action=\"\" method=\"get\"><input type=\"hidden\" name=\"mod\" value=\"usergroup\"><input type=\"hidden\" name=\"action\" value=\"add\">{$lang['group_select']} <select class=\"uniform\" name=\"id\">" . get_groups( 4 ) . "</select> <input class=\"btn btn-blue\" type=\"submit\" value=\"{$lang['b_start']}\"></form>", "$PHP_SELF?mod=usergroup" );
    94.  
    95. } elseif( $action == "doadd" OR $action == "doedit" ) {
    96.    
    97.     if( $_REQUEST['user_hash'] == "" or $_REQUEST['user_hash'] != $dle_login_hash ) {
    98.        
    99.         die( "Hacking attempt! User not found" );
    100.    
    101.     }
    102.    
    103.     if( ! count( $_REQUEST['allow_cats'] ) ) $_REQUEST['allow_cats'][] = "all";
    104.     if( ! count( $_REQUEST['cat_add'] ) ) $_REQUEST['cat_add'][] = "all";
    105.     if( ! count( $_REQUEST['cat_allow_addnews'] ) ) $_REQUEST['cat_allow_addnews'][] = "all";
    106.  
    107.     $group_name = $db->safesql( strip_tags( clear_html($_REQUEST['group_name']) ) );
    108.     $group_icon = $db->safesql( strip_tags( clear_html($_REQUEST['group_icon']) ) );
    109.     $files_type = $db->safesql( strip_tags( clear_html($_REQUEST['files_type']) ) );
    110.  
    111.     $group_prefix = $db->safesql( trim( clear_html($_REQUEST['group_prefix']) ) );
    112.     $group_suffix = $db->safesql( trim( clear_html($_REQUEST['group_suffix']) ) );
    113.  
    114.     $allow_cats = $db->safesql( clear_html(implode( ',', $_REQUEST['allow_cats']) ) );
    115.     $cat_add = $db->safesql( clear_html(implode( ',', $_REQUEST['cat_add']) ) );
    116.     $cat_allow_addnews = $db->safesql( clear_html(implode( ',', $_REQUEST['cat_allow_addnews']) ) );
    117.    
    118.     $allow_admin = intval( $_REQUEST['allow_admin'] );
    119.     $allow_offline = intval( $_REQUEST['allow_offline'] );
    120.     $allow_main = intval( $_REQUEST['allow_main'] );
    121.     $allow_adds = intval( $_REQUEST['allow_adds'] );
    122.     $moderation = intval( $_REQUEST['moderation'] );
    123.     $allow_edit = intval( $_REQUEST['allow_edit'] );
    124.     $allow_all_edit = intval( $_REQUEST['allow_all_edit'] );
    125.     $allow_addc = intval( $_REQUEST['allow_addc'] );
    126.     $allow_editc = intval( $_REQUEST['allow_editc'] );
    127.     $allow_delc = intval( $_REQUEST['allow_delc'] );
    128.     $edit_allc = intval( $_REQUEST['edit_allc'] );
    129.     $del_allc = intval( $_REQUEST['del_allc'] );
    130.     $allow_hide = intval( $_REQUEST['allow_hide'] );
    131.     $allow_pm = intval( $_REQUEST['allow_pm'] );
    132.     $allow_vote = intval( $_REQUEST['allow_vote'] );
    133.     $allow_files = intval( $_REQUEST['allow_files'] );
    134.     $allow_feed = intval( $_REQUEST['allow_feed'] );
    135.     $allow_search = intval( $_REQUEST['allow_search'] );
    136.     $allow_rating = intval( $_REQUEST['allow_rating'] );
    137.     $max_pm = intval( $_REQUEST['max_pm'] );
    138.     $max_foto = $db->safesql( $_REQUEST['max_foto'] );
    139.     $allow_short = intval( $_REQUEST['allow_short'] );
    140.     $time_limit = intval( $_REQUEST['time_limit'] );
    141.     $rid = intval( $_REQUEST['rid'] );
    142.     $allow_fixed = intval( $_REQUEST['allow_fixed'] );
    143.     $allow_poll = intval( $_REQUEST['allow_poll'] );
    144.     $captcha = intval( $_REQUEST['captcha'] );
    145.     $allow_modc = intval( $_REQUEST['allow_modc'] );
    146.     $max_signature = intval( $_REQUEST['max_signature'] );
    147.     $max_info = intval( $_REQUEST['max_info'] );
    148.     $admin_addnews = intval( $_REQUEST['admin_addnews'] );
    149.     $admin_editnews = intval( $_REQUEST['admin_editnews'] );
    150.     $admin_comments = intval( $_REQUEST['admin_comments'] );
    151.     $admin_categories = intval( $_REQUEST['admin_categories'] );
    152.     $admin_editusers = intval( $_REQUEST['admin_editusers'] );
    153.     $admin_wordfilter = intval( $_REQUEST['admin_wordfilter'] );
    154.     $admin_xfields = intval( $_REQUEST['admin_xfields'] );
    155.     $admin_userfields = intval( $_REQUEST['admin_userfields'] );
    156.     $admin_static = intval( $_REQUEST['admin_static'] );
    157.     $admin_editvote = intval( $_REQUEST['admin_editvote'] );
    158.     $admin_newsletter = intval( $_REQUEST['admin_newsletter'] );
    159.     $admin_blockip = intval( $_REQUEST['admin_blockip'] );
    160.     $admin_banners = intval( $_REQUEST['admin_banners'] );
    161.     $admin_rss = intval( $_REQUEST['admin_rss'] );
    162.     $admin_iptools = intval( $_REQUEST['admin_iptools'] );
    163.     $admin_rssinform = intval( $_REQUEST['admin_rssinform'] );
    164.     $admin_googlemap = intval( $_REQUEST['admin_googlemap'] );
    165.     $admin_tagscloud = intval( $_REQUEST['admin_tagscloud'] );
    166.     $admin_complaint = intval( $_REQUEST['admin_complaint'] );
    167.     $allow_html = intval( $_REQUEST['allow_html'] );
    168.     $allow_image_size = intval( $_REQUEST['allow_image_size'] );
    169.     $allow_image_upload = intval( $_REQUEST['allow_image_upload'] );
    170.     $allow_file_upload = intval( $_REQUEST['allow_file_upload'] );
    171.     $allow_signature = intval( $_REQUEST['allow_signature'] );
    172.     $allow_url = intval( $_REQUEST['allow_url'] );
    173.     $allow_image = intval( $_REQUEST['allow_image'] );
    174.     $news_sec_code = intval( $_REQUEST['news_sec_code'] );
    175.     $allow_subscribe = intval( $_REQUEST['allow_subscribe'] );
    176.     $flood_news = intval( $_REQUEST['flood_news'] );
    177.     $max_day_news = intval( $_REQUEST['max_day_news'] );
    178.     $force_leech = intval( $_REQUEST['force_leech'] );
    179.     $edit_limit = intval( $_REQUEST['edit_limit'] );
    180.     $captcha_pm = intval( $_REQUEST['captcha_pm'] );
    181.     $max_pm_day = intval( $_REQUEST['max_pm_day'] );
    182.     $max_comment_day = intval( $_REQUEST['max_comment_day'] );
    183.     $max_mail_day = intval( $_REQUEST['max_mail_day'] );
    184.     $comments_question = intval( $_REQUEST['comments_question'] );
    185.     $news_question = intval( $_REQUEST['news_question'] );
    186.     $max_images = intval( $_REQUEST['max_images'] );
    187.     $max_files = intval( $_REQUEST['max_files'] );
    188.     $disable_news_captcha = intval( $_REQUEST['disable_news_captcha'] );
    189.     $disable_comments_captcha = intval( $_REQUEST['disable_comments_captcha'] );
    190.     $pm_question = intval( $_REQUEST['pm_question'] );
    191.     $captcha_feedback = intval( $_REQUEST['captcha_feedback'] );
    192.     $feedback_question = intval( $_REQUEST['feedback_question'] );
    193.     $max_file_size = intval( $_REQUEST['max_file_size'] );
    194.     $files_max_speed = intval( $_REQUEST['files_max_speed'] );
    195.     $allow_lostpassword = intval( $_REQUEST['allow_lostpassword'] );
    196.     $spamfilter = intval( $_REQUEST['spamfilter'] );
    197.  
    198.     if( $group_name == "" ) msg( "error", $lang['addnews_error'], $lang['group_err1'], "$PHP_SELF?mod=usergroup&action=add" );
    199.    
    200.     @unlink( ENGINE_DIR . '/cache/system/usergroup.php' );
    201.    
    202.     if( $action == "doadd" ) {
    203.         $db->query( "INSERT INTO " . USERPREFIX . "_usergroups (group_name, allow_cats, allow_adds, cat_add, allow_admin, allow_addc, allow_editc, allow_delc, edit_allc, del_allc, moderation, allow_all_edit, allow_edit, allow_pm, max_pm, max_foto, allow_files, allow_hide, allow_short, time_limit, rid, allow_fixed, allow_feed, allow_search, allow_poll, allow_main, captcha, icon, allow_modc, allow_rating, allow_offline, allow_image_upload, allow_file_upload, allow_signature, allow_url, news_sec_code, allow_image, max_signature, max_info, admin_addnews, admin_editnews, admin_comments, admin_categories, admin_editusers, admin_wordfilter, admin_xfields, admin_userfields, admin_static, admin_editvote, admin_newsletter, admin_blockip, admin_banners, admin_rss, admin_iptools, admin_rssinform, admin_googlemap, allow_html, group_prefix, group_suffix, allow_subscribe, allow_image_size, cat_allow_addnews, flood_news, max_day_news, force_leech, edit_limit, captcha_pm, max_pm_day, max_mail_day, admin_tagscloud, allow_vote, admin_complaint, news_question, comments_question, max_comment_day, max_images, max_files, disable_news_captcha, disable_comments_captcha, pm_question, captcha_feedback, feedback_question, files_type, max_file_size, files_max_speed, allow_lostpassword, spamfilter) values ('$group_name', '$allow_cats', '$allow_adds', '$cat_add', '$allow_admin', '$allow_addc', '$allow_editc', '$allow_delc', '$edit_allc', '$del_allc', '$moderation', '$allow_all_edit', '$allow_edit', '$allow_pm', '$max_pm', '$max_foto', '$allow_files', '$allow_hide', '$allow_short', '$time_limit', '$rid', '$allow_fixed', '$allow_feed', '$allow_search', '$allow_poll', '$allow_main', '$captcha', '$group_icon', '$allow_modc', '$allow_rating', '$allow_offline', '$allow_image_upload', '$allow_file_upload', '$allow_signature', '$allow_url', '$news_sec_code', '$allow_image', '$max_signature', '$max_info', '$admin_addnews', '$admin_editnews', '$admin_comments', '$admin_categories', '$admin_editusers', '$admin_wordfilter', '$admin_xfields', '$admin_userfields', '$admin_static', '$admin_editvote', '$admin_newsletter', '$admin_blockip', '$admin_banners', '$admin_rss', '$admin_iptools', '$admin_rssinform', '$admin_googlemap', '$allow_html', '$group_prefix', '$group_suffix', '$allow_subscribe', '$allow_image_size', '$cat_allow_addnews', '$flood_news', '$max_day_news', '$force_leech', '$edit_limit', '$captcha_pm', '$max_pm_day', '$max_mail_day', '$admin_tagscloud', '$allow_vote', '$admin_complaint', '$news_question', '$comments_question', '$max_comment_day', '$max_images', '$max_files', '$disable_news_captcha', '$disable_comments_captcha', '$pm_question', '$captcha_feedback', '$feedback_question', '$files_type', '$max_file_size', '$files_max_speed', '$allow_lostpassword', '$spamfilter')" );
    204.        
    205.         ########### Start. LogicBoard (DLE Edition) - ShapeShifter ###########
    206.        
    207.         $new_group = $db->insert_id();
    208.         $action_logicboard['group_edit'] = 1;
    209.         include ENGINE_DIR . '/modules/logicboard/group_edit.php';
    210.        
    211.         ########### End. LogicBoard (DLE Edition) - ShapeShifter ###########
    212.        
    213.         $db->query( "INSERT INTO " . USERPREFIX . "_admin_logs (name, date, ip, action, extras) values ('".$db->safesql($member_id['name'])."', '{$_TIME}', '{$_IP}', '76', '{$group_name}')" );
    214.         msg( "info", $lang['all_info'], $lang['group_ok1'], "$PHP_SELF?mod=usergroup" );
    215.     } else {
    216.         $id = intval( $_REQUEST['id'] );
    217.         if( $id == 1 ) $allow_admin = 1;
    218.         if( $id == 4 OR  $id == 5) $allow_admin = 0;
    219.         $db->query( "UPDATE " . USERPREFIX . "_usergroups SET group_name='$group_name', allow_cats='$allow_cats', allow_adds='$allow_adds', cat_add='$cat_add', allow_admin='$allow_admin', allow_addc='$allow_addc', allow_editc='$allow_editc', allow_delc='$allow_delc', edit_allc='$edit_allc', del_allc='$del_allc', moderation='$moderation', allow_all_edit='$allow_all_edit', allow_edit='$allow_edit', allow_pm='$allow_pm', max_pm='$max_pm', max_foto='$max_foto', allow_files='$allow_files', allow_hide='$allow_hide', allow_short='$allow_short', time_limit='$time_limit', rid='$rid', allow_fixed='$allow_fixed', allow_feed='$allow_feed', allow_search='$allow_search', allow_poll='$allow_poll', allow_main='$allow_main', captcha='$captcha', icon='$group_icon', allow_modc='$allow_modc', allow_rating='$allow_rating', allow_offline='$allow_offline', allow_image_upload='$allow_image_upload', allow_file_upload='$allow_file_upload', allow_signature='$allow_signature', allow_url='$allow_url', news_sec_code='$news_sec_code', allow_image='$allow_image', max_signature='$max_signature', max_info='$max_info', admin_addnews='$admin_addnews', admin_editnews='$admin_editnews', admin_comments='$admin_comments', admin_categories='$admin_categories', admin_editusers='$admin_editusers', admin_wordfilter='$admin_wordfilter', admin_xfields='$admin_xfields', admin_userfields='$admin_userfields', admin_static='$admin_static', admin_editvote='$admin_editvote', admin_newsletter='$admin_newsletter', admin_blockip='$admin_blockip', admin_banners='$admin_banners', admin_rss='$admin_rss', admin_iptools='$admin_iptools', admin_rssinform='$admin_rssinform', admin_googlemap='$admin_googlemap', allow_html='$allow_html', group_prefix='$group_prefix', group_suffix='$group_suffix', allow_subscribe='$allow_subscribe', allow_image_size='$allow_image_size', cat_allow_addnews='$cat_allow_addnews', flood_news='$flood_news', max_day_news='$max_day_news', force_leech='$force_leech', edit_limit='$edit_limit', captcha_pm='$captcha_pm', max_pm_day='$max_pm_day', max_mail_day='$max_mail_day', admin_tagscloud='$admin_tagscloud', allow_vote='$allow_vote', admin_complaint='$admin_complaint', news_question='$news_question', comments_question='$comments_question', max_comment_day='$max_comment_day', max_images='$max_images', max_files='$max_files', disable_news_captcha='$disable_news_captcha', disable_comments_captcha='$disable_comments_captcha', pm_question='$pm_question', captcha_feedback='$captcha_feedback', feedback_question='$feedback_question', files_type='$files_type', max_file_size='$max_file_size', files_max_speed='$files_max_speed', allow_lostpassword='$allow_lostpassword', spamfilter='$spamfilter' WHERE id='{$id}'" );
    220.         $db->query( "INSERT INTO " . USERPREFIX . "_admin_logs (name, date, ip, action, extras) values ('".$db->safesql($member_id['name'])."', '{$_TIME}', '{$_IP}', '77', '{$group_name}')" );
    221.         msg( "info", $lang['all_info'], $lang['group_ok2'], "$PHP_SELF?mod=usergroup" );
    222.     }
    223.     clear_cache();
    224. } elseif( $action == "add" or $action == "edit" ) {
    225.  
    226.     $id = intval( $_REQUEST['id'] );
    227.  
    228.     if (!$user_group[$id]['group_name']) {
    229.         msg( "error", $lang['addnews_error'], $lang['group_err2'], "javascript:history.go(-1)" );
    230.     }
    231.  
    232.     echoheader( "<i class=\"icon-user\"></i>".$lang['header_groups'], $lang['header_groups_1'] );
    233.    
    234.     if( ! $config['allow_cmod'] ) $warning = "<br /><font color=\"red\">" . $lang['modul_offline'] . "</font>";
    235.     else $warning = "";
    236.  
    237.     if( ! $config['allow_subscribe'] ) $warning_1 = "<br /><font color=\"red\">" . $lang['modul_offline_1'] . "</font>";
    238.     else $warning_1 = "";
    239.  
    240.     $group_prefix_value = htmlspecialchars( stripslashes( $user_group[$id]['group_prefix'] ), ENT_QUOTES, $config['charset'] );
    241.     $group_suffix_value = htmlspecialchars( stripslashes( $user_group[$id]['group_suffix'] ), ENT_QUOTES, $config['charset'] );
    242.     $files_type_value = htmlspecialchars( stripslashes( $user_group[$id]['files_type'] ), ENT_QUOTES, $config['charset'] );
    243.        
    244.     if( $user_group[$id]['allow_offline'] ) $allow_offline = "checked";
    245.     if( $user_group[$id]['allow_admin'] ) $allow_admin = "checked";
    246.     if( $user_group[$id]['allow_adds'] ) $allow_adds = "checked";
    247.     if( $user_group[$id]['moderation'] ) $moderation = "checked";
    248.     if( $user_group[$id]['allow_edit'] ) $allow_edit = "checked";
    249.     if( $user_group[$id]['allow_all_edit'] ) $allow_all_edit = "checked";
    250.     if( $user_group[$id]['allow_addc'] ) $allow_addc = "checked";
    251.     if( $user_group[$id]['allow_editc'] ) $allow_editc = "checked";
    252.     if( $user_group[$id]['allow_delc'] ) $allow_delc = "checked";
    253.     if( $user_group[$id]['edit_allc'] ) $edit_allc = "checked";
    254.     if( $user_group[$id]['del_allc'] ) $del_allc = "checked";
    255.     if( $user_group[$id]['allow_hide'] ) $allow_hide = "checked";
    256.     if( $user_group[$id]['allow_pm'] ) $allow_pm = "checked";
    257.     if( $user_group[$id]['allow_vote'] ) $allow_vote = "checked";
    258.     if( $user_group[$id]['allow_files'] ) $allow_files = "checked";
    259.     if( $user_group[$id]['allow_feed'] ) $allow_feed = "checked";
    260.     if( $user_group[$id]['allow_search'] ) $allow_search = "checked";
    261.     if( $user_group[$id]['allow_rating'] ) $allow_rating = "checked";
    262.     if( $user_group[$id]['allow_short'] ) $allow_short = "checked";
    263.     if( $user_group[$id]['time_limit'] ) $time_limit = "checked";
    264.     if( $user_group[$id]['allow_fixed'] ) $allow_fixed = "checked";
    265.     if( $user_group[$id]['allow_poll'] ) $allow_poll = "checked";
    266.     if( $user_group[$id]['allow_main'] ) $allow_main = "checked";
    267.     if( $user_group[$id]['captcha'] ) $allow_captcha = "checked";
    268.     if( $user_group[$id]['captcha_pm'] ) $allow_captcha_pm = "checked";
    269.     if( $user_group[$id]['allow_modc'] ) $allow_modc = "checked";
    270.     if( $user_group[$id]['allow_image_upload'] ) $allow_image_upload = "checked";
    271.     if( $user_group[$id]['allow_file_upload'] ) $allow_file_upload = "checked";
    272.     if( $user_group[$id]['allow_signature'] ) $allow_signature = "checked";
    273.     if( $user_group[$id]['allow_url'] ) $allow_url = "checked";
    274.     if( $user_group[$id]['allow_image'] ) $allow_image = "checked";
    275.     if( $user_group[$id]['news_sec_code'] ) $news_sec_code = "checked";
    276.     if( $user_group[$id]['admin_addnews'] ) $admin_addnews = "checked";
    277.     if( $user_group[$id]['admin_editnews'] ) $admin_editnews = "checked";
    278.     if( $user_group[$id]['admin_comments'] ) $admin_comments = "checked";
    279.     if( $user_group[$id]['admin_categories'] ) $admin_categories = "checked";
    280.     if( $user_group[$id]['admin_editusers'] ) $admin_editusers = "checked";
    281.     if( $user_group[$id]['admin_wordfilter'] ) $admin_wordfilter = "checked";
    282.     if( $user_group[$id]['admin_xfields'] ) $admin_xfields = "checked";
    283.     if( $user_group[$id]['admin_userfields'] ) $admin_userfields = "checked";
    284.     if( $user_group[$id]['admin_static'] ) $admin_static = "checked";
    285.     if( $user_group[$id]['admin_editvote'] ) $admin_editvote = "checked";
    286.     if( $user_group[$id]['admin_newsletter'] ) $admin_newsletter = "checked";
    287.     if( $user_group[$id]['admin_blockip'] ) $admin_blockip = "checked";
    288.     if( $user_group[$id]['admin_banners'] ) $admin_banners = "checked";
    289.     if( $user_group[$id]['admin_rss'] ) $admin_rss = "checked";
    290.     if( $user_group[$id]['admin_iptools'] ) $admin_iptools = "checked";
    291.     if( $user_group[$id]['admin_rssinform'] ) $admin_rssinform = "checked";
    292.     if( $user_group[$id]['admin_googlemap'] ) $admin_googlemap = "checked";
    293.     if( $user_group[$id]['allow_html'] ) $allow_html = "checked";
    294.     if( $user_group[$id]['allow_subscribe'] ) $allow_subscribe = "checked";
    295.     if( $user_group[$id]['allow_image_size'] ) $allow_image_size = "checked";
    296.     if( $user_group[$id]['force_leech'] ) $force_leech = "checked";
    297.     if( $user_group[$id]['admin_tagscloud'] ) $admin_tagscloud = "checked";
    298.     if( $user_group[$id]['admin_complaint'] ) $admin_complaint = "checked";
    299.     if( $user_group[$id]['comments_question'] ) $comments_question = "checked";
    300.     if( $user_group[$id]['news_question'] ) $news_question = "checked";
    301.     if( $user_group[$id]['pm_question'] ) $pm_question = "checked";
    302.     if( $user_group[$id]['captcha_feedback'] ) $captcha_feedback = "checked";
    303.     if( $user_group[$id]['feedback_question'] ) $feedback_question = "checked";
    304.     if( $user_group[$id]['allow_lostpassword'] ) $allow_lostpassword = "checked";
    305.    
    306.     if( $id == 1 ) $admingroup = "disabled";
    307.     if( $id == 5 ) $gastgroup = "disabled";
    308.     $group_list = get_groups( $user_group[$id]['rid'] );
    309.  
    310.     $spamfilter_sel = array ('0' => '', '1' => '', '2' => '', '3' => '' );
    311.     $spamfilter_sel[$user_group[$id]['spamfilter']] = 'selected="selected"';
    312.        
    313.     if( $user_group[$id]['allow_cats'] == "all" ) $allow_cats_value = "selected";
    314.     $categories_list = CategoryNewsSelection( explode( ',', $user_group[$id]['allow_cats'] ), 0, false );
    315.        
    316.     if( $user_group[$id]['cat_add'] == "all" ) $cat_add_value = "selected";
    317.     if( $user_group[$id]['cat_allow_addnews'] == "all" ) $cat_allow_addnews_value = "selected";
    318.  
    319.     $cat_add_list = CategoryNewsSelection( explode( ',', $user_group[$id]['cat_add'] ), 0, false );
    320.     $cat_allow_addnews_list = CategoryNewsSelection( explode( ',', $user_group[$id]['cat_allow_addnews'] ), 0, false );
    321.    
    322.     $max_pm_value = $user_group[$id]['max_pm'];
    323.     $max_foto_value = $user_group[$id]['max_foto'];
    324.     $max_signature_value = $user_group[$id]['max_signature'];
    325.     $max_info_value = $user_group[$id]['max_info'];
    326.     $max_pm_day_value = $user_group[$id]['max_pm_day'];
    327.     $max_comment_day_value = $user_group[$id]['max_comment_day'];
    328.     $max_mail_day_value = $user_group[$id]['max_mail_day'];
    329.     $flood_news_value = $user_group[$id]['flood_news'];
    330.     $max_images_value = $user_group[$id]['max_images'];
    331.     $max_files_value = $user_group[$id]['max_files'];
    332.     $max_day_news_value = $user_group[$id]['max_day_news'];
    333.     $edit_limit_value = $user_group[$id]['edit_limit'];
    334.     $disable_comments_captcha_value = $user_group[$id]['disable_comments_captcha'];
    335.     $disable_news_captcha_value = $user_group[$id]['disable_news_captcha'];
    336.     $max_file_size_value = $user_group[$id]['max_file_size'];
    337.     $files_max_speed_value = $user_group[$id]['files_max_speed'];
    338.    
    339.     if( $action == "add" ) {
    340.         $submit_value = $lang['group_new'];
    341.         $form_title = $lang['group_new1'];
    342.         $form_action = "$PHP_SELF?mod=usergroup&amp;action=doadd";
    343.        
    344.         $group_name_value = "";
    345.         $group_icon_value = "";
    346.    
    347.     } else {
    348.    
    349.         $group_name_value = htmlspecialchars( stripslashes( $user_group[$id]['group_name'] ), ENT_QUOTES, $config['charset'] );
    350.         $group_icon_value = htmlspecialchars( stripslashes( $user_group[$id]['icon'] ), ENT_QUOTES, $config['charset'] );
    351.        
    352.         $form_title = $lang['group_edit1'] . $group_name_value;
    353.         $form_action = "$PHP_SELF?mod=usergroup&amp;action=doedit&amp;id=" . $id;
    354.         $submit_value = $lang['group_edit'];
    355.    
    356.     }
    357.  
    358.     echo <<<HTML
    359. <script type="text/javascript">
    360.     $(function(){
    361.         $('[data-toggle="tab"]').on('shown.bs.tab', function(e) {
    362.           var id;
    363.           id = $(e.target).attr("href");
    364.           $(id).find(".cat_select").chosen({allow_single_deselect:true, no_results_text: '{$lang['addnews_cat_fault']}'});
    365.         });
    366.     });
    367. </script>
    368. <form action="{$form_action}" method="post">
    369. <input type="hidden" name="user_hash" value="{$dle_login_hash}" />
    370. <div class="box">
    371.        
    372.             <div class="box-header">
    373.                 <ul class="nav nav-tabs nav-tabs-left">
    374.                     <li class="active"><a href="#tabhome" data-toggle="tab"><i class="icon-home"></i> {$lang['tabs_gr_all']}</a></li>
    375.                     <li><a href="#tabnews" data-toggle="tab"><i class="icon-file-alt"></i> {$lang['tabs_gr_news']}</a></li>
    376.                     <li><a href="#tabcomments" data-toggle="tab"><i class="icon-pencil"></i> {$lang['tabs_gr_comments']}</a></li>
    377.                     <li><a href="#tabcaptcha" data-toggle="tab"><i class="icon-lock"></i> {$lang['tabs_gr_cap']}</a></li>
    378.                     <li><a href="#tabadmin" data-toggle="tab"><i class="icon-dashboard"></i> {$lang['tabs_gr_admin']}</a></li>
    379.                 </ul>
    380.                 <ul class="box-toolbar">
    381.                   <li class="toolbar-link">
    382.                       <a href="#"><i class="icon-info-sign"></i> {$form_title}</a>
    383.                   </li>
    384.                 </ul>
    385.             </div>
    386.            
    387.             <div class="box-content">
    388.                  <div class="tab-content">         
    389.                      <div class="tab-pane active" id="tabhome">
    390.                        
    391. <table class="table table-normal table-hover settingsgr">
    392.     <tr>
    393.         <td class="col-xs-10 col-sm-6 col-md-7"><h6>{$lang['group_name']}</h6><span class="note large">{$lang[hint_gtitle]}</span></td>
    394.         <td class="col-xs-2 col-md-5"><input type="text" style="width:100%;" name="group_name" value="{$group_name_value}"></td>
    395.        
    396.         HTML;
    397.  
    398. ########### Start. LogicBoard (DLE Edition) - ShapeShifter ###########
    399.  
    400. if( $action == "add" )
    401. {
    402.     $lb_list = "";
    403.     foreach ($user_group as $value)
    404.     {
    405.         if ($value['id'] == "4")
    406.             $lb_list .= "<option value=\"".$value['id']."\" selected>".$value['group_name']."</option>";
    407.         else
    408.             $lb_list .= "<option value=\"".$value['id']."\">".$value['group_name']."</option>";
    409.     }
    410. echo <<<HTML
    411.  
    412.     <tr><td background="engine/skins/images/mline.gif" height=1 colspan=2></td></tr>
    413.     <tr>
    414.         <td style="padding:4px;" class="option"><b>Маска группы:</b><br /><span class="small">Выберите группу, на основе которой новой группе будут присвоены такие же права на форуме.</span></td>
    415.         <td style="padding-top:2px;padding-bottom:2px;"><select name="group_mask">{$lb_list}</select></td>
    416.     </tr>
    417. HTML;
    418. }  
    419.  
    420. ########### End. LogicBoard (DLE Edition) - ShapeShifter ###########
    421.  
    422. echo <<<HTML
    423.        
    424.         </tr>