Remove Delete link option and unps.core.js

Based on statistics, the Delete option is never used, so it's useless
unps.core.js contains code primarly to change submit button to reflect
current selected option
This commit is contained in:
Arctic Code 2014-03-01 20:47:27 -06:00
parent fe9ed5e198
commit 3d04529e5a
2 changed files with 11 additions and 17 deletions

View File

@ -81,11 +81,6 @@
<input type="hidden" name="<?php echo $catchid; ?>" value="<?php echo $catchVal; ?>"/>
<button class="btn btn-block btn-primary" id="short-button" type="submit">Shorten</button>
<div id="radio-center" style="padding-top:.078%;width:100%;padding-left:3%;" class="btn-group">
<label class="btn btn-primary" id="shortlab" style="color:#eee;"><input type="radio" id="shorten" name="linkmod" value="shorten" checked="checked">Shorten Link</label>
<label class="btn btn-primary" id="dellab" style="color:#eee;"><input type="radio" id="dellink" name="linkmod" value="dellink">Delete Link</label>
</div>
</form>
<div id="message">
<div id="theLoader">
@ -107,7 +102,17 @@
<!-- Load the JS after the DOM so speed up load times -->
<script type="text/javascript" language="JavaScript" src="//ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js"></script>
<script type="text/javascript" language="JavaScript" src="assets/bootstrap/js/bootstrap.min.js"></script>
<script type="text/javascript" language="JavaScript" src="assets/js/unps.core.js"></script>
<script type="text/javascript" language="JavaScript">
jQuery(document).ready(function(){
$('#link').focus();
$('#error').fadeIn("fast");
});
function copyToClipboard(text){
window.prompt ("Copy to clipboard: Ctrl+C, Enter (when closed I will open your link in a new tab)", text);
}
</script>
<script type="text/javascript" language="JavaScript">
// This is our AJAX - Thank you Wizzy <3

View File

@ -34,17 +34,6 @@
}
echo $unpsAPI->shorten($apidb, $key, $shortdb, $short);
break;
case "dellink":
if(empty($_POST['password'])) die("<div id=\"error\">Something went wrong somewhere, but there's no password here</div>");
$link = sanitize($_POST['link']);
$password = sanitize($_POST['password']);
$link = explode("=", $link);
if(count($link) != 2){
die("<div id=\"error\">I'm sorry, but something went wrong... did you paste the whole link?</div>");
}
$link = $link[1];
echo $unpsAPI->delShort($apidb, $key, $shortdb, $link, $password);
break;
default:
die("<div id=\"error\">I don't know what you want to do... [-Check linkmod-]</div>");
}