Difference between revisions of "User:Penchant"

From BattleMaster Wiki
Jump to navigation Jump to search
m (Replaced content with "I am the player of the Penchant family.")
m
Line 1: Line 1:
 
I am the player of the Penchant family.
 
I am the player of the Penchant family.
 +
 +
<?php
 +
 +
function get_list_view_html ($product) {
 +
 +
        $output="";
 +
 +
        $output = $output . "<li>";
 +
        $output = $output . '<a href="' . BASE_URL . 'shirts/' . $product["sku"] . '/">';
 +
        //$output = $output . '<h2>'. $product["name"].'</h2>';
 +
        $output = $output . '<img src="'. BASE_URL. $product["img"] .'" alt="'. $product["name"].'">';
 +
        $output = $output . "<p>View Details</p>";
 +
        $output = $output . "</a>";
 +
        $output = $output . "</li>";
 +
                   
 +
    return $output;
 +
}
 +
 +
function get_products_recent() {
 +
$recent = array();
 +
$all = get_products_all();
 +
 +
$total_products = count($all);
 +
$position= 0;
 +
 +
foreach($all as $product) {
 +
$position= $position + 1;
 +
if ($total_products - $position <4) {
 +
$recent[]=$product;
 +
}
 +
return $recent;
 +
}
 +
function get_products_all () {
 +
$products = array();
 +
$products[101] = array(
 +
    "name" => "Logo Shirt, Red",
 +
    "img" => "img/shirts/shirt-101.jpg",
 +
    "price" => 18,
 +
    "paypal" => "XFY3PQUFA3YCE",
 +
    "sizes" => array("Small", "Medium", "Large", "X-Large"),
 +
);
 +
$products[102] = array(
 +
    "name" => "Mike the Frog Shirt, Black",
 +
    "img" => "img/shirts/shirt-102.jpg",
 +
    "price" => 20,
 +
    "paypal" => "P42TAPCW7HAV8",
 +
    "sizes" => array("Small", "Medium", "Large", "X-Large"),
 +
);
 +
$products[103] = array(
 +
    "name" => "Mike the Frog Shirt, Blue",
 +
    "img" => "img/shirts/shirt-103.jpg",   
 +
    "price" => 20,
 +
    "paypal" => "69EY6SDMW7HW8",
 +
    "sizes" => array("Small", "Medium", "Large", "X-Large"),
 +
);
 +
$products[104] = array(
 +
    "name" => "Logo Shirt, Green",
 +
    "img" => "img/shirts/shirt-104.jpg",   
 +
    "price" => 18,
 +
    "paypal" => "6Y94JRQGWU42U",
 +
    "sizes" => array("Small", "Medium", "Large", "X-Large"),
 +
);
 +
$products[105] = array(
 +
    "name" => "Mike the Frog Shirt, Yellow",
 +
    "img" => "img/shirts/shirt-105.jpg",   
 +
    "price" => 25,
 +
    "paypal" => "C2MYKY7N46ERL",
 +
    "sizes" => array("Small", "Medium", "Large", "X-Large"),
 +
);
 +
$products[106] = array(
 +
    "name" => "Logo Shirt, Gray",
 +
    "img" => "img/shirts/shirt-106.jpg",   
 +
    "price" => 20,
 +
    "paypal" => "W96HC2TE89WSY",
 +
    "sizes" => array("Small", "Medium", "Large", "X-Large"),
 +
);
 +
$products[107] = array(
 +
    "name" => "Logo Shirt, Turquoise",
 +
    "img" => "img/shirts/shirt-107.jpg",   
 +
    "price" => 20,
 +
    "paypal" => "DP5MLLGRGZAC2",
 +
    "sizes" => array("Small", "Medium", "Large", "X-Large"),
 +
);
 +
$products[108] = array(
 +
    "name" => "Logo Shirt, Orange",
 +
    "img" => "img/shirts/shirt-108.jpg",   
 +
    "price" => 25,
 +
    "paypal" => "V5P4R5HZ7V75J",
 +
    "sizes" => array("Large", "X-Large"),
 +
);
 +
 +
foreach ($products as $product_id => $product) {
 +
$products[$product_id]["sku"] = $product_id;
 +
}
 +
 +
return $products;
 +
}
 +
?>

Revision as of 02:15, 30 March 2015

I am the player of the Penchant family.

<?php

function get_list_view_html ($product) {

       $output="";

$output = $output . "

  • "; $output = $output . '<a href="' . BASE_URL . 'shirts/' . $product["sku"] . '/">'; //$output = $output . '

    '. $product["name"].'

    ';
           $output = $output . ''. $product[';
    
    $output = $output . "

    View Details

    ";
           $output = $output . "</a>";
    
    $output = $output . "
  • "; return $output; } function get_products_recent() { $recent = array(); $all = get_products_all(); $total_products = count($all); $position= 0; foreach($all as $product) { $position= $position + 1; if ($total_products - $position <4) { $recent[]=$product; } return $recent; } function get_products_all () { $products = array(); $products[101] = array( "name" => "Logo Shirt, Red", "img" => "img/shirts/shirt-101.jpg", "price" => 18, "paypal" => "XFY3PQUFA3YCE", "sizes" => array("Small", "Medium", "Large", "X-Large"), ); $products[102] = array( "name" => "Mike the Frog Shirt, Black", "img" => "img/shirts/shirt-102.jpg", "price" => 20, "paypal" => "P42TAPCW7HAV8", "sizes" => array("Small", "Medium", "Large", "X-Large"), ); $products[103] = array( "name" => "Mike the Frog Shirt, Blue", "img" => "img/shirts/shirt-103.jpg", "price" => 20, "paypal" => "69EY6SDMW7HW8", "sizes" => array("Small", "Medium", "Large", "X-Large"), ); $products[104] = array( "name" => "Logo Shirt, Green", "img" => "img/shirts/shirt-104.jpg", "price" => 18, "paypal" => "6Y94JRQGWU42U", "sizes" => array("Small", "Medium", "Large", "X-Large"), ); $products[105] = array( "name" => "Mike the Frog Shirt, Yellow", "img" => "img/shirts/shirt-105.jpg", "price" => 25, "paypal" => "C2MYKY7N46ERL", "sizes" => array("Small", "Medium", "Large", "X-Large"), ); $products[106] = array( "name" => "Logo Shirt, Gray", "img" => "img/shirts/shirt-106.jpg", "price" => 20, "paypal" => "W96HC2TE89WSY", "sizes" => array("Small", "Medium", "Large", "X-Large"), ); $products[107] = array( "name" => "Logo Shirt, Turquoise", "img" => "img/shirts/shirt-107.jpg", "price" => 20, "paypal" => "DP5MLLGRGZAC2", "sizes" => array("Small", "Medium", "Large", "X-Large"), ); $products[108] = array( "name" => "Logo Shirt, Orange", "img" => "img/shirts/shirt-108.jpg", "price" => 25, "paypal" => "V5P4R5HZ7V75J", "sizes" => array("Large", "X-Large"), ); foreach ($products as $product_id => $product) { $products[$product_id]["sku"] = $product_id; } return $products; } ?>