protected function _setData() { global $lC_Database, $lC_Language, $lC_Currencies, $lC_Vqmod; if (!$this->enabled) { $this->_data = ''; } else { $this->_data = '<div class="four-columns six-columns-tablet twelve-columns-mobile clear-both">' . ' <h2 class="relative thin">' . $this->_title . '</h2>' . ' <ul class="list spaced">'; if (!isset($lC_Currencies)) { if (!class_exists('lC_Currencies')) { include $lC_Vqmod->modCheck('../includes/classes/currencies.php'); } $lC_Currencies = new lC_Currencies(); } $Qproducts = $lC_Database->query('select p.products_id, greatest(p.products_date_added, p.products_last_modified) as date_last_modified, pd.products_name from :table_products p, :table_products_description pd where parent_id = 0 and p.products_id = pd.products_id and pd.language_id = :language_id order by date_last_modified desc limit 6'); $Qproducts->bindTable(':table_products', TABLE_PRODUCTS); $Qproducts->bindTable(':table_products_description', TABLE_PRODUCTS_DESCRIPTION); $Qproducts->bindInt(':language_id', $lC_Language->getID()); $Qproducts->execute(); while ($Qproducts->next()) { $data = lC_Products_Admin::get($Qproducts->valueInt('products_id')); $products_icon = lc_icon_admin('products.png'); $products_price = $data['products_price']; if (!empty($data['variants'])) { $products_icon = lc_icon_admin('attach.png'); $products_price = null; foreach ($data['variants'] as $variant) { if ($products_price === null || $variant['data']['price'] < $products_price) { $products_price = $variant['data']['price']; } } if ($products_price === null) { $products_price = 0; } } $this->_data .= ' <li>' . ' <span class="list-link icon-bag icon-blue" title="' . $lC_Language->get('edit') . '">' . ' <strong>' . (!empty($data['variants']) ? $lC_Language->get('text_from') . ' ' : '') . $lC_Currencies->format($products_price) . '</strong> <span class="anthracite">' . lc_output_string_protected($data['products_name']) . '</span>' . ' </span>' . ' <div class="absolute-right compact show-on-parent-hover">' . ' <a href="' . ((int) ($_SESSION['admin']['access']['products'] < 3) ? '#' : lc_href_link_admin(FILENAME_DEFAULT, 'products=' . $Qproducts->valueInt('products_id') . '&cID=' . $category_id . '&action=save')) . '" class="button icon-pencil' . ((int) ($_SESSION['admin']['access']['products'] < 3) ? ' disabled' : NULL) . '">' . $lC_Language->get('icon_edit') . '</a>' . ' <a href="' . ((int) ($_SESSION['admin']['access']['products'] < 3) ? '#' : 'javascript://" onclick="copyProduct(\'' . $Qproducts->valueInt('products_id') . '\', \'' . urlencode($Qproducts->value('products_name')) . '\')') . '" class="button icon-pages with-tooltip' . ((int) ($_SESSION['admin']['access']['products'] < 3) ? ' disabled' : NULL) . '" title="' . $lC_Language->get('icon_copy') . '"></a>' . ' <a href="' . ((int) ($_SESSION['admin']['access']['products'] < 4) ? '#' : 'javascript://" onclick="deleteProduct(\'' . $Qproducts->valueInt('products_id') . '\', \'' . urlencode($Qproducts->value('products_name')) . '\')') . '" class="button icon-trash with-tooltip' . ((int) ($_SESSION['admin']['access']['products'] < 4) ? ' disabled' : NULL) . '" title="' . $lC_Language->get('icon_delete') . '"></a>' . ' </div>' . ' </li>'; } $this->_data .= ' </ul>' . '</div>'; $Qproducts->freeResult(); $this->_data .= $this->loadModal(); } }
protected function _setIcon() { $this->_icon = lc_icon_admin('reports.png'); }
public static function formData($id = null) { global $lC_Database, $lC_Language, $_module; $lC_Language->loadIniFile('customers.php'); $result = array(); $Qgroups = $lC_Database->query('select customers_group_id, customers_group_name from :table_customers_groups where language_id = :language_id order by customers_group_name'); $Qgroups->bindTable(':table_customers_groups', TABLE_CUSTOMERS_GROUPS); $Qgroups->bindInt(':language_id', $lC_Language->getID()); $Qgroups->execute(); $groups_array = array(); while ($Qgroups->next()) { $groups_array[$Qgroups->value('customers_group_id')] = $Qgroups->value('customers_group_name'); } $result['groupsArray'] = $groups_array; if ($id != null) { $result['customerData'] = lC_Customers_Admin::getData($id); $Qaddresses = lC_Customers_Admin::getAddressBookData($id); $cnt = 0; $result['addressBook'] = ''; $body .= '<ul class="list spaced">'; while ($Qaddresses->next()) { $primary = $result['customerData']['customers_default_address_id'] == $Qaddresses->valueInt('address_book_id') ? 'true' : 'false'; $body .= '<li class="">'; $body .= '<span class="button-group compact float-right">' . ' <a href="' . ((int) ($_SESSION['admin']['access'][$_module] < 3) ? '#' : 'javascript://" onclick="editAddress(\'' . $Qaddresses->valueInt('address_book_id') . '\', \'' . $primary . '\')') . '" class="button icon-pencil' . ((int) ($_SESSION['admin']['access'][$_module] < 3) ? ' disabled' : NULL) . '">' . $lC_Language->get('icon_edit') . '</a>' . ' <a href="' . ((int) ($_SESSION['admin']['access'][$_module] < 4) ? '#' : 'javascript://" onclick="deleteAddress(\'' . $Qaddresses->valueInt('address_book_id') . '\')') . '" class="button icon-trash with-tooltip' . ((int) ($_SESSION['admin']['access'][$_module] < 4) ? ' disabled' : NULL) . '" title="' . $lC_Language->get('icon_delete') . '"></a>' . '</span>'; if (ACCOUNT_GENDER > -1) { switch ($Qaddresses->value('gender')) { case 'm': $body .= '<span>' . lc_icon_admin('male.png') . '</span>'; break; case 'f': $body .= '<span>' . lc_icon_admin('female.png') . '</span>'; break; default: $body .= '<span>' . lc_icon_admin('people.png') . '</span>'; break; } } else { $body .= '<span>' . lc_icon_admin('people.png') . '</span>'; } $body .= '<span class="small-margin-left">' . lC_Address::format($Qaddresses->toArray(), ' <br /> ') . '</span>'; if ($primary == 'true') { $body .= '<small class="tag small-margin-left purple-gradient glossy" style="position:absolute; top:12px; right:88px;">' . $lC_Language->get('primary_address') . '</small>'; } $body .= '<span class="icon-phone icon-blue" style="position:absolute; top:17px; left:200px;">'; if (!lc_empty($Qaddresses->valueProtected('telephone_number'))) { $body .= $Qaddresses->valueProtected('telephone_number'); } else { $body .= '<small class="tag silver-gradient glossy"><i>' . $lC_Language->get('no_telephone_number') . '</i></small>'; } $body .= '</span>'; $body .= '<span class="icon-printer icon-orange" style="position:absolute; top:46px; left:200px;">'; if (!lc_empty($Qaddresses->valueProtected('fax_number'))) { $body .= $Qaddresses->valueProtected('fax_number'); } else { $body .= '<small class="tag silver-gradient glossy"><i>' . $lC_Language->get('no_fax_number') . '</i></small>'; } $body .= '</span>'; $body .= '</li>'; $cnt++; } $body .= '</ul>'; $result['addressBook'] = $body; // set default country to store country $country_id = STORE_COUNTRY; $Qzones = $lC_Database->query('select zone_name from :table_zones where zone_country_id = :zone_country_id order by zone_name'); $Qzones->bindTable(':table_zones', TABLE_ZONES); $Qzones->bindInt(':zone_country_id', $country_id); $Qzones->execute(); $zones_array = array(); while ($Qzones->next()) { $zones_array[] = array('id' => $Qzones->value('zone_name'), 'text' => $Qzones->value('zone_name')); } $result['abState'] = lc_draw_pull_down_menu('ab_state', $zones_array, null, 'class="input with-small-padding" style="width:73%;"'); } $countries_array = array(); foreach (lC_Address::getCountries() as $country) { $countries_array[$country['id']] = $country['name']; } $result['countriesArray'] = $countries_array; return $result; }
$Qdata->bindValue(':code', 'date_available'); $Qdata->bindValue(':modules_group', 'product_attributes'); $Qdata->execute(); $lC_ObjectInfo->set('products_date_available', $Qdata->value('products_date_available')); ?> <h1><?php echo lc_link_object(lc_href_link_admin(FILENAME_DEFAULT, $lC_Template->getModule()), $lC_Template->getPageTitle()); ?> </h1> <?php if ($lC_MessageStack->exists($lC_Template->getModule())) { echo $lC_MessageStack->get($lC_Template->getModule()); } ?> <div class="infoBoxHeading"><?php echo lc_icon_admin('edit.png') . ' ' . $lC_ObjectInfo->getProtected('products_name'); ?> </div> <div class="infoBoxContent"> <form name="pEdit" action="<?php echo lc_href_link_admin(FILENAME_DEFAULT, $lC_Template->getModule() . '&page=' . $_GET['page'] . '&pID=' . $lC_ObjectInfo->getInt('products_id') . '&action=save'); ?> " method="post"> <p><?php echo $lC_Language->get('introduction_edit_product_expected'); ?> </p> <p><?php echo $lC_Language->get('field_date_expected') . '<br />' . lc_draw_input_field('products_date_available', $lC_ObjectInfo->get('products_date_available')); ?> </p>
<p align="center"><?php echo '<input type="button" value="' . IMAGE_RESTORE . '" class="operationButton" onclick="document.location.href=\'' . lc_href_link(FILENAME_DEFAULT, $lC_Template->getModule() . '&file=' . $buInfo->file . '&action=restorenow') . '\';"> <input type="button" value="' . IMAGE_CANCEL . '" onclick="toggleInfoBox(\'bDefault\');" class="operationButton">'; ?> </p> </div> </div> <div id="infoBox_bDelete" <?php if ($_GET['action'] != 'bDelete') { echo 'style="display: none;"'; } ?> > <div class="infoBoxHeading"><?php echo lc_icon_admin('trash.png', IMAGE_DELETE) . ' ' . $buInfo->file; ?> </div> <div class="infoBoxContent"> <p><?php echo TEXT_DELETE_INTRO; ?> </p> <p><?php echo '<b>' . $buInfo->file . '</b>'; ?> </p> <p align="center"><?php echo '<input type="button" value="' . IMAGE_DELETE . '" class="operationButton" onclick="document.location.href=\'' . lc_href_link(FILENAME_DEFAULT, $lC_Template->getModule() . '&file=' . $buInfo->file . '&action=deleteconfirm') . '\';"> <input type="button" value="' . IMAGE_CANCEL . '" onclick="toggleInfoBox(\'bDefault\');" class="operationButton">'; ?>
protected function _setIcon() { $this->_icon = lc_icon_admin('orders.png'); }
<p><?php echo $lC_Language->get('text_introduction_select_local_images'); ?> </p> <select id="localImagesSelection" name="localimages[]" size="5" multiple="multiple" style="width: 100%;"></select> <div id="showProgressGetLocalImages" style="display: none; float: right; padding-right: 10px;"><?php echo lc_icon_admin('progress_ani.gif') . ' ' . $lC_Language->get('image_retrieving_local_files'); ?> </div> <p><?php echo realpath('../images/products/_upload'); ?> </p> <?php if (isset($pInfo)) { echo '<input type="button" value="Assign To Product" class="operationButton" onclick="assignLocalImages();" /><div id="showProgressAssigningLocalImages" style="display: none; padding-left: 10px;">' . lc_icon_admin('progress_ani.gif') . ' ' . $lC_Language->get('image_multiple_upload_progress') . '</div>'; } ?> </div> </div> <?php if (isset($pInfo)) { ?> <div id="defaultImagesContainer"> <div id="defaultImages" style="overflow: auto;" class="small-margin-top"></div> </div> <!--VQMOD3--> <?php }