Example #1
0
function hesk_printCustomerTicketReplies()
{
    global $hesklang, $hesk_settings, $result, $reply, $trackingID, $unread_replies;
    $i = $hesk_settings['new_top'] ? 0 : 1;
    while ($reply = hesk_dbFetchAssoc($result)) {
        if ($i) {
            $color = 'class="ticketrow"';
            $i = 0;
        } else {
            $color = 'class="ticketalt"';
            $i = 1;
        }
        /* Store unread reply IDs for later */
        if ($reply['staffid'] && !$reply['read']) {
            $unread_replies[] = $reply['id'];
        }
        $reply['dt'] = hesk_date($reply['dt']);
        ?>
		<tr>
			<td <?php 
        echo $color;
        ?>
>

				<table border="0" cellspacing="0" cellpadding="0" width="100%">
					<tr>
						<td valign="top">
							<table border="0" cellspacing="1">
								<tr>
									<td><?php 
        echo $hesklang['date'];
        ?>
:</td>
									<td><?php 
        echo $reply['dt'];
        ?>
</td>
								</tr>
								<tr>
									<td><?php 
        echo $hesklang['name'];
        ?>
:</td>
									<td><?php 
        echo $reply['name'];
        ?>
</td>
								</tr>
							</table>
						</td>
						<td style="text-align:right; vertical-align:top;">
							<?php 
        echo hesk_getCustomerButtons($i);
        ?>
						</td>
					</tr>
				</table>

			<p><b><?php 
        echo $hesklang['message'];
        ?>
:</b></p>
			<p><?php 
        echo $reply['message'];
        ?>
</p>

			<?php 
        /* Attachments */
        hesk_listAttachments($reply['attachments'], $i);
        /* Staff rating */
        if ($hesk_settings['rating'] && $reply['staffid']) {
            if ($reply['rating'] == 1) {
                echo '<p class="rate">' . $hesklang['rnh'] . '</p>';
            } elseif ($reply['rating'] == 5) {
                echo '<p class="rate">' . $hesklang['rh'] . '</p>';
            } else {
                echo '
					<div id="rating' . $reply['id'] . '" class="rate">
					' . $hesklang['r'] . '
					<a href="Javascript:void(0)" onclick="Javascript:hesk_rate(\'rate.php?rating=5&amp;id=' . $reply['id'] . '&amp;track=' . $trackingID . '\',\'rating' . $reply['id'] . '\')">' . strtolower($hesklang['yes']) . '</a> /
					<a href="Javascript:void(0)" onclick="Javascript:hesk_rate(\'rate.php?rating=1&amp;id=' . $reply['id'] . '&amp;track=' . $trackingID . '\',\'rating' . $reply['id'] . '\')">' . strtolower($hesklang['no']) . '</a>
					</div>
					';
            }
        }
        ?>
	        </td>
        </tr>
        <?php 
    }
    return $i;
}
Example #2
0
function hesk_printTicketReplies()
{
    global $hesklang, $hesk_settings, $result, $reply;
    $i = $hesk_settings['new_top'] ? 0 : 1;
    if ($reply === false) {
        return $i;
    }
    while ($reply = hesk_dbFetchAssoc($result)) {
        if ($i) {
            $color = 'class="ticketrow"';
            $i = 0;
        } else {
            $color = 'class="ticketalt"';
            $i = 1;
        }
        $reply['dt'] = hesk_date($reply['dt'], true);
        ?>
		<tr>
			<td <?php 
        echo $color;
        ?>
>

				<table border="0" cellspacing="0" cellpadding="0" width="100%">
					<tr>
						<td valign="top">
							<table border="0" cellspacing="1">
								<tr>
									<td><?php 
        echo $hesklang['date'];
        ?>
:</td>
									<td><?php 
        echo $reply['dt'];
        ?>
</td>
								</tr>
								<tr>
									<td><?php 
        echo $hesklang['name'];
        ?>
:</td>
									<td><?php 
        echo $reply['name'];
        ?>
</td>
								</tr>
							</table>
						</td>
						<td style="text-align:right; vertical-align:top;">
							<?php 
        echo hesk_getAdminButtons(1, $i);
        ?>
						</td>
					</tr>
				</table>

			<p><b><?php 
        echo $hesklang['message'];
        ?>
:</b></p>
			<p><?php 
        echo $reply['message'];
        ?>
</p>

			<?php 
        /* Attachments */
        hesk_listAttachments($reply['attachments'], $reply['id'], $i);
        /* Staff rating */
        if ($hesk_settings['rating'] && $reply['staffid']) {
            if ($reply['rating'] == 1) {
                echo '<p class="rate">' . $hesklang['rnh'] . '</p>';
            } elseif ($reply['rating'] == 5) {
                echo '<p class="rate">' . $hesklang['rh'] . '</p>';
            }
        }
        /* Show "unread reply" message? */
        if ($reply['staffid'] && !$reply['read']) {
            echo '<p class="rate">' . $hesklang['unread'] . '</p>';
        }
        ?>
	        </td>
        </tr>
        <?php 
    }
    return $i;
}
Example #3
0
function hesk_printTicketReplies()
{
    global $hesklang, $hesk_settings, $result, $reply, $isManager;
    $i = $hesk_settings['new_top'] ? 0 : 1;
    if ($reply === false) {
        return $i;
    }
    while ($reply = hesk_dbFetchAssoc($result)) {
        $color = 'class="ticketMessageContainer"';
        $reply['dt'] = hesk_date($reply['dt'], true);
        ?>
        <div class="row ticketMessageContainer">
            <div class="col-md-3 col-xs-12">
                <div class="ticketName"><?php 
        echo $reply['name'];
        ?>
</div>
            </div>
            <div class="col-md-9 col-xs-12 pushMarginLeft">
                <div class="ticketMessageTop withBorder">
                    <?php 
        echo hesk_getAdminButtonsInTicket();
        ?>
                    <div class="blankSpace"></div>
                    <p><?php 
        echo $hesklang['date'];
        ?>
: <?php 
        echo $reply['dt'];
        ?>
</p> 
                </div>
                <div class="ticketMessageBottom">
                    <p><b><?php 
        echo $hesklang['message'];
        ?>
:</b></p>
			        <p><?php 
        echo $reply['message'];
        ?>
</p> 
                </div>
                <div class="ticketMessageTop pushMargin">
                     <?php 
        hesk_listAttachments($reply['attachments'], $reply['id']);
        /* Staff rating */
        if ($hesk_settings['rating'] && $reply['staffid']) {
            if ($reply['rating'] == 1) {
                echo '<p class="rate">' . $hesklang['rnh'] . '</p>';
            } elseif ($reply['rating'] == 5) {
                echo '<p class="rate">' . $hesklang['rh'] . '</p>';
            }
        }
        /* Show "unread reply" message? */
        if ($reply['staffid'] && !$reply['read']) {
            echo '<p class="rate">' . $hesklang['unread'] . '</p>';
        }
        ?>
                </div>
            </div>
        </div>
        <?php 
    }
    return $i;
}
Example #4
0
function hesk_printTicketReplies()
{
    global $hesklang, $hesk_settings, $result, $reply;
    $i = $hesk_settings['new_top'] ? 0 : 1;
    if ($reply === false) {
        return $i;
    }
    while ($reply = hesk_dbFetchAssoc($result)) {
        /*if ($i) {$color = 'class="ticketrow"'; $i=0;}
        		else {$color = 'class="ticketalt"'; $i=1;}*/
        $reply['dt'] = hesk_date($reply['dt'], true);
        ?>
		<div>
			<div <?php 
        /*echo $color;*/
        ?>
>

				<div class="table-printTicketReplies">
					<div>
						<div id="printTicketReplies1">
							<div>
								<div class="form-inline">
									<span><?php 
        echo $hesklang['date'];
        ?>
:</span>
									<span><?php 
        echo $reply['dt'];
        ?>
</span>
									<span id="printTicketReplies2" style="float:right; vertical-align:top; margin-right: 40px;">
									<?php 
        echo hesk_getAdminButtons(1, $i);
        ?>
									</span>
								</div>
								<div class="form-inline">
									<span><?php 
        echo $hesklang['name'];
        ?>
:</span>
									<span><?php 
        echo $reply['name'];
        ?>
</span>
								</div>
							</div>
						</div>
						
					</div>
				</div><!-- end table-printTicketReplies -->

			<p><b><?php 
        echo $hesklang['message'];
        ?>
:</b></p>
			<p><?php 
        echo $reply['message'];
        ?>
</p>

			<?php 
        /* Attachments */
        hesk_listAttachments($reply['attachments'], $reply['id'], $i);
        /* Staff rating */
        if ($hesk_settings['rating'] && $reply['staffid']) {
            if ($reply['rating'] == 1) {
                echo '<p class="rate">' . $hesklang['rnh'] . '</p>';
            } elseif ($reply['rating'] == 5) {
                echo '<p class="rate">' . $hesklang['rh'] . '</p>';
            }
        }
        /* Show "unread reply" message? */
        if ($reply['staffid'] && !$reply['read']) {
            echo '<p class="rate">' . $hesklang['unread'] . '</p>';
        }
        ?>
	        </div>
        </div>
        <?php 
    }
    return $i;
}
Example #5
0
function hesk_printCustomerTicketReplies()
{
    global $hesklang, $hesk_settings, $result, $reply, $trackingID, $unread_replies;
    $i = $hesk_settings['new_top'] ? 0 : 1;
    while ($reply = hesk_dbFetchAssoc($result)) {
        $color = 'class="ticketMessageContainer"';
        /* Store unread reply IDs for later */
        if ($reply['staffid'] && !$reply['read']) {
            $unread_replies[] = $reply['id'];
        }
        $reply['dt'] = hesk_date($reply['dt'], true);
        ?>

        <div class="row ticketMessageContainer">
            <div class="col-md-3 col-xs-12">
                <div class="ticketName"><?php 
        echo $reply['name'];
        ?>
</div>
            </div>
            <div class="col-md-9 col-xs-12 pushMarginLeft">
                <div class="ticketMessageTop withBorder">
                        <p><?php 
        echo $hesklang['date'];
        ?>
: <?php 
        echo $reply['dt'];
        ?>
<span style="float:  right;"><?php 
        echo hesk_getCustomerButtons($i);
        ?>
</span></p>
                    <?php 
        /* Staff rating */
        if ($hesk_settings['rating'] && $reply['staffid']) {
            if ($reply['rating'] == 1) {
                echo '<p class="rate">' . $hesklang['rnh'] . '</p>';
            } elseif ($reply['rating'] == 5) {
                echo '<p class="rate">' . $hesklang['rh'] . '</p>';
            } else {
                echo '
					            <div id="rating' . $reply['id'] . '" class="rate">
					            ' . $hesklang['r'] . '
					            <a href="Javascript:void(0)" onclick="Javascript:hesk_rate(\'rate.php?rating=5&amp;id=' . $reply['id'] . '&amp;track=' . $trackingID . '\',\'rating' . $reply['id'] . '\')">' . strtolower($hesklang['yes']) . '</a> /
					            <a href="Javascript:void(0)" onclick="Javascript:hesk_rate(\'rate.php?rating=1&amp;id=' . $reply['id'] . '&amp;track=' . $trackingID . '\',\'rating' . $reply['id'] . '\')">' . strtolower($hesklang['no']) . '</a>
					            </div>
					            ';
            }
        }
        ?>
                </div>
                <div class="ticketMessageBottom">
                     <!-- Message -->
                     <p><b><?php 
        echo $hesklang['message'];
        ?>
:</b></p>
			         <p class="message"><?php 
        echo $reply['message'];
        ?>
</p> 
                </div>
                <div class="ticketMessageTop">
                     <?php 
        hesk_listAttachments($reply['attachments'], $i);
        ?>
                </div>
            </div>
        </div>
        <?php 
    }
    return $i;
}
Example #6
0
function hesk_printCustomerTicketReplies()
{
    global $hesklang, $hesk_settings, $result, $reply, $trackingID, $unread_replies;
    $i = $hesk_settings['new_top'] ? 0 : 1;
    while ($reply = hesk_dbFetchAssoc($result)) {
        if ($i) {
            $color = 'class="ticketrow"';
            $i = 0;
        } else {
            $color = 'class="ticketalt"';
            $i = 1;
        }
        /* Store unread reply IDs for later */
        if ($reply['staffid'] && !$reply['read']) {
            $unread_replies[] = $reply['id'];
        }
        $reply['dt'] = hesk_date($reply['dt'], true);
        ?>
		
		<br/>
		<div id="hr_for_ticket"><hr/></div>
		<br/>
		<div class="store-unread-reply-ids-later">
			<div <?php 
        echo $color;
        ?>
>
			<div class="row date-dt-second">
				<label class="col-sm-2"><?php 
        echo $hesklang['date'];
        ?>
:</label>
				<span><?php 
        echo $reply['dt'];
        ?>
</span>
				<span id="getCustomerButtons-ticket.php-second">
					<?php 
        /*echo hesk_getCustomerButtons($i);*/
        ?>
				</span>
			</div>
			<div class="row name-ticket-second">
				<label class="col-sm-2"><?php 
        echo $hesklang['name'];
        ?>
:</label>
				<span><?php 
        echo $reply['name'];
        ?>
</span>
			</div>
			<div class="row name-ticket-second">
				<label class="col-sm-2"><?php 
        echo $hesklang['message'];
        ?>
:</label>
				<span><?php 
        echo $reply['message'];
        ?>
</span>
			</div>

				<?php 
        /* Attachments */
        hesk_listAttachments($reply['attachments'], $i);
        /* Staff rating */
        if ($hesk_settings['rating'] && $reply['staffid']) {
            if ($reply['rating'] == 1) {
                echo '<p class="rate">' . $hesklang['rnh'] . '</p>';
            } elseif ($reply['rating'] == 5) {
                echo '<p class="rate">' . $hesklang['rh'] . '</p>';
            } else {
                echo '
						<div id="rating' . $reply['id'] . '" class="rate">
						' . $hesklang['r'] . '
						<a href="Javascript:void(0)" onclick="Javascript:hesk_rate(\'rate.php?rating=5&amp;id=' . $reply['id'] . '&amp;track=' . $trackingID . '\',\'rating' . $reply['id'] . '\')">' . strtolower($hesklang['yes']) . '</a> /
						<a href="Javascript:void(0)" onclick="Javascript:hesk_rate(\'rate.php?rating=1&amp;id=' . $reply['id'] . '&amp;track=' . $trackingID . '\',\'rating' . $reply['id'] . '\')">' . strtolower($hesklang['no']) . '</a>
						</div>
						';
            }
        }
        ?>
	        </div>
        </div>
        <?php 
    }
    return $i;
}