示例#1
0
/**
* Returns a selector to choose data source
*/
function SITEMAP_getSelectForm($selected = 'all')
{
    global $_CONF, $_SMAP_CONF, $LANG_SMAP;
    $this_script = $_CONF['site_url'] . '/sitemap/index.php';
    $retval = '<form class="uk-form" method="post" action="' . $this_script . '">' . LB . '  <select name="type" onchange="this.form.submit()">' . LB . '    <option value="all"';
    if ($selected === 'all') {
        $retval .= ' selected="selected"';
    }
    $retval .= '>' . SITEMAP_str('all') . '</option>' . LB;
    $disp_orders = array();
    foreach (Dataproxy::getAllDriverNames() as $driver) {
        $order = $_SMAP_CONF['order_' . $driver];
        $disp_orders[$order] = $driver;
    }
    if (count($disp_orders) > 0) {
        foreach ($disp_orders as $driver_name) {
            if (empty($driver_name) or $_SMAP_CONF['sitemap_' . $driver_name] === FALSE) {
                continue;
            }
            $retval .= '    <option value="' . $driver_name . '"';
            if ($selected === $driver_name) {
                $retval .= ' selected="selected"';
            }
            $retval .= '>' . SITEMAP_str($driver_name) . '</option>' . LB;
        }
    }
    $retval .= '  </select>' . LB . '  <noscript>' . LB . '    <input name="submit" type="submit" value="' . SITEMAP_str('submit') . '"' . XHTML . '>' . LB . '  </noscript>' . LB . '</form>' . LB;
    return $retval;
}
示例#2
0
 public function getChildCategories($pid = FALSE, $all_langs = FALSE)
 {
     global $_CONF, $_TABLES;
     $entries = array();
     if ($pid !== FALSE) {
         return $entries;
     }
     $sql = "SELECT forum_id, forum_name FROM {$_TABLES['gf_forums']} " . "  WHERE (is_hidden = '0') ";
     if (!Dataproxy::isRoot()) {
         $current_groups = SEC_getUserGroups(Dataproxy::uid());
         $sql .= "AND (grp_id IN (" . implode(',', $current_groups) . ")) ";
     }
     $sql .= "ORDER BY forum_order";
     $result = DB_query($sql);
     if (DB_error()) {
         return $entries;
     }
     while (($A = DB_fetchArray($result, FALSE)) !== FALSE) {
         $entry = array();
         $entry['id'] = (int) $A['forum_id'];
         $entry['pid'] = FALSE;
         $entry['title'] = stripslashes($A['forum_name']);
         $entry['uri'] = $_CONF['site_url'] . '/forum/index.php?forum=' . $entry['id'];
         $entry['date'] = FALSE;
         $entry['image_uri'] = FALSE;
         $entries[] = $entry;
     }
     return $entries;
 }
示例#3
0
 /**
  * Returns an array of (
  *   'id'        => $id (string),
  *   'title'     => $title (string),
  *   'uri'       => $uri (string),
  *   'date'      => $date (int: Unix timestamp),
  *   'image_uri' => $image_uri (string)
  * )
  */
 public function getItemsByDate($category = '', $all_langs = FALSE)
 {
     global $_CONF, $_TABLES;
     $entries = array();
     if (empty(Dataproxy::$startDate) or empty(Dataproxy::$endDate)) {
         return $entries;
     }
     $sql_date = "AND (UNIX_TIMESTAMP(date) BETWEEN '" . Dataproxy::$startDate . "' AND '" . Dataproxy::$endDate . "') ";
     if (Dataproxy::$isGL150) {
         if (Dataproxy::$isGL170) {
             $sql = "SELECT pid, topic, UNIX_TIMESTAMP(modified) AS day " . "  FROM {$_TABLES['polltopics']} " . "WHERE (UNIX_TIMESTAMP(modified) BETWEEN '" . Dataproxy::$startDate . "' AND '" . Dataproxy::$endDate . "') ";
         } else {
             $sql = "SELECT pid, topic, UNIX_TIMESTAMP(date) AS day " . "  FROM {$_TABLES['polltopics']} " . "WHERE (1 = 1) " . $sql_date;
         }
         if (!Dataproxy::isRoot()) {
             $sql .= COM_getPermSQL('AND', Dataproxy::uid());
         }
         $sql .= " ORDER BY pid";
         $result = DB_query($sql);
         if (DB_error()) {
             return $entries;
         }
         while (($A = DB_fetchArray($result, FALSE)) !== FALSE) {
             $entry = array();
             $entry['id'] = $A['pid'];
             $entry['title'] = stripslashes($A['topic']);
             $entry['uri'] = $_CONF['site_url'] . '/polls/index.php?pid=' . urlencode($entry['id']);
             $entry['date'] = $A['day'];
             $entry['image_uri'] = FALSE;
             $entries[] = $entry;
         }
     } else {
         $sql = "SELECT qid, question, UNIX_TIMESTAMP(date) AS day " . "FROM {$_TABLES['pollquestions']} " . "WHERE (1 = 1) " . $sql_date;
         if (!Dataproxy::isRoot()) {
             $sql .= COM_getPermSQL('AND', Dataproxy::uid());
         }
         $sql .= " ORDER BY qid";
         $result = DB_query($sql);
         if (DB_error()) {
             return $entries;
         }
         while (($A = DB_fetchArray($result, FALSE)) !== FALSE) {
             $entry = array();
             $entry['id'] = $A['qid'];
             $entry['title'] = stripslashes($A['question']);
             $entry['uri'] = $_CONF['site_url'] . '/polls/index.php?qid=' . urlencode($entry['id']) . '&amp;aid=-1';
             $entry['date'] = $A['day'];
             $entry['image_uri'] = FALSE;
             $entries[] = $entry;
         }
     }
     return $entries;
 }
示例#4
0
 /**
  * Returns an array of (
  *   'id'        => $id (string),
  *   'title'     => $title (string),
  *   'uri'       => $uri (string),
  *   'date'      => $date (int: Unix timestamp),
  *   'image_uri' => $image_uri (string)
  * )
  */
 public function getItemsByDate($tid = '', $all_langs = FALSE)
 {
     global $_CONF, $_TABLES;
     $entries = array();
     if (empty(Dataproxy::$startDate) or empty(Dataproxy::$endDate)) {
         return $entries;
     }
     $sql = "SELECT sid, title, UNIX_TIMESTAMP(date) AS day " . "  FROM {$_TABLES['stories']} " . "WHERE (draft_flag = 0) AND (date <= NOW()) " . "  AND (UNIX_TIMESTAMP(date) BETWEEN '" . Dataproxy::$startDate . "' AND '" . Dataproxy::$endDate . "') ";
     if (!empty($tid)) {
         $sql .= "AND (tid = '" . addslashes($tid) . "') ";
     }
     if (!Dataproxy::isRoot()) {
         $sql .= COM_getTopicSql('AND', Dataproxy::uid()) . COM_getPermSql('AND', Dataproxy::uid());
         if (function_exists('COM_getLangSQL') and $all_langs === FALSE) {
             $sql .= COM_getLangSQL('sid', 'AND');
         }
     }
     $result = DB_query($sql);
     if (DB_error()) {
         return $entries;
     }
     while (($A = DB_fetchArray($result, FALSE)) !== FALSE) {
         $entry = array();
         $entry['id'] = stripslashes($A['sid']);
         $entry['title'] = stripslashes($A['title']);
         $entry['uri'] = COM_buildUrl($_CONF['site_url'] . '/article.php?story=' . stripslashes($A['sid']));
         $entry['date'] = $A['day'];
         $entry['imageurl'] = FALSE;
         $entries[] = $entry;
     }
     return $entries;
 }
示例#5
0
 /**
  * @param $all_langs boolean: true = all languages, true = current language
  * Returns an array of (
  *   'id'        => $id (string),
  *   'title'     => $title (string),
  *   'uri'       => $uri (string),
  *   'date'      => $date (int: Unix timestamp),
  *   'image_uri' => $image_uri (string)
  * )
  */
 public function getItemsByDate($event_type = '', $all_langs = false)
 {
     global $_CONF, $_TABLES;
     $entries = array();
     if (empty(Dataproxy::$startDate) or empty(Dataproxy::$endDate)) {
         return $entries;
     }
     $sql = "SELECT eid, title, UNIX_TIMESTAMP(datestart) AS day1, " . "  UNIX_TIMESTAMP(timestart) AS day2 " . "FROM {$_TABLES['eventsjp']} " . "WHERE (UNIX_TIMESTAMP(datestart) BETWEEN '" . Dataproxy::$startDate . "' AND '" . Dataproxy::$endDate . "') ";
     if (!empty($event_type)) {
         $sql .= "AND (event_type = '" . addslashes($event_type) . "') ";
     }
     if (!Dataproxy::isRoot()) {
         $sql .= COM_getPermSql('AND', Dataproxy::uid());
     }
     $sql .= " ORDER BY day1 DESC, day2 DESC";
     $result = DB_query($sql);
     if (DB_error()) {
         return $entries;
     }
     while (($A = DB_fetchArray($result, FALSE)) !== FALSE) {
         $entry = array();
         $entry['id'] = $A['eid'];
         $entry['title'] = stripslashes($A['title']);
         $entry['uri'] = $_CONF['site_url'] . '/calendarjp/event.php?eid=' . $entry['id'];
         $entry['date'] = (int) $A['day1'] + (int) $A['day2'];
         $entry['image_uri'] = FALSE;
         $entries[] = $entry;
     }
     return $entries;
 }
示例#6
0
 /**
  * Returns an array of (
  *   'id'        => $id (string),
  *   'title'     => $title (string),
  *   'uri'       => $uri (string),
  *   'date'      => $date (int: Unix timestamp),
  *   'image_uri' => $image_uri (string)
  * )
  */
 public function getItemsByDate($category = '', $all_langs = FALSE)
 {
     global $_CONF, $_TABLES;
     $entries = array();
     if (!in_array($category, Dataproxy::getAllDriverNames())) {
         return $entries;
     }
     if (empty(Dataproxy::$startDate) or empty(Dataproxy::$endDate)) {
         return $entries;
     }
     $sql = "SELECT cid, title, url, UNIX_TIMESTAMP(date) AS day " . "  FROM {$_TABLES['trackback']} " . "WHERE (type = '" . addslashes($category) . "') " . "  AND (UNIX_TIMESTAMP(date) BETWEEN '" . Dataproxy::$startDate . "' AND '" . Dataproxy::$endDate . "') " . "ORDER BY date DESC";
     $result = DB_query($sql);
     if (DB_error()) {
         return $entries;
     }
     while (($A = DB_fetchArray($result, FALSE)) !== FALSE) {
         $entry = array();
         $entry['id'] = $A['cid'];
         $entry['title'] = stripslashes($A['title']);
         $entry['uri'] = $this->cleanUrl($A['url']);
         $entry['date'] = $A['day'];
         $entry['image_uri'] = FALSE;
         $entries[] = $entry;
     }
     return $entries;
 }
示例#7
0
    COM_output($display);
    exit;
}
// Retrieves vars
$_GET = MYCALJP_stripslashes($_GET);
$_POST = MYCALJP_stripslashes($_POST);
$template = $_CONF['path_html'] . 'mycaljp/templates_search';
$T = new Template($template);
$T->set_file(array('t_index' => 'index.thtml', 't_data_source' => 'data_source.thtml', 't_data_source_no_hr' => 'data_source_no_hr.thtml', 't_category_list' => 'category_list.thtml', 't_category' => 'category.thtml', 't_item_list' => 'item_list.thtml', 't_item' => 'item.thtml'));
$T->set_var('xhtml', XHTML);
// Collects data sources
$_dateStart = COM_applyFilter($_GET['datestart']);
$_dateEnd = COM_applyFilter($_GET['dateend']);
// $dataproxy is a global object in this script and functions.inc
$dataproxy = Dataproxy::getInstance($uid);
$drivers = Dataproxy::getAllDriverNames();
$dataproxy->setDateStart($_dateStart);
$dataproxy->setDateEnd($_dateEnd);
foreach ($drivers as $driver_name) {
    $content = $driver_name;
    if ($driver_name == 'article') {
        $content = 'stories';
    }
    if (!in_array($content, $_MYCALJP2_CONF['supported_contents'])) {
        continue;
    }
    if (!($_MYCALJP2_CONF['enabled_contents'][$content] == 1)) {
        continue;
    }
    $num_items = 0;
    $driver = $dataproxy->{$driver_name};
示例#8
0
 public function setDateEnd($dateend = '')
 {
     if ($this->_checkDate($dateend)) {
         $DE = explode('-', $dateend);
         self::$endDate = mktime(23, 59, 59, $DE[1], $DE[2], $DE[0]);
     }
 }
 /**
  * Returns an array of (
  *   'id'        => $id (string),
  *   'title'     => $title (string),
  *   'uri'       => $uri (string),
  *   'date'      => $date (int: Unix timestamp),
  *   'image_uri' => $image_uri (string)
  * )
  */
 public function getItemsByDate($category = '', $all_langs = FALSE)
 {
     global $_CONF, $_TABLES, $_MG_CONF;
     $entries = array();
     if (Dataproxy::isAnon() and $this->isLoginRequired()) {
         return $entries;
     }
     if (empty(Dataproxy::$startDate) or empty(Dataproxy::$endDate)) {
         return $entries;
     }
     $sql = "SELECT media_id " . "  FROM {$_TABLES['mg_media_albums']} " . "WHERE (album_id ='" . addslashes($category) . "') " . "ORDER BY media_order";
     $result = DB_query($sql);
     if (DB_error()) {
         return $entries;
     }
     $media_ids = array();
     while (($A = DB_fetchArray($result, FALSE)) !== FALSE) {
         $media_ids[] = "'" . $A['media_id'] . "'";
     }
     if (count($media_ids) === 0) {
         return $entries;
     }
     $sql = "SELECT media_id, media_title, media_time " . "  FROM {$_TABLES['mg_media']} " . "WHERE (media_id IN (" . implode(',', $media_ids) . "))" . "  AND (media_time BETWEEN '" . Dataproxy::$startDate . "' AND '" . Dataproxy::$endDate . "') ";
     $result = DB_query($sql);
     if (DB_error()) {
         return $entries;
     }
     while (($A = DB_fetchArray($result, FALSE)) !== FALSE) {
         if (empty($A['media_title'])) {
             $A['media_title'] = $A['media_id'];
         }
         $entry = array();
         $entry['id'] = stripslashes($A['media_id']);
         $entry['title'] = stripslashes($A['media_title']);
         $entry['uri'] = $_MG_CONF['site_url'] . '/media.php?s=' . urlencode($entry['id']);
         $entry['date'] = $A['media_time'];
         $entry['image_uri'] = FALSE;
         $entries[] = $entry;
     }
     return $entries;
 }
示例#10
0
 /**
  * Returns an array of (
  *   'id'        => $id (string),
  *   'title'     => $title (string),
  *   'uri'       => $uri (string),
  *   'date'      => $date (int: Unix timestamp),
  *   'image_uri' => $image_uri (string)
  * )
  */
 public function getItemsByDate($cid = '', $all_langs = FALSE)
 {
     global $_CONF, $_TABLES;
     $entries = array();
     if (empty(Dataproxy::$startDate) or empty(Dataproxy::$endDate)) {
         return $entries;
     }
     $sql = "SELECT f.lid, f.title, f.logourl, f.date " . "  FROM {$_TABLES['downloads']} AS f " . "  LEFT JOIN {$_TABLES['downloadcategories']} AS c " . "    ON f.cid = c.cid " . "WHERE (f.is_released = 1) " . "  AND (f.is_listing = 1) " . "  AND (f.date <= UNIX_TIMESTAMP(NOW())) " . "  AND (f.date BETWEEN '" . Dataproxy::$startDate . "' AND '" . Dataproxy::$endDate . "') ";
     if (!empty($cid)) {
         $sql .= "  AND (c.is_enabled = 1) " . "  AND (f.cid = '" . addslashes($cid) . "') ";
         if ($all_langs === FALSE) {
             $sql .= COM_getLangSQL('cid', 'AND', 'c');
         }
     }
     if (!Dataproxy::isRoot()) {
         $sql .= COM_getPermSQL('AND', Dataproxy::uid(), 2, 'c');
     }
     $result = DB_query($sql);
     if (DB_error()) {
         return $entries;
     }
     while (($A = DB_fetchArray($result, FALSE)) !== FALSE) {
         $entry = array();
         $entry['id'] = $A['lid'];
         $entry['title'] = stripslashes($A['title']);
         $entry['uri'] = COM_buildUrl($_CONF['site_url'] . '/downloads/index.php?id=' . $entry['id']);
         $entry['date'] = (int) $A['date'];
         $entry['image_uri'] = $A['logourl'];
         $entries[] = $entry;
     }
     return $entries;
 }
示例#11
0
 /**
  * Returns an array of (
  *   'id'        => $id (string),
  *   'title'     => $title (string),
  *   'uri'       => $uri (string),
  *   'date'      => $date (int: Unix timestamp),
  *   'image_uri' => $image_uri (string)
  * )
  */
 public function getItemsByDate($cid = '', $all_langs = FALSE)
 {
     global $_CONF, $_TABLES, $_FM_TABLES;
     $entries = array();
     if (empty(Dataproxy::$startDate) or empty(Dataproxy::$endDate)) {
         return $entries;
     }
     $sql = "SELECT lid, f.title, logourl, date " . "  FROM {$_FM_TABLES['filemgmt_filedetail']} AS f " . "  LEFT JOIN {$_FM_TABLES['filemgmt_cat']} AS c " . "    ON f.cid = c.cid " . "WHERE (date BETWEEN '" . Dataproxy::$startDate . "' AND '" . Dataproxy::$endDate . "') ";
     if (!empty($cid)) {
         $sql .= "AND (f.cid = '" . addslashes($cid) . "') ";
     }
     if (!Dataproxy::isRoot()) {
         $sql .= "AND (c.grp_access IN (" . implode(',', SEC_getUserGroups(Dataproxy::uid())) . "))";
     }
     $result = DB_query($sql);
     if (DB_error()) {
         return $entries;
     }
     while (($A = DB_fetchArray($result, FALSE)) !== FALSE) {
         $entry = array();
         $entry['id'] = $A['lid'];
         $entry['title'] = stripslashes($A['title']);
         $entry['uri'] = $_CONF['site_url'] . '/filemgmt/index.php?id=' . $entry['id'];
         $entry['date'] = $A['date'];
         $entry['image_uri'] = FALSE;
         $entries[] = $entry;
     }
     return $entries;
 }
示例#12
0
 /**
  * Returns an array of (
  *   'id'        => $id (string),
  *   'title'     => $title (string),
  *   'uri'       => $uri (string),
  *   'date'      => $date (int: Unix timestamp),
  *   'image_uri' => $image_uri (string)
  * )
  */
 public function getItemsByDate($tid = '', $all_langs = FALSE)
 {
     global $_CONF, $_TABLES;
     $retval = array();
     if (empty(Dataproxy::$startDate) or empty(Dataproxy::$endDate)) {
         return $retval;
     }
     // Collects sids
     $sql = "SELECT id " . "  FROM {$_TABLES['topic_assignments']} " . "WHERE (type= 'article') AND (tdefault = 1) ";
     if (!empty($tid)) {
         $sql .= "  AND (tid = '" . addslashes($tid) . "') ";
     }
     if (!Dataproxy::isRoot()) {
         $sql .= COM_getTopicSql('AND', Dataproxy::uid());
     }
     $result = DB_query($sql);
     if (DB_error()) {
         return $retval;
     } else {
         $sids = array();
         while (($A = DB_fetchArray($result, FALSE)) !== FALSE) {
             $sids[] = addslashes($A['id']);
         }
         if (count($sids) === 0) {
             return $retval;
         }
     }
     $sql = "SELECT sid, title, UNIX_TIMESTAMP(date) AS day " . "  FROM {$_TABLES['stories']} " . "WHERE (draft_flag = 0) AND (date <= NOW()) " . "  AND (UNIX_TIMESTAMP(date) BETWEEN '" . Dataproxy::$startDate . "' AND '" . Dataproxy::$endDate . "') " . "  AND (sid IN ('" . implode("', '", $sids) . "')) ";
     if (!Dataproxy::isRoot()) {
         $sql .= COM_getPermSql('AND', Dataproxy::uid());
         if ($all_langs === FALSE) {
             $sql .= COM_getLangSQL('sid', 'AND');
         }
     }
     $sql .= " ORDER BY date DESC ";
     $result = DB_query($sql);
     if (DB_error()) {
         return $retval;
     }
     while (($A = DB_fetchArray($result, FALSE)) !== FALSE) {
         $entry = array();
         $entry['id'] = stripslashes($A['sid']);
         $entry['title'] = stripslashes($A['title']);
         $entry['uri'] = COM_buildUrl($_CONF['site_url'] . '/article.php?story=' . stripslashes($A['sid']));
         $entry['date'] = $A['day'];
         $entry['imageurl'] = FALSE;
         $retval[] = $entry;
     }
     return $retval;
 }
示例#13
0
 /**
  * @note This function ignores static pages which are displayed in the
  *       center blok.
  * @refer $_SP_CONF['sort_by']
  *
  * Returns an array of (
  *   'id'        => $id (string),
  *   'title'     => $title (string),
  *   'uri'       => $uri (string),
  *   'date'      => $date (int: Unix timestamp),
  *   'image_uri' => $image_uri (string)
  * )
  */
 public function getItemsByDate($category = '', $all_langs = FALSE)
 {
     global $_CONF, $_TABLES, $_SP_CONF;
     $entries = array();
     if (empty(Dataproxy::$startDate) or empty(Dataproxy::$endDate)) {
         return $entries;
     }
     if (Dataproxy::$isGL170) {
         $sql = "SELECT sp_id, sp_title, UNIX_TIMESTAMP(modified) AS day " . "  FROM {$_TABLES['staticpage']} " . "WHERE (UNIX_TIMESTAMP(modified) BETWEEN '" . Dataproxy::$startDate . "' AND '" . Dataproxy::$endDate . "') ";
     } else {
         $sql = "SELECT sp_id, sp_title, UNIX_TIMESTAMP(sp_date) AS day " . "  FROM {$_TABLES['staticpage']} " . "WHERE (UNIX_TIMESTAMP(sp_date) BETWEEN '" . Dataproxy::$startDate . "' AND '" . Dataproxy::$endDate . "') ";
     }
     if ($this->_isSP162) {
         $sql .= "AND (draft_flag = 0) ";
     }
     if (!Dataproxy::isRoot()) {
         $sql .= COM_getPermSql('AND', Dataproxy::uid());
     }
     if (in_array($_SP_CONF['sort_by'], array('id', 'title', 'date'))) {
         $crit = $_SP_CONF['sort_by'];
     } else {
         $crit = 'id';
     }
     $crit = 'sp_' . $crit;
     if (Dataproxy::$isGL170 and $crit === 'sp_date') {
         $crit = 'modified';
     }
     $sql .= " ORDER BY " . $crit;
     $result = DB_query($sql);
     if (DB_error()) {
         return $entries;
     }
     while (($A = DB_fetchArray($result, FALSE)) !== FALSE) {
         $entry = array();
         $entry['id'] = stripslashes($A['sp_id']);
         $entry['title'] = stripslashes($A['sp_title']);
         $entry['uri'] = COM_buildURL($_CONF['site_url'] . '/staticpages/index.php?page=' . rawurlencode($entry['id']));
         $entry['date'] = $A['day'];
         $entry['image_uri'] = FALSE;
         $entries[] = $entry;
     }
     return $entries;
 }
示例#14
0
 /**
  * Returns an array of (
  *   'id'        => $id (string),
  *   'title'     => $title (string),
  *   'uri'       => $uri (string),
  *   'date'      => $date (int: Unix timestamp),
  *   'image_uri' => $image_uri (string)
  * )
  */
 public function getItemsByDate($category = '', $all_langs = FALSE)
 {
     global $_CONF, $_TABLES;
     $entries = array();
     if (empty(Dataproxy::$startDate) or empty(Dataproxy::$endDate)) {
         return $entries;
     }
     $sql = "SELECT lid, title, UNIX_TIMESTAMP(date) AS date_u " . "FROM {$_TABLES['links']} " . "WHERE (UNIX_TIMESTAMP(date) BETWEEN '" . Dataproxy::$startDate . "' AND '" . Dataproxy::$endDate . "') ";
     if (!empty($category)) {
         if (Dataproxy::$isGL150) {
             // for GL-1.5.0+
             $sql .= "AND (cid = '" . addslashes($category) . "') ";
         } else {
             // for - GL-1.5.0
             $sql .= "AND (category = '" . addslashes($category) . "') ";
         }
     }
     if (!Dataproxy::isRoot()) {
         $sql .= COM_getPermSQL('AND', Dataproxy::uid());
     }
     $sql .= "ORDER BY date_u DESC";
     $result = DB_query($sql);
     if (DB_error()) {
         return $entries;
     }
     while (($A = DB_fetchArray($result, FALSE)) !== FALSE) {
         $entry = array();
         $A = array_map('stripslashes', $A);
         $entry['id'] = $A['lid'];
         $entry['title'] = $A['title'];
         $entry['uri'] = COM_buildURL($_CONF['site_url'] . '/links/portal.php?what=link&amp;item=' . urlencode($this->toUtf8($entry['id'])));
         $entry['date'] = $A['date_u'];
         $entry['image_uri'] = FALSE;
         $entries[] = $entry;
     }
     return $entries;
 }