| Server IP : 10.200.247.200 / Your IP : 216.73.217.19 Web Server : Apache System : Linux synergy-usa-sites 6.8.0-138-generic #138-Ubuntu SMP PREEMPT_DYNAMIC Fri Jul 31 22:41:49 UTC 2026 x86_64 User : jeremy ( 1001) PHP Version : 8.4.25 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : OFF Directory : /var/www/hans_sites/froyo2me.com/functions/ |
Upload File : |
<?php
session_start();
if(isset($_POST['id'])) {
require_once($_SERVER['DOCUMENT_ROOT'].'/php/mysql.php');
if($_POST['id']=='0') {
$yogurt = array(
array(
'flavor' => 'No Toppings'
,'product' => '0'
,'product_image' => 'no_topping.jpg'
,'real_product_image_path' => '/images/toppings/no_topping.jpg'
)
);
} else {
$yogurt = $db->query("SELECT
display_name as flavor,
product,
product_image,
real_product_image_path
FROM ylreports_inventory.products
WHERE product='".clean($_POST['id'])."'
");
}
if(!empty($yogurt)) {
if(!isset($_SESSION['current_toppings'])) {
$_SESSION['current_toppings'] = array();
}
if(strlen($yogurt[0]['flavor'])>30) {
$yogurt[0]['short_flavor'] = substr($yogurt[0]['flavor'],0,30).'...';
} else {
$yogurt[0]['short_flavor'] = $yogurt[0]['flavor'];
}
$_SESSION['current_toppings'][] = $yogurt[0];
}
echo json_encode($_SESSION['current_toppings']);
}