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> | |
| <!--[if lt IE 7 ]><html class="ie ie6" lang="en"> <![endif]--> | |
| <!--[if IE 7 ]><html class="ie ie7" lang="en"> <![endif]--> | |
| <!--[if IE 8 ]><html class="ie ie8" lang="en"> <![endif]--> | |
| <!--[if (gte IE 9)|!(IE)]><!--><html lang="en"> <!--<![endif]--> | |
| <head> | |
| <!-- Basic Page Needs | |
| ================================================== --> | |
| <meta 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 | |
| /** | |
| * ProcessWire Module Template | |
| * | |
| * Demonstrates the Module interface and how to add hooks. | |
| * | |
| * ProcessWire 2.x | |
| * Copyright (C) 2010 by Ryan Cramer | |
| * Licensed under GNU/GPL v2, see LICENSE.TXT |
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 | |
| /** | |
| * ProcessWire Module Template | |
| * | |
| * Demonstrates the Module interface and how to add hooks. | |
| * | |
| * ProcessWire 2.x | |
| * Copyright (C) 2010 by Ryan Cramer | |
| * Licensed under GNU/GPL v2, see LICENSE.TXT |
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 | |
| $out = ''; | |
| // create a new form field (also field wrapper) | |
| $form = $modules->get("InputfieldForm"); | |
| $form->action = "./"; | |
| $form->method = "post"; | |
| $form->attr("id+name",'subscribe-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
| <?php | |
| /** | |
| * Front-end upload form example | |
| * using ProcessWire Inputfields | |
| */ | |
| $sent = false; | |
| $upload_path = $config->paths->assets . "files/.tmp_uploads/"; |
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 | |
| // read more -> http://www.php.net/manual/en/features.http-auth.php | |
| if (!isset($_SERVER['PHP_AUTH_USER']) || $_SERVER['PHP_AUTH_USER'] != 'foo' || $_SERVER['PHP_AUTH_PW'] != 'bar') { | |
| header('WWW-Authenticate: Basic realm="My Realm"'); | |
| header('HTTP/1.0 401 Unauthorized'); | |
| echo 'Unauthorized'; | |
| exit; | |
| } | |
| ?> |
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
| python -m SimpleHTTPServer 8000 |
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 | |
| function debug ($data) { | |
| echo "<script>\r\n//<![CDATA[\r\nif(!console){var console={log:function(){}}}"; | |
| $output = explode("\n", print_r($data, true)); | |
| foreach ($output as $line) { | |
| if (trim($line)) { | |
| $line = addslashes($line); | |
| echo "console.log(\"{$line}\");"; | |
| } |
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 | |
| /** | |
| * ALIAS CREATION | |
| * add this to the home template - make sure home template has url segments enabled. | |
| * | |
| * | |
| * $alias = $pages->get("title=alias"); | |
| * // echo $alias->children(); | |
| * foreach ($alias->children as $p) { | |
| * |
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 | |
| /** | |
| * Front-end upload form example | |
| * using ProcessWire Inputfields | |
| */ | |
| $sent = false; | |
| $upload_path = $config->paths->assets . "files/.tmp_uploads/"; |
OlderNewer