Linux polon 4.19.0-27-amd64 #1 SMP Debian 4.19.316-1 (2024-06-25) x86_64
Apache/2.4.59 (Debian)
: 10.2.73.233 | : 3.145.88.111
Cant Read [ /etc/named.conf ]
5.6.40-64+0~20230107.71+debian10~1.gbp673146
www-data
www.github.com/MadExploits
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
CREATE RDP
PHP Mailer
BACKCONNECT
UNLOCK SHELL
HASH IDENTIFIER
CPANEL RESET
CREATE WP USER
README
+ Create Folder
+ Create File
/
home /
ifk /
web /
prado4.3.2 /
Web /
UI /
WebControls /
[ HOME SHELL ]
Name
Size
Permission
Action
assets
[ DIR ]
drwxr-xr-x
IDataSource.php
507
B
-rw-r--r--
IItemDataRenderer.php
1.34
KB
-rw-r--r--
IListControlAdapter.php
1.22
KB
-rw-r--r--
IRepeatInfoUser.php
1.55
KB
-rw-r--r--
IStyleable.php
774
B
-rw-r--r--
TAccordion.php
16.08
KB
-rw-r--r--
TAccordionView.php
4.45
KB
-rw-r--r--
TAccordionViewCollection.php
1.57
KB
-rw-r--r--
TBaseDataList.php
5.45
KB
-rw-r--r--
TBaseValidator.php
19.79
KB
-rw-r--r--
TBoundColumn.php
7.11
KB
-rw-r--r--
TBulletStyle.php
913
B
-rw-r--r--
TBulletedList.php
12.14
KB
-rw-r--r--
TBulletedListDisplayMode.php
917
B
-rw-r--r--
TBulletedListEventParameter.ph...
993
B
-rw-r--r--
TButton.php
11.42
KB
-rw-r--r--
TButtonColumn.php
8.5
KB
-rw-r--r--
TButtonColumnType.php
791
B
-rw-r--r--
TButtonTag.php
705
B
-rw-r--r--
TButtonType.php
756
B
-rw-r--r--
TCaptcha.php
16.31
KB
-rw-r--r--
TCaptchaValidator.php
4
KB
-rw-r--r--
TCheckBox.php
15.02
KB
-rw-r--r--
TCheckBoxColumn.php
3.68
KB
-rw-r--r--
TCheckBoxItem.php
520
B
-rw-r--r--
TCheckBoxList.php
14.43
KB
-rw-r--r--
TCircleHotSpot.php
1.84
KB
-rw-r--r--
TClientScript.php
4.41
KB
-rw-r--r--
TClientSideValidationSummaryOp...
2.38
KB
-rw-r--r--
TColorPicker.php
6.83
KB
-rw-r--r--
TColorPickerClientSide.php
847
B
-rw-r--r--
TColorPickerMode.php
815
B
-rw-r--r--
TCompareValidator.php
7.5
KB
-rw-r--r--
TCompleteWizardStep.php
960
B
-rw-r--r--
TConditional.php
4.33
KB
-rw-r--r--
TContent.php
1.67
KB
-rw-r--r--
TContentDirection.php
811
B
-rw-r--r--
TContentPlaceHolder.php
1.73
KB
-rw-r--r--
TCustomValidator.php
4.46
KB
-rw-r--r--
TDataBoundControl.php
15.37
KB
-rw-r--r--
TDataGrid.php
48.32
KB
-rw-r--r--
TDataGridColumn.php
17.06
KB
-rw-r--r--
TDataGridColumnCollection.php
1.83
KB
-rw-r--r--
TDataGridCommandEventParameter...
2.06
KB
-rw-r--r--
TDataGridItem.php
3.62
KB
-rw-r--r--
TDataGridItemCollection.php
1.34
KB
-rw-r--r--
TDataGridItemEventParameter.ph...
1.4
KB
-rw-r--r--
TDataGridItemRenderer.php
539
B
-rw-r--r--
TDataGridPageChangedEventParam...
1.84
KB
-rw-r--r--
TDataGridPager.php
1.75
KB
-rw-r--r--
TDataGridPagerButtonType.php
1022
B
-rw-r--r--
TDataGridPagerEventParameter.p...
1.42
KB
-rw-r--r--
TDataGridPagerMode.php
1.04
KB
-rw-r--r--
TDataGridPagerPosition.php
1.16
KB
-rw-r--r--
TDataGridPagerStyle.php
7.44
KB
-rw-r--r--
TDataGridSortCommandEventParam...
1.93
KB
-rw-r--r--
TDataList.php
46.45
KB
-rw-r--r--
TDataListCommandEventParameter...
1.81
KB
-rw-r--r--
TDataListItem.php
3.29
KB
-rw-r--r--
TDataListItemCollection.php
1.06
KB
-rw-r--r--
TDataListItemEventParameter.ph...
1.16
KB
-rw-r--r--
TDataListItemRenderer.php
4.6
KB
-rw-r--r--
TDataRenderer.php
1.11
KB
-rw-r--r--
TDataSize.php
4.22
KB
-rw-r--r--
TDataSourceControl.php
1.36
KB
-rw-r--r--
TDataSourceSelectParameters.ph...
1.51
KB
-rw-r--r--
TDataSourceView.php
2.23
KB
-rw-r--r--
TDataTypeValidator.php
3.89
KB
-rw-r--r--
TDatePicker.php
26.21
KB
-rw-r--r--
TDatePickerClientScript.php
1.22
KB
-rw-r--r--
TDatePickerInputMode.php
746
B
-rw-r--r--
TDatePickerMode.php
1.08
KB
-rw-r--r--
TDatePickerPositionMode.php
766
B
-rw-r--r--
TDisplayStyle.php
994
B
-rw-r--r--
TDropDownList.php
4.58
KB
-rw-r--r--
TDropDownListColumn.php
10.06
KB
-rw-r--r--
TEditCommandColumn.php
7.97
KB
-rw-r--r--
TEmailAddressValidator.php
2.68
KB
-rw-r--r--
TExpression.php
1.42
KB
-rw-r--r--
TFileUpload.php
11.86
KB
-rw-r--r--
TFileUploadItem.php
4.03
KB
-rw-r--r--
TFlushOutput.php
2.25
KB
-rw-r--r--
TFont.php
8.93
KB
-rw-r--r--
TGravatar.php
4.65
KB
-rw-r--r--
THead.php
5
KB
-rw-r--r--
THeader1.php
675
B
-rw-r--r--
THeader2.php
675
B
-rw-r--r--
THeader3.php
675
B
-rw-r--r--
THeader4.php
674
B
-rw-r--r--
THeader5.php
674
B
-rw-r--r--
THeader6.php
674
B
-rw-r--r--
THiddenField.php
5.82
KB
-rw-r--r--
THorizontalAlign.php
921
B
-rw-r--r--
THotSpot.php
8.73
KB
-rw-r--r--
THotSpotCollection.php
1.02
KB
-rw-r--r--
THotSpotMode.php
901
B
-rw-r--r--
THtmlArea.php
12.41
KB
-rw-r--r--
THtmlArea5.php
11.53
KB
-rw-r--r--
THtmlElement.php
1.62
KB
-rw-r--r--
THyperLink.php
7.41
KB
-rw-r--r--
THyperLinkColumn.php
7.61
KB
-rw-r--r--
TImage.php
4.29
KB
-rw-r--r--
TImageButton.php
11.67
KB
-rw-r--r--
TImageClickEventParameter.php
1.52
KB
-rw-r--r--
TImageMap.php
6.86
KB
-rw-r--r--
TImageMapEventParameter.php
1.06
KB
-rw-r--r--
TInlineFrame.php
7.89
KB
-rw-r--r--
TInlineFrameAlign.php
1018
B
-rw-r--r--
TInlineFrameScrollBars.php
917
B
-rw-r--r--
TItemDataRenderer.php
2.17
KB
-rw-r--r--
TJavascriptLogger.php
2.8
KB
-rw-r--r--
TKeyboard.php
5.92
KB
-rw-r--r--
TLabel.php
3.95
KB
-rw-r--r--
TLinkButton.php
10.45
KB
-rw-r--r--
TListBox.php
6.57
KB
-rw-r--r--
TListControl.php
24.23
KB
-rw-r--r--
TListControlValidator.php
5.84
KB
-rw-r--r--
TListItem.php
4.93
KB
-rw-r--r--
TListItemType.php
1.11
KB
-rw-r--r--
TListSelectionMode.php
684
B
-rw-r--r--
TLiteral.php
2.82
KB
-rw-r--r--
TLiteralColumn.php
4.08
KB
-rw-r--r--
TMarkdown.php
1.99
KB
-rw-r--r--
TMetaTag.php
3.53
KB
-rw-r--r--
TMetaTagCollection.php
1.83
KB
-rw-r--r--
TMultiView.php
8.34
KB
-rw-r--r--
TOutputCache.php
15.99
KB
-rw-r--r--
TOutputCacheCalculateKeyEventP...
1.04
KB
-rw-r--r--
TOutputCacheCheckDependencyEve...
1.38
KB
-rw-r--r--
TOutputCacheTextWriterMulti.ph...
975
B
-rw-r--r--
TPageLoadTime.php
1.31
KB
-rw-r--r--
TPager.php
21.73
KB
-rw-r--r--
TPagerButtonType.php
714
B
-rw-r--r--
TPagerMode.php
838
B
-rw-r--r--
TPagerPageChangedEventParamete...
1.54
KB
-rw-r--r--
TPanel.php
6.39
KB
-rw-r--r--
TPanelStyle.php
8.09
KB
-rw-r--r--
TPlaceHolder.php
616
B
-rw-r--r--
TPolygonHotSpot.php
1.11
KB
-rw-r--r--
TRadioButton.php
9.39
KB
-rw-r--r--
TRadioButtonItem.php
533
B
-rw-r--r--
TRadioButtonList.php
2.29
KB
-rw-r--r--
TRangeValidationDataType.php
696
B
-rw-r--r--
TRangeValidator.php
9.76
KB
-rw-r--r--
TRatingList.php
8.75
KB
-rw-r--r--
TReCaptcha.php
11.79
KB
-rw-r--r--
TReCaptcha2.php
10.95
KB
-rw-r--r--
TReCaptcha2Validator.php
3.43
KB
-rw-r--r--
TReCaptchaValidator.php
4.19
KB
-rw-r--r--
TReadOnlyDataSource.php
1.1
KB
-rw-r--r--
TReadOnlyDataSourceView.php
1.01
KB
-rw-r--r--
TRectangleHotSpot.php
2.36
KB
-rw-r--r--
TRegularExpressionValidator.ph...
4.16
KB
-rw-r--r--
TRepeatDirection.php
681
B
-rw-r--r--
TRepeatInfo.php
13.51
KB
-rw-r--r--
TRepeatLayout.php
872
B
-rw-r--r--
TRepeater.php
23.8
KB
-rw-r--r--
TRepeaterCommandEventParameter...
1.81
KB
-rw-r--r--
TRepeaterItem.php
2.83
KB
-rw-r--r--
TRepeaterItemCollection.php
1.07
KB
-rw-r--r--
TRepeaterItemEventParameter.ph...
1.13
KB
-rw-r--r--
TRepeaterItemRenderer.php
1.24
KB
-rw-r--r--
TRequiredFieldValidator.php
4.56
KB
-rw-r--r--
TSafeHtml.php
2.07
KB
-rw-r--r--
TScrollBars.php
953
B
-rw-r--r--
TServerValidateEventParameter....
1.37
KB
-rw-r--r--
TSlider.php
14.93
KB
-rw-r--r--
TSliderClientScript.php
1.78
KB
-rw-r--r--
TSliderDirection.php
749
B
-rw-r--r--
TStatements.php
1.44
KB
-rw-r--r--
TStyle.php
9.84
KB
-rw-r--r--
TStyleSheet.php
3.62
KB
-rw-r--r--
TTabPanel.php
14.67
KB
-rw-r--r--
TTabView.php
4.83
KB
-rw-r--r--
TTabViewCollection.php
1.55
KB
-rw-r--r--
TTable.php
9.63
KB
-rw-r--r--
TTableCaptionAlign.php
862
B
-rw-r--r--
TTableCell.php
5.77
KB
-rw-r--r--
TTableCellCollection.php
1.1
KB
-rw-r--r--
TTableFooterRow.php
882
B
-rw-r--r--
TTableGridLines.php
902
B
-rw-r--r--
TTableHeaderCell.php
2.4
KB
-rw-r--r--
TTableHeaderRow.php
882
B
-rw-r--r--
TTableHeaderScope.php
766
B
-rw-r--r--
TTableItemStyle.php
5.5
KB
-rw-r--r--
TTableRow.php
3.8
KB
-rw-r--r--
TTableRowCollection.php
1.08
KB
-rw-r--r--
TTableRowSection.php
761
B
-rw-r--r--
TTableStyle.php
8.84
KB
-rw-r--r--
TTemplateColumn.php
7.93
KB
-rw-r--r--
TTemplatedWizardStep.php
2.93
KB
-rw-r--r--
TTextAlign.php
608
B
-rw-r--r--
TTextBox.php
19.32
KB
-rw-r--r--
TTextBoxAutoCompleteType.php
1.87
KB
-rw-r--r--
TTextBoxMode.php
2.3
KB
-rw-r--r--
TTextHighlighter.php
6.53
KB
-rw-r--r--
TTextProcessor.php
2.28
KB
-rw-r--r--
TValidationCompareOperator.php
959
B
-rw-r--r--
TValidationDataType.php
749
B
-rw-r--r--
TValidationSummary.php
11.78
KB
-rw-r--r--
TValidationSummaryDisplayMode....
1.09
KB
-rw-r--r--
TValidationSummaryDisplayStyle...
1017
B
-rw-r--r--
TValidatorClientSide.php
2.96
KB
-rw-r--r--
TValidatorDisplayStyle.php
951
B
-rw-r--r--
TVerticalAlign.php
836
B
-rw-r--r--
TView.php
2.23
KB
-rw-r--r--
TViewCollection.php
1.09
KB
-rw-r--r--
TWebControl.php
12.65
KB
-rw-r--r--
TWebControlAdapter.php
1.98
KB
-rw-r--r--
TWebControlDecorator.php
10.94
KB
-rw-r--r--
TWizard.php
41.24
KB
-rw-r--r--
TWizardFinishNavigationTemplat...
1.49
KB
-rw-r--r--
TWizardNavigationButtonStyle.p...
3.89
KB
-rw-r--r--
TWizardNavigationButtonType.ph...
825
B
-rw-r--r--
TWizardNavigationContainer.php
1.85
KB
-rw-r--r--
TWizardNavigationEventParamete...
2.15
KB
-rw-r--r--
TWizardNavigationTemplate.php
2.29
KB
-rw-r--r--
TWizardSideBarListItemTemplate...
907
B
-rw-r--r--
TWizardSideBarTemplate.php
1003
B
-rw-r--r--
TWizardStartNavigationTemplate...
1.21
KB
-rw-r--r--
TWizardStep.php
2.34
KB
-rw-r--r--
TWizardStepCollection.php
1.79
KB
-rw-r--r--
TWizardStepNavigationTemplate....
1.45
KB
-rw-r--r--
TWizardStepType.php
1.01
KB
-rw-r--r--
TXmlTransform.php
5.76
KB
-rw-r--r--
Delete
Unzip
Zip
${this.title}
Close
Code Editor : TSlider.php
<?php /** * TSlider class file. * * @author Christophe Boulain <Christophe.Boulain@gmail.com> * @link https://github.com/pradosoft/prado * @license https://github.com/pradosoft/prado/blob/master/LICENSE * @since 3.1.1 */ namespace Prado\Web\UI\WebControls; use Prado\TPropertyValue; /** * TSlider class * * TSlider displays a slider for numeric input purpose. A slider consists of a 'track', * which define the range of possible value, and a 'handle' which can slide on the track, to select * a value in the range. The track can be either Horizontal or Vertical, depending of the {@link SetDirection Direction} * property. By default, it's horizontal. * * The range boundaries are defined by {@link SetMinValue MinValue} and {@link SetMaxValue MaxValue} properties. * The default range is from 0 to 100. * The {@link SetStepSize StepSize} property can be used to define the <b>step</b> between 2 values inside the range. * Notice that this step will be recomputed if there is more than 200 values between the range boundaries. * You can also provide the allowed values by setting the {@link SetValues Values} array. * * A 'Progress Indicator' can be displayed within the track with the {@link SetProgressIndicator ProgressIndicator} property. * * The TSlider control can be easily customized using CssClasses. You can provide your own css file, using the * {@link SetCssUrl CssUrl} property. * The css class for TSlider can be set by the {@link setCssClass CssClass} property. Default value is "Slider HorizontalSlider" * for an horizontal slider, and "Slider VerticalSlider" for a vertical one. * * If {@link SetAutoPostBack AutoPostBack} property is true, postback is sent as soon as the value changed. * * TSlider raises the {@link onValueChanged} event when the value of the slider has changed during postback. * * You can also attach ClientSide javascript events handler to the slider : * - ClientSide.onSlide is called when the handle is slided on the track. You can get the current value in the <b>value</b> * javascript variable. You can use this event to update on client side a label with the current value * - ClientSide.onChange is called when the slider value has changed (at the end of a move). * * @author Christophe Boulain <Christophe.Boulain@gmail.com> * @since 3.1.1 */ class TSlider extends \Prado\Web\UI\WebControls\TWebControl implements \Prado\Web\UI\IPostBackDataHandler, \Prado\IDataRenderer { public const MAX_STEPS = 200; /* * @var boolean Wether the data has changed during postback */ private $_dataChanged = false; /** * @var TSliderClientScript Clients side javascripts */ private $_clientScript; /** * @return TSliderDirection Direction of slider (Horizontal or Vertical). Defaults to Horizontal. */ public function getDirection() { return $this->getViewState('Direction', TSliderDirection::Horizontal); } /** * @param TSliderDirection $value Direction of slider (Horizontal or Vertical) */ public function setDirection($value) { $this->setViewState('Direction', TPropertyValue::ensureEnum($value, 'Prado\\Web\\UI\\WebControls\\TSliderDirection'), TSliderDirection::Horizontal); } /** * @return string URL for the CSS file including all relevant CSS class definitions. Defaults to '' (a default CSS file will be applied in this case.) */ public function getCssUrl() { return $this->getViewState('CssUrl', ''); } /** * @param string $value URL for the CSS file including all relevant CSS class definitions. */ public function setCssUrl($value) { $this->setViewState('CssUrl', TPropertyValue::ensureString($value), ''); } /** * @return float Maximum value for the slider. Defaults to 100.0. */ public function getMaxValue() { return $this->getViewState('MaxValue', 100.0); } /** * @param float $value Maximum value for slider */ public function setMaxValue($value) { $this->setViewState('MaxValue', TPropertyValue::ensureFloat($value), 100.0); } /** * @return float Minimum value for slider. Defaults to 0.0. */ public function getMinValue() { return $this->getViewState('MinValue', 0.0); } /** * @param float $value Minimum value for slider */ public function setMinValue($value) { $this->setViewState('MinValue', TPropertyValue::ensureFloat($value), 0.0); } /** * @return float Step size. Defaults to 1.0. */ public function getStepSize() { return $this->getViewState('StepSize', 1.0); } /** * Sets the step size used to determine the places where the slider handle can stop at. * An evenly distributed stop marks will be generated according to * {@link getMinValue MinValue}, {@link getMaxValue MaxValue} and StepSize. * To use uneven stop marks, set {@link setValues Values}. * @param float $value Step size. */ public function setStepSize($value) { $this->setViewState('StepSize', $value, 1.0); } /** * @return bool wether to display a progress indicator or not. Defaults to true. */ public function getProgressIndicator() { return $this->getViewState('ProgressIndicator', true); } /** * @param bool $value wether to display a progress indicator or not. Defaults to true. */ public function setProgressIndicator($value) { $this->setViewState('ProgressIndicator', TPropertyValue::ensureBoolean($value), true); } /** * @return float current value of slider */ public function getValue() { return $this->getViewState('Value', 0.0); } /** * @param float $value current value of slider */ public function setValue($value) { $this->setViewState('Value', TPropertyValue::ensureFloat($value), 0.0); } /** * Returns the value of the TSlider control. * This method is required by {@link \Prado\IDataRenderer}. * It is the same as {@link getValue()}. * @return float the value of the TSlider control. * @see getValue */ public function getData() { return $this->getValue(); } /** * Sets the value of the TSlider control. * This method is required by {@link \Prado\IDataRenderer}. * It is the same as {@link setValue()}. * @param string $value the value of the TSlider control. * @see setValue */ public function setData($value) { $this->setValue($value); } /** * @return array list of allowed values the slider can take. Defaults to an empty array. */ public function getValues() { return $this->getViewState('Values', []); } /** * Sets the possible values that the slider can take. * If this is set, {@link setStepSize StepSize} will be ignored. The latter * generates a set of evenly distributed candidate values. * @param array $value list of allowed values the slider can take */ public function setValues($value) { $this->setViewState('Values', TPropertyValue::ensureArray($value), []); } /** * @return bool a value indicating whether an automatic postback to the server * will occur whenever the user modifies the slider value. Defaults to false. */ public function getAutoPostBack() { return $this->getViewState('AutoPostBack', false); } /** * Sets the value indicating if postback automatically. * An automatic postback to the server will occur whenever the user * modifies the slider value. * @param bool $value the value indicating if postback automatically */ public function setAutoPostBack($value) { $this->setViewState('AutoPostBack', TPropertyValue::ensureBoolean($value), false); } /** * Gets the name of the javascript class responsible for performing postback for this control. * This method overrides the parent implementation. * @return string the javascript class name */ protected function getClientClassName() { return 'Prado.WebUI.TSlider'; } /** * Returns a value indicating whether postback has caused the control data change. * This method is required by the \Prado\Web\UI\IPostBackDataHandler interface. * @return bool whether postback has caused the control data change. False if the page is not in postback mode. */ public function getDataChanged() { return $this->_dataChanged; } /** * Raises postdata changed event. * This method is required by {@link \Prado\Web\UI\IPostBackDataHandler} interface. * It is invoked by the framework when {@link getValue Value} property * is changed on postback. * This method is primarly used by framework developers. */ public function raisePostDataChangedEvent() { $this->onValueChanged(null); } /** * Raises <b>OnValueChanged</b> event. * This method is invoked when the {@link getValue Value} * property changes on postback. * If you override this method, be sure to call the parent implementation to ensure * the invocation of the attached event handlers. * @param \Prado\TEventParameter $param event parameter to be passed to the event handlers */ public function onValueChanged($param) { $this->raiseEvent('OnValueChanged', $this, $param); } /** * Loads user input data. * This method is primarly used by framework developers. * @param string $key the key that can be used to retrieve data from the input data collection * @param array $values the input data collection * @return bool whether the data of the component has been changed */ public function loadPostData($key, $values) { $value = (float) $values[$this->getClientID() . '_1']; if ($this->getValue() !== $value) { $this->setValue($value); return $this->_dataChanged = true; } else { return false; } } /** * Gets the TSliderClientScript to set the TSlider event handlers. * * The slider on the client-side supports the following events. * # <tt>OnSliderMove</tt> -- raised when the slider is moved. * # <tt>OnSliderChanged</tt> -- raised when the slider value is changed * * You can attach custom javascript code to each of these events * * @return TSliderClientScript javascript validator event options. */ public function getClientSide() { if ($this->_clientScript === null) { $this->_clientScript = $this->createClientScript(); } return $this->_clientScript; } /** * @return TSliderClientScript javascript event options. */ protected function createClientScript() { return new TSliderClientScript(); } /** * @return string the HTML tag name for slider. Defaults to div. */ public function getTagName() { return "div"; } /** * Add the specified css classes to the track * @param \Prado\Web\UI\THtmlWriter $writer writer */ protected function addAttributesToRender($writer) { parent::addAttributesToRender($writer); $writer->addAttribute('id', $this->getClientID()); if ($this->getCssClass() === '') { $class = ($this->getDirection() == TSliderDirection::Horizontal) ? 'HorizontalSlider' : 'VerticalSlider'; $writer->addAttribute('class', 'Slider ' . $class); } } /** * Render the body content * @param mixed $writer */ public function renderContents($writer) { // Render the 'Track' $writer->addAttribute('class', 'Track'); $writer->addAttribute('id', $this->getClientID() . '_track'); $writer->renderBeginTag('div'); // Render the 'Progress Indicator' if ($this->getProgressIndicator()) { $writer->addAttribute('class', 'Progress'); $writer->addAttribute('id', $this->getClientID() . '_progress'); $writer->renderBeginTag('div'); $writer->renderEndTag(); } // Render the 'Ruler' /* * Removing for now $writer->addAttribute('class', 'RuleContainer'); $writer->addAttribute('id', $this->getClientID()."_rule"); $writer->renderBeginTag('div'); for ($i=0;$i<=100;$i+=10) { $writer->addAttribute('class', 'RuleMark'); $attr=($this->getDirection()===TSliderDirection::Horizontal)?"left":"top"; $writer->addStyleAttribute($attr, $i.'%'); $writer->renderBeginTag('div'); $writer->renderEndTag(); } $writer->renderEndTag(); */ $writer->renderEndTag(); // Render the 'Handle' $writer->addAttribute('class', 'Handle'); $writer->addAttribute('id', $this->getClientID() . '_handle'); $writer->renderBeginTag('div'); $writer->renderEndTag(); } /** * Registers CSS and JS. * This method is invoked right before the control rendering, if the control is visible. * @param mixed $param event parameter */ public function onPreRender($param) { parent::onPreRender($param); $this->registerStyleSheet(); $this->registerSliderClientScript(); } /** * Registers the CSS relevant to the TSlider. * It will register the CSS file specified by {@link getCssUrl CssUrl}. * If that is not set, it will use the default CSS. */ protected function registerStyleSheet() { if (($url = $this->getCssUrl()) === '') { $manager = $this->getApplication()->getAssetManager(); // publish the assets $url = $manager->publishFilePath(__DIR__ . DIRECTORY_SEPARATOR . 'assets' . DIRECTORY_SEPARATOR . 'TSlider'); $url .= '/TSlider.css'; } $this->getPage()->getClientScript()->registerStyleSheetFile($url, $url); } /** * Registers the javascript code to initialize the slider. */ protected function registerSliderClientScript() { $page = $this->getPage(); $cs = $page->getClientScript(); $cs->registerPradoScript("slider"); $id = $this->getClientID(); $cs->registerHiddenField($id . '_1', $this->getValue()); $page->registerRequiresPostData($this); $cs->registerPostBackControl($this->getClientClassName(), $this->getSliderOptions()); } /** * Get javascript sliderr options. * @return array slider client-side options */ protected function getSliderOptions() { // PostBack Options : $options['ID'] = $this->getClientID(); $options['EventTarget'] = $this->getUniqueID(); $options['AutoPostBack'] = $this->getAutoPostBack(); // Slider Control options $minValue = $this->getMinValue(); $maxValue = $this->getMaxValue(); $options['axis'] = strtolower($this->getDirection()); $options['maximum'] = $maxValue; $options['minimum'] = $minValue; $options['range'] = [$minValue, $maxValue]; $options['sliderValue'] = $this->getValue(); $options['disabled'] = !$this->getEnabled(); $values = $this->getValues(); if (!empty($values)) { // Values are provided. Check if min/max are present in them if (!in_array($minValue, $values)) { $values[] = $minValue; } if (!in_array($maxValue, $values)) { $values[] = $maxValue; } // Remove all values outsize the range [min..max] foreach ($values as $idx => $value) { if ($value < $minValue) { unset($values[$idx]); } if ($value > $maxValue) { unset($values[$idx]); } } } else { // Values are not provided, generate automatically using stepsize $step = $this->getStepSize(); // We want at most self::MAX_STEPS values, so, change the step if necessary if (($maxValue - $minValue) / $step > self::MAX_STEPS) { $step = ($maxValue - $minValue) / self::MAX_STEPS; } $values = []; for ($i = $minValue; $i <= $maxValue; $i += $step) { $values[] = $i; } // Add max if it's not in the array because of step if (!in_array($maxValue, $values)) { $values[] = $maxValue; } } $options['values'] = $values; if ($this->_clientScript !== null) { $options = array_merge($options, $this->_clientScript->getOptions()->toArray()); } return $options; } }
Close