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; }
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 $ */ $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'); ?> </div> <div class="infoBoxContent">