Current time: 05-22-2012, 09:53 PM Hello There, Guest! (LoginRegister)

Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
customer area, tickets directly see ticket
03-24-2011, 11:28 AM
Post: #1
customer area, tickets directly see ticket
hi all, with this plugin we have to get in the menu, to give out tickets instead of tickets to choose an option from the submenu.

sorry for my English is not very good.

open client/index.php:

line 123, Delete:
PHP Code:
elseif($content->navlist) {
$html "Select a sub-page from the sidebar.".$content->navlist[0][3]."";


open client/pages/tickets.php:

line 104, remplace switch:
PHP Code:
switch($main->getvar['sub']) {
            default:
                if(
$_POST) {
                    foreach(
$main->postvar as $key => $value) {
                        if(
$value == "" && !$n && $key != "admin") {
                            
$main->errors("Rellena todos los campos!");
                            
$n++;
                        }
                    }
                    if(!
$n) {
                        
$time time();
                        
$db->query("INSERT INTO `<PRE>tickets` (title, content, urgency, time, userid) VALUES('{$main->postvar['title']}', '{$main->postvar['content']}', '{$main->postvar['urgency']}', '{$time}', '{$_SESSION['cuser']}')");
                        
$main->errors("Ticket Agregado correctamente!");
                        
$template $db->emailTemplate("new ticket");
                        
$array['TITLE'] = $main->postvar['title'];
                        
$array['URGENCY'] = $main->postvar['urgency'];
                        
$array['CONTENT'] = $main->postvar['content'];
                        
$email->staff($template['subject'], $template['content'], $array);
                    }
                }
                echo 
$style->replaceVar("tpl/support/addticket.tpl"$array);
                break;
            
            case 
"view":
                if(!
$main->getvar['do']) {
                    
$query $db->query("SELECT * FROM `<PRE>tickets` WHERE `userid` = '{$_SESSION['cuser']}' AND `reply` = '0'");
                    if(!
$db->num_rows($query)) {
                        echo 
"Tu no tienes ning&uacute;n ticket";    
                    }
                    else {
                        while(
$data $db->fetch_array($query)) {
                            
$array['TITLE'] = $data['title'];
                            
$array['UPDATE'] = $this->lastUpdated($data['id']);
                            
$array['ID'] = $data['id'];
                            echo 
$style->replaceVar("tpl/support/ticketviewbox.tpl"$array);
                        }
                    }
                }
                else {
                    
$query $db->query("SELECT * FROM `<PRE>tickets` WHERE `id` = '{$main->getvar['do']}' OR `ticketid` = '{$main->getvar['do']}' ORDER BY `time` ASC");
                    if(!
$db->num_rows($query)) {
                        echo 
"El ticket no existe!";    
                    }
                    else {
                        if(
$_POST) {
                            foreach(
$main->postvar as $key => $value) {
                                if(
$value == "" && !$n && $key != "admin") {
                                    
$main->errors("Rellene todos los campos!");
                                    
$n++;
                                }
                            }
                            if(!
$n) {
                                
$time time();
                                
$db->query("INSERT INTO `<PRE>tickets` (title, content, time, userid, reply, ticketid) VALUES('{$main->postvar['title']}', '{$main->postvar['content']}', '{$time}', '{$_SESSION['cuser']}', '1', '{$main->getvar['do']}')");
                                
$main->errors("Respuesta Agregada!");
                                
$data $db->fetch_array($query);
                                
$client $db->client($_SESSION['cuser']);
                                
$template $db->emailTemplate("new response");
                                
$array['TITLE'] = $data['title'];
                                
$array['USER'] = $client['user'];
                                
$array['CONTENT'] = $main->postvar['content'];
                                
$email->staff($template['subject'], $template['content'], $array);
                                
$main->redirect("?page=tickets&sub=view&do="$main->getvar['do']);
                            }
                        }
                        
$data $db->fetch_array($query);
                        
$array['AUTHOR'] = $this->determineAuthor($data['userid'], $data['staff']);
                        
$array['TIME'] = strftime("%D"$data['time']);
                        
$array['NUMREPLIES'] = $db->num_rows($query) - 1;
                        
$array['UPDATED'] = $this->lastUpdated($data['id']);
                        
$array['ORIG'] = $this->showReply($data['id']);
                        
$array['URGENCY'] = $data['urgency'];
                        
$array['STATUS'] = $this->status($data['status']);
                        
                        
$n 0;
                        
$array['REPLIES'] = "";
                        while(
$reply $db->fetch_array($query)) {
                            if(!
$n) {
                                
$array['REPLIES'] .= "<br /><b>Respuestas</b>";
                            }
                            
$array['REPLIES'] .= $this->showReply($reply['id']);
                            
$n++;
                        }
                        
                        if(
$data['status'] != 3) {
                            
$array['ADDREPLY'] .= "<br /><b>Agregar Respuesta</b>";
                            
$array2['TITLE'] = "RE: "$data['title'];
                            
$array['ADDREPLY'] .= $style->replaceVar("tpl/support/addreply.tpl"$array2);
                        }
                        else {
                            
$array['ADDREPLY'] = "";    
                        }
                        
                        echo 
$style->replaceVar("tpl/support/viewticket.tpl"$array);    
                    }
                }
                break;
        } 

replace by

PHP Code:
switch($main->getvar['sub']) {
            default:

                if(!
$main->getvar['do']) {
                    
$query $db->query("SELECT * FROM `<PRE>tickets` WHERE `userid` = '{$_SESSION['cuser']}' AND `reply` = '0'");
                    if(!
$db->num_rows($query)) {
                        echo 
"Tu no tienes ning&uacute;n ticket";    
                    }
                    else {
                        while(
$data $db->fetch_array($query)) {
                            
$array['TITLE'] = $data['title'];
                            
$array['UPDATE'] = $this->lastUpdated($data['id']);
                            
$array['ID'] = $data['id'];
                            echo 
$style->replaceVar("tpl/support/ticketviewbox.tpl"$array);
                        }
                    }
                }
                else {
                    
$query $db->query("SELECT * FROM `<PRE>tickets` WHERE `id` = '{$main->getvar['do']}' OR `ticketid` = '{$main->getvar['do']}' ORDER BY `time` ASC");
                    if(!
$db->num_rows($query)) {
                        echo 
"El ticket no existe!";    
                    }
                    else {
                        if(
$_POST) {
                            foreach(
$main->postvar as $key => $value) {
                                if(
$value == "" && !$n && $key != "admin") {
                                    
$main->errors("Rellene todos los campos!");
                                    
$n++;
                                }
                            }
                            if(!
$n) {
                                
$time time();
                                
$db->query("INSERT INTO `<PRE>tickets` (title, content, time, userid, reply, ticketid) VALUES('{$main->postvar['title']}', '{$main->postvar['content']}', '{$time}', '{$_SESSION['cuser']}', '1', '{$main->getvar['do']}')");
                                
$main->errors("Respuesta Agregada!");
                                
$data $db->fetch_array($query);
                                
$client $db->client($_SESSION['cuser']);
                                
$template $db->emailTemplate("new response");
                                
$array['TITLE'] = $data['title'];
                                
$array['USER'] = $client['user'];
                                
$array['CONTENT'] = $main->postvar['content'];
                                
$email->staff($template['subject'], $template['content'], $array);
                                
$main->redirect("?page=tickets&sub=view&do="$main->getvar['do']);
                            }
                        }
                        
$data $db->fetch_array($query);
                        
$array['AUTHOR'] = $this->determineAuthor($data['userid'], $data['staff']);
                        
$array['TIME'] = strftime("%D"$data['time']);
                        
$array['NUMREPLIES'] = $db->num_rows($query) - 1;
                        
$array['UPDATED'] = $this->lastUpdated($data['id']);
                        
$array['ORIG'] = $this->showReply($data['id']);
                        
$array['URGENCY'] = $data['urgency'];
                        
$array['STATUS'] = $this->status($data['status']);
                        
                        
$n 0;
                        
$array['REPLIES'] = "";
                        while(
$reply $db->fetch_array($query)) {
                            if(!
$n) {
                                
$array['REPLIES'] .= "<br /><b>Respuestas</b>";
                            }
                            
$array['REPLIES'] .= $this->showReply($reply['id']);
                            
$n++;
                        }
                        
                        if(
$data['status'] != 3) {
                            
$array['ADDREPLY'] .= "<br /><b>Agregar Respuesta</b>";
                            
$array2['TITLE'] = "RE: "$data['title'];
                            
$array['ADDREPLY'] .= $style->replaceVar("tpl/support/addreply.tpl"$array2);
                        }
                        else {
                            
$array['ADDREPLY'] = "";    
                        }
                        
                        echo 
$style->replaceVar("tpl/support/viewticket.tpl"$array);    
                    }
                }
                break;
            
            case 
"add":
                            if(
$_POST) {
                    foreach(
$main->postvar as $key => $value) {
                        if(
$value == "" && !$n && $key != "admin") {
                            
$main->errors("Rellena todos los campos!");
                            
$n++;
                        }
                    }
                    if(!
$n) {
                        
$time time();
                        
$db->query("INSERT INTO `<PRE>tickets` (title, content, urgency, time, userid) VALUES('{$main->postvar['title']}', '{$main->postvar['content']}', '{$main->postvar['urgency']}', '{$time}', '{$_SESSION['cuser']}')");
                        
$main->errors("Ticket Agregado correctamente!");
                        
$template $db->emailTemplate("new ticket");
                        
$array['TITLE'] = $main->postvar['title'];
                        
$array['URGENCY'] = $main->postvar['urgency'];
                        
$array['CONTENT'] = $main->postvar['content'];
                        
$email->staff($template['subject'], $template['content'], $array);
                    }
                }
                echo 
$style->replaceVar("tpl/support/addticket.tpl"$array);
                break;
        } 
Find all posts by this user
Quote this message in a reply
03-27-2011, 02:49 PM
Post: #2
RE: customer area, tickets directly see ticket
please explain i don get what this does Confused
Find all posts by this user
Quote this message in a reply
03-28-2011, 02:58 AM
Post: #3
RE: customer area, tickets directly see ticket
I think this is to send invoices manually. If it is then this would be great
Find all posts by this user
Quote this message in a reply
03-29-2011, 05:00 AM
Post: #4
RE: customer area, tickets directly see ticket
no, when you go in the customer area, a ticket showing you a message, you had to selecting the submenu you wanted to do, "create ticket" or "view tickets".

with this plugin, lower surface of saying that selects, shows you the tickets directly.

sorry, I'm Spanish and I do not understand why quite easily.

If explicais which plugin you want to do, I would think. Greetings!
Find all posts by this user
Quote this message in a reply
04-11-2011, 08:27 AM
Post: #5
RE: customer area, tickets directly see ticket
still makes no sence sorry Confused
Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 3 Guest(s)