?>
" onChange="this.value=this.value.trim()" onKeyUp="clearProfileDetailsResponseMsg()" onBlur="isLNameValid(this.value)"></td>
                            <td><div id="lnameMsg"></div></td>
                        </tr>
                        <tr>
                            <td>Gender </td>
                            <td>
                    	 		<select   name="gender"  id="gender"   >
                                    <?php 
if (isMale($username)) {
    ?>
                                    	<option >Male</option>
                                    	<option >Female</option>
                                    <?php 
} else {
    if (isFemale($username)) {
        ?>
                                    	<option >Female</option>
                                    	<option >Male</option>
                                    <?php 
    }
}
?>
                                    
                          		</select>
                    		</td>
                            <td><div id="lnameMsg"></div></td>
                        </tr>
                         <tr>
                    <td>Address line 1 </td>
                    <td><input type="text" name="address1" id="address1" maxlength="60" value="<?php 
예제 #2
0
function getImagePath($id, $filename, $gender)
{
    $hasprofileimage = false;
    $real_path = BASE_PATH . DIRECTORY_SEPARATOR . "uploads" . DIRECTORY_SEPARATOR . "users" . DIRECTORY_SEPARATOR . "user_" . $id . DIRECTORY_SEPARATOR . "avatar" . DIRECTORY_SEPARATOR . "medium_" . $filename;
    if (file_exists($real_path) && !isEmptyString($filename)) {
        $hasprofileimage = true;
    }
    $baseUrl = Zend_Controller_Front::getInstance()->getBaseUrl();
    $photo_path = $baseUrl . '/uploads/default/default_medium_male.jpg';
    if (isFemale($gender)) {
        $photo_path = $baseUrl . '/uploads/default/default_thumbnail_female.jpg';
    }
    if ($hasprofileimage) {
        $photo_path = $baseUrl . '/uploads/users/user_' . $id . '/avatar/medium_' . $filename;
    }
    return $photo_path;
}
                                        </tr>
                                        <tr>
                                            <td>Last name </td>
                                            <td><input type="text" name="lastname" id="lastname" maxlength="45" value="<?php 
echo htmlentities($selectedUserLastName);
?>
" onChange="this.value=this.value.trim()" onKeyUp="clearProfileDetailsResponseMsg()" onBlur="isLNameValid(this.value)"></td>
                                            <td><div id="lnameMsg"></div></td>
                                        </tr>
                                        <tr>
                            <td>Gender </td>
                            <td>
                    	 		<select   name="gender"  id="gender"   >
                                    
                                    <?php 
if (isFemale($selectedUsername)) {
    ?>
                                    	<option >Female</option>
                                    	<option >Male</option>
                                    <?php 
} else {
    ?>
                                    	<option >Male</option>
                                    	<option >Female</option>
                                    <?php 
}
?>
                                    
                          		</select>
                    		</td> 
                        </tr>