/** * @desc Muestra la lista de los anuncios existentes */ function showAnnounces() { global $db, $xoopsModule, $xoopsSecurity; $result = $db->query("SELECT * FROM " . $db->prefix("bxpress_announcements") . " ORDER BY date"); $announcements = array(); while ($row = $db->fetchArray($result)) { $an = new bXAnnouncement(); $an->assignVars($row); $announcements[] = array('id' => $an->id(), 'text' => TextCleaner::getInstance()->truncate($an->text(), 100), 'date' => formatTimestamp($an->date()), 'expire' => formatTimeStamp($an->expire()), 'where' => constant('BX_FWHERE' . $an->where()), 'wherelink' => $an->where() == 1 ? '../forum.php?id=' . $an->forum() : '../', 'by' => $an->byName()); } $announcements = RMEvents::get()->run_event('bxpress.announcements.list', $announcements); RMTemplate::get()->set_help('http://www.redmexico.com.mx/docs/bxpress-forums/anuncios/standalone/1/'); bXFunctions::menu_bar(); xoops_cp_location("<a href='./'>" . $xoopsModule->name() . "</a> » " . __('Announcements Management', 'bxpress')); xoops_cp_header(); RMTemplate::get()->add_local_script('jquery.checkboxes.js', 'rmcommon', 'include'); RMTemplate::get()->add_style('admin.css', 'bxpress'); RMTemplate::get()->add_local_script('admin.js', 'bxpress'); include RMTemplate::get()->get_template("admin/forums_announcements.php", 'module', 'bxpress'); xoops_cp_footer(); }
/** * @desc Muestra la lista de los anuncios existentes */ function showAnnounces() { global $db, $xoopsModule, $xoopsSecurity; $result = $db->query("SELECT * FROM " . $db->prefix("mod_bxpress_announcements") . " ORDER BY date"); $announcements = array(); while ($row = $db->fetchArray($result)) { $an = new bXAnnouncement(); $an->assignVars($row); $announcements[] = array('id' => $an->id(), 'text' => TextCleaner::getInstance()->truncate($an->text(), 100), 'date' => formatTimestamp($an->date()), 'expire' => formatTimeStamp($an->expire()), 'where' => constant('BX_FWHERE' . $an->where()), 'wherelink' => $an->where() == 1 ? '../forum.php?id=' . $an->forum() : '../', 'by' => $an->byName()); } $announcements = RMEvents::get()->run_event('bxpress.announcements.list', $announcements); RMTemplate::get()->add_help(__('Announcements Help', 'bxpress'), '#'); $bc = RMBreadCrumb::get(); $bc->add_crumb(__('Announcements Management', 'bxpress')); xoops_cp_header(); RMTemplate::get()->add_script('jquery.checkboxes.js', 'rmcommon', array('directory' => 'include')); RMTemplate::get()->add_style('admin.css', 'bxpress'); RMTemplate::get()->add_script('admin.js', 'bxpress'); include RMTemplate::get()->get_template("admin/forums-announcements.php", 'module', 'bxpress'); xoops_cp_footer(); }