コード例 #1
0
ファイル: export.php プロジェクト: riansopian/hesk
?>

</td>
</tr>
<tr>
<td>

<?php 
/* This will handle error, success and notice messages */
hesk_handle_messages();
// If an export was generated, show the link to download
if (isset($flush_me)) {
    if ($tickets_exported > 0) {
        hesk_show_success($flush_me);
    } else {
        hesk_show_notice($hesklang['n2ex']);
    }
}
?>

<!-- TABS -->
<div id="tab1" class="tabberlive" style="margin-top:0px">

	<ul class="tabbernav">
		<?php 
// Show a link to reports.php if user has permission to do so
if (hesk_checkPermission('can_run_reports', 0)) {
    echo '<li class=""><a title="' . $hesklang['reports_tab'] . '" href="reports.php">' . $hesklang['reports_tab'] . ' [+]</a></li>';
}
?>
		<li class="tabberactive"><a title="<?php 
コード例 #2
0
                </form>
            </div>
        </div>

        <script>
          $(function () {
            $('#addCat a:last').tab('show')
          })
        </script>
    </div>
    <div class="col-md-8">
        <?php 
/* This will handle error, success and notice messages */
hesk_handle_messages();
if ($hesk_settings['cust_urgency']) {
    hesk_show_notice($hesklang['cat_pri_info'] . ' ' . $hesklang['cpri']);
}
?>
        <h3><?php 
echo $hesklang['manage_cat'];
?>
 <a href="javascript:void(0)" onclick="javascript:alert('<?php 
echo hesk_makeJsString($hesklang['cat_intro']);
?>
')"><i class="fa fa-question-circle settingsquestionmark"></i></a></h3>
        <div class="footerWithBorder blankSpace"></div>
        <table class="table table-hover">
            <tr>
                <th><?php 
echo $hesklang['id'];
?>
コード例 #3
0
 [<a href="javascript:void(0)" onclick="javascript:alert('<?php 
    echo hesk_makeJsString($hesklang['kb_intro']);
    ?>
')">?</a>]</b></div>

	<!-- SUB NAVIGATION -->
	<div class="container sub-navigation-kb"><?php 
    show_subnav();
    ?>
</div>
	<!-- SUB NAVIGATION -->

	<?php 
    // Show a notice if total public articles is less than 5
    if ($total_articles < 5) {
        hesk_show_notice($hesklang['nkba']);
    }
    ?>

	<!-- SHOW THE CATEGORY TREE -->
	<div class="show-cta-tree"><?php 
    show_treeMenu();
    ?>
</div>
	<!-- SHOW THE CATEGORY TREE -->
	
    <div class="container kb-tools-title"><?php 
    echo $hesklang['ktool'];
    ?>
</div>
	<div class="kb-tools">
コード例 #4
0
		}*/
if (hesk_checkPermission('can_man_settings', 0)) {
    echo '
						<a href="admin_settings.php"><button type="submit" class="btn btn-default ico-button" id="ico-button-settings"><label id="menu-settings">' . $hesklang['settings'] . '</label></button></a>
						';
}
?>
				
				<a href="index.php?a=logout&amp;token=<?php 
echo hesk_token_echo();
?>
"><button type="submit" class="btn btn-default ico-button" id="ico-button-logout"><label id="menu-logout"><?php 
echo $hesklang['logout'];
?>
</label></button></a>
			</div>
		</div><!-- end menu-links-header -->
    <!-- END MENU LINKS -->


<?php 
// Show a notice if we are in maintenance mode
if (hesk_check_maintenance(false)) {
    echo '<br />';
    hesk_show_notice($hesklang['mma2'], $hesklang['mma1'], false);
}
// Show a notice if we are in "Knowledgebase only" mode
if (hesk_check_kb_only(false)) {
    echo '<br />';
    hesk_show_notice($hesklang['kbo2'], $hesklang['kbo1'], false);
}
コード例 #5
0
}
/* Assignment */
// -> SELF
$s_my[$fid] = empty($_GET['s_my']) ? 0 : 1;
// -> OTHERS
$s_ot[$fid] = empty($_GET['s_ot']) ? 0 : 1;
// -> UNASSIGNED
$s_un[$fid] = empty($_GET['s_un']) ? 0 : 1;
// -> Setup SQL based on selected ticket assignments
/* Make sure at least one is chosen */
if (!$s_my[$fid] && !$s_ot[$fid] && !$s_un[$fid]) {
    $s_my[$fid] = 1;
    $s_ot[$fid] = 1;
    $s_un[$fid] = 1;
    if (!defined('MAIN_PAGE')) {
        hesk_show_notice($hesklang['e_nose']);
    }
}
/* If the user doesn't have permission to view assigned to others block those */
if (!hesk_checkPermission('can_view_ass_others', 0)) {
    $s_ot[$fid] = 0;
}
/* If the user doesn't have permission to view unassigned tickets block those */
if (!hesk_checkPermission('can_view_unassigned', 0)) {
    $s_un[$fid] = 0;
}
/* Process assignments */
if (!$s_my[$fid] || !$s_ot[$fid] || !$s_un[$fid]) {
    if ($s_my[$fid] && $s_ot[$fid]) {
        // All but unassigned
        $sql .= " AND `owner` > 0 ";
コード例 #6
0
        echo $hesklang['autorefresh'] . ' ' . $autorefreshInSeconds . ' ' . $hesklang['abbr']['second'];
        ?>
        <script>
            (function(){
             setTimeout("location.reload(true);",<?php 
        echo $_SESSION['autorefresh'];
        ?>
);
            })();
        </script>
        <?php 
    }
    if (isset($is_search) || $href == 'find_tickets.php') {
        hesk_show_notice($hesklang['no_tickets_crit']);
    } else {
        hesk_show_notice($hesklang['no_tickets_open']);
    }
    echo '</div></div>';
}
echo '</div>
    </div>';
function hesk_print_list_head()
{
    global $hesk_settings, $href, $query, $sort_possible, $hesklang;
    ?>
	<div class="table-responsive">
	<table id="ticket-table" class="table table-hover">
        <thead>
	        <tr>
	        <th><input type="checkbox" id="checkall" name="checkall" value="2" onclick="hesk_changeAll(this)" /></th>
            <?php 
コード例 #7
0
function hesk_handle_messages()
{
    global $hesk_settings, $hesklang;
    $return_value = true;
    // Primary message - only one can be displayed and HESK_MESSAGE is required
    if (isset($_SESSION['HESK_MESSAGE'])) {
        if (isset($_SESSION['HESK_SUCCESS'])) {
            hesk_show_success($_SESSION['HESK_MESSAGE']);
        } elseif (isset($_SESSION['HESK_ERROR'])) {
            hesk_show_error($_SESSION['HESK_MESSAGE']);
            $return_value = false;
        } elseif (isset($_SESSION['HESK_NOTICE'])) {
            hesk_show_notice($_SESSION['HESK_MESSAGE']);
        } elseif (isset($_SESSION['HESK_INFO'])) {
            hesk_show_info($_SESSION['HESK_MESSAGE']);
        }
        hesk_cleanSessionVars('HESK_MESSAGE');
    }
    // Cleanup any primary message types set
    hesk_cleanSessionVars('HESK_ERROR');
    hesk_cleanSessionVars('HESK_SUCCESS');
    hesk_cleanSessionVars('HESK_NOTICE');
    hesk_cleanSessionVars('HESK_INFO');
    // Secondary message
    if (isset($_SESSION['HESK_2ND_NOTICE']) && isset($_SESSION['HESK_2ND_MESSAGE'])) {
        hesk_show_notice($_SESSION['HESK_2ND_MESSAGE']);
        hesk_cleanSessionVars('HESK_2ND_NOTICE');
        hesk_cleanSessionVars('HESK_2ND_MESSAGE');
    }
    return $return_value;
}
コード例 #8
0
function hesk_iHeader()
{
    global $hesk_settings;
    $steps = array(1 => '1. License agreement', 2 => '2. Check setup', 3 => '3. Database settings', 4 => '4. Setup database tables');
    ?>
	<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
	<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
	<head>
	<title>HESK setup script: <?php 
    echo HESK_NEW_VERSION;
    ?>
</title>
	<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
	<link href="../hesk_style_v25.css" type="text/css" rel="stylesheet" />
	<script language="Javascript" type="text/javascript" src="../hesk_javascript_v24.js"></script>
	</head>
	<body>

	<div align="center">
	<table border="0" cellspacing="0" cellpadding="5" class="enclosing">
	<tr>
	<td>
		<table width="100%" border="0" cellspacing="0" cellpadding="0">
		<tr>
		<td width="3"><img src="../img/headerleftsm.jpg" width="3" height="25" alt="" /></td>
		<td class="headersm">HESK setup script: <?php 
    echo HESK_NEW_VERSION;
    ?>
</td>
		<td width="3"><img src="../img/headerrightsm.jpg" width="3" height="25" alt="" /></td>
		</tr>
		</table>
	</td>
	</tr>
	<tr>
	<td>

    <?php 
    if (isset($_SESSION['step'])) {
        $_SESSION['step'] = intval($_SESSION['step']);
        ?>

		<table border="0" width="100%">
		<tr>
		<td>
        <?php 
        foreach ($steps as $number => $description) {
            if ($number == $_SESSION['step']) {
                $steps[$number] = '<b>' . $steps[$number] . '</b>';
            } elseif ($number < $_SESSION['step']) {
                $steps[$number] = '<span style="color:#008000">' . $steps[$number] . '</span>';
            }
        }
        echo implode(' &raquo; ', $steps);
        ?>
        </td>
		</tr>
		</table>

		<br />
	<?php 
    } else {
        hesk_show_notice('<a href="../docs/index.html">Read installation guide</a> before using this setup script!', 'Important');
    }
    ?>

    <div align="center">
	<table border="0" cellspacing="0" cellpadding="0" width="100%">
	<tr>
		<td width="7" height="7"><img src="../img/roundcornerslt.jpg" width="7" height="7" alt="" /></td>
		<td class="roundcornerstop"></td>
		<td><img src="../img/roundcornersrt.jpg" width="7" height="7" alt="" /></td>
	</tr>
	<tr>
		<td class="roundcornersleft">&nbsp;</td>
		<td>
	<?php 
}
コード例 #9
0
ファイル: profile.php プロジェクト: Orgoth/Mods-for-HESK
if (!isset($_SESSION['new']['username'])) {
    $_SESSION['new']['username'] = '';
}
/* Print header */
require_once HESK_PATH . 'inc/headerAdmin.inc.php';
/* Print admin navigation */
require_once HESK_PATH . 'inc/show_admin_nav.inc.php';
?>

<div class="row">
    <div class="col-md-8 col-md-offset-2" style="padding-top: 20px">
        <?php 
/* This will handle error, success and notice messages */
hesk_handle_messages();
if (defined('WARN_PASSWORD')) {
    hesk_show_notice($hesklang['chdp2'], $hesklang['security']);
}
?>

        <h3><?php 
echo $hesklang['profile_for'] . ' <b>' . $_SESSION['new']['user'];
?>
</b></h3>
        <h6><?php 
echo $hesklang['req_marked_with'];
?>
 <span class="important">*</span></h6>
        <div class="footerWithBorder blankSpace"></div>

        <?php 
if ($hesk_settings['can_sel_lang']) {
コード例 #10
0
ファイル: admin_ticket.php プロジェクト: Eximagen/helpdesk
function hesk_printReplyForm()
{
    global $hesklang, $hesk_settings, $ticket, $admins, $can_options, $options, $can_assign_self;
    ?>
<!-- START REPLY FORM -->

<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
	<td width="7" height="7"><img src="../img/roundcornerslt.jpg" width="7" height="7" alt="" /></td>
	<td class="roundcornerstop"></td>
	<td><img src="../img/roundcornersrt.jpg" width="7" height="7" alt="" /></td>
</tr>
<tr>
	<td class="roundcornersleft">&nbsp;</td>
	<td>

	<h3 align="center"><?php 
    echo $hesklang['add_reply'];
    ?>
</h3>

	<form method="post" action="admin_reply_ticket.php" enctype="multipart/form-data" name="form1" onsubmit="javascript:force_stop();return true;">

    <br />

    <?php 
    /* Ticket assigned to someone else? */
    if ($ticket['owner'] && $ticket['owner'] != $_SESSION['id'] && isset($admins[$ticket['owner']])) {
        hesk_show_notice($hesklang['nyt'] . ' ' . $admins[$ticket['owner']]);
    }
    /* Ticket locked? */
    if ($ticket['locked']) {
        hesk_show_notice($hesklang['tislock']);
    }
    // Track time worked?
    if ($hesk_settings['time_worked']) {
        ?>

    <div align="center">
    <table class="white" style="min-width:600px;">
    <tr>
    	<td colspan="2">
	    &raquo; <?php 
        echo $hesklang['ts'];
        ?>
		<input type="text" name="time_worked" id="time_worked" size="10" value="<?php 
        echo isset($_SESSION['time_worked']) ? hesk_getTime($_SESSION['time_worked']) : '00:00:00';
        ?>
" />
		<input type="button" class="orangebuttonsec" onmouseover="hesk_btn(this,'orangebuttonsecover');" onmouseout="hesk_btn(this,'orangebuttonsec');" onclick="ss()" id="startb" value="<?php 
        echo $hesklang['start'];
        ?>
" />
		<input type="button" class="orangebuttonsec" onmouseover="hesk_btn(this,'orangebuttonsecover');" onmouseout="hesk_btn(this,'orangebuttonsec');" onclick="r()" value="<?php 
        echo $hesklang['reset'];
        ?>
" />
        <br />&nbsp;
        </td>
    </tr>
    </table>
    </div>

    <?php 
    }
    /* Do we have any canned responses? */
    if (strlen($can_options)) {
        ?>
    <div align="center">
    <table class="white" style="min-width:600px;">
    <tr>
    	<td class="admin_gray" colspan="2"><b>&raquo; <?php 
        echo $hesklang['saved_replies'];
        ?>
</b></td>
    </tr>
    <tr>
    	<td class="admin_gray">
	    <label><input type="radio" name="mode" id="modeadd" value="1" checked="checked" /> <?php 
        echo $hesklang['madd'];
        ?>
</label><br />
        <label><input type="radio" name="mode" id="moderep" value="0" /> <?php 
        echo $hesklang['mrep'];
        ?>
</label>
        </td>
        <td class="admin_gray">
	    <?php 
        echo $hesklang['select_saved'];
        ?>
:<br />
	    <select name="saved_replies" onchange="setMessage(this.value)">
		<option value="0"> - <?php 
        echo $hesklang['select_empty'];
        ?>
 - </option>
		<?php 
        echo $can_options;
        ?>
		</select>
        </td>
    </tr>
    </table>
    </div>
    <?php 
    }
    ?>

	<p align="center"><?php 
    echo $hesklang['message'];
    ?>
: <font class="important">*</font><br />
	<span id="HeskMsg"><textarea name="message" id="message" rows="12" cols="72"><?php 
    // Do we have any message stored in session?
    if (isset($_SESSION['ticket_message'])) {
        echo stripslashes(hesk_input($_SESSION['ticket_message']));
    } else {
        $res = hesk_dbQuery("SELECT `message` FROM `" . hesk_dbEscape($hesk_settings['db_pfix']) . "reply_drafts` WHERE `owner`=" . intval($_SESSION['id']) . " AND `ticket`=" . intval($ticket['id']) . " LIMIT 1");
        if (hesk_dbNumRows($res) == 1) {
            echo hesk_dbResult($res);
        }
    }
    ?>
</textarea></span></p>

	<?php 
    /* attachments */
    if ($hesk_settings['attachments']['use']) {
        ?>
		<p align="center">
		<?php 
        echo $hesklang['attachments'] . ' (<a href="Javascript:void(0)" onclick="Javascript:hesk_window(\'../file_limits.php\',250,500);return false;">' . $hesklang['ful'] . '</a>):<br />';
        for ($i = 1; $i <= $hesk_settings['attachments']['max_number']; $i++) {
            echo '<input type="file" name="attachment[' . $i . ']" size="50" /><br />';
        }
        ?>
		</p>
	<?php 
    }
    ?>

	<div align="center">
	<center>
	<table>
	<tr>
	<td>
	<?php 
    if ($ticket['owner'] != $_SESSION['id'] && $can_assign_self) {
        if (empty($ticket['owner'])) {
            echo '<label><input type="checkbox" name="assign_self" value="1" checked="checked" /> <b>' . $hesklang['asss2'] . '</b></label><br />';
        } else {
            echo '<label><input type="checkbox" name="assign_self" value="1" /> ' . $hesklang['asss2'] . '</label><br />';
        }
    }
    ?>
	<label><input type="checkbox" name="set_priority" value="1" /> <?php 
    echo $hesklang['change_priority'];
    ?>
 </label>
	<select name="priority">
	<?php 
    echo implode('', $options);
    ?>
	</select><br />
	<label><input type="checkbox" name="signature" value="1" checked="checked" /> <?php 
    echo $hesklang['attach_sign'];
    ?>
</label>
	(<a href="profile.php"><?php 
    echo $hesklang['profile_settings'];
    ?>
</a>)<br />
    <label><input type="checkbox" name="no_notify" value="1" <?php 
    echo $_SESSION['notify_customer_reply'] ? '' : 'checked="checked"';
    ?>
 /> <?php 
    echo $hesklang['dsen'];
    ?>
</label>
	</td>
	</tr>
	</table>
	</center>
	</div>

	<p align="center">
    <input type="hidden" name="orig_id" value="<?php 
    echo $ticket['id'];
    ?>
" />
    <input type="hidden" name="token" value="<?php 
    hesk_token_echo();
    ?>
" />
    <input type="submit" value="    <?php 
    echo $hesklang['submit_reply'];
    ?>
    " class="orangebutton" onmouseover="hesk_btn(this,'orangebuttonover');" onmouseout="hesk_btn(this,'orangebutton');" />
	&nbsp;
    <input type="submit" name="save_reply" value="<?php 
    echo $hesklang['sacl'];
    ?>
" class="orangebuttonsec" onmouseover="hesk_btn(this,'orangebuttonsecover');" onmouseout="hesk_btn(this,'orangebuttonsec');" />
	</p>

	<?php 
    // If ticket is not locked, show additional submit options
    if (!$ticket['locked']) {
        ?>
		<p>&nbsp;</p>

		<p align="center">
		<input type="submit" name="submit_as_customer" value="<?php 
        echo $hesklang['sasc'];
        ?>
" class="orangebuttonsec" onmouseover="hesk_btn(this,'orangebuttonsecover');" onmouseout="hesk_btn(this,'orangebuttonsec');" />
		<input type="submit" name="submit_as_resolved" value="<?php 
        echo $hesklang['submit_as'] . ' ' . $hesklang['closed'];
        ?>
" class="orangebuttonsec" onmouseover="hesk_btn(this,'orangebuttonsecover');" onmouseout="hesk_btn(this,'orangebuttonsec');" />
		<input type="submit" name="submit_as_in_progress" value="<?php 
        echo $hesklang['submit_as'] . ' ' . $hesklang['in_progress'];
        ?>
" class="orangebuttonsec" onmouseover="hesk_btn(this,'orangebuttonsecover');" onmouseout="hesk_btn(this,'orangebuttonsec');" />
		<input type="submit" name="submit_as_on_hold" value="<?php 
        echo $hesklang['submit_as'] . ' ' . $hesklang['on_hold'];
        ?>
" class="orangebuttonsec" onmouseover="hesk_btn(this,'orangebuttonsecover');" onmouseout="hesk_btn(this,'orangebuttonsec');" />
		</p>
		<?php 
    }
    ?>

	</form>

	</td>
	<td class="roundcornersright">&nbsp;</td>
</tr>
<tr>
	<td><img src="../img/roundcornerslb.jpg" width="7" height="7" alt="" /></td>
	<td class="roundcornersbottom"></td>
	<td width="7" height="7"><img src="../img/roundcornersrb.jpg" width="7" height="7" alt="" /></td>
</tr>
</table>

<!-- END REPLY FORM -->
<?php 
}
コード例 #11
0
ファイル: test_connection.php プロジェクト: riansopian/hesk
*  is expressly forbidden. To remove HESK copyright notice you must purchase
*  a license for this script. For more information on how to obtain
*  a license please visit the page below:
*  https://www.hesk.com/buy.php
*******************************************************************************/
define('IN_SCRIPT', 1);
define('HESK_PATH', '../');
// Get all the required files and functions
require HESK_PATH . 'hesk_settings.inc.php';
require HESK_PATH . 'inc/common.inc.php';
require HESK_PATH . 'inc/setup_functions.inc.php';
// Print header
header('Content-Type: text/html; charset=' . $hesklang['ENCODING']);
// Demo mode?
if (defined('HESK_DEMO')) {
    hesk_show_notice($hesklang['ddemo']);
    exit;
}
// Test type?
$test_type = hesk_POST('test');
// Test MySQL connection
if ($test_type == 'mysql') {
    if (hesk_testMySQL()) {
        hesk_show_success($hesklang['conok']);
    } elseif (!empty($mysql_log)) {
        hesk_show_error($mysql_error . '<br /><br /><b>' . $hesklang['mysql_said'] . ':</b> ' . $mysql_log);
    } else {
        hesk_show_error($mysql_error);
    }
} elseif ($test_type == 'pop3') {
    if (hesk_testPOP3()) {
コード例 #12
0
ファイル: admin_ticket.php プロジェクト: Orgoth/Mods-for-HESK
function hesk_printReplyForm()
{
    global $hesklang, $hesk_settings, $ticket, $admins, $can_options, $options, $can_assign_self, $isManager;
    ?>
<!-- START REPLY FORM -->

        <h3 class="text-left"><?php 
    echo $hesklang['add_reply'];
    ?>
</h3>
        <div class="footerWithBorder"></div>
        <div class="blankSpace"></div>
        
        <form role="form" class="form-horizontal" method="post" action="admin_reply_ticket.php" enctype="multipart/form-data" name="form1" onsubmit="javascript:force_stop();return true;">
            <?php 
    /* Ticket assigned to someone else? */
    if ($ticket['owner'] && $ticket['owner'] != $_SESSION['id'] && isset($admins[$ticket['owner']])) {
        hesk_show_notice($hesklang['nyt'] . ' ' . $admins[$ticket['owner']]);
    }
    /* Ticket locked? */
    if ($ticket['locked']) {
        hesk_show_notice($hesklang['tislock']);
    }
    // Track time worked?
    if ($hesk_settings['time_worked']) {
        ?>

                <div class="form-group">
                    <label for="time_worked" class="col-sm-3 control-label"><?php 
        echo $hesklang['ts'];
        ?>
:</label>

                    <div class="col-sm-6">
                        <input type="text" class="form-control" name="time_worked" id="time_worked" size="10"
                               value="<?php 
        echo isset($_SESSION['time_worked']) ? hesk_getTime($_SESSION['time_worked']) : '00:00:00';
        ?>
"/>
                    </div>
                    <div class="col-sm-3 text-right">
                        <input type="button" class="btn btn-success" onclick="ss()" id="startb"
                               value="<?php 
        echo $hesklang['start'];
        ?>
"/>
                        <input type="button" class="btn btn-danger" onclick="r()"
                               value="<?php 
        echo $hesklang['reset'];
        ?>
"/>
                    </div>
                </div>
            <?php 
    }
    /* Do we have any canned responses? */
    if (strlen($can_options)) {
        ?>
            <div class="form-group">
                <label for="saved_replies" class="col-sm-3 control-label"><?php 
        echo $hesklang['saved_replies'];
        ?>
:</label>
                <div class="col-sm-9">
                    <label><input type="radio" name="mode" id="modeadd" value="1" checked="checked" /> <?php 
        echo $hesklang['madd'];
        ?>
</label><br />
                    <label><input type="radio" name="mode" id="moderep" value="0" /> <?php 
        echo $hesklang['mrep'];
        ?>
</label>
                   <select class="form-control" name="saved_replies" onchange="setMessage(this.value)">
		                <option value="0"> - <?php 
        echo $hesklang['select_empty'];
        ?>
 - </option>
		                <?php 
        echo $can_options;
        ?>
		            </select>
                </div>     
            </div>
            <?php 
    }
    ?>
            <div class="form-group">
                <label for="message" class="col-sm-3 control-label"><?php 
    echo $hesklang['message'];
    ?>
: <font class="important">*</font></label>
                <div class="col-sm-9">
                    <span id="HeskMsg">
                        <textarea class="form-control" name="message" id="message" rows="12" placeholder="<?php 
    echo htmlspecialchars($hesklang['message']);
    ?>
" cols="72"><?php 
    // Do we have any message stored in session?
    if (isset($_SESSION['ticket_message'])) {
        echo stripslashes(hesk_input($_SESSION['ticket_message']));
    } else {
        $res = hesk_dbQuery("SELECT `message` FROM `" . hesk_dbEscape($hesk_settings['db_pfix']) . "reply_drafts` WHERE `owner`=" . intval($_SESSION['id']) . " AND `ticket`=" . intval($ticket['id']) . " LIMIT 1");
        if (hesk_dbNumRows($res) == 1) {
            echo hesk_dbResult($res);
        }
    }
    ?>
</textarea></span>
                </div>
            </div>
            <?php 
    /* attachments */
    if ($hesk_settings['attachments']['use']) {
        ?>
            <div class="form-group">
                <label for="attachments" class="col-sm-3 control-label"><?php 
        echo $hesklang['attachments'];
        ?>
:</label>
                <div class="col-sm-9">
                    <?php 
        for ($i = 1; $i <= $hesk_settings['attachments']['max_number']; $i++) {
            echo '<input type="file" name="attachment[' . $i . ']" size="50" /><br />';
        }
        echo '<a href="Javascript:void(0)" onclick="Javascript:hesk_window(\'../file_limits.php\',250,500);return false;">' . $hesklang['ful'] . '</a>';
        ?>
                </div>     
            </div>
            <?php 
    }
    ?>
            <div class="form-group">
                <label for="options" class="col-sm-3 control-label"><?php 
    echo $hesklang['addop'];
    ?>
:</label>
                <div class="col-sm-9">
                   <?php 
    if ($ticket['owner'] != $_SESSION['id'] && $can_assign_self) {
        if (empty($ticket['owner'])) {
            echo '<label><input type="checkbox" name="assign_self" value="1" checked="checked" /> <b>' . $hesklang['asss2'] . '</b></label><br />';
        } else {
            echo '<label><input type="checkbox" name="assign_self" value="1" /> ' . $hesklang['asss2'] . '</label><br />';
        }
    }
    $statusSql = 'SELECT `ID` FROM `' . hesk_dbEscape($hesk_settings['db_pfix']) . 'statuses` WHERE `IsStaffClosedOption` = 1';
    $statusRow = hesk_dbQuery($statusSql)->fetch_assoc();
    $staffClosedOptionStatus = array();
    $staffClosedOptionStatus['ID'] = $statusRow['ID'];
    ?>
	                <div class="form-inline">
                        <label>
                            <input type="checkbox" name="set_priority" value="1" /> <?php 
    echo $hesklang['change_priority'];
    ?>
                        </label>
	                    <select class="form-control" name="priority">
	                        <?php 
    echo implode('', $options);
    ?>
	                    </select>
                    </div>
                    <br />
	                <label>
                        <input type="checkbox" name="signature" value="1" checked="checked" /> <?php 
    echo $hesklang['attach_sign'];
    ?>
                    </label>
	                (<a href="profile.php"><?php 
    echo $hesklang['profile_settings'];
    ?>
</a>)
                    <br />
                    <label>
                        <input type="checkbox" name="no_notify" value="1" <?php 
    echo $_SESSION['notify_customer_reply'] && !empty($ticket['email']) ? '' : 'checked="checked" ';
    ?>
 <?php 
    if (empty($ticket['email'])) {
        echo 'disabled';
    }
    ?>
> <?php 
    echo $hesklang['dsen'];
    ?>
                    </label><br/><br/>
                    <?php 
    if (empty($ticket['email'])) {
        echo '<input type="hidden" name="no_notify" value="1">';
    }
    ?>
                    <input type="hidden" name="orig_id" value="<?php 
    echo $ticket['id'];
    ?>
" />
                    <input type="hidden" name="token" value="<?php 
    hesk_token_echo();
    ?>
" />
                    <div class="btn-group">
                        <input class="btn btn-primary" type="submit" value="<?php 
    echo $hesklang['submit_reply'];
    ?>
">
                        <button type="button" class="btn btn-primary dropdown-toggle" data-toggle="dropdown" aria-expanded="false">
                            <span class="caret"></span>
                            <span class="sr-only">Toggle Dropdown</span>
                        </button>
                        <ul class="dropdown-menu" role="menu">
                            <li><a>
                                <button class="dropdown-submit" type="submit" name="submit_as_customer">
                                    <?php 
    echo $hesklang['sasc'];
    ?>
                                </button>
                            </a></li>
                            <li class="divider"></li>
                            <?php 
    $allStatusesRs = hesk_dbQuery('SELECT `ID`, `Key`, `TextColor` FROM `' . hesk_dbEscape($hesk_settings['db_pfix']) . 'statuses`');
    $statuses = array();
    while ($row = hesk_dbFetchAssoc($allStatusesRs)) {
        array_push($statuses, $row);
    }
    foreach ($statuses as $status) {
        echo '<li><a>
                                        <button class="dropdown-submit" type="submit" name="submit_as_status" value="' . $status['ID'] . '"">
                                            ' . $hesklang['submit_reply'] . ' ' . $hesklang['and_change_status_to'] . ' <b>
                                            <span style="color:' . $status['TextColor'] . '">' . $hesklang[$status['Key']] . '</span></b>
                                        </button>
                                    </a></li>';
    }
    ?>
                        </ul>
                    </div>
                    <input class="btn btn-default" type="submit" name="save_reply" value="<?php 
    echo $hesklang['sacl'];
    ?>
">
                    <?php 
    if ($isManager) {
        ?>
                        <input type="hidden" name="isManager" value="1">
                    <?php 
    }
    ?>
                </div>
            </div>
        </form>

<!-- END REPLY FORM -->
<?php 
}
コード例 #13
0
function hesk_printReplyForm()
{
    global $hesklang, $hesk_settings, $ticket, $admins, $can_options, $options, $can_assign_self;
    ?>
<!-- START REPLY FORM -->

	<div class="container addReply-title"><?php 
    echo $hesklang['add_reply'];
    ?>
</div>
	<div class="container replyTicket-form">
		<form method="post" action="admin_reply_ticket.php" enctype="multipart/form-data" name="form1" onsubmit="javascript:force_stop();return true;">
		
		<br/>
		
			<?php 
    /* Ticket assigned to someone else? */
    /*if ($ticket['owner'] && $ticket['owner'] != $_SESSION['id'] && isset($admins[$ticket['owner']]) )
    		{
    			hesk_show_notice($hesklang['nyt'] . ' ' . $admins[$ticket['owner']]);
    		}*/
    /* Ticket locked? */
    if ($ticket['locked']) {
        hesk_show_notice($hesklang['tislock']);
    }
    // Track time worked?
    if ($hesk_settings['time_worked']) {
        ?>

				<div class="white table-track-time-worked">
					<div class="form-inline time_worked">
						<label class="col-sm-2"><?php 
        echo $hesklang['ts'];
        ?>
</label>					
						<input class="form-control" type="text" name="time_worked" id="time_worked" size="10" value="<?php 
        echo isset($_SESSION['time_worked']) ? hesk_getTime($_SESSION['time_worked']) : '00:00:00';
        ?>
" />
						<button type="button" class="btn btn-default" onclick="ss()" id="startb"><?php 
        echo $hesklang['start'];
        ?>
</button>
						<button type="button" class="btn btn-default" onclick="r()"><?php 
        echo $hesklang['reset'];
        ?>
</button>
					</div>
				</div><!-- end table-track-time-worked-->
<br/>
			<?php 
    }
    /* Do we have any canned responses? */
    if (strlen($can_options)) {
        ?>
				<div class="white table-track-time-worked">
						<div class="form-inline" style=" margin-bottom: 10px;">
							<span class="admin_gray"><b>&raquo; <?php 
        echo $hesklang['saved_replies'];
        ?>
</b></span>
							<div class="form-group admin_gray" style="vertical-align: top;">
								<label for="modeadd"><input type="radio" name="mode" id="modeadd" value="1" checked="checked" /> <?php 
        echo $hesklang['madd'];
        ?>
</label><br />
								<label for="moderep"><input type="radio" name="mode" id="moderep" value="0" /> <?php 
        echo $hesklang['mrep'];
        ?>
</label>
							</div>
						</div>	
						<div class="form-inline admin_gray" style="margin-bottom: 10px;">
							<label for="selec-canned-response"><?php 
        echo $hesklang['select_saved'];
        ?>
:</label>
							<select id="selec-canned-response" name="saved_replies" onchange="setMessage(this.value)">
								<option value="0"> - <?php 
        echo $hesklang['select_empty'];
        ?>
 - </option>
								<?php 
        echo $can_options;
        ?>
							</select>
						</div>
				</div><!-- end table-track-time-worked-->
			<?php 
    }
    ?>

			<div class="form-inline">
			<span class="col-sm-2"><?php 
    echo $hesklang['message'];
    ?>
: <font class="important">*</font></span>
			<span id="HeskMsg"><textarea name="message" id="message" rows="12" cols="72" class="HeskMsg-addReply form-control">
			<?php 
    // Do we have any message stored in session?
    if (isset($_SESSION['ticket_message'])) {
        echo stripslashes(hesk_input($_SESSION['ticket_message']));
    } else {
        $res = hesk_dbQuery("SELECT `message` FROM `" . hesk_dbEscape($hesk_settings['db_pfix']) . "reply_drafts` WHERE `owner`=" . intval($_SESSION['id']) . " AND `ticket`=" . intval($ticket['id']) . " LIMIT 1");
        if (hesk_dbNumRows($res) == 1) {
            echo hesk_dbResult($res);
        }
    }
    ?>
</textarea></span></div>
			
			<br/>
			
			<div class="form-inline">
			<?php 
    /* attachments */
    if ($hesk_settings['attachments']['use']) {
        ?>
				
				<?php 
        echo '<span class="col-sm-2">' . $hesklang['attachments'] . ':' . '</span>';
        echo '<div class="form-group" id="attachments-addReply">';
        for ($i = 1; $i <= $hesk_settings['attachments']['max_number']; $i++) {
            echo '<input id="chooseFile-addReply" type="file" name="attachment[' . $i . ']" size="50" />';
        }
        echo '<span>(<a href="Javascript:void(0)" onclick="Javascript:hesk_window(\'../file_limits.php\',250,500);return false;">' . $hesklang['ful'] . '</a>)</span>';
        echo ' </div>';
        ?>
				
			<?php 
    }
    ?>
			</div>

			<br/>
	<div class="first-table">
		<?php 
    /*if ($ticket['owner'] != $_SESSION['id'] && $can_assign_self)
    		{
    			if (empty($ticket['owner']))
    			{
    				echo '<label class="container"><input type="checkbox" name="assign_self" value="1" checked="checked" /> <b>'.$hesklang['asss2'].'</b></label><br />';
    			}
    			else
    			{
    				echo '<label class="container"><input type="checkbox" name="assign_self" value="1" /> '.$hesklang['asss2'].'</label><br />';
    			}
    		}*/
    ?>
		<div class="form-inline">
		<label class="col-sm-2 control-label"><input type="checkbox" name="set_priority" value="1" /> <?php 
    echo $hesklang['change_priority'];
    ?>
 </label>
		<select class="form-control" name="priority">
			<?php 
    echo implode('', $options);
    ?>
		</select>
		</div>
		
		<br />
		
		<!--<div class="form-inline">
		<label class="col-sm-2"><input type="checkbox" name="signature" value="1" checked="checked" /> <?php 
    //echo $hesklang['attach_sign'];
    ?>
</label>
		<span>(<a href="profile.php"><?php 
    //echo $hesklang['profile_settings'];
    ?>
</a>)</span>
		</div>-->
		
		<label class="container"><input type="checkbox" name="no_notify" value="1" <?php 
    echo $_SESSION['notify_customer_reply'] ? '' : 'checked="checked"';
    ?>
 /> <?php 
    echo $hesklang['dsen'];
    ?>
</label>
	</div><!-- end first-table-->
<br/>
			<div>
				<input type="hidden" name="orig_id" value="<?php 
    echo $ticket['id'];
    ?>
" />
				<input type="hidden" name="token" value="<?php 
    hesk_token_echo();
    ?>
" />
				<input type="submit" value="<?php 
    echo $hesklang['submit_reply'];
    ?>
" class="btn btn-default submit_reply_btn" />
				&nbsp;
				<input type="submit" name="save_reply" value="<?php 
    echo $hesklang['sacl'];
    ?>
" class="btn btn-default sacl_btn" />
			</div>
			<br/>
			
			<?php 
    // If ticket is not locked, show additional submit options
    if (!$ticket['locked']) {
        ?>
				<div>
					<input type="submit" name="submit_as_customer" value="<?php 
        echo $hesklang['sasc'];
        ?>
" class="btn btn-default sasc_btn" />
					<input type="submit" name="submit_as_resolved" value="<?php 
        echo $hesklang['submit_as'] . ' ' . $hesklang['closed'];
        ?>
" class="btn btn-default submit_as_closed_btn" />
					<input type="submit" name="submit_as_in_progress" value="<?php 
        echo $hesklang['submit_as'] . ' ' . $hesklang['in_progress'];
        ?>
" class="btn btn-default submit_as_in_progress_btn" />
					<input type="submit" name="submit_as_on_hold" value="<?php 
        echo $hesklang['submit_as'] . ' ' . $hesklang['on_hold'];
        ?>
" class="btn btn-default submit_as_on_hold_btn" />
				</div>
				<br/>
				<?php 
    }
    ?>

		</form>

	</div><!-- end reply-form-admin-ticket -->

<!-- END REPLY FORM -->
<?php 
}
コード例 #14
0
ファイル: admin_settings.php プロジェクト: riansopian/hesk
        $last = strtoupper(substr($tmp, -1));
        switch ($last) {
            case 'K':
                $tmp = $tmp * 1024;
                break;
            case 'M':
                $tmp = $tmp * 1048576;
                break;
            case 'G':
                $tmp = $tmp * 1073741824;
                break;
            default:
                $tmp = $tmp;
        }
        if ($tmp < $hesk_settings['attachments']['max_size'] * $hesk_settings['attachments']['max_number'] + 524288) {
            hesk_show_notice($hesklang['fatte3']);
        }
    }
}
?>

	</td>
	<td class="roundcornersright">&nbsp;</td>
	</tr>
	<tr>
	<td><img src="../img/roundcornerslb.jpg" width="7" height="7" alt="" /></td>
	<td class="roundcornersbottom"></td>
	<td width="7" height="7"><img src="../img/roundcornersrb.jpg" width="7" height="7" alt="" /></td>
	</tr>
</table>
コード例 #15
0
ファイル: ticket_list.inc.php プロジェクト: abuhannan/aduan
    hesk_token_echo();
    ?>
" />
		<input type="submit" value="<?php 
    echo $hesklang['execute'];
    ?>
" class="orangebutton"  onmouseover="hesk_btn(this,'orangebuttonover');" onmouseout="hesk_btn(this,'orangebutton');" />
    </td>
    </tr>
    </table>

	</form>
	<?php 
} else {
    if (isset($is_search) || $href == 'find_tickets.php') {
        hesk_show_notice($hesklang['no_tickets_crit']);
    } else {
        echo '<p>&nbsp;<br />&nbsp;<b><i>' . $hesklang['no_tickets_open'] . '</i></b><br />&nbsp;</p>';
    }
}
function hesk_print_list_head()
{
    global $hesk_settings, $href, $query, $sort_possible, $hesklang;
    ?>
	<div align="center">
	<table border="0" width="100%" cellspacing="1" cellpadding="3" class="white">
	<tr>
	<th class="admin_white" style="width:1px"><input type="checkbox" name="checkall" value="2" onclick="hesk_changeAll(this)" /></th>
	<?php 
    foreach ($hesk_settings['ticket_list'] as $field) {
        echo '<th class="admin_white" style="text-align:left; white-space:nowrap;"><a href="' . $href . '?' . $query . $sort_possible[$field] . '&amp;sort=' . $field . '">' . $hesk_settings['possible_ticket_list'][$field] . '</a></th>';
コード例 #16
0
ファイル: profile.php プロジェクト: riansopian/hesk
/* Print header */
require_once HESK_PATH . 'inc/header.inc.php';
/* Print admin navigation */
require_once HESK_PATH . 'inc/show_admin_nav.inc.php';
?>

</td>
</tr>
<tr>
<td>

<?php 
/* This will handle error, success and notice messages */
hesk_handle_messages();
if (defined('WARN_PASSWORD')) {
    hesk_show_notice($hesklang['chdp2'], '<span class="important">' . $hesklang['security'] . '</span>');
}
?>

	<h3 align="center"><?php 
echo $hesklang['profile_for'] . ' <b>' . $_SESSION['new']['user'];
?>
</b></h3>

	<p align="center"><?php 
echo $hesklang['req_marked_with'];
?>
 <span class="important">*</span></p>

	<?php 
if ($hesk_settings['can_sel_lang']) {
コード例 #17
0
echo $hesk_settings['hesk_title'];
?>
</a></li>
  <li class="active"><?php 
echo $hesklang['tid_sent'];
?>
</li>
</ol>

<div style="width: 80%; margin-left: auto; margin-right: auto;">
    <?php 
if ($createTicket) {
    // Show success message with link to ticket
    hesk_show_success($hesklang['ticket_submitted'] . '<br /><br />' . $hesklang['ticket_submitted_success'] . ': <b>' . $ticket['trackid'] . '</b><br /><br /> ' . ($hesk_settings['notify_new'] && $hesk_settings['spam_notice'] ? $hesklang['spam_inbox'] . '<br /><br />' : '') . '<a href="' . $hesk_settings['hesk_url'] . '/ticket.php?track=' . $ticket['trackid'] . '">' . $hesklang['view_your_ticket'] . '</a>');
} else {
    hesk_show_notice($hesklang['verify_your_email'] . '<br><br>' . $hesklang['check_spambox']);
}
// Any other messages to display?
hesk_handle_messages();
?>
</div>

<?php 
require_once HESK_PATH . 'inc/footer.inc.php';
exit;
function hesk_forceStop()
{
    global $hesklang;
    ?>
	<html>
	<head>