delete the duplicate code in pin.php and fixed a bug

There is duplicate  code in pin.php for upload  pin, so delete one of
them and add a semicolon  to line 43 in pin.php which is missing
semicolon after method call.