Вход Регистрация
Файл: monst/core/pag/clan/setting.php
Строк: 99
<?
if ( !$clan OR ( $clan AND $clan['master_id'] != $user['id']) ) {
    
g('/clan');
}

switch ( @
$index[2] ) {
    default:
        if ( 
$clan['master_id'] != $user['id'] ) {
            
g('/clan/' $clan['id']);
        }
        
?>
        <a href='/clan/clanicon'><div class='bt_black'><?=$lang['clan.php']['setting']['link']['clanicon']?></div></a>
        <a href='/clan/setting/info'><div class='bt_black'><?=$lang['clan.php']['setting']['link']['info']?></div></a>

        <a href='/clan/<?=$clan['id']?>'><div class='bt_black'><?=$lang['clan.php']['back']?></div></a>
        <?

    
break;

    case 
'info':
        if ( !empty(
$_POST['save']) ) {
            
$title null_html($_POST['title']);
            
$about null_html($_POST['about']);
            
$clan_not null_html($_POST['clan_not']);

            if ( 
mb_strlen($title'UTF-8') > 100 ) {
                
$title mb_substr($title0100'UTF-8') . '....';
            }

            
$_clan -> update(
                [
                    
'id' => $clan['id']
                ],

                [
                    
'$set' => [
                        
'title' => $title,
                        
'about' => $about,
                        
'clan_not' => $clan_not
                    
]
                ]
            );

            
g('/clan/setting/info?save_ok');
        }

        if ( isset(
$_GET['save_ok']) ) {
            
?>
            <div class='ok_box'>
                <?=$lang['clan.php']['setting']['info']['save_ok']?>
            </div>
            <?
        
}

        
?>
        <div class='padding'>

            <form method='post' action='/clan/setting/info'>
                <input type='hidden' name='save' value='1'/>

                <?=$lang['clan.php']['setting']['info']['title']?>:<br/>
                <div style='text-align: center;'>
                    <textarea name='title' rows='2' style='width: 90%;'><?=$clan['title']?></textarea>
                </div>
                <br/>
                <?=$lang['clan.php']['setting']['info']['about']?>:<br/>
                <div style='text-align: center;'>
                    <textarea name='about' rows='5' style='width: 90%;'><?=$clan['about']?></textarea>
                </div>

                <br/>
                <?=$lang['clan.php']['setting']['info']['clan_not']?>:<br/>
                <div style='text-align: center;'>
                    <textarea name='clan_not' rows='5' style='width: 90%;'><?=$clan['clan_not']?></textarea>
                </div>

                <div style='text-align: center;'>
                    <input type='submit' value='<?=$lang['clan.php']['submit']['save']?>'/>
                </div>
            </form>

        </div>

        <br/>
        <a href='/clan/setting'><div class='bt_black'><?=$lang['clan.php']['back']?></div></a>

        <?
    
break;
}
Онлайн: 1
Реклама