Skip to content

Instantly share code, notes, and snippets.

public function index() {
$this->Excel->recursive = 0;
$this->set('excels', $this->Paginator->paginate());
}
CREATE TABLE TimeSlots (
ID integer PRIMARY KEY NOT NULL,
SessionNumber integer,
SessionName text
);
# note- this table name is excel because it was originally imported from, well, excel.
#might be easier to think if this table as if it were named "Session"
CREATE TABLE excel (
ID integer PRIMARY KEY NOT NULL,
@jackfruh
jackfruh / edit.ctp
Created August 24, 2014 20:17
This is the edit view \View\Excels\edit.ctp
<div class="excels form">
<?php echo $this->Form->create('Excel');
$this->Form->inputDefaults(array('rows' => '1') );?>
<fieldset>
<legend><?php echo __('Edit Session'); ?></legend>
<?php
echo $this->Form->hidden('ID', array('hidden'));
echo $this->Form->input('FirstName'); //, array('div' => array('style' => 'display:inline')));
echo $this->Form->input('LastName');//, array('div' => array('style' => 'display:inline')));
@jackfruh
jackfruh / Excel.php
Created August 24, 2014 20:18
Excel Model \app\Model\Excel.php
<?php
App::uses('AppModel', 'Model');
/**
* Excel Model
*
*/
class Excel extends AppModel {
/**
* Use table
@jackfruh
jackfruh / gist:0ec0c40d36e84ff6c1ac
Created November 9, 2014 22:35
src/Controller/AppController.php
<?php
/**
* CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
* Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
*
* Licensed under The MIT License
* For full copyright and license information, please see the LICENSE.txt
* Redistributions of files must retain the above copyright notice.
*
* @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
@jackfruh
jackfruh / Cake3 \.htaccess
Last active March 16, 2019 18:44
htaccess files that worked with CakePHP and 1and1 hosting
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteRule ^$ /webroot/ [L]
RewriteRule (.*) /webroot/$1 [L]
</IfModule>
<?php
/**
* CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
* Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
*
* Licensed under The MIT License
* For full copyright and license information, please see the LICENSE.txt
* Redistributions of files must retain the above copyright notice.
*
* @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
public function index() {
$this->set('submissions', $this->paginate($this->Submissions));
}
public function SendEmailAcceptance() {
$this->loadmodel("submissions");
$this->set('title', 'Send Email Confirmation');
$this->set('submissions', $this->paginate($this->Submissions));
$this->layout = 'defaultadmin';
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteRule ^$ public/ [L]
RewriteRule (.*) public/$1 [L]
</IfModule>
class ColorController extends Controller {
/**
* Display a listing of the resource.
*
* @return Response
*/
public function index()
{
// if you uncomment the next two lines, it will save the output to colors.html in the laravel public/cache folder