Bug #1714 ยป 1714.patch
modules/mod_cblogin/mod_cblogin.php | ||
---|---|---|
$show_username_pass_icons = 0;
|
||
}
|
||
|
||
$id_sfx = trim( preg_replace( '/\s+/', '_', $class_sfx ) );
|
||
|
||
switch ( checkJversion() ) {
|
||
case 0:
|
||
// Mambo 4.5 & Joomla 1.0:
|
||
... | ... | |
// wondering if this was even neeeded: echo '<div style="width:100%; padding:0px; border-width:0px; margin:0px;">'."\n";
|
||
|
||
$logoutPost = cbSef("index.php?option=com_comprofiler&task=logout");
|
||
echo '<form action="'.$logoutPost.'" method="post" id="mod_login_logoutform'.$class_sfx.'" style="margin:0px;">'."\n";
|
||
echo '<form action="'.$logoutPost.'" method="post" id="mod_login_logoutform'.$id_sfx.'" style="margin:0px;">'."\n";
|
||
|
||
// Add Authenticated Pre text
|
||
if ( $logoutpretext ) {
|
||
... | ... | |
|
||
$avatarDisplayed = false;
|
||
if ($show_avatar == 0) {
|
||
if ($greeting) echo '<span id="mod_login_greeting'.$class_sfx.'">'.sprintf( _UE_HI_NAME, $name ).'</span>'.($horizontal ? " " : "");
|
||
if ($greeting) echo '<span id="mod_login_greeting'.$id_sfx.'">'.sprintf( _UE_HI_NAME, $name ).'</span>'.($horizontal ? " " : "");
|
||
} else {
|
||
|
||
if (($avatar_position=="default") and ($greeting)) echo '<span id="mod_login_greeting'.$class_sfx.'">'.sprintf( _UE_HI_NAME, $name ).'</span>';
|
||
if (($avatar_position=="default") and ($greeting)) echo '<span id="mod_login_greeting'.$id_sfx.'">'.sprintf( _UE_HI_NAME, $name ).'</span>';
|
||
|
||
$cbUser =& CBuser::getInstance( $_CB_framework->myId() );
|
||
$oValue = $cbUser->avatarFilePath( $show_avatar );
|
||
... | ... | |
else echo '<div style="float:'.$avatar_position.'; margin: 3px 0px 4px 0px; ">';
|
||
echo '<a href="'.cbSef("index.php?option=com_comprofiler&task=userProfile".$andItemid).'" class="mod_login'.$class_sfx.'">';
|
||
echo '<img src="' . htmlspecialchars( $oValue ) . '" style="margin: 0px 1px 3px 1px; border-width:0px;" alt="'.$name
|
||
. '" title="'. _UE_MENU_VIEWMYPROFILE_DESC . '" class="mod_login'.$class_sfx.'" id="mod_login_avatar'.$class_sfx.'" />';
|
||
. '" title="'. _UE_MENU_VIEWMYPROFILE_DESC . '" class="mod_login'.$class_sfx.'" id="mod_login_avatar'.$id_sfx.'" />';
|
||
echo "</a></div>\n";
|
||
$avatarDisplayed = true;
|
||
}
|
||
... | ... | |
|
||
if ( $show_avatar and ($avatar_position!="default") and ($greeting) ) {
|
||
if ($avatarDisplayed && ( ! $horizontal ) ) {
|
||
echo $preDiv . '" id="mod_login_greeting'.$class_sfx.'">';
|
||
echo $preDiv . '" id="mod_login_greeting'.$id_sfx.'">';
|
||
echo '<br />';
|
||
echo sprintf( _UE_HI_NAME, '<br />'.$name );
|
||
echo $postDiv;
|
||
} else {
|
||
echo '<span id="mod_login_greeting'.$class_sfx.'">'.sprintf( _UE_HI_NAME, $name ).'</span>';
|
||
echo '<span id="mod_login_greeting'.$id_sfx.'">'.sprintf( _UE_HI_NAME, $name ).'</span>';
|
||
}
|
||
}
|
||
|
||
... | ... | |
|
||
$pmsMsg = "";
|
||
if (($total_pms) > 0 ) {
|
||
$pmsMsg .= '<a href="'.cbSef("$pms_link").'" class="mod_login'.$class_sfx.'" id="mod_login_pmsimg'.$class_sfx.'">';
|
||
$pmsMsg .= '<img border="0" src="'.$urlImgPath.'mail.gif" width="14" height="15" alt="NEW" class="mod_login'.$class_sfx.'" id="mod_login_messagesimg'.$class_sfx.'" /></a><br />'."\n";
|
||
$pmsMsg .= '<a href="'.cbSef("$pms_link").'" class="mod_login'.$class_sfx.'" id="mod_login_pmsa'.$class_sfx.'">';
|
||
$pmsMsg .= '<span id="mod_login_messagestext'.$class_sfx.'">'._UE_PM_MESSAGES_HAVE." ".$total_pms." ".($total_pms == 1 ? _UE_PM_NEW_MESSAGE : _UE_PM_NEW_MESSAGES)."</span></a>\n";
|
||
$pmsMsg .= '<a href="'.cbSef("$pms_link").'" class="mod_login'.$class_sfx.'" id="mod_login_pmsimg'.$id_sfx.'">';
|
||
$pmsMsg .= '<img border="0" src="'.$urlImgPath.'mail.gif" width="14" height="15" alt="NEW" class="mod_login'.$class_sfx.'" id="mod_login_messagesimg'.$id_sfx.'" /></a><br />'."\n";
|
||
$pmsMsg .= '<a href="'.cbSef("$pms_link").'" class="mod_login'.$class_sfx.'" id="mod_login_pmsa'.$id_sfx.'">';
|
||
$pmsMsg .= '<span id="mod_login_messagestext'.$id_sfx.'">'._UE_PM_MESSAGES_HAVE." ".$total_pms." ".($total_pms == 1 ? _UE_PM_NEW_MESSAGE : _UE_PM_NEW_MESSAGES)."</span></a>\n";
|
||
} else {
|
||
if($show_pms >= 2 ) {
|
||
$pmsMsg .= '<a href="'.cbSef("$pms_link").'" class="mod_login'.$class_sfx.'" id="mod_login_no_pms'.$class_sfx.'">';
|
||
$pmsMsg .= '<span id="mod_login_nomessagestext'.$class_sfx.'">'._UE_PM_NO_MESSAGES."</span></a>\n";
|
||
$pmsMsg .= '<a href="'.cbSef("$pms_link").'" class="mod_login'.$class_sfx.'" id="mod_login_no_pms'.$id_sfx.'">';
|
||
$pmsMsg .= '<span id="mod_login_nomessagestext'.$id_sfx.'">'._UE_PM_NO_MESSAGES."</span></a>\n";
|
||
}
|
||
}
|
||
if ($pmsMsg) {
|
||
if ( !$horizontal ) echo $preDiv.' margin-top:0.7em;" id="mod_login_pms'.$class_sfx.'">';
|
||
if ( !$horizontal ) echo $preDiv.' margin-top:0.7em;" id="mod_login_pms'.$id_sfx.'">';
|
||
echo $pmsMsg;
|
||
if ( !$horizontal ) echo $postDiv;
|
||
}
|
||
... | ... | |
if(!$_CB_database->setQuery($query)) print $_CB_database->getErrorMsg();
|
||
$totalpendingconnections = $_CB_database->loadResult();
|
||
if($totalpendingconnections > 0) {
|
||
if ( !$horizontal ) echo '<div style="margin:0.7em 0px 0px 0px; align:center; text-align:center;" id="mod_login_connections'.$class_sfx.'">';
|
||
echo "<span id='mod_login_pendingConn".$class_sfx."'>";
|
||
echo "<a href='".cbSef("index.php?option=com_comprofiler&task=manageConnections".$andItemid)."' class='mod_login".$class_sfx."' id='mod_login_connectimg".$class_sfx."'>";
|
||
echo '<img border="0" src="'.$urlImgPath.'users.gif" width="21" height="15" alt="NEW" class="mod_login'.$class_sfx.'" id="mod_login_connections_img'.$class_sfx.'" />';
|
||
if ( !$horizontal ) echo '<div style="margin:0.7em 0px 0px 0px; align:center; text-align:center;" id="mod_login_connections'.$id_sfx.'">';
|
||
echo "<span id='mod_login_pendingConn".$id_sfx."'>";
|
||
echo "<a href='".cbSef("index.php?option=com_comprofiler&task=manageConnections".$andItemid)."' class='mod_login".$class_sfx."' id='mod_login_connectimg".$id_sfx."'>";
|
||
echo '<img border="0" src="'.$urlImgPath.'users.gif" width="21" height="15" alt="NEW" class="mod_login'.$class_sfx.'" id="mod_login_connections_img'.$id_sfx.'" />';
|
||
echo "</a> ";
|
||
echo "<a href='".cbSef("index.php?option=com_comprofiler&task=manageConnections".$andItemid)."' class='mod_login".$class_sfx."' id='mod_login_connect".$class_sfx."'>";
|
||
echo "<a href='".cbSef("index.php?option=com_comprofiler&task=manageConnections".$andItemid)."' class='mod_login".$class_sfx."' id='mod_login_connect".$id_sfx."'>";
|
||
echo _UE_PM_MESSAGES_HAVE." ".$totalpendingconnections." "._UE_CONNECTIONREQUIREACTION."</a></span>";
|
||
if ( !$horizontal ) echo "</div>";
|
||
}
|
||
... | ... | |
$loginPost = "https://" . substr($loginPost, 12); // same for https
|
||
}
|
||
|
||
echo '<form action="'.$loginPost.'" method="post" id="mod_loginform'.$class_sfx.'" ';
|
||
echo '<form action="'.$loginPost.'" method="post" id="mod_loginform'.$id_sfx.'" ';
|
||
/*
|
||
if ($compact) {
|
||
echo "onsubmit=\""
|
||
... | ... | |
. '</label>'
|
||
;
|
||
|
||
echo '<span id="mod_login_usernametext'.$class_sfx.'">'.$txtusername.'</span>';
|
||
echo '<span id="mod_login_usernametext'.$id_sfx.'">'.$txtusername.'</span>';
|
||
}
|
||
if ( $compact || ( $show_username_pass_icons == 2 ) ) {
|
||
$bgstyleUser .= ' title="' . $userNameText . '"';
|
||
... | ... | |
} elseif ( ( ! $compact ) && ( $show_username_pass_icons != 2 ) ) {
|
||
echo "<br />\n";
|
||
}
|
||
echo '<input type="text" name="username" id="mod_login_username'.$class_sfx.'" class="inputbox'.$class_sfx.'" size="'.$name_lenght.'"' . $bgstyleUser . ' />';
|
||
echo '<input type="text" name="username" id="mod_login_username'.$id_sfx.'" class="inputbox'.$class_sfx.'" size="'.$name_lenght.'"' . $bgstyleUser . ' />';
|
||
if ($horizontal) {
|
||
echo " \n";
|
||
} else { // if (!$compact) {
|
||
echo "<br />\n";
|
||
}
|
||
if (!$compact) {
|
||
echo '<span id="mod_login_passwordtext'.$class_sfx.'">'.$txtpassword.'</span>';
|
||
echo '<span id="mod_login_passwordtext'.$id_sfx.'">'.$txtpassword.'</span>';
|
||
}
|
||
if ($horizontal) {
|
||
echo " ";
|
||
} elseif ( ( ! $compact ) && ( $show_username_pass_icons != 2 ) ) {
|
||
echo "<br />";
|
||
}
|
||
echo '<span><input type="password" name="passwd" id="mod_login_password'.$class_sfx.'" class="inputbox'.$class_sfx.'" size="'.$pass_lenght.'"' . $bgstylePass . ' /></span>';
|
||
echo '<span><input type="password" name="passwd" id="mod_login_password'.$id_sfx.'" class="inputbox'.$class_sfx.'" size="'.$pass_lenght.'"' . $bgstylePass . ' /></span>';
|
||
if ($horizontal) {
|
||
echo " \n";
|
||
} else {
|
||
... | ... | |
|
||
switch ($remember_enabled) {
|
||
case 1:
|
||
echo '<input type="checkbox" name="remember" id="mod_login_remember'.$class_sfx.'"' . ( $class_sfx ? ' class="inputbox'.$class_sfx.'"' : '' ) . ' value="yes" /> '
|
||
.'<span id="mod_login_remembermetext'.$class_sfx.'"><label for="mod_login_remember'.$class_sfx.'">'._UE_REMEMBER_ME."</label></span>";
|
||
echo '<input type="checkbox" name="remember" id="mod_login_remember'.$id_sfx.'"' . ( $class_sfx ? ' class="inputbox'.$class_sfx.'"' : '' ) . ' value="yes" /> '
|
||
.'<span id="mod_login_remembermetext'.$id_sfx.'"><label for="mod_login_remember'.$class_sfx.'">'._UE_REMEMBER_ME."</label></span>";
|
||
if ($horizontal) echo " \n"; else echo "<br />\n";
|
||
break;
|
||
case 2:
|
||
echo '<input type="hidden" name="remember" value="yes" />';
|
||
break;
|
||
case 3:
|
||
echo '<input type="checkbox" name="remember" id="mod_login_remember'.$class_sfx.'"' . ( $class_sfx ? ' class="inputbox'.$class_sfx.'"' : '' ) . ' value="yes" checked="checked" /> '
|
||
.'<span id="mod_login_remembermetext'.$class_sfx.'"><label for="mod_login_remember'.$class_sfx.'">'._UE_REMEMBER_ME."</label></span>";
|
||
echo '<input type="checkbox" name="remember" id="mod_login_remember'.$id_sfx.'"' . ( $class_sfx ? ' class="inputbox'.$class_sfx.'"' : '' ) . ' value="yes" checked="checked" /> '
|
||
.'<span id="mod_login_remembermetext'.$id_sfx.'"><label for="mod_login_remember'.$class_sfx.'">'._UE_REMEMBER_ME."</label></span>";
|
||
if ($horizontal) echo " \n"; else echo "<br />\n";
|
||
break;
|
||
default:
|
||
... | ... | |
}
|
||
if ($registration_enabled && $show_newaccount) {
|
||
if ($horizontal || ( $show_remind_register_icons == 2 ) ) {
|
||
echo ' <span id="mod_login_noaccount'.$class_sfx.'">';
|
||
echo ' <span id="mod_login_noaccount'.$id_sfx.'">';
|
||
} else {
|
||
echo "<tr><td>";
|
||
}
|