This file contains hidden or 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 if ( ! defined('BASEPATH')) exit('No direct script access allowed'); | |
class Files extends MY_Controller { | |
function __construct() { | |
parent::__construct(); | |
//load dependecies | |
$this->load->model('admin/files_model'); | |
} | |
This file contains hidden or 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
$this->load->model('menus_model'); | |
$language = $this->uri->segment(1); | |
switch ($language) { | |
case 'pt': | |
$this->lang->load('front-end', 'portuguese'); | |
break; | |
case 'en': | |
$this->lang->load('front-end', 'english'); | |
break; |
This file contains hidden or 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
Show hidden characters
{ | |
"theme": "Soda Dark.sublime-theme", | |
"color_scheme": "Packages/Color Scheme - Default/Monokai.tmTheme", | |
"draw_white_space": "all", | |
"font_face": "Monaco", | |
"font_size": 13.0, | |
"highlight_line": true, | |
"highlight_modified_tabs": true, | |
"match_brackets": true, | |
"match_brackets_angle": true, |
This file contains hidden or 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 echo '<?xml version="1.0" encoding="utf-8"?>'; ?> | |
<rss version="2.0"> | |
<channel> | |
<title><?php echo $feed_name; ?></title> | |
<link><?php echo $feed_url; ?></link> | |
<description><?php echo $page_description; ?></description> | |
<lastBuildDate><?=date('D');?>, <?=date('d');?> <?=date('M');?> <?=date('Y');?> <?=date('G');?>:<?=date('i');?>:<?=date('s');?> <?=date('e');?></lastBuildDate> | |
<language><?php echo $page_language; ?></language> | |
<?php foreach ($posts as $post): ?> | |
<item> |
This file contains hidden or 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
function GetArticles($options = array()) { | |
// QUALIFICATION | |
if (isset($options['idarticle'])) | |
$this->db->where('idarticle', $options['idarticle']); | |
if (isset($options['idcategory'])) | |
$this->db->where('idcategory', $options['idcategory']); | |
if (isset($options['articletitle'])) | |
$this->db->where('articletitle', $options['articletitle']); | |
if (isset($options['articlestatus'])) |
This file contains hidden or 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
SELECT TOP 10 * | |
FROM Doctor AS D, Doctor_Hospital AS DH, Hospital AS H | |
JOIN Doctor ON Doctor.DoctorId = Doctor_Hospital.DoctorId | |
JOIN Hospital ON Doctor_Hospital.HospitalId = Hospital.HospitalId |
This file contains hidden or 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
<select> | |
<?php foreach( $articles as $article): ?> | |
<option id="<?= article->id ?>"><?= $article->title ?></option> | |
<?php endforeach; ?> | |
</select> |
This file contains hidden or 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 if ( ! defined('BASEPATH')) exit('No direct script access allowed'); | |
class MY_Config extends CI_Config { | |
function site_url($uri = '') | |
{ | |
if (is_array($uri)) | |
{ | |
$uri = implode('/', $uri); | |
} |
This file contains hidden or 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 if ( ! defined('BASEPATH')) exit('No direct script access allowed'); | |
class Name_model extends CI_Model { | |
public function insert( ) | |
{ | |
// This should be in a seperate file | |
$this->form_validation->set_rules('name', 'Name', 'trim|required|xss_clean'); | |
if ( $this->form_validation->run() ) | |
{ |
This file contains hidden or 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
//Now | |
/** | |
* Orders the result set by the criteria, | |
* using the same format as CI's AR library. | |
* | |
* @param mixed $criteria The criteria to order by | |
* @return void | |
* @since 1.1.2 | |
*/ |
OlderNewer