Example #1
0
    if ($pass != $pass2) {
        $err .= __('Something went wrong with your Passwords, Please recheck') . "<br>";
        $fatal = TRUE;
    }
    if (empty($phone) || empty($pass) || empty($pass2) || empty($mail) || empty($fname) || empty($unmae)) {
        $err .= __('A field was left blank') . "<br>";
        $fatal = TRUE;
    }
    if (!checkEmail($mail)) {
        $err .= __('Problem With email Address') . "<br>";
        $fatal = TRUE;
    }
    if (!$fatal) {
        $result = $user->addNewUser($unmae, $pass, $mail, $fname, $phone);
        $err .= $result['text'];
        $user->populateUser($result['qid']);
    }
    echo '<div id="errors">' . $err . "</div>\t";
} elseif (isUser()) {
    echo '<div id="errors">';
    _e('You are already loged in');
    ?>
					<a href="<?php 
    echo HOME . $_SERVER['REQUEST_URI'];
    ?>
/logout" title="logout"><?php 
    _e('Log Out');
    ?>
</a></div>	
					<?php 
} else {
Example #2
0
<?php

/*
Wiki Wide Web user stats and RSS generator
Author: Jacob I. Torrey
Date: 11/28/07
*/
include 'lib/misc.inc.php';
include 'lib/classes.class.php';
include 'lib/cache.lib.php';
define(NUMITEMS, 5);
if (!isset($_GET['username']) || ($user = usernameToUid($_GET['username'])) == -1) {
    die("User not found");
}
$u = new User();
$u->populateUser($user);
if (isset($_GET['rss'])) {
    header("Content-type: application/rss+xml");
    print '<?xml version="1.0"?><rss version="2.0"><channel>' . "\r\n";
    print "<title>" . ucfirst($u->username) . "'s Wiki Wide Web Feed</title>\r\n";
    print "<link>http://{$_SERVER['SERVER_NAME']}" . $_SERVER['PHP_SELF'] . "?username={$_GET['username']}</link>\r\n";
    print "<description>" . ucfirst($_GET['username']) . "'s Wiki Wide Web Feed</description>\r\n";
    print "<language>en-us</language>\r\n";
    $db = new DB();
    $db->query("SELECT diff.did, site.address, diff.comment, UNIX_TIMESTAMP(diff.time) FROM diff, site WHERE diff.uid = '{$u->uid}' AND site.sid = diff.sid ORDER BY diff.time DESC LIMIT " . NUMITEMS . ";");
    while ($row = $db->fetchRow()) {
        print "<item>\r\n";
        print "<title>Diff #{$row[0]} - {$row[2]}</title>\r\n";
        print "<link>{$row[1]}</link>\r\n";
        print "<description>" . ucfirst($_GET['username']) . " modified {$row[1]} on " . date(DATE_RFC822, $row[3]) . "</description>\r\n";
        print "<pubDate>" . date(DATE_RFC822, $row[3]) . "</pubDate>\r\n";
Example #3
0
 *      
 *      This program is distributed in the hope that it will be useful,
 *      but WITHOUT ANY WARRANTY; without even the implied warranty of
 *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *      GNU General Public License for more details.
 *      
 *      You should have received a copy of the GNU General Public License
 *      along with this program; if not, write to the Free Software
 *      Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
 *      MA 02110-1301, USA.
 */
if (isset($_POST['sublogin'])) {
    $user = new User();
    $frmErr = $user->authUser($_POST['user'], $_POST['pass']);
    if ($frmErr['lvl'] == 1) {
        $user->populateUser($frmErr['uid']);
        $_SESSION['user'] = $user;
    }
}
get_top_nav();
//Call the navigation
?>

<div id="wrap">
	<div id="widecb" >
	<?php 
/*
 * 	We check if the user is logged in
 * 
 */
if (isset($_SESSION['user'])) {
Example #4
0
			<div id="warning">
				<img src="images/beta_medal.png" alt="still in beta" />
				<h2>Warning:</h2>
				<p>This project is still in beta. Use it at your own risk. If you'd like to help develop for it, please let us know by using the information in the contact page.</p>
				<hr />
			</div>
			<div id="important_links">
    	<div id="login">
    	<?php 
if (isset($_COOKIE['remember']) && !isset($_SESSION['username'])) {
    $parse = $_COOKIE['remember'];
    $uid = substr($parse, 0, strpos($parse, '.'));
    $md5 = substr($parse, strpos($parse, '.') + 1);
    if (md5("s3cr3t" . $uid) == $md5) {
        $u = new User();
        $u->populateUser($uid);
        $_SESSION['uid'] = $uid;
        $_SESSION['username'] = $u->username;
        $_SESSION['userdata'] = serialize($u);
        header('Location: index.php');
        die;
    }
} elseif (!isset($_SESSION['username'])) {
    ?>
        <form action="login" method="post" accept-charset="utf-8">
						<div class="form_entry">
							<label for="username">usernm</label><input type="text" name="username" value="" id="username">
						</div>
						<div class="form_entry">
							<label for="password">passwd</label><input type="password" name="password" value="" id="password">
						</div>