Skip to content

Instantly share code, notes, and snippets.

View gridphp's full-sized avatar

Abu gridphp

View GitHub Profile
@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 / web-signature.php
Last active May 31, 2023 20:13
Demo to integrate Web Signature Plugin: SignaturePad, 100-136: Main integration code, 176: JS api inclusion
<?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
*/
// include db config
@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");
<?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 / 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 <gridphp@gmail.com> - http://www.phpgrid.org
* @version 2.0.0
* @license: see license.txt included in package
*/
// include db config