本文整理汇总了PHP中Template_Helper::assign方法的典型用法代码示例。如果您正苦于以下问题:PHP Template_Helper::assign方法的具体用法?PHP Template_Helper::assign怎么用?PHP Template_Helper::assign使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Template_Helper
的用法示例。
在下文中一共展示了Template_Helper::assign方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __invoke
public function __invoke(Template_Helper $tpl)
{
$units = array('hour' => 'Hours', 'day' => 'Days');
$type_list = array('phone' => 'Phone Calls', 'note' => 'Notes', 'email' => 'Email', 'draft' => 'Drafts', 'time' => 'Time Tracking', 'reminder' => 'Reminders');
$tpl->assign(array('units' => $units, 'users' => Project::getUserAssocList($this->prj_id, 'active', User::ROLE_CUSTOMER), 'developer' => $this->usr_id, 'type_list' => $type_list, 'activity_types' => $this->activity_types ?: array_keys($type_list), 'unit' => $this->unit, 'amount' => $this->amount, 'start_date' => $this->start_date, 'end_date' => $this->end_date, 'sort_order' => $this->sort_order));
if (!$this->unit && !$this->amount) {
return;
}
$data = array();
if (in_array('phone', $this->activity_types)) {
$data['phone'] = $this->phoneActivity();
}
if (in_array('note', $this->activity_types)) {
$data['note'] = $this->noteActivity();
}
if (in_array('email', $this->activity_types)) {
$data['email'] = $this->emailActivity();
}
if (in_array('draft', $this->activity_types)) {
$data['draft'] = $this->draftActivity();
}
if (in_array('time', $this->activity_types)) {
$data['time'] = $this->timeActivity();
}
if (!$this->developer && in_array('reminder', $this->activity_types)) {
$data['reminder'] = $this->reminderActivity();
}
$tpl->assign(array('data' => $data, 'developer' => $this->developer));
}
示例2: rssError
function rssError($msg)
{
$tpl = new Template_Helper();
$tpl->setTemplate('rss_error.tpl.xml');
header('Content-Type: text/xml; charset=' . APP_CHARSET);
$tpl->assign(array('error' => $msg));
$tpl->displayTemplate();
}
示例3: dirname
// | Copyright (c) 2008 - 2010 Sun Microsystem Inc. |
// | Copyright (c) 2011 - 2013 Eventum Team. |
// | |
// | 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. |
// | 51 Franklin Street, Suite 330 |
// | Boston, MA 02110-1301, USA. |
// +----------------------------------------------------------------------+
// | Authors: João Prado Maia <jpm@mysql.com> |
// +----------------------------------------------------------------------+
require_once dirname(__FILE__) . '/../init.php';
$tpl = new Template_Helper();
$tpl->setTemplate('requirement.tpl.html');
Auth::checkAuthentication(APP_COOKIE, 'index.php?err=5', true);
if (@$_POST['cat'] == 'set_analysis') {
$res = Impact_Analysis::update($_POST['isr_id']);
$tpl->assign('set_analysis_result', $res);
}
$tpl->displayTemplate();
示例4: dirname
// | Free Software Foundation, Inc. |
// | 51 Franklin Street, Suite 330 |
// | Boston, MA 02110-1301, USA. |
// +----------------------------------------------------------------------+
// | Authors: João Prado Maia <jpm@mysql.com> |
// +----------------------------------------------------------------------+
require_once dirname(__FILE__) . '/../../init.php';
$tpl = new Template_Helper();
$tpl->setTemplate('manage/statuses.tpl.html');
Auth::checkAuthentication(APP_COOKIE);
$role_id = Auth::getCurrentRole();
if ($role_id < User::getRoleID('manager')) {
Misc::setMessage(ev_gettext('Sorry, you are not allowed to access this page.'), Misc::MSG_ERROR);
$tpl->displayTemplate();
exit;
}
if (@$_POST['cat'] == 'new') {
$res = Status::insert();
Misc::mapMessages($res, array(1 => array(ev_gettext('Thank you, the status was added successfully.'), Misc::MSG_INFO), -1 => array(ev_gettext('An error occurred while trying to add the status.'), Misc::MSG_ERROR), -2 => array(ev_gettext('Please enter the title for this status.'), Misc::MSG_ERROR)));
} elseif (@$_POST['cat'] == 'update') {
$res = Status::update();
Misc::mapMessages($res, array(1 => array(ev_gettext('Thank you, the status was updated successfully.'), Misc::MSG_INFO), -1 => array(ev_gettext('An error occurred while trying to add the status.'), Misc::MSG_ERROR), -2 => array(ev_gettext('Please enter the title for this status.'), Misc::MSG_ERROR)));
} elseif (@$_POST['cat'] == 'delete') {
Status::remove();
}
if (@$_GET['cat'] == 'edit') {
$tpl->assign('info', Status::getDetails($_GET['id']));
}
$tpl->assign('list', Status::getList());
$tpl->assign('project_list', Project::getAll());
$tpl->displayTemplate();
示例5: array
* @copyright (c) Eventum Team
* @license GNU General Public License, version 2 or later (GPL-2+)
*
* For the full copyright and license information,
* please see the COPYING and AUTHORS files
* that were distributed with this source code.
*/
require_once __DIR__ . '/../../init.php';
$tpl = new Template_Helper();
$tpl->setTemplate('manage/anonymous.tpl.html');
Auth::checkAuthentication();
@($prj_id = $_POST['prj_id'] ? $_POST['prj_id'] : $_GET['prj_id']);
$role_id = Auth::getCurrentRole();
if ($role_id < User::ROLE_MANAGER) {
Misc::setMessage(ev_gettext('Sorry, you are not allowed to access this page.'), Misc::MSG_ERROR);
$tpl->displayTemplate();
exit;
}
if (@$_POST['cat'] == 'update') {
$res = Project::updateAnonymousPost($prj_id);
$tpl->assign('result', $res);
Misc::mapMessages($res, array(1 => array(ev_gettext('Thank you, the information was updated successfully.'), Misc::MSG_INFO), -1 => array(ev_gettext('An error occurred while trying to update the information.'), Misc::MSG_ERROR)));
}
// 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));
$tpl->assign('prj_id', $prj_id);
$tpl->displayTemplate();
示例6: array
* For the full copyright and license information,
* please see the COPYING and AUTHORS files
* that were distributed with this source code.
*/
require_once __DIR__ . '/../../init.php';
$tpl = new Template_Helper();
$tpl->setTemplate('manage/severities.tpl.html');
Auth::checkAuthentication();
$role_id = Auth::getCurrentRole();
if ($role_id < User::ROLE_MANAGER) {
Misc::setMessage('Sorry, you are not allowed to access this page.', Misc::MSG_ERROR);
$tpl->displayTemplate();
exit;
}
@($prj_id = $_POST['prj_id'] ? $_POST['prj_id'] : $_GET['prj_id']);
$tpl->assign('project', Project::getDetails($prj_id));
if (@$_POST['cat'] == 'new') {
$res = Severity::insert($prj_id, $_POST['title'], $_POST['description'], $_POST['rank']);
Misc::mapMessages($res, array(1 => array('Thank you, the severity was added successfully.', Misc::MSG_INFO), -1 => array('An error occurred while trying to add the severity.', Misc::MSG_ERROR), -2 => array('Please enter the title for this new severity.', Misc::MSG_ERROR)));
} elseif (@$_POST['cat'] == 'update') {
$res = Severity::update($_POST['id'], $_POST['title'], $_POST['description'], $_POST['rank']);
Misc::mapMessages($res, array(1 => array('Thank you, the severity was added successfully.', Misc::MSG_INFO), -1 => array('An error occurred while trying to add the severity.', Misc::MSG_ERROR), -2 => array('Please enter the title for this new severity.', Misc::MSG_ERROR)));
} elseif (@$_POST['cat'] == 'delete') {
Severity::remove($_POST['items']);
}
if (@$_GET['cat'] == 'edit') {
$tpl->assign('info', Severity::getDetails($_GET['id']));
} elseif (@$_GET['cat'] == 'change_rank') {
Severity::changeRank($prj_id, $_GET['id'], $_GET['rank']);
}
$tpl->assign('list', Severity::getList($prj_id));
示例7: isset
* please see the COPYING and AUTHORS files
* that were distributed with this source code.
*/
require_once __DIR__ . '/../../init.php';
$tpl = new Template_Helper();
$tpl->setTemplate('manage/time_tracking.tpl.html');
Auth::checkAuthentication();
$role_id = Auth::getCurrentRole();
if ($role_id < User::ROLE_MANAGER) {
Misc::setMessage(ev_gettext('Sorry, you are not allowed to access this page.'), Misc::MSG_ERROR);
$tpl->displayTemplate();
exit;
}
$prj_id = isset($_POST['prj_id']) ? (int) $_POST['prj_id'] : (int) $_GET['prj_id'];
$cat = isset($_POST['cat']) ? (string) $_POST['cat'] : null;
$tpl->assign('project', Project::getDetails($prj_id));
if ($cat == 'new') {
$title = $_POST['title'];
$res = Time_Tracking::insertCategory($prj_id, $title);
Misc::mapMessages($res, array(1 => array(ev_gettext('Thank you, the time tracking category was added successfully.'), Misc::MSG_INFO), -1 => array(ev_gettext('An error occurred while trying to add the new time tracking category.'), Misc::MSG_INFO), -2 => array(ev_gettext('Please enter the title for this new time tracking category.'), Misc::MSG_ERROR)));
} elseif ($cat == 'update') {
$title = (string) $_POST['title'];
$prj_id = (int) $_POST['prj_id'];
$id = (int) $_POST['id'];
$res = Time_Tracking::updateCategory($prj_id, $id, $title);
Misc::mapMessages($res, array(1 => array(ev_gettext('Thank you, the time tracking category was updated successfully.'), Misc::MSG_INFO), -1 => array(ev_gettext('An error occurred while trying to update the time tracking category information.'), Misc::MSG_INFO), -2 => array(ev_gettext('Please enter the title for this time tracking category.'), Misc::MSG_ERROR)));
} elseif ($cat == 'delete') {
$items = (array) $_POST['items'];
Time_Tracking::removeCategory($items);
}
if ($cat == 'edit') {
示例8: array
$res = Reminder_Condition::insert();
Misc::mapMessages($res, array(1 => array(ev_gettext('Thank you, the condition was added successfully.'), Misc::MSG_INFO), -1 => array(ev_gettext('An error occurred while trying to add the new condition.'), Misc::MSG_ERROR), -2 => array(ev_gettext('Please enter the title for this new condition.'), Misc::MSG_ERROR)));
} elseif (@$_POST['cat'] == 'update') {
$res = Reminder_Condition::update();
Misc::mapMessages($res, array(1 => array(ev_gettext('Thank you, the condition was updated successfully.'), Misc::MSG_INFO), -1 => array(ev_gettext('An error occurred while trying to update the condition.'), Misc::MSG_ERROR), -2 => array(ev_gettext('Please enter the title for this condition.'), Misc::MSG_ERROR)));
} elseif (@$_POST['cat'] == 'delete') {
Reminder_Condition::remove();
}
if (@$_GET['cat'] == 'edit') {
$info = Reminder_Condition::getDetails($_GET['id']);
if (!empty($_GET['field'])) {
$info['rlc_rmf_id'] = $_GET['field'];
} else {
$_GET['field'] = $info['rlc_rmf_id'];
}
$tpl->assign('info', $info);
}
if (!empty($_GET['field'])) {
$field_title = Reminder_Condition::getFieldTitle($_GET['field']);
if (Reminder_Condition::canFieldBeCompared($_GET['field'])) {
$tpl->assign(array('show_field_options' => 'yes', 'comparable_fields' => Reminder_Condition::getFieldAdminList(true)));
} elseif (strtolower($field_title) == 'status') {
$prj_id = Reminder::getProjectID($rem_id);
$tpl->assign(array('show_status_options' => 'yes', 'statuses' => Status::getAssocStatusList($prj_id)));
} elseif (strtolower($field_title) == 'category') {
$prj_id = Reminder::getProjectID($rem_id);
$tpl->assign(array('show_category_options' => 'yes', 'categories' => Category::getAssocList($prj_id)));
} elseif (strtolower($field_title) == 'group' || strtolower($field_title) == 'active group') {
$prj_id = Reminder::getProjectID($rem_id);
$tpl->assign(array('show_group_options' => 'yes', 'groups' => Group::getAssocList($prj_id)));
} else {
示例9: array
<?php
/*
* This file is part of the Eventum (Issue Tracking System) package.
*
* @copyright (c) Eventum Team
* @license GNU General Public License, version 2 or later (GPL-2+)
*
* For the full copyright and license information,
* please see the COPYING and AUTHORS files
* that were distributed with this source code.
*/
require_once __DIR__ . '/../../init.php';
$tpl = new Template_Helper();
$tpl->setTemplate('manage/monitor.tpl.html');
Auth::checkAuthentication();
$role_id = Auth::getCurrentRole();
if ($role_id < User::ROLE_REPORTER) {
Misc::setMessage(ev_gettext('Sorry, you are not allowed to access this page.'), Misc::MSG_ERROR);
$tpl->displayTemplate();
exit;
}
$tpl->assign('project_list', Project::getAll());
if (!empty($_POST['cat']) && $_POST['cat'] == 'update') {
$setup = array('diskcheck' => $_POST['diskcheck'], 'paths' => $_POST['paths'], 'ircbot' => $_POST['ircbot']);
$res = Setup::save(array('monitor' => $setup));
Misc::mapMessages($res, array(1 => array(ev_gettext('Thank you, the setup information was saved successfully.'), Misc::MSG_INFO), -1 => array(ev_gettext("ERROR: The system doesn't have the appropriate permissions to create the configuration file in the setup directory (%s). " . 'Please contact your local system administrator and ask for write privileges on the provided path.', APP_CONFIG_PATH), Misc::MSG_NOTE_BOX), -2 => array(ev_gettext("ERROR: The system doesn't have the appropriate permissions to update the configuration file in the setup directory (%s). " . 'Please contact your local system administrator and ask for write privileges on the provided filename.', APP_SETUP_FILE), Misc::MSG_NOTE_BOX)));
}
$tpl->assign(array('enable_disable', array('enabled' => ev_gettext('Enabled'), 'disabled' => ev_gettext('Disabled')), 'setup' => Setup::get()));
$tpl->displayTemplate();
示例10: array
exit;
}
// TODO: move this query to some class
$sql = 'SELECT
prc_id,
prc_title,
SUM(iss_dev_time) as dev_time
FROM
{{%issue}},
{{%project_category}},
{{%status}}
WHERE
iss_prc_id = prc_id AND
iss_sta_id = sta_id AND
sta_is_closed != 1 AND
iss_prj_id = ?
GROUP BY
iss_prc_id';
try {
$res = DB_Helper::getInstance()->getAll($sql, array(Auth::getCurrentProject()));
} catch (DbException $e) {
return false;
}
$total = 0;
foreach ($res as $id => $row) {
$total += $row['dev_time'];
$res[$id]['dev_time'] = str_replace(' ', ' ', str_pad($row['dev_time'], 5, ' ', STR_PAD_LEFT));
}
$res[] = array('dev_time' => str_replace(' ', ' ', str_pad($total, 5, ' ', STR_PAD_LEFT)), 'prc_title' => 'Total');
$tpl->assign('data', $res);
$tpl->displayTemplate();
示例11: dirname
// | 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. |
// | 51 Franklin Street, Suite 330 |
// | Boston, MA 02110-1301, USA. |
// +----------------------------------------------------------------------+
// | Authors: Bryan Alsdorf <bryan@mysql.com> |
// +----------------------------------------------------------------------+
require_once dirname(__FILE__) . '/../../init.php';
$tpl = new Template_Helper();
$tpl->setTemplate('reports/workload_time_period.tpl.html');
Auth::checkAuthentication(APP_COOKIE);
$usr_id = Auth::getUserID();
if (!Access::canAccessReports(Auth::getUserID())) {
echo 'Invalid role';
exit;
}
$prj_id = Auth::getCurrentProject();
// get timezone of current user
$user_prefs = Prefs::get($usr_id);
if (@$_GET['type'] == 'email') {
$data = Report::getEmailWorkloadByTimePeriod(@$user_prefs['timezone']);
} else {
$data = Report::getWorkloadByTimePeriod(@$user_prefs['timezone']);
}
$tpl->assign(array('data' => $data, 'type' => @$_GET['type'], 'user_tz' => Date_Helper::getTimezoneShortNameByUser($usr_id)));
$tpl->displayTemplate();
示例12: getWeeklyReport
/**
* @param int $week
* @param string $start
* @param string $end
* @param bool $separate_closed
* @return string
* @access protected
* @deprecated use getWeeklyReportData() and format data yourself
*/
public function getWeeklyReport($week, $start, $end, $separate_closed)
{
$usr_id = Auth::getUserID();
$week = abs($week);
// 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());
$prj_id = current(array_keys($projects));
AuthCookie::setProjectCookie($prj_id);
$prj_id = Auth::getCurrentProject();
// figure out the correct week
if (empty($start) || empty($end)) {
$start = date('U') - Date_Helper::DAY * (date('w') - 1);
if ($week > 0) {
$start = $start - Date_Helper::WEEK * $week;
}
$end = date('Y-m-d', $start + Date_Helper::DAY * 6);
$start = date('Y-m-d', $start);
}
if ($separate_closed) {
// emulate smarty value for reports/weekly_data.tpl.tmpl:
// {if $smarty.post.separate_closed == 1}
$_POST['separate_closed'] = true;
}
$options = array('separate_closed' => $separate_closed);
$tpl = new Template_Helper();
$tpl->setTemplate('reports/weekly_data.tpl.html');
$tpl->assign(array('report_type' => 'weekly', 'data' => Report::getWeeklyReport($usr_id, $prj_id, $start, $end, $options)));
$ret = $tpl->getTemplateContents() . "\n";
return $ret;
}
示例13: dirname
// +----------------------------------------------------------------------+
require_once dirname(__FILE__) . '/../init.php';
$tpl = new Template_Helper();
$tpl->setTemplate('popup.tpl.html');
Auth::checkAuthentication(APP_COOKIE, 'index.php?err=5', true);
$usr_id = Auth::getUserID();
$prj_id = Auth::getCurrentProject();
$iss_id = isset($_GET['iss_id']) ? (int) $_GET['iss_id'] : (isset($_POST['issue_id']) ? (int) $_POST['issue_id'] : null);
$cat = isset($_GET['cat']) ? (string) $_GET['cat'] : (isset($_POST['cat']) ? (string) $_POST['cat'] : null);
$id = isset($_GET['id']) ? (int) $_GET['id'] : null;
$status_id = isset($_GET['new_sta_id']) ? (int) $_GET['new_sta_id'] : null;
$isr_id = isset($_POST['isr_id']) ? (int) $_POST['isr_id'] : null;
$items = isset($_POST['item']) ? (array) $_POST['item'] : null;
if ($cat == 'delete_note') {
$res = Note::remove($id);
$tpl->assign('note_delete_result', $res);
} elseif ($cat == 'delete_time') {
$res = Time_Tracking::removeTimeEntry($id, $usr_id);
$tpl->assign('time_delete_result', $res);
} elseif ($cat == 'bulk_update') {
$res = Issue::bulkUpdate();
$tpl->assign('bulk_update_result', $res);
} elseif ($cat == 'set_initial_impact') {
$res = Issue::setImpactAnalysis($iss_id);
$tpl->assign('set_initial_impact_result', $res);
} elseif ($cat == 'add_requirement') {
$res = Impact_Analysis::insert($iss_id);
$tpl->assign('add_requirement_result', $res);
} elseif ($cat == 'set_impact_requirement') {
$res = Impact_Analysis::update($isr_id);
$tpl->assign('set_impact_requirement_result', $res);
示例14: array
*/
require_once __DIR__ . '/../../init.php';
$tpl = new Template_Helper();
$tpl->setTemplate('manage/round_robin.tpl.html');
Auth::checkAuthentication();
$role_id = Auth::getCurrentRole();
if ($role_id < User::ROLE_MANAGER) {
Misc::setMessage(ev_gettext('Sorry, you are not allowed to access this page.'), Misc::MSG_ERROR);
$tpl->displayTemplate();
exit;
}
if (@$_POST['cat'] == 'new') {
$res = Round_Robin::insert();
Misc::mapMessages($res, array(1 => array(ev_gettext('Thank you, the round robin entry was added successfully.'), Misc::MSG_INFO), -1 => array(ev_gettext('An error occurred while trying to add the round robin entry.'), Misc::MSG_ERROR), -2 => array(ev_gettext('Please enter the title for this round robin entry.'), Misc::MSG_ERROR), -3 => array(ev_gettext('Please enter the message for this round robin entry.'), Misc::MSG_ERROR)));
} elseif (@$_POST['cat'] == 'update') {
$res = Round_Robin::update();
Misc::mapMessages($res, array(1 => array(ev_gettext('Thank you, the round robin entry was updated successfully.'), Misc::MSG_INFO), -1 => array(ev_gettext('An error occurred while trying to update the round robin entry information.'), Misc::MSG_ERROR), -2 => array(ev_gettext('Please enter the title for this round robin entry.'), Misc::MSG_ERROR), -3 => array(ev_gettext('Please enter the message for this round robin entry.'), Misc::MSG_ERROR)));
} elseif (@$_POST['cat'] == 'delete') {
Round_Robin::remove();
}
if (@$_GET['cat'] == 'edit') {
$info = Round_Robin::getDetails($_GET['id']);
$tpl->assign('info', $info);
$_REQUEST['prj_id'] = $info['prr_prj_id'];
}
$tpl->assign('list', Round_Robin::getList());
if (!empty($_REQUEST['prj_id'])) {
$tpl->assign('user_options', User::getActiveAssocList($_REQUEST['prj_id'], User::ROLE_CUSTOMER));
}
$tpl->assign('project_list', Project::getAll());
$tpl->displayTemplate();
示例15: dirname
// | 51 Franklin Street, Suite 330 |
// | Boston, MA 02110-1301, USA. |
// +----------------------------------------------------------------------+
// | Authors: João Prado Maia <jpm@mysql.com> |
// +----------------------------------------------------------------------+
require_once dirname(__FILE__) . '/../../init.php';
$tpl = new Template_Helper();
$tpl->setTemplate('manage/customize_listing.tpl.html');
Auth::checkAuthentication(APP_COOKIE);
$role_id = Auth::getCurrentRole();
if ($role_id < User::getRoleID('administrator')) {
Misc::setMessage(ev_gettext('Sorry, you are not allowed to access this page.'), Misc::MSG_ERROR);
$tpl->displayTemplate();
exit;
}
$tpl->assign('project_list', Project::getAll());
if (@$_POST['cat'] == 'new') {
$res = Status::insertCustomization($_POST['project'], $_POST['status'], $_POST['date_field'], $_POST['label']);
Misc::mapMessages($res, array(1 => array(ev_gettext('Thank you, the customization was added successfully.'), Misc::MSG_INFO), -1 => array(ev_gettext('An error occurred while trying to add the new customization.'), Misc::MSG_ERROR), -2 => array(ev_gettext('Please enter the title for this new customization'), Misc::MSG_ERROR)));
} elseif (@$_POST['cat'] == 'update') {
$res = Status::updateCustomization($_POST['id'], $_POST['project'], $_POST['status'], $_POST['date_field'], $_POST['label']);
Misc::mapMessages($res, array(1 => array(ev_gettext('Thank you, the customization was updated successfully.'), Misc::MSG_INFO), -1 => array(ev_gettext('An error occurred while trying to update the customization information.'), Misc::MSG_ERROR), -2 => array(ev_gettext('Please enter the title for this customization.'), Misc::MSG_ERROR)));
} elseif (@$_POST['cat'] == 'delete') {
$res = Status::removeCustomization(@$_POST['items']);
Misc::mapMessages($res, array(true => array(ev_gettext('Thank you, the customization was deleted successfully.'), Misc::MSG_INFO), false => array(ev_gettext('An error occurred while trying to delete the customization information.'), Misc::MSG_ERROR)));
}
if (@$_GET['cat'] == 'edit') {
$details = Status::getCustomizationDetails($_GET['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;