// | Free Software Foundation, Inc. | // | 59 Temple Place - Suite 330 | // | Boston, MA 02111-1307, USA. | // +----------------------------------------------------------------------+ // | 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(); }
// | 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 . "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
// +----------------------------------------------------------------------+ // | 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);
// +----------------------------------------------------------------------+ // // @(#) $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.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));
// | 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.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);
// | Free Software Foundation, Inc. | // | 59 Temple Place - Suite 330 | // | Boston, MA 02111-1307, USA. | // +----------------------------------------------------------------------+ // | Authors: Bryan Alsdorf <*****@*****.**> | // +----------------------------------------------------------------------+ // // @(#) $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.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"]);
// | Boston, MA 02111-1307, USA. | // +----------------------------------------------------------------------+ // | Authors: João Prado Maia <*****@*****.**> | // +----------------------------------------------------------------------+ // // @(#) $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(); }
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))); }
// | Free Software Foundation, Inc. | // | 59 Temple Place - Suite 330 | // | Boston, MA 02111-1307, USA. | // +----------------------------------------------------------------------+ // | Authors: Bryan Alsdorf <*****@*****.**> | // +----------------------------------------------------------------------+ // // @(#) $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.report.php"; include_once APP_INC_PATH . "class.date.php"; 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"])) {
// | 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 . "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.faq.php"; include_once APP_INC_PATH . "class.customer.php"; $tpl = new Template_API(); $tpl->setTemplate("faq.tpl.html"); Auth::checkAuthentication(APP_COOKIE, 'index.php?err=5', true); $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;
// | | // | 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();
// | 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 . "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"]);
// | 59 Temple Place - Suite 330 | // | Boston, MA 02111-1307, USA. | // +----------------------------------------------------------------------+ // | 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"];
// | 59 Temple Place - Suite 330 | // | Boston, MA 02111-1307, USA. | // +----------------------------------------------------------------------+ // | Authors: João Prado Maia <*****@*****.**> | // +----------------------------------------------------------------------+ // // @(#) $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']);
// | 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();
// | | // | Free Software Foundation, Inc. | // | 59 Temple Place - Suite 330 | // | Boston, MA 02111-1307, USA. | // +----------------------------------------------------------------------+ // | Authors: João Prado Maia <*****@*****.**> | // +----------------------------------------------------------------------+ // // @(#) $Id: s.reminder_review.php 1.1 04/01/19 15:15:25-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.reminder.php"; include_once APP_INC_PATH . "db_access.php"; $tpl = new Template_API(); $tpl->setTemplate("get_emails.tpl.html"); Auth::checkAuthentication(APP_COOKIE, NULL, true); $tpl->displayTemplate(); flush(); echo "<span class='default'>"; echo "<b>The following is the SQL statement produced by this reminder:</b><br /><br />"; echo nl2br(Reminder::getSQLQuery($HTTP_GET_VARS['rem_id'], $HTTP_GET_VARS['rma_id'])); ?> <br /><br /> <a class="link" href="javascript:window.close();">Close Window</a> </span> </body>
// | (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();
// | | // | 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 . "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'])) {
// | | // | Free Software Foundation, Inc. | // | 59 Temple Place - Suite 330 | // | Boston, MA 02111-1307, USA. | // +----------------------------------------------------------------------+ // | 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);
// | 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 . "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'])) {
// | 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.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(); }
// | 59 Temple Place - Suite 330 | // | Boston, MA 02111-1307, USA. | // +----------------------------------------------------------------------+ // | 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']));
// | 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.index.php 1.1 03/09/16 23:01:42-00:00 jpradomaia $ // include_once "../config.inc.php"; include_once APP_INC_PATH . "class.template.php"; include_once APP_INC_PATH . "db_access.php"; Auth::checkAuthentication(APP_COOKIE); if (Auth::getCurrentRole() <= User::getRoleID("Customer")) { Auth::redirect("../main.php"); } $tpl = new Template_API(); $tpl->setTemplate("reports/index.tpl.html"); $tpl->displayTemplate();
// | Authors: João Prado Maia <*****@*****.**> | // +----------------------------------------------------------------------+ // // @(#) $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));
// | Boston, MA 02111-1307, USA. | // +----------------------------------------------------------------------+ // | Authors: João Prado Maia <*****@*****.**> | // +----------------------------------------------------------------------+ // // @(#) $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") {
// | 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();
// | 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();
// | | // | 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();
// | 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 . "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
// | 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();