Skip to content

Commit

Permalink
Remove unnecessary PageSecurity assignments
Browse files Browse the repository at this point in the history
  • Loading branch information
timschofield committed May 4, 2012
1 parent 9f078cc commit f4f4584
Show file tree
Hide file tree
Showing 14 changed files with 24 additions and 16 deletions.
1 change: 0 additions & 1 deletion KCMCEditPatientDetails.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<?php
$PageSecurity=1;

include('includes/session.inc');
include('includes/SQL_CommonFunctions.inc');
Expand Down
1 change: 0 additions & 1 deletion KCMCFunctionalUnitPL.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<?php

/* $Id$*/
$PageSecurity=1;
include ('includes/session.inc');
$title = _('Income and Expenditure by Functional Unit');
include('includes/SQL_CommonFunctions.inc');
Expand Down
1 change: 0 additions & 1 deletion KCMCInPatientBilling.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<?php
$PageSecurity=1;
include('includes/session.inc');
$title = _('Billing For All Drugs and Services');
include('includes/header.inc');
Expand Down
2 changes: 0 additions & 2 deletions KCMCInsuranceCompanyDetails.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@

/* $Id$ */

$PageSecurity=1;

include('includes/session.inc');

$title = _('Create or Modify Insurance Company Details');
Expand Down
1 change: 0 additions & 1 deletion KCMCInsuranceInvoice.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<?php
$PageSecurity=1;
include('includes/session.inc');
$title = _('Monthly Insurance Company Billing');
include('includes/header.inc');
Expand Down
1 change: 0 additions & 1 deletion KCMCLabTests.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<?php
$PageSecurity=1;
include('includes/session.inc');
$title = _('Billing For Laboratory Tests');
include('includes/header.inc');
Expand Down
1 change: 0 additions & 1 deletion KCMCLaboratoryReport.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<?php

/* $Id$*/
$PageSecurity=1;
include ('includes/session.inc');
$title = _('Financial Report for Laboratory Department');

Expand Down
1 change: 0 additions & 1 deletion KCMCOtherMedicalServices.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<?php
$PageSecurity=1;
include('includes/session.inc');
$title = _('Billing For Other Medical Services');
include('includes/header.inc');
Expand Down
1 change: 0 additions & 1 deletion KCMCPharmacy.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<?php
$PageSecurity=1;
include('includes/session.inc');
$title = _('Billing For Pharmaceuticals');
include('includes/header.inc');
Expand Down
1 change: 0 additions & 1 deletion KCMCPrintInsuranceInvoice.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<?php
/* $Id$ */
$PageSecurity = 1;
include ('includes/session.inc');
if (isset($_GET['FromTransNo'])) {
$FromTransNo = trim($_GET['FromTransNo']);
Expand Down
1 change: 0 additions & 1 deletion KCMCRadiology.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<?php
$PageSecurity=1;
include('includes/session.inc');
$title = _('Billing For Radiology Tests');
include('includes/header.inc');
Expand Down
1 change: 0 additions & 1 deletion KCMCRadiologyReport.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<?php

/* $Id$*/
$PageSecurity=1;
include ('includes/session.inc');
$title = _('Financial Report for Radiology Department');

Expand Down
1 change: 0 additions & 1 deletion KCMCRegister.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<?php
$PageSecurity=1;

include('includes/session.inc');
include('includes/SQL_CommonFunctions.inc');
Expand Down
26 changes: 24 additions & 2 deletions includes/CustomerSearch.php
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,13 @@ function CustomerSearchSQL($db) {
ON debtorsmaster.debtorno = custbranch.debtorno
INNER JOIN debtortype
ON debtorsmaster.typeid = debtortype.typeid";
$CountSQL = "SELECT COUNT(debtorsmaster.debtorno) as totaldebtors
FROM debtorsmaster
LEFT JOIN custbranch
ON debtorsmaster.debtorno = custbranch.debtorno
INNER JOIN debtortype
ON debtorsmaster.typeid = debtortype.typeid";

} else {
$SearchKeywords = mb_strtoupper(trim(str_replace(' ', '%', $_POST['Keywords'])));
$_POST['CustCode'] = mb_strtoupper(trim($_POST['CustCode']));
Expand Down Expand Up @@ -166,6 +173,20 @@ function CustomerSearchSQL($db) {
OR debtorsmaster.address3 " . LIKE . " '%" . $_POST['CustAdd'] . "%'
OR debtorsmaster.address4 " . LIKE . " '%" . $_POST['CustAdd'] . "%')";

$CountSQL = "SELECT COUNT(debtorsmaster.debtorno) as totaldebtors
FROM debtorsmaster
INNER JOIN debtortype
ON debtorsmaster.typeid = debtortype.typeid
LEFT JOIN custbranch
ON debtorsmaster.debtorno = custbranch.debtorno
WHERE debtorsmaster.name " . LIKE . " '%" . $SearchKeywords . "%'
AND debtorsmaster.debtorno " . LIKE . " '%" . $_POST['CustCode'] . "%'
AND custbranch.phoneno " . LIKE . " '%" . $_POST['CustPhone'] . "%'
AND (debtorsmaster.address1 " . LIKE . " '%" . $_POST['CustAdd'] . "%'
OR debtorsmaster.address2 " . LIKE . " '%" . $_POST['CustAdd'] . "%'
OR debtorsmaster.address3 " . LIKE . " '%" . $_POST['CustAdd'] . "%'
OR debtorsmaster.address4 " . LIKE . " '%" . $_POST['CustAdd'] . "%')";

if (mb_strlen($_POST['CustType']) > 0 AND $_POST['CustType']!='ALL') {
$SQL .= " AND debtortype.typename = '" . $_POST['CustType'] . "'";
}
Expand All @@ -176,8 +197,9 @@ function CustomerSearchSQL($db) {
if ($_SESSION['SalesmanLogin'] != '') {
$SQL.= " AND custbranch.salesman='" . $_SESSION['SalesmanLogin'] . "'";
}
$CountResult=DB_query($SQL, $db);
$_SESSION['ListCount']=DB_num_rows($CountResult);
$CountResult=DB_query($CountSQL, $db);
$CountRow=DB_fetch_array($CountResult);
$_SESSION['ListCount']=$CountRow['totaldebtors'];
$_SESSION['ListPageMax'] = ceil($_SESSION['ListCount'] / $_SESSION['DisplayRecordsMax']);
if (isset($_POST['Next'])) {
if ($_POST['PageOffset'] < $_SESSION['ListPageMax']) {
Expand Down

0 comments on commit f4f4584

Please sign in to comment.