Beispiel #1
0
 public function questions($id = 0, $limit, $s, $search = array(), $orderOverride = '', $queryAdd = '')
 {
     global $msg_pkbase8;
     $data = '';
     // Search mode..
     if (isset($search[0], $search[1])) {
         $q = mysql_query("SELECT SQL_CALC_FOUND_ROWS *,\n\t      `" . DB_PREFIX . "faq`.`id` AS `faqID`,\n\t\t  `" . DB_PREFIX . "faq`.`question` AS `faqQuestion` \n\t\t  FROM `" . DB_PREFIX . "faq`\n          " . $search[0] . "\n\t\t  AND `enFaq` = 'yes'\n\t\t  ORDER BY `orderBy`\n\t\t  LIMIT {$limit}," . $s->quePerPage) or die(mswMysqlErrMsg(mysql_errno(), mysql_error(), __LINE__, __FILE__));
         if ($search[1] == 'yes') {
             $c = mysql_fetch_object(mysql_query("SELECT FOUND_ROWS() AS `rows`"));
             return isset($c->rows) ? $c->rows : '0';
         }
     } else {
         $q = mysql_query("SELECT *,\n\t      `" . DB_PREFIX . "faq`.`id` AS `faqID`,\n\t\t  `" . DB_PREFIX . "faq`.`question` AS `faqQuestion` \n\t\t  FROM `" . DB_PREFIX . "faq`\n\t      LEFT JOIN `" . DB_PREFIX . "faqassign`\n\t\t  ON `" . DB_PREFIX . "faq`.`id`            = `" . DB_PREFIX . "faqassign`.`question`\n          WHERE `enFaq`                         = 'yes'\n\t\t  " . ($id > 0 ? 'AND `' . DB_PREFIX . 'faqassign`.`itemID` = \'' . $id . '\'' : '') . "\n\t\t  AND `" . DB_PREFIX . "faqassign`.`desc`   = 'category'\n\t\t  " . $queryAdd . "\n\t\t  ORDER BY " . ($orderOverride ? $orderOverride : '`orderBy`') . "\n\t\t  LIMIT {$limit}," . $s->quePerPage) or die(mswMysqlErrMsg(mysql_errno(), mysql_error(), __LINE__, __FILE__));
     }
     while ($LINKS = mysql_fetch_object($q)) {
         $data .= str_replace(array('{article}', '{url_params}', '{question}', '{count}'), array($LINKS->faqID, mswQueryParams(array('a', 'p')), mswCleanData($LINKS->faqQuestion), number_format($LINKS->kviews)), file_get_contents(PATH . 'content/' . MS_TEMPLATE_SET . '/html/faq-question-link.htm'));
     }
     return $data ? trim($data) : str_replace('{text}', $msg_pkbase8, file_get_contents(PATH . 'content/' . MS_TEMPLATE_SET . '/html/nothing-found.htm'));
 }
Beispiel #2
0
}
?>
        </tbody>
       </table>
	  </div>
	  <div class="btn-toolbar" style="margin-top:0;padding-top:0">
       <button class="btn btn-link" type="button" onclick="ms_windowLoc('?p=accountman')"><i class="icon-remove"></i> <?php 
echo mswCleanData($msg_levels11);
?>
</button>
      </div>
	  <?php 
if ($countedRows > 0 && $countedRows > $limit) {
    ?>
	  <div class="pagination pagination-small pagination-right">
	   <?php 
    define('PER_PAGE', $limit);
    $PGS = new pagination($countedRows, '?p=' . $cmd . mswQueryParams(array('p', 'next')) . '&amp;next=');
    echo $PGS->display();
    ?>
      </div>
	  <?php 
}
// Footer links..
include PATH . 'templates/footer-links.php';
?>
    </div>
  
  </div>

</div>
Beispiel #3
0
</li>
  </ul>
  
  <?php 
// Added..
if (isset($OK1)) {
    echo mswActionCompleted($msg_response7);
}
// Updated..
if (isset($OK2)) {
    echo mswActionCompleted($msg_response8);
}
?>

  <form method="post" action="index.php?p=<?php 
echo $_GET['p'] . mswQueryParams(array('p', 'next'));
?>
" onsubmit="return ms_fieldCheck('title','tabArea')">
  <div class="container-fluid" style="margin-top:20px">
    
	<div class="row-fluid">
	  <ul class="nav nav-tabs" id="tabArea">
       <li class="active"><a href="#one" data-toggle="tab" onclick="jQuery('#prev').show();return false;"><i class="icon-file-text-alt"></i> <?php 
echo $msg_response19;
?>
</a></li>
       <li><a href="#two" data-toggle="tab" onclick="jQuery('#prev').hide();return false"><i class="icon-random"></i> <?php 
echo $msg_response20;
?>
</a></li>
      </ul>
     <ul class="dropdown-menu topbar-dropdowns">
      <li><a href="?p=<?php 
echo $pageParam . mswQueryParams(array('p', 'dept', 'next'));
?>
"><?php 
echo $this->IS_DISPUTED == 'yes' ? $this->TXT[13] : $this->TXT[12];
?>
</a></li>
	  <?php 
foreach ($this->DD_DEPT as $fk3 => $fv3) {
    ?>
      <li><a href="?p=<?php 
    echo $pageParam;
    ?>
&amp;dept=<?php 
    echo $fk3 . mswQueryParams(array('p', 'dept', 'next'));
    ?>
"><?php 
    echo $fv3;
    ?>
</a></li>
	  <?php 
}
?>
     </ul>
    </div>
	<button class="btn search-bar-button" type="button" onclick="mswToggleSearch()"><i class="icon-search" id="search-icon-button"></i></button>
	<h1 class="page-title"><?php 
echo $this->TXT[2];
?>
</h1>
Beispiel #5
0
      <?php 
$_GET['p'] = isset($_GET['p']) ? $_GET['p'] : 'x';
//=============================
// LIMIT OPTIONS
//=============================
$links = array();
foreach (array(10, 20, 30, 40, 50, 75, 100, 150, 200, 250, 300, 500) as $k) {
    $links[] = array('link' => '?p=' . $_GET['p'] . '&amp;limit=' . $k . mswQueryParams(array('p', 'limit', 'next')), 'name' => $k . ' ' . $msg_script50);
}
echo $MSBOOTSTRAP->button($msg_script51, $links);
Beispiel #6
0
      <?php 
$_GET['p'] = isset($_GET['p']) ? $_GET['p'] : 'x';
if (!defined('PARENT') || !in_array($_GET['p'], array('open', 'close', 'disputes', 'cdisputes', 'search', 'assign', 'acchistory', 'spam', 'submit'))) {
    exit;
}
//=============================
// ORDER BY OPTIONS
//=============================
$links = array(array('link' => '?p=' . $_GET['p'] . mswUrlApp('dept') . mswQueryParams(array('p', 'dept', 'priority', 'status')), 'name' => $msg_open3));
foreach ($ticketLevelSel as $k => $v) {
    $links[] = array('link' => '?p=' . $_GET['p'] . '&amp;priority=' . $k . mswUrlApp('dept') . mswQueryParams(array('p', 'dept', 'priority', 'status')), 'name' => $v);
}
//=============================
// SHOW STATUS OPTIONS
//=============================
if (in_array($_GET['p'], array('open', 'search', 'acchistory'))) {
    $links[] = array('link' => '?p=' . $_GET['p'] . '&amp;status=visitor' . mswQueryParams(array('p', 'status')), 'name' => $msg_open12);
    $links[] = array('link' => '?p=' . $_GET['p'] . '&amp;status=admin' . mswQueryParams(array('p', 'status')), 'name' => $msg_open11);
    $links[] = array('link' => '?p=' . $_GET['p'] . '&amp;status=start' . mswQueryParams(array('p', 'status')), 'name' => $msg_open27);
}
echo $MSBOOTSTRAP->button($msg_search20, $links);
Beispiel #7
0
      <?php 
$_GET['p'] = isset($_GET['p']) ? $_GET['p'] : 'x';
if (!defined('PARENT') || !in_array($_GET['p'], array('open', 'close', 'disputes', 'cdisputes', 'search', 'assign', 'acchistory', 'spam', 'submit'))) {
    exit;
}
//=============================
// ORDER BY OPTIONS
//=============================
$links = array();
foreach ($msg_script44 as $k => $v) {
    $links[] = array('link' => '?p=' . $_GET['p'] . '&amp;orderby=' . $k . mswUrlApp('dept') . mswQueryParams(array('p', 'orderby', 'dept')), 'name' => $v);
}
echo $MSBOOTSTRAP->button($msg_script45, $links);
Beispiel #8
0
        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')) . '&amp;next=');
    $pageNumbers = $PTION->display();
}
// Header..
include PATH . 'control/header.php';
// Template initialisation..
$tpl = new Savant3();
$tpl->assign('TXT', array($msg_pkbase, $msg_header4, $msg_kbase53));
$tpl->assign('SCH_TXT', $msg_header4);
$tpl->assign('FAQ', $html);
$tpl->assign('RESULTS', $dataCount);
$tpl->assign('MSDT', $MSDT);
$tpl->assign('PAGES', $pageNumbers);
// Global vars..
include PATH . 'control/lib/global.php';
// Global vars..
Beispiel #9
0
$pageNumbers = '';
$title = $CAT->name . ' - ' . $msg_adheader17;
$dataCount = mswRowCount('faqassign LEFT JOIN `' . DB_PREFIX . 'faq` ON `' . DB_PREFIX . 'faq`.`id` = `' . DB_PREFIX . 'faqassign`.`question` 
	             WHERE `itemID` = \'' . (int) $_GET['c'] . '\' AND `desc` = \'category\' AND `' . DB_PREFIX . 'faq`.`enFaq` = \'yes\'');
// Check if sub category..
if ($CAT->subcat > 0) {
    $SUB = mswGetTableData('categories', 'id', $CAT->subcat);
    if (isset($SUB->name)) {
        define('IS_SUB', $CAT->subcat);
        $title = mswCleanData($CAT->name) . ' (' . mswCleanData($SUB->name) . ') - ' . $msg_adheader17;
    }
}
// Pagination..
if ($dataCount > $SETTINGS->quePerPage) {
    define('PER_PAGE', $SETTINGS->quePerPage);
    $PTION = new pagination($dataCount, '?c=' . (int) $_GET['c'] . mswQueryParams(array('c', 'p', 'next')) . '&amp;next=');
    $pageNumbers = $PTION->display();
}
// Header..
include PATH . 'control/header.php';
// Template initialisation..
$tpl = new Savant3();
$tpl->assign('TXT', array($msg_header8, $msg_header4));
$tpl->assign('SCH_TXT', $msg_header4);
$tpl->assign('FAQ', $FAQ->questions($CAT->id, $limitvalue, $SETTINGS));
$tpl->assign('PARENT', (array) $CAT);
$tpl->assign('MSDT', $MSDT);
$tpl->assign('CHILD', isset($SUB->id) ? (array) $SUB : array());
$tpl->assign('PAGES', $pageNumbers);
// Global vars..
include PATH . 'control/lib/global.php';
    $HEADERS->err403();
}
define('HISTORY_VIEW', 1);
// Check log in..
if (MS_PERMISSIONS == 'guest' || !isset($LI_ACC->id)) {
    header("Location:index.php?p=login");
    exit;
}
// Variables..
$pageNumbers = '';
$title = isset($_GET['qt']) ? $msg_portal17 : $msg_header11;
$dataCount = $MSTICKET->ticketList(MS_PERMISSIONS, array($limitvalue, $limit), true);
// Pagination..
if ($dataCount > $limit) {
    define('PER_PAGE', $limit);
    $PTION = new pagination($dataCount, '?p=' . $_GET['p'] . mswQueryParams(array('p', 'next')) . '&amp;next=');
    $pageNumbers = $PTION->display();
}
include PATH . 'control/header.php';
// Filters..
include PATH . 'control/system/accounts/account-history-filters.php';
// Show..
$tpl = new Savant3();
$tpl->assign('TXT', array($msg_header11, $msg_header3, str_replace('{count}', $dataCount, $msg_public_history), $msg_header4, $msg_viewticket25, $msg_open36, $msg_open37, $msg_public_history2, $msg_public_history3, $msg_script45, $msg_search20, $msg_viewticket107, $msg_response6, $msg_public_history13));
$tpl->assign('TICKETS', $MSTICKET->ticketList(MS_PERMISSIONS, array($limitvalue, $limit)));
$tpl->assign('PAGES', $pageNumbers);
$tpl->assign('IS_DISPUTED', 'no');
$tpl->assign('DD_ORDER', $orderBy);
$tpl->assign('DD_FILTERS', $filterBy);
$tpl->assign('DD_DEPT', $deptFilter);
// Global vars..
Beispiel #11
0
        <?php 
$_GET['p'] = isset($_GET['p']) ? $_GET['p'] : 'x';
if (!defined('PARENT') || !in_array($_GET['p'], array('open', 'close', 'disputes', 'cdisputes', 'search', 'assign', 'acchistory', 'spam', 'submit'))) {
    exit;
}
//===========================================
// DEPARTMENT FILTERS..
//===========================================
$links = array();
$links[] = array('link' => '?p=' . $_GET['p'] . mswQueryParams(array('p', 'dept', 'next')), 'name' => $msg_open2);
$q_dept = mysql_query("SELECT * FROM `" . DB_PREFIX . "departments` " . mswSQLDepartmentFilter($mswDeptFilterAccess, 'WHERE') . " ORDER BY `name`") or die(mswMysqlErrMsg(mysql_errno(), mysql_error(), __LINE__, __FILE__));
while ($DEPT = mysql_fetch_object($q_dept)) {
    $links[] = array('link' => '?p=' . $_GET['p'] . '&amp;dept=' . $DEPT->id . mswQueryParams(array('p', 'dept', 'next')), 'name' => mswCleanData($DEPT->name));
}
//=========================================================
// FOR ADMINISTRATOR, SHOW ALL ASSIGNED USERS IN FILTER
//=========================================================
if (!defined('HIDE_ASSIGN_FILTERS') && $MSTEAM->id == '1') {
    $q_users = mysql_query("SELECT * FROM `" . DB_PREFIX . "users` ORDER BY `name`") or die(mswMysqlErrMsg(mysql_errno(), mysql_error(), __LINE__, __FILE__));
    while ($U = mysql_fetch_object($q_users)) {
        $links[] = array('link' => '?p=' . $_GET['p'] . '&amp;dept=u' . $U->id . mswQueryParams(array('p', 'dept', 'next')), 'name' => $msg_open31 . ' ' . mswSpecialChars($U->name));
    }
}
echo $MSBOOTSTRAP->button($msg_viewticket107, $links);