/home/banprang/domains/plai.go.th/public_html/coremain/module/member/member.php


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
<?php
$navig
['member']="แก้ไขข้อมูลส่วนตัว";
navigator($navig);
echo 
"<br>";
bar_header("แก้ไขข้อมูลส่วนตัว"); // Bar_Header
fieldset_top("ข้อมูลส่วน");
$data_profile select_query_object("*","cms_user_profile","id_user",$_SESSION[id_user_admin]);
$name_profile $data_profile->name;
$surname_profile $data_profile->surname;
$email_profile $data_profile->email;
$address_profile $data_profile->address;
$telephone_profile $data_profile->telephone;
$picure_profile $data_profile->picture;
$id_user $data_profile->id_user;
$sex =  $data_profile->sex;
?>


<form name="edit_form" method="post" action="index.php?mod=member_edit_output&path=member" enctype="multipart/form-data" />
<table align="center" width="98%" border="0">

<table align="center" width="98%">

    <tr height="29">        <td width="10%">
            
        </td>
        <td width="25%">
        <?php print_arr1(); ?>
         รูปภาพ
        </td>
        <td>
        <?php
            
            
if (file_exists("$_SESSION[web_name]/users/$id_user/user_picture/$picure_profile"))
                echo 
"<img src='$_SESSION[web_name]/users/$id_user/user_picture/$picure_profile' />";
            else
                
print_nopic();
        
?>
        </td>
    </tr>

    <tr height="29">        <td width="10%">
            
        </td>
        <td width="25%">
        <?php print_arr1(); ?>
         อัพรูปภาพใหม่
        </td>
        <td>
        <input name="picture_file" type="file" size="20">
        </td>
    </tr>
    
        <tr height="29">        <td width="10%">
        </td>
        <td width="25%">
        <?php print_arr1(); ?>
         เพศ
        </td>
        <td width="100%" align="left">
            <select name="sex">
                <?php
                    
if($sex==M)
                        echo 
"<option value='M' selected='selected'>ชาย</option>";
                    else
                        echo 
"<option value='M'>ชาย</option>";
                        
                    if(
$sex==F)
                        echo 
"<option value='F' selected='selected'>หญิง</option>";
                    else
                        echo 
"<option value='F'>หญิง</option>";
                
?>
            </select>
        </td>
    </tr>
    
    <tr height="29">        <td width="10%">
            
        </td>
        <td width="15%">
        <?php print_arr1(); ?>
         ชื่อ
        </td>
        <td width="100%" align="left"> <input type="text" name="name" value="<?php echo $name_profile?>" />
        </td>
    </tr>
    
        <tr height='29'>
        <td>
            
        </td>
        <td>
        <?php print_arr1(); ?>
         นามสกุล
        </td>
        <td> <input type="text" name="surname" value="<?php echo $surname_profile?>" />
        </td>
    </tr>
        <tr height='29'>        <td width="10%">
            
        </td>
        <td width="">
        <?php print_arr1(); ?>
         อีเมลล์
        </td>
        <td> <input type="text" name="email" value="<?php echo $email_profile?>" />
        </td>
    </tr>
        <tr height='29'>        <td width="10%">
            
        </td>
        <td width="">
        <?php print_arr1(); ?>
         ที่อยู่
        </td>
        <td> <input type="text" name="address" value="<?php echo $address_profile?>" />
        </td>
    </tr>
        <tr height='29'>        <td width="10%">
            
        </td>
        <td width="">
        <?php print_arr1(); ?>
         เบอร์โทรศัพท์
        </td>
        <td> <input type="text" name="tel" value="<?php echo $telephone_profile?>" />
        </td>
    </tr>
    
    
    <tr height='29'>
        <td width="10%">    
        </td>
        <td>
        <?php print_arr1(); ?>
         คลิกที่นี่เพื่อเปลี่ยนรหัสผ่าน
        </td>
        <td> <input type="checkbox" name="change_pass" onclick="enable_pass()"/>
        </td>
    </tr>
    
        </tr>
        
        <tr height='29'>        <td width="10%">
            
        </td>
        <td>
        <?php print_arr1(); ?>
        รหัสผ่านใหม่
        </td>
        <td> <input type="password" name="new_pass" disabled="disabled"/>
        </td>
    </tr>
    <tr height='29'>        <td width="10%">
            
        </td>
        <td>
        <?php print_arr1(); ?>
        ยืนยันรหัสผ่านใหม่
        </td>
        <td> <input type="password" name="new_pass2" disabled="disabled"/>
        </td>
    </tr>
    
        <tr height='29'>        <td width="10%">
            
        </td>
        <td width="">
        
         
        </td>
        
        <td> <input type="submit" name="btn_submit" value="แก้ไขข้อมูล" onclick="return checkform();" />
        </td>
    </tr>
</table>

</form>
<?

?>
<script language="javascript">

    function checkform() {

        var form = document.edit_form;
    
        if(form.change_pass.checked.value!='')
        {
            
            return true;
            
        }
        return false;
    }


    function enable_pass(){    
            document.edit_form.new_pass.disabled = false;
            document.edit_form.new_pass2.disabled = false;
    }
    
</script>
<?
fieldset_down
();
?>