📄 categories.php
字号:
<?php
// +-------------------------------------------------------------+
// | DeskPRO v [2.0.1 Production]
// | Copyright (C) 2001 - 2004 Headstart Solutions Limited
// | Supplied by WTN-WDYL
// | Nullified by WTN-WDYL
// | Distribution via WebForum, ForumRU and associated file dumps
// +-------------------------------------------------------------+
// | DESKPRO IS NOT FREE SOFTWARE
// +-------------------------------------------------------------+
// | License ID : Full Enterprise License =) ...
// | License Owner : WTN-WDYL Team
// +-------------------------------------------------------------+
// | $RCSfile: categories.php,v $
// | $Date: 2004/02/10 01:34:30 $
// | $Revision: 1.15 $
// +-------------------------------------------------------------+
// | File Details:
// | - Technician category preferences.
// +-------------------------------------------------------------+
error_reporting(E_ALL ^ E_NOTICE);
// start file
require("./../global.php");
tech_nav('settings');
// default do
$_REQUEST['do'] = trim($_REQUEST['do']);
if (!isset($_REQUEST['do']) or $_REQUEST['do'] == "") {
$_REQUEST['do'] = "view";
}
############################### UPDATE ###############################
if ($_REQUEST['do'] == "submit") {
while (list ($key, $val) = each ($_REQUEST['category'])) {
if ($val) {
$tmp .= $key . ',';
}
}
$tmp = substr($tmp, 0, -1);
$db->query("UPDATE tech SET cats_user = '" . mysql_escape_string($tmp) . "' WHERE id = '$user[id]'");
$user['cats_user'] = $tmp;
}
############################### VIEW ###############################
if ($user['cats_user']) {
$cats_array = split(',', $user['cats_user']);
} else {
$cats_array = array();
}
$cats_admin_tmp = split(',', $user['cats_admin']);
if (!@in_array_value(0, $cats_admin_tmp)) {
$table[] = array("<b>No Category Specified</b>", form_radio_yn(0, 'category', iff(in_array('0', $cats_array), 1, 0)));
}
$db->query("SELECT * from ticket_cat" . iff($user['cats_admin'], " WHERE id NOT IN ($user[cats_admin])"));
while ($category = $db->row_array()) {
$bit = form_radio_yn($category['id'], 'category', iff(in_array($category['id'], $cats_array), 1, 0));
$table[] = array("<B>" . $category['name'] . "</B>", $bit);
}
$cols = array('Category Name', 'In My Selected Categories?' . thelp('Settings', 'Your Categories'));
table_header('Your choosen categories', 'categories.php', array('do' => 'submit'));
table_content($cols, $table);
table_footer('Update');
tech_footer();
?>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -