Example #1
0
$token = new InputText(80);
Data::getParm($token);
$table = new Table();
$table->setClass("tablebackground");
$table_form = new Table();
$table_form->setClass("tableforms");
$table_form->setRowsStyle("76dip;76dip;76dip");
$name = new InputText();
$name->setClass("inputForm");
$last_name = new InputText();
$last_name->setClass("inputForm");
$email = new InputEmail();
$email->setClass("inputForm");
$btn_save = new Button();
$btn_save->setCaption("Save");
$btn_save->setClass("buttonform");
$btn_save->onTap(save());
$table_form->addControl($name, 1, 1);
$table_form->addControl($last_name, 2, 1);
$table_form->addControl($email, 3, 1);
$table_button = new Table();
$table_button->addControl($btn_save, 1, 1);
$table->addControl($table_form, 1, 1);
$table->addControl($table_button, 2, 1);
$win->addControl($table);
$win->Render();
function refresh()
{
    $ur = "http://www.demo.kikapptools.com/magento/apiKikApp/api.php?metodo=userData&customerToken=" . $token;
    $http = new httpClient();
    $result = $http->Execute('GET', $ur);
Example #2
0
$email->setInviteMessage("E-Mail");
$email->setClass("input.form");
$password = new InputText();
$password->setClass("input.form");
$password->setInviteMessage("Password");
$password->setIsPassword(true);
$password_2 = new InputText();
$password_2->setClass("input.form");
$password_2->setInviteMessage("Confirm your Password");
$password_2->setIsPassword(true);
$table_form->addControl($email, 1, 1);
$table_form->addControl($password, 2, 1);
$table_form->addControl($password_2, 3, 1);
$btn_save = new Button();
$btn_save->setCaption("SIGN UP");
$btn_save->setClass("button.blue");
$btn_save->onTap(save());
$table_button = new Table();
$table_button->addControl($btn_save, 1, 1);
$table->addControl($table_form, 1, 1);
$table->addControl($table_button, 2, 1);
$win->addControl($table);
function save()
{
    if ($email == null) {
        echo "EMail is a required field.";
    } else {
        if ($password == null) {
            echo "Password is a required field.";
        } else {
            if ($password != $password_2) {
Example #3
0
<?php

/**
 * Main object.
 * @author Kikapp
 * @version 1.0
 */
$win = new SDPanel();
$win->setCaption("First Facebook Post!");
$actionBar = new ActionBar();
$actionBar->setClass("applicationBars");
$mainTable = new Table();
$input = new InputText();
//create input
$input->setLabelCaption("Write your thoughts");
$button = new Button();
$button->setCaption("Post on Facebook");
$button->onTap(facebook());
$button->setClass("button.blue");
$mainTable->addControl($input, 1, 1, 1, 1, "Center", "Middle");
$mainTable->addControl($button, 2, 1, 1, 1, "Center", "Middle");
$win->addControl($mainTable);
function facebook()
{
    Facebook::PostToWall("First post", "Caption", $input, "http://www.kikapptools.com", "");
}
Example #4
0
$username->setInviteMessage("E-Mail");
$password = new InputText();
$password->setClass("input.form");
$password->setInviteMessage("Password");
$password->setIsPassword(true);
$label = new Label();
$label->setCaption("OR");
$label->setClass("label.big");
$btn_save = new Button();
$btn_save->setCaption("Log in");
$btn_save->onTap(login());
$btn_save->setClass("button.blue");
$btn_register = new Button();
$btn_register->setCaption("Sign up");
$btn_register->onTap(register());
$btn_register->setClass("button.blue");
$table_form->addControl($username, 1, 1);
$table_form->addControl($password, 2, 1);
$table_button = new Table();
$table_button->addControl($btn_save, 1, 1);
$table_button->addControl($label, 2, 1, 1, 1, "Center", "Middle");
$table_button->addControl($btn_register, 3, 1);
$table->addControl($table_form, 1, 1);
$table->addControl($table_button, 2, 1);
$win->addControl($table);
function login()
{
    if ($username == null) {
        echo "E-Mail is a required field.";
    } else {
        if ($password == null) {
$grid->setRowsPerPagePortrait(1);
$grid->setShowPageController(true);
//$grid -> setPageControllerBackColor("#FFFFFF");
$grid->addData(load_image());
//$grid -> onTap(view_image());
$grid->setPageControllerClass("table.grid");
$table_grid = new Table();
$table_grid->setRowsStyle("100%");
$table_grid->setHeight("100%");
$table_grid->setClass("table.grid");
$image = new InputImage();
$image->setClass("imageImageList");
$table_grid->addControl($image, 1, 1);
$grid->addControl($table_grid, 1, 1);
$btnAdd = new Button();
$btnAdd->setClass("buttonred");
$btnAdd->setCaption("Add to Cart");
$btnAdd->onTap(add_cart());
$tableButtons = new Table();
$tableButtons->addControl($btnAdd, 1, 1);
$tableItemDetail->addControl($title, 1, 1, 1, 2, "Left", "Middle");
$tableItemDetail->addControl($price, 2, 1, 1, 1, "Left", "Middle");
$tableItemDetail->addControl($stock, 2, 2, 1, 1, "Center", "Middle");
$tableItemDetail->addControl($desc, 3, 1, 1, 2, "Left", "Middle");
$tableItemDetail->addControl($tableButtons, 4, 1, 1, 2, "Left", "Middle");
$table->addControl($grid, 1, 1);
$table->addControl($tableItemDetail, 2, 1);
$table->setRowsStyle("250dip;100%");
$win->addControl($table, 1, 1, 1, 2);
function load_image()
{
Example #6
0
$email->setClass("inputForm");
$email->setInviteMessage("E-Mail");
$pass = new InputText();
$pass->setClass("inputForm");
$pass->setInviteMessage("Password");
$pass->setIsPassword(true);
$btn_save = new Button();
$btn_save->setCaption("LOG IN");
$btn_save->setClass("buttonform");
$btn_save->onTap(login());
$lbl_signup = new Label();
$lbl_signup->setClass("label.SubTitlelogin");
$lbl_signup->setCaption("Not a store member?");
$btn_register = new Button();
$btn_register->setCaption("SIGN UP NOW");
$btn_register->setClass("button.Small");
$btn_register->onTap(register());
$table_form->addControl($email, 1, 1);
$table_form->addControl($pass, 2, 1);
$table->addControl($lbl_home, 1, 1, 1, 1, "Center", "Middle");
$table->addControl($table_form, 2, 1);
$table_button = new Table();
$table_button->addControl($btn_save, 1, 1);
$table_button->addControl($lbl_signup, 2, 1, 1, 1, "Center", "Middle");
$table_button->addControl($btn_register, 3, 1);
$table->addControl($table_button, 3, 1);
$win->addControl($table);
$win->Render();
function login()
{
    if ($email == null) {
Example #7
0
$total = new InputText(10);
$total->setReadOnly(true);
$total->setClass("input.textPriceTotal");
//$total -> setLabelPosition("Left");
//$total -> setLabelCaption("$");
$subtotal = new InputText(10);
$subtotal->setReadOnly(true);
$subtotal->setClass("input.textPrice");
$shipping = new InputText(10);
$shipping->setReadOnly(true);
$shipping->setClass("input.textPrice");
$tax = new InputText(10);
$tax->setReadOnly(true);
$tax->setClass("input.textPrice");
$btn_checkout = new Button();
$btn_checkout->setClass("buttonred");
$btn_checkout->setCaption("CHECKOUT NOW");
$btn_checkout->onTap(checkout());
$table_total = new Table();
$table_total->setColumnsStyle("70%;30%");
$table_total->setRowsStyle("25dip;25dip;25dip;40dip");
$table_total->addControl($lbl_sub_total, 1, 1, 1, 1, "Left", "Middle");
$table_total->addControl($subtotal, 1, 2, 1, 1, "Right", "Middle");
$table_total->addControl($lbl_tax, 2, 1, 1, 1, "Left", "Middle");
$table_total->addControl($tax, 2, 2, 1, 1, "Right", "Middle");
$table_total->addControl($lbl_shipping, 3, 1, 1, 1, "Left", "Middle");
$table_total->addControl($shipping, 3, 2, 1, 1, "Right", "Middle");
$table_total->addControl($lbl_total, 4, 1, 1, 1, "Left", "Middle");
$table_total->addControl($total, 4, 2, 1, 1, "Right", "Middle");
$table_result->addControl($table_total, 1, 1);
$table_result->addControl($btn_checkout, 2, 1, 1, 1, "Left", "Top");
Example #8
0
<?php

/**
 * Button control example.
 * mainButton.php
 */
$win = new SDPanel();
$win->setCaption("Button control");
$tabMain = new Table();
$button = new Button();
$button->setCaption("Button");
$button->setClass("button.Example");
$button->onTap(action());
$tabMain->addControl($button, 1, 1);
$win->addControl($tabMain);
function action()
{
    echo "Hello world!";
}