예제 #1
0
// | You should have received a copy of the GNU General Public License    |
// | along with this program; if not, write to:                           |
// |                                                                      |
// | Free Software Foundation, Inc.                                       |
// | 59 Temple Place - Suite 330                                          |
// | Boston, MA 02111-1307, USA.                                          |
// +----------------------------------------------------------------------+
// | Authors: João Prado Maia <*****@*****.**>                             |
// +----------------------------------------------------------------------+
//
// @(#) $Id: s.help.php 1.7 03/01/16 01:47:32-00:00 jpm $
//
include_once "config.inc.php";
include_once APP_INC_PATH . "class.template.php";
include_once APP_INC_PATH . "class.auth.php";
include_once APP_INC_PATH . "class.help.php";
include_once APP_INC_PATH . "db_access.php";
$tpl = new Template_API();
$tpl->setTemplate("help/index.tpl.html");
Auth::checkAuthentication(APP_COOKIE, 'index.php?err=5', true);
if (empty($HTTP_GET_VARS["topic"]) || !Help::topicExists($HTTP_GET_VARS["topic"])) {
    $topic = 'main';
} else {
    $topic = $HTTP_GET_VARS["topic"];
}
$tpl->assign("topic", $topic);
$tpl->assign("links", Help::getNavigationLinks($topic));
if ($topic != "main") {
    $tpl->assign("child_links", Help::getChildLinks($topic));
}
$tpl->displayTemplate();
예제 #2
0
// | Authors: João Prado Maia <*****@*****.**>                             |
// +----------------------------------------------------------------------+
//
// @(#) $Id$
//
include_once "../config.inc.php";
include_once APP_INC_PATH . "class.template.php";
include_once APP_INC_PATH . "class.auth.php";
include_once APP_INC_PATH . "class.user.php";
include_once APP_INC_PATH . "class.display_column.php";
include_once APP_INC_PATH . "db_access.php";
$prj_id = $_REQUEST['prj_id'];
$tpl = new Template_API();
$tpl->setTemplate("manage/index.tpl.html");
Auth::checkAuthentication(APP_COOKIE);
$tpl->assign("type", "column_display");
$role_id = Auth::getCurrentRole();
if ($role_id == User::getRoleID('administrator') || $role_id == User::getRoleID('manager')) {
    if ($role_id == User::getRoleID('administrator')) {
        $tpl->assign("show_setup_links", true);
    }
    if (@$HTTP_POST_VARS["cat"] == "save") {
        $tpl->assign("result", Display_Column::save());
    }
    $page = 'list_issues';
    $available = Display_Column::getAllColumns($page);
    $selected = Display_Column::getSelectedColumns($prj_id, $page);
    // re-order available array to match rank
    $available_ordered = array();
    foreach ($selected as $field_name => $field_info) {
        $available_ordered[$field_name] = $available[$field_name];
예제 #3
0
// +----------------------------------------------------------------------+
// | Copyright (c) 2003, 2004, 2005, 2006 MySQL AB                        |
// |                                                                      |
// | This program 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.                                  |
// |                                                                      |
// | This program is distributed in the hope that it will be useful,      |
// | but WITHOUT ANY WARRANTY; without even the implied warranty of       |
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the        |
// | GNU General Public License for more details.                         |
// |                                                                      |
// | You should have received a copy of the GNU General Public License    |
// | along with this program; if not, write to:                           |
// |                                                                      |
// | Free Software Foundation, Inc.                                       |
// | 59 Temple Place - Suite 330                                          |
// | Boston, MA 02111-1307, USA.                                          |
// +----------------------------------------------------------------------+
// | Authors: João Prado Maia <*****@*****.**>                             |
// +----------------------------------------------------------------------+
//
// @(#) $Id: s.offline.php 1.1 03/01/16 01:47:32-00:00 jpm $
//
include_once "config.inc.php";
include_once APP_INC_PATH . "class.template.php";
$tpl = new Template_API();
$tpl->setTemplate("offline.tpl.html");
$tpl->assign("error_type", $error_type);
$tpl->smarty->display($tpl->tpl_name);
예제 #4
0
// +----------------------------------------------------------------------+
// | Authors: João Prado Maia <*****@*****.**>                             |
// +----------------------------------------------------------------------+
//
// @(#) $Id: s.news.php 1.1 04/01/13 20:02:51-00:00 jpradomaia $
//
include_once "../config.inc.php";
include_once APP_INC_PATH . "class.template.php";
include_once APP_INC_PATH . "class.auth.php";
include_once APP_INC_PATH . "class.project.php";
include_once APP_INC_PATH . "class.news.php";
include_once APP_INC_PATH . "db_access.php";
$tpl = new Template_API();
$tpl->setTemplate("manage/index.tpl.html");
Auth::checkAuthentication(APP_COOKIE);
$tpl->assign("type", "news");
$role_id = Auth::getCurrentRole();
if ($role_id == User::getRoleID('administrator') || $role_id == User::getRoleID('manager')) {
    if ($role_id == User::getRoleID('administrator')) {
        $tpl->assign("show_setup_links", true);
    }
    if (@$HTTP_POST_VARS["cat"] == "new") {
        $tpl->assign("result", News::insert());
    } elseif (@$HTTP_POST_VARS["cat"] == "update") {
        $tpl->assign("result", News::update());
    } elseif (@$HTTP_POST_VARS["cat"] == "delete") {
        News::remove();
    }
    if (@$HTTP_GET_VARS["cat"] == "edit") {
        $tpl->assign("info", News::getAdminDetails($HTTP_GET_VARS["id"]));
    }
예제 #5
0
include_once APP_INC_PATH . "class.template.php";
include_once APP_INC_PATH . "class.auth.php";
include_once APP_INC_PATH . "class.issue.php";
include_once APP_INC_PATH . "class.note.php";
include_once APP_INC_PATH . "class.support.php";
include_once APP_INC_PATH . "class.mail.php";
$tpl = new Template_API();
$tpl->setTemplate("associate.tpl.html");
Auth::checkAuthentication(APP_COOKIE, 'index.php?err=5', true);
if (@$HTTP_POST_VARS['cat'] == 'associate') {
    if ($HTTP_POST_VARS['target'] == 'email') {
        $res = Support::associate(Auth::getUserID(), $HTTP_POST_VARS['issue'], $HTTP_POST_VARS['item']);
        if ($res == 1) {
            Workflow::handleManualEmailAssociation(Issue::getProjectID($HTTP_POST_VARS['issue']), $HTTP_POST_VARS['issue']);
        }
        $tpl->assign("associate_result", $res);
    } elseif ($HTTP_POST_VARS['target'] == 'reference') {
        $res = Support::associateEmail(Auth::getUserID(), $HTTP_POST_VARS['issue'], $HTTP_POST_VARS['item']);
        if ($res == 1) {
            Workflow::handleManualEmailAssociation(Issue::getProjectID($HTTP_POST_VARS['issue']), $HTTP_POST_VARS['issue']);
        }
        $tpl->assign("associate_result", $res);
    } else {
        for ($i = 0; $i < count($HTTP_POST_VARS['item']); $i++) {
            $email = Support::getEmailDetails(Email_Account::getAccountByEmail($HTTP_POST_VARS['item'][$i]), $HTTP_POST_VARS['item'][$i]);
            // add the message body as a note
            $HTTP_POST_VARS['blocked_msg'] = $email['seb_full_email'];
            $HTTP_POST_VARS['title'] = $email['sup_subject'];
            $HTTP_POST_VARS['note'] = $email['seb_body'];
            // XXX: probably broken to use the current logged in user as the 'owner' of
            // XXX: this new note, but that's how it was already
예제 #6
0
// | (at your option) any later version.                                  |
// |                                                                      |
// | This program is distributed in the hope that it will be useful,      |
// | but WITHOUT ANY WARRANTY; without even the implied warranty of       |
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the        |
// | GNU General Public License for more details.                         |
// |                                                                      |
// | You should have received a copy of the GNU General Public License    |
// | along with this program; if not, write to:                           |
// |                                                                      |
// | Free Software Foundation, Inc.                                       |
// | 59 Temple Place - Suite 330                                          |
// | Boston, MA 02111-1307, USA.                                          |
// +----------------------------------------------------------------------+
// | Authors: João Prado Maia <*****@*****.**>                             |
// +----------------------------------------------------------------------+
//
// @(#) $Id: s.switch.php 1.3 03/01/16 01:47:32-00:00 jpm $
//
include_once "config.inc.php";
include_once APP_INC_PATH . "class.template.php";
include_once APP_INC_PATH . "class.auth.php";
include_once APP_INC_PATH . "db_access.php";
$tpl = new Template_API();
$tpl->setTemplate("switch.tpl.html");
Auth::checkAuthentication(APP_COOKIE);
// get the 'remember' setting of the project cookie
$cookie = Auth::getCookieInfo(APP_PROJECT_COOKIE);
Auth::setCurrentProject($HTTP_POST_VARS["current_project"], $cookie["remember"]);
$tpl->assign("current_user_prefs", Prefs::get(Auth::getUserID()));
$tpl->displayTemplate();
예제 #7
0
// +----------------------------------------------------------------------+
// | Authors: João Prado Maia <*****@*****.**>                             |
// +----------------------------------------------------------------------+
//
// @(#) $Id: s.forgot_password.php 1.8 03/12/12 19:09:43-00:00 jpradomaia $
//
include_once "config.inc.php";
include_once APP_INC_PATH . "class.template.php";
include_once APP_INC_PATH . "class.user.php";
include_once APP_INC_PATH . "class.mail.php";
include_once APP_INC_PATH . "db_access.php";
$tpl = new Template_API();
$tpl->setTemplate("forgot_password.tpl.html");
if (@$HTTP_POST_VARS["cat"] == "reset_password") {
    if (empty($HTTP_POST_VARS["email"])) {
        $tpl->assign("result", 4);
    }
    $usr_id = User::getUserIDByEmail($HTTP_POST_VARS["email"]);
    if (empty($usr_id)) {
        $tpl->assign("result", 5);
    } else {
        $info = User::getDetails($usr_id);
        if (!User::isActiveStatus($info["usr_status"])) {
            $tpl->assign("result", 3);
        } else {
            User::sendPasswordConfirmationEmail($usr_id);
            $tpl->assign("result", 1);
        }
    }
}
$tpl->displayTemplate();
예제 #8
0
$usr_id = Auth::getUserID();
$prj_id = Auth::getCurrentProject();
if (!Customer::hasCustomerIntegration($prj_id)) {
    // show all FAQ entries
    $support_level_id = -1;
} else {
    if (!Customer::doesBackendUseSupportLevels($prj_id)) {
        // show all FAQ entries
        $support_level_id = -1;
    } else {
        if (Auth::getCurrentRole() != User::getRoleID('Customer')) {
            // show all FAQ entries
            $support_level_id = -1;
        } else {
            $customer_id = User::getCustomerID(Auth::getUserID());
            $support_level_id = Customer::getSupportLevelID($prj_id, $customer_id);
        }
    }
}
$tpl->assign("faqs", FAQ::getListBySupportLevel($support_level_id));
if (!empty($HTTP_GET_VARS["id"])) {
    $t = FAQ::getDetails($HTTP_GET_VARS['id']);
    // check if this customer should have access to this FAQ entry or not
    if ($support_level_id != -1 && !in_array($support_level_id, $t['support_levels'])) {
        $tpl->assign('faq', -1);
    } else {
        $t['faq_created_date'] = Date_API::getFormattedDate($t["faq_created_date"]);
        $tpl->assign("faq", $t);
    }
}
$tpl->displayTemplate();
예제 #9
0
// |                                                                      |
// | Free Software Foundation, Inc.                                       |
// | 59 Temple Place - Suite 330                                          |
// | Boston, MA 02111-1307, USA.                                          |
// +----------------------------------------------------------------------+
// | Authors: João Prado Maia <*****@*****.**>                             |
// +----------------------------------------------------------------------+
//
// @(#) $Id$
//
include_once "config.inc.php";
include_once APP_INC_PATH . "class.template.php";
include_once APP_INC_PATH . "class.auth.php";
include_once APP_INC_PATH . "class.time_tracking.php";
include_once APP_INC_PATH . "db_access.php";
$tpl = new Template_API();
$tpl->setTemplate("add_time_tracking.tpl.html");
Auth::checkAuthentication(APP_COOKIE, 'index.php?err=5', true);
$issue_id = @$HTTP_POST_VARS["issue_id"] ? $HTTP_POST_VARS["issue_id"] : $HTTP_GET_VARS["iss_id"];
if (!Issue::canAccess($issue_id, Auth::getUserID())) {
    $tpl = new Template_API();
    $tpl->setTemplate("permission_denied.tpl.html");
    $tpl->displayTemplate();
    exit;
}
if (@$HTTP_POST_VARS["cat"] == "add_time") {
    $res = Time_Tracking::insertEntry();
    $tpl->assign("time_add_result", $res);
}
$tpl->assign(array("issue_id" => $issue_id, "time_categories" => Time_Tracking::getAssocCategories(), "current_user_prefs" => Prefs::get(Auth::getUserID())));
$tpl->displayTemplate();
예제 #10
0
// | Authors: João Prado Maia <*****@*****.**>                             |
// +----------------------------------------------------------------------+
//
// @(#) $Id: s.general.php 1.16 04/01/22 16:21:32-00:00 jpradomaia $
//
include_once "../config.inc.php";
include_once APP_INC_PATH . "class.template.php";
include_once APP_INC_PATH . "class.auth.php";
include_once APP_INC_PATH . "class.project.php";
include_once APP_INC_PATH . "class.user.php";
include_once APP_INC_PATH . "class.setup.php";
include_once APP_INC_PATH . "db_access.php";
$tpl = new Template_API();
$tpl->setTemplate("manage/index.tpl.html");
Auth::checkAuthentication(APP_COOKIE);
$tpl->assign("type", "general");
$role_id = Auth::getCurrentRole();
if ($role_id == User::getRoleID('administrator')) {
    $tpl->assign("show_setup_links", true);
    $tpl->assign("project_list", Project::getAll());
    if (@$HTTP_POST_VARS["cat"] == "update") {
        $setup = array();
        $setup["tool_caption"] = $HTTP_POST_VARS["tool_caption"];
        $setup["support_email"] = $HTTP_POST_VARS["support_email"];
        $setup["daily_tips"] = $HTTP_POST_VARS["daily_tips"];
        $setup["spell_checker"] = $HTTP_POST_VARS["spell_checker"];
        $setup["irc_notification"] = $HTTP_POST_VARS["irc_notification"];
        $setup["allow_unassigned_issues"] = $HTTP_POST_VARS["allow_unassigned_issues"];
        @($setup["update"] = $HTTP_POST_VARS["update"]);
        @($setup["closed"] = $HTTP_POST_VARS["closed"]);
        @($setup["notes"] = $HTTP_POST_VARS["notes"]);
예제 #11
0
// | Authors: João Prado Maia <*****@*****.**>                             |
// +----------------------------------------------------------------------+
//
// @(#) $Id$
//
include_once "../config.inc.php";
include_once APP_INC_PATH . "class.template.php";
include_once APP_INC_PATH . "class.auth.php";
include_once APP_INC_PATH . "class.user.php";
include_once APP_INC_PATH . "class.project.php";
include_once APP_INC_PATH . "class.status.php";
include_once APP_INC_PATH . "db_access.php";
$tpl = new Template_API();
$tpl->setTemplate("manage/index.tpl.html");
Auth::checkAuthentication(APP_COOKIE);
$tpl->assign("type", "customize_listing");
$role_id = Auth::getCurrentRole();
if ($role_id == User::getRoleID('administrator')) {
    $tpl->assign("show_setup_links", true);
    if (@$HTTP_POST_VARS["cat"] == "new") {
        $tpl->assign("result", Status::insertCustomization($HTTP_POST_VARS['project'], $HTTP_POST_VARS['status'], $HTTP_POST_VARS['date_field'], $HTTP_POST_VARS['label']));
    } elseif (@$HTTP_POST_VARS["cat"] == "update") {
        $tpl->assign("result", Status::updateCustomization($HTTP_POST_VARS['id'], $HTTP_POST_VARS['project'], $HTTP_POST_VARS['status'], $HTTP_POST_VARS['date_field'], $HTTP_POST_VARS['label']));
    } elseif (@$HTTP_POST_VARS["cat"] == "delete") {
        Status::removeCustomization($HTTP_POST_VARS['items']);
    }
    if (@$HTTP_GET_VARS["cat"] == "edit") {
        $details = Status::getCustomizationDetails($HTTP_GET_VARS["id"]);
        $tpl->assign(array("info" => $details, 'project_id' => $details['psd_prj_id'], 'status_list' => Status::getAssocStatusList($details['psd_prj_id'], TRUE)));
    }
    $display_customer_fields = false;
예제 #12
0
// @(#) $Id: s.notification.php 1.10 03/08/20 17:49:55-00:00 jpradomaia $
//
include_once "config.inc.php";
include_once APP_INC_PATH . "class.template.php";
include_once APP_INC_PATH . "class.auth.php";
include_once APP_INC_PATH . "class.project.php";
include_once APP_INC_PATH . "class.notification.php";
include_once APP_INC_PATH . "class.prefs.php";
include_once APP_INC_PATH . "db_access.php";
$tpl = new Template_API();
$tpl->setTemplate("notification.tpl.html");
Auth::checkAuthentication(APP_COOKIE, 'index.php?err=5', true);
$usr_id = Auth::getUserID();
$prj_id = Auth::getCurrentProject();
$issue_id = @$HTTP_POST_VARS["issue_id"] ? $HTTP_POST_VARS["issue_id"] : $HTTP_GET_VARS["iss_id"];
$tpl->assign("issue_id", $issue_id);
// format default actions properly
$default = Notification::getDefaultActions();
$res = array();
foreach ($default as $action) {
    $res[$action] = 1;
}
$tpl->assign("default_actions", $res);
if (@$HTTP_POST_VARS["cat"] == "insert") {
    $res = Notification::subscribeEmail($usr_id, $issue_id, $HTTP_POST_VARS['email'], $HTTP_POST_VARS['actions']);
    $tpl->assign("insert_result", $res);
} elseif (@$HTTP_GET_VARS["cat"] == "edit") {
    $res = Notification::getDetails($HTTP_GET_VARS["id"]);
    $tpl->assign("info", $res);
} elseif (@$HTTP_POST_VARS["cat"] == "update") {
    $res = Notification::update($HTTP_POST_VARS["id"]);
예제 #13
0
// +----------------------------------------------------------------------+
// | Authors: João Prado Maia <*****@*****.**>                             |
// +----------------------------------------------------------------------+
//
// @(#) $Id: s.time_tracking.php 1.5 03/01/16 01:47:32-00:00 jpm $
//
include_once "../config.inc.php";
include_once APP_INC_PATH . "class.template.php";
include_once APP_INC_PATH . "class.auth.php";
include_once APP_INC_PATH . "class.user.php";
include_once APP_INC_PATH . "class.time_tracking.php";
include_once APP_INC_PATH . "db_access.php";
$tpl = new Template_API();
$tpl->setTemplate("manage/index.tpl.html");
Auth::checkAuthentication(APP_COOKIE);
$tpl->assign("type", "time_tracking");
$role_id = Auth::getCurrentRole();
if ($role_id == User::getRoleID('administrator') || $role_id == User::getRoleID('manager')) {
    if ($role_id == User::getRoleID('administrator')) {
        $tpl->assign("show_setup_links", true);
    }
    if (@$HTTP_POST_VARS["cat"] == "new") {
        $tpl->assign("result", Time_Tracking::insert());
    } elseif (@$HTTP_POST_VARS["cat"] == "update") {
        $tpl->assign("result", Time_Tracking::update());
    } elseif (@$HTTP_POST_VARS["cat"] == "delete") {
        Time_Tracking::remove();
    }
    if (@$HTTP_GET_VARS["cat"] == "edit") {
        $tpl->assign("info", Time_Tracking::getDetails($HTTP_GET_VARS["id"]));
    }
예제 #14
0
// | This program is distributed in the hope that it will be useful,      |
// | but WITHOUT ANY WARRANTY; without even the implied warranty of       |
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the        |
// | GNU General Public License for more details.                         |
// |                                                                      |
// | You should have received a copy of the GNU General Public License    |
// | along with this program; if not, write to:                           |
// |                                                                      |
// | Free Software Foundation, Inc.                                       |
// | 59 Temple Place - Suite 330                                          |
// | Boston, MA 02111-1307, USA.                                          |
// +----------------------------------------------------------------------+
// | Authors: João Prado Maia <*****@*****.**>                             |
// +----------------------------------------------------------------------+
//
// @(#) $Id: s.spell_check.php 1.1 03/09/19 23:18:59-00:00 jpradomaia $
//
include_once "config.inc.php";
include_once APP_INC_PATH . "class.template.php";
include_once APP_INC_PATH . "class.misc.php";
include_once APP_INC_PATH . "db_access.php";
$tpl = new Template_API();
$tpl->setTemplate("spell_check.tpl.html");
Auth::checkAuthentication(APP_COOKIE);
if (!empty($HTTP_GET_VARS['form_name'])) {
    // show temporary form
    $tpl->assign("show_temp_form", "yes");
} else {
    $tpl->assign("spell_check", Misc::checkSpelling($HTTP_POST_VARS['textarea']));
}
$tpl->displayTemplate();
예제 #15
0
// |                                                                      |
// | You should have received a copy of the GNU General Public License    |
// | along with this program; if not, write to:                           |
// |                                                                      |
// | Free Software Foundation, Inc.                                       |
// | 59 Temple Place - Suite 330                                          |
// | Boston, MA 02111-1307, USA.                                          |
// +----------------------------------------------------------------------+
// | Authors: João Prado Maia <*****@*****.**>                             |
// +----------------------------------------------------------------------+
//
// @(#) $Id: s.news.php 1.1 04/01/13 20:02:51-00:00 jpradomaia $
//
include_once "config.inc.php";
include_once APP_INC_PATH . "class.template.php";
include_once APP_INC_PATH . "class.auth.php";
include_once APP_INC_PATH . "class.news.php";
include_once APP_INC_PATH . "class.date.php";
include_once APP_INC_PATH . "db_access.php";
$tpl = new Template_API();
$tpl->setTemplate('news.tpl.html');
Auth::checkAuthentication(APP_COOKIE, 'index.php?err=5', true);
$prj_id = Auth::getCurrentProject();
if (!empty($HTTP_GET_VARS["id"])) {
    $t = News::getDetails($HTTP_GET_VARS['id']);
    $t['nws_created_date'] = Date_API::getFormattedDate($t["nws_created_date"]);
    $tpl->assign("news", array($t));
} else {
    $tpl->assign("news", News::getListByProject($prj_id, TRUE));
}
$tpl->displayTemplate();
예제 #16
0
function getWeeklyReport($p)
{
    $email = XML_RPC_decode($p->getParam(0));
    $password = XML_RPC_decode($p->getParam(1));
    $auth = authenticate($email, $password);
    if (is_object($auth)) {
        return $auth;
    }
    $week = abs(XML_RPC_decode($p->getParam(2)));
    $start = XML_RPC_decode($p->getParam(3));
    $end = XML_RPC_decode($p->getParam(4));
    // we have to set a project so the template class works, even though the weekly report doesn't actually need it
    $projects = Project::getAssocList(Auth::getUserID());
    createFakeCookie($email, current(array_keys($projects)));
    // figure out the correct week
    if (empty($start) || empty($end)) {
        $start = date("U") - DAY * (date("w") - 1);
        if ($week > 0) {
            $start = $start - WEEK * $week;
        }
        $end = date("Y-m-d", $start + DAY * 6);
        $start = date("Y-m-d", $start);
    }
    $tpl = new Template_API();
    $tpl->setTemplate("reports/weekly_data.tpl.html");
    $tpl->assign("data", Report::getWeeklyReport(User::getUserIDByEmail($email), $start, $end));
    $ret = $tpl->getTemplateContents() . "\n";
    return new XML_RPC_Response(XML_RPC_Encode(base64_encode($ret)));
}
예제 #17
0
// | 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:                           |
// |                                                                      |
// | Free Software Foundation, Inc.                                       |
// | 59 Temple Place - Suite 330                                          |
// | Boston, MA 02111-1307, USA.                                          |
// +----------------------------------------------------------------------+
// | Authors: João Prado Maia <*****@*****.**>                             |
// +----------------------------------------------------------------------+
//
// @(#) $Id: s.removed_emails.php 1.2 03/01/21 04:06:59-00:00 jpm $
//
include_once "config.inc.php";
include_once APP_INC_PATH . "class.template.php";
include_once APP_INC_PATH . "class.auth.php";
include_once APP_INC_PATH . "class.support.php";
include_once APP_INC_PATH . "db_access.php";
$tpl = new Template_API();
$tpl->setTemplate("removed_emails.tpl.html");
Auth::checkAuthentication(APP_COOKIE, NULL, true);
if (@$HTTP_POST_VARS["cat"] == "restore") {
    $res = Support::restoreEmails();
    $tpl->assign("result_msg", $res);
} elseif (@$HTTP_POST_VARS["cat"] == "remove") {
    $res = Support::expungeEmails($HTTP_POST_VARS["item"]);
    $tpl->assign("result_msg", $res);
}
$tpl->assign("list", Support::getRemovedList());
$tpl->displayTemplate();
예제 #18
0
include_once APP_INC_PATH . "db_access.php";
$tpl = new Template_API();
$tpl->setTemplate("reports/weekly.tpl.html");
Auth::checkAuthentication(APP_COOKIE);
if (Auth::getCurrentRole() <= User::getRoleID("Customer")) {
    echo "Invalid role";
    exit;
}
$prj_id = Auth::getCurrentProject();
if (count(@$HTTP_POST_VARS["start"]) > 0 && @$HTTP_POST_VARS["start"]["Year"] != 0 && @$HTTP_POST_VARS["start"]["Month"] != 0 && @$HTTP_POST_VARS["start"]["Day"] != 0) {
    $start_date = join("-", $HTTP_POST_VARS["start"]);
}
if (count(@$HTTP_POST_VARS["end"]) > 0 && @$HTTP_POST_VARS["end"]["Year"] != 0 && @$HTTP_POST_VARS["end"]["Month"] != 0 && @$HTTP_POST_VARS["end"]["Day"] != 0) {
    $end_date = join("-", $HTTP_POST_VARS["end"]);
}
$tpl->assign(array("weeks" => Date_API::getWeekOptions(3, 0), "users" => Project::getUserAssocList($prj_id, 'active', User::getRoleID('Customer')), "start_date" => @$start_date, "end_date" => @$end_date, "report_type" => @$HTTP_POST_VARS["report_type"]));
if (!empty($HTTP_POST_VARS["developer"])) {
    //split date up
    if (@$HTTP_POST_VARS["report_type"] == "weekly") {
        $dates = explode("_", $HTTP_POST_VARS["week"]);
    } else {
        $dates = array($start_date, $end_date);
    }
    // print out emails
    $data = Report::getWeeklyReport($HTTP_POST_VARS["developer"], $dates[0], $dates[1], @$_REQUEST['separate_closed']);
    $tpl->assign("data", $data);
}
if (empty($HTTP_POST_VARS["week"])) {
    $tpl->assign("week", Date_API::getCurrentWeek());
} else {
    $tpl->assign("week", $HTTP_POST_VARS["week"]);
예제 #19
0
include_once APP_INC_PATH . "class.auth.php";
include_once APP_INC_PATH . "class.report.php";
include_once APP_INC_PATH . "class.session.php";
include_once APP_INC_PATH . "db_access.php";
$tpl = new Template_API();
$tpl->setTemplate("reports/workload_date_range.tpl.html");
Auth::checkAuthentication(APP_COOKIE);
if (Auth::getCurrentRole() <= User::getRoleID("Customer")) {
    echo "Invalid role";
    exit;
}
$types = array("individual" => "Individual", "aggregate" => "Aggregate");
if (count(@$_REQUEST["start"]) > 0 && @$_REQUEST["start"]["Year"] != 0 && @$_REQUEST["start"]["Month"] != 0 && @$_REQUEST["start"]["Day"] != 0) {
    $start_date = join("-", $_REQUEST["start"]);
} else {
    // if empty start date, set to be a month ago
    $start_date = date("Y-m-d", time() - MONTH);
}
if (count(@$_REQUEST["end"]) > 0 && @$_REQUEST["end"]["Year"] != 0 && @$_REQUEST["end"]["Month"] != 0 && @$_REQUEST["end"]["Day"] != 0) {
    $end_date = join("-", $_REQUEST["end"]);
} else {
    $end_date = date("Y-m-d");
}
if (!empty($_REQUEST["interval"])) {
    $data = Report::getWorkloadByDateRange($_REQUEST["interval"], $_REQUEST["type"], $start_date, date('Y-m-d', strtotime($end_date) + DAY));
    Session::set("workload_date_range_data", $data);
    $tpl->assign("data", $data);
    //  echo "<pre>";print_r($data);echo "</pre>";
}
$tpl->assign(array("interval" => @$_REQUEST["interval"], "types" => $types, "type" => @$_REQUEST["type"], "start_date" => $start_date, "end_date" => $end_date));
$tpl->displayTemplate();
예제 #20
0
// | Boston, MA 02111-1307, USA.                                          |
// +----------------------------------------------------------------------+
// | Authors: João Prado Maia <*****@*****.**>                             |
// +----------------------------------------------------------------------+
//
// @(#) $Id$
//
include_once "../config.inc.php";
include_once APP_INC_PATH . "db_access.php";
include_once APP_INC_PATH . "class.template.php";
include_once APP_INC_PATH . "class.auth.php";
include_once APP_INC_PATH . "class.user.php";
$tpl = new Template_API();
$tpl->setTemplate("manage/index.tpl.html");
Auth::checkAuthentication(APP_COOKIE);
$tpl->assign("type", "account_managers");
$role_id = Auth::getCurrentRole();
if ($role_id == User::getRoleID('administrator') || $role_id == User::getRoleID('manager')) {
    if ($role_id == User::getRoleID('administrator')) {
        $tpl->assign("show_setup_links", true);
    }
    if (@$HTTP_POST_VARS["cat"] == "new") {
        $tpl->assign("result", Customer::insertAccountManager());
    } elseif (@$HTTP_POST_VARS["cat"] == "update") {
        $tpl->assign("result", Customer::updateAccountManager());
    } elseif (@$HTTP_POST_VARS["cat"] == "delete") {
        Customer::removeAccountManager();
    } elseif (!empty($HTTP_GET_VARS['prj_id'])) {
        $tpl->assign("info", array('cam_prj_id' => $HTTP_GET_VARS['prj_id']));
        $tpl->assign('customers', Customer::getAssocList($HTTP_GET_VARS['prj_id']));
    }
예제 #21
0
// +----------------------------------------------------------------------+
//
// @(#) $Id: s.projects.php 1.9 03/08/12 20:02:58-00:00 jpm $
//
include_once "../config.inc.php";
include_once APP_INC_PATH . "class.template.php";
include_once APP_INC_PATH . "class.auth.php";
include_once APP_INC_PATH . "class.project.php";
include_once APP_INC_PATH . "class.user.php";
include_once APP_INC_PATH . "class.status.php";
include_once APP_INC_PATH . "class.workflow.php";
include_once APP_INC_PATH . "db_access.php";
$tpl = new Template_API();
$tpl->setTemplate("manage/index.tpl.html");
Auth::checkAuthentication(APP_COOKIE);
$tpl->assign("type", "projects");
$role_id = Auth::getCurrentRole();
if ($role_id == User::getRoleID('administrator') || $role_id == User::getRoleID('manager')) {
    if ($role_id == User::getRoleID('administrator')) {
        $tpl->assign("show_setup_links", true);
    }
    if (@$HTTP_POST_VARS["cat"] == "new") {
        $tpl->assign("result", Project::insert());
    } elseif (@$HTTP_POST_VARS["cat"] == "update") {
        $tpl->assign("result", Project::update());
    } elseif (@$HTTP_POST_VARS["cat"] == "delete") {
        Project::remove();
    }
    $tpl->assign("active_projects", Project::getAssocList(Auth::getUserID(), true));
    if (@$HTTP_GET_VARS["cat"] == "edit") {
        $tpl->assign("info", Project::getDetails($HTTP_GET_VARS["id"]));
예제 #22
0
// | Authors: João Prado Maia <*****@*****.**>                             |
// +----------------------------------------------------------------------+
//
// @(#) $Id$
//
include_once "../config.inc.php";
include_once APP_INC_PATH . "db_access.php";
include_once APP_INC_PATH . "class.template.php";
include_once APP_INC_PATH . "class.auth.php";
include_once APP_INC_PATH . "class.project.php";
include_once APP_INC_PATH . "class.faq.php";
include_once APP_INC_PATH . "class.customer.php";
$tpl = new Template_API();
$tpl->setTemplate("manage/index.tpl.html");
Auth::checkAuthentication(APP_COOKIE);
$tpl->assign("type", "faq");
$role_id = Auth::getCurrentRole();
if ($role_id == User::getRoleID('administrator') || $role_id == User::getRoleID('manager')) {
    if ($role_id == User::getRoleID('administrator')) {
        $tpl->assign("show_setup_links", true);
    }
    if (@$HTTP_POST_VARS["cat"] == "new") {
        $tpl->assign("result", FAQ::insert());
    } elseif (@$HTTP_POST_VARS["cat"] == "update") {
        $tpl->assign("result", FAQ::update());
    } elseif (@$HTTP_POST_VARS["cat"] == "delete") {
        FAQ::remove();
    } elseif (!empty($HTTP_GET_VARS['prj_id'])) {
        $tpl->assign("info", array('faq_prj_id' => $HTTP_GET_VARS['prj_id']));
        $backend_uses_support_levels = Customer::doesBackendUseSupportLevels($HTTP_GET_VARS['prj_id']);
        $tpl->assign("backend_uses_support_levels", $backend_uses_support_levels);
예제 #23
0
//
include_once "../config.inc.php";
include_once APP_INC_PATH . "class.template.php";
include_once APP_INC_PATH . "class.auth.php";
include_once APP_INC_PATH . "class.user.php";
include_once APP_INC_PATH . "class.email_account.php";
include_once APP_INC_PATH . "class.category.php";
include_once APP_INC_PATH . "class.priority.php";
include_once APP_INC_PATH . "class.misc.php";
include_once APP_INC_PATH . "class.project.php";
include_once APP_INC_PATH . "class.setup.php";
include_once APP_INC_PATH . "db_access.php";
$tpl = new Template_API();
$tpl->setTemplate("manage/index.tpl.html");
Auth::checkAuthentication(APP_COOKIE);
$tpl->assign("type", "issue_auto_creation");
@($ema_id = $HTTP_POST_VARS["ema_id"] ? $HTTP_POST_VARS["ema_id"] : $HTTP_GET_VARS["ema_id"]);
$role_id = Auth::getCurrentRole();
if ($role_id == User::getRoleID('administrator') || $role_id == User::getRoleID('manager')) {
    if ($role_id == User::getRoleID('administrator')) {
        $tpl->assign("show_setup_links", true);
    }
    $prj_id = Email_Account::getProjectID($ema_id);
    if (@$HTTP_POST_VARS["cat"] == "update") {
        @Email_Account::updateIssueAutoCreation($ema_id, $HTTP_POST_VARS['issue_auto_creation'], $HTTP_POST_VARS['options']);
    }
    // load the form fields
    $tpl->assign("info", Email_Account::getDetails($ema_id));
    $tpl->assign("cats", Category::getAssocList($prj_id));
    $tpl->assign("priorities", Priority::getList($prj_id));
    $tpl->assign("users", Project::getUserAssocList($prj_id, 'active'));
예제 #24
0
// | Authors: Bryan Alsdorf <*****@*****.**>                             |
// +----------------------------------------------------------------------+
//
// @(#) $Id$
//
include_once "../config.inc.php";
include_once APP_INC_PATH . "db_access.php";
include_once APP_INC_PATH . "class.template.php";
include_once APP_INC_PATH . "class.auth.php";
include_once APP_INC_PATH . "class.user.php";
include_once APP_INC_PATH . "class.project.php";
include_once APP_INC_PATH . "db_access.php";
$tpl = new Template_API();
$tpl->setTemplate("manage/index.tpl.html");
Auth::checkAuthentication(APP_COOKIE);
$tpl->assign("type", "customer_notes");
$role_id = Auth::getCurrentRole();
if ($role_id == User::getRoleID('administrator') || $role_id == User::getRoleID('manager')) {
    if ($role_id == User::getRoleID('administrator')) {
        $tpl->assign("show_setup_links", true);
    }
    if (@$HTTP_POST_VARS["cat"] == "new") {
        $tpl->assign("result", Customer::insertNote($HTTP_POST_VARS["project"], $HTTP_POST_VARS["customer"], $HTTP_POST_VARS["note"]));
    } else {
        if (@$HTTP_POST_VARS["cat"] == "update") {
            $tpl->assign("result", Customer::updateNote($HTTP_POST_VARS["id"], $HTTP_POST_VARS["project"], $HTTP_POST_VARS["customer"], $HTTP_POST_VARS["note"]));
        } elseif (@$HTTP_POST_VARS["cat"] == "delete") {
            $tpl->assign("result", Customer::removeNotes($HTTP_POST_VARS['items']));
        } elseif (!empty($HTTP_GET_VARS['prj_id'])) {
            $tpl->assign("info", array('cno_prj_id' => $HTTP_GET_VARS['prj_id']));
            $tpl->assign('customers', Customer::getAssocList($HTTP_GET_VARS['prj_id']));
예제 #25
0
// +----------------------------------------------------------------------+
//
// @(#) $Id: s.reminder_conditions.php 1.2 04/01/19 15:15:25-00:00 jpradomaia $
//
include_once "../config.inc.php";
include_once APP_INC_PATH . "db_access.php";
include_once APP_INC_PATH . "class.template.php";
include_once APP_INC_PATH . "class.auth.php";
include_once APP_INC_PATH . "class.user.php";
include_once APP_INC_PATH . "class.status.php";
include_once APP_INC_PATH . "class.reminder.php";
include_once APP_INC_PATH . "class.reminder_action.php";
$tpl = new Template_API();
$tpl->setTemplate("manage/index.tpl.html");
Auth::checkAuthentication(APP_COOKIE);
$tpl->assign("type", "reminder_conditions");
$rem_id = @$HTTP_POST_VARS['rem_id'] ? $HTTP_POST_VARS['rem_id'] : $HTTP_GET_VARS['rem_id'];
$rma_id = @$HTTP_POST_VARS['rma_id'] ? $HTTP_POST_VARS['rma_id'] : $HTTP_GET_VARS['rma_id'];
$role_id = Auth::getCurrentRole();
if ($role_id == User::getRoleID('administrator') || $role_id == User::getRoleID('manager')) {
    if ($role_id == User::getRoleID('administrator')) {
        $tpl->assign("show_setup_links", true);
    }
    if (@$HTTP_POST_VARS["cat"] == "new") {
        $tpl->assign("result", Reminder_Condition::insert());
    } elseif (@$HTTP_POST_VARS["cat"] == "update") {
        $tpl->assign("result", Reminder_Condition::update());
    } elseif (@$HTTP_POST_VARS["cat"] == "delete") {
        Reminder_Condition::remove();
    }
    if (@$HTTP_GET_VARS["cat"] == "edit") {
예제 #26
0
// @(#) $Id: s.anonymous.php 1.4 03/03/01 23:27:37-00:00 jpm $
//
include_once "../config.inc.php";
include_once APP_INC_PATH . "class.template.php";
include_once APP_INC_PATH . "class.auth.php";
include_once APP_INC_PATH . "class.user.php";
include_once APP_INC_PATH . "class.category.php";
include_once APP_INC_PATH . "class.priority.php";
include_once APP_INC_PATH . "class.misc.php";
include_once APP_INC_PATH . "class.project.php";
include_once APP_INC_PATH . "class.setup.php";
include_once APP_INC_PATH . "db_access.php";
$tpl = new Template_API();
$tpl->setTemplate("manage/index.tpl.html");
Auth::checkAuthentication(APP_COOKIE);
$tpl->assign("type", "anonymous");
@($prj_id = $HTTP_POST_VARS["prj_id"] ? $HTTP_POST_VARS["prj_id"] : $HTTP_GET_VARS["prj_id"]);
$role_id = Auth::getCurrentRole();
if ($role_id == User::getRoleID('administrator') || $role_id == User::getRoleID('manager')) {
    if ($role_id == User::getRoleID('administrator')) {
        $tpl->assign("show_setup_links", true);
    }
    if (@$HTTP_POST_VARS["cat"] == "update") {
        $tpl->assign("result", Project::updateAnonymousPost($prj_id));
    }
    // load the form fields
    $tpl->assign("project", Project::getDetails($prj_id));
    $tpl->assign("cats", Category::getAssocList($prj_id));
    $tpl->assign("priorities", Priority::getList($prj_id));
    $tpl->assign("users", Project::getUserAssocList($prj_id, 'active'));
    $tpl->assign("options", Project::getAnonymousPostOptions($prj_id));
예제 #27
0
// | 59 Temple Place - Suite 330                                          |
// | Boston, MA 02111-1307, USA.                                          |
// +----------------------------------------------------------------------+
// | Authors: João Prado Maia <*****@*****.**>                             |
// +----------------------------------------------------------------------+
//
// @(#) $Id: s.searchbar.php 1.3 03/09/26 02:06:54-00:00 jpradomaia $
//
include_once "config.inc.php";
include_once APP_INC_PATH . "db_access.php";
include_once APP_INC_PATH . "class.template.php";
include_once APP_INC_PATH . "class.auth.php";
include_once APP_INC_PATH . "class.category.php";
include_once APP_INC_PATH . "class.priority.php";
include_once APP_INC_PATH . "class.misc.php";
include_once APP_INC_PATH . "class.release.php";
include_once APP_INC_PATH . "class.project.php";
include_once APP_INC_PATH . "class.filter.php";
include_once APP_INC_PATH . "class.status.php";
$tpl = new Template_API();
$tpl->setTemplate("searchbar.tpl.html");
Auth::checkAuthentication(APP_COOKIE);
$prj_id = Auth::getCurrentProject();
$tpl->assign("priorities", Priority::getList($prj_id));
$tpl->assign("status", Status::getAssocStatusList($prj_id));
$tpl->assign("users", Project::getUserAssocList($prj_id));
$tpl->assign("categories", Category::getAssocList($prj_id));
$tpl->assign("custom", Filter::getListing($prj_id));
$options = Issue::saveSearchParams();
$tpl->assign("options", $options);
$tpl->displayTemplate();
예제 #28
0
// | 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:                           |
// |                                                                      |
// | Free Software Foundation, Inc.                                       |
// | 59 Temple Place - Suite 330                                          |
// | Boston, MA 02111-1307, USA.                                          |
// +----------------------------------------------------------------------+
// | Authors: João Prado Maia <*****@*****.**>                             |
// +----------------------------------------------------------------------+
//
// @(#) $Id$
//
include_once "config.inc.php";
include_once APP_INC_PATH . "class.template.php";
include_once APP_INC_PATH . "class.auth.php";
include_once APP_INC_PATH . "class.user.php";
include_once APP_INC_PATH . "db_access.php";
$tpl = new Template_API();
$tpl->setTemplate("clock_status.tpl.html");
Auth::checkAuthentication(APP_COOKIE, 'index.php?err=5', true);
$usr_id = Auth::getUserID();
if (User::isClockedIn($usr_id)) {
    $tpl->assign('result', User::ClockOut($usr_id));
} else {
    $tpl->assign('result', User::ClockIn($usr_id));
}
$tpl->displayTemplate();
예제 #29
0
// @(#) $Id$
//
include_once "config.inc.php";
include_once APP_INC_PATH . "class.template.php";
include_once APP_INC_PATH . "class.auth.php";
include_once APP_INC_PATH . "class.user.php";
include_once APP_INC_PATH . "class.note.php";
include_once APP_INC_PATH . "db_access.php";
$tpl = new Template_API();
$tpl->setTemplate("post_note.tpl.html");
Auth::checkAuthentication(APP_COOKIE, 'index.php?err=5', true);
$prj_id = Auth::getCurrentProject();
$usr_id = Auth::getUserID();
@($issue_id = $HTTP_GET_VARS["issue_id"] ? $HTTP_GET_VARS["issue_id"] : $HTTP_POST_VARS["issue_id"]);
$details = Issue::getDetails($issue_id);
$tpl->assign("issue_id", $issue_id);
$tpl->assign("issue", $details);
if (!Issue::canAccess($issue_id, $usr_id)) {
    $tpl->setTemplate("permission_denied.tpl.html");
    $tpl->displayTemplate();
    exit;
}
if (@$HTTP_POST_VARS["cat"] == "post_note") {
    // change status
    if (!@empty($HTTP_POST_VARS['new_status'])) {
        $res = Issue::setStatus($issue_id, $HTTP_POST_VARS['new_status']);
        if ($res != -1) {
            $new_status = Status::getStatusTitle($HTTP_POST_VARS['new_status']);
            History::add($issue_id, $usr_id, History::getTypeID('status_changed'), "Status changed to '{$new_status}' by " . User::getFullName($usr_id));
        }
    }
예제 #30
0
$tpl->setTemplate("reports/stalled_issues.tpl.html");
Auth::checkAuthentication(APP_COOKIE);
if (Auth::getCurrentRole() <= User::getRoleID("Customer")) {
    echo "Invalid role";
    exit;
}
$prj_id = Auth::getCurrentProject();
if (count(@$_REQUEST['before']) < 1) {
    $before = date("Y-m-d", time() - MONTH);
} else {
    $before = join('-', $_REQUEST['before']);
}
if (count(@$_REQUEST['after']) < 1) {
    $after = date("Y-m-d", time() - YEAR);
} else {
    $after = join('-', $_REQUEST['after']);
}
if (empty($_REQUEST['sort_order'])) {
    $_REQUEST['sort_order'] = 'ASC';
}
$data = Report::getStalledIssuesByUser($prj_id, @$_REQUEST['developers'], @$_REQUEST['status'], $before, $after, $_REQUEST['sort_order']);
$groups = Group::getAssocList($prj_id);
$assign_options = array();
if (count($groups) > 0 && Auth::getCurrentRole() > User::getRoleID("Customer")) {
    foreach ($groups as $grp_id => $grp_name) {
        $assign_options["grp:{$grp_id}"] = "Group: " . $grp_name;
    }
}
$assign_options += Project::getUserAssocList($prj_id, 'active', User::getRoleID('Standard User'));
$tpl->assign(array("users" => $assign_options, "before_date" => $before, "after_date" => $after, "data" => $data, "developers" => @$_REQUEST['developers'], "status_list" => Status::getAssocStatusList($prj_id), "status" => @$_REQUEST['status'], "sort_order" => $_REQUEST['sort_order']));
$tpl->displayTemplate();