require_once 'lib/manageentry.class.php';
require_once 'lib/trite.class.php';
-## main vars
-# database object
-$DB = false;
-$Spectre = false;
-
## DB connection
$DB = new mysqli(DB_HOST, DB_USERNAME,DB_PASSWORD, DB_NAME);
$driver = new mysqli_driver();
if(!$Spectre->allowedRequests($_requestMode)) $_requestMode = "default";
}
-$_authKey = false;
+$_authKey = '';
if(isset($_GET['authKey']) && !empty($_GET['authKey'])) {
$_authKey = trim($_GET['authKey']);
- $_authKey = Summoner::validate($_authKey,'nospace') ? $_authKey : false;
+ $_authKey = Summoner::validate($_authKey,'nospace') ? $_authKey : '';
}
$_apiResult = array(
## main vars
-# database object
-$DB = false;
# the template data as an array
# and some defaults
$TemplateData = array();
require_once 'lib/mancubus.class.php';
$Mancubus = new Mancubus($DB,$Doomguy);
-$_collection = false;
+$_collection = '';
if(isset($_GET['collection']) && !empty($_GET['collection'])) {
$_collection = trim($_GET['collection']);
- $_collection = Summoner::validate($_collection,'digit') ? $_collection : false;
+ $_collection = Summoner::validate($_collection,'digit') ? $_collection : '';
}
$TemplateData['pageTitle'] = 'Advanced search';
require_once 'lib/manageentry.class.php';
$ManageEntry = new Manageentry($DB,$Doomguy);
-$_collection = false;
+$_collection = '';
if(isset($_GET['collection']) && !empty($_GET['collection'])) {
$_collection = trim($_GET['collection']);
- $_collection = Summoner::validate($_collection,'digit') ? $_collection : false;
+ $_collection = Summoner::validate($_collection,'digit') ? $_collection : '';
}
$TemplateData['loadedCollection'] = array();
$TemplateData['search'] = false;
$TemplateData['searchAction'] = 'index.php';
-$_search = false;
+$_search = '';
if(isset($_POST['navSearch'])) {
$_search = trim($_POST['navSearch']);
- $_search = Summoner::validate($_search,'text') ? $_search : false;
+ $_search = Summoner::validate($_search,'text') ? $_search : '';
}
$TemplateData['latest'] = $Mancubus->getLatest(5,5,$_search);
require_once 'lib/trite.class.php';
$Trite = new Trite($DB,$Doomguy);
-$_collection = false;
+$_collection = '';
if(isset($_GET['collection']) && !empty($_GET['collection'])) {
$_collection = trim($_GET['collection']);
- $_collection = Summoner::validate($_collection,'digit') ? $_collection : false;
+ $_collection = Summoner::validate($_collection,'digit') ? $_collection : '';
}
-$_id = false;
+$_id = '';
if(isset($_GET['id']) && !empty($_GET['id'])) {
$_id = trim($_GET['id']);
- $_id = Summoner::validate($_id,'digit') ? $_id : false;
+ $_id = Summoner::validate($_id,'digit') ? $_id : '';
}
$TemplateData['pageTitle'] = '?';
$TemplateData['pageTitle'] = 'Manage collection fields';
-$_id = false;
+$_id = '';
if(isset($_GET['id']) && !empty($_GET['id'])) {
$_id = trim($_GET['id']);
- $_id = Summoner::validate($_id,'digit') ? $_id : false;
+ $_id = Summoner::validate($_id,'digit') ? $_id : '';
}
if(!empty($_id)) {
}
}
-$_id = false;
+$_id ='';
if(isset($_GET['id']) && !empty($_GET['id'])) {
$_id = trim($_GET['id']);
- $_id = Summoner::validate($_id,'digit') ? $_id : false;
+ $_id = Summoner::validate($_id,'digit') ? $_id : '';
}
if($_editMode === true && !empty($_id)) {
$TemplateData['_editFieldViewDefault'] = Summoner::themefile('manageentry/field-unknown.html', UI_THEME);
-$_collection = false;
+$_collection = '';
if(isset($_GET['collection']) && !empty($_GET['collection'])) {
$_collection = trim($_GET['collection']);
- $_collection = Summoner::validate($_collection,'digit') ? $_collection : false;
+ $_collection = Summoner::validate($_collection,'digit') ? $_collection : '';
}
-$_id = false;
+$_id = '';
if(isset($_GET['id']) && !empty($_GET['id'])) {
$_id = trim($_GET['id']);
- $_id = Summoner::validate($_id,'digit') ? $_id : false;
+ $_id = Summoner::validate($_id,'digit') ? $_id : '';
}
if(!empty($_collection)) {
require_once 'lib/possessed.class.php';
$Possessed = new Possessed($DB, $Doomguy);
$TemplateData['existingGroups'] = $Possessed->getGroups();
-$TemplateData['editData'] = false;
+$TemplateData['editData'] = array();
$TemplateData['pageTitle'] = 'Manage groups';
-$_id = false;
+$_id = '';
if(isset($_GET['id']) && !empty($_GET['id'])) {
$_id = trim($_GET['id']);
- $_id = Summoner::validate($_id,'digit') ? $_id : false;
+ $_id = Summoner::validate($_id,'digit') ? $_id : '';
}
if(!empty($_id)) {
require_once 'lib/managetags.class.php';
$ManageTags = new ManageTags($DB,$Doomguy);
-$_collection = false;
+$_collection = '';
if(isset($_GET['collection']) && !empty($_GET['collection'])) {
$_collection = trim($_GET['collection']);
- $_collection = Summoner::validate($_collection,'digit') ? $_collection : false;
+ $_collection = Summoner::validate($_collection,'digit') ? $_collection : '';
}
-$_id = false;
+$_id = '';
if(isset($_GET['id']) && !empty($_GET['id'])) {
$_id = trim($_GET['id']);
- $_id = Summoner::validate($_id,'digit') ? $_id : false;
+ $_id = Summoner::validate($_id,'digit') ? $_id : '';
}
$TemplateData['loadedCollection'] = array();
$Possessed = new Possessed($DB, $Doomguy);
$TemplateData['existingGroups'] = $Possessed->getGroups();
$TemplateData['existingUsers'] = $Possessed->getUsers();
-$TemplateData['editData'] = false;
+$TemplateData['editData'] = array();
$TemplateData['editData']['groups'] = array();
$TemplateData['pageTitle'] = 'Manage users';
-$_id = false;
+$_id = '';
if(isset($_GET['id']) && !empty($_GET['id'])) {
$_id = trim($_GET['id']);
- $_id = Summoner::validate($_id,'digit') ? $_id : false;
+ $_id = Summoner::validate($_id,'digit') ? $_id : '';
}
if(!empty($_id)) {
<?php } ?>
</div>
</div>
+</div>
+<div class="uk-grid-small uk-grid-row-small" uk-grid>
<div class="uk-width-1-2">
<ul>
<li>Bibliotheca: <code><?php echo $TemplateData['bibVersion']; ?></code></li>
$TemplateData['collection'] = array();
$TemplateData['editEntry'] = array();
-$_collection = false;
+$_collection = '';
if(isset($_GET['collection']) && !empty($_GET['collection'])) {
$_collection = trim($_GET['collection']);
- $_collection = Summoner::validate($_collection,'digit') ? $_collection : false;
+ $_collection = Summoner::validate($_collection,'digit') ? $_collection : '';
}
-$_id = false;
+$_id = '';
if(isset($_GET['id']) && !empty($_GET['id'])) {
$_id = trim($_GET['id']);
- $_id = Summoner::validate($_id,'digit') ? $_id : false;
+ $_id = Summoner::validate($_id,'digit') ? $_id : '';
}
-$_t = false;
+$_t = '';
if(isset($_GET['t']) && !empty($_GET['t'])) {
$_t = trim($_GET['t']);
- $_t = Summoner::validate($_t,'nospace') ? $_t : false;
+ $_t = Summoner::validate($_t,'nospace') ? $_t : '';
}
if(!empty($_collection) && !empty($_t)) {