This file contains hidden or 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 > | |
<head> | |
<meta charset="UTF-8"> | |
<title>External URLs</title> | |
</head> | |
<body> | |
<ion-view title="Test Page"> | |
<ion-content> |
This file contains hidden or 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
<img id="blah" src="#" alt="Image du blog" style="width: 30%;" /> | |
<input type="file" id="imgInp" name="img" required="required" class="form-control col-md-9 col-xs-12" required="" /> | |
<script | |
src="https://code.jquery.com/jquery-2.2.4.min.js" | |
integrity="sha256-BbhdlvQf/xTY9gja0Dq3HiwQF8LaCRTXxZKRutelT44=" | |
crossorigin="anonymous"></script> | |
<script> | |
function readURL(input,cible) { | |
if (input.files && input.files[0]) { |
This file contains hidden or 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
$stmt = $BD->query("SELECT LAST_INSERT_ID()"); | |
$lastId = $stmt->fetch(PDO::FETCH_NUM); | |
$lastId = $lastId[0]; | |
This file contains hidden or 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
$valid_formats = array("jpg", "png", "gif", "bmp"); | |
$max_file_size = 1024*7500; //100 kb | |
$path = "assets/img/photo/"; // Upload directory | |
$count = 0; | |
if(isset($_POST) and $_SERVER['REQUEST_METHOD'] == "POST"){ | |
foreach ($_FILES['files']['name'] as $f => $name) { | |
if ($_FILES['files']['error'][$f] == 4) { |
This file contains hidden or 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 | |
// Configure your keys (secret, piblic): https://www.google.com/recaptcha | |
$siteKey = 'XXXXXXXXXXXXXXXXXXXXXX'; // votre clé publique | |
?> | |
<form action="submit.php"> | |
.... | |
<div class="g-recaptcha" id="Optional-id"></div> | |
</form> | |
<script src="https://www.google.com/recaptcha/api.js?onload=onloadCallback&render=explicit" async defer></script> | |
<script type="text/javascript" charset="utf-8"> |
This file contains hidden or 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 if(strpos($_SERVER['REQUEST_URI'],"home")){ // For example blabla.com/home | |
// Do something | |
}?> |
This file contains hidden or 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
// Using the core $.ajax() method | |
$.ajax({ | |
// The URL for the request | |
url: "post.php", | |
// The data to send (will be converted to a query string) | |
data: { | |
id: 123 | |
}, | |
// Whether this is a POST or GET request | |
type: "GET", |
This file contains hidden or 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 | |
require 'recaptchalib.php'; | |
$siteKey = 'XXXXXXXXXXXXXXXXXXXXXX'; // votre clé publique | |
$secret = 'XXXXXXXXXXXXXXXXXXXXXX'; // votre clé privée | |
?> | |
<form> | |
.... | |
<div class="g-recaptcha" id="Optional-id"></div> | |
</form> |
This file contains hidden or 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
.top-box | |
{ | |
box-shadow: inset 0 7px 9px -7px rgba(0,0,0,0.4); | |
} | |
.left-box | |
{ | |
box-shadow: inset 7px 0 9px -7px rgba(0,0,0,0.4); | |
} | |
.right-box | |
{ |
This file contains hidden or 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
#!/usr/bin/ruby | |
## Count to 50 | |
1.upto(50) {|n| puts n} | |
## Count Down to 1 | |
50.downto(1) {|n| puts n} | |
## Count to 20 | |
(1..20).each {|n| puts n} |
OlderNewer