当前位置: 首页>>代码示例>>PHP>>正文


PHP S::hexit方法代码示例

本文整理汇总了PHP中S::hexit方法的典型用法代码示例。如果您正苦于以下问题:PHP S::hexit方法的具体用法?PHP S::hexit怎么用?PHP S::hexit使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在S的用法示例。


在下文中一共展示了S::hexit方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: checkAuth

 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";
 }
开发者ID:axelhuizinga,项目名称:gem,代码行数:18,代码来源:S.class.php

示例2: buildCond

 public function buildCond($whereParam, $sob, $phValues, $first = null)
 {
     if ($first === null) {
         $first = true;
     }
     $sb = new StringBuf();
     $where = _hx_explode(",", $whereParam);
     if ($where->length === 0) {
         return false;
     }
     $_g = 0;
     while ($_g < $where->length) {
         $w = $where[$_g];
         ++$_g;
         $wData = _hx_string_call($w, "split", array("|"));
         $values = $wData->slice(2, null);
         $filter_tables = null;
         if (Util::any2bool($this->param) && $this->param->exists("filter_tables") && Util::any2bool($this->param->get("filter_tables"))) {
             $jt = $this->param->get("filter_tables");
             $filter_tables = _hx_explode(",", $jt);
             unset($jt);
         }
         haxe_Log::trace(Std::string($wData) . ":" . _hx_string_or_null($this->joinTable) . ":" . Std::string($filter_tables), _hx_anonymous(array("fileName" => "Model.hx", "lineNumber" => 386, "className" => "Model", "methodName" => "buildCond")));
         if (_hx_deref(new EReg("^pay_[a-zA-Z_]+\\.", ""))->match($wData[0]) && _hx_array_get(_hx_explode(".", $wData[0]), 0) !== $this->joinTable) {
             continue;
         }
         if ($first) {
             $sb->add(" WHERE ");
         } else {
             $sb->add(" AND ");
         }
         $first = false;
         $_g1 = strtoupper($wData[1]);
         switch ($_g1) {
             case "BETWEEN":
                 if (!($values->length === 2) && Lambda::hforeach($values, array(new _hx_lambda(array(&$_g, &$_g1, &$filter_tables, &$first, &$phValues, &$sb, &$sob, &$values, &$w, &$wData, &$where, &$whereParam), "Model_13"), 'execute'))) {
                     S::hexit("BETWEEN needs 2 values - got only:" . _hx_string_or_null($values->join(",")));
                 }
                 $sb->add($this->quoteField($wData[0]));
                 $sb->add(" BETWEEN ? AND ?");
                 $phValues->push(new _hx_array(array($wData[0], $values[0])));
                 $phValues->push(new _hx_array(array($wData[0], $values[1])));
                 break;
             case "IN":
                 $sb->add($this->quoteField($wData[0]));
                 $sb->add(" IN(");
                 $sb->add($values->map(array(new _hx_lambda(array(&$_g, &$_g1, &$filter_tables, &$first, &$phValues, &$sb, &$sob, &$values, &$w, &$wData, &$where, &$whereParam), "Model_14"), 'execute'))->join(","));
                 $sb->add(")");
                 break;
             case "LIKE":
                 $sb->add($this->quoteField($wData[0]));
                 $sb->add(" LIKE ?");
                 $phValues->push(new _hx_array(array($wData[0], $wData[2])));
                 break;
             default:
                 $sb->add($this->quoteField($wData[0]));
                 if (_hx_deref(new EReg("^(<|>)", ""))->match($wData[1])) {
                     $eR = new EReg("^(<|>)", "");
                     $eR->match($wData[1]);
                     $val = Std::parseFloat($eR->matchedRight());
                     $sb->add(_hx_string_or_null($eR->matched(0)) . "?");
                     $phValues->push(new _hx_array(array($wData[0], $val)));
                     continue 2;
                 }
                 if ($wData[1] === "NULL") {
                     $sb->add(" IS NULL");
                 } else {
                     $sb->add(" = ?");
                     $phValues->push(new _hx_array(array($wData[0], $wData[1])));
                 }
                 break;
         }
         unset($_g1);
         unset($wData, $w, $values, $filter_tables);
     }
     $sob->add($sb->b);
     return true;
 }
开发者ID:axelhuizinga,项目名称:gem,代码行数:78,代码来源:Model.class.php

示例3: checkOrCreateCustomTable

 public function checkOrCreateCustomTable($srcTable, $suffix = null)
 {
     if ($suffix === null) {
         $suffix = "log";
     }
     $newTable = S::$my->real_escape_string(_hx_string_or_null($srcTable) . "_" . _hx_string_or_null($suffix));
     $res = S::$my->query("SHOW TABLES LIKE  \"" . _hx_string_or_null($newTable) . "\"", null);
     if (Util::any2bool($res) && $res->num_rows === 0) {
         haxe_Log::trace("CREATE TABLE `" . _hx_string_or_null($newTable) . "` like `" . _hx_string_or_null($srcTable) . "`", _hx_anonymous(array("fileName" => "QC.hx", "lineNumber" => 254, "className" => "model.QC", "methodName" => "checkOrCreateCustomTable")));
         $res1 = S::$my->query("CREATE TABLE `" . _hx_string_or_null($newTable) . "` like `" . _hx_string_or_null($srcTable) . "`", null);
         if (S::$my->error === "") {
             $res1 = S::$my->query("ALTER TABLE " . _hx_string_or_null($newTable) . " DROP PRIMARY KEY, ADD `log_id` INT(9) NOT NULL  FIRST,  ADD  PRIMARY KEY (`log_id`)", null);
             if (S::$my->error !== "") {
                 S::hexit(S::$my->error);
             }
             return true;
         } else {
             S::hexit(S::$my->error);
         }
     } else {
         haxe_Log::trace("num_rows:" . _hx_string_rec($res->num_rows, ""), _hx_anonymous(array("fileName" => "QC.hx", "lineNumber" => 265, "className" => "model.QC", "methodName" => "checkOrCreateCustomTable")));
     }
     return true;
 }
开发者ID:axelhuizinga,项目名称:gem,代码行数:24,代码来源:QC.class.php


注:本文中的S::hexit方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。