Quote
Jib wrote:
OK here is a start this is ticket_admin.php, infusion.php updated and infusion_db.php added.
Upload this infuse and let me know if it works if it works nice we can then move onto the ticket.php.
<?php
/*---------------------------------------------------+
| PHPFusion 6 Content Management System
+----------------------------------------------------+
| Copyright © 2002 - 2005 Nick Jones
| http://www.php-fusion.co.uk/
+----------------------------------------------------+
| Released under the terms & conditions of v2 of the
| GNU General Public License. For details refer to
| the included gpl.txt file or visit http://gnu.org
+----------------------------------------------------*/
include INFUSIONS."ticket_system/infusion_db.php";
// Infusion general information
$inf_title = "Ticket System";
$inf_description = "Ticket System";
$inf_version = "2.1";
$inf_developer = "Jomiii";
$inf_email = "jomi@jomiii.dk";
$inf_weburl = "http://www.jomiii.dk";
$inf_folder = "ticket_system"; // The folder in which the infusion resides.
$inf_newtable[1] = DB_TICKETSYSTEM." (
id INT UNSIGNED NOT NULL AUTO_INCREMENT,
addition varchar(2) ,
closed varchar(2) ,
active varchar(2) ,
username varchar(25) ,
subject varchar(40) ,
name varchar(25) ,
date int(10) ,
message text ,
priority varchar(2) ,
PRIMARY KEY(id)
) ENGINE=MyISAM;";
$inf_droptable[1] = DB_TICKETSYSTEM;
$inf_adminpanel[1] = array(
"title" => "Ticket System",
"image" => "",
"panel" => "ticket_admin.php",
"rights" => "TIC"
);
$inf_sitelink[1] = array(
"title" => "Indsend ticket",
"url" => "ticket.php?stype=ust",
"visibility" => "101"
);
?>
<?php
////////////////////////////////////////////////////////////////////////////////
// Sharky-Web Sharky's Ticket System system for php-fuision //
// Copyright (C) 2007 by the Luben Kirov //
// http://www.sharky-web.com/ //
// Webmaster@sharky-web.com //
// -------------------------------------------------------------------------- //
// This file is part of Warning System. //
// //
// Ticket System 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. //
// //
// Ticket System 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. //
// //
// Check the COPYING.txt for information on GNU General Public License. //
////////////////////////////////////////////////////////////////////////////////
require_once "../../maincore.php";
require_once THEMES."templates/admin_header.php";
include INFUSIONS."ticket_system/infusion_db.php";
if (!checkrights("TIC") || !defined("iAUTH") || !isset($_GET['aid']) || $_GET['aid'] != iAUTH) { redirect(BASEDIR."index.php"); }
if (isset($_POST['submit1'])) {
if (isset($_GET['ids']) && isnum($_GET['ids'])) {
$tics = dbquery("SELECT * FROM ".DB_TICKETSYSTEM." WHERE id='".$_GET['ids']."'");
while ($test2 = dbarray($tics)) {
if ( $test2['closed'] == "1"){
$status= "Lukket";
}else{
$status= "Åben";
}
if ( $test2['active'] == "1"){
$prodress= "Ubesvaret";
}else{
$progress= "Besvaret";
}
echo "
<font size = '5'><b>".$test2['subject']."</b><br></font>
<legend>Brugerens ticket:</legend>
<table class= 'tbl1' border='0' cellpadding='2' cellspacing='1' width='100%'>
<tbody>
<tr>
<td align='left' valign='top' width='10%'>Brugernavn:</td>
<td width='70%'><input name='username' size='30' value='".$test2['username']."' type='text' disabled='disabled'></td>
</tr>
<tr>
<td align='left' valign='top' width='10%'>Navn:</td>
<td width='70%'><input name='name' size='30' value='".$test2['name']."' type='text' disabled='disabled'></td>
</tr>
<tr>
<td align='left' valign='top' width='10%'>Prioritet:</td>
<td><select name='priority disabled='disabled'>";
if ( $test21['priority'] == "4"){echo "<option value='4' style='color: rgb(127, 255, 0);' selected='selected'>Lav</option>";}
if ( $test21['priority'] == "3"){echo "<option value='3' style='color: rgb(175, 238, 238);'selected='selected'>Mellem</option>";}
if ( $test21['priority'] == "2"){echo "<option value='2' style='color: rgb(0, 191, 255);'selected='selected'>Høj</option>";}
if ( $test21['priority'] == "1"){echo "<option value='1' style='color: rgb(255, 0, 0);'selected='selected'>Kritisk</option>";}
echo"
</select></td>
</tr>
</tbody></table>
</fieldset>
<legend>Meddelelses detaljer</legend>
<table class= 'tbl1' border='0' cellpadding='2' cellspacing='0' width='100%'>
<tbody><tr>
<td align='left' valign='top' width='10%'>Emne:</td>
<td width='70%'><input name='subject' size='40' value='".$test2['subject']."' type='text'disabled='disabled'></td>
</tr>
<tr>
<td colspan='2'><textarea name='message' rows='10' cols='30' style='width: 98%;' disabled='disabled'>".$test2['message']."</textarea><br><table border='0' cellpadding='3' cellspacing='1' width='100%'><tbody><tr>
</tr></tbody></table></div></td>
</tr>
</tbody></table>
</fieldset>
";
}
$tic1 = dbquery("SELECT * FROM ".DB_TICKETSYSTEM." WHERE addition = '".$_GET['ids']."' Order BY date ASC");
while ($test28 = dbarray($tic1)) {
echo"
<legend>Meddelelse</legend>
<table class= 'tbl1' border='0' cellpadding='2' cellspacing='0' width='100%'>
<tbody>
<tr>
<td colspan='2'><textarea name='message' rows='10' cols='30' style='width: 98%;' disabled='disabled'>".$test28['message']."</textarea><br><table border='0' cellpadding='3' cellspacing='1' width='100%'><tbody><tr>
</tr></tbody></table></div></td>
</tr>
</tbody></table>
</fieldset>
";
}
echo "
<legend>Besvar</legend>
<form name='inputform' method='post' action='".FUSION_SELF.$aidlink."'>
<table class= 'tbl1' border='0' cellpadding='0' cellspacing='0' width='100%'>
<tbody>
<tr>
<td colspan='2'><textarea name='message' rows='10' cols='30' style='width: 98%;' ></textarea><br><table border='0' cellpadding='3' cellspacing='1' width='100%'><tbody><INPUT TYPE='hidden' NAME='addition1' VALUE='".$_POST['ids']."'><tr>
</tr></tbody></table></div></td>
</tr>
</tbody></table>
</fieldset>
<table border='0' cellpadding='0' cellspacing='0' width='100%'>
<tr>
<td>
<input name='subme' value='Send' type='submit' class='button'>
<input name='reset' value='Nulstil' type='reset' class='button'>
<input name='delete' value='Slet' type='submit' class='button'>
<input name='closed' value='Luk' type='submit' class='button'>
<input name='open' value='Åben' type='submit' class='button'>
</form>
</td>
</tr>
</table>
";
}
}
if (!isset($_POST['submit1'])) {
if (isset($_POST['subme'])) {
$addition = stripinput($_POST['addition1']);
$message = stripinput($_POST['message']);
$result = dbquery("INSERT INTO ".DB_TICKETSYSTEM." (addition, date, message) VALUES ('".$addition."', '".time()."', '".$message."')");
$result1 = dbquery("UPDATE ".DB_TICKETSYSTEM." SET active = '0' WHERE id = '".stripinput($_POST['addition1'])."'");
}
if (isset($_POST['delete'])) {
$result = dbquery("DELETE FROM ".DB_TICKETSYSTEM." WHERE addition = '".stripinput($_POST['addition1'])."'");
$result = dbquery("DELETE FROM ".DB_TICKETSYSTEM." WHERE ID = '".stripinput($_POST['addition1'])."'");
}
if (isset($_POST['closed'])) {
$result = dbquery("UPDATE ".DB_TICKETSYSTEM." SET closed='1' WHERE ID = '".stripinput($_POST['addition1'])."'");
}
if (isset($_POST['open'])) {
$result = dbquery("UPDATE ".DB_TICKETSYSTEM." SET closed='0' WHERE ID = '".stripinput($_POST['addition1'])."'");
}
opentable(" ");
function xfile_404($file, $ext=false){
$file = ereg_replace(' +', '%20', trim($file));
if(substr($file, 0, 7) !== "http://"){ $file = "http://" . $file; }
if($ext){
$file_ext = strtolower(array_pop(explode('.', $file)));
if($file_ext !== $ext){
return 1;
break;
}
}
$domain = substr($file, 7); //lose the http prefix
$domain_ext = strtoupper(array_pop(explode('.', substr($domain, 0, strpos($domain, '/'))))); // end up with 'com' or 'net' or something
$types = array('AC', 'AD', 'AE', 'AERO', 'AF', 'AG', 'AI', 'AL', 'AM', 'AN', 'AO', 'AQ', 'AR', 'ARPA', 'AS', 'ASIA', 'AT', 'AU', 'AW', 'AX', 'AZ', 'BA', 'BB', 'BD', 'BE', 'BF', 'BG', 'BH', 'BI', 'BIZ', 'BJ', 'BM', 'BN', 'BO', 'BR', 'BS', 'BT', 'BV', 'BW', 'BY', 'BZ', 'CA', 'CAT', 'CC', 'CD', 'CF', 'CG', 'CH', 'CI', 'CK', 'CL', 'CM', 'CN', 'CO', 'COM', 'COOP', 'CR', 'CU', 'CV', 'CX', 'CY', 'CZ', 'DE', 'DJ', 'DK', 'DM', 'DO', 'DZ', 'EC', 'EDU', 'EE', 'EG', 'ER', 'ES', 'ET', 'EU', 'FI', 'FJ', 'FK', 'FM', 'FO', 'FR', 'GA', 'GB', 'GD', 'GE', 'GF', 'GG', 'GH', 'GI', 'GL', 'GM', 'GN', 'GOV', 'GP', 'GQ', 'GR', 'GS', 'GT', 'GU', 'GW', 'GY', 'HK', 'HM', 'HN', 'HR', 'HT', 'HU', 'ID', 'IE', 'IL', 'IM', 'IN', 'INFO', 'INT', 'IO', 'IQ', 'IR', 'IS', 'IT', 'JE', 'JM', 'JO', 'JOBS', 'JP', 'KE', 'KG', 'KH', 'KI', 'KM', 'KN', 'KR', 'KW', 'KY', 'KZ', 'LA', 'LB', 'LC', 'LI', 'LK', 'LOCAL', 'LR', 'LS', 'LT', 'LU', 'LV', 'LY', 'MA', 'MC', 'MD', 'MG', 'MH', 'MIL', 'MK', 'ML', 'MM', 'MN', 'MO', 'MOBI', 'MP', 'MQ', 'MR', 'MS', 'MT', 'MU', 'MUSEUM', 'MV', 'MW', 'MX', 'MY', 'MZ', 'NA', 'NAME', 'NC', 'NE', 'NET', 'NF', 'NG', 'NI', 'NL', 'NO', 'NP', 'NR', 'NU', 'NZ', 'OM', 'ORG', 'PA', 'PE', 'PF', 'PG', 'PH', 'PK', 'PL', 'PM', 'PN', 'PR', 'PRO', 'PS', 'PT', 'PW', 'PY', 'QA', 'RE', 'RO', 'RU', 'RW', 'SA', 'SB', 'SC', 'SD', 'SE', 'SG', 'SH', 'SI', 'SJ', 'SK', 'SL', 'SM', 'SN', 'SO', 'SR', 'ST', 'SU', 'SV', 'SY', 'SZ', 'TC', 'TD', 'TEL', 'TF', 'TG', 'TH', 'TJ', 'TK', 'TL', 'TM', 'TN', 'TO', 'TP', 'TR', 'TRAVEL', 'TT', 'TV', 'TW', 'TZ', 'UA', 'UG', 'UK', 'UM', 'US', 'UY', 'UZ', 'VA', 'VC', 'VE', 'VG', 'VI', 'VN', 'VU', 'WF', 'WS', 'YE', 'YT', 'YU', 'ZA', 'ZM', 'ZW');
if(!in_array($domain_ext, $types)){
return 2;
break;
}
$file_headers = @get_headers($file);
if(!$file_headers){
return 3;
break;
}
if($file_headers[0] == 'HTTP/1.1 404 Not Found') {
return 404;
}else{
return ereg_replace('%20', ' ', $file);
}
}
$url = "http://www.sharky-web.com/update/ticket_system2.html";
if(!is_numeric(xfile_404($url))){
echo "
<div align='center'><font size='3' color = 'red'>Update klar <a href='http://www.sharky-web.com'>Klik her</a></font></center><br>
";
}else{
echo "
<div align='center'><font size='2'>Jomiii.dk:</font></center><br>
";
}
echo "
<div align='center'><font size = '4' color = '#275E93'><b>Ticket system</b></font>
<table class= 'tbl1' border='2' width ='100%'>
<tr><td width ='50%'>Emne:</td><td width= '10%'>Status</td><td width='10%'>Progress:</td><td width='10%'>Prioritet:</td><td width='10%'>Dato:</td><td width='10%'>Vis:</td></tr>
";
$t="1";
$tic = dbquery("SELECT * FROM ".DB_TICKETSYSTEM." WHERE addition = '0' ORDER BY closed ASC, active DESC, priority ASC, date DESC");
while ($test21 = dbarray($tic)) {
$t= $t + "1";
if ( $test21['closed'] == "1"){
$status= "Lukket";
}else{
$status= "Åben";
}
if ( $test21['active'] == "1"){
$progress= "Ubesvaret";
}else{
$progress= "Besvaret";
}
if ( $test21['priority'] == "1"){
$priority = "<font color ='red'>Kritisk</font>";
}
if ( $test21['priority'] == "2"){
$priority = "<font color ='blue'>High</font>";
}
if ( $test21['priority'] == "3"){
$priority = "<font color ='green'>Medium</font>";
}
if ( $test21['priority'] == "4"){
$priority = "<font color ='lightgreen'>Low</font>";
}
$meh = $test21['id'];
$dame = showdate("forumdate", $test21['date']);
echo"
<form name='inputform".$t."' method='post' action='".FUSION_SELF.$aidlink."'>
<tr><td>".$test21['subject']."</td><td>".$status."</td><td>".$progress."</td><td>".$priority."</td><td>".$dame."</td><td><input name='submit1' value='View' type='submit' class='button'><INPUT TYPE='hidden' NAME='ids' VALUE='".$meh."'></td></tr>
</form>
";
}
}
echo"
</table></div>
";
closetable();
require_once THEMES."templates/footer.php";
?>
<?
////////////////////////////////////////////////////////////////////////////////
// Sharky-Web Sharky's Ticket System system for php-fuision //
// Copyright (C) 2007 by the Luben Kirov //
// http://www.sharky-web.com/ //
// Webmaster@sharky-web.com //
// -------------------------------------------------------------------------- //
// This file is part of Warning System. //
// //
// Ticket System 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. //
// //
// Ticket System 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. //
// //
// Check the COPYING.txt for information on GNU General Public License. //
////////////////////////////////////////////////////////////////////////////////
require_once "../../maincore.php";
require_once THEMES."templates/header.php";
include INFUSIONS."ticket_system/infusion_db.php";
if (iMEMBER){
if (!isset($stype) || !in_array($stype, array("uvt","uvtl","ust"))) fallback("index.php");
if ($stype == "uvt") {
opentable("Something here");
if (isset($_GET['id']) && isnum($_GET['id'])) {
$tic = dbquery("SELECT * FROM ".DB_TICKETSYSTEM." WHERE id = '".$_GET['id']."'");
while ($test21 = dbarray($tic)) {
echo "
<font size = '5'><b>".$test21['subject']."</b><br></font>
<legend>Formular</legend><br>
<table class= 'tbl1' border='0' cellpadding='2' cellspacing='1' width='100%'>
<tr>
<td align='left' valign='top' width='10%'>Brugernavn:</td>
<td><input name='username' size='30' value='".$test21['username']."' type='text' disabled='disabled' class='textbox'></td>
</tr>
<tr>
<td align='left' valign='top' width='10%'>Navn:</td>
<td><input name='name' size='30' value='".$test21['name']."' type='text' disabled='disabled' class='textbox'></td>
</tr>
<tr>
<td align='left' valign='top' width='10%'>Prioritet:</td>
<td><select name='priority disabled='disabled' class='textbox'>";
if ( $test21['priority'] == "4"){echo "<option value='4' style='color: rgb(127, 255, 0);' selected='selected'>Lav</option>";}
if ( $test21['priority'] == "3"){echo "<option value='3' style='color: rgb(175, 238, 238);'selected='selected'>Mellem</option>";}
if ( $test21['priority'] == "2"){echo "<option value='2' style='color: rgb(0, 191, 255);'selected='selected'>Høj</option>";}
if ( $test21['priority'] == "1"){echo "<option value='1' style='color: rgb(255, 0, 0);'selected='selected'>Kritisk</option>";}
echo"
</select></td>
</tr>
</table>
</fieldset>
<legend>Meddelelses detaljer</legend>
<table class= 'tbl1' border='0' cellpadding='2' cellspacing='0' width='100%'>
<tr>
<td align='left' valign='top' width='10%'>Emne:</td>
<td><input name='subject' class='textbox' size='40' value='".$test21['subject']."' type='text'disabled='disabled'></td>
</tr>
<tr><td align='left' valign='top' width='10%'></td>
<td><textarea name='message' cols='120' rows='15' class='textbox' disabled='disabled'>".$test21['message']."</textarea><br><table border='0' cellpadding='3' cellspacing='1' width='100%'><tr>
</tr></table></div></td>
</tr>
</table>
</fieldset>
";
$tic1 = dbquery("SELECT * FROM ".DB_TICKETSYSTEM." WHERE addition = '".$_GET['id']."' Order BY date ASC");
while ($test2 = dbarray($tic1)) {
echo"
<legend>Meddelelse:</legend>
<table class= 'tbl1' border='0' cellpadding='2' cellspacing='0' width='100%'>
<tr><td align='left' valign='top' width='10%'></td>
<td><textarea name='message' cols='120' rows='15' class='textbox'>".$test2['message']."</textarea><br><table border='0' cellpadding='3' cellspacing='1' width='100%'><tbody><tr>
</tr></table></div></td>
</tr>
</tbody></table>
</fieldset>
";
}
if ( $test21['closed'] == "0"){
echo "
<form name='inputform' method='post' action='ticket.php?stype=uvtl'>
<legend>Besvar:</legend>
<table class= 'tbl1' border='0' cellpadding='2' cellspacing='0' width='100%'>
<tbody>
<tr><td align='left' valign='top' width='10%'></td>
<td><textarea name='message' cols='120' rows='15' class='textbox'></textarea><br><table border='0' cellpadding='3' cellspacing='1' width='100%'><tbody><INPUT TYPE='hidden' NAME='addition1' VALUE='".$_POST['id']."'><tr>
</tr></tbody></table></td>
</tr>
</tbody></table>
</fieldset>
<table border='0' cellpadding='2' cellspacing='1' width='100%'>
<tbody><tr>
<td><input name='submit' value='Send' type='submit' class='button'> </td>
</tr>
</tbody></table>
</form>
";
}else{
echo "<div align = 'center'><font size='4'>Ticket lukket</font></div>";
}
echo "</div>";
}
closetable();
}
}
if ($stype == "uvtl") {
if (isset($_POST['addition1'])) {
$addition = stripinput($_POST['addition1']);
$message = stripinput($_POST['message']);
$result = dbquery("INSERT INTO ".DB_TICKETSYSTEM." (addition, date, message) VALUES ('".$addition."', '".time()."', '".$message."')");
$result1 = dbquery("UPDATE ".DB_TICKETSYSTEM." SET active = '1' WHERE id = '".stripinput($_POST['addition1'])."'");
}
opentable(" ");
echo "
<div align='center'><font size = '6'><b>Support Ticket</b></font>
<table class= 'tbl1' border='2' width ='100%'>
<tr><td width ='50%'>Emne:</td><td width= '10%'>Status</td><td width='10%'>Progress:</td><td width='10%'>Prioritet:</td><td width='10%'>Dato:</td><td width='10%'>Vis:</td></tr>
";
$t="1";
$tic4 = dbquery("SELECT * FROM ".DB_TICKETSYSTEM." WHERE username = '".$userdata['user_name']."' ORDER BY closed ASC, active DESC, priority ASC, date DESC");
while ($test25 = dbarray($tic4)) {
$t= $t + "1";
if ( $test25['closed'] == "1"){
$status= "Closed";
}else{
$status= "Open";
}
$progress = "";
if ( $test25['active'] == "1"){
$progress= "Ubesvaret";
}else{
$progress= "Besvaret";
}
if ( $test25['priority'] == "1"){
$priority = "<font color ='blue'>Kritisk</font>";
}
if ( $test25['priority'] == "2"){
$priority = "<font color ='red'>Høj</font>";
}
if ( $test25['priority'] == "3"){
$priority = "<font color ='yellow'>Mellem</font>";
}
if ( $test25['priority'] == "4"){
$priority = "<font color ='green'>Lav</font>";
}
$meh = $test25['id'];
$dame = showdate("%d-%m-%y %H:%M", $test25['date']);
echo"
<form name='inputform".$t."' method='post' action='ticket.php?stype=uvt'>
<tr><td>".$test25['subject']."</td><td>".$status."</td><td>".$progress."</td><td>".$priority."</td><td>".$dame."</td><td><input name='submit1' value='View' type='submit' class='button'><INPUT TYPE='hidden' NAME='id' VALUE='".$meh."'></td></tr>
</form>
";
}
echo"
</table></div>
";
closetable();
}
if ($stype == "ust") {
if (isset($_POST['subject'])) {
$addition = "0";
$closed = "0";
$active = "1";
$username = $userdata['user_name'];
$subject = stripinput($_POST['subject']);
$name = stripinput($_POST['name']);
$message = stripinput($_POST['message']);
$priority = stripinput($_POST['priority']);
$result = dbquery("INSERT INTO ".DB_TICKETSYSTEM." (addition, username, name, subject, priority, message, closed, active, date) VALUES ('".$addition."', '".$username."', '".$name."', '".$subject."', '".$priority."', '".$message."', '".$closed."', '".$active."', '".time()."')");
}
opentable(" ");
echo "
<div align='center'><font size = '6'><b>Opret ticket</b></font></div>
<form name='inputform' method='post' action='ticket.php?stype=ust' onSubmit='return ValidateForm(this)'>
<legend>Udfyld formularen</legend>
<table class= 'tbl1' border='0' cellpadding='2' cellspacing='1' width='100%'>
<tbody>
<tr>
<td align='left' valign='top' width='10%'>Brugernavn:</td>
<td><input name='username' size='30' class='textbox' value='".$userdata['user_name']."' type='text' disabled='disabled'></td>
</tr>
<tr>
<td align='left' valign='top' width='10%'>Navn:</td>
<td><input name='name' size='30' value='' class='textbox' type='text'></td>
</tr>
<tr>
<td align='left' valign='top' width='10%'>Prioritet:</td>
<td><select class='textbox' name='priority'>
<option value='4' style='color: rgb(175, 238, 238);' selected='selected'>Lav</option>
<option value='3' style='color: rgb(127, 255, 0);'>Mellem</option>
<option value='2' style='color: rgb(0, 191, 255);'>Høj</option>
<option value='1' style='color: rgb(255, 0, 0);'>Kritisk</option>
</select></td>
</tr>
</tbody></table>
</fieldset>
<legend>Meddelelses detaljer</legend>
<table class= 'tbl1' border='0' cellpadding='2' cellspacing='0' width='100%'>
<tbody><tr>
<td align='left' valign='top' width='10%'>Emne:</td>
<td><input name='subject' size='40'class='textbox value='' type='text'></td>
</tr>
<tr><td align='left' valign='top' width='10%'>Meddelelse:</td>
<td><textarea name='message' cols='120' rows='15' class='textbox'></textarea>
<br><table border='0' cellpadding='3' cellspacing='1' width='100%'><tbody><tr>
<td> </td>
</tr></tbody></table></div></td>
</tr>
</tbody></table>
</fieldset>
<table border='0' cellpadding='2' cellspacing='1' width='100%'>
<tbody><tr>
<td><input name='submit' value='Send' type='submit' class='button'> </td>
</tr>
</tbody></table>
</form>";
$rule="Udfyld alle felter!";
echo "<script language='JavaScript'>
function ValidateForm(frm) {
if (frm.name.value==\"\") {
alert(\"".$rule."\");
return false;
}
if (frm.subject.value==\"\") {
alert(\"".$rule."\");
return false;
}
if (frm.message.value==\"\") {
alert(\"".$rule."\");
return false;
}
}
</script>\n";
closetable();
}
}
require_once THEMES."templates/footer.php";
?>
<?php
////////////////////////////////////////////////////////////////////////////////
// Sharky-Web Sharky's Ticket System system for php-fuision //
// Copyright (C) 2007 by the Luben Kirov //
// http://www.sharky-web.com/ //
// Webmaster@sharky-web.com //
// -------------------------------------------------------------------------- //
// This file is part of Warning System. //
// //
// Ticket System 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. //
// //
// Ticket System 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. //
// //
// Check the COPYING.txt for information on GNU General Public License. //
////////////////////////////////////////////////////////////////////////////////
require_once "../../maincore.php";
require_once THEMES."templates/admin_header.php";
include INFUSIONS."ticket_system/infusion_db.php";
if (!checkrights("TIC") || !defined("iAUTH") || !isset($_GET['aid']) || $_GET['aid'] != iAUTH) { redirect(BASEDIR."index.php"); }
if (isset($_POST['submit1'])) {
if (isset($_GET['ids']) && isnum($_GET['ids'])) {
$tics = dbquery("SELECT * FROM ".DB_TICKETSYSTEM." WHERE id='".$_GET['ids']."'");
while ($test2 = dbarray($tics)) {
if ( $test2['closed'] == "1"){
$status= "Lukket";
}else{
$status= "Åben";
}
if ( $test2['active'] == "1"){
$prodress= "Ubesvaret";
}else{
$progress= "Besvaret";
}
echo "
<font size = '5'><b>".$test2['subject']."</b><br></font>
<legend>Brugerens ticket:</legend>
<table class= 'tbl1' border='0' cellpadding='2' cellspacing='1' width='100%'>
<tbody>
<tr>
<td align='left' valign='top' width='10%'>Brugernavn:</td>
<td width='70%'><input name='username' size='30' value='".$test2['username']."' type='text' disabled='disabled'></td>
</tr>
<tr>
<td align='left' valign='top' width='10%'>Navn:</td>
<td width='70%'><input name='name' size='30' value='".$test2['name']."' type='text' disabled='disabled'></td>
</tr>
<tr>
<td align='left' valign='top' width='10%'>Prioritet:</td>
<td><select name='priority disabled='disabled'>";
if ( $test21['priority'] == "4"){echo "<option value='4' style='color: rgb(127, 255, 0);' selected='selected'>Lav</option>";}
if ( $test21['priority'] == "3"){echo "<option value='3' style='color: rgb(175, 238, 238);'selected='selected'>Mellem</option>";}
if ( $test21['priority'] == "2"){echo "<option value='2' style='color: rgb(0, 191, 255);'selected='selected'>Høj</option>";}
if ( $test21['priority'] == "1"){echo "<option value='1' style='color: rgb(255, 0, 0);'selected='selected'>Kritisk</option>";}
echo"
</select></td>
</tr>
</tbody></table>
</fieldset>
<legend>Meddelelses detaljer</legend>
<table class= 'tbl1' border='0' cellpadding='2' cellspacing='0' width='100%'>
<tbody><tr>
<td align='left' valign='top' width='10%'>Emne:</td>
<td width='70%'><input name='subject' size='40' value='".$test2['subject']."' type='text'disabled='disabled'></td>
</tr>
<tr>
<td colspan='2'><textarea name='message' rows='10' cols='30' style='width: 98%;' disabled='disabled'>".$test2['message']."</textarea><br><table border='0' cellpadding='3' cellspacing='1' width='100%'><tbody><tr>
</tr></tbody></table></div></td>
</tr>
</tbody></table>
</fieldset>
";
}
$tic1 = dbquery("SELECT * FROM ".DB_TICKETSYSTEM." WHERE addition = '".$_GET['ids']."' Order BY date ASC");
while ($test28 = dbarray($tic1)) {
echo"
<legend>Meddelelse</legend>
<table class= 'tbl1' border='0' cellpadding='2' cellspacing='0' width='100%'>
<tbody>
<tr>
<td colspan='2'><textarea name='message' rows='10' cols='30' style='width: 98%;' disabled='disabled'>".$test28['message']."</textarea><br><table border='0' cellpadding='3' cellspacing='1' width='100%'><tbody><tr>
</tr></tbody></table></div></td>
</tr>
</tbody></table>
</fieldset>
";
}
echo "
<legend>Besvar</legend>
<form name='inputform' method='post' action='".FUSION_SELF.$aidlink."'>
<table class= 'tbl1' border='0' cellpadding='0' cellspacing='0' width='100%'>
<tbody>
<tr>
<td colspan='2'><textarea name='message' rows='10' cols='30' style='width: 98%;' ></textarea><br><table border='0' cellpadding='3' cellspacing='1' width='100%'><tbody><INPUT TYPE='hidden' NAME='addition1' VALUE='".$_POST['ids']."'><tr>
</tr></tbody></table></div></td>
</tr>
</tbody></table>
</fieldset>
<table border='0' cellpadding='0' cellspacing='0' width='100%'>
<tr>
<td>
<input name='subme' value='Send' type='submit' class='button'>
<input name='reset' value='Nulstil' type='reset' class='button'>
<input name='delete' value='Slet' type='submit' class='button'>
<input name='closed' value='Luk' type='submit' class='button'>
<input name='open' value='Åben' type='submit' class='button'>
</form>
</td>
</tr>
</table>
";
}
}
if (!isset($_POST['submit1'])) {
if (isset($_POST['subme'])) {
$addition = stripinput($_POST['addition1']);
$message = stripinput($_POST['message']);
$result = dbquery("INSERT INTO ".DB_TICKETSYSTEM." (addition, date, message) VALUES ('".$addition."', '".time()."', '".$message."')");
$result1 = dbquery("UPDATE ".DB_TICKETSYSTEM." SET active = '0' WHERE id = '".stripinput($_POST['addition1'])."'");
}
if (isset($_POST['delete'])) {
$result = dbquery("DELETE FROM ".DB_TICKETSYSTEM." WHERE addition = '".stripinput($_POST['addition1'])."'");
$result = dbquery("DELETE FROM ".DB_TICKETSYSTEM." WHERE ID = '".stripinput($_POST['addition1'])."'");
}
if (isset($_POST['closed'])) {
$result = dbquery("UPDATE ".DB_TICKETSYSTEM." SET closed='1' WHERE ID = '".stripinput($_POST['addition1'])."'");
}
if (isset($_POST['open'])) {
$result = dbquery("UPDATE ".DB_TICKETSYSTEM." SET closed='0' WHERE ID = '".stripinput($_POST['addition1'])."'");
}
opentable(" ");
echo "
<div align='center'><font size='3' color = 'red'>Update klar <a href='http://www.sharky-web.com'>Klik her</a></font></center><br>
";
echo "
<div align='center'><font size='2'>Jomiii.dk:</font></center><br>
";
echo "
<div align='center'><font size = '4' color = '#275E93'><b>Ticket system</b></font>
<table class= 'tbl1' border='2' width ='100%'>
<tr><td width ='50%'>Emne:</td><td width= '10%'>Status</td><td width='10%'>Progress:</td><td width='10%'>Prioritet:</td><td width='10%'>Dato:</td><td width='10%'>Vis:</td></tr>
";
$t="1";
$tic = dbquery("SELECT * FROM ".DB_TICKETSYSTEM." WHERE addition = '0' ORDER BY closed ASC, active DESC, priority ASC, date DESC");
while ($test21 = dbarray($tic)) {
$t= $t + "1";
if ( $test21['closed'] == "1"){
$status= "Lukket";
}else{
$status= "Åben";
}
if ( $test21['active'] == "1"){
$progress= "Ubesvaret";
}else{
$progress= "Besvaret";
}
if ( $test21['priority'] == "1"){
$priority = "<font color ='red'>Kritisk</font>";
}
if ( $test21['priority'] == "2"){
$priority = "<font color ='blue'>High</font>";
}
if ( $test21['priority'] == "3"){
$priority = "<font color ='green'>Medium</font>";
}
if ( $test21['priority'] == "4"){
$priority = "<font color ='lightgreen'>Low</font>";
}
$meh = $test21['id'];
$dame = showdate("forumdate", $test21['date']);
echo"
<form name='inputform".$t."' method='post' action='".FUSION_SELF.$aidlink."'>
<tr><td>".$test21['subject']."</td><td>".$status."</td><td>".$progress."</td><td>".$priority."</td><td>".$dame."</td><td><input name='submit1' value='View' type='submit' class='button'><INPUT TYPE='hidden' NAME='ids' VALUE='".$meh."'></td></tr>
</form>
";
}
}
echo"
</table></div>
";
closetable();
require_once THEMES."templates/footer.php";
?>
<?
////////////////////////////////////////////////////////////////////////////////
// Sharky-Web Sharky's Ticket System system for php-fuision //
// Copyright (C) 2007 by the Luben Kirov //
// http://www.sharky-web.com/ //
// Webmaster@sharky-web.com //
// -------------------------------------------------------------------------- //
// This file is part of Warning System. //
// //
// Ticket System 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. //
// //
// Ticket System 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. //
// //
// Check the COPYING.txt for information on GNU General Public License. //
////////////////////////////////////////////////////////////////////////////////
require_once "../../maincore.php";
require_once THEMES."templates/header.php";
include INFUSIONS."ticket_system/infusion_db.php";
if (iMEMBER){
if (!isset($stype) || !in_array($stype, array("uvt","uvtl","ust"))) redirect("index.php");
if ($stype == "uvt") {
opentable("Something here");
if (isset($_GET['id']) && isnum($_GET['id'])) {
$tic = dbquery("SELECT * FROM ".DB_TICKETSYSTEM." WHERE id = '".$_GET['id']."'");
while ($test21 = dbarray($tic)) {
echo "
<font size = '5'><b>".$test21['subject']."</b><br></font>
<legend>Formular</legend><br>
<table class= 'tbl1' border='0' cellpadding='2' cellspacing='1' width='100%'>
<tr>
<td align='left' valign='top' width='10%'>Brugernavn:</td>
<td><input name='username' size='30' value='".$test21['username']."' type='text' disabled='disabled' class='textbox'></td>
</tr>
<tr>
<td align='left' valign='top' width='10%'>Navn:</td>
<td><input name='name' size='30' value='".$test21['name']."' type='text' disabled='disabled' class='textbox'></td>
</tr>
<tr>
<td align='left' valign='top' width='10%'>Prioritet:</td>
<td><select name='priority disabled='disabled' class='textbox'>";
if ( $test21['priority'] == "4"){echo "<option value='4' style='color: rgb(127, 255, 0);' selected='selected'>Lav</option>";}
if ( $test21['priority'] == "3"){echo "<option value='3' style='color: rgb(175, 238, 238);'selected='selected'>Mellem</option>";}
if ( $test21['priority'] == "2"){echo "<option value='2' style='color: rgb(0, 191, 255);'selected='selected'>Høj</option>";}
if ( $test21['priority'] == "1"){echo "<option value='1' style='color: rgb(255, 0, 0);'selected='selected'>Kritisk</option>";}
echo"
</select></td>
</tr>
</table>
</fieldset>
<legend>Meddelelses detaljer</legend>
<table class= 'tbl1' border='0' cellpadding='2' cellspacing='0' width='100%'>
<tr>
<td align='left' valign='top' width='10%'>Emne:</td>
<td><input name='subject' class='textbox' size='40' value='".$test21['subject']."' type='text'disabled='disabled'></td>
</tr>
<tr><td align='left' valign='top' width='10%'></td>
<td><textarea name='message' cols='120' rows='15' class='textbox' disabled='disabled'>".$test21['message']."</textarea><br><table border='0' cellpadding='3' cellspacing='1' width='100%'><tr>
</tr></table></div></td>
</tr>
</table>
</fieldset>
";
$tic1 = dbquery("SELECT * FROM ".DB_TICKETSYSTEM." WHERE addition = '".$_GET['id']."' Order BY date ASC");
while ($test2 = dbarray($tic1)) {
echo"
<legend>Meddelelse:</legend>
<table class= 'tbl1' border='0' cellpadding='2' cellspacing='0' width='100%'>
<tr><td align='left' valign='top' width='10%'></td>
<td><textarea name='message' cols='120' rows='15' class='textbox'>".$test2['message']."</textarea><br><table border='0' cellpadding='3' cellspacing='1' width='100%'><tbody><tr>
</tr></table></div></td>
</tr>
</tbody></table>
</fieldset>
";
}
if ( $test21['closed'] == "0"){
echo "
<form name='inputform' method='post' action='ticket.php?stype=uvtl'>
<legend>Besvar:</legend>
<table class= 'tbl1' border='0' cellpadding='2' cellspacing='0' width='100%'>
<tbody>
<tr><td align='left' valign='top' width='10%'></td>
<td><textarea name='message' cols='120' rows='15' class='textbox'></textarea><br><table border='0' cellpadding='3' cellspacing='1' width='100%'><tbody><INPUT TYPE='hidden' NAME='addition1' VALUE='".$_POST['id']."'><tr>
</tr></tbody></table></td>
</tr>
</tbody></table>
</fieldset>
<table border='0' cellpadding='2' cellspacing='1' width='100%'>
<tbody><tr>
<td><input name='submit' value='Send' type='submit' class='button'> </td>
</tr>
</tbody></table>
</form>
";
}else{
echo "<div align = 'center'><font size='4'>Ticket lukket</font></div>";
}
echo "</div>";
}
closetable();
}
}
if ($stype == "uvtl") {
if (isset($_POST['addition1'])) {
$addition = stripinput($_POST['addition1']);
$message = stripinput($_POST['message']);
$result = dbquery("INSERT INTO ".DB_TICKETSYSTEM." (addition, date, message) VALUES ('".$addition."', '".time()."', '".$message."')");
$result1 = dbquery("UPDATE ".DB_TICKETSYSTEM." SET active = '1' WHERE id = '".stripinput($_POST['addition1'])."'");
}
opentable(" ");
echo "
<div align='center'><font size = '6'><b>Support Ticket</b></font>
<table class= 'tbl1' border='2' width ='100%'>
<tr><td width ='50%'>Emne:</td><td width= '10%'>Status</td><td width='10%'>Progress:</td><td width='10%'>Prioritet:</td><td width='10%'>Dato:</td><td width='10%'>Vis:</td></tr>
";
$t="1";
$tic4 = dbquery("SELECT * FROM ".DB_TICKETSYSTEM." WHERE username = '".$userdata['user_name']."' ORDER BY closed ASC, active DESC, priority ASC, date DESC");
while ($test25 = dbarray($tic4)) {
$t= $t + "1";
if ( $test25['closed'] == "1"){
$status= "Closed";
}else{
$status= "Open";
}
$progress = "";
if ( $test25['active'] == "1"){
$progress= "Ubesvaret";
}else{
$progress= "Besvaret";
}
if ( $test25['priority'] == "1"){
$priority = "<font color ='blue'>Kritisk</font>";
}
if ( $test25['priority'] == "2"){
$priority = "<font color ='red'>Høj</font>";
}
if ( $test25['priority'] == "3"){
$priority = "<font color ='yellow'>Mellem</font>";
}
if ( $test25['priority'] == "4"){
$priority = "<font color ='green'>Lav</font>";
}
$meh = $test25['id'];
$dame = showdate("%d-%m-%y %H:%M", $test25['date']);
echo"
<form name='inputform".$t."' method='post' action='ticket.php?stype=uvt'>
<tr><td>".$test25['subject']."</td><td>".$status."</td><td>".$progress."</td><td>".$priority."</td><td>".$dame."</td><td><input name='submit1' value='View' type='submit' class='button'><INPUT TYPE='hidden' NAME='id' VALUE='".$meh."'></td></tr>
</form>
";
}
echo"
</table></div>
";
closetable();
}
if ($stype == "ust") {
if (isset($_POST['subject'])) {
$addition = "0";
$closed = "0";
$active = "1";
$username = $userdata['user_name'];
$subject = stripinput($_POST['subject']);
$name = stripinput($_POST['name']);
$message = stripinput($_POST['message']);
$priority = stripinput($_POST['priority']);
$result = dbquery("INSERT INTO ".DB_TICKETSYSTEM." (addition, username, name, subject, priority, message, closed, active, date) VALUES ('".$addition."', '".$username."', '".$name."', '".$subject."', '".$priority."', '".$message."', '".$closed."', '".$active."', '".time()."')");
}
opentable(" ");
echo "
<div align='center'><font size = '6'><b>Opret ticket</b></font></div>
<form name='inputform' method='post' action='ticket.php?stype=ust' onSubmit='return ValidateForm(this)'>
<legend>Udfyld formularen</legend>
<table class= 'tbl1' border='0' cellpadding='2' cellspacing='1' width='100%'>
<tbody>
<tr>
<td align='left' valign='top' width='10%'>Brugernavn:</td>
<td><input name='username' size='30' class='textbox' value='".$userdata['user_name']."' type='text' disabled='disabled'></td>
</tr>
<tr>
<td align='left' valign='top' width='10%'>Navn:</td>
<td><input name='name' size='30' value='' class='textbox' type='text'></td>
</tr>
<tr>
<td align='left' valign='top' width='10%'>Prioritet:</td>
<td><select class='textbox' name='priority'>
<option value='4' style='color: rgb(175, 238, 238);' selected='selected'>Lav</option>
<option value='3' style='color: rgb(127, 255, 0);'>Mellem</option>
<option value='2' style='color: rgb(0, 191, 255);'>Høj</option>
<option value='1' style='color: rgb(255, 0, 0);'>Kritisk</option>
</select></td>
</tr>
</tbody></table>
</fieldset>
<legend>Meddelelses detaljer</legend>
<table class= 'tbl1' border='0' cellpadding='2' cellspacing='0' width='100%'>
<tbody><tr>
<td align='left' valign='top' width='10%'>Emne:</td>
<td><input name='subject' size='40'class='textbox value='' type='text'></td>
</tr>
<tr><td align='left' valign='top' width='10%'>Meddelelse:</td>
<td><textarea name='message' cols='120' rows='15' class='textbox'></textarea>
<br><table border='0' cellpadding='3' cellspacing='1' width='100%'><tbody><tr>
<td> </td>
</tr></tbody></table></div></td>
</tr>
</tbody></table>
</fieldset>
<table border='0' cellpadding='2' cellspacing='1' width='100%'>
<tbody><tr>
<td><input name='submit' value='Send' type='submit' class='button'> </td>
</tr>
</tbody></table>
</form>";
$rule="Udfyld alle felter!";
echo "<script language='JavaScript'>
function ValidateForm(frm) {
if (frm.name.value==\"\") {
alert(\"".$rule."\");
return false;
}
if (frm.subject.value==\"\") {
alert(\"".$rule."\");
return false;
}
if (frm.message.value==\"\") {
alert(\"".$rule."\");
return false;
}
}
</script>\n";
closetable();
}
}
require_once THEMES."templates/footer.php";
?>
<?
////////////////////////////////////////////////////////////////////////////////
// Sharky-Web Sharky's Ticket System system for php-fuision //
// Copyright (C) 2007 by the Luben Kirov //
// http://www.sharky-web.com/ //
// Webmaster@sharky-web.com //
// -------------------------------------------------------------------------- //
// This file is part of Warning System. //
// //
// Ticket System 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. //
// //
// Ticket System 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. //
// //
// Check the COPYING.txt for information on GNU General Public License. //
////////////////////////////////////////////////////////////////////////////////
require_once "../../maincore.php";
require_once THEMES."templates/header.php";
include INFUSIONS."ticket_system/infusion_db.php";
if (iMEMBER){
if (!isset($stype)) {redirect ("index.php"); }
if ($stype == "uvt") {
opentable("Something here");
if (isset($_GET['id']) && isnum($_GET['id'])) {
$tic = dbquery("SELECT * FROM ".DB_TICKETSYSTEM." WHERE id = '".$_GET['id']."'");
while ($test21 = dbarray($tic)) {
echo "
<font size = '5'><b>".$test21['subject']."</b><br></font>
<legend>Formular</legend><br>
<table class= 'tbl1' border='0' cellpadding='2' cellspacing='1' width='100%'>
<tr>
<td align='left' valign='top' width='10%'>Brugernavn:</td>
<td><input name='username' size='30' value='".$test21['username']."' type='text' disabled='disabled' class='textbox'></td>
</tr>
<tr>
<td align='left' valign='top' width='10%'>Navn:</td>
<td><input name='name' size='30' value='".$test21['name']."' type='text' disabled='disabled' class='textbox'></td>
</tr>
<tr>
<td align='left' valign='top' width='10%'>Prioritet:</td>
<td><select name='priority disabled='disabled' class='textbox'>";
if ( $test21['priority'] == "4"){echo "<option value='4' style='color: rgb(127, 255, 0);' selected='selected'>Lav</option>";}
if ( $test21['priority'] == "3"){echo "<option value='3' style='color: rgb(175, 238, 238);'selected='selected'>Mellem</option>";}
if ( $test21['priority'] == "2"){echo "<option value='2' style='color: rgb(0, 191, 255);'selected='selected'>Høj</option>";}
if ( $test21['priority'] == "1"){echo "<option value='1' style='color: rgb(255, 0, 0);'selected='selected'>Kritisk</option>";}
echo"
</select></td>
</tr>
</table>
</fieldset>
<legend>Meddelelses detaljer</legend>
<table class= 'tbl1' border='0' cellpadding='2' cellspacing='0' width='100%'>
<tr>
<td align='left' valign='top' width='10%'>Emne:</td>
<td><input name='subject' class='textbox' size='40' value='".$test21['subject']."' type='text'disabled='disabled'></td>
</tr>
<tr><td align='left' valign='top' width='10%'></td>
<td><textarea name='message' cols='120' rows='15' class='textbox' disabled='disabled'>".$test21['message']."</textarea><br><table border='0' cellpadding='3' cellspacing='1' width='100%'><tr>
</tr></table></div></td>
</tr>
</table>
</fieldset>
";
$tic1 = dbquery("SELECT * FROM ".DB_TICKETSYSTEM." WHERE addition = '".$_GET['id']."' Order BY date ASC");
while ($test2 = dbarray($tic1)) {
echo"
<legend>Meddelelse:</legend>
<table class= 'tbl1' border='0' cellpadding='2' cellspacing='0' width='100%'>
<tr><td align='left' valign='top' width='10%'></td>
<td><textarea name='message' cols='120' rows='15' class='textbox'>".$test2['message']."</textarea><br><table border='0' cellpadding='3' cellspacing='1' width='100%'><tbody><tr>
</tr></table></div></td>
</tr>
</tbody></table>
</fieldset>
";
}
if ( $test21['closed'] == "0"){
echo "
<form name='inputform' method='post' action='ticket.php?stype=uvtl'>
<legend>Besvar:</legend>
<table class= 'tbl1' border='0' cellpadding='2' cellspacing='0' width='100%'>
<tbody>
<tr><td align='left' valign='top' width='10%'></td>
<td><textarea name='message' cols='120' rows='15' class='textbox'></textarea><br><table border='0' cellpadding='3' cellspacing='1' width='100%'><tbody><INPUT TYPE='hidden' NAME='addition1' VALUE='".$_POST['id']."'><tr>
</tr></tbody></table></td>
</tr>
</tbody></table>
</fieldset>
<table border='0' cellpadding='2' cellspacing='1' width='100%'>
<tbody><tr>
<td><input name='submit' value='Send' type='submit' class='button'> </td>
</tr>
</tbody></table>
</form>
";
}else{
echo "<div align = 'center'><font size='4'>Ticket lukket</font></div>";
}
echo "</div>";
}
closetable();
}
}
if ($stype == "uvtl") {
if (isset($_POST['addition1'])) {
$addition = stripinput($_POST['addition1']);
$message = stripinput($_POST['message']);
$result = dbquery("INSERT INTO ".DB_TICKETSYSTEM." (addition, date, message) VALUES ('".$addition."', '".time()."', '".$message."')");
$result1 = dbquery("UPDATE ".DB_TICKETSYSTEM." SET active = '1' WHERE id = '".stripinput($_POST['addition1'])."'");
}
opentable(" ");
echo "
<div align='center'><font size = '6'><b>Support Ticket</b></font>
<table class= 'tbl1' border='2' width ='100%'>
<tr><td width ='50%'>Emne:</td><td width= '10%'>Status</td><td width='10%'>Progress:</td><td width='10%'>Prioritet:</td><td width='10%'>Dato:</td><td width='10%'>Vis:</td></tr>
";
$t="1";
$tic4 = dbquery("SELECT * FROM ".DB_TICKETSYSTEM." WHERE username = '".$userdata['user_name']."' ORDER BY closed ASC, active DESC, priority ASC, date DESC");
while ($test25 = dbarray($tic4)) {
$t= $t + "1";
if ( $test25['closed'] == "1"){
$status= "Closed";
}else{
$status= "Open";
}
$progress = "";
if ( $test25['active'] == "1"){
$progress= "Ubesvaret";
}else{
$progress= "Besvaret";
}
if ( $test25['priority'] == "1"){
$priority = "<font color ='blue'>Kritisk</font>";
}
if ( $test25['priority'] == "2"){
$priority = "<font color ='red'>Høj</font>";
}
if ( $test25['priority'] == "3"){
$priority = "<font color ='yellow'>Mellem</font>";
}
if ( $test25['priority'] == "4"){
$priority = "<font color ='green'>Lav</font>";
}
$meh = $test25['id'];
$dame = showdate("%d-%m-%y %H:%M", $test25['date']);
echo"
<form name='inputform".$t."' method='post' action='ticket.php?stype=uvt'>
<tr><td>".$test25['subject']."</td><td>".$status."</td><td>".$progress."</td><td>".$priority."</td><td>".$dame."</td><td><input name='submit1' value='View' type='submit' class='button'><INPUT TYPE='hidden' NAME='id' VALUE='".$meh."'></td></tr>
</form>
";
}
echo"
</table></div>
";
closetable();
}
if ($stype == "ust") {
if (isset($_POST['subject'])) {
$addition = "0";
$closed = "0";
$active = "1";
$username = $userdata['user_name'];
$subject = stripinput($_POST['subject']);
$name = stripinput($_POST['name']);
$message = stripinput($_POST['message']);
$priority = stripinput($_POST['priority']);
$result = dbquery("INSERT INTO ".DB_TICKETSYSTEM." (addition, username, name, subject, priority, message, closed, active, date) VALUES ('".$addition."', '".$username."', '".$name."', '".$subject."', '".$priority."', '".$message."', '".$closed."', '".$active."', '".time()."')");
}
opentable(" ");
echo "
<div align='center'><font size = '6'><b>Opret ticket</b></font></div>
<form name='inputform' method='post' action='ticket.php?stype=ust' onSubmit='return ValidateForm(this)'>
<legend>Udfyld formularen</legend>
<table class= 'tbl1' border='0' cellpadding='2' cellspacing='1' width='100%'>
<tbody>
<tr>
<td align='left' valign='top' width='10%'>Brugernavn:</td>
<td><input name='username' size='30' class='textbox' value='".$userdata['user_name']."' type='text' disabled='disabled'></td>
</tr>
<tr>
<td align='left' valign='top' width='10%'>Navn:</td>
<td><input name='name' size='30' value='' class='textbox' type='text'></td>
</tr>
<tr>
<td align='left' valign='top' width='10%'>Prioritet:</td>
<td><select class='textbox' name='priority'>
<option value='4' style='color: rgb(175, 238, 238);' selected='selected'>Lav</option>
<option value='3' style='color: rgb(127, 255, 0);'>Mellem</option>
<option value='2' style='color: rgb(0, 191, 255);'>Høj</option>
<option value='1' style='color: rgb(255, 0, 0);'>Kritisk</option>
</select></td>
</tr>
</tbody></table>
</fieldset>
<legend>Meddelelses detaljer</legend>
<table class= 'tbl1' border='0' cellpadding='2' cellspacing='0' width='100%'>
<tbody><tr>
<td align='left' valign='top' width='10%'>Emne:</td>
<td><input name='subject' size='40'class='textbox value='' type='text'></td>
</tr>
<tr><td align='left' valign='top' width='10%'>Meddelelse:</td>
<td><textarea name='message' cols='120' rows='15' class='textbox'></textarea>
<br><table border='0' cellpadding='3' cellspacing='1' width='100%'><tbody><tr>
<td> </td>
</tr></tbody></table></div></td>
</tr>
</tbody></table>
</fieldset>
<table border='0' cellpadding='2' cellspacing='1' width='100%'>
<tbody><tr>
<td><input name='submit' value='Send' type='submit' class='button'> </td>
</tr>
</tbody></table>
</form>";
$rule="Udfyld alle felter!";
echo "<script language='JavaScript'>
function ValidateForm(frm) {
if (frm.name.value==\"\") {
alert(\"".$rule."\");
return false;
}
if (frm.subject.value==\"\") {
alert(\"".$rule."\");
return false;
}
if (frm.message.value==\"\") {
alert(\"".$rule."\");
return false;
}
}
</script>\n";
closetable();
}
}
require_once THEMES."templates/footer.php";
?>
<?
////////////////////////////////////////////////////////////////////////////////
// Sharky-Web Sharky's Ticket System system for php-fuision //
// Copyright (C) 2007 by the Luben Kirov //
// http://www.sharky-web.com/ //
// Webmaster@sharky-web.com //
// -------------------------------------------------------------------------- //
// This file is part of Warning System. //
// //
// Ticket System 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. //
// //
// Ticket System 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. //
// //
// Check the COPYING.txt for information on GNU General Public License. //
////////////////////////////////////////////////////////////////////////////////
require_once "../../maincore.php";
require_once THEMES."templates/header.php";
include INFUSIONS."ticket_system/infusion_db.php";
if (iMEMBER){
$stype = isset($_GET['stype']) ? $_GET['stype'] : "";
if (isset($_GET['stype']) && $stype == "uvt") {
opentable("Something here");
if (isset($_GET['id']) && isnum($_GET['id'])) {
$tic = dbquery("SELECT * FROM ".DB_TICKETSYSTEM." WHERE id = '".$_GET['id']."'");
while ($test21 = dbarray($tic)) {
echo "
<font size = '5'><b>".$test21['subject']."</b><br></font>
<legend>Formular</legend><br>
<table class= 'tbl1' border='0' cellpadding='2' cellspacing='1' width='100%'>
<tr>
<td align='left' valign='top' width='10%'>Brugernavn:</td>
<td><input name='username' size='30' value='".$test21['username']."' type='text' disabled='disabled' class='textbox'></td>
</tr>
<tr>
<td align='left' valign='top' width='10%'>Navn:</td>
<td><input name='name' size='30' value='".$test21['name']."' type='text' disabled='disabled' class='textbox'></td>
</tr>
<tr>
<td align='left' valign='top' width='10%'>Prioritet:</td>
<td><select name='priority disabled='disabled' class='textbox'>";
if ( $test21['priority'] == "4"){echo "<option value='4' style='color: rgb(127, 255, 0);' selected='selected'>Lav</option>";}
if ( $test21['priority'] == "3"){echo "<option value='3' style='color: rgb(175, 238, 238);'selected='selected'>Mellem</option>";}
if ( $test21['priority'] == "2"){echo "<option value='2' style='color: rgb(0, 191, 255);'selected='selected'>Høj</option>";}
if ( $test21['priority'] == "1"){echo "<option value='1' style='color: rgb(255, 0, 0);'selected='selected'>Kritisk</option>";}
echo"
</select></td>
</tr>
</table>
</fieldset>
<legend>Meddelelses detaljer</legend>
<table class= 'tbl1' border='0' cellpadding='2' cellspacing='0' width='100%'>
<tr>
<td align='left' valign='top' width='10%'>Emne:</td>
<td><input name='subject' class='textbox' size='40' value='".$test21['subject']."' type='text'disabled='disabled'></td>
</tr>
<tr><td align='left' valign='top' width='10%'></td>
<td><textarea name='message' cols='120' rows='15' class='textbox' disabled='disabled'>".$test21['message']."</textarea><br><table border='0' cellpadding='3' cellspacing='1' width='100%'><tr>
</tr></table></div></td>
</tr>
</table>
</fieldset>
";
$tic1 = dbquery("SELECT * FROM ".DB_TICKETSYSTEM." WHERE addition = '".$_GET['id']."' Order BY date ASC");
while ($test2 = dbarray($tic1)) {
echo"
<legend>Meddelelse:</legend>
<table class= 'tbl1' border='0' cellpadding='2' cellspacing='0' width='100%'>
<tr><td align='left' valign='top' width='10%'></td>
<td><textarea name='message' cols='120' rows='15' class='textbox'>".$test2['message']."</textarea><br><table border='0' cellpadding='3' cellspacing='1' width='100%'><tbody><tr>
</tr></table></div></td>
</tr>
</tbody></table>
</fieldset>
";
}
if ( $test21['closed'] == "0"){
echo "
<form name='inputform' method='post' action='ticket.php?stype=uvtl'>
<legend>Besvar:</legend>
<table class= 'tbl1' border='0' cellpadding='2' cellspacing='0' width='100%'>
<tbody>
<tr><td align='left' valign='top' width='10%'></td>
<td><textarea name='message' cols='120' rows='15' class='textbox'></textarea><br><table border='0' cellpadding='3' cellspacing='1' width='100%'><tbody><INPUT TYPE='hidden' NAME='addition1' VALUE='".$_POST['id']."'><tr>
</tr></tbody></table></td>
</tr>
</tbody></table>
</fieldset>
<table border='0' cellpadding='2' cellspacing='1' width='100%'>
<tbody><tr>
<td><input name='submit' value='Send' type='submit' class='button'> </td>
</tr>
</tbody></table>
</form>
";
}else{
echo "<div align = 'center'><font size='4'>Ticket lukket</font></div>";
}
echo "</div>";
}
closetable();
}
}
if (isset($_GET['stype']) && $stype == "uvtl") {
if (isset($_POST['addition1'])) {
$addition = stripinput($_POST['addition1']);
$message = stripinput($_POST['message']);
$result = dbquery("INSERT INTO ".DB_TICKETSYSTEM." (addition, date, message) VALUES ('".$addition."', '".time()."', '".$message."')");
$result1 = dbquery("UPDATE ".DB_TICKETSYSTEM." SET active = '1' WHERE id = '".stripinput($_POST['addition1'])."'");
}
opentable(" ");
echo "
<div align='center'><font size = '6'><b>Support Ticket</b></font>
<table class= 'tbl1' border='2' width ='100%'>
<tr><td width ='50%'>Emne:</td><td width= '10%'>Status</td><td width='10%'>Progress:</td><td width='10%'>Prioritet:</td><td width='10%'>Dato:</td><td width='10%'>Vis:</td></tr>
";
$t="1";
$tic4 = dbquery("SELECT * FROM ".DB_TICKETSYSTEM." WHERE username = '".$userdata['user_name']."' ORDER BY closed ASC, active DESC, priority ASC, date DESC");
while ($test25 = dbarray($tic4)) {
$t= $t + "1";
if ( $test25['closed'] == "1"){
$status= "Closed";
}else{
$status= "Open";
}
$progress = "";
if ( $test25['active'] == "1"){
$progress= "Ubesvaret";
}else{
$progress= "Besvaret";
}
if ( $test25['priority'] == "1"){
$priority = "<font color ='blue'>Kritisk</font>";
}
if ( $test25['priority'] == "2"){
$priority = "<font color ='red'>Høj</font>";
}
if ( $test25['priority'] == "3"){
$priority = "<font color ='yellow'>Mellem</font>";
}
if ( $test25['priority'] == "4"){
$priority = "<font color ='green'>Lav</font>";
}
$meh = $test25['id'];
$dame = showdate("%d-%m-%y %H:%M", $test25['date']);
echo"
<form name='inputform".$t."' method='post' action='ticket.php?stype=uvt'>
<tr><td>".$test25['subject']."</td><td>".$status."</td><td>".$progress."</td><td>".$priority."</td><td>".$dame."</td><td><input name='submit1' value='View' type='submit' class='button'><INPUT TYPE='hidden' NAME='id' VALUE='".$meh."'></td></tr>
</form>
";
}
echo"
</table></div>
";
closetable();
}
if (isset($_GET['stype']) && $stype == "ust") {
if (isset($_POST['subject'])) {
$addition = "0";
$closed = "0";
$active = "1";
$username = $userdata['user_name'];
$subject = stripinput($_POST['subject']);
$name = stripinput($_POST['name']);
$message = stripinput($_POST['message']);
$priority = stripinput($_POST['priority']);
$result = dbquery("INSERT INTO ".DB_TICKETSYSTEM." (addition, username, name, subject, priority, message, closed, active, date) VALUES ('".$addition."', '".$username."', '".$name."', '".$subject."', '".$priority."', '".$message."', '".$closed."', '".$active."', '".time()."')");
}
opentable(" ");
echo "
<div align='center'><font size = '6'><b>Opret ticket</b></font></div>
<form name='inputform' method='post' action='ticket.php?stype=ust' onSubmit='return ValidateForm(this)'>
<legend>Udfyld formularen</legend>
<table class= 'tbl1' border='0' cellpadding='2' cellspacing='1' width='100%'>
<tbody>
<tr>
<td align='left' valign='top' width='10%'>Brugernavn:</td>
<td><input name='username' size='30' class='textbox' value='".$userdata['user_name']."' type='text' disabled='disabled'></td>
</tr>
<tr>
<td align='left' valign='top' width='10%'>Navn:</td>
<td><input name='name' size='30' value='' class='textbox' type='text'></td>
</tr>
<tr>
<td align='left' valign='top' width='10%'>Prioritet:</td>
<td><select class='textbox' name='priority'>
<option value='4' style='color: rgb(175, 238, 238);' selected='selected'>Lav</option>
<option value='3' style='color: rgb(127, 255, 0);'>Mellem</option>
<option value='2' style='color: rgb(0, 191, 255);'>Høj</option>
<option value='1' style='color: rgb(255, 0, 0);'>Kritisk</option>
</select></td>
</tr>
</tbody></table>
</fieldset>
<legend>Meddelelses detaljer</legend>
<table class= 'tbl1' border='0' cellpadding='2' cellspacing='0' width='100%'>
<tbody><tr>
<td align='left' valign='top' width='10%'>Emne:</td>
<td><input name='subject' size='40'class='textbox value='' type='text'></td>
</tr>
<tr><td align='left' valign='top' width='10%'>Meddelelse:</td>
<td><textarea name='message' cols='120' rows='15' class='textbox'></textarea>
<br><table border='0' cellpadding='3' cellspacing='1' width='100%'><tbody><tr>
<td> </td>
</tr></tbody></table></div></td>
</tr>
</tbody></table>
</fieldset>
<table border='0' cellpadding='2' cellspacing='1' width='100%'>
<tbody><tr>
<td><input name='submit' value='Send' type='submit' class='button'> </td>
</tr>
</tbody></table>
</form>";
$rule="Udfyld alle felter!";
echo "<script language='JavaScript'>
function ValidateForm(frm) {
if (frm.name.value==\"\") {
alert(\"".$rule."\");
return false;
}
if (frm.subject.value==\"\") {
alert(\"".$rule."\");
return false;
}
if (frm.message.value==\"\") {
alert(\"".$rule."\");
return false;
}
}
</script>\n";
closetable();
}
}
require_once THEMES."templates/footer.php";
?>
Quote
Jib wrote:
Nearly 24 hours later. Hehe!! Soz I forgot it's and it's old and horrible (No offense sharky but its old that's all). Anyway it needs recoded.
Category Forum
Panels and InfusionsLabels
None yet
Statistics
4 participants
Notifications
You are not receiving notifications from this thread.
Related Questions