Exemple #1
0
        $calPublicationDate = isset($_ITEM->PublicationDate) ? $_ITEM->PublicationDate : 00 - 00 - 00;
        $tempstr = $strAuthor . '~' . $_ITEM->Binding . '~' . $intPages . '~' . $strPublisher . '~' . $calPublicationDate . '~' . $strISBN;
        $item_pass = $item_pass . '~' . $tempstr;
        break;
    case 'DVD':
        $tempstr = $strActor . '~' . $strDirector . '~' . $intRunningTime;
        $item_pass = $item_pass . '~' . $tempstr;
        break;
    case 'Music':
        $tempstr = $strArtist . '~' . $_ITEM->Label . '~' . $strNumberOfDiscs;
        $item_pass = $item_pass . '~' . $tempstr;
        break;
}
if ($owned == true) {
    $imgAddLink = new QImageButton($this->dtrAmazon);
    $imgAddLink->ImageUrl = '../assets/images/48x48/heart.png';
    $imgAddLink->ToolTip = 'You Own this';
} else {
    $imgAddLink = new QImageButton($this->dtrAmazon);
    $imgAddLink->ImageUrl = '../assets/images/48x48/add.png';
    $imgAddLink->AddAction(new QClickEvent(), new QServerAction('AddClicked'));
    $imgAddLink->ToolTip = 'Add to collection';
    $imgAddLink->ActionParameter = $item_pass;
}
$imgAddLink->Render();
?>
</td>
	</tr>

</table>
        $img = $_ITEM->ImageURL;
    } else {
        $img = '../assets/images/48x48/help.png';
    }
    ?>
 
				<img src='<?php 
    _p($img);
    ?>
' width=95px height=110px></img>
			 </div>
			<div> 
				<?php 
    if ($cnt <= 0) {
        $item_pass = $_ITEM->Id . '~' . $_ITEM->Title;
        $btnChoose = new QImageButton($this->dtrAssets);
        $btnChoose->ImageUrl = '../assets/images/32x32/add_to_shopping_cart.png';
        $btnChoose->AlternateText = 'Add to Basket';
        $btnChoose->AddAction(new QClickEvent(), new QServerAction('ChooseAssets_Click'));
        $btnChoose->ActionParameter = $item_pass;
        $btnChoose->Render();
    } else {
        ?>
					<b>
						<?php 
        _p('This item is shared with ' . $name);
        ?>
					</b><?php 
    }
    ?>
			</div>
 protected function Form_Create()
 {
     $this->txtText = new QTextBox($this);
     $this->txtText->Text = 'Default';
     $this->txtText->Name = 'TextBox';
     $this->txtText2 = new QTextBox($this);
     $this->txtText2->Text = 'Big';
     $this->txtText2->Name = 'TextBox';
     $this->txtText2->TextMode = QTextMode::MultiLine;
     $this->txtText2->Rows = 3;
     $this->chkCheck = new QCheckBox($this);
     $this->chkCheck->Name = 'CheckBox';
     $this->chkCheck->WrapLabel = true;
     $items = array(1 => 'Item1', 2 => 'Item2', 3 => 'Item3', 4 => 'Item4');
     $this->lstSelect = new QListBox($this);
     $this->lstSelect->AddItems($items);
     $this->lstSelect->Name = 'Select';
     $this->lstSelect2 = new QListBox($this);
     $this->lstSelect2->AddItems($items);
     $this->lstSelect2->Name = 'Multiselect';
     $this->lstSelect2->SelectionMode = QSelectionMode::Multiple;
     $this->lstCheck = new QCheckBoxList($this);
     $this->lstCheck->AddItems($items);
     $this->lstCheck->Name = 'Check List';
     $this->lstCheck->RepeatDirection = QRepeatDirection::Horizontal;
     $this->lstCheck->RepeatColumns = 4;
     $this->lstCheck2 = new QCheckBoxList($this);
     $this->lstCheck2->AddItems($items);
     $this->lstCheck2->Name = 'Check List';
     $this->lstCheck2->RepeatColumns = 1;
     $this->lstCheck2->MaxHeight = 100;
     $this->lstCheck2->WrapLabel = true;
     $this->lstCheck2->Name = 'Check List 2';
     $this->lstRadio = new QRadioButtonList($this);
     $this->lstRadio->AddItems($items);
     $this->lstRadio->Name = 'Radio List';
     $this->lstRadio->RepeatDirection = QRepeatDirection::Horizontal;
     $this->lstRadio->RepeatColumns = 4;
     $this->lstRadio->SelectedIndex = 1;
     $this->rdoRadio1 = new QRadioButton($this);
     $this->rdoRadio1->Name = 'Item 1';
     $this->rdoRadio1->GroupName = 'MyGroup';
     $this->rdoRadio2 = new QRadioButton($this);
     $this->rdoRadio2->Name = 'Item 2';
     $this->rdoRadio2->GroupName = 'MyGroup';
     $this->rdoRadio3 = new QRadioButton($this);
     $this->rdoRadio3->Name = 'Item 3';
     $this->rdoRadio3->GroupName = 'MyGroup';
     $this->btnImage = new QImageButton($this);
     $this->btnImage->Name = 'Image Button';
     $this->btnImage->ImageUrl = __PHP_ASSETS__ . '/examples/images/data_model_thumbnail.png';
     $this->btnImage->AddAction(new QClickEvent(), new QRegisterClickPositionAction());
     $this->btnServer = new QButton($this);
     $this->btnServer->Text = 'Server Submit';
     $this->btnServer->AddAction(new QClickEvent(), new QServerAction('submit_click'));
     $this->btnAjax = new QButton($this);
     $this->btnAjax->Text = 'Ajax Submit';
     $this->btnAjax->AddAction(new QClickEvent(), new QAjaxAction('submit_click'));
     $this->btnSetItemsAjax = new QButton($this);
     $this->btnSetItemsAjax->Text = 'Ajax Set Items';
     $this->btnSetItemsAjax->AddAction(new QClickEvent(), new QAjaxAction('setItems_click'));
 }