Skip to content

Instantly share code, notes, and snippets.

View gridphp's full-sized avatar

Abu gridphp

View GitHub Profile
<?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 / wp-demo-snippet-latest.php
Last active August 8, 2024 20:06
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
*/
/*
@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");
@gridphp
gridphp / auth.php
Last active March 4, 2024 17:56
Basic authentication for php grid - non database - https://www.gridphp.com
<?php
###############################################################
# Simple Auth 2.13
# Website: https://www.gridphp.com/
# Inspired from: http://www.zubrag.com/scripts/
###############################################################
#
# Usage:
# Set usernames / passwords below between SETTINGS START and SETTINGS END.
# Open it in browser with "help" parameter to get the code
@gridphp
gridphp / custom-delete-button.php
Last active November 26, 2023 13:48
Code to make a delete button and JS call of delete, line 38: custom row delete button, line 64: callback
<?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
Created September 13, 2023 19:39
Codeigniter4 Integration Code Sample
<?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