/** * Store a newly created resource in storage. * * @param \Illuminate\Http\Request $request * @return \Illuminate\Http\Response */ public function store(Request $request) { // $user = User::where('email', $request->email); if ($user->password != bcrypt($request->password)) { return reponse()->json(['status' => 403, 'message' => 'Wrong credential. No matching account with those credentials found!']); } $user->username = $request->username; $user->position_id = $request->position_id; // REMOVE? $user->branch_id = $request->branch_id; $user->firstname = $request->firstname; $user->lastname = $request->lastname; $user->address = $request->address; $user->phone = $request->phone; $user->city = $request->city; $user->province = $request->province; $user->country = $request->country; $user->zipcode = $request->zipcode; $user->active = 1; if (Input::hasFile('profile_pic')) { $pp = Input::get('profile_pic'); $extension = $pp->getClientOriginalExtension(); $fileName = $user->username . '.' . $extension; $pp->move(public_path('media/agents'), $user->username . '.' . $extension); } $user->image = $fileName; $user->save(); return redirect('/admin/account'); }
public function getProfileUserMobile(Request $request) { $user_id = $request->user_id; $photo_of_user = $this->getPhotoOfUser($user_id); $photo_user_like = $this->getPhotoUserLike($user_id); $user_infor_activity = $this->getInforActivityOfUser($user_id); $user_all_infor = $this->getAllInforUser($user_id); $user_follow = $this->getUserFollow($user_id); $data = ['user_photo' => $photo_of_user, 'user_like' => $photo_user_like, 'user_activity' => $user_infor_activity, 'user_all_infor' => $user_all_infor, 'user_follow' => $user_follow]; return reponse()->json(['data' => $data]); }
public function getUsuarioAutenticado() { try { if (!($user = JWTAuth::parseToken()->authenticate())) { return reponse()->json(['user_not_found'], 404); } } catch (Tymon\JWTAuth\Exceptions\TokenExpiredException $e) { return response()->json(['token_expired'], $e->getStatusCode()); } catch (Tymon\JWTAuth\Exceptions\TokenInvalidException $e) { return response()->json(['token_invalid'], $e->getStatusCode()); } catch (Tymon\JWTAuth\Exceptions\JWTException $e) { return response()->json(['token_absent'], $e->getStatusCode()); } return response()->json(compact('user')); }
<title><?php echo blogTitle(); ?> </title> <style type='text/css'> .c{font-size: 20px;} .v{text-align: center;} #retour{margin-left:650px;} #oui{margin-left:600px;} #non{margin-left:100px;} </style> </head> <body> <?php if (isset($_GET['vote'])) { $reponse = reponse($_GET['vote']); if ($_SESSION['userid'] == $reponse['auteur']) { die("Accès interdit."); } $nbrvotes = $reponse['nbrvotes']; $question = $reponse['question']; $vote = $_GET['vote']; if (dejavote($question, $_SESSION['userid'])) { if (dejavote1($_GET['vote'], $_SESSION['userid'])) { echo "<h3 class='v'>Vous avez déjà voté pour cette réponse </h3>\n <a class='c' id='retour' href='back_reponses.php?questionid={$question}'>retour</a>"; } else { echo "<h3 class='v'>Vous avez déjà voté pour une autre réponse, est ce que vous voulez modifier votre vote?</h3>\n <a class='c' id='oui' href='back_votes_edit.php?vote={$vote}'>oui</a>\n <a class='c' id='non' href='back_reponses.php?questionid={$question}'>non</a>"; } } else { ajoutVote($_SESSION['userid'], $question, $_GET['vote']); ajoutVote1($_GET['vote'], $nbrvotes);
$mots = array_unique($Tableau[0]); foreach ($mots as $mots) { echo "<li>" . $mots . "</li>"; } echo "</ul></br>"; } else { $questionid = $_GET['ajout']; $auteur = $_SESSION['userid']; ajoutReponse($questionid, $auteur, $_POST['contenu']); header("Location: back_reponses.php?questionid={$questionid}"); } } } } elseif (isset($_GET['edite'])) { //si le contenu n'est pas vide et qu'on souhaite éditer $reponse = reponse($_GET['edite']); if ($reponse == null) { die("Reponse invalide."); } $id = $reponse['id']; //code /*$Cdc = $reponse['contenu']; //$Cdc = $_POST['contenu']; //$MauvaisMots = array("con","Pute","connard","pass","stack","name","html"); $MauvaisMots = array("connard","conard","connart","musulman","madoff","pédale","pédales","con","cons","pute","putes","chier","chié","chiers","batard","batart","batards","batardes","batarde","biatch","salaud","salauds","merde","merdiques","caca","crote","putain","f**k","bite","cul","tg","groslard","enculé","encule","salopart","salopard","bâfre","islamiste","terroriste","islamistes","islam","coran","bible","chrétiens","chrétien","sexe","sexes","religions","religion","blancbec","bouffonade","Juif","juifs","hébreux","sadique","bique","politique","politiques","Hollande","sarkozy","Sarkozy","hollande","République","république","Répuliques","républiques","Boudhiste","boudhistes","Israel","israel","allumé","allumeuse","fric","mmerde","mmerde","rasta","rastaman","secte","sectaire","beuglant","bouffon","richard","ISF","h**o","pd","pédé","pédérastes","pédéraste","homophobe","homosexusel","homosexuelle","eiil","fn","ump","ps","modem","merde","hitler","nazis","nazi","faciste","fascistes","mecreant","mecreants","mécréant","mécréants","voyous","voyou","antisémite","antisemites","nègre","negres","negre","amerloque","boche","espingouin","meteque","djihadiste","djihadistes","djihad","négrito","métèque","youpin","youtre","rital","negro","négro","chleuh","bicot","femmelette","flic","flic","couilles","couille","Branleur","crétin","crétine","Emmerdeur","Emmerdeuse","Hydrocéphale","Lopette","Couillon","couillonne","Pisseux","Plouc","Pouffiasse","Raclure","foutre","gland","Samovar","Abruti","anticastriste","colonialisme","anachorète","bénédictin","cénobite","chanoine","dévot","dominicain","ecclésiastique","jésuite","prieur","Ayatollah","Allah","fdp","FDP","TG","tg","bougnoule","bougnoules","pekinois","ss","pisseuse","hamas","fnlc","mlp","jmlp","dsk","isis","bullshit","@2m1","a2m1","@l1di","al1di","b1sur","koi29","kwa","pk","vrMen","stp","tomB","dak","komencava","Bolosse","feuj","tepu","teupu","pute","shoa","faurisson","dieudonne","dieudo","shoah","alya","fniste","umpiste","socialiste","fnistes","socialistes","umpistes","centristes","centriste","chintok","pékinois","saloperie","merdique","merdasse","pute","f**k","claramorgane","wesh","tepu","bicrave","bolos","bedave","gogol","gogole","atouchement","attouchement","baise","bande","bisexualit","bite","blocage","blondes","bondage","bouche","bourrin","branle","branlette","caca","calins","capote","caresses","chastet","chate","chatte","clitori","cochon","cockring","coit","cokin","cokine","consentement","contraception","copulation","coquin","coquine","couille","couple","culbut","culote","culotte","cunil","cunnil","cybersexe","dance","desir","désir","domination","downblouse","drague","echangism","erect","érect","erogene","érogène","fantasm","felat","fellat","feminites","féminités","fessee","fessée","fetichi","fétichi","fist","flagellation","foufoune","frigid","f*****g","gay","gerontoph","gérontoph","godemich","harcelement","harcèlement","hard","heterosexuel","hétérosexuel","homosexuel","hysteri","hystéri","impuissance","incest","initiatives","injures","intimite","intimité","ivg","jouir","langue","latex","lecher","lécher","lesbien","levres","lèvres","libertin","life-show","machisme","masochisme","massage","masturb","masturbateur","mineure","mst","mytho","nympho","obscen","obscén","onanisme","o****m","pd","pédé","pederaste","pédéraste","pedophilie","pédophilie","peep- show","penetration","pénétratio","penis","pénis","perversions","phallus","pillule","pilule","porno","pornographie","portabl","précoce","prepuce","prépuce","prostit","pubien","pubis","pucelage","pudeur","pulsion","pute","sadomasochisme","salop","saphisme","sauter,scatophile","seins,sensualité","sex","sexe","sex-shop","sexualit","sexuel","sida","simulation","sodomi","soumission","sperm","strip","sucer","tease","testicul","vagin","verge","viol","virginit","virilit","voyeurisme","vulgarit","vulve","bamboula"); //print_r ($MauvaisMots); $Tableau = array(); $Trouver = preg_match_all( "/\b(" . implode($MauvaisMots,"|") . ")\b/i", $Cdc, $Tableau
<?php include "functions.php"; session_start(); testAcces(); if (isset($_GET['suppr'])) { $reponse = reponse($_GET['suppr']); if ($_SESSION['userid'] != $reponse['auteur']) { die("Accès interdit."); } $questionid = $reponse['question']; supprVote2($_GET['suppr']); supprReponse($_GET['suppr']); header("Location: back_reponses.php?questionid={$questionid}"); } if (isset($_GET['questionid'])) { $id = $_GET['questionid']; $question = question($id); if ($question == null) { die("question invalide."); } } ?> <html lang='fr'> <head> <meta charset='utf8'> <link href="./bootstrap.css" rel="stylesheet"> <link href="./offcanvas.css" rel="stylesheet"> <link href="./grid.css" rel="stylesheet"> <title><?php echo blogTitle();
} function reponse($answer) { $resultat = $answer; $resultat = ucfirst($answer); return $resultat; } ?> <div id="intro"> <h1>J'ai besoin de la voiture de mon père...</h1> <h2>Aidez moi à trouver les bonnes questions qui m'aideront à conduire sa voiture.</h2> <h3>Papa, je pourrais avoir ta voiture pour...</h3> </div> <h1 id="answer"> <?php echo reponse($answer, $image); ?> </h1> <?php if ($copine == 'oui' && $maas == 'non' && $rouge == 'non' && $entretient == 'non' && $course == 'non' && $soeur == 'oui') { echo '<img class="lol" src="rolls.jpg" alt="">'; } ?> <form method="get"> <fieldset id="field-copine"> <legend>Conduire ma copine au travail ?</legend> <input id="oui" type="radio" name="copine" value="oui" <?php if ($_GET['copine'] == 'oui') { echo 'checked="checked"'; }
<?php include "functions.php"; session_start(); testAcces(); if (isset($_GET['vote'])) { $reponse = reponse($_GET['vote']); $nbrvotes = $reponse['nbrvotes']; $question = $reponse['question']; $vote = dejavote2($question, $_SESSION['userid']); $reponse1id = $vote['reponse']; $reponse1 = reponse($reponse1id); $nbrvotes1 = $reponse1['nbrvotes']; supprVote($_SESSION['userid'], $reponse1['id']); supprVote1($reponse1['id'], $nbrvotes1); ajoutVote($_SESSION['userid'], $question, $_GET['vote']); ajoutVote1($_GET['vote'], $nbrvotes); header("Location: back_reponses.php?questionid={$question}"); }
public function removeFollower(Request $request) { $friend = User::find($request->input("id")); $user = User::find($request['user']['sub']); if ($user->removeFollower($friend)) { return reponse()->json(["success" => 'Remove user from follower list']); } else { return response()->json(["error" => "Cannot remove follower from list"]); } }