Skip to content

Instantly share code, notes, and snippets.

View AndrianD's full-sized avatar
🗼
Time to code

AndrianD

🗼
Time to code
  • France
View GitHub Profile
@AndrianD
AndrianD / app.html
Created January 20, 2015 20:37
application_test
<html>
<head>
<title>app.html</title>
<meta charset="utf-8" />
<script type="text/javascript" src="bower_components/angular/angular.js"></script>
</head>
<!--ng-app permet de démarrer la compilation d'AngularJS-->
<body ng-app="myApp">
@AndrianD
AndrianD / testController.html
Created January 20, 2015 20:36
testController avec AngularJS
<!DOCTYPE html>
<html>
<head lang="fr">
<meta charset="UTF-8">
<title>test du controller</title>
<script src="bower_components/jquery/dist/jquery.js"></script>
<script src="bower_components/angular/angular.js"></script>
</head>
<body ng-app="test">
@AndrianD
AndrianD / PRODUIT.php
Created January 20, 2015 20:28
ProduitEntity
<?php
class ProduitEntity
{
//+---------------------------------
// GET - Propriétés Privées Validées
private $id_produit,
$url,
$marque,
$nom,
@AndrianD
AndrianD / Config.php
Created January 20, 2015 20:27
Config
<?php
// ___ __ __ ____ ____ ___ __ __ _ ____ __ ___
// / __)( ) / _\ / ___)/ ___) / __)/ \ ( ( \( __)( )/ __)
// ( (__ / (_/\/ \\___ \\___ \ ( (__( O )/ / ) _) )(( (_ \
// \___)\____/\_/\_/(____/(____/ \___)\__/ \_)__)(__) (__)\___/
// CLASS
class ConfigPDO
{
protected $parameter;
@AndrianD
AndrianD / MEMBRE.php
Created January 20, 2015 20:22
MembreEntity
<?php
// Contient des indices de Newsletter à la fin
class MembreEntity
{
private $id_membre ,
$pseudo ,
$mdp ,
$nom ,
$prenom ,
$email ,
@AndrianD
AndrianD / Membre.php
Created January 20, 2015 20:21
MembreModel
<?php
class MembreModel extends RequetePDO
{
//+------------------------------------------------------------------------
public function chargementDeTousLesMembres($classement = false, $ordre = false)
{
if (!empty($classement) || !empty($ordre)) {
$order = array($classement, $ordre);
@AndrianD
AndrianD / panier.php
Created January 20, 2015 20:19
the famous php bag
<?php
/**
* Class PanierController
*
* Voir le panier
* Ajouter au panier
* Vider le panier
* Retirer du panier
* Valider le panier
@AndrianD
AndrianD / Autoload.php
Created January 20, 2015 20:16
SuperC
<?php
class Autoload
{
public static function className($className)
{
$pdo = strpos($className, 'PDO') ;
$model = strpos($className, 'Model') ;
$entity = strpos($className, 'Entity') ;
$controller = strpos($className, 'Controller') ;

Here's what you get.

Some JavaScript

// Delete confirmation modals
$('#delete-confirm').on('show', function() {
  var $submit = $(this).find('.btn-danger'),
      href = $submit.attr('href');
  $submit.attr('href', href.replace('pony', $(this).data('id')));