Вход Регистрация
Файл: profil.php
Строк: 105
<?
include $_SERVER['DOCUMENT_ROOT']."/template/head.php";






if (!empty(
$id))
{
    
    if(
$_GET['prof'] == "save")
    {
        if(
mysql_query("UPDATE `prof` SET 
        `fam` = '"
.check($_POST['fam'])."',
        `d_r` = '"
.$_POST['d_r']."',
        `m_r` = '"
.$_POST['m_r']."',
        `g_r` = '"
.$_POST['g_r']."',
        `sp` = '"
.$_POST['sp']."',
        `gorod` = '"
.check($_POST['gorod'])."',
        `m_tel` = '"
.check($_POST['m_tel'])."',
        `d_tel` = '"
.check($_POST['d_tel'])."',
        `url` = '"
.check($_POST['url'])."',
        `car` = '"
.check($_POST['car'])."',
        `interes` = '"
.check($_POST['interes'])."',
        `muz` = '"
.check($_POST['muz'])."',
        `citat` = '"
.check($_POST['citat'])."',
        `o_sebe` = '"
.check($_POST['o_sebe'])."'
        where `id` = '
$id'")
        and 
        
mysql_query("UPDATE `user` SET `pass` = '".$_POST['pass']."' where `id` = '$id'"))
        {echo
'<br/>Изменения сохранены<br/>';} 
        else 
        {echo 
mysql_error();}
    }


        
        
$user mysql_fetch_array(mysql_query("select * from `prof` where `id`='$id'"));
        
$user1 mysql_fetch_array(mysql_query("select * from `user` where `id`='$id'"));
        
        
?>
        
        
        
        
        
        
        
        <div id="mhead" class="mhead">
            <div class="btn back">
                <a class="b al_back" href="wall.php?id=<?=$user[id]?>" accesskey="0">
                    <i>&nbsp;</i>
                    <div class="title">
                        <h1>Редактирование</h1>
                    </div>
                </a>
            </div>
        </div>
        <div id="mcont" class="mcont">
            <div class="pcont settings">
                <h4>Общая информация</h4>
                <div class="upanel">
                    <div class="cont bl_item">
                        <form method="post" action="?prof=save">
                            <dl>
                                <dt>Пароль:</dt>
                                <dd class="iwrap">
                                    <input type="password" name="pass" class="text" value="<?=$user1[pass]?>" />
                                </dd>
                            </dl>
                            <dl>
                                <dt>Фамилия:</dt>
                                <dd class="iwrap">
                                    <input type="text" name="fam" class="text" value="<?=$user[fam]?>" />
                                </dd>
                            </dl>
                            <dl>
                                <dt>День рождения:</dt>
                                <dd>
                                <table class="inp">
                                    <tr>
                                        <td>
                                    <select name="d_r"><?for($i=1$i<32$i++){if($user[d_r]==$i){?><option value="<?=$i?>" selected><?=$i?></option><?}else{?><option value="<?=$i?>"><?=$i?></option><?}}?></select>
                                        </td>
                                        <td>
                                    <select name="m_r"><?for($i=1$i<13$i++){if($user[m_r]==$i){?><option value="<?=$i?>" selected><?=$i?></option><?}else{?><option value="<?=$i?>"><?=$i?></option><?}}?></select>
                                        </td>
                                        <td>
                                    <select name="g_r"><?for($i=1932$i<2006$i++){if($user[g_r]==$i){?><option value="<?=$i?>" selected><?=$i?></option><?}else{?><option value="<?=$i?>"><?=$i?></option><?}}?></select>        
                                        </td>
                                    </tr>
                                </table>
                                </dd>
                            </dl>
                            
                            <dl>
                                <dt>Семейное положение:</dt>
                                <dd>
                                    <select name="sp"><?
                                    
if($user[sp]=="В активном поиске"){?><option value="В активном поиске" selected>В активном поиске</option><?}else{?><option value="В активном поиске">В активном поиске</option><?}
                                    if(
$user[pol]=="m"){
                                    if(
$user[sp]=="Влюблен"){?><option value="Влюблен" selected>Влюблен</option><?}else{?><option value="Влюблен">Влюблен</option><?}
                                    if(
$user[sp]=="Есть девушка"){?><option value="Есть девушка" selected>Есть девушка</option><?}else{?><option value="Есть девушка">Есть девушка</option><?}
                                    if(
$user[sp]=="Женат"){?><option value="Женат" selected>Женат</option><?}else{?><option value="Женат">Женат</option><?}
                                    if(
$user[sp]=="Не женат"){?><option value="Не женат" selected>Не женат</option><?}else{?><option value="Не женат">Не женат</option><?}
                                    if(
$user[sp]=="Помолвлен"){?><option value="Помолвлен" selected>Помолвлен</option><?}else{?><option value="Помолвлен">Помолвлен</option><?}}
                                    if(
$user[pol]=="zh"){
                                    if(
$user[sp]=="Влюблена"){?><option value="Влюблена" selected>Влюблена</option><?}else{?><option value="Влюблена">Влюблена</option><?}
                                    if(
$user[sp]=="Есть парень"){?><option value="Есть парень" selected>Есть парень</option><?}else{?><option value="Есть парень">Есть парень</option><?}
                                    if(
$user[sp]=="Замужем"){?><option value="Замужем" selected>Замужем</option><?}else{?><option value="Замужем">Замужем</option><?}
                                    if(
$user[sp]=="Не замужем"){?><option value="Не замужем" selected>Не замужем</option><?}else{?><option value="Не замужем">Не замужем</option><?}
                                    if(
$user[sp]=="Помолвлена"){?><option value="Помолвлена" selected>Помолвлена</option><?}else{?><option value="Помолвлена">Помолвлена</option><?}}
                                    
?></select>
                                </dd>
                            </dl>
                            <dl>
                                <dt>Город:</dt>
                                <dd class="iwrap">
                                    <input type="text" name="gorod" class="text" value="<?=$user[gorod]?>" />
                                </dd>

                            </dl>
                            <dl>
                                <dt>Моб. телефон:</dt>
                                <dd class="iwrap">
                                    <input type="text" name="m_tel" class="text" value="<?=$user[m_tel]?>" />
                                </dd>

                            </dl>
                            <dl>
                                <dt>Дом. телефон:</dt>
                                <dd class="iwrap">
                                    <input type="text" name="d_tel" class="text" value="<?=$user[d_tel]?>" />
                                </dd>

                            </dl>
                            <dl>
                                <dt>Веб-сайт:</dt>
                                <dd class="iwrap">
                                    <input type="text" name="url" class="text" value="<?=$user[url]?>" />
                                </dd>

                            </dl>
                            <dl>
                                <dt>Деятельность:</dt>
                                <dd class="iwrap">
                                    <input type="text" name="car" class="text" value="<?=$user[car]?>" />
                                </dd>

                            </dl>
                            <dl>
                                <dt>Интересы:</dt>
                                <dd class="iwrap">
                                    <input type="text" name="interes" class="text" value="<?=$user[interes]?>" />
                                </dd>

                            </dl>
                            <dl>
                                <dt>Любимая музыка:</dt>
                                <dd class="iwrap">
                                    <input type="text" name="muz" class="text" value="<?=$user[muz]?>" />
                                </dd>

                            </dl>
                            <dl>
                                <dt>Любимые цитаты:</dt>
                                <dd class="iwrap">
                                    <input type="text" name="citat" class="text" value="<?=$user[citat]?>" />
                                </dd>

                            </dl>
                            <dl>
                                <dt>О себе:</dt>
                                <dd class="iwrap">
                                    <textarea name="o_sebe" rows="3" placeholder="О себе..."><?=$user[o_sebe]?></textarea>
                                </dd>

                            </dl>
                            <div class="near_box">
                                <input class="btn" type="submit" value="Сохранить" />
                            </div>
                        </form>
                    </div>
                </div>
            </div>
        </div>
    <div id="mfoot" class="mfoot">
        <ul class="main_menu footer_menu">
            <li><a href="/">На главную</a></li>
            <li><a href="/?exit">Выход</a></li>
        </ul>
    </div>
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
<?

    
    
}
include 
$_SERVER['DOCUMENT_ROOT']."/template/foot.php";
?>
Онлайн: 2
Реклама