oc-content/themes/veronika/functions.php
// CHECK IF ITEM MARKED AS SOLD-UNSOLD
CHECK IF ITEM MARKED AS SOLD-UNSOLD
CHECK IF ITEM MARKED AS SOLD - UNSOLD
function veronika_check_sold(){
  $conn = DBConnectionClass::newInstance();
  $data = $conn->getOsclassDb();
  $comm = new DBCommandClass($data);
  $status = Params::getParam('markSold');
  $id = Params::getParam('itemId');
  $secret = Params::getParam('secret');
  $item_type = Params::getParam('itemType');
  if($status <> '' && $id <> '' && $id > 0) {
    $item = Item::newInstance()->findByPrimaryKey($id);
    if( $secret == $item['s_secret'] ) {
      $comm->update(DB_TABLE_PREFIX.'t_item_veronika', array('i_sold' => $status), array('fk_i_item_id' => $item['pk_i_id']));
      if (osc_rewrite_enabled()) {
        $item_type_url = '?itemType=' . $item_type;
      } else {
        $item_type_url = '&itemType=' . $item_type;
      }
      header('Location: ' . osc_user_list_items_url() . $item_type_url);
    }
  }
}
function veronika_check_sold ( ) { $ conn = DBConnectionClass :: newInstance ( ) ; $ data = $ conn -> getOsclassDb ( ) ; $ comm = new DBCommandClass ( $ data ) ; $ status = Params :: getParam ( 'markSold' ) ; $ id = Params :: getParam ( 'itemId' ) ; $ secret = Params :: getParam ( 'secret' ) ; $ item_type = Params :: getParam ( 'itemType' ) ; if ( $ status <> '' && $ id <> '' && $ id > 0 ) { $ item = Item :: newInstance ( ) -> findByPrimaryKey ( $ id ) ; if ( $ secret == $ item [ 's_secret' ] ) { $ comm -> update ( DB_TABLE_PREFIX . 't_item_veronika' , array ( 'i_sold' => $ status ) , array ( 'fk_i_item_id' => $ item [ 'pk_i_id' ] ) ) ; if ( osc_rewrite_enabled ( ) ) { $ item_type_url = '?itemType=' . $ item_type ; } else { $ item_type_url = '&itemType=' . $ item_type ; } header ( 'Location: ' . osc_user_list_items_url ( ) . $ item_type_url ) ; } } }
CHECK IF ITEM MARKED AS SOLD-UNSOLD
CHECK IF ITEM MARKED AS SOLD - UNSOLD
//Item::newInstance()->dao->update(DB_TABLE_PREFIX.'t_item_veronika', array('i_sold' => $status), array('fk_i_item_id' => $item['pk_i_id']));