コード例 #1
0
 /**
  * 更新国家信息
  * @access public
  */
 function update_save()
 {
     $id = get_post_value('id');
     $floor_1 = get_post_value('floor_1');
     $floor_2_cn = get_post_value('floor_2_cn');
     $floor_2_th = get_post_value('floor_2_th');
     $orders = get_post_value('orders');
     $floor_2_url = get_post_value('floor_2_url');
     if (!$this->verify($id)) {
         echo '<br> ' . $floor_2_cn . ' 已存在,请核对后重新输入。<a href="javascript:history.go(-1)">返回</a><br>';
         return;
     }
     $field = array('floor_1_id' => $floor_1, 'floor_2_cn' => trim($floor_2_cn), 'floor_2_url' => trim($floor_2_url) == '' ? '#' : trim($floor_2_url), 'floor_2_th' => trim($floor_2_th), 'orders' => $orders, 'created_name' => '');
     $m = new Floor();
     $m->clear();
     $m->setTable('vcb_product_floor_2');
     $m->setField($field);
     $m->setWhere('floor_2_id', '=', $id);
     $data = $m->update();
     //返回
     echo '<br>操作成功,<a href="index" >返回</a><br>';
 }
コード例 #2
0
 /**
  * 更新国家信息
  * @access public
  */
 function update_save()
 {
     $id = get_post_value('id');
     $floor_1 = get_post_value('floor_1');
     $floor_2 = get_post_value('floor_2');
     $floor_3_cn = get_post_value('floor_3_cn');
     $floor_3_th = get_post_value('floor_3_th');
     $start_time = get_post_value('start_time');
     $end_time = get_post_value('end_time');
     $orders = get_post_value('orders');
     if (!$this->verify($id)) {
         echo '<br> ' . $floor_3_cn . ' 已存在,请核对后重新输入。<a href="javascript:history.go(-1)">返回</a><br>';
         return;
     }
     $field = array('floor_2_id' => $floor_2, 'floor_3_cn' => trim($floor_3_cn), 'floor_3_th' => trim($floor_3_th), 'orders' => $orders, 'status' => '10000', 'created' => date('Y-m-d H:i:s', time()), 'created_name' => '', 'start_time' => $start_time, 'end_time' => $end_time);
     $m = new Floor();
     $m->clear();
     $m->setTable('vcb_product_floor_3');
     $m->setField($field);
     $m->setWhere('floor_3_id', '=', $id);
     $data = $m->update();
     //返回
     echo '<br>操作成功,<a href="index" >返回</a><br>';
 }