/**
  * (non-PHPdoc)
  * @see BaseExample::run()
  */
 public function run()
 {
     $values = $this->formValues;
     $account = new Google_Account();
     $account->setId($values['account_id']);
     $account->setCookieMatchingUrl($values['cookie_matching_url']);
     $account = $this->service->accounts->patch($values['account_id'], $account);
     print '<h2>Submitted account</h2>';
     $this->printResult($account);
 }
Example #2
0
<?php

/**
	@file
	@brief Contact Ajax Handler
*/
namespace Edoceo\Imperium;

use Edoceo\Radix\DB\SQL;
switch (strtolower($_GET['field'])) {
    case 'google':
        // Load the Google Data
        $GA = new Google_Account($_ENV['google']['username'], $_ENV['google']['password']);
        $gdf = $GA->getContact($this->_s->Contact->google_contact_id);
        echo '<pre> ' . html(print_r($gdf, true)) . '</pre>';
        //$xml = simplexml_load_string( $gdf->getXML() );
        // echo '<pre> ' . html(str_replace('><',">\n<",$xml->asXML())) . '</pre>';
        // exit(0);
        exit(0);
        // return(true);
}
// Query Handling
$q = trim($_GET['term']);
if (strlen($q) == 1) {
    $q = '^' . $q;
}
// $s = $this->_d->select();
// $s->from('contact',array('id','name as result','name as label','email','phone','contact','company'));
$arg = array();
$sql = 'SELECT id, name AS result, name AS label, email, phone, contact, company FROM contact ';
switch (strtolower($_GET['field'])) {