Ejemplo n.º 1
0
    $query = mysql_query($sql, $conn);
    $result = mysql_fetch_array($query);
    return $result;
}
function get_how($post_product_id)
{
    $conn = connDB();
    $sql = "SELECT * FROM tbl_product_custom WHERE `product_id` = '{$post_product_id}'";
    $query = mysql_query($sql, $conn);
    $result = mysql_fetch_array($query);
    return $result;
}
// DEFINED VARIABLE
$ajax_alias = $_POST['alias'];
// CALL FUNCTION
$data_product = get_product_how($ajax_alias);
$how = get_how($data_product['id']);
?>

    <span id="id_custom_container">
    
      <div class="box row">
        <div class="desc col-xs-3">
          <h3>Content</h3>
          <p>Descriptions about your information.</p>
        </div>
        <div class="content col-xs-9">
          <ul class="form-set">
          
            <li class="form-group row underlined">
              <label class="control-label col-xs-12">How To Use</label><br /><br />
Ejemplo n.º 2
0
// CALL FUNCTION
$ct_default = get_default_products($pre_product_alias);
$page_product = page_get_product($pre_product_alias);
$page_type = page_get_type($pre_product_alias);
$count_product_lang = count_product_lang($ct_default['id'], $_REQUEST['lang']);
$count_type_lang = count_type_lang($ct_default['id'], $_REQUEST['lang']);
$product_lang = get_product_lang($ct_default['id'], $_REQUEST['lang']);
if ($count_product_lang['rows'] > 0) {
    $page_product['product_name'] = $product_lang['product_name'];
} else {
    $page_product['product_name'] = $page_product['product_name'];
}
// DATA VALUE
$lang_code = $_REQUEST['lang'];
// CALL FUNCTION
$data_product = get_product_how($_REQUEST['product_alias']);
$check_how = check_how($ct_default['id'], $lang_code);
if ($check_how['rows'] > 0) {
    $how = get_how_lang($data_product['id'], $lang_code);
} else {
    $how = get_how($data_product['id']);
}
if (isset($_POST['btn_product_lang'])) {
    //foreach($ct_default as $ct_default){
    /* -- DATA VALUE -- */
    // DEFAULT VALUE
    // PRODUCT
    $def_product_id = $ct_default['id'];
    $def_product_name = $ct_default['product_name'];
    $def_product_sold_out = $ct_default['product_sold_out'];
    $def_product_category = $ct_default['product_category'];