コード例 #1
0
ファイル: GetAll.php プロジェクト: haraldpdl/oscommerce
    public static function execute() {
      if ( !isset($_GET['search']) ) {
        $_GET['search'] = '';
      }

      if ( !isset($_GET['cid']) ) {
        $_GET['cid'] = 0;
      }

      if ( !empty($_GET['search']) ) {
        $result = Products::find($_GET['search'], $_GET['cid']);
      } else {
        $result = Products::getAll($_GET['cid']);
      }

      $result['rpcStatus'] = RPC::STATUS_SUCCESS;

      echo json_encode($result);
    }
コード例 #2
0
ファイル: edit.php プロジェクト: haraldpdl/oscommerce
<?php
/**
 * osCommerce Online Merchant
 * 
 * @copyright Copyright (c) 2011 osCommerce; http://www.oscommerce.com
 * @license BSD License; http://www.oscommerce.com/bsdlicense.txt
 */

  use osCommerce\OM\Core\HTML;
  use osCommerce\OM\Core\ObjectInfo;
  use osCommerce\OM\Core\OSCOM;
  use osCommerce\OM\Core\Site\Admin\Application\Products\Products;

  $new_product = false;

  $OSCOM_ObjectInfo = new ObjectInfo(Products::get($_GET['id']));
?>

<h1><?php echo $OSCOM_Template->getIcon(32) . HTML::link(OSCOM::getLink(), $OSCOM_Template->getPageTitle()); ?></h1>

<?php
  if ( $OSCOM_MessageStack->exists() ) {
    echo $OSCOM_MessageStack->get();
  }
?>

<div id="sectionMenuContainer" style="float: left; padding-bottom: 10px;">
  <span class="ui-widget-header ui-corner-all" style="padding: 10px 4px;">
    <span id="sectionMenu"><?php echo HTML::radioField('sections', array(array('id' => 'general', 'text' => OSCOM::getDef('section_general')), array('id' => 'data', 'text' => OSCOM::getDef('section_data')), array('id' => 'images', 'text' => OSCOM::getDef('section_images')), array('id' => 'variants', 'text' => OSCOM::getDef('section_variants')), array('id' => 'categories', 'text' => OSCOM::getDef('section_categories'))), (isset($_GET['tabIndex']) ? $_GET['tabIndex'] : null), null, ''); ?></span>
  </span>
</div>