Esempio n. 1
0
         $links[1]['text'] = '返回员工管理';
         $links[1]['href'] = 'area.php?act=list';
     }
     sys_msg('地址点添加成功!', 0, $links);
     break;
 case 'edit':
     $data = array();
     if (city_location()) {
         $sql = "SELECT * FROM sh_address WHERE id=" . intval($_REQUEST['id']);
         $route_info = $db_read->getRow($sql);
         $smarty->assign('route_info', $route_info);
         $smarty->assign('route_list', get_route_list('station_id>9'));
         $html = 'area_sh.html';
     } else {
         $smarty->assign('region_list', get_region_list());
         $smarty->assign('route_list', get_route_list('station_id<10'));
         $area_info = $db_read->getRow("SELECT * FROM ship_area WHERE area_id=" . intval($_REQUEST['id']));
         $smarty->assign('area_info', $area_info);
         $html = 'area_bj.html';
     }
     $smarty->assign('ur_here', '编辑地址点');
     $smarty->assign('action_link', array('href' => 'area.php?act=list', 'text' => '返回地址点管理列表'));
     $smarty->assign('form_act', 'update');
     $smarty->display($html);
     break;
 case 'update':
     $data = array();
     if (city_location()) {
         $data['area'] = empty($_POST['area']) ? '' : trim($_POST['area']);
         $data['road'] = empty($_POST['area_name']) ? '' : trim($_POST['area_name']);
         $data['omax'] = empty($_POST['omax']) ? '' : intval($_POST['omax']);
Esempio n. 2
0
            $data['flag'] = empty($_REQUEST['flag']) ? '-1' : $_REQUEST['flag'];
            $db_write->autoExecute('ship_route', $data, 'UPDATE', "route_id='{$id}'");
            $links[0]['text'] = '返回路区管理列表';
            $links[0]['href'] = 'route.php?act=list';
            sys_msg('路区编辑成功!', 0, $links);
            break;
        case 'remove':
            $id = isset($_REQUEST['id']) ? intval($_REQUEST['id']) : '0';
            $excg->drop($id);
            $url = "route.php?act=query&" . str_replace('act=remove', '', $_SERVER['QUERT_STRING']);
            los_header("Location: {$url}\n");
            exit;
            break;
        default:
            $station_list = get_station_list();
            $route_list = get_route_list();
            $smarty->assign('ur_here', '路区管理列表');
            $smarty->assign('action_link', array('text' => '添加路区', 'href' => 'route.php?act=add'));
            $smarty->assign('full_page', 1);
            $smarty->assign('station_list', $station_list);
            $smarty->assign('route_list', $route_list['list']);
            $smarty->assign('filter', $route_list['filter']);
            $smarty->assign('record_count', $route_list['record_count']);
            $smarty->assign('page_count', $route_list['page_count']);
            $smarty->display('route_list.html');
    }
} else {
    sys_msg('坑爹呀,页面不存在!', 1, array(array('text' => '返回路区管理列表'), array('href' => 'route.php?act=list')));
}
function get_station_list()
{