public function __construct() { $this->_page_title = OSCOM::getDef('heading_title'); if (!empty($_GET[$this->_module]) && is_numeric($_GET[$this->_module])) { $this->_page_contents = 'entries.php'; $this->_page_title .= ': ' . osC_ProductTypes_Admin::get($_GET[$this->_module], 'title'); } }
public function __construct() { global $osC_MessageStack; parent::__construct(); $this->_page_contents = 'entries_delete.php'; if (isset($_POST['subaction']) && $_POST['subaction'] == 'confirm') { if (osC_ProductTypes_Admin::deleteAssignments($_GET[$this->_module], $_GET['aID'])) { $osC_MessageStack->add($this->_module, OSCOM::getDef('ms_success_action_performed'), 'success'); } else { $osC_MessageStack->add($this->_module, OSCOM::getDef('ms_error_action_not_performed'), 'error'); } osc_redirect_admin(osc_href_link_admin(FILENAME_DEFAULT, $this->_module . '=' . $_GET[$this->_module])); } }
public function __construct() { global $osC_MessageStack; parent::__construct(); if (isset($_GET['tID']) && is_numeric($_GET['tID'])) { $this->_page_contents = 'edit.php'; } else { $this->_page_contents = 'new.php'; } if (isset($_POST['subaction']) && $_POST['subaction'] == 'confirm') { $data = array('title' => $_POST['title']); if (osC_ProductTypes_Admin::save(isset($_GET['tID']) && is_numeric($_GET['tID']) ? $_GET['tID'] : null, $data)) { $osC_MessageStack->add($this->_module, OSCOM::getDef('ms_success_action_performed'), 'success'); } else { $osC_MessageStack->add($this->_module, OSCOM::getDef('ms_error_action_not_performed'), 'error'); } osc_redirect_admin(osc_href_link_admin(FILENAME_DEFAULT, $this->_module)); } }
public function __construct() { global $osC_MessageStack; parent::__construct(); if (isset($_GET['aID']) && !empty($_GET['aID'])) { $this->_page_contents = 'entries_edit.php'; } else { $this->_page_contents = 'entries_new.php'; if (sizeof(osC_ProductTypes_Admin::getActions($_GET[$this->_module])) < 1) { $osC_MessageStack->add($this->_module, OSCOM::getDef('ms_warning_no_available_actions'), 'warning'); $this->_page_contents = 'entries.php'; } } if (isset($_POST['subaction']) && $_POST['subaction'] == 'confirm') { $data = array('modules' => explode(',', $_POST['modules'])); if (osC_ProductTypes_Admin::saveAssignments($_GET[$this->_module], isset($_GET['aID']) ? $_GET['aID'] : $_POST['action'], $data)) { $osC_MessageStack->add($this->_module, OSCOM::getDef('ms_success_action_performed'), 'success'); } else { $osC_MessageStack->add($this->_module, OSCOM::getDef('ms_error_action_not_performed'), 'error'); } osc_redirect_admin(osc_href_link_admin(FILENAME_DEFAULT, $this->_module . '=' . $_GET[$this->_module])); } }
</th> <th align="center" width="20"><?php echo osc_draw_checkbox_field('batchFlag', null, null, 'onclick="flagCheckboxes(this);"'); ?> </th> </tr> </tfoot> <tbody> </tbody> </table> </form> <div class="dataTableFooter"> <span id="dataTableLegend"><?php echo '<b>' . OSCOM::getDef('table_action_legend') . '</b> ' . osc_icon('edit.png') . ' ' . OSCOM::getDef('icon_edit') . ' ' . osc_icon('trash.png') . ' ' . OSCOM::getDef('icon_trash'); ?> </span> <span id="batchPullDownMenu"></span> </div> <script type="text/javascript"> var moduleParamsCookieName = 'oscadmin_module_' + pageModule; var moduleParams = new Object(); moduleParams.page = 1; moduleParams.search = ''; if ( $.cookie(moduleParamsCookieName) != null ) { var p = $.secureEvalJSON($.cookie(moduleParamsCookieName)); moduleParams.page = parseInt(p.page);
<p><label>Installed Modules:</label><ul id="modulesInstalled" class="connectedList"></ul></p> <p><label>Available Modules:</label><ul id="modulesAvailable" class="connectedList"> <?php foreach ($modules_array as $id => $title) { echo '<li id="' . $id . '" class="ui-state-default fg-button fg-button-icon-left" onmouseover="$(this).addClass(\'ui-state-highlight\');" onmouseout="$(this).removeClass(\'ui-state-highlight\');"><span class="ui-icon ui-icon-arrowthick-2-n-s"></span>' . $title . '</li>'; } ?> </ul></p> </fieldset> <p><?php echo osc_draw_hidden_field('modules', implode(',', $activated_modules_array), 'id="modules"') . osc_draw_hidden_field('subaction', 'confirm') . osc_draw_button(array('priority' => 'primary', 'icon' => 'check', 'title' => OSCOM::getDef('button_save'))) . ' ' . osc_draw_button(array('href' => osc_href_link_admin(FILENAME_DEFAULT, $osC_Template->getModule() . '=' . $_GET[$osC_Template->getModule()]), 'priority' => 'secondary', 'icon' => 'close', 'title' => OSCOM::getDef('button_cancel'))); ?> </p> </form> </div> <script type="text/javascript"> $('#modulesInstalled, #modulesAvailable').sortable({ containment: '#containment', axis: 'y', connectWith: '.connectedList', update: function(event, ui) { $('#modules').val( $('#modulesInstalled').sortable('toArray') ); } }).disableSelection();
function getBatchNextPageLink($batch_keyword = 'page', $parameters = '') { $number_of_pages = ceil($this->batch_size / $this->batch_rows); $get_parameter = ''; if (!empty($parameters)) { $parameters = explode('&', $parameters); foreach ($parameters as $parameter) { $keys = explode('=', $parameter, 2); if ($keys[0] != $batch_keyword) { $get_parameter .= $keys[0] . (isset($keys[1]) ? '=' . $keys[1] : '') . '&'; } } } if (defined('OSC_IN_ADMIN') && OSC_IN_ADMIN === true) { $forward_string = osc_icon('nav_forward.png'); $forward_grey_string = osc_icon('nav_forward_grey.png'); } else { $forward_string = OSCOM::getDef('result_set_next_page'); $forward_grey_string = OSCOM::getDef('result_set_next_page'); } $string = ' '; if ($this->batch_number < $number_of_pages && $number_of_pages != 1) { $string .= osc_link_object(OSCOM::getLink(null, null, $get_parameter . $batch_keyword . '=' . ($this->batch_number + 1)), $forward_string); } else { $string .= $forward_grey_string; } return $string; }
?> </h3> <form name="tEdit" action="<?php echo osc_href_link_admin(FILENAME_DEFAULT, $osC_Template->getModule() . '&tID=' . $osC_ObjectInfo->getInt('id') . '&action=save'); ?> " method="post"> <p><?php echo OSCOM::getDef('introduction_edit_product_type'); ?> </p> <fieldset> <p><label for="title"><?php echo OSCOM::getDef('field_title'); ?> </label><?php echo osc_draw_input_field('title', $osC_ObjectInfo->get('title')); ?> </p> </fieldset> <p><?php echo osc_draw_hidden_field('subaction', 'confirm') . osc_draw_button(array('priority' => 'primary', 'icon' => 'check', 'title' => OSCOM::getDef('button_save'))) . ' ' . osc_draw_button(array('href' => osc_href_link_admin(FILENAME_DEFAULT, $osC_Template->getModule()), 'priority' => 'secondary', 'icon' => 'close', 'title' => OSCOM::getDef('button_cancel'))); ?> </p> </form> </div>