Ejemplo n.º 1
0
                                    replace_gedrec($myid, $person->getGedcomRecord() . "\n1 EMAIL " . $form_email);
                                }
                            }
                            $GEDCOM = $OLDGEDCOM;
                        }
                    }
                }
                if ($form_firstname != $old_firstname || $form_lastname != $old_lastname) {
                    // update gedcom record with new name
                    // Is this functionality required?
                }
            }
            // Change username
            if ($form_username != PGV_USER_NAME) {
                AddToLog('User renamed to ->' . $form_username . '<-');
                rename_user(PGV_USER_ID, $form_username);
                $_SESSION['pgv_user'] = $form_username;
            }
            // Reload page to pick up changes such as theme and user_id
            header('Location: edituser.php');
            exit;
        }
    }
} else {
    print_header($pgv_lang['user_admin']);
    if ($ENABLE_AUTOCOMPLETE) {
        require PGV_ROOT . 'js/autocomplete.js.htm';
    }
}
// Form validation
?>
Ejemplo n.º 2
0
     $postedid = post_message_($threadid, $kind, $message, $link, $from, null, $isuser ? null : $operator['operatorid']);
     if ($isuser && $postedid && $thread["shownmessageid"] == 0) {
         commit_thread($thread['threadid'], array('shownmessageid' => intval($postedid)), $link);
     }
     mysql_close($link);
     print_thread_messages($thread, $token, $lastid, $isuser, $outformat, $isuser ? null : $operator['operatorid']);
     exit;
 } else {
     if ($act == "rename") {
         loadsettings();
         if ($settings['usercanchangename'] != "1") {
             show_error("server: forbidden to change name");
         }
         $newname = getrawparam('name');
         if (!preg_match('/^\\s*$/', $newname)) {
             rename_user($thread, $newname);
             $data = strtr(base64_encode(myiconv($mibew_encoding, "utf-8", $newname)), '+/=', '-_,');
             setcookie($namecookie, $data, time() + 60 * 60 * 24 * 365);
             show_ok_result("rename");
         }
     } else {
         if ($act == "ping") {
             show_ok_result("ping");
         } else {
             if ($act == "close") {
                 if ($isuser || $thread['agentId'] == $operator['operatorid']) {
                     close_thread($thread, $isuser);
                 }
                 show_ok_result("closed");
             }
         }