Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

508 compliance for collections/specprocessor/salix/salixhandler.php #616

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
60 changes: 34 additions & 26 deletions collections/specprocessor/salix/salixhandler.php
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
<!DOCTYPE html>

<?php
include_once('../../../config/symbini.php');
include_once($SERVER_ROOT.'/classes/SalixUtilities.php');
header("Content-Type: text/html; charset=".$CHARSET);
include_once($SERVER_ROOT . '/classes/SalixUtilities.php');
include_once($SERVER_ROOT . '/content/lang/collections/specprocessor/salix/salixhandler.' . $LANG_TAG . '.php');
header("Content-Type: text/html; charset=" . $CHARSET);
if(!$SYMB_UID){
header('Location: ../../../profile/index.php?refurl=../collections/specprocessor/salix/salixhandler.php?'.htmlspecialchars($_SERVER['QUERY_STRING'], ENT_QUOTES));
header('Location: ../../../profile/index.php?refurl=../collections/specprocessor/salix/salixhandler.php?' . htmlspecialchars($_SERVER['QUERY_STRING'], ENT_QUOTES));
}

$action = (isset($_REQUEST['formsubmit'])?$_REQUEST['formsubmit']:'');
Expand All @@ -24,10 +27,10 @@
}
}
?>
<!DOCTYPE html >
<html>

<html lang="<?php echo $LANG_TAG ?>">
<head>
<title>SALIX Wordstat Manager</title>
<title><?php echo (isset($LANG['SALIX_WRDST_MNGR']) ? $LANG['SALIX_WRDST_MNGR'] : 'SALIX Wordstat Manager'); ?></title>
<link href="<?php echo htmlspecialchars($CSS_BASE_PATH, HTML_SPECIAL_CHARS_FLAGS); ?>/jquery-ui.css" type="text/css" rel="stylesheet">
<?php
include_once($SERVER_ROOT.'/includes/head.php');
Expand All @@ -48,20 +51,20 @@ function verifySalixManagerForm(this){
include($SERVER_ROOT.'/includes/header.php');
?>
<div class='navpath'>
<a href="../../../index.php">Home</a> &gt;&gt;
<a href="../../../index.php"> <?php echo (isset($LANG['HOME'])?$LANG['HOME']:'Home'); ?> </a> &gt;&gt;
<?php
if($collid){
?>
<a href="../../misc/collprofiles.php?collid=<?php echo htmlspecialchars($collid, HTML_SPECIAL_CHARS_FLAGS); ?>&emode=1">Collection Management</a> &gt;&gt;
<a href="../../misc/collprofiles.php?collid=<?php echo htmlspecialchars($collid, HTML_SPECIAL_CHARS_FLAGS); ?>&emode=1"> <?php echo (isset($LANG['COLL_MGMT'])?$LANG['COLL_MGMT']:'Collection Management'); ?> </a> &gt;&gt;
<?php
}
else{
?>
<a href="../../../sitemap.php">Sitemap</a> &gt;&gt;
<a href="../../../sitemap.php"> <?php echo (isset($LANG['BREADCRUMB_SITEMAP'])?$LANG['BREADCRUMB_SITEMAP']:'Sitemap'); ?> </a> &gt;&gt;
<?php
}
echo '<a href="salixhandler.php?collid=' . htmlspecialchars($collid, HTML_SPECIAL_CHARS_FLAGS) . '&actiontype=' . htmlspecialchars($actionType, HTML_SPECIAL_CHARS_FLAGS) . '&limit=' . htmlspecialchars($limit, HTML_SPECIAL_CHARS_FLAGS) . '">';
echo '<b>SALIX Wordstat Manager</b>';
echo '<b>' . (isset($LANG['SALIX_WRDST_MNGR'])?$LANG['SALIX_WRDST_MNGR']:'SALIX Wordstat Manager') . '</b>';
echo '</a>';
?>
</div>
Expand All @@ -74,31 +77,36 @@ function verifySalixManagerForm(this){
$salixHanlder->setVerbose($verbose);
if($action == 'Build Wordstat Tables'){
$salixHanlder->buildWordStats($collid,$actionType,$limit);
echo '<div style="margin:15px;"><a href="salixhandler.php?collid=' . htmlspecialchars($collid, HTML_SPECIAL_CHARS_FLAGS) . '&actiontype=' . htmlspecialchars($actionType, HTML_SPECIAL_CHARS_FLAGS) . '&limit=' . htmlspecialchars($limit, HTML_SPECIAL_CHARS_FLAGS) . '">Return to Main Menu</a></div>';
echo '<div style="margin:15px;"><a href="salixhandler.php?collid=' . htmlspecialchars($collid, HTML_SPECIAL_CHARS_FLAGS) . '&actiontype=' . htmlspecialchars($actionType, HTML_SPECIAL_CHARS_FLAGS) . '&limit=' . htmlspecialchars($limit, HTML_SPECIAL_CHARS_FLAGS) . '">' . (isset($LANG['RETURN'])?$LANG['RETURN']:'Return to Main Menu') . '</a></div>';
}
else{
?>
<fieldset style="border:10px;">
<legend></legend>
<div style="border:10px;">
<form name="salixmanagerform" action="salixhandler.php" method="post" onsubmit="return verifySalixManagerForm(this)">
<div style="margin:15px;">
<b>Actions</b><br/>
<input name="actiontype" type="radio" value="1" /> Rebuild with randomly selected occurrences<br/>
<input name="actiontype" type="radio" value="2" /> Rebuild with most recently entered occurrences<br/>
<input name="actiontype" type="radio" value="3" checked />Append using occurrences entered since last build (<?php echo $salixHanlder->getLastBuildTimestamp(); ?>)<br/><br/>
Limit to <input name="limit" type="text" value="100000" /> unique values per column
</div>
<div style="margin:15px;">
<input name="collid" type="hidden" value="<?php echo $collid; ?>" />
<input name="formsubmit" type="submit" value="Build Wordstat Tables" />
</div>
<fieldset style="margin:15px;">
<legend><b> <?php echo (isset($LANG['SALIX_WRDST_MNGR'])?$LANG['SALIX_WRDST_MNGR']:'SALIX Wordstat Manager') ?> </b></legend>
<?php echo (isset($LANG['ACTIONS'])?$LANG['ACTIONS']:'Actions') ?> :<br/>
<input id="rndmSelect" name="actiontype" type="radio" value="1" /> <label for="rndmSelect"> <?php echo (isset($LANG['RNDM_SELECT'])?$LANG['RNDM_SELECT']:'Rebuild with randomly selected occurrences') ?> </label> <br/>
<input id="recentEnter" name="actiontype" type="radio" value="2" /> <label for="recentEnter"> <?php echo (isset($LANG['RECENTLY_ENTERED'])?$LANG['RECENTLY_ENTERED']:'Rebuild with most recently entered occurrences') ?> </label> <br/>
<input id="appendLast" name="actiontype" type="radio" value="3" checked /> <label for="appendLast"> <?php echo (isset($LANG['APPEND_LAST_BUILD'])?$LANG['APPEND_LAST_BUILD']:'Append using occurrences entered since last build') ?> (<?php echo $salixHanlder->getLastBuildTimestamp(); ?>) </label> <br/><br/>
<label for="limit"> <?php echo (isset($LANG['LIMIT_TO'])?$LANG['LIMIT_TO']:'Limit to') ?>
<span class="skip-link"> <?php echo (isset($LANG['UNIQUE_VALS'])?$LANG['UNIQUE_VALS']:'unique values per column') ?> </span>
</label>
<input id="limit" name="limit" type="text" value="100000" />
<?php echo (isset($LANG['UNIQUE_VALS'])?$LANG['UNIQUE_VALS']:'unique values per column') ?>
<div style="margin:15px;">

<input name="collid" type="hidden" value="<?php echo $collid; ?>" />
<input name="formsubmit" type="submit" value="<?php echo (isset($LANG['BLD_TABLES'])?$LANG['BLD_TABLES']:'Build Wordstat Tables'); ?>" />
</div>
</fieldset>
</form>
</fieldset>
</div>
<?php
}
}
else{
echo '<div style="margin:25px;font-weight">You are not authorized to build Word Stats</div>';
echo '<div style="margin:25px;font-weight">' . (isset($LANG['NOT_AUTH'])?$LANG['NOT_AUTH']:'You are not authorized to build Word Stats') . '</div>';
}
?>
</div>
Expand Down
21 changes: 21 additions & 0 deletions content/lang/collections/specprocessor/salix/salixhandler.en.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<?php
/*
------------------
Language: English
------------------
*/

$LANG['COLL_MGMT'] = 'Collection Management';
$LANG['BREADCRUMB_SITEMAP'] = 'Sitemap';
$LANG['SALIX_WRDST_MNGR'] = 'SALIX Wordstat Manager';
$LANG['RETURN'] = 'Return to Main Menu';
$LANG['ACTIONS'] = 'Actions';
$LANG['RNDM_SELECT'] = 'Rebuild with randomly selected occurrences';
$LANG['RECENTLY_ENTERED'] = 'Rebuild with most recently entered occurrences';
$LANG['APPEND_LAST_BUILD'] = 'Append using occurrences entered since last build';
$LANG['LIMIT_TO'] = 'Limit to';
$LANG['UNIQUE_VALS'] = 'unique values per column';
$LANG['BLD_TABLES'] = 'Build Wordstat Tables';
$LANG['NOT_AUTH'] = 'You are not authorized to build Word Stats';

?>
21 changes: 21 additions & 0 deletions content/lang/collections/specprocessor/salix/salixhandler.es.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<?php
/*
------------------
Language: Español (Spanish)
------------------
*/

$LANG['COLL_MGMT'] = 'Gestión de colecciones';
$LANG['BREADCRUMB_SITEMAP'] = 'Mapa del sitio';
$LANG['SALIX_WRDST_MNGR'] = 'Administrador de Wordstat SALIX';
$LANG['RETURN'] = 'Volver al menú principal';
$LANG['ACTIONS'] = 'Acciones';
$LANG['RNDM_SELECT'] = 'Reconstruir con ocurrencias seleccionadas aleatoriamente';
$LANG['RECENTLY_ENTERED'] = 'Reconstruir con las ocurrencias ingresadas más recientemente';
$LANG['APPEND_LAST_BUILD'] = 'Agregar usando las ocurrencias ingresadas desde la última compilación';
$LANG['LIMIT_TO'] = 'Limitar a';
$LANG['UNIQUE_VALS'] = 'valores únicos por columna';
$LANG['BLD_TABLES'] = 'Construir tablas de Wordstat';
$LANG['NOT_AUTH'] = 'No estás autorizado a crear Wordstat';

?>
21 changes: 21 additions & 0 deletions content/lang/collections/specprocessor/salix/salixhandler.fr.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<?php
/*
------------------
Language: French
------------------
*/

$LANG['COLL_MGMT'] = 'Gestion des collections';
$LANG['BREADCRUMB_SITEMAP'] = 'Plan du site';
$LANG['SALIX_WRDST_MNGR'] = 'Gestionnaire Wordstat SALIX';
$LANG['RETURN'] = 'Retour au menu principal';
$LANG['ACTIONS'] = 'Actions';
$LANG['RNDM_SELECT'] = 'Reconstruire avec des occurrences sélectionnées aléatoirement';
$LANG['RECENTLY_ENTERED'] = 'Reconstruire avec les occurrences saisies les plus récemment';
$LANG['APPEND_LAST_BUILD'] = 'Ajouter en utilisant les occurrences saisies depuis la dernière build';
$LANG['LIMIT_TO'] = 'Limiter aux';
$LANG['UNIQUE_VALS'] = 'valeurs uniques par colonne';
$LANG['BLD_TABLES'] = 'Créer des tableaux Wordstat';
$LANG['NOT_AUTH'] = 'Vous n\'êtes pas autorisé à créer Wordstat';

?>