Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 21 additions & 28 deletions quickbase.php
Original file line number Diff line number Diff line change
Expand Up @@ -635,9 +635,7 @@ public function gen_results_table($queries = 0, $qid = 0, $qname=0, $clist = 0,
/* API_GetDBPage: http://www.quickbase.com/api-guide/index.html#get_db_page.html */
public function get_db_page($page_id) {
if($this->xml) {
$xml_packet = '
'.$page_id.'
';
$xml_packet = ''.$page_id.'';
$response = $this->transmit($xml_packet, 'API_GetDBPage');
}
else {
Expand Down Expand Up @@ -717,31 +715,26 @@ public function get_schema () {
}
return false;
}

/* API_GetUserRole: http://www.quickbase.com/api-guide/index.html#getuserrole.html */
public function get_user_role () {
if($this->xml) {
$xml_packet = new SimpleXMLElement('<qdbapi></qdbapi>');
$xml_packet->addChild('ticket',$this->ticket);

if ($this->app_token)
$xml_packet->addChild('apptoken', $this->app_token);
$xml_packet->addChild('uid', $this->user_id);
$xml_packet = $xml_packet->asXML();
$response = $this->transmit($xml_packet, 'API_GetUserRole');
}
else {
$url_string = $this->qb_ssl . $this->db_id. "?act=API_GetUserRole&ticket=". $this->ticket;

$response = $this->transmit($url_string);
}

if($response) {
return $response;
}
return false;
}

public function get_user_role () {
if($this->xml) {
$xml_packet = new SimpleXMLElement('<qdbapi></qdbapi>');
$xml_packet->addChild('ticket',$this->ticket);
if ($this->app_token)
$xml_packet->addChild('apptoken', $this->app_token);
$xml_packet->addChild('uid', $this->user_id);
$xml_packet = $xml_packet->asXML();
$response = $this->transmit($xml_packet, 'API_GetUserRole');
}
else {
$url_string = $this->qb_ssl . $this->db_id. "?act=API_GetUserRole&ticket=". $this->ticket;
$response = $this->transmit($url_string);
}
if($response) {
return $response;
}
return false;
}
/* API_GrantedDB's: http://www.quickbase.com/api-guide/index.html */
public function granted_dbs () {
if($this->xml) {
Expand Down Expand Up @@ -893,4 +886,4 @@ public function api_run_import($id) {
return false;
}
}
?>
?>