当前位置: 首页>>代码示例>>PHP>>正文


PHP hesk_dbConnect函数代码示例

本文整理汇总了PHP中hesk_dbConnect函数的典型用法代码示例。如果您正苦于以下问题:PHP hesk_dbConnect函数的具体用法?PHP hesk_dbConnect怎么用?PHP hesk_dbConnect使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了hesk_dbConnect函数的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: replaceStatusColumn

function replaceStatusColumn()
{
    global $hesk_settings;
    hesk_dbConnect();
    executeQuery("ALTER TABLE `" . hesk_dbEscape($hesk_settings['db_pfix']) . "tickets` ADD COLUMN `status_int` ENUM('0','1','2','3','4','5') NOT NULL AFTER `status`;");
    $ticketsRS = executeQuery("SELECT `id`, `status` FROM `" . hesk_dbEscape($hesk_settings['db_pfix']) . "tickets`;");
    while ($currentResult = $ticketsRS->fetch_assoc()) {
        executeQuery("UPDATE `" . hesk_dbEscape($hesk_settings['db_pfix']) . "tickets` SET `status_int` = '" . intval($currentResult['status']) . "' WHERE `id` = " . $currentResult['id']);
    }
    executeQuery("ALTER TABLE `" . hesk_dbEscape($hesk_settings['db_pfix']) . "tickets` DROP COLUMN `status`");
    executeQuery("ALTER TABLE `" . hesk_dbEscape($hesk_settings['db_pfix']) . "tickets` CHANGE COLUMN `status_int` `status` ENUM('0','1','2','3','4','5') NOT NULL");
    executeQuery("DROP TABLE `" . hesk_dbEscape($hesk_settings['db_pfix']) . "statuses`");
}
开发者ID:Orgoth,项目名称:Mods-for-HESK,代码行数:13,代码来源:uninstallSql.php

示例2: define

*  Removing any of the copyright notices without purchasing a license
*  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/admin_functions.inc.php';
require_once HESK_PATH . 'inc/knowledgebase_functions.inc.php';
hesk_load_database_functions();
hesk_session_start();
hesk_dbConnect();
hesk_isLoggedIn();
/* Is Knowledgebase enabled? */
if (!$hesk_settings['kb_enable']) {
    hesk_error($hesklang['kbdis']);
}
/* Can this user manage Knowledgebase or just view it? */
$can_man_kb = hesk_checkPermission('can_man_kb', 0);
/* Any category ID set? */
$catid = intval(hesk_GET('category', 1));
$artid = intval(hesk_GET('article', 0));
if (isset($_GET['search'])) {
    $query = hesk_input(hesk_GET('search'));
} else {
    $query = 0;
}
开发者ID:ermedita-xhafaj,项目名称:support,代码行数:31,代码来源:knowledgebase_private.php

示例3: forgot_tid

function forgot_tid()
{
    global $hesk_settings, $hesklang;
    require HESK_PATH . 'inc/email_functions.inc.php';
    $email = hesk_validateEmail(hesk_POST('email'), 'ERR', 0) or hesk_process_messages($hesklang['enter_valid_email'], 'ticket.php?remind=1');
    if (isset($_POST['open_only'])) {
        $hesk_settings['open_only'] = $_POST['open_only'] == 1 ? 1 : 0;
    }
    /* Prepare ticket statuses */
    $my_status = array(0 => $hesklang['open'], 1 => $hesklang['wait_staff_reply'], 2 => $hesklang['wait_cust_reply'], 3 => $hesklang['closed'], 4 => $hesklang['in_progress'], 5 => $hesklang['on_hold']);
    /* Get ticket(s) from database */
    hesk_load_database_functions();
    hesk_dbConnect();
    // Get tickets from the database
    $res = hesk_dbQuery('SELECT * FROM `' . hesk_dbEscape($hesk_settings['db_pfix']) . 'tickets` FORCE KEY (`statuses`) WHERE ' . ($hesk_settings['open_only'] ? "`status` IN ('0','1','2','4','5') AND " : '') . ' ' . hesk_dbFormatEmail($email) . ' ORDER BY `status` ASC, `lastchange` DESC ');
    $num = hesk_dbNumRows($res);
    if ($num < 1) {
        if ($hesk_settings['open_only']) {
            hesk_process_messages($hesklang['noopen'], 'ticket.php?remind=1&e=' . $email);
        } else {
            hesk_process_messages($hesklang['tid_not_found'], 'ticket.php?remind=1&e=' . $email);
        }
    }
    $tid_list = '';
    $name = '';
    $email_param = $hesk_settings['email_view_ticket'] ? '&e=' . rawurlencode($email) : '';
    while ($my_ticket = hesk_dbFetchAssoc($res)) {
        $name = $name ? $name : hesk_msgToPlain($my_ticket['name'], 1, 0);
        $tid_list .= "\n{$hesklang['trackID']}: " . $my_ticket['trackid'] . "\n{$hesklang['subject']}: " . hesk_msgToPlain($my_ticket['subject'], 1, 0) . "\n{$hesklang['status']}: " . $my_status[$my_ticket['status']] . "\n{$hesk_settings['hesk_url']}/ticket.php?track={$my_ticket['trackid']}{$email_param}\n";
    }
    /* Get e-mail message for customer */
    $msg = hesk_getEmailMessage('forgot_ticket_id', '', 0, 0, 1);
    $msg = str_replace('%%NAME%%', $name, $msg);
    $msg = str_replace('%%NUM%%', $num, $msg);
    $msg = str_replace('%%LIST_TICKETS%%', $tid_list, $msg);
    $msg = str_replace('%%SITE_TITLE%%', hesk_msgToPlain($hesk_settings['site_title'], 1), $msg);
    $msg = str_replace('%%SITE_URL%%', $hesk_settings['site_url'], $msg);
    $subject = hesk_getEmailSubject('forgot_ticket_id');
    /* Send e-mail */
    hesk_mail($email, $subject, $msg);
    /* Show success message */
    $tmp = '<b>' . $hesklang['tid_sent'] . '!</b>';
    $tmp .= '<br />&nbsp;<br />' . $hesklang['tid_sent2'] . '.';
    $tmp .= '<br />&nbsp;<br />' . $hesklang['check_spambox'];
    hesk_process_messages($tmp, 'ticket.php?e=' . $email, 'SUCCESS');
    exit;
}
开发者ID:abuhannan,项目名称:aduan,代码行数:47,代码来源:index.php

示例4: hesk_dbQuery

function hesk_dbQuery($query)
{
    global $hesk_last_query;
    global $hesk_db_link;
    global $hesklang, $hesk_settings;
    if (!$hesk_db_link && !hesk_dbConnect()) {
        return false;
    }
    $hesk_last_query = $query;
    #echo "<p>EXPLAIN $query</p>\n";
    if ($res = @mysqli_query($hesk_db_link, $query)) {
        return $res;
    } elseif ($hesk_settings['debug_mode']) {
        hesk_error("{$hesklang['cant_sql']}: {$query}</p><p>{$hesklang['mysql_said']}:<br />" . mysqli_error($hesk_db_link) . "</p>");
    } else {
        hesk_error("{$hesklang['cant_sql']}</p><p>{$hesklang['contact_webmsater']} <a href=\"mailto:{$hesk_settings['webmaster_mail']}\">{$hesk_settings['webmaster_mail']}</a></p>");
    }
}
开发者ID:ermedita-xhafaj,项目名称:support,代码行数:18,代码来源:database_mysqli.inc.php

示例5: forgot_tid

function forgot_tid()
{
    global $hesk_settings, $hesklang;
    require HESK_PATH . 'inc/email_functions.inc.php';
    $email = hesk_validateEmail(hesk_POST('email'), 'ERR', 0) or hesk_process_messages($hesklang['enter_valid_email'], 'ticket.php?remind=1');
    /* Prepare ticket statuses */
    $my_status = array(0 => $hesklang['open'], 1 => $hesklang['wait_staff_reply'], 2 => $hesklang['wait_cust_reply'], 3 => $hesklang['closed'], 4 => $hesklang['in_progress'], 5 => $hesklang['on_hold']);
    /* Get ticket(s) from database */
    hesk_load_database_functions();
    hesk_dbConnect();
    // Get tickets from the database
    $res = hesk_dbQuery('SELECT * FROM `' . hesk_dbEscape($hesk_settings['db_pfix']) . 'tickets` FORCE KEY (`statuses`) WHERE ' . ($hesk_settings['open_only'] ? "`status` IN ('0','1','2','4','5') AND " : '') . ' ' . hesk_dbFormatEmail($email) . ' ORDER BY `status` ASC, `lastchange` DESC ');
    $num = hesk_dbNumRows($res);
    if ($num < 1) {
        if ($hesk_settings['open_only']) {
            hesk_process_messages($hesklang['noopen'], 'ticket.php?remind=1&e=' . $email);
        } else {
            hesk_process_messages($hesklang['tid_not_found'], 'ticket.php?remind=1&e=' . $email);
        }
    }
    $tid_list = '';
    $name = '';
    $email_param = $hesk_settings['email_view_ticket'] ? '&e=' . rawurlencode($email) : '';
    while ($my_ticket = hesk_dbFetchAssoc($res)) {
        $name = $name ? $name : hesk_msgToPlain($my_ticket['name'], 1, 0);
        $tid_list .= "\r\n{$hesklang['trackID']}: " . $my_ticket['trackid'] . "\r\n{$hesklang['subject']}: " . hesk_msgToPlain($my_ticket['subject'], 1, 0) . "\r\n{$hesklang['status']}: " . $my_status[$my_ticket['status']] . "\r\n{$hesk_settings['hesk_url']}/ticket.php?track={$my_ticket['trackid']}{$email_param}\r\n";
    }
    /* Get e-mail message for customer */
    $msg = hesk_getEmailMessage('forgot_ticket_id', '', 0, 0, 1);
    $msg = str_replace('%%NAME%%', $name, $msg);
    $msg = str_replace('%%NUM%%', $num, $msg);
    $msg = str_replace('%%LIST_TICKETS%%', $tid_list, $msg);
    $msg = str_replace('%%SITE_TITLE%%', hesk_msgToPlain($hesk_settings['site_title'], 1), $msg);
    $msg = str_replace('%%SITE_URL%%', $hesk_settings['site_url'], $msg);
    $subject = hesk_getEmailSubject('forgot_ticket_id');
    /* Send e-mail */
    hesk_mail($email, $subject, $msg);
    /* Show success message */
    $tmp = '<b>' . $hesklang['tid_sent'] . '!</b>';
    $tmp .= '<br />&nbsp;<br />' . $hesklang['tid_sent2'] . '.';
    $tmp .= '<br />&nbsp;<br />' . $hesklang['check_spambox'];
    hesk_process_messages($tmp, 'ticket.php?e=' . $email, 'SUCCESS');
    exit;
    /* Print header */
    $hesk_settings['tmp_title'] = $hesk_settings['hesk_title'] . ' - ' . $hesklang['tid_sent'];
    require_once HESK_PATH . 'inc/header.inc.php';
    ?>

<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['tid_sent']);
    ?>
</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> &gt;
<a href="<?php 
    echo $hesk_settings['hesk_url'];
    ?>
" class="smaller"><?php 
    echo $hesk_settings['hesk_title'];
    ?>
</a>
&gt; <?php 
    echo $hesklang['tid_sent'];
    ?>
</span></td>
</tr>
</table>

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

<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>

	<p>&nbsp;</p>
	<p align="center"><?php 
    echo $hesklang['tid_sent2'];
//.........这里部分代码省略.........
开发者ID:riansopian,项目名称:hesk,代码行数:101,代码来源:index.php

示例6: execute240Scripts

function execute240Scripts()
{
    global $hesk_settings;
    hesk_dbConnect();
    executeQuery("CREATE TABLE `" . hesk_dbEscape($hesk_settings['db_pfix']) . "quick_help_sections` (\n      `id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY,\n      `location` VARCHAR(100) NOT NULL,\n      `show` ENUM('0','1') NOT NULL\n    ) ENGINE=MyISAM  DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci");
    executeQuery("INSERT INTO `hesk_quick_help_sections` (`location`, `show`)\n      VALUES ('create_ticket', '1')");
    executeQuery("INSERT INTO `hesk_quick_help_sections` (`location`, `show`)\n      VALUES ('view_ticket_form', '1')");
    executeQuery("INSERT INTO `hesk_quick_help_sections` (`location`, `show`)\n      VALUES ('view_ticket', '1')");
    executeQuery("INSERT INTO `hesk_quick_help_sections` (`location`, `show`)\n      VALUES ('knowledgebase', '1')");
}
开发者ID:Orgoth,项目名称:Mods-for-HESK,代码行数:10,代码来源:installSql.php

示例7: save

function save()
{
    global $hesklang, $hesk_settings;
    //-- Before we do anything, make sure the statuses are valid.
    $rows = hesk_dbQuery('SELECT * FROM `' . hesk_dbEscape($hesk_settings['db_pfix']) . 'statuses`');
    while ($row = $rows->fetch_assoc()) {
        if (!isset($_POST['s' . $row['ID'] . '_delete'])) {
            validateStatus($_POST['s' . $row['ID'] . '_key'], $_POST['s' . $row['ID'] . '_textColor']);
        }
    }
    //-- Validate the new one if at least one of the fields are used / checked
    if ($_POST['sN_key'] != null || $_POST['sN_textColor'] != null || isset($_POST['sN_isClosed'])) {
        validateStatus($_POST['sN_key'], $_POST['sN_textColor']);
    }
    hesk_dbConnect();
    $wasStatusDeleted = false;
    //-- Get all the status IDs
    $statusesSql = 'SELECT * FROM `' . $hesk_settings['db_pfix'] . 'statuses`';
    $results = hesk_dbQuery($statusesSql);
    while ($row = $results->fetch_assoc()) {
        //-- If the status is marked for deletion, delete it and skip everything below.
        if (isset($_POST['s' . $row['ID'] . '_delete'])) {
            $delete = "DELETE FROM `" . hesk_dbEscape($hesk_settings['db_pfix']) . "statuses` WHERE `ID` = ?";
            $stmt = hesk_dbConnect()->prepare($delete);
            $stmt->bind_param('i', $row['ID']);
            $stmt->execute();
            $wasStatusDeleted = true;
        } else {
            //-- Update the information in the database with what is on the page
            $query = "UPDATE `" . hesk_dbEscape($hesk_settings['db_pfix']) . "statuses` SET `Key` = ?, `TextColor` = ?, `IsClosed` = ?, `Closable` = ? WHERE `ID` = ?";
            $stmt = hesk_dbConnect()->prepare($query);
            $isStatusClosed = isset($_POST['s' . $row['ID'] . '_isClosed']) ? 1 : 0;
            $stmt->bind_param('sssisi', $_POST['s' . $row['ID'] . '_key'], $_POST['s' . $row['ID'] . '_textColor'], $isStatusClosed, $_POST['s' . $row['ID'] . '_closable'], $row['ID']);
            $stmt->execute();
        }
    }
    //-- If any statuses were deleted, re-index them before adding a new one
    if ($wasStatusDeleted) {
        //-- First drop and re-add the ID column
        hesk_dbQuery("ALTER TABLE `" . hesk_dbEscape($hesk_settings['db_pfix']) . "statuses` DROP COLUMN `ID`");
        hesk_dbQuery("ALTER TABLE `" . hesk_dbEscape($hesk_settings['db_pfix']) . "statuses` ADD `ID` INT NOT NULL AUTO_INCREMENT PRIMARY KEY FIRST");
        //-- Since statuses should be zero-based, but are now one-based, subtract one from each ID
        hesk_dbQuery("UPDATE `" . hesk_dbEscape($hesk_settings['db_pfix']) . "statuses` SET `ID` = `ID`-1");
    }
    //-- Insert the addition if there is anything to add
    if ($_POST['sN_key'] != null && $_POST['sN_textColor'] != null) {
        //-- The next ID is equal to the number of rows, since the IDs are zero-indexed.
        $nextValue = hesk_dbQuery('SELECT * FROM `' . hesk_dbEscape($hesk_settings['db_pfix']) . 'statuses`')->num_rows;
        $isClosed = isset($_POST['sN_isClosed']) ? 1 : 0;
        $insert = "INSERT INTO `" . hesk_dbEscape($hesk_settings['db_pfix']) . "statuses` (`ID`, `Key`, `TextColor`, `IsClosed`, `Closable`)\n\t\tVALUES (" . $nextValue . ", '" . hesk_dbEscape($_POST['sN_key']) . "', '" . hesk_dbEscape($_POST['sN_textColor']) . "', " . $isClosed . ", '" . hesk_dbEscape($_POST['sN_closable']) . "')";
        hesk_dbQuery($insert);
    }
    //-- Update default status for actions
    $defaultQuery = "UPDATE `" . hesk_dbEscape($hesk_settings['db_pfix']) . "statuses` SET ";
    hesk_dbConnect()->query($defaultQuery . "`IsNewTicketStatus` = 0");
    $updateQuery = $defaultQuery . "`IsNewTicketStatus` = 1 WHERE `ID` = ?";
    $stmt = hesk_dbConnect()->prepare($updateQuery);
    $stmt->bind_param('i', $_POST['newTicket']);
    $stmt->execute();
    hesk_dbConnect()->query($defaultQuery . "`IsClosedByClient` = 0");
    $updateQuery = $defaultQuery . "`IsClosedByClient` = 1 WHERE `ID` = ?";
    $stmt = hesk_dbConnect()->prepare($updateQuery);
    $stmt->bind_param('i', $_POST['closedByClient']);
    $stmt->execute();
    hesk_dbConnect()->query($defaultQuery . "`IsCustomerReplyStatus` = 0");
    $updateQuery = $defaultQuery . "`IsCustomerReplyStatus` = 1 WHERE `ID` = ?";
    $stmt = hesk_dbConnect()->prepare($updateQuery);
    $stmt->bind_param('i', $_POST['replyFromClient']);
    $stmt->execute();
    hesk_dbConnect()->query($defaultQuery . "`IsStaffClosedOption` = 0");
    $updateQuery = $defaultQuery . "`IsStaffClosedOption` = 1 WHERE `ID` = ?";
    $stmt = hesk_dbConnect()->prepare($updateQuery);
    $stmt->bind_param('i', $_POST['staffClosedOption']);
    $stmt->execute();
    hesk_dbConnect()->query($defaultQuery . "`IsStaffReopenedStatus` = 0");
    $updateQuery = $defaultQuery . "`IsStaffReopenedStatus` = 1 WHERE `ID` = ?";
    $stmt = hesk_dbConnect()->prepare($updateQuery);
    $stmt->bind_param('i', $_POST['staffReopenedStatus']);
    $stmt->execute();
    hesk_dbConnect()->query($defaultQuery . "`IsDefaultStaffReplyStatus` = 0");
    $updateQuery = $defaultQuery . "`IsDefaultStaffReplyStatus` = 1 WHERE `ID` = ?";
    $stmt = hesk_dbConnect()->prepare($updateQuery);
    $stmt->bind_param('i', $_POST['defaultStaffReplyStatus']);
    $stmt->execute();
    hesk_dbConnect()->query($defaultQuery . "`LockedTicketStatus` = 0");
    $updateQuery = $defaultQuery . "`LockedTicketStatus` = 1 WHERE `ID` = ?";
    $stmt = hesk_dbConnect()->prepare($updateQuery);
    $stmt->bind_param('i', $_POST['lockedTicketStatus']);
    $stmt->execute();
    hesk_dbConnect()->query($defaultQuery . "`IsAutocloseOption` = 0");
    $updateQuery = $defaultQuery . "`IsAutocloseOption` = 1 WHERE `ID` = ?";
    $stmt = hesk_dbConnect()->prepare($updateQuery);
    $stmt->bind_param('i', $_POST['autocloseTicketOption']);
    $stmt->execute();
    hesk_process_messages($hesklang['statuses_saved'], 'manage_statuses.php', 'SUCCESS');
}
开发者ID:Orgoth,项目名称:Mods-for-HESK,代码行数:96,代码来源:manage_statuses.php

示例8: forgot_tid

function forgot_tid()
{
    global $hesk_settings, $hesklang;
    require HESK_PATH . 'inc/email_functions.inc.php';
    /* Get ticket(s) from database */
    hesk_dbConnect();
    $email = hesk_validateEmail(hesk_POST('email'), 'ERR', 0) or hesk_process_messages($hesklang['enter_valid_email'], 'ticket.php?remind=1');
    if (isset($_POST['open_only'])) {
        $hesk_settings['open_only'] = $_POST['open_only'] == 1 ? 1 : 0;
    }
    /* Prepare ticket statuses */
    $myStatusSQL = hesk_dbQuery("SELECT `ID`, `Key` FROM `" . hesk_dbEscape($hesk_settings['db_pfix']) . "statuses`");
    $my_status = array();
    while ($myStatusRow = hesk_dbFetchAssoc($myStatusSQL)) {
        $my_status[$myStatusRow['ID']] = $hesklang[$myStatusRow['Key']];
    }
    // Get tickets from the database
    $res = hesk_dbQuery('SELECT * FROM `' . hesk_dbEscape($hesk_settings['db_pfix']) . 'tickets` FORCE KEY (`statuses`) WHERE ' . ($hesk_settings['open_only'] ? "`status` IN (SELECT `ID` FROM `" . hesk_dbEscape($hesk_settings['db_pfix']) . "statuses` WHERE `IsClosed` = 0) AND " : '') . ' ' . hesk_dbFormatEmail($email) . ' ORDER BY `status` ASC, `lastchange` DESC ');
    $num = hesk_dbNumRows($res);
    if ($num < 1) {
        if ($hesk_settings['open_only']) {
            hesk_process_messages($hesklang['noopen'], 'ticket.php?remind=1&e=' . $email);
        } else {
            hesk_process_messages($hesklang['tid_not_found'], 'ticket.php?remind=1&e=' . $email);
        }
    }
    $tid_list = '';
    $html_tid_list = '<ul>';
    $name = '';
    $email_param = $hesk_settings['email_view_ticket'] ? '&e=' . rawurlencode($email) : '';
    while ($my_ticket = hesk_dbFetchAssoc($res)) {
        $name = $name ? $name : hesk_msgToPlain($my_ticket['name'], 1, 0);
        $tid_list .= "\n        {$hesklang['trackID']}: " . $my_ticket['trackid'] . "\n        {$hesklang['subject']}: " . hesk_msgToPlain($my_ticket['subject'], 1, 0) . "\n        {$hesklang['status']}: " . $my_status[$my_ticket['status']] . "\n        {$hesk_settings['hesk_url']}/ticket.php?track={$my_ticket['trackid']}{$email_param}\n        ";
        $html_tid_list .= "<li>\n        {$hesklang['trackID']}: " . $my_ticket['trackid'] . " <br>\n        {$hesklang['subject']}: " . hesk_msgToPlain($my_ticket['subject'], 1, 0) . " <br>\n        {$hesklang['status']}: " . $my_status[$my_ticket['status']] . " <br>\n        {$hesk_settings['hesk_url']}/ticket.php?track={$my_ticket['trackid']}{$email_param}\n        </li>";
    }
    $html_tid_list .= '</ul>';
    /* Get e-mail message for customer */
    $msg = hesk_getEmailMessage('forgot_ticket_id', '', 0, 0, 1);
    $msg = processEmail($msg, $name, $num, $tid_list);
    // Get HTML message for customer
    $htmlMsg = hesk_getHtmlMessage('forgot_ticket_id', '', 0, 0, 1);
    $htmlMsg = processEmail($htmlMsg, $name, $num, $html_tid_list);
    $subject = hesk_getEmailSubject('forgot_ticket_id');
    /* Send e-mail */
    hesk_mail($email, $subject, $msg, $htmlMsg);
    /* Show success message */
    $tmp = '<b>' . $hesklang['tid_sent'] . '!</b>';
    $tmp .= '<br />&nbsp;<br />' . $hesklang['tid_sent2'] . '.';
    $tmp .= '<br />&nbsp;<br />' . $hesklang['check_spambox'];
    hesk_process_messages($tmp, 'ticket.php?e=' . $email, 'SUCCESS');
    exit;
    /* Print header */
    $hesk_settings['tmp_title'] = $hesk_settings['hesk_title'] . ' - ' . $hesklang['tid_sent'];
    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['tid_sent'];
    ?>
</li>
</ol>
<tr>
<td>

	<?php 
}
开发者ID:Orgoth,项目名称:Mods-for-HESK,代码行数:81,代码来源:index.php

示例9: print_form

function print_form()
{
    global $hesk_settings, $hesklang;
    global $hesk_error_buffer, $my_email, $trackingID, $do_remember, $display;
    /* Print header */
    $hesk_settings['tmp_title'] = $hesk_settings['hesk_title'] . ' - ' . $hesklang['view_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['view_ticket_nav'];
    ?>
</li>
</ol>

<?php 
    hesk_dbConnect();
    $columnWidth = 'col-md-8';
    $showRs = hesk_dbQuery("SELECT `show` FROM `" . hesk_dbEscape($hesk_settings['db_pfix']) . "quick_help_sections` WHERE `id` = 2");
    $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'];
        ?>
            </div>
            <div class="panel-body">
                <p><?php 
        echo $hesklang['quick_help_view_ticket'];
        ?>
</p>
            </div>
        </div>
    </div>
    <?php 
    }
    ?>
    <div class="<?php 
    echo $columnWidth;
    ?>
">
        <?php 
    /* This will handle error, success and notice messages */
    hesk_handle_messages();
    ?>
        <h3 align="left"><?php 
    echo $hesklang['view_existing'];
    ?>
</h3>
        <div class="footerWithBorder"></div>
        <div class="blankSpace"></div>
        <form action="ticket.php" class="form-horizontal" role="form" method="get" name="form2">
            <div class="form-group">
                <label for="track" class="col-sm-3 control-label"><?php 
    echo $hesklang['ticket_trackID'];
    ?>
</label>
                <div class="col-sm-9">
                    <input type="text" class="form-control" name="track" id="track" maxlength="20" size="35" value="<?php 
    echo $trackingID;
    ?>
" placeholder="<?php 
    echo htmlspecialchars($hesklang['ticket_trackID']);
    ?>
">
                </div>
            </div>
            <?php 
    $tmp = '';
    if ($hesk_settings['email_view_ticket']) {
        $tmp = 'document.form1.email.value=document.form2.e.value;';
        ?>
            <div class="form-group">
                <label for="e" class="col-sm-3 control-label"><?php 
        echo $hesklang['email'];
        ?>
</label>
//.........这里部分代码省略.........
开发者ID:Orgoth,项目名称:Mods-for-HESK,代码行数:101,代码来源:ticket.php


注:本文中的hesk_dbConnect函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。