plugins/SpecialUserPrefs.php
changeset 555 ac4c6a7f01d8
parent 541 acb7e23b6ffa
child 564 a1c450a911a6
equal deleted inserted replaced
554:e87390b1f9b0 555:ac4c6a7f01d8
   512         
   512         
   513         $hobbies = htmlspecialchars($_POST['hobbies']);
   513         $hobbies = htmlspecialchars($_POST['hobbies']);
   514         $hobbies = $db->escape($hobbies);
   514         $hobbies = $db->escape($hobbies);
   515         
   515         
   516         $email_public = ( isset($_POST['email_public']) ) ? '1' : '0';
   516         $email_public = ( isset($_POST['email_public']) ) ? '1' : '0';
       
   517         $disable_js_fx = ( isset($_POST['disable_js_fx']) ) ? '1' : '0';
   517         
   518         
   518         $session->real_name = $real_name;
   519         $session->real_name = $real_name;
   519         
   520         
   520         if ( !preg_match('/@([a-z0-9-]+)(\.([a-z0-9-\.]+))?/', $imaddr_msn) && !empty($imaddr_msn) )
   521         if ( !preg_match('/@([a-z0-9-]+)(\.([a-z0-9-\.]+))?/', $imaddr_msn) && !empty($imaddr_msn) )
   521         {
   522         {
   564         if ( !$q )
   565         if ( !$q )
   565           $db->_die();
   566           $db->_die();
   566         
   567         
   567         $q = $db->sql_query('UPDATE '.table_prefix."users_extra SET user_aim='$imaddr_aim',user_yahoo='$imaddr_yahoo',user_msn='$imaddr_msn',
   568         $q = $db->sql_query('UPDATE '.table_prefix."users_extra SET user_aim='$imaddr_aim',user_yahoo='$imaddr_yahoo',user_msn='$imaddr_msn',
   568                                user_xmpp='$imaddr_xmpp',user_homepage='$homepage',user_location='$location',user_job='$occupation',
   569                                user_xmpp='$imaddr_xmpp',user_homepage='$homepage',user_location='$location',user_job='$occupation',
   569                                user_hobbies='$hobbies',email_public=$email_public
   570                                user_hobbies='$hobbies',email_public=$email_public,disable_js_fx=$disable_js_fx
   570                                WHERE user_id=$session->user_id;");
   571                                WHERE user_id=$session->user_id;");
   571         
   572         
   572         if ( !$q )
   573         if ( !$q )
   573           $db->_die();
   574           $db->_die();
   574         
   575         
   721             <td class="row1" style="width: 50%;"><input type="text" name="hobbies" value="<?php echo $session->user_extra['user_hobbies']; ?>" size="30" /></td>
   722             <td class="row1" style="width: 50%;"><input type="text" name="hobbies" value="<?php echo $session->user_extra['user_hobbies']; ?>" size="30" /></td>
   722           </tr>
   723           </tr>
   723           <tr>
   724           <tr>
   724             <td class="row2" style="width: 50%;"><label for="chk_email_public"><?php echo $lang->get('usercp_publicinfo_field_email_public'); ?></label><br /><small><?php echo $lang->get('usercp_publicinfo_field_email_public_hint'); ?></small></td>
   725             <td class="row2" style="width: 50%;"><label for="chk_email_public"><?php echo $lang->get('usercp_publicinfo_field_email_public'); ?></label><br /><small><?php echo $lang->get('usercp_publicinfo_field_email_public_hint'); ?></small></td>
   725             <td class="row1" style="width: 50%;"><input type="checkbox" id="chk_email_public" name="email_public" <?php if ($session->user_extra['email_public'] == 1) echo 'checked="checked"'; ?> size="30" /></td>
   726             <td class="row1" style="width: 50%;"><input type="checkbox" id="chk_email_public" name="email_public" <?php if ($session->user_extra['email_public'] == 1) echo 'checked="checked"'; ?> size="30" /></td>
       
   727           </tr>
       
   728           <tr>
       
   729             <td class="row2" style="width: 50%;"><label for="chk_jsfx"><?php echo $lang->get('usercp_publicinfo_field_jsfx'); ?></label><br /><small><?php echo $lang->get('usercp_publicinfo_field_jsfx_hint'); ?></small></td>
       
   730             <td class="row1" style="width: 50%;"><input type="checkbox" id="chk_jsfx" name="disable_js_fx" <?php if ($session->user_extra['disable_js_fx'] == 1) echo 'checked="checked"'; ?> size="30" /></td>
   726           </tr>
   731           </tr>
   727           <tr>
   732           <tr>
   728             <th class="subhead" colspan="2">
   733             <th class="subhead" colspan="2">
   729               <input type="submit" name="submit" value="<?php echo $lang->get('usercp_publicinfo_btn_save'); ?>" />
   734               <input type="submit" name="submit" value="<?php echo $lang->get('usercp_publicinfo_btn_save'); ?>" />
   730             </th>
   735             </th>