Plugin Directory

Changeset 1226493


Ignore:
Timestamp:
08/20/2015 07:36:10 PM (11 years ago)
Author:
m.tiggelaar
Message:

1.3.0 submit, major version changes

Location:
key4ce-osticket-bridge
Files:
140 added
24 edited

Legend:

Unmodified
Added
Removed
  • key4ce-osticket-bridge/trunk/admin/admin_create_ticket.php

    r1121801 r1226493  
    44require_once( WP_PLUGIN_DIR . '/key4ce-osticket-bridge/includes/functions.php');
    55$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");
    77
    88// Start File system changes
     
    9797        var addDiv = j('#addinput');
    9898        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; ?>;
    100100        j('#addNew').live('click', function() {
    101101            if (i <= MaxFileInputs)
     
    195195    .usertype{color: #000;float: left;font-weight: normal;margin-top: 8px;width: 175px;}
    196196</style>
     197<?php
     198wp_enqueue_script('ost-bridge-validate',plugins_url('../js/validate.js', __FILE__));
     199?>
    197200<div id="key4ce_thContainer">
    198201    <div id="key4ce_new_ticket">
     
    201204        <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>
    202205        <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;  ?>"/>
    206208            <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; ?>"/>
    208210            <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; ?>"/>
    210212            <div class="selectusertype"><?php echo __("Select User Type :", 'key4ce-osticket-bridge'); ?></div>
    211213            <div id="element">
     
    228230            <div id="key4ce_new_ticket_catagory"><?php echo __("Catagories", 'key4ce-osticket-bridge'); ?>:</div>
    229231            <div id="key4ce_new_ticket_catagory_input">
    230                 <select id="deptId" name="deptId">
     232                <select id="deptId" name="deptId" >
    231233                    <option value="" selected="selected"><?php echo __("Select a Category", 'key4ce-osticket-bridge'); ?></option>
    232234                    <?php
     
    235237                    }
    236238                    ?>
    237                 </select><font class="error">&nbsp;*</font></div>
     239                </select><font class="error">&nbsp;*</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">&nbsp;*</font>
     252            </div>
    238253            <div style="clear: both"></div>
    239254            <div id="key4ce_new_ticket_priority"><?php echo __("Priority", 'key4ce-osticket-bridge'); ?>:</div>
  • key4ce-osticket-bridge/trunk/admin/adminticketmail.php

    r1121801 r1226493  
    22/*
    33  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');
    65?>
    76<?php
     
    311310
    312311//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
    330328$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");
    331329$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\";");
    333331if($smtp_status=="enable")
    334332    $SMTPAuth="true";
     
    352350$phpmailer->FromName = "$dept_user_email";
    353351add_filter('wp_mail_content_type',create_function('', 'return "text/html"; '));
    354 $phpmailer->Subject    =$subject;
    355 $phpmailer->Body       = key4ce_wpetss_forum_text($usermessage);                      //HTML Body
     352$phpmailer->Subject    =$user_email_subject;
     353$phpmailer->Body       = key4ce_wpetss_forum_text($user_email_template);                      //HTML Body
    356354$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>' . $usermessage);
     355$phpmailer->MsgHTML('<div style="display: none;">-- do not reply below this line -- <br/><br/></div>' . $user_email_template);
    358356$phpmailer->AddAddress($to);
    359357$phpmailer->Send();
     
    365363$phpmailer->addReplyTo($dept_user_email, $dept_user_name);
    366364add_filter('wp_mail_content_type',create_function('', 'return "text/html"; '));
    367 $phpmailer->Subject = $subject;
    368 $phpmailer->Body       = key4ce_wpetss_forum_text($usermessage);   
    369 $phpmailer->MsgHTML('<div style="display: none;">-- do not reply below this line -- <br/><br/></div>' . $usermessage);
     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);
    370368$phpmailer->AltBody = 'This is a plain-text message body';
    371369$phpmailer->AddAddress($wp_user_email_id);
  • key4ce-osticket-bridge/trunk/admin/db-settings.php

    r1119633 r1226493  
    55global $wpdb;
    66$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;
    89$adminreply=$adminreply->text;
    910$arname='Admin-Response';
     
    1213$postsubmail=$postsubmail->subject;
    1314
    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;
    1516$newticket=$newticket->text;
    1617$ntname='New-Ticket';
    1718
    1819$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;
    1921$postconfirm=$postconfirm->text;
    2022$pcname='Post-Confirmation';
     
    2325$poconsubmail=$poconsubmail->subject;
    2426
     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
    2534# ==============================================================================================
    2635# Open os_ticket_config in wp_options so we can connect to osTicket v1.9+
     
    252261if($keyost_version==194 || $keyost_version==195 || $keyost_version==1951)
    253262{
    254 $ticketinfo=$ost_wpdb->get_row("SELECT $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
     263$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
    255264INNER JOIN $dept_table ON $dept_table.dept_id=$ticket_table.dept_id
    256265INNER JOIN $ost_user ON $ost_user.id=$ticket_table.user_id
     
    258267INNER JOIN $ost_useremail ON $ost_useremail.user_id=$ticket_table.user_id
    259268INNER JOIN $ost_ticket_status ON $ost_ticket_status.id = $ticket_table.status_id
     269LEFT JOIN $topic_table ON $topic_table.topic_id=$ticket_table.topic_id
    260270LEFT JOIN $ticket_cdata on $ticket_cdata.ticket_id = $ticket_table.ticket_id WHERE `number` ='$ticket'");
    261271}
    262272else{
    263 $ticketinfo=$ost_wpdb->get_row("SELECT $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 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'");
    264274}
    265275$threadinfo=$ost_wpdb->get_results("
     
    297307if($keyost_version==194 || $keyost_version==195 || $keyost_version==1951)
    298308{
    299 $sql="SELECT $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
     309$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
    300310FROM $ticket_table
    301311LEFT JOIN $ticket_cdata ON $ticket_cdata.ticket_id = $ticket_table.ticket_id
    302312INNER JOIN $dept_table ON $dept_table.dept_id=$ticket_table.dept_id
     313LEFT JOIN $topic_table ON $topic_table.topic_id=$ticket_table.topic_id
    303314INNER JOIN $ost_ticket_status ON $ost_ticket_status.id = $ticket_table.status_id";
    304315}
    305316else
    306317{
    307 $sql="SELECT $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
     318$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
    308319FROM $ticket_table
    309320LEFT JOIN $ticket_cdata ON $ticket_cdata.ticket_id = $ticket_table.ticket_id
     321LEFT JOIN $topic_table ON $topic_table.topic_id=$ticket_table.topic_id
    310322INNER JOIN $dept_table ON $dept_table.dept_id=$ticket_table.dept_id";
    311323}
     
    439451if(isset($_REQUEST['ost-admin-reply'])) {
    440452$form_admintreply=Format::stripslashes($_POST['form_admintreply']);
     453$form_admintreply_subject=@Format::stripslashes($_POST['form_admintreply_subject']);
    441454$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'));
    443456?>
    444457<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>
     
    451464if(isset($_REQUEST['ost-new-ticket'])) {
    452465$form_newticket=@Format::stripslashes($_POST['form_newticket']);
     466$form_newticket_subject=@Format::stripslashes($_POST['form_newticket_subject']);
    453467$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'));
    455469?>
    456470<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>
     
    463477if(isset($_REQUEST['ost-post-confirmed'])) {
    464478$form_postconfirmed=Format::stripslashes($_POST['form_postconfirmed']);
     479$form_postconfirmed_subject=Format::stripslashes($_POST['form_postconfirmed_subject']);
    465480$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'));
    467482?>
    468483<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>
    469484<?php } ?>
     485<?php
     486# ==============================================================================================
     487# Admin New Ticket Email Template - sent to user w/message included - used in ost-emailtemp
     488# ==============================================================================================
     489require_once( WP_PLUGIN_DIR . '/key4ce-osticket-bridge/includes/functions.php' );
     490if(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  
    2222<?php
    2323if($parurl=="page=ost-tickets") {
    24 if (($newticket=="") || ($adminreply=="") || ($postconfirm==""))
     24if (($newticket=="") || ($adminreply=="") || ($postconfirm=="")  || ($adminnewticket==""))
    2525    {
    2626    echo '<div id="warning"><b>Warning:</b>'.__('1 or more of your email templates is not setup', 'key4ce-osticket-bridge').'&nbsp;&raquo;&nbsp;<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  
    55?>
    66<?php
     7$time_format=key4ce_getKeyValue('time_format');
     8$date_format=key4ce_getKeyValue('date_format');
     9$datetime_format=key4ce_getKeyValue('datetime_format');
    710echo '<link rel="stylesheet" type="text/css" media="all" href="'.plugin_dir_url(__FILE__).'../css/stylesheet.css">';
    811$parurl=$_SERVER['QUERY_STRING'];
     
    3841<?php
    3942if($parurl=="page=ost-tickets") {
    40 if (($newticket=="") || ($adminreply=="") || ($postconfirm==""))
     43if (($newticket=="") || ($adminreply=="") || ($postconfirm=="") || ($adminnewticket==""))
    4144    {
    4245    echo '<div id="warning"><b>'.__("Warning:", 'key4ce-osticket-bridge').'</b>'.__("1 or more of your email templates is not setup", 'key4ce-osticket-bridge').'&nbsp;&raquo;&nbsp;<a href="admin.php?page=ost-emailtemp">'.__("Click Here", 'key4ce-osticket-bridge').'</a></div>';
  • key4ce-osticket-bridge/trunk/admin/ost-config.php

    r1119633 r1226493  
    2323    @$contactticketpage=$_REQUEST['contactticketpage'];
    2424    @$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);         
    2628    if (($_REQUEST['host']=="") || ($_REQUEST['database']=="") || ($_REQUEST['username']=="") || ($_REQUEST['supportpage']=="") )
    2729    {
     
    199201</td>
    200202</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;?>"/>&nbsp;&nbsp;<?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;?>"/>&nbsp;&nbsp;<?php echo __("(Your Google reCAPTCHA Sitekey Goest Here)", 'key4ce-osticket-bridge'); ?></td>
     210</tr>
    201211</table>
    202212<div style="padding: 30px;">
  • key4ce-osticket-bridge/trunk/admin/ost-emailtemp.php

    r1119633 r1226493  
    44*/
    55?>
     6<style>.form_newticket_subject{ border: 2px solid #ccc !important;border-radius: 7px;width: 400px;}</style>
    67<?php require_once( WP_PLUGIN_DIR . '/key4ce-osticket-bridge/includes/udscript.php' ); ?>
    78<div class="key4ce_wrap">
     
    3031?>
    3132<!--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>&nbsp;&raquo;&nbsp;<a href="javascript:doMenu('main2');" id="xmain2">[<?php echo __("Open", 'key4ce-osticket-bridge'); ?>]</a>&nbsp;&nbsp;<?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>&nbsp;&raquo;&nbsp;<a href="javascript:doMenu('main2');" id="xmain2">[<?php echo __("Open", 'key4ce-osticket-bridge'); ?>]</a>&nbsp;&nbsp;<?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>&nbsp;&raquo;&nbsp;<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>&nbsp;&raquo;&nbsp;<a href="javascript:doMenu('main2');" id="xmain2">[<?php echo __("Open", 'key4ce-osticket-bridge'); ?>]</a>&nbsp;&nbsp;<?php echo __("We suggest using this template in the user confirmation email below.", 'key4ce-osticket-bridge'); ?></div>
    3370<div style="clear: both"></div>
    3471<div id="main2" style="display: none;">
     
    4077<div id="main3" style="display: block;">
    4178<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>   
    4280<textarea name="form_newticket" rows="18" id="emailtemp" value=""><?php echo $newticket; ?></textarea>
    4381<div style="clear: both"></div>
     
    4684</div>
    4785</form>
    48 </div>
     86</div>-->
    4987<!--Admin Ticket Reply Email Template-->
    5088<div style="padding-left:15px;padding-bottom:5px;padding-top:40px;"><b>*<?php echo __("Admin Response Email Template", 'key4ce-osticket-bridge'); ?></b>&nbsp;&raquo;&nbsp;<a href="javascript:doMenu('main4');" id="xmain4">[<?php echo __("Open", 'key4ce-osticket-bridge'); ?>]</a>&nbsp;&nbsp;<?php echo __("We suggest using this template in your post reply to user below.", 'key4ce-osticket-bridge'); ?></div>
     
    5896<div id="main5" style="display: block;">
    5997<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>   
    60100<textarea name="form_admintreply" rows="16" id="emailtemp" value=""><?php echo $adminreply; ?></textarea>
    61101<div style="clear: both"></div>
     
    77117<div id="main7" style="display: block;">
    78118<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>
    79120<textarea name="form_postconfirmed" rows="18" id="emailtemp" value=""><?php echo $postconfirm; ?></textarea>
    80121<div style="clear: both"></div>
  • key4ce-osticket-bridge/trunk/admin/ost-postreplymail.php

    r1121801 r1226493  
    88INNER JOIN $ost_email ON $ost_email.email_id=$dept_table.email_id
    99WHERE `number`=$ticket_number");
     10if($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}
     17else
     18{
    1019$ticket_detail_dept_name=$ticket_details->name;
    1120$ticket_detail_dept_email=$ticket_details->email;
     21}
     22
    1223$signature=$ticket_details->dept_signature;
    1324$department_id=$ticket_details->dept_id;
     
    152163    $SMTPAuth="true";
    153164else
    154     $SMTPAuth="false"; 
     165    $SMTPAuth="false";
    155166require_once ABSPATH . WPINC . '/class-phpmailer.php';
    156 require_once ABSPATH . WPINC . '/class-smtp.php';
    157167$phpmailer = new PHPMailer();
    158168if($smtp_status=="enable")
    159169{
    160 $phpmailer = new PHPMailer();
     170require_once ABSPATH . WPINC . '/class-smtp.php';
    161171$phpmailer->SMTPAuth =true;
    162172$phpmailer->Username = $smtp_username;
     
    169179$phpmailer->From =  "$ticket_detail_dept_email";
    170180$phpmailer->FromName = "$ticket_detail_dept_name";
     181$phpmailer->addReplyTo("$ticket_detail_dept_email", "$ticket_detail_dept_name");
    171182add_filter('wp_mail_content_type',create_function('', 'return "text/html"; '));
    172183$phpmailer->Subject    =$subject;
     
    180191{
    181192$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);
     199add_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");
    184208$phpmailer->addAddress($to);
    185209add_filter('wp_mail_content_type',create_function('', 'return "text/html"; '));
     
    188212$phpmailer->AltBody = 'This is a plain-text message body';
    189213$phpmailer->send();
     214*/
    190215}
    191216?>
  • key4ce-osticket-bridge/trunk/admin/ost-tickets.php

    r1119633 r1226493  
    22require_once( WP_PLUGIN_DIR . '/key4ce-osticket-bridge/admin/db-settings.php' );
    33require_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');
    47if(isset($_POST['delete']))
    58{   
     
    7174     }
    7275 }
     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
    7389</script>
     90<style>
     91.key4ce_table {
     92    margin-bottom: 20px;
     93    max-width: 100%;
     94    width: 100%;
     95}
     96table {
     97    background-color: transparent;
     98}
     99table {
     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}
     108th {
     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
     118td, 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>
    74141<form name="ticketview" id="ticketview" method="post" onSubmit="if(!confirm('<?php echo __("Are you sure you want to continue?", 'key4ce-osticket-bridge'); ?>')){return false;}">
    75142<div class="key4ce_wrap">
     
    79146    <div style="clear: both"></div>
    80147<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">
    91149<?php
    92150if($list_opt)
    93151{
    94     function ezDate($d) {
     152function ezDate($d) {
    95153        $ts = time() - strtotime(str_replace("-","/",$d));
    96154        if($ts>31536000) $val = round($ts/31536000,0).' year';
     
    104162        return $val;
    105163    }
    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     else   
    127             $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     else
    157     {
    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     }
    160164?>
    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}
     264else
     265{
     266    echo "No Records Found";
     267}
     268?>
     269</table>
    162270<div align="center" style="padding-top:15px;"></div>
    163271<div style="clear: both"></div>
  • key4ce-osticket-bridge/trunk/admin/ost-ticketview.php

    r1121801 r1226493  
    11<?php
    22require_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');
    36// Start File system changes
    47if($keyost_version==193)
     
    3437        var addDiv = $('#addinput');
    3538        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; ?>;
    3740        $('#addNew').live('click', function() {
    3841            if (i <= MaxFileInputs)
     
    6871        var FileSizeMB = (FileSize / 10485760).toFixed(2);
    6972        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; ?>))
    7174        {
    7275            alert("<?php echo __("Please make sure your file is less than", 'key4ce-osticket-bridge'); ?><?php echo ($max_file_size * .0009765625) * .0009765625; ?>MB.");
     
    101104    </div>
    102105    <div id="key4ce_tic_info_box">
    103         <table>
     106        <table>
    104107            <tr>
    105108                <td><b><?php echo __("Ticket Status", 'key4ce-osticket-bridge'); ?>:</b></td>
     
    126129            <tr>
    127130                <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>
    129132                <td><b><?php echo __("Priority", 'key4ce-osticket-bridge'); ?>:</b></td>
    130133                <td>
     
    149152                </td>
    150153            </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>
    151158        </table>
    152159    </div>
     
    169176                <tbody>
    170177                    <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>
    172179                    </tr>
    173180                    <tr>
     
    217224                    <input type="hidden" name="usemail" value="<?php echo $ticketinfo->address; ?>"/>
    218225                    <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; ?>"/>
    221228                    <input type="hidden" name="ustopicid" value="<?php //echo $ticketinfo->topic_id; ?>"/>
    222229                    <input type="hidden" name="ademail" value="<?php echo $os_admin_email; ?>"/>
     
    242249                    <div id="addinput">
    243250                        <p>
    244                             <span style="color:#000;"><?php echo __("Attachment 1:", 'key4ce-osticket-bridge'); ?></span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type="file" id="p_new" name="file[]" onchange="return checkFile(this);"/>&nbsp;&nbsp;&nbsp;<a href="#" id="addNew"><?php echo __("Add", 'key4ce-osticket-bridge'); ?></a>&nbsp;&nbsp;&nbsp;<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>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type="file" id="p_new" name="file[]" onchange="return checkFile(this);"/>&nbsp;&nbsp;&nbsp;<a href="#" id="addNew"><?php echo __("Add", 'key4ce-osticket-bridge'); ?></a>&nbsp;&nbsp;&nbsp;<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>
    245252                        </p>
    246253                    </div>
  • key4ce-osticket-bridge/trunk/css/admin-style.css

    r1119633 r1226493  
    142142#key4ce_ticket_menu1 {
    143143    display: table-cell;
    144       width: 10%;
     144    width: 8%;
    145145    margin: 10px 0px 10px 15px;
    146146    padding: 10px;
     
    152152    display: table-cell;
    153153    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;
    156159    border-top:2px solid #d6d5d5;
    157160    border-bottom:1px solid #d6d5d5;
     
    162165    width: 10%;
    163166    margin: 10px 0px 10px 0px;
    164     padding: 10px;
     167    /*padding: 10px;*/     
     168    padding-left: 5px;
    165169    border-top:2px solid #d6d5d5;
    166170    border-bottom:1px solid #d6d5d5;
     
    170174    width: 10%;
    171175    margin: 10px 0px 10px 0px;
    172     padding: 10px;
     176    /*padding: 10px;*/ 
    173177    border-top:2px solid #d6d5d5;
    174178    border-bottom:1px solid #d6d5d5;
     
    228232    padding: 10px;
    229233    border-bottom:1px solid #e0e0e0;
    230     width: 63%;
     234    width: 50%;
    231235}
    232236#key4ce_ticket_list3 {
     
    236240}
    237241#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;
    241245    border-bottom:1px solid #e0e0e0;
    242246}
    243247#key4ce_ticket_list5 {
    244     width: 100px;
     248    width: 335px;
    245249    display: table-cell;
    246250    padding: 10px;
     
    479483    float: left;
    480484}
     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
    481499#key4ce_new_ticket_priority {
    482500    padding-top:10px;
     
    492510}
    493511.key4ce_error {
     512    color: #FF0000;
     513}
     514.error {
    494515    color: #FF0000;
    495516}
  • key4ce-osticket-bridge/trunk/css/style.css

    r1119633 r1226493  
    264264    font-family: arial;
    265265}
     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}
    266273
    267274#key4ce_ticket_menu1 {
    268275    display: table-cell;
    269     width: 10%;
    270276    margin: 10px 0px 10px 15px;
    271277    padding: 10px;
    272278    border-top:2px solid #d6d5d5;
    273279    border-bottom:1px solid #d6d5d5;
    274 
     280    width:10%;
    275281}
    276282#key4ce_ticket_menu2 {
     
    281287    border-top:2px solid #d6d5d5;
    282288    border-bottom:1px solid #d6d5d5;
    283 
     289    width:45%;
    284290}
    285291#key4ce_ticket_menu3 {
    286292    display: table-cell;
    287     width: 150px;
    288293    margin: 10px 0px 10px 0px;
    289294    padding: 10px;
    290295    border-top:2px solid #d6d5d5;
    291296    border-bottom:1px solid #d6d5d5;
     297    width:10%;
    292298}
    293299#key4ce_ticket_menu4 {
    294300    display: table-cell;
    295     width: 150px;
    296301    margin: 10px 0px 10px 0px;
    297302    padding: 10px;
    298303    border-top:2px solid #d6d5d5;
    299304    border-bottom:1px solid #d6d5d5;
    300 
     305    width:10%;
    301306}
    302307#key4ce_ticket_menu5 {
    303308    display: table-cell;
    304     width: 100px;
    305309    margin: 10px 0px 10px 0px;
    306310    padding: 10px;
    307311    border-top:2px solid #d6d5d5;
    308312    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%;
    310322}
    311323#key4ce_ticket_list:nth-child(odd) {
     
    324336    font-family: arial;
    325337}
    326 
     338#key4ce_ticket_list0
     339{
     340border-bottom:1px solid #e0e0e0;
     341display: table-cell;
     342    margin: 10px 0px 10px 15px;
     343    padding: 10px;
     344}
    327345#key4ce_ticket_list1 {
    328     width: 100px;
     346    width: 10%;
    329347    padding: 10px;
    330348    display: table-cell;
     
    342360    display: table-cell;
    343361    padding: 10px;
    344     border-bottom:1px solid #e0e0e0;
     362    border-bottom:1px solid #e0e0e0;       
     363    width: 45%;
    345364}
    346365#key4ce_ticket_list3 {
    347     width: 150px;
     366    width: 10%;
    348367    display: table-cell;
    349368    padding: 10px;
     
    352371}
    353372#key4ce_ticket_list4 {
    354     width: 150px;
     373    width: 10%;
    355374    display: table-cell;
    356375    padding: 10px;
     
    358377}
    359378#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%;
    361386    display: table-cell;
    362387    padding: 10px;
     
    649674    color: #FF0000;
    650675}
     676.error {
     677    color: #FF0000;
     678}
    651679#key4ce_msg_notice {
    652680  margin: 20px 20px 20px 20px;
     
    678706  border: 1px solid #a00;
    679707  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  
    5151$prid = $ost_wpdb->get_row("SELECT priority_desc FROM $priority_table WHERE priority_id=$pri_id");
    5252$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;
     55if(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}
     60if (isset($_REQUEST['create-contact-ticket']) && $response['success']==true) {
    5461// Added by Pratik Maniar on 29-04-2014 Start Here
    5562    $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  
    77global $wpdb;
    88$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'");
    1010$adminreply=$adminreply->text;
     11$form_admintreply_subject=$adminreply->subject;
    1112$arname='Admin-Response';
    1213
    1314$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;
    1516
    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;
    1718$newticket=$newticket->text;
    1819$ntname='New-Ticket';
     
    3940        $ost_useremail = $keyost_prefix . "user_email";
    4041        $ost_ticket_attachment = $keyost_prefix . "ticket_attachment";
    41         $ost_ticket_status=$keyost_prefix."ticket_status";
    42        
     42        $ost_ticket_status=$keyost_prefix."ticket_status";     
    4343        $ost_file = $keyost_prefix . "file";
    4444if($keyost_version==194 || $keyost_version==195 || $keyost_version==1951)
     
    6161if(isset($ticket))
    6262{
    63 $ticketinfo=$ost_wpdb->get_row("SELECT $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 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'");
    6464}
    6565}
     
    110110{
    111111$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_name
     112$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
    113113FROM $ticket_table
    114114LEFT JOIN $ticket_cdata ON $ticket_cdata.ticket_id = $ticket_table.ticket_id
    115115INNER JOIN $dept_table ON $dept_table.dept_id = $ticket_table.dept_id
     116LEFT JOIN $topic_table ON $topic_table.topic_id=$ticket_table.topic_id
    116117INNER JOIN $ost_ticket_status ON $ost_ticket_status.id=$ticket_table.status_id
    117118WHERE $ticket_table.user_id =$user_id";
     
    120121{
    121122$sql="";
    122 $sql="SELECT $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$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
    123124      FROM $ticket_table
    124125      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
    125127      INNER JOIN $dept_table ON $dept_table.dept_id = $ticket_table.dept_id WHERE $ticket_table.user_id =$user_id";
    126128}
  • key4ce-osticket-bridge/trunk/includes/versionData.php

    r1119633 r1226493  
    11<?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 ");
    33$pri_opt = $ost_wpdb->get_results("SELECT priority_desc,priority_id FROM $priority_table");
    44$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 }
     1function 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  
    33Plugin Name: Key4ce osTicket Bridge
    44Plugin URI: https://key4ce.com/projects/key4ce-osticket-bridge
    5 Description: Integrate osTicket (v1.9.3 - 1.9.6) into wordpress. including user integration and scp
    6 Version: 1.2.9
     5Description: Integrate osTicket (v1.9.3 - 1.9.11) into wordpress. including user integration and scp
     6Version: 1.3.0
    77Author: Key4ce
    88Author URI: https://key4ce.com
     
    286286   'created' => current_time('mysql'),
    287287   '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   ));
    289302   // } 
    290303}
  • key4ce-osticket-bridge/trunk/osticket-wp.php

    r1126426 r1226493  
    2525        $poconsubmail = $wpdb->get_row("SELECT id,name,$ostemail.subject,text,created,updated FROM $ostemail where name = 'Post-Confirmation'");
    2626        $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
    2833        $ost_wpdb = new wpdb($username, $password, $database, $host);
    2934        global $current_user;
  • key4ce-osticket-bridge/trunk/readme.txt

    r1149912 r1226493  
    11=== Key4ce osTicket Bridge ===
     2
    23Contributors: key4ce, m.tiggelaar
     4
    35Tags: helpdesk, support, ticket, osticket, bridge, email, email ticket system
     6
    47Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=paypal%40key4ce%2ecom
     8
    59Requires at least: 3.5
     10
    611Tested up to: 4.2
    7 Stable tag: 1.2.9
     12
     13Stable tag: 1.3.0
     14
    815License: GPLv3
     16
    917License 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
     19Get 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
    1122
    1223== Description ==
     24
    1325This is a rebuild of the original OSTicket WP Bridge plugin
     26
    1427Because the original plugin was no longer developed we decided to make a new plugin out of it.
     28
    1529adding new features, fixing old bugs and security flaws.
    1630
     31
     32
    1733= Basic Features: =
    18 * Compatible with osTicket 1.9.3 - 1.9.7
     34
     35* Compatible with osTicket 1.9.3 - 1.9.11
     36
    1937* POP / IMAP functionality stays intact
     38
    2039* You can use both osTicket scp, reply to email OR use Wordpress for all tickets
     40
    2141* Integrates with your Wordpress users
     42
    2243* Good work-flow of Open, Answered and Closed tickets.
     44
    2345* Contact form shortcode
     46
    2447* Multiple file attachments
     48
    2549* HTML Email templates.
     50
    2651* Admin and Department signatures from osTicket.
     52
    2753* Create ticket as Admin.
     54
    2855* Multi-language support
    2956
     57
     58
    3059= Features scheduled for next release: =
    31 - Add Topic functionality to create tickets.
     60
    3261- 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
    3467
    3568= Translations available =
     69
    3670* English
     71
    3772* Dutch
     73
    3874* Arabic - by mbnoimi
     75
    3976* German - by Adrian Oeschger
     77
    4078* If you would like to contribute your own language please don't hesitate to contact us!
    4179
     80
     81
    4282= If you like this plugin please leave a good review behind and help us to promote it. =
     83
    4384This plugin is powered by Key4ce - IT Professionals :: https://key4ce.com
    4485
     86
     87
    4588== Installation ==
    4689
     90
     91
    4792= Prerequisites: =
     93
    4894* 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
    5098* osTicket can be downloaded from http://osticket.com/download
     99
    51100* For Attachments to work with the Key4ce osTicket Bridge plugin, please download and configure the osTicket plugin: Storage :: Attachments on the Filesystem
     101
    52102* 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
    54106* 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
    55108* Create a Thank You Page for all ticket submissions
    56109
     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
    57116= Shortcodes: =
     117
    58118[addosticket] Ticket listing and creation of tickets for logged in customers/clients (see Screenshots tab).
     119
    59120[addoscontact] Guest ticket submission form with CAPTCHA (a WordPress user login is not required to submit a ticket - see Screenshots tab).
     121
    60122[addosopenticketcount] Display the amount of open tickets for the logged in user anywhere in wordpress.
    61123
     124
     125
    62126= Install Instructions: =
     127
    631281. Install key4ce-osticket-bridge folder to the /wp-content/plugins/ directory.
     129
    641302. Activate the plugin through the "Plugins" menu in WordPress.
     131
    651323. 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
    661344. osTicket DB configuration settings are located in Dashboard--> Tickets --> Settings
     135
    671365. Email template settings are located in Dashboard--> Tickets--> Email Templates
    68137
     1386. Add a contact page and a thank you page for [addoscontact]
     139
     1407. Set the landing page (ticket list + create ticket page)
     141
     1428. Set the contact page and Contact thank you page
     143
     1449. Set googles re-captcha keys for the contact page (can be found at: https://www.google.com/recaptcha/admin#list)
     145
     146
     147
    69148= IMPORTANT NOTE: =
     149
    70150You 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).
    71151
     152
     153
    72154== Frequently Asked Questions ==
    73155
     156
     157
    74158= Where does the osTicket need to be Installed? =
     159
    75160Can be anywhere, just make sure you know it's Database settings and fill them in accordingly in osT-Config page.
    76161
     162
     163
    77164= What version of osTicket can i use? =
    78 osTicket v1.9.3 to v1.9.7 (all subversions are generally supported).
     165
     166osTicket v1.9.3 to v1.9.11 (all subversions are generally supported).
     167
     168
    79169
    80170= Where can I download the tested osTicket versions? =
     171
    81172http://osticket.com/download
    82173
     174
     175
    83176== Screenshots ==
    84177
     178
     179
    851801. Shows the Client ticket list.
     181
    861822. Shows how the client views the ticket.
     183
    871843. Shows how the Wordpress admin views the ticket list.
     185
    881864. Shows how the Wordpress admin views the
     187
    891885. Shows the [addoscontact] shortcode forms
     189
    901906. HTML Email template example (with signature).
    91191
     192
     193
    92194== 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
    93204= 1.2.9 =
     205
    94206- Added additional File attachment functionality to ignore empty extensions
     207
    95208- Fixed up queries for shortcode/ forum contact page
    96209
     210
     211
    97212= 1.2.8 =
     213
    98214- Added support for 1.9.5.1 and 1.9.6
     215
    99216- fixed Attachment support for higher versions
    100217
     218
     219
    101220= 1.2.7 =
     221
    102222- Functions all have prefixes to avoid conflicts with other plugins
     223
    103224- Multi language support added
    104225
     226
     227
    105228= 1.2.6 =
     229
    106230- Fixes for 1.9.4 fresh installation
     231
    107232- Email customer reply fix
    108233
     234
     235
    109236= 1.2.5 =
     237
    110238- osticket 1.9.4 support added
     239
    111240- added osticket version selection
    112241
     242
     243
    113244= 1.2.4 =
     245
    114246- Open ticket count fixed
     247
    115248- Option to enable ticket close for client
     249
    116250- Client layout fixed
     251
    117252- Client main page fixed
     253
    118254- Small other changes in code.
    119255
     256
     257
    120258= 1.2.3 =
     259
    121260- Admin can create tickets with auto search in WP Database.
     261
    122262- Mass close tickets on client ticket listing.
     263
    123264- Shortcode for viewing open tickets
     265
    124266- File attachment error in Admin fixed.
     267
    125268- Bugged users will now be automatically updated and fixed.
     269
    126270- contact form bug fixed.
    127271
     272
     273
    128274= 1.2.2 =
     275
    129276- Multiple file attachments
     277
    130278- File attachment location from osTicket
     279
    131280- mysql query fix- contact form sender name and email fix.
     281
    132282- minor issues fixed.- updated installations (Contributed by: DivaVocals)
    133283
     284
     285
    134286= 1.2.1 =
     287
    135288- Fixed infected javascript files.
    136289
     290
     291
    137292= 1.2.0 =
     293
    138294- Single file Attachments
     295
    139296- File Attachement configuration based on OSticket(Filesize,File Type,File Attachement enable/disable)
     297
    140298- Corrected Admin ticket counting (Open,Closed,Answered,All)
     299
    141300- HTML Email Template
     301
    142302- Admin and Department Signature in Email template (based up on osTicket signature)
     303
    143304- Mass delete/ Close tickets from Admin ticket listing
     305
    144306- Fixed names in ticket thread
     307
    145308- Fixed time equal to osTicket settings.
     309
    146310- Tested with Wordpress 4.0
    147311
     312
     313
    148314= 1.1.5 =
     315
    149316- Shortcode for Contact style form with captcha
     317
    150318- Shortcode placement fix for ticket list and ticket create
     319
    151320- CSS/ JS inclusion fix ** Submitted by Steffen Andre Langnes **
     321
    152322- Login Redirect ** Submitted by Steffen Andre Langnes **
    153323
     324
     325
    154326= 1.1.4 =
     327
    155328- Prefix fix for existing plugin users
     329
    156330- mysql DB errors fixed- RevSlider conflict fixed
     331
    157332- Activate / Deactivate warning messages fixed.
     333
    158334- If wrong database info blank page issue fixed.
    159335
     336
     337
    160338= 1.1.3 =
     339
    161340- Added database keyost_prefix field
     341
    162342- Fixed mysql bugs
     343
    163344- Fixed first time user issue.
     345
    164346- Headers already sent fixed.
     347
    165348- Creating multiple ticket pages on save has been resolved.
    166349
     350
     351
    167352= 1.1.2 =
     353
    168354- Shows name in ticket threads.
     355
    169356- SMTP save field fix- Offline / Offline mode fix
     357
    170358- Cleaned up legacy code
    171359
     360
     361
    172362= 1.1.1 =
     363
    173364- Shortcode redirect fix
     365
    174366- Login fields added
     367
    175368- Register link with redirect added
     369
    176370- Premalink related issues fixed
     371
    177372- Adding new users to OSticket fixed
     373
    178374- Form validation fixed
    179375
     376
     377
    180378= 1.1 =
     379
    181380- Shortcode implementation
     381
    182382- Cleaned up code issues
     383
    183384- Admin Alert Email now looks into group members aswell
     385
    184386- implemented Reply Separator Tag- Fixed: Email From name
     387
    185388- Fixed: Many code warnings and errors in Debug mode- And much more..
    186389
     390
     391
    187392= 1.0 =
     393
    188394- New design for both Admin and Client end
     395
    189396- Uses OSTicket email address and name based up on the department
     397
    190398- Full HTML capable with rich text editor for both client and admin
     399
    191400- Admin side menu displays the amount of open tickets
     401
    192402- Displays "Open tickets" in the top admin menu when open tickets are available Displays "Support tickets" when no open ticket is available.
     403
    193404- Added Answered status to both admin and client side
     405
    194406- Security Fix: Client no longer able to see everyones ticket by entering the ticket id in the url.
     407
    195408- Fix: User/ priority/ status fields compatible with OSTicket 1.9
     409
    196410- Fix: Using department instead of Topic
     411
    197412- Fix: If not logged in to Wordpress it will redirect you to the Wordpress login (works with Theme my login plugin)
    198413
     414
     415
    199416== Upgrade Notice ==
     417
     418= 1.3.0 =
     419Added help topic functionality, added email subjects to mail templates, google re-captcha to contact page, fixed time issue, and more..
     420
    200421= 1.2.9 =
     422
    201423Added better attachment support and fixed up some queries for contact page.
    202424
     425
     426
    203427= 1.2.8 =
     428
    204429Added support for 1.9.5.1 and 1.9.6
    205430
     431
     432
    206433= 1.2.7 =
     434
    207435Added multi language support.
    208436
     437
     438
    209439= 1.2.6 =
     440
    210441Added osticket 1.9.4 fresh installation support and small email customer reply bug.
    211442
     443
     444
    212445= 1.2.5 =
     446
    213447Added osticket 1.9.4 support.
    214448
     449
     450
    215451= 1.2.4 =
     452
    216453Option to enable or disable client close ticket feature, and small bug fixes.
    217454
     455
     456
    218457= 1.2.3 =
     458
    219459Several minor bug fixes, new Admin create ticket functionality, and more..
    220460
     461
     462
    221463= 1.2.2 =
     464
    222465Multiple file atachment now possible, and small bug fixes have been made.
    223466
     467
     468
    224469= 1.2.1 =
     470
    225471Emergency update: Javascripts where infected please update asap. Our apologies for the inconvenience
    226472
     473
     474
    227475= 1.2.0 =
     476
    228477Multiple new and convenient features, Attachments, signatures and more.
    229478
     479
     480
    230481= 1.1.5 =
     482
    231483Shortcode fixes, css/js inclusion fixes, new Contact style shortcode
    232484
     485
     486
    233487= 1.1.4 =
     488
    234489Urgent update fixing multiple issues caused by update 1.1.3.
    235490
     491
     492
    236493= 1.1.3 =
     494
    237495Database keyost_prefix field added, and mysql bugs fixed.
    238496
     497
     498
    239499= 1.1.2 =
     500
    240501Minor update: Cleaned up legacy code and fixed:smtp fields and offline mode
    241502
     503
     504
    242505= 1.1.1 =
     506
    243507Shortcode related issues fixed, osTicket user related issues fixed.
    244508
     509
     510
    245511= 1.1 =
     512
    246513Shortcode implementation and many code fixes.
    247514
     515
     516
    248517= 1.0 =
     518
    249519Initial version
  • key4ce-osticket-bridge/trunk/templates/contact_ticket.php

    r1119633 r1226493  
    2020require_once(WP_PLUGIN_DIR .'/key4ce-osticket-bridge/osticket-wp.php' );
    2121require_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;
    2324$url = plugins_url();
    2425$default_email_id = $ost_wpdb->get_var("SELECT value FROM " . $keyost_prefix . "config WHERE `key` LIKE 'default_email_id'");
     
    3031#key4ce_message-html{height: 25px;}
    3132#key4ce_message-tmce{height: 25px;}
     33.entry-content{max-width: 700px;}
    3234</style>
    3335<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>
    3537<?php
    36 if(isset($_REQUEST['create-contact-ticket']) && isset($_REQUEST["magicword"]) &&  $_REQUEST["magicword"]!="" && strtolower($_SESSION ["captcha"]["code"])==strtolower($_REQUEST["magicword"]))
     38if(isset($_POST['g-recaptcha-response']))
    3739{
    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);
    3942?>
    40 
    4143<div class="key4ce_clear" style="padding: 5px;"></div>
    4244<p id="key4ce_msg_notice"><?php echo __('A new request has been created successfully!','key4ce-osticket-bridge'); ?></p>
     
    5052</p>
    5153<?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}
     55else
     56{
    5657?>
     58<form id="ContactticketForm" name="contactticket" method="post" enctype="multipart/form-data" onsubmit="return validateFormContactTicket();">
     59<div id="key4ce_thContainer">
    5760<div id="key4ce_new_ticket">
    5861<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>
    5962<div style="clear: both"></div>
    60 <form id="ContactticketForm" name="contactticket" method="post" enctype="multipart/form-data" onsubmit="return validateFormContactTicket();">
    6163            <input type="hidden" name="stitle" value="<?php echo $title_name; ?>"/>
    6264            <input type="hidden" name="sdirna" value="<?php echo $dirname; ?>"/>
     
    7981?>
    8082</select><font class="error">&nbsp;*</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">&nbsp;*</font>
     96        </div>
     97<div style="clear: both"></div>         <!-- Help Topic End Here -->
    8298<input type="hidden" value="2" name="priorityId" id="priority"/>
    8399<div id="key4ce_new_ticket_subject"><?php echo __('Subject','key4ce-osticket-bridge'); ?>:</div>
     
    86102<div style="clear: both"></div>
    87103</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">
    89105<tr>
    90106<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">&nbsp;*</font></div></td>
    91107</tr>
    92 
    93108<tr>
    94109<td class="key4ce_nobd" align="center">
     
    101116</tr>
    102117<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>
    106119</td></tr>
    107120<tr>
     
    109122<p align="center" style="padding-top: 5px;"><input type="submit" name="create-contact-ticket" value="<?php echo __('Submit','key4ce-osticket-bridge'); ?>">
    110123&nbsp;&nbsp;<input type="reset" value="<?php echo __('Reset','key4ce-osticket-bridge'); ?>"></p>
    111 </form>
    112124</td>
    113125</tr>
    114126</table>
    115127</div>
    116 <?php } ?>
     128</form>
     129<?php
     130}
     131?>
     132
    117133<div class="key4ce_clear" style="padding: 10px;"></div>
  • key4ce-osticket-bridge/trunk/templates/list_tickets.php

    r1119633 r1226493  
    22/* Template Name: list_tickets.php */
    33?>
     4<style>
     5    .entry-content{max-width: 700px !important;}
     6</style>
    47<script type="text/javascript">
    58function checkAll(ele) {
     
    2023     }
    2124 }
     25  $( document ).ready(function() {
     26  $('#key4ce_ticket_list .noEdit').click(function(e){
     27   e.stopPropagation();
     28});
     29});
    2230</script>
    2331<?php
     32$time_format=key4ce_getKeyValue('time_format');
     33$date_format=key4ce_getKeyValue('date_format');
     34$datetime_format=key4ce_getKeyValue('datetime_format');
    2435if(isset($_POST['close']))
    2536{       
     
    4960<div id="key4ce_ticket_menu3"><?php echo __("Status", 'key4ce-osticket-bridge'); ?></div>
    5061<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>
    5264</div>
    5365<?php
     
    8496    }
    8597    @$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) 
    8899    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>";
    89101    echo "<div id='key4ce_ticket_list1'><a href=$ticket_view>".$list->number."</a></div>";
    90102    echo "<div id='key4ce_ticket_list2'>".key4ce_truncate($sub_str,60,'...')."</div><div id='key4ce_ticket_list3'>";
     
    99111    }
    100112    echo "</div><div id='key4ce_ticket_list4'>".$list->dept_name."</div>";
     113    echo "<div id='key4ce_ticket_list5'>".$list->topic."</div>";
    101114    if ($list->updated=='0000-00-00 00:00:00') {
    102115        $input_str  = "".$list->created.""; }
    103116        else {
    104117    $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));
    107119    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>";
    109122    } }
    110123    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');
    22if($keyost_version==194 || $keyost_version==195 || $keyost_version==1951)
    33{
  • key4ce-osticket-bridge/trunk/templates/new_ticket.php

    r1121801 r1226493  
    11<?php
    22/* Template Name: new_ticket.php */
    3 
    43if($keyost_version==193)
    54{
     
    143142                </select><font class="key4ce_error">&nbsp;*</font></div>
    144143            <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">&nbsp;*</font></div>
     155            <div style="clear: both"></div>
     156            <!-- Help Topic End Here -->
    145157            <div id="key4ce_new_ticket_priority"><?php echo __('Priority:','key4ce-osticket-bridge'); ?></div>
    146158            <div id="key4ce_new_ticket_priority_input"><select id="priority" name="priorityId">
  • key4ce-osticket-bridge/trunk/templates/view_ticket.php

    r1121801 r1226493  
    11<?php
    22/* Template Name: view_ticket.php */
     3if (is_user_logged_in())
     4{
    35global $current_user;
    46get_currentuserinfo();
     7$time_format=key4ce_getKeyValue('time_format');
     8$date_format=key4ce_getKeyValue('date_format');
     9$datetime_format=key4ce_getKeyValue('datetime_format');
    510if ($ticketinfo->address == $current_user->user_email) {
    611if($keyost_version==193)
     
    9499        #key4ce_message-html{height: 25px;}
    95100        #key4ce_message-tmce{height: 25px;}
    96 
     101        .entry-content{max-width: 700px !important;}
    97102    </style>
    98103    <div id="key4ce_ticket_view">
     
    125130        </div>
    126131        <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>
    128133        <div id="key4ce_tic_phone"><?php echo __("Priority", 'key4ce-osticket-bridge'); ?>:</div>
    129134        <div id="key4ce_tic_phone_info"><?php
     
    159164            ?>
    160165        </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>
    161169        <div style="clear: both"></div>
    162170    </div>
     
    179187                    <tbody>
    180188                        <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") {
    182190            echo $ticketinfo->dept_name;
    183191        } else {
     
    229237        <table class="key4ce_welcome key4ce_nobd" align="left" width="95%" cellspacing="0" cellpadding="3">           
    230238                <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;                     ?>
    232240                        <input type="hidden" value="<?php echo $thread_info->ticket_id; ?>" name="tic_id">
    233241                        <input type="hidden" value="reply" name="a">
     
    238246                        <input type="hidden" name="usdepartment" value="<?php echo $ticketinfo->dept_name; ?>"/>
    239247                        <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; ?>"/>
    241249                        <input type="hidden" name="ustopicid" value="<?php echo $ticketinfo->topic_id; ?>"/>
    242250                        <input type="hidden" name="ademail" value="<?php echo $os_admin_email_admin; ?>"/>
     
    299307<?php } else { ?>
    300308    <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}
     311else{
     312auth_redirect();
     313}
     314?>
Note: See TracChangeset for help on using the changeset viewer.