$_CGET[$column] = $value; } } # Overwriting with our specific update column values if (isset($G_TOKEN_SESSION_DATA->{NQ_SESSION_GROUP}->update->{$G_TABLE_DETAILS['alias']})) { foreach ($G_TOKEN_SESSION_DATA->{NQ_SESSION_GROUP}->update->{$G_TABLE_DETAILS['alias']} as $column => $value) { $_CGET[$column] = $value; } } # Setting up our return content $content = new stdClass(); $content->success = true; $content->affected_rows = 0; $content->matched_rows = 0; $content->partition = $partition_evaluation; $content->env = PostParser::create_attribute($G_APP_ENVIRONMENT); # Partition evaluations $evaluation_query = ''; # Specific partitions if (isset($_CGET['partition'])) { $search = MySQLParser::column_compare_info($_CGET['partition']); $values = []; foreach (array_unique($search['values']) as $value) { $values[] = "'" . mysqli_escape_string($G_CONTROLLER_DBLINK, $value) . "'"; } $evaluation_query = " AND `evaluation`" . $search['compare'] . implode(isset($search['separator']) ? $search['separator'] : ',', $values) . $search['close']; } else { $partition_evaluation = get_table_partition_evaluation($G_TABLE_DETAILS, (object) $_CGET); $evaluation_query = $partition_evaluation !== false ? " AND `evaluation` ='" . mysqli_escape_string($G_CONTROLLER_DBLINK, $partition_evaluation) . "'" : ""; } # Which partitions are we going to be working with
$content->created = PostParser::create_attribute($directory_data['created']); $content->directories = PostParser::create_attribute($directory_data['directories']); $content->env = PostParser::create_attribute($G_APP_ENVIRONMENT); $content->files = PostParser::create_attribute($directory_data['files']); $content->filesize = PostParser::create_attribute($directory_data['filesize']); $content->modified = PostParser::create_attribute($directory_data['modified']); $content->page = PostParser::create_attribute($page); $content->pages = PostParser::create_attribute($pages); $content->path = PostParser::create_attribute(substr($directory_data['path'], 1) . $directory_data['name'] == '' ? '/' : substr($directory_data['path'], 1) . $directory_data['name']); # Copying over our get variables and next page if ($page < $pages && !isset($_CGET['nopagination'])) { $cgets = array(); unset($_CGET['page']); foreach ($_CGET as $key => $value) { $cgets[] = $key . '=' . $value; } $nexturl = isset($_CGET['nexturl']) ? $_CGET['nexturl'] : NQ_DOMAIN_ROOT . '/' . (isset($G_GLOBAL_APP_DATA['id']) ? $G_GLOBAL_APP_DATA['id'] . '_' : '') . $G_APP_DATA['id'] . '/dir'; $nextparams = isset($_CGET['hidenextparams']) ? '' : implode('&', $cgets) . '&'; $content->nextpage = PostParser::create_attribute($nexturl . '?' . $nextparams . 'page=' . ($page + 1)); } # We are done! PostParser::send($content); /* --- Connection closed wit PostParser::send --- Below this point things need to be tracked and cleaned up --- */ # Closing the storage connection mysqli_shared_close($G_STORAGE_CONTROLLER_DBLINK, $G_SHARED_DBLINKS); # Closing controller if tracking is different if (NQ_CONTROLLER_HOST != NQ_TRACKING_HOST) { mysqli_shared_close($G_CONTROLLER_DBLINK, $G_SHARED_DBLINKS); } # Adding our usage track_endpoint($G_SHARED_DBLINKS, $G_APP_DATA['id'], $G_APP_ENVIRONMENT, $_ENDPOINT);