diff --git a/apis/index.php b/apis/index.php index e658411..984fca4 100644 --- a/apis/index.php +++ b/apis/index.php @@ -1,55 +1,40 @@ 'success','message' => $file))); } } - -// Upload Signature -if(isset($_FILES['Signature'])){ - echo "alert('Working!')"; - $errors= array(); - $file_name = $_FILES['Signature']['name']; - $file_size =$_FILES['Signature']['size']; - $file_tmp =$_FILES['Signature']['tmp_name']; - $file_type=$_FILES['Signature']['type']; - $tmp = explode('.',$_FILES['Signature']['name']); - $file_ext=strtolower(end($tmp)); - - $extensions= array("jpeg","jpg","png"); - - if(in_array($file_ext,$extensions)=== false){ - $errors[]="extension not allowed, please choose a JPEG or PNG file."; - } - - if($file_size > 2097152){ - $errors[]='File size must be exactely 2 MB'; - } - - if(empty($errors)==true){ - move_uploaded_file($file_tmp,"../uploads/".$file_name); - echo "Success"; - }else{ - print_r($errors); - } - - $redirectUrl = '../index.html'; - echo ''; -} + ?> \ No newline at end of file diff --git a/apis/signature_upload.php b/apis/signature_upload.php new file mode 100644 index 0000000..ecb59a5 --- /dev/null +++ b/apis/signature_upload.php @@ -0,0 +1,35 @@ + 2097152){ + $errors[]='File size must be less than 2 MB'; + $uploadThisFile = false; + } + if($uploadThisFile){ + move_uploaded_file($_FILES["file"]["tmp_name"],$path.$file_name); + if(file_exists($path.$file_name)){ + echo(json_encode(array('status' => 'success', 'result' => $file_name))); + } + }else{ + echo(json_encode(array('status' => 'error', 'result' => "The files should be jpeg/jpg. Problem while uploading"))); + } + +} +else +{ + echo(json_encode(array('status'=>'error','result' => 'No file selected'))); +} +?> \ No newline at end of file diff --git a/certificates/music_Cricklon_3 December, 2020.jpg b/certificates/music_Cricklon_3 December, 2020.jpg new file mode 100644 index 0000000..c60a5b3 Binary files /dev/null and b/certificates/music_Cricklon_3 December, 2020.jpg differ diff --git a/index.html b/index.html index 123e12c..36aec5c 100644 --- a/index.html +++ b/index.html @@ -7,20 +7,21 @@ - - + + - + - + - - - + + + - +
- +

Certificate Generator

- +
+ d="M-160 44c30 0 58-18 88-18s 58 18 88 18 58-18 88-18 58 18 88 18 v44h-352z" /> @@ -83,10 +90,10 @@

Certificate Generator

- +
- +

Certificate generator

@@ -95,31 +102,31 @@

Certificate generator

- + - - - +
+

+


- +
- +


- +
image - your image
- +
@@ -194,86 +201,96 @@

Team Solutions

Made with in India
-
- - - - - + - - - - \ No newline at end of file + }); + + + \ No newline at end of file diff --git a/template/template_5.jpg b/template/template_5.jpg new file mode 100644 index 0000000..84988b2 Binary files /dev/null and b/template/template_5.jpg differ diff --git a/template/template_5.png b/template/template_5.png deleted file mode 100644 index a7ad1fd..0000000 Binary files a/template/template_5.png and /dev/null differ