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; }
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))); }
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>"); }
static function init() { sys_io_File::saveContent("log.txt", ""); me_cunity_debug_Out::$log = sys_io_File::write("log.txt", true); me_cunity_debug_Out::$log->flush(); haxe_Log::$trace = isset(me_cunity_debug_Out::$_trace) ? me_cunity_debug_Out::$_trace : array("me_cunity_debug_Out", "_trace"); }
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 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); } }
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 __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 showMessage() { $pos = _hx_anonymous(array("fileName" => "UfrontConfiguration.hx", "lineNumber" => 279, "className" => "ufront.app.DefaultUfrontController", "methodName" => "showMessage")); if ($this->context !== null) { $this->context->messages->push(_hx_anonymous(array("msg" => "Your Ufront App is almost ready.", "pos" => $pos, "type" => ufront_log_MessageType::$MTrace))); } else { haxe_Log::trace("" . "Your Ufront App is almost ready.", $pos); } return "<!DOCTYPE html>\n<html>\n<head>\n\t<title>New Ufront App</title>\n\t<link href=\"http://netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap.min.css\" rel=\"stylesheet\" />\n</head>\n<body style=\"padding-top: 30px;\">\n\t<div class=\"container\">\n\t\t<div class=\"jumbotron\">\n\t\t\t<h1>Almost done!</h1>\n\t\t\t<p>Your new Ufront App is almost ready to go. You will need to add some routes and let ufront know about them:</p>\n\t\t\t<pre><code>\n\tapp = new UfrontApplication({\n\t\tindexController: MySiteController,\n\t});\n\tapp.executeRequest();\n\t\t\t</code></pre>\n\t\t\t<p>See the Getting Started tutorial for more information.</p>\n\t\t</div>\n\t</div>\n</body>\n</html>\n"; }
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])); } }
static function parse($str) { haxe_Log::trace("Parsing URI from: " . $str, _hx_anonymous(array("fileName" => "URI.hx", "lineNumber" => 131, "className" => "sinatra.URI", "methodName" => "parse"))); $abs = new EReg(sinatra_URI::$PATTERN_REMOVE_WHITESPACE->replace(sinatra_URI::$PATTERN_ABS_URI, ""), ""); if ($abs->match($str)) { haxe_Log::trace("IT'S AN ABSOLUTE URI!", _hx_anonymous(array("fileName" => "URI.hx", "lineNumber" => 135, "className" => "sinatra.URI", "methodName" => "parse"))); return new sinatra_URI($abs, true); } $rel = new EReg(sinatra_URI::$PATTERN_REMOVE_WHITESPACE->replace(sinatra_URI::$PATTERN_REL_URI, ""), ""); if ($rel->match($str)) { haxe_Log::trace("IT'S A RELATIVE URI!", _hx_anonymous(array("fileName" => "URI.hx", "lineNumber" => 141, "className" => "sinatra.URI", "methodName" => "parse"))); return new sinatra_URI($rel, false); } haxe_Log::trace("Invalid URI", _hx_anonymous(array("fileName" => "URI.hx", "lineNumber" => 145, "className" => "sinatra.URI", "methodName" => "parse"))); return null; }
public function __construct() { if (!php_Boot::$skip_constructor) { $this->get("/", _hx_qtype("controller.Home"), "index"); $this->get("/user/:id.:format", _hx_qtype("controller.User"), "get"); $this->get("/user/(\\d+)", _hx_qtype("controller.User"), "get"); $this->get("/user/**/*.xml", _hx_qtype("controller.User"), "get"); $this->post("/user", _hx_qtype("controller.User"), "update"); $this->put("/user", _hx_qtype("controller.User"), "create"); $this->delete("/user", _hx_qtype("controller.User"), "delete"); $p = new Params(); $p->id = "123"; $p[0] = "321"; haxe_Log::trace($p, _hx_anonymous(array("fileName" => "Application.hx", "lineNumber" => 23, "className" => "Application", "methodName" => "new"))); } }
static function checkAuth() { S::$user = php_Session::get("PHP_AUTH_USER"); haxe_Log::trace(S::$user, _hx_anonymous(array("fileName" => "S.hx", "lineNumber" => 98, "className" => "S", "methodName" => "checkAuth"))); if (S::$user === null) { return false; } $pass = php_Session::get("PHP_AUTH_PW"); if ($pass === null) { return false; } $res = php_Lib::hashOfAssociativeArray(_hx_deref(new Model(null))->query("SELECT use_non_latin,webroot_writable,pass_hash_enabled,pass_key,pass_cost,hosted_settings FROM system_settings")); if (S_0($pass, $res) === "1") { S::hexit("ENCRYPTED PASSWORDS NOT IMPLEMENTED"); } $res = php_Lib::hashOfAssociativeArray(_hx_deref(new Model(null))->query("SELECT count(*) AS cnt FROM vicidial_users WHERE user=\"" . _hx_string_or_null(S::$user) . "\" and pass=\"" . _hx_string_or_null($pass) . "\" and user_level > 7 and active=\"Y\"")); return $res->exists("0") && S_1($pass, $res) === "1"; }
public function __construct($message, $Http_Code, $info = null) { if (!php_Boot::$skip_constructor) { parent::__construct(null, _hx_anonymous(array("fileName" => "Error.hx", "lineNumber" => 50, "className" => "system.base.Http_exception", "methodName" => "new"))); while (!system_base_Cache::$cookie_buffer->isEmpty()) { system_base_Wet_base::send_cookie(system_base_Cache::$cookie_buffer->pop()); } header("X-Powered-By" . ": " . "Webrathea/0.4 (PHP)"); $value = DateTools::format(Date::now(), "%a, %d %b %Y %X %Z"); header("Date" . ": " . _hx_string_or_null($value)); header("X-Frame-Options" . ": " . "sameorigin"); header("X-XSS-Protection" . ": " . "1; mode=block"); php_Web::setReturnCode($Http_Code); $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 load($cjs) { $js = file_get_contents($cjs); $vars = _hx_explode("var", $js); $vars->shift(); $result = new haxe_ds_StringMap(); haxe_Log::trace($vars->length, _hx_anonymous(array("fileName" => "Config.hx", "lineNumber" => 20, "className" => "Config", "methodName" => "load"))); $jsonS = new Services_JSON(48); $_g = 0; while ($_g < $vars->length) { $v = $vars[$_g]; ++$_g; $data = _hx_explode("=", $v); $json = $jsonS->decode($data[1]); $result->set(trim($data[0]), $json); unset($v, $json, $data); } return $result; }
public function init() { $_g = $this; $this->originalTrace = isset(haxe_Log::$trace) ? haxe_Log::$trace : array("haxe_Log", "trace"); haxe_Log::$trace = array(new _hx_lambda(array(&$_g), "ufront_app_HttpApplication_0"), 'execute'); if ($this->modulesReady === null) { $futures = new _hx_array(array()); $_g1 = 0; $_g11 = $this->getModulesThatRequireInit(); while ($_g1 < $_g11->length) { $module = $_g11[$_g1]; ++$_g1; $futures->push($module->init($this)); unset($module); } $this->modulesReady = tink_core__Future_Future_Impl_::map(tink_core__Future_Future_Impl_::ofMany($futures, null), array(new _hx_lambda(array(&$_g, &$futures), "ufront_app_HttpApplication_1"), 'execute'), null); } return $this->modulesReady; }
public function increment($name, $time, $sql = null) { switch ($name) { case "INS": system_base_Profiler::$inserts->add_sql($time, $sql); break; case "UPD": system_base_Profiler::$updates->add_sql($time, $sql); break; case "DEL": system_base_Profiler::$deletes->add_sql($time, $sql); break; case "SEL": system_base_Profiler::$selects->add_sql($time, $sql); break; case "OTH": system_base_Profiler::$others->add_sql($time, $sql); break; case "CON": system_base_Profiler::$connections->add($time); break; case "QUE": system_base_Profiler::$query->add($time); break; case "LOG": system_base_Profiler::$logic->add($time); break; case "PRE": system_base_Profiler::$prepare->add_sql($time, $sql); break; case "EXE": system_base_Profiler::$execute->add_sql($time, $sql); break; case "SET": system_base_Profiler::$setting->add_sql($time, $sql); break; default: $message = null; $message = Std::string("Function: {" . _hx_string_or_null($name) . "}" . " is not registered with the profiler" . "<br>"); haxe_Log::trace("DEPRECATED FUNCTION: " . _hx_string_or_null($message), _hx_anonymous(array("fileName" => "Base.hx", "lineNumber" => 449, "className" => "system.base.Wet_base", "methodName" => "echo"))); break; } }
public function get_info($user = null) { $sb = new StringBuf(); $phValues = new _hx_array(array()); $result = new _hx_array(array()); $param = new haxe_ds_StringMap(); $param->set("table", "vicidial_users"); $param->set("fields", "user,user_level, pass,full_name"); $param->set("where", model_Users_0($this, $param, $phValues, $result, $sb, $user)); $param->set("limit", "50"); $userMap = $this->doSelect($param, $sb, $phValues); haxe_Log::trace($param, _hx_anonymous(array("fileName" => "Users.hx", "lineNumber" => 37, "className" => "model.Users", "methodName" => "get_info"))); $_g1 = 0; $_g = $this->num_rows; while ($_g1 < $_g) { $n = $_g1++; $result->push(_hx_anonymous(array("user" => $userMap[$n]["user"], "full_name" => $userMap[$n]["full_name"]))); unset($n); } return $result; }
static function run($app) { sinatra_Base::$request = new sinatra_Request(); haxe_Log::trace(sinatra_Base::$request, _hx_anonymous(array("fileName" => "Base.hx", "lineNumber" => 56, "className" => "sinatra.Base", "methodName" => "run"))); $route = null; $»it = sinatra_Base::$_routes->get(sinatra_Base::$request->method)->iterator(); while ($»it->hasNext()) { $r = $»it->next(); if (sinatra_Route::match($r->route, sinatra_Base::$request->path)) { $route = $r; break; } } if ($route === null) { throw new HException("Found no route matching \"" . sinatra_Base::$request->path . "\""); } $view = null; try { $view = $route->call(); } catch (Exception $»e) { $_ex_ = $»e instanceof HException ? $»e->e : $»e; if (is_int($code = $_ex_)) { haxe_Log::trace("CODE:" . Std::string($code), _hx_anonymous(array("fileName" => "Base.hx", "lineNumber" => 76, "className" => "sinatra.Base", "methodName" => "run"))); } else { if (is_string($err = $_ex_)) { haxe_Log::trace("ERR:" . $err . " stack: " . haxe_Stack::toString(haxe_Stack::exceptionStack()), _hx_anonymous(array("fileName" => "Base.hx", "lineNumber" => 78, "className" => "sinatra.Base", "methodName" => "run"))); } else { $other = $_ex_; haxe_Log::trace("WARN:" . Std::string($other), _hx_anonymous(array("fileName" => "Base.hx", "lineNumber" => 80, "className" => "sinatra.Base", "methodName" => "run"))); } } } if ($view !== null) { $view->render(); } return 0; }
public function checkDiff($e1, $e2, $verbose = null) { if ($verbose === null) { $verbose = false; } $table1 = harness_Native::table($e1); $table2 = harness_Native::table($e2); $data_diff = new _hx_array(array()); $table_diff = harness_Native::table($data_diff); $flags = new coopy_CompareFlags(); $alignment = coopy_Coopy::compareTables($table1, $table2, $flags)->align(); if ($verbose) { haxe_Log::trace("Alignment: " . Std::string($alignment), _hx_anonymous(array("fileName" => "SmallTableTest.hx", "lineNumber" => 18, "className" => "harness.SmallTableTest", "methodName" => "checkDiff"))); } $highlighter = new coopy_TableDiff($alignment, $flags); $highlighter->hilite($table_diff); if ($verbose) { haxe_Log::trace("Diff: " . Std::string($table_diff), _hx_anonymous(array("fileName" => "SmallTableTest.hx", "lineNumber" => 21, "className" => "harness.SmallTableTest", "methodName" => "checkDiff"))); } $o = coopy_Coopy::diff($table1, $table2, null); $this->assertTrue(coopy_SimpleTable::tableIsSimilar($table_diff, $o), _hx_anonymous(array("fileName" => "SmallTableTest.hx", "lineNumber" => 25, "className" => "harness.SmallTableTest", "methodName" => "checkDiff"))); $table3 = $table1->hclone(); $patcher = new coopy_HighlightPatch($table3, $table_diff, null); $patcher->apply(); if ($verbose) { haxe_Log::trace("Desired " . _hx_string_rec($table2->get_height(), "") . "x" . _hx_string_rec($table2->get_width(), "") . ": " . Std::string($table2), _hx_anonymous(array("fileName" => "SmallTableTest.hx", "lineNumber" => 30, "className" => "harness.SmallTableTest", "methodName" => "checkDiff"))); } if ($verbose) { haxe_Log::trace("Got " . _hx_string_rec($table3->get_height(), "") . "x" . _hx_string_rec($table3->get_width(), "") . ": " . Std::string($table3), _hx_anonymous(array("fileName" => "SmallTableTest.hx", "lineNumber" => 31, "className" => "harness.SmallTableTest", "methodName" => "checkDiff"))); } if ($verbose) { haxe_Log::trace("Base " . _hx_string_rec($table1->get_height(), "") . "x" . _hx_string_rec($table1->get_width(), "") . ": " . Std::string($table1), _hx_anonymous(array("fileName" => "SmallTableTest.hx", "lineNumber" => 32, "className" => "harness.SmallTableTest", "methodName" => "checkDiff"))); } $this->assertTrue(coopy_SimpleTable::tableIsSimilar($table3, $table2), _hx_anonymous(array("fileName" => "SmallTableTest.hx", "lineNumber" => 33, "className" => "harness.SmallTableTest", "methodName" => "checkDiff"))); return $table_diff; }
static function indentXml($xml, $space) { $depth = 0; $opentag = new EReg("^<([\\w-_]+)[^>]*>\$", ""); $autotag = new EReg("^<([\\w-_]+)[^>]*/>\$", ""); $closetag = new EReg("^</([\\w-_]+)>\$", ""); $cdata = new EReg("^<!\\[CDATA\\[[^\\]]*\\]\\]>\$", ""); $res = new StringBuf(); $end = 0; $start = null; $text = null; while ($end < strlen($xml) && ($start = _hx_index_of($xml, "<", $end)) !== -1) { $text = $start > $end; if ($text) { $res->add(_hx_substr($xml, $end, $start - $end)); } $end = _hx_index_of($xml, ">", $start) + 1; $aux = _hx_substr($xml, $start, $end - $start); if ($autotag->match($aux)) { $res->add("\n"); $i = null; $_g = 0; while ($_g < $depth) { $i1 = $_g++; $res->add($space); unset($i1); } unset($_g); $res->add($aux); unset($i); } else { if ($opentag->match($aux)) { $res->add("\n"); $i = null; $_g = 0; while ($_g < $depth) { $i1 = $_g++; $res->add($space); unset($i1); } unset($_g); $res->add($aux); $depth++; unset($i); } else { if ($closetag->match($aux)) { $depth--; if (!$text) { $res->add("\n"); $i = null; $_g = 0; while ($_g < $depth) { $i1 = $_g++; $res->add($space); unset($i1); } unset($_g); unset($i); } $res->add($aux); } else { if ($cdata->match($aux)) { $res->add($aux); } else { haxe_Log::trace("WARNING! malformed XML at character " . _hx_string_rec($end, "") . ":" . $xml, _hx_anonymous(array("fileName" => "WXmlUtils.hx", "lineNumber" => 583, "className" => "com.wiris.util.xml.WXmlUtils", "methodName" => "indentXml"))); $res->add($aux); } } } } unset($aux); } return trim($res->b); }
public function calculatePath() { if ($this->path_valid) { return; } $this->endTransitions(); $best = 0; $bestj = -1; if ($this->index <= 0) { $this->path_valid = true; return; } $_g1 = 0; $_g = $this->K; while ($_g1 < $_g) { $j = $_g1++; if (($this->cost->get($j, $this->index - 1) < $best || $bestj === -1) && $this->src->get($j, $this->index - 1) !== -1) { $best = $this->cost->get($j, $this->index - 1); $bestj = $j; } unset($j); } $this->best_cost = $best; $_g11 = 0; $_g2 = $this->index; while ($_g11 < $_g2) { $j1 = $_g11++; $i = $this->index - 1 - $j1; $this->path->set(0, $i, $bestj); if (!($bestj !== -1 && ($bestj >= 0 && $bestj < $this->K))) { haxe_Log::trace("Problem in Viterbi", _hx_anonymous(array("fileName" => "Viterbi.hx", "lineNumber" => 167, "className" => "coopy.Viterbi", "methodName" => "calculatePath"))); } $bestj = $this->src->get($bestj, $i); unset($j1, $i); } $this->path_valid = true; }
public function exec($db, $query) { if (!$db->begin($query, null, null)) { haxe_Log::trace("database problem", _hx_anonymous(array("fileName" => "SqliteHelper.hx", "lineNumber" => 250, "className" => "coopy.SqliteHelper", "methodName" => "exec"))); return false; } $db->end(); return true; }
static function dispatch($param) { $cl = Type::resolveClass("model." . Std::string($param->get("className"))); if ($cl === null) { haxe_Log::trace("model." . Std::string($param->get("className")) . " ???", _hx_anonymous(array("fileName" => "Model.hx", "lineNumber" => 66, "className" => "Model", "methodName" => "dispatch"))); return false; } $fl = Reflect::field($cl, "create"); if ($fl === null) { haxe_Log::trace(Std::string($cl) . "create is null", _hx_anonymous(array("fileName" => "Model.hx", "lineNumber" => 73, "className" => "Model", "methodName" => "dispatch"))); return false; } $iFields = Type::getInstanceFields($cl); if (Lambda::has($iFields, $param->get("action"))) { haxe_Log::trace("calling create " . Std::string($cl), _hx_anonymous(array("fileName" => "Model.hx", "lineNumber" => 80, "className" => "Model", "methodName" => "dispatch"))); return Reflect::callMethod($cl, $fl, new _hx_array(array($param))); } else { haxe_Log::trace("not calling create ", _hx_anonymous(array("fileName" => "Model.hx", "lineNumber" => 85, "className" => "Model", "methodName" => "dispatch"))); return false; } }
public function find($param) { $sb = new StringBuf(); $phValues = new _hx_array(array()); haxe_Log::trace($param, _hx_anonymous(array("fileName" => "ClientHistory.hx", "lineNumber" => 227, "className" => "model.ClientHistory", "methodName" => "find"))); $count = $this->countJoin($param, $sb, $phValues); $sb = new StringBuf(); $phValues = new _hx_array(array()); haxe_Log::trace(_hx_string_or_null($param->get("joincond")) . " count:" . _hx_string_rec($count, "") . ":" . _hx_string_or_null($param->get("page")) . ": " . _hx_string_or_null($param->exists("page") ? "Y" : "N"), _hx_anonymous(array("fileName" => "ClientHistory.hx", "lineNumber" => 232, "className" => "model.ClientHistory", "methodName" => "find"))); $this->data = _hx_anonymous(array("count" => $count, "page" => $param->exists("page") ? Std::parseInt($param->get("page")) : 1, "rows" => $this->doJoin($param, $sb, $phValues))); return $this->json_encode(); }
public function save($q) { $lead_id = Std::parseInt($q->get("lead_id")); $user = S::$user; $log_id = false; if ($log_id = $this->saveLog($q, null)) { $cTable = "custom_" . Std::string($q->get("entry_list_id")); haxe_Log::trace(_hx_string_or_null($cTable) . " log_id:" . Std::string($log_id), _hx_anonymous(array("fileName" => "QC.hx", "lineNumber" => 162, "className" => "model.QC", "methodName" => "save"))); $primary_id = S::$my->real_escape_string($q->get("primary_id")); $sql = new StringBuf(); $sql->add("UPDATE " . _hx_string_or_null($cTable) . " SET "); $cFields = S::tableFields("" . _hx_string_or_null($cTable), null); haxe_Log::trace("" . _hx_string_or_null($cTable) . " fields:" . _hx_string_or_null($cFields->toString()), _hx_anonymous(array("fileName" => "QC.hx", "lineNumber" => 177, "className" => "model.QC", "methodName" => "save"))); $cFields->remove($primary_id); $bindTypes = ""; $values2bind = null; $i = 0; $dbFieldTypes = php_Lib::hashOfAssociativeArray(php_Lib::associativeArrayOfObject(S::$conf->get("dbFieldTypes"))); $sets = new _hx_array(array()); $_g = 0; while ($_g < $cFields->length) { $c = $cFields[$_g]; ++$_g; $val = $q->get($c); if ($val !== null) { if (Std::is($val, _hx_qtype("String"))) { $values2bind[$i++] = $val; } else { $values2bind[$i++] = $val[0]; } $type = $dbFieldTypes->get($c); if (Util::any2bool($type)) { $bindTypes .= _hx_string_or_null($type); } else { $bindTypes .= "s"; } $sets->push(_hx_string_or_null($c) . "=?"); unset($type); } unset($val, $c); } $sql->add($sets->join(",")); $sql->add(" WHERE lead_id=" . _hx_string_rec($lead_id, "")); $stmt = S::$my->stmt_init(); haxe_Log::trace($sql->b, _hx_anonymous(array("fileName" => "QC.hx", "lineNumber" => 199, "className" => "model.QC", "methodName" => "save"))); $success = $stmt->prepare($sql->b); if (!$success) { haxe_Log::trace($stmt->error, _hx_anonymous(array("fileName" => "QC.hx", "lineNumber" => 203, "className" => "model.QC", "methodName" => "save"))); return false; } $success = myBindParam($stmt, $values2bind, $bindTypes); haxe_Log::trace("success:" . Std::string($success), _hx_anonymous(array("fileName" => "QC.hx", "lineNumber" => 207, "className" => "model.QC", "methodName" => "save"))); if ($success) { $success = $stmt->execute(); if (!$success) { haxe_Log::trace($stmt->error, _hx_anonymous(array("fileName" => "QC.hx", "lineNumber" => 213, "className" => "model.QC", "methodName" => "save"))); return false; } $sql = new StringBuf(); $uFields = model_QC::$vicdial_list_fields; $uFields->remove($primary_id); $bindTypes = ""; $values2bind = null; $i = 0; $sql->add("UPDATE vicidial_list SET "); $sets = new _hx_array(array()); $_g1 = 0; while ($_g1 < $uFields->length) { $c1 = $uFields[$_g1]; ++$_g1; $val1 = $q->get($c1); if ($val1 !== null) { if (Std::is($val1, _hx_qtype("String"))) { $values2bind[$i++] = $val1; } else { $values2bind[$i++] = $val1[0]; } $type1 = $dbFieldTypes->get($c1); if (Util::any2bool($type1)) { $bindTypes .= _hx_string_or_null($type1); } else { $bindTypes .= "s"; } $sets->push(_hx_string_or_null($c1) . "=?"); unset($type1); } unset($val1, $c1); } $values2bind[$i++] = S::$user; $bindTypes .= "s"; $sets->push("security_phrase=?"); $values2bind[$i++] = "XX"; $bindTypes .= "s"; $sets->push("state=?"); if (_hx_equal($q->get("status"), "QCOK") || _hx_equal($q->get("status"), "QCBAD")) { $list_id = 10000; if (_hx_equal($q->get("status"), "QCOK")) { $mID = Std::parseInt($q->get("vendor_lead_code")); if ($mID === null) { $mID = S::newMemberID(); $values2bind[$i++] = $mID; $bindTypes .= "s"; $sets->push("vendor_lead_code=?"); } } else { $list_id = 1800; } $entry_list_id = $q->get("entry_list_id"); $values2bind[$i++] = $q->get("status"); $bindTypes .= "s"; $sets->push("`status`=?"); $values2bind[$i++] = $list_id; $bindTypes .= "s"; $sets->push("list_id=?"); $values2bind[$i++] = $entry_list_id; $bindTypes .= "s"; $sets->push("entry_list_id=?"); $values2bind[$i++] = $q->get("owner"); $bindTypes .= "s"; $sets->push("owner=?"); } $sql->add($sets->join(",")); $sql->add(" WHERE lead_id=" . _hx_string_rec($lead_id, "")); $stmt1 = S::$my->stmt_init(); haxe_Log::trace($sql->b, _hx_anonymous(array("fileName" => "QC.hx", "lineNumber" => 277, "className" => "model.QC", "methodName" => "save"))); $success1 = $stmt1->prepare($sql->b); if (!$success1) { haxe_Log::trace($stmt1->error, _hx_anonymous(array("fileName" => "QC.hx", "lineNumber" => 281, "className" => "model.QC", "methodName" => "save"))); return false; } $success1 = myBindParam($stmt1, $values2bind, $bindTypes); haxe_Log::trace("success:" . Std::string($success1), _hx_anonymous(array("fileName" => "QC.hx", "lineNumber" => 287, "className" => "model.QC", "methodName" => "save"))); if ($success1) { $success1 = $stmt1->execute(); if (!$success1) { haxe_Log::trace($stmt1->error, _hx_anonymous(array("fileName" => "QC.hx", "lineNumber" => 293, "className" => "model.QC", "methodName" => "save"))); return false; } else { return $this->saveLog($q, $log_id) !== false; } } return false; } } else { haxe_Log::trace("oops", _hx_anonymous(array("fileName" => "QC.hx", "lineNumber" => 306, "className" => "model.QC", "methodName" => "save"))); } return false; }
static function create($param) { $self = new model_Select(); haxe_Log::trace($param, _hx_anonymous(array("fileName" => "Select.hx", "lineNumber" => 16, "className" => "model.Select", "methodName" => "create"))); return Reflect::callMethod($self, Reflect::field($self, $param->get("action")), new _hx_array(array($param))); }
public function setCell($x, $y, $c) { haxe_Log::trace("JsonTable is read-only", _hx_anonymous(array("fileName" => "JsonTable.hx", "lineNumber" => 52, "className" => "coopy.JsonTable", "methodName" => "setCell"))); }
static function dumpArrayItems($arr, $propName = null) { $dump = ""; $indent = ""; $_g1 = 0; $_g = me_cunity_tools_ArrayTools::$indentLevel; while ($_g1 < $_g) { $i = $_g1++; $indent .= " "; unset($i); } haxe_Log::trace(_hx_string_or_null($indent) . _hx_string_rec(me_cunity_tools_ArrayTools::$indentLevel, ""), _hx_anonymous(array("fileName" => "ArrayTools.hx", "lineNumber" => 175, "className" => "me.cunity.tools.ArrayTools", "methodName" => "dumpArrayItems"))); $_g2 = 0; while ($_g2 < $arr->length) { $el = $arr[$_g2]; ++$_g2; if ($propName !== null) { $names = _hx_explode(".", $propName); $item = $el; $_g11 = 0; while ($_g11 < $names->length) { $name = $names[$_g11]; ++$_g11; $item = Reflect::field($item, $name); unset($name); } unset($_g11); $dump .= Std::string($item); unset($names, $item); } else { $dump .= Std::string($el); } $dump .= ", "; unset($el); } haxe_Log::trace($dump, _hx_anonymous(array("fileName" => "ArrayTools.hx", "lineNumber" => 189, "className" => "me.cunity.tools.ArrayTools", "methodName" => "dumpArrayItems"))); return $dump; }