View file sdark.mobi/set/msg.php

File size: 1.24Kb
<?
require_once'../core/system.php';
echo only_reg();
echo ban();
$header='Настройки почты';
require_once'../core/head.php';
if($user['prava']<2){header("location: /user/settings"); exit;}
if(isset($_GET['yes'])){
if($user['set_msg']==1){$next=0;}
if($user['set_msg']==0){$next=1;}
header("location: /user/settings"); 
$_SESSION['message'] = 'Данные изменены!';
$time=time();
mysql_query("UPDATE `user` set `set_msg`='$next' where `id` = '".$user['id']."' limit 1");
}
echo "</div><div class='foot center'><table  class='d-grey' width='100%' border='0' cellpadding='0' cellspacing='0' style='padding-top: 5px;'><tbody><tr>";
if($user['set_msg']==1){$msg='открыть';}
if($user['set_msg']==0){$msg='закрыть';}
echo '<div class="inpc-ar"><div class="empty2"></div>Вы уверены, что хотите '.$msg.' почту?</div><div class="empty2"></div>
<td width="40%"><a class="big-but" href="/set/msg?yes"><div class="imgwrap"><img src="/images/icon/ok.png"></div>Подтвердить</a></td>';
echo '<td width="40%"><a class="big-but" href="/user/settings/"><div class="imgwrap"><img src="/images/icon/error.png"></div>Отмена</a></td></tbody></table></div></div>';
echo "</div>";
require_once'../core/foot.php';
?>