示例#1
0
 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;
 }
示例#2
0
/**
  @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;
 }
示例#4
0
/**
  @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;
}
示例#5
0
 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;
     }
 }
示例#6
0
/**
  @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');
示例#7
0
<?php

/**
  @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 $
*/
if (is_numeric($_GET[$lC_Template->getModule()])) {
    $oInfo = new lC_ObjectInfo(lC_Orders_Admin::getInfo($_GET[$lC_Template->getModule()]));
}
?>
<style scoped="scoped">
  .replacement > .select-value { height: 19px; }
  span.select { height: 33px; }
  .select-value { line-height: 19px; }
</style>
<!-- Main content -->
<section role="main" id="main">
  <hgroup id="main-title" class="thin">
    <h1><?php 
echo $lC_Language->get('text_edit_order') . ': ' . $_GET[$lC_Template->getModule()];
?>
</h1>
    <?php 
if ($lC_MessageStack->exists($lC_Template->getModule())) {
    echo $lC_MessageStack->get($lC_Template->getModule());
}
示例#8
0
<?php

/**
  @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 $
*/
$lC_ObjectInfo = new lC_ObjectInfo(lC_Products_Admin::get($_GET['pID']));
$Qdata = $lC_Database->query('select str_to_date(pa.value, "%Y-%m-%d") 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'));
?>
<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');
示例#9
0
 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;
 }
示例#10
0
 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("&nbsp;&nbsp;&nbsp;&nbsp;", $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;
 }
示例#11
0
 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;
 }
示例#12
0
<?php

/**
  @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: summary.php v1.0 2013-08-08 datazen $
*/
if (!isset($oInfo)) {
    $oInfo = new lC_ObjectInfo(lC_Orders_Admin::getInfo($_GET['oID']));
}
?>
<div id="section_orders_summary">
  <h3 class="show-below-768 margin-left margin-top no-margin-bottom"><?php 
echo $lC_Language->get('text_summary');
?>
</h3>
  <div class="columns with-padding">
    <div class="new-row-mobile four-columns twelve-columns-mobile">
      <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>
示例#13
0
 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;
 }
示例#14
0
<?php

/**
  @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: main.php v1.0 2013-08-08 datazen $
*/
$lC_ObjectInfo = new lC_ObjectInfo(lc_get_system_information());
//echo "<pre>";
//print_r(lC_Server_info_Admin::getAddons());
//echo "</pre>";
?>
<!-- Main content -->
<section role="main" id="main">
  <noscript class="message black-gradient simpler"><?php 
echo $lC_Language->get('ms_error_javascript_not_enabled_warning');
?>
</noscript>
  <hgroup id="main-title" class="thin">
    <h1><?php 
echo $lC_Template->getPageTitle();
?>
</h1>
  </hgroup>
  <style>
  LABEL { width: 30% !important; }
  </style>
示例#15
0
 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;
 }