本文整理汇总了PHP中hesk_cleanSessionVars函数的典型用法代码示例。如果您正苦于以下问题:PHP hesk_cleanSessionVars函数的具体用法?PHP hesk_cleanSessionVars怎么用?PHP hesk_cleanSessionVars使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了hesk_cleanSessionVars函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: hesk_process_messages
$date_input = '';
}
/* Any errors? */
if (strlen($hesk_error_buffer)) {
hesk_process_messages($hesk_error_buffer, 'NOREDIRECT');
}
/* This will handle error, success and notice messages */
$handle = hesk_handle_messages();
# echo "$sql<br/>";
// That's all the SQL we need for count
$sql_count .= $sql;
$sql = $sql_final . $sql;
/* Prepare variables used in search and forms */
require_once HESK_PATH . 'inc/prepare_ticket_search.inc.php';
/* If there has been an error message skip searching for tickets */
if ($handle !== FALSE) {
$href = 'find_tickets.php';
require_once HESK_PATH . 'inc/ticket_list.inc.php';
}
?>
<br/><br/>
<?php
/* Clean unneeded session variables */
hesk_cleanSessionVars('hide');
/* Show the search form */
require_once HESK_PATH . 'inc/show_search_form.inc.php';
/* Print footer */
require_once HESK_PATH . 'inc/footer.inc.php';
exit;
示例2: print_login
//.........这里部分代码省略.........
<div class="g-recaptcha" data-sitekey="<?php
echo $hesk_settings['recaptcha_public_key'];
?>
"></div>
</div>
</div>
<?php
} else {
echo '<div class="form-group"><div class="col-md-8 col-md-offset-4">';
$cls = in_array('mysecnum', $_SESSION['a_iserror']) ? ' class="isError" ' : '';
echo $hesklang['sec_enter'] . '<br /> <br /><img src="' . HESK_PATH . 'print_sec_img.php?' . rand(10000, 99999) . '" width="150" height="40" alt="' . $hesklang['sec_img'] . '" title="' . $hesklang['sec_img'] . '" border="1" name="secimg" style="vertical-align:text-bottom" /> ' . '<a href="javascript:void(0)" onclick="javascript:document.form1.secimg.src=\'' . HESK_PATH . 'print_sec_img.php?\'+ ( Math.floor((90000)*Math.random()) + 10000);"><img src="' . HESK_PATH . 'img/reload.png" height="24" width="24" alt="' . $hesklang['reload'] . '" title="' . $hesklang['reload'] . '" border="0" style="vertical-align:text-bottom" /></a>' . '<br /> <br /><input type="text" name="mysecnum" size="20" maxlength="5" ' . $cls . ' />';
echo '</div></div>';
}
}
// End if $hesk_settings['secimg_use'] == 2
if ($hesk_settings['autologin']) {
?>
<div class="form-group">
<div class="col-md-offset-4 col-md-8">
<div class="radio">
<label><input type="radio" name="remember_user" value="AUTOLOGIN" <?php
echo $is_1;
?>
/> <?php
echo $hesklang['autologin'];
?>
</label>
</div>
<div class="radio">
<label><input type="radio" name="remember_user" value="JUSTUSER" <?php
echo $is_2;
?>
/> <?php
echo $hesklang['just_user'];
?>
</label>
</div>
<div class="radio">
<label><input type="radio" name="remember_user" value="NOTHANKS" <?php
echo $is_3;
?>
/> <?php
echo $hesklang['nothx'];
?>
</label>
</div>
</div>
</div>
<?php
} else {
?>
<div class="form-group">
<div class="col-md-offset-4 col-md-8">
<div class="checkbox">
<label><input type="checkbox" name="remember_user" value="JUSTUSER" <?php
echo $is_2;
?>
/> <?php
echo $hesklang['remember_user'];
?>
</label>
</div>
</div>
</div>
<?php
}
// End if $hesk_settings['autologin']
?>
<div class="form-group">
<div class="col-md-offset-4 col-md-8">
<input type="submit" value="<?php
echo $hesklang['click_login'];
?>
" class="btn btn-default" />
<input type="hidden" name="a" value="do_login" />
<?php
if (hesk_isREQUEST('goto') && ($url = hesk_REQUEST('goto'))) {
echo '<input type="hidden" name="goto" value="' . $url . '" />';
}
// Do we allow staff password reset?
if ($hesk_settings['reset_pass']) {
echo '<br /> <br /><a href="password.php" class="smaller">' . $hesklang['fpass'] . '</a>';
}
?>
</div>
</div>
</form>
</div>
</div>
</div>
<p> </p>
<?php
hesk_cleanSessionVars('a_iserror');
require_once HESK_PATH . 'inc/footer.inc.php';
exit;
}
示例3: hesk_handle_messages
/* This will handle error, success and notice messages */
hesk_handle_messages();
/* Show a message? */
if ($action == 'read') {
show_message();
}
/* Hide list of messages? */
if (!isset($_SESSION['hide']['list'])) {
mail_list_messages();
}
// END hide list of messages
/* Show new message form */
show_new_form();
/* Clean unneeded session variables */
hesk_cleanSessionVars('hide');
hesk_cleanSessionVars('mail');
require_once HESK_PATH . 'inc/footer.inc.php';
exit;
/*** START FUNCTIONS ***/
function mail_delete()
{
global $hesk_settings, $hesklang;
/* A security check */
hesk_token_check();
$ids = mail_get_ids();
if ($ids) {
foreach ($ids as $id) {
/* If both correspondents deleted the mail remove it from database, otherwise mark as deleted by this user */
hesk_dbQuery("UPDATE `" . hesk_dbEscape($hesk_settings['db_pfix']) . "mail` SET `deletedby`='" . intval($_SESSION['id']) . "' WHERE `id`='" . intval($id) . "' AND (`to`='" . intval($_SESSION['id']) . "' OR `from`='" . intval($_SESSION['id']) . "') AND `deletedby`=0 LIMIT 1");
if (hesk_dbAffectedRows() != 1) {
hesk_dbQuery("DELETE FROM `" . hesk_dbEscape($hesk_settings['db_pfix']) . "mail` WHERE `id`='" . intval($id) . "' AND (`to`='" . intval($_SESSION['id']) . "' OR `from`='" . intval($_SESSION['id']) . "') AND `deletedby`!=0 LIMIT 1");
示例4: update_profile
function update_profile()
{
global $hesk_settings, $hesklang, $can_view_unassigned;
/* A security check */
hesk_token_check('POST');
$sql_pass = '';
$sql_username = '';
$hesk_error_buffer = '';
$newvar['new']['name'] = hesk_input(hesk_POST('name')) or $hesk_error_buffer .= '<li>' . $hesklang['enter_your_name'] . '</li>';
$newvar['new']['email'] = hesk_validateEmail(hesk_POST('email'), 'ERR', 0) or $hesk_error_buffer = '<li>' . $hesklang['enter_valid_email'] . '</li>';
$newvar['new']['signature'] = hesk_input(hesk_POST('signature'));
$newvar['new']['user'] = hesk_input(hesk_POST('user'));
$newvar['new']['address'] = hesk_input(hesk_POST('address'));
$newvar['new']['phonenumber'] = hesk_input(hesk_POST('phonenumber'));
$newvar['new']['poz_detyres'] = hesk_input(hesk_POST('poz_detyres'));
/* Signature */
if (strlen($newvar['new']['signature']) > 1000) {
$hesk_error_buffer .= '<li>' . $hesklang['signature_long'] . '</li>';
}
$sql_username = ",user='" . hesk_dbEscape($newvar['new']['user']) . "'";
/* Change password? */
$newpass_cl = hesk_input(hesk_POST('newpass_cl'));
$passlen = strlen($newpass_cl);
if ($passlen > 0) {
/* At least 5 chars? */
if ($passlen < 5) {
$hesk_error_buffer .= '<li>' . $hesklang['password_not_valid'] . '</li>';
} else {
$newpass2_cl = hesk_input(hesk_POST('newpass2_cl'));
if ($newpass_cl != $newpass2_cl) {
$hesk_error_buffer .= '<li>' . $hesklang['passwords_not_same'] . '</li>';
} else {
$v = hesk_Pass2Hash($newpass_cl);
if ($v == '499d74967b28a841c98bb4baaabaad699ff3c079') {
define('WARN_PASSWORD', true);
}
$sql_pass = ',`pass`=\'' . $v . '\'';
}
}
}
$id = hesk_input(hesk_POST('userid'));
/* Any errors? */
if (strlen($hesk_error_buffer)) {
/* Process the session variables */
$newvar['new'] = hesk_stripArray($newvar['new']);
$hesk_error_buffer = $hesklang['rfm'] . '<br /><br /><ul>' . $hesk_error_buffer . '</ul>';
//hesk_process_messages($hesk_error_buffer,'NOREDIRECT');
}
//else
//{
$query = "UPDATE " . hesk_dbEscape($hesk_settings['db_pfix']) . "clients SET \n\t\t\tname='" . hesk_dbEscape($newvar['new']['name']) . "', \n\t\t\temail='" . hesk_dbEscape($newvar['new']['email']) . "', \n\t\t\tuser='" . hesk_dbEscape($newvar['new']['user']) . "',\n\t\t\taddress='" . hesk_dbEscape($newvar['new']['address']) . "',\n\t\t\tphonenumber='" . hesk_dbEscape($newvar['new']['phonenumber']) . "',\n\t\t\tpoz_detyres='" . hesk_dbEscape($newvar['new']['poz_detyres']) . "',\n\t\t\tsignature='" . hesk_dbEscape($newvar['new']['signature']) . "'\n\t\t\t{$sql_pass}\n\t\t\tWHERE id=" . $id . " LIMIT 1";
/* Update database */
$result = hesk_dbQuery($query);
/* Process the session variables */
$newvar['new'] = hesk_stripArray($newvar['new']);
$tmp = $_SESSION['id']['id'];
$_SESSION['id'] = $newvar['new'];
$_SESSION['id']['id'] = $tmp;
/* Update session variables */
/*foreach ($newvar['new'] as $k => $v)
{
$_SESSION[$k] = $v;
}*/
unset($newvar['new']);
hesk_cleanSessionVars('as_notify');
hesk_process_messages($hesklang['profile_updated_success'], 'client_profile.php', 'SUCCESS');
// }
}
示例5: hesk_token_echo
echo $hesklang['asss2'];
?>
</label>
</div>
<?php
}
?>
</div>
</div>
<!-- Submit -->
<div class="container">
<input type="hidden" name="token" value="<?php
hesk_token_echo();
?>
" />
<input type="submit" value="<?php
echo $hesklang['sub_ticket'];
?>
" class="btn btn-default submit-new-ticket-btn" />
</div>
</form><!-- END FORM -->
</div>
</div><!-- end insert-new-ticket -->
<?php
hesk_cleanSessionVars('iserror');
hesk_cleanSessionVars('isnotice');
require_once HESK_PATH . 'inc/footer.inc.php';
exit;
示例6: print_add_ticket
function print_add_ticket()
{
global $hesk_settings, $hesklang;
// Auto-focus first empty or error field
define('AUTOFOCUS', true);
// Pre-populate fields
// Customer name
if (isset($_REQUEST['name'])) {
$_SESSION['c_name'] = $_REQUEST['name'];
}
// Customer email address
if (isset($_REQUEST['email'])) {
$_SESSION['c_email'] = $_REQUEST['email'];
$_SESSION['c_email2'] = $_REQUEST['email'];
}
// Category ID
if (isset($_REQUEST['catid'])) {
$_SESSION['c_category'] = intval($_REQUEST['catid']);
}
if (isset($_REQUEST['category'])) {
$_SESSION['c_category'] = intval($_REQUEST['category']);
}
// Priority
if (isset($_REQUEST['priority'])) {
$_SESSION['c_priority'] = intval($_REQUEST['priority']);
}
// Subject
if (isset($_REQUEST['subject'])) {
$_SESSION['c_subject'] = $_REQUEST['subject'];
}
// Message
if (isset($_REQUEST['message'])) {
$_SESSION['c_message'] = $_REQUEST['message'];
}
// Custom fields
foreach ($hesk_settings['custom_fields'] as $k => $v) {
if ($v['use'] && isset($_REQUEST[$k])) {
$_SESSION['c_' . $k] = $_REQUEST[$k];
}
}
// Varibles for coloring the fields in case of errors
if (!isset($_SESSION['iserror'])) {
$_SESSION['iserror'] = array();
}
if (!isset($_SESSION['isnotice'])) {
$_SESSION['isnotice'] = array();
}
if (!isset($_SESSION['c_category']) && !$hesk_settings['select_cat']) {
$_SESSION['c_category'] = 0;
}
hesk_cleanSessionVars('already_submitted');
// Tell header to load reCaptcha API if needed
if ($hesk_settings['recaptcha_use'] == 2) {
define('RECAPTCHA', 1);
}
// Print header
$hesk_settings['tmp_title'] = $hesk_settings['hesk_title'] . ' - ' . $hesklang['submit_ticket'];
require_once HESK_PATH . 'inc/header.inc.php';
//box hijau
?>
<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"><?php
hesk_showTopBar($hesklang['submit_ticket']);
?>
</td>
<td width="3"><img src="img/headerrightsm.jpg" width="3" height="25" alt="" /></td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="3">
<tr>
<td><span class="smaller"><a href="<?php
echo $hesk_settings['site_url'];
?>
" class="smaller"><?php
echo $hesk_settings['site_title'];
?>
</a> >
<a href="<?php
echo $hesk_settings['hesk_url'];
?>
" class="smaller"><?php
echo $hesk_settings['hesk_title'];
?>
</a>
> <?php
echo $hesklang['submit_ticket'];
?>
</span></td>
</tr>
</table>
</td>
</tr>
<tr>
<td>
<?php
//.........这里部分代码省略.........
示例7: hesk_cleanSessionVars
$k++;
}
// End while
?>
</table>
</div>
<?php
}
?>
<p> </p>
<p> </p>
<p> </p>
<?php
hesk_cleanSessionVars(array('new_sm', 'preview_sm', 'edit_sm'));
require_once HESK_PATH . 'inc/footer.inc.php';
exit;
/*** START FUNCTIONS ***/
function save_sm()
{
global $hesk_settings, $hesklang, $listBox;
global $hesk_error_buffer;
// A security check
# hesk_token_check('POST');
$hesk_error_buffer = array();
// Get service messageID
$id = intval(hesk_POST('id')) or hesk_error($hesklang['sm_e_id']);
$style = intval(hesk_POST('style', 0));
if ($style > 4 || $style < 0) {
$style = 0;
示例8: print_login
//.........这里部分代码省略.........
echo $hesklang['sec_enter'] . '<br /> <br /><img src="' . HESK_PATH . 'print_sec_img.php?' . rand(10000, 99999) . '" width="150" height="40" alt="' . $hesklang['sec_img'] . '" title="' . $hesklang['sec_img'] . '" border="1" name="secimg" style="vertical-align:text-bottom" /> ' . '<a href="javascript:void(0)" onclick="javascript:document.form1.secimg.src=\'' . HESK_PATH . 'print_sec_img.php?\'+ ( Math.floor((90000)*Math.random()) + 10000);"><img src="' . HESK_PATH . 'img/reload.png" height="24" width="24" alt="' . $hesklang['reload'] . '" title="' . $hesklang['reload'] . '" border="0" style="vertical-align:text-bottom" /></a>' . '<br /> <br /><input type="text" name="mysecnum" size="20" maxlength="5" ' . $cls . ' />';
}
?>
<hr />
</td>
</tr>
<?php
} else {
?>
<tr>
<td width="60"> </td>
<td> </td>
</tr>
<?php
}
// End if $hesk_settings['secimg_use'] == 2
if ($hesk_settings['autologin']) {
?>
<tr>
<td width="60"> </td>
<td><label><input type="radio" name="remember_user" value="AUTOLOGIN" <?php
echo $is_1;
?>
/> <?php
echo $hesklang['autologin'];
?>
</label><br />
<label><input type="radio" name="remember_user" value="JUSTUSER" <?php
echo $is_2;
?>
/> <?php
echo $hesklang['just_user'];
?>
</label><br />
<label><input type="radio" name="remember_user" value="NOTHANKS" <?php
echo $is_3;
?>
/> <?php
echo $hesklang['nothx'];
?>
</label></td>
</tr>
<?php
} else {
?>
<tr>
<td width="60"> </td>
<td><label><input type="checkbox" name="remember_user" value="JUSTUSER" <?php
echo $is_2;
?>
/> <?php
echo $hesklang['remember_user'];
?>
</label></td>
</tr>
<?php
}
// End if $hesk_settings['autologin']
?>
<tr>
<td width="60"> </td>
<td> </td>
</tr>
<tr>
<td width="60"> </td>
<td><input type="submit" value="<?php
echo $hesklang['click_login'];
?>
" class="orangebutton" onmouseover="hesk_btn(this,'orangebuttonover');" onmouseout="hesk_btn(this,'orangebutton');" />
<input type="hidden" name="a" value="do_login" />
<?php
if (hesk_isREQUEST('goto') && ($url = hesk_REQUEST('goto'))) {
echo '<input type="hidden" name="goto" value="' . $url . '" />';
}
?>
<br />
</td>
</tr>
</table>
</form>
</td>
<td class="roundcornersright"> </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>
</div>
<p> </p>
<?php
hesk_cleanSessionVars('a_iserror');
require_once HESK_PATH . 'inc/footer.inc.php';
exit;
}
示例9: update_profile
function update_profile()
{
global $hesk_settings, $hesklang, $can_view_unassigned;
/* A security check */
hesk_token_check('POST');
$sql_pass = '';
$sql_username = '';
$hesk_error_buffer = '';
$_SESSION['new']['name'] = hesk_input(hesk_POST('name')) or $hesk_error_buffer .= '<li>' . $hesklang['enter_your_name'] . '</li>';
$_SESSION['new']['email'] = hesk_validateEmail(hesk_POST('email'), 'ERR', 0) or $hesk_error_buffer = '<li>' . $hesklang['enter_valid_email'] . '</li>';
$_SESSION['new']['address'] = hesk_input(hesk_POST('address'));
$_SESSION['new']['phonenumber'] = hesk_input(hesk_POST('phonenumber'));
$_SESSION['new']['poz_detyres'] = hesk_input(hesk_POST('poz_detyres'));
$_SESSION['new']['signature'] = hesk_input(hesk_POST('signature'));
/* Signature */
if (strlen($_SESSION['new']['signature']) > 1000) {
$hesk_error_buffer .= '<li>' . $hesklang['signature_long'] . '</li>';
}
/* Admins can change username */
if ($_SESSION['isadmin']) {
$_SESSION['new']['user'] = hesk_input(hesk_POST('user')) or $hesk_error_buffer .= '<li>' . $hesklang['enter_username'] . '</li>';
/* Check for duplicate usernames */
$result = hesk_dbQuery("SELECT `id` FROM `" . hesk_dbEscape($hesk_settings['db_pfix']) . "users` WHERE `user`='" . hesk_dbEscape($_SESSION['new']['user']) . "' AND `id`!='" . intval($_SESSION['id']) . "' LIMIT 1");
if (hesk_dbNumRows($result) != 0) {
$hesk_error_buffer .= '<li>' . $hesklang['duplicate_user'] . '</li>';
} else {
$sql_username = ",`user`='" . hesk_dbEscape($_SESSION['new']['user']) . "'";
}
}
/* Change password? */
$newpass = hesk_input(hesk_POST('newpass'));
$passlen = strlen($newpass);
if ($passlen > 0) {
/* At least 5 chars? */
if ($passlen < 5) {
$hesk_error_buffer .= '<li>' . $hesklang['password_not_valid'] . '</li>';
} else {
$newpass2 = hesk_input(hesk_POST('newpass2'));
if ($newpass != $newpass2) {
$hesk_error_buffer .= '<li>' . $hesklang['passwords_not_same'] . '</li>';
} else {
$v = hesk_Pass2Hash($newpass);
if ($v == '499d74967b28a841c98bb4baaabaad699ff3c079') {
define('WARN_PASSWORD', true);
}
$sql_pass = ',`pass`=\'' . $v . '\'';
}
}
}
/* After reply */
$_SESSION['new']['afterreply'] = intval(hesk_POST('afterreply'));
if ($_SESSION['new']['afterreply'] != 1 && $_SESSION['new']['afterreply'] != 2) {
$_SESSION['new']['afterreply'] = 0;
}
// Defaults
$_SESSION['new']['autostart'] = isset($_POST['autostart']) ? 1 : 0;
$_SESSION['new']['notify_customer_new'] = isset($_POST['notify_customer_new']) ? 1 : 0;
$_SESSION['new']['notify_customer_reply'] = isset($_POST['notify_customer_reply']) ? 1 : 0;
$_SESSION['new']['show_suggested'] = isset($_POST['show_suggested']) ? 1 : 0;
/* Notifications */
$_SESSION['new']['notify_new_unassigned'] = empty($_POST['notify_new_unassigned']) || !$can_view_unassigned ? 0 : 1;
$_SESSION['new']['notify_new_my'] = empty($_POST['notify_new_my']) ? 0 : 1;
$_SESSION['new']['notify_reply_unassigned'] = empty($_POST['notify_reply_unassigned']) || !$can_view_unassigned ? 0 : 1;
$_SESSION['new']['notify_reply_my'] = empty($_POST['notify_reply_my']) ? 0 : 1;
$_SESSION['new']['notify_assigned'] = empty($_POST['notify_assigned']) ? 0 : 1;
$_SESSION['new']['notify_note'] = empty($_POST['notify_note']) ? 0 : 1;
$_SESSION['new']['notify_pm'] = empty($_POST['notify_pm']) ? 0 : 1;
/* Any errors? */
if (strlen($hesk_error_buffer)) {
/* Process the session variables */
$_SESSION['new'] = hesk_stripArray($_SESSION['new']);
$hesk_error_buffer = $hesklang['rfm'] . '<br /><br /><ul>' . $hesk_error_buffer . '</ul>';
hesk_process_messages($hesk_error_buffer, 'NOREDIRECT');
} else {
/* Update database */
hesk_dbQuery("UPDATE `" . hesk_dbEscape($hesk_settings['db_pfix']) . "users` SET\n\t\t`name`='" . hesk_dbEscape($_SESSION['new']['name']) . "',\n\t\t`email`='" . hesk_dbEscape($_SESSION['new']['email']) . "',\n\t\t`address`='" . hesk_dbEscape($_SESSION['new']['address']) . "',\n\t\t`phonenumber`='" . hesk_dbEscape($_SESSION['new']['phonenumber']) . "',\n\t\t`poz_detyres`='" . hesk_dbEscape($_SESSION['new']['poz_detyres']) . "',\n\t\t`signature`='" . hesk_dbEscape($_SESSION['new']['signature']) . "'\n\t\t{$sql_username}\n\t\t{$sql_pass} ,\n\t\t`afterreply`='" . $_SESSION['new']['afterreply'] . "' ,\n\t\t" . ($hesk_settings['time_worked'] ? "`autostart`='" . $_SESSION['new']['autostart'] . "'," : '') . "\n\t\t`notify_customer_new`='" . $_SESSION['new']['notify_customer_new'] . "' ,\n\t\t`notify_customer_reply`='" . $_SESSION['new']['notify_customer_reply'] . "' ,\n\t\t`show_suggested`='" . $_SESSION['new']['show_suggested'] . "' ,\n\t\t`notify_new_unassigned`='" . $_SESSION['new']['notify_new_unassigned'] . "' ,\n\t\t`notify_new_my`='" . $_SESSION['new']['notify_new_my'] . "' ,\n\t\t`notify_reply_unassigned`='" . $_SESSION['new']['notify_reply_unassigned'] . "' ,\n\t\t`notify_reply_my`='" . $_SESSION['new']['notify_reply_my'] . "' ,\n\t\t`notify_assigned`='" . $_SESSION['new']['notify_assigned'] . "' ,\n\t\t`notify_pm`='" . $_SESSION['new']['notify_pm'] . "',\n\t\t`notify_note`='" . $_SESSION['new']['notify_note'] . "'\n\t\tWHERE `id`='" . intval($_SESSION['id']) . "' LIMIT 1");
/* Process the session variables */
$_SESSION['new'] = hesk_stripArray($_SESSION['new']);
/* Update session variables */
foreach ($_SESSION['new'] as $k => $v) {
$_SESSION[$k] = $v;
}
unset($_SESSION['new']);
hesk_cleanSessionVars('as_notify');
hesk_process_messages($hesklang['profile_updated_success'], 'profile.php', 'SUCCESS');
}
}
示例10: hesk_cleanSessionVars
</td>
<td class="roundcornersright"> </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>
<?php
}
/* Clear unneeded session variables */
hesk_cleanSessionVars('ticket_message');
hesk_cleanSessionVars('time_worked');
hesk_cleanSessionVars('note_message');
require_once HESK_PATH . 'inc/footer.inc.php';
/*** START FUNCTIONS ***/
function hesk_listAttachments($attachments = '', $reply = 0, $white = 1)
{
global $hesk_settings, $hesklang, $trackingID, $can_edit, $can_delete;
/* Attachments disabled or not available */
if (!$hesk_settings['attachments']['use'] || !strlen($attachments)) {
return false;
}
/* Style and mousover/mousout */
$tmp = $white ? 'White' : 'Blue';
$style = 'class="option' . $tmp . 'OFF" onmouseover="this.className=\'option' . $tmp . 'ON\'" onmouseout="this.className=\'option' . $tmp . 'OFF\'"';
/* List attachments */
echo '<p><b>' . $hesklang['attachments'] . ':</b><br />';
$att = explode(',', substr($attachments, 0, -1));
示例11: hesk_handle_messages
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;
}
示例12: print_add_ticket
//.........这里部分代码省略.........
} elseif ($hesk_settings['recaptcha_use'] == 2) {
?>
<div class="g-recaptcha" data-sitekey="<?php
echo $hesk_settings['recaptcha_public_key'];
?>
"></div>
<?php
} else {
$cls = in_array('mysecnum', $_SESSION['iserror']) ? ' class="isError" ' : '';
echo $hesklang['sec_enter'] . '<br /> <br /><img src="print_sec_img.php?' . rand(10000, 99999) . '" width="150" height="40" alt="' . $hesklang['sec_img'] . '" title="' . $hesklang['sec_img'] . '" border="1" name="secimg" style="vertical-align:text-bottom" /> ' . '<a href="javascript:void(0)" onclick="javascript:document.form1.secimg.src=\'print_sec_img.php?\'+ ( Math.floor((90000)*Math.random()) + 10000);"><img src="img/reload.png" height="24" width="24" alt="' . $hesklang['reload'] . '" title="' . $hesklang['reload'] . '" border="0" style="vertical-align:text-bottom" /></a>' . '<br /> <br /><input type="text" name="mysecnum" size="20" maxlength="5" ' . $cls . ' />';
}
?>
</div>
<?php
}
?>
</div><!-- end security-checks-support-request -->
<?php
}
?>
<!-- Submit -->
<?php
/*if ($hesk_settings['submit_notice'])
{
?>
<br/><br/>
<div align="center">
<div class="submit-notice-support-request">
<div>
<div>
<b><?php echo $hesklang['before_submit']; ?></b>
<ul>
<li><?php echo $hesklang['all_info_in']; ?>.</li>
<li><?php echo $hesklang['all_error_free']; ?>.</li>
</ul>
<b><?php echo $hesklang['we_have']; ?>:</b>
<ul>
<li><?php echo hesk_htmlspecialchars($_SERVER['REMOTE_ADDR']).' '.$hesklang['recorded_ip']; ?></li>
<li><?php echo $hesklang['recorded_time']; ?></li>
</ul>
<div class="col-sm-7 col-sm-offset-5"><input type="hidden" name="token" value="<?php hesk_token_echo(); ?>" />
<input type="submit" value="<?php echo $hesklang['sub_ticket']; ?>" class="btn btn-default submit-ticket-btn" /></div>
</div>
</div>
</div><!-- end submit-notice-support-request -->
</div>
<?php
} // End IF submit_notice
else
{*/
?>
<div class="else-submit-notice-support-request form-group">
<div class="col-sm-offset-2 col-sm-3">
<input type="hidden" name="token" value="<?php
hesk_token_echo();
?>
" />
<input type="submit" value="<?php
echo $hesklang['sub_ticket'];
?>
" class="btn btn-default submit-ticket-btn" />
</div>
</div><!-- end else-submit-notice-support-request -->
<?php
/*}*/
// End ELSE submit_notice
?>
<!-- Do not delete or modify the code below, it is used to detect simple SPAM bots -->
<input type="hidden" name="hx" value="3" /><input type="hidden" name="hy" value="" />
<!-- >
<input type="text" name="phone" value="3" />
< -->
</form>
<!-- END FORM -->
</div><!-- end form-submit-support-request -->
<!-- Go back -->
<div class="container"><a href="javascript:history.go(-1)"> <button type="submit" class="btn btn-default goback-btn"><?php
echo $hesklang['back'];
?>
</button></a></div>
<?php
hesk_cleanSessionVars('iserror');
hesk_cleanSessionVars('isnotice');
}
示例13: print_login
//.........这里部分代码省略.........
echo recaptcha_get_html($hesk_settings['recaptcha_public_key'], null, true);
} elseif ($hesk_settings['recaptcha_use'] == 2) {
?>
<div class="g-recaptcha" data-sitekey="<?php
echo $hesk_settings['recaptcha_public_key'];
?>
"></div>
<?php
} else {
$cls = in_array('mysecnum', $_SESSION['a_iserror']) ? ' class="isError" ' : '';
echo $hesklang['sec_enter'] . '<br /> <br /><img src="' . HESK_PATH . 'print_sec_img.php?' . rand(10000, 99999) . '" width="150" height="40" alt="' . $hesklang['sec_img'] . '" title="' . $hesklang['sec_img'] . '" border="1" name="secimg" style="vertical-align:text-bottom" /> ' . '<a href="javascript:void(0)" onclick="javascript:document.form1.secimg.src=\'' . HESK_PATH . 'print_sec_img.php?\'+ ( Math.floor((90000)*Math.random()) + 10000);"><img src="' . HESK_PATH . 'img/reload.png" height="24" width="24" alt="' . $hesklang['reload'] . '" title="' . $hesklang['reload'] . '" border="0" style="vertical-align:text-bottom" /></a>' . '<br /> <br /><input type="text" name="mysecnum" size="20" maxlength="5" ' . $cls . ' />';
}
?>
<br/><br/>
<?php
} else {
?>
<?php
}
// End if $hesk_settings['secimg_use'] == 2
if ($hesk_settings['autologin']) {
?>
<br/>
<div class="radios" style="text-align: -webkit-auto; display: inline-block;">
<div class="">
<span>
<input type="checkbox" name="remember_user" id="optionsRadios1" value="kot" <?php
echo $is_1;
?>
checked="checked" /> <?php
echo $hesklang['remember_user'];
?>
<br />
</span>
</div>
<div class="radio">
<span>
<input type="hidden" name="remember_user" id="optionsRadios2" value="AUTOLOGIN" <?php
echo $is_2;
?>
checked="checked" /><br />
</span>
</div>
</div>
<?php
} else {
?>
<label><input type="checkbox" name="remember_user" value="JUSTUSER" class="form-control"<?php
echo $is_2;
?>
/> <?php
echo $hesklang['remember_user'];
?>
</label>
<?php
}
// End if $hesk_settings['autologin']
?>
<br/><br/>
<button type="submit" class="btn btn-default" id="submit-login"><?php
echo $hesklang['click_login'];
?>
</button>
<input type="hidden" name="a" value="do_login" />
<?php
if (hesk_isREQUEST('goto') && ($url = hesk_REQUEST('goto'))) {
echo '<input type="hidden" name="goto" value="' . $url . '" />';
}
// Do we allow staff password reset?
if ($hesk_settings['reset_pass']) {
echo '<br /> <br /><div id="forgotpassw"><a href="password.php" class="smaller">' . $hesklang['fpass'] . '</a></div>';
}
?>
<br />
</form>
</div>
</div>
<div class="form-inline top-latest-kb-button">
<a href="http://localhost/support/knowledgebase.php#tab_home" target="_blank"><button type="submit" class="btn btn-default" id="top-kb-button" onmouseover="hesk_btn(this,'btn btn-defaultover');" onmouseout="hesk_btn(this,'btn btn-default');">Top Knowledgebase <br/> articles</button></a>
<a href="http://localhost/support/knowledgebase.php#tab_profile" target="_blank"><button type="submit" class="btn btn-default" id="latest-kb-button" onmouseover="hesk_btn(this,'btn btn-defaultover');" onmouseout="hesk_btn(this,'btn btn-default');">Latest Knowledgebase <br/> articles</button></a>
</div>
</div>
<div class="col-sm-7 help-staf"><img src="../img/help.jpg" alt="help" /></div>
</div>
<?php
hesk_cleanSessionVars('a_iserror');
require_once HESK_PATH . 'inc/footer.inc.php';
exit;
}
示例14: print_add_ticket
function print_add_ticket()
{
global $hesk_settings, $hesklang, $modsForHesk_settings;
// Auto-focus first empty or error field
define('AUTOFOCUS', true);
// Pre-populate fields
// Customer name
if (isset($_REQUEST['name'])) {
$_SESSION['c_name'] = $_REQUEST['name'];
}
// Customer email address
if (isset($_REQUEST['email'])) {
$_SESSION['c_email'] = $_REQUEST['email'];
$_SESSION['c_email2'] = $_REQUEST['email'];
}
// Category ID
if (isset($_REQUEST['catid'])) {
$_SESSION['c_category'] = intval($_REQUEST['catid']);
}
if (isset($_REQUEST['category'])) {
$_SESSION['c_category'] = intval($_REQUEST['category']);
}
// Priority
if (isset($_REQUEST['priority'])) {
$_SESSION['c_priority'] = intval($_REQUEST['priority']);
}
// Subject
if (isset($_REQUEST['subject'])) {
$_SESSION['c_subject'] = $_REQUEST['subject'];
}
// Message
if (isset($_REQUEST['message'])) {
$_SESSION['c_message'] = $_REQUEST['message'];
}
// Custom fields
foreach ($hesk_settings['custom_fields'] as $k => $v) {
if ($v['use'] && isset($_REQUEST[$k])) {
$_SESSION['c_' . $k] = $_REQUEST[$k];
}
}
// Variables for coloring the fields in case of errors
if (!isset($_SESSION['iserror'])) {
$_SESSION['iserror'] = array();
}
if (!isset($_SESSION['isnotice'])) {
$_SESSION['isnotice'] = array();
}
if (!isset($_SESSION['c_category']) && !$hesk_settings['select_cat']) {
$_SESSION['c_category'] = 0;
}
hesk_cleanSessionVars('already_submitted');
// Tell header to load reCaptcha API if needed
if ($hesk_settings['recaptcha_use'] == 2) {
define('RECAPTCHA', 1);
}
// Print header
$hesk_settings['tmp_title'] = $hesk_settings['hesk_title'] . ' - ' . $hesklang['submit_ticket'];
require_once HESK_PATH . 'inc/header.inc.php';
?>
<ol class="breadcrumb">
<li><a href="<?php
echo $hesk_settings['site_url'];
?>
"><?php
echo $hesk_settings['site_title'];
?>
</a></li>
<li><a href="<?php
echo $hesk_settings['hesk_url'];
?>
"><?php
echo $hesk_settings['hesk_title'];
?>
</a></li>
<li class="active"><?php
echo $hesklang['sub_support'];
?>
</li>
</ol>
<!-- START MAIN LAYOUT -->
<?php
$columnWidth = 'col-md-8';
hesk_dbConnect();
$showRs = hesk_dbQuery("SELECT `show` FROM `" . hesk_dbEscape($hesk_settings['db_pfix']) . "quick_help_sections` WHERE `id` = 1");
$show = hesk_dbFetchAssoc($showRs);
if (!$show['show']) {
$columnWidth = 'col-md-10 col-md-offset-1';
}
?>
<div class="row">
<?php
if ($columnWidth == 'col-md-8') {
?>
<div align="left" class="col-md-4">
<div class="panel panel-default">
<div class="panel-heading"><?php
echo $hesklang['quick_help'];
?>
//.........这里部分代码省略.........
示例15: hesk_cleanSessionVars
<td width="60"> </td>
<td><input type="submit" value="<?php
echo $hesklang['passs'];
?>
" class="orangebutton" onmouseover="hesk_btn(this,'orangebuttonover');" onmouseout="hesk_btn(this,'orangebutton');" />
<br />
</td>
</tr>
</table>
</form>
</td>
<td class="roundcornersright"> </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>
</div>
<p> </p>
<?php
// Clean session errors
hesk_cleanSessionVars('a_iserror');
hesk_cleanSessionVars('img_a_verified');
// Print footer
require_once HESK_PATH . 'inc/footer.inc.php';