Ejemplo n.º 1
0
         trigger_error($lang['BBCODE_OPEN_ENDED_TAG'] . page_back_link($page_action), E_USER_WARNING);
     }
     if (strlen($data['bbcode_tag']) > 16) {
         trigger_error($lang['BBCODE_TAG_TOO_LONG'] . page_back_link($page_action), E_USER_WARNING);
     }
     if (strlen($data['bbcode_match']) > 4000) {
         trigger_error($lang['BBCODE_TAG_DEF_TOO_LONG'] . page_back_link($page_action), E_USER_WARNING);
     }
     if (strlen($data['bbcode_helpline']) > 255) {
         trigger_error($lang['BBCODE_HELPLINE_TOO_LONG'] . page_back_link($page_action), E_USER_WARNING);
     }
     if ($data['bbcode_match'] == '' && $data['bbcode_tpl'] == '') {
         trigger_error($lang['BBCODE_INVALID'], E_USER_WARNING);
     }
     if ($bbcode_id > 0) {
         $class_db->update_item($bbcode_id, $data);
         $message = '<br /><br />' . $lang['BBCODES_DB_UPDATED'];
     } else {
         $class_db->insert_item($data);
         $message = '<br /><br />' . $lang['BBCODES_DB_ADDED'];
     }
     $cache->destroy_datafiles(array('_bbcodes'), MAIN_CACHE_FOLDER, 'data', true);
     $message .= '<br /><br />' . sprintf($lang['BBCODES_DB_CLICK'], '<a href="' . append_sid(THIS_PAGE) . '">', '</a>');
     $message .= '<br /><br />' . sprintf($lang['Click_return_admin_index'], '<a href="' . append_sid('index.' . PHP_EXT . '?pane=right') . '">', '</a>');
     message_die(GENERAL_MESSAGE, $message);
 } elseif ($mode == 'delete') {
     if ($bbcode_id > 0) {
         $class_db->delete_item($bbcode_id);
         $message = '<br /><br />' . $lang['BBCODES_DB_DELETED'];
     } else {
         $message = '<br /><br />' . $lang['BBCODES_NO_BBCODES_SEL'];
Ejemplo n.º 2
0
             $db->sql_freeresult($result);
         } else {
             message_die(GENERAL_MESSAGE, $lang['TICKETS_NO_TICKET_SEL']);
         }
     }
     $template->assign_vars(array('TICKET_TITLE' => $ticket_info['ticket_cat_title'], 'TICKET_DESCRIPTION' => $ticket_info['ticket_cat_des'], 'TICKET_EMAILS' => $ticket_info['ticket_cat_emails'], 'L_SUBMIT' => $lang['Submit'], 'S_TICKETS_ACTION' => append_sid('admin_tickets.' . PHP_EXT), 'S_HIDDEN_FIELDS' => $s_hidden_fields));
 } elseif ($mode == 'save') {
     $ticket_cat_title = request_var('ticket_cat_title', '', true);
     $ticket_cat_des = request_var('ticket_cat_des', '', true);
     $ticket_cat_emails = request_var('ticket_cat_emails', '', true);
     if ($ticket_cat_title == '') {
         message_die(GENERAL_MESSAGE, $lang['TICKETS_NO_TICKET_TITLE']);
     }
     $inputs_array = array('ticket_cat_title' => $ticket_cat_title, 'ticket_cat_des' => $ticket_cat_des, 'ticket_cat_emails' => $ticket_cat_emails);
     if ($ticket_cat_id > 0) {
         $class_db->update_item($ticket_cat_id, $inputs_array);
         $message = '<br /><br />' . $lang['TICKETS_DB_UPDATED'];
     } else {
         $class_db->insert_item($inputs_array);
         $message = '<br /><br />' . $lang['TICKETS_DB_ADDED'];
     }
     $message .= '<br /><br />' . sprintf($lang['TICKETS_DB_CLICK'], '<a href="' . append_sid('admin_tickets.' . PHP_EXT) . '">', '</a>');
     $message .= '<br /><br />' . sprintf($lang['Click_return_admin_index'], '<a href="' . append_sid('index.' . PHP_EXT . '?pane=right') . '">', '</a>');
     message_die(GENERAL_MESSAGE, $message);
 } elseif ($mode == 'delete') {
     $ticket_cat_id = request_var('ticket_cat_id', 0);
     if ($ticket_cat_id > 0) {
         $class_db->delete_item($ticket_cat_id);
         $message = '<br /><br />' . $lang['TICKETS_DB_DELETED'];
     } else {
         $message = '<br /><br />' . $lang['TICKETS_NO_TICKET_SEL'];