Esempio n. 1
0
    public function view_addPage()
    {
        if (!isset($_SESSION['userId'])) {
            header('Location:index.php?mod=login&act=index');
        }
        $this->tp_obj->set_file('transportmanageAdd', 'transportmanageAdd.html');
        $location_ar = array('<a href="index.php?mod=transportmanage&act=list">运输方式管理</a>', '>', '添加运输方式');
        $this->tp_obj->set_var('module', '添加运输方式');
        $this->tp_obj->set_file('header', 'header.html');
        $this->tp_obj->set_file('footer', 'footer.html');
        $this->tp_obj->set_file('navbar', 'transmanagernav.html');
        $this->tp_obj->set_var("username", $_SESSION['userName']);
        $this->tp_obj->set_block('navbar', 'navlist', 'locationlist');
        foreach ($location_ar as $lval) {
            $this->tp_obj->set_var('location', $lval);
            $this->tp_obj->parse('locationlist', 'navlist', TRUE);
        }
        $PlatformAct = new PlatformAct();
        $platformManageList = $PlatformAct->act_platformManage();
        $platForm = array();
        foreach ($platformManageList as $value) {
            $platForm[] = '<input type="checkbox" name="platform[]" id="platform" class="validate[minCheckbox[1]] checkbox" value="' . $value['id'] . '" alt="' . $value['platformNameCn'] . '">&nbsp;&nbsp;' . $value['platformNameEn'];
        }
        $this->tp_obj->set_var("platformList", join('&nbsp;', $platForm));
        $ShippingAddressManageAct = new ShippingAddressManageAct();
        $shippingAddressList = $ShippingAddressManageAct->act_shippingAddressManage();
        $shippingAddress = '<select name="shippingAddress" id="shippingAddress" class="validate[required]">
								<option value="">请选择发货地址</option>';
        foreach ($shippingAddressList as $value) {
            $shippingAddress .= '<option value="' . $value['main_id'] . '">' . $value['addressNameCn'] . '</option>';
        }
        $shippingAddress .= '</select>';
        $this->tp_obj->set_var("shippingAddressList", $shippingAddress);
        $this->tp_obj->parse('header', 'header');
        $this->tp_obj->parse('footer', 'footer');
        $this->tp_obj->parse('transportmanageAdd', 'transportmanageAdd');
        $this->tp_obj->p('transportmanageAdd');
    }
 public function view_shippingAddressDel()
 {
     if (!isset($_SESSION['userId'])) {
         header('Location:index.php?mod=login&act=index');
     }
     //删除获取UIL传递参数
     $delId = trim($_GET['delId']);
     $where = " where id = '{$delId}'";
     $shippingAddressManageAct = new ShippingAddressManageAct();
     $list = $shippingAddressManageAct->act_shippingAddressDel($where);
     if ($list) {
         header('Location:index.php?mod=shippingAddressManage&act=shippingAddressList');
     } else {
         header('Location:index.php?mod=shippingAddressManage&act=shippingAddressList');
     }
 }