Skip to content

Instantly share code, notes, and snippets.

View gridphp's full-sized avatar

Abu gridphp

View GitHub Profile
@gridphp
gridphp / wp-demo-snippet-latest.php
Last active January 27, 2025 06:54
Wordpress Grid 4 PHP Framework Integration - Sample Snippet tested with Wordpress 6.4.3, https://www.gridphp.com
/**
* Grid 4 PHP Framework
*
* @author Abu Ghufran <gridphp@gmail.com> - https://www.gridphp.com
* @version 3
* @date 09-Aug-2024
* @license: see license.txt included in package
*/
/*
<?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 / Home.php
Last active December 13, 2024 19:47
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 / index.php
Created December 8, 2024 14:59
Showing Lock / Unlock Icon based on row data - screenshot: https://i.imgur.com/N5F14y9.png
<?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> - https://www.gridphp.com
* @version 2.8.2
* @license: see license.txt included in package
*/
/*
@gridphp
gridphp / example-all.php
Created August 19, 2024 19:57
View dialog - textarea paragraphs display
<?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 / dropdown-conditional-disable.php
Last active July 30, 2024 01:55
Disable certain dropdown option based on row data, Line 161: Demo disables dropdown option with id:1 when row's tax field > 50
<?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 / Gridphp.php
Last active June 2, 2024 15:46
Laravel Gridphp Integration - Sample Files - https://www.gridphp.com/laravel-datagrid/
<?php
namespace App;
// use one of these as dbtype: mysqli,oci8(for oracle),mssqlnative,postgres,sybase
define("PHPGRID_DBTYPE","mysqli");
define("PHPGRID_DBHOST",env("DB_HOST"));
define("PHPGRID_DBUSER",env("DB_USERNAME"));
define("PHPGRID_DBPASS",env("DB_PASSWORD"));
define("PHPGRID_DBNAME",env("DB_DATABASE"));
@gridphp
gridphp / grid-height.php
Last active April 19, 2024 04:19
Set grid height based on parent container
<?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 / toolbar-top-paging.php
Last active March 25, 2024 18:27
Pagination on top toolbar, Line 28,29 and 51,52
<?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");