function CallHook($hookname, $params)
 {
     global $G_SESSION, $HTML;
     if ($hookname == "headermenu") {
         $guide = util_make_url('/plugins/online_help/');
         $user_guide = array('user' => 'ug_user.html', 'login' => 'ug_getting_started_login.html', 'trove' => 'ug_sitewide_trove.html', 'snippet' => 'ug_sitewide_snippet.html', 'people' => 'ug_sitewide_project_help.html', 'home' => 'ug_project.html', 'admin' => 'ug_project_project_admin.html', 'activity' => 'ug_project_activity.html', 'forums' => 'ug_project_forums.html', 'tracker' => 'ug_project_tracker.html', 'mail' => 'ug_project_mailing_lists.html', 'pm' => 'ug_project_task_manager.html', 'docman' => 'ug_project_docman.html', 'surveys' => 'ug_project_surveys.html', 'news' => 'ug_project_news.html', 'scm' => 'ug_project_subversion.html', 'frs' => 'ug_project_file_releases.html', 'wiki' => 'ug_project_wiki.html');
         if (strstr($_SERVER['REQUEST_URI'], 'softwaremap')) {
             $guide .= $user_guide['trove'];
         } elseif (strstr($_SERVER['REQUEST_URI'], '/my/')) {
             $guide .= $user_guide['user'];
         } elseif (strstr($_SERVER['REQUEST_URI'], '/account/login.php')) {
             $guide .= $user_guide['login'];
         } elseif (strstr($_SERVER['REQUEST_URI'], '/account/')) {
             $guide .= $user_guide['user'];
         } elseif (strstr($_SERVER['REQUEST_URI'], '/snippet/')) {
             $guide .= $user_guide['snippet'];
         } elseif (strstr($_SERVER['REQUEST_URI'], '/people/')) {
             $guide .= $user_guide['people'];
         } elseif (isset($params['toptab']) && isset($user_guide[$params['toptab']])) {
             $guide .= $user_guide[$params['toptab']];
         } else {
             $guide .= 'index.html';
         }
         $guide = '<a href="javascript:help_window(\'' . $guide . '\')">' . _('Get Help') . '</a>';
         $template = isset($params['template']) ? $params['template'] : ' | {menu}';
         echo str_replace('{menu}', $guide, $template);
     }
 }
Exemplo n.º 2
0
/**
 * Create URL for a project's page
 *
 * @param string $groupame
 * @param int $group_id
 * @return string
 */
function util_make_url_g($groupame, $group_id)
{
    if (isset($GLOBALS['sys_noforcetype']) && $GLOBALS['sys_noforcetype']) {
        return util_make_url("/project/?group_id={$group_id}");
    } else {
        return util_make_url("/projects/{$groupame}/");
    }
}
 /**
  * getRows - get the html output for result rows
  *
  * @return string html output
  */
 function getRows()
 {
     $rowsCount = $this->searchQuery->getRowsCount();
     $result =& $this->searchQuery->getResult();
     $dateFormat = _('Y-m-d H:i');
     $return = '';
     for ($i = 0; $i < $rowsCount; $i++) {
         $return .= '<tr ' . $GLOBALS['HTML']->boxGetAltRowStyle($i) . '><td width="50%"><a href="' . util_make_url('/forum/message.php?msg_id=' . db_result($result, $i, 'msg_id')) . '">' . html_image('ic/msg.png', '10', '12', array('border' => '0')) . ' ' . db_result($result, $i, 'subject') . '</a></td>' . '<td width="30%">' . db_result($result, $i, 'realname') . '</td>' . '<td width="20%">' . date($dateFormat, db_result($result, $i, 'post_date')) . '</td></tr>';
     }
     return $return;
 }
Exemplo n.º 4
0
 function is_allowed($action = "read", &$options)
 {
     $method = 'may_' . $action;
     if (method_exists($this, $method)) {
         if (!$this->{$method}($action, $options)) {
             header('Location: ' . util_make_url('/account/login.php?return_to=' . $_SERVER['SCRIPT_URI']));
             exit;
         }
     }
     return 1;
 }
 /**
  * getRows - get the html output for result rows
  *
  * @return string html output
  */
 function getRows()
 {
     $rowsCount = $this->searchQuery->getRowsCount();
     $result =& $this->searchQuery->getResult();
     $groupId = $this->groupId;
     $dateFormat = _('Y-m-d H:i');
     $return = '';
     for ($i = 0; $i < $rowsCount; $i++) {
         $return .= '<tr ' . $GLOBALS['HTML']->boxGetAltRowStyle($i) . '>' . '<td>' . db_result($result, $i, 'artifact_id') . '</td>' . '<td><a href="' . util_make_url('/tracker/?group_id=' . $groupId . '&amp;atid=' . db_result($result, $i, 'group_artifact_id') . '&amp;func=detail&aid=' . db_result($result, $i, 'artifact_id')) . '"> ' . html_image('ic/msg.png', '10', '12', array('border' => '0')) . ' ' . db_result($result, $i, 'summary') . '</a></td>' . '<td>' . db_result($result, $i, 'realname') . "</td>" . '<td>' . date($dateFormat, db_result($result, $i, 'open_date')) . '</td></tr>';
     }
     return $return;
 }
 /**
  * getRows - get the html output for result rows
  *
  * @return string html output
  */
 function getRows()
 {
     $rowsCount = $this->searchQuery->getRowsCount();
     $result =& $this->searchQuery->getResult();
     $return = '';
     for ($i = 0; $i < $rowsCount; $i++) {
         if (db_result($result, $i, 'type') == 2) {
             $what = 'foundry';
         } else {
             $what = 'projects';
         }
         $return .= '<tr ' . $GLOBALS['HTML']->boxGetAltRowStyle($i) . '>' . '<td width="30%"><a href="' . util_make_url('/' . $what . '/' . db_result($result, $i, 'unix_group_name') . '/') . '">' . html_image('ic/msg.png', '10', '12', array('border' => '0')) . ' ' . $this->highlightTargetWords(db_result($result, $i, 'group_name')) . '</a></td>' . '<td width="70%">' . $this->highlightTargetWords(db_result($result, $i, 'short_description')) . '</td></tr>';
     }
     return $return;
 }
Exemplo n.º 7
0
function docman_recursive_display($docgroup)
{
    global $nested_groups, $nested_docs, $group_id;
    if (is_array(@$nested_groups[$docgroup])) {
        foreach ($nested_groups[$docgroup] as $dg) {
            echo "\n\t\t['" . '<span class="JSCookTreeFolderClosed"><i><img alt="" src="\' + ctThemeXPBase + \'folder1.gif" /></i></span><span class="JSCookTreeFolderOpen"><i><img alt="" src="\' + ctThemeXPBase + \'folderopen1.gif"></i></span>' . "', '" . $dg->getName() . "', '#', '', '',";
            docman_recursive_display($dg->getID());
            if (isset($nested_docs[$dg->getID()]) && is_array($nested_docs[$dg->getID()])) {
                foreach ($nested_docs[$dg->getID()] as $d) {
                    $docurl = util_make_url('/docman/view.php/' . $group_id . '/' . $d->getID() . '/' . $d->getFileName());
                    $docname = addslashes($d->getName()) . " (" . $d->getFileName() . ")";
                    $docdesc = addslashes($d->getDescription());
                    echo ",['','" . $docname . "','" . $docurl . "','','" . $docdesc . "' ]";
                }
            }
            echo ",\n\t\t],";
        }
    }
}
 /**
  * getRows - get the html output for result rows
  *
  * @return string html output
  */
 function getRows()
 {
     $rowsCount = $this->searchQuery->getRowsCount();
     $result =& $this->searchQuery->getResult();
     $dateFormat = _('Y-m-d H:i');
     $return = '';
     $rowColor = 0;
     $lastForumName = null;
     for ($i = 0; $i < $rowsCount; $i++) {
         //section changed
         $currentForumName = db_result($result, $i, 'forum_name');
         if ($lastForumName != $currentForumName) {
             $return .= '<tr><td colspan="4">' . $currentForumName . '</td></tr>';
             $lastForumName = $currentForumName;
             $rowColor = 0;
         }
         $return .= '<tr ' . $GLOBALS['HTML']->boxGetAltRowStyle($rowColor) . '>' . '<td width="5%">&nbsp;</td>' . '<td><a href="' . util_make_url('/forum/message.php?msg_id=' . db_result($result, $i, 'msg_id')) . '">' . html_image('ic/msg.png', '10', '12', array('border' => '0')) . ' ' . db_result($result, $i, 'subject') . '</a></td>' . '<td width="15%">' . db_result($result, $i, 'realname') . '</td>' . '<td width="15%">' . date($dateFormat, db_result($result, $i, 'post_date')) . '</td></tr>';
         $rowColor++;
     }
     return $return;
 }
 /**
  * getRows - get the html output for result rows
  *
  * @return string html output
  */
 function getRows()
 {
     $rowsCount = $this->searchQuery->getRowsCount();
     $result =& $this->searchQuery->getResult();
     $dateFormat = _('Y-m-d H:i');
     $return = '';
     $rowColor = 0;
     $lastProjectName = null;
     for ($i = 0; $i < $rowsCount; $i++) {
         //section changed
         $currentProjectName = db_result($result, $i, 'project_name');
         if ($lastProjectName != $currentProjectName) {
             $return .= '<tr><td colspan="7">' . $currentProjectName . '</td></tr>';
             $lastProjectName = $currentProjectName;
             $rowColor = 0;
         }
         $return .= '<tr ' . $GLOBALS['HTML']->boxGetAltRowStyle($rowColor) . '>' . ' <td width="5%">&nbsp;</td>' . ' <td>' . db_result($result, $i, 'project_task_id') . '</td>' . ' <td>' . '<a href="' . util_make_url('/pm/task.php?func=detailtask&project_task_id=' . db_result($result, $i, 'project_task_id') . '&group_id=' . $this->groupId . '&group_project_id=' . db_result($result, $i, 'group_project_id')) . '">' . html_image('ic/msg.png', '10', '12', array('border' => '0')) . ' ' . db_result($result, $i, 'summary') . '</a></td>' . ' <td width="15%">' . date($dateFormat, db_result($result, $i, 'start_date')) . '</td>' . ' <td width="15%">' . date($dateFormat, db_result($result, $i, 'end_date')) . '</td>' . ' <td width="15%">' . db_result($result, $i, 'realname') . '</td>' . ' <td width="8%">' . db_result($result, $i, 'percent_complete') . ' %</td></tr>';
         $rowColor++;
     }
     return $return;
 }
 /**
  * getRows - get the html output for result rows
  *
  * @return string html output
  */
 function getRows()
 {
     $rowsCount = $this->searchQuery->getRowsCount();
     $result =& $this->searchQuery->getResult();
     $dateFormat = _('Y-m-d H:i');
     $return = '';
     $lastDocGroup = null;
     $rowColor = 0;
     for ($i = 0; $i < $rowsCount; $i++) {
         //section changed
         $currentDocGroup = db_result($result, $i, 'groupname');
         if ($lastDocGroup != $currentDocGroup) {
             $return .= '<tr><td colspan="4">' . $currentDocGroup . '</td></tr>';
             $lastDocGroup = $currentDocGroup;
             $rowColor = 0;
         }
         $return .= '<tr ' . $GLOBALS['HTML']->boxGetAltRowStyle($rowColor) . '>' . '<td width="5%">&nbsp;</td>' . '<td>' . db_result($result, $i, 'docid') . '</td>' . '<td><a href="' . util_make_url('/docman/view.php/' . $this->groupId . '/' . db_result($result, $i, 'docid') . '/' . db_result($result, $i, 'title')) . '">' . html_image('ic/msg.png', '10', '12', array('border' => '0')) . ' ' . db_result($result, $i, 'title') . '</a></td>' . '<td>' . db_result($result, $i, 'description') . '</td></tr>';
         $rowColor++;
     }
     return $return;
 }
 /**
  * getRows - get the html output for result rows
  *
  * @return string html output
  */
 function getRows()
 {
     $rowsCount = $this->searchQuery->getRowsCount();
     $result =& $this->searchQuery->getResult();
     $dateFormat = _('Y-m-d H:i');
     $return = '';
     $rowColor = 0;
     $lastTracker = null;
     for ($i = 0; $i < $rowsCount; $i++) {
         //section changed
         $currentTracker = db_result($result, $i, 'name');
         if ($lastTracker != $currentTracker) {
             $return .= '<tr><td colspan="5">' . $currentTracker . '</td></tr>';
             $lastTracker = $currentTracker;
             $rowColor = 0;
         }
         $return .= '<tr ' . $GLOBALS['HTML']->boxGetAltRowStyle($rowColor) . '>' . '<td width="5%">&nbsp;</td>' . '<td>' . db_result($result, $i, 'artifact_id') . '</td>' . '<td>' . '<a href="' . util_make_url('/tracker/?func=detail&group_id=' . $this->groupId . '&aid=' . db_result($result, $i, 'artifact_id') . '&atid=' . db_result($result, $i, 'group_artifact_id')) . '">' . html_image('ic/msg.png', '10', '12', array('border' => '0')) . ' ' . db_result($result, $i, 'summary') . '</a></td>' . '<td width="15%">' . db_result($result, $i, 'realname') . '</td>' . '<td width="15%">' . date($dateFormat, db_result($result, $i, 'open_date')) . '</td></tr>';
         $rowColor++;
     }
     return $return;
 }
Exemplo n.º 12
0
        form_release_key(getStringFromRequest('form_key'));
        exit_error('Error', $u->getErrorMessage());
    }
    if (!$u->setNewEmailAndHash($newemail, $confirm_hash)) {
        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();
?>
"/>
Exemplo n.º 13
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'));
}
Exemplo n.º 14
0
 function CallHook($hookname, &$params)
 {
     if (isset($params['group_id'])) {
         $group_id = $params['group_id'];
     } elseif (isset($params['group'])) {
         $group_id = $params['group'];
     } else {
         $group_id = null;
     }
     if ($hookname == "groupmenu") {
         $project = group_get_object($group_id);
         if (!$project || !is_object($project)) {
             return;
         }
         if ($project->isError()) {
             return;
         }
         if (!$project->isProject()) {
             return;
         }
         if ($project->usesPlugin($this->name)) {
             $params['TITLES'][] = $this->text;
             $params['DIRS'][] = util_make_url('/plugins/mediawiki/wiki/' . $project->getUnixName() . '/index.php');
             $params['ADMIN'][] = '';
             $params['TOOLTIPS'][] = _('Mediawiki Space');
         }
         $params['toptab'] == $this->name ? $params['selected'] = count($params['TITLES']) - 1 : '';
     } elseif ($hookname == "groupisactivecheckbox") {
         //Check if the group is active
         // this code creates the checkbox in the project edit public info page to activate/deactivate the plugin
         $group = group_get_object($group_id);
         echo "<tr>";
         echo "<td>";
         echo ' <input type="checkbox" name="use_mediawikiplugin" value="1" ';
         // checked or unchecked?
         if ($group->usesPlugin($this->name)) {
             echo "checked";
         }
         echo " /><br/>";
         echo "</td>";
         echo "<td>";
         echo "<strong>Use " . $this->text . " Plugin</strong>";
         echo "</td>";
         echo "</tr>";
     } elseif ($hookname == "groupisactivecheckboxpost") {
         // this code actually activates/deactivates the plugin after the form was submitted in the project edit public info page
         $group = group_get_object($group_id);
         $use_mediawikiplugin = getStringFromRequest('use_mediawikiplugin');
         if ($use_mediawikiplugin == 1) {
             $group->setPluginUse($this->name);
         } else {
             $group->setPluginUse($this->name, false);
         }
     } elseif ($hookname == "project_public_area") {
         $project = group_get_object($group_id);
         if (!$project || !is_object($project)) {
             return;
         }
         if ($project->isError()) {
             return;
         }
         if (!$project->isProject()) {
             return;
         }
         if ($project->usesPlugin($this->name)) {
             echo '<div class="public-area-box">';
             print '<a href="' . util_make_url('/plugins/mediawiki/wiki/' . $project->getUnixName() . '/index.php') . '">';
             print html_abs_image(util_make_url('/plugins/mediawiki/wiki/' . $project->getUnixName() . '/skins/fusionforge/wiki.png'), '20', '20', array('alt' => 'Mediawiki'));
             print ' Mediawiki';
             print '</a>';
             echo '</div>';
         }
     } elseif ($hookname == "role_get") {
         $role =& $params['role'];
         // Read access
         $right = new PluginSpecificRoleSetting($role, 'plugin_mediawiki_read');
         $right->SetAllowedValues(array('0', '1'));
         $right->SetDefaultValues(array('Admin' => '1', 'Senior Developer' => '1', 'Junior Developer' => '1', 'Doc Writer' => '1', 'Support Tech' => '1'));
         // Edit privileges
         $right = new PluginSpecificRoleSetting($role, 'plugin_mediawiki_edit');
         $right->SetAllowedValues(array('0', '1', '2', '3'));
         $right->SetDefaultValues(array('Admin' => '3', 'Senior Developer' => '2', 'Junior Developer' => '1', 'Doc Writer' => '3', 'Support Tech' => '0'));
         // File upload privileges
         $right = new PluginSpecificRoleSetting($role, 'plugin_mediawiki_upload');
         $right->SetAllowedValues(array('0', '1', '2'));
         $right->SetDefaultValues(array('Admin' => '2', 'Senior Developer' => '2', 'Junior Developer' => '1', 'Doc Writer' => '2', 'Support Tech' => '0'));
         // Administrative tasks
         $right = new PluginSpecificRoleSetting($role, 'plugin_mediawiki_admin');
         $right->SetAllowedValues(array('0', '1'));
         $right->SetDefaultValues(array('Admin' => '1', 'Senior Developer' => '0', 'Junior Developer' => '0', 'Doc Writer' => '0', 'Support Tech' => '0'));
     } elseif ($hookname == "role_normalize") {
         $role =& $params['role'];
         $new_sa =& $params['new_sa'];
         $new_pa =& $params['new_pa'];
         $projects = $role->getLinkedProjects();
         foreach ($projects as $p) {
             $role->normalizePermsForSection($new_pa, 'plugin_mediawiki_read', $p->getID());
             $role->normalizePermsForSection($new_pa, 'plugin_mediawiki_edit', $p->getID());
             $role->normalizePermsForSection($new_pa, 'plugin_mediawiki_upload', $p->getID());
             $role->normalizePermsForSection($new_pa, 'plugin_mediawiki_admin', $p->getID());
         }
     } elseif ($hookname == "role_translate_strings") {
         $right = new PluginSpecificRoleSetting($role, 'plugin_mediawiki_read');
         $right->setDescription(_('Mediawiki read access'));
         $right->setValueDescriptions(array('0' => _('No reading'), '1' => _('Read access')));
         $right = new PluginSpecificRoleSetting($role, 'plugin_mediawiki_edit');
         $right->setDescription(_('Mediawiki write access'));
         $right->setValueDescriptions(array('0' => _('No editing'), '1' => _('Edit existing pages only'), '2' => _('Edit and create pages'), '3' => _('Edit, create, move, delete pages')));
         $right = new PluginSpecificRoleSetting($role, 'plugin_mediawiki_upload');
         $right->setDescription(_('Mediawiki file upload'));
         $right->setValueDescriptions(array('0' => _('No uploading'), '1' => _('Upload permitted'), '2' => _('Upload and re-upload')));
         $right = new PluginSpecificRoleSetting($role, 'plugin_mediawiki_admin');
         $right->setDescription(_('Mediawiki administrative tasks'));
         $right->setValueDescriptions(array('0' => _('No administrative access'), '1' => _('Edit interface, import XML dumps')));
     } elseif ($hookname == "role_get_setting") {
         $role = $params['role'];
         $reference = $params['reference'];
         $value = $params['value'];
         switch ($params['section']) {
             case 'plugin_mediawiki_read':
                 if ($role->hasPermission('project_admin', $reference)) {
                     $params['result'] = 1;
                 } else {
                     $params['result'] = $value;
                 }
                 break;
             case 'plugin_mediawiki_edit':
                 if ($role->hasPermission('project_admin', $reference)) {
                     $params['result'] = 3;
                 } else {
                     $params['result'] = $value;
                 }
                 break;
             case 'plugin_mediawiki_upload':
                 if ($role->hasPermission('project_admin', $reference)) {
                     $params['result'] = 2;
                 } else {
                     $params['result'] = $value;
                 }
                 break;
             case 'plugin_mediawiki_admin':
                 if ($role->hasPermission('project_admin', $reference)) {
                     $params['result'] = 1;
                 } else {
                     $params['result'] = $value;
                 }
                 break;
         }
     } elseif ($hookname == "role_has_permission") {
         $value = $params['value'];
         switch ($params['section']) {
             case 'plugin_mediawiki_read':
                 switch ($params['action']) {
                     case 'read':
                     default:
                         $params['result'] |= $value >= 1;
                         break;
                 }
                 break;
             case 'plugin_mediawiki_edit':
                 switch ($params['action']) {
                     case 'editexisting':
                         $params['result'] |= $value >= 1;
                         break;
                     case 'editnew':
                         $params['result'] |= $value >= 2;
                         break;
                     case 'editmove':
                         $params['result'] |= $value >= 3;
                         break;
                 }
                 break;
             case 'plugin_mediawiki_upload':
                 switch ($params['action']) {
                     case 'upload':
                         $params['result'] |= $value >= 1;
                         break;
                     case 'reupload':
                         $params['result'] |= $value >= 2;
                         break;
                 }
                 break;
             case 'plugin_mediawiki_admin':
                 switch ($params['action']) {
                     case 'admin':
                     default:
                         $params['result'] |= $value >= 1;
                         break;
                 }
                 break;
         }
     } elseif ($hookname == "list_roles_by_permission") {
         switch ($params['section']) {
             case 'plugin_mediawiki_read':
                 switch ($params['action']) {
                     case 'read':
                     default:
                         $params['qpa'] = db_construct_qpa($params['qpa'], ' AND perm_val >= 1');
                         break;
                 }
                 break;
             case 'plugin_mediawiki_edit':
                 switch ($params['action']) {
                     case 'editexisting':
                         $params['qpa'] = db_construct_qpa($params['qpa'], ' AND perm_val >= 1');
                         break;
                     case 'editnew':
                         $params['qpa'] = db_construct_qpa($params['qpa'], ' AND perm_val >= 2');
                         break;
                     case 'editmove':
                         $params['qpa'] = db_construct_qpa($params['qpa'], ' AND perm_val >= 3');
                         break;
                 }
                 break;
             case 'plugin_mediawiki_upload':
                 switch ($params['action']) {
                     case 'upload':
                         $params['qpa'] = db_construct_qpa($params['qpa'], ' AND perm_val >= 1');
                         break;
                     case 'reupload':
                         $params['qpa'] = db_construct_qpa($params['qpa'], ' AND perm_val >= 2');
                         break;
                 }
                 break;
             case 'plugin_mediawiki_admin':
                 switch ($params['action']) {
                     case 'admin':
                     default:
                         $params['qpa'] = db_construct_qpa($params['qpa'], ' AND perm_val >= 1');
                         break;
                 }
                 break;
         }
     } elseif ($hookname == "project_admin_plugins") {
         $group_id = $params['group_id'];
         $group = group_get_object($group_id);
         if ($group->usesPlugin($this->name)) {
             echo util_make_link("/plugins/mediawiki/plugin_admin.php?group_id=" . $group->getID(), _("MediaWiki Plugin admin")) . "<br />";
         }
     } elseif ($hookname == "clone_project_from_template") {
         $template = $params['template'];
         $project = $params['project'];
         $id_mappings = $params['id_mappings'];
         $sections = array('plugin_mediawiki_read', 'plugin_mediawiki_edit', 'plugin_mediawiki_upload', 'plugin_mediawiki_admin');
         foreach ($template->getRoles() as $oldrole) {
             $newrole = RBACEngine::getInstance()->getRoleById($id_mappings['role'][$oldrole->getID()]);
             $oldsettings = $oldrole->getSettingsForProject($template);
             foreach ($sections as $section) {
                 if (isset($oldsettings[$section][$template->getID()])) {
                     $newrole->setSetting($section, $project->getID(), $oldsettings[$section][$template->getID()]);
                 }
             }
         }
     } elseif ($hookname == 'group_delete') {
         $projectId = $params['group_id'];
         $projectObject = group_get_object($projectId);
         if ($projectObject->usesPlugin($this->name)) {
             //delete the files and db schema
             $schema = 'plugin_mediawiki_' . $projectObject->getUnixName();
             // Sanitize schema name
             $schema = strtr($schema, "-", "_");
             db_query_params('drop schema $1 cascade', array($schema));
             exec('/bin/rm -rf ' . forge_get_config('projects_path', 'mediawiki') . '/' . $projectObject->getUnixName());
         }
     }
 }
Exemplo n.º 15
0
 /**
  *	sendAttachNotice - contains the logic to send out email attachement followups when a message is posted.
  *
  *	@param int	attach_id	- The id of the file that has been attached
  *
  *	@return boolean success.
  */
 function sendAttachNotice($attach_id)
 {
     if ($attach_id) {
         $ids =& $this->Forum->getMonitoringIDs();
         //
         //	See if there is anyone to send messages to
         //
         if (!count($ids) > 0 && !$this->Forum->getSendAllPostsTo()) {
             return true;
         }
         $body = "\nRead and respond to this message at: " . "\n" . util_make_url('/forum/message.php?msg_id=' . $this->getID()) . "\nBy: " . $this->getPosterRealName() . "\n\n";
         $body .= "A file has been uploaded to this message, you can download it at: " . "\n" . util_make_url('/forum/attachment.php?attachid=' . $attach_id . "&group_id=" . $this->Forum->Group->getID() . "&forum_id=" . $this->Forum->getID()) . "\n\n";
         $body .= "\n\n______________________________________________________________________" . "\nYou are receiving this email because you elected to monitor this forum." . "\nTo stop monitoring this forum, login to " . $GLOBALS['sys_name'] . " and visit: " . "\n" . util_make_url('/forum/monitor.php?forum_id=' . $this->Forum->getID() . '&group_id=' . $this->Forum->Group->getID() . '&stop=1');
         $extra_headers = "Return-Path: <noreply@" . $GLOBALS['sys_default_domain'] . ">\n";
         $extra_headers .= "Errors-To: <noreply@" . $GLOBALS['sys_default_domain'] . ">\n";
         $extra_headers .= "Sender: <noreply@" . $GLOBALS['sys_default_domain'] . ">\n";
         $extra_headers .= "Reply-To: " . $this->Forum->getReturnEmailAddress() . "\n";
         $extra_headers .= "Precedence: Bulk\n" . "List-Id: " . $this->Forum->getName() . " <forum" . $this->Forum->getId() . "@" . $GLOBALS['sys_default_domain'] . ">\n" . "List-Help: " . util_make_url('/forum/forum.php?id=' . $this->Forum->getId()) . "\n" . "Message-Id: <forumpost" . $this->getId() . "@" . $GLOBALS['sys_default_domain'] . ">";
         $parentid = $this->getParentId();
         if (!empty($parentid)) {
             $extra_headers .= "\nIn-Reply-To: " . $this->Forum->getReturnEmailAddress() . "\n" . "References: <forumpost" . $this->getParentId() . "@" . $GLOBALS['sys_default_domain'] . ">";
         }
         $subject = "[" . $this->Forum->getUnixName() . "][" . $this->getID() . "] " . util_unconvert_htmlspecialchars($this->getSubject());
         if (count($ids) != 0) {
             $sql = "SELECT email FROM users WHERE status='A' AND user_id IN ('" . implode($ids, '\',\'') . "')";
             $bccres = db_query($sql);
         }
         ($BCC =& implode(util_result_column_to_array($bccres), ',')) . ',' . $this->Forum->getSendAllPostsTo();
         $User = user_get_object($this->getPosterID());
         util_send_message('', $subject, $body, "noreply@" . $GLOBALS['sys_default_domain'], $BCC, 'Forum', $extra_headers);
         return true;
     }
     return false;
 }
Exemplo n.º 16
0
	{
		autoOpen: false,
		width: 350,
		modal: true,
		buttons: [
			{
				text : "<?php 
            echo _("Create task");
            ?>
",
				id: "new-task-dialog-submit-button",
				click : function () {
					jQuery.ajax({
						type: 'POST',
						url: '<?php 
            echo util_make_url('/plugins/taskboard/ajax.php');
            ?>
',
						dataType: 'json',
						data : {
							action : 'add',
							group_id : gGroupId,
							tracker_id : jQuery('#tracker_id').val(),
							user_story_id : jQuery('#user_story_id').val(), 
							title : jQuery('#tracker-summary').val(),
							desc : jQuery('#tracker-description').val(),
							release : jQuery('select[name="_release"]').val()
						},
						async: true
					}).done(function( answer ) {
						jQuery('#new-task-dialog').dialog( "close" );
Exemplo n.º 17
0
} else {
    echo '<p>' . _('Choose a tracker and you can browse/edit/add items to it.') . '<p>';
    /*
    Put the result set (list of trackers for this group) into a column with folders
    */
    $tablearr = array(_('Tracker'), _('Description'), _('Open'), _('Total'));
    echo $HTML->listTableTop($tablearr);
    for ($j = 0; $j < count($at_arr); $j++) {
        if (!is_object($at_arr[$j])) {
            //just skip it
        } elseif ($at_arr[$j]->isError()) {
            echo $at_arr[$j]->getErrorMessage();
        } else {
            echo '
		<tr ' . $HTML->boxGetAltRowStyle($j) . '>
			<td><a href="' . util_make_url('/tracker/?atid=' . $at_arr[$j]->getID() . '&amp;group_id=' . $group_id . '&func=browse') . '">' . html_image("ic/tracker20w.png", "20", "20", array("border" => "0")) . ' &nbsp;' . $at_arr[$j]->getName() . '</a>
			</td>
			<td>' . $at_arr[$j]->getDescription() . '
			</td>
			<td style="text-align:center">' . (int) $at_arr[$j]->getOpenCount() . '
			</td>
			<td style="text-align:center">' . (int) $at_arr[$j]->getTotalCount() . '
			</td>
		</tr>';
        }
    }
    echo $HTML->listTableBottom();
}
echo site_project_footer(array());
// Local Variables:
// mode: php
Exemplo n.º 18
0
 *
 */
require_once '../env.inc.php';
require_once $gfwww . 'include/pre.php';
require_once $gfwww . 'docman/include/doc_utils.php';
require_once $gfcommon . 'docman/Document.class.php';
$docid = getIntFromRequest('docid');
if ($docid) {
    $group_id = getIntFromRequest('group_id');
    $g =& group_get_object($group_id);
    if (!$g || !is_object($g)) {
        exit_no_group();
    } elseif ($g->isError()) {
        exit_error('Error', $g->getErrorMessage());
    }
    $d = new Document($g, $docid);
    if (!$d || !is_object($d)) {
        exit_error('Document unavailable', 'Document is not available.');
    } elseif ($d->isError()) {
        exit_error('Error', $d->getErrorMessage());
    }
    docman_header($d->getName(), $d->getName());
    printf(_('This document was moved to <a href="%1$s">this new location</a>'), util_make_url("/docman/view.php/{$group_id}/{$docid}"));
    docman_footer(array());
} else {
    exit_error(_('No document data'), _('No document to display - invalid or inactive document number.'));
}
// Local Variables:
// mode: php
// c-file-style: "bsd"
// End:
Exemplo n.º 19
0
 /**
  *   sendNotice - Notifies of document submissions
  */
 function sendNotice($new = true)
 {
     $BCC = $this->Group->getDocEmailAddress();
     if (strlen($BCC) > 0) {
         $subject = '[' . $this->Group->getPublicName() . '] New document - ' . $this->getName();
         $body = "Project: " . $this->Group->getPublicName() . "\n";
         $body .= "Group: " . $groupname . "\n";
         $body .= "Document title: " . $this->getName() . "\n";
         $body .= "Document description: " . util_unconvert_htmlspecialchars($this->getDescription()) . "\n";
         $body .= "Submitter: " . $this->getCreatorRealName() . " (" . $this->getCreatorUserName() . ") \n";
         $body .= "\n\n-------------------------------------------------------" . "\nFor more info, visit:" . "\n\n" . util_make_url('/docman/index.php?group_id=' . $this->Group->getID());
         util_send_message('', $subject, $body, '', $BCC);
     }
     return true;
 }
Exemplo n.º 20
0
 *
 * 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));
Exemplo n.º 21
0
     $end_date = date("n/j/y", $task->getEndDate());
     $projectGroup =& $task->getProjectGroup();
     if ($projectGroup && is_object($projectGroup)) {
         $debug_info .= 'Project Group ID: ' . $projectGroup->getID() . "\n";
         $group =& $projectGroup->getGroup();
         if ($group && is_object($group)) {
             $debug_info .= 'Group ID: ' . $group->getID() . "\n";
             if ($group->getID() != $last_group) {
                 echo $group->getPublicName() . ":\n";
             }
             if ($projectGroup->getID() != $last_projectgroup) {
                 echo $projectGroup->getName() . ":\n";
             }
             echo html_entity_decode($task->getSummary()) . ":\n";
             echo '***' . ($now > $task->getEndDate() ? 'overdue' : "due {$end_date}") . "***\n";
             echo util_make_url('/pm/task.php?func=detailtask&project_task_id=' . $task->getID() . '&group_id=' . $group->getID() . '&group_project_id=' . $projectGroup->getID());
             echo "\n\n";
             $last_group = $group->getID();
             $last_projectgroup = $projectGroup->getID();
             $valid_tasks++;
         }
     }
     $debug_info .= "------------\n";
 }
 $messagebody = ob_get_contents();
 ob_end_clean();
 if ($valid_tasks > 0) {
     util_send_message($email, $subject, $messagebody);
 }
 /* else {
 				echo $debug_info."\n";
Exemplo n.º 22
0
    function footer($params)
    {
        ?>

			<!-- end main body row -->


		<!-- end inner body row -->
</div> <!-- end of content -->
<!-- PLEASE LEAVE "Powered By FusionForge" on your site -->
<br />
<div align="right">
<a href="http://fusionforge.org/"><img src="<?php 
        echo util_make_url('/images/pow-fusionforge.png');
        ?>
" alt="Powered By FusionForge" border="0" /></a>
</div>

</body>
</html>
</xml>
<?php 
    }
Exemplo n.º 23
0
     }
     if (!$group->usesPlugin($pluginname)) {
         //check if the group has the MediaWiki plugin active
         exit_error("Error", "First activate the {$pluginname} plugin through the Project's Admin Interface");
     }
     $userperm = $group->getPermission($user);
     //we´ll check if the user belongs to the group (optional)
     if (!$userperm->IsMember()) {
         // exit_error("Access Denied", "You are not a member of this project");
     }
     // other perms checks here...
     mediawiki_Project_Header(array('title' => $pluginname . ' Project Plugin!', 'pagename' => "{$pluginname}", 'sectionvals' => array(group_getname($id))));
     // DO THE STUFF FOR THE PROJECT PART HERE
     // echo "We are in the Project MediaWiki plugin <br>";
     // echo "Greetings from planet " . $world; // $world comes from the config file in /etc
     echo '<iframe src="' . util_make_url('/mediawiki/index.php?title=' . $group->getUnixName()) . '" frameborder="no" width=100% height=700></iframe>';
 } elseif ($type == 'user') {
     $realuser = user_get_object($id);
     //
     if (!$realuser || !$realuser->usesPlugin($pluginname)) {
         exit_error("Error", "First activate the User's {$pluginname} plugin through Account Manteinance Page");
     }
     if (!$user || $user->getID() != $id) {
         // if someone else tried to access the private MediaWiki part of this user
         exit_error("Access Denied", "You cannot access other user's personal {$pluginname}");
     }
     mediawiki_User_Header(array('title' => 'My ' . $pluginname, 'pagename' => "{$pluginname}", 'sectionvals' => array($realuser->getUnixName())));
     // DO THE STUFF FOR THE USER PART HERE
     echo "We are in the User MediaWiki plugin <br>";
     echo "Greetings from planet " . $world;
     // $world comes from the config file in /etc
Exemplo n.º 24
0
    function quickNav()
    {
        if (!session_loggedin()) {
            return '';
        } else {
            $res = db_query("SELECT * FROM groups NATURAL JOIN user_group WHERE user_id='" . user_getid() . "' ORDER BY group_name");
            echo db_error();
            if (!$res || db_numrows($res) < 1) {
                return '';
            } else {
                $ret = '
		<form name="quicknavform">
			<select name="quicknav" onChange="location.href=document.quicknavform.quicknav.value">';
                $ret .= '
				<option value="">' . _('Quick Jump To...') . '</option>';
                for ($i = 0; $i < db_numrows($res); $i++) {
                    $ret .= '
				<option value="' . util_make_url_g(db_result($res, $i, 'unix_group_name'), db_result($res, $i, 'group_id')) . '">' . db_result($res, $i, 'group_name') . '</option>';
                    if (trim(db_result($res, $i, 'admin_flags')) == 'A') {
                        $ret .= '
				<option value="' . util_make_url('/project/admin/?group_id=' . db_result($res, $i, 'group_id')) . '">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Admin</option>';
                    }
                    //tracker
                    if (db_result($res, $i, 'use_tracker')) {
                        $ret .= '
				<option value="' . util_make_url('/tracker/?group_id=' . db_result($res, $i, 'group_id')) . '">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Tracker</option>';
                        if (db_result($res, $i, 'admin_flags') || db_result($res, $i, 'artifact_flags')) {
                            $ret .= '
				<option value="' . util_make_url('/tracker/admin/?group_id=' . db_result($res, $i, 'group_id')) . '">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Admin</option>';
                        }
                    }
                    //task mgr
                    if (db_result($res, $i, 'use_pm')) {
                        $ret .= '
				<option value="' . util_make_url('/pm/?group_id=' . db_result($res, $i, 'group_id')) . '">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Task Manager</option>';
                        if (trim(db_result($res, $i, 'admin_flags')) == 'A' || db_result($res, $i, 'project_flags')) {
                            $ret .= '
				<option value="' . util_make_url('/pm/admin/?group_id=' . db_result($res, $i, 'group_id')) . '">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Admin</option>';
                        }
                    }
                    //FRS
                    if (db_result($res, $i, 'use_frs')) {
                        $ret .= '
				<option value="' . util_make_url('/frs/?group_id=' . db_result($res, $i, 'group_id')) . '">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Files</option>';
                        if (trim(db_result($res, $i, 'admin_flags')) == 'A' || db_result($res, $i, 'release_flags')) {
                            $ret .= '
				<option value="' . util_make_url('/frs/admin/?group_id=' . db_result($res, $i, 'group_id')) . '">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Admin</option>';
                        }
                    }
                    //SCM
                    if (db_result($res, $i, 'use_scm')) {
                        $ret .= '
				<option value="' . util_make_url('/scm/?group_id=' . db_result($res, $i, 'group_id')) . '">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;SCM</option>';
                        /*if (db_result($res,$i,'admin_flags') || db_result($res,$i,'project_flags')) {
                        			$ret .= '
                        		<option value="'.util_make_url('/pm/admin/?group_id='.db_result($res,$i,'group_id')).'">&nbsp;&nbsp;&nbsp;&nbsp;Admin</option>';
                        				} */
                    }
                    //forum
                    if (db_result($res, $i, 'use_forum')) {
                        $ret .= '
				<option value="' . util_make_url('/forum/?group_id=' . db_result($res, $i, 'group_id')) . '">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Forum</option>';
                        if (trim(db_result($res, $i, 'admin_flags')) == 'A' || db_result($res, $i, 'forum_flags')) {
                            $ret .= '
				<option value="' . util_make_url('/forum/admin/?group_id=' . db_result($res, $i, 'group_id')) . '">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Admin</option>';
                        }
                    }
                    //mail
                    if (db_result($res, $i, 'use_mail')) {
                        $ret .= '
				<option value="' . util_make_url('/mail/?group_id=' . db_result($res, $i, 'group_id')) . '">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Lists</option>';
                        if (trim(db_result($res, $i, 'admin_flags')) == 'A') {
                            $ret .= '
				<option value="' . util_make_url('/mail/admin/?group_id=' . db_result($res, $i, 'group_id')) . '">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Admin</option>';
                        }
                    }
                    //doc
                    if (db_result($res, $i, 'use_docman')) {
                        $ret .= '
				<option value="' . util_make_url('/docman/?group_id=' . db_result($res, $i, 'group_id')) . '">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Docs</option>';
                        if (trim(db_result($res, $i, 'admin_flags')) == 'A' || db_result($res, $i, 'doc_flags')) {
                            $ret .= '
				<option value="' . util_make_url('/docman/admin/?group_id=' . db_result($res, $i, 'group_id')) . '">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Admin</option>';
                        }
                    }
                    //news
                    if (db_result($res, $i, 'use_news')) {
                        $ret .= '
				<option value="' . util_make_url('/news/?group_id=' . db_result($res, $i, 'group_id')) . '">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;News</option>';
                        if (trim(db_result($res, $i, 'admin_flags')) == 'A') {
                            $ret .= '
				<option value="' . util_make_url('/news/admin/?group_id=' . db_result($res, $i, 'group_id')) . '">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Admin</option>';
                        }
                    }
                    //survey
                    if (db_result($res, $i, 'use_survey')) {
                        $ret .= '
				<option value="' . util_make_url('/survey/?group_id=' . db_result($res, $i, 'group_id')) . '">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Surveys</option>';
                        if (trim(db_result($res, $i, 'admin_flags')) == 'A') {
                            $ret .= '
				<option value="' . util_make_url('/survey/admin/?group_id=' . db_result($res, $i, 'group_id')) . '">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Admin</option>';
                        }
                    }
                }
                $ret .= '
			</select>
		</form>';
            }
        }
        return $ret;
    }
Exemplo n.º 25
0
// -->
</script>
<body onLoad="show_add_snippet_box()">

<p><span class="important"><?php 
                        echo _('IMPORTANT!');
                        ?>
</span></p>
<p>
<?php 
                        echo _('If a new window opened, use it to add snippets to your package. If a new window did not open, use the following link to add to your package BEFORE you leave this page.');
                        ?>
</p>
<p>
<?php 
                        echo util_make_url('/snippet/add_snippet_to_package.php?snippet_package_version_id=' . $snippet_package_version_id, _('Add snippets to package'), array('target' => '_blank'));
                        ?>
</p>
<p><?php 
                        echo _('<strong>Browse the library</strong> to find the snippets you want to add, then add them using the new window link shown above.');
                        ?>
</p>
<p>

					<?php 
                        snippet_footer(array());
                        exit;
                    }
                } else {
                    form_release_key(getStringFromRequest("form_key"));
                    exit_error(_('Error - Go back and fill in all the information'));
Exemplo n.º 26
0
 * 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)) {
        $webmaster = $rowwm['user_name'] . "@" . $GLOBALS['sys_users_host'] . " (" . $rowwm['realname'] . ")";
    } else {
        $webmaster = "admin@" . $GLOBALS['sys_default_domain'];
    }
Exemplo n.º 27
0
$res = db_query("SELECT artifact_query_id,query_name \n\tFROM artifact_query WHERE user_id='" . user_getid() . "' AND group_artifact_id='" . $ath->getID() . "'");
//	Show the new pop-up boxes to select assigned to, status, etc
//
?>
<html>
<head>
<title>Query</title>
<link rel="stylesheet" type="text/css" href="<?php 
echo util_make_url('/themes/css/gforge-compat.css');
?>
" />
<?php 
$theme_cssfile = $GLOBALS['sys_themeroot'] . $GLOBALS['sys_theme'] . '/css/theme.css';
if (file_exists($theme_cssfile)) {
    echo '
<link rel="stylesheet" type="text/css" href="' . util_make_url('/themes/' . $GLOBALS['sys_theme'] . '/css/theme.css') . '" />
';
}
echo '

</head>
<body>
<h1>' . $feedback . '</h1>

<table border="3" cellpadding="4" rules="groups" frame="box" width="100%" class="tablecontent">
	<form action="' . getStringFromServer('PHP_SELF') . '?func=query&group_id=' . $group_id . '&atid=' . $ath->getID() . '" method="post">
	<input type="hidden" name="form_key" value="' . form_generate_key() . '">
	<tr>
		<td>
			<input type="submit" name="submit" value="' . _('Save Changes') . '" />
		</td>
Exemplo n.º 28
0
    /**
     *	header() - "steel theme" top of page
     *
     * @param	array	Header parameters array
     */
    function header($params)
    {
        global $sys_name;
        $this->headerStart($params);
        ?>

<link rel="stylesheet" type="text/css" href="<?php 
        echo util_make_url('/themes/osx/css/theme.css');
        ?>
" />
<body>

<table border="0" width="100%" cellspacing="0" cellpadding="0">

	<tr>
		<td><a href="<?php 
        echo util_make_url('/');
        ?>
"
			onmouseover="imgOver('logo')"
			onmouseout="imgOff('logo')"><img name="logo" border="0" height="60" width="180"
				src="<?php 
        echo $this->imgroot . 'logo.png';
        ?>
" alt="GForge Logo" /></a></td>
		<td><?php 
        echo $this->searchBox();
        ?>
</td>
		<td style="text-align:right"><?php 
        if (session_loggedin()) {
            ?>
				<b><?php 
            echo util_make_link('/account/logout.php', _('Log Out'));
            ?>
</b><br />
				<b><?php 
            echo util_make_link('/account/', _('My Account'));
            ?>
</b><?php 
        } else {
            ?>
				<b><?php 
            echo util_make_link('/account/login.php', _('Log In'));
            ?>
</b><br />
				<b><?php 
            echo util_make_link('/account/register.php', _('New Account'));
            ?>
</b><?php 
        }
        $params['template'] = '<br/><b>{menu}</b>';
        plugin_hook('headermenu', $params);
        ?>
</td>
		<td>&nbsp;&nbsp;</td>
	</tr>

</table>

<table border="0" width="100%" cellspacing="0" cellpadding="0">

	<tr>
		<td>&nbsp;</td>
		<td colspan="3">

<?php 
        echo $this->outerTabs($params);
        ?>

		</td>
		<td>&nbsp;</td>

	</tr>
	<tr>
		<td>&nbsp;</td>
		<td valign="top" width="99%" colspan="3">
			<!-- Inner Tabs / Shell -->

			<table border="0" width="100%" cellspacing="0" cellpadding="0">
<?php 
        if (isset($params['group']) && $params['group']) {
            ?>
			<tr>
				<td>&nbsp;</td>
				<td>
				<?php 
            echo $this->projectTabs($params['toptab'], $params['group']);
            ?>
				</td>
				<td>&nbsp;</td>
			</tr>
			<?php 
        }
        ?>
			<tr>
				<td><img
					src="<?php 
        echo $this->imgroot;
        ?>
clear.png" width="99%" height="10" alt="" /></td>
			</tr>

			<tr>
				<td><img
					src="<?php 
        echo $this->imgroot;
        ?>
clear.png" width="10" height="1" alt="" /></td>
				<td valign="top" width="99%">
	<?php 
    }
Exemplo n.º 29
0
"></script>
<div id="tabber" class="tabber">
<div class="tabbertab" title="<?php 
echo _('Followups');
?>
">
<table border="0" width="80%">
	<tr><td colspan="2">
		<br /><strong><?php 
echo _('OR Attach A Comment');
?>
: <?php 
echo notepad_button('document.forms[1].details');
?>
 <a href="javascript:help_window('<?php 
echo util_make_url('/help/tracker.php?helpname=comment');
?>
')"><strong>(?)</strong></a></strong><br />
		<textarea name="details" rows="7" cols="60"></textarea></p>
		<p>
		<h3><?php 
echo _('Followup');
?>
:</h3>
		<?php 
echo $ah->showMessages();
?>
	</td></tr>
</table>
</div>
<div class="tabbertab" title="<?php 
Exemplo n.º 30
0
    /**
     *	sendRegistrationEmail() - Send email for registration verification
     *
     *	@return true or false
     */
    function sendRegistrationEmail()
    {
        $message = stripcslashes(sprintf(_('Thank you for registering on the %3$s web site. You have
account with username %1$s created for you. In order
to complete your registration, visit the following url: 

<%2$s>

(If you don\'t see any URL above, it is likely due to a bug in your mail client.
Use one below, but make sure it is entered as the single line.)

%2$s

Enjoy the site.

-- the %3$s staff
'), $this->getUnixName(), util_make_url('/account/verify.php?confirm_hash=_' . $this->getConfirmHash()), $GLOBALS['sys_name']));
        util_send_message($this->getEmail(), sprintf(_('%1$s Account Registration'), $GLOBALS['sys_name']), $message);
    }