Exemple #1
0
            $out .= "<br>{$chem_arr[$chem4]}";
        }
        $out .= "\n       </td>\n       <td>{$type1}";
        if ($type2) {
            $out .= "<br>&nbsp;{$type2}";
        }
        $out .= "</td>\n    </tr>";
        if ($bg_color == "#FFFFFF") {
            $bg_color = "#E5EBFF";
        } else {
            $bg_color = "#FFFFFF";
        }
        $last_row = $row;
    }
    if ($count == "1") {
        $out = show_product($last_row, $conn);
    } elseif ($found) {
        $out = "<div style=\"padding:0 25px 0 0;\">\n\n<style>\ntd {\n\tfont-family: verdana, helvetica, sans-serif;\n\tfont-size: 11px;\n\tcolor: #0069b1;\n\tvertical-align: top;\n\tpadding: 4px 4px 4px 4px;\n}\ntr th {\n\ttext-align: center;\n\tbackground-color: #D5E7F4;\n   font-variant: small-caps\n}\n\n#overDiv {\n\tbackground-color: #FFF;\n\tborder: 1px solid gray;\n\tpadding: 10px;\n\t}\n\n</style>\n\n<table border=\"1\" cellspacing=\"0\" cellPadding=\"4\" width=\"100%\">\n   <tr>\n       <th>Trade name</th>\n       <th>Manufacturer</th>\n       <th>Components</th>\n       <th>Med type</th>\n    </tr>\n\n{$out}\n</table></div>";
    } else {
        $out = "No results found.";
    }
    #go back to joomla database:
    mysql_select_db("eyedockjoomla", $conn);
} else {
    $out = "No search Term specified.";
}
if (!empty($adv_search)) {
    $out .= '
<script type="text/javascript">
/* <![CDATA[ */
advsearch = {}
Exemple #2
0
        $selected = isset($product['project_id']) && $project['id'] == $product['project_id'] ? " selected=selected " : "";
        $project_dd .= "<option value=" . $project['id'] . $selected . ">" . $project['code_name'] . "</option>";
    }
    $project_dd .= "</SELECT>";
    echo $project_dd;
    exit;
}
// generate product options
if (isset($_GET['action']) && $_GET['action'] == 'show_product_opt') {
    $return = show_product_opt($_GET['project_id'], -1);
    echo $return;
    exit;
}
// show product in edit area
if (isset($_GET['action']) && $_GET['action'] == 'show_product') {
    $return = show_product($_GET['product_id']);
    echo json_encode($return);
    exit;
}
if (isset($_GET['action']) && $_GET['action'] == 'show_config_opt') {
    $product_config_id = isset($_GET['product_config_id']) ? $_GET['product_config_id'] : -1;
    $rt = show_config_opt($_GET['content_type'], $product_config_id);
    echo $rt;
    exit;
}
// save/insert product
if (isset($_GET['action']) && $_GET['action'] == 'save_product') {
    $product_id = $_GET['product_id'];
    $name = SQLString($_GET['name'], "text");
    $description = SQLString($_GET['description'], 'text');
    $content_type = $_GET['content_type'];