View file shcms/settings.php

File size: 2.02Kb
<?
/*
=============================================
Движок: SHCMS Engine
=============================================
Название файла: Настройки
=============================================
Official website: http://shcms.ru
=============================================
*/
define('SHCMS', true);
include_once'../system/inc/basic_settings.php';
if(!$user_id){echo 'Настроить могут только авторизованные пользователи';}
$shcmsengine['title'] = 'Настройки';
include_once'../template/head.php';
registrat();
$user= mysql_fetch_array(mysql_query("SELECT * FROM users WHERE id=$user_id"));

if($_POST['submit'])
{$submit =$_POST['submit'];}

if($submit)
{
if($_POST['poc_email'])
{$poc_email =$_POST['poc_email'];}
if($_POST['poc_icq'])
{$poc_icq =$_POST['poc_icq'];}
if($_POST['poc_wmid'])
{$poc_wmid =$_POST['poc_wmid'];}

$user['poc_email'] = (isset ($poc_email) && $poc_email);
$user['poc_icq'] = (isset ($poc_icq) && $poc_icq);
$user['poc_wmid'] = (isset ($poc_wmid) && $poc_wmid);
if(isset($poc_ank) and isset($poc_email) and isset($poc_icq) and isset($poc_wmid));
{
$mysqlok = mysql_query("UPDATE users SET poc_ank='$poc_ank',poc_email = '$poc_email',poc_icq = '$poc_icq', poc_wmid = '$poc_wmid' WHERE id='$user_id'");
if($mysqlok == true)
{
echo '<div class="actshcms">Параметры успешно приняты</div>';
}
}
}

echo '<form action="?'.$conservation.'" method="post">';
		echo '<input name="poc_email" type="checkbox" value="1" ' .($user['poc_email']?'checked="checked"':'') . ' />&nbsp;Показывать E-mail<br />';
		echo '<input name="poc_icq" type="checkbox" value="1" ' .($user['poc_icq']?'checked="checked"':'') . ' />&nbsp;Показывать ICQ<br />';
echo '<input name="poc_wmid" type="checkbox" value="1" '.($user['poc_wmid']?'checked="checked"':'') . ' />&nbsp;Показывать WMID<br />';

echo '<input type="submit" name="submit">';
echo '</form>';

include_once'../template/foot.php';
?>