Skip to content

Instantly share code, notes, and snippets.

View sakilimran's full-sized avatar
🏠
Working from home

S. M. Sakil Imran sakilimran

🏠
Working from home
View GitHub Profile
@sakilimran
sakilimran / pagination bootstrap cakephp
Last active June 6, 2018 13:28
pagination bootstrap cakephp
<ul class="pagination">
<li><?php echo $this->Paginator->prev('<i class="fa fa-chevron-left"></i>', array('escape'=>false,'tag' => 'li'), null, array('escape'=>false, 'tag' => 'li','class' => 'disabled','disabledTag' => 'a')); ?></li>
<li><?php echo $this->Paginator->numbers(array('separator' => '','currentTag' => 'a', 'currentClass' => 'active','tag' => 'li','first' => 1)); ?></li>
<li><?php echo $this->Paginator->next('<i class="fa fa-chevron-right"></i>', array('escape'=>false, 'tag' => 'li','currentClass' => 'disabled'), null, array('escape'=>false,'tag' => 'li','class' => 'disabled','disabledTag' => 'a')); ?></li>
</ul>
@sakilimran
sakilimran / Order.php
Created January 28, 2015 09:04
Important Query of CakePHP
public function getOderAmountByOrderType($options = array())
{
$orderDec = 'Desc';
$limit = false;
$conditions = array();
if(isset($options['conditions'])){
$conditions = array_merge($conditions, $options['conditions']);
}
if(isset($options['orderDesc'])){
@sakilimran
sakilimran / update db
Created December 8, 2014 12:38
update db
--
-- Table structure for table `emails_receivers`
--
DROP TABLE IF EXISTS `emails_receivers`;
CREATE TABLE IF NOT EXISTS `emails_receivers` (
`id` int(8) NOT NULL AUTO_INCREMENT,
`event_id` int(8) NOT NULL,
`user_id` int(5) NOT NULL,
`attachment_invoice` tinyint(1) NOT NULL,
@sakilimran
sakilimran / tables
Created December 8, 2014 12:20
DB tables
--
-- Table structure for table `emails_events`
--
DROP TABLE IF EXISTS `emails_events`;
CREATE TABLE IF NOT EXISTS `emails_events` (
`id` int(8) NOT NULL AUTO_INCREMENT,
`name` varchar(100) NOT NULL,
`slug` varchar(120) NOT NULL,
`created` datetime NOT NULL,
<html class="tablesaw-enhanced"><head><meta http-equiv="content-type" content="text/html;charset=utf-8">
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Users - Index - PiGi Ordering Platform</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" type="text/css" href="/theme/Wolf/css/application-b9abcf044a0bc3e705568d103eddd00e.css">
<link rel="stylesheet" type="text/css" href="/theme/Wolf/css/style.css">
@sakilimran
sakilimran / gist:5752f9f5ac4c327bc195
Created September 22, 2014 12:47
Changing CAKE_CORE_INCLUDE_PATH
if (!defined('CAKE_CORE_INCLUDE_PATH')) {
//define('CAKE_CORE_INCLUDE_PATH', "/old/linux/path/cake" );
define('CAKE_CORE_INCLUDE_PATH', "C:\new\windows\path\cake" );
}
@sakilimran
sakilimran / gist:acf3f7a5d77f2b223ac3
Created September 22, 2014 12:18
Error message while transferring from Linux to Windows
Warning: include(\var\www\html\myProject\Vendor\cakephp\cakephp\lib\Cake\bootstrap.php): failed to open stream: No such file or directory in C:\path\to\myProject\app\webroot\index.php on line 85
Warning: include(): Failed opening '\var\www\html\myProject\Vendor\cakephp\cakephp\lib\Cake\bootstrap.php' for inclusion (include_path='.;C:\xampp\php\PEAR') in C:\path\to\myProject\app\webroot\index.php on line 85
Fatal error: CakePHP core could not be found. Check the value of CAKE_CORE_INCLUDE_PATH in APP/webroot/index.php. It should point to the directory containing your \cake core directory and your \vendors root directory. in C:\path\to\myProject\app\webroot\index.php on line 90
@sakilimran
sakilimran / vhost.conf
Created August 23, 2014 12:35
apache_default_virtualhost
<VirtualHost *:80>
# The ServerName directive sets the request scheme, hostname and port that
# the server uses to identify itself. This is used when creating
# redirection URLs. In the context of virtual hosts, the ServerName
# specifies what hostname must appear in the request's Host: header to
# match this virtual host. For the default virtual host (this file) this
# value is not decisive as it is used as a last resort host regardless.
# However, you must set it for any further virtual host explicitly.
#ServerName www.example.com
@sakilimran
sakilimran / email.php
Created June 28, 2014 14:41
email conf
<?php
/**
* This is email configuration file.
*
* Use it to configure email transports of Cake.
*
* PHP 5
*
* CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
* Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org)
@sakilimran
sakilimran / main-built.js
Created June 5, 2014 09:50
Form Builder main-build js
/*! jQuery v1.9.0 | (c) 2005, 2012 jQuery Foundation, Inc. | jquery.org/license */
//@ sourceMappingURL=jquery.min.map;
// Underscore.js 1.4.4
// http://underscorejs.org
// (c) 2009-2013 Jeremy Ashkenas, DocumentCloud Inc.
// Underscore may be freely distributed under the MIT license.
// (c) 2010-2012 Jeremy Ashkenas, DocumentCloud Inc.
// Backbone may be freely distributed under the MIT license.