/**
  * Return the Manufacturers Navigator list view.
  *
  * @ finish the functions on this page
  */
 function outputManufacturersList()
 {
     global $application;
     $obj =& $application->getInstance('MessageResources');
     $ManufacturersList = modApiFunc('Manufacturers', 'getManufacturersList');
     $this->ManufacturersSize = sizeof($ManufacturersList);
     $retval = "";
     $count = 0;
     foreach ($ManufacturersList as $key => $value) {
         $checked = "";
         $this->_Current_Manufacturer =& $value;
         //            $this->_Current_Manufacturer["cssstyle"] = ((modApiFunc("PromoCodes", "isPromoCodeApplicableWithoutMinSubtotal", $value["id"]) === true) ? "color: black" : "color: #AAAAAA" );
         $request = new Request();
         $request->setView('EditManufacturer');
         $request->setAction('set_editable_manufacturer');
         $request->setKey('manufacturer_id', $value["manufacturer_id"]);
         $href = $request->getURL();
         $image_obj = new image_obj($value["manufacturer_image_id"]);
         $this->_Current_Manufacturer = array("local_manufacturerid" => $value["manufacturer_id"], "local_manufacturername" => prepareHTMLDisplay($value["manufacturer_name"]), "local_manufacturerurl" => $value["manufacturer_site_url"], "local_manufacturerimage" => $image_obj->is_empty() ? "" : getimage_output_az('mnf_image_' . $value["manufacturer_id"], $image_obj), "local_manufacturerstatus" => $value["manufacturer_active"] == DB_TRUE ? getMsg('MNF', 'STATUS_ACTIVE') : getMsg('MNF', 'STATUS_INACTIVE'), "local_manufacturercssstyle" => "", "local_manufacturereditmanufacturerhref" => $href);
         $this->_Current_Manufacturer["editmanufacturerhref"] = $href;
         $application->registerAttributes($this->_Current_Manufacturer);
         //->getAdditionalManufacturerTagList());
         $retval .= $this->mTmplFiller->fill("manufacturers/manufacturers_list/", "list_item.tpl.html", array());
         $count++;
     }
     $min_list_size = 10;
     if ($count == 0) {
         $retval .= $this->mTmplFiller->fill("manufacturers/manufacturers_list/", "list_item_empty_na_values.tpl.html", array());
         $count++;
     }
     for (; $count < $min_list_size; $count++) {
         $retval .= $this->mTmplFiller->fill("manufacturers/manufacturers_list/", $count == $min_list_size - 1 ? "list_bottom_item_empty.tpl.html" : "list_item_empty.tpl.html", array());
     }
     modApiFunc('Manufacturers', 'unsetEditableManufacturerID');
     return $retval;
 }
 function process_images_update_alt_text($alt_text_input_name, $image_id)
 {
     global $application;
     $request =& $application->getInstance('Request');
     $new_alt_text = $request->getValueByKey($alt_text_input_name);
     $image_obj = NULL;
     $data = modApiFunc('Images', 'selectImage', $image_id);
     if ($data !== NULL) {
         $data['image_alt_text'] = $new_alt_text;
         modApiFunc('Images', 'updateImage', $data);
         $image_obj = new image_obj($image_id);
     } else {
         $image_obj = new image_obj();
         $image_obj->set_error("ERR_IMAGE_ID_NOT_FOUND_IN_DB", $image_id);
     }
     return $image_obj;
 }