/** * Main object. * @author Kikapp * @version 1.0 */ $win = new SDPanel(); $win->setCaption("Address Book"); $actionBar = new ActionBar(); $actionBar->setClass("applicationBars"); $mainTable = new Table(); $btn_contact_add = new Button(); $btn_contact_add->setCaption("Add Contact"); $btn_contact_add->onTap(addContact()); $btn_contact_viewAll = new Button(); $btn_contact_viewAll->setCaption("View All Contact"); $btn_contact_viewAll->onTap(viewAllContact()); $input_name = new InputText(); $input_name->setLabelCaption("Name"); $input_lastname = new InputText(); $input_lastname->setLabelCaption("Last Name"); $input_email = new InputEmail(); $input_email->setLabelCaption("E-mail"); $input_phone = new InputPhone(); $input_phone->setLabelCaption("Phone"); $input_work = new InputText(); $input_work->setLabelCaption("Work"); $input_message = new InputText(); $input_message->setLabelCaption("Message"); $mainTable->addControl($input_name, 1, 1); $mainTable->addControl($input_lastname, 2, 1); $mainTable->addControl($input_email, 3, 1);
<?php /** * Main object. * @author Kikapp * @version 1.0 */ $win = new SDPanel(); $win->setCaption("First Facebook Post!"); $mainTable = new Table(); $input = new InputText(); $input->setLabelCaption(""); $button = new Button(); $button->setCaption("Post on Facebook"); $button->onTap(PostOnFacebook()); $mainTable->addControl($input, 1, 1); $mainTable->addControl($button, 2, 1); $win->addControl($mainTable); function PostOnFacebook() { Facebook::PostToWall("First post", "Caption", $input, "http://www.kikapptools.com", ""); }
<?php /** * Main object. * @author Kikapp * @version 1.0 */ $win = new SDPanel(); $win->setCaption("Interop"); $actionBar = new ActionBar(); $actionBar->setClass("applicationBars"); $mainTable = new Table(); $input_message = new InputText(); $input_message->setLabelCaption("Write the message"); $input_phone = new InputPhone(); $input_phone->setLabelCaption("Write the phone number"); $button_message = new Button(); $button_message->setCaption("Message!"); $button_message->onTap(message()); $mainTable->addControl($input_message, 1, 1); $mainTable->addControl($input_phone, 2, 1); $mainTable->addControl($button_message, 3, 1); $win->addControl($mainTable); function message() { Interop::SendMessage($input_message, $input_phone); }
<?php /*** * Popup */ $win = new SDPanel(); $win->setCaption(""); $table = new Table(); $table->setFormClass("form.algo"); $lugar = new Label(); $lugar->setCaption("Place"); $combo_box_lugar = new ComboBox(); $combo_box_lugar->setEmptyItem(false); $combo_box_lugar->setValues("All:1, Staples Center:2, Quicken Loans Arena:3"); $boton = new Button(); $boton->setCaption("Search"); $boton->onTap(clickme()); $table->addControl($lugar, 1, 1); $table->addControl($combo_box_lugar, 1, 2); $table->addControl($boton, 2, 1, 1, 2, "", ""); $win->addControl($table); function clickme() { echo "Searching..."; }
//$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() { $url = "http://www.demo.kikapptools.com/magento/apiKikApp/ProductImages.php?pId=" . $id; $httpClient = new httpClient();
<?php /** * Main object. * @author Kikapp * @version 1.0 */ $win = new SDPanel(); $win->setCaption("Hello world!"); $mainTable = new Table(); $input = new InputText(); $input->setLabelCaption("Write your name"); $button = new Button(); $button->setCaption("Click me!"); $button->onTap(clickme()); $mainTable->addControl($input, 1, 1); $mainTable->addControl($button, 2, 1); $win->addControl($mainTable); function clickme() { StorageAPI::Set("token", $input); $name = new InputText(); $name = StorageAPI::Get("token"); echo "Your name is: " . $name; }
<?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", ""); }
* Main object. * @author KikApp * @version 1.0 */ $win = new SDPanel(); $win->setCaption("Gecko CRM"); $mainTable = new Table(); $button = new Button(); $button->setCaption("Companies"); $button->onTap(list_companies()); $button_2 = new Button(); $button_2->setCaption("Contacts"); $button_2->onTap(list_contacts()); $button_3 = new Button(); $button_3->setCaption("Meetings"); $button_3->onTap(list_meetings()); $mainTable->addControl($button, 1, 1); $mainTable->addControl($button_2, 2, 1); $mainTable->addControl($button_3, 3, 1); $win->addControl($mainTable); function list_companies() { $win->Open("list_companies"); } function list_contacts() { $win->Open("list_contact"); } function list_meetings() { $win->Open("list_meeting");
$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"); $table->addControl($list, 1, 1); $table->addControl($table_result, 2, 1, 1, 1, "Left", "Bottom");
<?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!"; }
<?php /*** * Popup */ $win = new SDPanel(); $win->setCaption(""); $table = new Table(); //$table -> setFormClass("form.algo"); $lugar = new Label(); $lugar->setCaption("Place"); $combo_box_lugar = new ComboBox(); $combo_box_lugar->setEmptyItem(false); //$combo_box_fecha-> setEmptyItemText("Choose options"); $combo_box_lugar->setValues("All:1, Staples Center:2, Quickens Loans Arena:3"); $boton = new Button(); $boton->setCaption("Search"); $boton->onTap(prueba()); $table->addControl($lugar, 1, 1); $table->addControl($combo_box_lugar, 1, 2); $table->addControl($boton, 2, 1, 1, 2, "", ""); $win->addControl($table); function prueba() { echo "Searching..."; }
<?php /** * Main object. * @author Kikapp * @version 1.0 */ $win = new SDPanel(); $win->setCaption("Hello world!"); $mainTable = new Table(); $button = new Button(); $button->setCaption("Click me!"); $button->onTap(back()); $mainTable->addControl($button, 1, 1); $win->addControl($mainTable); function back() { $ok = new InputBoolean(); $ok = Interop::Confirm('Are you sure you want to close?'); if ($ok == true) { return; } }
<?php /** * Main object. * @author Kikapp * @version 1.0 */ $win = new SDPanel(); $win->setCaption("Interop"); $actionBar = new ActionBar(); $actionBar->setClass("applicationBars"); $mainTable = new Table(); $input_phone = new InputPhone(); $input_phone->setLabelCaption("Write the phone number"); $button_call = new Button(); $button_call->setCaption("Call!"); $button_call->onTap(call()); $mainTable->addControl($input_phone, 1, 1); $mainTable->addControl($button_call, 2, 1); $win->addControl($mainTable); function call() { Interop::PlaceCall($input_phone); }
* Main object. * @author Kikapp * @version 1.0 */ $win = new SDPanel(); $win->setCaption("Login"); $table = new Table(); $table_form = new Table(); $email = new InputEmail(); $email->setInviteMessage("E-Mail"); $pass = new InputText(); $pass->setIsPassword(true); //it hides characters $btn_save = new Button(); $btn_save->setCaption("LOG IN"); $btn_save->onTap(login()); $table_form->addControl($email, 1, 1); $table_form->addControl($pass, 2, 1); $table->addControl($table_form, 2, 1); $table_button = new Table(); $table_button->addControl($btn_save, 1, 1); $table->addControl($table_button, 3, 1); $win->addControl($table); function login() { if ($email == null) { echo "E-Mail is a required field."; //you can't leave it blank } else { ProgressIndicator::ShowWithTitle("Loading..."); ProgressIndicator::Hide();
$token = new InputText(80); $table = new Table(); $table->setRowsStyle("100%"); $table->setWidth("100%"); $table->setHeight("100%"); $table->setClass("table.white"); $table_form = new Table(); $table_form->setRowsStyle("76dip;76dip"); $table_form->setClass("table.forms"); $money_value = new InputNumeric(15); $money_value->setClass("input.form"); $input_date = new InputDate(); $input_date->setClass("input.form"); $button = new Button(); $button->setCaption("Confirm"); $button->onTap(confirm()); $button->setClass("button.blue"); $table_form->addControl($money_value, 1, 1, 1, 1, "Center", "Middle"); $table_form->addControl($input_date, 2, 1, 1, 1, "Center", "Middle"); $table_button = new Table(); $table_button->addControl($button, 1, 1, 1, 1, "Center", "Middle"); $table->addControl($table_form, 1, 1); $table->addControl($table_button, 2, 1); $win->addControl($table); function confirm() { $token = StorageAPI::Get("token"); ProgressIndicator::ShowWithTitle("Adding budget..."); $httpUpdate = new httpClient(); $httpUpdate->addVariable('money', $money_value); $httpUpdate->addVariable('dates', $input_date);
<?php /** * Main object. * @author Kikapp * @version 1.0 */ $win = new SDPanel(); $win->setCaption("Hello world!"); $mainTable = new Table(); $twitterUrl = new InputText(); $button = new Button(); $button->setCaption("Open Twitter!"); $button->onTap(openTW()); $mainTable->addControl($button, 1, 1); $win->addControl($mainTable); function openTW() { $twitterUrl = "https://twitter.com/kikapptools"; Interop::Open($twitterUrl); }
$username->setClass("input.form"); $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 {
<?php /** * Main object. * @author Kikapp * @version 1.0 */ $win = new SDPanel(); $win->setCaption("Twitter API!"); $actionBar = new ActionBar(); $actionBar->setClass("applicationBars"); $mainTable = new Table(); //$mainTable-> setClass("table.general"); $input = new InputText(); $input->setLabelCaption("Write what you want to tweet!"); $button = new Button(); $button->setCaption("Tweet!"); $button->onTap(twitter()); $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 twitter() { Twitter::Tweet($input); }
<?php /** * Main object. * @author Kikapp * @version 1.0 */ $win = new SDPanel(); $win->setCaption("Interop"); $actionBar = new ActionBar(); $actionBar->setClass("applicationBars"); $mainTable = new Table(); $input_message = new InputText(); $input_message->setLabelCaption("Write the message"); $input_phone = new InputPhone(); $input_phone->setLabelCaption("Write the phone number"); $button_sms = new Button(); $button_sms->setCaption("Send SMS!"); $button_sms->onTap(sms()); $mainTable->addControl($input_message, 1, 1); $mainTable->addControl($input_phone, 2, 1); $mainTable->addControl($button_sms, 3, 1); $win->addControl($mainTable); function sms() { Interop::SendSMS($input_phone, $input_message); }
<?php /** * Main object. * @author Kikapp * @version 1.0 */ $win = new SDPanel(); $win->setCaption("Scanner API"); $mainTable = new Table(); $button = new Button(); $button->setCaption("Scan!"); $button->onTap(scanner()); $mainTable->addControl($button, 1, 1); $win->addControl($mainTable); function scanner() { $code = new InputText(); $code = ScannerAPI::ScanBarcode(); echo "code " . $code; }
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); $sdtUser = array("firstname" => DataType::Character(35), "lastname" => DataType::Character(50), "email" => DataType::Email());
<?php $win = new SDPanel(); $win->setCaption("httpClient Example"); $table = new Table(); $city = new InputText(); $city->setReadOnly(true); $button = new Button(); $button->setCaption("Load City"); $button->onTap(loadCity()); $table->addControl($city, 1, 1); $table->addControl($button, 2, 1); $win->addControl($table); function loadCity() { $url = "http://demo.kikapptools.com/HttpClientEjemplo/crud/getCity.php"; $httpClient = new httpClient(); $result = $httpClient->Execute('GET', $url); $struct = array("nombreCiudad" => DataType::Character(150)); Data::FromJson($struct, $result); $city = $product['nombreCiudad']; }