Changeset 1226493
- Timestamp:
- 08/20/2015 07:36:10 PM (11 years ago)
- Location:
- key4ce-osticket-bridge
- Files:
-
- 140 added
- 24 edited
-
tags/1.3.0 (added)
-
tags/1.3.0/admin (added)
-
tags/1.3.0/admin/admin_create_ticket.php (added)
-
tags/1.3.0/admin/adminticketmail.php (added)
-
tags/1.3.0/admin/db-settings.php (added)
-
tags/1.3.0/admin/header_nav.php (added)
-
tags/1.3.0/admin/header_nav_ticket.php (added)
-
tags/1.3.0/admin/index.php (added)
-
tags/1.3.0/admin/ost-config.php (added)
-
tags/1.3.0/admin/ost-emailtemp.php (added)
-
tags/1.3.0/admin/ost-postreplymail.php (added)
-
tags/1.3.0/admin/ost-settings.php (added)
-
tags/1.3.0/admin/ost-tickets.php (added)
-
tags/1.3.0/admin/ost-ticketview.php (added)
-
tags/1.3.0/admin/search.php (added)
-
tags/1.3.0/css (added)
-
tags/1.3.0/css/admin-style.css (added)
-
tags/1.3.0/css/grid.css (added)
-
tags/1.3.0/css/index.php (added)
-
tags/1.3.0/css/jquery.autocomplete.css (added)
-
tags/1.3.0/css/style.css (added)
-
tags/1.3.0/css/stylesheet.css (added)
-
tags/1.3.0/images (added)
-
tags/1.3.0/images/alert.png (added)
-
tags/1.3.0/images/attachment.png (added)
-
tags/1.3.0/images/check_status_icon.png (added)
-
tags/1.3.0/images/error.png (added)
-
tags/1.3.0/images/home.png (added)
-
tags/1.3.0/images/index.php (added)
-
tags/1.3.0/images/new.png (added)
-
tags/1.3.0/images/new_ticket_icon.png (added)
-
tags/1.3.0/images/ok.png (added)
-
tags/1.3.0/images/os1.gif (added)
-
tags/1.3.0/images/refresh.gif (added)
-
tags/1.3.0/images/refresh.png (added)
-
tags/1.3.0/images/status.png (added)
-
tags/1.3.0/images/thread.gif (added)
-
tags/1.3.0/images/ticket.gif (added)
-
tags/1.3.0/images/tix_closed.png (added)
-
tags/1.3.0/images/topMenuImages.png (added)
-
tags/1.3.0/includes (added)
-
tags/1.3.0/includes/02_01_2015_functions.php (added)
-
tags/1.3.0/includes/contactticketmail.php (added)
-
tags/1.3.0/includes/database.php (added)
-
tags/1.3.0/includes/functions.php (added)
-
tags/1.3.0/includes/index.php (added)
-
tags/1.3.0/includes/newticketmail.php (added)
-
tags/1.3.0/includes/pagination.php (added)
-
tags/1.3.0/includes/postreplymail.php (added)
-
tags/1.3.0/includes/ticket_delete.php (added)
-
tags/1.3.0/includes/udscript.php (added)
-
tags/1.3.0/includes/versionData.php (added)
-
tags/1.3.0/index.php (added)
-
tags/1.3.0/js (added)
-
tags/1.3.0/js/adminTB-email.js (added)
-
tags/1.3.0/js/adminTB-sett.js (added)
-
tags/1.3.0/js/fade.js (added)
-
tags/1.3.0/js/index.php (added)
-
tags/1.3.0/js/jquery.autocomplete.js (added)
-
tags/1.3.0/js/jquery.js (added)
-
tags/1.3.0/js/jquery_1_7_2.js (added)
-
tags/1.3.0/js/timerbar.js (added)
-
tags/1.3.0/js/validate.js (added)
-
tags/1.3.0/languages (added)
-
tags/1.3.0/languages/key4ce-osticket-bridge-ar.mo (added)
-
tags/1.3.0/languages/key4ce-osticket-bridge-ar.po (added)
-
tags/1.3.0/languages/key4ce-osticket-bridge-de_DE.mo (added)
-
tags/1.3.0/languages/key4ce-osticket-bridge-de_DE.po (added)
-
tags/1.3.0/languages/key4ce-osticket-bridge-en_US.mo (added)
-
tags/1.3.0/languages/key4ce-osticket-bridge-en_US.po (added)
-
tags/1.3.0/languages/key4ce-osticket-bridge-nl_NL.mo (added)
-
tags/1.3.0/languages/key4ce-osticket-bridge-nl_NL.po (added)
-
tags/1.3.0/lib (added)
-
tags/1.3.0/lib/ReCaptcha.php (added)
-
tags/1.3.0/lib/Response.php (added)
-
tags/1.3.0/lib/attachment (added)
-
tags/1.3.0/lib/attachment/download.php (added)
-
tags/1.3.0/lib/captcha (added)
-
tags/1.3.0/lib/captcha/backgrounds (added)
-
tags/1.3.0/lib/captcha/backgrounds/45-degree-fabric.png (added)
-
tags/1.3.0/lib/captcha/backgrounds/cloth-alike.png (added)
-
tags/1.3.0/lib/captcha/backgrounds/grey-sandbag.png (added)
-
tags/1.3.0/lib/captcha/backgrounds/kinda-jean.png (added)
-
tags/1.3.0/lib/captcha/backgrounds/polyester-lite.png (added)
-
tags/1.3.0/lib/captcha/backgrounds/stitched-wool.png (added)
-
tags/1.3.0/lib/captcha/backgrounds/white-carbon.png (added)
-
tags/1.3.0/lib/captcha/backgrounds/white-wave.png (added)
-
tags/1.3.0/lib/captcha/fonts (added)
-
tags/1.3.0/lib/captcha/fonts/times_new_yorker.ttf (added)
-
tags/1.3.0/lib/captcha/index.php (added)
-
tags/1.3.0/lib/captcha/recaptchalib.php (added)
-
tags/1.3.0/lib/captcha/simple-php-captcha.php (added)
-
tags/1.3.0/lib/src (added)
-
tags/1.3.0/lib/src/ReCaptcha (added)
-
tags/1.3.0/lib/src/ReCaptcha/ReCaptcha.php (added)
-
tags/1.3.0/lib/src/ReCaptcha/RequestMethod (added)
-
tags/1.3.0/lib/src/ReCaptcha/RequestMethod.php (added)
-
tags/1.3.0/lib/src/ReCaptcha/RequestMethod/Curl.php (added)
-
tags/1.3.0/lib/src/ReCaptcha/RequestMethod/Post.php (added)
-
tags/1.3.0/lib/src/ReCaptcha/RequestMethod/Socket.php (added)
-
tags/1.3.0/lib/src/ReCaptcha/RequestMethod/SocketPost.php (added)
-
tags/1.3.0/lib/src/ReCaptcha/RequestParameters.php (added)
-
tags/1.3.0/lib/src/ReCaptcha/Response.php (added)
-
tags/1.3.0/lib/src/autoload.php (added)
-
tags/1.3.0/license.txt (added)
-
tags/1.3.0/ost-bridge.php (added)
-
tags/1.3.0/osticket-wp.php (added)
-
tags/1.3.0/readme.txt (added)
-
tags/1.3.0/screenshot-1.png (added)
-
tags/1.3.0/screenshot-2.png (added)
-
tags/1.3.0/screenshot-3.png (added)
-
tags/1.3.0/screenshot-4.png (added)
-
tags/1.3.0/screenshot-5.png (added)
-
tags/1.3.0/screenshot-6.png (added)
-
tags/1.3.0/templates (added)
-
tags/1.3.0/templates/contact_nav_bar.php (added)
-
tags/1.3.0/templates/contact_ticket.php (added)
-
tags/1.3.0/templates/index.php (added)
-
tags/1.3.0/templates/list_tickets.php (added)
-
tags/1.3.0/templates/message.php (added)
-
tags/1.3.0/templates/nav_bar.php (added)
-
tags/1.3.0/templates/new_ticket.php (added)
-
tags/1.3.0/templates/pagination.php (added)
-
tags/1.3.0/templates/view_ticket.php (added)
-
trunk/admin/admin_create_ticket.php (modified) (6 diffs)
-
trunk/admin/adminticketmail.php (modified) (4 diffs)
-
trunk/admin/db-settings.php (modified) (9 diffs)
-
trunk/admin/header_nav.php (modified) (1 diff)
-
trunk/admin/header_nav_ticket.php (modified) (2 diffs)
-
trunk/admin/ost-config.php (modified) (2 diffs)
-
trunk/admin/ost-emailtemp.php (modified) (6 diffs)
-
trunk/admin/ost-postreplymail.php (modified) (5 diffs)
-
trunk/admin/ost-tickets.php (modified) (4 diffs)
-
trunk/admin/ost-ticketview.php (modified) (9 diffs)
-
trunk/css/admin-style.css (modified) (8 diffs)
-
trunk/css/grid.css (added)
-
trunk/css/style.css (modified) (8 diffs)
-
trunk/includes/contactticketmail.php (modified) (1 diff)
-
trunk/includes/database.php (modified) (5 diffs)
-
trunk/includes/versionData.php (modified) (1 diff)
-
trunk/js/validate.js (modified) (1 diff)
-
trunk/lib/ReCaptcha.php (added)
-
trunk/lib/Response.php (added)
-
trunk/lib/captcha/recaptchalib.php (added)
-
trunk/lib/src (added)
-
trunk/lib/src/ReCaptcha (added)
-
trunk/lib/src/ReCaptcha/ReCaptcha.php (added)
-
trunk/lib/src/ReCaptcha/RequestMethod (added)
-
trunk/lib/src/ReCaptcha/RequestMethod.php (added)
-
trunk/lib/src/ReCaptcha/RequestMethod/Curl.php (added)
-
trunk/lib/src/ReCaptcha/RequestMethod/Post.php (added)
-
trunk/lib/src/ReCaptcha/RequestMethod/Socket.php (added)
-
trunk/lib/src/ReCaptcha/RequestMethod/SocketPost.php (added)
-
trunk/lib/src/ReCaptcha/RequestParameters.php (added)
-
trunk/lib/src/ReCaptcha/Response.php (added)
-
trunk/lib/src/autoload.php (added)
-
trunk/ost-bridge.php (modified) (2 diffs)
-
trunk/osticket-wp.php (modified) (1 diff)
-
trunk/readme.txt (modified) (1 diff)
-
trunk/templates/contact_ticket.php (modified) (7 diffs)
-
trunk/templates/list_tickets.php (modified) (5 diffs)
-
trunk/templates/nav_bar.php (modified) (1 diff)
-
trunk/templates/new_ticket.php (modified) (2 diffs)
-
trunk/templates/view_ticket.php (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
-
key4ce-osticket-bridge/trunk/admin/admin_create_ticket.php
r1121801 r1226493 4 4 require_once( WP_PLUGIN_DIR . '/key4ce-osticket-bridge/includes/functions.php'); 5 5 $dept_opt = $ost_wpdb->get_results("SELECT dept_name,dept_id FROM $dept_table where ispublic=1"); 6 wp_enqueue_script('ost-bridge-validate',plugins_url('../js/validate.js', __FILE__));6 $topic_opt = $ost_wpdb->get_results("SELECT topic,topic_id FROM $topic_table where ispublic=1 and isactive=1"); 7 7 8 8 // Start File system changes … … 97 97 var addDiv = j('#addinput'); 98 98 var i = j('#addinput p').size() + 1; 99 var MaxFileInputs = <?php echo $ agent_max_file_size; ?>;99 var MaxFileInputs = <?php echo $max_user_file_uploads; ?>; 100 100 j('#addNew').live('click', function() { 101 101 if (i <= MaxFileInputs) … … 195 195 .usertype{color: #000;float: left;font-weight: normal;margin-top: 8px;width: 175px;} 196 196 </style> 197 <?php 198 wp_enqueue_script('ost-bridge-validate',plugins_url('../js/validate.js', __FILE__)); 199 ?> 197 200 <div id="key4ce_thContainer"> 198 201 <div id="key4ce_new_ticket"> … … 201 204 <div id="new_ticket_text2"><?php echo __("Please fill in the form below to open a new ticket. All fields mark with [<font color=red>*</font>] <em>Are Required!", 'key4ce-osticket-bridge'); ?></em></div> 202 205 <div style="clear: both"></div> 203 <form id="key4ce_ticketForm" name="newticket" method="post" enctype="multipart/form-data" onsubmit="return validateFormNewTicket();"> 204 205 <input type="hidden" name="usid" value="<?php //echo $user_id; ?>"/> 206 <form id="key4ce_ticketForm" name="newticket" method="post" enctype="multipart/form-data" onsubmit="return validateAdminFormNewTicket();"> 207 <input type="hidden" name="usid" value="<?php //echo $user_id; ?>"/> 206 208 <input type="hidden" name="ademail" value="<?php //echo $os_admin_email; ?>"/> 207 <input type="hidden" name=" stitle" value="<?php //echo $title_name; ?>"/>209 <input type="hidden" name="user_subject" value="<?php echo $adminnewticket_subject; ?>"/> 208 210 <input type="hidden" name="sdirna" value="<?php //echo $dirname; ?>"/> 209 <input type="hidden" name=" newtickettemp" value="<?php //echo $newticket; ?>"/>211 <input type="hidden" name="user_email_template" value="<?php echo $adminnewticket_text; ?>"/> 210 212 <div class="selectusertype"><?php echo __("Select User Type :", 'key4ce-osticket-bridge'); ?></div> 211 213 <div id="element"> … … 228 230 <div id="key4ce_new_ticket_catagory"><?php echo __("Catagories", 'key4ce-osticket-bridge'); ?>:</div> 229 231 <div id="key4ce_new_ticket_catagory_input"> 230 <select id="deptId" name="deptId" >232 <select id="deptId" name="deptId" > 231 233 <option value="" selected="selected"><?php echo __("Select a Category", 'key4ce-osticket-bridge'); ?></option> 232 234 <?php … … 235 237 } 236 238 ?> 237 </select><font class="error"> *</font></div> 239 </select><font class="error"> *</font> 240 </div> 241 <div style="clear: both"></div> 242 <div id="key4ce_new_ticket_helptopic"><?php echo __("Help Topic", 'key4ce-osticket-bridge'); ?>:</div> 243 <div id="key4ce_new_ticket_helptopic_input"> 244 <select id="topicId" name="topicId" style="width: 155px;"> 245 <option value="" selected="selected"><?php echo __("Select a Help Topic", 'key4ce-osticket-bridge'); ?></option> 246 <?php 247 foreach ($topic_opt as $topic) { 248 echo '<option value="' . $topic->topic_id . '">' . $topic->topic . '</option>'; 249 } 250 ?> 251 </select><font class="error"> *</font> 252 </div> 238 253 <div style="clear: both"></div> 239 254 <div id="key4ce_new_ticket_priority"><?php echo __("Priority", 'key4ce-osticket-bridge'); ?>:</div> -
key4ce-osticket-bridge/trunk/admin/adminticketmail.php
r1121801 r1226493 2 2 /* 3 3 Template Name: adminticketemail.php 4 */ 5 require_once( WP_PLUGIN_DIR . '/key4ce-osticket-bridge/includes/functions.php'); 4 */require_once( WP_PLUGIN_DIR . '/key4ce-osticket-bridge/includes/functions.php'); 6 5 ?> 7 6 <?php … … 311 310 312 311 //Added By Pratik Maniar On 14-06-2014 Code End Here To Avoid Auto generate by Department Emails 313 $subject = "New Support Ticket"; 314 $usermessage = "Hello $nam ,<br />Your ticket has been created.<br /><br />"; 315 $usermessage.="Ticket ID #" . $ticketid . ""; 316 $usermessage.="<br />----------------------<br />"; 317 $usermessage.="Email: " . $usermail . "<br />"; 318 $usermessage.="Priority: " . $priordesc . "<br />"; 319 $usermessage.="Department: " . $dept_name . "<br />"; 320 $usermessage.="Subject: " . $sub . "<br />"; 321 $usermessage.="<br />----------------------<br />"; 322 $usermessage.="Message: " . $user_message . ""; 323 $usermessage.="<br />----------------------<br /><br />"; 324 $usermessage.="To respond to the ticket, please login to the support ticket system."; 325 $usermessage.="<br /><br />"; 326 $usermessage.="" . site_url() . ""; 327 $usermessage.="<br />"; 328 $usermessage.="Your friendly Customer Support System "; 329 //Email Notification to Customer Added by Pratik Maniar on 10-09-2014 end Here 312 // $subject = "New Support Ticket"; 313 // $usermessage = "Hello $nam ,<br />Your ticket has been created.<br /><br />"; 314 // $usermessage.="Ticket ID #" . $ticketid . ""; 315 // $usermessage.="<br />----------------------<br />"; 316 // $usermessage.="Email: " . $usermail . "<br />"; 317 // $usermessage.="Priority: " . $priordesc . "<br />"; 318 // $usermessage.="Department: " . $dept_name . "<br />"; 319 //$usermessage.="Subject: " . $sub . "<br />"; 320 //$usermessage.="<br />----------------------<br />"; 321 // $usermessage.="Message: " . $user_message . ""; 322 //$usermessage.="<br />----------------------<br /><br />"; 323 //$usermessage.="To respond to the ticket, please login to the support ticket system."; 324 //$usermessage.="<br /><br />"; 325 //$usermessage.="" . site_url() . ""; 326 //$usermessage.="<br />"; 327 //$usermessage.="Your friendly Customer Support System "; //echo $adminnewticket_text; //exit; //Email Notification to Customer Added by Pratik Maniar on 10-09-2014 end Here 330 328 $dept_user_details = $ost_wpdb->get_row("SELECT $ost_email.name,$ost_email.email FROM $dept_table INNER JOIN $ost_email ON $dept_table.email_id=$ost_email.email_id WHERE $dept_table.dept_id=$dep_id"); 331 329 $dept_user_name = $dept_user_details->name; 332 $dept_user_email = $dept_user_details->email; 330 $dept_user_email = $dept_user_details->email;$user_email_subject=Format::stripslashes($_REQUEST['user_subject']);$ussubject=Format::stripslashes($_REQUEST['user_subject']);$user_email_template=Format::stripslashes($_REQUEST['user_email_template']);eval("\$user_email_template=\"$user_email_template\";"); 333 331 if($smtp_status=="enable") 334 332 $SMTPAuth="true"; … … 352 350 $phpmailer->FromName = "$dept_user_email"; 353 351 add_filter('wp_mail_content_type',create_function('', 'return "text/html"; ')); 354 $phpmailer->Subject =$ subject;355 $phpmailer->Body = key4ce_wpetss_forum_text($user message); //HTML Body352 $phpmailer->Subject =$user_email_subject; 353 $phpmailer->Body = key4ce_wpetss_forum_text($user_email_template); //HTML Body 356 354 $phpmailer->AltBody = "To view the message, please use an HTML compatible email viewer!"; // optional, comment out and test 357 $phpmailer->MsgHTML('<div style="display: none;">-- do not reply below this line -- <br/><br/></div>' . $user message);355 $phpmailer->MsgHTML('<div style="display: none;">-- do not reply below this line -- <br/><br/></div>' . $user_email_template); 358 356 $phpmailer->AddAddress($to); 359 357 $phpmailer->Send(); … … 365 363 $phpmailer->addReplyTo($dept_user_email, $dept_user_name); 366 364 add_filter('wp_mail_content_type',create_function('', 'return "text/html"; ')); 367 $phpmailer->Subject = $ subject;368 $phpmailer->Body = key4ce_wpetss_forum_text($user message);369 $phpmailer->MsgHTML('<div style="display: none;">-- do not reply below this line -- <br/><br/></div>' . $user message);365 $phpmailer->Subject = $user_email_subject; 366 $phpmailer->Body = key4ce_wpetss_forum_text($user_email_template); 367 $phpmailer->MsgHTML('<div style="display: none;">-- do not reply below this line -- <br/><br/></div>' . $user_email_template); 370 368 $phpmailer->AltBody = 'This is a plain-text message body'; 371 369 $phpmailer->AddAddress($wp_user_email_id); -
key4ce-osticket-bridge/trunk/admin/db-settings.php
r1119633 r1226493 5 5 global $wpdb; 6 6 $ostemail = $wpdb->prefix . "ost_emailtemp"; 7 $adminreply=$wpdb->get_row("SELECT id,name,subject,$ostemail.text,created,updated FROM $ostemail where name = 'Admin-Response'"); 7 $adminreply=$wpdb->get_row("SELECT id,name,$ostemail.subject,$ostemail.text,created,updated FROM $ostemail where name = 'Admin-Response'"); 8 $form_admintreply_subject=$adminreply->subject; 8 9 $adminreply=$adminreply->text; 9 10 $arname='Admin-Response'; … … 12 13 $postsubmail=$postsubmail->subject; 13 14 14 $newticket=$wpdb->get_row("SELECT id,name, subject,$ostemail.text,created,updated FROM $ostemail where name = 'New-Ticket'");15 $newticket=$wpdb->get_row("SELECT id,name,$ostemail.subject,$ostemail.text,created,updated FROM $ostemail where name = 'New-Ticket'"); $form_newticket_subject=$newticket->subject; 15 16 $newticket=$newticket->text; 16 17 $ntname='New-Ticket'; 17 18 18 19 $postconfirm=$wpdb->get_row("SELECT id,name,$ostemail.subject,$ostemail.text,created,updated FROM $ostemail where name = 'Post-Confirmation'"); 20 $form_postconfirmed_subject=$postconfirm->subject; 19 21 $postconfirm=$postconfirm->text; 20 22 $pcname='Post-Confirmation'; … … 23 25 $poconsubmail=$poconsubmail->subject; 24 26 27 //Admin Create Ticket Template Start Here 28 $ostemail = $wpdb->prefix . "ost_emailtemp"; 29 $adminnewticket = $wpdb->get_row("SELECT id,name,$ostemail.subject,$ostemail.text,created,updated FROM $ostemail where name = 'Admin-New-Ticket'"); 30 $adminnewticket_text = $adminnewticket->text; 31 $adminnewticket_subject = $adminnewticket->subject; 32 $antname='Admin-New-Ticket'; 33 //Admin Create Ticket Template End Here 25 34 # ============================================================================================== 26 35 # Open os_ticket_config in wp_options so we can connect to osTicket v1.9+ … … 252 261 if($keyost_version==194 || $keyost_version==195 || $keyost_version==1951) 253 262 { 254 $ticketinfo=$ost_wpdb->get_row("SELECT $t hread_table.poster,$ticket_table.user_id,$ticket_table.number,$ticket_table.created,$ticket_table.ticket_id,$ticket_table.isanswered,$ost_user.name,$dept_table.dept_name,$ost_ticket_status.state as status,$ticket_cdata.priority,$ticket_cdata.subject,$ost_useremail.address FROM $ticket_table263 $ticketinfo=$ost_wpdb->get_row("SELECT $topic_table.topic,$thread_table.poster,$ticket_table.user_id,$ticket_table.number,$ticket_table.created,$ticket_table.ticket_id,$ticket_table.isanswered,$ost_user.name,$dept_table.dept_name,$ost_ticket_status.state as status,$ticket_cdata.priority,$ticket_cdata.subject,$ost_useremail.address FROM $ticket_table 255 264 INNER JOIN $dept_table ON $dept_table.dept_id=$ticket_table.dept_id 256 265 INNER JOIN $ost_user ON $ost_user.id=$ticket_table.user_id … … 258 267 INNER JOIN $ost_useremail ON $ost_useremail.user_id=$ticket_table.user_id 259 268 INNER JOIN $ost_ticket_status ON $ost_ticket_status.id = $ticket_table.status_id 269 LEFT JOIN $topic_table ON $topic_table.topic_id=$ticket_table.topic_id 260 270 LEFT JOIN $ticket_cdata on $ticket_cdata.ticket_id = $ticket_table.ticket_id WHERE `number` ='$ticket'"); 261 271 } 262 272 else{ 263 $ticketinfo=$ost_wpdb->get_row("SELECT $t icket_table.user_id,$ticket_table.number,$ticket_table.created,$ticket_table.ticket_id,$ticket_table.status,$ticket_table.isanswered,$ost_user.name,$dept_table.dept_name,$ticket_cdata.priority,$ticket_cdata.priority_id,$ticket_cdata.subject,$ost_useremail.address FROM $ticket_table INNER JOIN $dept_table ON $dept_table.dept_id=$ticket_table.dept_id INNER JOIN $ost_user ON $ost_user.id=$ticket_table.user_id INNER JOIN $ost_useremail ON $ost_useremail.user_id=$ticket_table.user_id LEFT JOIN $ticket_cdata on $ticket_cdata.ticket_id = $ticket_table.ticket_id WHERE `number` ='$ticket'");273 $ticketinfo=$ost_wpdb->get_row("SELECT $topic_table.topic,$ticket_table.user_id,$ticket_table.number,$ticket_table.created,$ticket_table.ticket_id,$ticket_table.status,$ticket_table.isanswered,$ost_user.name,$dept_table.dept_name,$ticket_cdata.priority,$ticket_cdata.priority_id,$ticket_cdata.subject,$ost_useremail.address FROM $ticket_table INNER JOIN $dept_table ON $dept_table.dept_id=$ticket_table.dept_id LEFT JOIN $topic_table ON $topic_table.topic_id=$ticket_table.topic_id INNER JOIN $ost_user ON $ost_user.id=$ticket_table.user_id INNER JOIN $ost_useremail ON $ost_useremail.user_id=$ticket_table.user_id LEFT JOIN $ticket_cdata on $ticket_cdata.ticket_id = $ticket_table.ticket_id WHERE `number` ='$ticket'"); 264 274 } 265 275 $threadinfo=$ost_wpdb->get_results(" … … 297 307 if($keyost_version==194 || $keyost_version==195 || $keyost_version==1951) 298 308 { 299 $sql="SELECT $t icket_table.user_id,$ticket_table.number,$ticket_table.created, $ticket_table.updated, $ticket_table.ticket_id,$ticket_table.isanswered,$ticket_cdata.subject,$ticket_cdata.priority, $dept_table.dept_name309 $sql="SELECT $topic_table.topic,$ticket_table.user_id,$ticket_table.number,$ticket_table.created, $ticket_table.updated, $ticket_table.ticket_id,$ticket_table.isanswered,$ticket_cdata.subject,$ticket_cdata.priority, $dept_table.dept_name 300 310 FROM $ticket_table 301 311 LEFT JOIN $ticket_cdata ON $ticket_cdata.ticket_id = $ticket_table.ticket_id 302 312 INNER JOIN $dept_table ON $dept_table.dept_id=$ticket_table.dept_id 313 LEFT JOIN $topic_table ON $topic_table.topic_id=$ticket_table.topic_id 303 314 INNER JOIN $ost_ticket_status ON $ost_ticket_status.id = $ticket_table.status_id"; 304 315 } 305 316 else 306 317 { 307 $sql="SELECT $t icket_table.user_id,$ticket_table.number,$ticket_table.created, $ticket_table.updated, $ticket_table.ticket_id, $ticket_table.status,$ticket_table.isanswered,$ticket_cdata.subject,$ticket_cdata.priority_id, $dept_table.dept_name318 $sql="SELECT $topic_table.topic,$ticket_table.user_id,$ticket_table.number,$ticket_table.created, $ticket_table.updated, $ticket_table.ticket_id, $ticket_table.status,$ticket_table.isanswered,$ticket_cdata.subject,$ticket_cdata.priority_id, $dept_table.dept_name 308 319 FROM $ticket_table 309 320 LEFT JOIN $ticket_cdata ON $ticket_cdata.ticket_id = $ticket_table.ticket_id 321 LEFT JOIN $topic_table ON $topic_table.topic_id=$ticket_table.topic_id 310 322 INNER JOIN $dept_table ON $dept_table.dept_id=$ticket_table.dept_id"; 311 323 } … … 439 451 if(isset($_REQUEST['ost-admin-reply'])) { 440 452 $form_admintreply=Format::stripslashes($_POST['form_admintreply']); 453 $form_admintreply_subject=@Format::stripslashes($_POST['form_admintreply_subject']); 441 454 $etdate=date("Y-m-d, g:i:s"); 442 $wpdb->update($ostemail, array(' text'=>$form_admintreply,'updated'=>$etdate), array('name'=>$arname), array('%s'));455 $wpdb->update($ostemail, array('subject'=>$form_admintreply_subject,'text'=>$form_admintreply,'updated'=>$etdate), array('name'=>$arname), array('%s')); 443 456 ?> 444 457 <p align="center"><i><?php echo __("Stand by while your", 'key4ce-osticket-bridge'); ?><font color="key4ce_green"><b><?php echo __("Admin Response Email", 'key4ce-osticket-bridge'); ?></b></font><?php echo __("is being updated...", 'key4ce-osticket-bridge'); ?></i><br /><center><script language="javascript" src="<?php echo plugin_dir_url(__FILE__).'../js/adminTB-email.js';?>"></script></center></p> … … 451 464 if(isset($_REQUEST['ost-new-ticket'])) { 452 465 $form_newticket=@Format::stripslashes($_POST['form_newticket']); 466 $form_newticket_subject=@Format::stripslashes($_POST['form_newticket_subject']); 453 467 $etdate=date("Y-m-d, g:i:s"); 454 $wpdb->update($ostemail, array(' text'=>$form_newticket,'updated'=>$etdate), array('name'=>$ntname), array('%s'));468 $wpdb->update($ostemail, array('subject'=>$form_newticket_subject,'text'=>$form_newticket,'updated'=>$etdate), array('name'=>$ntname), array('%s')); 455 469 ?> 456 470 <p align="center"><i><?php echo __("Stand by while your", 'key4ce-osticket-bridge'); ?><font color="key4ce_green"><b><?php echo __("New Ticket Email", 'key4ce-osticket-bridge'); ?></b></font><?php echo __("is being updated...", 'key4ce-osticket-bridge'); ?></i><br /><center><script language="javascript" src="<?php echo plugin_dir_url(__FILE__).'../js/adminTB-email.js';?>"></script></center></p> … … 463 477 if(isset($_REQUEST['ost-post-confirmed'])) { 464 478 $form_postconfirmed=Format::stripslashes($_POST['form_postconfirmed']); 479 $form_postconfirmed_subject=Format::stripslashes($_POST['form_postconfirmed_subject']); 465 480 $etdate=date("Y-m-d, g:i:s"); 466 $wpdb->update($ostemail, array(' text'=>$form_postconfirmed,'updated'=>$etdate), array('name'=>$pcname), array('%s'));481 $wpdb->update($ostemail, array('subject'=>$form_postconfirmed_subject,'text'=>$form_postconfirmed,'updated'=>$etdate), array('name'=>$pcname), array('%s')); 467 482 ?> 468 483 <p align="center"><i><?php echo __("Stand by while your", 'key4ce-osticket-bridge'); ?><font color="key4ce_green"><b><?php echo __("User Post Confirmation Email", 'key4ce-osticket-bridge'); ?></b></font><?php echo __("is being updated...", 'key4ce-osticket-bridge'); ?></i><br /><center><script language="javascript" src="<?php echo plugin_dir_url(__FILE__).'../js/adminTB-email.js';?>"></script></center></p> 469 484 <?php } ?> 485 <?php 486 # ============================================================================================== 487 # Admin New Ticket Email Template - sent to user w/message included - used in ost-emailtemp 488 # ============================================================================================== 489 require_once( WP_PLUGIN_DIR . '/key4ce-osticket-bridge/includes/functions.php' ); 490 if(isset($_REQUEST['ost-admin-new-ticket'])) { 491 $form_adminnewticket=@Format::stripslashes($_POST['form_adminnewticket']); 492 $form_adminnewticket_subject=@Format::stripslashes($_POST['form_adminnewticket_subject']); 493 $etdate=date("Y-m-d, g:i:s"); 494 $wpdb->update($ostemail, array('subject'=>$form_adminnewticket_subject,'text'=>$form_adminnewticket,'updated'=>$etdate), array('name'=>$antname), array('%s')); 495 ?> 496 <p align="center"><i><?php echo __("Stand by while your", 'key4ce-osticket-bridge'); ?><font color="key4ce_green"><b><?php echo __("Admin Create Ticket Email", 'key4ce-osticket-bridge'); ?></b></font><?php echo __("is being updated...", 'key4ce-osticket-bridge'); ?></i><br /><center><script language="javascript" src="<?php echo plugin_dir_url(__FILE__).'../js/adminTB-email.js';?>"></script></center></p> 497 <?php } ?> -
key4ce-osticket-bridge/trunk/admin/header_nav.php
r1119633 r1226493 22 22 <?php 23 23 if($parurl=="page=ost-tickets") { 24 if (($newticket=="") || ($adminreply=="") || ($postconfirm=="") )24 if (($newticket=="") || ($adminreply=="") || ($postconfirm=="") || ($adminnewticket=="")) 25 25 { 26 26 echo '<div id="warning"><b>Warning:</b>'.__('1 or more of your email templates is not setup', 'key4ce-osticket-bridge').' » <a href="admin.php?page=ost-emailtemp">'.__('Click Here', 'key4ce-osticket-bridge').'</a></div>'; -
key4ce-osticket-bridge/trunk/admin/header_nav_ticket.php
r1119633 r1226493 5 5 ?> 6 6 <?php 7 $time_format=key4ce_getKeyValue('time_format'); 8 $date_format=key4ce_getKeyValue('date_format'); 9 $datetime_format=key4ce_getKeyValue('datetime_format'); 7 10 echo '<link rel="stylesheet" type="text/css" media="all" href="'.plugin_dir_url(__FILE__).'../css/stylesheet.css">'; 8 11 $parurl=$_SERVER['QUERY_STRING']; … … 38 41 <?php 39 42 if($parurl=="page=ost-tickets") { 40 if (($newticket=="") || ($adminreply=="") || ($postconfirm=="") )43 if (($newticket=="") || ($adminreply=="") || ($postconfirm=="") || ($adminnewticket=="")) 41 44 { 42 45 echo '<div id="warning"><b>'.__("Warning:", 'key4ce-osticket-bridge').'</b>'.__("1 or more of your email templates is not setup", 'key4ce-osticket-bridge').' » <a href="admin.php?page=ost-emailtemp">'.__("Click Here", 'key4ce-osticket-bridge').'</a></div>'; -
key4ce-osticket-bridge/trunk/admin/ost-config.php
r1119633 r1226493 23 23 @$contactticketpage=$_REQUEST['contactticketpage']; 24 24 @$thankyoupage=$_REQUEST['thankyoupage']; 25 $config=array('host'=>$host, 'database'=>$database, 'username'=>$username,'password'=>$password,'keyost_prefix'=>$keyost_prefix,'keyost_version'=>$keyost_version,'keyost_usercloseticket'=>$keyost_usercloseticket,'supportpage'=>$supportpage,'contactticketpage'=>$contactticketpage,'thankyoupage'=>$thankyoupage); 25 @$googlesecretkey=$_REQUEST['googlesecretkey']; 26 @$googlesitekey=$_REQUEST['googlesitekey']; 27 $config=array('host'=>$host, 'database'=>$database, 'username'=>$username,'password'=>$password,'keyost_prefix'=>$keyost_prefix,'keyost_version'=>$keyost_version,'keyost_usercloseticket'=>$keyost_usercloseticket,'supportpage'=>$supportpage,'contactticketpage'=>$contactticketpage,'thankyoupage'=>$thankyoupage,'googlesecretkey'=>$googlesecretkey,'googlesitekey'=>$googlesitekey); 26 28 if (($_REQUEST['host']=="") || ($_REQUEST['database']=="") || ($_REQUEST['username']=="") || ($_REQUEST['supportpage']=="") ) 27 29 { … … 199 201 </td> 200 202 </tr> 203 <tr> 204 <td class="key4ce_config_td"><label class="key4ce_config_label"><?php echo __("Google reCAPTCHA Secretkey:", 'key4ce-osticket-bridge'); ?></label></td> 205 <td><input type="text" name="googlesecretkey" id="googlesecretkey" size="40" value="<?php echo @$googlesecretkey;?>"/> <?php echo __("(Your Google reCAPTCHA Secretkey Goest Here)", 'key4ce-osticket-bridge'); ?></td> 206 </tr> 207 <tr> 208 <td class="key4ce_config_td"><label class="key4ce_config_label"><?php echo __("Google reCAPTCHA Sitekey:", 'key4ce-osticket-bridge'); ?></label></td> 209 <td><input type="text" name="googlesitekey" id="googlesitekey" size="40" value="<?php echo @$googlesitekey;?>"/> <?php echo __("(Your Google reCAPTCHA Sitekey Goest Here)", 'key4ce-osticket-bridge'); ?></td> 210 </tr> 201 211 </table> 202 212 <div style="padding: 30px;"> -
key4ce-osticket-bridge/trunk/admin/ost-emailtemp.php
r1119633 r1226493 4 4 */ 5 5 ?> 6 <style>.form_newticket_subject{ border: 2px solid #ccc !important;border-radius: 7px;width: 400px;}</style> 6 7 <?php require_once( WP_PLUGIN_DIR . '/key4ce-osticket-bridge/includes/udscript.php' ); ?> 7 8 <div class="key4ce_wrap"> … … 30 31 ?> 31 32 <!--New Ticket Email Template--> 32 <div style="padding-left:15px;padding-bottom:5px;padding-top:10px;"><b>*<?php echo __("New Ticket Email Template", 'key4ce-osticket-bridge'); ?></b> » <a href="javascript:doMenu('main2');" id="xmain2">[<?php echo __("Open", 'key4ce-osticket-bridge'); ?>]</a> <?php echo __("We suggest using this template in the user confirmation email below.", 'key4ce-osticket-bridge'); ?></div> 33 <div style="padding-left:15px;padding-bottom:5px;padding-top:10px;"><b>*<?php echo __("Admin Create Ticket Email Template", 'key4ce-osticket-bridge'); ?></b> » <a href="javascript:doMenu('main2');" id="xmain2">[<?php echo __("Open", 'key4ce-osticket-bridge'); ?>]</a> <?php echo __("We suggest using this template in the admin create ticket email below.", 'key4ce-osticket-bridge'); ?></div> 34 <div style="clear: both"></div> 35 <div id="main2" style="display: none;"> 36 <div id="key4ce_tboxgr" class="key4ce_pg1"> 37 Hello $username,<br /><br />Your Ticket ID #$ticketid has been created successfully.<br /> 38 Ticket ID # : $ticketid<br /> 39 <br />----------------------<br /> 40 Email: $usermail<br /> 41 Priority: $priordesc<br /> 42 Department: $dept_name<br /> 43 Subject: $ussubject<br /> 44 <br />----------------------<br /> 45 Message: $user_message<br /> 46 <br />----------------------<br /> 47 To respond to the ticket, please login to the support ticket system. 48 <br /><br /> 49 $siteurl 50 <br /> 51 Your friendly Customer Support System 52 </div> 53 </div> 54 <div style="clear: both"></div> 55 <div style="padding-left:15px;padding-bottom:2px;padding-top:10px;"><b>*<?php echo __("Admin Create Ticket Email", 'key4ce-osticket-bridge'); ?></b> » <a href="javascript:doMenu('main3');" id="xmain3">[<?php echo __("Close", 'key4ce-osticket-bridge'); ?>]</a></div> 56 <div style="clear: both"></div> 57 <div id="main3" style="display: block;"> 58 <form name="ost-admin-new-ticket" action="admin.php?page=ost-emailtemp" method="post"> 59 <div style="margin-bottom: 10px;"><label style="margin-left:22px; font-weight: bold;">Admin Create Ticket Email Template Subject : </label> 60 <input type="text" name="form_adminnewticket_subject" id="form_adminnewticket_subject" value="<?php echo $adminnewticket_subject = (empty($adminnewticket_subject)) ? '' :$adminnewticket_subject;?>" class="form_newticket_subject"></div> 61 <textarea name="form_adminnewticket" rows="18" id="emailtemp" value=""><?php echo $adminnewticket_text; ?></textarea> 62 <div style="clear: both"></div> 63 <div align="center"> 64 <input type="submit" name="ost-admin-new-ticket" class="key4ce_button-primary" value="<?php echo __("Save - Admin Create Ticket Email", 'key4ce-osticket-bridge'); ?>" /> 65 </div> 66 </form> 67 </div> 68 <!--New Ticket Email Template--> 69 <!--<div style="padding-left:15px;padding-bottom:5px;padding-top:10px;"><b>*<?php echo __("New Ticket Email Template", 'key4ce-osticket-bridge'); ?></b> » <a href="javascript:doMenu('main2');" id="xmain2">[<?php echo __("Open", 'key4ce-osticket-bridge'); ?>]</a> <?php echo __("We suggest using this template in the user confirmation email below.", 'key4ce-osticket-bridge'); ?></div> 33 70 <div style="clear: both"></div> 34 71 <div id="main2" style="display: none;"> … … 40 77 <div id="main3" style="display: block;"> 41 78 <form name="ost-new-ticket" action="admin.php?page=ost-emailtemp" method="post"> 79 <div style="margin-bottom: 10px;"><label style="margin-left:22px; font-weight: bold;">New Ticket Email Template Subject : </label><input type="text" name="form_newticket_subject" id="form_newticket_subject" value="<?php echo $form_newticket_subject = (empty($form_newticket_subject)) ? '' :$form_newticket_subject;?>" class="form_newticket_subject"></div> 42 80 <textarea name="form_newticket" rows="18" id="emailtemp" value=""><?php echo $newticket; ?></textarea> 43 81 <div style="clear: both"></div> … … 46 84 </div> 47 85 </form> 48 </div> 86 </div>--> 49 87 <!--Admin Ticket Reply Email Template--> 50 88 <div style="padding-left:15px;padding-bottom:5px;padding-top:40px;"><b>*<?php echo __("Admin Response Email Template", 'key4ce-osticket-bridge'); ?></b> » <a href="javascript:doMenu('main4');" id="xmain4">[<?php echo __("Open", 'key4ce-osticket-bridge'); ?>]</a> <?php echo __("We suggest using this template in your post reply to user below.", 'key4ce-osticket-bridge'); ?></div> … … 58 96 <div id="main5" style="display: block;"> 59 97 <form name="ost-admin-reply" action="admin.php?page=ost-emailtemp" method="post"> 98 <?php echo $form_admintreply_subject; ?> 99 <div style="margin-bottom: 10px;"><label style="margin-left:22px; font-weight: bold;">Admin Response Template Subject : </label><input type="text" name="form_admintreply_subject" id="form_admintreply_subject" value="<?php echo $form_admintreply_subject = (empty($form_admintreply_subject)) ? '' :$form_admintreply_subject;?>" class="form_newticket_subject"></div> 60 100 <textarea name="form_admintreply" rows="16" id="emailtemp" value=""><?php echo $adminreply; ?></textarea> 61 101 <div style="clear: both"></div> … … 77 117 <div id="main7" style="display: block;"> 78 118 <form name="ost-post-confirmed" action="admin.php?page=ost-emailtemp" method="post"> 119 <div style="margin-bottom: 10px;"><label style="margin-left:22px; font-weight: bold;">User Post Confirmation Template Subject : </label><input type="text" name="form_postconfirmed_subject" id="form_postconfirmed_subject" value="<?php echo $form_postconfirmed_subject = (empty($form_postconfirmed_subject)) ? '' :$form_postconfirmed_subject;?>" class="form_newticket_subject"></div> 79 120 <textarea name="form_postconfirmed" rows="18" id="emailtemp" value=""><?php echo $postconfirm; ?></textarea> 80 121 <div style="clear: both"></div> -
key4ce-osticket-bridge/trunk/admin/ost-postreplymail.php
r1121801 r1226493 8 8 INNER JOIN $ost_email ON $ost_email.email_id=$dept_table.email_id 9 9 WHERE `number`=$ticket_number"); 10 if($ticket_details.email_id==0) 11 { 12 $default_email_id=key4ce_getKeyValue('default_email_id'); 13 $ticket_dept_details=$ost_wpdb->get_row("SELECT email,name FROM `ost_email` WHERE `email_id` = $default_email_id"); 14 $ticket_detail_dept_name=$ticket_dept_details->name; 15 $ticket_detail_dept_email=$ticket_dept_details->email; 16 } 17 else 18 { 10 19 $ticket_detail_dept_name=$ticket_details->name; 11 20 $ticket_detail_dept_email=$ticket_details->email; 21 } 22 12 23 $signature=$ticket_details->dept_signature; 13 24 $department_id=$ticket_details->dept_id; … … 152 163 $SMTPAuth="true"; 153 164 else 154 $SMTPAuth="false"; 165 $SMTPAuth="false"; 155 166 require_once ABSPATH . WPINC . '/class-phpmailer.php'; 156 require_once ABSPATH . WPINC . '/class-smtp.php';157 167 $phpmailer = new PHPMailer(); 158 168 if($smtp_status=="enable") 159 169 { 160 $phpmailer = new PHPMailer();170 require_once ABSPATH . WPINC . '/class-smtp.php'; 161 171 $phpmailer->SMTPAuth =true; 162 172 $phpmailer->Username = $smtp_username; … … 169 179 $phpmailer->From = "$ticket_detail_dept_email"; 170 180 $phpmailer->FromName = "$ticket_detail_dept_name"; 181 $phpmailer->addReplyTo("$ticket_detail_dept_email", "$ticket_detail_dept_name"); 171 182 add_filter('wp_mail_content_type',create_function('', 'return "text/html"; ')); 172 183 $phpmailer->Subject =$subject; … … 180 191 { 181 192 $phpmailer->CharSet = 'UTF-8'; 182 $phpmailer->setFrom("$ticket_detail_dept_email", "$ticket_detail_dept_name"); 183 $phpmailer->addReplyTo("$ticket_detail_dept_email", "$ticket_detail_dept_name"); 193 $phpmailer->IsSendmail(); // telling the class to use SendMail transport 194 $phpmailer->AddReplyTo("$ticket_detail_dept_email","$ticket_detail_dept_name"); 195 $phpmailer->From = "$ticket_detail_dept_email"; 196 $phpmailer->FromName = "$ticket_detail_dept_name"; 197 //$phpmailer->SetFrom('$ticket_detail_dept_email', '$ticket_detail_dept_name'); 198 $phpmailer->AddAddress($to, $usname); 199 add_filter('wp_mail_content_type',create_function('', 'return "text/html"; ')); 200 $phpmailer->Subject =$subject; 201 $phpmailer->AltBody = "To view the message, please use an HTML compatible email viewer!"; // optional, comment out and test 202 $phpmailer->MsgHTML('<div style="display: none;">-- do not reply below this line -- <br/><br/></div>' . $message); 203 $phpmailer->Send(); 204 /* 205 $phpmailer->CharSet = 'UTF-8'; 206 $phpmailer->setFrom("$ticket_detail_dept_name", "$ticket_detail_dept_email"); 207 $phpmailer->addReplyTo("$ticket_detail_dept_name", "$ticket_detail_dept_email"); 184 208 $phpmailer->addAddress($to); 185 209 add_filter('wp_mail_content_type',create_function('', 'return "text/html"; ')); … … 188 212 $phpmailer->AltBody = 'This is a plain-text message body'; 189 213 $phpmailer->send(); 214 */ 190 215 } 191 216 ?> -
key4ce-osticket-bridge/trunk/admin/ost-tickets.php
r1119633 r1226493 2 2 require_once( WP_PLUGIN_DIR . '/key4ce-osticket-bridge/admin/db-settings.php' ); 3 3 require_once( WP_PLUGIN_DIR . '/key4ce-osticket-bridge/includes/functions.php' ); 4 $time_format=key4ce_getKeyValue('time_format'); 5 $date_format=key4ce_getKeyValue('date_format'); 6 $datetime_format=key4ce_getKeyValue('datetime_format'); 4 7 if(isset($_POST['delete'])) 5 8 { … … 71 74 } 72 75 } 76 function editThis(id) 77 { 78 location.href='admin.php?page=ost-tickets&service=view&ticket='+id; 79 } 80 81 $( document ).ready(function() { 82 $('#ui-id-7 td.noEdit').click(function(e){ 83 e.stopPropagation(); 84 }); 85 }); 86 87 88 73 89 </script> 90 <style> 91 .key4ce_table { 92 margin-bottom: 20px; 93 max-width: 100%; 94 width: 100%; 95 } 96 table { 97 background-color: transparent; 98 } 99 table { 100 border-collapse: collapse; 101 border-spacing: 0; 102 } 103 .key4ce_table > tbody > tr > td, .key4ce_table > tbody > tr > th, .key4ce_table > tfoot > tr > td, .key4ce_table > tfoot > tr > th, .key4ce_table > thead > tr > td, .key4ce_table > thead > tr > th { 104 border-bottom: 1px solid #ddd; 105 line-height: 1.42857; 106 padding: 2px; 107 } 108 th { 109 text-align: left; 110 color: #666; 111 font-family: arial; 112 font-weight: bold; 113 padding: 2px !important; 114 background-color: #dfdfdf; 115 line-height: 1.42857; 116 } 117 118 td, th { 119 padding: 0; 120 } 121 *::after, *::before { 122 box-sizing: border-box; 123 } 124 .key4ce_table > caption + thead > tr:first-child > td, .key4ce_table > caption + thead > tr:first-child > th, .key4ce_table > colgroup + thead > tr:first-child > td, .key4ce_table > colgroup + thead > tr:first-child > th, .key4ce_table > thead:first-child > tr:first-child > td, .key4ce_table > thead:first-child > tr:first-child > th { 125 border-top: 0 none; 126 } 127 .key4ce_table > thead > tr > th { 128 border-bottom: 2px solid #ddd; 129 height: 35px; 130 } 131 .key4ce_table > tbody > tr:hover { background-color: #f9f8f8; 132 cursor: pointer; } 133 .key4ce_ticketPriority { 134 border: 1px solid white; 135 border-radius: 10px; 136 color: white; 137 font-weight: bold; 138 padding: 5px; 139 } 140 </style> 74 141 <form name="ticketview" id="ticketview" method="post" onSubmit="if(!confirm('<?php echo __("Are you sure you want to continue?", 'key4ce-osticket-bridge'); ?>')){return false;}"> 75 142 <div class="key4ce_wrap"> … … 79 146 <div style="clear: both"></div> 80 147 <div align="center" style="padding-top:20px;"></div> 81 <div style="clear: both"></div> 82 <div class="key4ce_cofigmenu"> 83 <div id="key4ce_ticket_menu"> 84 <div id="key4ce_ticket_menu0" style="width: 16px;"><input type="checkbox" onchange="checkAll(this)" name="chk[]"></div> 85 <div id="key4ce_ticket_menu1"><?php echo __("Ticket #", 'key4ce-osticket-bridge'); ?></div> 86 <div id="key4ce_ticket_menu2"><?php echo __("Subject", 'key4ce-osticket-bridge'); ?></div> 87 <div id="key4ce_ticket_menu3"><?php echo __("Priority", 'key4ce-osticket-bridge'); ?></div> 88 <div id="key4ce_ticket_menu4"><?php echo __("Department", 'key4ce-osticket-bridge'); ?></div> 89 <div id="key4ce_ticket_menu5"><?php echo __("Date", 'key4ce-osticket-bridge'); ?></div> 90 </div> 148 <table class="key4ce_table"> 91 149 <?php 92 150 if($list_opt) 93 151 { 94 function ezDate($d) {152 function ezDate($d) { 95 153 $ts = time() - strtotime(str_replace("-","/",$d)); 96 154 if($ts>31536000) $val = round($ts/31536000,0).' year'; … … 104 162 return $val; 105 163 } 106 foreach($list_opt as $list)107 {108 if($list->updated=="0000-00-00 00:00:00")109 {110 $list_updated="-";111 }112 else{113 $list_updated=ucwords(ezDate($list->updated)).' Ago';114 }115 if ($list->subject=="") {116 @$sub_str=Format::stripslashes('Ticket subject not found');117 } else {118 @$sub_str=Format::stripslashes($list->subject); }119 echo "<div id='key4ce_ticket_list0'><input type='checkbox' name='tickets[]' value='".$list->ticket_id."'></div>";120 echo "<div id='key4ce_ticket_list' onclick=\"location.href='admin.php?page=ost-tickets&service=view&ticket=".$list->number."';\">";121 echo "<div id='key4ce_ticket_list1'><a href='admin.php?page=ost-tickets&service=view&ticket=".$list->number."'>".$list->number."</a></div>";122 echo "<div id='key4ce_ticket_list2'>".key4ce_truncate($sub_str,60,'...')."</div>123 <div id='key4ce_ticket_list3'>";124 if($keyost_version==194 || $keyost_version==195 || $keyost_version==1951)125 $priority=$list->priority;126 else127 $priority=$list->priority_id;128 if($priority=='4') {129 echo '<div class="key4ce_ticketPriority" style="background-color: Red;"><font color=white>'.__("Emergency", 'key4ce-osticket-bridge').'</font></div>';130 }131 elseif ($priority=='3') {132 echo '<div class="key4ce_ticketPriority" style="background-color: Orange;"><font color=white>'.__("High", 'key4ce-osticket-bridge').'</font></div>';133 }134 elseif ($priority=='2') {135 echo '<div class="key4ce_ticketPriority" style="background-color: Green;"><font color=white>'.__("Normal", 'key4ce-osticket-bridge').'</font></div>';136 }137 elseif ($priority=='') {138 echo '<div class="key4ce_ticketPriority" style="background-color: Green;"><font color=white>'.__("Normal", 'key4ce-osticket-bridge').'</font></div>';139 }140 elseif ($priority=='1') {141 echo '<div class="key4ce_ticketPriority" style="background-color: Black;"><font color=white>'.__("Low", 'key4ce-osticket-bridge').'</font></div>';142 }143 144 145 echo "</div><div id='key4ce_ticket_list4'>".$list->dept_name."</div>";146 147 if ($list->updated=='0000-00-00 00:00:00') {148 $date_str = "".$list->created.""; }149 else {150 $date_str = "".$list->updated.""; }151 echo "<div id='key4ce_ticket_list5'>";152 echo key4ce_truncate($date_str,10,'');153 echo "</div>";154 echo "<div style='clear: both; display: table-cell;'></div></div>";155 } }156 else157 {158 echo '</div><div style="display: table; width: 100%;"><div align="center" id="key4ce_no_tics" style="margin-top: 25px; text-align: center; font-size: 12pt; width: 100%; display:table-cell; float: left;"> <strong>'.__("No Records Found.", 'key4ce-osticket-bridge').'</strong></div>';159 }160 164 ?> 161 </div> 165 <thead> 166 <tr> 167 <th><input type="checkbox" onchange="checkAll(this)" name="chk[]"></th> 168 <th><?php echo __("Ticket #", 'key4ce-osticket-bridge'); ?></th> 169 <th><?php echo __("Subject", 'key4ce-osticket-bridge'); ?></th> 170 <th><?php echo __("Priority", 'key4ce-osticket-bridge'); ?></th> 171 <th><?php echo __("Department", 'key4ce-osticket-bridge'); ?></th> 172 <th><?php echo __("Help Topic", 'key4ce-osticket-bridge'); ?></th> 173 <th><?php echo __("Date", 'key4ce-osticket-bridge'); ?></th> 174 </tr> 175 </thead> 176 <tbody> 177 <?php 178 foreach($list_opt as $list) 179 { 180 if($list->updated=="0000-00-00 00:00:00") 181 { 182 $list_updated="-"; 183 } 184 else 185 { 186 $list_updated=ucwords(ezDate($list->updated)).' Ago'; 187 } 188 if ($list->subject=="") 189 { 190 @$sub_str=Format::stripslashes('Ticket subject not found'); 191 } 192 else 193 { 194 @$sub_str=Format::stripslashes($list->subject); 195 } 196 if($keyost_version==194 || $keyost_version==195 || $keyost_version==1951) 197 $priority=$list->priority; 198 else 199 $priority=$list->priority_id; 200 if($priority==4) 201 $color="red"; 202 elseif($priority==3) 203 $color="orange"; 204 elseif($priority==2 || $priority=="") 205 $color="green"; 206 elseif($priority==1) 207 $color="black"; 208 ?> 209 <tr id="ui-id-7" onclick="editThis(<?php echo $list->number; ?>);"> 210 <td class="noEdit"><input type='checkbox' name='tickets[]' value=<?php echo $list->ticket_id; ?>></td> 211 <td><?php echo $list->number; ?></td> 212 <td><?php echo key4ce_truncate($sub_str,60,'...'); ?></td> 213 <td> 214 <?php 215 if($priority==4) 216 { 217 ?> 218 <div class="key4ce_ticketPriority" style="background-color:red;"><?php echo __("Emergency", 'key4ce-osticket-bridge'); ?></div> 219 <?php 220 } 221 elseif($priority==3) 222 { 223 ?> 224 <div class="key4ce_ticketPriority" style="background-color:orange;"><?php echo __("High", 'key4ce-osticket-bridge'); ?></div> 225 <?php 226 } 227 elseif($priority==2 || $priority=="") 228 { 229 ?> 230 <div class="key4ce_ticketPriority" style="background-color:green;"><?php echo __("Normal", 'key4ce-osticket-bridge'); ?></div> 231 <?php 232 } 233 elseif($priority==1) 234 { 235 ?> 236 <div class="key4ce_ticketPriority" style="background-color:black;"><?php echo __("Low", 'key4ce-osticket-bridge'); ?></div> 237 <?php 238 } 239 ?> 240 </td> 241 <td><?php echo $list->dept_name; ?></td> 242 <td><?php echo $list->topic; ?></td> 243 <td> 244 <?php 245 if ($list->updated=='0000-00-00 00:00:00') 246 { 247 $date_str = "".$list->created.""; 248 } 249 else 250 { 251 $date_str = "".$list->updated.""; 252 } 253 echo date($datetime_format,strtotime($date_str)); 254 ?> 255 </td> 256 </span> 257 </tr> 258 <?php 259 } 260 ?> 261 </tbody> 262 <?php 263 } 264 else 265 { 266 echo "No Records Found"; 267 } 268 ?> 269 </table> 162 270 <div align="center" style="padding-top:15px;"></div> 163 271 <div style="clear: both"></div> -
key4ce-osticket-bridge/trunk/admin/ost-ticketview.php
r1121801 r1226493 1 1 <?php 2 2 require_once( WP_PLUGIN_DIR . '/key4ce-osticket-bridge/includes/functions.php' ); 3 $time_format=key4ce_getKeyValue('time_format'); 4 $date_format=key4ce_getKeyValue('date_format'); 5 $datetime_format=key4ce_getKeyValue('datetime_format'); 3 6 // Start File system changes 4 7 if($keyost_version==193) … … 34 37 var addDiv = $('#addinput'); 35 38 var i = $('#addinput p').size() + 1; 36 var MaxFileInputs = <?php echo key4ce_getKeyValue('max_staff_file_uploads'); ?>;39 var MaxFileInputs = <?php echo $max_user_file_uploads; ?>; 37 40 $('#addNew').live('click', function() { 38 41 if (i <= MaxFileInputs) … … 68 71 var FileSizeMB = (FileSize / 10485760).toFixed(2); 69 72 var FileExts = new Array(<?php echo $extimp; ?>); 70 if ((FileSize > <?php echo key4ce_getKeyValue('max_file_size'); ?>))73 if ((FileSize > <?php echo $max_file_size; ?>)) 71 74 { 72 75 alert("<?php echo __("Please make sure your file is less than", 'key4ce-osticket-bridge'); ?><?php echo ($max_file_size * .0009765625) * .0009765625; ?>MB."); … … 101 104 </div> 102 105 <div id="key4ce_tic_info_box"> 103 <table>106 <table> 104 107 <tr> 105 108 <td><b><?php echo __("Ticket Status", 'key4ce-osticket-bridge'); ?>:</b></td> … … 126 129 <tr> 127 130 <td><b><?php echo __("Date Create", 'key4ce-osticket-bridge'); ?>:</b></td> 128 <td><div><?php echo $ticketinfo->created; ?></div></td>131 <td><div><?php echo date($datetime_format,strtotime($ticketinfo->created)); ?></div></td> 129 132 <td><b><?php echo __("Priority", 'key4ce-osticket-bridge'); ?>:</b></td> 130 133 <td> … … 149 152 </td> 150 153 </tr> 154 <tr> 155 <td><b><?php echo __("Help Topic", 'key4ce-osticket-bridge'); ?>:</b></td> 156 <td><div><?php echo $ticketinfo->topic; ?></div></td> 157 </tr> 151 158 </table> 152 159 </div> … … 169 176 <tbody> 170 177 <tr> 171 <th><?php echo $thread_info->created; ?><span><?php echo $thread_info->poster; //if($hidename==1) { echo $thread_info->poster; } ?></span></th>178 <th><?php echo date($datetime_format,strtotime($thread_info->created)); ?><span><?php echo $thread_info->poster; //if($hidename==1) { echo $thread_info->poster; } ?></span></th> 172 179 </tr> 173 180 <tr> … … 217 224 <input type="hidden" name="usemail" value="<?php echo $ticketinfo->address; ?>"/> 218 225 <input type="hidden" name="usdepartment" value="<?php echo $ticketinfo->dept_name; ?>"/> 219 <input type="hidden" name="uscategories" value="<?php echo $ticketinfo->topic; ?>"/> 220 <input type="hidden" name="ussubject" value="<?php echo $ ticketinfo->subject; ?>"/>226 <input type="hidden" name="uscategories" value="<?php echo $ticketinfo->topic; ?>"/> <?php if($form_admintreply_subject!="") $admin_reply_subject=$form_admintreply_subject; else $admin_reply_subject=$ticketinfo->subject; ?> 227 <input type="hidden" name="ussubject" value="<?php echo $admin_reply_subject; ?>"/> 221 228 <input type="hidden" name="ustopicid" value="<?php //echo $ticketinfo->topic_id; ?>"/> 222 229 <input type="hidden" name="ademail" value="<?php echo $os_admin_email; ?>"/> … … 242 249 <div id="addinput"> 243 250 <p> 244 <span style="color:#000;"><?php echo __("Attachment 1:", 'key4ce-osticket-bridge'); ?></span> <input type="file" id="p_new" name="file[]" onchange="return checkFile(this);"/> <a href="#" id="addNew"><?php echo __("Add", 'key4ce-osticket-bridge'); ?></a> <span style="color: red;font-size: 11px;"><?php echo __("Max file upload size :", 'key4ce-osticket-bridge'); ?><?php echo ( key4ce_getKeyValue('max_file_size')* .0009765625) * .0009765625; ?>MB</span>251 <span style="color:#000;"><?php echo __("Attachment 1:", 'key4ce-osticket-bridge'); ?></span> <input type="file" id="p_new" name="file[]" onchange="return checkFile(this);"/> <a href="#" id="addNew"><?php echo __("Add", 'key4ce-osticket-bridge'); ?></a> <span style="color: red;font-size: 11px;"><?php echo __("Max file upload size :", 'key4ce-osticket-bridge'); ?><?php echo ($max_file_size * .0009765625) * .0009765625; ?>MB</span> 245 252 </p> 246 253 </div> -
key4ce-osticket-bridge/trunk/css/admin-style.css
r1119633 r1226493 142 142 #key4ce_ticket_menu1 { 143 143 display: table-cell; 144 width: 10%;144 width: 8%; 145 145 margin: 10px 0px 10px 15px; 146 146 padding: 10px; … … 152 152 display: table-cell; 153 153 margin: 10px 0px 10px 0px; 154 width: 63%; 155 padding: 10px; 154 width: 51%; 155 padding-bottom: 10px; 156 padding-right: 10px; 157 padding-top: 10px; 158 padding-left: 0px; 156 159 border-top:2px solid #d6d5d5; 157 160 border-bottom:1px solid #d6d5d5; … … 162 165 width: 10%; 163 166 margin: 10px 0px 10px 0px; 164 padding: 10px; 167 /*padding: 10px;*/ 168 padding-left: 5px; 165 169 border-top:2px solid #d6d5d5; 166 170 border-bottom:1px solid #d6d5d5; … … 170 174 width: 10%; 171 175 margin: 10px 0px 10px 0px; 172 padding: 10px;176 /*padding: 10px;*/ 173 177 border-top:2px solid #d6d5d5; 174 178 border-bottom:1px solid #d6d5d5; … … 228 232 padding: 10px; 229 233 border-bottom:1px solid #e0e0e0; 230 width: 63%;234 width: 50%; 231 235 } 232 236 #key4ce_ticket_list3 { … … 236 240 } 237 241 #key4ce_ticket_list4 { 238 width: 150px;239 display: table-cell; 240 padding: 10px; 242 width: 295px; 243 display: table-cell; 244 padding: 10px; text-align: center; 241 245 border-bottom:1px solid #e0e0e0; 242 246 } 243 247 #key4ce_ticket_list5 { 244 width: 100px;248 width: 335px; 245 249 display: table-cell; 246 250 padding: 10px; … … 479 483 float: left; 480 484 } 485 486 #key4ce_new_ticket_helptopic { 487 padding-top:15px; 488 font-weight: normal; 489 color: #000; 490 width: 15%; 491 float: left; 492 } 493 #key4ce_new_ticket_helptopic_input { 494 padding-top:12px; 495 width: 75%; 496 float: left; 497 } 498 481 499 #key4ce_new_ticket_priority { 482 500 padding-top:10px; … … 492 510 } 493 511 .key4ce_error { 512 color: #FF0000; 513 } 514 .error { 494 515 color: #FF0000; 495 516 } -
key4ce-osticket-bridge/trunk/css/style.css
r1119633 r1226493 264 264 font-family: arial; 265 265 } 266 #key4ce_ticket_menu0 { 267 display: table-cell; 268 margin: 10px 0px 10px 15px; 269 padding: 10px; 270 border-top:2px solid #d6d5d5; 271 border-bottom:1px solid #d6d5d5; 272 } 266 273 267 274 #key4ce_ticket_menu1 { 268 275 display: table-cell; 269 width: 10%;270 276 margin: 10px 0px 10px 15px; 271 277 padding: 10px; 272 278 border-top:2px solid #d6d5d5; 273 279 border-bottom:1px solid #d6d5d5; 274 280 width:10%; 275 281 } 276 282 #key4ce_ticket_menu2 { … … 281 287 border-top:2px solid #d6d5d5; 282 288 border-bottom:1px solid #d6d5d5; 283 289 width:45%; 284 290 } 285 291 #key4ce_ticket_menu3 { 286 292 display: table-cell; 287 width: 150px;288 293 margin: 10px 0px 10px 0px; 289 294 padding: 10px; 290 295 border-top:2px solid #d6d5d5; 291 296 border-bottom:1px solid #d6d5d5; 297 width:10%; 292 298 } 293 299 #key4ce_ticket_menu4 { 294 300 display: table-cell; 295 width: 150px;296 301 margin: 10px 0px 10px 0px; 297 302 padding: 10px; 298 303 border-top:2px solid #d6d5d5; 299 304 border-bottom:1px solid #d6d5d5; 300 305 width:10%; 301 306 } 302 307 #key4ce_ticket_menu5 { 303 308 display: table-cell; 304 width: 100px;305 309 margin: 10px 0px 10px 0px; 306 310 padding: 10px; 307 311 border-top:2px solid #d6d5d5; 308 312 border-bottom:1px solid #d6d5d5; 309 313 width:10%; 314 } 315 #key4ce_ticket_menu6 { 316 display: table-cell; 317 margin: 10px 0px 10px 0px; 318 padding: 10px; 319 border-top:2px solid #d6d5d5; 320 border-bottom:1px solid #d6d5d5; 321 width:15%; 310 322 } 311 323 #key4ce_ticket_list:nth-child(odd) { … … 324 336 font-family: arial; 325 337 } 326 338 #key4ce_ticket_list0 339 { 340 border-bottom:1px solid #e0e0e0; 341 display: table-cell; 342 margin: 10px 0px 10px 15px; 343 padding: 10px; 344 } 327 345 #key4ce_ticket_list1 { 328 width: 10 0px;346 width: 10%; 329 347 padding: 10px; 330 348 display: table-cell; … … 342 360 display: table-cell; 343 361 padding: 10px; 344 border-bottom:1px solid #e0e0e0; 362 border-bottom:1px solid #e0e0e0; 363 width: 45%; 345 364 } 346 365 #key4ce_ticket_list3 { 347 width: 1 50px;366 width: 10%; 348 367 display: table-cell; 349 368 padding: 10px; … … 352 371 } 353 372 #key4ce_ticket_list4 { 354 width: 1 50px;373 width: 10%; 355 374 display: table-cell; 356 375 padding: 10px; … … 358 377 } 359 378 #key4ce_ticket_list5 { 360 width: 100px; 379 width: 10%; 380 display: table-cell; 381 padding: 10px; 382 border-bottom:1px solid #e0e0e0; 383 } 384 #key4ce_ticket_list6 { 385 width: 15%; 361 386 display: table-cell; 362 387 padding: 10px; … … 649 674 color: #FF0000; 650 675 } 676 .error { 677 color: #FF0000; 678 } 651 679 #key4ce_msg_notice { 652 680 margin: 20px 20px 20px 20px; … … 678 706 border: 1px solid #a00; 679 707 background: url('../images/error.png') 10px 50% no-repeat #fff0f0; 680 } 708 }#key4ce_new_ticket_helptopic { padding-top:15px; font-weight: normal; color: #000; width: 15%; float: left;}#key4ce_new_ticket_helptopic_input { padding-top:12px; width: 75%; float: left;} 709 #key4ce_tic_topic { 710 font-weight: bold; 711 width: 18%; 712 float: left; 713 padding-top: 5px; 714 } 715 #key4ce_tic_help_topic { 716 font-weight: normal; 717 width: 35%; 718 float: left; 719 padding-top: 5px; 720 } 721 -
key4ce-osticket-bridge/trunk/includes/contactticketmail.php
r1126426 r1226493 51 51 $prid = $ost_wpdb->get_row("SELECT priority_desc FROM $priority_table WHERE priority_id=$pri_id"); 52 52 $priordesc = "Normal"; 53 if (isset($_REQUEST['create-contact-ticket']) && isset($_REQUEST["magicword"]) && $_REQUEST["magicword"] != "" && strtolower($_SESSION ["captcha"]["code"])==strtolower($_REQUEST["magicword"])) { 53 $secret = $googlesecretkey; 54 $siteKey=$googlesitekey; 55 if(isset($_POST['g-recaptcha-response'])) 56 { 57 $captcha=$_POST['g-recaptcha-response']; 58 $response=json_decode(file_get_contents("https://www.google.com/recaptcha/api/siteverify?secret=".$secret."&response=".$captcha."&remoteip=".$_SERVER['REMOTE_ADDR']), true); 59 } 60 if (isset($_REQUEST['create-contact-ticket']) && $response['success']==true) { 54 61 // Added by Pratik Maniar on 29-04-2014 Start Here 55 62 $dept_details = $ost_wpdb->get_row("SELECT dept_id,dept_name FROM $dept_table WHERE dept_id=$dep_id"); -
key4ce-osticket-bridge/trunk/includes/database.php
r1126426 r1226493 7 7 global $wpdb; 8 8 $ostemail = $wpdb->prefix . "ost_emailtemp"; 9 $adminreply=$wpdb->get_row("SELECT id,name, subject,$ostemail.text,created,updated FROM $ostemail where name = 'Admin-Response'");9 $adminreply=$wpdb->get_row("SELECT id,name,$ostemail.subject,$ostemail.text,created,updated FROM $ostemail where name = 'Admin-Response'"); 10 10 $adminreply=$adminreply->text; 11 $form_admintreply_subject=$adminreply->subject; 11 12 $arname='Admin-Response'; 12 13 13 14 $postsubmail=$wpdb->get_row("SELECT id,name,$ostemail.subject,text,created,updated FROM $ostemail where name = 'Admin-Response'"); 14 $postsubmail=$postsubmail-> subject;15 $postsubmail=$postsubmail->text; 15 16 16 $newticket=$wpdb->get_row("SELECT id,name,$ostemail.subject,$ostemail.text,created,updated FROM $ostemail where name = 'New-Ticket'"); 17 $newticket=$wpdb->get_row("SELECT id,name,$ostemail.subject,$ostemail.text,created,updated FROM $ostemail where name = 'New-Ticket'"); $form_newticket_subject=$newticket->subject; 17 18 $newticket=$newticket->text; 18 19 $ntname='New-Ticket'; … … 39 40 $ost_useremail = $keyost_prefix . "user_email"; 40 41 $ost_ticket_attachment = $keyost_prefix . "ticket_attachment"; 41 $ost_ticket_status=$keyost_prefix."ticket_status"; 42 42 $ost_ticket_status=$keyost_prefix."ticket_status"; 43 43 $ost_file = $keyost_prefix . "file"; 44 44 if($keyost_version==194 || $keyost_version==195 || $keyost_version==1951) … … 61 61 if(isset($ticket)) 62 62 { 63 $ticketinfo=$ost_wpdb->get_row("SELECT $t icket_table.user_id,$ost_ticket_status.state as status,$ticket_table.number,$ticket_table.created,$ticket_table.ticket_id,$ticket_table.isanswered,$ost_user.name,$dept_table.dept_name,$ticket_cdata.priority,$ticket_cdata.subject,$ost_useremail.address FROM $ticket_table INNER JOIN $dept_table ON $dept_table.dept_id=$ticket_table.dept_id INNER JOIN $ost_user ON $ost_user.id=$ticket_table.user_id INNER JOIN $ost_ticket_status ON $ost_ticket_status.id=$ticket_table.status_id INNER JOIN $ost_useremail ON $ost_useremail.user_id=$ticket_table.user_id LEFT JOIN $ticket_cdata on $ticket_cdata.ticket_id = $ticket_table.ticket_id WHERE `number` ='$ticket'");63 $ticketinfo=$ost_wpdb->get_row("SELECT $topic_table.topic,$ticket_table.user_id,$ost_ticket_status.state as status,$ticket_table.number,$ticket_table.created,$ticket_table.ticket_id,$ticket_table.isanswered,$ost_user.name,$dept_table.dept_name,$ticket_cdata.priority,$ticket_cdata.subject,$ost_useremail.address FROM $ticket_table INNER JOIN $dept_table ON $dept_table.dept_id=$ticket_table.dept_id LEFT JOIN $topic_table ON $topic_table.topic_id=$ticket_table.topic_id INNER JOIN $ost_user ON $ost_user.id=$ticket_table.user_id INNER JOIN $ost_ticket_status ON $ost_ticket_status.id=$ticket_table.status_id INNER JOIN $ost_useremail ON $ost_useremail.user_id=$ticket_table.user_id LEFT JOIN $ticket_cdata on $ticket_cdata.ticket_id = $ticket_table.ticket_id WHERE `number` ='$ticket'"); 64 64 } 65 65 } … … 110 110 { 111 111 $sql=""; 112 $sql="SELECT $ ost_ticket_status.state as status,$ticket_table.user_id,$ticket_table.number,$ticket_table.created, $ticket_table.updated, $ticket_table.ticket_id,$ticket_table.isanswered,$ticket_cdata.subject,$ticket_cdata.priority, $dept_table.dept_name112 $sql="SELECT $topic_table.topic,$ost_ticket_status.state as status,$ticket_table.user_id,$ticket_table.number,$ticket_table.created, $ticket_table.updated, $ticket_table.ticket_id,$ticket_table.isanswered,$ticket_cdata.subject,$ticket_cdata.priority, $dept_table.dept_name 113 113 FROM $ticket_table 114 114 LEFT JOIN $ticket_cdata ON $ticket_cdata.ticket_id = $ticket_table.ticket_id 115 115 INNER JOIN $dept_table ON $dept_table.dept_id = $ticket_table.dept_id 116 LEFT JOIN $topic_table ON $topic_table.topic_id=$ticket_table.topic_id 116 117 INNER JOIN $ost_ticket_status ON $ost_ticket_status.id=$ticket_table.status_id 117 118 WHERE $ticket_table.user_id =$user_id"; … … 120 121 { 121 122 $sql=""; 122 $sql="SELECT $t icket_table.user_id,$ticket_table.number,$ticket_table.created, $ticket_table.updated, $ticket_table.ticket_id, $ticket_table.status,$ticket_table.isanswered,$ticket_cdata.subject,$ticket_cdata.priority_id, $dept_table.dept_name123 $sql="SELECT $topic_table.topic,$ticket_table.user_id,$ticket_table.number,$ticket_table.created, $ticket_table.updated, $ticket_table.ticket_id, $ticket_table.status,$ticket_table.isanswered,$ticket_cdata.subject,$ticket_cdata.priority_id, $dept_table.dept_name 123 124 FROM $ticket_table 124 125 LEFT JOIN $ticket_cdata ON $ticket_cdata.ticket_id = $ticket_table.ticket_id 126 LEFT JOIN $topic_table ON $topic_table.topic_id=$ticket_table.topic_id 125 127 INNER JOIN $dept_table ON $dept_table.dept_id = $ticket_table.dept_id WHERE $ticket_table.user_id =$user_id"; 126 128 } -
key4ce-osticket-bridge/trunk/includes/versionData.php
r1119633 r1226493 1 1 <?php 2 $topic_opt = $ost_wpdb->get_results("SELECT topic_id, dept_id, topic FROM $topic_table");2 $topic_opt = $ost_wpdb->get_results("SELECT topic_id,topic FROM $topic_table where ispublic=1 and isactive=1 ORDER BY `sort` ASC "); 3 3 $pri_opt = $ost_wpdb->get_results("SELECT priority_desc,priority_id FROM $priority_table"); 4 4 $dept_opt = $ost_wpdb->get_results("SELECT dept_name,dept_id FROM $dept_table where ispublic=1"); -
key4ce-osticket-bridge/trunk/js/validate.js
r1119633 r1226493 1 function validateFormNewTicket() 2 { 3 var x=document.forms["newticket"]["cur-name"].value; 4 if (x==null || x=="") 5 { 6 alert("Please enter your name!"); 7 return false; 8 } 9 var x=document.forms["newticket"]["subject"].value; 10 if (x==null || x=="") 11 { 12 alert("Please enter a subject!"); 13 return false; 14 } 15 var x=document.forms["newticket"]["deptId"].value; 16 if (x==null || x=="") 17 { 18 alert("Please select a category!"); 19 return false; 20 } 21 var x=document.forms["newticket"]["priorityId"].value; 22 if (x==null || x=="") 23 { 24 alert("Please select a priority level!"); 25 return false; 26 } 27 var editorContent = tinyMCE.get('message').getContent(); 28 if (editorContent == '' || editorContent==null) 29 { 30 alert("Message field cannot be empty!"); 31 return false; 32 } 33 } 34 function validateFormReply() 35 { 36 var editorContent = tinyMCE.get('message').getContent(); 37 if (editorContent == '' || editorContent==null) 38 { 39 alert("Message field cannot be empty!"); 40 return false; 41 } 42 } 43 44 function validateFormSearch() 45 { 46 var x=document.forms["search"]["tq"].value; 47 if (x==null || x=="") 48 { 49 alert("Search field cannot be empty!"); 50 return false; 51 } 52 } 53 54 function validateFormLogin() 55 { 56 var x=document.forms["login"]["user_login"].value; 57 if (x==null || x=="") 58 { 59 alert("Username field cannot be empty!"); 60 return false; 61 } 62 var x=document.forms["login"]["user_pass"].value; 63 if (x==null || x=="") 64 { 65 alert("Password field cannot be empty!"); 66 return false; 67 } 68 } 69 70 function validateFormRegister() 71 { 72 var x=document.forms["user_new"]["user_login"].value; 73 if (x==null || x=="") 74 { 75 alert("Username field cannot be empty!"); 76 return false; 77 } 78 var x=document.forms["user_new"]["user_email"].value; 79 var atpos=x.indexOf("@"); 80 var dotpos=x.lastIndexOf("."); 81 if (atpos<1 || dotpos<atpos+2 || dotpos+2>=x.length) 82 { 83 alert("Not a valid email address!"); 84 return false; 85 } 86 } 87 88 function validateFormForgot() 89 { 90 var x=document.forms["lostpasswordform"]["user_login"].value; 91 if (x==null || x=="") 92 { 93 alert("Username/Email field cannot be empty!"); 94 return false; 95 } 96 } 97 function validateFormContactTicket() 98 { 99 var x=document.forms["contactticket"]["cur-name"].value; 100 if (x==null || x=="") 101 { 102 alert("Please enter your name!"); 103 return false; 104 } 105 var x=document.forms["contactticket"]["email"].value; 106 if (x==null || x=="") 107 { 108 alert("Please enter a email!"); 109 return false; 110 } 111 if(x!="") 112 { 113 var atpos=x.indexOf("@"); 114 var dotpos=x.lastIndexOf("."); 115 if (atpos<1 || dotpos<atpos+2 || dotpos+2>=x.length) 116 { 117 alert("Please enter valid email address!"); 118 return false; 119 } 120 } 121 var x=document.forms["contactticket"]["subject"].value; 122 if (x==null || x=="") 123 { 124 alert("Please enter a subject!"); 125 return false; 126 } 127 128 var x=document.forms["contactticket"]["deptId"].value; 129 if (x==null || x=="") 130 { 131 alert("Please select a category!"); 132 return false; 133 } 134 var x=document.forms["contactticket"]["priorityId"].value; 135 if (x==null || x=="") 136 { 137 alert("Please select a priority level!"); 138 return false; 139 } 140 var editorContent = tinyMCE.get('message').getContent(); 141 if (editorContent == '' || editorContent==null) 142 { 143 alert("Message field cannot be empty!"); 144 return false; 145 } 146 } 1 function validateFormNewTicket(){var x=document.forms["newticket"]["cur-name"].value;if (x==null || x=="") { alert("Please enter your name!"); return false; }var x=document.forms["newticket"]["subject"].value;if (x==null || x=="") { alert("Please enter a subject!"); return false; }var x=document.forms["newticket"]["deptId"].value;if (x==null || x=="") { alert("Please select a category!"); return false; } var x=document.forms["newticket"]["topicId"].value;if (x==null || x=="") { alert("Please select a help topic!"); return false; }var x=document.forms["newticket"]["priorityId"].value;if (x==null || x=="") { alert("Please select a priority level!"); return false; } var editorContent = tinyMCE.get('message').getContent(); if (editorContent == '' || editorContent==null) { alert("Message field cannot be empty!"); return false; } }function validateFormReply(){var editorContent = tinyMCE.get('message').getContent(); if (editorContent == '' || editorContent==null) { alert("Message field cannot be empty!"); return false; }}function validateFormSearch(){var x=document.forms["search"]["tq"].value;if (x==null || x=="") { alert("Search field cannot be empty!"); return false; }}function validateFormLogin(){var x=document.forms["login"]["user_login"].value;if (x==null || x=="") { alert("Username field cannot be empty!"); return false; }var x=document.forms["login"]["user_pass"].value;if (x==null || x=="") { alert("Password field cannot be empty!"); return false; }}function validateFormRegister(){var x=document.forms["user_new"]["user_login"].value;if (x==null || x=="") { alert("Username field cannot be empty!"); return false; }var x=document.forms["user_new"]["user_email"].value;var atpos=x.indexOf("@");var dotpos=x.lastIndexOf(".");if (atpos<1 || dotpos<atpos+2 || dotpos+2>=x.length) { alert("Not a valid email address!"); return false; }}function validateFormForgot(){var x=document.forms["lostpasswordform"]["user_login"].value;if (x==null || x=="") { alert("Username/Email field cannot be empty!"); return false; }}function validateFormContactTicket(){var x=document.forms["contactticket"]["cur-name"].value;if (x==null || x=="") { alert("Please enter your name!"); return false; }var x=document.forms["contactticket"]["email"].value;if (x==null || x=="") { alert("Please enter a email!"); return false; }if(x!=""){var atpos=x.indexOf("@");var dotpos=x.lastIndexOf(".");if (atpos<1 || dotpos<atpos+2 || dotpos+2>=x.length) { alert("Please enter valid email address!"); return false; }}var x=document.forms["contactticket"]["subject"].value;if (x==null || x=="") { alert("Please enter a subject!"); return false; }var x=document.forms["contactticket"]["deptId"].value;if (x==null || x=="") { alert("Please select a category!"); return false; }var x=document.forms["contactticket"]["priorityId"].value;if (x==null || x=="") { alert("Please select a priority level!"); return false; } var editorContent = tinyMCE.get('message').getContent(); if (editorContent == '' || editorContent==null) { alert("Message field cannot be empty!"); return false; } }function validateAdminFormNewTicket(){var x=document.forms["newticket"]["subject"].value;if (x==null || x=="") { alert("Please enter a subject!"); return false; }var x=document.forms["newticket"]["deptId"].value;if (x==null || x=="") { alert("Please select a category!"); return false; } var x=document.forms["newticket"]["topicId"].value;if (x==null || x=="") { alert("Please select a help topic!"); return false; }var x=document.forms["newticket"]["priorityId"].value;if (x==null || x=="") { alert("Please select a priority level!"); return false; } var editorContent = tinyMCE.get('message').getContent(); if (editorContent == '' || editorContent==null) { alert("Message field cannot be empty!"); return false; } }function validateFormReply(){var editorContent = tinyMCE.get('message').getContent(); if (editorContent == '' || editorContent==null) { alert("Message field cannot be empty!"); return false; }}function validateFormSearch(){var x=document.forms["search"]["tq"].value;if (x==null || x=="") { alert("Search field cannot be empty!"); return false; }}function validateFormLogin(){var x=document.forms["login"]["user_login"].value;if (x==null || x=="") { alert("Username field cannot be empty!"); return false; }var x=document.forms["login"]["user_pass"].value;if (x==null || x=="") { alert("Password field cannot be empty!"); return false; }}function validateFormRegister(){var x=document.forms["user_new"]["user_login"].value;if (x==null || x=="") { alert("Username field cannot be empty!"); return false; }var x=document.forms["user_new"]["user_email"].value;var atpos=x.indexOf("@");var dotpos=x.lastIndexOf(".");if (atpos<1 || dotpos<atpos+2 || dotpos+2>=x.length) { alert("Not a valid email address!"); return false; }}function validateFormForgot(){var x=document.forms["lostpasswordform"]["user_login"].value;if (x==null || x=="") { alert("Username/Email field cannot be empty!"); return false; }}function validateFormContactTicket(){var x=document.forms["contactticket"]["cur-name"].value;if (x==null || x=="") { alert("Please enter your name!"); return false; }var x=document.forms["contactticket"]["email"].value;if (x==null || x=="") { alert("Please enter a email!"); return false; }if(x!=""){var atpos=x.indexOf("@");var dotpos=x.lastIndexOf(".");if (atpos<1 || dotpos<atpos+2 || dotpos+2>=x.length) { alert("Please enter valid email address!"); return false; }}var x=document.forms["contactticket"]["subject"].value;if (x==null || x=="") { alert("Please enter a subject!"); return false; }var x=document.forms["contactticket"]["deptId"].value;if (x==null || x=="") { alert("Please select a category!"); return false; }var x=document.forms["contactticket"]["priorityId"].value;if (x==null || x=="") { alert("Please select a priority level!"); return false; } var editorContent = tinyMCE.get('message').getContent(); if (editorContent == '' || editorContent==null) { alert("Message field cannot be empty!"); return false; } } -
key4ce-osticket-bridge/trunk/ost-bridge.php
r1126426 r1226493 3 3 Plugin Name: Key4ce osTicket Bridge 4 4 Plugin URI: https://key4ce.com/projects/key4ce-osticket-bridge 5 Description: Integrate osTicket (v1.9.3 - 1.9. 6) into wordpress. including user integration and scp6 Version: 1. 2.95 Description: Integrate osTicket (v1.9.3 - 1.9.11) into wordpress. including user integration and scp 6 Version: 1.3.0 7 7 Author: Key4ce 8 8 Author URI: https://key4ce.com … … 286 286 'created' => current_time('mysql'), 287 287 'updated' => current_time('mysql') 288 ) ); 288 ) ); 289 $id = '4'; 290 $name = "Admin-New-Ticket"; 291 $subject = "Ticket ID [#\$ticketid]"; 292 $text = ""; 293 $rows_affected = $wpdb->insert( 294 $table_name, array( 295 'id' => $id, 296 'name' => $name, 297 'subject' => $subject, 298 'text' => $text, 299 'created' => current_time('mysql'), 300 'updated' => current_time('mysql') 301 )); 289 302 // } 290 303 } -
key4ce-osticket-bridge/trunk/osticket-wp.php
r1126426 r1226493 25 25 $poconsubmail = $wpdb->get_row("SELECT id,name,$ostemail.subject,text,created,updated FROM $ostemail where name = 'Post-Confirmation'"); 26 26 $poconsubmail = $poconsubmail->subject; 27 27 //Admin Create Ticket Template Start Here 28 $ostemail = $wpdb->prefix . "ost_emailtemp"; 29 $adminnewticket = $wpdb->get_row("SELECT id,name,$ostemail.subject,$ostemail.text,created,updated FROM $ostemail where name = 'Admin-New-Ticket'"); 30 $adminnewticket_text = $adminnewticket->text; 31 $adminnewticket_subject = $adminnewticket->subject; 32 //Admin Create Ticket Template End Here 28 33 $ost_wpdb = new wpdb($username, $password, $database, $host); 29 34 global $current_user; -
key4ce-osticket-bridge/trunk/readme.txt
r1149912 r1226493 1 1 === Key4ce osTicket Bridge === 2 2 3 Contributors: key4ce, m.tiggelaar 4 3 5 Tags: helpdesk, support, ticket, osticket, bridge, email, email ticket system 6 4 7 Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=paypal%40key4ce%2ecom 8 5 9 Requires at least: 3.5 10 6 11 Tested up to: 4.2 7 Stable tag: 1.2.9 12 13 Stable tag: 1.3.0 14 8 15 License: GPLv3 16 9 17 License URI: http://www.gnu.org/licenses/gpl-3.0.html 10 Get your own advanced ticket system in Wordpress and Integrate osTicket into your wordpress site. Works with osTicket 1.9.3 - 1.9.7 18 19 Get your own advanced ticket system in Wordpress and Integrate osTicket into your wordpress site. Works with osTicket 1.9.3 - 1.9.11 20 21 11 22 12 23 == Description == 24 13 25 This is a rebuild of the original OSTicket WP Bridge plugin 26 14 27 Because the original plugin was no longer developed we decided to make a new plugin out of it. 28 15 29 adding new features, fixing old bugs and security flaws. 16 30 31 32 17 33 = Basic Features: = 18 * Compatible with osTicket 1.9.3 - 1.9.7 34 35 * Compatible with osTicket 1.9.3 - 1.9.11 36 19 37 * POP / IMAP functionality stays intact 38 20 39 * You can use both osTicket scp, reply to email OR use Wordpress for all tickets 40 21 41 * Integrates with your Wordpress users 42 22 43 * Good work-flow of Open, Answered and Closed tickets. 44 23 45 * Contact form shortcode 46 24 47 * Multiple file attachments 48 25 49 * HTML Email templates. 50 26 51 * Admin and Department signatures from osTicket. 52 27 53 * Create ticket as Admin. 54 28 55 * Multi-language support 29 56 57 58 30 59 = Features scheduled for next release: = 31 - Add Topic functionality to create tickets. 60 32 61 - Ticket user linked to WP / Woo Commerce users. 33 - osTicket based user and global time settings. 62 - Improved Contact page shortcode 63 - Support for view ticket without login. 64 65 66 34 67 35 68 = Translations available = 69 36 70 * English 71 37 72 * Dutch 73 38 74 * Arabic - by mbnoimi 75 39 76 * German - by Adrian Oeschger 77 40 78 * If you would like to contribute your own language please don't hesitate to contact us! 41 79 80 81 42 82 = If you like this plugin please leave a good review behind and help us to promote it. = 83 43 84 This plugin is powered by Key4ce - IT Professionals :: https://key4ce.com 44 85 86 87 45 88 == Installation == 46 89 90 91 47 92 = Prerequisites: = 93 48 94 * Make sure that osTicket is installed 49 * Make sure that your osTicket version is 1.9.3, 1.9.4 1.9.5, 1.9.6 or 1.9.7 (all subversions should work). 95 96 * Make sure that your osTicket version is 1.9.3, 1.9.4 1.9.5, 1.9.6, 1.9.8, 1.9.9, 1.9.10 or 1.9.11(all subversions should work). 97 50 98 * osTicket can be downloaded from http://osticket.com/download 99 51 100 * For Attachments to work with the Key4ce osTicket Bridge plugin, please download and configure the osTicket plugin: Storage :: Attachments on the Filesystem 101 52 102 * osTicket Storage :: Attachments on the Filesystem plugin can be downloaded here: http://osticket.com/download/go?dl=plugin%2Fstorage-fs.phar 53 * Our plugin will make use of Department alert & Email settings. Please set them carefully in osTicket settings. 103 104 * Our plugin will make use of Department, help topic alert & Email settings. Please set them carefully in osTicket settings. 105 54 106 * Create a Contact Ticket Page. This is the page the plugin will modify and AUTOMATICALLY insert the [addoscontact] shortcode which will display a contact form which allows guests to submit tickets 107 55 108 * Create a Thank You Page for all ticket submissions 56 109 110 * Make sure the email template subject matches your osticket email subjects. 111 112 * Fill in google's re-captcha code for contact page 113 114 115 57 116 = Shortcodes: = 117 58 118 [addosticket] Ticket listing and creation of tickets for logged in customers/clients (see Screenshots tab). 119 59 120 [addoscontact] Guest ticket submission form with CAPTCHA (a WordPress user login is not required to submit a ticket - see Screenshots tab). 121 60 122 [addosopenticketcount] Display the amount of open tickets for the logged in user anywhere in wordpress. 61 123 124 125 62 126 = Install Instructions: = 127 63 128 1. Install key4ce-osticket-bridge folder to the /wp-content/plugins/ directory. 129 64 130 2. Activate the plugin through the "Plugins" menu in WordPress. 131 65 132 3. osTicket Bridge plugin settings are located in Dashboard--> Tickets --> osT-Config (DO NOT name your "Landing Page Name" the same name as the folder you have osTicket installed). 133 66 134 4. osTicket DB configuration settings are located in Dashboard--> Tickets --> Settings 135 67 136 5. Email template settings are located in Dashboard--> Tickets--> Email Templates 68 137 138 6. Add a contact page and a thank you page for [addoscontact] 139 140 7. Set the landing page (ticket list + create ticket page) 141 142 8. Set the contact page and Contact thank you page 143 144 9. Set googles re-captcha keys for the contact page (can be found at: https://www.google.com/recaptcha/admin#list) 145 146 147 69 148 = IMPORTANT NOTE: = 149 70 150 You CANNOT use the shortcode: [addosticket] and [addoscontact] on more than one page. Please make sure you select the corresponding pages you applied the shortcodes to in the osTicket Bridge plugin settings (located in Dashboard--> Tickets --> osT-Config). 71 151 152 153 72 154 == Frequently Asked Questions == 73 155 156 157 74 158 = Where does the osTicket need to be Installed? = 159 75 160 Can be anywhere, just make sure you know it's Database settings and fill them in accordingly in osT-Config page. 76 161 162 163 77 164 = What version of osTicket can i use? = 78 osTicket v1.9.3 to v1.9.7 (all subversions are generally supported). 165 166 osTicket v1.9.3 to v1.9.11 (all subversions are generally supported). 167 168 79 169 80 170 = Where can I download the tested osTicket versions? = 171 81 172 http://osticket.com/download 82 173 174 175 83 176 == Screenshots == 84 177 178 179 85 180 1. Shows the Client ticket list. 181 86 182 2. Shows how the client views the ticket. 183 87 184 3. Shows how the Wordpress admin views the ticket list. 185 88 186 4. Shows how the Wordpress admin views the 187 89 188 5. Shows the [addoscontact] shortcode forms 189 90 190 6. HTML Email template example (with signature). 91 191 192 193 92 194 == Changelog == 195 196 = 1.3.0 = 197 - Help topics added 198 - Time synced from osticket 199 - osticket 1.9.11 compatible 200 - Email template subjects added to email templates 201 - Google re-captcha added to contact page 202 - Redesigned the tables for responsive grid. 203 93 204 = 1.2.9 = 205 94 206 - Added additional File attachment functionality to ignore empty extensions 207 95 208 - Fixed up queries for shortcode/ forum contact page 96 209 210 211 97 212 = 1.2.8 = 213 98 214 - Added support for 1.9.5.1 and 1.9.6 215 99 216 - fixed Attachment support for higher versions 100 217 218 219 101 220 = 1.2.7 = 221 102 222 - Functions all have prefixes to avoid conflicts with other plugins 223 103 224 - Multi language support added 104 225 226 227 105 228 = 1.2.6 = 229 106 230 - Fixes for 1.9.4 fresh installation 231 107 232 - Email customer reply fix 108 233 234 235 109 236 = 1.2.5 = 237 110 238 - osticket 1.9.4 support added 239 111 240 - added osticket version selection 112 241 242 243 113 244 = 1.2.4 = 245 114 246 - Open ticket count fixed 247 115 248 - Option to enable ticket close for client 249 116 250 - Client layout fixed 251 117 252 - Client main page fixed 253 118 254 - Small other changes in code. 119 255 256 257 120 258 = 1.2.3 = 259 121 260 - Admin can create tickets with auto search in WP Database. 261 122 262 - Mass close tickets on client ticket listing. 263 123 264 - Shortcode for viewing open tickets 265 124 266 - File attachment error in Admin fixed. 267 125 268 - Bugged users will now be automatically updated and fixed. 269 126 270 - contact form bug fixed. 127 271 272 273 128 274 = 1.2.2 = 275 129 276 - Multiple file attachments 277 130 278 - File attachment location from osTicket 279 131 280 - mysql query fix- contact form sender name and email fix. 281 132 282 - minor issues fixed.- updated installations (Contributed by: DivaVocals) 133 283 284 285 134 286 = 1.2.1 = 287 135 288 - Fixed infected javascript files. 136 289 290 291 137 292 = 1.2.0 = 293 138 294 - Single file Attachments 295 139 296 - File Attachement configuration based on OSticket(Filesize,File Type,File Attachement enable/disable) 297 140 298 - Corrected Admin ticket counting (Open,Closed,Answered,All) 299 141 300 - HTML Email Template 301 142 302 - Admin and Department Signature in Email template (based up on osTicket signature) 303 143 304 - Mass delete/ Close tickets from Admin ticket listing 305 144 306 - Fixed names in ticket thread 307 145 308 - Fixed time equal to osTicket settings. 309 146 310 - Tested with Wordpress 4.0 147 311 312 313 148 314 = 1.1.5 = 315 149 316 - Shortcode for Contact style form with captcha 317 150 318 - Shortcode placement fix for ticket list and ticket create 319 151 320 - CSS/ JS inclusion fix ** Submitted by Steffen Andre Langnes ** 321 152 322 - Login Redirect ** Submitted by Steffen Andre Langnes ** 153 323 324 325 154 326 = 1.1.4 = 327 155 328 - Prefix fix for existing plugin users 329 156 330 - mysql DB errors fixed- RevSlider conflict fixed 331 157 332 - Activate / Deactivate warning messages fixed. 333 158 334 - If wrong database info blank page issue fixed. 159 335 336 337 160 338 = 1.1.3 = 339 161 340 - Added database keyost_prefix field 341 162 342 - Fixed mysql bugs 343 163 344 - Fixed first time user issue. 345 164 346 - Headers already sent fixed. 347 165 348 - Creating multiple ticket pages on save has been resolved. 166 349 350 351 167 352 = 1.1.2 = 353 168 354 - Shows name in ticket threads. 355 169 356 - SMTP save field fix- Offline / Offline mode fix 357 170 358 - Cleaned up legacy code 171 359 360 361 172 362 = 1.1.1 = 363 173 364 - Shortcode redirect fix 365 174 366 - Login fields added 367 175 368 - Register link with redirect added 369 176 370 - Premalink related issues fixed 371 177 372 - Adding new users to OSticket fixed 373 178 374 - Form validation fixed 179 375 376 377 180 378 = 1.1 = 379 181 380 - Shortcode implementation 381 182 382 - Cleaned up code issues 383 183 384 - Admin Alert Email now looks into group members aswell 385 184 386 - implemented Reply Separator Tag- Fixed: Email From name 387 185 388 - Fixed: Many code warnings and errors in Debug mode- And much more.. 186 389 390 391 187 392 = 1.0 = 393 188 394 - New design for both Admin and Client end 395 189 396 - Uses OSTicket email address and name based up on the department 397 190 398 - Full HTML capable with rich text editor for both client and admin 399 191 400 - Admin side menu displays the amount of open tickets 401 192 402 - Displays "Open tickets" in the top admin menu when open tickets are available Displays "Support tickets" when no open ticket is available. 403 193 404 - Added Answered status to both admin and client side 405 194 406 - Security Fix: Client no longer able to see everyones ticket by entering the ticket id in the url. 407 195 408 - Fix: User/ priority/ status fields compatible with OSTicket 1.9 409 196 410 - Fix: Using department instead of Topic 411 197 412 - Fix: If not logged in to Wordpress it will redirect you to the Wordpress login (works with Theme my login plugin) 198 413 414 415 199 416 == Upgrade Notice == 417 418 = 1.3.0 = 419 Added help topic functionality, added email subjects to mail templates, google re-captcha to contact page, fixed time issue, and more.. 420 200 421 = 1.2.9 = 422 201 423 Added better attachment support and fixed up some queries for contact page. 202 424 425 426 203 427 = 1.2.8 = 428 204 429 Added support for 1.9.5.1 and 1.9.6 205 430 431 432 206 433 = 1.2.7 = 434 207 435 Added multi language support. 208 436 437 438 209 439 = 1.2.6 = 440 210 441 Added osticket 1.9.4 fresh installation support and small email customer reply bug. 211 442 443 444 212 445 = 1.2.5 = 446 213 447 Added osticket 1.9.4 support. 214 448 449 450 215 451 = 1.2.4 = 452 216 453 Option to enable or disable client close ticket feature, and small bug fixes. 217 454 455 456 218 457 = 1.2.3 = 458 219 459 Several minor bug fixes, new Admin create ticket functionality, and more.. 220 460 461 462 221 463 = 1.2.2 = 464 222 465 Multiple file atachment now possible, and small bug fixes have been made. 223 466 467 468 224 469 = 1.2.1 = 470 225 471 Emergency update: Javascripts where infected please update asap. Our apologies for the inconvenience 226 472 473 474 227 475 = 1.2.0 = 476 228 477 Multiple new and convenient features, Attachments, signatures and more. 229 478 479 480 230 481 = 1.1.5 = 482 231 483 Shortcode fixes, css/js inclusion fixes, new Contact style shortcode 232 484 485 486 233 487 = 1.1.4 = 488 234 489 Urgent update fixing multiple issues caused by update 1.1.3. 235 490 491 492 236 493 = 1.1.3 = 494 237 495 Database keyost_prefix field added, and mysql bugs fixed. 238 496 497 498 239 499 = 1.1.2 = 500 240 501 Minor update: Cleaned up legacy code and fixed:smtp fields and offline mode 241 502 503 504 242 505 = 1.1.1 = 506 243 507 Shortcode related issues fixed, osTicket user related issues fixed. 244 508 509 510 245 511 = 1.1 = 512 246 513 Shortcode implementation and many code fixes. 247 514 515 516 248 517 = 1.0 = 518 249 519 Initial version -
key4ce-osticket-bridge/trunk/templates/contact_ticket.php
r1119633 r1226493 20 20 require_once(WP_PLUGIN_DIR .'/key4ce-osticket-bridge/osticket-wp.php' ); 21 21 require_once( WP_PLUGIN_DIR . '/key4ce-osticket-bridge/templates/contact_nav_bar.php'); 22 require_once( WP_PLUGIN_DIR . '/key4ce-osticket-bridge/lib/captcha/simple-php-captcha.php'); 22 $secret = $googlesecretkey; 23 $siteKey=$googlesitekey; 23 24 $url = plugins_url(); 24 25 $default_email_id = $ost_wpdb->get_var("SELECT value FROM " . $keyost_prefix . "config WHERE `key` LIKE 'default_email_id'"); … … 30 31 #key4ce_message-html{height: 25px;} 31 32 #key4ce_message-tmce{height: 25px;} 33 .entry-content{max-width: 700px;} 32 34 </style> 33 35 <script language="javascript" src="<?php echo $url.'/key4ce-osticket-bridge/js/validate.js'; ?>"></script> 34 < div id="key4ce_thContainer">36 <script src='https://www.google.com/recaptcha/api.js'></script> 35 37 <?php 36 if(isset($_ REQUEST['create-contact-ticket']) && isset($_REQUEST["magicword"]) && $_REQUEST["magicword"]!="" && strtolower($_SESSION ["captcha"]["code"])==strtolower($_REQUEST["magicword"]))38 if(isset($_POST['g-recaptcha-response'])) 37 39 { 38 $_SESSION['captcha'] = simple_php_captcha(); 40 $captcha=$_POST['g-recaptcha-response']; 41 $response=json_decode(file_get_contents("https://www.google.com/recaptcha/api/siteverify?secret=".$secret."&response=".$captcha."&remoteip=".$_SERVER['REMOTE_ADDR']), true); 39 42 ?> 40 41 43 <div class="key4ce_clear" style="padding: 5px;"></div> 42 44 <p id="key4ce_msg_notice"><?php echo __('A new request has been created successfully!','key4ce-osticket-bridge'); ?></p> … … 50 52 </p> 51 53 <?php 52 } else { 53 $_SESSION['captcha'] = simple_php_captcha(); 54 if(isset($_REQUEST['magicword'])) 55 echo "<div style='color: red;font-weight: bold;'>Please enter valid captcha</div>"; 54 } 55 else 56 { 56 57 ?> 58 <form id="ContactticketForm" name="contactticket" method="post" enctype="multipart/form-data" onsubmit="return validateFormContactTicket();"> 59 <div id="key4ce_thContainer"> 57 60 <div id="key4ce_new_ticket"> 58 61 <div id="key4ce_new_ticket_text2"><?php echo __('Please fill in the form below to open a new ticket. All fields mark with [<font color=red>*</font>] <em>Are Required!','key4ce-osticket-bridge'); ?></em></div> 59 62 <div style="clear: both"></div> 60 <form id="ContactticketForm" name="contactticket" method="post" enctype="multipart/form-data" onsubmit="return validateFormContactTicket();">61 63 <input type="hidden" name="stitle" value="<?php echo $title_name; ?>"/> 62 64 <input type="hidden" name="sdirna" value="<?php echo $dirname; ?>"/> … … 79 81 ?> 80 82 </select><font class="error"> *</font></div> 81 83 <div style="clear: both"></div> 84 <!-- Help Topic Start Here --> 85 <div id="key4ce_new_ticket_helptopic"> 86 <?php echo __('Help Topic','key4ce-osticket-bridge'); ?>: 87 </div> 88 <div id="key4ce_new_ticket_helptopic_input"> 89 <select id="topicId" name="topicId"> 90 <option value="" selected="selected"><?php echo __('Select a Help Topic','key4ce-osticket-bridge'); ?></option> 91 <?php foreach ($topic_opt as $topic) { 92 echo '<option value="' . $topic->topic_id . '">' . $topic->topic . '</option>'; 93 } 94 ?> 95 </select><font class="key4ce_error"> *</font> 96 </div> 97 <div style="clear: both"></div> <!-- Help Topic End Here --> 82 98 <input type="hidden" value="2" name="priorityId" id="priority"/> 83 99 <div id="key4ce_new_ticket_subject"><?php echo __('Subject','key4ce-osticket-bridge'); ?>:</div> … … 86 102 <div style="clear: both"></div> 87 103 </div> 88 <table class="key4ce_welcome key4ce_nobd"align="center" cellpadding="3" cellspacing="3" border="0">104 <table align="center" cellpadding="3" cellspacing="3" border="0"> 89 105 <tr> 90 106 <td class="key4ce_nobd" align="center"><div align="center" style="padding-bottom: 5px;"><?php echo __('To best assist you, please be specific and detailed in your message','key4ce-osticket-bridge'); ?><font class="error"> *</font></div></td> 91 107 </tr> 92 93 108 <tr> 94 109 <td class="key4ce_nobd" align="center"> … … 101 116 </tr> 102 117 <tr><td style="text-align: center;"> 103 <?php echo '<img src="' . $_SESSION['captcha']['image_src'] . '" alt="CAPTCHA code">'; ?> 104 <br/><br/> 105 <input name="magicword" type="text"> 118 <div class="g-recaptcha" data-sitekey="<?php echo $siteKey; ?>"></div> 106 119 </td></tr> 107 120 <tr> … … 109 122 <p align="center" style="padding-top: 5px;"><input type="submit" name="create-contact-ticket" value="<?php echo __('Submit','key4ce-osticket-bridge'); ?>"> 110 123 <input type="reset" value="<?php echo __('Reset','key4ce-osticket-bridge'); ?>"></p> 111 </form>112 124 </td> 113 125 </tr> 114 126 </table> 115 127 </div> 116 <?php } ?> 128 </form> 129 <?php 130 } 131 ?> 132 117 133 <div class="key4ce_clear" style="padding: 10px;"></div> -
key4ce-osticket-bridge/trunk/templates/list_tickets.php
r1119633 r1226493 2 2 /* Template Name: list_tickets.php */ 3 3 ?> 4 <style> 5 .entry-content{max-width: 700px !important;} 6 </style> 4 7 <script type="text/javascript"> 5 8 function checkAll(ele) { … … 20 23 } 21 24 } 25 $( document ).ready(function() { 26 $('#key4ce_ticket_list .noEdit').click(function(e){ 27 e.stopPropagation(); 28 }); 29 }); 22 30 </script> 23 31 <?php 32 $time_format=key4ce_getKeyValue('time_format'); 33 $date_format=key4ce_getKeyValue('date_format'); 34 $datetime_format=key4ce_getKeyValue('datetime_format'); 24 35 if(isset($_POST['close'])) 25 36 { … … 49 60 <div id="key4ce_ticket_menu3"><?php echo __("Status", 'key4ce-osticket-bridge'); ?></div> 50 61 <div id="key4ce_ticket_menu4"><?php echo __("Department", 'key4ce-osticket-bridge'); ?></div> 51 <div id="key4ce_ticket_menu5"><?php echo __("Date", 'key4ce-osticket-bridge'); ?></div> 62 <div id="key4ce_ticket_menu5"><?php echo __("Help Topic", 'key4ce-osticket-bridge'); ?></div> 63 <div id="key4ce_ticket_menu6"><?php echo __("Date", 'key4ce-osticket-bridge'); ?></div> 52 64 </div> 53 65 <?php … … 84 96 } 85 97 @$sub_str=Format::stripslashes($list->subject); 86 if($keyost_usercloseticket==1) 87 echo "<div id='key4ce_ticket_list0' style='float: left;line-height: 45px;'><input type='checkbox' name='tickets[]' value='".$list->ticket_id."'></div>"; 98 if($keyost_usercloseticket==1) 88 99 echo "<div id='key4ce_ticket_list' onclick=\"location.href='$ticket_view';\">"; 100 echo "<div id='key4ce_ticket_list0' class=\"noEdit\"><input type='checkbox' name='tickets[]' value='".$list->ticket_id."'></div>"; 89 101 echo "<div id='key4ce_ticket_list1'><a href=$ticket_view>".$list->number."</a></div>"; 90 102 echo "<div id='key4ce_ticket_list2'>".key4ce_truncate($sub_str,60,'...')."</div><div id='key4ce_ticket_list3'>"; … … 99 111 } 100 112 echo "</div><div id='key4ce_ticket_list4'>".$list->dept_name."</div>"; 113 echo "<div id='key4ce_ticket_list5'>".$list->topic."</div>"; 101 114 if ($list->updated=='0000-00-00 00:00:00') { 102 115 $input_str = "".$list->created.""; } 103 116 else { 104 117 $input_str = "".$list->updated.""; } 105 echo "<div id='key4ce_ticket_list5'>"; 106 echo substr($input_str,0,10); 118 echo "<div id='key4ce_ticket_list6'>"; echo date($datetime_format, strtotime($input_str)); 107 119 echo "</div>"; 108 echo "<div style='clear: both; display: table-cell;'></div></div>"; 120 //echo "<div style='clear: both; display: table-cell;'></div>"; 121 echo "</div>"; 109 122 } } 110 123 else -
key4ce-osticket-bridge/trunk/templates/nav_bar.php
r1119633 r1226493 1 <?php 1 <?php $time_format=key4ce_getKeyValue('time_format'); $date_format=key4ce_getKeyValue('date_format'); $datetime_format=key4ce_getKeyValue('datetime_format'); 2 2 if($keyost_version==194 || $keyost_version==195 || $keyost_version==1951) 3 3 { -
key4ce-osticket-bridge/trunk/templates/new_ticket.php
r1121801 r1226493 1 1 <?php 2 2 /* Template Name: new_ticket.php */ 3 4 3 if($keyost_version==193) 5 4 { … … 143 142 </select><font class="key4ce_error"> *</font></div> 144 143 <div style="clear: both"></div> 144 <!-- Help Topic Start Here --> 145 <div id="key4ce_new_ticket_helptopic"><?php echo __('Help Topic','key4ce-osticket-bridge'); ?>:</div> 146 <div id="key4ce_new_ticket_helptopic_input"> 147 <select id="topicId" name="topicId"> 148 <option value="" selected="selected"><?php echo __('Select a Help Topic','key4ce-osticket-bridge'); ?></option> 149 <?php 150 foreach ($topic_opt as $topic) { 151 echo '<option value="' . $topic->topic_id . '">' . $topic->topic . '</option>'; 152 } 153 ?> 154 </select><font class="key4ce_error"> *</font></div> 155 <div style="clear: both"></div> 156 <!-- Help Topic End Here --> 145 157 <div id="key4ce_new_ticket_priority"><?php echo __('Priority:','key4ce-osticket-bridge'); ?></div> 146 158 <div id="key4ce_new_ticket_priority_input"><select id="priority" name="priorityId"> -
key4ce-osticket-bridge/trunk/templates/view_ticket.php
r1121801 r1226493 1 1 <?php 2 2 /* Template Name: view_ticket.php */ 3 if (is_user_logged_in()) 4 { 3 5 global $current_user; 4 6 get_currentuserinfo(); 7 $time_format=key4ce_getKeyValue('time_format'); 8 $date_format=key4ce_getKeyValue('date_format'); 9 $datetime_format=key4ce_getKeyValue('datetime_format'); 5 10 if ($ticketinfo->address == $current_user->user_email) { 6 11 if($keyost_version==193) … … 94 99 #key4ce_message-html{height: 25px;} 95 100 #key4ce_message-tmce{height: 25px;} 96 101 .entry-content{max-width: 700px !important;} 97 102 </style> 98 103 <div id="key4ce_ticket_view"> … … 125 130 </div> 126 131 <div id="key4ce_tic_created"><?php echo __("Create Date", 'key4ce-osticket-bridge'); ?>:</div> 127 <div id="key4ce_tic_created_date"><?php echo $ticketinfo->created; ?></div>132 <div id="key4ce_tic_created_date"><?php echo date($datetime_format, strtotime($ticketinfo->created)); ?></div> 128 133 <div id="key4ce_tic_phone"><?php echo __("Priority", 'key4ce-osticket-bridge'); ?>:</div> 129 134 <div id="key4ce_tic_phone_info"><?php … … 159 164 ?> 160 165 </div> 166 <div style="clear: both"></div> 167 <div id="key4ce_tic_topic"><?php echo __("Help Topic", 'key4ce-osticket-bridge'); ?>:</div> 168 <div id="key4ce_tic_help_topic"><?php echo $ticketinfo->topic; ?></div> 161 169 <div style="clear: both"></div> 162 170 </div> … … 179 187 <tbody> 180 188 <tr> 181 <th><?php echo $thread_info->created; ?><span id="key4ce_ticketThread"><?php if ($hidename == 1 && $thread_info->thread_type <> "M") {189 <th><?php echo date($datetime_format, strtotime($thread_info->created)); ?><span id="key4ce_ticketThread"><?php if ($hidename == 1 && $thread_info->thread_type <> "M") { 182 190 echo $ticketinfo->dept_name; 183 191 } else { … … 229 237 <table class="key4ce_welcome key4ce_nobd" align="left" width="95%" cellspacing="0" cellpadding="3"> 230 238 <tr> 231 <td class="key4ce_nobd" align="center"> 239 <td class="key4ce_nobd" align="center"> <?php //Note : $poconsubmail variable coming from /osticket-wp.php file if($poconsubmail!="") $userpost_subject=$poconsubmail; else $userpost_subject=$ticketinfo->subject; ?> 232 240 <input type="hidden" value="<?php echo $thread_info->ticket_id; ?>" name="tic_id"> 233 241 <input type="hidden" value="reply" name="a"> … … 238 246 <input type="hidden" name="usdepartment" value="<?php echo $ticketinfo->dept_name; ?>"/> 239 247 <input type="hidden" name="uscategories" value="<?php echo $ticketinfo->topic; ?>"/> 240 <input type="hidden" name="ussubject" value="<?php echo $ ticketinfo->subject; ?>"/>248 <input type="hidden" name="ussubject" value="<?php echo $poconsubmail; ?>"/> 241 249 <input type="hidden" name="ustopicid" value="<?php echo $ticketinfo->topic_id; ?>"/> 242 250 <input type="hidden" name="ademail" value="<?php echo $os_admin_email_admin; ?>"/> … … 299 307 <?php } else { ?> 300 308 <div style="width: 100%; margin: 20px; font-size: 20px;" align="center"><?php echo __("No such ticket available.", 'key4ce-osticket-bridge'); ?></div> <?php } ?> 309 <?php 310 } 311 else{ 312 auth_redirect(); 313 } 314 ?>
Note: See TracChangeset
for help on using the changeset viewer.