Inherited Variables
Inherited Methods
Class: Core
- Core::coreFieldNames()
- Returns the core field names of the core table in an array.
- Core::deleteDBCache()
- Deletes data from the database cache based on the id key.
- Core::FilesListArray()
- Returns a list of filename within a path in array.
- Core::getAllDataArray()
- Returns all records with the all items from the table.
- Core::getAllDataObject()
- Returns all records with all items from the table.
- Core::getAllItemsArray()
- Similar to getAllItemsObject() method but returns the records in an associative array.
- Core::getAllItemsObject()
- Returns all records with the needed items from the table.
- Core::getDBCache()
- Gets temporary data from the database cache.
- Core::getErrorMsg()
- Feturns the value of error_msg, the internal error message.
- Core::getLastQuery()
- Returns the the last sql query string
- Core::getResult()
- Feturns the value of result
- Core::insertDataFromArray()
- Inserts data from an array (passed by reference) into a table.
- Core::insertDataFromInternalArray()
- Inserts data from the internal array previously filled with data by the setDataArray() method.
- Core::isPreLoaded()
- Returns the value of is_preloaded that is set by methods that preload large number of data.
- Core::LastRecordCount()
- Returns the value of rec_count
- Core::saveDBCache()
- Saves temporary data to a cache in database.
- Core::setDataArray()
- Points the core data array to the external array that holds the data to be stored.
- Core::setRefArray()
- Points the reference variable $ref_array to the field names' array.
- Core::setSQL()
- Sets the internal sql query variable to the sql query.
- Core::setTable()
- Sets the coretable variable to the name of the database table.
- Core::setWhereCondition()
- Sets the "where" condition in an update query used with the updateDataFromInternalArray() method.
- Core::Transact()
- Transaction routine, ADODB transaction. It internally uses the ADODB transaction routine.
- Core::updateDataFromArray()
- Updates a record with the data from an array (passed by reference) based on the primary key.
- Core::updateDataFromInternalArray()
- Updates a table using data from an internal array previously filled with data by the setDataArray() method.
- Core::_prepSaveArray()
- Filters the data array intended for saving, removing the key-value pairs that do not correspond to the table's field names.
- Core::_RecordExists()
- Checks if a certain database record exists based onthe supplied query condition.
Class Details
News methods.
Note this class should be instantiated only after a "$db" adodb connector object has been established by an adodb instance
Tags:
- copyright - 2002,2003,2004 Elpidio Latorilla
- version - beta 1.0.08
- author - Elpidio Latorilla
[ Top ]
Class Variables
$buffer =
[line 36]
Universal buffer
Type: mixed
Overrides: Array
[ Top ]
$headnrs = array()
[line 41]
Healine numbers
Type: array
Overrides:
[ Top ]
$result =
[line 26]
Buffer for sql query results.
Tags:
- var - record object
Type: adodb
Overrides: Array
[ Top ]
$row =
[line 31]
Buffer for row returned by adodb's FetchRow() method
Type: array
Overrides:
[ Top ]
$tb = 'care_news_article'
[line 21]
Table name for news articles
Type: string
Overrides:
[ Top ]
Class Methods
getArchiveList
mixed getArchiveList(
[int
$dept_nr = 0], array
&$heads)
[line 256]
Gets archived news articles of a department.
The returned adodb record object containts rows of arrays sorted in descending creation time. Each array contains the news data with the following index keys:
- nr = record's primary number
- title = news title
- preface = news preface or leading summary
- author = author
- publish_date = publication date
- submit_date = submission date
Tags:
- return - adodb record object or boolean
Parameters:
- int $dept_nr - Department number. e.g. 1 = news headlines
- array &$heads - Headlines preview record numbers
[ Top ]
getAuthor
mixed getAuthor(
int
$nr)
[line 104]
Gets the author of the news based on its primary key number.
Tags:
- return - string or boolean
Parameters:
- int $nr - Record's key number
[ Top ]
getBody
mixed getBody(
int
$nr)
[line 93]
Gets the body of the news based on its primary key number.
Tags:
- return - string or boolean
Parameters:
- int $nr - Record's key number
[ Top ]
getHeadlinesPreview
mixed getHeadlinesPreview(
[int
$dept_nr = 0], int
$count)
[line 186]
Gets news articles of a department for preview purposes.
The returned array contains the news data with the following index keys:
- nr = record's primary number
- title = news title
- preface = news preface or leading summary
- body = article body
- pic_mime = image file extension (mime type)
Tags:
- return - 2 dimensional array or boolean
Parameters:
- int $dept_nr - Department number. e.g. 1 = news headlines
- int $count - Number or articles returned
[ Top ]
getItem
mixed getItem(
[int
$nr = 0], [string
$item = ''])
[line 49]
Gets a news item based on its primary key number.
Tags:
- return - string or boolean
Parameters:
- int $nr - Record key number
- string $item - Field name whose content should be fetched
[ Top ]
getList
mixed getList(
[int
$dept_nr = 0])
[line 296]
Gets department news articles' information.
The returned adodb record object contains rows of arrays sorted in descending creation time. Each array contains the news data with the following index keys:
- nr = record's primary number
- title = news title
- author = author
- publish_date = publication date
- submit_date = submission date
Tags:
- return - adodb record object or boolean
Parameters:
- int $dept_nr - Department number. e.g. 1 = news headlines
[ Top ]
getNews
mixed getNews(
int
$nr)
[line 159]
Gets the news article based on its primary key number.
The returned array contains the news data with the following index keys:
- nr = record's primary number
- title = news title
- preface = news preface or leading summary
- body = article body
- pic_mime = image file extension (mime type)
- art_num = layout order number 1 - 5
- author = author
- publish_date = publication date
- submit_date = submission date
Tags:
- return - array or boolean
Parameters:
- int $nr - Record's key number
[ Top ]
getPicMime
mixed getPicMime(
int
$nr)
[line 137]
Gets file extension (mime type) of the image accompanying the news article based on its primary key number.
Tags:
- return - string or boolean
Parameters:
- int $nr - Record's key number
[ Top ]
getPreface
mixed getPreface(
[int
$nr = 0])
[line 82]
Gets the preface (leading summary) of the news based on its primary key number.
Tags:
- return - string or boolean
Parameters:
- int $nr - Record's key number
[ Top ]
getPublishDate
mixed getPublishDate(
int
$nr)
[line 115]
Gets the publication date of the news based on its primary key number.
Tags:
- return - string or boolean
Parameters:
- int $nr - Record's key number
[ Top ]
getShortPreviewList
mixed getShortPreviewList(
[int
$dept_nr = 0])
[line 332]
Gets department's news information with preface text and image.
The returned adodb record object contains rows of arrays sorted in descending creation time. Each array contains the news data with the following index keys:
- nr = record's primary number
- title = news title
- preface = news preface or leading summary
- pic_mime = image file extension (mime type)
- author = author
- publish_date = publication date
- submit_date = submission date
Tags:
- return - integer or boolean
Parameters:
- int $dept_nr - Department number. e.g. 1 = news headlines
[ Top ]
getSubmitDate
mixed getSubmitDate(
int
$nr)
[line 126]
Gets submission date of the news based on its primary key number.
Tags:
- return - string or boolean
Parameters:
- int $nr - Record's key number
[ Top ]
getTitle
mixed getTitle(
[int
$nr = 0])
[line 71]
Gets the title of the news based on its primary key number.
Tags:
- return - string or boolean
Parameters:
- int $nr - Record's key number
[ Top ]
saveNews
mixed saveNews(
[int
$dept_nr = 0], mixed
&$news)
[line 367]
Saves news article.
The news article and supporting data must be passed by reference with an associative array. The data must be packed in the array with the following index keys:
- category = category number
- title = news title
- preface = news preface or leading summary
- body = news body
- pic_mime = image file extension (mime type)
- art_num = article layout (order) number, 1 - 5
- author = author
- publish_date = publication date
Tags:
- return - adodb record object or boolean
Parameters:
- int $dept_nr - Department number. e.g. 1 = news headlines
[ Top ]