示例#1
0
             </div>
            
            
            <div>
          <!--        <table data-role="table" class="ui-responsive">
                    <thead><th>WEEE CATEGORY</th><th>Weights</th></thead>
                <tbody>
                    <!-- Here content generated dynamically ,throu calculation modul   <tr> -->
                  
                         <?php 
//$result=calculate_weights($manifest_reg_id);
//echo show_result_one_row_at_time($result);
//     $manifest_reg_id= $_SESSION['MANIFEST_REG_ID'];
$weee_weights_calculated = calculate_weights($manifest_reg_id);
$atts = check_atts();
$categories_num = get_weee_categories();
//$att_flag=detect_atts($atts, $weee_weights_calculated);
//show_result_one_row_at_time_att($weee_weights_calculated,$att_flag[0],$att_flag[1],$att_flag[2]);
//get site from manifest counter
/*   
$sql="SELECT siteid from manifest_reg WHERE idmanifest_reg='$manifest_reg_id'";
$result=query_select($sql);
$rek=mysqli_fetch_array($result);
*/
//connect_dbi();
//
$att_weights = att_assignment($manifest_reg_id);
$att_flag = detect_atts($atts, $weee_weights_calculated);
//var_dump($att_weights);
//show_result_one_row_at_time($att_weights);
print_r($att_weights);
示例#2
0
/**
 * 
 * @param type $detected_flag
 * @param type $site_id
 */
function dbi_generate_delivery_dynamic_att($detected_flag, $site_id)
{
    //to be wrapped
    //get site from manifest counter
    // connect_dbi();
    echo "Generating dynamic delivery insert</BR>";
    $form_flag_att_name = $detected_flag[1];
    $flag_att = $detected_flag[0];
    //optimazie to store ins sesion
    echo $size_of_weee_cat = sizeof(get_weee_categories()[0]);
    print_r($form_flag_att_name);
    for ($i = 0; $i < $size_of_weee_cat; $i++) {
        //echo $i++;
        if (!empty($form_flag_att_name[$i])) {
            echo "Detected ATTS: " . $form_flag_att_name[$i];
        }
    }
    if ($detected_flag[0][1] == 1) {
        echo "WEEE Prepered to insert delievry";
        $stream_id = "93";
        //$stream_id=dbi_get_stream_reverse($stream_id);
        $site_id;
        $att = 1;
        dbi_write_att($site_id, $att, $stream_id);
    }
    if ($detected_flag[0][11] == 1) {
        echo "TV Prepered to insert delievry";
        $stream_id = "TV";
        //$stream_id=dbi_get_stream_reverse($stream_id);
        $site_id;
        $att = 1;
        dbi_write_att($site_id, $att, $stream_id);
    }
    if ($detected_flag[0][12] == 1) {
        echo "TVs Prepered to insert delievry";
        $stream_id = "A2";
        //$stream_id=dbi_get_stream_reverse($stream_id);
        $site_id;
        $att = 1;
        dbi_write_att($site_id, $att, $stream_id);
    }
    if ($detected_flag[0][13] == 1) {
        echo "CD's Prepered to insert delievry";
        $stream_id = "A1";
        //$stream_id=dbi_get_stream_reverse($stream_id);
        $site_id;
        $att = 1;
        dbi_write_att($site_id, $att, $stream_id);
    }
    if ($detected_flag[0][14] == 1) {
        echo "Toners Inks Prepered to insert delievry";
        $stream_id = "99";
        //$stream_id=dbi_get_stream_reverse($stream_id);
        $site_id;
        $att = 1;
        dbi_write_att($site_id, $att, $stream_id);
    }
    if ($detected_flag[0][15] == 1) {
        echo "Bric Prepered to insert delievry";
        $stream_id = "94";
        //$stream_id=dbi_get_stream_reverse($stream_id);
        $site_id;
        $att = 1;
        dbi_write_att($site_id, $att, $stream_id);
    }
    if ($detected_flag[0][18] == 1) {
        echo "Ferrous Prepered to insert delievry";
        $stream_id = "18";
        //$stream_id=dbi_get_stream_reverse($stream_id);
        $site_id;
        $att = 1;
        dbi_write_att($site_id, $att, $stream_id);
    }
    if ($detected_flag[0][19] == 1) {
        echo "Non-ferrous Prepered to insert delievry";
        $stream_id = "19";
        //$stream_id=dbi_get_stream_reverse($stream_id);
        $site_id;
        $att = 1;
        dbi_write_att($site_id, $att, $stream_id);
    }
}