/* Copyright (c) 2009 Arnaud Renevier, Inc, published under the modified BSD
license. */
-require_once ("./inc/settings.php");
+$error = false;
+
+if (!@include_once ("./inc/settings.php")) {
+ $error = true;
+}
require_once ("./inc/db/mysql.php");
require_once ("./inc/utils.php");
-$error = false;
try {
$connection->connect (DBHOST, DBUSER, DBPWD, DBNAME, DBPREFIX);
$usrtblexists = $connection->users_table_exists ();
</head>
<body>
<p class="error center"><?php ptrans('SYP is not correctly installed. Please follow README.txt instructions
- and go to <a href="wizard.en.php">wizard</a>.')?></p>
+ and go to <a href="install.en.php">wizard</a>.')?></p>
</body>
</html>
<?php
UnauthorizedError: "<?php ptrans('Password is not correct.')?>",
NotimageError: "<?php ptrans('File does not look like an image.')?>",
UnconsistentError: "<?php ptrans('Server reply was inconsistent.')?>",
- UnknownError: "<?php ptrans('There was an unknown error.')?>",
DelSucces: "<?php ptrans('Removal took place correctly.')?>",
- UpdateSucces: "<?php ptrans('Save took place correctly.')?>"
+ UpdateSucces: "<?php ptrans('Save took place correctly.')?>",
+ userPasswordmatchError: "<?php ptrans('Passwords do not match.')?>",
+ changeSamePass: "<?php ptrans('New password is the same as old password.')?>",
+ changePassBadPass: "<?php ptrans('Bad password.')?>",
+ changePassSuccess: "<?php ptrans('Password changed correctly.')?>",
+ newUserNonameError: "<?php ptrans('User name has not been set.')?>",
+ newUserExistsError: "<?php ptrans('User already exists in database.')?>",
+ newUserSuccess: "<?php ptrans('User added correctly.')?>"
};
var sypSettings = {
<div id="header">
<?php other_languages($lang) ?>
- <p id="logout"><a href="logout.php"><?php ptrans('Logout')?></a></p>
+ <div id="user_management">
+ <p id="logout" class="user_link"><a href="logout.php"><?php ptrans('Logout')?></a></p>
+ <p id="change_pass" class="user_link"><a href=""><?php ptrans('Change my password')?></a></p>
+ <p id="add_user" class="user_link"><a href=""><?php ptrans('Add a co-administrator')?></a></p>
+ </div>
+ <div id="user_area">
+ <input id="user_close" type="image" src="openlayers/theme/default/img/close.gif"
+ title="<?php ptrans('close without saving')?>" alt="<?php ptrans('close')?>">
+ <form id="changepass" method="post">
+ <label for="pass_current"><?php ptrans('current password:')?></label>
+ <br>
+ <input id="pass_current" name="pass_current" type="password">
+ <br>
+ <label for="pass_new"><?php ptrans('new password:')?></label>
+ <br>
+ <input id="pass_new" name="pass_new" type="password">
+ <br>
+ <label for="pass_new_confirm"><?php ptrans('confirm new password:')?></label>
+ <br>
+ <input id="pass_new_confirm" name="pass_new_confirm" type="password">
+ <br>
+ <input id="pass_submit" name="pass_submit" type="submit" value="<?php ptrans('Validate password')?>">
+ <input type="hidden" name="request" value="changepass">
+ </form>
+ <form id="newuser" method="post">
+ <label for="newuser_name"><?php ptrans('user name:')?></label>
+ <br>
+ <input id="newuser_name" name="newuser_name">
+ <br>
+ <label for="newuser_password"><?php ptrans('user password:')?></label>
+ <br>
+ <input id="newuser_password" name="newuser_password" type="password" value="">
+ <br>
+ <label for="newuser_password_confirm"><?php ptrans('confirm password:')?></label>
+ <br>
+ <input id="newuser_password_confirm" name="newuser_password_confirm" type="password">
+ <br>
+ <input id="newuser_submit" name="newuser_submit" type="submit" value="<?php ptrans('Validate user')?>">
+ <input type="hidden" name="request" value="newuser">
+ </form>
+ <p id="user_comm" class="center"></p>
+ <p id="user_throbber" class="throbber center">
+ <?php ptrans('Connecting')?>
+ <img src="media/newuser-throbber.gif" alt="<?php ptrans('throbber')?>">
+ </p>
+ </div>
</div>
</form>
<p id="editor_throbber" class="throbber center">
<?php ptrans('Connecting')?>
- <img src="media/editor-throbber.gif">
+ <img src="media/editor-throbber.gif" alt="<?php ptrans('throbber')?>">
</p>
</div>
</p>
<p id="pwd_throbber" class="throbber center">
<?php ptrans('Connecting')?>
- <img src="media/pwd-throbber.gif" alt="throbber">
+ <img src="media/pwd-throbber.gif" alt="<?php ptrans('throbber')?>">
</p>
<p class="error center" id="login_error"></p>
</form>