Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /**
- * @version 3.2.5
- * @package Joomla 3.x
- * @subpackage DT Register
- * @copyright Copyright (C) 2006 DTH Development
- * @copyright contact dthdev@dthdevelopment.com
- * @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
- */
- defined( '_JEXEC' ) or die( 'Restricted access' );
- class DtregisterModelPayoptionconfig extends DtrModel {
- function __construct($config = array()){
- parent::__construct($config);
- $this->table = DtrTable::getInstance('Payoptionconfig','DtrTable'); // new TableDuser($this->getDBO());
- }
- }
- class DtrTablePayoptionconfig extends DtrTable{
- var $payment_id;
- var $key;
- var $value;
- var $id;
- function __construct( $db = null ) {
- $db = JFactory::getDBO();
- $this->db =$db;
- parent::__construct( '#__dtregister_payment_config', 'id', $db );
- }
- function removeByPaymentid(){
- $query = "delete from ".$this->getTableName()." where payment_id = ".$this->db->Quote($this->payment_id)." ";
- $this->db->setQuery($query);
- $this->db->query();
- }
- function saveAll($data){
- $config_data = array();
- if (is_array($data))
- foreach($data as $key=>$value){
- if(is_array($value)){
- $value = implode(",",$value);
- }
- $config_data[] = array('key'=>$key,'value'=>$value);
- }
- dtpr($config_data);
- parent::saveAll($config_data);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement