예제 #1
0
파일: index.php 프로젝트: rinodung/tuleap
//
// SourceForge: Breaking Down the Barriers to Open Source Development
// Copyright 1999-2000 (c) The SourceForge Crew
// http://sourceforge.net
//
//
require_once 'pre.php';
require_once 'my_utils.php';
require_once 'common/event/EventManager.class.php';
require_once 'common/widget/WidgetLayoutManager.class.php';
$hp = Codendi_HTMLPurifier::instance();
if (user_isloggedin()) {
    // If it's super user and license terms have not yet been agreed then redirect
    // to license agreement page
    if (user_is_super_user() && !license_already_displayed()) {
        session_redirect("/admin/approve_license.php");
    }
    // Make sure this page is not cached because
    // it uses the exact same URL for all user's
    // personal page
    header("Cache-Control: no-cache, no-store, must-revalidate");
    // for HTTP 1.1
    header("Pragma: no-cache");
    // for HTTP 1.0
    if (browser_is_netscape4()) {
        $feedback .= $Language->getText('my_index', 'err_badbrowser');
    }
    $title = $Language->getText('my_index', 'title', array($hp->purify(user_getrealname(user_getid()), CODENDI_PURIFIER_CONVERT_HTML) . ' (' . user_getname() . ')'));
    $GLOBALS['HTML']->includeJavascriptFile('/scripts/scriptaculous/scriptaculous.js');
    my_header(array('title' => $title, 'body_class' => array('widgetable')));
    echo '<p>' . $Language->getText('my_index', 'message') . '</p>';
예제 #2
0
// Copyright 1999-2000 (c) The SourceForge Crew
// http://sourceforge.net
//
//
require_once 'pre.php';
$request = HTTPRequest::instance();
$confirm_hash = $request->get('confirm_hash');
$um = UserManager::instance();
$user = $um->getUserByConfirmHash($confirm_hash);
if ($user == null) {
    exit_error($Language->getText('include_exit', 'error'), $Language->getText('account_lostlogin', 'invalid_hash'));
}
if ($request->isPost() && $request->exist('Update') && $request->existAndNonEmpty('form_pw') && !strcmp($request->get('form_pw'), $request->get('form_pw2'))) {
    $user->setPassword($request->get('form_pw'));
    $um->updateDb($user);
    session_redirect("/");
}
$purifier =& Codendi_HTMLPurifier::instance();
$HTML->header(array('title' => $Language->getText('account_lostlogin', 'title')));
?>
<p><b><?php 
echo $Language->getText('account_lostlogin', 'title');
?>
</b>
<P><?php 
echo $Language->getText('account_lostlogin', 'message', array($purifier->purify($user->getRealName(), CODENDI_PURIFIER_CONVERT_HTML)));
?>
.

<form action="lostlogin.php" method="post">
<p><?php 
예제 #3
0
    } else {
        $GLOBALS['Response']->addFeedback('error', $GLOBALS['Language']->getText('account_preferences', 'error_user_tracker_mailformat'));
    }
}
//
// Perform the update
//
// User
db_query("UPDATE user SET " . "mail_siteupdates=" . $form_mail_site . "," . "mail_va=" . $form_mail_va . "," . "theme='" . db_es($user_theme) . "'," . "sticky_login="******"," . "language_id='" . db_es($language_id) . "' WHERE " . "user_id=" . user_getid());
// Preferences
user_set_preference("user_csv_separator", $user_csv_separator);
user_set_preference("user_csv_dateformat", $user_csv_dateformat);
user_set_preference(Codendi_Mail_Interface::PREF_FORMAT, $user_tracker_mailformat);
if ($username_display !== null) {
    user_set_preference("username_display", $username_display);
}
$user->setLabFeatures($request->existAndNonEmpty('form_lab_features'));
if ($user_theme_variant) {
    $user->setPreference('theme_variant', $user_theme_variant);
}
if ($user_edition_default_format) {
    $user->setPreference(PFUser::EDITION_DEFAULT_FORMAT, $user_edition_default_format);
}
//plugins specific preferences
$em = EventManager::instance();
$em->processEvent('update_user_preferences_appearance', array('request' => $request));
//
// Output
//
session_redirect("/account/index.php");
예제 #4
0
 * Tuleap 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 Tuleap. If not, see <http://www.gnu.org/licenses/>.
 */
require_once 'pre.php';
require_once 'account.php';
require_once 'common/include/CSRFSynchronizerToken.class.php';
require_once 'common/include/lib/Upload.class.php';
$user_manager = UserManager::instance();
$user = $user_manager->getCurrentUser();
if ($user->isAnonymous()) {
    session_redirect("/account/");
}
$csrf = new CSRFSynchronizerToken('/account/change_avatar.php');
if (isset($_FILES['avatar'])) {
    $handle = new Upload($_FILES['avatar']);
    $handle->image_resize = true;
    $handle->image_ratio_crop = 'L';
    $handle->image_y = 50;
    $handle->image_x = 50;
    $handle->image_background_color = '#FFFFFF';
    $handle->image_convert = 'png';
    $handle->file_new_name_body = 'avatar';
    $handle->file_safe_name = false;
    $handle->file_force_extension = false;
    $handle->file_new_name_ext = '';
    $handle->allowed = 'image/*';
예제 #5
0
파일: init.php 프로젝트: vpylypv/taskboard
<?php

/*
 * Copyright (C) 2013 Vitaliy Pylypiv <*****@*****.**>
 *
 * This file is part of FusionForge.
 *
 * FusionForge is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published
 * by the Free Software Foundation; either version 2 of the License,
 * or (at your option) any later version.
 *
 * FusionForge 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 (!$taskboard->getID()) {
    $taskboard = taskboard_init($group_id);
}
session_redirect('/plugins/taskboard/admin/?group_id=' . $group_id . '&action=trackers');
예제 #6
0
    if (permission_exist('DOCUMENT_READ', $docid)) {
        if (!permission_is_authorized('DOCUMENT_READ', $docid, user_getid(), $object_group_id)) {
            exit_error($Language->getText('global', 'perm_denied'), $Language->getText('global', 'error_perm_denied'));
        }
    } else {
        if (!permission_is_authorized('DOCGROUP_READ', $row['doc_group'], user_getid(), $object_group_id)) {
            exit_error($Language->getText('global', 'perm_denied'), $Language->getText('global', 'error_perm_denied'));
        }
    }
    if (user_isloggedin()) {
        //Insert a new entry in the doc_log table only for restricted documents
        $sql = "INSERT INTO doc_log(user_id,docid,time) " . "VALUES ('" . user_getid() . "','" . $docid . "','" . time() . "')";
        $res_insert = db_query($sql);
    }
    // HTML or text files that were copy/pasted are displayed in a Codendi-formatted page.
    // Uploaded files are always displayed as-is.
    if (($row['filetype'] == 'text/html' || $row['filetype'] == 'text/plain') && $row['filesize'] == 0) {
        docman_header(array('title' => $row['title'], 'help' => 'DocumentManager.html'));
        if ($object_group_id != $from_group_id) {
            $group_name = util_get_group_name_from_id($object_group_id);
            print '<H3><span class="feedback">' . $Language->getText('docman_display_doc', 'warning_different_group', array($group_name)) . '</span></H3>';
        }
        // Document data can now contain HTML tags but not php code
        print util_unconvert_htmlspecialchars($row['data']);
        docman_footer($params);
    } else {
        session_redirect("/docman/download.php?docid=" . $docid);
    }
} else {
    exit_error($Language->getText('global', 'error'), $Language->getText('docman_display_doc', 'error_wrongid'));
}
예제 #7
0
// Copyright 1999-2000 (c) The SourceForge Crew
// http://sourceforge.net
//
// $Id: trove_cat_edit.php,v 1.2 2003/11/13 11:29:21 helix Exp $
require "pre.php";
require "trove.php";
session_require(array('group' => '1', 'admin_flags' => 'A'));
// ########################################################
if ($GLOBALS["Submit"]) {
    $newroot = trove_getrootcat($GLOBALS['form_parent']);
    if ($GLOBALS[form_shortname]) {
        db_query('UPDATE trove_cat ' . 'SET ' . 'shortname=\'' . $GLOBALS[form_shortname] . '\',fullname=\'' . $GLOBALS[form_fullname] . '\',description=\'' . $GLOBALS[form_description] . '\',parent=\'' . $GLOBALS[form_parent] . '\',version=' . date("Ymd", time()) . '01' . ',root_parent=\'' . $newroot . '\' WHERE trove_cat_id=' . $GLOBALS["form_trove_cat_id"]);
    }
    // update full paths now
    trove_genfullpaths($newroot, trove_getfullname($newroot), $newroot);
    session_redirect("/admin/trove/trove_cat_list.php");
}
$res_cat = db_query("SELECT * FROM trove_cat WHERE trove_cat_id={$trove_cat_id}");
if (db_numrows($res_cat) < 1) {
    exit_error("No Suck Category", "That trove cat does not exist");
}
$row_cat = db_fetch_array($res_cat);
$HTML->header(array(title => "Trove - Edit Category"));
?>

<form action="trove_cat_edit.php" method="post">
<input type="hidden" name="form_trove_cat_id" value="<?php 
print $GLOBALS['trove_cat_id'];
?>
">
<p>New category short name (no spaces, unix-like):
예제 #8
0
    //$eachroot = ;//must make this bypass because it wouldn't compile otherwise
    while (list($rootnode, $value) = each($allroots)) {
        // check for array, then clear each root node for group
        db_query("\n\t\t\tDELETE FROM trove_group_link\n\t\t\tWHERE group_id='{$group_id}'\n\t\t\tAND trove_cat_root='{$rootnode}'\n\t\t");
        for ($i = 1; $i <= $TROVE_MAXPERROOT; $i++) {
            $varname = 'root' . $i;
            // check to see if exists first, then insert into DB
            //@TODO change this to use the escaping utils
            $var_aux = getStringFromRequest($varname);
            $category = $var_aux[$rootnode];
            if ($category) {
                trove_setnode($group_id, $category, $rootnode);
            }
        }
    }
    session_redirect('/project/admin/?group_id=' . $group_id);
}
project_admin_header(array('title' => _('Group Trove Information'), 'group' => $group_id));
echo _('<h3>Edit Trove Categorization</h3><p>Select up to three locations for this project in each of the Trove root categories. If the project does not require any or all of these locations, simply select "None Selected".</p><p> IMPORTANT: Projects should be categorized in the most specific locations available in the map. Simultaneous categorization in a specific category AND a parent category will result in only the more specific categorization being accepted</p>.');
?>

<form action="<?php 
echo getStringFromServer('PHP_SELF');
?>
" method="post">

<?php 
$CATROOTS = trove_getallroots();
while (list($catroot, $fullname) = each($CATROOTS)) {
    print "\n<hr />\n<p><strong>{$fullname}</strong> " . help_button('trove_cat', $catroot) . "</p>\n";
    $res_grpcat = db_query("\n\t\tSELECT trove_cat_id\n\t\tFROM trove_group_link\n\t\tWHERE group_id='{$group_id}'\n\t\tAND trove_cat_root='{$catroot}'");
예제 #9
0
require "account.php";
require $DOCUMENT_ROOT . '/project/admin/project_admin_utils.php';
session_require(array('group' => $group_id, 'admin_flags' => 'A'));
if ($GLOBALS[Submit]) {
    /*
    	PROBLEM - no feedbacks or checks for success/failure
    */
    if (account_namevalid(strtolower($form_username))) {
        $res_domain = db_query("SELECT http_domain FROM groups WHERE group_id={$group_id}");
        $row_domain = db_fetch_array($res_domain);
        $res = db_query("INSERT INTO mailaliases (group_id,domain,user_name,email_forward) VALUES " . "({$group_id},'{$row_domain['http_domain']}','" . strtolower($form_username) . "','{$form_email}')");
        if (!$res) {
            exit_error('Error in Query', 'This database query had an unknown failure. Please email
admin@' . $GLOBALS['sys_default_domain'] . ' with details of the problem.');
        }
        session_redirect("/project/admin/editaliases.php?group_id={$group_id}");
    }
}
project_admin_header(array('title' => 'Add Mail Alias', 'group' => $group_id));
?>
<P>Add email alias/forward for project: <B><?php 
html_a_group($group_id);
?>
</B>

<P><FORM action="editaliases-new.php" method="post">
New username:
<BR><INPUT type="text" name="form_username">
<P>New email forward address:
<BR><INPUT type="text" name="form_email">
<INPUT type="hidden" name="group_id" value="<?php 
예제 #10
0
파일: new.php 프로젝트: pombredanne/tuleap
        }
        if ($upload_instead) {
            // Upload file
            $query = "insert into doc_data(title,data,createdate,updatedate,created_by,doc_group,description,filename,filesize,filetype) " . "values(" . "'" . htmlspecialchars($title) . "'," . "'" . $data . "'," . "'" . time() . "'," . "'" . time() . "'," . "'" . $user . "'," . "'" . $doc_group . "'," . "'" . htmlspecialchars($description) . "'," . "'" . $fileName . "'," . "'" . $fileSize . "'," . "'" . $fileType . "')";
        } else {
            // Copy/paste data
            $query = "insert into doc_data(title,data,createdate,updatedate,created_by,doc_group,description,filename,filesize,filetype) " . "values(" . "'" . htmlspecialchars($title) . "'," . "'" . htmlspecialchars($data) . "'," . "'" . time() . "'," . "'" . time() . "'," . "'" . $user . "'," . "'" . $doc_group . "'," . "'" . htmlspecialchars($description) . "'," . "'',0,'text/html')";
        }
        $res_insert = db_query($query);
        if (db_affected_rows($res_insert) < 1) {
            docman_header(array('title' => $Language->getText('docman_new', 'title_new')));
            echo '<p>' . $Language->getText('docman_new', 'error_dbinsert') . ':</p><h3><span class="feedback">' . db_error() . '</span></h3>';
            docman_footer(array());
        } else {
            $feedback .= $Language->getText('docman_new', 'insert_ok');
            session_redirect("/docman/?group_id={$group_id}&feedback={$feedback}");
        }
    } else {
        docman_header(array('title' => $Language->getText('docman_new', 'title_add')));
        echo '<h2>' . $Language->getText('docman_new', 'header_add') . '</h2>';
        if ($user == 100) {
            print "<p>" . $Language->getText('docman_new', 'not_logged') . "<p>";
        }
        if (!groups_defined($group_id)) {
            echo "<p>" . $Language->getText('docman_new', 'no_docgroup', array("/docman/admin/index.php?group_id=" . $group_id)) . "<p>";
        }
        $star = '&nbsp;<span class="highlight"><big>*</big></span>';
        echo '
			<form name="adddata" action="new.php?mode=add&group_id=' . $group_id . '" method="POST" enctype="multipart/form-data">
            <INPUT TYPE="hidden" name="MAX_FILE_SIZE" value="' . $sys_max_size_upload . '">
예제 #11
0
<?php

//
// SourceForge: Breaking Down the Barriers to Open Source Development
// Copyright 1999-2000 (c) The SourceForge Crew
// http://sourceforge.net
//
//
require_once 'pre.php';
session_redirect('/softwaremap/trove_list.php');
예제 #12
0
$mailManager = new MailManager();
$user_tracker_mailformat = $mailManager->getMailPreferencesByUser($user);
if ($request->existAndNonEmpty(Codendi_Mail_Interface::PREF_FORMAT)) {
    if ($request->valid(new Valid_WhiteList(Codendi_Mail_Interface::PREF_FORMAT, $mailManager->getAllMailFormats()))) {
        $user_tracker_mailformat = $request->get(Codendi_Mail_Interface::PREF_FORMAT);
    } else {
        $GLOBALS['Response']->addFeedback('error', $GLOBALS['Language']->getText('account_preferences', 'error_user_tracker_mailformat'));
    }
}
//
// Perform the update
//
// User
db_query("UPDATE user SET " . "mail_siteupdates=" . $form_mail_site . "," . "mail_va=" . $form_mail_va . "," . "fontsize=" . $user_fontsize . "," . "theme='" . db_es($user_theme) . "'," . "sticky_login="******"," . "language_id='" . db_es($language_id) . "' WHERE " . "user_id=" . user_getid());
// Preferences
user_set_preference("user_csv_separator", $user_csv_separator);
user_set_preference("user_csv_dateformat", $user_csv_dateformat);
user_set_preference(Codendi_Mail_Interface::PREF_FORMAT, $user_tracker_mailformat);
if ($username_display !== null) {
    user_set_preference("username_display", $username_display);
}
$user = UserManager::instance()->getCurrentUser();
$user->setLabFeatures($request->existAndNonEmpty('form_lab_features'));
//plugins specific preferences
$em = EventManager::instance();
$em->processEvent('update_user_preferences_appearance', array('request' => $request));
//
// Output
//
session_redirect("/account/preferences.php");
예제 #13
0
<?php

//
// SourceForge: Breaking Down the Barriers to Open Source Development
// Copyright 1999-2000 (c) The SourceForge Crew
// http://sourceforge.net
//
// $Id: logout.php,v 1.2 2003/11/13 11:29:21 helix Exp $
require 'pre.php';
db_query("DELETE FROM session WHERE session_hash='{$session_hash}'");
session_cookie('session_hash', '');
session_redirect('/');
예제 #14
0
if (!$group_id) {
    exit_no_group();
}
session_require(array('group' => $group_id));
$group =& group_get_object($group_id);
if (!$group || !is_object($group)) {
    exit_error(_('Error'), _('Error creating group'));
} else {
    if ($group->isError()) {
        exit_error(_('Error'), $group->getErrorMessage());
    }
}
$perm =& $group->getPermission(session_get_user());
if (!$perm || !is_object($perm)) {
    exit_error(_('Error'), _('Error creating permission'));
} else {
    if ($perm->isError()) {
        exit_error(_('Error'), $perm->getErrorMessage());
    }
}
$group_name = $group->getUnixName();
$filename = $group_name . '-scmroot.tar.gz';
if (file_exists($sys_scm_tarballs_path . '/' . $filename)) {
    Header('Content-disposition: filename="' . str_replace('"', '', $filename) . '"');
    Header("Content-type: application/x-gzip");
    $length = filesize($sys_scm_tarballs_path . '/' . $filename);
    Header("Content-length: " . $length);
    readfile_chunked($sys_scm_tarballs_path . '/' . $filename);
} else {
    session_redirect(util_make_url("/404.php"));
}
예제 #15
0
    // delete all associated radio buttons
    $sql = "SELECT * FROM survey_radio_choices WHERE question_id='{$question_id}'";
    $result = db_query($sql);
    $rows = db_numrows($result);
    if ($rows > 0) {
        for ($j = 0; $j < $rows; $j++) {
            $radio_id = db_result($result, $j, 'choice_id');
            survey_data_radio_delete($question_id, $radio_id);
        }
    }
    // return to update mode
    session_redirect("/survey/admin/edit_question.php?func=update_question&group_id={$group_id}&question_id={$question_id}");
}
if (array_key_exists('cancel', $_POST) && isset($_POST['cancel'])) {
    // return to update mode
    session_redirect("/survey/admin/edit_question.php?func=update_question&group_id={$group_id}&question_id={$question_id}");
}
survey_header(array('title' => $Language->getText('survey_admin_update_radio', 'update_r'), 'help' => 'AdministeringSurveys.html#CreatingorEditingQuestions'));
// fetch question and associated radio button from DB, and check for integrity IDs
$qry = "SELECT * FROM survey_questions WHERE question_id='{$question_id}'";
$res = db_query($qry);
if (db_numrows($res) == 0) {
    $feedback .= " Error finding question #" . $question_id;
    survey_footer(array());
    exit;
} else {
    echo '<h2><font color=red>' . $Language->getText('survey_s_utils', 'warn_loose_button') . '</font></h2>';
}
?>

<P>
예제 #16
0
 case 'update_question':
     if (array_key_exists('post_changes', $_POST) && isset($_POST['post_changes'])) {
         // recuperate the old question type before update
         $qry = "SELECT * FROM survey_questions WHERE group_id='" . db_ei($group_id) . "' AND question_id='" . db_ei($question_id) . "'";
         $res = db_query($qry);
         $old_quest_type = db_result($res, 0, 'question_type');
         // Delete radio buttons if the question type changes from radio-button	to anything else different
         $cond1 = $old_quest_type == "6" && $question_type != "6" && $question_type != 100;
         $cond2 = $old_quest_type == "7" && $question_type != "7" && $question_type != 100;
         if ($cond1 || $cond2) {
             // check first if really something to delete
             $sql = "SELECT * FROM survey_radio_choices WHERE question_id='" . db_ei($question_id) . "'";
             $result = db_query($sql);
             $rows = db_numrows($result);
             if ($rows > 0) {
                 session_redirect("/survey/admin/confirm_update.php?group_id={$group_id}&question_id={$question_id}&question={$question}&question_type={$question_type}");
             } else {
                 // Update the question
                 survey_data_question_update($group_id, $question_id, $question, $question_type);
                 require './update_question.php';
             }
         } else {
             // Update the question
             survey_data_question_update($group_id, $question_id, $question, $question_type);
             require './update_question.php';
         }
     } else {
         // Show the form to update the question
         require './update_question.php';
     }
     break;
예제 #17
0
function submit_valid()
{
    global $HTTP_POST_VARS;
    if (!$HTTP_POST_VARS["Submit"]) {
        return 0;
    }
    if ($HTTP_POST_VARS['form_groupname']) {
        db_query("INSERT INTO groups (group_name,is_public) " . "values ('{$HTTP_POST_VARS['form_groupname']}',{$HTTP_POST_VARS['form_public']})");
        return 1;
    } else {
        return 0;
    }
}
// ###### first check for valid login, if so, congratulate
if (submit_valid()) {
    session_redirect("/admin/index.php");
} else {
    // not valid registration, or first time to page
    $HTML->header(array('title' => "Alexandria: Admin: New Group"));
    ?>
<p><b>Alexandria New Group Creation</b>
<?php 
    if ($submit_error) {
        print "<p>{$submit_error}";
    }
    ?>
<form action="newgroup.php" method="post">
<p>Group Name:
<br><input type="text" name="form_groupname">
<p>Publicly browseable?:
<br><SELECT name="form_public">
예제 #18
0
<?php

//
// SourceForge: Breaking Down the Barriers to Open Source Development
// Copyright 1999-2000 (c) The SourceForge Crew
// http://sourceforge.net
//
// $Id: homepage-edit.php,v 1.2 2003/11/13 11:29:26 helix Exp $
require "pre.php";
require "account.php";
require $DOCUMENT_ROOT . '/project/admin/project_admin_utils.php';
session_require(array('group' => $group_id, 'admin_flags' => 'A'));
if ($GLOBALS[Submit]) {
    if ($form_homepage) {
        db_query("UPDATE groups SET homepage='{$form_homepage}' " . "WHERE group_id={$group_id}");
        session_redirect("/project/admin/?group_id={$group_id}");
    }
}
$res_grp = db_query("SELECT homepage FROM groups WHERE group_id={$group_id}");
$row_grp = db_fetch_array($res_grp);
project_admin_header(array('title' => 'Edit Homepage URL', 'group' => $group_id));
?>
<P>Editing URL for project: <B><?php 
html_a_group($group_id);
?>
</B>

<P><FORM action="homepage-edit.php" method="post">
New URL:
<BR><I>Without "http://". Example "myproject.<?php 
echo $GLOBALS['sys_default_domain'];
예제 #19
0
/**
 * SourceForge User's bookmark delete Page
 *
 * Copyright 1999-2001 (c) VA Linux Systems
 *
 * @version   $Id$
 *
 * This file is part of GForge.
 *
 * GForge is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * 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';
$bookmark_id = getStringFromRequest('bookmark_id');
if ($bookmark_id) {
    bookmark_delete($bookmark_id);
    session_redirect('/my/');
}
예제 #20
0
<?php

//
// Codendi
// Copyright (c) Xerox Corporation, Codendi Team, 2001-2009. All rights reserved
// http://www.codendi.com
//
//
//
//
require_once 'pre.php';
session_redirect(util_get_css_theme());
예제 #21
0
if (!$group || !is_object($group)) {
    exit_error(_('Error'), _('Error creating group'));
} else {
    if ($group->isError()) {
        exit_error(_('Error'), $group->getErrorMessage());
    }
}
// Snapshot can be downloaded only if anon SCM is enabled or if the
// logged in user belongs the group
$permission = $group->enableAnonSCM();
if (session_loggedin()) {
    $perm =& $group->getPermission(session_get_user());
    if ($perm && is_object($perm) && !$perm->isError() && $perm->isMember()) {
        $permission = true;
    }
}
if (!$permission) {
    exit_permission_denied();
}
// Download file
$group_name = $group->getUnixName();
$filename = $group_name . '-scm-latest.tar.gz';
if (file_exists($sys_scm_snapshots_path . '/' . $filename)) {
    Header('Content-disposition: filename="' . str_replace('"', '', $filename) . '"');
    Header('Content-type: application/x-gzip');
    $length = filesize($sys_scm_snapshots_path . '/' . $filename);
    Header('Content-length: ' . $length);
    readfile_chunked($sys_scm_snapshots_path . '/' . $filename);
} else {
    session_redirect(util_make_url('/404.php'));
}
예제 #22
0
if (!session_loggedin()) {
    exit_not_logged_in();
}
$group_id = getIntFromRequest('group_id');
$group =& group_get_object($group_id);
if (!$group || !is_object($group)) {
    exit_error('Error', 'Could Not Get Group');
} elseif ($group->isError()) {
    exit_error('Error', $group->getErrorMessage());
}
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>
예제 #23
0
        return false;
    }
    $usr = db_fetch_array($res);
    if (strcmp($confirm_hash, $usr['confirm_hash'])) {
        $feedback .= ' Invalid confirmation hash ';
        return false;
    }
    // then check valid login
    return session_login_valid(strtolower($user_name), $password, 1);
}
// ###### first check for valid login, if so, redirect
if ($Login) {
    $success = account_verify($form_pw, $form_loginname, $confirm_hash);
    if ($success) {
        $res = db_query("UPDATE users SET status='A' \n\t\t\tWHERE user_name='" . strtolower($form_loginname) . "'");
        session_redirect("/account/first.php");
    } else {
        exit_error('ERROR', $feedback);
    }
}
$HTML->header(array('title' => 'Login'));
?>
<p><b><?php 
echo $sys_default_name;
?>
 Account Verification</b>
<P>In order to complete your registration, login now. Your account will
then be activated for normal logins.
<?php 
if ($GLOBALS['error_msg']) {
    print '<P><FONT color="#FF0000">' . $GLOBALS['error_msg'] . '</FONT>';
예제 #24
0
    		setcookie("sf_user_hash",$u->getID().'_'.substr($u->getMD5Passwd(),0,16),time()+90*24*60*60,'/');
    	} else {
    		// remove cookie
    		setcookie("sf_user_hash",'',0,'/');
    	}
    */
    // Refresh page if language or theme changed
    $refresh = $language != $u->getLanguage() || $theme_id != $u->getThemeID();
    if (!$u->update($firstname, $lastname, $language, $timezone, $mail_site, $mail_va, $use_ratings, $jabber_address, $jabber_only, $theme_id, $address, $address2, $phone, $fax, $title, $ccode)) {
        form_release_key(getStringFromRequest('form_key'));
        $feedback .= $u->getErrorMessage() . '<br />';
    } else {
        $feedback .= _('Updated') . '<br />';
    }
    if ($refresh) {
        session_redirect("/account/?feedback=" . urlencode($feedback));
    }
}
site_user_header(array('title' => _('Account Maintenance')));
echo '<form action="' . getStringFromServer('PHP_SELF') . '" method="post">';
echo '<input type="hidden" name="form_key" value="' . form_generate_key() . '"/>';
echo $HTML->boxTop(_('Account Maintenance'));
?>


<p> <?php 
echo _('Welcome');
?>
 <strong><?php 
print $u->getRealName();
?>