Menu

[r15]: / preferences / updateuser.php  Maximize  Restore  History

Download this file

160 lines (138 with data), 6.7 kB

  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
<?php
/*
** Application name: phpCollab
** Last Edit page: 2003-10-23
** Path by root: ../preferences/updateuser.php
** Authors: Ceam / Fullo
**
** =============================================================================
**
** phpCollab - Project Managment
**
** -----------------------------------------------------------------------------
** Please refer to license, copyright, and credits in README.TXT
**
** -----------------------------------------------------------------------------
** FILE: updateuser.php
**
** DESC: Screen:
**
** HISTORY:
** 2003-10-23 - added new document info
** 2003-10-27 - session problem fixed
** -----------------------------------------------------------------------------
** TO-DO:
** move to a better login system and authentication (try to db session)
**
** =============================================================================
*/
$checkSession = "true";
include_once('../includes/library.php');
if ($action == "update") {
if (($logout_time < "30" && $logout_time != "0") || !is_numeric($logout_time)) {
$logout_time = "30";
}
$fn = convertData($fn);
$tit = convertData($tit);
$em = convertData($em);
$wp = convertData($wp);
$hp = convertData($hp);
$mp = convertData($mp);
$fax = convertData($fax);
$logout_time = convertData($logout_time);
$tmpquery = "UPDATE ".$tableCollab["members"]." SET name='$fn',title='$tit',email_work='$em',phone_work='$wp',phone_home='$hp',mobile='$mp',fax='$fax',logout_time='$logout_time',timezone='$tz' WHERE id = '$idSession'";
connectSql("$tmpquery");
$timezoneSession = $tz;
$logouttimeSession = $logout_time;
$dateunixSession = date("U");
$nameSession = $fn;
if (version_compare("4.1.1", phpversion(),"<") > 0) {
$_SESSION['logouttimeSession'] = $logouttimeSession;
$_SESSION['timezoneSession'] = $timezoneSession;
$_SESSION['dateunixSession'] = $dateunixSession;
$_SESSION['nameSession'] = $nameSession;
} else {
session_register("logouttimeSession","timezoneSession","dateunixSession","nameSession");
}
//if mantis bug tracker enabled
if ($enableMantis == "true") {
// Call mantis function for user profile changes..!!!
include ("../mantis/user_profile.php");
}
headerFunction("../preferences/updateuser.php?msg=update&".session_name()."=".session_id());
}
$tmpquery = "WHERE mem.id = '$idSession'";
$userPrefs = new request();
$userPrefs->openMembers($tmpquery);
$comptUserPrefs = count($userPrefs->mem_id);
if ($comptUserPrefs == "0") {
headerFunction("../users/listusers.php?msg=blankUser&".session_name()."=".session_id());
exit;
}
$bodyCommand = "onLoad=\"document.user_edit_profileForm.fn.focus();\"";
include('../themes/'.THEME.'/header.php');
$blockPage = new block();
$blockPage->openBreadcrumbs();
$blockPage->itemBreadcrumbs($strings["preferences"]);
if ($notifications == "true") {
$blockPage->itemBreadcrumbs($strings["user_profile"]." | ".$blockPage->buildLink("../preferences/updatepassword.php?",$strings["change_password"],in)." | ".$blockPage->buildLink("../preferences/updatenotifications.php?",$strings["notifications"],in));
} else {
$blockPage->itemBreadcrumbs($strings["user_profile"]." | ".$blockPage->buildLink("../preferences/updatepassword.php?",$strings["change_password"],in));
}
$blockPage->closeBreadcrumbs();
if ($msg != "") {
include('../includes/messages.php');
$blockPage->messagebox($msgLabel);
}
$block1 = new block();
$block1->form = "user_edit_profile";
$block1->openForm("../preferences/updateuser.php?".session_name()."=".session_id());
echo "<input type=\"hidden\" name=\"action\" value=\"update\">";
if ($error != "") {
$block1->headingError($strings["errors"]);
$block1->contentError($error);
}
$block1->heading($strings["user_profile"]." : ".$userPrefs->mem_login[0]);
$block1->openPaletteIcon();
$block1->paletteIcon(0,"export",$strings["export"]);
$block1->closePaletteIcon();
$block1->openContent();
$block1->contentTitle($strings["edit_user_account"]);
$block1->contentRow($strings["full_name"],"<input size=\"24\" style=\"width: 250px;\" type=\"text\" name=\"fn\" value=\"".$userPrefs->mem_name[0]."\">");
$block1->contentRow($strings["title"],"<input size=\"24\" style=\"width: 250px;\" type=\"text\" name=\"tit\" value=\"".$userPrefs->mem_title[0]."\">");
$block1->contentRow($strings["email"],"<input size=\"24\" style=\"width: 250px;\" type=\"text\" name=\"em\" value=\"".$userPrefs->mem_email_work[0]."\">");
$block1->contentRow($strings["work_phone"],"<input size=\"14\" style=\"width: 150px;\" type=\"text\" name=\"wp\" value=\"".$userPrefs->mem_phone_work[0]."\">");
$block1->contentRow($strings["home_phone"],"<input size=\"14\" style=\"width: 150px;\" type=\"text\" name=\"hp\" value=\"".$userPrefs->mem_phone_home[0]."\">");
$block1->contentRow($strings["mobile_phone"],"<input size=\"14\" style=\"width: 150px;\" type=\"text\" name=\"mp\" value=\"".$userPrefs->mem_mobile[0]."\">");
$block1->contentRow($strings["fax"],"<input size=\"14\" style=\"width: 150px;\" type=\"text\" name=\"fax\" value=\"".$userPrefs->mem_fax[0]."\">");
$block1->contentRow($strings["logout_time"].$blockPage->printHelp("user_autologout"),"<input size=\"14\" style=\"width: 150px;\" type=\"text\" name=\"logout_time\" value=\"".$userPrefs->mem_logout_time[0]."\"> sec.");
if ($gmtTimezone == "true") {
$selectTimezone = "<select name=\"tz\">";
for ($i=-12;$i<=+12;$i++) {
if ($userPrefs->mem_timezone[0] == $i) {
$selectTimezone .= "<option value=\"$i\" selected>$i</option>";
} else {
$selectTimezone .= "<option value=\"$i\">$i</option>";
}
}
$selectTimezone .= "</select>";
$block1->contentRow($strings["user_timezone"].$blockPage->printHelp("user_timezone"),$selectTimezone);
}
if ($userPrefs->mem_profil[0] == "0") {
$block1->contentRow($strings["permissions"],$strings["administrator_permissions"]);
} else if ($userPrefs->mem_profil[0] == "1") {
$block1->contentRow($strings["permissions"],$strings["project_manager_permissions"]);
} else if ($userPrefs->mem_profil[0] == "2") {
$block1->contentRow($strings["permissions"],$strings["user_permissions"]);
} else if ($userPrefs->mem_profil[0] == "5") {
$block1->contentRow($strings["permissions"],$strings["project_manager_administrator_permissions"]);
}
$block1->contentRow($strings["account_created"],createDate($userPrefs->mem_created[0],$timezoneSession));
$block1->contentRow("","<input type=\"submit\" name=\"Save\" value=\"".$strings["save"]."\">");
$block1->closeContent();
$block1->closeForm();
$block1->openPaletteScript();
$block1->paletteScript(0,"export","../users/exportuser.php?id=$idSession","true,true,true",$strings["export"]);
$block1->closePaletteScript("","");
include('../themes/'.THEME.'/footer.php');
?>
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.