$sord = $_GET['sord']; // get the direction $scol; $stext = ''; if (isset($_GET['Scol']) && $_GET['Stext'] != '') { $scol = $_GET['Scol']; $stext = $_GET['Stext']; } $user = $_SESSION['username']; $compcode = $_SESSION['company']; $total_pages; $count; $start; $responce = new stdClass(); $table = 'material.product'; $column = getAllColumnFromTable(['deluser', 'deldate']); $columnid = 'itemcode'; function getPagerInfo() { global $mysqli, $table, $page, $limit, $sidx, $sord, $total_pages, $count, $start, $scol, $stext, $columnid, $compcode, $user; if (!$sidx) { $sidx = $columnid; } if (isset($_GET['Stext']) && $_GET['Scol'] == 'itemcode') { $sql = "SELECT COUNT(*) AS count FROM {$table} \n\t\t\t\tWHERE compcode='{$compcode}' AND \n\t\t\t\t{$_GET['Scol']} LIKE '{$_GET['Stext']}%'"; } else { if (isset($scol) && $stext != '') { $sql = "SELECT COUNT(*) AS count FROM {$table} \n\t\t\t\tWHERE compcode='{$compcode}' AND {$_GET['Scol']} \n\t\t\t\tLIKE '%{$_GET['Stext']}%'"; } else { $sql = "SELECT COUNT(*) AS count FROM {$table} WHERE compcode='{$compcode}'"; }
$sord = $_GET['sord']; // get the direction $scol; $stext = ''; if (isset($_GET['Scol']) && $_GET['Stext'] != '') { $scol = $_GET['Scol']; $stext = $_GET['Stext']; } $user = $_SESSION['username']; $compcode = $_SESSION['company']; $total_pages; $count; $start; $responce = new stdClass(); $table = 'glmasref'; $column = getAllColumnFromTable(['']); $columnid = 'glaccount'; function getPagerInfo() { global $mysqli, $table, $page, $limit, $sidx, $sord, $total_pages, $count, $start, $scol, $stext, $columnid, $compcode, $user; if (!$sidx) { $sidx = $columnid; } if (isset($_GET['Stext']) && $_GET['Scol'] == 'glaccount') { $sql = "SELECT COUNT(*) AS count FROM {$table} \n\t\t\t\tWHERE compcode='{$compcode}' AND \n\t\t\t\t{$_GET['Scol']} LIKE '{$_GET['Stext']}%'"; } else { if (isset($scol) && $stext != '') { $sql = "SELECT COUNT(*) AS count FROM {$table} \n\t\t\t\tWHERE compcode='{$compcode}' AND {$_GET['Scol']} \n\t\t\t\tLIKE '%{$_GET['Stext']}%'"; } else { $sql = "SELECT COUNT(*) AS count FROM {$table} WHERE compcode='{$compcode}'"; }
<?php include_once $_SERVER['DOCUMENT_ROOT'] . '/newms/connection/sschecker.php'; include_once '../../connection/connect_db.php'; $table = 'material.category'; $column = getAllColumnFromTable(['sysno']); $columnid = 'catcode'; $user = $_SESSION['username']; $compcode = $_SESSION['company']; function getAllColumnFromTable(array $except) { //get all column field global $mysqli, $table; $SQL = "SHOW COLUMNS FROM {$table}"; $temp = array(); $result = $mysqli->query($SQL); if (!$result) { echo $mysqli->error; } while ($row = $result->fetch_array(MYSQLI_ASSOC)) { $key = array_search($row['Field'], $except); if ($key > -1) { } else { array_push($temp, $row['Field']); } } return $temp; } function chgDate($date) { $newstr = explode("-", $date);
<?php include_once $_SERVER['DOCUMENT_ROOT'] . '/newms/connection/sschecker.php'; include_once '../../connection/connect_db.php'; $table = 'sysdb.sector'; $column = getAllColumnFromTable(); $columnid = 'sectorcode'; $user = $_SESSION['username']; $compcode = $_SESSION['company']; function getAllColumnFromTable() { //get all column field global $mysqli, $table; $SQL = "SHOW COLUMNS FROM {$table}"; $temp = array(); $result = $mysqli->query($SQL); if (!$result) { echo $mysqli->error; } while ($row = $result->fetch_array(MYSQLI_ASSOC)) { array_push($temp, $row['Field']); } return $temp; } function chgDate($date) { $newstr = explode("-", $date); return $newstr[2] . '-' . $newstr[1] . '-' . $newstr[0]; } function clr($str) {
$sord = $_GET['sord']; // get the direction $scol; $stext = ''; if (isset($_GET['Scol']) && $_GET['Stext'] != '') { $scol = $_GET['Scol']; $stext = $_GET['Stext']; } $user = $_SESSION['username']; $compcode = $_SESSION['company']; $total_pages; $count; $start; $responce = new stdClass(); $table = 'material.sequence'; $column = getAllColumnFromTable(['delUser', 'delDate']); $columnid = 'sysno'; function getPagerInfo() { global $mysqli, $table, $page, $limit, $sidx, $sord, $total_pages, $count, $start, $scol, $stext, $columnid, $compcode, $user; if (!$sidx) { $sidx = $columnid; } if (isset($scol) && $stext != '') { $sql = "SELECT COUNT(*) AS count FROM {$table} \n\t\t\t\tWHERE compcode='{$compcode}' AND {$_GET['Scol']} \n\t\t\t\tLIKE '%{$_GET['Stext']}%'"; } else { $sql = "SELECT COUNT(*) AS count FROM {$table} WHERE compcode='{$compcode}'"; } $result = $mysqli->query($sql); $row = $result->fetch_assoc(); $count = $row['count'];