コード例 #1
0
use_class('CategoryTop');
use_class("bins");
$class_bin = new bins();
if (isset($_GET['id']) && $_GET['id'] != '') {
    $segment_id = tep_db_prepare_input($_GET['id']);
} else {
    header('Location: ?open=bin-segments');
    exit;
}
//SUBMIT ACTIONS
$attr_buttons = '';
$rdo_p_checked = '';
$rdo_e_checked = '';
$readonly = '';
$disabled = '';
$locations_arr = $class_bin->getSegmentLocationArray();
$segment_update = false;
if (isset($_POST) && count($_POST) > 0) {
    if ($_POST['me_action'] == 'NUMTOCHAR') {
        $res = '';
        $num = $_POST['num'];
        $writeto = $_POST['write_to'];
        $type = $_POST['type'];
        if ($type == 'rows') {
            $res = $num > 1 ? "* from A to " . $class_bin->numtochar[$num] : ($num == 1 ? "* A" : "");
        } else {
            $res = $num > 1 ? "* from " . $class_bin->numtochar[1 + $class_bin->ppb_starts_from] . " to " . $class_bin->numtochar[$num + $class_bin->ppb_starts_from] : ($num == 1 ? "* " . $class_bin->numtochar[1 + $class_bin->ppb_starts_from] : "");
        }
        echo $res;
        exit;
    } else {