コード例 #1
0
?>
"
          data-tb-user-key="<?php 
echo isset($_SESSION['user_key']) ? $_SESSION['user_key'] : "";
?>
"
          
          data-tb-pop-page="<?php 
echo @$_GET['pp'];
?>
"
          
          ></div>
    </div>
    <div id="popup" class="ol-popup" data-tenbreaths-base-url="<?php 
echo get_server_uri();
?>
">
      <a href="#" id="popup-closer" class="ol-popup-closer"></a>
      <div id="popup-content"></div>
      <div id="popup-buttons">
        <button id="popup-fb-share" >
          <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" id="gel-icon-facebook">
            <path d="M12.1 32V17H8v-5.4h4.1V7c0-3.6 2.4-7 8-7 2.2 0 3.9.2 3.9.2l-.1 5.1h-3.6c-2 0-2.3.9-2.3 2.4v3.9h6l-.3 5.4H18v15h-5.9z"></path>
          </svg>
          <br/>Facebook
        </button>
        <button id="popup-twitter-share" >
          <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" id="gel-icon-twitter">
            <path d="M32 6.1c-1.2.5-2.4.9-3.8 1 1.4-.8 2.4-2.1 2.9-3.6-1.3.8-2.7 1.3-4.2 1.6C25.7 3.8 24 3 22.2 3c-3.6 0-6.6 2.9-6.6 6.6 0 .5.1 1 .2 1.5-5.5-.3-10.3-2.9-13.6-6.9-.6 1-.9 2.1-.9 3.3 0 2.3 1.2 4.3 2.9 5.5-1.1 0-2.1-.3-3-.8v.1c0 3.2 2.3 5.8 5.3 6.4-.6.1-1.1.2-1.7.2-.4 0-.8 0-1.2-.1.8 2.6 3.3 4.5 6.1 4.6-2.2 1.8-5.1 2.8-8.2 2.8-.5 0-1.1 0-1.6-.1 3 1.8 6.5 2.9 10.2 2.9 12.1 0 18.7-10 18.7-18.7v-.9c1.2-.9 2.3-2 3.2-3.3z"/>
          </svg>
コード例 #2
0
function authentication_forgot()
{
    global $mysqli;
    $out = array();
    $email = @$_POST['email'];
    $new_password = @$_POST['password'];
    // see if there is an entry with that email
    $stmt = $mysqli->prepare("SELECT id, email, display_name FROM users WHERE email = ?");
    $stmt->bind_param("s", $email);
    $stmt->execute();
    $stmt->store_result();
    if ($stmt->num_rows == 1) {
        $stmt->bind_result($user_id, $email, $display_name);
        $stmt->fetch();
        // if there is set the MD5 of the new password
        $password_hash = md5($new_password);
        $validation_token = authentication_generate_access_token();
        $stmt2 = $mysqli->prepare("UPDATE users SET validation_token = ?, password_new = ? WHERE `id` = ?");
        $stmt2->bind_param('ssi', $validation_token, $password_hash, $user_id);
        $stmt2->execute();
        // send an email to ask for email validation again.
        $activate_password_link = get_server_uri() . 'activate_password.php?t=' . $validation_token;
        ob_start();
        include '../email_templates/new_password.php';
        $body = ob_get_contents();
        ob_end_clean();
        enqueue_email('new_password', $email, $display_name, 'Ten Breaths Map: New Password', $body);
        $out['success'] = true;
    } else {
        $out['success'] = false;
    }
    return_json($out);
}
コード例 #3
0
<html>
    <head>
        <title>Monitor Email</title>
    </head>
    <body>
        <h1>Ten Breaths Map: Monitor</h1>
        <p>
            New Survey: <a href="<?php 
echo get_server_uri() . 'survey-' . $survey_key;
?>
"><?php 
echo $survey_key;
?>
</a>
        </p>
    </body>
</html>