/** \file * \brief Definition of Dublin Core handler. * * It is not working as it does not provide any content to the metadata node. It only included * to demonstrate how a new metadata can be supported. For a working * example, please see record_rif.php. * * @author: Ismail Fahmi, ismail.fahmi@gmail.com * * \sa oaidp-config.php */ function create_metadata($outputObj, $cur_record, $identifier, $setspec, $db) { if (!defined('SLIMS_SERVER_NAME')) { define('SLIMS_SERVER_NAME', $_SERVER['SERVER_NAME']); } if (!defined('SLIMS_BASE_URL')) { define('SLIMS_BASE_URL', 'http://' . SLIMS_SERVER_NAME . dirname($_SERVER['SCRIPT_NAME'])); } $metadata_node = $outputObj->create_metadata($cur_record); $oai_node = $outputObj->addChild($metadata_node, "oai_dc:dc"); $oai_node->setAttribute("xmlns:oai_dc", "http://www.openarchives.org/OAI/2.0/oai_dc/"); $oai_node->setAttribute("xmlns:dc", "http://purl.org/dc/elements/1.1/"); $oai_node->setAttribute("xmlns:xsi", "http://www.w3.org/2001/XMLSchema-instance"); $oai_node->setAttribute("xsi:schemaLocation", "http://www.openarchives.org/OAI/2.0/oai_dc/ http://www.openarchives.org/OAI/2.0/oai_dc.xsd"); $record = get_record($identifier, $db); $authors = get_authors($identifier, $db); $subjects = get_subjects($identifier, $db); $outputObj->addChild($oai_node, 'dc:title', xml_safe($record['title'])); foreach ($authors as $author) { $outputObj->addChild($oai_node, 'dc:creator', xml_safe($author['author_name'])); } foreach ($subjects as $subject) { $outputObj->addChild($oai_node, 'dc:subject', xml_safe($subject['topic'])); } $outputObj->addChild($oai_node, 'dc:publisher', xml_safe($record['publisher_name'])); $outputObj->addChild($oai_node, 'dc:date', date_safe($record['publish_year'])); $outputObj->addChild($oai_node, 'dc:language', $record['language_id']); $outputObj->addChild($oai_node, 'dc:format', $record['gmd_name']); $outputObj->addChild($oai_node, 'dc:identifier', SLIMS_BASE_URL . '/index.php?p=show_detail&id=' . $record['biblio_id']); if (!empty($record['isbn_issn'])) { $outputObj->addChild($oai_node, 'dc:identifier_isbn', xml_safe($record['isbn_issn'])); } if (!empty($record['notes'])) { $outputObj->addChild($oai_node, 'dc:description', xml_safe($record['notes'])); } if (!empty($record['publish_place'])) { $outputObj->addChild($oai_node, 'dc:location', xml_safe($record['publish_place'])); } if (!empty($record['image'])) { $outputObj->addChild($oai_node, 'dc:identifier', SLIMS_BASE_URL . '/lib/phpthumb/phpThumb.php?src=../../images/docs/' . xml_safe($record['image'])); } if (!empty($record['series_title'])) { $outputObj->addChild($oai_node, 'dc:series', xml_safe($record['series_title'])); } if (!empty($record['collation'])) { $outputObj->addChild($oai_node, 'dc:description', xml_safe($record['collation'])); } if (!empty($record['classification'])) { $outputObj->addChild($oai_node, 'dc:subject', xml_safe($record['classification'])); } //print_r($record); //print_r($authors); //print_r($subjects); }
require_once 'data/_data.php'; require_once 'data/_comics.php'; require_once 'data/_authors.php'; require_once 'data/_publishers.php'; session_start(); if (array_key_exists(ITEM_ID, $_GET)) { $item = get_item_details($_GET[ITEM_ID]); } else { if (!$item) { $err_msg = 'Aucunne BD ne correspond à cette requête.'; } else { $err_msg = 'Aucun resultat.'; } } $authors = get_authors($item[AUTHOR_ID]); $publishers = get_publishers($item[PUBLISHER_ID]); //var_dump($item); //var_dump($authors); ?> <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title><?php echo $item[ITEM_TITLE]; ?> </title> <!-- Latest compiled and minified CSS --> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css"> <!-- Optional theme -->
<div class="row"> <div class="col-lg-12"> <h1 class="page-header">Authors Page</h1> </div> </div> <!-- /.row --> <!-- Page Content --> <div class="container"> <div class="col-md-3"> <h4> <?php get_authors(); ?> </h4> <br> </div> <div class="col-md-9"> <h2 class="text-center">Adventure posted page option</h2> <br>
?> " name="<?php echo ARTIST; ?> " type="text" class="form-control" value="<?php echo array_key_exists(ARTIST, $_POST) ? $_POST[ARTIST] : ''; ?> " /> </div> <button class="btn btn-primary" type="submit" name="create_submit">Ajouter</button> <button class="btn btn-default" type="submit" name="close_submit">Annuler</button> </form> <?php } elseif ('delete' == $action) { $authors = get_authors($_GET['id']); ?> <h2 class="sub-header">Auteurs - Supprimer</h2> <form method="post" class="col-md-4"> <p>Êtes-vous sûr de vouloir supprimer définitivement le scénariste: <?php echo array_key_exists('id', $_GET) ? $authors[0][WRITER] : ''; ?> et le déssinateur: <?php echo array_key_exists('id', $_GET) ? $authors[0][ARTIST] : ''; ?> ? </p> <button class="btn btn-danger" type="submit" name="delete_submit">Supprimer</button> <button class="btn btn-default" type="submit" name="close_submit">Annuler</button> </form>
?> </td> <td><?php echo $comic[ITEM_TITLE]; ?> </td> <td><?php echo get_publishers($comic[PUBLISHER_ID])[0][PUBLISHER_NAME]; ?> </td> <td><?php echo get_authors($comic[AUTHOR_ID])[0][WRITER]; ?> </td> <td><?php echo get_authors($comic[AUTHOR_ID])[0][ARTIST]; ?> </td> <td><?php echo get_categories($comic[CAT_ID])[0][CAT_NAME]; ?> </td> <td><?php echo '$' . $comic[ITEM_PRICE]; ?> </td> <td><?php echo $comic[ITEM_RATING]; ?> </td> <td><?php
/** * get_feeds * * * * * * */ function get_feeds($show_all_feeds = 1) { $feed_list = array(); /* section description feeds title url */ // main feed $feed_list['all'] = array('section' => 'All Articles', 'description' => 'The main feed for this site'); $feed_list['all']['feeds'][] = array('title' => 'Main Feed', 'url' => WW_WEB_ROOT . '/rss/'); // get additional rss feeds via links table $rss_links = get_links('site_rss'); if (!empty($rss_links)) { $feed_list['additional'] = array('section' => 'Additional Feeds', 'description' => 'Other feeds for this site'); foreach ($rss_links['site_rss'] as $cat => $link) { $feed_list['additional']['feeds'][] = array('title' => $link['title'], 'url' => $link['url']); } } // show other links if (!empty($show_all_feeds)) { // category feeds $categories = get_categories(); $feed_list['categories'] = array('section' => 'Categories', 'description' => 'Feeds for individual categories'); foreach ($categories as $cat) { $feed_list['categories']['feeds'][] = array('title' => $cat['title'], 'url' => WW_WEB_ROOT . '/rss/' . $cat['url']); } // author feeds $authors = get_authors(); $feed_list['authors'] = array('section' => 'Authors', 'description' => 'Feeds for individual authors'); foreach ($authors as $author) { $feed_list['authors']['feeds'][] = array('title' => $author['title'], 'url' => WW_WEB_ROOT . '/rss/author/' . $author['url']); } // tag feeds $tags = get_tags(); $feed_list['tags'] = array('section' => 'Tags', 'description' => 'Feeds for individual tags'); foreach ($tags as $tag) { $feed_list['tags']['feeds'][] = array('title' => $tag['title'], 'url' => WW_WEB_ROOT . '/rss/tag/' . $tag['url']); } } return $feed_list; }
// get all articles $articles_xml_list = get_articles_basic($url_style, '', 'date_uploaded DESC'); if (empty($articles_xml_list)) { echo "</urlset>"; exit; } // set sitemap header $site_link = constant('WW_WEB_ROOT'); $most_recent_ts = strtotime($articles_xml_list[0]['date_uploaded']); $most_recent = date('Y-m-d', $most_recent_ts); echo "\n <url>\n <loc>" . WW_WEB_ROOT . "</loc>\n <lastmod>" . $most_recent . "</lastmod>\n <changefreq>weekly</changefreq>\n <priority>0.8</priority>\n </url>"; foreach ($articles_xml_list as $article) { echo "\n\t<url>\n\t\t<loc>" . $article['link'] . "</loc>\n\t\t<lastmod>" . date('Y-m-d', strtotime($article['date_uploaded'])) . "</lastmod>\n\t\t<priority>0.8</priority>\n\t\t<changefreq>weekly</changefreq>\n\t</url>"; } // add category index $cats_xml_list = get_categories_basic(); foreach ($cats_xml_list as $cat_xml) { echo "\n\t\t<url>\n\t\t\t<loc>" . $cat_xml['link'] . "</loc>\n\t\t\t<priority>0.3</priority>\n\t\t\t<changefreq>monthly</changefreq>\n\t\t</url>"; } // add tag index $tags_xml_list = get_tags(); foreach ($tags_xml_list as $tag_xml) { echo "\n\t\t<url>\n\t\t\t<loc>" . $tag_xml['link'] . "</loc>\n\t\t\t<priority>0.3</priority>\n\t\t\t<changefreq>monthly</changefreq>\n\t\t</url>"; } // add author index $authors_xml_list = get_authors(); foreach ($authors_xml_list as $author_xml) { echo "\n\t\t<url>\n\t\t\t<loc>" . $author_xml['link'] . "</loc>\n\t\t\t<priority>0.3</priority>\n\t\t\t<changefreq>monthly</changefreq>\n\t\t</url>"; } // end sitemap echo "</urlset>";
function show_modules_list() { global $xoopsSecurity; $installed_modules = array(); $limit = rmc_server_var($_SESSION, 'mods_limit', 4); include_once XOOPS_ROOT_PATH . '/kernel/module.php'; $db = XoopsDatabaseFactory::getDatabaseConnection(); $sql = "SELECT * FROM " . $db->prefix("modules") . " ORDER BY `name`"; $result = $db->query($sql); $installed_dirs = array(); while ($row = $db->fetchArray($result)) { $mod = new XoopsModule(); $mod->assignVars($row); $installed_dirs[] = $mod->dirname(); if (file_exists(XOOPS_ROOT_PATH . '/modules/' . $mod->getVar('dirname') . '/class/' . strtolower($mod->getVar('dirname') . 'controller') . '.php')) { include_once XOOPS_ROOT_PATH . '/modules/' . $mod->getVar('dirname') . '/class/' . strtolower($mod->getVar('dirname') . 'controller') . '.php'; $class = ucfirst($mod->getVar('dirname')) . 'Controller'; $class = new $class(); if (method_exists($class, 'get_main_link')) { $main_link = $class->get_main_link(); } else { if ($mod->getVar('hasmain')) { $main_link = XOOPS_URL . '/modules/' . $mod->dirname(); } else { $main_link = "#"; } } } else { if ($mod->getVar('hasmain')) { $main_link = XOOPS_URL . '/modules/' . $mod->dirname(); } else { $main_link = "#"; } } // Admin section $admin_link = $mod->getVar('hasadmin') ? XOOPS_URL . '/modules/' . $mod->dirname() . '/' . $mod->getInfo('adminindex') : ''; $modules[] = array('id' => $mod->getVar('mid'), 'name' => $mod->getVar('name'), 'realname' => $mod->getInfo('name'), 'version' => $mod->getInfo('rmnative') ? RMModules::format_module_version($mod->getInfo('rmversion')) : $mod->getInfo('version'), 'description' => $mod->getInfo('description'), 'icon' => XOOPS_URL . '/modules/' . $mod->getVar('dirname') . '/' . ($mod->getInfo('icon48') ? $mod->getInfo('icon48') : $mod->getInfo('image')), 'image' => XOOPS_URL . '/modules/' . $mod->getVar('dirname') . '/' . $mod->getInfo('image'), 'link' => $main_link, 'admin_link' => $admin_link, 'updated' => formatTimestamp($mod->getVar('last_update'), 's'), 'url' => $mod->getInfo('url'), 'authors' => get_authors($mod), 'license' => $mod->getInfo('license'), 'dirname' => $mod->getInfo('dirname'), 'active' => $mod->getVar('isactive'), 'help' => $mod->getInfo('help'), 'social' => $mod->getInfo('social')); } // Event for installed modules $modules = RMEvents::get()->run_event('rmcommon.installed.modules', $modules, $installed_dirs); require_once XOOPS_ROOT_PATH . "/class/xoopslists.php"; $dirlist = XoopsLists::getModulesList(); $available_mods = array(); $module_handler = xoops_gethandler('module'); foreach ($dirlist as $file) { clearstatcache(); $file = trim($file); if (!in_array($file, $installed_dirs)) { $module =& $module_handler->create(); if (!$module->loadInfo($file, false)) { continue; } $available_mods[] = $module; unset($module); } } // Event for available modules $available_mods = RMEvents::get()->run_event('rmcommon.available.modules', $available_mods); $GLOBALS['available_mods'] = $available_mods; RMBreadCrumb::get()->add_crumb(__('Modules Management', 'rmcommon')); ////RMFunctions::create_toolbar(); RMTemplate::get()->assign('xoops_pagetitle', __('Modules Management', 'rmcommon')); RMTemplate::get()->add_style('modules.min.css', 'rmcommon'); RMTemplate::get()->add_script('modules.min.js', 'rmcommon'); RMTemplate::get()->set_help('http://www.redmexico.com.mx/docs/common-utilities/uso-de-common-utilities/standalone/1/#administrador-de-modulos'); xoops_cp_header(); include RMTemplate::get()->get_template('rmc-modules.php', 'module', 'rmcommon'); xoops_cp_footer(); }
// get config from database if (empty($config)) { $config = get_settings(); } // initialise arrays $aside_snippet = array(); $aside_content = array(); $new_asides = import_asides($config['site']['theme']); if (!empty($new_asides)) { foreach ($new_asides as $aside_title => $aside_data) { $aside_snippet[$aside_title] = $aside_data; } } // define snippets content // generate some basic lists and a search form $authors_list = get_authors(); $pages_list = get_pages_basic(); $categories_list = get_categories(); $categories_basic_list = get_categories_basic(); $tags_list = get_tags(); $months_list = get_months(); $search_form = show_search_form(); $aside_snippet['twitter_feed'] = ''; if (!empty($config['connections']['twitter_username'])) { $twitter_username = $config['connections']['twitter_username']; $twitter_feed = get_twitter_feed($twitter_username); $aside_snippet['twitter_feed'] = build_snippet('Recent twitterings...', $twitter_feed); } // now use a ready made function to put the above data arrays into some drop down lists $months_select_form = build_select_form('months_select_form', $months_list); $categories_select_form = build_select_form('categories_select_form', $categories_list);
function render_publisher_list($dbc, $article_id) { $authors = get_authors($dbc, $article_id, 'publisher'); render_user_list($dbc, $authors); }
<?php require_once '../data/_authors.php'; $authors = get_authors(); //var_dump($authors); ?> <h2 class="sub-header">Auteurs</h2> <a href="handle_author.php?action=add" class="edit_author" title="Ajouter de nouveaux auteurs" id="new"> <span class="glyphicon glyphicon-plus"></span> </a> <div class="table-responsive"> <table class="table table-striped"> <thead> <tr> <th></th> <th></th> <th>ID</th> <th>Scénariste</th> <th>Déssinateur</th> </tr> </thead> <tbody> <?php foreach ($authors as $author) { ?> <tr> <th scope="row"> <a href="handle_author.php?action=edit&id=<?php echo $author[AUTHOR_ID]; ?> " class="edit_author" title="Modifer">