Code Duplication    Length = 9-10 lines in 4 locations

admin/martin.auction.php 1 location

@@ 33-42 (lines=10) @@
30
$auctionObj = $id > 0 ? $auction_handler->get($id) : $auction_handler->create();
31
32
switch ($action) {
33
    case "add":
34
        include MARTIN_ROOT_PATH . 'include/form.auction.php';
35
        martin_collapsableBar('createtable', 'createtableicon', _AM_MARTIN_ADDING_BID, _AM_MARTIN_ADDING_BID);
36
        CreateButton();
37
        //Create_button(array('addcity'=>array('url'=>'mconfirmartin.hotel.city.php?action=add','value'=>_AM_MARTIN_CITY_NAME)));
38
        $form = new form_auction($auctionObj, $auction_handler->getRoomList($id), $hotelservice_handler->GetHotelList());
39
40
        $form->display();
41
        martin_close_collapsable('createtable', 'createtableicon');
42
        break;
43
    case "save":
44
        //var_dump(($_POST['auction_info']));exit;
45
        $auctionObj->setVar('auction_id', $id);

admin/martin.group.php 1 location

@@ 33-42 (lines=10) @@
30
$GroupObj = $id > 0 ? $group_handler->get($id) : $group_handler->create();
31
32
switch ($action) {
33
    case "add":
34
        include MARTIN_ROOT_PATH . 'include/form.group.php';
35
        martin_collapsableBar('createtable', 'createtableicon', _AM_MARTIN_ADD_CUSTOMERS, _AM_MARTIN_ADD_CUSTOMERS);
36
        CreateButton();
37
        //Create_button(array('addcity'=>array('url'=>'mconfirmartin.hotel.city.php?action=add','value'=>_AM_MARTIN_CITY_NAME)));
38
        $form = new form_group($GroupObj, $group_handler->getRoomList($id), $hotelservice_handler->GetHotelList());
39
40
        $form->display();
41
        martin_close_collapsable('createtable', 'createtableicon');
42
        break;
43
    case "save":
44
        //var_dump(($_POST['group_info']));exit;
45
        $GroupObj->setVar('group_id', $id);

admin/martin.hotel.promotion.php 1 location

@@ 33-42 (lines=10) @@
30
$PromotionObj = $id > 0 ? $promotion_handler->get($id) : $promotion_handler->create();
31
32
switch ($action) {
33
    case "add":
34
        include MARTIN_ROOT_PATH . 'include/form.hotel.promotion.php';
35
        martin_collapsableBar('createtable', 'createtableicon', _AM_MARTIN_PROMO_ADD, _AM_MARTIN_PROMO_ADD);
36
        CreateButton();
37
        //Create_button(array('addcity'=>array('url'=>'mconfirmartin.hotel.city.php?action=add','value'=>_AM_MARTIN_CITY_NAME)));
38
        $form = new form_hotel_promotion($PromotionObj, $hotelservice_handler->GetHotelList());
39
40
        $form->display();
41
        martin_close_collapsable('createtable', 'createtableicon');
42
        break;
43
    case "save":
44
        //var_dump(($_POST['group_info']));exit;
45
        $PromotionObj->setVar('promotion_id', $id);

admin/martin.hotel.service.php 1 location

@@ 36-44 (lines=9) @@
33
$HotelServiceTypeObj = $typeid > 0 ? $hotelservicetype_handler->get($typeid) : $hotelservicetype_handler->create();
34
35
switch ($action) {
36
    case "add":
37
        include MARTIN_ROOT_PATH . 'include/form.hotel.service.php';
38
        martin_collapsableBar('createtable', 'createtableicon', _AM_MARTIN_ADD_SERVICE, _AM_MARTIN_ADD_SERVICE);
39
        CreateButton();
40
        $TypeList = $hotelservicetype_handler->GetList();
41
        $form     = new form_hotel_service($HotelServiceObj, $TypeList);
42
        $form->display();
43
        martin_close_collapsable('createtable', 'createtableicon');
44
        break;
45
    case "typeadd":
46
        include MARTIN_ROOT_PATH . 'include/form.hotel.service.type.php';
47
        martin_collapsableBar('createtable', 'createtableicon', _AM_MARTIN_ADD_SERVICE_TYPE, _AM_MARTIN_ADD_SERVICE_TYPE);