/** 
 * loadData()
 *
 * Here we load up all the data we need to run this web page.
 */
function loadData()
{
    global $seriesArray;
    global $editLink;
    global $displayFieldList;
    global $displayFields;
    // Get a list of all the series entries in the table
    $seriesArray = array();
    $seriesManager = new RowManager_SeriesManager();
    // get all the rows in this table
    $list = $seriesManager->getListIterator();
    // for each row
    $list->setFirst();
    while ($series = $list->getNext()) {
        // the Row manager can return an array of columnName=>values
        $allValues = $series->getArrayOfValues();
        // now go through each element in our displayFields array and pull
        // out the ones we are interested in displaying
        $displayValues = array();
        for ($indx = 0; $indx < count($displayFields); $indx++) {
            $key = $displayFields[$indx];
            $displayValues[$key] = $allValues[$key];
        }
        // Now store the ARRAY of display data into our final display array
        $seriesArray[$series->getID()] = $displayValues;
    }
    // next row
    // Define the Edit link:
    // NOTE: how it ends with "seriesID="
    // it is intened for this link to be concatened with the series_id value in the
    // above array
    $editLink = 'ex_SeriesEdit_array.php?seriesID=';
}
Exemplo n.º 2
0
 /**
  * function __construct
  * <pre>
  * Initialize the object.
  * </pre>
  * @param $pathModuleRoot [STRING] The path to the module's root dir.
  * @param $viewer [OBJECT] The viewer object.
  * @param $sortBy [STRING] Field data to sort listManager by.
  * @return [void]
  */
 function __construct($pathModuleRoot, $viewer, $sortBy)
 {
     $this->pathModuleRoot = $pathModuleRoot;
     $this->viewer = $viewer;
     if ($sortBy == '') {
         $sortBy = 'series_title';
     }
     $seriesManager = new RowManager_SeriesManager();
     $seriesManager->setSortOrder($sortBy);
     $this->listManager = $seriesManager->getListIterator();
 }
Exemplo n.º 3
0
/** 
 * loadData()
 *
 * Here we load up all the data we need to run this web page.
 */
function loadData()
{
    global $seriesArray;
    global $editLink;
    // Get a list of all the series entries in the table
    $seriesArray = array();
    $seriesManager = new RowManager_SeriesManager();
    // get all the rows in this table
    $list = $seriesManager->getListIterator();
    // for each row
    $list->setFirst();
    while ($series = $list->getNext()) {
        $seriesArray[$series->getID()] = $series->getTitle();
    }
    // next row
    // Define the Edit link:
    // NOTE: how it ends with "seriesID="
    // it is intened for this link to be concatened with the series_id value in the
    // above array
    $editLink = 'ex_SeriesEdit.php?seriesID=';
}
Exemplo n.º 4
0
// Attempt to find proper directory from current page to Root ...
$numAttempts = 0;
while (!file_exists($extension . $pathFile) && $numAttempts < 5) {
    $extension = '../' . $extension;
    $numAttempts++;
}
require $extension . $pathFile;
require 'SeriesManager.php';
/***
 *** Load All Data needed to make the list
 ***/
// Get a list of all the series entries in the table
$seriesArray = array();
$seriesManager = new RowManager_SeriesManager();
// get all the rows in this table
$list = $seriesManager->getListIterator();
// for each row
$list->setFirst();
while ($series = $list->getNext()) {
    $seriesArray[$series->getID()] = $series->getTitle();
}
// next row
// Define the Edit link:
// NOTE: how it ends with "seriesID="
// it is intened for this link to be concatened with the series_id value in the
// above array
$editLink = 'ex_SeriesEdit.php?seriesID=';
/***
 *** get HTML for display
 ***/
// Now we create a Template object