echoright - 晓戈的专栏

weber - 黑夜给了我和色的眼睛,我却她来寻找光明。

原创  工作日志 - 处理URL 收藏

<?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);  
 }*/

}
?>

 

发表于 @ 2007年12月25日 23:34:00 | 评论( loading... ) | 编辑| 举报| 收藏

旧一篇:正则表达式使用说明 | 新一篇:ASP与PHP本地服务器环境构建注意事项

  • 发表评论
  • 评论内容:
  •  
Copyright © pangge0521
Powered by CSDN Blog