Пример #1
0
    ?>
</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>
<?php 
}
# ==============================================================================================
# Post Confirmation Email Template - sent to user w/message included - used in ost-emailtemp
# ==============================================================================================
require_once WP_PLUGIN_DIR . '/key4ce-osticket-bridge/includes/functions.php';
if (isset($_REQUEST['ost-post-confirmed'])) {
    $form_postconfirmed = Format::stripslashes($_POST['form_postconfirmed']);
    $etdate = date("Y-m-d, g:i:s");
    $wpdb->update($ostemail, array('text' => $form_postconfirmed, 'updated' => $etdate), array('name' => $pcname), array('%s'));
    ?>
<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';
    ?>
Пример #2
0
            echo '<div style="color: Black;">' . __("Low", 'key4ce-osticket-bridge') . '</div>';
        } elseif ($ticketinfo->priority_id == '') {
            echo '<div style="color: Black;">' . __("Normal", 'key4ce-osticket-bridge') . '</div>';
        }
    }
    ?>
        </div>
        <div style="clear: both"></div>
    </div>
    <div id="key4ce_tic_sub">
        <div id="key4ce_tic_subject"><?php 
    echo __("Subject", 'key4ce-osticket-bridge');
    ?>
:</div>
        <div id="key4ce_tic_subject_info"><strong><?php 
    echo @Format::stripslashes($ticketinfo->subject);
    ?>
</strong></div>
        <div style="clear: both"></div>
    </div>
    <div id="key4ce_tic_thread_img_box">
        <div><span class="key4ce_Icon key4ce_thread"><?php 
    echo __("Ticket Thread", 'key4ce-osticket-bridge');
    ?>
</span></div>
        <div style="clear: both"></div>
    </div>
    <div id="key4ce_thContainer">
        <div id="key4ce_ticketThread">
    <?php 
    foreach ($threadinfo as $thread_info) {
    if (isset($_REQUEST['open_ticket_status'])) {
        $ost_wpdb->update($ticket_table, array('status' => 'open'), array('ticket_id' => $ticid), array('%s'));
    }
}
///post from form
$usticketid = $_REQUEST['usticketid'];
$usname = $_REQUEST['usname'];
$usemail = $_REQUEST['usemail'];
$adem = $_REQUEST['ademail'];
$title = $_REQUEST['stitle'];
$usdepartment = $_REQUEST['usdepartment'];
$ussubject = $_REQUEST['ussubject'];
$uscategories = $_REQUEST['uscategories'];
$top_id = $_REQUEST['ustopicid'];
$dirname = $_REQUEST['sdirna'];
$admin_reply = @Format::stripslashes($_REQUEST['adreply']);
/// clean template from form to user email
///Variable's for email templates
$os_admin_email = $adem;
$username = $usname;
$usermail = $usemail;
$ticketid = $usticketid;
$admin_response = $admin_response;
///from post form - now becomes a variable & message
$admin_response = nl2br($admin_response);
$ostitle = $title;
$edate = $date;
$dname = $directory;
$siteurl = site_url() . "/{$dirname}/";
$ticketurl = site_url() . "/{$dirname}/?service=view&ticket={$ticketid}";
$postsubmail = $postsubmail;
Пример #4
0
     }
     if ($val > 1) {
         $val .= 's';
     }
     return $val;
 }
 foreach ($list_opt as $list) {
     if ($list->updated == "0000-00-00 00:00:00") {
         $list_updated = "-";
     } else {
         $list_updated = ucwords(ezDate($list->updated)) . ' Ago';
     }
     if ($list->subject == "") {
         @($sub_str = Format::stripslashes('Ticket subject not found'));
     } else {
         @($sub_str = Format::stripslashes($list->subject));
     }
     echo "<div id='key4ce_ticket_list0'><input type='checkbox' name='tickets[]' value='" . $list->ticket_id . "'></div>";
     echo "<div id='key4ce_ticket_list' onclick=\"location.href='admin.php?page=ost-tickets&service=view&ticket=" . $list->number . "';\">";
     echo "<div id='key4ce_ticket_list1'><a href='admin.php?page=ost-tickets&service=view&ticket=" . $list->number . "'>" . $list->number . "</a></div>";
     echo "<div id='key4ce_ticket_list2'>" . key4ce_truncate($sub_str, 60, '...') . "</div>\r\n\t<div id='key4ce_ticket_list3'>";
     if ($keyost_version == 194 || $keyost_version == 195 || $keyost_version == 1951) {
         $priority = $list->priority;
     } else {
         $priority = $list->priority_id;
     }
     if ($priority == '4') {
         echo '<div class="key4ce_ticketPriority" style="background-color: Red;"><font color=white>' . __("Emergency", 'key4ce-osticket-bridge') . '</font></div>';
     } elseif ($priority == '3') {
         echo '<div class="key4ce_ticketPriority" style="background-color: Orange;"><font color=white>' . __("High", 'key4ce-osticket-bridge') . '</font></div>';
     } elseif ($priority == '2') {
$title = $_REQUEST['stitle'];
$dirname = $_REQUEST['sdirna'];
@($sub = Format::stripslashes($_REQUEST['subject']));
@($newtickettemp = Format::stripslashes($_REQUEST['newtickettemp']));
$ip_add = $_SERVER['REMOTE_ADDR'];
if ($keyost_version == 194 || $keyost_version == 195 || $keyost_version == 1951) {
    $ticketstate = "1";
} else {
    $ticketstate = "open";
}
$sour = "Web";
$isoverdue = 0;
$isans = 0;
$las_msg = date("Y-m-d g:i:s");
$cre = date("Y-m-d g:i:s");
@($user_message = Format::stripslashes($_REQUEST['message']));
$prid = $ost_wpdb->get_row("SELECT priority_desc FROM {$priority_table} WHERE priority_id={$pri_id}");
$priordesc = $prid->priority_desc;
// Added by Pratik Maniar on 29-04-2014 Start Here
$dept_details = $ost_wpdb->get_row("SELECT dept_id,dept_name FROM {$dept_table} WHERE dept_id={$dep_id}");
$dept_name = $dept_details->dept_name;
// Added by Pratik Maniar on 29-04-2014 End Here
// Start File system changes
if ($keyost_version == 193) {
    $attachement_status = key4ce_getKeyValue('allow_attachments');
    $max_user_file_uploads = key4ce_getKeyValue('max_user_file_uploads');
    $max_file_size = key4ce_getKeyValue('max_file_size');
    $fileextesnions = key4ce_getKeyValue('allowed_filetypes');
} else {
    $fileconfig = key4ce_FileConfigValue();
    $filedata = json_decode($fileconfig);
<?php 
}
# ==============================================================================================
# Post Confirmation Email Template - sent to user w/message included - used in ost-emailtemp
# ==============================================================================================
require_once WP_PLUGIN_DIR . '/key4ce-osticket-bridge/includes/functions.php';
if (isset($_REQUEST['ost-post-confirmed'])) {
    $form_postconfirmed = Format::stripslashes($_POST['form_postconfirmed']);
    $form_postconfirmed_subject = Format::stripslashes($_POST['form_postconfirmed_subject']);
    $etdate = date("Y-m-d, g:i:s");
    $wpdb->update($ostemail, array('subject' => $form_postconfirmed_subject, 'text' => $form_postconfirmed, 'updated' => $etdate), array('name' => $pcname), array('%s'));
    ?>
<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>
<?php 
}
# ==============================================================================================
# Admin New Ticket Email Template - sent to user w/message included - used in ost-emailtemp
# ==============================================================================================
require_once WP_PLUGIN_DIR . '/key4ce-osticket-bridge/includes/functions.php';
//  $usermessage.="Email: " . $usermail . "<br />";
// $usermessage.="Priority: " . $priordesc . "<br />";
// $usermessage.="Department: " . $dept_name . "<br />";
//$usermessage.="Subject: " . $sub . "<br />";
//$usermessage.="<br />----------------------<br />";
// $usermessage.="Message: " . $user_message . "";
//$usermessage.="<br />----------------------<br /><br />";
//$usermessage.="To respond to the ticket, please login to the support ticket system.";
//$usermessage.="<br /><br />";
//$usermessage.="" . site_url() . "";
//$usermessage.="<br />";
//$usermessage.="Your friendly Customer Support System ";	//echo $adminnewticket_text;	//exit;	//Email Notification to Customer Added by Pratik Maniar on 10-09-2014 end Here
$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}");
$dept_user_name = $dept_user_details->name;
$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}\";");
if ($smtp_status == "enable") {
    $SMTPAuth = "true";
} else {
    $SMTPAuth = "false";
}
require_once ABSPATH . WPINC . '/class-phpmailer.php';
require_once ABSPATH . WPINC . '/class-smtp.php';
$phpmailer = new PHPMailer();
if ($smtp_status == "enable") {
    $phpmailer = new PHPMailer();
    $phpmailer->SMTPAuth = true;
    $phpmailer->Username = $smtp_username;