oomleague_countries', 'countries_id', $db );
}
function publish_array( $cid=null, $post=null, $publish=1, $myid=0 ) {
if (!is_array( $cid ) || count( $cid ) < 1) {
$this->_error = "No items selected.";
return false;
}
$cids = implode( ',', $cid );
$this->_db->setQuery( "UPDATE $this->_tbl SET published='$publish'"
. "\nWHERE countries_id IN ($cids) AND (checked_out=0 OR (checked_out='$myid'))"
);
print $this->_db->getQuery();
if (!$this->_db->query()) {
$this->_error = $this->_db->getErrorMsg();
return false;
}
if (count( $cid ) == 1) {
$this->checkin( $cid[0] );
}
$this->_error = '';
return $post["countries_id"];
}
function getFlag() {
$alt = (isset($country[$this->countries_iso_code_3])) ? $country[$this->countries_iso_code_3]:"";
$flag = (isset($this->countries_iso_code_2)) ? strtolower($this->countries_iso_code_2):"";
if (file_exists(_JOOMLA_JL_PATH."/images/joomleague/flags/".$flag.".png") && $flag != '') {
return "
";
}
else return (isset($this->countries_iso_code_3)) ? " [".$this->countries_iso_code_3."]" : '';
}
}
?>
