$GLOBALS['phpgw_info']['flags']['enable_contacts_class'] = True;
$GLOBALS['phpgw_info']['flags']['enable_categories_class'] = True;
$GLOBALS['phpgw_info']['flags']['enable_nextmatchs_class'] = True;
$GLOBALS['phpgw_info']['flags']['noheader'] = True;
include '../header.inc.php';
$GLOBALS['phpgw_info']['flags']['app_header'] = $GLOBALS['phpgw_info']['apps']['tts']['title'] . ' - ' . lang("List of available tickets' transitions.");
$GLOBALS['phpgw']->common->phpgw_header();
$GLOBALS['phpgw']->historylog = createobject('phpgwapi.historylog', 'tts');
$GLOBALS['phpgw']->template->set_file('transitions', 'transitions.tpl');
$GLOBALS['phpgw']->template->set_block('transitions', 'transition_list', 'transition_list');
$GLOBALS['phpgw']->template->set_block('transitions', 'transition_row', 'transition_row');
// select what tickets to view
$filter = reg_var('filter', 'GET');
$start = reg_var('start', 'GET', 'numeric', 0);
$sort = reg_var('sort', 'GET');
$order = reg_var('order', 'GET');
if (!$sort) {
    $sortmethod = 'order by transition_name';
} else {
    $sortmethod = "order by {$order} {$sort}";
}
if (!$filter) {
    $filtermethod = '';
} else {
    $filtermethod = "where {$filter}";
}
$db2 = clone $GLOBALS['phpgw']->db;
$db2->query($q = "select * from phpgw_tts_transitions {$filtermethod} {$sortmethod}", __LINE__, __FILE__);
// fill header
$GLOBALS['phpgw']->template->set_var('tts_head_bgcolor', $GLOBALS['phpgw_info']['theme']['th_bg']);
$GLOBALS['phpgw']->template->set_var('th_bg', $GLOBALS['phpgw_info']['theme']['th_bg']);
function get_var($variable, $method = 'any', $default_value = '')
{
    if (!@is_array($method)) {
        $method = array($method);
    }
    return reg_var($variable, $method, 'any', $default_value, False);
}
예제 #3
0
파일: catalog.php 프로젝트: roandbox/nitek
	</tr>
	    <td colspan="5">
		<img src="img/line.jpg" border="0" height="50" width="800">
	    </td>
	</tr>
	<tr>
	    <td height = "500" colspan="5" valign="top">
	    <table cellpadding="0" cellspacing="25" width="800">
	    <tr>
		<td align="left" height="180" width="130" valign="top">
	    
	    <?php 
require './lib/func.php';
$db = db_connect();
reg_var("zakaz");
reg_var("filt");
$filt[0] = "";
if (isset($submit) && $submit == "Добавить") {
    $zz = $zakaz;
    $zakaz = to_zakaz($zak, $dzak, $zz);
    show_table($page, $rid, $zakaz, $filt);
}
if (isset($submit) && $submit == "Пересчитать") {
    $zz = $zakaz;
    $zakaz = to_zakaz($zak, $dzak, $zz);
    #		    show_zakaz($zakaz,1);
    show_zakaz($zakaz, $page, $youname, $youmail, $youtel, $youmsg);
}
if ($submit == "Корзина") {
    #		    show_zakaz($zakaz,1);
    show_zakaz($zakaz, $page, $youname, $youmail, $youtel, $youmsg);
예제 #4
0
$GLOBALS['phpgw']->template->set_var('lang_search', lang('search'));
$GLOBALS['phpgw']->template->set_var('tts_newticket', lang('New ticket'));
$GLOBALS['phpgw']->template->set_var('tts_head_status', '');
$GLOBALS['phpgw']->template->set_var('tts_notickets', '');
$GLOBALS['phpgw']->template->set_var('lang_category', lang('Category'));
$messages = rtrim($GLOBALS['phpgw']->session->appsession('messages', 'tts'), "");
if ($messages) {
    $GLOBALS['phpgw']->template->set_var('messages', $messages);
    $GLOBALS['phpgw']->session->appsession('messages', 'tts', '');
}
// select what tickets to view
$filter = get_var('filter', array('POST', 'GET'), 'viewmyopen');
$start = (int) get_var('start', array('POST', 'GET'));
$sort = get_var('sort', array('POST', 'GET'), 'DESC');
$order = get_var('order', array('POST', 'GET'), 'ticket_priority');
$searchfilter = reg_var('searchfilter', 'POST', 'any');
// Append the filter to the search URL, so that the mode carries forward on a search
$GLOBALS['phpgw']->template->set_var('tts_search_link', $GLOBALS['phpgw']->link('/tts/index.php', array('filter' => $filter, 'order' => $order, 'sort' => $sort)));
if ($filter == 'viewmyopen') {
    $filtermethod = "WHERE ticket_status='O' AND ticket_assignedto='" . $GLOBALS['phpgw_info']['user']['account_id'] . "'";
}
if ($filter == 'viewopen') {
    $filtermethod = "WHERE ticket_status='O'";
}
if ($filter == 'viewopen' || $filter == 'viewmyopen') {
    if ($GLOBALS['phpgw_info']['user']['preferences']['tts']['refreshinterval']) {
        $GLOBALS['phpgw']->template->set_var('autorefresh', '<META HTTP-EQUIV="Refresh" CONTENT="' . $GLOBALS['phpgw_info']['user']['preferences']['tts']['refreshinterval'] . '; URL=' . $GLOBALS['phpgw']->link('/tts/index.php', array('filter' => $filter, 'order' => $order, 'sort' => $sort)) . '">');
    } else {
        $GLOBALS['phpgw']->template->set_var('autorefresh', '');
    }
}
예제 #5
0
function get_var($variable, $method = 'any', $default_value = '')
{
    return reg_var($variable, $method, 'any', $default_value, False);
}