Skip to content

Instantly share code, notes, and snippets.

View gridphp's full-sized avatar

Abu gridphp

View GitHub Profile
@gridphp
gridphp / master-detail-ajax.php
Created March 27, 2023 15:19
Load different detail grid structure using ajax
<?php
/**
* PHP Grid Component
*
* @author Abu Ghufran <gridphp@gmail.com> - http://www.phpgrid.org
* @version 2.0.0
* @license: see license.txt included in package
*/
// include db config
@gridphp
gridphp / group-headers-multi.php
Last active January 11, 2023 18:52
Multiple Group Headers - https://www.gridphp.com
<?php
/**
* PHP Grid Component
*
* @author Abu Ghufran <gridphp@gmail.com> - http://www.phpgrid.org
* @version 2.0.0
* @license: see license.txt included in package
*/
// include db config
@gridphp
gridphp / gist:a8598a323d7e06ed53a5a897b7c58f64
Last active December 31, 2022 18:51
Multi-user application record locking - https://www.gridphp.com
<?php
/**
* PHP Grid Component
*
* @author Abu Ghufran <gridphp@gmail.com> - http://www.phpgrid.org
* @version 2.0.0
* @license: see license.txt included in package
*/
include_once("../../config.php");
<?php
/**
* PHP Grid Component
*
* @author Abu Ghufran <gridphp@gmail.com> - http://www.phpgrid.org
* @version 2.0.0
* @license: see license.txt included in package
*/
// include db config
@gridphp
gridphp / select-row-onload.php
Created October 20, 2022 20:29
Select rows onload based on column value
<?php
/**
* PHP Grid Component
*
* @author Abu Ghufran <gridphp@gmail.com> - http://www.phpgrid.org
* @version 2.0.0
* @license: see license.txt included in package
*/
include_once("../../config.php");
@gridphp
gridphp / fx_get_dropdown
Created August 11, 2022 07:29
FX Temp - 2.8.1
fx_get_dropdown = function (o,field,for_search_bar)
{
// dont process hidden elements, removed for select2 dependent
// if (!jQuery(o).is(":visible"))
// return;
if (for_search_bar)
{
// for inline edit and dialog edit
var sel = '.ui-search-toolbar select[name='+field+']';
@gridphp
gridphp / index.php
Created June 28, 2022 07:06
Default grid4PHP Generated Code from demos\editing\index.php
<?php
/**
* PHP Grid Component
*
* @author Abu Ghufran <gridphp@gmail.com> - http://www.phpgrid.org
* @version 2.0.0
* @license: see license.txt included in package
*/
include_once("../../config.php");
@gridphp
gridphp / config.php
Created June 27, 2022 07:45
Grid4PHP MySQL Configuration.
<?php
// Grid4PHP Database Connection Settings.
// Set of constants defined.
define("PHPGRID_DBTYPE","mysqli"); // Replace mysqli with one of these: mysqli,oci8 (for oracle),mssqlnative,postgres,sybase.
define("PHPGRID_DBHOST","localhost"); // The Database Host
define("PHPGRID_DBUSER","root"); // The Database User
define("PHPGRID_DBPASS","dbpass123"); // The Database Password
define("PHPGRID_DBNAME","griddemo"); // The Database Name
@gridphp
gridphp / base.php
Last active April 21, 2022 04:53
Ticket kimberley - 22020222
function update_data($data) {
global $g;
//update history table with record before updated in contracts by using OLD as value for ACTION field in HISTORY TABLE
$str3 = "INSERT INTO history
SELECT NULL, NOW(), 'old', '" . $_SESSION['username'] . "',
d.* FROM contracts AS d
WHERE d.contract_Id ={$data["contract_Id"]}";
// mysql_query($str3);
$g->execute_query($str3);
<?php
/**
* PHP Grid Component
*
* @author Abu Ghufran <gridphp@gmail.com> - http://www.phpgrid.org
* @version 2.0.0
* @license: see license.txt included in package
*/
include_once("../../config.php");