Skip to content

Instantly share code, notes, and snippets.

@zlojkashtan
zlojkashtan / t.js
Created August 11, 2017 12:28 — forked from h4/t.js
$(function() {
var $citySelect = $('#city-select'),
STORAGE_ITEM_NAME = 'saveCity';
$citySelect.on('change', function () {
var url = $citySelect.val();
if (url !== '') {
localStorage.setItem(STORAGE_ITEM_NAME, url);
window.location = url;
@zlojkashtan
zlojkashtan / 401-response.php
Last active August 29, 2015 14:28 — forked from clsource/401-response.php
Helper for Creating REST Web Services with ProcessWire
<?php
/*
* 401 Response
*
* Sends a 401 Response Unauthorized
*
* @author Camilo Castro
*
* @date 29/07/2014
<?php
$out = '';
// create a new form field (also field wrapper)
$form = $modules->get("InputfieldForm");
$form->action = "./";
$form->method = "post";
$form->attr("id+name",'subscribe-form');
<?php
$start = $input->get->$from;
$start = $input->get->$from_name;
$start = $input->get->$to;
$start = $input->get->$to_name;
$subject = $input->get->subject;
$start = $input->get-> $message;
email_classic($from, $from_name, $to, $to_name, $subject, $message);
@zlojkashtan
zlojkashtan / Create Subscribers on PW
Last active August 29, 2015 14:00 — forked from manviny/Create Subscribers on PW
Создание списка подписчиков с проверкой на существование
<?php
/**
*
* Añade el cliente para Newsletters de un determinado municipio
* Si el cliente existe lo añade a la suscripcion del municipio seleccionado
* Si el cliente NO existe crea el usuario y la suscripcion
*
* IN: