Exemplo n.º 1
0
 public function modify()
 {
     convert_req($_REQUEST);
     $id = $_REQUEST['id'];
     $s_account_info = es_session::get("account_info");
     $location_ids = $s_account_info['location_ids'];
     $info = $GLOBALS['db']->getRow(" SELECT * FROM " . DB_PREFIX . "supplier_location WHERE id = " . intval($id) . " and id in (" . implode(",", $s_account_info['location_ids']) . ")");
     if (!$info) {
         showErr("门店不存在或者没有编辑该门店的权限");
     }
     $info['city_name'] = get_deal_city_name(intval($info['city_id']));
     $area_list = $GLOBALS['db']->getAll("SELECT * FROM " . DB_PREFIX . "area where city_id=" . intval($info['city_id']));
     foreach ($area_list as $k => $v) {
         if ($GLOBALS['db']->getOne("SELECT count(*) FROM " . DB_PREFIX . "supplier_location_area_link where area_id=" . $v['id'] . " and location_id = " . $id)) {
             $area_list[$k]['checked'] = true;
         }
     }
     $s_account_info = es_session::get("account_info");
     $location_ids = $s_account_info['location_ids'];
     if (count($location_ids) == 2) {
         $history_back = url("biz");
     } else {
         $history_back = url("biz", "profile#modify");
     }
     $GLOBALS['tmpl']->assign("history_back", $history_back);
     $GLOBALS['tmpl']->assign("info", $info);
     $GLOBALS['tmpl']->assign("area_list", $area_list);
     $GLOBALS['tmpl']->display("biz/biz_location_modify.html");
 }
            echo $deal["id"];
            ?>
"></td><td>&nbsp;<?php 
            echo $deal["id"];
            ?>
</td><td>&nbsp;<a href="javascript:edit_goods   ('<?php 
            echo addslashes($deal["id"]);
            ?>
')"><?php 
            echo msubstr($deal["name"]);
            ?>
</a></td><td>&nbsp;<?php 
            echo get_shop_cate_name($deal["shop_cate_id"]);
            ?>
</td><td>&nbsp;<?php 
            echo get_deal_city_name($deal["city_id"]);
            ?>
</td><td>&nbsp;<?php 
            echo a_get_time_status($deal["time_status"], $deal['id']);
            ?>
</td><td>&nbsp;<?php 
            echo get_buy_type_title($deal["buy_type"]);
            ?>
</td><td>&nbsp;<?php 
            echo get_status($deal["brand_promote"]);
            ?>
</td><td>&nbsp;<?php 
            echo a_get_deal_type($deal["deal_type"], $deal['id']);
            ?>
</td><td>&nbsp;<?php 
            echo get_is_effect($deal["is_effect"], $deal['id']);