This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html lang="en"> | |
<head> | |
<title>PHP and jQuery - Crop Image and Upload using Croppie plugin</title> | |
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.1.1/css/bootstrap.min.css"> | |
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/croppie/2.6.2/croppie.min.css"> | |
<link rel="stylesheet" type="text/css" href="http://code.ionicframework.com/ionicons/2.0.1/css/ionicons.min.css"> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/croppie/2.6.2/croppie.js"></script> | |
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.1.1/js/bootstrap.min.js"></script> | |
<style type="text/css"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$image = $_POST['image']; | |
list($type, $image) = explode(';',$image); | |
list(, $image) = explode(',',$image); | |
$image = base64_decode($image); | |
$image_name = substr($_POST['imageName'],12,2000); | |
file_put_contents('uploads/'.$image_name, $image); | |
echo 'successfully uploaded'; | |
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<body> | |
<form action="upload.php" method="post" enctype="multipart/form-data"> | |
Select image to upload: | |
<input type="file" name="fileToUpload" id="fileToUpload"> | |
<input type="submit" value="Upload Image" name="submit"> | |
</form> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var app = angular.module('myApp', ['ngRoute']); | |
app.config(function($routeProvider) { | |
$routeProvider | |
.when("/", { | |
templateUrl : "home.html",controller : "homeCtrl" | |
}) | |
.when("/about", { | |
template : "<h1>Harendra <br> +91-9559058446</h1>" | |
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<h1>Home Page</h1> | |
{{ data }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "routing", | |
"version": "1.0.0", | |
"description": "", | |
"main": "index.js", | |
"scripts": { | |
"test": "echo \"Error: no test specified\" && exit 1" | |
}, | |
"keywords": [], | |
"author": "", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>Angular Router</title> | |
</head> | |
<body ng-app="myApp"> | |
<a href="/">Home</a> | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>Chat App</title> | |
<link rel="stylesheet" href="./node_modules/bootstrap/dist/css/bootstrap.min.css"> | |
<link rel="stylesheet" href="./css/style.css"> | |
</head> | |
<body ng-app="myApp"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
body,html{ | |
height: 100%; | |
margin: 0; | |
background: #7F7FD5; | |
background: -webkit-linear-gradient(to right, #91EAE4, #86A8E7, #7F7FD5); | |
background: linear-gradient(to right, #91EAE4, #86A8E7, #7F7FD5); | |
} | |
.chat{ | |
margin-top: auto; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var app = angular.module("myApp", []); | |
var conn = new WebSocket('ws://localhost:8081'); | |
app.controller('appCtrl', function($scope) { | |
$scope.onlineUsers = []; | |
$scope.loggedInUser = null; | |
$scope.isUserLoggedIn = false; | |
$scope.userName = null; | |
$scope.toUser = null; |