![]() |
#1
|
|||
|
|||
![]()
This is just something I was tinkering with and thought might be useful to some here, especially those who struggle with the code or find mods difficult to install. This is a modification of the pre-existing message system to create a trouble ticket system for your site. No new tables are needed.
First off create a link somewhere on your site (where you want users to be able to click to make a ticket). It's best to create it somewhere that is only accessible to logged on/registered users. If they aren't registered why would they need to send you a trouble ticket... The link should look like this: <b><a href='ticket.php'>Trouble Ticket</b></a> You'll now need to create a new PHP file named ticket.php Copy and paste the code below into this file, save, and upload it. Code:
<?php include("inc/bbcode.php"); include("inc/functions.php"); include("lang/lang.php"); $ugroup = getgroup(); $canpm = cando($ugroup, "canpm"); if($isloggedin == "yes" and $canpm == "yes"){ $act = $_GET["act"]; $act = preg_replace("/[^a-zA-Z0-9\\040.]/", "", $act); $act = secure($act); $user = $_GET["user"]; $user = preg_replace("/[^a-zA-Z0-9\\040.]/", "", $user); $user = secure($user); $id = $_GET["id"]; $id = preg_replace("/[^a-zA-Z0-9\\040.]/", "", $id); $id = secure($id); $mid = $_GET["mid"]; $mid = preg_replace("/[^a-zA-Z0-9\\040.]/", "", $mid); $mid = secure($mid); if($act == "" or $act == "list"){ $article_title = $lang_ticket_title; $article_content = $lang_ticket_content."<br><form name='form1' method='post' action='pmpost.php'> <p><b>Admin:</b><br> <input type='radio' name='pmto' id='pmto' value='insert username here'>insert username here </p> <p><b>Issue:</b><br> <input type='radio' name='mtitle' id='mtitle' value='TT: General Account Issues'>TT: General Account Issues<br> <input type='radio' name='mtitle' id='mtitle' value='TT: Log In'>TT: Log In Issues<br> <input type='radio' name='mtitle' id='mtitle' value='TT: Harrassment'>TT: Harrassment </p> <p><b>Message Text:</b><br> <br><textarea name='mtext' cols='45' id='mtext'></textarea> </p> <p><input name='outbox' type='checkbox' id='outbox' value='yes'> </strong>Save A Copy Of This Trouble Ticket</p> </p> <p> <input type='submit' name='Submit' value='Submit'> </p> </form>"; } else{ $article_title = $lang_invalidact_title; $article_content = $lang_invalidact; } } else{ $article_title = $lang_title_pmdenied; $article_content = $lang_pmdenied; } echo showpage($article_title, $article_content, $date); ?> Code:
<p><b>Admin:</b><br> <input type='radio' name='pmto' id='pmto' value='insert username here'>insert username here </p> <p><b>Issue:</b><br> <input type='radio' name='mtitle' id='mtitle' value='TT: General Account Issues'>TT: General Account Issues<br> <input type='radio' name='mtitle' id='mtitle' value='TT: Log In'>TT: Log In Issues<br> <input type='radio' name='mtitle' id='mtitle' value='TT: Harrassment'>TT: Harrassment </p> Don't forget to include the new language tags for this page in your lang.php file. They should appear like the following. Obviously modify the language to suit your needs. Code:
$lang_ticket_title = "<center>Trouble Ticket</center>"; $lang_ticket_content = "<p>This page allows you to send a trouble ticket .</p>"; Last edited by Plague; 03-28-2011 at 05:19 PM. |
Thread Tools | |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
XAMPP trouble | Kesstryl | Questions and Supports | 3 | 02-13-2013 07:24 AM |
For those of you who have trouble with ACP | Hall of Famer | Questions and Supports | 0 | 02-02-2013 03:29 PM |
Admin CP Trouble | pachoofoosh | Questions and Supports | 10 | 01-24-2013 06:56 PM |
More trouble :( | Gashu | Questions and Supports | 6 | 11-12-2011 11:37 PM |
Trouble with /adm | Knight | Questions and Supports | 11 | 02-15-2009 08:24 PM |
What's New? |
What's Hot? |
What's Popular? |