You are here

function ed_classified_get_ad_expiration in Classified Ads 5.2

Same name and namespace in other branches
  1. 5 ed_classified_utils.inc \ed_classified_get_ad_expiration()
  2. 6.2 ed_classified_utils.inc \ed_classified_get_ad_expiration()
  3. 7.2 ed_classified_utils.inc \ed_classified_get_ad_expiration()

Get the expiration date of a classified ad node

1 call to ed_classified_get_ad_expiration()
theme_ed_classified_category_list_ad_row in ./ed_classified_themefuncs.inc

File

./ed_classified_utils.inc, line 253
Simple text-based classified ads module. Michael Curry, Exodus Development, Inc. exodusdev@gmail.com for more information, please visit http://exodusdev.com/drupal/modules/classified.module Copyright (c) 2006, 2007 Exodus Development, Inc. All Rights…

Code

function ed_classified_get_ad_expiration($node) {
  $expires = 0;

  // TODO: need windows-compatible old date - use time()?
  $q = db_query("SELECT expires_on FROM {edi_classified_nodes} ecn WHERE ecn.nid = '%d' AND ecn.vid = '%d'", $node->nid, $node->vid);
  if ($q) {
    $expires = db_result($q);
  }
  return $expires;
}