public static function getFormData($id = null, $edit = false) { global $lC_Database, $lC_Language; $result = array(); $result['titleCode'] = ''; foreach ($lC_Language->getAll() as $l) { $result['titleCode'] .= '<span class="input" style="width:95%"><label for="title[' . $l['id'] . ']" class="button silver-gradient glossy">' . $lC_Language->showImage($l['code']) . '</label>' . lc_draw_input_field('title[' . $l['id'] . ']', null, 'class="input-unstyled"') . '</span><br />'; } if (isset($id) && $id != null) { $lC_ObjectInfo = new lC_ObjectInfo(lC_Image_groups_Admin::getData($id)); $status_name = array(); $Qgd = $lC_Database->query('select language_id, title from :table_products_images_groups where id = :id'); $Qgd->bindTable(':table_products_images_groups', TABLE_PRODUCTS_IMAGES_GROUPS); $Qgd->bindInt(':id', $id); $Qgd->execute(); while ($Qgd->next()) { $status_name[$Qgd->valueInt('language_id')] = $Qgd->value('title'); } $result['editTitleCode'] = ''; foreach ($lC_Language->getAll() as $l) { $result['editTitleCode'] .= '<span class="input" style="width:95%"><label for="title[' . $l['id'] . ']" class="button silver-gradient glossy">' . $lC_Language->showImage($l['code']) . '</label>' . lc_draw_input_field('title[' . $l['id'] . ']', isset($status_name[$l['id']]) ? $status_name[$l['id']] : null, 'class="input-unstyled"') . '</span><br />'; } $result['code'] = $lC_ObjectInfo->get('code'); $result['width'] = $lC_ObjectInfo->get('size_width'); $result['height'] = $lC_ObjectInfo->get('size_height'); $result['force_size'] = $lC_ObjectInfo->get('force_size'); } return $result; }
/** @package admin::graphs @author Loaded Commerce @copyright Copyright 2003-2014 Loaded Commerce, LLC @copyright Portions Copyright 2003 osCommerce @license https://github.com/loadedcommerce/loaded7/blob/master/LICENSE.txt @version $Id: banner_yearly.php v1.0 2013-08-08 datazen $ */ function lc_banner_yearly($_id) { global $lC_Database, $lC_Language, $lC_Vqmod; require $lC_Vqmod->modCheck('external/panachart/panachart.php'); $lC_ObjectInfo = new lC_ObjectInfo(lC_Banner_manager_Admin::getData($_id)); $image_extension = lc_dynamic_image_extension(); $views = array(); $clicks = array(); $vLabels = array(); $stats = array(); $Qstats = $lC_Database->query('select year(banners_history_date) as year, sum(banners_shown) as value, sum(banners_clicked) as dvalue from :table_banners_history where banners_id = :banners_id group by year'); $Qstats->bindTable(':table_banners_history', TABLE_BANNERS_HISTORY); $Qstats->bindInt(':banners_id', $_id); $Qstats->execute(); while ($Qstats->next()) { $stats[] = array($Qstats->valueInt('year'), $Qstats->valueInt('value') > 0 ? $Qstats->valueInt('value') : '0', $Qstats->valueInt('dvalue') > 0 ? $Qstats->valueInt('dvalue') : '0'); $views[] = $Qstats->valueInt('value'); $clicks[] = $Qstats->valueInt('dvalue'); $vLabels[] = $Qstats->valueInt('year'); } $ochart = new chart(600, 350, 5, '#eeeeee'); $ochart->setTitle(sprintf($lC_Language->get('subsection_heading_statistics_yearly'), $lC_ObjectInfo->get('banners_title')), '#000000', 2); $ochart->setPlotArea(SOLID, '#444444', '#dddddd'); $ochart->setFormat(0, ',', '.'); $ochart->setXAxis('#000000', SOLID, 1, ''); $ochart->setYAxis('#000000', SOLID, 2, ''); $ochart->setLabels($vLabels, '#000000', 1, VERTICAL); $ochart->setGrid('#bbbbbb', DASHED, '#bbbbbb', DOTTED); $ochart->addSeries($views, 'area', 'Series1', SOLID, '#000000', '#0000ff'); $ochart->addSeries($clicks, 'area', 'Series1', SOLID, '#000000', '#ff0000'); $ochart->plot('images/graphs/banner_yearly-' . $_id . '.' . $image_extension); return $stats; }
public static function formData($id = null) { global $lC_Database, $lC_DateTime; $result = array(); if (isset($id) && is_numeric($id)) { $lC_ObjectInfo = new lC_ObjectInfo(lC_Products_Admin::get($id)); $Qdata = $lC_Database->query('select pa.value as products_date_available from :table_product_attributes pa, :table_templates_boxes tb where tb.code = :code and tb.modules_group = :modules_group and tb.id = pa.id'); $Qdata->bindTable(':table_product_attributes', TABLE_PRODUCT_ATTRIBUTES); $Qdata->bindTable(':table_templates_boxes', TABLE_TEMPLATES_BOXES); $Qdata->bindValue(':code', 'date_available'); $Qdata->bindValue(':modules_group', 'product_attributes'); $Qdata->execute(); $lC_ObjectInfo->set('products_date_available', $Qdata->value('products_date_available')); $result['pDate'] = $lC_ObjectInfo->get('products_date_available'); $Qdata->freeResult(); } return $result; }
/** @package admin::graphs @author Loaded Commerce @copyright Copyright 2003-2014 Loaded Commerce, LLC @copyright Portions Copyright 2003 osCommerce @license https://github.com/loadedcommerce/loaded7/blob/master/LICENSE.txt @version $Id: banner_daily.php v1.0 2013-08-08 datazen $ */ function lc_banner_daily($_id, $_month, $_year) { global $lC_Database, $lC_Language, $lC_Vqmod; require $lC_Vqmod->modCheck('external/panachart/panachart.php'); $lC_ObjectInfo = new lC_ObjectInfo(lC_Banner_manager_Admin::getData($_id)); $image_extension = lc_dynamic_image_extension(); $views = array(); $clicks = array(); $vLabels = array(); $days = @date('t', @mktime(0, 0, 0, $_month)) + 1; $stats = array(); for ($i = 1; $i < $days; $i++) { $stats[] = array($i, '0', '0'); $views[$i - 1] = 0; $clicks[$i - 1] = 0; $vLabels[] = $i; } $Qstats = $lC_Database->query('select dayofmonth(banners_history_date) as banner_day, banners_shown as value, banners_clicked as dvalue from :table_banners_history where banners_id = :banners_id and month(banners_history_date) = :month and year(banners_history_date) = :year'); $Qstats->bindTable(':table_banners_history', TABLE_BANNERS_HISTORY); $Qstats->bindInt(':banners_id', $_id); $Qstats->bindInt(':month', $_month); $Qstats->bindInt(':year', $_year); $Qstats->execute(); while ($Qstats->next()) { $stats[$Qstats->valueInt('banner_day') - 1] = array($Qstats->valueInt('banner_day'), $Qstats->valueInt('value') > 0 ? $Qstats->valueInt('value') : '0', $Qstats->valueInt('dvalue') > 0 ? $Qstats->valueInt('dvalue') : '0'); $views[$Qstats->valueInt('banner_day') - 1] = $Qstats->valueInt('value'); $clicks[$Qstats->valueInt('banner_day') - 1] = $Qstats->valueInt('dvalue'); } $ochart = new chart(600, 350, 5, '#eeeeee'); $ochart->setTitle(sprintf($lC_Language->get('subsection_heading_statistics_daily'), $lC_ObjectInfo->get('banners_title'), @strftime('%B', @mktime(0, 0, 0, $_month)), $_year), '#000000', 2); $ochart->setPlotArea(SOLID, '#444444', '#dddddd'); $ochart->setFormat(0, ',', '.'); $ochart->setXAxis('#000000', SOLID, 1, ''); $ochart->setYAxis('#000000', SOLID, 2, ''); $ochart->setLabels($vLabels, '#000000', 1, VERTICAL); $ochart->setGrid('#bbbbbb', DASHED, '#bbbbbb', DOTTED); $ochart->addSeries($views, 'area', 'Series1', SOLID, '#000000', '#0000ff'); $ochart->addSeries($clicks, 'area', 'Series1', SOLID, '#000000', '#ff0000'); $ochart->plot('images/graphs/banner_daily-' . $_id . '_' . $_month . '.' . $image_extension); return $stats; }
public function __construct() { global $lC_Database, $lC_Language, $cInfo; $this->_page_title = $lC_Language->get('heading_title'); $action = isset($_GET['action']) && empty($_GET['action']) === false ? preg_replace('/[^a-z\\s]/', '', $_GET['action']) : NULL; switch ($action) { case 'save': if (is_numeric($_GET[$this->_module])) { $cInfo = new lC_ObjectInfo(lC_Coupons_Admin::get($_GET[$this->_module])); $Qcd = $lC_Database->query('select * from :table_coupons_description where coupons_id = :coupons_id'); $Qcd->bindTable(':table_coupons_description', TABLE_COUPONS_DESCRIPTION); $Qcd->bindInt(':coupons_id', $cInfo->get('coupons_id')); $Qcd->execute(); $name = array(); while ($Qcd->next()) { $name[$Qcd->valueInt('language_id')] = $Qcd->value('name'); } $cInfo->set('name', $name); } break; } }
/** @package catalog::admin::applications @author Loaded Commerce @copyright Copyright 2003-2014 Loaded Commerce, LLC @copyright Portions Copyright 2003 osCommerce @copyright Template built on Developr theme by DisplayInline http://themeforest.net/user/displayinline under Extended license @license https://github.com/loadedcommerce/loaded7/blob/master/LICENSE.txt @version $Id: edit.php v1.0 2013-08-08 datazen $ */ global $lC_Vqmod; if (is_numeric($_GET[$lC_Template->getModule()])) { $pInfo = new lC_ObjectInfo(lC_Products_Admin::get($_GET[$lC_Template->getModule()])); } if (is_numeric($_GET[$lC_Template->getModule()])) { $lC_ObjectInfo = new lC_ObjectInfo(lC_Products_Admin::get($_GET[$lC_Template->getModule()])); $attributes = $lC_ObjectInfo->get('attributes'); $Qpd = $lC_Database->query('select products_name, products_blurb, products_description, products_keyword, products_tags, products_url, language_id from :table_products_description where products_id = :products_id'); $Qpd->bindTable(':table_products_description', TABLE_PRODUCTS_DESCRIPTION); $Qpd->bindInt(':products_id', $lC_ObjectInfo->getInt('products_id')); $Qpd->execute(); $products_name = array(); $products_blurb = array(); $products_description = array(); $products_keyword = array(); $products_tags = array(); $products_url = array(); while ($Qpd->next()) { $products_name[$Qpd->valueInt('language_id')] = $Qpd->value('products_name'); $products_blurb[$Qpd->valueInt('language_id')] = $Qpd->value('products_blurb'); $products_description[$Qpd->valueInt('language_id')] = $Qpd->value('products_description'); $products_keyword[$Qpd->valueInt('language_id')] = $Qpd->value('products_keyword');
?> </div> </div> <?php echo lc_draw_hidden_field('subaction', 'confirm'); ?> </form> <div class="clear-both"></div> <div class="six-columns twelve-columns-tablet"> <div id="buttons-menu-div-listing"> <div id="buttons-container" class="clear-both"> <div style="float:right;"> <p class="button-height" align="right"> <select id="orders_edit_select" class="green-gradient select expandable-list" onchange="ordersEditSelect('<?php echo $oInfo->get('customerId'); ?> ', '<?php echo $_GET[$lC_Template->getModule()]; ?> ', this.value);"> <option value=""><?php echo $lC_Language->get('text_actions'); ?> </option> <option value="invoice"><?php echo $lC_Language->get('text_print_invoice'); ?> </option> <option value="packing"><?php echo $lC_Language->get('text_print_packing_slip');
?> <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 lc_draw_hidden_field('subaction', 'confirm') . '<input type="submit" value="' . $lC_Language->get('button_save') . '" class="operationButton" /> <input type="button" value="' . $lC_Language->get('button_cancel') . '" onclick="document.location.href=\'' . lc_href_link_admin(FILENAME_DEFAULT, $lC_Template->getModule() . '&page=' . $_GET['page']) . '\';" class="operationButton" />'; ?> </p> </form> </div> <script type="text/javascript"> $(function() { $("#products_date_available").datepicker( { dateFormat: 'yy-mm-dd', changeMonth: true, changeYear: true } );
public static function preview($id) { $result = array(); $lC_ObjectInfo = new lC_ObjectInfo(lC_Banner_manager_Admin::getData($id)); if (!lc_empty($lC_ObjectInfo->get('banners_html_text'))) { $result['banner'] = $lC_ObjectInfo->get('banners_html_text'); } else { $result['banner'] = lc_image('../images/' . $lC_ObjectInfo->get('banners_image'), $lC_ObjectInfo->get('banners_title')); } $result['title'] = $lC_ObjectInfo->get('banners_title'); return $result; }
public static function formData($id = null, $parent = null) { global $lC_Language, $_module; $lC_Language->loadIniFile('categories.php'); $lC_CategoryTree = new lC_CategoryTree_Admin(); $result = array(); $categories_array = array('0' => $lC_Language->get('top_category')); foreach ($lC_CategoryTree->getArray() as $value) { $cid = explode('_', $value['id']); $count = count($cid); $cid = end($cid); $acArr = lC_Categories_Admin::getAllChildren($id); if ($cid != $id && !lC_Categories_Admin::in_array_r($cid, $acArr)) { $categories_array[$cid] = str_repeat(" ", $count - 1) . ' ' . $value['title']; } } $result['categoriesArray'] = $categories_array; if (isset($id) && is_numeric($id)) { $result['cData'] = lC_Categories_Admin::get($id, $lC_Language->getID()); $result['categoryImage'] = ''; $lC_ObjectInfo = new lC_ObjectInfo(lC_Categories_Admin::get($id)); if (!lc_empty($lC_ObjectInfo->get('categories_image'))) { $result['categoryImage'] = '<div><p>' . lc_image('../' . DIR_WS_IMAGES . 'categories/' . $lC_ObjectInfo->get('categories_image'), $lC_ObjectInfo->get('categories_name'), HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT) . '<br />' . DIR_WS_CATALOG . 'images/categories/' . $lC_ObjectInfo->getProtected('categories_image') . '</p></div>'; } } $category_names = ''; foreach ($lC_Language->getAll() as $l) { if (isset($id) && is_numeric($id)) { $category_names .= '<span class="input" style="width:88%"><label for="categories_name[' . $l['id'] . ']" class="button silver-gradient glossy">' . $lC_Language->showImage($l['code']) . '</label>' . lc_draw_input_field('categories_name[' . $l['id'] . ']', $result['cData']['categories_name'], 'class="input-unstyled"') . '</span><br />'; } else { $category_names .= '<span class="input" style="width:88%"><label for="categories_name[' . $l['id'] . ']" class="button silver-gradient glossy">' . $lC_Language->showImage($l['code']) . '</label>' . lc_draw_input_field('categories_name[' . $l['id'] . ']', null, 'class="input-unstyled"') . '</span><br />'; } } $result['categoryNames'] = $category_names; $result['parentCategory'] = isset($parent) && $parent != null ? $parent : 0; return $result; }
public static function getProductAttributeModules($section = '') { global $lC_Database, $lC_Language, $_module; $aInfo = new lC_ObjectInfo(lC_Products_Admin::get($_GET[$_module])); $attributes = $aInfo->get('attributes'); $attributes2 = $aInfo->get('attributes2'); $output = ''; $Qattributes = $lC_Database->query('select id, code from :table_templates_boxes where modules_group = :modules_group order by code desc'); $Qattributes->bindTable(':table_templates_boxes'); $Qattributes->bindValue(':modules_group', 'product_attributes'); $Qattributes->execute(); while ($Qattributes->next()) { $module = basename($Qattributes->value('code')); if (!class_exists('lC_ProductAttributes_' . $module)) { if (file_exists(DIR_FS_ADMIN . 'includes/modules/product_attributes/' . $module . '.php')) { include DIR_FS_ADMIN . 'includes/modules/product_attributes/' . $module . '.php'; } else { if (lC_Addons_Admin::hasAdminAddonsProductAttributesModule($module)) { include lC_Addons_Admin::getAdminAddonsProductAttributesModulePath($module); } } } if (class_exists('lC_ProductAttributes_' . $module)) { $module = 'lC_ProductAttributes_' . $module; $module = new $module(); if ($module->getSection() == $section) { if (file_exists(DIR_FS_ADMIN . 'includes/languages/' . $lC_Language->getCode() . '/modules/product_attributes/' . $module->getCode() . '.php')) { $lC_Language->loadIniFile('/modules/product_attributes/' . $module->getCode() . '.php'); } else { lC_Addons_Admin::loadAdminAddonsProductAttributesDefinitions($module->getCode()); } // added for value2 support $value2 = isset($attributes2[$Qattributes->valueInt('id')]) && $attributes2[$Qattributes->valueInt('id')] != null ? $attributes2[$Qattributes->valueInt('id')] : ''; $output .= '<div class="new-row-mobile six-columns six-columns-tablet twelve-columns-mobile no-margin-bottom"> <div class="twelve-columns strong mid-margin-bottom"> <span>' . $lC_Language->get('product_attributes_' . $module->getCode() . '_title') . '</span>' . lc_show_info_bubble($lC_Language->get('info_bubble_attributes_' . $module->getCode() . '_text'), null, 'info-spot on-left grey float-right mid-margin-bottom') . ' </div> <div class="twelve-columns product-module-content margin-bottom"> ' . $module->setFunction(isset($attributes[$Qattributes->valueInt('id')]) ? $attributes[$Qattributes->valueInt('id')] : null, $value2) . ' </div> </div>'; } } } return $output; }
<fieldset> <legend class="small-margin-bottom"> <span class="icon-user icon-anthracite"><strong class="small-margin-left"><?php echo $lC_Language->get('text_customer'); ?> </strong></span> </legend> <table width="100%" cellpadding="0" cellspacing="0"> <tbody> <tr> <!--<td class="align-right pad-5 width-25 bold grey"><?php echo $lC_Language->get('text_name'); ?> </td>--> <td class="align-left mid-padding-left small-padding-top"><?php echo $oInfo->get('customerAddress'); ?> </td> </tr> <tr> <td class="align-left mid-padding-left" style="padding-top:10px;"><span class="bold icon-wifi icon-anthracite"> <?php echo $lC_Language->get('text_order_ip_address'); ?> </span> <?php echo $oInfo->get('orderIPAddress'); ?> </td> </tr> <!--<tr> <td class="align-right pad-5 width-33 bold grey"><?php echo $lC_Language->get('text_company_name');
public static function preview($id) { $result = array(); $lC_ObjectInfo = new lC_ObjectInfo(lC_Newsletters_Admin::getData($id)); $result['title'] = $lC_ObjectInfo->get('title'); $result['content'] = nl2br(lc_output_string_protected($lC_ObjectInfo->get('content'))); return $result; }
?> </h1> </hgroup> <style> LABEL { width: 30% !important; } </style> <div class="columns small-margin-left"> <div class="six-columns twelve-columns-tablet"> <p class="inline-label"> <label for="group_name" class="label"><?php echo $lC_Language->get('field_server_host'); ?> </label> <span><?php echo $lC_ObjectInfo->get('host') . ' (' . $lC_ObjectInfo->get('ip') . ')'; ?> </span> </p> <p class="inline-label"> <label for="group_name" class="label"><?php echo $lC_Language->get('field_server_operating_system'); ?> </label> <span><?php echo $lC_ObjectInfo->get('system') . ' ' . $lC_ObjectInfo->get('kernel'); ?> </span> </p> <p class="inline-label"> <label for="group_name" class="label"><?php
public static function getDefinitionGroupsData($id) { global $lC_Language; $lC_ObjectInfo = new lC_ObjectInfo(lC_Languages_Admin::getDefinitionGroup($id)); $result = array(); $result['languageEntries'] = ''; foreach ($lC_ObjectInfo->get('entries') as $l) { $result['languageEntries'] = lC_Languages_Admin::get($l['languages_id'], 'name') . ': <b>' . $id . ': ' . (int) $l['total_entries'] . '</b> ' . $lC_Language->get('definitions') . '<br />'; } return $result; }