<?php
function area()
{
$product=$this->post("product");
$p_id=$this->post("p_id");
if($product!=null)
{
for($i=0;$i<count($product);$i++){
echo $product[$i]." ";}
}
$str1=implode(" ",$product);
$product=$this->load_model("product".DS."products");
$result=$product->Addproduct($str1,$p_id);
$this->t->assign("areaflag",$areaflag);
}
function Addproduct($str1,$p_id)//添加广告
{
return $this->db->query("insert into {$this->table_product} set product_name='$str1',p_id='$p_id'");
}
?>
- 1
- 2
前往页