Esempio n. 1
0
 /**
  * řešení
  */
 function ajaxify()
 {
     $action = $this->webPage->getRequestValue('action');
     if ($action) {
         if ($this->controlColumns()) {
             switch ($action) {
                 case 'delete':
                     if ($this->controlDeleteColumns()) {
                         $this->fallBackUrl = false;
                         if ($this->deleteFromMySQL()) {
                             $this->webPage->addStatusMessage(_('Smazáno'));
                         }
                     }
                     break;
                 case 'add':
                     if ($this->controlAddColumns()) {
                         if ($this->insertToMySQL()) {
                             $this->webPage->addStatusMessage(_('Záznam byl přidán'), 'success');
                         } else {
                             $this->webPage->addStatusMessage(_('Záznam nebyl přidám'), 'error');
                         }
                     }
                     break;
                 case 'edit':
                     if ($this->controlEditColumns()) {
                         if ($this->saveToMySQL()) {
                             $this->webPage->addStatusMessage(_('Záznam byl upraven'), 'success');
                         } else {
                             $this->webPage->addStatusMessage(_('Záznam nebyl upravn'), 'error');
                         }
                     }
                     break;
                 default:
                     break;
             }
         }
         if ($this->fallBackUrl) {
             $this->webPage->redirect(EasePage::arrayToUrlParams($this->fallBackData, $this->fallBackUrl));
             exit;
         }
     }
 }
Esempio n. 2
0
<?php

/**
 * LinkQuick - vložení nové adresy do databáze
 * @author Vitex <*****@*****.**>
 * @copyright Vitex@hippy.cz (G) 2009,2011
 */
require_once 'includes/LQInit.php';
require_once 'classes/LQEncoder.php';
$encoder = new Encoder();
$server = new SoapServer(null, ['uri' => EasePage::phpSelf()]);
$server->setObject($encoder);
$server->handle();
/*
 function hello($someone) {
 return "Hello " . $someone . "!";
 }
 $server = new SoapServer(null, array('uri' => "urn://www.herong.home/res"));
 $server->addFunction("hello");
 $server->handle();
*/