Esempio n. 1
0
    }
    if (get($Opt, "contactdb_dsn") && get($Opt, "contactdb_loginFormHeading")) {
        echo $Opt["contactdb_loginFormHeading"];
    }
    $password_reset = $Conf->session("password_reset");
    if ($password_reset && $password_reset->time < $Now - 900) {
        $password_reset = null;
        $Conf->save_session("password_reset", null);
    }
    echo '<div class="f-ii">
  <div class="f-c', $email_class, '">', isset($Opt["ldapLogin"]) ? "Username" : "Email", '</div>
  <div class="f-e', $email_class, '">', Ht::entry("email", isset($_REQUEST["email"]) ? $_REQUEST["email"] : ($password_reset ? $password_reset->email : ""), ["size" => 36, "tabindex" => 1, "id" => "signin_email"]), '</div>
</div>
<div class="f-i fx">
  <div class="f-c', $password_class, '">Password</div>
  <div class="f-e">', Ht::password("password", "", array("size" => 36, "tabindex" => 1, "id" => "signin_password")), "</div>\n</div>\n";
    if ($password_reset) {
        $Conf->echoScript("jQuery(function(){jQuery(\"#signin_password\").val(" . json_encode($password_reset->password) . ")})");
    }
    if (isset($Opt["ldapLogin"])) {
        echo Ht::hidden("action", "login");
    } else {
        echo "<div class='f-i'>\n  ", Ht::radio("action", "login", true, array("tabindex" => 2, "id" => "signin_action_login")), "&nbsp;", Ht::label("<b>Sign me in</b>"), "<br />\n";
        echo Ht::radio("action", "forgot", false, array("tabindex" => 2)), "&nbsp;", Ht::label("I forgot my password"), "<br />\n";
        echo Ht::radio("action", "new", false, array("tabindex" => 2)), "&nbsp;", Ht::label("I’m a new user and want to create an account");
        echo "\n</div>\n";
        $Conf->footerScript("function login_type() {\n    var act = jQuery(\"#homeacct input[name=action]:checked\")[0] || jQuery(\"#signin_action_login\")[0];\n    fold(\"homeacct\", act.value != \"login\");\n    var felt = act.value != \"login\" || !jQuery(\"#signin_email\").val().length;\n    jQuery(\"#signin_\" + (felt ? \"email\" : \"password\"))[0].focus();\n    jQuery(\"#signin_signin\")[0].value = {\"login\":\"Sign in\",\"forgot\":\"Reset password\",\"new\":\"Create account\"}[act.value];\n}\njQuery(\"#homeacct input[name='action']\").on('click',login_type);jQuery(login_type)");
    }
    echo "<div class='f-i'>", Ht::submit("signin", "Sign in", array("tabindex" => 1, "id" => "signin_signin")), "</div></div></form>\n<hr class='home' /></div>\n";
    $Conf->footerScript("crpfocus(\"login\", null, 2)");
}
Esempio n. 2
0
                $capmgr->delete($capdata);
                $Conf->save_session("password_reset", (object) array("time" => $Now, "email" => $Acct->email, "password" => $_POST["password"]));
                go(hoturl("index"));
            }
        }
    }
    $password_class = " error";
}
$Conf->header("Reset password", "resetpassword", null);
if (!isset($_POST["autopassword"]) || trim($_POST["autopassword"]) != $_POST["autopassword"] || strlen($_POST["autopassword"]) < 16 || !preg_match("/\\A[-0-9A-Za-z@_+=]*\\z/", $_POST["autopassword"])) {
    $_POST["autopassword"] = Contact::random_password();
}
echo "<div class='homegrp'>\nWelcome to the ", htmlspecialchars($Conf->full_name()), " submissions site.";
if (opt("conferenceSite")) {
    echo " For general information about ", htmlspecialchars($Conf->short_name), ", see <a href=\"", htmlspecialchars(opt("conferenceSite")), "\">the conference site</a>.";
}
echo "</div>\n<hr class='home' />\n<div class='homegrp' id='homereset'>\n", Ht::form(hoturl_post("resetpassword")), '<div class="f-contain">', Ht::hidden("resetcap", $resetcap), Ht::hidden("autopassword", $_POST["autopassword"]), "<p>Use this form to reset your password. You may want to use the random password we’ve chosen.</p>";
echo '<table style="margin-bottom:2em">', '<tr><td class="lcaption">Your email</td><td>', htmlspecialchars($Acct->email), '</td></tr>
<tr><td class="lcaption">Suggested password</td><td>', htmlspecialchars($_POST["autopassword"]), '</td></tr></table>';
echo '<div class="f-i">
  <div class="f-c', $password_class, '">New password</div>
  <div class="f-e">', Ht::password("password", "", array("id" => "login_d", "tabindex" => 1, "size" => 36)), '</div>
</div>
<div class="f-i">
  <div class="f-c', $password_class, '">New password (again)</div>
  <div class="f-e">', Ht::password("password2", "", array("tabindex" => 1, "size" => 36)), '</div>
</div>
<div class="f-i" style="margin-top:2em">', Ht::submit("go", "Reset password", array("tabindex" => 1)), "</div>\n</div></form>\n<hr class='home' /></div>\n";
Ht::stash_script("crpfocus(\"login\", null, 2)");
echo '<hr class="c" />', "\n";
$Conf->footer();
Esempio n. 3
0
}
echo "    <tr>\n";
foreach ($buttons as $b) {
    $x = is_array($b) ? $b[0] : $b;
    echo "      <td class='ptb_button'>", $x, "</td>\n";
}
echo "    </tr>\n    <tr>\n";
foreach ($buttons as $b) {
    $x = is_array($b) ? $b[1] : "";
    echo "      <td class='ptb_explain'>", $x, "</td>\n";
}
echo "    </tr>\n    </table></div>\n";
echo "</div>\n", "</div>\n", "</form>\n";
if ($newProfile) {
    echo '</div><div class="fx9">';
    echo Ht::form(hoturl_post("profile", join("&amp;", $form_params)), array("id" => "accountform", "autocomplete" => "off")), "<div class='profiletext aahc", $UserStatus->nerrors ? " alert" : "", "'>\n", Ht::password("chromefooler", "", array("style" => "display:none"));
    create_modes(true);
    $bulkentry = @$_REQUEST["bulkentry"];
    if ($bulkentry === null && ($session_bulkentry = $Conf->session("profile_bulkentry")) && is_array($session_bulkentry) && $session_bulkentry[0] > $Now - 5) {
        $bulkentry = $session_bulkentry[1];
        $Conf->save_session("profile_bulkentry", null);
    }
    echo '<div class="f-contain"><div class="f-i"><div class="f-e">', Ht::textarea("bulkentry", $bulkentry, ["rows" => 1, "cols" => 80, "placeholder" => "Enter users one per line"]), '</div></div></div>';
    echo '<div class="g"><strong>OR</strong> &nbsp;', '<input type="file" name="bulk" size="30" /></div>';
    echo '<div>', Ht::submit("bulkregister", "Save accounts"), '</div>';
    echo "<p>Enter or upload CSV user data, including a header to explain your format. For example:</p>\n", '<pre class="entryexample">
name,email,affiliation,roles
John Adams,john@earbox.org,UC Berkeley,pc
"Adams, John Quincy",quincy@whitehouse.gov
</pre>', "\n", '<p>Or just enter an email address per line.</p>', '<p>Supported CSV fields include:</p><table>', '<tr><td class="lmcaption"><code>name</code></td>', '<td>User name</td></tr>', '<tr><td class="lmcaption"><code>first</code></td>', '<td>First name</td></tr>', '<tr><td class="lmcaption"><code>last</code></td>', '<td>Last name</td></tr>', '<tr><td class="lmcaption"><code>affiliation</code></td>', '<td>Affiliation</td></tr>', '<tr><td class="lmcaption"><code>roles</code></td>', '<td>User roles: blank, “<code>pc</code>”, “<code>chair</code>”, or “<code>sysadmin</code>”</td></tr>', '<tr><td class="lmcaption"><code>tags</code></td>', '<td>PC tags (space-separated)</td></tr>', '<tr><td class="lmcaption"><code>add_tags</code>, <code>remove_tags</code></td>', '<td>PC tags to add or remove</td></tr>', '<tr><td class="lmcaption"><code>collaborators</code></td>', '<td>Collaborators</td></tr>', '<tr><td class="lmcaption"><code>follow</code></td>', '<td>Email notification: blank, “<code>reviews</code>”, “<code>allreviews</code>”</td></tr>', "</table>\n";
    echo '</div></form></div></div>';