Пример #1
0
 public static function getDefinitionGroups()
 {
     global $_module;
     if (!isset($_GET['search'])) {
         $_GET['search'] = '';
     }
     if (!empty($_GET['search'])) {
         $result = osC_Languages_Admin::findDefinitionGroups($_GET[$_module], $_GET['search']);
     } else {
         $result = osC_Languages_Admin::getDefinitionGroups($_GET[$_module]);
     }
     $result['rpcStatus'] = RPC_STATUS_SUCCESS;
     echo json_encode($result);
 }
Пример #2
0
/*
  $Id: $

  osCommerce, Open Source E-Commerce Solutions
  http://www.oscommerce.com

  Copyright (c) 2009 osCommerce

  This program is free software; you can redistribute it and/or modify
  it under the terms of the GNU General Public License v2 (1991)
  as published by the Free Software Foundation.
*/
$osC_ObjectInfo = new osC_ObjectInfo(osC_Languages_Admin::get($_GET['lID']));
$groups_array = array();
foreach (osc_toObjectInfo(osC_Languages_Admin::getDefinitionGroups($osC_ObjectInfo->getInt('languages_id')))->get('entries') as $group) {
    $groups_array[] = array('id' => $group['content_group'], 'text' => $group['content_group']);
}
?>

<h1><?php 
echo osc_link_object(osc_href_link_admin(FILENAME_DEFAULT, $osC_Template->getModule()), $osC_Template->getPageTitle());
?>
</h1>

<?php 
if ($osC_MessageStack->exists($osC_Template->getModule())) {
    echo $osC_MessageStack->get($osC_Template->getModule());
}
?>
Пример #3
0
<?php 
foreach ($osC_Language->getAll() as $l) {
    echo $osC_Language->showImage($l['code']) . '<br />' . osc_draw_textarea_field('value[' . $l['id'] . ']') . '<br />';
}
?>

    </div>
    <div>
      <div style="width: 35%; float: left;"><label for="group"><?php 
echo $osC_Language->get('field_definition_group');
?>
</label>

<?php 
$groups_array = array();
foreach (osc_toObjectInfo(osC_Languages_Admin::getDefinitionGroups($_GET[$osC_Template->getModule()]))->get('entries') as $value) {
    $groups_array[] = array('id' => $value['content_group'], 'text' => $value['content_group']);
}
if (!empty($groups_array)) {
    echo osc_draw_pull_down_menu('group', $groups_array);
}
?>

      </div>
      <div style="width: 35%; float: left;"><label for="group_new"><?php 
echo $osC_Language->get('field_definition_new_group');
?>
</label><?php 
echo osc_draw_input_field('group_new');
?>
</div>