mirror of
https://github.com/gamaio/UnPS-Short.git
synced 2025-01-03 15:52:40 +00:00
Make links compatible more compatible with last commit
This commit is contained in:
parent
8112bfa43e
commit
fd4cda1f09
@ -56,7 +56,7 @@ class api{
|
|||||||
if($result = $sdb->query($sql)){
|
if($result = $sdb->query($sql)){
|
||||||
if($row = $result->fetch_assoc()){
|
if($row = $result->fetch_assoc()){
|
||||||
$short = $row['shortlink'];
|
$short = $row['shortlink'];
|
||||||
return "<div id=\"error\">Existing link: <a onclick=\"copyToClipboard('http://unps.us/?$short');\" href=\"http://unps.us/?$short\" target=\"$short\">http://unps.us/?$short</a></div>";
|
return "<div id=\"error\">Existing link: <a onclick=\"copyToClipboard('http://unps.us/$short');\" href=\"http://unps.us/$short\" target=\"$short\">http://unps.us/?$short</a></div>";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(checkRemoteFile($link) !== true) return "<div id=\"error\">Dead Link: $link</div>";
|
if(checkRemoteFile($link) !== true) return "<div id=\"error\">Dead Link: $link</div>";
|
||||||
@ -70,7 +70,7 @@ class api{
|
|||||||
else: $sql = "INSERT INTO `links` (link, shortlink, dpass) VALUES ('$link', '$short', '$apikey')";
|
else: $sql = "INSERT INTO `links` (link, shortlink, dpass) VALUES ('$link', '$short', '$apikey')";
|
||||||
endif;
|
endif;
|
||||||
|
|
||||||
if($result = $sdb->query($sql)): return "<div id=\"success\">Shortened: <a onclick=\"copyToClipboard('http://unps.us/?$short');\" href=\"http://unps.us/?$short\" target=\"$short\">http://unps.us/?$short</a>";
|
if($result = $sdb->query($sql)): return "<div id=\"success\">Shortened: <a onclick=\"copyToClipboard('http://unps.us/$short');\" href=\"http://unps.us/$short\" target=\"$short\">http://unps.us/?$short</a>";
|
||||||
else: return '<div id="error">ERROR: ['.$sdb->error.']</div>';
|
else: return '<div id="error">ERROR: ['.$sdb->error.']</div>';
|
||||||
endif;
|
endif;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user