Пример #1
0
function ComboBoxottoDeNavIDs($name, $value = '', $class = '', $html_params = '')
{
    $navid = ottoDeNavIDs();
    $navoptions = '<select name="' . $name . '"';
    if ($class != '') {
        $navoptions .= ' class="' . $class . '"';
    }
    if ($html_params != '') {
        $navoptions .= ' ' . $html_params;
    }
    $navoptions .= '>';
    $selected = $value == '' ? 'selected="selected"' : '';
    $navoptions .= '<option value="" ' . $selected . '>Please select a navigation...</option>';
    foreach ($navid as $val => $text) {
        $selected = $value == $val ? 'selected="selected"' : '';
        $navoptions .= '<option value="' . $val . '" ' . $selected . '>' . $text . '</option>';
    }
    $navoptions .= '</select>';
    return $navoptions;
}
 //If we have products to export, then check
 //that all products are readyto be uploaded
 //Prepare variables to hold products with each error
 $product_articles = array();
 $product_images = array();
 $eanproblem = array();
 $noname = array();
 $nodescription = array();
 $price20eur = array();
 $price0 = array();
 $navproblem = array();
 $imagesproblem = array();
 $imagesproblem2 = array();
 $colorproblem = array();
 //Get SP Navigations
 $navids = ottoDeNavIDs();
 foreach ($products as $rowcount => $row) {
     $pid = $row['products_id'];
     //Keep articles data as reference
     $product_articles[$pid] = $class_pa->retrieveList($pid);
     //Check if need to echo something (preventing browser timeout)
     if ($rowcount % $echo_steps == 0) {
         echo ". ";
     }
     //Check if EAN exist
     if ($row['products_ean'] == '') {
         $eanproblem[] = $pid;
     } else {
         foreach ($product_articles[$pid] as $pa) {
             if ($pa['products_ean'] == '') {
                 $eanproblem[] = $pid;