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


PHP hesk_GET函数代码示例

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


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

示例1: hesk_profile_tab


//.........这里部分代码省略.........
                            <input type="hidden" name="notify_assigned" value="<?php 
            echo !empty($_SESSION[$session_array]['notify_assigned']) ? '1' : '0';
            ?>
">
                            <input type="hidden" name="notify_note" value="<?php 
            echo !empty($_SESSION[$session_array]['notify_note']) ? '1' : '0';
            ?>
">
                            <input type="hidden" name="notify_pm" value="<?php 
            echo !empty($_SESSION[$session_array]['notify_pm']) ? '1' : '0';
            ?>
">
                        <?php 
        }
        if ($_SESSION['isadmin']) {
            ?>
                            <div class="col-md-9 col-md-offset-3"><div class="checkbox"><label><input type="checkbox" name="notify_note_unassigned" value="1" <?php 
            if (!empty($_SESSION[$session_array]['notify_note_unassigned'])) {
                echo 'checked="checked"';
            }
            ?>
> <?php 
            echo $hesklang['notify_note_unassigned'];
            ?>
</label></div> </div>
                        <?php 
        }
    }
    ?>
                </div>
            </div>
            <div class="form-group">
                <div class="col-md-9 col-md-offset-3">
                    <?php 
    if ($action == 'profile_page') {
        ?>
                        <input type="hidden" name="action" value="update">
                        <input type="hidden" name="token" value="<?php 
        hesk_token_echo();
        ?>
">
                        <input type="submit" class="btn btn-default" value="<?php 
        echo $hesklang['update_profile'];
        ?>
">
                    <?php 
    } elseif ($action == 'create_user') {
        ?>
                        <input type="hidden" name="a" value="new" />
                        <input type="hidden" name="token" value="<?php 
        hesk_token_echo();
        ?>
" />
                        <input type="submit" value="<?php 
        echo $hesklang['create_user'];
        ?>
" class="btn btn-default">
                        <a href="manage_users.php?a=reset_form" class="btn btn-danger"><?php 
        echo $hesklang['refi'];
        ?>
</a></p>
                    <?php 
    } elseif ($action == 'edit_user') {
        ?>
                        <input type="hidden" name="a" value="save" />
                        <input type="hidden" name="userid" value="<?php 
        echo intval(hesk_GET('id'));
        ?>
" />
                        <input type="hidden" name="token" value="<?php 
        hesk_token_echo();
        ?>
" />
                        <input type="hidden" name="active" value="<?php 
        echo $_SESSION[$session_array]['active'];
        ?>
">
                        <input class="btn btn-default" type="submit" value="<?php 
        echo $hesklang['save_changes'];
        ?>
" />
                        <a class="btn btn-danger" href="manage_users.php"><?php 
        echo $hesklang['dich'];
        ?>
</a>
                    <?php 
    }
    ?>
                </div>
            </div>
        </div>
    </div>

	<script language="Javascript" type="text/javascript"><!--
	hesk_checkPassword(document.form1.newpass.value);
	//-->
	</script>

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

示例2: toggle_type

function toggle_type()
{
    global $hesk_settings, $hesklang;
    /* A security check */
    hesk_token_check();
    $catid = intval(hesk_GET('catid')) or hesk_error($hesklang['cat_move_id']);
    $_SESSION['selcat2'] = $catid;
    if (intval(hesk_GET('s'))) {
        $type = 1;
        $tmp = $hesklang['cpriv'];
    } else {
        $type = 0;
        $tmp = $hesklang['cpub'];
    }
    /* Update auto-assign settings */
    hesk_dbQuery("UPDATE `" . hesk_dbEscape($hesk_settings['db_pfix']) . "categories` SET `type`='{$type}' WHERE `id`='" . intval($catid) . "' LIMIT 1");
    if (hesk_dbAffectedRows() != 1) {
        hesk_process_messages($hesklang['int_error'] . ': ' . $hesklang['cat_not_found'], './manage_categories.php');
    }
    hesk_process_messages($tmp, './manage_categories.php', 'SUCCESS');
}
开发者ID:Orgoth,项目名称:Mods-for-HESK,代码行数:21,代码来源:manage_categories.php

示例3: hesk_input

	<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']) {
    /* Update preferred language in the database? */
    if (isset($_GET['save_language'])) {
        $newlang = hesk_input(hesk_GET('language'));
        /* Only update if it's a valid language */
        if (isset($hesk_settings['languages'][$newlang])) {
            $newlang = $newlang == HESK_DEFAULT_LANGUAGE ? "NULL" : "'" . hesk_dbEscape($newlang) . "'";
            hesk_dbQuery("UPDATE `" . hesk_dbEscape($hesk_settings['db_pfix']) . "users` SET `language`={$newlang} WHERE `id`='" . intval($_SESSION['id']) . "' LIMIT 1");
        }
    }
    $str = '<form method="get" action="profile.php" style="margin:0;padding:0;border:0;white-space:nowrap;">';
    $str .= '<input type="hidden" name="save_language" value="1" />';
    $str .= '<p>' . $hesklang['chol'] . ': ';
    if (!isset($_GET)) {
        $_GET = array();
    }
    foreach ($_GET as $k => $v) {
        if ($k == 'language' || $k == 'save_language') {
            continue;
开发者ID:riansopian,项目名称:hesk,代码行数:30,代码来源:profile.php

示例4: hesk_load_database_functions

// Get all the required files and functions
require HESK_PATH . 'hesk_settings.inc.php';
require HESK_PATH . 'inc/common.inc.php';
hesk_load_database_functions();
// Is rating enabled?
if (!$hesk_settings['rating']) {
    die($hesklang['rdis']);
}
// Rating value
$rating = intval(hesk_GET('rating', 0));
// Rating can only be 1 or 5
if ($rating != 1 && $rating != 5) {
    die($hesklang['attempt']);
}
// Reply ID
$reply_id = intval(hesk_GET('id', 0)) or die($hesklang['attempt']);
// Ticket tracking ID
$trackingID = hesk_cleanID() or die($hesklang['attempt']);
// Connect to database
hesk_dbConnect();
// Get reply info to verify tickets match
$result = hesk_dbQuery("SELECT `replyto`,`rating`,`staffid` FROM `" . hesk_dbEscape($hesk_settings['db_pfix']) . "replies` WHERE `id`='{$reply_id}' LIMIT 1");
$reply = hesk_dbFetchAssoc($result);
// Does the ticket ID match the one in the request?
$result = hesk_dbQuery("SELECT `trackid` FROM `" . hesk_dbEscape($hesk_settings['db_pfix']) . "tickets` WHERE `id`='{$reply['replyto']}' LIMIT 1");
// -> Ticket found?
if (hesk_dbNumRows($result) != 1) {
    die($hesklang['attempt']);
}
// -> Does the tracking ID match?
$ticket = hesk_dbFetchAssoc($result);
开发者ID:ermedita-xhafaj,项目名称:support,代码行数:31,代码来源:rate.php

示例5: unset

            break;
        default:
            $_GET['time'] = 3;
            $selected['time'][3] = 'selected="selected"';
    }
}
unset($tmp);
// Start SQL statement for selecting tickets
$sql = "SELECT * FROM `" . hesk_dbEscape($hesk_settings['db_pfix']) . "tickets` WHERE ";
// Some default settings
$archive = array(1 => 0, 2 => 0);
$s_my = array(1 => 1, 2 => 1);
$s_ot = array(1 => 1, 2 => 1);
$s_un = array(1 => 1, 2 => 1);
// --> TICKET CATEGORY
$category = intval(hesk_GET('category', 0));
// Make sure user has access to this category
if ($category && hesk_okCategory($category, 0)) {
    $sql .= " `category`='{$category}' ";
} else {
    $sql .= hesk_myCategories();
}
// Show only tagged tickets?
if (!empty($_GET['archive'])) {
    $archive[1] = 1;
    $sql .= " AND `archive`='1' ";
}
// Ticket owner preferences
$fid = 1;
require HESK_PATH . 'inc/assignment_search.inc.php';
// --> TICKET STATUS
开发者ID:riansopian,项目名称:hesk,代码行数:31,代码来源:export.php

示例6: 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';
$id = hesk_input(hesk_GET('i'));
$query = hesk_input(hesk_utf8_urldecode(hesk_GET('q')));
$type = hesk_input(hesk_GET('t', 'text'));
$maxlen = intval(hesk_GET('m', 255));
$query = stripslashes($query);
?>
<!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" lang="en">
<head>
<title><?php 
echo $hesklang['opt'];
?>
</title>
<meta http-equiv="Content-Type" content="text/html;charset=<?php 
echo $hesklang['ENCODING'];
?>
" />
<style type="text/css">
body
开发者ID:riansopian,项目名称:hesk,代码行数:31,代码来源:options.php

示例7: show_message

function show_message()
{
    global $hesk_settings, $hesklang, $admins;
    $id = intval(hesk_GET('id'));
    /* Get the message details */
    $res = hesk_dbQuery("SELECT * FROM `" . hesk_dbEscape($hesk_settings['db_pfix']) . "mail` WHERE `id`='" . intval($id) . "' AND `deletedby`!='" . intval($_SESSION['id']) . "' LIMIT 1");
    $num = hesk_dbNumRows($res);
    if ($num) {
        $pm = hesk_dbFetchAssoc($res);
        /* Allowed to read the message? */
        if ($pm['to'] == $_SESSION['id']) {
            if (!isset($_SESSION['mail']['subject'])) {
                $_SESSION['mail']['subject'] = $hesklang['m_re'] . ' ' . $pm['subject'];
            }
            if (!isset($_SESSION['mail']['to'])) {
                $_SESSION['mail']['to'] = $pm['from'];
            }
        } elseif ($pm['from'] == $_SESSION['id']) {
            if (!isset($_SESSION['mail']['subject'])) {
                $_SESSION['mail']['subject'] = $hesklang['m_fwd'] . ' ' . $pm['subject'];
            }
            if (!isset($_SESSION['mail']['to'])) {
                $_SESSION['mail']['to'] = $pm['to'];
            }
            $hesk_settings['mailtmp']['this'] = 'from';
            $hesk_settings['mailtmp']['other'] = 'to';
            $hesk_settings['mailtmp']['m_from'] = $hesklang['m_to'];
            $hesk_settings['mailtmp']['outbox'] = '<b>' . $hesklang['outbox'] . '</b>';
            $hesk_settings['mailtmp']['inbox'] = '<a href="mail.php">' . $hesklang['inbox'] . '</a>';
            $hesk_settings['mailtmp']['outbox'] = '<a href="mail.php?folder=outbox">' . $hesklang['outbox'] . '</a>';
        } else {
            hesk_process_message($hesklang['m_ena'], 'mail.php');
        }
        /* Mark as read */
        if ($hesk_settings['mailtmp']['this'] == 'to' && !$pm['read']) {
            $res = hesk_dbQuery("UPDATE `" . hesk_dbEscape($hesk_settings['db_pfix']) . "mail` SET `read`='1' WHERE `id`='" . intval($id) . "' LIMIT 1");
        }
        $pm['name'] = isset($admins[$pm[$hesk_settings['mailtmp']['other']]]) ? '<a href="mail.php?a=new&amp;id=' . $pm[$hesk_settings['mailtmp']['other']] . '">' . $admins[$pm[$hesk_settings['mailtmp']['other']]] . '</a>' : ($pm['from'] == 9999 ? '<a href="http://www.hesk.com" target="_blank">HESK.com</a>' : $hesklang['e_udel']);
        $pm['dt'] = hesk_dateToString($pm['dt'], 0, 1, 0, true);
        ?>

	<div class="container mail-from-user-table">
		<div>
			&nbsp;
			<div>

				<div class="form-inline mail-info-table">
					<div class="form-group mail-from-date-subject">
						<div class="form-inline">
							<span><b><?php 
        echo $hesk_settings['mailtmp']['m_from'];
        ?>
</b></span>
							<span><?php 
        echo $pm['name'];
        ?>
</span>
						</div>
						<div class="form-inline">
							<span><b><?php 
        echo $hesklang['date'];
        ?>
</b></span>
							<span><?php 
        echo $pm['dt'];
        ?>
</span>
						</div>
						<div class="form-inline">
							<span><b><?php 
        echo $hesklang['m_sub'];
        ?>
</b></span>
							<span><?php 
        echo $pm['subject'];
        ?>
</span>
						</div>
					</div><!-- end mail-from-date-subject -->
					<div class="form-group mail-icons" style="float: right;">

						<?php 
        $folder = '&amp;folder=outbox';
        if ($pm['to'] == $_SESSION['id']) {
            echo '<a href="mail.php?a=mark_unread&amp;id=' . $id . '&amp;token=' . hesk_token_echo(0) . '"><img src="../img/mail.png" width="16" height="16" alt="' . $hesklang['mau'] . '" title="' . $hesklang['mau'] . '" class="optionWhiteOFF" onmouseover="this.className=\'optionWhiteON\'" onmouseout="this.className=\'optionWhiteOFF\'" /></a> ';
            $folder = '';
        }
        echo '<a href="mail.php?a=delete&amp;id=' . $id . '&amp;token=' . hesk_token_echo(0) . $folder . '" onclick="return hesk_confirmExecute(\'' . hesk_makeJsString($hesklang['delm']) . '?\');"><img src="../img/delete.png" width="16" height="16" alt="' . $hesklang['delm'] . '" title="' . $hesklang['delm'] . '" class="optionWhiteOFF" onmouseover="this.className=\'optionWhiteON\'" onmouseout="this.className=\'optionWhiteOFF\'" /></a>';
        ?>

					</div><!-- end mail-icons -->
				</div>

			<br/><br/>

			<p><?php 
        echo strip_tags($pm['message']);
        ?>
</p>

//.........这里部分代码省略.........
开发者ID:ermedita-xhafaj,项目名称:support,代码行数:101,代码来源:mail.php

示例8: remove_contract

function remove_contract()
{
    global $hesk_settings, $hesklang;
    hesk_token_check();
    $_SERVER['PHP_SELF'] = 'contracts.php#tab_edit-cont';
    $con = intval(hesk_GET('id'));
    hesk_dbQuery("DELETE FROM `" . hesk_dbEscape($hesk_settings['db_pfix']) . "contracts` WHERE NOT EXISTS\n\t(SELECT NULL FROM`" . hesk_dbEscape($hesk_settings['db_pfix']) . "contractforclient` as `cc` WHERE `cc`.`contract_Id`='" . intval($con) . "') && `id`='" . intval($con) . "' LIMIT 1");
    if (hesk_dbAffectedRows() != 1) {
        hesk_error("{$hesklang['con_req']}.");
    }
    hesk_process_messages($hesklang['con_removed_db'], $_SERVER['PHP_SELF'], 'SUCCESS');
}
开发者ID:ermedita-xhafaj,项目名称:support,代码行数:12,代码来源:contracts.php

示例9: sprintf

    $revision = sprintf($hesklang['thist14'], hesk_date(), $time_worked, $_SESSION['name'] . ' (' . $_SESSION['user'] . ')');
    hesk_dbQuery("UPDATE `" . hesk_dbEscape($hesk_settings['db_pfix']) . "tickets` SET `time_worked`='" . hesk_dbEscape($time_worked) . "', `history`=CONCAT(`history`,'" . hesk_dbEscape($revision) . "') WHERE `trackid`='" . hesk_dbEscape($trackingID) . "' LIMIT 1");
    /* Show ticket */
    hesk_process_messages($hesklang['twu'], 'admin_ticket.php?track=' . $trackingID . '&Refresh=' . mt_rand(10000, 99999), 'SUCCESS');
}
/* Delete attachment action */
if (isset($_GET['delatt']) && hesk_token_check()) {
    if (!$can_delete || !$can_edit) {
        hesk_process_messages($hesklang['no_permission'], 'admin_ticket.php?track=' . $trackingID . '&Refresh=' . mt_rand(10000, 99999));
    }
    $att_id = intval(hesk_GET('delatt')) or hesk_error($hesklang['inv_att_id']);
    $reply = intval(hesk_GET('reply', 0));
    if ($reply < 1) {
        $reply = 0;
    }
    $note = intval(hesk_GET('note', 0));
    if ($note < 1) {
        $note = 0;
    }
    /* Get attachment info */
    $res = hesk_dbQuery("SELECT * FROM `" . hesk_dbEscape($hesk_settings['db_pfix']) . "attachments` WHERE `att_id`='" . intval($att_id) . "' LIMIT 1");
    if (hesk_dbNumRows($res) != 1) {
        hesk_process_messages($hesklang['id_not_valid'] . ' (att_id)', 'admin_ticket.php?track=' . $trackingID . '&Refresh=' . mt_rand(10000, 99999));
    }
    $att = hesk_dbFetchAssoc($res);
    /* Is ticket ID valid for this attachment? */
    if ($att['ticket_id'] != $trackingID) {
        hesk_process_messages($hesklang['trackID_not_found'], 'admin_ticket.php?track=' . $trackingID . '&Refresh=' . mt_rand(10000, 99999));
    }
    /* Delete file from server */
    hesk_unlink(HESK_PATH . $hesk_settings['attach_dir'] . '/' . $att['saved_name']);
开发者ID:Eximagen,项目名称:helpdesk,代码行数:31,代码来源:admin_ticket.php

示例10: show_message

function show_message()
{
    global $hesk_settings, $hesklang, $admins;
    $id = intval(hesk_GET('id'));
    /* Get the message details */
    $res = hesk_dbQuery("SELECT * FROM `" . hesk_dbEscape($hesk_settings['db_pfix']) . "mail` WHERE `id`='" . intval($id) . "' AND `deletedby`!='" . intval($_SESSION['id']) . "' LIMIT 1");
    $num = hesk_dbNumRows($res);
    if ($num) {
        $pm = hesk_dbFetchAssoc($res);
        /* Allowed to read the message? */
        if ($pm['to'] == $_SESSION['id']) {
            if (!isset($_SESSION['mail']['subject'])) {
                $_SESSION['mail']['subject'] = $hesklang['m_re'] . ' ' . $pm['subject'];
            }
            if (!isset($_SESSION['mail']['to'])) {
                $_SESSION['mail']['to'] = $pm['from'];
            }
        } elseif ($pm['from'] == $_SESSION['id']) {
            if (!isset($_SESSION['mail']['subject'])) {
                $_SESSION['mail']['subject'] = $hesklang['m_fwd'] . ' ' . $pm['subject'];
            }
            if (!isset($_SESSION['mail']['to'])) {
                $_SESSION['mail']['to'] = $pm['to'];
            }
            $hesk_settings['mailtmp']['this'] = 'from';
            $hesk_settings['mailtmp']['other'] = 'to';
            $hesk_settings['mailtmp']['m_from'] = $hesklang['m_to'];
            $hesk_settings['mailtmp']['outbox'] = '<b>' . $hesklang['outbox'] . '</b>';
            $hesk_settings['mailtmp']['inbox'] = '<a href="mail.php">' . $hesklang['inbox'] . '</a>';
            $hesk_settings['mailtmp']['outbox'] = '<a href="mail.php?folder=outbox">' . $hesklang['outbox'] . '</a>';
        } else {
            hesk_process_message($hesklang['m_ena'], 'mail.php');
        }
        /* Mark as read */
        if ($hesk_settings['mailtmp']['this'] == 'to' && !$pm['read']) {
            $res = hesk_dbQuery("UPDATE `" . hesk_dbEscape($hesk_settings['db_pfix']) . "mail` SET `read`='1' WHERE `id`='" . intval($id) . "' LIMIT 1");
        }
        $pm['name'] = isset($admins[$pm[$hesk_settings['mailtmp']['other']]]) ? '<a href="mail.php?a=new&amp;id=' . $pm[$hesk_settings['mailtmp']['other']] . '">' . $admins[$pm[$hesk_settings['mailtmp']['other']]] . '</a>' : ($pm['from'] == 9999 ? '<a href="http://www.hesk.com" target="_blank">HESK.com</a>' : $hesklang['e_udel']);
        echo $pm['dt'];
        $pm['dt'] = hesk_dateToString($pm['dt'], 0, 1, 0, true);
        ?>

            <table width="100%" border="0" cellspacing="0" cellpadding="0">
            <tr>
            <td>

                <table border="0" cellspacing="0" cellpadding="0" width="100%">
                <tr>
                <td valign="top">
                    <table border="0">
                    <tr>
                        <td><b><?php 
        echo $hesk_settings['mailtmp']['m_from'];
        ?>
</b></td>
                        <td><?php 
        echo $pm['name'];
        ?>
</td>
                    </tr>
                    <tr>
                        <td><b><?php 
        echo $hesklang['date'];
        ?>
</b></td>
                        <td><?php 
        echo $pm['dt'];
        ?>
</td>
                    </tr>
                    <tr>
                        <td><b><?php 
        echo $hesklang['m_sub'];
        ?>
</b></td>
                        <td><?php 
        echo $pm['subject'];
        ?>
</td>
                    </tr>
                    </table>
                </td>
                <td class="text-right" style="vertical-align:top;">

                    <?php 
        $folder = '&amp;folder=outbox';
        if ($pm['to'] == $_SESSION['id']) {
            echo '<a href="mail.php?a=mark_unread&amp;id=' . $id . '&amp;token=' . hesk_token_echo(0) . '"><i style="font-size: 14px" class="fa fa-envelope-o"></i></a> ';
            $folder = '';
        }
        echo '<a href="mail.php?a=delete&amp;id=' . $id . '&amp;token=' . hesk_token_echo(0) . $folder . '" onclick="return hesk_confirmExecute(\'' . hesk_makeJsString($hesklang['delm']) . '?\');"><i class="fa fa-times" style="font-size: 14px; color: red"></i></a>';
        ?>

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

            <p><?php 
        echo $pm['message'];
        ?>
//.........这里部分代码省略.........
开发者ID:Orgoth,项目名称:Mods-for-HESK,代码行数:101,代码来源:mail.php

示例11: unban_email

function unban_email()
{
    global $hesk_settings, $hesklang;
    // A security check
    hesk_token_check();
    // Delete from bans
    hesk_dbQuery("DELETE FROM `" . hesk_dbEscape($hesk_settings['db_pfix']) . "banned_emails` WHERE `id`=" . intval(hesk_GET('id')) . " LIMIT 1");
    // Redirect either to banned emails or ticket page from now on
    $redirect_to = ($trackingID = hesk_cleanID()) ? 'admin_ticket.php?track=' . $trackingID . '&Refresh=' . mt_rand(10000, 99999) : 'banned_emails.php';
    // Show success
    hesk_process_messages($hesklang['email_unbanned'], $redirect_to, 'SUCCESS');
}
开发者ID:ermedita-xhafaj,项目名称:support,代码行数:12,代码来源:banned_emails.php

示例12: toggleAdmin

function toggleAdmin($admin)
{
    global $hesk_settings, $hesklang;
    $id = hesk_GET('id');
    if ($id == 1 || $id == 2) {
        hesk_process_messages($hesklang['cannot_change_admin_staff'], $_SERVER['PHP_SELF']);
    }
    if ($admin) {
        hesk_dbQuery("UPDATE `" . hesk_dbEscape($hesk_settings['db_pfix']) . "permission_templates` SET `heskprivileges` = 'ALL',\n            `categories` = 'ALL' WHERE `id` = " . intval($id));
        hesk_process_messages($hesklang['permission_template_now_admin'], $_SERVER['PHP_SELF'], 'SUCCESS');
    } else {
        // Get default privileges
        $res = hesk_dbQuery("SELECT `heskprivileges`, `categories` FROM `" . hesk_dbEscape($hesk_settings['db_pfix']) . "permission_templates`\n            WHERE `id` = 2");
        $row = hesk_dbFetchAssoc($res);
        hesk_dbQuery("UPDATE `" . hesk_dbEscape($hesk_settings['db_pfix']) . "permission_templates`\n            SET `heskprivileges` = '" . hesk_dbEscape($row['heskprivileges']) . "',\n             `categories` = '" . hesk_dbEscape($row['categories']) . "' WHERE `id` = " . intval($id));
        hesk_process_messages($hesklang['permission_template_no_longer_admin'], $_SERVER['PHP_SELF'], 'SUCCESS');
    }
}
开发者ID:Orgoth,项目名称:Mods-for-HESK,代码行数:18,代码来源:manage_permission_templates.php

示例13: toggle_active

function toggle_active()
{
    global $hesk_settings, $hesklang;
    /* Security check */
    hesk_token_check();
    $myuser = intval(hesk_GET('id')) or hesk_error($hesklang['no_valid_id']);
    $_SESSION['seluser'] = $myuser;
    if (intval($myuser) == $_SESSION['id']) {
        //-- You can't deactivate yourself!
        hesk_process_messages($hesklang['self_deactivation'], './manage_users.php');
    }
    if (intval(hesk_GET('s'))) {
        $active = 1;
        $tmp = $hesklang['user_activated'];
        $notificationSql = "";
    } else {
        $active = 0;
        $tmp = $hesklang['user_deactivated'];
        // Revoke any manager rights
        hesk_dbQuery("UPDATE `" . hesk_dbEscape($hesk_settings['db_pfix']) . "categories` SET `manager` = 0 WHERE `manager` = " . intval($myuser));
        $notificationSql = ", `autoassign` = 0, `notify_new_unassigned` = 0, `notify_new_my` = 0, `notify_reply_unassigned` = 0,\n        `notify_reply_my` = 0, `notify_assigned` = 0, `notify_pm` = 0, `notify_note` = 0, `notify_note_unassigned` = 0";
    }
    hesk_dbQuery("UPDATE `" . hesk_dbEscape($hesk_settings['db_pfix']) . "users` SET `active` = '" . $active . "'" . $notificationSql . " WHERE `id` = '" . intval($myuser) . "'");
    if (hesk_dbAffectedRows() != 1) {
        hesk_process_messages($hesklang['int_error'] . ': ' . $hesklang['user_not_found'], './manage_users.php');
    }
    hesk_process_messages($tmp, './manage_users.php', 'SUCCESS');
}
开发者ID:Orgoth,项目名称:Mods-for-HESK,代码行数:28,代码来源:manage_users.php

示例14: array

 // Staff doesn't need to fill in required custom fields
 $v['req'] = '';
 if ($v['type'] == 'checkbox' && !isset($_GET["c_{$k}"])) {
     $k_value = array();
     if (isset($_SESSION["c_{$k}"]) && is_array($_SESSION["c_{$k}"])) {
         foreach ($_SESSION["c_{$k}"] as $myCB) {
             $k_value[] = stripslashes(hesk_input($myCB));
         }
     }
 } elseif (isset($_SESSION["c_{$k}"])) {
     $k_value = stripslashes(hesk_input($_SESSION["c_{$k}"]));
 } elseif (isset($_GET["c_{$k}"])) {
     if ($v['type'] == 'checkbox') {
         $k_value = explode('-CHECKBOX-', $_GET["c_{$k}"]);
     } else {
         $k_value = stripslashes(hesk_GET("c_{$k}"));
     }
 } else {
     $k_value = '';
 }
 switch ($v['type']) {
     /* Radio box */
     case 'radio':
         echo '<div class="form-group"><label class="col-sm-3 control-label">' . $v['name'] . ': ' . $v['req'] . '</label><div align="left" class="col-sm-9">';
         $options = explode('#HESK#', $v['value']);
         $cls = in_array($k, $_SESSION['iserror']) ? ' class="isError" ' : '';
         foreach ($options as $option) {
             if (strlen($k_value) == 0 || $k_value == $option) {
                 $k_value = $option;
                 $checked = 'checked="checked"';
             } else {
开发者ID:Orgoth,项目名称:Mods-for-HESK,代码行数:31,代码来源:new_ticket.php

示例15: toggle_sticky

function toggle_sticky()
{
    global $hesk_settings, $hesklang;
    /* A security check */
    hesk_token_check();
    $id = intval(hesk_GET('id')) or hesk_error($hesklang['kb_art_id']);
    $catid = intval(hesk_GET('catid')) or hesk_error($hesklang['kb_cat_inv']);
    $sticky = empty($_GET['s']) ? 0 : 1;
    $_SESSION['artord'] = $id;
    /* Update article "sticky" status */
    hesk_dbQuery("UPDATE `" . hesk_dbEscape($hesk_settings['db_pfix']) . "kb_articles` SET `sticky`='" . intval($sticky) . " ' WHERE `id`='" . intval($id) . "' LIMIT 1");
    /* Update article order */
    update_article_order($catid);
    $tmp = $sticky ? $hesklang['ason'] : $hesklang['asoff'];
    hesk_process_messages($tmp, './manage_knowledgebase.php?a=manage_cat&catid=' . $catid, 'SUCCESS');
}
开发者ID:ermedita-xhafaj,项目名称:support,代码行数:16,代码来源:manage_knowledgebase.php


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