| 1 |
<!DOCTYPE html> |
| 2 |
<html> |
| 3 |
<head> |
| 4 |
<meta http-equiv="Content-type" content="text/html;charset=UTF-8"> |
| 5 |
|
| 6 |
<link rel="stylesheet" type="text/css" href="ch5m3dq.css" /> |
| 7 |
<script type="text/javascript" src="ch5m3dq.js"></script> |
| 8 |
<title>CH5M3D</title> |
| 9 |
</head> |
| 10 |
|
| 11 |
<body onload="initialize()"> |
| 12 |
|
| 13 |
|
| 14 |
<p class="QCHeader"> |
| 15 |
CH<sub>5</sub>M<sub>3D</sub> |
| 16 |
</p> |
| 17 |
<ul id="Toolbar"> |
| 18 |
|
| 19 |
<li><a href="../index.html">CH5M3D Home</a><ul> |
| 20 |
</ul></li> |
| 21 |
<li><a href="qchem.html">CH5M3D - GAMESS</a><ul> |
| 22 |
</ul></li> |
| 23 |
<li>Documentation<ul> |
| 24 |
<li><a href="../doc/introduction.html">Introduction</a></li> |
| 25 |
<li><a href="../doc/installation.html">Installation</a></li> |
| 26 |
<li><a href="../doc/browser.html">Web Browsers</a></li> |
| 27 |
<li><a href="../doc/view.html">User Interface</a></li> |
| 28 |
<li><a href="../doc/keyboard.html">Keyboard/Mouse</a></li> |
| 29 |
<li><a href="../doc/drawing.html">Drawing</a></li> |
| 30 |
<li><a href="../doc/fileformat.html">File Format</a></li> |
| 31 |
<li><a href="../documentation.pdf">PDF Manual</a></li> |
| 32 |
</ul></li> |
| 33 |
<li>Variations<ul> |
| 34 |
<li><a href="../doc/description.html">Description</a></li> |
| 35 |
<li><a href="../variations/serverView.html">Pre-Load</a></li> |
| 36 |
<li><a href="../variations/chooser.html">Chooser</a></li> |
| 37 |
<li><a href="../variations/gallery.html">Gallery</a></li> |
| 38 |
<li><a href="../variations/viewer300.html">Viewer (only)</a></li> |
| 39 |
<li><a href="../variations/viewer2x.html">View 2 Windows</a></li> |
| 40 |
<li><a href="../variations/two.html">Two Windows</a></li> |
| 41 |
<li><a href="../variations/api.html">Javascript</a></li> |
| 42 |
<li><a href="qchem.php">Quantum Interface</a></li> |
| 43 |
</ul></li> |
| 44 |
<li>Information<ul> |
| 45 |
<li><a href="../doc/about.html">About</a></li> |
| 46 |
<li><a href="http://sourceforge.net/projects/ch5m3d/">Project Homepage</a></li> |
| 47 |
<li><a href="../doc/apidoc.html">Library API Info</a></li> |
| 48 |
<li><a href="https://www.gnu.org/licenses/gpl.html">GNU License</a></li> |
| 49 |
</ul></li> |
| 50 |
<li class="UserName">Welcome <? echo $_SERVER['PHP_AUTH_USER'] ?></li> |
| 51 |
</ul> |
| 52 |
|
| 53 |
|
| 54 |
|
| 55 |
<p class="indent">Complete the following section to change your password.</p> |
| 56 |
<form name="QCPassForm"> |
| 57 |
<label for="username">Username:</label> |
| 58 |
<input type="text" id="username" maxlength="15" /><br /> |
| 59 |
<label for="oldPass">Old Password:</label> |
| 60 |
<input type="password" id="oldPass" maxlength="20" /><br /> |
| 61 |
<label for="newPass">New Password:</label> |
| 62 |
<input type="password" id="newPass" maxlength="20" /><br /> |
| 63 |
<label for="verify">Verify New Password:</label> |
| 64 |
<input type="password" id="verify" maxlength="20" /><br /> |
| 65 |
<label for="changePW"> </label> |
| 66 |
<input type="button" id="changePW" onclick="changePass()" value="Change Password" /> |
| 67 |
|
| 68 |
<p class="indent">Return to <a href="index.php">Quantum Chemistry Interface</a> page.</p> |
| 69 |
|
| 70 |
<script type="text/javascript"> |
| 71 |
// -------------------- Functions to process password requests -------------------- |
| 72 |
|
| 73 |
// |
| 74 |
// Function to change user's password |
| 75 |
// |
| 76 |
function changePass() { |
| 77 |
|
| 78 |
var url = "newpass.php"; |
| 79 |
var QCUser = document.QCPassForm.username.value; |
| 80 |
var QColdpass = document.QCPassForm.oldPass.value; |
| 81 |
var QCnewpass = document.QCPassForm.newPass.value; |
| 82 |
var QCverify = document.QCPassForm.verify.value; |
| 83 |
|
| 84 |
if (QCnewpass != QCverify) { |
| 85 |
alert("New passwords do NOT match"); |
| 86 |
return; |
| 87 |
} |
| 88 |
|
| 89 |
// Create XML object |
| 90 |
// Should(?) work for IE7+, Firefox, Chrome, Opera, Safari |
| 91 |
try { |
| 92 |
var xmlhttp = new XMLHttpRequest(); |
| 93 |
} catch(e) { |
| 94 |
alert("ERROR: Unable to establish connection to change password."); |
| 95 |
return; |
| 96 |
} |
| 97 |
|
| 98 |
// Respond to php function output |
| 99 |
xmlhttp.onreadystatechange = function() { |
| 100 |
if(xmlhttp.readyState == 4 && xmlhttp.status==200) { |
| 101 |
var status = xmlhttp.responseText; |
| 102 |
// alert("RESPONSE: ["+status+"]"); |
| 103 |
if (status == 0) { |
| 104 |
window.location = "index.php"; |
| 105 |
} |
| 106 |
if (status != 0) { |
| 107 |
alert("ERROR: "+status); |
| 108 |
} |
| 109 |
} |
| 110 |
} |
| 111 |
|
| 112 |
// Combine information to send to PHP file |
| 113 |
contents = "username=" + QCUser; |
| 114 |
contents += "&oldpass=" + QColdpass; |
| 115 |
contents += "&newpass=" + QCnewpass; |
| 116 |
|
| 117 |
// "Post" data to php routine |
| 118 |
xmlhttp.open("POST",url,true); |
| 119 |
xmlhttp.setRequestHeader("Content-type","application/x-www-form-urlencoded"); |
| 120 |
xmlhttp.send(contents); |
| 121 |
} |
| 122 |
|
| 123 |
</script> |
| 124 |
|
| 125 |
</body> |
| 126 |
</html> |
| 127 |
|
| 128 |
<div class="Footer" id="Footer"> |
| 129 |
The chem3d.js library copyright © 2013 by Clarke Earley<br /> |
| 130 |
and is distributed under the terms of the |
| 131 |
<a href="http://www.gnu.org/licenses/gpl.html">GNU General Public License</a>. |
| 132 |
</div> |
| 133 |
|
| 134 |
</body> |
| 135 |
</html> |