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 $contain = array( | |
'Module' => array( | |
'Question' => array( | |
'Answer', | |
'order' => 'RAND()', | |
'limit' => 15 | |
), | |
'order' => array('order','name') | |
) | |
); |
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
def update | |
@company = Company.find(params[:id]) | |
# @company.user = current_user | |
@company.projects.each do |p| | |
if p.user.nil? | |
p.user = current_user | |
end | |
end |
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
<div class="root-box"> | |
<h1><%= link_to 'Companies', companies_path %></h1> | |
<div class="company-box"> | |
<h1><%= h @company.name %></h1> | |
<% if [email protected]? %> | |
<h2><%= h @company.user.username %></h2> | |
<% end %> | |
<%= link_to 'Edit', edit_company_path(@company) %> |
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 | |
/** | |
* | |
* PHP versions 4 and 5 | |
* | |
* CakePHP(tm) : Rapid Development Framework (http://cakephp.org) | |
* Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org) | |
* | |
* Licensed under The MIT License | |
* Redistributions of files must retain the above copyright notice. |
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
<html> | |
<head> | |
<script type="application/javascript"> | |
var blts = [];c=100;w=800;h=600;f=0;fps=40; | |
function rd(a){return Math.floor(Math.random()*a)}; | |
function neg(a){if (a < 0){return -1}else{return 1}} | |
function draw() { | |
var canvas = document.getElementById("canvas"); | |
if (canvas.getContext) { |
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
{Slash} the [chicken legs] all over with a knife. {Pick} the [cilantro leaves] and put them to one side. Add the [stalks] to a <food processor> with the rest of the ingredients and {whizz} to make a paste. |
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 Contact_model extends Model { | |
function Contact_model() | |
{ | |
parent::Model(); | |
} | |
} |
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 Contact extends Controller { | |
function Contact() | |
{ | |
parent::Controller(); | |
$this->load->helper(array('form','url','html','email')); | |
$this->load->library(array('tank_auth','Jquery_pagination','form_validation')); | |
} |
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
$status_options = array(); | |
foreach($statuses as $status){ | |
$status_options[$status->id]=$status->name; | |
} |
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
$this->db->where('id',$contact_id); | |
$this->db->where('status_id',"1"); | |
$query = $this->db->from('contacts'); | |
echo $this->db->last_query(); |
OlderNewer