<?php

/**
 *   @file import_libguides.php
 *   @brief This sends a guide id and a staff id to the importer, imports the guide with that id and returns a JSON reponse indicating sucess or failure along with other information about the import status.
 *   @author little9 (Jamie Little)
 *   @date June 2014
 */
header("Content-Type: application/json; charset=UTF-8");
include '../../includes/autoloader.php';
include '../../includes/config.php';
include '../../includes/functions.php';
use SubjectsPlus\Control\Querier;
use SubjectsPlus\Control\LGImport;
use SubjectsPlus\Control\Logger;
use RichterLibrary\Helpers\CatalogMigrator;
$db = new Querier();
$log = new Logger();
$cm = new CatalogMigrator();
$lg_importer = new LGImport('libguides.xml', $log, $db, $cm);
// Set the guide id
$lg_importer->setGuideID($_GET['libguide']);
$lg_importer->setStaffID($_GET['staff_id']);
// Import the guides with the XML you just loaded
echo $lg_importer->importLibGuides();
<?php

/**
 *   @file import_libguides_links.php
 *   @brief This send the libguides importer an id, imports those links into the database, and gives a JSON response indicating sucess or failure, along with more detailed results.
 *   @author little9 (Jamie Little)
 *   @date June 2014
 */
header("Content-Type: application/json; charset=UTF-8");
include '../../includes/autoloader.php';
include '../../includes/config.php';
include '../../includes/functions.php';
use SubjectsPlus\Control\Querier;
use SubjectsPlus\Control\LGImport;
use SubjectsPlus\Control\Logger;
use RichterLibrary\Helpers\CatalogMigrator;
$db = new Querier();
$log = new Logger();
$cm = new CatalogMigrator();
$libguides_importer = new LGImport('libguides.xml', $log, $db, $cm);
// Set the guide id
$libguides_importer->setGuideID($_GET['libguide']);
// Load all the links from the XML
$libguides_links = $libguides_importer->loadLibGuidesLinksXML();
echo $libguides_links;
Example #3
0
  <div class="titlebar">
  <div class="titlebar_text">Setup Instructions</div>
  </div>
  <div class="pluslet_body"> 
    For instructions on how to set this up please view the <a href="http://www.subjectsplus.com/wiki/index.php?title=Libguides_Importer">documentation</a> on the SubjectsPlus wiki.
  </div>
 
</div>
-->


<?php 
$db = new Querier();
$log = new Logger();
$cm = new CatalogMigrator();
$libguides_importer = new LGImport('libguides.xml', $log, $db, $cm);
?>

<div class="pure-g">
	<div class="pure-u-1-2">

		<div class="pluslet">
			<div class="titlebar">
				<div class="titlebar_text">Select a Guide to Import</div>
			</div>
			<div class="pluslet_body"> 



<?php 
$owners_combined = $libguides_importer->OutputGuides($_GET["email"]);
echo $AssetPath;
?>
/js/select2/select2.min.js"></script>



<div class="pluslet"> 
  <div class="titlebar">
  <div class="titlebar_text">Select Your Name</div>
  </div>
  <div class="pluslet_body"> 
<p>Please select your name below to being importing your guides.</p>
<p>After selecting your name, you'll be able to choose which guide you want to import.</p>
<form action="lg_importer.php" method="GET">
<?php 
$db = new Querier();
$log = new Logger();
$cm = new CatalogMigrator();
$libguides_importer = new LGImport('libguides.xml', $log, $db, $cm);
$libguides_importer->OutputOwners();
?>
<p></p>
<button type="submit" class="pure-button pure-button-primary">View Your Guides</button>
</form>


</div>
</div>
<script type="text/javascript">
$('select').select2({'width':'500px'});
</script>