function sendmessage_submit(Pieform $form, $values) { global $USER, $SESSION, $id; $user = get_record('usr', 'id', $id); send_user_message($user, $values['message'], param_integer('replyto', null)); $SESSION->add_ok_msg(get_string('messagesent', 'group')); redirect(get_config('wwwroot') . $values['goto']); }
function sendmessage_submit(Pieform $form, $values) { global $USER, $SESSION, $id; $user = get_record('usr', 'id', $id); send_user_message($user, $values['message']); $SESSION->add_ok_msg(get_string('messagesent', 'group')); switch (param_alpha('returnto', 'myfriends')) { case 'find': redirect('/user/find.php'); break; case 'view': redirect('/user/view.php?id=' . $id); break; default: redirect('/user/myfriends.php'); break; } }
header("Location: support_system.php"); } // // common page data. // global $cfg; $theme_color = $cfg['USER_INITIAL_THEME']; $tpl->assign(array('TR_CLIENT_NEW_TICKET_PAGE_TITLE' => tr('VHCS - Support system - New ticket'), 'THEME_COLOR_PATH' => "../themes/{$theme_color}", 'THEME_CHARSET' => tr('encoding'), 'VHCS_LICENSE' => $cfg['VHCS_LICENSE'], 'ISP_LOGO' => get_logo($_SESSION['user_id']))); // // dynamic page data. // global $cfg; $support_system = $cfg['VHCS_SUPPORT_SYSTEM']; if ($support_system !== 'yes') { header("Location: index.php"); die; } send_user_message($sql, $_SESSION['user_id'], $_SESSION['user_created_by']); // // static page messages. // gen_reseller_menu($tpl); gen_logged_from($tpl); $tpl->assign(array('TR_NEW_TICKET' => tr('New ticket'), 'TR_LOW' => tr('Low'), 'TR_MEDIUM' => tr('Medium'), 'TR_HIGH' => tr('High'), 'TR_VERI_HIGH' => tr('Very high'), 'TR_URGENCY' => tr('Priority'), 'TR_EMAIL' => tr('Email'), 'TR_SUBJECT' => tr('Subject'), 'TR_YOUR_MESSAGE' => tr('Your message'), 'TR_SEND_MESSAGE' => tr('Send message'), 'TR_OPEN_TICKETS' => tr('Open tickets'), 'TR_CLOSED_TICKETS' => tr('Closed tickets'))); gen_page_message($tpl); $tpl->parse('PAGE', 'page'); $tpl->prnt(); if (isset($cfg['DUMP_GUI_DEBUG'])) { dump_gui_debug(); } unset_messages();
// global $cfg; $support_system = $cfg['VHCS_SUPPORT_SYSTEM']; if ($support_system !== 'yes') { header("Location: index.php"); die; } $reseller_id = $_SESSION['user_created_by']; if (isset($_GET['ticket_id'])) { $screenwidth = $_GET['screenwidth']; if (!isset($screenwidth) || $screenwidth < 639) { $screenwidth = 1024; } $tpl->assign('SCREENWIDTH', $screenwidth); change_ticket_status_view($sql, $_GET['ticket_id']); send_user_message($sql, $_SESSION['user_id'], $reseller_id, $_GET['ticket_id']); gen_tickets_list($tpl, $sql, $_GET['ticket_id'], $screenwidth); } else { set_page_message(tr('Ticket not found!')); Header("Location: support_system.php"); die; } // // static page messages. // gen_reseller_menu($tpl); gen_logged_from($tpl); $tpl->assign(array('TR_VIEW_SUPPORT_TICKET' => tr('View support ticket'), 'TR_TICKET_URGENCY' => tr('Priority'), 'TR_TICKET_SUBJECT' => tr('Subject'), 'TR_TICKET_DATE' => tr('Date'), 'TR_DELETE' => tr('Delete'), 'TR_NEW_TICKET_REPLY' => tr('Send message reply'), 'TR_REPLY' => tr('Send reply'), 'TR_TICKET_FROM' => tr('From'), 'TR_OPEN_TICKETS' => tr('Open tickets'), 'TR_CLOSED_TICKETS' => tr('Closed tickets'))); gen_page_message($tpl); $tpl->parse('PAGE', 'page'); $tpl->prnt();