function doList($search_text) { // just get count if ($search_text) { $sql = "SELECT * FROM Locations WHERE location LIKE '%{$search_text}%' ORDER BY id DESC"; } else { $sql = "SELECT * FROM Locations ORDER BY id DESC"; } $result = mysql_query($sql); $n = mysql_num_rows($result); $navigate = pageBrowser($n, 8, 25, "{$string}", $_GET[nb], $_GET[b], $_GET[m]); $result = mysql_query($sql); $page = $_GET[m]; $page--; $counter = $page * 25 + 1; include 'tblheader.php'; while ($row = mysql_fetch_object($result)) { include 'tblcontent.php'; $counter++; } include 'tblfooter.php'; }
/*else if($cmbSearchType == "paid"){ $txtSearch = strtoupper(substr($txtSearch,0,1)); if($txtSearch =="Y"){ $qryopt .= " AND ar.affiliate_payment_id IS NOT NULL "; }else if($txtSearch =="N"){ $qryopt .= " AND ar.affiliate_payment_id IS NULL "; } }*/ } $sql = " SELECT ar.*,a.affiliate_name FROM " . $tableprefix . "affiliate_registrations ar INNER JOIN " . $tableprefix . "affiliates a ON a.affiliate_id = ar.affiliate_id\n\t WHERE ar.affiliate_id='" . addslashes($aid) . "' AND ar.affiliate_payment_id IS NULL " . $qryopt . "\n\t\torder by ar.registration_date DESC "; //echo $sql; $sess_back = $_SERVER["PHP_SELF"] . "?begin=" . $begin . "&num=" . $num . "&numBegin=" . $numBegin . "&cmbSearchType=" . $cmbSearchType . "&txtSearch=" . $txtSearch; $_SESSION["gbackurl"] = $sess_back; $totalrows = mysql_num_rows(mysql_query($sql)); $navigate = pageBrowser($totalrows, 10, 10, "&cmbSearchType={$cmbSearchType}&txtSearch={$txtSearch}", $_GET[numBegin], $_GET[start], $_GET[begin], $_GET[num]); $sql = $sql . $navigate[0]; $rs = mysql_query($sql); include "../includes/htmltop.php"; ?> <script language="JavaScript" type="text/JavaScript"> function clickSearch() { document.frmFeedbacks.submit(); } function changeStatus(id){ var frm = document.frmFeedbacks; if(Confirm("Are you sure you want to change the status of this record?")){ document.frmFeedbacks.submit(); } }
if ($totalrows <= $var_calc_begin) { $var_nor = 10; $var_nol = 10; if ($var_num > $var_numBegin) { $var_num = $var_num - 1; $var_numBegin = $var_numBegin; $var_begin = $var_begin - $var_nor; } elseif ($var_num == $var_numBegin) { $var_num = $var_num - 1; $var_numBegin = $var_numBegin - $var_nol; $var_begin = $var_calc_begin - $var_nor; $var_start = ""; } } //echo("$totalrows,2,2,\"&ddlSearchType=$var_cmbSearch&txtSearch=" . urlencode($var_search) . "&id=$var_batchid&\",$var_numBegin,$var_start,$var_begin,$var_num"); $navigate = pageBrowser($totalrows, 10, 10, "&mt=y&cmbStaff={$var_cmbStaff}&cmbSearch={$var_cmbSearch}&txtSearch=" . urlencode($var_search) . "&stylename=STYLEPREFERANCES&styleminus=minus9&styleplus=plus9&", $var_numBegin, $var_start, $var_begin, $var_num); //execute the new query with the appended SQL bit returned by the function $sql = $sql . $navigate[0]; //echo "sql==$sql"; //echo $sql; //echo "<br>".time(); //$rs = mysql_query($sql,$conn); $rs = executeSelect($sql, $conn); $cnt = 1; while ($row = mysql_fetch_array($rs)) { ?> <tr align="left" class="whitebasic"> <td width="25%"><?php echo htmlentities($row["vAction"]); ?>
} $sql = " SELECT f.*, u.user_name,u.first_name,u.last_name FROM " . $tableprefix . "artist_feedbacks f\n\tINNER JOIN " . $tableprefix . "users u ON f.user_id = u.user_id\n\tWHERE f.artist_id = '" . addslashes($artistid) . "' AND f.published='Y' order by date_added DESC "; $sess_back = $_SERVER["PHP_SELF"] . "?begin=" . $begin . "&num=" . $num . "&numBegin=" . $numBegin . "&cmbSearchType=" . $cmbSearchType . "&txtSearch=" . $txtSearch; $_SESSION["gbackurl"] = $sess_back; $totalrows = mysql_num_rows(mysql_query($sql)); $limit = getPaginationLimit(); if ($limit == 0) { $limit = 10; } $page = isset($_GET['page']) ? trim($_GET['page']) : 1; if (empty($page)) { $page = 1; } $sql_qr = dopaging($sql, '', $limit); $rs = mysql_query($sql_qr); $navigate = pageBrowser($totalrows, 10, 10, "&artistid=" . addslashes($artistid) . "&productid=" . addslashes($productid) . "&cmbSearchType={$cmbSearchType}&txtSearch={$txtSearch}", $_GET[numBegin], $_GET[start], $_GET[begin], $_GET[num]); $sql = $sql . $navigate[0]; //$rs = mysql_query($sql); /*display the active template*/ $active_template = displayTemplate(); include "includes/htmltop.php"; /* Top File Name */ include_once "includes/" . $active_template[0]; ?> <script language="JavaScript" type="text/JavaScript"> function clickSearch() { document.frmFeedbacks.submit(); } </script>
$var_nol = 10; if ($var_num > $var_numBegin) { $var_num = $var_num - 1; $var_numBegin = $var_numBegin; $var_begin = $var_begin - $var_nor; } elseif ($var_num == $var_numBegin) { $var_num = $var_num - 1; $var_numBegin = $var_numBegin - $var_nol; $var_begin = $var_calc_begin - $var_nor; $var_start = ""; } } if ($var_begin < 0) { $var_begin = 0; } $navigate = pageBrowser($totalrows, 10, $maxPageLimit, "&txtKbTitleSearch=" . urlencode($txtSearchVal) . "&", $var_numBegin, $var_start, $var_begin, $var_num); //execute the new query with the appended SQL bit returned by the function $sql = $sql . $navigate[0]; $rs = executeSelect($sql, $conn); //Pagination if (mysql_num_rows($rs) > 0) { ?> <table cellpadding="5" cellspacing="1" border="0" class="" style="background-color:#cfcfcf;" width="100%"> <?php while ($row = mysql_fetch_array($rs)) { $viewkbentry_seo_link = SITE_URL . "viewuserkbsearchresult/" . str_replace(" ", "_", str_replace("?", "", stripslashes($row['vKBTitle']))) . "/" . $row["nKBID"] . "/KNOWLEDGEBASE/threeminus/threeplus"; ?> <tr> <td align="left" style="background-color:#ffffff;"> <a href="<?php echo $viewkbentry_seo_link;
if ($totalrows <= $var_calc_begin) { $var_nor = $var_maxposts; $var_nol = 10; if ($var_num > $var_numBegin) { $var_num = $var_num - 1; $var_numBegin = $var_numBegin; $var_begin = $var_begin - $var_nor; } elseif ($var_num == $var_numBegin) { $var_num = $var_num - 1; $var_numBegin = $var_numBegin - $var_nol; $var_begin = $var_calc_begin - $var_nor; $var_start = ""; } } //echo("$totalrows,2,2,\"&ddlSearchType=$var_cmbSearch&txtSearch=" . urlencode($var_search) . "&id=$var_batchid&\",$var_numBegin,$var_start,$var_begin,$var_num"); $navigate = pageBrowser($totalrows, 10, $var_maxposts, "&mt=y&tp={$var_type}&cmbDepartment={$var_deptid}&stylename={$var_stylename}&styleminus={$var_styleminus}&styleplus={$var_styleplus}&", $var_numBegin, $var_start, $var_begin, $var_num); //execute the new query with the appended SQL bit returned by the function $sql = $sql . $navigate[0]; //echo "sql==$sql"; //echo $sql; //echo "<br>".time(); //$rs = mysql_query($sql,$conn); $cntr = 1; $rs = executeSelect($sql, $conn); while ($row = mysql_fetch_array($rs)) { ?> <tr align="left" class="whitebasic" > <td width="194"> <input type="checkbox" name="chkDeleteTickets[]" id="chkDeleteTickets<?php echo $cntr;
if ($totalrows <= $var_calc_begin) { $var_nor = 10; $var_nol = 10; if ($var_num > $var_numBegin) { $var_num = $var_num - 1; $var_numBegin = $var_numBegin; $var_begin = $var_begin - $var_nor; } elseif ($var_num == $var_numBegin) { $var_num = $var_num - 1; $var_numBegin = $var_numBegin - $var_nol; $var_begin = $var_calc_begin - $var_nor; $var_start = ""; } } //echo("$totalrows,2,2,\"&ddlSearchType=$var_cmbSearch&txtSearch=" . urlencode($var_search) . "&id=$var_batchid&\",$var_numBegin,$var_start,$var_begin,$var_num"); $navigate = pageBrowser($totalrows, 10, $maxPageLimit, "&mt=y&deptid={$var_deptpid}&tckttitle=" . urlencode($var_title) . "&stylename=POSTTICKETS&styleminus=twominus&styleplus=twoplus&", $var_numBegin, $var_start, $var_begin, $var_num); //execute the new query with the appended SQL bit returned by the function $sql = $sql . $navigate[0]; //echo $sql; //echo "<br>".time(); //$rs = mysql_query($sql,$conn); $rs = executeSelect($sql, $conn); $cnt = 1; while ($row = mysql_fetch_array($rs)) { ?> <tr align="left" class="listingmainboldtext"> <td colspan=2> <b><?php
$var_numBegin = $var_numBegin; $var_begin = $var_begin - $var_nor; } elseif ($var_num == $var_numBegin) { $var_num = $var_num - 1; $var_numBegin = $var_numBegin - $var_nol; $var_begin = $var_calc_begin - $var_nor; $var_start = ""; } } $_SESSION['next_sql'] = $sql; //echo("$totalrows,2,2,\"&ddlSearchType=$var_cmbSearch&txtSearch=" . urlencode($var_search) . "&id=$var_batchid&\",$var_numBegin,$var_start,$var_begin,$var_num"); /* Modified on 280709 $navigate = pageBrowser($totalrows,10,$var_maxposts,"&val=$var_orderby&sorttype=$var_sorttype&pagenum=yes&mt=y&cmp=$var_company&dpt=". urlencode($var_department) . "&st=" . urlencode($var_status) . "&own=" . urlencode($var_owner) . "&usr="******"&tkt=" . urlencode($var_ticketno) . "&ttl=" . urlencode($var_title) . "&eml=" . urlencode($var_email) . "<l=" . urlencode($var_label) . "&qst=" . urlencode($var_question) . "&frm=" . urlencode($var_from) . "&to=" . urlencode($var_to) . "&cop=$var_compop&dop=$var_deptop&dlp=$var_deptlp&sop=$var_statusop&slp=$var_statuslp&oop=$var_ownerop&olp=$var_ownerlp&qop=$var_qstop&qlp=$var_qstlp&uop=$var_userop&ulp=$var_userlp&tkop=$var_tktop&tklp=$var_tktlp&top=$var_titleop&tlp=$var_titlelp&eop=$var_emailop&elp=$var_emaillp&",$var_numBegin,$var_start,$var_begin,$var_num); $var_back="./advancedresult.php?mt=y&cmp=$var_company&dpt=". urlencode($var_department) . "&st=" . urlencode($var_status) . "&own=" . urlencode($var_owner) . "&usr="******"&tkt=" . urlencode($var_ticketno) . "&ttl=" . urlencode($var_title) . "&eml=" . urlencode($var_email) . "<l=" . urlencode($var_label) . "&qst=" . urlencode($var_question) . "&frm=" . urlencode($var_from) . "&to=" . urlencode($var_to) . "&cop=$var_compop&dop=$var_deptop&dlp=$var_deptlp&sop=$var_statusop&slp=$var_statuslp&oop=$var_ownerop&olp=$var_ownerlp&qop=$var_qstop&qlp=$var_qstlp&uop=$var_userop&ulp=$var_userlp&tkop=$var_tktop&tklp=$var_tktlp&top=$var_titleop&tlp=$var_titlelp&eop=$var_emailop&elp=$var_emaillp&lop=$var_labelop&llp=$var_labellp&begin=$var_begin&num=$var_num&numBegin=$var_numBegin&start=$var_start&"; */ $navigate = pageBrowser($totalrows, 10, $var_maxposts, "&val={$var_orderby}&sorttype={$var_sorttype}&pagenum=yes&txtinteligentsearch={$txtinteligentsearch}&mt=y&cmp={$var_company}&dpt=" . urlencode($var_department) . "&st=" . urlencode($var_status) . "&own=" . urlencode($var_owner) . "&usr="******"&tkt=" . urlencode($var_ticketno) . "&ttl=" . urlencode($var_title) . "&eml=" . urlencode($var_email) . "<l=" . urlencode($var_label) . "&qst=" . urlencode($var_question) . "&frm=" . urlencode($var_from) . "&to=" . urlencode($var_to) . "&cop={$var_compop}&dop={$var_deptop}&dlp={$var_deptlp}&sop={$var_statusop}&slp={$var_statuslp}&oop={$var_ownerop}&olp={$var_ownerlp}&qop={$var_qstop}&qlp={$var_qstlp}&uop={$var_userop}&ulp={$var_userlp}&tkop={$var_tktop}&tklp={$var_tktlp}&top={$var_titleop}&tlp={$var_titlelp}&eop={$var_emailop}&elp={$var_emaillp}&", $var_numBegin, $var_start, $var_begin, $var_num); $var_back = "./advancedresult.php?mt=y&cmp={$var_company}&dpt=" . urlencode($var_department) . "&st=" . urlencode($var_status) . "&own=" . urlencode($var_owner) . "&usr="******"&tkt=" . urlencode($var_ticketno) . "&ttl=" . urlencode($var_title) . "&eml=" . urlencode($var_email) . "<l=" . urlencode($var_label) . "&qst=" . urlencode($var_question) . "&frm=" . urlencode($var_from) . "&to=" . urlencode($var_to) . "&cop={$var_compop}&dop={$var_deptop}&dlp={$var_deptlp}&sop={$var_statusop}&slp={$var_statuslp}&oop={$var_ownerop}&olp={$var_ownerlp}&qop={$var_qstop}&qlp={$var_qstlp}&uop={$var_userop}&ulp={$var_userlp}&tkop={$var_tktop}&tklp={$var_tktlp}&top={$var_titleop}&tlp={$var_titlelp}&eop={$var_emailop}&elp={$var_emaillp}&lop={$var_labelop}&llp={$var_labellp}&begin={$var_begin}&num={$var_num}&numBegin={$var_numBegin}&start={$var_start}&"; //echo $var_back; $_SESSION["sess_ticketbackurl"] = $var_back; //execute the new query with the appended SQL bit returned by the function $sql = $sql . $navigate[0]; //echo "sql==$sql"; //$rs = mysql_query($sql,$conn); $var_time = time(); $cntr = 1; $count = 0; $rs = executeSelect($sql, $conn); // it is for next and previous ticket $startvalue = 0; if ($begin == "" and $numBegin == "") { $startvalue = 0;
if ($var_num > $var_numBegin) { $var_num = $var_num - 1; $var_numBegin = $var_numBegin; $var_begin = $var_begin - $var_nor; } elseif ($var_num == $var_numBegin) { $var_num = $var_num - 1; $var_numBegin = $var_numBegin - $var_nol; $var_begin = $var_calc_begin - $var_nor; $var_start = ""; } } if ($var_begin < 0) { $var_begin = 0; } //echo("$totalrows,2,2,\"&ddlSearchType=$var_cmbSearch&txtSearch=" . urlencode($var_search) . "&id=$var_batchid&\",$var_numBegin,$var_start,$var_begin,$var_num"); $navigate = pageBrowser($totalrows, 10, 10, "&val={$sort_field}&sorttype={$sort_type}&mt=y&tp={$var_type}&cmbDepartment={$var_deptid}&stylename={$var_stylename}&styleminus={$var_styleminus}&styleplus={$var_styleplus}&cmbSearch=" . urlencode($var_cmbsearch) . "&txtSearch=" . urlencode($var_txtsearch) . "&", $var_numBegin, $var_start, $var_begin, $var_num); //execute the new query with the appended SQL bit returned by the function $sql = $sql . $navigate[0]; //echo "sql==$sql"; //echo $sql; //echo "<br>".time(); //$rs = mysql_query($sql,$conn); $rs = executeSelect($sql, $conn); ?> <table width="100%" border="0" cellpadding="0" cellspacing="0" class="list_tbl"> <tr align="left" > <th width="16%"> <?php echo "<a href='?val=vRefNo&sorttype=" . $var_sorttype . "&tp=" . $var_type . "&numBegin={$var_numBegin}&start={$var_begin}&begin={$var_begin}&num={$var_num}&mt=y&stylename={$var_stylename}&styleminus={$var_styleminus}&styleplus={$var_styleplus}' >" . TEXT_REFNO . "</a> " . $r_img_path; ?>
if ($totalrows <= $var_calc_begin) { $var_nor = 10; $var_nol = 10; if ($var_num > $var_numBegin) { $var_num = $var_num - 1; $var_numBegin = $var_numBegin; $var_begin = $var_begin - $var_nor; } elseif ($var_num == $var_numBegin) { $var_num = $var_num - 1; $var_numBegin = $var_numBegin - $var_nol; $var_begin = $var_calc_begin - $var_nor; $var_start = ""; } } //echo("$totalrows,2,2,\"&ddlSearchType=$var_cmbSearch&txtSearch=" . urlencode($var_search) . "&id=$var_batchid&\",$var_numBegin,$var_start,$var_begin,$var_num"); $navigate = pageBrowser($totalrows, 10, 10, "&mt={$var_mt}&cmbSearch={$var_cmbSearch}&txtSearch=" . urlencode($var_search) . "&stylename=STYLEREMINDERS&styleminus=minus14&styleplus=plus14&", $var_numBegin, $var_start, $var_begin, $var_num); //execute the new query with the appended SQL bit returned by the function $sql = $sql . $navigate[0]; //echo "sql==$sql"; //echo $sql; //echo "<br>".time(); //$rs = mysql_query($sql,$conn); $rs = executeSelect($sql, $conn); $cnt = 1; while ($row = mysql_fetch_array($rs)) { ?> <tr align="left" class="whitebasic"> <td width="4%" align="center"><input type="checkbox" name="chk[]" id="c<?php echo $cnt; ?>
if ($totalrows <= $var_calc_begin) { $var_nor = 10; $var_nol = 10; if ($var_num > $var_numBegin) { $var_num = $var_num - 1; $var_numBegin = $var_numBegin; $var_begin = $var_begin - $var_nor; } elseif ($var_num == $var_numBegin) { $var_num = $var_num - 1; $var_numBegin = $var_numBegin - $var_nol; $var_begin = $var_calc_begin - $var_nor; $var_start = ""; } } //echo("$totalrows,2,2,\"&ddlSearchType=$var_cmbSearch&txtSearch=" . urlencode($var_search) . "&id=$var_batchid&\",$var_numBegin,$var_start,$var_begin,$var_num"); $navigate = pageBrowser($totalrows, 10, 10, "&mt=y&rf=" . urlencode($var_refno) . "&ttl=" . urlencode($var_title) . "&st=" . urlencode($var_status) . "&pr=" . urlencode($var_priority) . "&frm=" . urlencode($var_from) . "&to=" . urlencode($var_to) . "&stylename={$var_stylename}&styleminus={$var_styleminus}&styleplus={$var_styleplus}&", $var_numBegin, $var_start, $var_begin, $var_num); //execute the new query with the appended SQL bit returned by the function $sql = $sql . $navigate[0]; //echo "sql==$sql"; //echo $sql; //echo "<br>".time(); //$rs = mysql_query($sql,$conn); $rs = executeSelect($sql, $conn); while ($row = mysql_fetch_array($rs)) { ?> <tr align="left" class="whitebasic"> <td> <?php echo "<a href=\"viewticket.php?mt=y&tk=" . $row["nTicketId"] . "&us=" . $row["nUserId"] . "&stylename=" . $var_stylename . "&styleminus=" . $var_styleminus . "&styleplus=" . $var_styleplus . "&\" class=\"listing\">" . $row["vRefNo"] . "</a>"; ?> </td>
$var_calc_begin = $var_begin == 0 ? $var_start : $var_begin; if ($totalrows <= $var_calc_begin) { $var_nor = 10; $var_nol = 10; if ($var_num > $var_numBegin) { $var_num = $var_num - 1; $var_numBegin = $var_numBegin; $var_begin = $var_begin - $var_nor; } elseif ($var_num == $var_numBegin) { $var_num = $var_num - 1; $var_numBegin = $var_numBegin - $var_nol; $var_begin = $var_calc_begin - $var_nor; $var_start = ""; } } $navigate = pageBrowser($totalrows, 10, 10, "&mt=y&cmbSearch={$cmbSearch}&ddlCategory=" . urlencode($ddlCategory) . "&ddlDepartment=" . urlencode($ddlDepartment) . "&txtSearch=" . urlencode($txtSearch) . "&stylename=KNOWLEDGEBASE&styleminus=threeminus&styleplus=threeplus&", $var_numBegin, $var_start, $var_begin, $var_num); $sql = $sql . $navigate[0]; //echo "<br>".$sql; $rs = executeSelect($sql, $conn); $_SESSION['sess_backurl'] = "knowledgebase.php?mt=y&cmbSearch={$cmbSearch}&ddlCategory=" . urlencode($ddlCategory) . "&ddlDepartment=" . urlencode($ddlDepartment) . "&txtSearch=" . urlencode($txtSearch) . "&stylename=KNOWLEDGEBASE&styleminus=threeminus&styleplus=threeplus&numBegin=" . $var_numBegin . "&start=" . $var_start . "&begin=" . $var_begin . "&num=" . $var_num; $cnt = $var_begin + 1; while ($row = mysql_fetch_array($rs)) { ?> <tr align="left" class="whitebasic"> <td colspan="3"><?php echo $cnt . " "; ?> <!--<a href='viewkbentry.php?id=<?php echo $row["nKBID"]; ?>
$var_nor = $var_maxposts; $var_nol = 10; if ($var_num > $var_numBegin) { $var_num = $var_num - 1; $var_numBegin = $var_numBegin; $var_begin = $var_begin - $var_nor; } elseif ($var_num == $var_numBegin) { $var_num = $var_num - 1; $var_numBegin = $var_numBegin - $var_nol; $var_begin = $var_calc_begin - $var_nor; $var_start = ""; } } $_SESSION['next_sql'] = $sql; //echo("$totalrows,2,2,\"&ddlSearchType=$var_cmbSearch&txtSearch=" . urlencode($var_search) . "&id=$var_batchid&\",$var_numBegin,$var_start,$var_begin,$var_num"); $navigate = pageBrowser($totalrows, 10, $var_maxposts, "&id={$var_id}&label={$var_label_name}&val={$var_orderby}&sorttype={$var_sorttype}&pagenum=yes&mt=y&tp={$var_type}&cmbDepartment={$var_deptid}&stylename={$var_stylename}&styleminus={$var_styleminus}&styleplus={$var_styleplus}&", $var_numBegin, $var_start, $var_begin, $var_num); //execute the new query with the appended SQL bit returned by the function $sql = $sql . $navigate[0]; //echo "sql==$sql"; //echo $sql; //echo "<br>".time(); //$rs = mysql_query($sql,$conn); $cntr = 1; $count = 0; $rs = executeSelect($sql, $conn); // it is for next and previous ticket $startvalue = 0; if ($begin == "" and $numBegin == "") { $startvalue = 0; } else { if ($begin == "") {
$var_nor = $var_maxposts; $var_nol = 10; if ($var_num > $var_numBegin) { $var_num = $var_num - 1; $var_numBegin = $var_numBegin; $var_begin = $var_begin - $var_nor; } elseif ($var_num == $var_numBegin) { $var_num = $var_num - 1; $var_numBegin = $var_numBegin - $var_nol; $var_begin = $var_calc_begin - $var_nor; $var_start = ""; } } $_SESSION['next_sql'] = $sql; //echo("$totalrows,2,2,\"&ddlSearchType=$var_cmbSearch&txtSearch=" . urlencode($var_search) . "&id=$var_batchid&\",$var_numBegin,$var_start,$var_begin,$var_num"); $navigate = pageBrowser($totalrows, 10, $var_maxposts, "&val={$var_orderby}&sorttype={$var_sorttype}&pagenum=yes&txtinteligentsearch={$txtinteligentsearch}&mt=y&cmp={$var_company}&dpt=" . urlencode($var_department) . "&st=" . urlencode($var_status) . "&own=" . urlencode($var_owner) . "&usr="******"&tkt=" . urlencode($var_ticketno) . "&ttl=" . urlencode($var_title) . "&eml=" . urlencode($var_email) . "<l=" . urlencode($var_label) . "&qst=" . urlencode($var_question) . "&frm=" . urlencode($var_from) . "&to=" . urlencode($var_to) . "&" . $get_query_string, $var_numBegin, $var_start, $var_begin, $var_num); $var_back = "./advancedresult.php?mt=y&cmp={$var_company}&dpt=" . urlencode($var_department) . "&st=" . urlencode($var_status) . "&own=" . urlencode($var_owner) . "&usr="******"&tkt=" . urlencode($var_ticketno) . "&ttl=" . urlencode($var_title) . "&eml=" . urlencode($var_email) . "<l=" . urlencode($var_label) . "&qst=" . urlencode($var_question) . "&frm=" . urlencode($var_from) . "&to=" . urlencode($var_to) . "&cop={$var_compop}&dop={$var_deptop}&dlp={$var_deptlp}&sop={$var_statusop}&slp={$var_statuslp}&oop={$var_ownerop}&olp={$var_ownerlp}&qop={$var_qstop}&qlp={$var_qstlp}&uop={$var_userop}&ulp={$var_userlp}&tkop={$var_tktop}&tklp={$var_tktlp}&top={$var_titleop}&tlp={$var_titlelp}&begin={$var_begin}&num={$var_num}&numBegin={$var_numBegin}&start={$var_start}&"; $_SESSION["sess_abackreplyurl"] = ""; $_SESSION["sess_ticketbackurl"] = $var_back; //execute the new query with the appended SQL bit returned by the function $sql = $sql . $navigate[0]; //echo "sql==$sql"; //$rs = mysql_query($sql,$conn); $var_time = time(); $cntr = 1; $count = 0; $rs = executeSelect($sql, $conn); // it is for next and previous ticket $startvalue = 0; if ($begin == "" and $numBegin == "") { $startvalue = 0;
if ($totalrows <= $var_calc_begin) { $var_nor = 10; $var_nol = 10; if ($var_num > $var_numBegin) { $var_num = $var_num - 1; $var_numBegin = $var_numBegin; $var_begin = $var_begin - $var_nor; } elseif ($var_num == $var_numBegin) { $var_num = $var_num - 1; $var_numBegin = $var_numBegin - $var_nol; $var_begin = $var_calc_begin - $var_nor; $var_start = ""; } } //echo("$totalrows,2,2,\"&ddlSearchType=$var_cmbSearch&txtSearch=" . urlencode($var_search) . "&id=$var_batchid&\",$var_numBegin,$var_start,$var_begin,$var_num"); $navigate = pageBrowser($totalrows, 10, 10, "&mt=y&cmbSearch={$var_cmbSearch}&txtSearch=" . urlencode($var_search) . "&stylename={$var_stylename}&styleminus={$var_styleminus}&styleplus={$var_styleplus}&", $var_numBegin, $var_start, $var_begin, $var_num); //execute the new query with the appended SQL bit returned by the function $sql = $sql . $navigate[0]; //echo "sql==$sql"; //echo $sql; //echo "<br>".time(); //$rs = mysql_query($sql,$conn); $rs = executeSelect($sql, $conn); $cnt = 1; while ($row = mysql_fetch_array($rs)) { ?> <tr align="left" class="whitebasic"> <td align="center"><input type="checkbox" name="chk[]" id="c<?php echo $cnt; ?>
$var_nol = 10; if ($var_num > $var_numBegin) { $var_num = $var_num - 1; $var_numBegin = $var_numBegin; $var_begin = $var_begin - $var_nor; } elseif ($var_num == $var_numBegin) { $var_num = $var_num - 1; $var_numBegin = $var_numBegin - $var_nol; $var_begin = $var_calc_begin - $var_nor; $var_start = ""; } } if ($var_begin < 0) { $var_begin = 0; } $navigate = pageBrowser($totalrows, 10, $maxPageLimit, "", $var_numBegin, $var_start, $var_begin, $var_num); $categoriesWithKbCount = getCategoriesWithKbCount($navigate[0], 'detail'); ?> <div class="popular_kbs" > <ul> <?php while ($categoriesWithKbCountVal = mysql_fetch_assoc($categoriesWithKbCount)) { //echo '<pre>'; print_r($categoriesWithKbCountVal); echo '</pre>'; $seolinkKb = str_replace(" ", "-", stripslashes($categoriesWithKbCountVal['vCatDesc'])); $seolinkKb = preg_replace('/[^a-zA-Z0-9__.-]/s', '', $seolinkKb); $seolinkKb = strtolower($seolinkKb); $seolinkKb = substr($seolinkKb, 0, 100); $seolinkKb = str_replace("?", "", $seolinkKb); ?> <li>
if ($totalrows <= $var_calc_begin) { $var_nor = 10; $var_nol = 10; if ($var_num > $var_numBegin) { $var_num = $var_num - 1; $var_numBegin = $var_numBegin; $var_begin = $var_begin - $var_nor; } elseif ($var_num == $var_numBegin) { $var_num = $var_num - 1; $var_numBegin = $var_numBegin - $var_nol; $var_begin = $var_calc_begin - $var_nor; $var_start = ""; } } //echo("$totalrows,2,2,\"&ddlSearchType=$var_cmbSearch&txtSearch=" . urlencode($var_search) . "&id=$var_batchid&\",$var_numBegin,$var_start,$var_begin,$var_num"); $navigate = pageBrowser($totalrows, 10, 10, "&mt=y&cmbSearch={$var_cmbSearch}&txtSearch=" . urlencode($var_search) . "&stylename=STYLEDOWNLOADS&styleminus=minus12&styleplus=plus12&", $var_numBegin, $var_start, $var_begin, $var_num); //execute the new query with the appended SQL bit returned by the function $sql = $sql . $navigate[0]; //echo "sql==$sql"; //echo $sql; //echo "<br>".time(); //$rs = mysql_query($sql,$conn); $rs = executeSelect($sql, $conn); $cnt = 1; while ($row = mysql_fetch_array($rs)) { ?> <tr align="left" class="whitebasic"> <td align="center"><input type="checkbox" name="chk[]" id="c<?php echo $cnt; ?>
$var_nol = 10; if ($var_num > $var_numBegin) { $var_num = $var_num - 1; $var_numBegin = $var_numBegin; $var_begin = $var_begin - $var_nor; } elseif ($var_num == $var_numBegin) { $var_num = $var_num - 1; $var_numBegin = $var_numBegin - $var_nol; $var_begin = $var_calc_begin - $var_nor; $var_start = ""; } } //echo "start=".$var_start; //echo("$totalrows,2,2,\"&ddlSearchType=$var_cmbSearch&txtSearch=" . urlencode($var_search) . "&id=$var_batchid&\",$var_numBegin,$var_start,$var_begin,$var_num"); $_SESSION['next_sql'] = $sql; $navigate = pageBrowser($totalrows, 10, $var_maxposts, "&val={$var_orderby}&sorttype={$var_sorttype}&pagenum=yes&mt=y&cmbDepartment={$var_deptid}&", $var_numBegin, $var_start, $var_begin, $var_num); $_SESSION["sess_backreplyurl"] = ""; $var_back = "./assignedtickets.php?mt=y&begin=" . $var_begin . "&num=" . $var_num . "&numBegin=" . $var_numBegin . "&start={$var_start}&&cmbSearch=" . $var_cmbSearch . "&txtSearch=" . urlencode($var_search) . "&cmbDepartment=" . urlencode($var_deptid) . "&"; $_SESSION["sess_ticketbackurl"] = $var_back; //execute the new query with the appended SQL bit returned by the function $sql = $sql . $navigate[0]; //echo $sql; //echo "<br>".time(); //$rs = mysql_query($sql,$conn); $var_time = time(); $cntr = 1; $count = 0; $rs = executeSelect($sql, $conn); $startvalue = 0; if ($begin == "" and $numBegin == "") { $startvalue = 0;
//presently assuming nor is number of rows $var_nol = 10; //presently assuming nol is number of links if ($var_num > $var_numBegin) { $var_num = $var_num - 1; $var_numBegin = $var_numBegin; $var_begin = $var_begin - $var_nor; } elseif ($var_num == $var_numBegin) { $var_num = $var_num - 1; $var_numBegin = $var_numBegin - $var_nol; $var_begin = $var_calc_begin - $var_nor; $var_start = ""; } } //echo("$totalrows,2,2,\"&ddlSearchType=$var_cmbSearch&txtSearch=" . urlencode($var_search) . "&id=$var_batchid&\",$var_numBegin,$var_start,$var_begin,$var_num"); $navigate = pageBrowser($totalrows, 10, $var_maxposts, "&mt=y&stylename={$var_stylename}&styleminus={$var_styleminus}&styleplus={$var_styleplus}&tk=" . $var_ticketid . "&", $var_numBegin, $var_start, $var_begin, $var_num); //execute the new query with the appended SQL bit returned by the function $sql = $sql . $navigate[0]; $rs = executeSelect($sql, $conn); $var_reply_idlist = ""; while ($row = mysql_fetch_array($rs)) { if ($row["nReplyId"] != "") { $var_reply_idlist .= "," . $row["nReplyId"]; } } if (mysql_num_rows($rs) > 0) { mysql_data_seek($rs, 0); if ($var_reply_idlist != "") { $var_subquery = " OR nReplyId IN(" . substr($var_reply_idlist, 1) . ")"; } $sql_attach = "Select * from sptbl_attachments where nTicketId='" . mysql_real_escape_string($var_ticketid) . "'\n\t\t\t\t\t" . $var_subquery . " ORDER BY nTicketId DESC,nReplyId DESC";
if ($totalrows <= $calc_begin) { $nor1 = 10; $nol = 10; if ($num > $numBegin) { $num = $num - 1; $numBegin = $numBegin; $begin = $begin - $nor1; } elseif ($num == $numBegin) { $num = $num - 1; $numBegin = $numBegin - $nol; $begin = $calc_begin - $nor1; $start = 0; } } //$navigate = pageBrowser($totalrows,10,10,"&mt=y&cmbSearch=$cmbSearch&txtSearch=" . urlencode($txtSearch) . "&stylename=STYLEKNOWLEDGEBASE&styleminus=minus10&styleplus=plus10&",$var_numBegin,$var_start,$var_begin,$var_num); $navigate = pageBrowser($totalrows, 10, 10, "&mt=y&cmbSearch={$cmbSearch}&txtSearch=" . urlencode($txtSearch) . "&ddlCategory=" . $ddlCategory . "&ddlDepartment=" . $ddlDepartment . "&stylename=STYLEKNOWLEDGEBASE&styleminus=minus6&styleplus=plus6&", $numBegin, $start, $begin, $num); $sql = $sql . $navigate[0]; $rs = executeSelect($sql, $conn); $cnt = 1; while ($row = mysql_fetch_array($rs)) { ?> <tr align="left" class="whitebasic"> <td width="4%"> <?php if ($row["nStaffId"] == $_SESSION["sess_staffid"]) { echo "<input type=\"checkbox\" name=\"chk[]\" id=\"c" . $cnt . "\" value = \"" . $row["nKBID"] . "\" >"; } ?> </td> <td colspan="2">