/** * Method used to send an alert to a set of email addresses when * a reminder action was triggered, but no action was really * taken because no recipients could be found. * * @access private * @param integer $issue_id The issue ID * @param string $type Which reminder are we trying to send, email or sms * @param array $reminder The reminder details * @param array $action The action details * @return void */ function _recordNoRecipientError($issue_id, $type, $reminder, $action) { $to = Reminder::_getReminderAlertAddresses(); if (count($to) > 0) { $tpl = new Template_API(); $tpl->setTemplate('reminders/alert_no_recipients.tpl.text'); $tpl->bulkAssign(array("type" => $type, "data" => $data, "reminder" => $reminder, "action" => $action, "conditions" => $conditions, "has_customer_integration" => Customer::hasCustomerIntegration(Issue::getProjectID($issue_id)))); $text_message = $tpl->getTemplateContents(); foreach ($to as $address) { // send email (use PEAR's classes) $mail = new Mail_API(); $mail->setTextBody($text_message); $setup = $mail->getSMTPSettings(); $mail->send($setup["from"], $address, "[#{$issue_id}] Reminder Not Triggered: " . $action['rma_title'], 0, $issue_id); } } }
// | 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 $available_ordered = array();
// +----------------------------------------------------------------------+ // | 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);
// | 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"]); } else {
// | 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();
// | 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();
// | 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();
include_once APP_INC_PATH . "class.time_tracking.php"; include_once APP_INC_PATH . "class.issue.php"; include_once APP_INC_PATH . "class.impact_analysis.php"; include_once APP_INC_PATH . "class.filter.php"; include_once APP_INC_PATH . "class.support.php"; include_once APP_INC_PATH . "class.attachment.php"; include_once APP_INC_PATH . "class.scm.php"; include_once APP_INC_PATH . "class.notification.php"; include_once APP_INC_PATH . "class.phone_support.php"; include_once APP_INC_PATH . "class.status.php"; include_once APP_INC_PATH . "class.history.php"; include_once APP_INC_PATH . "class.user.php"; include_once APP_INC_PATH . "class.authorized_replier.php"; include_once APP_INC_PATH . "db_access.php"; $tpl = new Template_API(); $tpl->setTemplate("popup.tpl.html"); Auth::checkAuthentication(APP_COOKIE, 'index.php?err=5', true); $usr_id = Auth::getUserID(); $prj_id = Auth::getCurrentProject(); if (@$HTTP_GET_VARS["cat"] == "delete_note") { $res = Note::remove($HTTP_GET_VARS["id"]); $tpl->assign("note_delete_result", $res); } elseif (@$HTTP_GET_VARS["cat"] == "delete_time") { $res = Time_Tracking::removeEntry($HTTP_GET_VARS["id"], $usr_id); $tpl->assign("time_delete_result", $res); } elseif (@$HTTP_POST_VARS["cat"] == "bulk_update") { $res = Issue::bulkUpdate(); $tpl->assign("bulk_update_result", $res); } elseif (@$HTTP_POST_VARS["cat"] == "set_initial_impact") { $res = Issue::setImpactAnalysis($HTTP_POST_VARS["issue_id"]); $tpl->assign("set_initial_impact_result", $res);
// | Free Software Foundation, Inc. | // | 59 Temple Place - Suite 330 | // | Boston, MA 02111-1307, USA. | // +----------------------------------------------------------------------+ // | Authors: João Prado Maia <*****@*****.**> | // +----------------------------------------------------------------------+ // // @(#) $Id: s.confirm.php 1.3 03/12/04 17:58:15-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.auth.php"; include_once APP_INC_PATH . "db_access.php"; $tpl = new Template_API(); $tpl->setTemplate("confirm.tpl.html"); if (@$HTTP_GET_VARS['cat'] == 'newuser') { $res = @User::checkHash($HTTP_GET_VARS["email"], $HTTP_GET_VARS["hash"]); if ($res == 1) { User::confirmVisitorAccount($HTTP_GET_VARS["email"]); // redirect user to login form with pretty message Auth::redirect('index.php?err=8&email=' . $HTTP_GET_VARS["email"]); exit; } $tpl->assign("confirm_result", $res); } elseif (@$HTTP_GET_VARS['cat'] == 'password') { $res = @User::checkHash($HTTP_GET_VARS["email"], $HTTP_GET_VARS["hash"]); if ($res == 1) { User::confirmNewPassword($HTTP_GET_VARS["email"]); $tpl->assign("email", $HTTP_GET_VARS["email"]); }
// | | // | 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.requirement.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.impact_analysis.php"; include_once APP_INC_PATH . "db_access.php"; $tpl = new Template_API(); $tpl->setTemplate("requirement.tpl.html"); Auth::checkAuthentication(APP_COOKIE, 'index.php?err=5', true); if (@$HTTP_POST_VARS["cat"] == "set_analysis") { $res = Impact_Analysis::update($HTTP_POST_VARS["isr_id"]); $tpl->assign("set_analysis_result", $res); } $tpl->displayTemplate();
// @(#) $Id: s.adv_search.php 1.10 03/10/27 18:47:52-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"; include_once APP_INC_PATH . "class.user.php"; $tpl = new Template_API(); $tpl->setTemplate("adv_search.tpl.html"); Auth::checkAuthentication(APP_COOKIE); // customers should not be able to see this page $role_id = Auth::getCurrentRole(); if ($role_id < User::getRoleID('Standard User')) { Auth::redirect(APP_RELATIVE_URL . "list.php"); } $prj_id = Auth::getCurrentProject(); // generate options for assign list. If there are groups and user is above a customer, include groups $groups = Group::getAssocList($prj_id); $users = Project::getUserAssocList($prj_id, 'active', User::getRoleID('Customer')); $assign_options = array("" => "Any", "-1" => "un-assigned", "-2" => "myself and un-assigned"); if (User::getGroupID(Auth::getUserID()) != '') { $assign_options['-3'] = 'myself and my group'; $assign_options['-4'] = 'myself, un-assigned and my group'; }
// | 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.project.php"; include_once APP_INC_PATH . "class.authorized_replier.php"; include_once APP_INC_PATH . "class.prefs.php"; include_once APP_INC_PATH . "db_access.php"; $tpl = new Template_API(); $tpl->setTemplate("authorized_replier.tpl.html"); Auth::checkAuthentication(APP_COOKIE, 'index.php?err=5', true); $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); if (@$HTTP_POST_VARS["cat"] == "insert") { $res = Authorized_Replier::manualInsert($issue_id, $HTTP_POST_VARS['email']); $tpl->assign("insert_result", $res); } elseif (@$HTTP_POST_VARS["cat"] == "delete") { $res = Authorized_Replier::removeRepliers($HTTP_POST_VARS["items"]); $tpl->assign("delete_result", $res); } list(, $repliers) = Authorized_Replier::getAuthorizedRepliers($issue_id); $tpl->assign("list", $repliers); $t = Project::getAddressBook($prj_id, $issue_id); $tpl->assign("assoc_users", $t);
// | | // | 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.issue.php 1.1 03/08/12 20:04:44-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.report.php"; include_once APP_INC_PATH . "db_access.php"; $tpl = new Template_API(); $tpl->setTemplate("reports/issue_user.tpl.html"); Auth::checkAuthentication(APP_COOKIE); if (Auth::getCurrentRole() <= User::getRoleID("Customer")) { echo "Invalid role"; exit; } $prj_id = Auth::getCurrentProject(); if ($HTTP_GET_VARS['cat'] == 'user') { $res = Report::getIssuesByUser($prj_id); $tpl->assign("users", $res); } $tpl->displayTemplate();
// | along with this program; if not, write to: | // | | // | Free Software Foundation, Inc. | // | 59 Temple Place - Suite 330 | // | Boston, MA 02111-1307, USA. | // +----------------------------------------------------------------------+ // | Authors: Bryan Alsdorf <*****@*****.**> | // +----------------------------------------------------------------------+ // // This report shows a list of activity performed in recent history. 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("reports/recent_activity.tpl.html"); Auth::checkAuthentication(APP_COOKIE); if (Auth::getCurrentRole() <= User::getRoleID("Customer")) { echo "Invalid role"; exit; } $units = array("hour" => "Hours", "day" => "Days"); $type_list = array("phone" => "Phone Calls", "note" => "Notes", "email" => "Email", "draft" => "Drafts", "time" => "Time Tracking", "reminder" => "Reminders"); if (empty($_REQUEST['activity_types'])) { $_REQUEST['activity_types'] = array_keys($type_list); } $prj_id = Auth::getCurrentProject(); $usr_id = Auth::getUserID(); $tpl->assign(array("units" => $units, "users" => Project::getUserAssocList($prj_id, 'active', User::getRoleID('Customer')), "type_list" => $type_list, "activity_types" => $_REQUEST['activity_types'])); if (!empty($_REQUEST['unit']) && !empty($_REQUEST['amount']) || @count($_REQUEST['start']) == 3) { if (count(@$_REQUEST["start"]) > 0 && @$_REQUEST["start"]["Year"] != 0 && @$_REQUEST["start"]["Month"] != 0 && @$_REQUEST["start"]["Day"] != 0) {
// | 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"])) { //split date up
// | 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.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/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']);
// | 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> </html>
// | 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();
// | | // | 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();
// | 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();
// | (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();
// | 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']); $tpl->assign("insert_result", $res);
// | 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.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; } else {
// +----------------------------------------------------------------------+ // | 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); } else {
// | | // | 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: 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();
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))); }
// | 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 if (!@empty($HTTP_POST_VARS['new_status'])) {
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.time_tracking.php"; include_once APP_INC_PATH . "class.note.php"; include_once APP_INC_PATH . "class.impact_analysis.php"; include_once APP_INC_PATH . "class.support.php"; include_once APP_INC_PATH . "class.notification.php"; include_once APP_INC_PATH . "class.attachment.php"; include_once APP_INC_PATH . "class.custom_field.php"; include_once APP_INC_PATH . "class.phone_support.php"; include_once APP_INC_PATH . "class.scm.php"; include_once APP_INC_PATH . "class.draft.php"; include_once APP_INC_PATH . "db_access.php"; $tpl = new Template_API(); $tpl->setTemplate("view.tpl.html"); Auth::checkAuthentication(APP_COOKIE); $prj_id = Auth::getCurrentProject(); $usr_id = Auth::getUserID(); $role_id = Auth::getCurrentRole(); $associated_projects = @array_keys(Project::getAssocList($usr_id)); @($issue_id = $HTTP_POST_VARS["issue_id"] ? $HTTP_POST_VARS["issue_id"] : $HTTP_GET_VARS["id"]); $tpl->assign("extra_title", "Issue #{$issue_id} Details"); // check if the requested issue is a part of the 'current' project. If it doesn't // check if issue exists in another project and if it does, switch projects $iss_prj_id = Issue::getProjectID($issue_id); $auto_switched_from = false; if (!empty($iss_prj_id) && $iss_prj_id != $prj_id && in_array($iss_prj_id, $associated_projects)) { $cookie = Auth::getCookieInfo(APP_PROJECT_COOKIE); Auth::setCurrentProject($iss_prj_id, $cookie["remember"], true); $auto_switched_from = $prj_id;