Ejemplo n.º 1
0
        <th align="right"><?php 
echo _("New Password:"******"Verify New Password:"******"center" colspan="2">
        <?php 
echo addSubmit(_("Change Password"), 'cpw_go');
?>
</td>
      </tr>
    </table>
    </form>
</td></tr>
</table>
</body></html>
Ejemplo n.º 2
0
 /**
  * Create string field
  *
  * @param boolean $password When TRUE, the text in the input
  *                          widget will be obscured (OPTIONAL;
  *                          default = FALSE).
  *
  * @return string html formated option field
  *
  */
 function createWidget_String($password = FALSE)
 {
     switch ($this->size) {
         case SMOPT_SIZE_TINY:
             $width = 5;
             break;
         case SMOPT_SIZE_SMALL:
             $width = 12;
             break;
         case SMOPT_SIZE_LARGE:
             $width = 38;
             break;
         case SMOPT_SIZE_HUGE:
             $width = 50;
             break;
         case SMOPT_SIZE_NORMAL:
         default:
             $width = 25;
     }
     //TODO: might be better to have a separate template file for all widgets, because then the layout of the widget and the "trailing text" can be customized - they are still hard coded here
     if ($password) {
         return addPwField('new_' . $this->name, $this->value, $width, 0, $this->aExtraAttribs) . ' ' . sm_encode_html_special_chars($this->trailing_text);
     } else {
         return addInput('new_' . $this->name, $this->value, $width, 0, $this->aExtraAttribs) . ' ' . sm_encode_html_special_chars($this->trailing_text);
     }
 }
Ejemplo n.º 3
0
    @(include $theme[$theme_default]['PATH']);
}
displayHtmlHeader("{$org_name} - " . _("Login"), $header, FALSE);
echo "<body text=\"{$color['8']}\" bgcolor=\"{$color['4']}\" link=\"{$color['7']}\" vlink=\"{$color['7']}\" alink=\"{$color['7']}\" onLoad=\"squirrelmail_loginpage_onload()\">" . "\n" . '<form action="redirect.php" method="post" onSubmit="document.forms[0].js_autodetect_results.value=\'' . SMPREF_JS_ON . '\';">' . "\n";
$username_form_name = 'login_username';
$password_form_name = 'secretkey';
do_hook('login_top');
$loginname_value = sqGetGlobalVar('loginname', $loginname) ? htmlspecialchars($loginname) : '';
/* If they don't have a logo, don't bother.. */
if (isset($org_logo) && $org_logo) {
    /* Display width and height like good little people */
    $width_and_height = '';
    if (isset($org_logo_width) && is_numeric($org_logo_width) && $org_logo_width > 0) {
        $width_and_height = " width=\"{$org_logo_width}\"";
    }
    if (isset($org_logo_height) && is_numeric($org_logo_height) && $org_logo_height > 0) {
        $width_and_height .= " height=\"{$org_logo_height}\"";
    }
}
if (sqgetGlobalVar('mailto', $mailto)) {
    $rcptaddress = addHidden('mailto', $mailto);
} else {
    $rcptaddress = '';
}
echo html_tag('table', html_tag('tr', html_tag('td', '<center>' . (isset($org_logo) && $org_logo ? '<img src="' . $org_logo . '" alt="' . sprintf(_("%s Logo"), $org_name) . '"' . $width_and_height . ' /><br />' . "\n" : '') . (isset($hide_sm_attributions) && $hide_sm_attributions ? '' : '<small>' . sprintf(_("SquirrelMail version %s"), $version) . '<br />' . "\n" . '  ' . _("By the SquirrelMail Development Team") . '<br /></small>' . "\n") . html_tag('table', html_tag('tr', html_tag('td', '<b>' . sprintf(_("%s Login"), $org_name) . "</b>\n", 'center', $color[0])) . html_tag('tr', html_tag('td', "\n" . html_tag('table', html_tag('tr', html_tag('td', _("Name:"), 'right', '', 'width="30%"') . html_tag('td', addInput($username_form_name, $loginname_value), 'left', '', 'width="*"')) . "\n" . html_tag('tr', html_tag('td', _("Password:"******"30%"') . html_tag('td', addPwField($password_form_name) . addHidden('js_autodetect_results', SMPREF_JS_OFF) . $rcptaddress . addHidden('just_logged_in', '1'), 'left', '', 'width="*"')), 'center', $color[4], 'border="0" width="100%"'), 'left', $color[4])) . html_tag('tr', html_tag('td', '<center>' . addSubmit(_("Login")) . '</center>', 'left')), '', $color[4], 'border="0" width="350"') . '</center>', 'center')), '', $color[4], 'border="0" cellspacing="0" cellpadding="0" width="100%"');
do_hook('login_form');
echo '</form>' . "\n";
do_hook('login_bottom');
?>
</body></html>
Ejemplo n.º 4
0
        $height = $org_logo_height;
    } else {
        $height = '';
    }
    $logo_str = create_image($org_logo, sprintf(_("%s Logo"), $org_name), $width, $height, '', 'sqm_loginImage');
}
$sm_attribute_str = '';
if (isset($hide_sm_attributions) && !$hide_sm_attributions) {
    $sm_attribute_str = _("SquirrelMail Webmail") . "\n" . _("By the SquirrelMail Project Team");
}
if (sqgetGlobalVar('mailtodata', $mailtodata)) {
    $mailtofield = addHidden('mailtodata', $mailtodata);
} else {
    $mailtofield = '';
}
$password_field = addPwField('secretkey');
$login_extra = addHidden('js_autodetect_results', SMPREF_JS_OFF) . $mailtofield . addHidden('just_logged_in', '1');
session_write_close();
$oTemplate->assign('logo_str', $logo_str, FALSE);
$oTemplate->assign('logo_path', $org_logo);
$oTemplate->assign('sm_attribute_str', $sm_attribute_str);
// i18n: The %s represents the service provider's name
$oTemplate->assign('org_name_str', sprintf(_("%s Login"), $org_name));
// i18n: The %s represents the service provider's name
$oTemplate->assign('org_logo_str', sprintf(_("The %s logo"), $org_name));
$oTemplate->assign('login_field_value', $loginname_value);
$oTemplate->assign('login_extra', $login_extra, FALSE);
$oTemplate->display('login.tpl');
do_hook('login_bottom', $null);
// Turn off delayed error handling to make sure all errors are dumped.
$oErrorHandler->setDelayedErrors(false);