<?php //啪啦模版
/**********************************************************
* palaa.org 啪啦 WEB 平台
*
* @classfilename Product.class.php
* @classname product
* @classpath @mod/ftp/
* @memo product类 ,订单管理类
***********************************************************/
class Product extends Manager {
function __construct() {
parent::__construct('business');
$this->checkboxfield = 'product_id';
$this->tablename = 'pal_product';
$this->findkey = 'product_name';
}
public function findpaybank(){
$method = 'productpaybank';
$sqlstr = $this->findsql($this->findkey);
$sqlstr .= " AND product_type='1' ";
//这个地方要处理分页,url问题
$fields = array('product_name','product_price','order_price','product_total','ctrlpanel');
return parent::find($this->tablename,$sqlstr,$this->findkey,$method,$fields);
}
public function findfield_productpaybank(&$arr){
$arr['product_price'] = sprintf('%01.2f',$arr['product_price']/100);
$arr['order_price'] = sprintf('%01.2f',$arr['order_price']/100);
$this->myurl || $this->myurl = new URL('paybank.php');
$this->myurl->x_operate = 'paybank';
$this->myurl->product_id = $arr['product_id'];
$this->myurl->v_amount = $arr['order_price'];
$arr['ctrlpanel'] = a(''.$this->myurl,$this->lang->paybank); //这段对URL传参数做了处理
}
//如果需要查询则加上如下代码
/* public function findbutton_productpaybank(& $table){
$table->findform->row2($this->findkey);
$table->findform->row2($this->lang->product_price);
}*/
}
?>