Ejemplo n.º 1
0
function PF_amount($conn, $XmlDoc, $memberid, $logistickind, $amount, $memo)
{
    $DB = new DBclass();
    $DB->conn = $conn;
    $DB->Table = "amount";
    $DB->FieldAdd("memberid", $memberid, "N");
    //店名
    $DB->FieldAdd("logistickind", $logistickind, "N");
    //點數狀態
    $DB->FieldAdd("amount", $amount, "N");
    //數量
    $DB->FieldAdd("userid", $_SESSION['userid'], "N");
    //服務人員
    $DB->FieldAdd("memo", $memo, "S");
    //備註
    $DB->FieldAdd("adddate", "DATE", "D");
    //建立時間;
    $DB->Action = "insert";
    //$DB->Debug="1";
    $DB->Execute();
    $sSQLCmd = "update member set memberbouns=memberbouns" . PF_SearchXML($XmlDoc, "//參數設定檔/點數狀態/KIND/傳回值", "加減項", $logistickind) . $amount . " where memberid=" . $memberid;
    PF_Get_rs($conn, $sSQLCmd);
    $amountid = PF_GETField($conn, "select max(amountid) from amount");
    $sSQLCmd = "update amount set lastamount=(select memberbouns from member where memberid=" . PF_ReSqlCmd($memberid, "N") . ") where amountid=" . PF_ReSqlCmd($amountid, "N");
    PF_Get_rs($conn, $sSQLCmd);
}
Ejemplo n.º 2
0
?>
</span> 筆</p>
              </div>
              <div class="BBTD">
<?php 
foreach ($XmlDoc->xpath("//參數設定檔/產品種類/KIND") as $v) {
    ?>
            
              	  
                <div class="nbn">
                  <p class="tp"><?php 
    echo $v->簡述;
    ?>
</p>
                  <p class="tpn"><?php 
    echo PF_GETField($conn, "select count(*) from aacd where product_category=" . PF_ReSqlCmd(strval($v->傳回值), "N"));
    ?>
</p>
                </div>
<?php 
}
?>
   
					              </div>

            </div>
        </div>
      </div>
    </div>
    			
</form>