Event Id: 1 Source: WebLoginPE - Snippet Date: 20-Sep-2008 09:22 PM User: Redefining already defined constructor for class WebLoginPE Unknown document
[+wlpe.message+]
<div style="padding:20px 20px 20px 0px; margin: 0 auto;text-align:left; line-height:25px">
<form enctype="multipart/form-data" id="wlpeUserProfileForm" action="[~[*id*]~]" method="post">
<h3>Hello [+user.fullname+] ([+user.username+])!</h3>
<p>Use this form to update your profile information</p>
<fieldset style="margin: 0 auto;border: 0px dashed rgb(85, 85, 85); padding: 20px; margin-bottom: 0px;margin-top:50px; text-align: left;">
<h3>Your Details</h3>
<p> Full Name
<label for="wlpeUserProfileFullName" class="regform">
<input id="wlpeUserProfileFullName" type="text" name="fullname" value="[+user.fullname+]" />
</label></p>
<p> Company
<label for="wlpeUserProfilecompany" class="regform">
<input id="wlpeUserProfilecompany" type="text" name="company" value="[+user.company+]" />
</label></p>
<p> Website
<label for="wlpeUserProfilewebsite" class="regform">
<input id="wlpeUserProfilewebsite" type="text" name="website" value="[+user.website+]" />
</label></p>
<p>Email <label for="wlpeUserProfileEmail" class="regform">
<input id="wlpeUserProfileEmail" type="text" name="email" value="[+user.email+]" />
</label></p>
<p>Date of birth (MM-DD-YYYY)
<label for="wlpeUserProfileDob" class="regform">
<input id="wlpeUserProfileDob" type="text" name="dob" value="[+user.dob+]" />
</label> </p>
<p>[+form.gender+]</p>
</fieldset>
<fieldset style="margin: 0 auto;border: 0px dashed rgb(85, 85, 85); padding: 20px; margin-bottom: 0px;margin-top:10px; text-align: left;">
<h3>Address Details</h3>
<p>Address Line 1<label for="wlpeUserProfileaddress1" class="regform">
<input id="wlpeUserProfileaddress1" type="text" value="[+user.address1+]" name="address1"/>
</label></p>
<p>Address Line 2<label for="wlpeUserProfileaddress2" class="regform">
<input id="wlpeUserProfileaddress2" type="text" value="[+user.address2+]" name="address2"/>
</label></p>
<p>Address Line 3 <label for="wlpeUserProfileaddress3" class="regform">
<input id="wlpeUserProfileaddress3" type="text" value="[+user.address3+]" name="address3"/>
</label></p>
<p>County/State
<label for="wlpeUserProfileState" class="regform">
<input id="wlpeUserProfileState" type="text" name="state" value="[+user.state+]" />
</label></p>
<p>Post/Zip Code
<label for="wlpeUserProfileZip" class="regform">
<input id="wlpeUserProfileZip" type="text" name="zip" value="[+user.zip+]" />
</label></p>
<p>Country
[+form.country+]</p>
</fieldset>
<fieldset style="margin: 0 auto;border: 0px dashed rgb(85, 85, 85); padding: 20px; margin-bottom: 0px;margin-top:10px; text-align: left;">
<h3>Contact Numbers</h3>
<p>Phone number
<label for="wlpeUserProfilePhone" class="regform">
<input id="wlpeUserProfilePhone" type="text" name="phone" value="[+user.phone+]" />
</label></p>
<p>Mobile number
<label for="wlpeUserProfileMobile" class="regform">
<input id="wlpeUserProfileMobile" type="text" name="mobilephone" value="[+user.mobilephone+]" />
</label></p>
<p>Fax number
<label for="wlpeUserProfileFax" class="regform">
<input id="wlpeUserProfileFax" type="text" name="fax" value="[+user.fax+]" />
</label></p>
</fieldset>
<fieldset style="margin: 0 auto;border: 0px dashed rgb(85, 85, 85); padding: 20px; margin-bottom: 0px;margin-top:10px; text-align: left;">
<h3>Logo & Signature</h3>
<div> <img id="wlpeUserProfilePhotoImg" src="[+user.photo+]" alt="[+user.username+]" title="[+user.fullname+]" height="250" width="250" /></div>
<p> User Photo</p>
<label for="wlpeUserProfilePhoto" id="wlpeUserPhotoLabel">User Photo
<input type="hidden" id="wlpeUserHiddenPhoto" name="userphoto" value="[+user.photo+]" />
<input id="wlpeUserProfilePhoto" type="file" name="photo" value="" />
</label>
<p id="wlpeUserProfilePhotoInfo" class="info">No bigger than 200kb. will be resized to 250 x 250.</p>
<p>Comment/Signature</p>
<label for="wlpeUserProfileComment" class="regform">
<textarea id="wlpeUserProfileComment" rows="8" cols="40" name="comment">[+user.comment+]</textarea>
</label>
</fieldset>
<fieldset style="margin: 0 auto;border: 0px dashed rgb(85, 85, 85); padding: 20px; margin-bottom: 0px;margin-top:10px; text-align: left;">
<h3>Change your password</h3>
<p>Leave blank if you do not want a new password.</p>
<p>New Password </p> <label for="wlpeUserProfilePassword" class="regform">
<input id="wlpeUserProfilePassword" type="password" name="password" value="" />
</label>
<p>New Password (confirm) </p> <label for="wlpeUserProfilePasswordConfirm" class="regform">
<input id="wlpeUserProfilePasswordConfirm" type="password" name="password.confirm" value="" />
</label>
</fieldset>
[[MemberCheck? &groups=`Designers` &chunk=`designerStandards` ]]
[[MemberCheck? &groups=`Designers` &chunk=`designerSoftware` ]]
<fieldset style="margin: 0 auto;border: 0px dashed rgb(85, 85, 85); padding: 60px; margin-bottom: 0px;margin-top:0px; text-align: center;">
<button type="submit" id="wlpeSaveProfileButton" name="service" value="saveprofile">Save</button>
<button type="submit" id="wlpeProfileDoneButton" name="service" value="cancel">Done</button>
<button type="submit" id="wlpeProfileLogoutButton" name="service" value="logout">Logout</button>
<button type="submit" id="wlpeProfileDeleteButton" name="service" value="deleteprofile">Delete My Profile</button>
</fieldset>
</form>
</div> foreach ($generalElementsArray as $field)
{
if ($field == 'photo')
{
if ($_FILES['photo']['name'] !== '' && !empty($_FILES['photo']['name']))
{
$_POST['photo'] = $this->CreateUserImage();
if (!empty($this->Report))
{
return;
}
}
}
if ($field == 'dob' && trim($_POST['dob'])!='') // for not format an empty date else date is 0 (01-01-1970)
{
$_POST['dob'] = $this->MakeDateForDb($_POST['dob']);
}
if ($field!='photo' || ($_FILES['photo']['name'] !== '' && !empty($_FILES['photo']['name']))) // for update db with value and blank value (except if the field is 'photo')
{
// CREDIT: Mike Reid (aka Pixelchutes) for the string escape code.
$charset='"'.$modx->config['modx_charset'].'"';
$generalElementsUpdate[] = " `".$field."` = '".$modx->db->escape(stripslashes(htmlentities(trim($_POST[$field]), ENT_QUOTES, $modx->config['modx_charset'])))."'";
}
{
// CREDIT: Mike Reid (aka Pixelchutes) for the string escape code.
$charset=$modx->config['modx_charset'];
$generalElementsUpdate[] = " `".$field."` = '".$modx->db->escape(stripslashes(htmlentities(trim($_POST[$field]), ENT_QUOTES, $modx->config['modx_charset']))). "'";
}
}
if ($field!='photo' || ($_FILES['photo']['name'] !== '' && !empty($_FILES['photo']['name']))) // for update db with value and blank value (except if the field is 'photo')
{
// CREDIT: Mike Reid (aka Pixelchutes) for the string escape code.
$charset='"'.$modx->config['modx_charset'].'"';
$generalElementsUpdate[] = " `".$field."` = '".$modx->db->escape(stripslashes(htmlentities(trim($_POST[$field]), ENT_QUOTES, $modx->config['modx_charset'])))."'";
}
{
// CREDIT: Mike Reid (aka Pixelchutes) for the string escape code.
$charset=$modx->config['modx_charset'];
$generalElementsUpdate[] = " `".$field."` = '".$modx->db->escape(stripslashes(htmlentities(trim($_POST[$field]), ENT_QUOTES, $modx->config['modx_charset']))). "'";
}
if ($field!='photo' || ($_FILES['photo']['name'] !== '' && !empty($_FILES['photo']['name']))) // for update db with value and blank value (except if the field is 'photo')
{
// CREDIT: Mike Reid (aka Pixelchutes) for the string escape code.
$charset='"'.$modx->config['modx_charset'].'"';
$generalElementsUpdate[] = " `".$field."` = '".$modx->db->escape(stripslashes(htmlentities(trim($_POST[$field]), ENT_QUOTES, $modx->config['modx_charset'])))."'";
}
Rosco > Hi, I have the latest version of WLPE and I have noticed something odd.@Rossco: Because the versions may change over time, it’s always better to specify the version number.
Yes I was having this issue. Soshite is correct and you can see where it is included twice. Remove the second reference.@Soshite and Wounderbeer > I don’t see this duplication in my version of WLPE 1.3.1.
// CREDIT: Mike Reid (aka Pixelchutes) for the string escape code. $extendedFieldValues[] = " `".$field."` = '".$modx->db->escape(stripslashes(trim($_POST[$field])))."'";
// CREDIT: Julien Rouiller (aka Altipoint) for the condition.
// This is to prevent that the photo field is cleared when a table of extended attributes is used.
if ($field!='photo' || ($_FILES['photo']['name'] !== '' && !empty($_FILES['photo']['name']))) {
// CREDIT: Mike Reid (aka Pixelchutes) for the string escape code.
extendedFieldValues[] = " `".$field."` = '".$modx->db->escape(stripslashes(trim($_POST[$field])))."'";
}<input type="hidden" id="wlpeUserHiddenPhoto" name="userphoto" value="[+user.photo+]" /> <input id="wlpeUserProfilePhoto" type="file" name="photo" value="[+user.photo+]" size="14" maxlength="256" />