本文整理汇总了PHP中mswMysqlErrMsg函数的典型用法代码示例。如果您正苦于以下问题:PHP mswMysqlErrMsg函数的具体用法?PHP mswMysqlErrMsg怎么用?PHP mswMysqlErrMsg使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了mswMysqlErrMsg函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: delete
public function delete()
{
if (!empty($_POST['del'])) {
// Nuke departments..
mysql_query("DELETE FROM `" . DB_PREFIX . "departments`\n WHERE `id` IN(" . implode(',', $_POST['del']) . ")\n\t") or die(mswMysqlErrMsg(mysql_errno(), mysql_error(), __LINE__, __FILE__));
$rows = mysql_affected_rows();
// Nuke user department association..
mysql_query("DELETE FROM `" . DB_PREFIX . "userdepts`\n WHERE `deptID` IN(" . implode(',', $_POST['del']) . ")\n ") or die(mswMysqlErrMsg(mysql_errno(), mysql_error(), __LINE__, __FILE__));
if (mswRowCount('departments') == 0) {
@mysql_query("TRUNCATE TABLE `" . DB_PREFIX . "departments`");
}
if (mswRowCount('userdepts') == 0) {
@mysql_query("TRUNCATE TABLE `" . DB_PREFIX . "userdepts`");
}
// Rebuild order sequence..
$seq = 0;
$q = mysql_query("SELECT `id` FROM `" . DB_PREFIX . "departments` ORDER BY `orderBy`");
while ($RB = mysql_fetch_object($q)) {
$n = ++$seq;
mysql_query("UPDATE `" . DB_PREFIX . "departments` SET\n\t `orderBy` = '{$n}'\n WHERE `id` = '{$RB->id}'\n ") or die(mswMysqlErrMsg(mysql_errno(), mysql_error(), __LINE__, __FILE__));
}
return $rows;
}
return '0';
}
开发者ID:sushilfl88,项目名称:test-abcd,代码行数:25,代码来源:class.departments.php
示例2: deleteCustomFields
public function deleteCustomFields()
{
if (!empty($_POST['del'])) {
mysql_query("DELETE FROM `" . DB_PREFIX . "cusfields` \n WHERE `id` IN(" . implode(',', $_POST['del']) . ") \n\t") or die(mswMysqlErrMsg(mysql_errno(), mysql_error(), __LINE__, __FILE__));
$rows = mysql_affected_rows();
mysql_query("DELETE FROM `" . DB_PREFIX . "ticketfields` \n WHERE `fieldID` IN(" . implode(',', $_POST['del']) . ") \n\t") or die(mswMysqlErrMsg(mysql_errno(), mysql_error(), __LINE__, __FILE__));
if (mswRowCount('cusfields') == 0) {
@mysql_query("TRUNCATE TABLE `" . DB_PREFIX . "cusfields`");
}
if (mswRowCount('ticketfields') == 0) {
@mysql_query("TRUNCATE TABLE `" . DB_PREFIX . "ticketfields`");
}
// Rebuild sequence..
fields::rebuildSequence();
return $rows;
}
return '0';
}
开发者ID:sushilfl88,项目名称:test-abcd,代码行数:18,代码来源:class.fields.php
示例3: dbConnectorTest
function dbConnectorTest($test = false)
{
$connect = @mysql_connect(DB_HOST, DB_USER, DB_PASS);
if (!$connect) {
if ($test) {
return 'Connection Failed - Check Connection Parameters';
}
mswMysqlErrMsg(mysql_errno(), mysql_error(), __LINE__, __FILE__);
}
if ($connect && !mysql_select_db(DB_NAME, $connect)) {
if ($test) {
return 'Connection Failed - Check Connection Parameters';
}
mswMysqlErrMsg(mysql_errno(), mysql_error(), __LINE__, __FILE__);
}
if ($test) {
return 'Connection Successful';
}
}
开发者ID:sushilfl88,项目名称:test-abcd,代码行数:19,代码来源:functions.php
示例4: faqAttachment
public function faqAttachment($id, $s, $admin = false)
{
$q = mysql_query("SELECT *,DATE(FROM_UNIXTIME(`ts`)) AS `addDate` FROM `" . DB_PREFIX . "faqattach`\n WHERE `id` = '{$id}'\n ") or die(mswMysqlErrMsg(mysql_errno(), mysql_error(), __LINE__, __FILE__));
$F = mysql_fetch_object($q);
if (isset($F->id)) {
$base = $s->attachpathfaq . '/';
// Remote or not..
if ($F->remote) {
header("Location: " . $F->remote);
exit;
} else {
if (file_exists($base . $F->path)) {
$m = msDownload::mime($base . $F->path, $F->mimeType);
msDownload::dl($base . $F->path, $m, 'no');
} else {
$H = new htmlHeaders();
$H->err404($admin);
}
}
} else {
$H = new htmlHeaders();
$H->err403($admin);
}
}
开发者ID:sushilfl88,项目名称:test-abcd,代码行数:24,代码来源:class.download.php
示例5: mysql_query
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
if (!defined('PARENT')) {
$HEADERS->err403(true);
}
// Permissions..
if (!defined('PASS_RESET')) {
$HEADERS->err403(true, 'This page cannot be accessed.<br>Refer to the <a href="../docs/reset.html" onclick="window.open(this);return false">documentation</a> on how to access the reset page');
}
// Update..
if (isset($_POST['process'])) {
$ret = $MSUSERS->reset();
if (isset($_POST['email']) && !empty($ret)) {
// Load mail params
include REL_PATH . 'control/mail-data.php';
for ($i = 0; $i < count($ret); $i++) {
$q = mysql_query("SELECT `id`,`name`,`email`,`email2` FROM `" . DB_PREFIX . "users`\n WHERE `id` = '{$ret[$i]['id']}'\n\t\t\t\t ") or die(mswMysqlErrMsg(mysql_errno(), mysql_error(), __LINE__, __FILE__));
while ($USERS = mysql_fetch_object($q)) {
$MSMAIL->addTag('{NAME}', $USERS->name);
$MSMAIL->addTag('{EMAIL}', $USERS->email);
$MSMAIL->addTag('{PASS}', $ret[$i]['pass']);
// Send mail..
$MSMAIL->sendMSMail(array('from_email' => $SETTINGS->email, 'from_name' => $SETTINGS->website, 'to_email' => $USERS->email, 'to_name' => $USERS->name, 'subject' => str_replace(array('{website}', '{user}'), array($SETTINGS->website, $USERS->name), $emailSubjects['reset']), 'replyto' => array('name' => $SETTINGS->website, 'email' => $SETTINGS->replyto ? $SETTINGS->replyto : $SETTINGS->email), 'template' => LANG_PATH . 'admin-pass-reset.txt', 'language' => $SETTINGS->language, 'alive' => 'yes', 'add-emails' => $USERS->email2));
}
}
}
$OK = true;
}
$title = $msg_adheader36;
$loadJQAlertify = true;
if (file_exists(PATH . 'templates/reset.php')) {
define('RESET_LOADER', 1);
开发者ID:sushilfl88,项目名称:test-abcd,代码行数:31,代码来源:reset.php
示例6: explode
$chop = explode(' ', $_GET['q']);
$words = '';
for ($i = 0; $i < count($chop); $i++) {
$words .= ($i ? 'OR ' : 'WHERE (') . "`" . DB_PREFIX . "portal`.`name` LIKE '%" . mswSafeImportString($chop[$i]) . "%' OR `" . DB_PREFIX . "users`.`name` LIKE '%" . mswSafeImportString($chop[$i]) . "%' ";
}
if ($words) {
$where[] = $words . ')';
}
}
if ($type) {
$where[] = (!empty($where) ? 'AND ' : 'WHERE ') . '`type` = \'' . $type . '\'';
}
if ($from && $to) {
$where[] = (!empty($where) ? 'AND ' : 'WHERE ') . 'DATE(FROM_UNIXTIME(`' . DB_PREFIX . 'log`.`ts`)) BETWEEN \'' . $MSDT->mswDatePickerFormat($from) . '\' AND \'' . $MSDT->mswDatePickerFormat($to) . '\'';
}
$q = mysql_query("SELECT SQL_CALC_FOUND_ROWS *,\n `" . DB_PREFIX . "log`.`ts` AS `lts`,\n\t\t\t `" . DB_PREFIX . "log`.`id` AS `logID`,\n\t\t\t `" . DB_PREFIX . "log`.`userID` AS `personID`,\n\t\t\t `" . DB_PREFIX . "log`.`ip` AS `entryLogIP`,\n\t\t\t `" . DB_PREFIX . "portal`.`name` AS `portalName`,\n\t\t\t `" . DB_PREFIX . "users`.`name` AS `userName`\n\t\t\t FROM `" . DB_PREFIX . "log`\n LEFT JOIN `" . DB_PREFIX . "users`\n ON `" . DB_PREFIX . "log`.`userID` = `" . DB_PREFIX . "users`.`id` \n\t\t\t LEFT JOIN `" . DB_PREFIX . "portal`\n ON `" . DB_PREFIX . "log`.`userID` = `" . DB_PREFIX . "portal`.`id` \n\t\t\t " . (!empty($where) ? implode(mswDefineNewline(), $where) : '') . "\n ORDER BY `" . DB_PREFIX . "log`.`id` DESC\n LIMIT {$limitvalue},{$limit}\n ") or die(mswMysqlErrMsg(mysql_errno(), mysql_error(), __LINE__, __FILE__));
$c = mysql_fetch_object(mysql_query("SELECT FOUND_ROWS() AS `rows`"));
$countedRows = isset($c->rows) ? $c->rows : '0';
$actualRows = mswRowCount('log');
// Export url..
$url = 'index.php?p=log&export=yes' . mswQueryParams(array('p', 'export'));
?>
<div class="content">
<script type="text/javascript">
//<![CDATA[
<?php
include PATH . 'templates/date-pickers.php';
?>
function searchToggle() {
jQuery('#b1').toggle();
if (jQuery('#b1').css('display')!='none') {
开发者ID:sushilfl88,项目名称:test-abcd,代码行数:31,代码来源:log.php
示例7: mswFaqCategories
function mswFaqCategories($id, $action = 'show')
{
$cat = array();
$catID = array();
$q = mysql_query("SELECT `" . DB_PREFIX . "categories`.`name`,`" . DB_PREFIX . "categories`.`id` AS `catID` FROM `" . DB_PREFIX . "categories`\n LEFT JOIN `" . DB_PREFIX . "faqassign`\n\t ON `" . DB_PREFIX . "faqassign`.`itemID` = `" . DB_PREFIX . "categories`.`id`\n WHERE `" . DB_PREFIX . "faqassign`.`desc` = 'category'\n\t AND `" . DB_PREFIX . "faqassign`.`question` = '{$id}'\n ORDER BY `" . DB_PREFIX . "categories`.`name`\n\t ") or die(mswMysqlErrMsg(mysql_errno(), mysql_error(), __LINE__, __FILE__));
while ($CT = mysql_fetch_object($q)) {
$cat[] = mswCleanData($CT->name);
$catID[] = $CT->catID;
}
// We just want IDs if action is get..
if ($action == 'get') {
return $catID;
}
return !empty($cat) ? implode(', ', $cat) : '';
}
开发者ID:sushilfl88,项目名称:test-abcd,代码行数:15,代码来源:functions.php
示例8: mysql_query
<?php
if (!defined('TICKET_LOADER')) {
exit;
}
$aTickID = (int) $aTickID;
$aTickReply = (int) $aTickReply;
$qA = mysql_query("SELECT *,DATE(FROM_UNIXTIME(`ts`)) AS `addDate` FROM `" . DB_PREFIX . "attachments`\n WHERE `ticketID` = '{$aTickID}' AND `replyID` = '{$aTickReply}'\n ORDER BY `fileName`\n ") or die(mswMysqlErrMsg(mysql_errno(), mysql_error(), __LINE__, __FILE__));
if (mysql_num_rows($qA) > 0) {
?>
<div id="attachments_<?php
echo $aTickID;
?>
_<?php
echo $aTickReply;
?>
" class="block" style="display:none">
<table class="table table-striped table-hover">
<thead>
<tr class="attachmentTRBG">
<?php
if (USER_DEL_PRIV == 'yes') {
?>
<th style="width:5%">
<input onclick="selectAll('attachments_<?php
echo $aTickID;
?>
_<?php
echo $aTickReply;
?>
开发者ID:sushilfl88,项目名称:test-abcd,代码行数:31,代码来源:attachments.php
示例9: isset
" maxlength="250" value="<?php
echo isset($EDIT->summary) ? mswSpecialChars($EDIT->summary) : '';
?>
">
<label><?php
echo $msg_kbase38;
?>
</label>
<select name="subcat">
<option value="0"><?php
echo $msg_kbase36;
?>
</option>
<?php
$q_cat = mysql_query("SELECT * FROM `" . DB_PREFIX . "categories` WHERE `subcat` = '0' ORDER BY `name`") or die(mswMysqlErrMsg(mysql_errno(), mysql_error(), __LINE__, __FILE__));
if (mysql_num_rows($q_cat) > 0) {
?>
<optgroup label="<?php
echo mswSpecialChars($msg_kbase37);
?>
">
<?php
while ($CAT = mysql_fetch_object($q_cat)) {
?>
<option<?php
echo isset($EDIT->id) ? mswSelectedItem($EDIT->subcat, $CAT->id) : '';
?>
value="<?php
echo $CAT->id;
?>
开发者ID:sushilfl88,项目名称:test-abcd,代码行数:31,代码来源:faq-cat.php
示例10: mswGetTableData
if (!empty($_POST['users'][$ID])) {
// Ticket information..
$SUPTICK = mswGetTableData('tickets', 'id', $ID);
// Array of ticket subjects assigned to users..
foreach ($_POST['users'][$ID] as $userID) {
$tickets[$userID][] = str_replace(array('{id}', '{subject}'), array(mswTicketNumber($ID), $SUPTICK->subject), $msg_assign7);
$userNotify[] = $userID;
}
// Update ticket..
$MSTICKET->ticketUserAssign($ID, implode(',', $_POST['users'][$ID]), $msg_ticket_history['assign']);
}
}
}
// Email users..
if (!empty($userNotify) && !empty($tickets) && isset($_POST['mail'])) {
$q = mysql_query("SELECT `id`,`name`,`email`,`email2` FROM `" . DB_PREFIX . "users`\n WHERE `id` IN(" . implode(',', $userNotify) . ")\n\t\t\t GROUP BY `id`\n ORDER BY `name`\n ") or die(mswMysqlErrMsg(mysql_errno(), mysql_error(), __LINE__, __FILE__));
while ($USERS = mysql_fetch_object($q)) {
$MSMAIL->addTag('{ASSIGNEE}', $MSTEAM->name);
$MSMAIL->addTag('{NAME}', $USERS->name);
$MSMAIL->addTag('{TICKETS}', trim(implode(mswDefineNewline(), $tickets[$USERS->id])));
// Send mail..
$MSMAIL->sendMSMail(array('from_email' => $MSTEAM->emailFrom ? $MSTEAM->emailFrom : $MSTEAM->email, 'from_name' => $MSTEAM->nameFrom ? $MSTEAM->nameFrom : $MSTEAM->name, 'to_email' => $USERS->email, 'to_name' => $USERS->name, 'subject' => str_replace(array('{website}', '{user}'), array($SETTINGS->website, $MSTEAM->name), $emailSubjects['ticket-assign']), 'replyto' => array('name' => $SETTINGS->website, 'email' => $SETTINGS->replyto ? $SETTINGS->replyto : $SETTINGS->email), 'template' => LANG_PATH . 'admin-ticket-assign.txt', 'language' => $SETTINGS->language, 'alive' => 'yes', 'add-emails' => $USERS->email2));
}
}
$OK2 = true;
}
$title = $msg_adheader32;
$loadJQAlertify = true;
$loadJQNyroModal = true;
include PATH . 'templates/header.php';
include PATH . 'templates/system/tickets/tickets-assign.php';
开发者ID:sushilfl88,项目名称:test-abcd,代码行数:31,代码来源:ticket-assign.php
示例11: deleteImapAccounts
public function deleteImapAccounts()
{
if (!empty($_POST['del'])) {
mysql_query("DELETE FROM `" . DB_PREFIX . "imap` \n WHERE `id` IN(" . implode(',', $_POST['del']) . ") \n\t") or die(mswMysqlErrMsg(mysql_errno(), mysql_error(), __LINE__, __FILE__));
$rows = mysql_affected_rows();
if (mswRowCount('imap') == 0) {
@mysql_query("TRUNCATE TABLE `" . DB_PREFIX . "imap`");
}
return $rows;
}
return '0';
}
开发者ID:sushilfl88,项目名称:test-abcd,代码行数:12,代码来源:class.imap.php
示例12: updateTicket
public function updateTicket()
{
$tickID = (int) $_GET['id'];
$deptID = (int) $_POST['dept'];
$rows = 0;
mysql_query("UPDATE `" . DB_PREFIX . "tickets` SET\n `lastrevision` = UNIX_TIMESTAMP(UTC_TIMESTAMP),\n `department` = '{$deptID}',\n `subject` = '" . mswSafeImportString($_POST['subject']) . "',\n `comments` = '" . mswSafeImportString($_POST['comments']) . "',\n `priority` = '" . mswSafeImportString($_POST['priority']) . "'\n WHERE `id` = '{$tickID}'\n ") or die(mswMysqlErrMsg(mysql_errno(), mysql_error(), __LINE__, __FILE__));
$rows = $rows + mysql_affected_rows();
// Custom field data..
if (!empty($_POST['customField'])) {
// Check to see if any checkboxes arrays are now blank..
// If there are, create empty array to prevent ommission in loop..
if (!empty($_POST['hiddenBoxes'])) {
foreach ($_POST['hiddenBoxes'] as $hb) {
if (!isset($_POST['customField'][$hb])) {
$_POST['customField'][$hb] = array();
}
}
}
foreach ($_POST['customField'] as $k => $v) {
$data = '';
// If value is array, its checkboxes..
if (is_array($v)) {
if (!empty($v)) {
$data = implode('#####', $v);
}
} else {
$data = $v;
}
$k = (int) $k;
// If data exists, update or add entry..
// If blank or 'nothing-selected', delete if exists..
if ($data != '' && $data != 'nothing-selected') {
if (mswRowCount('ticketfields WHERE `ticketID` = \'' . $tickID . '\' AND `fieldID` = \'' . $k . '\' AND `replyID` = \'0\'') > 0) {
mysql_query("UPDATE `" . DB_PREFIX . "ticketfields` SET\n `fieldData` = '" . mswSafeImportString($data) . "'\n WHERE `ticketID` = '{$tickID}'\n AND `fieldID` = '{$k}'\n AND `replyID` = '0'\n ") or die(mswMysqlErrMsg(mysql_errno(), mysql_error(), __LINE__, __FILE__));
$rows = $rows + mysql_affected_rows();
} else {
mysql_query("INSERT INTO `" . DB_PREFIX . "ticketfields` (\n `fieldData`,`ticketID`,`fieldID`,`replyID`\n ) VALUES (\n '" . mswSafeImportString($data) . "','{$tickID}','{$k}','0'\n )") or die(mswMysqlErrMsg(mysql_errno(), mysql_error(), __LINE__, __FILE__));
$rows = $rows + mysql_affected_rows();
}
} else {
mysql_query("DELETE FROM `" . DB_PREFIX . "ticketfields`\n WHERE `ticketID` = '{$tickID}'\n AND `fieldID` = '{$k}'\n AND `replyID` = '0'\n ") or die(mswMysqlErrMsg(mysql_errno(), mysql_error(), __LINE__, __FILE__));
$rows = $rows + mysql_affected_rows();
if (mswRowCount('ticketfields') == 0) {
@mysql_query("TRUNCATE TABLE `" . DB_PREFIX . "ticketfields`");
}
}
}
}
// If department was changed, update attachments..
if ($deptID != $_POST['odeptid']) {
mysql_query("UPDATE `" . DB_PREFIX . "attachments` SET\n `department` = '{$deptID}'\n WHERE `ticketID` = '{$tickID}'\n ") or die(mswMysqlErrMsg(mysql_errno(), mysql_error(), __LINE__, __FILE__));
// Check assignment..If department has assign disabled, we need to clear assigned values from ticket..
if (mswRowCount('departments WHERE `id` = \'' . $deptID . '\' AND `manual_assign` = \'no\'') > 0) {
mysql_query("UPDATE `" . DB_PREFIX . "tickets` SET\n `assignedto` = ''\n WHERE `id` = '{$tickID}'\n ") or die(mswMysqlErrMsg(mysql_errno(), mysql_error(), __LINE__, __FILE__));
}
}
return $rows;
}
开发者ID:sushilfl88,项目名称:test-abcd,代码行数:58,代码来源:class.tickets.php
示例13: mysql_query
<?php
if (!defined('PARENT')) {
exit;
}
// Order and filter by files..
include PATH . 'templates/system/tickets/global/order-by.php';
include PATH . 'templates/system/tickets/global/filter-by.php';
$q = mysql_query("SELECT SQL_CALC_FOUND_ROWS *,\n `" . DB_PREFIX . "tickets`.`id` AS `ticketID`,\n\t `" . DB_PREFIX . "portal`.`name` AS `ticketName`,\n\t `" . DB_PREFIX . "tickets`.`ts` AS `ticketStamp`,\n\t `" . DB_PREFIX . "departments`.`name` AS `deptName`,\n\t `" . DB_PREFIX . "levels`.`name` AS `levelName`\n\t FROM `" . DB_PREFIX . "tickets`\n\t LEFT JOIN `" . DB_PREFIX . "departments`\n\t ON `" . DB_PREFIX . "tickets`.`department` = `" . DB_PREFIX . "departments`.`id`\n\t LEFT JOIN `" . DB_PREFIX . "portal`\n\t ON `" . DB_PREFIX . "tickets`.`visitorID` = `" . DB_PREFIX . "portal`.`id`\n\t LEFT JOIN `" . DB_PREFIX . "levels`\n\t ON `" . DB_PREFIX . "tickets`.`priority` = `" . DB_PREFIX . "levels`.`id`\n\t OR `" . DB_PREFIX . "tickets`.`priority` = `" . DB_PREFIX . "levels`.`marker`\n WHERE (`ticketStatus` != 'open' and `ticketStatus` != 'submit_report')\n AND `isDisputed` = 'no'\n AND `assignedto` != 'waiting'\n\t AND `spamFlag` = 'no'\n " . $filterBy . " " . mswSQLDepartmentFilter($ticketFilterAccess) . "\n " . $orderBy . "\n LIMIT {$limitvalue},{$limit}\n ") or die(mswMysqlErrMsg(mysql_errno(), mysql_error(), __LINE__, __FILE__));
$c = mysql_fetch_object(mysql_query("SELECT FOUND_ROWS() AS `rows`"));
$countedRows = isset($c->rows) ? $c->rows : '0';
?>
<div class="content">
<script type="text/javascript">
//<![CDATA[
jQuery(document).ready(function() {
jQuery('.nyroModal').nyroModal();
<?php
// Remove notes icon if permission denied..
if ($MSTEAM->notePadEnable == 'no' && $MSTEAM->id != '1') {
?>
jQuery('.tIcons .nyroModal').each(function(){
jQuery(this).remove();
});
<?php
}
?>
});
//]]>
</script>
<div class="header">
开发者ID:sushilfl88,项目名称:test-abcd,代码行数:31,代码来源:tickets-closed.php
示例14: mswProdKeyGen
<?php
if (!defined('PARENT')) {
exit;
}
// Check product key exists..
if ($SETTINGS->prodKey == '' || strlen($SETTINGS->prodKey) != 60) {
$productKey = mswProdKeyGen();
mysql_query("UPDATE `" . DB_PREFIX . "settings` SET\n `prodKey` = '{$productKey}'\n ") or die(mswMysqlErrMsg(mysql_errno(), mysql_error(), __LINE__, __FILE__));
$SETTINGS->prodKey = $productKey;
}
// Update encoder version if not already..
if ($SETTINGS->encoderVersion == 'XX' && function_exists('ioncube_loader_version')) {
mysql_query("UPDATE `" . DB_PREFIX . "settings` SET\n `encoderVersion` = '" . ioncube_loader_version() . "'\n ") or die(mswMysqlErrMsg(mysql_errno(), mysql_error(), __LINE__, __FILE__));
}
?>
<div class="content">
<div class="header">
<h1 class="page-title"><?php
echo $msg_adheader9;
?>
</h1>
<span class="clearfix"></span>
</div>
<ul class="breadcrumb">
<li class="active"><?php
开发者ID:sushilfl88,项目名称:test-abcd,代码行数:31,代码来源:purchase.php
示例15: strtoupper
if (!defined('TICKET_LOADER')) {
exit;
}
?>
<div id="userAssignArea">
<div class="block">
<p class="block-heading"><?php
echo strtoupper($msg_viewticket92);
?>
</p>
<div class="block-body">
<?php
$boomUsers = explode(',', $SUPTICK->assignedto);
$q_users = mysql_query("SELECT * FROM `" . DB_PREFIX . "users` ORDER BY `name`") or die(mswMysqlErrMsg(mysql_errno(), mysql_error(), __LINE__, __FILE__));
while ($USERS = mysql_fetch_object($q_users)) {
$checked = '';
$toggleHideShow = "style=''";
$class = '';
if ($MSTEAM->id == $USERS->id) {
$checked = 'checked';
$toggleHideShow = "style='display:none;'";
$class = "class='creater'";
}
?>
<label class="checkbox" <?php
echo $toggleHideShow;
?>
>
<input type="checkbox" name="assigned[]" <?php
开发者ID:sushilfl88,项目名称:test-abcd,代码行数:30,代码来源:users.php
示例16: mswSpecialChars
?>
"></i></span>
<a href="?p=faq-cat&edit=<?php
echo $CAT->id;
?>
" title="<?php
echo mswSpecialChars($msg_script9);
?>
"><i class="icon-pencil"></i></a>
</td>
</tr>
<?php
//============================
// SUB CATEGORIES
//============================
$q2 = mysql_query("SELECT *, \n\t\t (SELECT count(*) FROM `" . DB_PREFIX . "faqassign` \n\t\t\t WHERE (`" . DB_PREFIX . "categories`.`id` = `" . DB_PREFIX . "faqassign`.`itemID`)\n\t\t\t\t AND `" . DB_PREFIX . "faqassign`.`desc` = 'category'\n\t\t\t\t) AS `queCount`\n\t\t\t\tFROM `" . DB_PREFIX . "categories` \n\t\t WHERE `subcat` = '{$CAT->id}'\n\t\t\t\t" . (defined('DISABLED_CATS') ? 'AND `enCat` = \'no\'' : '') . " \n\t\t\t\t" . $SQL . " " . $orderBy) or die(mswMysqlErrMsg(mysql_errno(), mysql_error(), __LINE__, __FILE__));
$subCount = mysql_num_rows($q2);
if ($subCount > 0) {
while ($SUB = mysql_fetch_object($q2)) {
?>
<tr class="en_subcat_<?php
echo $SUB->enCat;
?>
">
<?php
if (USER_DEL_PRIV == 'yes') {
?>
<td style="padding-left:15px" class="subcat_<?php
echo $CAT->id;
?>
"><input type="checkbox" onclick="if(!this.checked){ms_uncheck('cat_<?php
开发者ID:sushilfl88,项目名称:test-abcd,代码行数:31,代码来源:faq-catman.php
示例17: array
// Are we showing attachments only allocated to a question?
if (isset($_GET['question'])) {
$_GET['question'] = (int) $_GET['question'];
$attachIDs = array();
$qA = mysql_query("SELECT `itemID` FROM `" . DB_PREFIX . "faqassign`\n WHERE `question` = '{$_GET['question']}'\n\t\t\t\t\t\tAND `desc` = 'attachment'\n\t\t\t\t\t\tGROUP BY `itemID`\n\t\t\t\t\t\t") or die(mswMysqlErrMsg(mysql_errno(), mysql_error(), __LINE__, __FILE__));
while ($AA = mysql_fetch_object($qA)) {
$attachIDs[] = $AA->itemID;
}
if (!empty($attachIDs)) {
$SQL = 'WHERE `id` IN(' . implode(',', $attachIDs) . ')';
} else {
$SQL = 'WHERE `id` IN(0)';
}
}
}
$q = mysql_query("SELECT SQL_CALC_FOUND_ROWS *,\n (SELECT count(*) FROM `" . DB_PREFIX . "faqassign` \n\t\t\t WHERE (`" . DB_PREFIX . "faqassign`.`itemID` = `" . DB_PREFIX . "faqattach`.`id`)\n\t\t\t\t AND `" . DB_PREFIX . "faqassign`.`desc` = 'attachment'\n\t\t\t ) AS `queCount`\n\t\t\t\tFROM `" . DB_PREFIX . "faqattach`\n {$SQL}\n {$orderBy} \n\t\t\t\tLIMIT {$limitvalue},{$limit}\n\t\t\t\t") or die(mswMysqlErrMsg(mysql_errno(), mysql_error(), __LINE__, __FILE__));
$c = mysql_fetch_object(mysql_query("SELECT FOUND_ROWS() AS `rows`"));
$countedRows = isset($c->rows) ? $c->rows : '0';
?>
<div class="content">
<div class="header">
<?php
// Order By..
if (mswRowCount('faqattach') > 0) {
$links = array(array('link' => '?p=' . $_GET['p'] . '&orderby=name_asc' . mswQueryParams(array('p', 'orderby', 'next')), 'name' => $msg_attachments17), array('link' => '?p=' . $_GET['p'] . '&orderby=name_desc' . mswQueryParams(array('p', 'orderby', 'next')), 'name' => $msg_attachments18), array('link' => '?p=' . $_GET['p'] . '&orderby=order_asc' . mswQueryParams(array('p', 'orderby', 'next')), 'name' => $msg_levels23), array('link' => '?p=' . $_GET['p'] . '&orderby=order_desc' . mswQueryParams(array('p', 'orderby', 'next')), 'name' => $msg_levels24), array('link' => '?p=' . $_GET['p'] . '&orderby=questions_desc' . mswQueryParams(array('p', 'orderby', 'next')), 'name' => $msg_kbase58), array('link' => '?p=' . $_GET['p'] . '&orderby=questions_asc' . mswQueryParams(array('p', 'orderby', 'next')), 'name' => $msg_kbase57));
echo $MSBOOTSTRAP->button($msg_script45, $links);
// Filters..
$links = array(array('link' => '?p=' . $_GET['p'] . mswQueryParams(array('p', 'opt', 'next')), 'name' => $msg_attachments20), array('link' => '?p=' . $_GET['p'] . '&opt=disabled' . mswQueryParams(array('p', 'opt', 'next')), 'name' => $msg_response27), array('link' => '?p=' . $_GET['p'] . '&opt=remote' . mswQueryParams(array('p', 'opt', 'next')), 'name' => $msg_attachments21));
echo $MSBOOTSTRAP->button($msg_search20, $links);
开发者ID:sushilfl88,项目名称:test-abcd,代码行数:31,代码来源:faq-attachman.php
示例18: mswSafeImportString
case 'tickets_desc':
$orderBy = 'ORDER BY `tickCount` desc';
break;
// Least tickets..
// Least tickets..
case 'tickets_asc':
$orderBy = 'ORDER BY `tickCount`';
break;
}
}
if (isset($_GET['keys']) && $_GET['keys']) {
$_GET['keys'] = mswSafeImportString(strtolower($_GET['keys']));
$SQL = (mswSQLDepartmentFilter($mswDeptFilterAccess, 'WHERE') ? ' AND ' : 'WHERE ') . ' LOWER(`name`) LIKE \'%' . $_GET['keys'] . '%\'';
}
echo "SELECT SQL_CALC_FOUND_ROWS *, \n (SELECT count(*) FROM `" . DB_PREFIX . "tickets` \n\t\t\t WHERE `" . DB_PREFIX . "departments`.`id` = `" . DB_PREFIX . "tickets`.`department`\n\t\t\t\tAND `spamFlag` = 'no'\n\t\t\t ) AS `tickCount`\n\t\t\t FROM `" . DB_PREFIX . "departments` " . mswSQLDepartmentFilter($mswDeptFilterAccess, 'WHERE') . " \n {$SQL}\n {$orderBy}\n LIMIT {$limitvalue},{$limit}\n\t\t\t ";
$q = mysql_query("SELECT SQL_CALC_FOUND_ROWS *, \n (SELECT count(*) FROM `" . DB_PREFIX . "tickets` \n\t\t\t WHERE `" . DB_PREFIX . "departments`.`id` = `" . DB_PREFIX . "tickets`.`department`\n\t\t\t\tAND `spamFlag` = 'no'\n\t\t\t ) AS `tickCount`\n\t\t\t FROM `" . DB_PREFIX . "departments` " . mswSQLDepartmentFilter($mswDeptFilterAccess, 'WHERE') . " \n {$SQL}\n {$orderBy}\n LIMIT {$limitvalue},{$limit}\n\t\t\t ") or die(mswMysqlErrMsg(mysql_errno(), mysql_error(), __LINE__, __FILE__));
$c = mysql_fetch_object(mysql_query("SELECT FOUND_ROWS() AS `rows`"));
$countedRows = isset($c->rows) ? $c->rows : '0';
?>
<div class="content">
<div class="header">
<?php
// Order By..
if (mswRowCount('departments') > 0) {
$links = array(array('link' => '?p=' . $_GET['p'] . '&orderby=name_asc' . mswQueryParams(array('p', 'orderby')), 'name' => $msg_levels21), array('link' => '?p=' . $_GET['p'] . '&orderby=name_desc' . mswQueryParams(array('p', 'orderby')), 'name' => $msg_levels22), array('link' => '?p=' . $_GET['p'] . '&orderby=order_asc' . mswQueryParams(array('p', 'orderby')), 'name' => $msg_levels23), array('link' => '?p=' . $_GET['p'] . '&orderby=order_desc' . mswQueryParams(array('p', 'orderby')), 'name' => $msg_levels24), array('link' => '?p=' . $_GET['p'] . '&orderby=man_asc' . mswQueryParams(array('p', 'orderby')), 'name' => $msg_dept26), array('link' => '?p=' . $_GET['p'] . '&orderby=man_desc' . mswQueryParams(array('p', 'orderby')), 'name' => $msg_dept27), array('link' => '?p=' . $_GET['p'] . '&orderby=vis_asc' . mswQueryParams(array('p', 'orderby')), 'name' => $msg_dept28), array('link' => '?p=' . $_GET['p'] . '&orderby=vis_desc' . mswQueryParams(array('p', 'orderby')), 'name' => $msg_dept29), array('link' => '?p=' . $_GET['p'] . '&orderby=tickets_desc' . mswQueryParams(array('p', 'orderby')), 'name' => $msg_accounts11), array('link' => '?p=' . $_GET['p'] . '&orderby=tickets_asc' . mswQueryParams(array('p', 'orderby')), 'name' => $msg_accounts12));
echo $MSBOOTSTRAP->button($msg_script45, $links);
// Page filter..
include PATH . 'templates/system/bootstrap/page-filter.php';
?>
开发者ID:sushilfl88,项目名称:test-abcd,代码行数:31,代码来源:roleman.php
示例19: mswGetTableData
$SR = mswGetTableData('responses', 'id', (int) $_GET['getResponse']);
$json = array('response' => isset($SR->answer) ? mswCleanData($SR->answer) : ' ');
}
break;
//===========================
// Add ticket custom fields
//===========================
//===========================
// Add ticket custom fields
//===========================
case 'add-cus-field':
$fields = '';
$dept = (int) $_GET['dept'];
$area = !isset($_GET['area']) ? 'ticket' : (in_array($_GET['area'], array('ticket', 'reply', 'admin')) ? $_GET['area'] : 'ticket');
// Custom fields..
$qF = mysql_query("SELECT * FROM `" . DB_PREFIX . "cusfields`\n WHERE FIND_IN_SET('{$area}',`fieldLoc`) > 0\n AND `enField` = 'yes'\n\t\tAND FIND_IN_SET('{$dept}',`departments`) > 0\n ORDER BY `orderBy`\n ") or die(mswMysqlErrMsg(mysql_errno(), mysql_error(), __LINE__, __FILE__));
if (mysql_num_rows($qF) > 0) {
while ($FIELDS = mysql_fetch_object($qF)) {
switch ($FIELDS->fieldType) {
case 'textarea':
$fields .= $MSFM->buildTextArea(mswCleanData($FIELDS->fieldInstructions), $FIELDS->id, ++$tabIndex);
break;
case 'input':
$fields .= $MSFM->buildInputBox(mswCleanData($FIELDS->fieldInstructions), $FIELDS->id, ++$tabIndex);
break;
case 'select':
$fields .= $MSFM->buildSelect(mswCleanData($FIELDS->fieldInstructions), $FIELDS->id, $FIELDS->fieldOptions, ++$tabIndex);
break;
case 'checkbox':
$fields .= $MSFM->buildCheckBox(mswCleanData($FIELDS->fieldInstructions), $FIELDS->id, $FIELDS->fieldOptions);
break;
开发者ID:sushilfl88,项目名称:test-abcd,代码行数:31,代码来源:ajax.php
示例20: levels
public function levels($level, $arr = false, $keys = false, $filter = false)
{
$level = strtolower($level);
$levels = array();
$q = mysql_query("SELECT * FROM `" . DB_PREFIX . "levels`\n " . ($filter ? 'WHERE `display` = \'yes\'' : '') . "\n ORDER BY `orderBy`\n ") or die(mswMysqlErrMsg(mysql_errno(), mysql_error(), __LINE__, __FILE__));
while ($L = mysql_fetch_object($q)) {
$levels[$L->marker ? $L->marker : $L->id] = mswCleanData($L->name);
}
if ($keys) {
return array_keys($levels);
} else {
if ($arr) {
return $levels;
} else {
return isset($levels[$level]) ? $levels[$level] : $levels['low'];
}
}
}
开发者ID:sushilfl88,项目名称:test-abcd,代码行数:18,代码来源:class.system.php
注:本文中的mswMysqlErrMsg函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论