Итак много много долбился но так и не могу причину(за помощь спасибо огромное aj7r)
В user_account.php
PHP:
// SAVE ACCOUNT SETTINGS
if($task == "savemenu")
{
$video = $_POST['video'];
$friends = $_POST['friends'];
$menu_top = $_POST['menu_top'];
$blog = $_POST['blog'];
$ads = $_POST['ads'];
$cash = $_POST['cash'];
$gifts = $_POST['gifts'];
$classfieds = $_POST['classfieds'];
$music = $_POST['music'];
$albums = $_POST['albums'];
$groups = $_POST['groups'];
$pools = $_POST['pools'];
$games = $_POST['games'];
$articles= $_POST['articles'];
$opinions= $_POST['opinions'];
$fans = $_POST['fans'];
$database->database_query("UPDATE se_users SET friends='$friends',video='$video',blog='$blog',ads='$ads',cash='$cash',gifts='$gifts',classfieds='$classfieds',music='$music',fans='$fans',albums='$albums',opinions='$opinions',articles='$articles',games='$games',groups='$groups',pools='$pools', menu_top='$menu_top' WHERE user_id='{$user->user_info['user_id']}'");
// IF USERNAME HAS CHANGED, DELETE OLD RECENT ACTIVITY
if($user->user_info['user_username'] != $user_username) { $database->database_query("DELETE FROM se_actions WHERE action_user_id='{$user->user_info['user_id']}'"); }
// RESET USER INFO
$user = new se_user(Array($user->user_info['user_id']));
// UPDATE COOKIES
$user->user_setcookies();
$result = 191;
}
В базу данных запрос
PHP:
ALTER TABLE `se_users`
ADD `friends` INT( 1 ) NOT NULL DEFAULT '1',
ADD `video` INT( 1 ) NOT NULL DEFAULT '1',
ADD `blog` INT( 1 ) NOT NULL DEFAULT '1',
ADD `ads` INT( 1 ) NOT NULL DEFAULT '1',
ADD `cash` INT( 1 ) NOT NULL DEFAULT '1',
ADD `gifts` INT( 1 ) NOT NULL DEFAULT '1',
ADD `classfieds` INT( 1 ) NOT NULL DEFAULT '1',
ADD `music` INT( 1 ) NOT NULL DEFAULT '1',
ADD `albums` INT( 1 ) NOT NULL DEFAULT '1',
ADD `groups` INT( 1 ) NOT NULL DEFAULT '1',
ADD `pools` INT( 1 ) NOT NULL DEFAULT '1'
Само меню в header.tpl
PHP:
{if $user->user_info.friends == "1"}
{if $setting.setting_connection_allow != 0}
{if $total_friend_requests >0}
<li><a href='user_friends_requests.php'>{lang_print id=1170}
({$total_friend_requests})</a></li>
{else}
<li><a href='user_friends.php'>{lang_print id=1170}
</a></li>{/if}{/if}
{/if}
{if $user->user_info.video == "1"}
<li><a href='user_video.php'>Моё видео</a></li>{/if}
{if $user->user_info.blog == "1"}
<li><a href='user_blog.php'>Мой блог</a></li>{/if}
{if $user->user_info.ads == "1"}
<li><a href='user_campaigns.php'>Моя реклама</a></li>{/if}
{if $user->user_info.cash == "1"}
<li><a href='user_vault.php'>Мой кошелёк</a></li>{/if}
{if $user->user_info.gifts == "1"}
<li><a href='mf_gifts_user.php'>Мои подарки</a></li>{/if}
{if $user->user_info.classfieds == "1"}
<li><a href='user_classified.php'>Мои объявления</a></li>{/if}
{if $user->user_info.music == "1"}
<li><a href='user_music.php'>Моя музыка</a></li>{/if}
{if $user->user_info.albums == "1"}
<li><a href='user_album.php'>Мои альбомы</a></li>{/if}
{if $user->user_info.groups == "1"}
<li><a href='user_group.php'>Мои группы</a></li>{/if}
{if $user->user_info.pools == "1"}
<li><a href='user_poll.php'>Мои опросы</a></li>{/if}
ну и настройки в user_account.tpl
PHP:
<form action='user_account.php' method='post' name='task'>
<table cellpadding='0' cellspacing='0'>
<tr>
<tr>
<td class='form1'>Настройки меню:</td>
<td class='form2'>
<div style='padding: 3px 0px 5px 0px;'>Какие элементы меню стоит показывать?</div>
<table cellpadding='0' cellspacing='0'>
<tr>
<td>
<div class='section demo'>
<div class='leftcol'>
<label><input type='checkbox' onclick="showHide('friends');" name='friends' id='friends' value='1'{if $user->user_info.friends == 1} checked='checked'{/if}></label></td>
<td><label for='friends'>Мои друзья</label></td>
</div></div>
</td>
</tr>
<tr>
<td>
<div class='section demo'>
<div class='leftcol'>
<label><input type='checkbox' onclick="showHide('blog');" name='blog' id='blog' value='1'{if $user->user_info.blog == 1} checked='checked'{/if}></label></td>
<td><label for='blog'>Мой блог</label></td>
</div></div>
</td>
</tr>
<tr>
<td>
<div class='section demo'>
<div class='leftcol'>
<label><input type='checkbox' onclick="showHide('opinions');" name='opinions' id='opinions' value='1'{if $user->user_info.opinions == 1} checked='checked'{/if}></label></td>
<td><label for='opinions'>Мнения</label></td>
</div></div>
</td>
</tr>
<tr>
<td>
<div class='section demo'>
<div class='leftcol'>
<label><input type='checkbox' onclick="showHide('ads');" name='ads' id='ads' value='1'{if $user->user_info.ads == 1} checked='checked'{/if}></label></td>
<td><label for='ads'>Моя реклама</label></td>
</div></div>
</td>
</tr>
<tr>
<td>
<div class='section demo'>
<div class='leftcol'>
<label><input type='checkbox' onclick="showHide('cash');" name='cash' id='cash' value='1'{if $user->user_info.cash == 1} checked='checked'{/if}></label></td>
<td><label for='cash'>Мой кошелёк</label></td>
</div></div>
</td>
</tr>
<tr>
<td>
<div class='section demo'>
<div class='leftcol'>
<label><input type='checkbox' onclick="showHide('gifts');" name='gifts' id='gifts' value='1'{if $user->user_info.gifts == 1} checked='checked'{/if}></label></td>
<td><label for='gifts'>Мои подарки</label></td>
</div></div>
</td>
</tr>
<tr>
<td>
<div class='section demo'>
<div class='leftcol'>
<label><input type='checkbox' onclick="showHide('classfieds');" name='classfieds' id='classfieds' value='1'{if $user->user_info.classfieds == 1} checked='checked'{/if}></label></td>
<td><label for='classfieds'>Мои объявления</label></td>
</div></div>
</td>
</tr>
<tr>
<td>
<div class='section demo'>
<div class='leftcol'>
<label><input type='checkbox' onclick="showHide('music');" name='music' id='music' value='1'{if $user->user_info.music == 1} checked='checked'{/if}></label></td>
<td><label for='music'>Моя музыка</label></td>
</div></div>
</td>
</tr>
<tr>
<td>
<div class='section demo'>
<div class='leftcol'>
<label><input type='checkbox' onclick="showHide('albums');" name='albums' id='albums' value='1'{if $user->user_info.albums == 1} checked='checked'{/if}></label></td>
<td><label for='albums'>Мои альбомы</label></td>
</div></div>
</td>
</tr>
<tr>
<td>
<div class='section demo'>
<div class='leftcol'>
<label><input type='checkbox' onclick="showHide('groups');" name='groups' id='groups' value='1'{if $user->user_info.groups == 1} checked='checked'{/if}></label></td>
<td><label for='groups'>Мои группы</label></td>
</div></div>
</td>
</tr>
<tr>
<td>
<div class='section demo'>
<div class='leftcol'>
<label><input type='checkbox' onclick="showHide('pools');" name='pools' id='pools' value='1'{if $user->user_info.pools == 1} checked='checked'{/if}></label></td>
<td><label for='pools'>Мои опросы</label></td>
</div></div>
</td>
</tr>
<tr>
<td>
<div class='section demo'>
<div class='leftcol'>
<label><input type='checkbox' onclick="showHide('games');" name='games' id='games' value='1'{if $user->user_info.games == 1} checked='checked'{/if}></label></td>
<td><label for='games'>Мои игры</label></td>
</div></div>
</td>
</tr>
<tr>
<td>
<div class='section demo'>
<div class='leftcol'>
<label><input type='checkbox' onclick="showHide('video');" name='video' id='video' value='1'{if $user->user_info.video != 1} checked='checked'{/if}></label></td>
<td><label for='video'>Моё видео</label></td>
</div></div>
</td>
</tr>
<tr>
<td>
<div class='section demo'>
<div class='leftcol'>
<label><input type='checkbox' onclick="showHide('fans');" name='fans' id='fans' value='1'{if $user->user_info.fans == 1} checked='checked'{/if}></label></td>
<td><label for='fans'>Мои фанаты</label></td>
</div></div>
</td>
</tr>
<td class='form1'> </td>
<td class='form2'><input type='submit' class='button' value='Сохранить изменения'></td>
</tr>
</table>
<input type='hidden' name='task' value='savemenu'>
</form>
Прошу реально помочь, не сохраняет чекбоксы
что делать где исправить......с утра сижу все перепробовал :stena::stena::stena::stena::stena::stena::stena::stena::question::question::question::exclaim::exclaim:
p.s
опишите подробное решение кто сможет и если можно то бесплатно