コード例 #1
0
        }
        $res = db_query("DELETE FROM trove_group_link WHERE trove_cat_id='{$form_trove_cat_id}'");
        if (!$res) {
            exit_error(_('Error In Trove Operation'), db_error());
        }
        $res = db_query("DELETE FROM trove_cat WHERE trove_cat_id='{$form_trove_cat_id}'");
        if (!$res || db_affected_rows($res) < 1) {
            exit_error(_('Error In Trove Operation'), db_error());
        }
    }
    session_redirect("/admin/trove/trove_cat_list.php");
}
/*
	Main Code
*/
$trove_cat_id = getIntFromRequest("trove_cat_id");
$res_cat = db_query("SELECT * FROM trove_cat WHERE trove_cat_id={$trove_cat_id}");
if (db_numrows($res_cat) < 1) {
    exit_error(_('No Such Category, That trove cat does not exist'));
}
$row_cat = db_fetch_array($res_cat);
site_admin_header(array('title' => _('Site Admin: Trove - Edit Category')));
?>

<h3><?php 
echo _('Edit Trove Category');
?>
</h3>

<form action="trove_cat_edit.php" method="post">
コード例 #2
0
ファイル: database.php プロジェクト: neymanna/fusionforge
 * 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 . 'admin/admin_utils.php';
if (!$sys_use_project_database) {
    exit_disabled();
}
session_require(array('group' => '1', 'admin_flags' => 'A'));
if (getStringFromRequest('submit')) {
    $group_id = getIntFromRequest('group_id');
    $groupname = getStringFromRequest('groupname');
    $dbname = getStringFromRequest('dbname');
    if ($groupname) {
        $group =& group_get_object_by_name($groupname);
        if (!$group || !is_object($group)) {
            exit_error('Error', 'Could Not Get Group');
        } elseif ($group->isError()) {
            exit_error('Error', $group->getErrorMessage());
        }
        $group_id = $group->getID();
        $user =& session_get_user();
        if (!$user || !is_object($user)) {
            exit_error('Error', 'Could Not Get User');
        } elseif ($user->isError()) {
            exit_error('Error', $u->getErrorMessage());
コード例 #3
0
 * 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 . 'survey/survey_utils.php';
$is_admin_page = 'y';
$group_id = getIntFromRequest('group_id');
$survey_id = getIntFromRequest('survey_id');
$customer_id = getIntFromRequest('customer_id');
survey_header(array('title' => _('Results')));
if (!session_loggedin() || !user_ismember($group_id, 'A')) {
    echo "<h1>" . _('Permission denied') . "</h1>";
    survey_footer(array());
    exit;
}
?>

<form action="none">
<?php 
/*
	Select this survey from the database
*/
$sql = "SELECT * FROM surveys WHERE survey_id='{$survey_id}' AND group_id='{$group_id}'";
$result = db_query($sql);
コード例 #4
0
 * 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.
 */
$ret = array();
$columns = $taskboard->getColumns();
$ret['message'] = '';
$release = getStringFromRequest('release', NULL);
$assigned_to = getIntFromRequest('assigned_to', NULL);
if (!$assigned_to) {
    $assigned_to = NULL;
}
$user_stories = $taskboard->getUserStories($release, $assigned_to);
$user_stories_tracker = $taskboard->getUserStoriesTrackerID();
$phases = array();
if ($user_stories_tracker) {
    $phases[] = array('id' => 'user-stories', 'title' => _('User stories'));
}
foreach ($columns as $column) {
    $phases[] = array('id' => $column->getID(), 'dom_id' => $column->getDomID(), 'title' => $column->getTitle(), 'titlebackground' => $column->getTitleBackgroundColor(), 'background' => $column->getColumnBackgroundColor(), 'resolutions' => array_values($column->getResolutions()));
}
$ret['user_stories'] = $user_stories;
$ret['phases'] = $phases;
echo json_encode($ret);
コード例 #5
0
ファイル: addversion.php プロジェクト: neymanna/fusionforge
 if ($type == 'package') {
     /*
     	Handle insertion of a new package version
     */
     /*
     	See if the package exists first
     */
     $result = db_query("SELECT * FROM snippet_package WHERE snippet_package_id='{$id}'");
     if (!$result || db_numrows($result) < 1) {
         exit_error(_('Error - snippet_package doesn\'t exist'));
     }
     if (getStringFromRequest('post_changes')) {
         if (!form_key_is_valid(getStringFromRequest('form_key'))) {
             exit_form_double_submit();
         }
         $snippet_package_id = getIntFromRequest('snippet_package_id');
         $changes = getStringFromRequest('changes');
         $version = getStringFromRequest('version');
         /*
         	Create a new snippet entry, then create a new snippet version entry
         */
         if ($changes && $snippet_package_id) {
             /*
             	create the snippet package version
             */
             $sql = "INSERT INTO snippet_package_version " . "(snippet_package_id,changes,version,submitted_by,post_date) " . "VALUES ('{$snippet_package_id}','" . htmlspecialchars($changes) . "','" . htmlspecialchars($version) . "','" . user_getid() . "','" . time() . "')";
             $result = db_query($sql);
             if (!$result) {
                 //error in database
                 $feedback .= _('ERROR DOING SNIPPET PACKAGE VERSION INSERT!');
                 snippet_header(array('title' => _('New snippet package')));
コード例 #6
0
ファイル: doc_utils.php プロジェクト: neymanna/fusionforge
/**
 * docman_display_documents - Recursive function to show the documents inside the groups tree
 */
function docman_display_documents(&$nested_groups, &$document_factory, $is_editor, $stateid = 0, $from_admin = false, $parent_group = 0)
{
    global $selected_doc_group_id;
    $selected_doc_group_id = getIntFromRequest('selected_doc_group_id');
    if (!is_array($nested_groups["{$parent_group}"])) {
        return;
    }
    echo "<ul style='list-style-type: none'>";
    $child_count = count($nested_groups["{$parent_group}"]);
    for ($i = 0; $i < $child_count; $i++) {
        $doc_group =& $nested_groups["{$parent_group}"][$i];
        // Display group and subgroups only if it has associated documents
        if ($doc_group->hasDocuments($nested_groups, $document_factory, $stateid)) {
            // Recursive call
            if (($doc_group->getID() == $selected_doc_group_id || $doc_group->hasSubgroup($nested_groups, $selected_doc_group_id)) && (!$stateid || $stateid == @$selected_stateid)) {
                $icon = 'ofolder15.png';
            } else {
                $icon = 'cfolder15.png';
            }
            echo "<li>" . html_image('ic/' . $icon, "15", "13", array("border" => "0")) . " <a href='index.php?group_id=" . $doc_group->Group->getID() . "&selected_doc_group_id=" . $doc_group->getID() . "&amp;language_id=" . @$GLOBALS['selected_language'];
            if ($from_admin && $stateid) {
                // if we're sorting by the state, pass the state as a variable
                echo "&amp;selected_stateid=" . $stateid;
            }
            echo "'>" . $doc_group->getName() . "</a>";
            // display link to add a document to the current group
            echo " &nbsp;&nbsp;&nbsp;&nbsp;<a href='" . ($from_admin ? "../" : "") . "new.php?group_id=" . $doc_group->Group->getID() . "&amp;selected_doc_group=" . $doc_group->getID() . "'>";
            echo html_image('ic/adddoc12.png', "12", "14", array("border" => "0")) . " ";
            echo _('[Add document here]');
            echo "</a>";
            if (($doc_group->getID() == $selected_doc_group_id || $doc_group->hasSubgroup($nested_groups, $selected_doc_group_id)) && (!$stateid || $stateid == @$selected_stateid)) {
                docman_display_documents($nested_groups, $document_factory, $is_editor, $stateid, $from_admin, $doc_group->getID());
            }
        }
        // Display this group's documents
        if (($doc_group->hasSubgroup($nested_groups, $selected_doc_group_id) || $selected_doc_group_id == $doc_group->getID()) && (!$stateid || $stateid == $GLOBALS['selected_stateid'])) {
            // Retrieve all the docs from this category
            if ($stateid) {
                $document_factory->setStateID($stateid);
            }
            $document_factory->setDocGroupID($doc_group->getID());
            $docs = $document_factory->getDocuments();
            if (is_array($docs)) {
                $docs_count = count($docs);
                echo "<ul style='list-style-type: none'>";
                for ($j = 0; $j < $docs_count; $j++) {
                    if ($from_admin) {
                        $link = "index.php?editdoc=1&amp;docid=" . $docs[$j]->getID() . "&amp;group_id=" . $docs[$j]->Group->getID();
                    } else {
                        $link = $docs[$j]->isURL() ? $docs[$j]->getFileName() : "view.php/" . $docs[$j]->Group->getID() . "/" . $docs[$j]->getID() . "/" . $docs[$j]->getFileName();
                    }
                    $tooltip = $docs[$j]->getFileName() . " (" . ($docs[$j]->getUpdated() ? date(_('Y-m-d H:i'), $docs[$j]->getUpdated()) : date(_('Y-m-d H:i'), $docs[$j]->getCreated())) . ") ";
                    if ($docs[$j]->getFilesize() > 1024) {
                        $tooltip .= floor($docs[$j]->getFilesize() / 1024) . "KB";
                    } else {
                        $tooltip .= $docs[$j]->getFilesize() . "B";
                    }
                    $tooltip = htmlspecialchars($tooltip);
                    echo "<li>" . html_image('ic/docman16b.png', "20", "20", array("border" => "0")) . " " . "<a href=\"" . $link . "\" title=\"{$tooltip}\">" . $docs[$j]->getName() . "</a> - " . $tooltip . "</li>" . "(" . $docs[$j]->getFileSize() . " " . _('bytes') . ")";
                    //add description
                    echo "<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;";
                    echo "<i>" . $docs[$j]->getDescription() . "</i>";
                }
                echo "</ul>";
            }
        }
    }
    echo "</ul>\n";
}
コード例 #7
0
ファイル: index.php プロジェクト: neymanna/fusionforge
                    $feedback .= $group->getErrorMessage();
                } else {
                    $gjr = new GroupJoinRequest($group, $form_userid);
                    if (!$gjr || !is_object($gjr) || $gjr->isError()) {
                        $feedback .= 'Error Getting GroupJoinRequest';
                    } else {
                        $gjr->send_accept_mail();
                        $gjr->delete(true);
                    }
                    $feedback = _('User Added Successfully');
                }
            } elseif (getStringFromRequest('rejectpending')) {
                /*
                	reject adding user to this project
                */
                $form_userid = getIntFromRequest('form_userid');
                $gjr = new GroupJoinRequest($group, $form_userid);
                if (!$gjr || !is_object($gjr) || $gjr->isError()) {
                    $feedback .= 'Error Getting GroupJoinRequest';
                } else {
                    if (!$gjr->reject()) {
                        exit_error('Error', $gjr->getErrorMessage());
                    } else {
                        $feedback .= 'Rejected';
                    }
                }
            }
        }
    }
}
$group->clearError();
コード例 #8
0
ファイル: views_graph.php プロジェクト: neymanna/fusionforge
 *
 * SourceForge: Breaking Down the Barriers to Open Source Development
 * Copyright 1999-2001 (c) VA Linux Systems
 * http://sourceforge.net
 *
 * @version   $Id$
 *
 */
require_once '../env.inc.php';
require_once $gfwww . 'include/pre.php';
require_once $gfwww . 'include/graph_lib.php';
// require you to be a member of the sfstats group (group_id = 11084)
session_require(array('group' => $sys_stats_group));
$group_id = getIntFromRequest('group_id');
$year = getIntFromRequest('year');
$monthly = getIntFromRequest('monthly');
if (!$group_id) {
    $group_id = 0;
}
if (!$year) {
    $year = gmstrftime("%Y", time());
}
if ($monthly) {
    $sql = "SELECT month,site_page_views AS site_views,subdomain_views \n\t\tFROM stats_site_months ORDER BY month ASC";
    $grouping = 'Months';
} else {
    $beg_year = date('Y', mktime(0, 0, 0, date('m') - 1, date('d'), date('Y')));
    $beg_month = date('m', mktime(0, 0, 0, date('m') - 1, date('d'), date('Y')));
    $beg_day = date('d', mktime(0, 0, 0, date('m') - 1, date('d'), date('Y')));
    $sql = "SELECT month,day,site_page_views AS site_views,subdomain_views \n\t\tFROM stats_site_vw \n\t\t( month = '{$beg_year}{$beg_month}' AND day >= '{$beg_day}' ) OR ( month > '{$beg_year}{$beg_month}' )\n\t\tORDER BY month ASC, day ASC";
    $grouping = 'Days';
コード例 #9
0
ファイル: index.php プロジェクト: neymanna/fusionforge
	Complete OO rewrite by Tim Perdue 12/2002

	Heavy RBAC changes 3/17/2004
*/
require_once '../../env.inc.php';
require_once $gfwww . 'include/pre.php';
require_once $gfwww . 'forum/include/ForumHTML.class.php';
require_once $gfcommon . 'forum/Forum.class.php';
require_once $gfwww . 'forum/admin/ForumAdmin.class.php';
require_once $gfcommon . 'forum/ForumFactory.class.php';
require_once $gfcommon . 'forum/ForumMessageFactory.class.php';
require_once $gfcommon . 'forum/ForumMessage.class.php';
require_once $gfcommon . 'include/TextSanitizer.class.php';
// to make the HTML input by the user safe to store
$group_id = getIntFromRequest('group_id');
$group_forum_id = getIntFromRequest('group_forum_id');
$deleteforum = getStringFromRequest('deleteforum');
$feedback = getStringFromRequest('feedback');
global $HTML;
if ($group_id) {
    //
    //  Set up local objects
    //
    $g =& group_get_object($group_id);
    if (!$g || !is_object($g) || $g->isError()) {
        exit_no_group();
    }
    $p =& $g->getPermission(session_get_user());
    if (!$p || !is_object($p) || $p->isError()) {
        exit_permission_denied();
    }
コード例 #10
0
ファイル: tracker.php プロジェクト: neymanna/fusionforge
                         }
                     }
                 }
                 //
                 //	Show just one feedback entry if no errors
                 //
                 if (!$was_error) {
                     $feedback = _('Updated successfully');
                 }
                 include $gfwww . 'tracker/browse.php';
             }
         }
     }
     break;
 case 'monitor':
     $artifact_id = getIntFromRequest('artifact_id');
     if ($artifact_id) {
         $ah = new ArtifactHtml($ath, $artifact_id);
         if (!$ah || !is_object($ah)) {
             exit_error('ERROR', 'Artifact Could Not Be Created');
         } else {
             if ($ah->isError()) {
                 exit_error('ERROR', $ah->getErrorMessage());
             } else {
                 $ah->setMonitor();
                 $feedback = $ah->getErrorMessage();
                 include $gfwww . 'tracker/browse.php';
             }
         }
     } else {
         $at = new ArtifactType($group, $atid);
コード例 #11
0
ファイル: ajax_add.php プロジェクト: vpylypv/taskboard
 * 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.
 */
$ret = array('message' => '', 'action' => 'reload');
$ret['message'] = '';
$tracker_id = getIntFromRequest('tracker_id');
$user_story_id = getIntFromRequest('user_story_id', 0);
$desc = getStringFromRequest('desc', '');
$title = getStringFromRequest('title', '');
$release = getStringFromRequest('release', NULL);
if ($tracker_id && $desc && $title) {
    db_begin();
    $msg = $taskboard->TrackersAdapter->createTask($tracker_id, $title, $desc, $user_story_id, $release);
    if ($msg) {
        $ret['alert'] = $msg;
        db_rollback();
    } else {
        db_commit();
    }
} else {
    $ret['alert'] = _('All fields are mandatory.');
}
コード例 #12
0
ファイル: new.php プロジェクト: neymanna/fusionforge
				' . html_get_language_popup('language_id', 1) . '
				</td>
			</tr>
			<tr>
				<td>
				<strong>' . _('Group that document belongs in') . ' :</strong><br />';
    $dgf = new DocumentGroupFactory($g);
    if ($dgf->isError()) {
        exit_error('Error', $dgf->getErrorMessage());
    }
    $dgh = new DocumentGroupHTML($g);
    if ($dgh->isError()) {
        exit_error('Error', $dgh->getErrorMessage());
    }
    //display_groups_option($group_id);
    $selected_doc_group = getIntFromRequest('selected_doc_group');
    $dgh->showSelectNestedGroups($dgf->getNested(), 'doc_group', false, $selected_doc_group);
    echo '
				</td>
			</tr>
		</table>
		<input type="submit" name="submit" value="' . _('Submit Information') . ' " />
			</form>';
    docman_footer(array());
    /*
    } else {
    	docman_header(_('Document Manager: Submit New Documentation'),_('Project: %1$s'));
    	?>
    	
    	<?php
    	echo '<form name="select_opt" action="'. getStringFromServer('PHP_SELF').'?group_id='.$group_id.'" method="post">';
コード例 #13
0
ファイル: users_graph.php プロジェクト: neymanna/fusionforge
 * SourceForge Sitewide Statistics
 *
 * SourceForge: Breaking Down the Barriers to Open Source Development
 * Copyright 1999-2001 (c) VA Linux Systems
 * http://sourceforge.net
 *
 * @version   $Id$
 *
 */
require_once '../env.inc.php';
require_once $gfwww . 'include/pre.php';
require_once $gfwww . 'include/graph_lib.php';
// require you to be a member of the sfstats group (group_id = 11084)
session_require(array('group' => $sys_stats_group));
$group_id = getIntFromRequest('group_id');
$year = getIntFromRequest('year');
if (!$group_id) {
    $group_id = 0;
}
if (!$year) {
    $year = gmstrftime("%Y", time());
}
$sql = "SELECT month,day,new_users,new_projects FROM stats_site ORDER BY month ASC, day ASC";
$res = db_query($sql);
$i = 0;
while ($row = db_fetch_array($res)) {
    $xdata[$i] = $i;
    $xlabel[$i] = substr($row['month'], 4) + 1 - 1 . "/" . $row['day'];
    $ydata1[$i] = $row["new_users"];
    $ydata2[$i] = $row["new_projects"];
    ++$i;
コード例 #14
0
<?php

//
//  FORM TO ADD ELEMENTS TO EXTRA FIELD
//
$boxid = getIntFromRequest('boxid');
$ac = new ArtifactExtraField($ath, $boxid);
if (!$ac || !is_object($ac)) {
    exit_error('Error', 'Unable to create ArtifactExtraField Object');
} elseif ($ac->isError()) {
    exit_error('Error', $ac->getErrorMessage());
} else {
    $efearr = $ath->getExtraFieldElements($boxid);
    $title = sprintf(_('Add/Update Custom Field Elements in %s'), $ath->getName());
    $ath->adminHeader(array('title' => $title));
    echo "<h3>" . $title . "</h3>";
    echo "<br />";
    $rows = count($efearr);
    if ($rows > 0) {
        $title_arr = array();
        $title_arr[] = _('Elements Defined');
        echo $GLOBALS['HTML']->listTableTop($title_arr);
        for ($i = 0; $i < $rows; $i++) {
            echo '<tr ' . $GLOBALS['HTML']->boxGetAltRowStyle($i) . '>' . '<td><a href="' . getStringFromServer('PHP_SELF') . '?update_opt=1&amp;id=' . $efearr[$i]['element_id'] . '&amp;boxid=' . $boxid . '&amp;group_id=' . $group_id . '&amp;atid=' . $ath->getID() . '">' . $efearr[$i]['element_name'] . ' [' . _('Edit') . ']</a></td>';
        }
        echo $GLOBALS['HTML']->listTableBottom();
    } else {
        echo "\n<h3>" . _('You have not defined any elements') . "</h3>";
    }
    ?>
		<p>
コード例 #15
0
ファイル: del_father.php プロジェクト: neymanna/fusionforge
 * 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 $gfwww . 'include/pre.php';
$group_id = getIntFromRequest('group_id');
$sub_group_id = getIntFromRequest('sub_group_id');
session_require(array('group' => $group_id, 'admin_flags' => 'A'));
//plugin webcal
$params[0] = $sub_group_id;
$params[1] = $group_id;
plugin_hook('del_cal_link_father', $params);
//del link between two projects
$sql = "DELETE FROM plugin_projects_hierarchy WHERE project_id  = '" . $group_id . "' AND sub_project_id = '" . $sub_group_id . "'";
//print "<br>".$sql;
db_begin();
db_query($sql) or die(db_error());
db_commit();
header("Location: " . util_make_url('/project/admin/index.php?group_id=' . $sub_group_id));
コード例 #16
0
ファイル: message.php プロジェクト: neymanna/fusionforge
	Massive rewrite by Tim Perdue 7/2000 (nested/views/save)

	Complete OO rewrite by Tim Perdue 12/2002
*/
require_once '../env.inc.php';
require_once $gfwww . 'include/pre.php';
require_once $gfwww . 'forum/include/ForumHTML.class.php';
require_once $gfwww . 'forum/include/AttachManager.class.php';
require_once $gfcommon . 'forum/Forum.class.php';
require_once $gfcommon . 'forum/ForumFactory.class.php';
require_once $gfcommon . 'forum/ForumMessageFactory.class.php';
require_once $gfcommon . 'forum/ForumMessage.class.php';
$msg_id = getIntFromRequest('msg_id');
$total_rows = getIntFromRequest('total_rows');
$ret_val = getIntFromRequest('ret_val');
if ($msg_id) {
    /*
    	Figure out which group this message is in, for the sake of the admin links
    */
    $result = db_query("SELECT forum_group_list.group_id,forum_group_list.group_forum_id\n\t\tFROM forum_group_list,forum\n\t\tWHERE forum_group_list.group_forum_id=forum.group_forum_id\n\t\tAND forum.msg_id='{$msg_id}'");
    if (!$result || db_numrows($result) < 1) {
        /*
        	Message not found
        */
        exit_error(_('Message Not Found'), _('This message does not (any longer) exist'));
    }
    $group_id = db_result($result, 0, 'group_id');
    $forum_id = db_result($result, 0, 'group_forum_id');
    //
    //  Set up local objects
コード例 #17
0
ファイル: cronman.php プロジェクト: neymanna/fusionforge
" method="get">
<?php 
echo html_build_select_box_from_arrays(array_keys($cron_arr), $cron_arr, 'which', $which, true, 'Any');
?>
<input type="submit" name="submit" value="<?php 
echo _('Submit');
?>
">
</form>
<?php 
$title_arr = array(_('Date'), _('Job'), _('Message'));
echo $HTML->listTableTop($title_arr);
$sql = 'SELECT COUNT(*) AS count FROM cron_history ' . $sql_str;
$res = db_query($sql);
$totalCount = db_result($res, 0, 'count');
$offset = getIntFromRequest('offset');
if ($offset > $totalCount) {
    $offset = 0;
}
$sql = 'SELECT * FROM cron_history ' . $sql_str . ' ORDER BY rundate DESC LIMIT ' . ADMIN_CRONMAN_ROWS . ' OFFSET ' . $offset;
$res = db_query($sql);
for ($i = 0; $i < db_numrows($res); $i++) {
    echo '<tr ' . $HTML->boxGetAltRowStyle($i + 1) . '>
		<td>' . date(_('Y-m-d H:i'), db_result($res, $i, 'rundate')) . '</td>
		<td>' . $cron_arr[db_result($res, $i, 'job')] . '</td>
		<td>' . nl2br(db_result($res, $i, 'output')) . '</td></tr>';
}
echo $HTML->listTableBottom();
if ($totalCount > ADMIN_CRONMAN_ROWS) {
    ?>
<br />
コード例 #18
0
ファイル: index.php プロジェクト: neymanna/fusionforge
 
	<h3><?php 
        echo _('Document Manager: Administration');
        ?>
</h3>
	<p>
	<a href="index.php?group_id=<?php 
        echo $group_id;
        ?>
&amp;addgroup=1"><?php 
        echo _('Add/Edit Document Groups');
        ?>
</a>
	</p>
	<?php 
        $selected_stateid = getIntFromRequest('selected_stateid');
        if (!$d_arr || count($d_arr) < 1) {
            print "<p><strong>" . _('This project has no visible documents') . ".</strong></p>";
        } else {
            // get a list of used document states
            $states = $df->getUsedStates();
            $nested_groups =& $dgf->getNested();
            echo "<ul>";
            foreach ($states as $state) {
                echo "<li><strong>" . $state["name"] . "</strong>";
                docman_display_documents($nested_groups, $df, true, $state['stateid'], true);
                echo "</li>";
            }
            echo "</ul>";
        }
        docman_footer(array());
コード例 #19
0
 * (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 . 'export/rss_utils.inc';
$group_id = getIntFromRequest('group_id');
$limit = getIntFromRequest('limit', 10);
if ($limit > 100) {
    $limit = 100;
}
$url = util_make_url('/');
if ($group_id) {
    $where = "group_id={$group_id} and is_public=1";
    $query = "SELECT group_name FROM groups WHERE {$where}";
    $res = db_query($query, 1);
    $row = db_fetch_array($res);
    $title = $row['group_name'];
    $link = "?group_id={$group_id}";
    $description = " of " . $row['group_name'];
    $querywm = "SELECT users.user_name,users.realname FROM user_group,users WHERE group_id={$group_id} AND admin_flags='A' AND users.user_id=user_group.user_id ORDER BY users.add_date";
    $reswm = db_query($querywm, 1);
    if ($rowwm = db_fetch_array($reswm)) {
コード例 #20
0
 *
 * 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 . 'frs/include/frs_utils.php';
require_once $gfcommon . 'frs/FRSPackage.class.php';
$group_id = getIntFromRequest('group_id');
$package_id = getIntFromRequest('package_id');
if (!$group_id) {
    exit_no_group();
}
$project =& group_get_object($group_id);
if (!$project || $project->isError()) {
    exit_error('Error', $project->getErrorMessage());
}
$perm =& $project->getPermission(session_get_user());
if (!$perm->isReleaseTechnician()) {
    exit_permission_denied();
}
$frsp = new FRSPackage($project, $package_id);
if (!$frsp || !is_object($frsp)) {
    exit_error('Error', 'Could Not Get FRS Package');
} elseif ($frsp->isError()) {
コード例 #21
0
ファイル: editrelease.php プロジェクト: neymanna/fusionforge
            $feedback = _('File Released');
        }
    }
}
// Edit/Delete files in a release
if (getStringFromRequest('step3')) {
    $step3 = getStringFromRequest('step3');
    $file_id = getIntFromRequest('file_id');
    $processor_id = getIntFromRequest('processor_id');
    $type_id = getIntFromRequest('type_id');
    $new_release_id = getIntFromRequest('new_release_id');
    $release_time = getStringFromRequest('release_time');
    $group_id = getIntFromRequest('group_id');
    $release_id = getIntFromRequest('release_id');
    $package_id = getIntFromRequest('package_id');
    $file_id = getIntFromRequest('file_id');
    $im_sure = getStringFromRequest('im_sure');
    // If the user chose to delete the file and he's sure then delete the file
    if ($step3 == "Delete File") {
        if ($im_sure) {
            $frsf = new FRSFile($frsr, $file_id);
            if (!$frsf || !is_object($frsf)) {
                exit_error('Error', 'Could Not Get FRSFile');
            } elseif ($frsf->isError()) {
                exit_error('Error', $frsf->getErrorMessage());
            } else {
                if (!$frsf->delete()) {
                    exit_error('Error', $frsf->getErrorMessage());
                } else {
                    $feedback .= _('File Deleted');
                }
コード例 #22
0
ファイル: query.php プロジェクト: neymanna/fusionforge
 *
 * 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  US
 */
require_once $gfcommon . 'tracker/ArtifactQuery.class.php';
if (!session_loggedin()) {
    exit_not_logged_in();
}
$query_id = getIntFromRequest('query_id');
$query_action = getIntFromRequest('query_action');
if (getStringFromRequest('submit')) {
    //
    //  Create a Saved Query
    //
    if ($query_action == 1) {
        if (!form_key_is_valid(getStringFromRequest('form_key'))) {
            exit_form_double_submit();
        }
        $aq = new ArtifactQuery($ath);
        if (!$aq || !is_object($aq)) {
            exit_error('Error', $aq->getErrorMessage());
        }
        $query_name = getStringFromRequest('query_name');
        $_status = getStringFromRequest('_status');
        $_assigned_to = getStringFromRequest('_assigned_to');
コード例 #23
0
 * 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/HTML_Graphs.php';
require_once $gfwww . 'survey/survey_utils.php';
$is_admin_page = 'y';
$group_id = getIntFromRequest('group_id');
$survey_id = getIntFromRequest('survey_id');
survey_header(array('title' => _('Survey Aggregate Results')));
if (!session_loggedin() || !user_ismember($group_id, 'A')) {
    echo "<h1>" . _('Permission denied') . "</h1>";
    survey_footer(array());
    exit;
}
//$result=db_query($sql);
/*
	Select this survey from the database
*/
$sql = "SELECT * FROM surveys WHERE survey_id='{$survey_id}' AND group_id='{$group_id}'";
$result = db_query($sql);
echo "<h2>" . db_result($result, 0, "survey_title") . "</h2><p>&nbsp;</p>";
/*
echo "<h3><a href=\"show_results_csv.php?survey_id=$survey_id&group_id=$group_id\">.CSV File</a></h3><p>";
コード例 #24
0
ファイル: projects.php プロジェクト: neymanna/fusionforge
 * SourceForge Sitewide Statistics
 *
 * SourceForge: Breaking Down the Barriers to Open Source Development
 * Copyright 1999-2001 (c) VA Linux Systems
 * http://sourceforge.net
 *
 * @version   $Id$
 *
 */
require_once '../env.inc.php';
require_once $gfwww . 'include/pre.php';
require_once $gfwww . 'stats/site_stats_utils.php';
$report = getStringFromRequest('report');
$orderby = getStringFromRequest('orderby');
$projects = getIntFromRequest('projects');
$trovecatid = getIntFromRequest('trovecatid');
// require you to be a member of the sfstats group (group_id = 11084)
session_require(array('group' => $sys_stats_group));
$HTML->header(array('title' => sprintf(_('%1$s Site Statistics'), $GLOBALS['sys_name'])));
?>
<div align="center">
<h3><?php 
echo _('Project Statistical Comparisons');
?>
</h3><br />
</div>

<hr />

<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr align="center">
コード例 #25
0
    plugin_hook('add_cal_group', $group_id);
    return true;
}
$action = getStringFromRequest('action');
if ($action == 'activate') {
    $group_id = getIntFromRequest('group_id');
    $list_of_groups = getStringFromRequest('list_of_groups');
    $groups = explode(',', $list_of_groups);
    array_walk($groups, 'activate_group');
    //plugin webcalendar
    //create webcal group
    plugin_hook('add_cal_group', $group_id);
} else {
    if ($action == 'delete') {
        $group_id = getIntFromRequest('group_id');
        $response_id = getIntFromRequest('response_id');
        $add_to_can = getStringFromRequest('add_to_can');
        $response_text = getStringFromRequest('response_text');
        $response_title = getStringFromRequest('response_title');
        //plugin webcalendar
        //create webcal group
        plugin_hook('del_cal_group', $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 (!$group->setStatus(session_get_user(), 'D')) {
            exit_error(_('Error during group rejection'), $this->getErrorMessage());
        }
コード例 #26
0
ファイル: index.php プロジェクト: vpylypv/taskboard
        echo time();
        ?>
"></script>
<?php 
        if (function_exists('html_use_jqueryui')) {
            html_use_jqueryui();
        } else {
            ?>
<script type="text/javascript" src="/plugins/taskboard/js/jquery-ui.js"></script>
<?php 
        }
        ?>

<?php 
        $techs = $group->getUsers();
        $_assigned_to = getIntFromRequest('_assigned_to', '0');
        // stolen code from tracker
        $tech_id_arr = array();
        $tech_name_arr = array();
        foreach ($techs as $tech) {
            $tech_id_arr[] = $tech->getID();
            $tech_name_arr[] = $tech->getRealName();
        }
        $tech_id_arr[] = '0';
        //this will be the 'any' row
        $tech_name_arr[] = _('Any');
        if (is_array($_assigned_to)) {
            $_assigned_to = '';
        }
        $tech_box = html_build_select_box_from_arrays($tech_id_arr, $tech_name_arr, '_assigned_to', $_assigned_to, true, _('Unassigned'));
        // end of the stolen code
コード例 #27
0
 * 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
 */
/* message moderation
	by Daniel Perez - 2005
*/
require_once '../../env.inc.php';
require_once $gfwww . 'include/pre.php';
require_once $gfwww . 'forum/include/ForumHTML.class.php';
require_once $gfwww . 'forum/admin/ForumAdmin.class.php';
require_once $gfcommon . 'forum/Forum.class.php';
require_once $gfcommon . 'forum/ForumMessage.class.php';
$msg_id = getIntFromRequest("msg_id");
$group_id = getIntFromRequest('group_id');
$forum_id = getIntFromRequest("forum_id");
global $HTML;
$fa = new ForumAdmin();
if (!$forum_id || !$group_id || !$msg_id) {
    exit_missing_param();
}
if ($fa->Authorized($group_id)) {
    //user authorized, continue check
    if ($fa->isForumAdmin($forum_id)) {
        //print the message
        forum_header(array());
        $g =& $fa->GetGroupObject();
        $f = new Forum($g, $forum_id);
        if (!$f || !is_object($f)) {
            exit_error(_('Error'), "Error getting new Forum");
        } elseif ($f->isError()) {
コード例 #28
0
ファイル: rss_project.php プロジェクト: neymanna/fusionforge
echo html_image('ic/rss.png', 16, 16, array('border' => '0'));
?>
</li>
<li><a href="rss20_activity.php?group_id=<?php 
echo getIntFromRequest('group_id');
?>
"><?php 
print $GLOBALS['sys_name'];
?>
 Activity</a>
(<a href="http://blogs.law.harvard.edu/tech/rss">RSS 2.0</a>)&nbsp; <?php 
echo html_image('ic/rss.png', 16, 16, array('border' => '0'));
?>
</li>
<li><a href="rss20_newreleases.php?group_id=<?php 
echo getIntFromRequest('group_id');
?>
"><?php 
print $GLOBALS['sys_name'];
?>
 Developer New Project Releases</a>
(<a href="http://blogs.law.harvard.edu/tech/rss">RSS 2.0</a>)&nbsp; <?php 
echo html_image('ic/rss.png', 16, 16, array('border' => '0'));
?>
</li>
</ul>

<a href="javascript:history.go(-1)">[<?php 
echo _('Go back');
?>
]</a>
コード例 #29
0
ファイル: index.php プロジェクト: neymanna/fusionforge
     if (!$pg->userIsAdmin()) {
         exit_permission_denied();
     }
     $pc = new ProjectCategory($pg);
     if (!$pc || !is_object($pc)) {
         exit_error('Error', 'Unable to create ProjectCategory Object');
     } else {
         if (!$pc->create($name)) {
             exit_error('Error', 'Error inserting: ' . $pc->getErrorMessage());
         } else {
             $feedback .= _('Category Inserted');
         }
     }
 } else {
     if ($update_cat) {
         $id = getIntFromRequest('id');
         $name = getStringFromRequest('name');
         /*
         	Update a project_category
         */
         if (!$pg->userIsAdmin()) {
             exit_permission_denied();
         }
         $pc = new ProjectCategory($pg, $id);
         if (!$pc || !is_object($pc)) {
             exit_error('Error', 'Unable to create ProjectCategory Object');
         } elseif ($pc->isError()) {
             exit_error('Error', $pc->getErrorMessage());
         } else {
             if (!$pc->update($name)) {
                 exit_error('Error', 'Error updating: ' . $pc->getErrorMessage());
コード例 #30
0
ファイル: search.php プロジェクト: neymanna/fusionforge
				<td><a href="useredit.php?user_id=' . $row['user_id'] . '">' . $row['user_id'] . '</a></td>
				<td>' . format_name($row['user_name'], $row['status']) . '</td>
				<td>' . $row['realname'] . '</td>
				<td>' . $row['email'] . '</td>
				<td>' . date(_('Y-m-d H:i'), $row['add_date']) . '</td>
				<td style="text-align:center">' . format_name($row['status'] . '/' . $row['unix_status'], $row['status']) . '</td>
				</tr>
			';
        }
        echo $GLOBALS['HTML']->listTableBottom();
    }
}
// end if ($usersearch)
if (getStringFromRequest('groupsearch')) {
    $status = getStringFromRequest('status');
    $is_public = getIntFromRequest('is_public', -1);
    $crit_desc = getStringFromRequest('crit_desc');
    $crit_sql = '';
    if ($status) {
        $crit_sql .= " AND status='{$status}'";
        $crit_desc .= " status={$status}";
    }
    if ($is_public !== -1) {
        $crit_sql .= " AND is_public='{$is_public}'";
        $crit_desc .= " is_public={$is_public}";
    }
    $sql = "\n\t\tSELECT DISTINCT *\n\t\tFROM groups WHERE (";
    if (is_numeric($search)) {
        $sql .= "group_id = '{$search}' OR ";
    }
    if ($sys_database_type == "mysql") {