Skip to content

Instantly share code, notes, and snippets.

View gridphp's full-sized avatar

Abu gridphp

View GitHub Profile
@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 <[email protected]> - 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 <[email protected]> - http://www.phpgrid.org
* @version 2.0.0
* @license: see license.txt included in package
*/
// include db config
@gridphp
gridphp / Home.php
Last active March 28, 2025 03:24
CodeIgniter 4 - Demo Controller Code (app/Controllers/Home.php, Line 9-28) & View Code (app/Views/welcome_message.php, line 234-244)
<?php
namespace App\Controllers;
class Home extends BaseController
{
public function index()
{
$db_conf = array();
$db_conf["type"] = "mysqli"; // mysql,oci8(for oracle),mssql,postgres,sybase
@gridphp
gridphp / dropdown-onload-sql.php
Last active August 7, 2021 21:04
Dropdown onload sql on 2.6.5. In this demo on line 79
<?php
/**
* PHP Grid Component
*
* @author Abu Ghufran <[email protected]> - http://www.phpgrid.org
* @version 2.0.0
* @license: see license.txt included in package
*/
// include db config
@gridphp
gridphp / index.php
Created August 5, 2021 02:50
Demo which ondblclick opens View dialog along with inline edit on pencil icon.
<?php
/**
* PHP Grid Component
*
* @author Abu Ghufran <[email protected]> - http://www.phpgrid.org
* @version 2.0.0
* @license: see license.txt included in package
*/
include_once("../../config.php");
@gridphp
gridphp / bulk-edit.php
Last active April 26, 2021 15:15
Download as zip sample, line 153-183, 240-249
<?php
/**
* PHP Grid Component
*
* @author Abu Ghufran <[email protected]> - http://www.phpgrid.org
* @version 2.0.0
* @license: see license.txt included in package
*/
// include db config
<?php
/**
* PHP Grid Component
*
* @author Abu Ghufran <[email protected]> - http://www.phpgrid.org
* @version 2.0.0
* @license: see license.txt included in package
*/
// include db config
@gridphp
gridphp / subgrid.php
Created December 6, 2020 11:16
Subgrid with daterange picker
<?php
/**
* PHP Grid Component
*
* @author Abu Ghufran <[email protected]> - http://www.phpgrid.org
* @version 2.0.0
* @license: see license.txt included in package
*/
// include db config
<?php
/**
* PHP Grid Component
*
* @author Abu Ghufran <[email protected]> - http://www.phpgrid.org
* @version 2.0.0
* @license: see license.txt included in package
*/
// include db config