public function validateSchema() { $all_cols1 = $this->local->getColumnNames(); $all_cols2 = $this->remote->getColumnNames(); $all_cols3 = $all_cols2; $key_cols1 = $this->local->getPrimaryKey(); $key_cols2 = $this->remote->getPrimaryKey(); $key_cols3 = $key_cols2; if ($this->alt !== null) { $all_cols3 = $this->alt->getColumnNames(); $key_cols3 = $this->alt->getPrimaryKey(); } if ($all_cols1->length === 0 || $all_cols2->length === 0 || $all_cols3->length === 0) { throw new HException("Error accessing SQL table"); } if (!($this->equalArray($key_cols1, $key_cols2) && $this->equalArray($key_cols1, $key_cols3))) { haxe_Log::trace("sql diff not possible when primary key changes", _hx_anonymous(array("fileName" => "SqlCompare.hx", "lineNumber" => 71, "className" => "coopy.SqlCompare", "methodName" => "validateSchema"))); return false; } if ($key_cols1->length === 0) { haxe_Log::trace("sql diff not possible when primary key not available", _hx_anonymous(array("fileName" => "SqlCompare.hx", "lineNumber" => 75, "className" => "coopy.SqlCompare", "methodName" => "validateSchema"))); return false; } return true; }
public function decode_route() { $this->params = new _hx_array(array()); if (system_base_Router::$regexp->match($this->query_string)) { throw new HException(new system_base_Http_exception("Illegal character(s) in URI: " . _hx_string_or_null($this->query_string), 400, _hx_anonymous(array("fileName" => "Router.hx", "lineNumber" => 119, "className" => "system.base.Router", "methodName" => "decode_route")))); } if (strlen($this->query_string) === 0) { $this->controller = system_base_Router::$FRONT_CONTROLLER; $s = strtolower($this->controller); $this->controller = _hx_string_or_null(strtoupper(_hx_substr($s, 0, 1))) . _hx_string_or_null(_hx_substr($s, 1, null)); $this->method = strtolower(system_base_Router::$DEFAULT_METHOD); $this->query_string = _hx_string_or_null($this->controller) . "/" . _hx_string_or_null($this->method); return true; } if (_hx_index_of($this->query_string, "/", null) === -1) { $this->params->push(strtolower($this->query_string)); } else { $this->params = _hx_explode("/", strtolower($this->query_string)); } if ($this->params[0] !== null && strlen($this->params[0]) > 0) { $s1 = $this->params[0]; $this->controller = _hx_string_or_null(strtoupper(_hx_substr($s1, 0, 1))) . _hx_string_or_null(_hx_substr($s1, 1, null)); } else { $this->controller = system_base_Router::$FRONT_CONTROLLER; } if ($this->params[1] !== null && strlen($this->params[0]) > 0) { $this->method = $this->params[1]; } else { $this->method = system_base_Router::$DEFAULT_METHOD; } if ($this->controller === "_load") { return false; } return true; }
public function __construct($e) { if (!php_Boot::$skip_constructor) { parent::__construct(null, _hx_anonymous(array("fileName" => "Error.hx", "lineNumber" => 69, "className" => "system.base.NoSuchDbexception", "methodName" => "new"))); system_base_Error::wipe(_hx_string_or_null($e) . ": " . "The database type you have requested is not available."); } }
public function execute() { $uriParts = $this->context->actionContext->get_uriParts(); $this->setBaseUri($uriParts); $params = $this->context->request->get_params(); $method = $this->context->request->get_httpMethod(); $this->context->actionContext->controller = $this; $this->context->actionContext->action = "execute"; try { $this->context->actionContext->action = "showMessage"; $this->context->actionContext->args = new _hx_array(array()); $this->context->actionContext->get_uriParts()->splice(0, 0); $wrappingRequired = null; $i = haxe_rtti_Meta::getFields(_hx_qtype("ufront.app.DefaultUfrontController"))->showMessage->wrapResult[0]; $wrappingRequired = $i; $result = $this->wrapResult($this->showMessage(), $wrappingRequired); $this->setContextActionResultWhenFinished($result); return $result; throw new HException(ufront_web_HttpError::pageNotFound(_hx_anonymous(array("fileName" => "ControllerMacros.hx", "lineNumber" => 442, "className" => "ufront.app.DefaultUfrontController", "methodName" => "execute")))); } catch (Exception $__hx__e) { $_ex_ = $__hx__e instanceof HException ? $__hx__e->e : $__hx__e; $e = $_ex_; return ufront_core_SurpriseTools::asSurpriseError($e, "Uncaught error while executing " . Std::string($this->context->actionContext->controller) . "." . _hx_string_or_null($this->context->actionContext->action) . "()", _hx_anonymous(array("fileName" => "ControllerMacros.hx", "lineNumber" => 445, "className" => "ufront.app.DefaultUfrontController", "methodName" => "execute"))); } }
static function getPublicAndProtectedVars($fileData) { $results = (new _hx_array(array())); $searchIndex = 0; while($searchIndex < strlen($fileData)) { $searchIndex = _hx_index_of($fileData, "public \$", $searchIndex); if($searchIndex === -1) { break; } $semiColonIndex = _hx_index_of($fileData, ";", $searchIndex); $varName = _hx_substring($fileData, $searchIndex + 8, $semiColonIndex); $results->push(_hx_anonymous(array("varName" => $varName, "isPublic" => true))); $searchIndex = $semiColonIndex; unset($varName,$semiColonIndex); } $searchIndex = 0; while($searchIndex < strlen($fileData)) { $searchIndex = _hx_index_of($fileData, "protected \$", $searchIndex); if($searchIndex === -1) { break; } $semiColonIndex1 = _hx_index_of($fileData, ";", $searchIndex); $varName1 = _hx_substring($fileData, $searchIndex + 11, $semiColonIndex1); $results->push(_hx_anonymous(array("varName" => $varName1, "isPublic" => false))); $searchIndex = $semiColonIndex1; unset($varName1,$semiColonIndex1); } return $results; }
static function stat($path) { $fp = fopen($path, "r"); $fstat = fstat($fp); fclose($fp); return _hx_anonymous(array("gid" => $fstat['gid'], "uid" => $fstat['uid'], "atime" => Date::fromTime($fstat['atime'] * 1000), "mtime" => Date::fromTime($fstat['mtime'] * 1000), "ctime" => Date::fromTime($fstat['ctime'] * 1000), "dev" => $fstat['dev'], "ino" => $fstat['ino'], "nlink" => $fstat['nlink'], "rdev" => $fstat['rdev'], "size" => $fstat['size'], "mode" => $fstat['mode'])); }
static function create($param) { $self = new model_Campaigns(null); $self->table = "vicidial_campaigns"; haxe_Log::trace($param, _hx_anonymous(array("fileName" => "Campaigns.hx", "lineNumber" => 22, "className" => "model.Campaigns", "methodName" => "create"))); return Reflect::callMethod($self, Reflect::field($self, $param->get("action")), new _hx_array(array($param))); }
static function feed($u, $url) { $parts = _hx_explode("#", $url); if ($parts->length > 1) { $u->fragment = $parts[1]; } $parts = _hx_explode("?", $parts[0]); if ($parts->length > 1) { $pairs = _hx_explode("&", $parts[1]); $_g = 0; while ($_g < $pairs->length) { $s = $pairs[$_g]; ++$_g; $pair = _hx_explode("=", $s); $u->query->push(_hx_anonymous(array("name" => $pair[0], "value" => $pair[1], "encoded" => true))); unset($s, $pair); } } $segments = _hx_explode("/", $parts[0]); if ($segments[0] === "") { $segments->shift(); } if ($segments->length === 1 && $segments[0] === "") { $segments->pop(); } $u->segments = $segments; }
public function __construct($e) { if (!php_Boot::$skip_constructor) { parent::__construct(null, _hx_anonymous(array("fileName" => "Error.hx", "lineNumber" => 102, "className" => "system.base.NoFileError", "methodName" => "new"))); system_base_Error::wipe($e); } }
public function getGlobals($param) { $fieldNames = new haxe_ds_StringMap(); $typeMap = new haxe_ds_StringMap(); $optionsMap = new haxe_ds_StringMap(); $eF = $this->getEditorFields(null); $keys = $eF->keys(); $tableNames = new _hx_array(array()); $tableFields = new haxe_ds_StringMap(); haxe_Log::trace($param, _hx_anonymous(array("fileName" => "App.hx", "lineNumber" => 32, "className" => "model.App", "methodName" => "getGlobals"))); while ($keys->hasNext()) { $k = $keys->next(); $tableNames->push($k); $aFields = $eF->get($k); $cFields = $aFields->map(array(new _hx_lambda(array(&$aFields, &$eF, &$fieldNames, &$k, &$keys, &$optionsMap, &$param, &$tableFields, &$tableNames, &$typeMap), "model_App_0"), 'execute')); $tableFields->set($k, $cFields); $_g1 = 0; $_g = $cFields->length; while ($_g1 < $_g) { $f = $_g1++; $fieldNames->set($cFields[$f], _hx_array_get($aFields, $f)->get("field_name")); if (_hx_array_get($aFields, $f)->get("field_options") !== null) { $optionsMap->set($cFields[$f], _hx_array_get($aFields, $f)->get("field_options")); } $typeMap->set($cFields[$f], _hx_array_get($aFields, $f)->get("field_type")); unset($f); } unset($_g1, $_g); unset($k, $cFields, $aFields); } $me = new model_Users($param); $me->get_info(null); $data = _hx_anonymous(array("fieldNames" => php_Lib::associativeArrayOfHash($fieldNames), "userMap" => $me->globals, "optionsMap" => $optionsMap, "typeMap" => $typeMap, "limit" => _hx_array_get(S::$conf->get("sql"), "LIMIT"))); return $data; }
public function __construct() { if (!php_Boot::$skip_constructor) { $this->db = new zcale_sys_db_Database("zcale"); $this->cnx = sys_db_Mysql::connect(_hx_anonymous(array("host" => "localhost", "user" => "root", "pass" => "root", "database" => $this->db->name, "port" => null, "socket" => null))); } }
static function run() { if (testsite_Server::$ufrontApp === null) { testsite_Server::$ufrontApp = new ufront_app_UfrontApplication(_hx_anonymous(array("indexController" => _hx_qtype("testsite.Routes"), "logFile" => "log.txt", "contentDirectory" => "../uf-content/", "authImplementation" => _hx_qtype("ufront.auth.NobodyAuthHandler"), "sessionImplementation" => _hx_qtype("ufront.web.session.VoidSession"), "basePath" => "/php/"))); } testsite_Server::$ufrontApp->executeRequest(); }
public function __construct($httpContext) { if (!php_Boot::$skip_constructor) { ufront_web_HttpError::throwIfNull($httpContext, "httpContext", _hx_anonymous(array("fileName" => "ActionContext.hx", "lineNumber" => 80, "className" => "ufront.web.context.ActionContext", "methodName" => "new"))); $this->httpContext = $httpContext; } }
public function demo() { $this->cache->append("<html><head></head><body>"); $pg = new system_base_Paginator("http://localhost:8888/?front/demo/", 200, 5); $pg->generate_links(_hx_anonymous(array("separator" => " ", "sideband_width" => 6))); haxe_Log::trace($pg->get_current_links(), _hx_anonymous(array("fileName" => "Front.hx", "lineNumber" => 38, "className" => "system.application.controllers.Front", "methodName" => "demo"))); $this->cache->append("<img src='http://localhost:8888/?_load/sxy.jpg'> </img>"); $this->route = system_application_controllers_Front_0($this, $pg); haxe_Log::trace("src=\"" . "http://localhost:8888/" . "?_load/" . "sxy.jpg" . "\"", _hx_anonymous(array("fileName" => "Front.hx", "lineNumber" => 43, "className" => "system.application.controllers.Front", "methodName" => "demo"))); $rb = new system_base_Attributes("red bold", "test", null, null, null, null, null, null, null, null, null); haxe_Log::trace($rb->insert_attributes(), _hx_anonymous(array("fileName" => "Front.hx", "lineNumber" => 46, "className" => "system.application.controllers.Front", "methodName" => "demo"))); haxe_Log::trace("<a href=\"" . Std::string("http://" . "www.google.com") . "\"" . $rb->insert_attributes() . ">" . system_application_controllers_Front_1($this, $pg, $rb) . "</a>", _hx_anonymous(array("fileName" => "Front.hx", "lineNumber" => 48, "className" => "system.application.controllers.Front", "methodName" => "demo"))); haxe_Log::trace(system_base_Wet_base::$cache_path, _hx_anonymous(array("fileName" => "Front.hx", "lineNumber" => 49, "className" => "system.application.controllers.Front", "methodName" => "demo"))); haxe_Log::trace($_SERVER['SERVER_NAME'], _hx_anonymous(array("fileName" => "Front.hx", "lineNumber" => 50, "className" => "system.application.controllers.Front", "methodName" => "demo"))); haxe_Log::trace(system_base_Wet_base::get_file_etag(system_base_Wet_base::$views_path . "simple_view.wtv"), _hx_anonymous(array("fileName" => "Front.hx", "lineNumber" => 52, "className" => "system.application.controllers.Front", "methodName" => "demo"))); haxe_Log::trace(system_base_Wet_base::get_file_etag(system_base_Wet_base::$views_path . "simple_view2.wtv"), _hx_anonymous(array("fileName" => "Front.hx", "lineNumber" => 53, "className" => "system.application.controllers.Front", "methodName" => "demo"))); haxe_Log::trace(system_application_controllers_Front_2($this, $pg, $rb), _hx_anonymous(array("fileName" => "Front.hx", "lineNumber" => 54, "className" => "system.application.controllers.Front", "methodName" => "demo"))); haxe_Log::trace(system_application_controllers_Front_3($this, $pg, $rb), _hx_anonymous(array("fileName" => "Front.hx", "lineNumber" => 55, "className" => "system.application.controllers.Front", "methodName" => "demo"))); system_base_Wet_base::set_file_etag(system_base_Wet_base::$views_path . "simple_view2.wtv"); haxe_Log::trace(haxe_Timer::stamp(), _hx_anonymous(array("fileName" => "Front.hx", "lineNumber" => 57, "className" => "system.application.controllers.Front", "methodName" => "demo"))); $this->cache->inject_style(".red {color:red}", null); $this->cache->inject_style(".bold", "font-weight: bold;"); $this->cache->append("<span class='bold red'>This is a test run...</span>"); $this->cache->append("This is a working copy" . Std::string($this->params)); $this->cache->append("</body></html>"); }
public function __construct() { if (!php_Boot::$skip_constructor) { parent::__construct(null, _hx_anonymous(array("fileName" => "Error.hx", "lineNumber" => 60, "className" => "system.base.Dbexception", "methodName" => "new"))); system_base_Error::wipe(" connection not established or already closed."); } }
public function external_status($param) { $status = $param->get("dispo"); $url = "http://xpress.mein-dialer.com/agc/api.php?source=flyCRM&user="******"&pass="******"&function=external_status&value=" . _hx_string_or_null($status) . "&agent_user="******"agent_user")); haxe_Log::trace($url, _hx_anonymous(array("fileName" => "AgcApi.hx", "lineNumber" => 71, "className" => "model.AgcApi", "methodName" => "external_status"))); $agcResponse = haxe_Http::requestUrl($url); return $this->json_response(_hx_index_of($agcResponse, "SUCCESS", null) === 0 ? "OK" : $agcResponse); }
public function ufError($msg, $pos = null) { if ($this->context !== null) { $this->context->messages->push(_hx_anonymous(array("msg" => $msg, "pos" => $pos, "type" => ufront_log_MessageType::$MError))); } else { haxe_Log::trace("Error: " . Std::string($msg), $pos); } }
static function objectOfAssociativeArray($arr) { foreach ($arr as $key => $value) { if (is_array($value)) { $arr[$key] = php_Lib::objectOfAssociativeArray($value); } } return _hx_anonymous($arr); }
static function getFields($t) { $meta = haxe_rtti_Meta::getMeta($t); if ($meta === null || _hx_field($meta, "fields") === null) { return _hx_anonymous(array()); } else { return $meta->fields; } }
public function __construct($message, $Http_Code = null, $info = null) { if (!php_Boot::$skip_constructor) { parent::__construct(null, _hx_anonymous(array("fileName" => "Error.hx", "lineNumber" => 41, "className" => "system.base.General_error", "methodName" => "new"))); $message1 = null; $message1 = Std::string($message); haxe_Log::trace("DEPRECATED FUNCTION: " . _hx_string_or_null($message1), _hx_anonymous(array("fileName" => "Base.hx", "lineNumber" => 449, "className" => "system.base.Wet_base", "methodName" => "echo"))); } }
static function match($route, $path) { $parser = new sinatra_RouteParser($route); $matched = $parser->match($path); haxe_Log::trace("Matched? " . $matched . " " . $route . " " . $path, _hx_anonymous(array("fileName" => "Route.hx", "lineNumber" => 70, "className" => "sinatra.Route", "methodName" => "match"))); if ($matched) { } return $matched; }
public function hpOfString($s) { $parts = _hx_explode(":", $s); if ($parts->length === 2) { return _hx_anonymous(array("host" => new sys_net_Host($parts[0]), "port" => Std::parseInt($parts[1]))); } else { return _hx_anonymous(array("host" => new sys_net_Host(_hx_substr($parts[1], 2, null)), "port" => Std::parseInt($parts[2]))); } }
static function getFields($t) { $meta = $t->__meta__; if ($meta === null || _hx_field($meta, "fields") === null) { return _hx_anonymous(array()); } else { return $meta->fields; } }
static function hexit($d) { if (!S::$headerSent) { header("Content-Type" . ": " . "application/json"); S::$headerSent = true; } $exitValue = json_encode(_hx_anonymous(array("ERROR" => $d))); exit($exitValue); return; }
public function deleteTemporaryFile() { try { @unlink($this->tmpFileName); return tink_core_Outcome::Success(tink_core_Noise::$Noise); } catch (Exception $__hx__e) { $_ex_ = $__hx__e instanceof HException ? $__hx__e->e : $__hx__e; $e = $_ex_; return tink_core_Outcome::Failure(tink_core_TypedError::withData(null, "Error during TmpFileUpload.deleteTmpFile()", $e, _hx_anonymous(array("fileName" => "TmpFileUpload.hx", "lineNumber" => 165, "className" => "ufront.web.upload.TmpFileUpload", "methodName" => "deleteTemporaryFile")))); } }
static function getClasses() { $path = null; $o = _hx_anonymous(array()); reset(php_Boot::$qtypes); while (($path = key(php_Boot::$qtypes)) !== null) { php_Lib::appendType($o, _hx_explode(".", $path), php_Boot::$qtypes[$path]); next(php_Boot::$qtypes); } return $o; }
public function __construct($e, $sql = null) { if (!php_Boot::$skip_constructor) { parent::__construct(null, _hx_anonymous(array("fileName" => "Error.hx", "lineNumber" => 78, "className" => "system.base.BadSQLException", "methodName" => "new"))); $strings = null; $strings = _hx_string_call($e, "split", array(";")); haxe_Log::trace(system_base_Sql_colour::pretify($sql), _hx_anonymous(array("fileName" => "Error.hx", "lineNumber" => 81, "className" => "system.base.BadSQLException", "methodName" => "new"))); haxe_Log::trace(system_base_Sql_colour::pretify($strings[0]), _hx_anonymous(array("fileName" => "Error.hx", "lineNumber" => 82, "className" => "system.base.BadSQLException", "methodName" => "new"))); system_base_Error::wipe("SQL said: " . _hx_string_or_null($strings[1])); } }
public function next() { if (_hx_field($this, "cache") !== null) { $t = $this->cache; $this->cache = null; return $t; } if (!$this->fetchRow()) { return null; } return _hx_anonymous($this->cRow); }
static function toOutcome($option, $pos = null) { switch ($option->index) { case 0: $value = _hx_deref($option)->params[0]; return tink_core_Outcome::Success($value); break; case 1: return tink_core_Outcome::Failure(new tink_core_TypedError(404, "Some value expected but none found in " . _hx_string_or_null($pos->fileName) . "@line " . _hx_string_rec($pos->lineNumber, ""), _hx_anonymous(array("fileName" => "Outcome.hx", "lineNumber" => 37, "className" => "tink.core.OutcomeTools", "methodName" => "toOutcome")))); break; } }
public function requirePermissions($permissions) { if (null == $permissions) { throw new HException('null iterable'); } $__hx__it = $permissions->iterator(); while ($__hx__it->hasNext()) { unset($p); $p = $__hx__it->next(); throw new HException(ufront_web_HttpError::authError(ufront_auth_AuthError::ANoPermission($p), _hx_anonymous(array("fileName" => "NobodyAuthHandler.hx", "lineNumber" => 32, "className" => "ufront.auth.NobodyAuthHandler", "methodName" => "requirePermissions")))); } }