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


PHP mswSafeImportString函数代码示例

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


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

示例1: update

 public function update()
 {
     $_GET['edit'] = (int) $_GET['edit'];
     mysql_query("UPDATE `" . DB_PREFIX . "departments` SET\n  `name`          = '" . mswSafeImportString($_POST['name']) . "',\n  `showDept`      = '" . (isset($_POST['showDept']) ? 'yes' : 'no') . "',\n  `dept_subject`  = '" . mswSafeImportString($_POST['dept_subject']) . "',\n  `dept_comments` = '" . mswSafeImportString($_POST['dept_comments']) . "',\n  `manual_assign` = '" . (isset($_POST['manual_assign']) ? 'yes' : 'no') . "'\n  WHERE `id`      = '{$_GET['edit']}'\n  ") or die(mswMysqlErrMsg(mysql_errno(), mysql_error(), __LINE__, __FILE__));
     // If manual assign is not set, remove from any tickets..
     if (isset($_POST['manual_assign']) && $_POST['manual_assign'] == 'no') {
         mysql_query("UPDATE `" . DB_PREFIX . "tickets` SET\n    `assignedto`       = ''\n    WHERE `department` = '{$_GET['edit']}'\n    ") or die(mswMysqlErrMsg(mysql_errno(), mysql_error(), __LINE__, __FILE__));
     }
 }
开发者ID:sushilfl88,项目名称:test-abcd,代码行数:9,代码来源:class.departments.php

示例2: editCustomField

 public function editCustomField()
 {
     // Defaults if not set..
     $_POST['fieldType'] = isset($_POST['fieldType']) && in_array($_POST['fieldType'], array('textarea', 'input', 'select', 'checkbox')) ? $_POST['fieldType'] : 'input';
     $_POST['fieldReq'] = isset($_POST['fieldReq']) ? 'yes' : 'no';
     $_POST['repeatPref'] = isset($_POST['repeatPref']) ? 'yes' : 'no';
     $_POST['enField'] = isset($_POST['enField']) ? 'yes' : 'no';
     $dept = empty($_POST['dept']) ? implode(',', $_POST['deptall']) : implode(',', $_POST['dept']);
     if (empty($_POST['fieldLoc'])) {
         $_POST['fieldLoc'][] = 'ticket';
     }
     if ((int) $_GET['edit'] > 0) {
         mysql_query("UPDATE `" . DB_PREFIX . "cusfields` SET\n    `fieldInstructions`  = '" . mswSafeImportString($_POST['fieldInstructions']) . "',\n    `fieldType`          = '{$_POST['fieldType']}',\n    `fieldReq`           = '{$_POST['fieldReq']}',\n    `fieldOptions`       = '" . mswSafeImportString($_POST['fieldOptions']) . "',\n    `fieldLoc`           = '" . implode(',', $_POST['fieldLoc']) . "',\n    `repeatPref`         = '{$_POST['repeatPref']}',\n    `enField`            = '{$_POST['enField']}',\n    `departments`        = '{$dept}'\n    WHERE `id`           = '{$_GET['edit']}'\n    ") or die(mswMysqlErrMsg(mysql_errno(), mysql_error(), __LINE__, __FILE__));
     }
 }
开发者ID:sushilfl88,项目名称:test-abcd,代码行数:15,代码来源:class.fields.php

示例3: updateB8

 public function updateB8()
 {
     $_POST['tokens'] = (int) $_POST['tokens'];
     $_POST['min_size'] = (int) $_POST['min_size'];
     $_POST['max_size'] = (int) $_POST['max_size'];
     $_POST['learning'] = isset($_POST['learning']) ? 'yes' : 'no';
     $_POST['num_parse'] = isset($_POST['num_parse']) ? 'yes' : 'no';
     $_POST['uri_parse'] = isset($_POST['uri_parse']) ? 'yes' : 'no';
     $_POST['html_parse'] = isset($_POST['html_parse']) ? 'yes' : 'no';
     $_POST['multibyte'] = isset($_POST['multibyte']) ? 'yes' : 'no';
     mysql_query("UPDATE `" . DB_PREFIX . "imap_b8` SET\n  `tokens`      = '{$_POST['tokens']}',\n  `min_size`    = '{$_POST['min_size']}',\n  `max_size`    = '{$_POST['max_size']}',\n  `min_dev`     = '" . mswSafeImportString($_POST['min_dev']) . "',\n  `x_constant`  = '" . mswSafeImportString($_POST['x_constant']) . "',\n  `s_constant`  = '" . mswSafeImportString($_POST['s_constant']) . "',\n  `learning`    = '{$_POST['learning']}',\n  `num_parse`   = '{$_POST['num_parse']}',\n  `uri_parse`   = '{$_POST['uri_parse']}',\n  `html_parse`  = '{$_POST['html_parse']}',\n  `multibyte`   = '{$_POST['multibyte']}',\n  `encoder`     = '" . mswSafeImportString($_POST['encoder']) . "',\n  `skipFilters` = '" . mswSafeImportString($_POST['skipFilters']) . "'\n  ");
     // Are we clearing the learning filters?
     if (isset($_POST['reset'])) {
         // Reset older than X days or truncate all?
         if (isset($_POST['reset_days']) && (int) $_POST['reset_days'] > 0) {
             $days = (int) $_POST['reset_days'];
             mysql_query("DELETE FROM `" . DB_PREFIX . "imap_b8_filter` \n\t  WHERE DATEDIFF(NOW(),DATE(FROM_UNIXTIME(`ts`))) >= " . $days . "\n\t  AND `token` NOT IN('b8*dbversion','b8*texts')\n\t  ");
         } else {
             mysql_query("TRUNCATE TABLE `" . DB_PREFIX . "imap_b8_filter`");
             mysql_query("INSERT INTO `" . DB_PREFIX . "imap_b8_filter` (`token`,`count_ham`,`ts`) values ('b8*dbversion', '" . B8_VERSION . "','0')");
             mysql_query("INSERT INTO `" . DB_PREFIX . "imap_b8_filter` (`token`,`count_ham`,`count_spam`,`ts`) values ('b8*texts', '0', '0','0')");
         }
     } else {
         // Anything to classify?
         if ($_POST['add-to']) {
             // Load the b8 class..
             include REL_PATH . 'control/lib/b8/call_b8.php';
             switch ($_POST['classify']) {
                 case 'spam':
                     $MSB8->learn(htmlspecialchars($_POST['add-to']), b8::SPAM);
                     break;
                 case 'ham':
                     $MSB8->learn(htmlspecialchars($_POST['add-to']), b8::HAM);
                     break;
             }
         }
     }
 }
开发者ID:sushilfl88,项目名称:test-abcd,代码行数:38,代码来源:class.imap.php

示例4: mswManSchemaFix

function mswManSchemaFix($s)
{
    if ($s->email == '' && $s->scriptpath == '' && $s->attachpath == '' && $s->attachhref == '') {
        $hdeskPath = 'http://www.example.com/helpdesk';
        if (isset($_SERVER['HTTP_HOST']) && isset($_SERVER['PHP_SELF'])) {
            $hdeskPath = 'http' . (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on' ? 's' : '') . '://' . $_SERVER['HTTP_HOST'] . substr($_SERVER['PHP_SELF'], 0, -10);
        }
        $hdeskPathAtt = $hdeskPath . '/content/attachments';
        $hdeskPathFaq = $hdeskPath . '/content/attachments-faq';
        $attachPath = mswSafeImportString(PATH . 'content/attachments');
        $attFaqPath = mswSafeImportString(PATH . 'content/attachments-faq');
        $apiKey = strtoupper(substr(md5(uniqid(rand(), 1)), 3, 10) . '-' . substr(md5(uniqid(rand(), 1)), 3, 8));
        mysql_query("UPDATE `" . DB_PREFIX . "settings` SET\n    `website`             = 'My Help Desk',\n    `email`               = 'email@example.com',\n    `scriptpath`          = '{$hdeskPath}',\n    `attachpath`          = '{$attachPath}',\n\t`attachhref`          = '{$hdeskPathAtt}',\n\t`attachpathfaq`       = '{$attFaqPath}',\n\t`attachhreffaq`       = '{$hdeskPathFaq}',\n    `adminFooter`         = 'To add your own footer code, click "Settings & Tools > Other Options > Edit Footers"',\n    `publicFooter`        = 'To add your own footer code, click "Settings & Tools > Other Options > Edit Footers"',\n    `prodKey`             = '" . mswProdKeyGen() . "',\n    `encoderVersion`      = '" . (function_exists('ioncube_loader_version') ? ioncube_loader_version() : 'XX') . "',\n    `softwareVersion`     = '" . SCRIPT_VERSION . "',\n\t`apiKey`              = '{$apiKey}'\n    LIMIT 1\n    ") or die(mswMysqlErrMsg(mysql_errno(), mysql_error(), __LINE__, __FILE__));
        // Insert user..
        if (mswRowCount('users') == 0) {
            mysql_query("INSERT INTO `" . DB_PREFIX . "users` (\n      `id`, `ts`, `name`, `email`, `accpass`, `signature`, `notify`, `pageAccess`, `emailSigs`, `notePadEnable`, `delPriv`,\n      `nameFrom`, `emailFrom`, `assigned`, `timezone`\n      ) VALUES (\n      1, UNIX_TIMESTAMP(UTC_TIMESTAMP), 'admin', 'admin@example.com', '" . md5(SECRET_KEY . 'admin') . "', '', 'yes', '', 'no', 'yes', 'yes',\n      '', '', 'no', 'Europe/London'\n      )");
        } else {
            mysql_query("UPDATE `" . DB_PREFIX . "users` SET\n\t  `accpass`  = '" . md5(SECRET_KEY . 'admin') . "'\n\t  WHERE `id` = '1'\n\t  ");
        }
        // Page reload..
        header("Location: index.php");
        exit;
    }
}
开发者ID:sushilfl88,项目名称:test-abcd,代码行数:24,代码来源:functions.php

示例5: updateResponse

 public function updateResponse()
 {
     $ID = (int) $_GET['edit'];
     $dept = empty($_POST['dept']) ? implode(',', $_POST['deptall']) : implode(',', $_POST['dept']);
     mysql_query("UPDATE `" . DB_PREFIX . "responses` SET\n  `ts`          = UNIX_TIMESTAMP(UTC_TIMESTAMP),\n  `title`       = '" . mswSafeImportString($_POST['title']) . "',\n  `answer`      = '" . mswSafeImportString($_POST['answer']) . "',\n  `departments` = '" . mswSafeImportString($dept) . "',\n  `enResponse`  = '" . (isset($_POST['enResponse']) ? 'yes' : 'no') . "'\n  WHERE `id`    = '{$ID}'\n  ") or die(mswMysqlErrMsg(mysql_errno(), mysql_error(), __LINE__, __FILE__));
 }
开发者ID:sushilfl88,项目名称:test-abcd,代码行数:6,代码来源:class.responses.php

示例6: array_map

// Load the skip words array..
include PATH . 'control/skipwords.php';
// Variables..
$limitvalue = $page * $SETTINGS->quePerPage - $SETTINGS->quePerPage;
$pageNumbers = '';
$html = '';
$title = $msg_pkbase;
$dataCount = 0;
// Build search query..
$SQL = '';
if ($_GET['q']) {
    $chop = array_map('trim', explode(' ', $_GET['q']));
    if (!empty($chop)) {
        foreach ($chop as $word) {
            if (!in_array($word, $searchSkipWords)) {
                $SQL .= (!$SQL ? 'WHERE (' : 'OR (') . "`question` LIKE '%" . mswCleanData(mswSafeImportString($word)) . "%' OR `answer` LIKE '%" . mswCleanData(mswSafeImportString($word)) . "%')";
            }
        }
    }
    // Are we searching for anything..
    if ($SQL) {
        $html = $FAQ->questions(0, $limitvalue, $SETTINGS, array($SQL, 'no'));
        $dataCount = $FAQ->questions(0, $limitvalue, $SETTINGS, array($SQL, 'yes'));
    }
}
// Pagination..
if ($dataCount > $SETTINGS->quePerPage) {
    define('PER_PAGE', $SETTINGS->quePerPage);
    $PTION = new pagination($dataCount, '?q=' . urlencode($_GET['q']) . mswQueryParams(array('q', 'p', 'next')) . '&next=');
    $pageNumbers = $PTION->display();
}
开发者ID:sushilfl88,项目名称:test-abcd,代码行数:31,代码来源:faq-search.php

示例7: array

 case 'login':
     $redr = 'index.php?p=dashboard';
     // If login limit and ban time is enabled, check first..
     if ($SETTINGS->loginLimit > 0) {
         $ban = $MSACC->checkban($SETTINGS, $MSDT);
         if ($ban == 'fail') {
             $json = array('status' => 'err', 'field' => 'email', 'msg' => $msg_public_login4);
         }
     }
     if (!isset($json['status']) && isset($_POST['email'], $_POST['pass']) && $_POST['email'] && $_POST['pass']) {
         // Check for valid e-mail..
         if (!mswIsValidEmail($_POST['email'])) {
             $json = array('status' => 'err', 'field' => 'email', 'msg' => $msg_main13);
         } else {
             // Now check account..
             $ACC = mswGetTableData('portal', 'email', mswSafeImportString($_POST['email']), 'AND `userPass` = \'' . md5(SECRET_KEY . $_POST['pass']) . '\' AND `verified` = \'yes\'');
             if (isset($ACC->email)) {
                 // Check access..
                 if ($ACC->enabled == 'yes') {
                     $_SESSION[md5(SECRET_KEY) . '_msw_support'] = $ACC->email;
                     // Ticket/dispute redirection..
                     if (isset($_SESSION['ticketAccessID']) && (int) $_SESSION['ticketAccessID'] > 0) {
                         $redr = 'index.php?t=' . $_SESSION['ticketAccessID'];
                         unset($_SESSION['ticketAccessID']);
                     }
                     if (isset($_SESSION['disputeAccessID']) && (int) $_SESSION['disputeAccessID'] > 0) {
                         $redr = 'index.php?d=' . $_SESSION['disputeAccessID'];
                         unset($_SESSION['disputeAccessID']);
                     }
                     if (isset($_SESSION['redirectPage'])) {
                         $redr = 'index.php?p=open';
开发者ID:sushilfl88,项目名称:test-abcd,代码行数:31,代码来源:ajax-handler.php

示例8: folders

 public function folders($staff)
 {
     $deleted = 0;
     $folders = array("'inbox'", "'outbox'", "'bin'");
     // Existing..
     if (!empty($_POST['folder'])) {
         // Update..
         foreach ($_POST['folder'] as $fK => $fV) {
             mysql_query("UPDATE `" . DB_PREFIX . "mailfolders` SET\n      `folder`      = '" . mswSafeImportString($fV) . "'\n      WHERE `id`    = '{$fK}'\n\t  AND `staffID` = '{$staff}'\n      ") or die(mswMysqlErrMsg(mysql_errno(), mysql_error(), __LINE__, __FILE__));
             $folders[] = "'" . $fK . "'";
         }
         // Delete messages if folder no longer exists..
         if (!empty($folders)) {
             mysql_query("DELETE FROM `" . DB_PREFIX . "mailassoc`\n\t  WHERE `staffID`   = '{$staff}'\n\t  AND `folder` NOT IN(" . implode(',', $folders) . ")\n      ") or die(mswMysqlErrMsg(mysql_errno(), mysql_error(), __LINE__, __FILE__));
             $deleted = mysql_affected_rows();
             if (mswRowCount('mailassoc') == 0) {
                 @mysql_query("TRUNCATE TABLE `" . DB_PREFIX . "mailassoc`");
             }
             // Now delete folders not in array..
             mysql_query("DELETE FROM `" . DB_PREFIX . "mailfolders`\n\t  WHERE `staffID`   = '{$staff}'\n\t  AND `id`     NOT IN(" . implode(',', $folders) . ")\n      ") or die(mswMysqlErrMsg(mysql_errno(), mysql_error(), __LINE__, __FILE__));
             if (mswRowCount('mailfolders') == 0) {
                 @mysql_query("TRUNCATE TABLE `" . DB_PREFIX . "mailfolders`");
             }
         }
     }
     // New..
     if (!empty($_POST['new'])) {
         foreach ($_POST['new'] as $fV) {
             if ($fV) {
                 mysql_query("INSERT INTO `" . DB_PREFIX . "mailfolders` (\n        `staffID`,\n        `folder`\n        ) VALUES (\n        '{$staff}',\n        '" . mswSafeImportString($fV) . "'\n        )") or die(mswMysqlErrMsg(mysql_errno(), mysql_error(), __LINE__, __FILE__));
             }
         }
     }
     return $deleted;
 }
开发者ID:sushilfl88,项目名称:test-abcd,代码行数:35,代码来源:class.mailbox.php

示例9: mswSafeImportString

if (isset($_GET['keys'])) {
    // Filters..
    if ($_GET['keys']) {
        $_GET['keys'] = mswSafeImportString(strtolower($_GET['keys']));
        $filters[] = "LOWER(`" . DB_PREFIX . "portal`.`name`) LIKE '%" . $_GET['keys'] . "%' OR LOWER(`" . DB_PREFIX . "portal`.`email`) LIKE '%" . $_GET['keys'] . "%' OR LOWER(`" . DB_PREFIX . "portal`.`notes`) LIKE '%" . $_GET['keys'] . "%'";
    }
    if (isset($_GET['ip']) && $_GET['ip']) {
        $filters[] = "`ip` = '" . mswSafeImportString($_GET['ip']) . "'";
    }
    if (isset($_GET['from'], $_GET['to']) && $_GET['from'] && $_GET['to']) {
        $from = $MSDT->mswDatePickerFormat($_GET['from']);
        $to = $MSDT->mswDatePickerFormat($_GET['to']);
        $filters[] = "DATE(FROM_UNIXTIME(`ts`)) BETWEEN '{$from}' AND '{$to}'";
    }
    if (isset($_GET['timezone']) && $_GET['timezone']) {
        $filters[] = "`timezone` = '" . mswSafeImportString($_GET['timezone']) . "'";
    }
    if (isset($_GET['status']) && in_array($_GET['status'], array('yes', 'no'))) {
        $filters[] = "`enabled` = '{$_GET['status']}'";
    }
    if (isset($_GET['c1'], $_GET['c2']) && $_GET['c2'] > 0) {
        $_GET['c1'] = (int) $_GET['c1'];
        $_GET['c2'] = (int) $_GET['c2'];
        $filters[] = "(SELECT count(*) FROM `" . DB_PREFIX . "tickets` WHERE `" . DB_PREFIX . "portal`.`email` = `" . DB_PREFIX . "tickets`.`email` AND `spamFlag` = 'no') BETWEEN '{$_GET['c1']}' AND '{$_GET['c2']}'";
    }
    // Build search string..
    if (!empty($filters)) {
        for ($i = 0; $i < count($filters); $i++) {
            $searchParams .= ($i ? ' AND (' : 'WHERE (') . $filters[$i] . ')';
        }
    }
开发者ID:sushilfl88,项目名称:test-abcd,代码行数:31,代码来源:search.php

示例10: array

<?php

if (!defined('PARENT')) {
    exit;
}
include PATH . 'templates/system/tickets/global/order-by.php';
include PATH . 'templates/system/tickets/global/filter-by.php';
$dis = array();
$SQL = '';
if (isset($_GET['keys'])) {
    $_GET['keys'] = mswSafeImportString(strtolower($_GET['keys']));
    $SQL = 'AND (LOWER(`' . DB_PREFIX . 'tickets`.`subject`) LIKE \'%' . $_GET['keys'] . '%\' OR LOWER(`' . DB_PREFIX . 'tickets`.`comments`) LIKE \'%' . $_GET['keys'] . '%\')';
}
// Disputes..
if ($SETTINGS->disputes == 'yes' && isset($_GET['disputes'])) {
    // Disputes in other tickets..
    $qD = mysql_query("SELECT `ticketID` FROM `" . DB_PREFIX . "disputes` \n        WHERE `visitorID` = '{$ACC->id}'\n\t    GROUP BY `ticketID`\n\t    ") or die(mswMysqlErrMsg(mysql_errno(), mysql_error(), __LINE__, __FILE__));
    while ($DP = mysql_fetch_object($qD)) {
        $dis[] = $DP->ticketID;
    }
    // Disputes from started tickets..
    $qD2 = mysql_query("SELECT `id` FROM `" . DB_PREFIX . "tickets` \n         WHERE `visitorID` = '{$ACC->id}'\n\t\t AND `isDisputed`  = 'yes'\n\t\t AND `spamFlag`    = 'no'\n\t     ") or die(mswMysqlErrMsg(mysql_errno(), mysql_error(), __LINE__, __FILE__));
    while ($DP2 = mysql_fetch_object($qD2)) {
        $dis[] = $DP2->id;
    }
}
$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 (SELECT count(*) FROM `" . DB_PREFIX . "disputes` \n\t  WHERE `" . DB_PREFIX . "disputes`.`ticketID` = `" . DB_PREFIX . "tickets`.`id`\n\t ) AS `disputeCount`\n\t FROM `" . DB_PREFIX . "tickets` \n     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     " . (empty($dis) ? 'WHERE `' . DB_PREFIX . 'portal`.`email` = \'' . $ACC->email . '\'' : '') . "\n\t " . (!empty($dis) ? 'WHERE `' . DB_PREFIX . 'tickets`.`id` IN(' . implode(',', $dis) . ')' : '') . "\n\t {$SQL}\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';
$searchBoxUrl = 'acchistory&id=' . $_GET['id'] . (isset($_GET['disputes']) ? '&disputes=yes' : '');
?>
开发者ID:sushilfl88,项目名称:test-abcd,代码行数:31,代码来源:history.php

示例11: updateSettings

 public function updateSettings()
 {
     $_POST = mswMultiDimensionalArrayMap('mswSafeImportString', $_POST);
     // Defaults if not set..
     $_POST['attachment'] = isset($_POST['attachment']) ? 'yes' : 'no';
     $_POST['rename'] = isset($_POST['rename']) ? 'yes' : 'no';
     $_POST['weekStart'] = isset($_POST['weekStart']) && in_array($_POST['weekStart'], array('sun', 'mon')) ? $_POST['weekStart'] : 'sun';
     $_POST['enSpamSum'] = isset($_POST['enSpamSum']) && in_array($_POST['enSpamSum'], array('yes', 'no')) ? $_POST['enSpamSum'] : 'yes';
     $_POST['enableBBCode'] = isset($_POST['enableBBCode']) ? 'yes' : 'no';
     $_POST['disputes'] = isset($_POST['disputes']) ? 'yes' : 'no';
     $_POST['multiplevotes'] = isset($_POST['multiplevotes']) ? 'yes' : 'no';
     $_POST['enableVotes'] = isset($_POST['enableVotes']) ? 'yes' : 'no';
     $_POST['enCapLogin'] = isset($_POST['enCapLogin']) ? 'yes' : 'no';
     $_POST['sysstatus'] = isset($_POST['sysstatus']) ? 'yes' : 'no';
     $_POST['autoenable'] = $_POST['autoenable'] ? $this->datetime->mswDatePickerFormat($_POST['autoenable']) : '0000-00-00';
     $_POST['kbase'] = isset($_POST['kbase']) ? 'yes' : 'no';
     $_POST['scriptpath'] = systemSettings::filterInstallationPath($_POST['scriptpath']);
     $_POST['attachpath'] = systemSettings::filterInstallationPath($_POST['attachpath']);
     $_POST['attachhref'] = systemSettings::filterInstallationPath($_POST['attachhref']);
     $_POST['attachpathfaq'] = systemSettings::filterInstallationPath($_POST['attachpathfaq']);
     $_POST['attachhreffaq'] = systemSettings::filterInstallationPath($_POST['attachhreffaq']);
     $_POST['imap_param'] = $_POST['imap_param'] ? $_POST['imap_param'] : 'pipe';
     $_POST['renamefaq'] = isset($_POST['renamefaq']) ? 'yes' : 'no';
     $_POST['smtp_debug'] = isset($_POST['smtp_debug']) ? 'yes' : 'no';
     $_POST['createPref'] = isset($_POST['createPref']) ? 'yes' : 'no';
     $_POST['createAcc'] = isset($_POST['createAcc']) ? 'yes' : 'no';
     $_POST['ticketHistory'] = isset($_POST['ticketHistory']) ? 'yes' : 'no';
     $_POST['closenotify'] = isset($_POST['closenotify']) ? 'yes' : 'no';
     $_POST['accProfNotify'] = isset($_POST['accProfNotify']) ? 'yes' : 'no';
     $_POST['newAccNotify'] = isset($_POST['newAccNotify']) ? 'yes' : 'no';
     $_POST['enableLog'] = isset($_POST['enableLog']) ? 'yes' : 'no';
     $_POST['enableMail'] = isset($_POST['enableMail']) ? 'yes' : 'no';
     $_POST['imap_debug'] = isset($_POST['imap_debug']) ? 'yes' : 'no';
     $_POST['apiLog'] = isset($_POST['apiLog']) ? 'yes' : 'no';
     $_POST['disputeAdminStop'] = isset($_POST['disputeAdminStop']) ? 'yes' : 'no';
     // Enforce digits..
     $_POST['maxsize'] = (int) $_POST['maxsize'] > 0 ? $_POST['maxsize'] : '0';
     $_POST['popquestions'] = (int) $_POST['popquestions'] > 0 ? $_POST['popquestions'] : '10';
     $_POST['quePerPage'] = (int) $_POST['quePerPage'] > 0 ? $_POST['quePerPage'] : '10';
     $_POST['cookiedays'] = (int) $_POST['cookiedays'] > 0 ? $_POST['cookiedays'] : '60';
     $_POST['attachboxes'] = (int) $_POST['attachboxes'] > 0 ? $_POST['attachboxes'] : '1';
     $_POST['autoClose'] = (int) $_POST['autoClose'] > 0 ? $_POST['autoClose'] : '0';
     $_POST['smtp_port'] = (int) $_POST['smtp_port'] > 0 ? $_POST['smtp_port'] : '25';
     $_POST['loginLimit'] = (int) $_POST['loginLimit'] > 0 ? $_POST['loginLimit'] : '0';
     $_POST['banTime'] = (int) $_POST['banTime'] > 0 ? $_POST['banTime'] : '25';
     $_POST['minPassValue'] = (int) $_POST['minPassValue'] > 0 ? $_POST['minPassValue'] : '8';
     $_POST['minTickDigits'] = (int) $_POST['minTickDigits'] > 0 ? $_POST['minTickDigits'] : '5';
     $_POST['imap_timeout'] = (int) $_POST['imap_timeout'] > 0 ? $_POST['imap_timeout'] : '0';
     $_POST['imap_memory'] = (int) $_POST['imap_memory'] > 0 ? $_POST['imap_memory'] : '0';
     // Restrictions..
     if (LICENCE_VER == 'locked') {
         $_POST['attachboxes'] = RESTR_ATTACH;
         $_POST['adminFooter'] = 'To add your own footer code, click &quot;Settings &amp; Tools > Other Options > Edit Footers&quot;';
         $_POST['publicFooter'] = 'To add your own footer code, click &quot;Settings &amp; Tools > Other Options > Edit Footers&quot;';
     }
     // Serialized data..
     $langSets = !empty($_POST['templateSet']) ? serialize($_POST['templateSet']) : '';
     if ($_POST['defKeepLogs']['user'] == '') {
         $_POST['defKeepLogs']['user'] = '0';
     }
     if ($_POST['defKeepLogs']['acc'] == '') {
         $_POST['defKeepLogs']['acc'] = '0';
     }
     $defLog = !empty($_POST['defKeepLogs']) ? serialize($_POST['defKeepLogs']) : '';
     $handlers = !empty($_POST['apiHandlers']) ? implode(',', $_POST['apiHandlers']) : '';
     mysql_query("UPDATE `" . DB_PREFIX . "settings` SET\n  `website`              = '{$_POST['website']}',\n  `email`                = '{$_POST['email']}',\n  `replyto`              = '{$_POST['replyto']}',\n  `scriptpath`           = '{$_POST['scriptpath']}',\n  `attachpath`           = '{$_POST['attachpath']}',\n  `attachhref`           = '{$_POST['attachhref']}',\n  `attachpathfaq`        = '{$_POST['attachpathfaq']}',\n  `attachhreffaq`        = '{$_POST['attachhreffaq']}',\n  `language`             = '{$_POST['language']}',\n  `langSets`             = '" . mswSafeImportString($langSets) . "',\n  `dateformat`           = '{$_POST['dateformat']}',\n  `timeformat`           = '{$_POST['timeformat']}',\n  `timezone`             = '{$_POST['timezone']}',\n  `weekStart`            = '{$_POST['weekStart']}',\n  `jsDateFormat`         = '{$_POST['jsDateFormat']}',\n  `kbase`                = '{$_POST['kbase']}',\n  `enableVotes`          = '{$_POST['enableVotes']}',\n  `multiplevotes`        = '{$_POST['multiplevotes']}',\n  `popquestions`         = '{$_POST['popquestions']}',\n  `quePerPage`           = '{$_POST['quePerPage']}',\n  `cookiedays`           = '{$_POST['cookiedays']}',\n  `renamefaq`            = '{$_POST['renamefaq']}',\n  `attachment`           = '{$_POST['attachment']}',\n  `rename`               = '{$_POST['rename']}',\n  `attachboxes`          = '{$_POST['attachboxes']}',\n  `filetypes`            = '{$_POST['filetypes']}',\n  `maxsize`              = '{$_POST['maxsize']}',\n  `enableBBCode`         = '{$_POST['enableBBCode']}',\n  `afolder`              = '{$_POST['afolder']}',\n  `autoClose`            = '{$_POST['autoClose']}',\n  `smtp_host`            = '{$_POST['smtp_host']}',\n  `smtp_user`            = '{$_POST['smtp_user']}',\n  `smtp_pass`            = '{$_POST['smtp_pass']}',\n  `smtp_port`            = '{$_POST['smtp_port']}',\n  `smtp_security`        = '{$_POST['smtp_security']}',\n  `smtp_debug`           = '{$_POST['smtp_debug']}',\n  `adminFooter`          = '{$_POST['adminFooter']}',\n  `publicFooter`         = '{$_POST['publicFooter']}',\n  `apiKey`               = '{$_POST['apiKey']}',\n  `apiLog`               = '{$_POST['apiLog']}',\n  `apiHandlers`          = '{$handlers}',\n  `recaptchaPrivateKey`  = '{$_POST['recaptchaPrivateKey']}',\n  `recaptchaPublicKey`   = '{$_POST['recaptchaPublicKey']}',\n  `enCapLogin`           = '{$_POST['enCapLogin']}',\n  `sysstatus`            = '{$_POST['sysstatus']}',\n  `autoenable`           = '{$_POST['autoenable']}',\n  `disputes`             = '{$_POST['disputes']}',\n  `offlineReason`        = '{$_POST['offlineReason']}',\n  `createPref`           = '{$_POST['createPref']}',\n  `createAcc`            = '{$_POST['createAcc']}',\n  `loginLimit`           = '{$_POST['loginLimit']}',\n  `banTime`              = '{$_POST['banTime']}',\n  `ticketHistory`        = '{$_POST['ticketHistory']}',\n  `closenotify`          = '{$_POST['closenotify']}',\n  `accProfNotify`        = '{$_POST['accProfNotify']}',\n  `minPassValue`         = '{$_POST['minPassValue']}',\n  `newAccNotify`         = '{$_POST['newAccNotify']}',\n  `recaptchaLang`        = '{$_POST['recaptchaLang']}',\n  `recaptchaTheme`       = '{$_POST['recaptchaTheme']}',\n  `enableLog`            = '{$_POST['enableLog']}',\n  `defKeepLogs`          = '" . mswSafeImportString($defLog) . "',\n  `minTickDigits`        = '{$_POST['minTickDigits']}',\n  `enableMail`           = '{$_POST['enableMail']}',\n  `imap_debug`           = '{$_POST['imap_debug']}',\n  `imap_param`           = '{$_POST['imap_param']}',\n  `imap_memory`          = '{$_POST['imap_memory']}',\n  `imap_timeout`         = '{$_POST['imap_timeout']}',\n  `disputeAdminStop`     = '{$_POST['disputeAdminStop']}'\n  WHERE `id`             = '1'\n  ") or die(mswMysqlErrMsg(mysql_errno(), mysql_error(), __LINE__, __FILE__));
 }
开发者ID:sushilfl88,项目名称:test-abcd,代码行数:67,代码来源:class.settings.php

示例12: mswGetTableData

  ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  
  This File: ticket-open.php
  Description: System File

  ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
if (!defined('PARENT')) {
    $HEADERS->err403(true);
}
// Access..
if (!in_array($cmd, $userAccess) && $MSTEAM->id != '1') {
    $HEADERS->err403(true);
}
// Ticket preview message..
if (isset($_GET['loadTicketMessage']) && (int) $_GET['loadTicketMessage'] > 0) {
    $T = mswGetTableData('tickets', 'id', mswSafeImportString($_GET['loadTicketMessage']));
    echo $MSPARSER->mswTxtParsingEngine($T->comments);
    exit;
}
// Department check for filter..
if (isset($_GET['dept'])) {
    if (mswDeptPerms($MSTEAM->id, $_GET['dept'], $userDeptAccess) == 'fail') {
        $HEADERS->err403(true);
    }
}
// Call relevant classes..
include_once REL_PATH . 'control/classes/class.tickets.php';
$MSPTICKETS = new tickets();
$MSPTICKETS->settings = $SETTINGS;
$MSPTICKETS->datetime = $MSDT;
$title = $msg_adheader5;
开发者ID:sushilfl88,项目名称:test-abcd,代码行数:31,代码来源:ticket-open.php

示例13: insert

 public function insert($ticketID, $fieldID, $replyID, $data)
 {
     mysql_query("INSERT INTO `" . DB_PREFIX . "ticketfields` (\n  `ticketID`,`fieldID`,`replyID`,`fieldData`\n  ) VALUES (\n  '{$ticketID}','{$fieldID}','{$replyID}','" . mswSafeImportString($data) . "'\n  )") or die(mswMysqlErrMsg(mysql_errno(), mysql_error(), __LINE__, __FILE__));
 }
开发者ID:sushilfl88,项目名称:test-abcd,代码行数:4,代码来源:class.fields.php

示例14: isset

<?php

if (!defined('PARENT') || !isset($toLoad)) {
    exit;
}
$orderBy = 'ORDER BY `' . DB_PREFIX . 'mailbox`.`ts` DESC';
$keys = isset($_GET['keys']) ? $_GET['keys'] : '';
$searchSQL = '';
// Are we searching?
if ($keys) {
    $searchSQL = 'AND (`' . DB_PREFIX . 'mailbox`.`subject` LIKE \'%' . mswSafeImportString($keys) . '%\' OR `' . DB_PREFIX . 'mailbox`.`message` LIKE \'%' . mswSafeImportString($keys) . '%\')';
}
$q = mysql_query("SELECT SQL_CALC_FOUND_ROWS *,\n     `" . DB_PREFIX . "mailbox`.`staffID` AS `starter`,\n\t `" . DB_PREFIX . "mailbox`.`ts` AS `mailStamp`,\n\t `" . DB_PREFIX . "mailassoc`.`mailID` AS `messageID`\n\t FROM `" . DB_PREFIX . "mailassoc`\n\t LEFT JOIN `" . DB_PREFIX . "mailbox`\n\t ON `" . DB_PREFIX . "mailassoc`.`mailID`   = `" . DB_PREFIX . "mailbox`.`id`\n\t LEFT JOIN `" . DB_PREFIX . "users`\n\t ON `" . DB_PREFIX . "users`.`id`           = `" . DB_PREFIX . "mailbox`.`staffID`\n\t WHERE `folder`                         = '{$toLoad}' \n     AND `" . DB_PREFIX . "mailassoc`.`staffID` = '{$MSTEAM->id}'\n\t " . ($searchSQL ? $searchSQL . mswDefineNewline() . 'GROUP BY `' . DB_PREFIX . 'mailassoc`.`mailID`' : '') . "\n\t " . $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">
        
  <div class="header">
    
	<button class="btn search-bar-button" type="button" onclick="mswToggle('b1','b2','keys','mailbox')"><i class="icon-search" id="search-icon-button"></i></button>
	<h1 class="page-title"><?php 
echo $msg_adheader61;
?>
 (<?php 
echo $boxName;
?>
)</h1>
	
	<span class="clearfix"></span>
	
开发者ID:sushilfl88,项目名称:test-abcd,代码行数:30,代码来源:mailbox-folder.php

示例15: getTicketID

 public function getTicketID($subject, $email)
 {
     $ticketid = 0;
     if (preg_match("[[#][0-9]{1,12}]", $subject, $regs)) {
         $ticketid = mswReverseTicketNumber(trim(preg_replace('/[^0-9]/', '', $regs[0])));
         $PORTAL = mswGetTableData('portal', 'email', mswSafeImportString($email), '', '`id`');
         if (isset($PORTAL->id) && mswRowCount('tickets WHERE `id` = \'' . (int) $ticketid . '\' AND `visitorID` = \'' . $PORTAL->id . '\' AND `spamFlag` = \'no\'') > 0) {
             return array('yes', $ticketid);
         }
     }
     return array('no', 0);
 }
开发者ID:sushilfl88,项目名称:test-abcd,代码行数:12,代码来源:class.imap.php


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