Skip to content

Instantly share code, notes, and snippets.

View mjunior's full-sized avatar

Maurício Júnior mjunior

View GitHub Profile
<form action="" method="POST" id="solicitarCredenciamento" enctype="multipart/form-data">
<input type="hidden" name="id-usuario-credenciamento" id="id-usuario-credenciamento" value="<?php echo $_SESSION['usuario']['id']?>" >
<input type="hidden" name="id-empresa-credenciamento" id="id-empresa-credenciamento" value="" >
<input type="file" name="arquivo" id="arquivo">
<button type="submit" id="" name="enviar" class="btn btn-primary">Solicitar Credenciamento</button>
</form>
<script>
$('#solicitarCredenciamento').submit(function(){
dados = $('#solicitarCredenciamento').serialize();
<?php
/*
.
.
.*/
if ($_SERVER['REQUEST_METHOD'] === 'POST') {
$credenciamento = new Credenciamento();
$cod_usuario = $_POST['id-usuario-credenciamento'];
$cod_empresa = $_POST['id-empresa-credenciamento'];
@mjunior
mjunior / functions.options.php
Last active August 29, 2015 14:28
Erro ao adicionar textarea resumo usando SMOF. Wordpress
/* Codigo que já existia para o google analytics*/
$of_options[] = array( "name" => "Tracking Code",
"desc" => "Paste your Google Analytics (or other) tracking code here. This will be added into the footer template of your theme.",
"id" => "google_analytics",
"std" => "",
"type" => "textarea"
);
/* Estou tentando adicionar está TEXTAREA */
//html
<div ng-controller="userController">
<form>
<input type="text" ng-model="user.name" placeholder="nome" /><br />
<input type="text" ng-model="user.email" placeholder="E-mail"> <br>
<input type="password" ng-model="user.password" placeholder="Senha"> <br>
<input type="submit" ng-click="cadastrarUser(user)" value="Cadastrar" />
</form>
</div>
@mjunior
mjunior / json
Last active November 19, 2015 19:39
JSON UPLOAD POST
{
"mealType":{"id":"1"},
"post_date":"10-07-2014 03:45:32",
"title":"## Teste 2 fotos Mauricio ##",
"description":"description 2 2 2",
"photos" : [
{
"description":"description",
"title" : "nova foto",
angular.module('gservice', [])
.factory('gservice', function($http){
// Initialize Variables
// -------------------------------------------------------------
// Service our factory will return
var googleMapService = {};
// Array of locations obtained from API calls
var locations = [];
angular.module('gservice', [])
.factory('gservice', function($http){
// Initialize Variables
// -------------------------------------------------------------
// Service our factory will return
var googleMapService = {};
// Array of locations obtained from API calls
var locations = [];
//===================================================
//Criei o seguinte modelo
{
"title": String,
"location": { "type": String, "coordinates": [Number] }
}
scopeDashboardApp.factory('gservice', function($http){
//Meu objeto, nele teremos as funções
var googleMapService = {}
var salas = []
// Localização inicial do mapa ao ser carregado- BRASILIA DF
// var lat = -15.7942287;
// var lng = -47.8821658;
var obterSalas = function(){
$http.get('/api/rooms').success(function(data){
//Um formlario para editar foto
<form action="update">
<input type="file" name="photo">
<input type="submit" value="enviar foto" />
</form>
//Um formulario para editar o perfil assim um envio não influencia no outro
<form action="update">
<input type="text" name="first_name" />