This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Supplier management library | |
* @package Suppliers | |
* @author Ryan Marshall <ryan@irealms.co.uk> | |
*/ | |
class Suppliers_model extends BF_Model { | |
protected $table = 'bf_supplier_details'; | |
protected $key = 'id'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Content controller for supplier management | |
* @package Suppliers | |
* @author Ryan Marshall <ryan@irealms.co.uk> | |
*/ | |
class Content extends Admin_Controller { | |
public function __construct() | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public function search() | |
{ | |
$data = array( | |
'search_string' => $this->input->get_post('search_string') | |
); | |
$this->form_validation->set_data($data); | |
$this->form_validation->set_rules('search_string', 'Search', 'required'); | |
$results = NULL; | |
if ($this->form_validation->run($this) !== FALSE) | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Controller method | |
public function search() | |
{ | |
$results = NULL; | |
if ($this->input->get_post('search_string')) | |
{ | |
$results = $this->suppliers_model->search($this->limit, $this->input->get('per_page')); | |
$this->pager['base_url'] = current_url() . '?search_string=' . $this->input->get_post('search_string'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class Migration_Mapping_tables extends Migration { | |
public function up() | |
{ | |
$this->load->dbforge(); | |
// Create stock feed mapping table | |
$this->dbforge->add_field('supplier_id TINYINT(2) UNSIGNED NOT NULL AUTO_INCREMENT'); | |
$this->dbforge->add_field('sku TINYINT(2) NOT NULL'); | |
$this->dbforge->add_field('supplier_code TINYINT(2) NOT NULL'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class Migration_Foreign_keys extends Migration { | |
public $migration_type = 'sql'; | |
public function up() | |
{ | |
$prefix = $this->db->dbprefix; | |
$sql = " | |
ALTER TABLE {$prefix}supplier_pricing |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Supplier management library | |
* @package Suppliers | |
* @author Ryan Marshall <ryan@irealms.co.uk> | |
*/ | |
class Suppliers_model extends BF_Model { | |
protected $table = 'supplier_details'; | |
protected $key = 'id'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$fields = $this->db->list_fields('supplier_details'); | |
$ignore_fields = array('id'); | |
$use_fields = array_diff($fields, $ignore_fields); | |
$data = elements($use_fields, $this->input->post()); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
web1: #component type & number | |
name: irealms-pyrocms #component settings | |
shared_writable_dirs: | |
- /system/cms/cache/ | |
- /system/cms/logs/ | |
- /uploads/ | |
php_extensions: | |
- mysql | |
- gd | |
- curl |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* SplClassLoader implementation that implements the technical interoperability | |
* standards for PHP 5.3 namespaces and class names. | |
* | |
* http://groups.google.com/group/php-standards/web/final-proposal | |
* | |
* // Example which loads classes for the Doctrine Common package in the | |
* // Doctrine\Common namespace. |
OlderNewer