Exemplo n.º 1
0
function helloworld_User_Header($params)
{
    global $DOCUMENT_ROOT, $HTML, $user_id;
    $params['toptab'] = 'helloworld';
    $params['user'] = $user_id;
    /*                                                                                                                                                              
    Show horizontal links                                                                                                                                   
    */
    site_user_header($params);
}
Exemplo n.º 2
0
function projects_hierarchy_User_Header($params)
{
    global $DOCUMENT_ROOT, $HTML, $user_id;
    $params['toptab'] = 'projects_hierarchy';
    $params['user'] = $user_id;
    /*                                                                                                                                                              
    Show horizontal links                                                                                                                                   
    */
    site_user_header($params);
}
Exemplo n.º 3
0
function quota_management_User_Header($params)
{
    global $DOCUMENT_ROOT, $HTML, $user_id;
    $params['toptab'] = 'quota_management';
    $params['user'] = $user_id;
    /*                                                                                                                                                              
    Show horizontal links                                                                                                                                   
    */
    site_user_header($params);
}
Exemplo n.º 4
0
function webcalendar_User_Header($params)
{
    global $DOCUMENT_ROOT, $HTML, $user_id;
    $params['toptab'] = 'webcalendar';
    $params['user'] = $user_id;
    /*                                                                                                                                                              
    Show horizontal links                                                                                                                                   
    */
    site_user_header($params);
}
Exemplo n.º 5
0
function mediawiki_User_Header($params)
{
    global $DOCUMENT_ROOT, $HTML, $user_id;
    $params['toptab'] = 'mediawiki';
    $params['user'] = $user_id;
    /*                                                                                                                                                              
    Show horizontal links                                                                                                                                   
    */
    site_user_header($params);
}
//
// $Id: change_email-complete.php,v 1.2 2003/11/13 11:29:21 helix Exp $
require "pre.php";
require "account.php";
// ###### function register_valid()
// ###### checks for valid register from form post
$res_user = db_query("SELECT * FROM users WHERE confirm_hash='{$confirm_hash}'");
if (db_numrows($res_user) > 1) {
    exit_error("Error", "This confirm hash exists more than once.");
}
if (db_numrows($res_user) < 1) {
    exit_error("Error", "Invalid confirmation hash.");
}
$row_user = db_fetch_array($res_user);
db_query("UPDATE users SET " . "email='" . $row_user['email_new'] . "'," . "confirm_hash='none'," . "email_new='" . $row_user['email'] . "' WHERE " . "confirm_hash='{$confirm_hash}'");
site_user_header(array('title' => "Email Change Complete"));
?>
<p><b>Email Change Complete</b>
<P>Welcome, <?php 
print $row_user[user_name];
?>
. Your email
change is complete. Your new email address on file is 
<B><?php 
print $row_user[email_new];
?>
</B>. Mail sent to
<?php 
print $row_user['user_name'];
?>
@<?php 
Exemplo n.º 7
0
    /*
     *  If user has valid "remember-me" hash, instantiate not-logged in
     *  session for one.
     */
    if (!user_isloggedin()) {
        list($user_id, $hash) = explode('_', $sf_user_hash);
        $sql = "SELECT * \n\t\t\tFROM users \n\t\t\tWHERE user_id='" . $user_id . "' AND user_pw LIKE '" . $hash . "%'";
        $result = db_query($sql);
        $rows = db_numrows($result);
        if (!$result || $rows != 1) {
            exit_not_logged_in();
        }
        $user_id = db_result($result, 0, 'user_id');
        $G_SESSION = user_get_object($user_id, $result);
    }
    echo site_user_header(array('title' => 'My Personal Page'));
    ?>

	<H2>Personal Page for: <?php 
    print $G_SESSION->getUnixName();
    ?>
</H2>
	<P>
	Your personal page contains lists of bugs and tasks that 
	you are assigned, plus a list of groups that you are a member of.
	<P>
	<TABLE width="100%" border="0">
	<TR><TD VALIGN="TOP" WIDTH="50%">
	<?php 
    /*
    	Bugs assigned to or submitted by this person
Exemplo n.º 8
0
<?php

//
// SourceForge: Breaking Down the Barriers to Open Source Development
// Copyright 1999-2000 (c) The SourceForge Crew
// http://sourceforge.net
//
require 'pre.php';
require 'bookmarks.php';
site_user_header(array("title" => "Delete Bookmark"));
print "<H3>Delete Bookmark</H3>";
if ($bookmark_id) {
    bookmark_delete($bookmark_id);
    print "Bookmark deleted.<P><A HREF=\"/my/\">Return</A>";
}
site_user_footer(array());
Exemplo n.º 9
0
<?php

//
// SourceForge: Breaking Down the Barriers to Open Source Development
// Copyright 1999-2000 (c) The SourceForge Crew
// http://sourceforge.net
//
// $Id: deleted.php,v 1.2 2003/11/13 11:29:21 helix Exp $
require "pre.php";
site_user_header(array(title => "Deleted Account"));
?>

<P><B>Deleted Account</B>

<P>Your account has been deleted. If you have questions regarding your deletion,
please email <A HREF="mailto:staff@<?php 
echo $GLOBALS['sys_default_domain'];
?>
">staff@<?php 
echo $GLOBALS['sys_default_domain'];
?>
</A>.
Inquiries through other channels will be directed to this address.

<?php 
site_user_footer(array());
Exemplo n.º 10
0
    ?>

	<?php 
    printf(_('<h2>%1$s Password Change Confirmation</h2><p>Congratulations. You have changed your password.</p>'), $GLOBALS['sys_name']);
    ?>

	<p>
		 <?php 
    printf(_('You should now <a href="%1$s">Return to User Prefs</a>.'), util_make_url('/account/'));
    ?>
	</p>
	
	<?php 
} else {
    // Show change form
    site_user_header(array('title' => _('Change Password')));
    ?>

	<form action="<?php 
    echo getStringFromServer('PHP_SELF');
    ?>
" method="post">
	<input type="hidden" name="form_key" value="<?php 
    echo form_generate_key();
    ?>
"/>
	<p><?php 
    echo _('Old Password');
    ?>
:
	<br /><input type="password" name="old_passwd" /></p>
Exemplo n.º 11
0
    /*
     *  If user has valid "remember-me" hash, instantiate not-logged in
     *  session for one.
     */
    if (!user_isloggedin()) {
        list($user_id, $hash) = explode('_', $sf_user_hash);
        $sql = "SELECT * \n\t\t\tFROM users \n\t\t\tWHERE user_id='" . $user_id . "' AND user_pw LIKE '" . $hash . "%'";
        $result = db_query($sql);
        $rows = db_numrows($result);
        if (!$result || $rows != 1) {
            exit_not_logged_in();
        }
        $user_id = db_result($result, 0, 'user_id');
        $G_SESSION = user_get_object($user_id, $result);
    }
    echo site_user_header(array('title' => 'My Donations'));
    ?>

<h2>Donations from <?php 
    print $G_SESSION->getUnixName();
    ?>
</h2>

<h3>My Donations to Projects</h3>

<?php 
    $res = db_query("SELECT * FROM group_donors WHERE user_id='" . user_getid() . "'");
    if (db_numrows($res) < 1) {
        echo '<p>No project donations found.';
    } else {
        $rows = db_numrows($res);
Exemplo n.º 12
0
{
    if (!$GLOBALS["Update"]) {
        return 0;
    }
    $GLOBALS[form_authorized_keys] = trim($GLOBALS[form_authorized_keys]);
    $GLOBALS[form_authorized_keys] = ereg_replace("(\r\n)|(\n)", "###", $GLOBALS[form_authorized_keys]);
    // if we got this far, it must be good
    db_query("UPDATE users SET authorized_keys='{$GLOBALS['form_authorized_keys']}' WHERE user_id=" . user_getid());
    return 1;
}
// ###### first check for valid login, if so, congratulate
if (register_valid()) {
    session_redirect("/account/");
} else {
    // not valid registration, or first time to page
    site_user_header(array(title => "Change Authorized Keys"));
    ?>
	<p>
	<b>CVS/SVN/SSH Shared Keys</b>
	<P>
	To avoid having to type your password every time for your CVS/SVN/SSH
	developer account, you may upload your public key(s) here and they
	will be placed on the CVS/SVN/Shell server in your ~/.ssh/authorized_keys file.
	<P>To generate a public key, run the program
	<p><tt>$ ssh-keygen -t rsa</tt>
	<p>The public key will be placed at '~/.ssh/id_rsa.pub'. To install your
	public key immediately in the remote CVS/SVN/Shell servers
        authorized_keys file invoke following command:
	<p><tt>$ ssh-copy-id -i ~/.ssh/id_rsa.pub username@shell.berlios.de</tt>
	<p>Read the ssh documentation for further information on sharing keys.
	<P>Updates will be reflected in the next 6 hour cron job.
Exemplo n.º 13
0
<?php

//
// SourceForge: Breaking Down the Barriers to Open Source Development
// Copyright 1999-2000 (c) The SourceForge Crew
// http://sourceforge.net
//
// $Id: first.php,v 1.2 2003/11/13 11:29:21 helix Exp $
require "pre.php";
site_user_header(array(title => "Welcome to " . $sys_default_name));
?>

<P><B>Welcome to <?php 
echo $sys_default_name;
?>
!</B>

<P>You are now a registered user on <?php 
echo $sys_default_name;
?>
, the online development
environment for Open Source projects.

<P>As a registered user, you can participate fully in the activities
on the site.
You may now post messages to the project message forums, post bugs
for software in <?php 
echo $sys_default_name;
?>
, sign on as a project developer, or even
start your own project.
Exemplo n.º 14
0
require_once $gfwww . 'include/pre.php';
require_once $gfwww . 'include/bookmarks.php';
$bookmark_id = getIntFromRequest('bookmark_id');
if (!$bookmark_id) {
    exit_missing_param();
}
if (getStringFromRequest('submit')) {
    $bookmark_url = getStringFromRequest('bookmark_url');
    $bookmark_title = getStringFromRequest('bookmark_title');
    if ($bookmark_url && $bookmark_title && bookmark_edit($bookmark_id, $bookmark_url, $bookmark_title)) {
        $feedback = _('Bookmark Updated');
    } else {
        $feedback = _('Failed to update bookmark.');
    }
}
site_user_header(array('title' => _('Edit Bookmark')));
$result = db_query("SELECT * from user_bookmarks where " . "bookmark_id='" . $bookmark_id . "' and user_id='" . user_getid() . "'");
if ($result) {
    $bookmark_url = db_result($result, 0, 'bookmark_url');
    $bookmark_title = db_result($result, 0, 'bookmark_title');
}
?>
<form action="<?php 
echo getStringFromServer('PHP_SELF');
?>
" method="post">
<input type="hidden" name="bookmark_id" value="<?php 
echo $bookmark_id;
?>
" />
<p><?php 
Exemplo n.º 15
0
<?php

//
// SourceForge: Breaking Down the Barriers to Open Source Development
// Copyright 1999-2000 (c) The SourceForge Crew
// http://sourceforge.net
//
require 'pre.php';
require 'bookmarks.php';
site_user_header(array("title" => "Edit Bookmark"));
print "<H3>Edit Bookmark</H3>";
if ($bookmark_url && $bookmark_title) {
    bookmark_edit($bookmark_id, $bookmark_url, $bookmark_title);
}
$result = db_query("SELECT * from user_bookmarks where " . "bookmark_id='" . $bookmark_id . "' and user_id='" . user_getid() . "'");
if ($result) {
    $bookmark_url = db_result($result, 0, 'bookmark_url');
    $bookmark_title = db_result($result, 0, 'bookmark_title');
}
?>
<FORM METHOD="POST">
Bookmark URL:<br>
<input type="text" name="bookmark_url" value="<?php 
echo $bookmark_url;
?>
">
<p>
Bookmark Title:<br>
<input type="text" name="bookmark_title" value="<?php 
echo $bookmark_title;
?>
Exemplo n.º 16
0
            $proc_str = 'add';
            $info_str = _('Add A New Entry');
        } else {
            $proc_str = 'update';
            $info_str = _('Update An Entry');
            $_summary = db_result($res, 0, 'summary');
            $_details = db_result($res, 0, 'details');
            $_is_public = db_result($res, 0, 'is_public');
            $_diary_id = db_result($res, 0, 'id');
        }
    } else {
        $proc_str = 'add';
        $info_str = _('Add A New Entry');
        $_diary_id = '';
    }
    echo site_user_header(array('title' => _('My Diary And Notes')));
    echo '
	<p>&nbsp;</p>
	<h3>' . $info_str . '</h3>
	<p />
	<form action="' . getStringFromServer('PHP_SELF') . '" method="post">
	<input type="hidden" name="form_key" value="' . form_generate_key() . '"/>
	<input type="hidden" name="' . $proc_str . '" value="1" />
	<input type="hidden" name="diary_id" value="' . $_diary_id . '" />
	<table>
	<tr><td colspan="2"><strong>' . _('Summary') . ':</strong><br />
		<input type="text" name="summary" size="45" maxlength="60" value="' . $_summary . '" />
	</td></tr>

	<tr><td colspan="2"><strong>' . _('Details') . ':</strong><br />
		<textarea name="details" rows="15" cols="60">' . $_details . '</textarea>
Exemplo n.º 17
0
        $res = db_query("\n\t    UPDATE user_donate SET\n        business='{$business}',\n        item_name='{$item_name}',\n        item_number='{$item_number}',\n        amount='{$amount}',\n        image_url='{$image_url}',\n        return='{$return}',\n        rm='{$rm}',\n        cancel_return='{$cancel_return}',\n        no_note='{$no_note}',\n        cn='{$cn}',\n        cs='{$cs}',\n        currency_code='{$currency_code}',\n        lc='{$lc}'\n\t    WHERE user_id='" . user_getid() . "'\n\t");
        if (!$res || db_affected_rows($res) < 1) {
            $feedback .= "Could not update User's Donate entry: " . db_error();
        } else {
            $feedback .= "User Donation updated";
        }
    }
    if ($delete) {
        $res = db_query("\n\t\tDELETE FROM user_donate \n\t\tWHERE user_id='" . user_getid() . "'\n\t");
        if (!$res || db_affected_rows($res) < 1) {
            $feedback .= "Could not delete User's Donate entry: " . db_error();
        } else {
            $feedback .= "User Donation deleted";
        }
    }
    echo site_user_header(array('title' => 'User Donation Management'));
    ?>

<h2>User Donation Management</h2>

<h3>Create/Update/Delete User Donation</h3>
<p>
To add a User's donation button on your User's homepage create your account on <a href="https://www.paypal.com/cgi-bin/webscr?cmd=_help-ext&amp;source_page=_help-ext">PayPal</a> and fill-in your data in the following form.
<p>
Clicking on "Create/Update" will schedule the creation of the PayPal button and "Delete" will remove your data.
<p>

<?php 
    $res_db = db_query("\n\tSELECT *\n\tFROM user_donate \n\tWHERE user_id='" . user_getid() . "'\n");
    if (db_numrows($res_db) > 0) {
        $row = db_fetch_array($res_db);
Exemplo n.º 18
0
    	 * /
    	if (!session_loggedin()) {
    			list($user_id,$hash)=explode('_',$sf_user_hash);
    			$sql="SELECT *
    			FROM users
    			WHERE user_id='".$user_id."' AND user_pw LIKE '".$hash."%'";
    
    		$result=db_query($sql);
    		$rows=db_numrows($result);
    		if (!$result || $rows != 1) { exit_not_logged_in();
    		}
    		$user_id=db_result($result,0,'user_id');
    		session_get_user()=user_get_object($user_id,$result);
    	}
    */
    echo site_user_header(array('title' => sprintf(_('Personal Page For %s'), user_getname())));
    $tabcnt = 0;
    ?>
<script type="text/javascript" src="<?php 
    echo util_make_url('/tabber/tabber.js');
    ?>
"></script>
<div id="tabber" class="tabber" <?php 
    plugin_hook('call_user_js');
    ?>
>
<div class="tabbertab" 
title="<?php 
    echo _('Assigned Artifacts');
    ?>
">
Exemplo n.º 19
0
    /*
     *  If user has valid "remember-me" hash, instantiate not-logged in
     *  session for one.
     */
    if (!user_isloggedin()) {
        list($user_id, $hash) = explode('_', $sf_user_hash);
        $sql = "SELECT * \n          FROM users \n\t\t  WHERE user_id='" . $user_id . "' AND user_pw LIKE '" . $hash . "%'";
        $result = db_query($sql);
        $rows = db_numrows($result);
        if (!$result || $rows != 1) {
            exit_not_logged_in();
        }
        $user_id = db_result($result, 0, 'user_id');
        $G_SESSION = user_get_object($user_id, $result);
    }
    site_user_header(array('title' => "My Donation Management"));
    echo '
	  <H2>My Donation Management</H2>
	  <ul>
	  <li><A HREF="my_donation_admin.php">Create/Update/Delete my Donation Parameters for PayPal</A><BR>
      <li><A HREF="my_donors_admin.php">Manage my Donors</A>
	  <ul>
      <li><A HREF="my_donors_admin.php?status=P">Donors in <b>P</b> (Pending) Status</A>
      <li><A HREF="my_donors_admin.php?status=A">Donors in <b>A</b> (Approved) Status</A>
      <li><A HREF="my_donors_admin.php?status=D">Donors in <b>D</b> (Deleted) Status</A>
      </ul>
      <li><A HREF="my_donations.php">My Donations</A>
      </ul>';
    site_user_footer(array());
} else {
    exit_not_logged_in();
Exemplo n.º 20
0
if (getStringFromRequest('confirm')) {
    $user_id = user_getid();
    if (!$group->removeUser($user_id)) {
        exit_error(_('Error'), $group->getErrorMessage());
    } else {
        session_redirect("/my/");
    }
}
/*
	Main code
*/
$perm =& $group->getPermission(session_get_user());
if ($perm->isAdmin()) {
    exit_error(_('Operation Not Permitted'), sprintf(_('You cannot remove yourself from this project, because you are admin of it. You should ask other admin to reset your admin privilege first. If you are the only admin of the project, please consider posting availability notice to <a href="%s">Help Wanted Board</a> and be ready to pass admin privilege to interested party.'), util_make_url("/people/")));
}
echo site_user_header(array('title' => _('Quitting Project')));
echo '
<h3>' . _('Quitting Project') . ' </h3>
<p>
' . _('You are about to remove yourself from the project. Please confirm your action:') . '
</p>

<table>
<tr><td>

<form action="' . getStringFromServer('PHP_SELF') . '" method="post">
<input type="hidden" name="confirm" value="1" />
<input type="hidden" name="group_id" value="' . $group_id . '" />
<input type="submit" value="' . _('Remove') . '" />
</form>
<?php

//
// SourceForge: Breaking Down the Barriers to Open Source Development
// Copyright 1999-2000 (c) The SourceForge Crew
// http://sourceforge.net
//
// $Id: change_email-confirm.php,v 1.2 2003/11/13 11:29:21 helix Exp $
require "pre.php";
$confirm_hash = substr(md5($session_hash . time()), 0, 16);
$res_user = db_query("SELECT * FROM users WHERE user_id=" . user_getid());
if (db_numrows($res_user) < 1) {
    exit_error("Invalid user", "That user does not exist.");
}
$row_user = db_fetch_array($res_user);
db_query("UPDATE users SET confirm_hash='{$confirm_hash}',email_new='{$form_newemail}' " . "WHERE user_id={$row_user['user_id']}");
$message = "You have requested a change of email address on {$sys_default_name}.\n" . "Please visit the following URL to complete the email change:\n\n" . "https://{$GLOBALS['HTTP_HOST']}/account/change_email-complete.php?confirm_hash={$confirm_hash}\n\n" . " -- the {$sys_default_name} staff\n";
mail($form_newemail, $sys_default_name . " Verification", $message, "From: noreply@{$GLOBALS['HTTP_HOST']}");
site_user_header(array('title' => "Email Change Confirmation"));
?>

<P><B>Confirmation mailed</B>

<P>An email has been sent to the new address. Follow
the instructions in the email to complete the email change.

<P><A href="/">[ Home ]</A>

<?php 
site_user_footer(array());
Exemplo n.º 22
0
        return 0;
    }
    if (!$GLOBALS[form_shell]) {
        $GLOBALS[register_error] = "You must supply a new login shell.";
        return 0;
    }
    // if we got this far, it must be good
    db_query("UPDATE users SET shell='{$GLOBALS['form_shell']}' WHERE user_id=" . user_getid());
    return 1;
}
// ###### first check for valid login, if so, congratulate
if (register_valid()) {
    session_redirect("/account/");
} else {
    // not valid registration, or first time to page
    site_user_header(array(title => "Change Login Shell"));
    ?>
	<p><b>Login Shell Change</b>
	<?php 
    if ($register_error) {
        print "<p>{$register_error}";
    }
    ?>
	<form action="change_shell.php" method="post">
	<p>New Login Shell:
	<select name="form_shell">
	<option>/bin/bash</option>
	<option>/bin/ash</option>
	<option>/bin/csh</option>
	<option>/bin/ksh</option>
	<option>/bin/sh</option>
Exemplo n.º 23
0
<?php

//
// SourceForge: Breaking Down the Barriers to Open Source Development
// Copyright 1999-2000 (c) The SourceForge Crew
// http://sourceforge.net
//
// $Id: change_email.php,v 1.2 2003/11/13 11:29:21 helix Exp $
require "pre.php";
session_require(array('isloggedin' => 1));
site_user_header(array('title' => "Change Email Address"));
?>

<P><B>Change Email Address</B>

<P>Changing your email address will require confirmation from your 
new email address, so that we can ensure we have a good email address
on file.

<P>We need to maintain an accurate email address for each user due
to the level of access we grant via this account. If we need to reach a user
for issues arriving from a shell or project account, it is important that
we be able to do so.

<P>Submitting the form below will mail a confirmation URL to the new
email address. Visiting this link will complete the email change.

<FORM action="change_email-confirm.php" method="post">
<P><INPUT type="hidden" name="form_user" value="<?php 
print user_getid();
?>
Exemplo n.º 24
0
        form_release_key(getStringFromRequest('form_key'));
        exit_error('Could Not Complete Operation', $u->getErrorMessage());
    }
    $message = stripcslashes(sprintf(_('You have requested a change of email address on %1$s.
Please visit the following URL to complete the email change:

%2$s

 -- the %1$s staff'), $GLOBALS['sys_name'], util_make_url('/account/change_email-complete.php?ch=_' . $confirm_hash)));
    util_send_message($newemail, sprintf(_('%1$s Verification'), $GLOBALS['sys_name']), $message);
    site_user_header(array('title' => _('Email Change Confirmation')));
    printf(_('<p>An email has been sent to the new address. Follow the instructions in the email to complete the email change. </p><a href="%1$s">[ Home ]</a>'), util_make_url('/'));
    site_user_footer(array());
    exit;
}
site_user_header(array('title' => _('Email change')));
echo _('<p>Changing your email address will require confirmation from your new email address, so that we can ensure we have a good email address on file.</p><p>We need to maintain an accurate email address for each user due to the level of access we grant via this account. If we need to reach a user for issues arriving from a shell or project account, it is important that we be able to do so.</p>  <p>Submitting the form below will mail a confirmation URL to the new email address. Visiting this link will complete the email change.</p>');
?>

<form action="<?php 
echo getStringFromServer('PHP_SELF');
?>
" method="post">
<input type="hidden" name="form_key" value="<?php 
echo form_generate_key();
?>
"/>
<?php 
echo _('New Email Address:');
?>
<input type="text" name="newemail" maxlength="255" />
Exemplo n.º 25
0
<?php

//
// SourceForge: Breaking Down the Barriers to Open Source Development
// Copyright 1999-2000 (c) The SourceForge Crew
// http://sourceforge.net
//
require 'pre.php';
require 'bookmarks.php';
site_user_header(array("title" => "Add New Bookmark"));
print "<H3>Add New Bookmarks</H3>";
if ($bookmark_url) {
    print "Added bookmark for <b>'{$bookmark_url}'</b> with title <b>'{$bookmark_title}'</b>.<p>";
    bookmark_add($bookmark_url, $bookmark_title);
    print "<A HREF=\"{$bookmark_url}\">Visit the bookmarked page</A> - ";
    print "<A HREF=\"/my/\">Back to your homepage</A>";
} else {
    ?>
	<FORM METHOD=POST>
	Bookmark URL:<br>
	<input type="text" name="bookmark_url" value="http://">
	<p>
	Bookmark Title:<br>
	<input type="text" name="bookmark_title" value="My Fav Site">
	<p>
	<input type="submit" value=" Submit Form ">
	</form>
	<?php 
}
site_user_footer(array());
Exemplo n.º 26
0
require 'timezones.php';
if (!user_isloggedin()) {
    exit_not_logged_in();
}
if ($submit) {
    if (!$timezone || !$language_id) {
        $feedback .= ' Nothing Updated ';
    } else {
        //save the cookie for future visits where not logged in
        setcookie('cookie_language_id', $language_id, time() + 2592000, '/', '', 0);
        // if we got this far, it must be good
        db_query("UPDATE users SET timezone='{$timezone}',language='{$language_id}' WHERE user_id=" . user_getid());
        session_redirect("/account/");
    }
}
site_user_header(array('title' => "Change Timezone &amp; Language"));
?>
<H3>Timezone/Language Change</h3>
<P>
Now, no matter where you live, you can see all dates and times throughout 
<?php 
echo $sys_default_name;
?>
 as if it were in your neighborhood.
<P>
<FORM ACTION="<?php 
echo $PHP_SELF;
?>
" METHOD="POST">
<?php 
echo '<H4>' . $feedback . '</H4>';
Exemplo n.º 27
0
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * GForge 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 GForge; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */
require_once '../env.inc.php';
require_once $gfwww . 'include/pre.php';
require_once $gfwww . 'include/bookmarks.php';
site_user_header(array("title" => _('My Personal Page')));
$bookmark_url = trim(getStringFromRequest('bookmark_url'));
$bookmark_title = trim(getStringFromRequest('bookmark_title'));
if (getStringFromRequest('submit') && $bookmark_url && $bookmark_title) {
    printf(_('Added bookmark for <strong>%1$s</strong> with title <strong>%2$s</strong>'), htmlspecialchars(stripslashes($bookmark_url)), htmlspecialchars(stripslashes($bookmark_title))) . ".<p>&nbsp;</p>";
    bookmark_add($bookmark_url, $bookmark_title);
    print "<a href=\"{$bookmark_url}\">" . _('Visit the bookmarked page') . "</a> - ";
    print "<a href=\"/my/\">" . _('Back to your homepage') . "</a>";
} else {
    ?>
	<form action="<?php 
    echo getStringFromServer('PHP_SELF');
    ?>
" method="post">
	<p><?php 
    echo _('Bookmark URL');
Exemplo n.º 28
0
  *  If user has valid "remember-me" hash, instantiate not-logged in
  *  session for one.
  */
 if (!user_isloggedin()) {
     list($user_id, $hash) = explode('_', $sf_user_hash);
     $sql = "SELECT * \n          FROM users \n\t\t  WHERE user_id='" . $user_id . "' AND user_pw LIKE '" . $hash . "%'";
     $result = db_query($sql);
     $rows = db_numrows($result);
     if (!$result || $rows != 1) {
         exit_not_logged_in();
     }
     $user_id = db_result($result, 0, 'user_id');
     $G_SESSION = user_get_object($user_id, $result);
 }
 $user_id = $G_SESSION->getUserID();
 echo site_user_header(array('title' => 'My Donors Management'));
 echo '<h2>List of my Donors</h2>';
 // Administrative functions for Donations
 /*
 	Set donation to approved
 */
 if ($action == 'approve') {
     db_query("UPDATE user_donors SET status='A' WHERE user_id='{$user_id}' AND add_date='{$date}'");
     echo '<p><font color=red>Update successfull</font>';
 }
 /*
 	Set donation to deleted
 */
 if ($action == 'delete') {
     db_query("UPDATE user_donors SET status='D' WHERE user_id='{$user_id}' AND add_date='{$date}'");
     echo '<p><font color=red>Update successfull</font>';
Exemplo n.º 29
0
    site_user_header(array(title => "Successfully Changed Password"));
    ?>
	<p><b><?php 
    $sys_default_name;
    ?>
 Change Confirmation</b>
	<p>
	Congratulations. You have changed your password.
	This change is immediate on the web site, but will not take
	effect on your shell/cvs account until the next cron update,
	which will happen within the next 6 hours.
	<p>You should now <a href="/account/">Return to UserPrefs</a>.
	<?php 
} else {
    // not valid registration, or first time to page
    site_user_header(array(title => "Change Password"));
    ?>
	<p><b><?php 
    $sys_default_name;
    ?>
 Password Change</b>
	<?php 
    if ($register_error) {
        print "<p>{$register_error}";
    }
    ?>
	<form action="change_pw.php" method="post">
	<p>Old Password:
	<br><input type="password" name="form_oldpw">
	<p>New Password:
	<br><input type="password" name="form_pw">
Exemplo n.º 30
0
}
if (db_numrows($res_user) < 1) {
    exit_error("Error", "Invalid confirmation hash.");
}
$u =& user_get_object(db_result($res_user, 0, 'user_id'), $res_user);
if (!$u || !is_object($u)) {
    exit_error('Error', 'Could Not Get User');
} elseif ($u->isError()) {
    exit_error('Error', $u->getErrorMessage());
}
if (!$u->setEmail($u->getNewEmail())) {
    exit_error('Could Not Complete Operation', $u->getErrorMessage());
} else {
    plugin_hook('change_cal_mail', user_getid());
}
site_user_header(array('title' => _('Email Change Complete')));
?>

<p>
<?php 
printf(_('Welcome, %1$s. Your email change is complete. Your new email address on file is <strong>%2$s</strong>. Mail sent to &lt;%3$s&gt; will now be forwarded to this account.'), $u->getUnixName(), $u->getEmail(), $u->getUnixName() . '@' . $GLOBALS['sys_users_host']);
?>
</p>

<p><?php 
echo util_make_link('/', _('Return'));
?>
</p>

<?php 
site_user_footer(array());