code
stringlengths
1
2.01M
language
stringclasses
1 value
<?php $id = $_GET["id"]; $status = $_GET["status"]; header("Content-Type: text/xml"); echo "<?xml version=\"1.0\" ?>"; echo "<response><id>$id</id><status>$status</status></response>"; ?>
PHP
<?php /** * JSON gateway */ include("globals.php"); include "core/json/app/Gateway.php"; $gateway = new Gateway(); $gateway->setBaseClassPath($servicesPath); $gateway->service(); ?>
PHP
<?php /** * XML-RPC server */ include("globals.php"); include "core/xmlrpc/app/Gateway.php"; $gateway = new Gateway(); $gateway->setBaseClassPath($servicesPath); $gateway->service(); ?>
PHP
<?php phpinfo(); ?>
PHP
<?php //This file is intentionally left blank so that you can add your own global settings //and includes which you may need inside your services. This is generally considered bad //practice, but it may be the only reasonable choice if you want to integrate with //frameworks that expect to be included as glob...
PHP
<?php define("AMFPHP_BASE", realpath(dirname(dirname(dirname(__FILE__)))) . "/"); require_once(AMFPHP_BASE . "shared/app/BasicGateway.php"); require_once(AMFPHP_BASE . "shared/util/MessageBody.php"); require_once(AMFPHP_BASE . "xmlrpc/app/Actions.php"); class Gateway extends BasicGateway { function createBody...
PHP
<?php function deserializationAction(&$body) { $data = $body->getValue(); //Get the method that is being called $description = xmlrpc_parse_method_descriptions($data); $target = $description['methodName']; $baseClassPath = $GLOBALS['amfphp']['classPath']; $lpos = strrpos($target, '.'); $me...
PHP
<?php /** * @license http://opensource.org/licenses/gpl-license.php GNU Public License * @copyright (c) 2003 amfphp.org * @package flashservices * @subpackage adapters * @version $Id: odbcAdapter.php,v 1.2 2005/07/22 10:58:09 pmineault Exp $ */ require_once(AMFPHP_BASE . "shared/adapters/RecordSetAdapt...
PHP
<?php /** * This Adapter translates the specific Database type links to the data and pulls the data into very * specific local variables to later be retrieved by the gateway and returned to the client. * * pdoAdapter is a contribution of Andrea Giammarchi * * Now using fast serialization * * @license ...
PHP
<?php /** * The newest version of the PearDB adapter includes a hack to type number column * types as numbers, despite the fact that PHP does not offer this kind of info by default * * A contribution of Jaybee Reeves * * @license http://opensource.org/licenses/gpl-license.php GNU Public License * @copyr...
PHP
<?php /** * This Adapter translates the specific Database type links to the data and pulls the data into very * specific local variables to later be retrieved by the gateway and returned to the client. * * pdoAdapter is a contribution of Andrea Giammarchi * * Now using fast serialization * * @license ...
PHP
<?php /** * This Adapter translates the specific Database type links to the data and pulls the data into very * specific local variables to later be retrieved by the gateway and returned to the client. * * This version of the frontbase adapter uses fast serialization * * @license http://opensource.org/li...
PHP
<?php /** * This Adapter translates the specific Database type links to the data and pulls the data into very * specific local variables to later be retrieved by the gateway and returned to the client. * * @license http://opensource.org/licenses/gpl-license.php GNU Public License * @copyright (c) 2003 amfph...
PHP
<?php /** * This Adapter translates the specific Database type links to the data and pulls the data into very * specific local variables to later be retrieved by the gateway and returned to the client. * * Thanks to Andrew Robins for this contribution * * @license http://opensource.org/licenses/gpl-license...
PHP
<?php /** * The arrayf adapter is a filtered mySQL adapter riggged * to only transmit certain column names. Must be typed manually. * * @license http://opensource.org/licenses/gpl-license.php GNU Public License * @copyright (c) 2003 amfphp.org * @package flashservices * @subpackage adapters * @versio...
PHP
<?php /** * This Adapter translates the specific Database type links to the data and pulls the data into very * specific local variables to later be retrieved by the gateway and returned to the client. * * Adapted from Adam Schroeder's implementation on Flash-db.com boards * * @license http://opensource.or...
PHP
<?php /** * This Adapter translates the specific Database type links to the data and pulls the data into very * specific local variables to later be retrieved by the gateway and returned to the client. * * Correct typing for MySQL databases contributed by Patrick Gutlich * * @license http://opensource.org...
PHP
<?php /** * This Adapter translates the specific Database type links to the data and pulls the data into very * specific local variables to later be retrieved by the gateway and returned to the client. * * @license http://opensource.org/licenses/gpl-license.php GNU Public License * @copyright (c) 2003 amfph...
PHP
<?php /** * This Adapter translates the specific Database type links to the data and pulls the data into very * specific local variables to later be retrieved by the gateway and returned to the client. * * Adapted from Adam Schroeder's implementation on Flash-db.com boards * * @license http://opensource.or...
PHP
<?php /** * This Adapter translates the specific Database type links to the data and pulls the data into very * specific local variables to later be retrieved by the gateway and returned to the client. * * pdoAdapter is a contribution of Andrea Giammarchi * * Now using fast serialization * * @license ...
PHP
<?php /** * This Adapter translates the specific Database type links to the data and pulls the data into very * specific local variables to later be retrieved by the gateway and returned to the client. * * pdoAdapter is a contribution of Andrea Giammarchi * * Now using fast serialization * * @license ...
PHP
<?php /** * RecordSetAdapter is the superclass of all database adapter implementations. * * To keep the apadters encapsulated, the getter methods have been added to * this superclass instead of direct property access. This superclass is really "abstract" * even though abstraction isn't supported until PHP...
PHP
<?php /** * This Adapter translates the specific Database type links to the data and pulls the data into very * specific local variables to later be retrieved by the gateway and returned to the client. * * This version of the postgreSQL adapter uses fast serialization * * @license http://opensource.org/l...
PHP
<?php /** * The newest version of the MySQL adapter includes a hack to type number column * types as numbers, despite the fact that PHP does not offer this kind of info by default * * @license http://opensource.org/licenses/gpl-license.php GNU Public License * @copyright (c) 2003 amfphp.org * @package fla...
PHP
<?php /** * This Adapter translates the specific Database type links to the data and pulls the data into very * specific local variables to later be retrieved by the gateway and returned to the client. * * Adapted from Micah Caldwell's implementation on Flash-db.com boards * * @license http://opensource.o...
PHP
<?php /** * This Adapter translates the specific Database type links to the data and pulls the data into very * specific local variables to later be retrieved by the gateway and returned to the client. * * Adapted from Micah Caldwell's implementation on Flash-db.com boards * * @license http://opensource.o...
PHP
<?php function __setUri() { if (__env('HTTP_X_REWRITE_URL')) { $uri = __env('HTTP_X_REWRITE_URL'); } elseif(__env('REQUEST_URI')) { $uri = __env('REQUEST_URI'); } else { if (__env('argv')) { $uri = __env('argv'); if (defined('SERVER_IIS')) { $uri = BASE_URL . $uri[0]; } else { $u...
PHP
<?php /** * Creates the methodTable for a service class. * * @usage $this->methodTable = MethodTable::create($this); * @author Christophe Herreman * @since 05/01/2005 * @version $id$ * * Special contributions by Allessandro Crugnola and Ted Milker */ if (!defined('T_ML_COMMENT')) { define('T_...
PHP
<?php /** * Add a few 4.3.0 functions to old versions of PHP * * @license http://opensource.org/licenses/gpl-license.php GNU Public License * @copyright (c) 2003 amfphp.org * @package flashservices * @subpackage io * @version $Id$ */ if (!function_exists("ob_get_clean")) { function ob_get_clea...
PHP
<?php /** * AMFHeader is a data type that represents a single header passed via amf * * AMFHeader encapsulates the different amf keys. * * @license http://opensource.org/licenses/gpl-license.php GNU Public License * @copyright (c) 2003 amfphp.org * @package flashservices * @subpackage util * @versi...
PHP
<?php /** * The Headers class includes a static method getHeader available from all services * that allows one to get an AMF header from any service * like the Flash one * * @license http://opensource.org/licenses/gpl-license.php GNU Public License * @copyright (c) 2003 amfphp.org * @package flashservi...
PHP
<?php /** * The CharsetHandler class converts between various charsets * * @license http://opensource.org/licenses/gpl-license.php GNU Public License * @copyright (c) 2003 amfphp.org * @package flashservices * @subpackage io * @version $Id: CharsetHandler.php,v 1.5 2005/07/05 07:40:53 pmineault Exp $ ...
PHP
<?php /** * Add a few 4.3.0 functions to old versions of PHP * * @license http://opensource.org/licenses/gpl-license.php GNU Public License * @copyright (c) 2003 amfphp.org * @package flashservices * @subpackage io * @version $Id$ */ function patched_array_search($needle, $haystack, $strict = FALSE) ...
PHP
<?php /** * LICENSE: Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following * conditions are met: Redistributions of source code must retain the * above copyright notice, this list of conditions and the following * disclaimer. Redistributions i...
PHP
<?php /** * The NetDebug class includes a NetDebug::trace function that works * like the Flash one * * @license http://opensource.org/licenses/gpl-license.php GNU Public License * @copyright (c) 2003 amfphp.org * @package flashservices * @subpackage util * @version $Id: NetDebug.php,v 1.1 2005/03/24 2...
PHP
<?php /** * AMFBody is a data type that encapsulates all of the various properties a body object can have. * * @license http://opensource.org/licenses/gpl-license.php GNU Public License * @copyright (c) 2003 amfphp.org * @package flashservices * @subpackage util * @version $Id: AMFBody.php,v 1.6 2005/07/...
PHP
<?php /** * The Authenticate package is used to define helper methods related to authentication. * * Authentication will only work if sessions are enabled. Currently there is no * testing error reporting of this and probably won't be until the PHP5 version. Complex * error handling is just too cumbersome ...
PHP
<?php /** * The Executive class is responsible for executing the remote service method and returning it's value. * * Currently the executive class is a complicated chain of filtering events testing for various cases and * handling them. Future versions of this class will probably be broken up into many helpe...
PHP
<?php /** * Defines constants used throughout amfphp package * * @license http://opensource.org/licenses/gpl-license.php GNU Public License * @copyright (c) 2003 amfphp.org * @package flashservices * @subpackage app */ /** * The Service browser header */ define("AMFPHP_SERVICE_BROWSER_HEADER", "...
PHP
<?php require_once(AMFPHP_BASE . "shared/app/BasicActions.php"); require_once(AMFPHP_BASE . "shared/app/Constants.php"); require_once(AMFPHP_BASE . "shared/app/Globals.php"); require_once(AMFPHP_BASE . "shared/exception/MessageException.php"); if(AMFPHP_PHP5) { include_once(AMFPHP_BASE . "shared/util/CompatPhp5...
PHP
<?php /** * Defines globals used throughout amfphp package for config options * * @license http://opensource.org/licenses/gpl-license.php GNU Public License * @copyright (c) 2003 amfphp.org * @package flashservices * @subpackage app */ global $amfphp; $amfphp['errorLevel'] = E_ALL ^ E_NOTICE; $am...
PHP
<?php /** * This file contains actions which are used by all gateways */ include_once(AMFPHP_BASE . 'shared/util/Authenticate.php'); include_once(AMFPHP_BASE . 'shared/util/NetDebug.php'); include_once(AMFPHP_BASE . 'shared/util/Headers.php'); include_once(AMFPHP_BASE . 'shared/util/CharsetHandler.php'); /** ...
PHP
<?php /** * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL...
PHP
<?php // global exception handler function reportExceptions ($code, $descr, $filename, $line) { // obey error_level set by system/user if (!($code & error_reporting())) { return; } // init a new error info object $error = new MessageException($code, $descr, $filename, $line, "AMFPHP_RUNTIME_ERRO...
PHP
<?php /** * The Exception class is the internal static class used to output user defined * exceptions to the output stream. * * @license http://opensource.org/licenses/gpl-license.php GNU Public License * @copyright (c) 2003 amfphp.org * @package flashservices * @subpackage exception * @author Justin ...
PHP
<?php /** * The VerboseException class adds level, code, file, and line info to a regular exception * so that PHP5 errors are as verbose as possible * * @license http://opensource.org/licenses/gpl-license.php GNU Public License * @copyright (c) 2003 amfphp.org * @package flashservices * @subpackage exception *...
PHP
<?php /** * AMFDeserializer takes the raw amf input stream and converts it PHP objects * representing the data. * * @license http://opensource.org/licenses/gpl-license.php GNU Public License * @copyright (c) 2003 amfphp.org * @package flashservices * @subpackage io * @version $Id$ */ include_once...
PHP
<?php /** * AMFSerializer manages the job of translating PHP objects into * the actionscript equivalent via amf. The main method of the serializer * is the serialize method which takes and AMFObject as it's argument * and builds the resulting amf body. * * @license http://opensource.org/licenses/gpl-lice...
PHP
<?php /** * AMFDeserializer takes the raw amf input stream and converts it PHP objects * representing the data. * * @license http://opensource.org/licenses/gpl-license.php GNU Public License * @copyright (c) 2003 amfphp.org * @package flashservices * @subpackage io * @version $Id$ */ /** * Requ...
PHP
<?php /** * AMFSerializer manages the job of translating PHP objects into * the actionscript equivalent via amf. The main method of the serializer * is the serialize method which takes and AMFObject as it's argument * and builds the resulting amf body. * * @license http://opensource.org/licenses/gpl-lice...
PHP
<?php /** * TraceHeader is a simple holder class for NetDebug::trace headers * * @license http://opensource.org/licenses/gpl-license.php GNU Public License * @copyright (c) 2003 amfphp.org * @package flashservices * @author Justin Watkins * @version $Id: TraceHeader.php,v 1.3 2005/07/05 07:40:51 pmineau...
PHP
<?php /** * AMFObject is a datatype representing the parsed representation of the binary AMF data. * * This object contains 2 major sections, headers and bodys. Headers contain all of the * header keys along with their associated data and body elements which include the target * URI, the response URI and ...
PHP
<?php /** * PageAbleResult is an AMFPHP service class which is used internally by AMFPHP * to provide support for pageable recordsets. The methods of PageAbleResult * are called automatically by the Flash player when implementing pageable * recordsets. To use pageable recordsets the developer need only * inc...
PHP
<?php /** * The DateWrapper allows easy handling of Flash dates * * @license http://opensource.org/licenses/gpl-license.php GNU Public License * @copyright (c) 2003 amfphp.org * @package flashservices * @subpackage util * @version $Id: DateWrapper.php,v 1.1 2005/03/24 22:19:48 pmineault Exp $ */ c...
PHP
<?php class ByteArray { var $data; function ByteArray($data) { $this->data = $data; } } class RecordSet { var $data; function RecordSet($data) { $this->data = $data; } } class PageableRecordSet { var $data; var $limit; function PageableRecordSet($data, $limit = 15) {...
PHP
<?php /** * The DescribeService is used to provide a description of the class * to the service browser * * This file was adapted from the old RemotingService which was a pretty * nasty idea all along * * @license http://opensource.org/licenses/gpl-license.php GNU Public License * @copyright (c) 2003 a...
PHP
<?php /** * The Gateway class is the main facade for the AMFPHP remoting service. * * The developer will instantiate a new gateway instance and will interface with * the gateway instance to control how the gateway processes request, securing the * gateway with instance names and turning on additional functi...
PHP
<?php /** * Actions modify the AMF message PER BODY * This allows batching of calls * * @license http://opensource.org/licenses/gpl-license.php GNU Public License * @copyright (c) 2003 amfphp.org * @package flashservices * @subpackage filters * @version $Id: Filters.php,v 1.6 2005/04/02 18:37:51 pmi...
PHP
<?php /** * Filters modify the AMF message has a whole, actions modify the AMF message PER BODY * This allows batching of calls * * @license http://opensource.org/licenses/gpl-license.php GNU Public License * @copyright (c) 2003 amfphp.org * @package flashservices * @subpackage filters * @version $Id:...
PHP
<?php define("AMFPHP_BASE", realpath(dirname(dirname(dirname(__FILE__)))) . "/"); require_once(AMFPHP_BASE . "shared/app/BasicGateway.php"); require_once(AMFPHP_BASE . "shared/util/MessageBody.php"); require_once(AMFPHP_BASE . "shared/util/functions.php"); require_once(AMFPHP_BASE . "json/app/Actions.php"); c...
PHP
<?php function deserializationAction(&$body) { $args = $body->getValue(); $target = $args[0]; $baseClassPath = $GLOBALS['amfphp']['classPath']; $lpos = strrpos($target, '.'); $methodname = substr($target, $lpos + 1); $trunced = substr($target, 0, $lpos); $lpos = strrpos($trunced, "."); if (...
PHP
<?php /* $Id: gateway.php,v 1.4 2005/07/05 07:40:54 pmineault Exp $ The gateway is a customized entry point to your flash services. Things you can set here: - setBaseClassPath(string path) The absolute path to your services on the server - setLooseMode(bool mode) If true, output buffering ...
PHP
<?php class HelloWorld { public function say($sMessage) { return 'You said: ' . $sMessage; } } ?>
PHP
<?php include_once(AMFPHP_BASE . "shared/util/MethodTable.php"); /** * A built-in amfphp service that allows introspection into services and their methods. * Remove from production servers */ class DiscoveryService { /** * Get the list of services * @returns An array of array ready to be bound to a Tr...
PHP
<?php class RESTProxy { public function request($uri, $method = "GET", $getVars = array(), $postVars = array(), $headers = array(), $requestId = 0, $base64Encode = false) { if(count($getVars)) { $uri .= "?"; $uri .= implode("&", $getVars); } $curl = curl_init($uri); if($method == ...
PHP
<?php sleep(1); ?> <p><strong>This content was loaded via ajax, though it took a second.</strong></p> <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean nec turpis justo, et facilisis ligula. In congue interdum odio, a scelerisque eros posuere ac. Aenean massa tellus, dictum sit amet laoreet ut, aliquam...
PHP
<?php header("HTTP/1.0 404 Not Found"); ?>
PHP
<?php $q = strtolower($_GET["term"]); if (!$q) return; $items = array( "Great Bittern"=>"Botaurus stellaris", "Little Grebe"=>"Tachybaptus ruficollis", "Black-necked Grebe"=>"Podiceps nigricollis", "Little Bittern"=>"Ixobrychus minutus", "Black-crowned Night Heron"=>"Nycticorax nycticorax", "Purple Heron"=>"Ardea purp...
PHP
<?php /* * jQuery File Upload Plugin PHP Example 5.2.7 * https://github.com/blueimp/jQuery-File-Upload * * Copyright 2010, Sebastian Tschan * https://blueimp.net * * Licensed under the MIT license: * http://creativecommons.org/licenses/MIT/ */ error_reporting(E_ALL | E_STRICT); class UploadHandler { priv...
PHP
<?php $file = $_FILES['file']; if(is_uploaded_file($file['tmp_name'])) { $filecont = file_get_contents($file['tmp_name']); echo(base64_encode($filecont)); } else { die(); } ?>
PHP
<?php require_once '../config.php'; $page=new GamesExplorer(); $page->run();
PHP
<?php require_once '../config.php'; $appli_type = getValue('appli_type', false); $appli_name = getValue('appli_name', false); $appli_action = getValue('appli_action', false); if($appli_type && $appli_name && $appli_action) { require_once appli_dir($appli_type).'/'.$appli_name.'/'.$appli_name.'.php'; ...
PHP
<?php class Coup { public $plateau; public $pion; public $case_to; public $pion_mange; public $get_promotion; public function __construct($pion, $case_to, $pion_mange = null, $get_promotion = false) { $this->plateau = jeu()->getPlateau(); $this->pion = $pion; $this->case_to =...
PHP
<?php require_once '../../../config.php'; env()->initJeu(basename(__DIR__)); jeu()->run();
PHP
<?php require_once 'Regles.php'; require_once 'Plateau.php'; require_once 'Pion.php'; require_once 'Coup.php'; class Checkers extends Jeu { private $regles = null; private $plateau = null; public function process() { $this->initRegles(); $this->initPlateau(); $this->addJs(WWW_JS....
PHP
<?php require_once '../../../config.php'; env()->initJeu(basename(__DIR__)); jeu()->run();
PHP
<?php require_once '../../../config.php'; env()->initJeu('tictactoe'); jeu()->run();
PHP
<?php require_once '../../../config.php'; env()->initJeu(basename(__DIR__)); jeu()->run();
PHP
<?php require_once '../../../config.php'; env()->initJeu(basename(__DIR__)); jeu()->run();
PHP
<?php class Test extends Jeu { public function process() { // var_dump(partie()->getOptions()); smarty()->assign('option', partie()->option('option_test')); } public function getInitialData() { } public function isRoom() { return partie()->option('is_room') == 1; } public...
PHP
<?php require_once '../../../config.php'; env()->initModule('ping'); module()->run();
PHP
<?php class Ping extends Module { public function process() { $this->display(); } }
PHP
<?php require_once '../../../config.php'; env()->initModule('lightbox'); module()->run();
PHP
<?php class Lightbox extends Module { public function process() { $this->display(); } }
PHP
<?php require_once '../../../config.php'; env()->initModule('partiemgr'); module()->run();
PHP
<?php class PartieMgr extends Module { public function ajax_updateOrganize() { $r=new AJAXResponse(); $res=queryTab(' select * from partie natural join slot natural join joueur natural join jeu where partie_id='.partie()->getID().' order by slot_position ');...
PHP
<?php require_once '../../../config.php'; env()->initModule('quickjoin'); module()->run();
PHP
<?php class QuickJoin extends Module { private function getListe() { $quickjoin=queryTab(' select * from partie natural join jeu natural join joueur where joueur_id=partie_host and partie_etat='.Partie::PREPARATION ); $games=array(); foreach($quickjoin...
PHP
<?php require_once '../../../config.php'; env()->initModule('userview'); module()->run();
PHP
<?php require_once '../config.php'; $page=new AutrePage(); $page->run();
PHP
<?php require_once '../config.php'; $page=new Aide(); $page->run();
PHP
<?php require_once '../config.php'; $page=new Index(); $page->run();
PHP
<?php require_once '../config.php'; $a = 0; if($a) { print 'vrai'; } else { print 'faux'; }
PHP
<?php require_once '../config.php'; $page=new MonCompte(); $page->run();
PHP
<?php require_once '../config.php'; querySimple(' truncate table partie; truncate table slot; delete from joueur where joueur_invite=1; ');
PHP
<?php /** * Project: Smarty: the PHP compiling template engine * File: SmartyBC.class.php * SVN: $Id: $ * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation;...
PHP
<?php /** * Smarty plugin * @package Smarty * @subpackage PluginsModifierCompiler */ /** * Smarty lower modifier plugin * * Type: modifier<br> * Name: lower<br> * Purpose: convert string to lowercase * * @link http://www.smarty.net/manual/en/language.modifier.lower.php lower (Smarty o...
PHP
<?php /** * Smarty plugin * * @package Smarty * @subpackage PluginsModifierCompiler */ /** * Smarty upper modifier plugin * * Type: modifier<br> * Name: lower<br> * Purpose: convert string to uppercase * * @link http://smarty.php.net/manual/en/language.modifier.upper.php lower (Sm...
PHP
<?php /** * Smarty plugin * * @package Smarty * @subpackage PluginsModifierCompiler */ /** * Smarty count_words modifier plugin * * Type: modifier<br> * Name: count_words<br> * Purpose: count the number of words in a text * * @link http://www.smarty.net/manual/en/language.modifier.c...
PHP
<?php /** * Smarty plugin * * @package Smarty * @subpackage PluginsModifierCompiler */ /** * Smarty to_charset modifier plugin * * Type: modifier<br> * Name: to_charset<br> * Purpose: convert character encoding from internal encoding to $charset * * @author Rodney Rehm * @param ar...
PHP