2015-02-21 21:57:33 +03:00
< ? php include ( 'header.php' );
2013-12-29 22:09:21 +00:00
2015-02-21 21:34:23 +03:00
$url = isset ( $_REQUEST [ 'url' ] ) ? yourls_sanitize_url ( $_REQUEST [ 'url' ] ) : '' ;
$keyword = isset ( $_REQUEST [ 'keyword' ] ) ? yourls_sanitize_keyword ( $_REQUEST [ 'keyword' ] ) : '' ;
2013-12-29 22:09:21 +00:00
$title = isset ( $_REQUEST [ 'title' ] ) ? yourls_sanitize_title ( $_REQUEST [ 'title' ] ) : '' ;
?>
2013-08-30 22:49:35 +01:00
2015-03-04 19:46:07 +00:00
< div class = " content " >
< h2 >< ? php yourls_e ( 'Enter a new URL to shorten' , 'isq_translation' ); ?> </h2>
2016-07-24 13:25:57 +01:00
< form method = " post " action = " result.php " class = " newurl " novalidate >
2015-03-06 15:01:19 +00:00
< div class = " form-item full-width " >
2015-03-06 22:41:31 +00:00
< p >< label for = " url " class = " primary " >< ? php yourls_e ( 'Long URL' , 'isq_translation' ); ?> </label></p>
< p >< label for = " url " class = " secondary " >< ? php yourls_e ( 'Paste the long URL here. This is required.' , 'isq_translation' ); ?> </label></p>
2015-03-08 17:22:09 +00:00
< input type = " url " id = " url " name = " url " value = " <?php echo( $url ); ?> " autofocus >
2015-03-06 14:49:02 +00:00
</ div >
2015-03-06 17:02:19 +00:00
< div class = " halves " >
< div class = " form-item half-width left " >
2015-03-06 22:41:31 +00:00
< p >< label for = " keyword " class = " primary " >< ? php yourls_e ( 'Custom keyword' , 'isq_translation' ); ?> </label></p>
< p >< label for = " keyword " class = " secondary " >< ? php yourls_e ( 'A keyword replaces the default short string.' , 'isq_translation' ); ?> </label></p>
2016-07-24 13:25:57 +01:00
< input type = " text " id = " keyword " name = " keyword " autocorrect = " off " autocapitalize = " none " value = " <?php echo( $keyword ); ?> " >
2015-03-06 14:49:02 +00:00
</ div >
2015-03-06 17:02:19 +00:00
< div class = " form-item half-width right " >
2015-03-06 22:41:31 +00:00
< p >< label for = " title " class = " primary " >< ? php yourls_e ( 'Custom title' , 'isq_translation' ); ?> </label></p>
< p >< label for = " title " class = " secondary " >< ? php yourls_e ( 'Optional title used when sharing a link from YOURLS using social sharers.' , 'isq_translation' ); ?> </label></p>
2015-03-22 19:17:33 +00:00
< input type = " text " id = " title " name = " title " value = " <?php echo( $title ); ?> " >
2015-03-06 14:49:02 +00:00
</ div >
2015-03-06 22:29:51 +00:00
2015-03-06 17:02:19 +00:00
</ div >
2015-03-06 14:49:02 +00:00
2015-03-08 15:30:54 +00:00
< ? php
2015-08-21 20:13:49 +01:00
if ( function_exists ( 'yourls_is_valid_user' ) && yourls_is_valid_user () == 1 ) {
2015-03-22 18:36:25 +00:00
echo '<input type="hidden" name="antispam_method" value="user_login" class="hidden">' ;
} else if ( ! empty ( ISQ :: $recaptcha [ 'sitekey' ]) && ! empty ( ISQ :: $recaptcha [ 'secret' ]) ) {
2015-03-08 16:04:10 +00:00
$dependencies [] = 'reCAPTCHA' ;
2015-03-22 18:36:25 +00:00
echo '<input type="hidden" name="antispam_method" value="recaptcha" class="hidden">' ;
?>
< div class = " form-item recaptcha-container " >
< p >< label class = " primary " title = " " >< ? php yourls_e ( 'Verification' , 'isq_translation' ); ?> </label></p>
< p >< label class = " secondary " >< ? php yourls_e ( 'reCAPTCHA verification used to ensure you are not a bot.' , 'isq_translation' ); ?> </label></p>
< div class = " g-recaptcha " data - sitekey = " <?php echo ISQ:: $recaptcha['sitekey'] ; ?> " ></ div >
</ div >
< ? php
2015-03-08 15:30:54 +00:00
} else {
2015-03-22 18:36:25 +00:00
echo '<input type="hidden" name="antispam_method" value="basic" class="hidden">' ;
echo '<input type="hidden" name="basic_antispam" class="hidden">' ;
2015-03-08 15:30:54 +00:00
}
?>
2013-11-02 18:19:38 +00:00
2015-03-06 22:29:51 +00:00
< div class = " form-item submit-container " >
2015-03-07 00:01:11 +00:00
< input type = " submit " class = " button " value = " <?php yourls_e( 'Shorten', 'isq_translation'); ?> " >
2015-03-06 22:29:51 +00:00
</ div >
2015-03-04 19:46:07 +00:00
</ form >
</ div >
2013-08-30 22:49:35 +01:00
2013-11-01 18:40:28 +00:00
< ? php include ( 'footer.php' ); ?>