예제 #1
0
$grid["autowidth"] = true;
$sql = "select * from `ems`.`categorymaster`";
$allCategories = fetch($sql);
$categoryOptions["value"] = optionMaker($allCategories, "category", "category");
$sql = "select * from `ems`.`subcategorymaster`";
$allSubCategories = fetch($sql);
$subCategoryOptions["value"] = optionMaker($allSubCategories, "subCategory", "subCategory");
$sql = "select * from `ems`.`brandmaster`";
$allBrands = fetch($sql);
$subBrandOptions["value"] = optionMaker($allBrands, "brand", "brand");
$sql = "select * from `ems`.`unit`";
$allUnits = fetch($sql);
$unitOptions["value"] = optionMaker($allUnits, "unit", "unit");
$sql = "select * from `ems`.`packingunitmaster`";
$allPackingUnits = fetch($sql);
$packingUnitOptions["value"] = optionMaker($allPackingUnits, "packingunit", "packingunit");
$col = array();
$col["name"] = "itemCode";
$col["title"] = "Item";
$cols[] = $col;
$col = array();
$col["name"] = "productCategory";
$col["title"] = "Category";
$col["editable"] = true;
$col["edittype"] = "select";
$col["editoptions"] = $categoryOptions;
$cols[] = $col;
$col = array();
$col["name"] = "subCategory";
$col["title"] = "Sub Category";
$col["editable"] = true;
예제 #2
0
<?php

mysql_connect("localhost", "db", "dbpass");
mysql_select_db("ems");
include "./gridOptionMaker.php";
include "../../libs/inc/jqgrid_dist.php";
$g = new jqgrid();
$g->table = "areamaster";
$grid["autowidth"] = true;
$sql = "select * from `ems`.`location` where `location_type`=0";
$allCountries = fetch($sql);
$countryOptions["value"] = optionMaker($allCountries, "name", "name");
$col = array();
$col["name"] = "areaID";
$col["title"] = "Area ID";
$col["editable"] = false;
$cols[] = $col;
$col = array();
$col["name"] = "areaCode";
$col["title"] = "Area Code";
$col["editable"] = true;
$cols[] = $col;
$col = array();
$col["name"] = "country";
$col["title"] = "Country";
$col["editable"] = true;
$col["edittype"] = "select";
$col["editoptions"] = $countryOptions;
$cols[] = $col;
$col = array();
$col["name"] = "state";
예제 #3
0
mysql_connect("localhost", "db", "dbpass");
mysql_select_db("ems");
include "../../libs/inc/jqgrid_dist.php";
include "./gridOptionMaker.php";
$g = new jqgrid();
$g->table = "moderntradepricemaster";
$grid["autowidth"] = true;
$sql = "select * from `ems`.`retailermaster` ";
$allRetail = fetch($sql);
$retailOptions["value"] = optionMaker($allRetail, "name", "name");
$sql = "select * from `ems`.`productmaster` ";
$product = fetch($sql);
$productOptions["value"] = optionMaker($product, "itemCode", "itemDesc");
$sql = "select * from `ems`.`location` where `location_type`=1 and `parent_id` = 100";
$indianStates = fetch($sql);
$stateOptions["value"] = optionMaker($indianStates, "name", "name");
$col = array();
$col["name"] = "itemCode";
$col["title"] = "Item Code";
$col["editable"] = true;
$col["edittype"] = "select";
$col["editoptions"] = $productOptions;
$cols[] = $col;
$col = array();
$col["name"] = "itemDesc";
$col["title"] = "Item Description";
$col["editable"] = true;
$cols[] = $col;
$col = array();
$col["name"] = "state";
$col["title"] = "State";
예제 #4
0
<?php

mysql_connect("localhost", "db", "dbpass");
mysql_select_db("ems");
include "../../libs/inc/jqgrid_dist.php";
include "./gridOptionMaker.php";
$g = new jqgrid();
$g->table = "mrpmaster";
$grid["autowidth"] = true;
$sql = "select * from `ems`.`productmaster` ";
$product = fetch($sql);
$productOptions["value"] = optionMaker($product, "itemCode", "itemDesc");
$col = array();
$col["name"] = "itemCode";
$col["title"] = "Item Code";
$col["editable"] = true;
$col["edittype"] = "select";
$col["editoptions"] = $productOptions;
$cols[] = $col;
$col = array();
$col["name"] = "itemDesc";
$col["title"] = "Item Description";
$col["editable"] = true;
$cols[] = $col;
$col = array();
$col["name"] = "rate";
$col["title"] = "M.R.P";
$col["editable"] = true;
$cols[] = $col;
$col = array();
$col["name"] = "wef";
예제 #5
0
    $input_month = test_input($_POST["month"]);
    $result_month_info = "The month of " . ucfirst($input_month) . " has " . $months[$input_month] . " days.";
}
?>
</pre>
<form action="<?php 
echo htmlspecialchars($_SERVER["PHP_SELF"]);
?>
" method="POST"
  accept-charset="utf-8">
  <p>
    <label for="month">Please choose a month.</label>
    <select id="month" name="month">
      <?php 
foreach ($months as $key => $value) {
    print optionMaker($key, $key, $input_month);
}
unset($key, $value);
?>
    </select>
  </p>
  <button type="submit">Submit</button>
  <p>
    <b>Result: </b><?php 
echo $result_month_info;
?>
  </p>
</form>
</details>
<?php 
include 'shared/footer.php';
예제 #6
0
<?php

mysql_connect("localhost", "db", "dbpass");
mysql_select_db("ems");
include "../../libs/inc/jqgrid_dist.php";
include "./gridOptionMaker.php";
$g = new jqgrid();
$g->table = "subretailermaster";
$grid["autowidth"] = true;
$sql = "select * from `ems`.`retailermaster`";
$allRetail = fetch($sql);
$retailOptions["value"] = optionMaker($allRetail, "name", "name");
$col = array();
$col["name"] = "id";
$col["title"] = "Retailer ID";
$col["editable"] = false;
$cols[] = $col;
$col = array();
$col["name"] = "retailerType";
$col["title"] = "Retailer Type";
$col["editable"] = true;
$col["edittype"] = "select";
$col["editoptions"] = $retailOptions;
$cols[] = $col;
$col = array();
$col["name"] = "name";
$col["title"] = "Name";
$col["editable"] = true;
$cols[] = $col;
$g->set_columns($cols);
$g->set_options($grid);
예제 #7
0
include "./gridOptionMaker.php";
$g = new jqgrid();
$g->table = "dcmaster";
$grid["autowidth"] = true;
$sql = "select * from `ems`.`employeemaster`";
$allEmployees = fetch($sql);
$employeeOptions["value"] = optionMaker($allEmployees, "empID", "name");
$sql = "select * from `ems`.`areamaster`";
$allAreas = fetch($sql);
$areaOptions["value"] = optionMaker($allAreas, "areaCode", "areaCode");
$sql = "select * from `ems`.`location` where `location_type`=0";
$allCountries = fetch($sql);
$countryOptions["value"] = optionMaker($allCountries, "name", "name");
$sql = "select * from `ems`.`currencymaster` ";
$allCurrency = fetch($sql);
$currencyOptions["value"] = optionMaker($allCurrency, "currencyName", "currencyName");
$col = array();
$col["name"] = "id";
$col["title"] = "ID";
$col["editable"] = false;
$cols[] = $col;
$col = array();
$col["name"] = "dc";
$col["title"] = "Debtor/Creditor";
$col["editable"] = true;
$col["edittype"] = "select";
$col["editoptions"] = array(value => "d:Debtors;c:Creditors");
$cols[] = $col;
/* $col = array();
$col["name"] = "associatedOfficer";
$col["title"] = "Associated Officer";
예제 #8
0
<?php

mysql_connect("localhost", "db", "dbpass");
mysql_select_db("ems");
include "./gridOptionMaker.php";
include "../../libs/inc/jqgrid_dist.php";
$g = new jqgrid();
$g->table = "taxstructure";
$grid["autowidth"] = true;
$sql = "select * from `ems`.`location` where `location_type`=1 and `parent_id` = 100";
$indianStates = fetch($sql);
$stateOptions["value"] = optionMaker($indianStates, "name", "name");
$sql = "select * from `ems`.`categorymaster`";
$category = fetch($sql);
$categoryOption["value"] = optionMaker($category, "categoryID", "category");
$col = array();
$col["name"] = "taxID";
$col["title"] = "Tax ID";
$cols[] = $col;
$col = array();
$col["name"] = "taxCode";
$col["title"] = "Tax Code";
$col["editable"] = true;
$cols[] = $col;
$col = array();
$col["name"] = "areaCode";
$col["title"] = "Area Code";
$col["editable"] = true;
$cols[] = $col;
$col = array();
$col["name"] = "state";