@@ -1,13 +1,13 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * TActiveRecordGateway, TActiveRecordStatementType, TActiveRecordEventParameter classes file. |
|
| 4 | - * |
|
| 5 | - * @author Wei Zhuo <weizhuo[at]gmail[dot]com> |
|
| 6 | - * @link https://github.com/pradosoft/prado |
|
| 7 | - * @copyright Copyright © 2005-2016 The PRADO Group |
|
| 8 | - * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT |
|
| 9 | - * @package System.Data.ActiveRecord |
|
| 10 | - */ |
|
| 3 | + * TActiveRecordGateway, TActiveRecordStatementType, TActiveRecordEventParameter classes file. |
|
| 4 | + * |
|
| 5 | + * @author Wei Zhuo <weizhuo[at]gmail[dot]com> |
|
| 6 | + * @link https://github.com/pradosoft/prado |
|
| 7 | + * @copyright Copyright © 2005-2016 The PRADO Group |
|
| 8 | + * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT |
|
| 9 | + * @package System.Data.ActiveRecord |
|
| 10 | + */ |
|
| 11 | 11 | |
| 12 | 12 | /** |
| 13 | 13 | * TActiveRecordGateway excutes the SQL command queries and returns the data |
@@ -1,13 +1,13 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * TLazyLoadList, TObjectProxy classes file. |
|
| 4 | - * |
|
| 5 | - * @author Wei Zhuo <weizhuo[at]gmail[dot]com> |
|
| 6 | - * @link https://github.com/pradosoft/prado |
|
| 7 | - * @copyright Copyright © 2005-2016 The PRADO Group |
|
| 8 | - * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT |
|
| 9 | - * @package System.Data.SqlMap |
|
| 10 | - */ |
|
| 3 | + * TLazyLoadList, TObjectProxy classes file. |
|
| 4 | + * |
|
| 5 | + * @author Wei Zhuo <weizhuo[at]gmail[dot]com> |
|
| 6 | + * @link https://github.com/pradosoft/prado |
|
| 7 | + * @copyright Copyright © 2005-2016 The PRADO Group |
|
| 8 | + * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT |
|
| 9 | + * @package System.Data.SqlMap |
|
| 10 | + */ |
|
| 11 | 11 | |
| 12 | 12 | /** |
| 13 | 13 | * TLazyLoadList executes mapped statements when the proxy collection is first accessed. |
@@ -1,13 +1,13 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * TXCache class file |
|
| 4 | - * |
|
| 5 | - * @author Wei Zhuo <weizhuo[at]gmail[dot]com> |
|
| 6 | - * @link https://github.com/pradosoft/prado |
|
| 7 | - * @copyright Copyright © 2005-2016 The PRADO Group |
|
| 8 | - * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT |
|
| 9 | - * @package System.Caching |
|
| 10 | - */ |
|
| 3 | + * TXCache class file |
|
| 4 | + * |
|
| 5 | + * @author Wei Zhuo <weizhuo[at]gmail[dot]com> |
|
| 6 | + * @link https://github.com/pradosoft/prado |
|
| 7 | + * @copyright Copyright © 2005-2016 The PRADO Group |
|
| 8 | + * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT |
|
| 9 | + * @package System.Caching |
|
| 10 | + */ |
|
| 11 | 11 | |
| 12 | 12 | /** |
| 13 | 13 | * TXCache class |
@@ -1,13 +1,12 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * TDateTimeStamp class file. |
|
| 4 | - |
|
| 5 | - * @author Fabio Bas ctrlaltca[AT]gmail[DOT]com |
|
| 6 | - * @link https://github.com/pradosoft/prado |
|
| 7 | - * @copyright Copyright © 2005-2016 The PRADO Group |
|
| 8 | - * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT |
|
| 9 | - * @package System.Util |
|
| 10 | - */ |
|
| 3 | + * TDateTimeStamp class file. |
|
| 4 | + * @author Fabio Bas ctrlaltca[AT]gmail[DOT]com |
|
| 5 | + * @link https://github.com/pradosoft/prado |
|
| 6 | + * @copyright Copyright © 2005-2016 The PRADO Group |
|
| 7 | + * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT |
|
| 8 | + * @package System.Util |
|
| 9 | + */ |
|
| 11 | 10 | |
| 12 | 11 | /** |
| 13 | 12 | * TDateTimeStamp Class |
@@ -186,7 +185,7 @@ discard block |
||
| 186 | 185 | |
| 187 | 186 | /** |
| 188 | 187 | * @return integer|float a timestamp given a local time |
| 189 | - */ |
|
| 188 | + */ |
|
| 190 | 189 | function getTimeStamp($hr,$min,$sec,$mon=false,$day=false,$year=false,$is_gmt=false) |
| 191 | 190 | { |
| 192 | 191 | $dt = new DateTime(); |
@@ -29,82 +29,82 @@ |
||
| 29 | 29 | |
| 30 | 30 | class TReCaptcha2Validator extends TBaseValidator |
| 31 | 31 | { |
| 32 | - protected $_isvalid = null; |
|
| 32 | + protected $_isvalid = null; |
|
| 33 | 33 | |
| 34 | - protected function getClientClassName() |
|
| 35 | - { |
|
| 36 | - return 'Prado.WebUI.TReCaptcha2Validator'; |
|
| 37 | - } |
|
| 38 | - public function getEnableClientScript() |
|
| 39 | - { |
|
| 40 | - return true; |
|
| 41 | - } |
|
| 42 | - protected function getCaptchaControl() |
|
| 43 | - { |
|
| 44 | - $control = $this->getValidationTarget(); |
|
| 45 | - if (!$control) |
|
| 46 | - throw new Exception('No target control specified for TReCaptcha2Validator'); |
|
| 47 | - if (!($control instanceof TReCaptcha2)) |
|
| 48 | - throw new Exception('TReCaptcha2Validator only works with TReCaptcha2 controls'); |
|
| 49 | - return $control; |
|
| 50 | - } |
|
| 51 | - public function getClientScriptOptions() |
|
| 52 | - { |
|
| 53 | - $options = parent::getClientScriptOptions(); |
|
| 54 | - $options['ResponseFieldName'] = $this->getCaptchaControl()->getResponseFieldName(); |
|
| 55 | - return $options; |
|
| 56 | - } |
|
| 57 | - /** |
|
| 58 | - * This method overrides the parent's implementation. |
|
| 59 | - * The validation succeeds if the input control has the same value |
|
| 60 | - * as the one displayed in the corresponding RECAPTCHA control. |
|
| 61 | - * |
|
| 62 | - * @return boolean whether the validation succeeds |
|
| 63 | - */ |
|
| 64 | - protected function evaluateIsValid() |
|
| 65 | - { |
|
| 66 | - // check validity only once (if trying to evaulate multiple times, all redundant checks would fail) |
|
| 67 | - if (is_null($this->_isvalid)) |
|
| 68 | - { |
|
| 69 | - $control = $this->getCaptchaControl(); |
|
| 70 | - $this->_isvalid = $control->validate(); |
|
| 71 | - } |
|
| 72 | - return ($this->_isvalid==true); |
|
| 73 | - } |
|
| 74 | - public function onPreRender($param) |
|
| 75 | - { |
|
| 76 | - parent::onPreRender($param); |
|
| 34 | + protected function getClientClassName() |
|
| 35 | + { |
|
| 36 | + return 'Prado.WebUI.TReCaptcha2Validator'; |
|
| 37 | + } |
|
| 38 | + public function getEnableClientScript() |
|
| 39 | + { |
|
| 40 | + return true; |
|
| 41 | + } |
|
| 42 | + protected function getCaptchaControl() |
|
| 43 | + { |
|
| 44 | + $control = $this->getValidationTarget(); |
|
| 45 | + if (!$control) |
|
| 46 | + throw new Exception('No target control specified for TReCaptcha2Validator'); |
|
| 47 | + if (!($control instanceof TReCaptcha2)) |
|
| 48 | + throw new Exception('TReCaptcha2Validator only works with TReCaptcha2 controls'); |
|
| 49 | + return $control; |
|
| 50 | + } |
|
| 51 | + public function getClientScriptOptions() |
|
| 52 | + { |
|
| 53 | + $options = parent::getClientScriptOptions(); |
|
| 54 | + $options['ResponseFieldName'] = $this->getCaptchaControl()->getResponseFieldName(); |
|
| 55 | + return $options; |
|
| 56 | + } |
|
| 57 | + /** |
|
| 58 | + * This method overrides the parent's implementation. |
|
| 59 | + * The validation succeeds if the input control has the same value |
|
| 60 | + * as the one displayed in the corresponding RECAPTCHA control. |
|
| 61 | + * |
|
| 62 | + * @return boolean whether the validation succeeds |
|
| 63 | + */ |
|
| 64 | + protected function evaluateIsValid() |
|
| 65 | + { |
|
| 66 | + // check validity only once (if trying to evaulate multiple times, all redundant checks would fail) |
|
| 67 | + if (is_null($this->_isvalid)) |
|
| 68 | + { |
|
| 69 | + $control = $this->getCaptchaControl(); |
|
| 70 | + $this->_isvalid = $control->validate(); |
|
| 71 | + } |
|
| 72 | + return ($this->_isvalid==true); |
|
| 73 | + } |
|
| 74 | + public function onPreRender($param) |
|
| 75 | + { |
|
| 76 | + parent::onPreRender($param); |
|
| 77 | 77 | |
| 78 | - $cs = $this->Page->getClientScript(); |
|
| 79 | - $cs->registerPradoScript('validator'); |
|
| 78 | + $cs = $this->Page->getClientScript(); |
|
| 79 | + $cs->registerPradoScript('validator'); |
|
| 80 | 80 | |
| 81 | - // communicate validation status to the client side |
|
| 82 | - $value = $this->_isvalid===false ? '0' : '1'; |
|
| 83 | - $cs->registerHiddenField($this->getClientID().'_1',$value); |
|
| 81 | + // communicate validation status to the client side |
|
| 82 | + $value = $this->_isvalid===false ? '0' : '1'; |
|
| 83 | + $cs->registerHiddenField($this->getClientID().'_1',$value); |
|
| 84 | 84 | |
| 85 | - // update validator display |
|
| 86 | - if ($control = $this->getValidationTarget()) |
|
| 87 | - { |
|
| 88 | - $fn = 'captchaUpdateValidatorStatus_'.$this->getClientID(); |
|
| 85 | + // update validator display |
|
| 86 | + if ($control = $this->getValidationTarget()) |
|
| 87 | + { |
|
| 88 | + $fn = 'captchaUpdateValidatorStatus_'.$this->getClientID(); |
|
| 89 | 89 | |
| 90 | - $cs->registerEndScript($this->getClientID().'::validate', implode(' ',array( |
|
| 91 | - // this function will be used to update the validator |
|
| 92 | - 'function '.$fn.'(valid)', |
|
| 93 | - '{', |
|
| 94 | - ' jQuery('.TJavaScript::quoteString('#'.$this->getClientID().'_1').').val(valid);', |
|
| 95 | - ' Prado.Validation.validateControl('.TJavaScript::quoteString($control->ClientID).'); ', |
|
| 96 | - '}', |
|
| 97 | - '', |
|
| 98 | - // update the validator to the result if we're in a callback |
|
| 99 | - // (if we're in initial rendering or a postback then the result will be rendered directly to the page html anyway) |
|
| 100 | - $this->Page->IsCallback ? $fn.'('.$value.');' : '', |
|
| 101 | - '', |
|
| 102 | - // install event handler that clears the validation error when user changes the captcha response field |
|
| 103 | - 'jQuery("#'.$control->getClientID().'").on("change", '.TJavaScript::quoteString('#'.$control->getResponseFieldName()).', function() { ', |
|
| 104 | - $fn.'("1");', |
|
| 105 | - '});', |
|
| 106 | - ))); |
|
| 107 | - } |
|
| 108 | - } |
|
| 90 | + $cs->registerEndScript($this->getClientID().'::validate', implode(' ',array( |
|
| 91 | + // this function will be used to update the validator |
|
| 92 | + 'function '.$fn.'(valid)', |
|
| 93 | + '{', |
|
| 94 | + ' jQuery('.TJavaScript::quoteString('#'.$this->getClientID().'_1').').val(valid);', |
|
| 95 | + ' Prado.Validation.validateControl('.TJavaScript::quoteString($control->ClientID).'); ', |
|
| 96 | + '}', |
|
| 97 | + '', |
|
| 98 | + // update the validator to the result if we're in a callback |
|
| 99 | + // (if we're in initial rendering or a postback then the result will be rendered directly to the page html anyway) |
|
| 100 | + $this->Page->IsCallback ? $fn.'('.$value.');' : '', |
|
| 101 | + '', |
|
| 102 | + // install event handler that clears the validation error when user changes the captcha response field |
|
| 103 | + 'jQuery("#'.$control->getClientID().'").on("change", '.TJavaScript::quoteString('#'.$control->getResponseFieldName()).', function() { ', |
|
| 104 | + $fn.'("1");', |
|
| 105 | + '});', |
|
| 106 | + ))); |
|
| 107 | + } |
|
| 108 | + } |
|
| 109 | 109 | } |
| 110 | 110 | |
@@ -1,13 +1,13 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * THead class file |
|
| 4 | - * |
|
| 5 | - * @author Marcus Nyeholt <[email protected]> and Qiang Xue <[email protected]> |
|
| 6 | - * @link https://github.com/pradosoft/prado |
|
| 7 | - * @copyright Copyright © 2005-2016 The PRADO Group |
|
| 8 | - * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT |
|
| 9 | - * @package System.Web.UI |
|
| 10 | - */ |
|
| 3 | + * THead class file |
|
| 4 | + * |
|
| 5 | + * @author Marcus Nyeholt <[email protected]> and Qiang Xue <[email protected]> |
|
| 6 | + * @link https://github.com/pradosoft/prado |
|
| 7 | + * @copyright Copyright © 2005-2016 The PRADO Group |
|
| 8 | + * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT |
|
| 9 | + * @package System.Web.UI |
|
| 10 | + */ |
|
| 11 | 11 | |
| 12 | 12 | /** |
| 13 | 13 | * THead class |
@@ -1,13 +1,13 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * TListItem class file |
|
| 4 | - * |
|
| 5 | - * @author Qiang Xue <[email protected]> |
|
| 6 | - * @link https://github.com/pradosoft/prado |
|
| 7 | - * @copyright Copyright © 2005-2016 The PRADO Group |
|
| 8 | - * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT |
|
| 9 | - * @package System.Web.UI.WebControls |
|
| 10 | - */ |
|
| 3 | + * TListItem class file |
|
| 4 | + * |
|
| 5 | + * @author Qiang Xue <[email protected]> |
|
| 6 | + * @link https://github.com/pradosoft/prado |
|
| 7 | + * @copyright Copyright © 2005-2016 The PRADO Group |
|
| 8 | + * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT |
|
| 9 | + * @package System.Web.UI.WebControls |
|
| 10 | + */ |
|
| 11 | 11 | |
| 12 | 12 | /** |
| 13 | 13 | * TListItem class. |
@@ -1,13 +1,13 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * TActivePager class file. |
|
| 4 | - * |
|
| 5 | - * @author "gevik" (forum contributor) and Christophe Boulain ([email protected]) |
|
| 6 | - * @link https://github.com/pradosoft/prado |
|
| 7 | - * @copyright Copyright © 2005-2016 The PRADO Group |
|
| 8 | - * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT |
|
| 9 | - * @package System.Web.UI.ActiveControls |
|
| 10 | - */ |
|
| 3 | + * TActivePager class file. |
|
| 4 | + * |
|
| 5 | + * @author "gevik" (forum contributor) and Christophe Boulain ([email protected]) |
|
| 6 | + * @link https://github.com/pradosoft/prado |
|
| 7 | + * @copyright Copyright © 2005-2016 The PRADO Group |
|
| 8 | + * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT |
|
| 9 | + * @package System.Web.UI.ActiveControls |
|
| 10 | + */ |
|
| 11 | 11 | |
| 12 | 12 | /** |
| 13 | 13 | * Load active control adapter. |
@@ -1,13 +1,13 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * TActiveCheckBox class file. |
|
| 4 | - * |
|
| 5 | - * @author Wei Zhuo <weizhuo[at]gamil[dot]com> |
|
| 6 | - * @link https://github.com/pradosoft/prado |
|
| 7 | - * @copyright Copyright © 2005-2016 The PRADO Group |
|
| 8 | - * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT |
|
| 9 | - * @package System.Web.UI.ActiveControls |
|
| 10 | - */ |
|
| 3 | + * TActiveCheckBox class file. |
|
| 4 | + * |
|
| 5 | + * @author Wei Zhuo <weizhuo[at]gamil[dot]com> |
|
| 6 | + * @link https://github.com/pradosoft/prado |
|
| 7 | + * @copyright Copyright © 2005-2016 The PRADO Group |
|
| 8 | + * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT |
|
| 9 | + * @package System.Web.UI.ActiveControls |
|
| 10 | + */ |
|
| 11 | 11 | |
| 12 | 12 | /** |
| 13 | 13 | * Load active control adapter. |