diff --git a/trunk/add.php b/trunk/add.php new file mode 100644 index 0000000..605a740 --- /dev/null +++ b/trunk/add.php @@ -0,0 +1,33 @@ +shortThisUrl($url, $s); + +if(is_bool($ret) && !$ret){ + echo 'alert("'.ShortURL::STATE_ERROR.'");'; + exit; +} +elseif($ret === ShortURL::STATE_ALREADY_EXIST){ + echo 'alert("'.$ret.'");'; + exit; +} +else{ + echo 'alert("Raccourci créé : http://'.$_SERVER['SERVER_NAME'].$folder.rawurlencode($newname).'");'; + exit; +} \ No newline at end of file