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
{ | |
"person":{ | |
"id":2370365, | |
"first_name":"Kenneth John", | |
"last_name":"Balgos", | |
"gender":"Male", | |
"campus":"", | |
"year_in_school":"Graduated", | |
"major":"", | |
"minor":null, |
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
# set commission only for non artists or artists whose not buying their own art | |
Rails.logger.debug '*' * 100 | |
Rails.logger.debug "artist id: #{User.current.artist.id} product id: #{li.product.id} (#{!User.current.artist}) || (#{User.current.artist && !User.current.artist.products.include?(li.product)})" | |
li.set_commissions if !User.current.artist || (User.current.artist && !User.current.artist.products.include?(li.product)) |
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
## _form.html.erb ## | |
<%= link_to(image_tag(element.element_data.url(:thumb)), portfolio_add_element_path(element), :remote=>true) %> | |
## Portfolios_Controller.rb ## | |
respond_to :js, :html | |
def add_element | |
@portfolio = Portfolio.find(portfolio_id) | |
@element = Element.find(element_id) |
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 | |
//Show category? | |
if ($cat_link_string != ''){ | |
$output = '<p><strong>' . $cat_link_string . '</strong></p>'; | |
}else{ | |
$output = ''; | |
} | |
$output .= '<ul class="lcp_catlist">';//For default ul |
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
foreach (var dimType in ViewData.Model.SelectedProduct.DimensionTypes) | |
{ | |
string ddlName = String.Format("ddlDimension_{0}", dimType.Key); | |
var dimensions = variations.Select(sv => sv.Dimensions.FirstOrDefault(d => d.TypeKey == dimType.Key)); | |
var valueList = dimensions | |
.Select(d => new { Key = d.Key, ShortValue = d.ShortValue, IsInStock = variations.Any(sv => sv.Available && sv.Dimensions.Any(sd => sd.Key == d.Key)) }) | |
.Distinct() | |
.OrderBy(d => DimensionSorter.GetSortOrder(d.Key)) | |
.ToList(); |
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
= render :partial => 'users/activity_tabs', :locals => {:selected => 'Wall'} | |
.listing | |
- unless displaying_dashboard? | |
%div.wallsectionhead | |
%h3 | |
Leave a Comment for | |
= @user.login | |
= spinner('wall') | |
.comment_box | |
- remote_form_for([@user, @user.comments.new], :before => "Element.show('spinner_wall')") do |f| |
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 | |
session_start(); | |
if (count($_FILES)) { | |
// Handle degraded form uploads here. Degraded form uploads are POSTed to index.php. SWFUpload uploads | |
// are POSTed to upload.php | |
} | |
?> | |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
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 (isset($_POST["PHPSESSID"])) { | |
session_id($_POST["PHPSESSID"]); | |
} | |
session_start(); | |
if (!isset($_FILES["Filedata"]) || !is_uploaded_file($_FILES["Filedata"]["tmp_name"]) || $_FILES["Filedata"]["error"] != 0) { | |
// Usually we'll only get an invalid upload if our PHP.INI upload sizes are smaller than the size of the file we allowed | |
// to be uploaded. | |
header("HTTP/1.1 500 File Upload Error"); |