Changeset 1232492
- Timestamp:
- 08/27/2015 06:42:21 PM (11 years ago)
- Location:
- key4ce-osticket-bridge
- Files:
-
- 124 added
- 14 edited
-
tags/1.3.1 (added)
-
tags/1.3.1/admin (added)
-
tags/1.3.1/admin/admin_create_ticket.php (added)
-
tags/1.3.1/admin/adminticketmail.php (added)
-
tags/1.3.1/admin/db-settings.php (added)
-
tags/1.3.1/admin/header_nav.php (added)
-
tags/1.3.1/admin/header_nav_ticket.php (added)
-
tags/1.3.1/admin/index.php (added)
-
tags/1.3.1/admin/ost-config.php (added)
-
tags/1.3.1/admin/ost-emailtemp.php (added)
-
tags/1.3.1/admin/ost-postreplymail.php (added)
-
tags/1.3.1/admin/ost-settings.php (added)
-
tags/1.3.1/admin/ost-tickets.php (added)
-
tags/1.3.1/admin/ost-ticketview.php (added)
-
tags/1.3.1/admin/search.php (added)
-
tags/1.3.1/css (added)
-
tags/1.3.1/css/admin-style.css (added)
-
tags/1.3.1/css/grid.css (added)
-
tags/1.3.1/css/index.php (added)
-
tags/1.3.1/css/jquery.autocomplete.css (added)
-
tags/1.3.1/css/style.css (added)
-
tags/1.3.1/css/stylesheet.css (added)
-
tags/1.3.1/images (added)
-
tags/1.3.1/images/alert.png (added)
-
tags/1.3.1/images/attachment.png (added)
-
tags/1.3.1/images/check_status_icon.png (added)
-
tags/1.3.1/images/error.png (added)
-
tags/1.3.1/images/home.png (added)
-
tags/1.3.1/images/index.php (added)
-
tags/1.3.1/images/new.png (added)
-
tags/1.3.1/images/new_ticket_icon.png (added)
-
tags/1.3.1/images/ok.png (added)
-
tags/1.3.1/images/os1.gif (added)
-
tags/1.3.1/images/refresh.gif (added)
-
tags/1.3.1/images/refresh.png (added)
-
tags/1.3.1/images/status.png (added)
-
tags/1.3.1/images/thread.gif (added)
-
tags/1.3.1/images/ticket.gif (added)
-
tags/1.3.1/images/tix_closed.png (added)
-
tags/1.3.1/images/topMenuImages.png (added)
-
tags/1.3.1/includes (added)
-
tags/1.3.1/includes/02_01_2015_functions.php (added)
-
tags/1.3.1/includes/contactticketmail.php (added)
-
tags/1.3.1/includes/database.php (added)
-
tags/1.3.1/includes/functions.php (added)
-
tags/1.3.1/includes/index.php (added)
-
tags/1.3.1/includes/newticketmail.php (added)
-
tags/1.3.1/includes/pagination.php (added)
-
tags/1.3.1/includes/postreplymail.php (added)
-
tags/1.3.1/includes/ticket_delete.php (added)
-
tags/1.3.1/includes/udscript.php (added)
-
tags/1.3.1/includes/versionData.php (added)
-
tags/1.3.1/index.php (added)
-
tags/1.3.1/js (added)
-
tags/1.3.1/js/adminTB-email.js (added)
-
tags/1.3.1/js/adminTB-sett.js (added)
-
tags/1.3.1/js/fade.js (added)
-
tags/1.3.1/js/index.php (added)
-
tags/1.3.1/js/jquery.autocomplete.js (added)
-
tags/1.3.1/js/jquery.js (added)
-
tags/1.3.1/js/jquery_1_7_2.js (added)
-
tags/1.3.1/js/timerbar.js (added)
-
tags/1.3.1/js/validate.js (added)
-
tags/1.3.1/languages (added)
-
tags/1.3.1/languages/key4ce-osticket-bridge-ar.mo (added)
-
tags/1.3.1/languages/key4ce-osticket-bridge-ar.po (added)
-
tags/1.3.1/languages/key4ce-osticket-bridge-de_DE.mo (added)
-
tags/1.3.1/languages/key4ce-osticket-bridge-de_DE.po (added)
-
tags/1.3.1/languages/key4ce-osticket-bridge-en_US.mo (added)
-
tags/1.3.1/languages/key4ce-osticket-bridge-en_US.po (added)
-
tags/1.3.1/languages/key4ce-osticket-bridge-nl_NL.mo (added)
-
tags/1.3.1/languages/key4ce-osticket-bridge-nl_NL.po (added)
-
tags/1.3.1/lib (added)
-
tags/1.3.1/lib/ReCaptcha.php (added)
-
tags/1.3.1/lib/Response.php (added)
-
tags/1.3.1/lib/attachment (added)
-
tags/1.3.1/lib/attachment/download.php (added)
-
tags/1.3.1/lib/captcha (added)
-
tags/1.3.1/lib/captcha/backgrounds (added)
-
tags/1.3.1/lib/captcha/backgrounds/45-degree-fabric.png (added)
-
tags/1.3.1/lib/captcha/backgrounds/cloth-alike.png (added)
-
tags/1.3.1/lib/captcha/backgrounds/grey-sandbag.png (added)
-
tags/1.3.1/lib/captcha/backgrounds/kinda-jean.png (added)
-
tags/1.3.1/lib/captcha/backgrounds/polyester-lite.png (added)
-
tags/1.3.1/lib/captcha/backgrounds/stitched-wool.png (added)
-
tags/1.3.1/lib/captcha/backgrounds/white-carbon.png (added)
-
tags/1.3.1/lib/captcha/backgrounds/white-wave.png (added)
-
tags/1.3.1/lib/captcha/fonts (added)
-
tags/1.3.1/lib/captcha/fonts/times_new_yorker.ttf (added)
-
tags/1.3.1/lib/captcha/index.php (added)
-
tags/1.3.1/lib/captcha/recaptchalib.php (added)
-
tags/1.3.1/lib/captcha/simple-php-captcha.php (added)
-
tags/1.3.1/lib/src (added)
-
tags/1.3.1/lib/src/ReCaptcha (added)
-
tags/1.3.1/lib/src/ReCaptcha/ReCaptcha.php (added)
-
tags/1.3.1/lib/src/ReCaptcha/RequestMethod (added)
-
tags/1.3.1/lib/src/ReCaptcha/RequestMethod.php (added)
-
tags/1.3.1/lib/src/ReCaptcha/RequestMethod/Curl.php (added)
-
tags/1.3.1/lib/src/ReCaptcha/RequestMethod/Post.php (added)
-
tags/1.3.1/lib/src/ReCaptcha/RequestMethod/Socket.php (added)
-
tags/1.3.1/lib/src/ReCaptcha/RequestMethod/SocketPost.php (added)
-
tags/1.3.1/lib/src/ReCaptcha/RequestParameters.php (added)
-
tags/1.3.1/lib/src/ReCaptcha/Response.php (added)
-
tags/1.3.1/lib/src/autoload.php (added)
-
tags/1.3.1/license.txt (added)
-
tags/1.3.1/ost-bridge.php (added)
-
tags/1.3.1/osticket-wp.php (added)
-
tags/1.3.1/readme.txt (added)
-
tags/1.3.1/screenshot-1.png (added)
-
tags/1.3.1/screenshot-2.png (added)
-
tags/1.3.1/screenshot-3.png (added)
-
tags/1.3.1/screenshot-4.png (added)
-
tags/1.3.1/screenshot-5.png (added)
-
tags/1.3.1/screenshot-6.png (added)
-
tags/1.3.1/templates (added)
-
tags/1.3.1/templates/contact_nav_bar.php (added)
-
tags/1.3.1/templates/contact_ticket.php (added)
-
tags/1.3.1/templates/index.php (added)
-
tags/1.3.1/templates/list_tickets.php (added)
-
tags/1.3.1/templates/message.php (added)
-
tags/1.3.1/templates/nav_bar.php (added)
-
tags/1.3.1/templates/new_ticket.php (added)
-
tags/1.3.1/templates/pagination.php (added)
-
tags/1.3.1/templates/view_ticket.php (added)
-
trunk/admin/admin_create_ticket.php (modified) (4 diffs)
-
trunk/admin/adminticketmail.php (modified) (2 diffs)
-
trunk/admin/ost-config.php (modified) (3 diffs)
-
trunk/admin/ost-postreplymail.php (modified) (8 diffs)
-
trunk/admin/ost-tickets.php (modified) (1 diff)
-
trunk/css/style.css (modified) (1 diff)
-
trunk/includes/contactticketmail.php (modified) (5 diffs)
-
trunk/includes/functions.php (modified) (1 diff)
-
trunk/includes/versionData.php (modified) (1 diff)
-
trunk/ost-bridge.php (modified) (3 diffs)
-
trunk/osticket-wp.php (modified) (1 diff)
-
trunk/readme.txt (modified) (3 diffs)
-
trunk/templates/contact_ticket.php (modified) (7 diffs)
-
trunk/templates/new_ticket.php (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
key4ce-osticket-bridge/trunk/admin/admin_create_ticket.php
r1226493 r1232492 7 7 8 8 // Start File system changes 9 $fileconfig=key4ce_FileConfigValue();10 $filedata=json_decode($fileconfig);11 9 if($keyost_version==193) 12 10 { … … 18 16 else 19 17 { 18 $fileconfig=key4ce_FileConfigValue(); 19 $filedata=json_decode($fileconfig); 20 20 $attachement_status=$filedata->attachments; 21 21 $max_user_file_uploads=$filedata->max; … … 119 119 return false; 120 120 }); 121 $("#deptId").change(function() { 122 var dept_final_id=$("#deptId").val(); 123 var data = { 124 action: 'get_helptopic_dropdown', 125 dept_id: dept_final_id 126 }; 127 // since 2.8 ajaxurl is always defined in the admin header and points to admin-ajax.php 128 jQuery.post(ajaxurl, data, function(response) { 129 if(response!="") 130 { 131 $("#key4ce_new_ticket_helptopic").css("display", "block"); 132 $("#key4ce_new_ticket_helptopic_input").html(response); 133 $("#key4ce_new_ticket_helptopic_input").css("display", "block"); 134 } 135 else if(response=="") 136 { 137 $("#key4ce_new_ticket_helptopic").css("display", "none"); 138 $("#key4ce_new_ticket_helptopic_input").css("display", "none"); 139 } 140 }); 141 }); 121 142 }); 122 143 </script> … … 240 261 </div> 241 262 <div style="clear: both"></div> 263 <!-- 242 264 <div id="key4ce_new_ticket_helptopic"><?php echo __("Help Topic", 'key4ce-osticket-bridge'); ?>:</div> 243 265 <div id="key4ce_new_ticket_helptopic_input"> 244 266 <select id="topicId" name="topicId" style="width: 155px;"> 245 <option value="" selected="selected"><?php echo __("Select a Help Topic", 'key4ce-osticket-bridge'); ?></option>267 <option value="" selected="selected"><?php //echo __("Select a Help Topic", 'key4ce-osticket-bridge'); ?></option> 246 268 <?php 247 foreach ($topic_opt as $topic) {248 echo '<option value="' . $topic->topic_id . '">' . $topic->topic . '</option>';249 }269 // foreach ($topic_opt as $topic) { 270 // echo '<option value="' . $topic->topic_id . '">' . $topic->topic . '</option>'; 271 // } 250 272 ?> 251 273 </select><font class="error"> *</font> 252 274 </div> 275 --> 276 <!-- Help Topic Start Here --> 277 <div id="key4ce_new_ticket_helptopic" style="display:none;"><?php echo __('Help Topic','key4ce-osticket-bridge'); ?>:</div> 278 <div id="key4ce_new_ticket_helptopic_input" style="display:none;"></div> 279 <!-- Help Topic End Here --> 253 280 <div style="clear: both"></div> 254 281 <div id="key4ce_new_ticket_priority"><?php echo __("Priority", 'key4ce-osticket-bridge'); ?>:</div> -
key4ce-osticket-bridge/trunk/admin/adminticketmail.php
r1226493 r1232492 328 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"); 329 329 $dept_user_name = $dept_user_details->name; 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\";"); 330 $dept_user_email = $dept_user_details->email; 331 $user_email_subject=Format::stripslashes($_REQUEST['user_subject']); 332 $ussubject=Format::stripslashes($_REQUEST['user_subject']); 333 $user_email_template=Format::stripslashes($_REQUEST['user_email_template']); 334 eval("\$user_email_template=\"$user_email_template\";"); 331 335 if($smtp_status=="enable") 332 336 $SMTPAuth="true"; … … 360 364 { 361 365 $phpmailer->CharSet = 'UTF-8'; 362 $phpmailer->setFrom($dept_user_email, $dept_user_name); 363 $phpmailer->addReplyTo($dept_user_email, $dept_user_name); 366 $phpmailer->IsSendmail(); // telling the class to use SendMail transport 367 $phpmailer->AddReplyTo("$dept_user_email","$dept_user_name"); 368 $phpmailer->From = "$dept_user_name"; 369 $phpmailer->FromName = "$dept_user_email"; 370 $phpmailer->AddAddress($to, $usname); 364 371 add_filter('wp_mail_content_type',create_function('', 'return "text/html"; ')); 365 $phpmailer->Subject = $user_email_subject; 366 $phpmailer->Body = key4ce_wpetss_forum_text($user_email_template); 372 $phpmailer->Subject =$user_email_subject; 373 $phpmailer->Body = key4ce_wpetss_forum_text($user_email_template); 374 $phpmailer->AltBody = "To view the message, please use an HTML compatible email viewer!"; // optional, comment out and test 367 375 $phpmailer->MsgHTML('<div style="display: none;">-- do not reply below this line -- <br/><br/></div>' . $user_email_template); 368 $phpmailer->AltBody = 'This is a plain-text message body'; 369 $phpmailer->AddAddress($wp_user_email_id); 370 $phpmailer->send(); 376 $phpmailer->Send(); 371 377 } 372 378 -
key4ce-osticket-bridge/trunk/admin/ost-config.php
r1226493 r1232492 25 25 @$googlesecretkey=$_REQUEST['googlesecretkey']; 26 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); 27 @$keyost_departmentsetting = ($_REQUEST['keyost_departmentsetting']=="on") ? '1' : '0'; 28 @$keyost_defaultdepartmentsetting = $_REQUEST['keyost_defaultdepartmentsetting']; 29 @$keyost_helptopicsetting = ($_REQUEST['keyost_helptopicsetting']=="on") ? '1' : '0'; 30 @$keyost_defaulthelptopicsetting = $_REQUEST['keyost_defaulthelptopicsetting']; 31 $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,'keyost_departmentsetting'=>$keyost_departmentsetting,'keyost_defaultdepartmentsetting'=>$keyost_defaultdepartmentsetting, 32 'keyost_helptopicsetting'=>$keyost_helptopicsetting,'keyost_defaulthelptopicsetting'=>$keyost_defaulthelptopicsetting); 28 33 if (($_REQUEST['host']=="") || ($_REQUEST['database']=="") || ($_REQUEST['username']=="") || ($_REQUEST['supportpage']=="") ) 29 34 { … … 63 68 $config = get_option('os_ticket_config'); 64 69 extract($config); 65 $config = get_option('os_ticket_config');66 extract($config);67 70 $ost_wpdb = new wpdb($username, $password, $database, $host); 68 71 $ticket_cdata=$keyost_prefix.'ticket__cdata'; … … 209 212 <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 213 </tr> 214 215 <!-- Department Configuration for Contact page start here--> 216 <tr> 217 <td class="key4ce_config_td"><label class="key4ce_config_label"><?php echo __("Enable Department on Contact Page:", 'key4ce-osticket-bridge'); ?></label></td> 218 <td><input type="checkbox" name="keyost_departmentsetting" id="keyost_departmentsetting" <?php echo (@$keyost_departmentsetting=="1") ? 'checked' : ''; ?>/> </td> 219 </tr> 220 <?php 221 $config = get_option('os_ticket_config'); 222 extract($config); 223 if((($host!="") || ($database!="") || ($username!="") || ($password!="")) && $keyost_departmentsetting=="0") 224 { 225 ?> 226 <tr> 227 <td class="key4ce_config_td"><label class="key4ce_config_label"><?php echo __("Default Department on Contact Page:", 'key4ce-osticket-bridge'); ?></label></td> 228 <td> 229 <?php 230 $ost_wpdb = new wpdb($username, $password, $database, $host); 231 $dept_table=$keyost_prefix."department"; 232 $dept_opt = $ost_wpdb->get_results("SELECT dept_name,dept_id FROM $dept_table where ispublic=1"); 233 ?> 234 <select id="keyost_defaultdepartmentsetting" name="keyost_defaultdepartmentsetting"> 235 <option value="0" selected="selected"><?php echo __('Select a Department','key4ce-osticket-bridge'); ?></option> 236 <?php 237 foreach ($dept_opt as $dept) { 238 if($keyost_defaultdepartmentsetting==$dept->dept_id) 239 $keyost_defaultdepartmentsetting_select="selected='selected'"; 240 else 241 $keyost_defaultdepartmentsetting_select=""; 242 echo '<option value="' . $dept->dept_id . '" '.$keyost_defaultdepartmentsetting_select.'>' . $dept->dept_name . '</option>'; 243 } 244 ?> 245 </select> <?php echo __("(Default Department on Contact Page:)", 'key4ce-osticket-bridge'); ?> 246 </td> 247 </tr> 248 <?php } ?> 249 <!-- Department Configuration for Contact page end here--> 250 <!-- Helptopic Configuration for Contact page start here--> 251 <tr> 252 <td class="key4ce_config_td"><label class="key4ce_config_label"><?php echo __("Enable Helptopic on Contact Page:", 'key4ce-osticket-bridge'); ?></label></td> 253 <td><input type="checkbox" name="keyost_helptopicsetting" id="keyost_helptopicsetting" <?php echo (@$keyost_helptopicsetting=="1") ? 'checked' : ''; ?>/> </td> 254 </tr> 255 <?php 256 if((($host!="") || ($database!="") || ($username!="") || ($password!="")) && $keyost_helptopicsetting=="0") 257 { 258 $topic_table=$keyost_prefix."help_topic"; 259 $topic_opt = $ost_wpdb->get_results("SELECT topic_id,topic FROM $topic_table where ispublic=1 and isactive=1 ORDER BY `sort` ASC "); 260 ?> 261 <tr> 262 <td class="key4ce_config_td"><label class="key4ce_config_label"><?php echo __("Default Helptopic on Contact Page:", 'key4ce-osticket-bridge'); ?></label></td> 263 <td> 264 <select id="keyost_defaulthelptopicsetting" name="keyost_defaulthelptopicsetting"> 265 <option value="0" selected="selected"><?php echo __('Select a Help Topic','key4ce-osticket-bridge'); ?></option> 266 <?php foreach ($topic_opt as $topic) { 267 if($keyost_defaulthelptopicsetting==$topic->topic_id) 268 $keyost_defaulthelptopicsetting_select="selected='selected'"; 269 else 270 $keyost_defaulthelptopicsetting_select=""; 271 echo '<option value="' . $topic->topic_id . '" '.$keyost_defaulthelptopicsetting_select.'>' . $topic->topic . '</option>'; 272 } 273 ?> 274 </select> <?php echo __("(Default Helptopic on Contact Page:)", 'key4ce-osticket-bridge'); ?> 275 </td> 276 </tr> 277 <?php 278 } 279 ?> 280 <!-- Helptopic Configuration for Contact page end here--> 211 281 </table> 212 282 <div style="padding: 30px;"> -
key4ce-osticket-bridge/trunk/admin/ost-postreplymail.php
r1226493 r1232492 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)10 if($ticket_details->email_id==0) 11 11 { 12 12 $default_email_id=key4ce_getKeyValue('default_email_id'); … … 20 20 $ticket_detail_dept_email=$ticket_details->email; 21 21 } 22 23 22 $signature=$ticket_details->dept_signature; 24 23 $department_id=$ticket_details->dept_id; 25 24 // Start File system changes 26 $fileconfig=key4ce_FileConfigValue(); 27 $filedata=json_decode($fileconfig); 28 if($keyost_version==194 || $keyost_version==195 || $keyost_version==193) 25 if($keyost_version==193) 29 26 { 30 27 $attachement_status=key4ce_getKeyValue('allow_attachments'); … … 35 32 else 36 33 { 34 $fileconfig=key4ce_FileConfigValue(); 35 $filedata=json_decode($fileconfig); 37 36 $attachement_status=$filedata->attachments; 38 37 $max_user_file_uploads=$filedata->max; 39 38 $max_file_size=$filedata->size; 40 39 $fileextesnions=$filedata->extensions; 41 } 40 } 42 41 // End file system changes 43 42 if($signature_type=="mine") … … 61 60 if (!empty($_FILES['file']['name'][0])) 62 61 { 63 $fileids=array(); 62 $fileids=array(); 64 63 for ($i = 0; $i < count($_FILES['file']['name']); $i++) 65 64 { 66 65 $fullfinalpath= key4ce_getKeyValue('uploadpath'); 66 67 67 68 $key4ce_generateHashKey = key4ce_generateHashKey(33); 68 69 $key4ce_generateHashSignature = key4ce_generateHashSignature(33); … … 87 88 } else { 88 89 move_uploaded_file($_FILES["file"]["tmp_name"][$i], $structure . "/" . $newfilename); 90 $attached_file_for_user=$structure . "/" . $newfilename; 89 91 } 90 92 } … … 185 187 $phpmailer->AltBody = "To view the message, please use an HTML compatible email viewer!"; // optional, comment out and test 186 188 $phpmailer->MsgHTML('<div style="display: none;">-- do not reply below this line -- <br/><br/></div>' . $message); 189 if (!empty($_FILES['file']['name'][0])) 190 { 191 $helpdesk_url=key4ce_getKeyValue('helpdesk_url'); 192 $file_url=$helpdesk_url."file.php?key=".$key4ce_generateHashKey."&expires=1440720000&signature=".$key4ce_generateHashSignature; 193 $phpmailer->AddAttachment($file_url,$realfilename); 194 } 187 195 $phpmailer->AddAddress($to); 188 196 $phpmailer->Send(); … … 195 203 $phpmailer->From = "$ticket_detail_dept_email"; 196 204 $phpmailer->FromName = "$ticket_detail_dept_name"; 197 //$phpmailer->SetFrom('$ticket_detail_dept_email', '$ticket_detail_dept_name');198 205 $phpmailer->AddAddress($to, $usname); 199 206 add_filter('wp_mail_content_type',create_function('', 'return "text/html"; ')); … … 201 208 $phpmailer->AltBody = "To view the message, please use an HTML compatible email viewer!"; // optional, comment out and test 202 209 $phpmailer->MsgHTML('<div style="display: none;">-- do not reply below this line -- <br/><br/></div>' . $message); 210 if (!empty($_FILES['file']['name'][0])) 211 { 212 $minage = $minage ?: 43200; 213 $gmnow = time()-date('Z') + $minage; 214 $expires = $gmnow + 86400 - ($gmnow % 86400); 215 $table_prefix_osticket=$keyost_prefix; 216 $admin_email_mail=key4ce_getKeyValue('helpdesk_url'); 217 $secret_salt=md5($table_prefix_osticket.$admin_email_mail); 218 function genUrlSignature($id, $key, $signature, $expires) { 219 $pieces = array( 220 'Host='.$_SERVER['HTTP_HOST'], 221 'Path=http://ticket.zovira.com/ticket1912/', 222 'Id='.$id, 223 'Key='.strtolower($key), 224 'Hash='.$signature, 225 'Expires='.$expires, 226 ); 227 return hash_hmac('sha1', implode("\n", $pieces), $secret_salt); 228 } 229 $helpdesk_url=key4ce_getKeyValue('helpdesk_url'); 230 $disposition=false; 231 $signature =genUrlSignature($file_id,$key4ce_generateHashKey,$key4ce_generateHashSignature,$expires); 232 $args = array( 233 'key' => strtolower($key4ce_generateHashKey), 234 'expires' => $expires, 235 'signature' => $signature, 236 ); 237 echo $file_url=$helpdesk_url."file.php?".http_build_query($args); 238 exit; 239 $phpmailer->AddAttachment($file_url,$realfilename); 240 } 203 241 $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"); 208 $phpmailer->addAddress($to); 209 add_filter('wp_mail_content_type',create_function('', 'return "text/html"; ')); 210 $phpmailer->Subject = $subject; 211 $phpmailer->MsgHTML('<div style="display: none;">-- do not reply below this line -- <br/><br/></div>' . $message); 212 $phpmailer->AltBody = 'This is a plain-text message body'; 213 $phpmailer->send(); 214 */ 215 } 242 } 243 exit; 216 244 ?> -
key4ce-osticket-bridge/trunk/admin/ost-tickets.php
r1226493 r1232492 79 79 } 80 80 81 $( document).ready(function() {82 $('#ui-id-7 td.noEdit').click(function(e){81 jQuery(document).ready(function() { 82 jQuery('#ui-id-7 td.noEdit').click(function(e){ 83 83 e.stopPropagation(); 84 84 }); -
key4ce-osticket-bridge/trunk/css/style.css
r1226493 r1232492 242 242 input[readonly], input[readonly="readonly"], input[readonly="true"] { 243 243 background-color: #ddd; 244 color: #707070; 244 245 } 245 246 -
key4ce-osticket-bridge/trunk/includes/contactticketmail.php
r1226493 r1232492 22 22 $os_admin_email_id = $os_admin_email->value; 23 23 $os_admin_email_address = $ost_wpdb->get_row("SELECT email,name FROM " . $keyost_prefix . "email where email_id=" . $os_admin_email_id . ""); 24 $dep_id = @$_REQUEST['deptId']; 24 if($keyost_defaultdepartmentsetting!="" && $keyost_defaultdepartmentsetting==0) 25 $dep_id = @$_REQUEST['deptId']; 26 else 27 $dep_id=@$keyost_defaultdepartmentsetting; 28 25 29 $sla_id = 1; 26 30 $pri_id = 2; 27 @$top_id = $_REQUEST['topicId']; 31 if($keyost_defaulthelptopicsetting!="" && $keyost_defaulthelptopicsetting==0) 32 @$top_id = $_REQUEST['topicId']; 33 else 34 $top_id=@$keyost_defaulthelptopicsetting; 28 35 $staff_id = 0; 29 36 $team_id = 0; … … 59 66 } 60 67 if (isset($_REQUEST['create-contact-ticket']) && $response['success']==true) { 68 if($keyost_version==193) 69 { 70 $attachement_status=key4ce_getKeyValue('allow_attachments'); 71 $max_user_file_uploads=key4ce_getKeyValue('max_user_file_uploads'); 72 $max_file_size=key4ce_getKeyValue('max_file_size'); 73 $fileextesnions=key4ce_getKeyValue('allowed_filetypes'); 74 } 75 else 76 { 77 $fileconfig=key4ce_FileConfigValue(); 78 $filedata=json_decode($fileconfig); 79 $attachement_status=$filedata->attachments; 80 $max_user_file_uploads=$filedata->max; 81 $max_file_size=$filedata->size; 82 $fileextesnions=$filedata->extensions; 83 } 61 84 // Added by Pratik Maniar on 29-04-2014 Start Here 62 85 $dept_details = $ost_wpdb->get_row("SELECT dept_id,dept_name FROM $dept_table WHERE dept_id=$dep_id"); … … 76 99 $last_ost_user_id = $ost_wpdb->get_var("SELECT id FROM " . $keyost_prefix . "user WHERE default_email_id = '" . @$last_ost_user_email_id . "'"); 77 100 } else { 78 $ost_wpdb->query("INSERT INTO " . $keyost_prefix . "user (id, default_email_id, name, created, updated) VALUES ('','" . $last_ost_user_email_id . "', '" . $ nam. "', '" . $cre . "', '" . $cre . "')101 $ost_wpdb->query("INSERT INTO " . $keyost_prefix . "user (id, default_email_id, name, created, updated) VALUES ('','" . $last_ost_user_email_id . "', '" . $fullname . "', '" . $cre . "', '" . $cre . "') 79 102 "); 80 103 $last_ost_user_id = $ost_wpdb->insert_id; … … 94 117 $ost_wpdb->insert($ticket_table, array('number' => $tic_ID, 'user_id' => $last_ost_user_id, 'user_email_id' => $last_ost_user_email_id, 'dept_id' => $dep_id, 'sla_id' => $sla_id, 'topic_id' => $top_id, 'staff_id' => $staff_id, 'team_id' => $team_id, 'email_id' => $last_ost_user_email_id, 'ip_address' => $ip_add, 'status' => $ticketstate, 'source' => $sour, 'isoverdue' => $isoverdue, 'isanswered' => $isans, 'lastmessage' => $las_msg, 'created' => $cre), array('%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%s', '%s', '%s', '%s', '%s', '%s', '%s')); 95 118 } 96 97 98 119 $lastid = $ost_wpdb->insert_id; 99 120 $stat = "created"; … … 101 122 $annulled = 0; 102 123 $ost_wpdb->insert($ticket_event_table, array('ticket_id' => $lastid, 'staff_id' => $staff_id, 'team_id' => $team_id, 'dept_id' => $dep_id, 'topic_id' => $top_id, 'state' => $stat, 'staff' => $staf, 'annulled' => $annulled, 'timestamp' => $cre), array('%d', '%d', '%d', '%d', '%d', '%s', '%s', '%s', '%s')); 103 124 // File Table Entry Code Start Here By Pratik Maniar on 26/08/2015 125 if (!empty($_FILES['file']['name'][0])) 126 { 127 $fileids=array(); 128 for ($i = 0; $i < count($_FILES['file']['name']); $i++) 129 { 130 $fullfinalpath= key4ce_getKeyValue('uploadpath'); 131 $key4ce_generateHashKey = key4ce_generateHashKey(33); 132 $key4ce_generateHashSignature = key4ce_generateHashSignature(33); 133 $dir_name = substr($key4ce_generateHashKey, 0, 1); 134 $structure = $fullfinalpath."/".$dir_name; 135 //$structure."<br>"; 136 if (!is_dir($structure)) { 137 mkdir($structure, 0355); 138 } 139 $alowaray = explode(".",str_replace(' ', '',$fileextesnions)); 140 $strplc = str_replace(".", "",str_replace(' ', '',$fileextesnions)); 141 $allowedExts = explode(",", $strplc); 142 $allowextscnt=count($allowedExts); 143 $temp = explode(".", $_FILES['file']['name'][$i]); 144 $extension = end($temp); //return uploaded file extension 145 $newfilename = $key4ce_generateHashKey; 146 $realfilename = $_FILES['file']['name'][$i]; 147 $filetype = $_FILES["file"]["type"][$i]; 148 $filesize = $_FILES["file"]["size"][$i]; 149 //$structure . "/" . $newfilename; 150 if (($_FILES["file"]["size"][$i] < $max_file_size) && (in_array($extension, $allowedExts) || $allowextscnt)) { 151 if ($_FILES["file"]["error"][$i] > 0) { 152 echo "Return Code: " . $_FILES["file"]["error"][$i] . "<br>"; 153 exit; 154 } else { 155 move_uploaded_file($_FILES["file"]["tmp_name"][$i], $structure . "/" . $newfilename); 156 } 157 } 158 $ost_wpdb->insert($keyost_prefix . "file", array('ft' => 'T', 'bk' => 'F', 'type' => $filetype, 159 'size' => $filesize, 'key' => $key4ce_generateHashKey, 'signature' => $key4ce_generateHashSignature, 160 'name' => $realfilename, 'attrs' => '', 'created' => $cre), array('%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s')); 161 $file_id = $ost_wpdb->insert_id; 162 array_push($fileids, $file_id); 163 } 164 } 165 // File Table Entry Code End Here By Pratik Maniar on 26/08/2015 104 166 $pid = 0; 105 167 $thread_type = "M"; 106 107 $ost_wpdb->insert($thread_table, array('pid' => $pid, 'ticket_id' => $lastid, 'staff_id' => $staff_id, 'thread_type' => $thread_type, 'poster' => $nam, 'source' => $sour, 'title' => "", 'body' => key4ce_wpetss_forum_text($user_message), 'ip_address' => $ip_add, 'created' => $cre), array('%d', '%d', '%d', '%s', '%s', '%s', '%s', '%s', '%s', '%s')); 108 168 $ost_wpdb->insert($thread_table, array('pid' => $pid, 'ticket_id' => $lastid, 'staff_id' => $staff_id, 'thread_type' => $thread_type, 'poster' => $fullname, 'source' => $sour, 'title' => "", 'body' => key4ce_wpetss_forum_text($user_message), 'ip_address' => $ip_add, 'created' => $cre), array('%d', '%d', '%d', '%s', '%s', '%s', '%s', '%s', '%s', '%s')); 169 $thread_id = $ost_wpdb->insert_id; 170 if (!empty($_FILES['file']['name'][0])) 171 { 172 foreach($fileids as $file_id) 173 { 174 // File Attachment Table Entry Code Start Here By Pratik Maniar on 26/08/2015 175 $ost_wpdb->insert($keyost_prefix . "ticket_attachment", array('ticket_id' => $lastid, 'file_id' => $file_id, 'ref_id' => $thread_id, 'inline' => '0', 'created' => $cre), array('%d', '%d', '%d', '%d', '%s')); 176 // File Attachment Table Entry Code End Here By Pratik Maniar on 26/08/2015 177 } 178 } 109 179 if($keyost_version==194 || $keyost_version==195 || $keyost_version==1951) 110 180 { -
key4ce-osticket-bridge/trunk/includes/functions.php
r1119633 r1232492 113 113 114 114 } 115 116 115 ?> -
key4ce-osticket-bridge/trunk/includes/versionData.php
r1226493 r1232492 1 1 <?php 2 if($_POST['department_id'] && wp_verify_nonce( $_POST['ajax_security'],'key4ce-ajax-sec')) 3 { 4 echo $help_topic_opt = $ost_wpdb->get_results("SELECT topic_id,topic FROM $topic_table where ispublic=1 and isactive=1 and dept_id='".$_POST['department_id']."' ORDER BY `sort` ASC "); 5 exit; 6 foreach ($help_topic_opt as $help_topic) 7 { 8 $options .='<option value="' . $help_topic->topic_id . '">' . $help_topic->topic . '</option>'; 9 } 10 echo $options; 11 } 2 12 $topic_opt = $ost_wpdb->get_results("SELECT topic_id,topic FROM $topic_table where ispublic=1 and isactive=1 ORDER BY `sort` ASC "); 3 13 $pri_opt = $ost_wpdb->get_results("SELECT priority_desc,priority_id FROM $priority_table"); 4 14 $dept_opt = $ost_wpdb->get_results("SELECT dept_name,dept_id FROM $dept_table where ispublic=1"); 5 require_once( WP_PLUGIN_DIR . '/key4ce-osticket-bridge/includes/database.php' ); 15 require_once( WP_PLUGIN_DIR . '/key4ce-osticket-bridge/includes/database.php' ); 16 require_once( WP_PLUGIN_DIR . '/key4ce-osticket-bridge/includes/functions.php' ); 17 6 18 ?> -
key4ce-osticket-bridge/trunk/ost-bridge.php
r1226493 r1232492 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.1 1) into wordpress. including user integration and scp6 Version: 1.3. 05 Description: Integrate osTicket (v1.9.3 - 1.9.12) into wordpress. including user integration and scp 6 Version: 1.3.1 7 7 Author: Key4ce 8 8 Author URI: https://key4ce.com … … 40 40 41 41 add_action( 'init', 'keyost_load_textdomain', 1 ); 42 43 42 function mb_settings_link($actions, $file) { 44 43 if(false !== strpos($file, 'ost-bridge')) … … 358 357 } 359 358 } 359 add_action('wp_ajax_get_helptopic_dropdown', 'get_helptopic_dropdown_callback'); 360 add_action('wp_ajax_nopriv_get_helptopic_dropdown', 'get_helptopic_dropdown_callback'); 361 function get_helptopic_dropdown_callback(){ 362 //ob_clean(); // Only enabled if need 363 if($_POST['dept_id'] > 0 && $_POST['dept_id']!="") 364 { 365 $config = get_option('os_ticket_config'); 366 extract($config); 367 $ost_wpdb = new wpdb($username, $password, $database, $host); 368 $topic_table=$keyost_prefix."help_topic"; 369 $help_topic_opt = $ost_wpdb->get_results("SELECT topic_id,topic FROM $topic_table where ispublic=1 and isactive=1 and dept_id='".$_POST['dept_id']."' ORDER BY `sort` ASC "); 370 $rowCount = $ost_wpdb->num_rows; 371 if($rowCount > 0 ) 372 { 373 $helptopic_dropdown="<select id=\"topicId\" name=\"topicId\">"; 374 foreach ($help_topic_opt as $help_topic) 375 { 376 $helptopic_dropdown.="<option value=". $help_topic->topic_id.">".$help_topic->topic."</option>"; 377 } 378 $helptopic_dropdown.="</select>"; 379 echo $helptopic_dropdown; 380 die(); 381 } 382 else 383 { 384 echo ""; 385 die(); 386 } 387 } 388 else 389 die(); 390 } 360 391 function ost_tickets_page() { 361 392 $config = get_option('os_ticket_config'); -
key4ce-osticket-bridge/trunk/osticket-wp.php
r1226493 r1232492 7 7 extract($config); 8 8 wp_enqueue_style('ost-bridge', plugins_url('css/style.css', __FILE__)); 9 9 10 ?> 10 11 <div id="ost_container"><!--ost_container Start--> -
key4ce-osticket-bridge/trunk/readme.txt
r1226503 r1232492 4 4 Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=paypal%40key4ce%2ecom 5 5 Requires at least: 3.5 6 Tested up to: 4. 27 Stable tag: 1.3. 06 Tested up to: 4.3 7 Stable tag: 1.3.1 8 8 License: GPLv3 9 9 License URI: http://www.gnu.org/licenses/gpl-3.0.html 10 11 Get your own advanced ticket system in Wordpress and Integrate osTicket into your wordpress site. Works with osTicket 1.9.3 - 1.9.11 10 Get your own advanced ticket system in Wordpress and Integrate osTicket into your wordpress site. Works with osTicket 1.9.3 - 1.9.12 12 11 13 12 == Description == 14 15 13 This is a rebuild of the original OSTicket WP Bridge plugin 16 14 Because the original plugin was no longer developed we decided to make a new plugin out of it. 17 15 adding new features, fixing old bugs and security flaws. 18 16 19 20 17 = Basic Features: = 21 22 * Compatible with osTicket 1.9.3 - 1.9.11 18 * Compatible with osTicket 1.9.3 - 1.9.12 23 19 * POP / IMAP functionality stays intact 24 20 * You can use both osTicket scp, reply to email OR use Wordpress for all tickets … … 32 28 * Multi-language support 33 29 34 35 30 = Features scheduled for next release: = 36 37 31 - Ticket user linked to WP / Woo Commerce users. 38 - Improved Contact page shortcode39 - Support for view ticket without login.40 41 32 42 33 = Translations available = 43 44 34 * English 45 35 * Dutch 46 36 * Arabic - by mbnoimi 47 37 * German - by Adrian Oeschger 48 49 38 * If you would like to contribute your own language please don't hesitate to contact us! 50 39 51 52 40 = If you like this plugin please leave a good review behind and help us to promote it. = 53 54 41 This plugin is powered by Key4ce - IT Professionals :: https://key4ce.com 55 42 56 57 58 43 == Installation == 59 44 60 61 62 45 = Prerequisites: = 63 64 46 * Make sure that osTicket is installed 65 66 * 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). 67 47 * 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, 1.9.11 or 1.9.12 (all subversions should work). 68 48 * osTicket can be downloaded from http://osticket.com/download 69 70 * For Attachments to work with the Key4ce osTicket Bridge plugin, please download and configure the osTicket plugin: Storage :: Attachments on the Filesystem 71 49 * For Attachments to work with the Key4ce osTicket Bridge plugin, please download and configure the osTicket plugin: Storage :: Attachments on the Filesystem. 72 50 * osTicket Storage :: Attachments on the Filesystem plugin can be downloaded here: http://osticket.com/download/go?dl=plugin%2Fstorage-fs.phar 73 74 51 * Our plugin will make use of Department, help topic alert & Email settings. Please set them carefully in osTicket settings. 75 76 * 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 77 78 * Create a Thank You Page for all ticket submissions 79 52 * 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. 53 * Create a Thank You Page for all ticket submissions. 80 54 * Make sure the email template subject matches your osticket email subjects. 81 82 * Fill in google's re-captcha code for contact page 83 84 55 * Fill in google's re-captcha code for contact page. 85 56 86 57 = Shortcodes: = 87 88 58 [addosticket] Ticket listing and creation of tickets for logged in customers/clients (see Screenshots tab). 89 90 59 [addoscontact] Guest ticket submission form with CAPTCHA (a WordPress user login is not required to submit a ticket - see Screenshots tab). 91 92 60 [addosopenticketcount] Display the amount of open tickets for the logged in user anywhere in wordpress. 93 61 94 95 96 62 = Install Instructions: = 97 98 63 1. Install key4ce-osticket-bridge folder to the /wp-content/plugins/ directory. 99 100 64 2. Activate the plugin through the "Plugins" menu in WordPress. 101 102 65 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). 103 104 66 4. osTicket DB configuration settings are located in Dashboard--> Tickets --> Settings 105 106 67 5. Email template settings are located in Dashboard--> Tickets--> Email Templates 107 108 68 6. Add a contact page and a thank you page for [addoscontact] 109 110 69 7. Set the landing page (ticket list + create ticket page) 111 112 70 8. Set the contact page and Contact thank you page 113 114 71 9. Set googles re-captcha keys for the contact page (can be found at: https://www.google.com/recaptcha/admin#list) 115 72 116 117 118 73 = IMPORTANT NOTE: = 119 120 74 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). 121 75 122 123 124 76 == Frequently Asked Questions == 125 77 126 127 128 78 = Where does the osTicket need to be Installed? = 129 130 79 Can be anywhere, just make sure you know it's Database settings and fill them in accordingly in osT-Config page. 131 80 132 133 134 81 = What version of osTicket can i use? = 135 136 osTicket v1.9.3 to v1.9.11 (all subversions are generally supported). 137 138 82 osTicket v1.9.3 to v1.9.12 (all subversions are generally supported). 139 83 140 84 = Where can I download the tested osTicket versions? = 141 142 85 http://osticket.com/download 143 86 144 145 146 87 == Screenshots == 147 88 148 149 150 89 1. Shows the Client ticket list. 151 152 90 2. Shows how the client views the ticket. 153 154 91 3. Shows how the Wordpress admin views the ticket list. 155 156 92 4. Shows how the Wordpress admin views the 157 158 93 5. Shows the [addoscontact] shortcode forms 159 160 94 6. HTML Email template example (with signature). 161 95 162 163 164 96 == Changelog == 97 = 1.3.1 = 98 - Added help topic based up on department. 99 - Contact form attachments, department and help topic selection options added. 100 - osticket 1.9.12 compatability added. 101 - Fixed: some styling issues. 102 - Fixed: Full name field properly adds full name. 103 - Fixed: Google re-captcha fields in the right order. 165 104 166 105 = 1.3.0 = … … 169 108 - osticket 1.9.11 compatible 170 109 - Email template subjects added to email templates 171 - Google re-captcha added to contact page 172 - Redesigned the tables for responsive grid. 110 - Google re-captcha added to contact form. 173 111 174 112 = 1.2.9 = 175 176 113 - Added additional File attachment functionality to ignore empty extensions 177 178 114 - Fixed up queries for shortcode/ forum contact page 179 115 180 181 182 116 = 1.2.8 = 183 184 117 - Added support for 1.9.5.1 and 1.9.6 185 186 118 - fixed Attachment support for higher versions 187 119 188 189 190 120 = 1.2.7 = 191 192 121 - Functions all have prefixes to avoid conflicts with other plugins 193 194 122 - Multi language support added 195 123 196 197 198 124 = 1.2.6 = 199 200 125 - Fixes for 1.9.4 fresh installation 201 202 126 - Email customer reply fix 203 127 204 205 206 128 = 1.2.5 = 207 208 129 - osticket 1.9.4 support added 209 210 130 - added osticket version selection 211 131 212 213 214 132 = 1.2.4 = 215 216 133 - Open ticket count fixed 217 218 134 - Option to enable ticket close for client 219 220 135 - Client layout fixed 221 222 136 - Client main page fixed 223 224 137 - Small other changes in code. 225 138 226 227 228 139 = 1.2.3 = 229 230 140 - Admin can create tickets with auto search in WP Database. 231 232 141 - Mass close tickets on client ticket listing. 233 234 142 - Shortcode for viewing open tickets 235 236 143 - File attachment error in Admin fixed. 237 238 144 - Bugged users will now be automatically updated and fixed. 239 240 145 - contact form bug fixed. 241 146 242 243 244 147 = 1.2.2 = 245 246 148 - Multiple file attachments 247 248 149 - File attachment location from osTicket 249 250 150 - mysql query fix- contact form sender name and email fix. 251 252 151 - minor issues fixed.- updated installations (Contributed by: DivaVocals) 253 152 254 255 256 153 = 1.2.1 = 257 258 154 - Fixed infected javascript files. 259 155 260 261 262 156 = 1.2.0 = 263 264 157 - Single file Attachments 265 266 158 - File Attachement configuration based on OSticket(Filesize,File Type,File Attachement enable/disable) 267 268 159 - Corrected Admin ticket counting (Open,Closed,Answered,All) 269 270 160 - HTML Email Template 271 272 161 - Admin and Department Signature in Email template (based up on osTicket signature) 273 274 162 - Mass delete/ Close tickets from Admin ticket listing 275 276 163 - Fixed names in ticket thread 277 278 164 - Fixed time equal to osTicket settings. 279 280 165 - Tested with Wordpress 4.0 281 166 282 283 284 167 = 1.1.5 = 285 286 168 - Shortcode for Contact style form with captcha 287 288 169 - Shortcode placement fix for ticket list and ticket create 289 290 170 - CSS/ JS inclusion fix ** Submitted by Steffen Andre Langnes ** 291 292 171 - Login Redirect ** Submitted by Steffen Andre Langnes ** 293 172 294 295 296 173 = 1.1.4 = 297 298 174 - Prefix fix for existing plugin users 299 300 175 - mysql DB errors fixed- RevSlider conflict fixed 301 302 176 - Activate / Deactivate warning messages fixed. 303 304 177 - If wrong database info blank page issue fixed. 305 178 306 307 308 179 = 1.1.3 = 309 310 180 - Added database keyost_prefix field 311 312 181 - Fixed mysql bugs 313 314 182 - Fixed first time user issue. 315 316 183 - Headers already sent fixed. 317 318 184 - Creating multiple ticket pages on save has been resolved. 319 185 320 321 322 186 = 1.1.2 = 323 324 187 - Shows name in ticket threads. 325 326 188 - SMTP save field fix- Offline / Offline mode fix 327 328 189 - Cleaned up legacy code 329 190 330 331 332 191 = 1.1.1 = 333 334 192 - Shortcode redirect fix 335 336 193 - Login fields added 337 338 194 - Register link with redirect added 339 340 195 - Premalink related issues fixed 341 342 196 - Adding new users to OSticket fixed 343 344 197 - Form validation fixed 345 198 346 347 348 199 = 1.1 = 349 350 200 - Shortcode implementation 351 352 201 - Cleaned up code issues 353 354 202 - Admin Alert Email now looks into group members aswell 355 356 203 - implemented Reply Separator Tag- Fixed: Email From name 357 358 204 - Fixed: Many code warnings and errors in Debug mode- And much more.. 359 205 360 361 362 206 = 1.0 = 363 364 207 - New design for both Admin and Client end 365 366 208 - Uses OSTicket email address and name based up on the department 367 368 209 - Full HTML capable with rich text editor for both client and admin 369 370 210 - Admin side menu displays the amount of open tickets 371 372 211 - Displays "Open tickets" in the top admin menu when open tickets are available Displays "Support tickets" when no open ticket is available. 373 374 212 - Added Answered status to both admin and client side 375 376 213 - Security Fix: Client no longer able to see everyones ticket by entering the ticket id in the url. 377 378 214 - Fix: User/ priority/ status fields compatible with OSTicket 1.9 379 380 215 - Fix: Using department instead of Topic 381 382 216 - Fix: If not logged in to Wordpress it will redirect you to the Wordpress login (works with Theme my login plugin) 383 217 384 385 386 218 == Upgrade Notice == 219 = 1.3.1 = 220 added help topic based up on department, contact form department, help topic and attachments options added, added support for osticket 1.9.12 387 221 388 222 = 1.3.0 = 389 Added help topic functionality, added email subjects to mail templates, google re-captcha to contact page,fixed time issue, and more..223 Added help topic functionality, added email subjects to mail templates, fixed time issue, and more.. 390 224 391 225 = 1.2.9 = 392 393 226 Added better attachment support and fixed up some queries for contact page. 394 227 395 396 397 228 = 1.2.8 = 398 399 229 Added support for 1.9.5.1 and 1.9.6 400 230 401 402 403 231 = 1.2.7 = 404 405 232 Added multi language support. 406 233 407 408 409 234 = 1.2.6 = 410 411 235 Added osticket 1.9.4 fresh installation support and small email customer reply bug. 412 236 413 414 415 237 = 1.2.5 = 416 417 238 Added osticket 1.9.4 support. 418 239 419 420 421 240 = 1.2.4 = 422 423 241 Option to enable or disable client close ticket feature, and small bug fixes. 424 242 425 426 427 243 = 1.2.3 = 428 429 244 Several minor bug fixes, new Admin create ticket functionality, and more.. 430 245 431 432 433 246 = 1.2.2 = 434 435 247 Multiple file atachment now possible, and small bug fixes have been made. 436 248 437 438 439 249 = 1.2.1 = 440 441 250 Emergency update: Javascripts where infected please update asap. Our apologies for the inconvenience 442 251 443 444 445 252 = 1.2.0 = 446 447 253 Multiple new and convenient features, Attachments, signatures and more. 448 254 449 450 451 255 = 1.1.5 = 452 453 256 Shortcode fixes, css/js inclusion fixes, new Contact style shortcode 454 257 455 456 457 258 = 1.1.4 = 458 459 259 Urgent update fixing multiple issues caused by update 1.1.3. 460 260 461 462 463 261 = 1.1.3 = 464 465 262 Database keyost_prefix field added, and mysql bugs fixed. 466 263 467 468 469 264 = 1.1.2 = 470 471 265 Minor update: Cleaned up legacy code and fixed:smtp fields and offline mode 472 266 473 474 475 267 = 1.1.1 = 476 477 268 Shortcode related issues fixed, osTicket user related issues fixed. 478 269 479 480 481 270 = 1.1 = 482 483 271 Shortcode implementation and many code fixes. 484 272 485 486 487 273 = 1.0 = 488 489 274 Initial version -
key4ce-osticket-bridge/trunk/templates/contact_ticket.php
r1226493 r1232492 26 26 $default_email_id_data = $ost_wpdb->get_row("SELECT name FROM " . $keyost_prefix . "email WHERE `email_id` =$default_email_id"); 27 27 $title_name = $default_email_id_data->name; 28 ?> 28 if($keyost_version==193) 29 { 30 $attachement_status=key4ce_getKeyValue('allow_attachments'); 31 $max_user_file_uploads=key4ce_getKeyValue('max_user_file_uploads'); 32 $max_file_size=key4ce_getKeyValue('max_file_size'); 33 $fileextesnions=key4ce_getKeyValue('allowed_filetypes'); 34 } 35 else 36 { 37 $fileconfig=key4ce_FileConfigValue(); 38 $filedata=json_decode($fileconfig); 39 $attachement_status=$filedata->attachments; 40 $max_user_file_uploads=$filedata->max; 41 $max_file_size=$filedata->size; 42 $fileextesnions=$filedata->extensions; 43 } 44 $alowaray = explode(".",str_replace(' ', '',$fileextesnions)); 45 $strplc = str_replace(".", "",str_replace(' ', '',$fileextesnions)); 46 $allowedExts = explode(",", $strplc); 47 function add_quotes($str) { 48 return sprintf("'%s'", $str); 49 } 50 $extimp = implode(',', array_map('add_quotes', $allowedExts)); 51 $finalary = "'" . $extimp . "'"; 52 ?> 53 <script type="text/javascript"> 54 var ajaxurl = '<?php echo admin_url('admin-ajax.php'); ?>'; 55 </script> 56 <script language="javascript" src="<?php echo $url.'/key4ce-osticket-bridge/js/validate.js'; ?>"></script> 57 <script language="javascript" src="<?php echo plugin_dir_url(__FILE__) . '../js/jquery_1_7_2.js'; ?>"></script> 58 <script type="text/javascript"> 59 $(function() { 60 var addDiv = $('#addinput'); 61 var i = $('#addinput p').size() + 1; 62 var MaxFileInputs = <?php echo $max_user_file_uploads; ?>; 63 $('#addNew').live('click', function() { 64 if (i <= MaxFileInputs) 65 { 66 $('<p><span style="color:#000;"><?php echo __("Attachment", 'key4ce-osticket-bridge'); ?> ' + i + ':</span> <input type="file" id="p_new_' + i + '" name="file[]" onchange="return checkFile(this);"/> <a href="#" id="remNew"><?php echo __("Remove", '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></p>').appendTo(addDiv); 67 i++; 68 } 69 else 70 { 71 alert("<?php echo __("You have exceeds your file upload limit", 'key4ce-osticket-bridge'); ?>"); 72 return false; 73 } 74 return false; 75 }); 76 77 $('#remNew').live('click', function() { 78 if (i > 2) { 79 $(this).parents('p').remove(); 80 i--; 81 } 82 return false; 83 }); 84 $("#deptId").change(function() { 85 var dept_final_id=$("#deptId").val(); 86 var data = { 87 action: 'get_helptopic_dropdown', 88 dept_id: dept_final_id 89 }; 90 // since 2.8 ajaxurl is always defined in the admin header and points to admin-ajax.php 91 jQuery.post(ajaxurl, data, function(response) { 92 if(response!="") 93 { 94 $("#key4ce_new_ticket_helptopic").css("display", "block"); 95 $("#key4ce_new_ticket_helptopic_input").html(response); 96 $("#key4ce_new_ticket_helptopic_input").css("display", "block"); 97 } 98 else if(response=="") 99 { 100 $("#key4ce_new_ticket_helptopic").css("display", "none"); 101 $("#key4ce_new_ticket_helptopic_input").css("display", "none"); 102 } 103 }); 104 }); 105 }); 106 </script> 107 <script type="text/javascript"> 108 function checkFile(fieldObj) 109 { 110 var FileName = fieldObj.value; 111 var FileId = fieldObj.id; 112 var FileExt = FileName.substr(FileName.lastIndexOf('.') + 1); 113 var FileSize = fieldObj.files[0].size; 114 var FileSizeMB = (FileSize / 10485760).toFixed(2); 115 var FileExts = new Array(<?php echo $extimp; ?>); 116 117 if ((FileSize > <?php echo $max_file_size; ?>)) 118 { 119 alert("<?php echo __("Please make sure your file is less than", 'key4ce-osticket-bridge'); ?> <?php echo ($max_file_size* .0009765625) * .0009765625; ?>MB."); 120 document.getElementById(FileId).value = ""; 121 return false; 122 } 123 if(FileExts!="") 124 { 125 if (FileExts.indexOf(FileExt) < 0) 126 { 127 error = "<?php echo __("Please make sure your file extension should be :", 'key4ce-osticket-bridge'); ?> \n"; 128 error += FileExts; 129 alert(error); 130 document.getElementById(FileId).value = ""; 131 return false; 132 } 133 } 134 return true; 135 } 136 </script> 29 137 <style> 30 138 #key4ce_wp-message-wrap{border:2px solid #CCCCCC;border-radius: 5px;padding: 5px;width: 75%;} … … 33 141 .entry-content{max-width: 700px;} 34 142 </style> 35 <script language="javascript" src="<?php echo $url.'/key4ce-osticket-bridge/js/validate.js'; ?>"></script>36 <script src='https://www.google.com/recaptcha/api.js'></script>37 143 <?php 38 144 if(isset($_POST['g-recaptcha-response'])) … … 64 170 <input type="hidden" name="sdirna" value="<?php echo $dirname; ?>"/> 65 171 <input type="hidden" name="newtickettemp" value="<?php echo $newticket; ?>"/> 172 <input type="hidden" value="2" name="priorityId" id="priority"/> 66 173 <div id="key4ce_new_ticket_name"><?php echo __('Full Name:','key4ce-osticket-bridge'); ?></div> 67 174 <div id="key4ce_new_ticket_name_input"><input class="ost" id="cur-name" type="text" name="cur-name" size="30"></div> … … 70 177 <div id="key4ce_new_ticket_email_input"><input class="ost" id="email" type="text" name="email" size="30"></div> 71 178 <div style="clear: both"></div> 179 <?php 180 if($keyost_departmentsetting==1) 181 { 182 ?> 72 183 <div id="key4ce_new_ticket_catagory"><?php echo __('Catagories:','key4ce-osticket-bridge'); ?></div> 73 184 <div id="key4ce_new_ticket_catagory_input"> … … 81 192 ?> 82 193 </select><font class="error"> *</font></div> 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 --> 98 <input type="hidden" value="2" name="priorityId" id="priority"/>194 <div style="clear: both"></div> 195 <?php 196 } 197 ?> 198 <?php 199 if($keyost_helptopicsetting==1) 200 { 201 ?> 202 <!-- Help Topic Start Here --> 203 <div id="key4ce_new_ticket_helptopic" style="display:none;"><?php echo __('Help Topic','key4ce-osticket-bridge'); ?>:</div> 204 <div id="key4ce_new_ticket_helptopic_input" style="display:none;"></div> 205 <div style="clear: both"></div> 206 <!-- Help Topic End Here --> 207 <?php 208 } 209 ?> 99 210 <div id="key4ce_new_ticket_subject"><?php echo __('Subject','key4ce-osticket-bridge'); ?>:</div> 100 211 <div id="key4ce_new_ticket_subject_input"> … … 102 213 <div style="clear: both"></div> 103 214 </div> 104 <table align="center" cellpadding="3" cellspacing="3" border="0">215 <table class="key4ce_welcome key4ce_nobd" align="center" cellpadding="3" cellspacing="3" border="0"> 105 216 <tr> 106 217 <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> … … 115 226 <div class="key4ce_clear" style="padding: 5px;"></div></td> 116 227 </tr> 228 <?php 229 if ($attachement_status==1 || $attachement_status==true) { 230 if(key4ce_getPluginValue('Attachments on the filesystem')==1) 231 { 232 ?> 233 <tr><td> 234 <div id="addinput"> 235 <p> 236 <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> 237 </p> 238 </div> 239 </td></tr> 240 <?php } else 241 { 242 ?> 243 <tr><td><?php echo __('Attachments on the Filesystem plugin can be downloaded here:','key4ce-osticket-bridge'); ?><a href="http://osticket.com/download/go?dl=plugin%2Fstorage-fs.phar" title="Attachement Filesystem Plugin" target="_blank"><?php echo __('Attachement Filesystem Plugin','key4ce-osticket-bridge'); ?></a></td></tr> 244 <?php 245 } 246 } 247 ?> 248 <?php 249 if($googlesecretkey!="" && $googlesitekey!="") 250 { 251 ?> 252 <script src='https://www.google.com/recaptcha/api.js'></script> 117 253 <tr><td style="text-align: center;"> 118 254 <div class="g-recaptcha" data-sitekey="<?php echo $siteKey; ?>"></div> 119 </td></tr> 255 </td> 256 </tr> 257 <?php } ?> 120 258 <tr> 121 259 <td class="nobd" align="center"> -
key4ce-osticket-bridge/trunk/templates/new_ticket.php
r1226553 r1232492 1 1 <?php 2 2 /* Template Name: new_ticket.php */ 3 ?> 4 <script type="text/javascript"> 5 var ajaxurl = '<?php echo admin_url('admin-ajax.php'); ?>'; 6 </script> 7 <?php 3 8 if($keyost_version==193) 4 9 { … … 23 28 return sprintf("'%s'", $str); 24 29 } 25 26 30 $extimp = implode(',', array_map('add_quotes', $allowedExts)); 27 31 $finalary = "'" . $extimp . "'"; … … 54 58 return false; 55 59 }); 60 $("#deptId").change(function() { 61 var dept_final_id=$("#deptId").val(); 62 var data = { 63 action: 'get_helptopic_dropdown', 64 dept_id: dept_final_id 65 }; 66 // since 2.8 ajaxurl is always defined in the admin header and points to admin-ajax.php 67 jQuery.post(ajaxurl, data, function(response) { 68 if(response!="") 69 { 70 $("#key4ce_new_ticket_helptopic").css("display", "block"); 71 $("#key4ce_new_ticket_helptopic_input").html(response); 72 $("#key4ce_new_ticket_helptopic_input").css("display", "block"); 73 } 74 else if(response=="") 75 { 76 $("#key4ce_new_ticket_helptopic").css("display", "none"); 77 $("#key4ce_new_ticket_helptopic_input").css("display", "none"); 78 } 79 }); 80 }); 56 81 }); 57 82 </script> … … 59 84 function checkFile(fieldObj) 60 85 { 61 62 86 var FileName = fieldObj.value; 63 87 var FileId = fieldObj.id; … … 67 91 var FileExts = new Array(<?php echo $extimp; ?>); 68 92 69 if ((FileSize > <?php echo $max_file_size; ?>) ||)93 if ((FileSize > <?php echo $max_file_size; ?>)) 70 94 { 71 95 alert("<?php echo __("Please make sure your file is less than", 'key4ce-osticket-bridge'); ?> <?php echo ($max_file_size* .0009765625) * .0009765625; ?>MB."); … … 133 157 <div id="key4ce_new_ticket_catagory"><?php echo __('Catagories','key4ce-osticket-bridge'); ?>:</div> 134 158 <div id="key4ce_new_ticket_catagory_input"> 159 <!--onchange="loadHelptopic(this.value);" --> 135 160 <select id="deptId" name="deptId"> 136 <option value=" " selected="selected"><?php echo __('Select a Category','key4ce-osticket-bridge'); ?></option>161 <option value="0" selected="selected"><?php echo __('Select a Category','key4ce-osticket-bridge'); ?></option> 137 162 <?php 138 163 foreach ($dept_opt as $dept) { … … 142 167 </select><font class="key4ce_error"> *</font></div> 143 168 <div style="clear: both"></div> 169 144 170 <!-- 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> 171 <div id="key4ce_new_ticket_helptopic" style="display:none;"><?php echo __('Help Topic','key4ce-osticket-bridge'); ?>:</div> 172 <div id="key4ce_new_ticket_helptopic_input" style="display:none;"></div> 155 173 <div style="clear: both"></div> 156 174 <!-- Help Topic End Here -->
Note: See TracChangeset
for help on using the changeset viewer.